gongchunyi
6 小时以前 8f653904af9e70545440f267440fab566aa4dce2
选择树更改为computed显示,批量复制内输入框内容改变更新获取数据
已修改2个文件
64 ■■■■■ 文件已修改
src/views/standard/standardLibrary/components/BatchCopy.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standard/standardLibrary/index.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standard/standardLibrary/components/BatchCopy.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <el-dialog :visible.sync="batchCopyDia" class="more-edit" title="批量编辑" width="90%">
    <el-dialog :visible.sync="batchCopyDia" class="more-edit" title="批量编辑" width="90%" @closed="$emit('close')">
      <el-row>
        <el-col :span="6" class="search_thing">
          <div class="search_label">样品名称:</div>
@@ -527,6 +527,9 @@
      } else {
        this.sample = trees[3];
      }
      this.standardMethodListId = null;
      this.productList1 = [];
      this.methods = [];
      this.selectStandardTree = false;
    },
    handleSelectionChange0(val) {
src/views/standard/standardLibrary/index.vue
@@ -19,13 +19,12 @@
          height: calc(100% - 30px);
          overflow-y: scroll;
          scrollbar-width: none;
        " @node-click="handleNodeClick"
               @node-drop="handleDrop">
        " @node-click="handleNodeClick" @node-drop="handleDrop">
        <div slot-scope="{ node, data }" class="custom-tree-node" style="width: calc(100% - 15px)">
          <div :title="data.label" style="display: flex;align-items: center;flex-wrap: nowrap;flex-direction: row;justify-content: space-between;">
              <div :title="data.label"
                style="display: flex;align-items: center;flex-wrap: nowrap;flex-direction: row;justify-content: space-between;">
            <div style="width: calc(100% - 50px);white-space: nowrap;text-overflow: ellipsis;"
                 :style="`overflow:${(node.data.children === null || node.data.children === undefined)?'clip':'visible'}`"
            >
                  :style="`overflow:${(node.data.children === null || node.data.children === undefined) ? 'clip' : 'visible'}`">
              <i :class="`node_i ${data.children != undefined
                ? data.code === '[1]'
                  ? 'el-icon-folder-opened'
@@ -35,10 +34,13 @@
              {{data.label}}
            </div>
            <div v-if="(node.data.children === null || node.data.children === undefined)" style="width:50px">
              <el-button v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" size="mini" type="text" @click.stop="editTreeName(node.data)">
                  <el-button v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" size="mini" type="text"
                    @click.stop="editTreeName(node.data)">
                <i class="el-icon-edit"></i>
              </el-button>
              <el-button style="margin-left: 0" size="mini" v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" type="text" @click.stop="remove(node, data)">
                  <el-button style="margin-left: 0" size="mini"
                    v-if="checkPermi(['standard:standardLibrary:delStandardTree'])" type="text"
                    @click.stop="remove(node, data)">
                <i class="el-icon-delete"></i>
              </el-button>
            </div>
@@ -51,7 +53,7 @@
        <div class="right">
      <el-row class="title" style="width: 100%">
        <el-col :span="20" style="font-size: 14px; color: #999">{{
          selectTree
              displaySelectTree
        }}</el-col>
        <el-col :span="4">
          <el-button v-if="isShowCopy" size="small" style="position: absolute; right: 20px; top: 1px" type="primary"
@@ -59,10 +61,9 @@
        </el-col>
      </el-row>
      <el-row v-loading="tableLoad" class="standard_table">
        <el-table ref="standard" :data="standardList" class="el-table" header-row-class-name="header-class" height="220"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
          highlight-current-row style="width: 100%; height: 220px !important" tooltip-effect="dark"
          @row-click="rowClick">
            <el-table ref="standard" :data="standardList" class="el-table" header-row-class-name="header-class"
              height="220" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border highlight-current-row
              style="width: 100%; height: 220px !important" tooltip-effect="dark" @row-click="rowClick">
          <el-table-column label="标准编号" prop="code" show-overflow-tooltip width="200">
            <template slot-scope="scope">
              <span style="color: red; font-size: 14px">{{
@@ -76,17 +77,17 @@
      </el-row>
      <el-row v-loading="tableLoad2" class="product_table">
        <el-table id="templateParamTable" ref="productTable" v-loading="productTableLoading" :data="productList"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
          :fit="true" :row-class-name="tableRowClassName" class="productTable"
          header-row-class-name="header-class" height="100%" row-key="id" stripe style="width: 100%"
          tooltip-effect="dark" @select="upProductSelect" @selection-change="handleSelectionChange"
          @select-all="handleAll">
              :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border :fit="true"
              :row-class-name="tableRowClassName" class="productTable" header-row-class-name="header-class"
              height="100%" row-key="id" stripe style="width: 100%" tooltip-effect="dark" @select="upProductSelect"
              @selection-change="handleSelectionChange" @select-all="handleAll">
          <el-table-column type="selection" width="50"> </el-table-column>
          <el-table-column label="产品" min-width="100" prop="sample" show-overflow-tooltip></el-table-column>
          <el-table-column label="型号" min-width="100" prop="model" show-overflow-tooltip></el-table-column>
          <el-table-column label="检验项分类" min-width="140" prop="inspectionItemClass"
            show-overflow-tooltip></el-table-column>
          <el-table-column label="检验项" min-width="140" prop="inspectionItem" show-overflow-tooltip></el-table-column>
              <el-table-column label="检验项" min-width="140" prop="inspectionItem"
                show-overflow-tooltip></el-table-column>
          <el-table-column label="检验项子项" min-width="140" prop="inspectionItemSubclass"
            show-overflow-tooltip></el-table-column>
          <el-table-column label="子实验室" prop="sonLaboratory" show-overflow-tooltip width="130"></el-table-column>
@@ -94,8 +95,9 @@
            <template slot-scope="scope">
              <el-input v-if="
                checkPermi(['standard:standardLibrary:upStandardProduct'])
              " v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="要求值" size="small"
                type="textarea" @change="(value) => upStandardProductList(value, scope.row.id)"></el-input>
                  " v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="要求值"
                    size="small" type="textarea"
                    @change="(value) => upStandardProductList(value, scope.row.id)"></el-input>
              <span v-else>{{ scope.row.ask }}</span>
            </template>
          </el-table-column>
@@ -284,7 +286,7 @@
      @closeBindPartDialog="closeBindSupplierDensityDialog">
    </bindSupplierDensityDialogAsk>
    <BatchCopy v-if="batchCopyDia" ref="BatchCopy" :selectTree1="selectTree" :standardId="standardId"
      @refreshList="refreshList"></BatchCopy>
      @refreshList="refreshList" @close="batchCopyDia = false"></BatchCopy>
  </div>
</template>
@@ -396,6 +398,15 @@
      VUE_APP_BASE_API: process.env.VUE_APP_BASE_API,
      moreSelects: [],
    };
  },
  computed: {
    displaySelectTree() {
      if (!this.selectTree) return "";
      return this.selectTree
        .split(" - ")
        .filter((item) => item !== "null")
        .join(" - ");
    },
  },
  mounted() {
    this.selectEnumByCategoryForFactory();
@@ -555,9 +566,7 @@
      let data = this.selectTree.split(" - ");
      let data2 = "";
      for (let index = data.length - 1; index >= 0; index--) {
        if (data[index] && data[index] !== 'null') {
          data2 += " - " + data[index];
        }
      }
      this.selectTree = data2.replace(" - ", "");
      if (node.childNodes.length === 0) {
@@ -571,7 +580,11 @@
    },
    getNodeParent(val) {
      if (val.parent != null) {
        if (val.data.children === null) {
          this.selectTree += " - " + val.label + " - " + "null";
        } else {
        this.selectTree += " - " + val.label;
        }
        this.getNodeParent(val.parent);
      }
    },