mirror of
https://gitee.com/maimengcloud/xm-ui-web.git
synced 2025-12-30 10:12:26 +00:00
优化
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
@node-click="(d,n,c)=>$emit('node-click',d,n,c)"
|
||||
rootId="0"
|
||||
:draggable="true"
|
||||
:allowDrop="allowDrop"
|
||||
>
|
||||
<template #topToolbar>
|
||||
<xm-product-select width="300px"
|
||||
@@ -308,7 +309,17 @@ export default {
|
||||
this.$refs['nodeTree'].refresh()
|
||||
this.$emit('product-clear')
|
||||
},
|
||||
|
||||
allowDrop:function(draggingNode, dropNode, type){
|
||||
debugger
|
||||
if(type=='inner'){
|
||||
debugger
|
||||
if(dropNode.data.dclass>='2'){
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
||||
},
|
||||
showImportFromMenuTemplate(row) {
|
||||
if (!this.product) {
|
||||
this.$notify.error('请选择产品模板')
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="toggle?24:18" v-if="xmProductCpd && xmProductCpd.id">
|
||||
<xm-menu-mng :subOpType="subOpType" :multiple="multiple" :iterationFilterType="iterationFilterType"
|
||||
<xm-menu-mng :subOpType="subOpType" :multiple="multiple" :params="{pmenuId:parentMenu?.menuId}" :iterationFilterType="iterationFilterType"
|
||||
@select="$emit('select',$event)"
|
||||
@change="$emit('change',$event)"
|
||||
@change2="$emit('change2',$event)"
|
||||
@@ -30,7 +30,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="toggle?24:18" v-else-if="product && product.id">
|
||||
<xm-menu-mng :subOpType="subOpType" :multiple="multiple" :iterationFilterType="iterationFilterType"
|
||||
<xm-menu-mng :subOpType="subOpType" :multiple="multiple" :params="{pmenuId:parentMenu?.menuId}" :iterationFilterType="iterationFilterType"
|
||||
@select="$emit('select',$event)"
|
||||
@change="$emit('change',$event)"
|
||||
@change2="$emit('change2',$event)"
|
||||
|
||||
@@ -569,10 +569,11 @@ import { MdpFormMixin } from '@/components/mdp-ui/mixin/MdpFormMixin';
|
||||
return;
|
||||
}
|
||||
this.parentMenuVisible = false;
|
||||
var params = {
|
||||
menuIds: [this.editForm.menuId],
|
||||
var params = [{
|
||||
menuId: this.editForm.menuId,
|
||||
pmenuId: menu.menuId
|
||||
}
|
||||
}
|
||||
]
|
||||
batchChangeParentMenu(params).then(res => {
|
||||
var tips = res.tips;
|
||||
if (tips.isOk) {
|
||||
|
||||
@@ -1024,7 +1024,7 @@ import { MdpFormMixin } from '@/components/mdp-ui/mixin/MdpFormMixin';
|
||||
return;
|
||||
}
|
||||
|
||||
var params={taskIds:[this.editForm.id],parentTaskid:task.id}
|
||||
var params=[{id:this.editForm.id,parentTaskid:task.id}]
|
||||
this.$confirm("确认更新任务的上级为【"+task.name+"】吗?", "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
</el-col>
|
||||
<el-col :span="toggle?24:18">
|
||||
<xm-task-mng :xm-product="xmProduct" :sel-project="selProject" :params="{ntype:'0'}" :parent-task="parentTask" queryScope="task" subOpType="mng">
|
||||
<xm-task-mng v-if="xmProduct?.id" :xm-product="xmProduct" :sel-project="selProject" :params="{ntype:'0'}" :parent-task="parentTask" queryScope="task" subOpType="mng">
|
||||
<template #expandBtn>
|
||||
<el-button :icon="toggle?'DArrowRight':'DArrowLeft'" @click="onToggleClick" plain title="展开/收起左边"/>
|
||||
</template>
|
||||
|
||||
@@ -444,7 +444,8 @@ export default {
|
||||
this.product = this.xmProduct;
|
||||
},
|
||||
|
||||
toSearchCpd: function () {
|
||||
toSearchCpd: function () {
|
||||
debugger
|
||||
this.searchTableDatas();
|
||||
}
|
||||
},
|
||||
@@ -630,8 +631,7 @@ export default {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
if (this.ptype === '0') {
|
||||
} else {
|
||||
if (!this.project || !this.project.id) {
|
||||
this.$notify({
|
||||
showClose: true,
|
||||
@@ -640,18 +640,7 @@ export default {
|
||||
});
|
||||
this.projectVisible = true;
|
||||
return false;
|
||||
} else if (this.ptype === '1') {
|
||||
if (!this.product && this.product.id) {
|
||||
this.$notify({
|
||||
showClose: true,
|
||||
message: "请先选择产品",
|
||||
type: "warning",
|
||||
});
|
||||
|
||||
this.productSelectVisible = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -986,7 +975,7 @@ export default {
|
||||
},
|
||||
|
||||
preQueryParamCheck(params) {
|
||||
|
||||
debugger
|
||||
if (this.selkey == "work") {
|
||||
params.work = "work";
|
||||
} else if (this.selkey == "finish") {
|
||||
@@ -1017,30 +1006,34 @@ export default {
|
||||
if (this.xmIteration) {
|
||||
params.iterationId = this.xmIteration.id;
|
||||
}
|
||||
if ( this.queryScope == 'plan') {
|
||||
params.ntype = '1'
|
||||
delete params.productId
|
||||
}else{
|
||||
params.ntype='0'
|
||||
}
|
||||
|
||||
if (this.parentTask && this.parentTask.id) {
|
||||
params.parentTaskid = this.parentTask.id
|
||||
}
|
||||
|
||||
if(this.menuId){
|
||||
params.menuId=this.menuId
|
||||
}
|
||||
if (this.ptype === '1' && !this.isTaskCenter) {
|
||||
if (!params.productId) {
|
||||
this.$notify.warning("请先选中产品")
|
||||
return false;
|
||||
}
|
||||
} else if (this.ptype === '0' && !this.isTaskCenter) {
|
||||
if (!params.projectId) {
|
||||
this.$notify.warning("请先选中项目")
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ( this.queryScope == 'plan') {
|
||||
params.ntype = '1'
|
||||
delete params.productId
|
||||
delete params.iterationId
|
||||
delete params.menuId
|
||||
}else{
|
||||
params.ntype='0'
|
||||
}
|
||||
if ( this.queryScope == 'plan' ) {
|
||||
if( !params.parentTaskid && !params.projectId){
|
||||
this.$notify.warning("请先选中项目")
|
||||
return false;
|
||||
}
|
||||
|
||||
}else {
|
||||
if( !params.parentTaskid && !params.projectId && !params.menuId && !params.productId && !params.iterationId){
|
||||
this.$notify.warning("请先选中项目")
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
@@ -1161,7 +1154,8 @@ export default {
|
||||
});
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
initCurrData() {
|
||||
debugger
|
||||
if (this.selProject) {
|
||||
this.project = this.selProject;
|
||||
}
|
||||
@@ -1169,6 +1163,7 @@ export default {
|
||||
this.product = this.xmProduct;
|
||||
}
|
||||
this.currOpType=this.subOpType
|
||||
this.searchTableDatas()
|
||||
},
|
||||
|
||||
onProductClearSelect() {
|
||||
@@ -1190,9 +1185,10 @@ export default {
|
||||
XmTaskList,
|
||||
//在下面添加其它组件
|
||||
},
|
||||
mounted() {
|
||||
this.initData();
|
||||
this.searchTableDatas()
|
||||
mounted() {
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user