fujunling
2023-06-02 33c8db885ab2b5117c064d064f6e7c7eb0357a1c
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -7,19 +7,22 @@
    class="avue-dialog avue-dialog--top"
    :width="width"
    append-to-body
    @opened="openDialog"
  >
    <FormTempalte
      v-bind="$attrs"
      :dialogOpen="visible"
      :visible="visible"
      :type="type"
      v-if="dialogVisible"
      ref="FormTempalte"
      @getFormTemplateEnd="getFormTemplate"
      @getFormData="getFormData"
    ></FormTempalte>
    <div class="tab_box">
    <div class="tab_box" v-if="type !== 'detail' && dialogVisible">
      <el-tabs v-model="activeName" type="card">
        <el-tab-pane label="码值申请" name="codeApply" v-if="showCodeApply">
          <CodeApply v-bind="$attrs"></CodeApply>
          <CodeApply ref="CodeApply" v-bind="$attrs" @getCodeRuleOid="getCodeRuleOid"></CodeApply>
        </el-tab-pane>
        <el-tab-pane
          label="相似项查询"
@@ -32,6 +35,7 @@
            :hasResemble="this.hasResemble"
            :column="this.resembleTableColumn"
            :form="this.form"
            :codeRuleOid="codeRuleOid"
          ></ResembleQuery>
        </el-tab-pane>
      </el-tabs>
@@ -79,7 +83,9 @@
      submitBtnLoading: false,
      hasResemble: false,
      resembleTableColumn: [],
      secVOList: [],
      activeName: "resembleQuery",
      codeRuleOid: '',
      form: {}
    };
  },
@@ -95,7 +101,7 @@
    },
    showCodeApply() {
      if (this.type === "add") {
        if (this.hasResemble && this.resembleTableColumn.length === 0) {
        if (this.hasResemble && this.secVOList.length === 0) {
          return false;
        }
      } else {
@@ -110,9 +116,19 @@
    },
  },
  methods: {
    openDialog() {
      this.$nextTick(() => {
        this.$refs.FormTempalte.init()
        this.$refs.CodeApply.getCodeRule()
      })
    },
    close() {
      this.dialogVisible = false;
    },
    getCodeRuleOid(data) {
      this.codeRuleOid = data.oid
      this.secVOList = data.secVOList
    },
    getFormTemplate(data) {
      this.hasResemble =
        data.resembleTableVO &&