| | |
| | | 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"> |
| | |
| | | } |
| | | this.getAllInspect() |
| | | this.init() |
| | | this.checkShowState() |
| | | |
| | | }, |
| | | watch:{ |
| | |
| | | if(ele.children){ |
| | | ele.children.forEach(c=>{ |
| | | if(c.pid){ |
| | | num++ |
| | | num+=1 |
| | | } |
| | | }) |
| | | } |
| | |
| | | clickAddLine() { |
| | | this.list.push({ |
| | | name: '', |
| | | isIndex : true, |
| | | parentIndex : this.list.length + 1, |
| | | randomId: Math.random(), |
| | | isEdit: true, |
| | | children: [{ |
| | |
| | | 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){ |
| | |
| | | }) |
| | | _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, |
| | |
| | | _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(','), |
| | |
| | | _than.$nextTick(()=>{ |
| | | if(_than.list.length>0){ |
| | | _than.changeResult() |
| | | _than.checkShowState() |
| | | } |
| | | }) |
| | | }).catch(error=>{ |