loulijun2021
2024-05-06 46528c3843ce67038ddb2e00dd3d3998c206a69e
src/views/mouldManager/mouldCheckStand.vue
@@ -3,7 +3,7 @@
    <div class="body" :style="{height:mainHeight+'px'}">
      <div class="bodyTopButtonGroup" style="justify-content: space-between">
        <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <!--        <el-button v-waves icon="el-icon-download" @click="upload">导入</el-button>-->
        <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=13_1')">导入</el-button>
      </div>
      <div class="bodyTopFormGroup">
@@ -232,7 +232,7 @@
      :visible.sync="mouldDialogVisible"
      width="800px"
      :close-on-click-modal="false"
      top="15vh"
      top="8vh"
      @closed="handleMouldClose"
      @close="handleMouldClose"
    >
@@ -248,7 +248,7 @@
          :props="defaultProps"
          show-checkbox
          node-key="code"
          style="margin-top:15px"
          style="margin-top:15px;height: 550px;overflow: auto"
          default-expand-all
          :filter-node-method="filterNode"
        />
@@ -664,15 +664,19 @@
    },
    mouldDialogVisibleConfirm() {
      const treeKey = this.$refs.tree.getCheckedKeys()
      const arr = []
      this.tree[0].children.forEach(i => {
        i.flag = treeKey.includes(i.code) ? 'Y' : 'N'
        // i.flag = treeKey.includes(i.code) ? 'Y' : 'N'
        if (treeKey.includes(i.code)) {
          arr.push({
            code: i.code,
            name: i.name.split('/')[1].trim()
          })
        }
      })
      if (treeKey.length === 0) {
        return this.$message.info('不能为空!')
      }
      this.$store.state.app.buttonIsDisabled = true
      SaveCheckStanedAssociationMould(this.tree[0].children, this.checkstand_code).then(res => {
      SaveCheckStanedAssociationMould(arr, this.checkstand_code).then(res => {
        if (res.code === '200') {
          this.$notify.success('绑定成功!')
          this.mouldDialogVisible = false