lihang
2023-06-06 93e2df19d543dbf2cd806ab205efd20be9f71111
Source/UBCS-WEB/src/components/FormTemplate/ResembleQuery.vue
@@ -1,7 +1,14 @@
<template>
  <div>
    <el-table :data="tableData" v-loading="loading" height="250" :border="true">
    <el-table
      :data="tableData"
      v-loading="loading"
      height="250"
      :border="true"
      size="small"
    >
      <el-table-column
        v-if="column.length > 0"
        type="index"
        width="60"
        label="序号"
@@ -30,6 +37,7 @@
      type="detail"
      :visible.sync="formTemplateVisible"
      :templateOid="this.resembleTemplateOid"
      :rowOid="rowOid"
      :codeClassifyOid="this.resembleCodeClassifyOid"
    ></FormTemplateDialog>
  </div>
@@ -37,11 +45,10 @@
<script>
import { findLike } from "@/api/formTemplate.js";
import FormTemplateDialog from "./index.vue";
export default {
  name: "ResembleQuery",
  components: { FormTemplateDialog },
  components: { FormTemplateDialog: () => import('./index.vue') },
  props: {
    column: {
      type: Array,
@@ -55,6 +62,10 @@
      type: String,
      default: "",
    },
    codeRuleOid: {
      type: String,
      default: "",
    },
    type: {
      type: String,
      default: "add",
@@ -63,20 +74,18 @@
      type: Object,
      default: () => ({}),
    },
    codeRuleOid: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      tableVisible: true,
      formTemplateVisible: false,
      activeName: "findlike",
      tableData: [],
      tableData: [
        {id: '*****', materialclassifyText: '001', tuhao: 'tuhao', iod: '123123131312'}
      ],
      loading: false,
      resembleTemplateOid: "78B8C7C5-A042-0B96-FE6D-65421451782A",
      resembleCodeClassifyOid: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96",
      rowOid: '',
      defaultValue: {},
      secVOList: [],
      defaultKeys: [
@@ -114,8 +123,6 @@
      formItems: [],
    };
  },
  created() {},
  computed: {},
  methods: {
    // 相似项查询
    resembleQuery(form) {
@@ -127,18 +134,20 @@
        codeClassifyOid: this.codeClassifyOid,
        codeRuleOid: this.codeRuleOid,
        templateOid: this.templateOid,
        data: formValue
        data: formValue,
      };
      params = Object.assign(params, defaultValue);
      this.tableVisible = true;
      findLike(params).then((res) => {
        this.loading = false;
        this.tableData = res.data.data || [];
        // this.tableData = res.data.data || [];
      });
    },
    openFormTemlpate(row) {
      this.$forceUpdate()
      console.log(row, 'row.oid');
      this.codetemplateoid = row.codetemplateoid;
      this.rowOid = row.oid
      this.formTemplateVisible = true;
    },
    getDefaultValueAndFormValues(form) {