Browse Source

优化查询条件

master
陈裕财 5 years ago
parent
commit
f0104c196d
  1. 211
      src/views/xm/core/xmIteration/XmIterationMng.vue
  2. 349
      src/views/xm/core/xmIteration/XmIterationSelect.vue
  3. 2
      src/views/xm/core/xmIterationMenu/XmIterationMenuMng.vue
  4. 38
      src/views/xm/core/xmMenu/XmMenuMng.vue
  5. 4
      src/views/xm/core/xmMenu/XmMenuRichDetail.vue
  6. 32
      src/views/xm/core/xmMenu/XmMenuSelect.vue
  7. 29
      src/views/xm/core/xmProduct/XmProductMng.vue
  8. 25
      src/views/xm/core/xmTask/XmTaskMng.vue

211
src/views/xm/core/xmIteration/XmIterationMng.vue

@ -1,68 +1,66 @@
<template>
<section>
<el-row v-if="!simple" class="app-container">
<el-checkbox v-model="gstcVisible" >甘特图</el-checkbox>
<el-input v-model="filters.key" style="width: 15%;" placeholder="模糊查询">
<template slot="append">
<el-button type="primary" v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmIterations" icon="el-icon-search"></el-button>
</template>
</el-input>
<el-button type="primary" @click="showAdd" icon="el-icon-plus">迭代计划</el-button>
<el-col style="display: contents;color: #606266;font-size: 14px;">创建时间:</el-col>
<el-date-picker v-model="dateRanger" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="完成日期" value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']" :picker-options="pickerOptions">
</el-date-picker>
<el-col style="display: contents;color: #606266;font-size: 14px;">上线时间:</el-col>
<el-date-picker v-model="dateRangerOnline" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="完成日期" value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']" :picker-options="pickerOptions">
</el-date-picker>
<el-button type="primary" @click="getXmIterations" icon="el-icon-search">查询</el-button>
<el-popover
placement="top-start"
title=""
width="400"
trigger="click" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">创建时间:</font>
<el-date-picker
v-model="dateRanger"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="完成日期"
value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
></el-date-picker>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">上线时间:</font>
<el-date-picker
v-model="dateRangerOnline"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="完成日期"
value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
></el-date-picker>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" type="primary" icon="el-icon-search" @click="getXmIterations">查询</el-button>
</el-col>
</el-row>
<el-button slot="reference" icon="el-icon-more" circle></el-button>
</el-popover>
<el-row class="app-container">
<el-checkbox v-model="gstcVisible" >甘特图</el-checkbox>
<el-col style="display: contents;color: #606266;font-size: 14px;">上线时间:</el-col>
<el-date-picker v-model="dateRangerOnline" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="完成日期" value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']" :picker-options="pickerOptions">
</el-date-picker>
<el-input v-model="filters.key" style="width: 15%;" placeholder="模糊查询">
<template slot="append">
<el-button type="primary" v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmIterations" icon="el-icon-search"></el-button>
</template>
</el-input>
<el-button type="primary" @click="showAdd" icon="el-icon-plus">迭代计划</el-button>
<el-popover
placement="top-start"
title=""
width="400"
trigger="click" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">
迭代查询范围
</font>
<el-select size="mini" v-model="filters.queryScope" style="width:100%;" placeholder="迭代查询范围">
<el-option :label="userInfo.branchName+'机构下所有的迭代'" value="branchId"></el-option>
<el-option label="我相关的迭代" value="compete"></el-option>
<el-option label="按迭代编号精确查找" value="iterationId"></el-option>
<el-option label="后台智能匹配" value=""></el-option>
</el-select>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-input v-if="filters.queryScope=='iterationId'" size="mini" v-model="filters.id" style="width:100%;" placeholder="输入产品编号" @keyup.enter.native="searchXmProducts">
</el-input>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">上线时间:</font>
<el-date-picker
v-model="dateRangerOnline"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="完成日期"
value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
></el-date-picker>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-tag>默认只能查询本人创建的迭代本人作为故事责任人参与的迭代</el-tag>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" type="primary" icon="el-icon-search" @click="getXmIterations">查询</el-button>
</el-col>
</el-row>
<el-button slot="reference" icon="el-icon-more" circle></el-button>
</el-popover>
</el-row>
<el-row v-if="!simple" class="app-container">
<el-row class="app-container">
<!--列表 XmIteration 迭代定义-->
<el-table ref="table" :max-height="tableHeight" v-if="!gstcVisible" :data="xmIterationTreeData" row-key="id" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column type="selection" aria-disabled width="55"></el-table-column>
@ -95,7 +93,7 @@
</el-table-column>
</el-table>
<el-pagination v-if="!gstcVisible" layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
<xm-gantt v-if="gstcVisible" :tree-data="xmIterationTreeData" :project-phase="{startTime: '2020-06-01', endTime: '2020-12-30'}" :columns="ganrrColumns" :useRealTime="false"></xm-gantt>
<xm-gantt v-if="gstcVisible" :tree-data="xmIterationTreeData" :project-phase="{startTime: '2020-06-01', endTime: '2020-12-30'}" :columns="ganrrColumns" :useRealTime="false"></xm-gantt>
<!--编辑 XmIteration 迭代定义界面-->
<el-dialog title="编辑迭代定义" :visible.sync="editFormVisible" width="50%" append-to-body :close-on-click-modal="false">
@ -111,24 +109,7 @@
<el-dialog title="迭代报告" :visible.sync="iterationStateVisible" fullscreen append-to-body :close-on-click-modal="false">
<xm-iteration-state-mng :xm-iteration="editForm" :visible="iterationStateVisible" @cancel="iterationStateVisible=false"></xm-iteration-state-mng>
</el-dialog>
</el-row>
<el-row v-if="simple ">
<!--列表 XmIteration 迭代定义-->
<el-table ref="table" :max-height="tableHeight" :data="xmIterationTreeData" row-key="id" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column prop="iterationName" label="迭代名称" min-width="160" >
<template slot="header" slot-scope="scope">
迭代名称 <el-tag size="mini" v-if="editForm.iterationName" closable @close="clearSelectIteration()">{{editForm.seqNo}}&nbsp;{{editForm.iterationName}}</el-tag>
</template>
<template slot-scope="scope">
{{scope.row.seqNo}} &nbsp;&nbsp;{{scope.row.iterationName}}
</template>
</el-table-column>
<el-table-column prop="onlineTime" label="上线时间" min-width="80" :formatter="formatterDate"></el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
</el-row>
</el-row>
</section>
</template>
@ -154,7 +135,7 @@
return this.translateDataToTree(this.xmIterations);
},
},
props:['simple','productId','menuId','visible'],
props:['productId','menuId','visible'],
watch:{
visible:function(visible){
if(visible==true){
@ -163,22 +144,25 @@
}
},
data() {
const beginDate = new Date();
const endDate = new Date();
beginDate.setTime(beginDate.getTime() - 3600 * 1000 * 24 * 7 * 4 * 3 );
const beginDate = new Date();
const endDate = new Date();
beginDate.setTime(beginDate.getTime() - 3600 * 1000 * 24 * 7 * 4 * 3 );
endDate.setTime(endDate.getTime() + 3600 * 1000 * 24 * 7 * 4 * 3 );
return {
filters: {
key: ''
key: '',
queryScope:'',// iterationId\branchId\compete\''
id:'',//
},
pickerOptions: util.pickerOptions('datarange'),
dateRanger: [
util.formatDate.format(beginDate, "yyyy-MM-dd"),
util.formatDate.format(endDate, "yyyy-MM-dd")
],//
dateRangerOnline: [
util.formatDate.format(beginDate, "yyyy-MM-dd"),
util.formatDate.format(endDate, "yyyy-MM-dd")
],//线
pickerOptions: util.pickerOptions('datarange'),
dateRanger: [
util.formatDate.format(beginDate, "yyyy-MM-dd"),
util.formatDate.format(endDate, "yyyy-MM-dd")
],//
dateRangerOnline: [
util.formatDate.format(beginDate, "yyyy-MM-dd"),
util.formatDate.format(endDate, "yyyy-MM-dd")
],//线
xmIterations: [],//
pageInfo:{//
total:0,//0>0
@ -260,15 +244,11 @@
pageNum: this.pageInfo.pageNum,
total: this.pageInfo.total,
count:this.pageInfo.count
};
if(!this.dateRanger || this.dateRanger.length==0){
this.$message({ message: "创建日期范围不能为空", type: 'error' });
return;
}
if(!this.dateRangerOnline || this.dateRangerOnline.length==0){
this.$message({ message: "上线日期范围不能为空", type: 'error' });
return;
}
};
if(!this.dateRangerOnline || this.dateRangerOnline.length==0){
this.$message({ message: "上线日期范围不能为空", type: 'error' });
return;
}
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){
let orderBys=[];
for(var i=0;i<this.pageInfo.orderFields.length;i++){
@ -284,14 +264,23 @@
}
if(this.menuId){
params.menuId=this.menuId
}
if( !this.menuId && !this.productId ){
params.queryScope=this.filters.queryScope
if(this.filters.queryScope=='iterationId'){
if(!this.filters.id){
this.$message({ message:"您选择了按迭代编号精确查找模式,请输入迭代编号", type: 'error' });
return;
}
params.id=this.filters.id
}
if(this.filters.queryScope=="branchId"){
params.branchId=this.userInfo.branchId
}
params.onlineTimeStart=this.dateRangerOnline[0]+" 00:00:00"
params.onlineTimeEnd=this.dateRangerOnline[1]+" 23:59:59"
}
if(!this.productId && !this.menuId){
params.branchId=this.userInfo.branchId
}
params.createTimeStart=this.dateRanger[0]+" 00:00:00"
params.createTimeEnd=this.dateRanger[1]+" 23:59:59"
params.onlineTimeStart=this.dateRanger[0]+" 00:00:00"
params.onlineTimeEnd=this.dateRanger[1]+" 23:59:59"
this.load.list = true;
listXmIterationWithState(params).then((res) => {
var tips=res.data.tips;

349
src/views/xm/core/xmIteration/XmIterationSelect.vue

@ -0,0 +1,349 @@
<template>
<section>
<el-row>
<!--列表 XmIteration 迭代定义-->
<el-table ref="table" :max-height="tableHeight" :data="xmIterationTreeData" row-key="id" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column prop="iterationName" label="迭代名称" min-width="160" >
<template slot="header" slot-scope="scope">
<el-row>
迭代名称 <el-tag size="mini" v-if="editForm.iterationName" closable @close="clearSelectIteration()">{{editForm.seqNo}}&nbsp;{{editForm.iterationName}}</el-tag>
</el-row>
</template>
<template slot-scope="scope">
{{scope.row.seqNo}} &nbsp;&nbsp;{{scope.row.iterationName}}
</template>
</el-table-column>
<el-table-column prop="onlineTime" label="上线时间" min-width="80" :formatter="formatterDate">
<template slot="header" slot-scope="scope">
上线时间 <el-popover v-if=" !menuId && !productId"
placement="top-start"
title=""
width="400"
trigger="click" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">
迭代查询范围
</font>
<el-select size="mini" v-model="filters.queryScope" style="width:100%;" placeholder="迭代查询范围">
<el-option :label="userInfo.branchName+'机构下所有的迭代'" value="branchId"></el-option>
<el-option label="我相关的迭代" value="compete"></el-option>
<el-option label="按迭代编号精确查找" value="iterationId"></el-option>
<el-option label="后台智能匹配" value=""></el-option>
</el-select>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-input v-if="filters.queryScope=='iterationId'" size="mini" v-model="filters.id" style="width:100%;" placeholder="输入产品编号" @keyup.enter.native="searchXmProducts">
</el-input>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">上线时间:</font>
<el-date-picker
v-model="dateRangerOnline"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="完成日期"
value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
></el-date-picker>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-tag>默认只能查询本人创建的迭代本人作为故事责任人参与的迭代</el-tag>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" type="primary" icon="el-icon-search" @click="getXmIterations">查询</el-button>
</el-col>
</el-row>
<el-button slot="reference" icon="el-icon-more" circle></el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import config from '@/common/config';//
import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmIteration,listXmIterationWithState, delXmIteration, batchDelXmIteration,loadTasksToXmIterationState } from '@/api/xm/core/xmIteration';
import { mapGetters } from 'vuex'
export default {
computed: {
...mapGetters([
'userInfo','roles'
]),
xmIterationTreeData(){
return this.translateDataToTree(this.xmIterations);
},
},
props:[ 'productId','menuId','visible'],
watch:{
visible:function(visible){
if(visible==true){
this.clearSelectIteration();
this.getXmIterations();
}
}
},
data() {
const beginDate = new Date();
const endDate = new Date();
beginDate.setTime(beginDate.getTime() - 3600 * 1000 * 24 * 7 * 4 * 3 );
endDate.setTime(endDate.getTime() + 3600 * 1000 * 24 * 7 * 4 * 3 );
return {
filters: {
key: '',
queryScope:'',// iterationId\branchId\compete\''
id:'',//
},
pickerOptions: util.pickerOptions('datarange'),
dateRangerOnline: [
util.formatDate.format(beginDate, "yyyy-MM-dd"),
util.formatDate.format(endDate, "yyyy-MM-dd")
],//线
xmIterations: [],//
pageInfo:{//
total:0,//0>0
pageSize:10,//
count:false,//
pageNum:1,//1
orderFields:[],// ['sex','student_id']
orderDirs:[]// asc,desc ['asc','desc']
},
load:{ list: false, edit: false, del: false, add: false },//...
sels: [],//
options:{
//sex:[],
},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
addFormVisible: false,//xmIteration
//xmIteration
addForm: {
id:'',branchId:'',iterationName:'',startTime:'',endTime:'',onlineTime:'',pid:'',adminUserid:'',adminUsername:'',ctime:'',budgetCost:'',budgetWorkload:'',distBudgetCost:'',distBudgetWorkload:'',actCost:'',actWorkload:'',actStaffNum:'',seqNo:'',
},
editFormVisible: false,//
//xmIteration
editForm: {
id:'',branchId:'',iterationName:'',startTime:'',endTime:'',onlineTime:'',pid:'',adminUserid:'',adminUsername:'',ctime:'',budgetCost:'',budgetWorkload:'',distBudgetCost:'',distBudgetWorkload:'',actCost:'',actWorkload:'',actStaffNum:'',seqNo:'',
},
editFormInit: {
id:'',branchId:'',iterationName:'',startTime:'',endTime:'',onlineTime:'',pid:'',adminUserid:'',adminUsername:'',ctime:'',budgetCost:'',budgetWorkload:'',distBudgetCost:'',distBudgetWorkload:'',actCost:'',actWorkload:'',actStaffNum:'',seqNo:'',
},
/**begin 自定义属性请在下面加 请加备注**/
valueChangeRows:[],
parentIteration:null,
iterationStateVisible:false,
gstcVisible:false,
tableHeight:300,
ganrrColumns: {
children: 'children',
name: 'iterationName',
id: 'id',
pid: 'pid',
startDate: 'startTime',
endDate: 'endTime',
}
/**end 自定义属性请在上面加 请加备注**/
}
},//end data
methods: {
handleSizeChange(pageSize) {
this.pageInfo.pageSize=pageSize;
this.getXmIterations();
},
handleCurrentChange(pageNum) {
this.pageInfo.pageNum = pageNum;
this.getXmIterations();
},
// obj.order=ascending/descending, asc/desc ; obj.prop=,
sortChange( obj ){
var dir='asc';
if(obj.order=='ascending'){
dir='asc'
}else{
dir='desc';
}
if(obj.prop=='xxx'){
this.pageInfo.orderFields=['xxx'];
this.pageInfo.orderDirs=[dir];
}
this.getXmIterations();
},
searchXmIterations(){
this.pageInfo.count=true;
this.getXmIterations();
},
// XmIteration
getXmIterations() {
let params = {
pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum,
total: this.pageInfo.total,
count:this.pageInfo.count
};
if(!this.dateRangerOnline || this.dateRangerOnline.length==0){
this.$message({ message: "上线日期范围不能为空", type: 'error' });
return;
}
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){
let orderBys=[];
for(var i=0;i<this.pageInfo.orderFields.length;i++){
orderBys.push(this.pageInfo.orderFields[i]+" "+this.pageInfo.orderDirs[i])
}
params.orderBy= orderBys.join(",")
}
if(this.filters.key){
params.key= "%"+this.filters.key+"%"
}
if(this.productId){
params.productId=this.productId
}
if(this.menuId){
params.menuId=this.menuId
}
if( !this.menuId && !this.productId ){
params.queryScope=this.filters.queryScope
if(this.filters.queryScope=='iterationId'){
if(!this.filters.id){
this.$message({ message:"您选择了按迭代编号精确查找模式,请输入迭代编号", type: 'error' });
return;
}
params.id=this.filters.id
}
if(this.filters.queryScope=="branchId"){
params.branchId=this.userInfo.branchId
}
params.onlineTimeStart=this.dateRangerOnline[0]+" 00:00:00"
params.onlineTimeEnd=this.dateRangerOnline[1]+" 23:59:59"
}
this.load.list = true;
listXmIterationWithState(params).then((res) => {
var tips=res.data.tips;
if(tips.isOk){
this.pageInfo.total = res.data.total;
this.pageInfo.count=false;
this.xmIterations = res.data.data;
}else{
this.$message({ message: tips.msg, type: 'error' });
}
this.load.list = false;
}).catch( err => this.load.list = false );
},
//xmIteration
selsChange: function (sels) {
this.sels = sels;
},
rowClick: function(row, event, column){
this.editForm=row
this.$emit('row-click',row, event, column);// @row-click="rowClick"
},
/**begin 自定义函数请在下面加**/
translateDataToTree(data2) {
var data=JSON.parse(JSON.stringify(data2));
let parents = data.filter(value =>{
//
if(value.pid == 'undefined' || value.pid == null || value.pid == ''){
return true;
//
}else if(data.some(i=>value.pid==i.id)){
return false;
}else {
return true
}
})
let children = data.filter(value =>{
if(data.some(i=>value.pid==i.id)){
return true;
}else{
return false;
}
})
let translator = (parents, children) => {
parents.forEach((parent) => {
children.forEach((current, index) => {
if (current.pid === parent.id) {
let temp = JSON.parse(JSON.stringify(children))
temp.splice(index, 1)
translator([current], temp)
typeof parent.children !== 'undefined' ? parent.children.push(current) : parent.children = [current]
}
}
)
}
)
}
translator(parents, children)
return parents
},
clearSelectIteration(){
this.editForm=this.editFormInit
this.$emit('clear-select',null );// @row-click="rowClick"
},
fieldChange:function(row,fieldName){
if(this.valueChangeRows.some(i=>i.id==row.id)){
return;
}else{
this.valueChangeRows.push(row)
}
},
formatterDate(row,column,cellValue, index){
if(cellValue){
return cellValue.substr(0,10);
}else{
return cellValue;
}
},
/**end 自定义函数请在上面加**/
},//end methods
components: {
//
},
mounted() {
this.$nextTick(() => {
var clientRect=this.$refs.table.$el.getBoundingClientRect();
var subHeight=65/1000 * window.innerHeight;
this.tableHeight = window.innerHeight -clientRect.y - this.$refs.table.$el.offsetTop-subHeight;
this.getXmIterations();
});
}
}
</script>
<style scoped>
.more-label-font{
text-align:center;
float:left;
padding-top:10px;
}
</style>

2
src/views/xm/core/xmIterationMenu/XmIterationMenuMng.vue

@ -44,7 +44,7 @@
import config from '@/common/config';//
import { listOption } from '@/api/mdp/meta/itemOption';//
import { listXmIterationMenu, delXmIterationMenu, batchDelXmIterationMenu,batchAddXmIterationMenu } from '@/api/xm/core/xmIterationMenu';
import XmIterationMng from '../xmIteration/XmIterationMng';//
import XmIterationMng from '../xmIteration/XmIterationSelect';//
import { mapGetters } from 'vuex'
import xmMenuSelect from '../xmMenu/XmMenuSelect';

38
src/views/xm/core/xmMenu/XmMenuMng.vue

@ -8,6 +8,10 @@
<el-col v-show="filters.product" :span="24" >
<el-row class="app-container">
<el-select v-model="filters.taskFilterType" placeholder="是否分配了任务?" clearable >
<el-option value="not-join" label="未分配任何任务的故事"></el-option>
<el-option value="join" label="已分配任务的故事"></el-option>
</el-select>
<el-date-picker
v-model="dateRanger"
type="daterange"
@ -43,13 +47,13 @@
width="400"
trigger="click" >
<el-row>
<el-col :span="24" style="padding-top:5px;" v-if="excludeIterationId">
<el-select v-if="excludeIterationId" v-model="filters.itertaionFilterType" placeholder="是否加入过迭代?" clearable >
<el-col :span="24" style="padding-top:5px;" >
<el-select v-model="filters.iterationFilterType" placeholder="是否加入过迭代?" clearable >
<el-option value="not-join" label="未加入任何迭代的故事"></el-option>
<el-option value="join" label="已加入迭代的故事"></el-option>
</el-select>
</el-col>
<el-col :span="24" style="padding-top:5px;" v-else>
<el-col :span="24" style="padding-top:5px;">
<el-select v-model="filters.taskFilterType" placeholder="是否分配了任务?" clearable >
<el-option value="not-join" label="未分配任何任务的故事"></el-option>
<el-option value="join" label="已分配任务的故事"></el-option>
@ -244,9 +248,9 @@
<el-dialog
append-to-body
title="故事关联的迭代查询"
:visible.sync="iterationVisible"
:visible.sync="iterationVisible"
>
<xm-iteration-mng :simple="true" :product-id="editForm.productId" :menu-id="editForm.menuId" ></xm-iteration-mng>
<xm-iteration-mng :visible="iterationVisible" :product-id="editForm.productId" :menu-id="editForm.menuId" ></xm-iteration-mng>
</el-dialog>
<el-dialog title="选择员工" :visible.sync="selectFiltersMmUserVisible" width="60%" append-to-body>
@ -277,7 +281,7 @@
import XmTaskList from '../xmTask/XmTaskList';
import XmTaskMng from '../xmTask/XmTaskMng';
import XmTaskListForMenu from '../xmTask/XmTaskListForMenu';
import XmIterationMng from '../xmIteration/XmIterationMng';//
import XmIterationMng from '../xmIteration/XmIterationSelect';//
import UsersSelect from "@/views/mdp/sys/user/UsersSelect";
import {sn} from '@/common/js/sequence'
@ -330,7 +334,7 @@
key: '',
product:null,
mmUser:null,
itertaionFilterType:'',//joinnot-join''
iterationFilterType:'',//joinnot-join''
taskFilterType:'',//joinnot-join''
},
xmMenus: [],//
@ -442,18 +446,14 @@
}
if(this.filters.mmUser){
params.mmUserid=this.filters.mmUser.userid;
}
if(this.excludeIterationId ){
params.excludeIterationId=this.excludeIterationId
if(this.filters.itertaionFilterType){
params.itertaionFilterType=this.filters.itertaionFilterType
}
}else{
if(this.filters.taskFilterType){
params.taskFilterType=this.filters.taskFilterType
}
}
}
params.excludeIterationId=this.excludeIterationId
if(this.filters.iterationFilterType){
params.iterationFilterType=this.filters.iterationFilterType
}
if(this.filters.taskFilterType){
params.taskFilterType=this.filters.taskFilterType
}
params.ctimeStart=this.dateRanger[0]+" 00:00:00"
params.ctimeEnd=this.dateRanger[1]+" 23:59:59"
let callback= (res)=>{

4
src/views/xm/core/xmMenu/XmMenuRichDetail.vue

@ -30,7 +30,7 @@
<el-col :span="10">
<el-row>
<el-button v-if="iterationVisible==false" @click="iterationVisible=true" icon="el-icon-search">查看迭代计划</el-button>
<xm-iteration-mng v-if="iterationVisible" :simple="true" :product-id="editForm.productId" :menu-id="editForm.menuId" ></xm-iteration-mng>
<xm-iteration-mng v-if="iterationVisible" :visible="iterationVisible" :product-id="editForm.productId" :menu-id="editForm.menuId" ></xm-iteration-mng>
</el-row>
<el-row style="padding-top:12px;">
<el-button v-if="exchangeMngVisible==false" @click="exchangeMngVisible=true" icon="el-icon-search">查看评论</el-button>
@ -46,7 +46,7 @@
//import { listOption } from '@/api/mdp/meta/itemOption';//
import { editXmMenu,listXmMenu } from '@/api/xm/core/xmMenu';
import { mapGetters } from 'vuex'
import XmIterationMng from '../xmIteration/XmIterationMng';//
import XmIterationMng from '../xmIteration/XmIterationSelect';//
import XmMenuExchangeMng from '../xmMenuExchange/XmMenuExchangeMng';//

32
src/views/xm/core/xmMenu/XmMenuSelect.vue

@ -8,7 +8,7 @@
</el-col>
<el-col :span="18" style="padding-left:12px;" >
<el-row >
<el-select class="hidden-md-and-down" v-if="excludeIterationId" v-model="filters.itertaionFilterType" placeholder="是否加入过迭代?" clearable >
<el-select class="hidden-md-and-down" v-if="excludeIterationId" v-model="filters.iterationFilterType" placeholder="是否加入过迭代?" clearable >
<el-option value="not-join" label="未加入任何迭代的故事"></el-option>
<el-option value="join" label="已加入迭代的故事"></el-option>
</el-select>
@ -39,13 +39,13 @@
width="400"
trigger="click" >
<el-row>
<el-col :span="24" style="padding-top:5px;" v-if="excludeIterationId">
<el-select v-if="excludeIterationId" v-model="filters.itertaionFilterType" placeholder="是否加入过迭代?" clearable >
<el-col :span="24" style="padding-top:5px;">
<el-select v-model="filters.iterationFilterType" placeholder="是否加入过迭代?" clearable >
<el-option value="not-join" label="未加入任何迭代的故事"></el-option>
<el-option value="join" label="已加入迭代的故事"></el-option>
</el-select>
</el-col>
<el-col :span="24" style="padding-top:5px;" v-else>
<el-col :span="24" style="padding-top:5px;">
<el-select v-model="filters.taskFilterType" placeholder="是否分配了任务?" clearable >
<el-option value="not-join" label="未分配任何任务的故事"></el-option>
<el-option value="join" label="已分配任务的故事"></el-option>
@ -160,7 +160,7 @@
filters: {
key: '',
product:null,
itertaionFilterType:'not-join',////join,not-join,''
iterationFilterType:'',////join,not-join,''
mmUser:null,
taskFilterType:'',//join,not-join,''
},
@ -263,17 +263,14 @@
params.ctimeEnd=this.dateRanger[1]+" 23:59:59"
if( this.filters.key){
params.key="%"+this.filters.key+"%"
}
if(this.excludeIterationId ){
params.excludeIterationId=this.excludeIterationId
if(this.filters.itertaionFilterType){
params.itertaionFilterType=this.filters.itertaionFilterType
}
}else{
if(this.filters.taskFilterType){
params.taskFilterType=this.filters.taskFilterType
}
}
}
params.excludeIterationId=this.excludeIterationId
if(this.filters.iterationFilterType){
params.iterationFilterType=this.filters.iterationFilterType
}
if(this.filters.taskFilterType){
params.taskFilterType=this.filters.taskFilterType
}
this.load.list = true;
listXmMenu(params).then((res) => {
@ -387,6 +384,9 @@
},
mounted() {
this.$nextTick(() => {
if(this.excludeIterationId){
this.filters.iterationFilterType='not-join'
}
this.getXmMenus();
var clientRect=this.$refs.table.$el.getBoundingClientRect();
var subHeight=80/1000 * window.innerHeight;

29
src/views/xm/core/xmProduct/XmProductMng.vue

@ -1,7 +1,28 @@
<template>
<section>
<el-row class="app-container">
<el-input v-model="filters.key" style="width: 40%;" placeholder="模糊查询">
<el-row class="app-container">
<el-select v-model="filters.queryScope" placeholder="产品查询范围">
<el-option :label="userInfo.branchName+'机构下所有的产品'" value="branchId"></el-option>
<el-option label="我相关的产品" value="compete"></el-option>
<el-option label="按产品编号精确查找" value="productId"></el-option>
<el-option label="后台智能匹配" value=""></el-option>
</el-select>
<el-input v-if="filters.queryScope=='productId'" style="width:20%;" v-model="filters.id" placeholder="输入产品编号" @keyup.enter.native="searchXmProducts">
</el-input>
<el-date-picker v-show="!selProject&&filters.queryScope!='productId'"
v-model="dateRanger"
type="daterange"
align="right"
class="hidden-md-and-down"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="完成日期"
value-format="yyyy-MM-dd"
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
></el-date-picker>
<el-input v-model="filters.key" style="width: 20%;" placeholder="模糊查询">
<template slot="append">
<el-button v-loading="load.list" :disabled="load.list==true" v-on:click="searchXmProducts" icon="el-icon-search"></el-button>
@ -128,7 +149,7 @@
<el-dialog
append-to-body
title="产品关联的迭代查询"
:visible.sync="iterationVisible"
:visible.sync="iterationVisible"
>
<xm-iteration-mng :simple="true" :visible="iterationVisible" :product-id="editForm.id" ></xm-iteration-mng>
</el-dialog>
@ -144,7 +165,7 @@
import XmProductAdd from './XmProductAdd';//
import XmProductEdit from './XmProductEdit';//
import { mapGetters } from 'vuex'
import XmIterationMng from '../xmIteration/XmIterationMng';//
import XmIterationMng from '../xmIteration/XmIterationSelect';//
import XmProductStateMng from '../xmProductState/XmProductStateMng';//

25
src/views/xm/core/xmTask/XmTaskMng.vue

@ -44,17 +44,7 @@
title=""
width="400"
trigger="click" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<el-button type="primary" size="mini" v-if=" isTaskCenter!='1' && isMy!='1'" @click="showBatchEdit" v-loading="load.edit" icon="el-icon-edit">批量修改任务</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" v-if=" isTaskCenter!='1' && isMy!='1'" @click="showTaskTemplate" type="success" icon="el-icon-plus">从模板快速导入任务</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" v-if=" isTaskCenter!='1' && isMy!='1'" @click="showMenu" type="success" icon="el-icon-plus">由故事快速创建任务</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">产品:</font><el-tag v-if=" filters.product " :closable="!xmProduct" @close="clearProduct">{{this.filters.product.productName}}</el-tag>
@ -109,7 +99,18 @@
<el-checkbox v-model="gstcVisible" >甘特图</el-checkbox>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" type="primary" icon="el-icon-search" @click="searchXmTasks">查询</el-button>
<el-button size="mini" type="primary" icon="el-icon-search" @click="searchXmTasks">查询</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" v-if=" isTaskCenter!='1' && isMy!='1'" @click="showBatchEdit" v-loading="load.edit" icon="el-icon-edit">批量修改任务</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" v-if=" isTaskCenter!='1' && isMy!='1'" @click="showTaskTemplate" icon="el-icon-plus">从模板快速导入任务</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" v-if=" isTaskCenter!='1' && isMy!='1'" @click="showMenu" icon="el-icon-plus">由故事快速创建任务</el-button>
</el-col>
</el-row>
<el-button slot="reference" icon="el-icon-more" circle></el-button>

Loading…
Cancel
Save