value
2024-04-29 c5842886b876f20d4411d9da4d8b3b4fef0c39a7
检验项目绑定产品,检验对象绑定产品
已修改7个文件
123 ■■■■■ 文件已修改
src/App.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tool/value-table.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/a5-capacity-scope.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/a7-standard-method.vue 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b2-standard.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -308,4 +308,8 @@
    text-overflow: ellipsis;
  }
  .el-cascader-menu__wrap{
    height: 300px;
  }
</style>
src/assets/api/controller.js
@@ -178,6 +178,7 @@
    selectStandardProductList: "/standardTree/selectStandardProductList", //通过标准树查询对应的检验项目
    selectStandardProductListByMethodId: "/standardTree/selectStandardProductListByMethodId", //通过检验标准查询检验项目
    selectStandardMethodEnum: "/standardTree/selectStandardMethodEnum", //获取标准树下标准方法枚举
  getStandardTree2: "/standardTree/getStandardTree2", //获取产品架构
}
const standardMethod = {
src/components/tool/value-table.vue
@@ -85,11 +85,11 @@
    width: 100%;
  }
  .handleBtn.is-disabled .el-upload:focus {
  .value-table .handleBtn.is-disabled .el-upload:focus {
    color: #C0C4CC !important;
  }
  .avatar-uploader .el-upload {
  .value-table .avatar-uploader .el-upload {
    height: 80px;
    display: flex;
    align-items: center;
@@ -157,7 +157,7 @@
      </el-pagination>
    </div>
    <el-dialog title="编辑" :visible.sync="upDia" :width="data.row==1?'500px':500+data.row * 200 + 'px'" append-to-body>
      <div class="body" v-if="upDia" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;">
      <div class="body" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;">
        <div v-if="data.row > 1">
          <div v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;">
            <el-col :span="6/data.row" style="text-align: right;" :offset="1">
@@ -183,7 +183,7 @@
                  style="width: 80px;height: 80px;border-radius: 6px;">
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
              </el-upload>
              <el-cascader :value="upData[a.label]" :options="data.cascaderField[a.label].tree"
              <el-cascader :value="upData[a.label]" :options="data.cascaderField[a.label].tree" :show-all-levels="false"
                v-if="showCascader(a.label)" :placeholder="`请选择${a.value}`" clearable
                :props="data.cascaderField.props" size="small" style="width: 100%;"
                @change="m=>handleCascader(m,a.label)" filterable></el-cascader>
@@ -252,7 +252,7 @@
              </el-upload>
              <el-cascader :options="data.cascaderField[a.label].tree" v-if="showCascader(a.label)" clearable
                :placeholder="`请选择${a.value}`" :props="data.cascaderField.props" size="small" style="width: 100%;"
                @change="m=>handleCascader(m,a.label)" filterable></el-cascader>
                @change="m=>handleCascader(m,a.label)" filterable :show-all-levels="false"></el-cascader>
            </el-col>
          </div>
        </div>
@@ -280,7 +280,7 @@
              </el-upload>
              <el-cascader :options="data.cascaderField[a.label].tree" v-if="showCascader(a.label)" clearable
                :placeholder="`请选择${a.value}`" :props="data.cascaderField.props" size="small" style="width: 100%;"
                @change="m=>handleCascader(m,a.label)" filterable></el-cascader>
                @change="m=>handleCascader(m,a.label)" filterable :show-all-levels="false"></el-cascader>
            </el-col>
          </el-row>
        </div>
@@ -450,16 +450,6 @@
        ],
        param: {}
      }
    },
    watch: {
      tableData: {
        deep: true,
        handler: function() {
          this.$nextTick(() => {
            this.$refs.eltable.doLayout()
          })
        }
      },
    },
    beforeUpdate() {
      this.$nextTick(() => {
@@ -710,7 +700,7 @@
        else if (val.method == 'doDiy') {
          if (val.id == 'update') {
            this.upDia = true,
              this.upData = this.HaveJson(row)
            this.upData = this.HaveJson(row)
            this.upHead = this.HaveJson(this.tableHead)
            this.upHead.forEach((item, index) => {
              if (this.data.cascaderField && this.data.cascaderField[item.label]) {
src/components/view/a5-capacity-scope.vue
@@ -224,7 +224,8 @@
            props:{
              value:'name',
              label:'name',
              checkStrictly: true
              checkStrictly: true,
              multiple: true
            }
          },
          requiredAdd: ['sonLaboratory', 'inspectionItem', 'manHour', 'inspectionItemType', 'inspectionValueType',
@@ -335,6 +336,7 @@
        if (this.radio === '0') {
          this.showItemParameter = true;
          this.showTestObject = false;
          this.selectTestObjectByName()
          /* this.$nextTick(() => {
              this.$refs.itemParameterTable.selectList()
          }) */
@@ -347,6 +349,7 @@
      refreshTable() {
        if (this.radio === '0') {
          this.$refs['itemParameterTable'].selectList()
        } else {
          this.$refs['testObjectTable'].selectList()
        }
src/components/view/a7-standard-method.vue
@@ -95,7 +95,7 @@
            font: '编辑',
            type: 'text',
            method: 'doDiy',
            field: ['sampleType', 'createUserName', 'updateUserName', '检验对象=structureTestObjectId']
            field: ['createUserName', 'updateUserName']
          }, {
            id: 'delete',
            font: '删除',
@@ -103,9 +103,6 @@
            method: 'doDiy'
          }],
          tagField: {
            structureTestObjectId: {
              select: []
            },
            isProduct: {
              select: [{
                value: 0,
@@ -126,14 +123,11 @@
                label: '是'
              }]
            },
            qualificationId:{
            qualificationId: {
              select: []
            }
          },
          selectField: {
            structureTestObjectId: {
              select: []
            },
            isProduct: {
              select: [{
                value: 0,
@@ -154,12 +148,24 @@
                label: '是'
              }]
            },
            qualificationId:{
            qualificationId: {
              select: []
            }
          },
          requiredAdd: ['code', 'name', 'structureTestObjectId', 'isProduct','isUse','nameEn'],
          requiredUp: ['code', 'name', 'structureTestObjectId', 'isProduct','isUse','nameEn']
          cascaderField: {
            structureTestObjectId: {
              tree: []
            },
            // 字段配置
            props: {
              value: 'value',
              label: 'label',
              checkStrictly: true,
              multiple: true
            },
          },
          requiredAdd: ['code', 'name', 'structureTestObjectId', 'isProduct', 'isUse', 'nameEn'],
          requiredUp: ['code', 'name', 'structureTestObjectId', 'isProduct', 'isUse', 'nameEn']
        },
        entityCopy: {},
        upIndex: 0,
@@ -170,14 +176,16 @@
    mounted() {
      this.entityCopy = this.HaveJson(this.componentData.entity)
      this.getPower()
      this.selectTestObjectByName()
      this.getQualificationList()
      this.selectTestObjectByName()
    },
    methods: {
      refreshTable() {
        this.$refs['ValueTable'].selectList()
        this.selectTestObjectByName()
      },
      refresh() {
        this.selectTestObjectByName()
        this.componentData.entity = this.HaveJson(this.entityCopy)
        this.upIndex++
      },
@@ -209,27 +217,14 @@
      openAdd() {
        this.$refs.ValueTable.openAddDia(this.$api.standardMethod.addStandardMethod);
      },
      selectTestObjectByName() {
        this.$axios.get(this.$api.capacityScope.selectTestObjectByName).then(res => {
          let data = []
          res.data.forEach(a => {
            data.push({
              label: a.specimenName,
              value: a.id
            })
          })
          this.componentData.selectField.structureTestObjectId.select = data
          this.componentData.tagField.structureTestObjectId.select = data
        })
      },
      getQualificationList(){
      getQualificationList() {
        this.$axios.post(this.$api.enums.selectEnumByCategory, {
                    category: "资质名称"
                }).then(res => {
                    let list = res.data
          category: "资质名称"
        }).then(res => {
          let list = res.data
          this.componentData.selectField.qualificationId.select = list
          this.componentData.tagField.qualificationId.select = list
                })
        })
        // this.$axios.post(this.$api.certification.getCertificationDetail,{
        //     page: {
        //       current: -1,
@@ -252,7 +247,26 @@
        //       this.componentData.tagField.qualificationId.select = list
        //     }
        //   })
      }
      },
      selectTestObjectByName() {
        this.$axios.get(this.$api.standardTree.getStandardTree2).then(res => {
          res.data.forEach(a => {
            this.cascaderFieldData(a)
          })
          this.componentData.cascaderField.structureTestObjectId.tree = res.data
        })
      },
      cascaderFieldData(val) {
        if (val.children === undefined) {
          return
        } else if (val.children.length == 0) {
          delete val.children
        } else {
          val.children.forEach(a => {
            this.cascaderFieldData(a)
          })
        }
      },
    }
  }
</script>
src/components/view/b2-standard.vue
@@ -143,7 +143,7 @@
      </el-row>
      <el-row class="standard_table" v-loading="tableLoad">
        <el-table class="el-table" :data="standardList" style="width: 100%;" height="220px" tooltip-effect="dark"
          highlight-current-row @row-click="rowClick" ref="standard" :key="Math.random()">
          :highlight-current-row="true" @row-click="rowClick" ref="standard">
          <el-table-column prop="code" label="标准编号" show-overflow-tooltip width="180">
            <template slot-scope="scope">
              <span style="color: red;font-size: 14px;">{{scope.row['code']}}</span>
@@ -763,7 +763,8 @@
      rowClick(row, column, event) {
        this.tableLoad2 = true
        this.$axios.post(this.$api.standardTree.selectStandardProductListByMethodId, {
          id: row.id
          id: row.id,
          tree: this.selectTree
        }).then(res => {
          this.productList = res.data
          setTimeout(() => {
src/view/index.vue
@@ -357,7 +357,7 @@
            <el-col :span="24">
                <el-card :body-style="{padding: '6px'}">
                    <ul>
                        <li @click="removeTab(activeIndex)"><i class="el-icon-close"></i>关闭</li>
                        <li @click="removeTab(activeIndex)" v-show="menuId!=0"><i class="el-icon-close"></i>关闭</li>
                        <li @click="allDel"><i class="el-icon-delete"></i>关闭所有</li>
                        <li @click="rightDel(activeIndex)"><i class="el-icon-d-arrow-right"></i>关闭右侧页签</li>
                        <el-divider></el-divider>
@@ -430,6 +430,7 @@
        query:{},
        newMsg:false,
        timer:null,
        menuId: 0
            };
        },
        created() {
@@ -463,7 +464,7 @@
      this.timer&&clearInterval(this.timer);
      this.timer = setInterval(()=>{
        this.checkForUnreadData()
      },20000)
      },30000)
        },
        methods: {
            saveClick(){
@@ -545,7 +546,8 @@
            },
            // 右键菜单
            rightKeyMenu(id, e) {
                if (id == 0) return
                // if (id == 0) return
        this.menuId = id
                this.activeIndex = id
                var x = e.clientX + 'px'
                var y = e.clientY + 'px'