zss
2023-09-14 4c5c20a7c03539104df74072b1b8a81b51c19ab8
src/components/view/standard-table/target.vue
@@ -19,11 +19,16 @@
                <span>{{scope.row.tname}}</span>
            </template>  
        </el-table-column>
        <el-table-column prop="pfather" label="项目">
            <template slot-scope="scope">
                <el-tag type="info" color="#faf2ff" v-if="scope.row.pfather != null">
                  <span style="color: #e1affb">03</span>
                </el-tag>
                <span>{{scope.row.pfather}}</span>
            </template>
        </el-table-column>
        <el-table-column prop="pname" label="指标名称">
            <template slot-scope="scope">
                <el-tag type="info" color="#faf2ff" v-if="scope.row.pname != null">
                    <span style="color: #e1affb">03</span>
                </el-tag>
                <span>{{scope.row.pname}}</span>
            </template>
        </el-table-column>
@@ -31,14 +36,14 @@
        <el-table-column prop="internal" label="内控值">
          <template slot-scope="scope">
            <el-input v-model="scope.row.internal" 
            v-if="scope.row.internal != null"
            v-if="scope.row.pname != null"
            @blur="updateVal(scope.row)"></el-input>
          </template>
        </el-table-column>
        <el-table-column prop="required" label="标准值">
          <template slot-scope="scope">
            <el-input v-model="scope.row.required" 
            v-if="scope.row.required != null"
            v-if="scope.row.pname != null"
            @blur="updateVal(scope.row)"></el-input>
          </template>
        </el-table-column>
@@ -52,6 +57,8 @@
      data() {
        return {
          selects: [],
          deleteList:[],
          isAllSelect:false,
        }
      },
      props:['tableData','tableType'],
@@ -94,13 +101,32 @@
          }
        }
      },
      //改变选中
      toggleSelection(row, flag) {
        this.$set(row, "isChecked", flag);
        this.$nextTick(() => {
          if (flag) {
            this.$refs.multipleTable.toggleRowSelection(row, flag);
          } else {
            this.$refs.multipleTable.clearSelection();
          }
        });
      },
      handleSelectionChange(val) {
        this.deleteList = [];
        val.forEach((v) => {
          if (v.id !== undefined) {
            this.deleteList.push(v.id);
          }
          this.searchIdFun(v);
        });
        this.$emit("childData",this.deleteList);
      },
      //递归查找选中数据id
      searchIdFun(data){
        let obj = data;
        if(obj.children != undefined){
          this.searchIdFun(obj.children);
        }else{
          this.deleteList.push(obj.pid);
        }
      },
      // 表格树全部选中配置  结束
        updateVal(row){
@@ -113,9 +139,6 @@
          }).catch(error=>{
            this.$message.error(error.message);
          })
        },
        handleSelectionChange(val) {
          this.selects = val;
        },
      }
    }
@@ -164,8 +187,8 @@
    /* .standard .el-table__body {
      height: 100%;
    } */
    .standard .el-table .el-table__row:not([class*="el-table__row--level-"]) td:nth-child(3){
    /* .standard .el-table .el-table__row:not([class*="el-table__row--level-"]) td:nth-child(3){
      padding-left: 23px !important;
     }
     } */
  </style>