licp
2024-03-11 901d81f1c56281bab87044d2ff562d8ed8601efa
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=>{