@@ -51,7 +49,7 @@
v-model="data.kstatus"
disabled
/>{{ formatRate(data.initRate || 0) }}% {{ formatRate(data.score || 0) }}%
{{ "(" + (data.childrenCnt||0) +")" }} {{ data.kpiName }}
@@ -89,7 +87,6 @@
:visible="visible"
:parent-kpi="data.parentKpi"
:formData="data.formData"
- :xm-product="xmProduct"
:xm-project="project"
subOpType="add"
@cancel="dialog.close()"
@@ -135,7 +132,7 @@ import XmKpiByDict from './XmKpiByDict.vue'
const XmKpiTreeMap = new Map()
export default {
- props: ['xmCollect','selProject', 'xmProduct', 'subOpType','multiple','showConfirm','hidden','params','projectRequired','clearable','isTpl'],
+ props: ['xmCollect','selProject', 'subOpType','multiple','showConfirm','hidden','params','projectRequired','clearable','isTpl'],
emits:['importTemplate', 'checkChange', 'projectSelect', 'projectClear','','addTopNode','importTop','importSub','editNode','addSubNode','changePid','confirm','nodeClick'],
computed: {
@@ -157,14 +154,9 @@ export default {
return hidden
},
projectKey(){
- return this.xmCollect?.id+'-'+this.xmProduct?.id+'-project-select-id'
+ return this.xmCollect?.id+'-'+this.selProject?.id+'-project-select-id'
}
- },
- watch: {
- xmProduct: function () {
- this.$refs.nodeTree.refresh()
- },
- },
+ },
data() {
return {
load:{init:false},
@@ -305,30 +297,13 @@ export default {
if (parent && parent.id) {
formData.projectName = parent.projectName
formData.projectId = parent.projectId
- if (this.project && parent.projectId == this.project.id) {
- formData.projectName = this.project.kpiName
- }
} else {
if(this.selProject && this.selProject.id){
formData.projectId = this.selProject.id
- formData.projectName = this.selProject.kpiName
}else if (this.project && this.project?.id) {
formData.projectId = this.project.id
- formData.projectName = this.project.kpiName
- } else {
- this.$notify({
- position: 'bottom-left',
- showClose: true,
- message: '请先选择一个项目',
- type: 'warning'
- })
- return false
}
}
- if(this.xmProduct && this.xmProduct.id){
- formData.productId=this.xmProduct.id
- formData.productName=this.xmProduct.productName
- }
return true
},