mirror of
https://gitee.com/maimengcloud/xm-ui-web.git
synced 2025-12-30 10:12:26 +00:00
优化
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<slot name="topToolbar">
|
||||
|
||||
</slot>
|
||||
<el-input v-if="!hiddenCpd.filter" v-model="filterText" placeholder="名称" auto-complete="off" clearable/>
|
||||
<el-input v-if="!hiddenCpd.filter" style="width:195px;" v-model="filterText" placeholder="名称" auto-complete="off" clearable/>
|
||||
|
||||
<el-popover placement="right-start" :title="title" width="200" trigger="hover" :show-after="200">
|
||||
<el-space wrap>
|
||||
|
||||
@@ -34,14 +34,14 @@
|
||||
:link-project-id="selProject ? selProject.id : null"
|
||||
@change3="onProductSelected"
|
||||
@clear="onProductClearSelect"
|
||||
:init-load="true"
|
||||
:display-load="true"
|
||||
/>
|
||||
</template>
|
||||
<template #nodeName="{ data }">
|
||||
<el-space>
|
||||
<icon
|
||||
:icon="
|
||||
data.dclass == '1' ? 'ep:promotion' : data.dclass == '2' ? 'ep:flag' : 'ep:document'
|
||||
"
|
||||
:icon="calcIcon(data.dclass)"
|
||||
/>
|
||||
<MdpSelect
|
||||
size="small"
|
||||
@@ -53,7 +53,7 @@
|
||||
/><span :style="{ borderRadius: '30px', color: data.finishRate >= 100 ? 'green' : 'blue' }"
|
||||
>{{ formatRate(data.finishRate || 0) }}% </span
|
||||
>
|
||||
<div>{{ "(" + (data.subEfCnt||'0')+"-"+ (data.subStoryCnt||'0') +")" }} {{ data.menuName }}</div>
|
||||
<div>{{ "(" +(data.childrenCnt||0)+")" }} {{ data.menuName }}</div>
|
||||
</el-space>
|
||||
</template>
|
||||
</MdpTree>
|
||||
@@ -169,19 +169,25 @@ export default {
|
||||
props:{
|
||||
id: 'menuId', pid: 'pmenuId', label: 'menuName',
|
||||
isLeaf:(n)=>{
|
||||
return n.childrenCnt<=0 || n.subEfCnt<=0
|
||||
return n.childrenCnt<=0
|
||||
}
|
||||
},
|
||||
templateVisible:false
|
||||
templateVisible:false,
|
||||
dclassDict:[],
|
||||
}
|
||||
}, //end data
|
||||
methods: {
|
||||
|
||||
calcIcon(dclass){
|
||||
let o=this.dclassDict.find(k=>k.id==dclass)
|
||||
return o?o.icon:'fa:file-text'
|
||||
},
|
||||
clearCache(){
|
||||
XmMenuTreeMap.clear();
|
||||
},
|
||||
listXmMenuWithState(params, node) {
|
||||
params.productId = this.xmProduct?.id || this.product?.id
|
||||
params.dclass='$IN1,2'
|
||||
//params.dclass='$IN1,2'
|
||||
if(this.params){
|
||||
Object.assign(params,this.params)
|
||||
}
|
||||
@@ -428,6 +434,8 @@ export default {
|
||||
mounted() {
|
||||
this.product=this.xmProduct
|
||||
this.filters.productId=this.xmProduct?.id||sessionStorage.getItem(this.productKey)||''
|
||||
|
||||
this.dclassDict=this.$mdp.getDict('dclass').then(res=>this.dclassDict=res)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<mdp-lr-box :expand="!parentMenu?.menuId && !xmIteration?.id" @expand="onExpand">
|
||||
<mdp-lr-box :expand="!parentMenu?.menuId && !xmIteration?.id && !(xmProductCpd && xmProductCpd.id)" @expand="onExpand">
|
||||
<template #left>
|
||||
<xm-epic-features :productRequired="productRequired" v-if="hadInit" ref="tree"
|
||||
:xm-product="xmProductCpd"
|
||||
|
||||
@@ -50,20 +50,14 @@
|
||||
<el-button @click="showGanttChange" type="warning" plain title="再次点击隐藏甘特图;在甘特图任意位置右键可以弹出工具条">甘</el-button>
|
||||
<el-button @click="$refs['kanbanDlg'].open()" type="primary" plain>板</el-button>
|
||||
|
||||
<mdp-select v-if="simple==undefined"
|
||||
itemCode="demandSource"
|
||||
v-model="filters.source"
|
||||
placeholder="需求来源"
|
||||
clearable
|
||||
/>
|
||||
|
||||
<mdp-select :options="[{id:'son',name:'下一级'},{id:'grandson',name:'任意层级'},{id:'1',name:'1级'},{id:'2',name:'2级'},{id:'3',name:'3级'},{id:'4',name:'4级'},{id:'5',name:'5级'},{id:'6',name:'6级'},{id:'7',name:'7级'}]"
|
||||
<mdp-select itemCode="dclass" v-model="filters.dclass" placeholder="类型"/>
|
||||
<mdp-select v-if="!simple" class="hidden-md-and-down" :options="[{id:'son',name:'下一级'},{id:'grandson',name:'任意层级'},{id:'1',name:'1级'},{id:'2',name:'2级'},{id:'3',name:'3级'},{id:'4',name:'4级'},{id:'5',name:'5级'},{id:'6',name:'6级'},{id:'7',name:'7级'}]"
|
||||
title="当指定某个上级时,是否查该上级的儿子、孙子等所有下级节点"
|
||||
v-model="filters.childQryType"
|
||||
placeholder="子孙"
|
||||
clearable
|
||||
/>
|
||||
<MdpSelectTag v-model="filters.tagIdList" placeholder="标签" multiple/>
|
||||
|
||||
<span v-if="currOpType == 'select' && multiple == true">
|
||||
<el-button
|
||||
:disabled=" sels.length === 0"
|
||||
@@ -93,43 +87,37 @@
|
||||
placeholder="迭代"
|
||||
@change2="onIterationSelected"
|
||||
@clear="onIterationClearSelect"
|
||||
/>
|
||||
/>
|
||||
<el-select
|
||||
title="按是否加入过迭代进行过滤"
|
||||
title="按场景快速查询"
|
||||
style="width: 120px"
|
||||
v-model="filters.iterationFilterType"
|
||||
placeholder="迭代?"
|
||||
v-model="selkey"
|
||||
placeholder="场景"
|
||||
clearable
|
||||
>
|
||||
<el-option value="not-join-any-iteration" label="未加入过迭代" />
|
||||
<el-option value="join-any-iteration" label="已加入过迭代" />
|
||||
<el-option value="s.finishRate=<100" label="未达到100%" />
|
||||
<el-option value="s.finishRate=>100" label="已达100%" />
|
||||
<el-option value="iterationFilterType=not-join-any-iteration" label="未加入过迭代" />
|
||||
<el-option value="iterationFilterType=join-any-iteration" label="已加入过迭代" />
|
||||
<el-option
|
||||
value="not-join-curr-iteration"
|
||||
value="iterationFilterType=not-join-curr-iteration"
|
||||
:label="'未加入迭代【' + iteration.iterationName + '】'"
|
||||
v-if="iteration && iteration.id"
|
||||
/>
|
||||
<el-option
|
||||
value="join-curr-iteration"
|
||||
value="iterationFilterType=join-curr-iteration"
|
||||
:label="'已加入本迭代【' + iteration.iterationName + '】'"
|
||||
v-if="iteration && iteration.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
title="按是否分配了任务进行过滤"
|
||||
style="width: 120px"
|
||||
v-model="filters.taskFilterType"
|
||||
placeholder="任务?"
|
||||
clearable
|
||||
>
|
||||
<el-option value="not-join-any-project" label="未分配过任务的需求" />
|
||||
<el-option value="join-any-project" label="已分配过任务的需求" />
|
||||
<el-option value="taskFilterType=not-join-any-project" label="未分配过任务的需求" />
|
||||
<el-option value="taskFilterType=join-any-project" label="已分配过任务的需求" />
|
||||
<el-option
|
||||
value="not-join-curr-project"
|
||||
value="taskFilterType=not-join-curr-project"
|
||||
:label="'未分配任务到项目【' + selProject.name + '】'"
|
||||
v-if="selProject && selProject.id"
|
||||
/>
|
||||
<el-option
|
||||
value="join-curr-project"
|
||||
value="taskFilterType=join-curr-project"
|
||||
:label="'已分配任务到项目【' + selProject.name + '】'"
|
||||
v-if="selProject && selProject.id"
|
||||
/>
|
||||
@@ -140,16 +128,17 @@
|
||||
:clearable="true"
|
||||
placeholder="责任人"
|
||||
/>
|
||||
<mdp-select v-if="simple==undefined"
|
||||
v-model="filters.priority"
|
||||
placeholder="优先级"
|
||||
clearable
|
||||
itemCode="priority"
|
||||
/>
|
||||
<mdp-select
|
||||
itemCode="menuStatus"
|
||||
v-model="filters.status"
|
||||
clearable placeholder="状态"
|
||||
label="需求状态"
|
||||
/>
|
||||
<MdpSelectTag v-model="filters.tagIdList" placeholder="标签" multiple/>
|
||||
<el-input
|
||||
v-model="filters.menuName"
|
||||
style="max-width: 8em"
|
||||
placeholder="需求名称查询"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
/>
|
||||
<el-button
|
||||
@@ -195,9 +184,7 @@
|
||||
<el-link @click="showEdit(scope.row)">
|
||||
|
||||
<el-text truncated style="max-width:200px;">
|
||||
<icon icon="ep:promotion" v-if="scope.row.dclass == '1'"/>
|
||||
<icon icon="ep:flag" v-if="scope.row.dclass == '2'"/>
|
||||
<icon icon="ep:document" v-if="scope.row.dclass == '3'"/>
|
||||
<icon :icon="calcIcon(scope.row.dclass)"/>
|
||||
{{ scope.row.menuName }}
|
||||
</el-text>
|
||||
</el-link>
|
||||
@@ -740,9 +727,19 @@ export default {
|
||||
ganttVisible: false,
|
||||
|
||||
expandChangeRows:new Map(),
|
||||
dclassDict:[],
|
||||
selkey:'',//场景表达式
|
||||
}
|
||||
}, //end data
|
||||
methods: {
|
||||
calcIcon(dclass){
|
||||
let o=this.dclassDict.find(k=>k.id==dclass)
|
||||
return o?o.icon:'fa:file-text'
|
||||
},
|
||||
calcName(dclass){
|
||||
let o=this.dclassDict.find(k=>k.id==dclass)
|
||||
return o?o.name:'需求'
|
||||
},
|
||||
// 深度优先遍历保持顺序不变
|
||||
treeToList(tree, list = [], parent = null) {
|
||||
tree.forEach(node => {
|
||||
@@ -771,10 +768,12 @@ export default {
|
||||
this.searchTableDatas()
|
||||
},
|
||||
preQueryParamCheck(params) {
|
||||
|
||||
if (this.iterationFilterType) {
|
||||
params.iterationFilterType = this.iterationFilterType
|
||||
} else {
|
||||
let selkeys=[]
|
||||
if(this.selkey){
|
||||
selkeys=this.selkey.split("=")
|
||||
params[selkeys[0]]=selkeys[1]
|
||||
}
|
||||
if (!params.iterationFilterType) {
|
||||
if (this.iteration) {
|
||||
params.iterationId = this.iteration.id
|
||||
}
|
||||
@@ -1225,6 +1224,7 @@ export default {
|
||||
this.iteration = this.xmIteration
|
||||
}
|
||||
this.project=this.selProject
|
||||
this.dclassDict=this.$mdp.getDict('dclass').then(res=>this.dclassDict=res)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user