From 8b88172ca8801bf26a083098a09d637b11da9f01 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期四, 18 一月 2024 13:03:30 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before --- src/views/quality/packageinspect/packageInspect-form.vue | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/views/quality/packageinspect/packageInspect-form.vue b/src/views/quality/packageinspect/packageInspect-form.vue index 873dc2b..2cf2980 100644 --- a/src/views/quality/packageinspect/packageInspect-form.vue +++ b/src/views/quality/packageinspect/packageInspect-form.vue @@ -92,7 +92,10 @@ row-key="randomId" class="l-mes" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> - <el-table-column type="index" label="搴忓彿" width="60"> + <el-table-column type="index" prop="parentIndex" label="搴忓彿" width="60"> + <template scope="scope"> + <span v-if="scope.row.isIndex">{{scope.row.parentIndex}}</span> + </template> </el-table-column> <el-table-column prop="name" label="椤圭洰" width="160"> <template slot-scope="scope"> @@ -256,7 +259,6 @@ } this.getAllInspect() this.init() - this.checkShowState() }, watch:{ @@ -273,7 +275,7 @@ if(ele.children){ ele.children.forEach(c=>{ if(c.pid){ - num++ + num+=1 } }) } @@ -367,6 +369,8 @@ clickAddLine() { this.list.push({ name: '', + isIndex : true, + parentIndex : this.list.length + 1, randomId: Math.random(), isEdit: true, children: [{ @@ -457,10 +461,12 @@ let userNameList = [] if(dataList){ let tempList = [] - dataList.forEach(ele=>{ + dataList.forEach((ele,index)=>{ let obj = { randomId: Math.random(), name: ele.inspectName, + isIndex: true, + parentIndex: index+1, children: [] } if(ele.children){ @@ -478,9 +484,11 @@ }) _than.list = tempList } - data.packageInsProductS.forEach(item => { + data.packageInsProductS.forEach((item,index) => { if (item.children) { let ele = { + isIndex: true, + parentIndex: index+1, isEdit: true, randomId: Math.random(), name: null, @@ -505,9 +513,7 @@ _than.list.push(ele) } }) - // let find1 = this.list.find(ele=>ele.name===inspect1[0].name&&ele.isEdit) !=undefined; - // let find2 = this.list.find(ele=>ele.name===inspect2[0].name&&ele.isEdit) !=undefined; - // this.isShow = find1||find2 + _than.conclusionTable = [{ packageNo: data.packageNo, userName: Array.from(new Set(userNameList)).join(','), @@ -516,6 +522,7 @@ _than.$nextTick(()=>{ if(_than.list.length>0){ _than.changeResult() + _than.checkShowState() } }) }).catch(error=>{ -- Gitblit v1.9.3