ludc
2023-06-26 42085aad206257ddeffe71d6defc547b5e13b4b7
Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
@@ -6,6 +6,17 @@
    append-to-body
    top="5vh"
  >
    <div>
      <FormTemplate
        v-if="type === 'batchApplyCode'"
        type="add"
        :selfColumnType="selfColumnType"
        :selfColumnConfig="selfColumnConfig"
        ref="CodeApply"
        @getFormData="getCodeApplyFormData"
        @referConfigDataUpdate="referConfigDataUpdate"
      ></FormTemplate>
    </div>
    <div class="flex_box">
      <div class="left" :style="{ width: leftWidth }">
        <div class="isExpand_box">
@@ -117,7 +128,9 @@
    </div>
    <template #footer>
      <div>
        <el-button size="small" type="primary" @click="submit">确定导入</el-button>
        <el-button size="small" type="primary" @click="submit"
          >确定导入</el-button
        >
        <el-button size="small">取消</el-button>
      </div>
    </template>
@@ -137,12 +150,16 @@
  getHistoryResembleTable,
  getFormTemplate,
  getCurretnSelectedRowResemble,
  submitHistoryimport
  submitHistoryimport,
} from "../../api/batchImport/index";
import ResembleQuery from "../FormTemplate/ResembleQuery.vue";
import FormTemplate from "../FormTemplate/FormTemplate.vue";
import codeApply from '@/mixins/codeApply.js'
export default {
  name: "ShowImportData",
  components: { ResembleQuery },
  components: { ResembleQuery, FormTemplate },
  mixins: [ codeApply ],
  props: {
    title: {
      type: String,
@@ -159,12 +176,12 @@
    },
    classifyAttr: {
      type: String,
      default: 'id'
      default: "id",
    },
    codeClassifyOid: {
      type: String,
      default: ''
    }
      default: "",
    },
  },
  computed: {
    dialogVisible: {
@@ -182,15 +199,15 @@
      filterText: "",
      leftWidth: "200px",
      templateOid: null,
      tab1Name: '相似项',
      tab2Name: '正确数据',
      tab1Name: "相似项",
      tab2Name: "正确数据",
      tab1Table: [],
      selectedTab1Table: [],
      tab2Table: [],
      activeTab: "tab1",
      cloNamesList: [],
      cloNamesList: [], //列表头部字段
      localCodeClassifyOid: "",
      resembleColumList: [],
      resembleColumList: [], //相似项查出来的列表字段
      currentSelectedResemble: [],
      currentSelectedResembleRow: {
        templateOid: "",
@@ -198,6 +215,7 @@
        rowOid: "",
        formTemplateVisible: false,
      },
      secVOList: [],
    };
  },
@@ -217,15 +235,15 @@
    treeNodeClick(data) {
      this.localCodeClassifyOid = data.codeclassifyoid;
      this.cloNamesList = data.cloNamesList;
      this.templateOid = data.codeClassifyTemplateVO.oid
      this.templateOid = data.codeClassifyTemplateVO.oid;
      getHistorySuccessTable(this.redisOid).then((res) => {
        this.tab2Table = res.data
        this.tab2Table = res.data;
      });
      getHistoryResembleTable({
        codeClassifyOid: data.codeClassifyOid,
        redisOid: this.redisOid + "-resemble",
      }).then((res) => {
        this.tab1Table = res.data
        this.tab1Table = res.data;
      });
      getFormTemplate({
        templateOid: data.oid,
@@ -235,14 +253,14 @@
      });
    },
    tab1TableSelectChange(selection) {
      this.selectedTab1Table = selection
      this.selectedTab1Table = selection;
    },
    resembleRowChange(row) {
      getCurretnSelectedRowResemble({
        redisOid: this.redisOid + "-resemble-data",
        dataOid: row.oid,
      }).then((res) => {
        this.currentSelectedResemble = res.data
        this.currentSelectedResemble = res.data;
      });
    },
    openFormTemlpate(row) {
@@ -251,7 +269,7 @@
        templateOid: row.codetemplateoid,
        codeClassifyOid: this.localCodeClassifyOid,
        rowOid: row.rowOid,
      }
      };
    },
    submit() {
      const params = {
@@ -259,24 +277,24 @@
        isImprot: true,
        codeImprotSaveDatVOList: [
          {
            Clos: this.cloNamesList.map(item => item.title),
            Clos: this.cloNamesList.map((item) => item.title),
            dataList: this.tab2Table.concat(this.selectedTab1Table),
            orderDTO: {
              codeClassifyOid: this.codeClassifyOid,
              templateOid: this.templateOid,
              secDTOList: []
            }
          }
        ]
      }
      submitHistoryimport(params).then(res => {
              secDTOList: [],
            },
          },
        ],
      };
      submitHistoryimport(params).then((res) => {
        if (res.code === 200) {
          this.$message.success(res.obj)
          this.$message.success(res.obj);
        } else {
          this.$message.error(res.obj)
          this.$message.error(res.obj);
        }
      })
    }
      });
    },
  },
  watch: {
    filterText(val) {