From ade4735384aa2b35f54799c64973342d6ab76b9a Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期二, 12 九月 2023 17:48:21 +0800 Subject: [PATCH] 码值申请-层级码段默认值 树节点id --- Source/UBCS-WEB/src/components/Master/MasterTree.vue | 29 ++++++++++++++++++++--------- 1 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue index 73dc835..e923ebc 100644 --- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue +++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue @@ -15,7 +15,7 @@ props: { pageSize: { type: String, - default: "10" + default: "100" }, currentPage: { type: String, @@ -28,6 +28,7 @@ }, data() { return { + TreeValue:'', idData: '', masterVrBtnList: [], tableHeadFindData: [], @@ -80,16 +81,23 @@ this.idData = result // console.log(this.$route) getTreeList({'conditionMap[id]': this.idData}).then(res => { - this.Treedata = res.data; - const [firstProperty] = res.data; - this.ModifyProperties(this.Treedata, 'text', 'label'); - this.codeClassifyOid = firstProperty.oid; - this.coderuleoid = firstProperty.attributes.coderuleoid; - this.$emit("coderuleoid", this.coderuleoid) - this.$emit('Treedata', this.Treedata) + if(res){ + if(res.data.length === 0){ + this.$message.error("涓绘暟鎹垎绫绘煡璇负绌猴紒"); + }else{ + this.Treedata = res.data; + const [firstProperty] = res.data; + this.ModifyProperties(this.Treedata, 'text', 'label'); + this.codeClassifyOid = firstProperty.oid; + this.coderuleoid = firstProperty.attributes.coderuleoid; + this.$emit("coderuleoid", this.coderuleoid) + this.$emit('Treedata', this.Treedata) + } + } }).catch(res => { + console.log(res) this.$message.error(res) - }) + }); }, //瀹氫箟涓�涓慨鏀规暟鎹睘鎬у悕鐨勬柟娉� @@ -158,6 +166,9 @@ //鏍戠偣鍑讳簨浠� async nodeClick(data) { try { + console.log(data) + this.TreeValue=data.label.split(" ")[0].trim(); + this.$emit('TreeValue',this.TreeValue) this.nodeClickList = data; this.tableHeadDataFateher = [] this.tableHeadFindData = [] -- Gitblit v1.9.3