| | |
| | | append-to-body |
| | | @opened="openDialog" |
| | | > |
| | | <FormTempalte |
| | | <FormTemplate |
| | | v-bind="$attrs" |
| | | :visible="visible" |
| | | :type="type" |
| | | :rowOid="rowOid" |
| | | :templateOid="templateOid" |
| | | ref="FormTempalte" |
| | | ref="FormTemplate" |
| | | @getFormData="getFormData" |
| | | ></FormTempalte> |
| | | |
| | | ></FormTemplate> |
| | | <div |
| | | class="tab_box" |
| | | v-if=" |
| | |
| | | > |
| | | <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> |
| | | <el-tab-pane label="码值申请" name="codeApply" v-if="showCodeApply"> |
| | | <FormTempalte |
| | | <FormTemplate |
| | | v-bind="$attrs" |
| | | :type="type" |
| | | :selfColumnType="selfColumnType" |
| | |
| | | ref="CodeApply" |
| | | @getFormData="getCodeApplyFormData" |
| | | @referConfigDataUpdate="referConfigDataUpdate" |
| | | ></FormTempalte> |
| | | ></FormTemplate> |
| | | </el-tab-pane> |
| | | <el-tab-pane |
| | | label="相似项查询" |
| | |
| | | |
| | | <script> |
| | | import { getCodeRule, getFormTemplate } from "@/api/formTemplate.js"; |
| | | import FormTempalte from "./FormTempalte"; |
| | | import FormTemplate from "./FormTemplate"; |
| | | import ResembleQuery from "./ResembleQuery"; |
| | | export default { |
| | | name: "FormTemplateDialog", |
| | | components: { ResembleQuery, FormTempalte }, |
| | | components: { ResembleQuery, FormTemplate }, |
| | | props: { |
| | | visible: { |
| | | type: Boolean, |
| | |
| | | form: {}, |
| | | codeApplyForm: {}, |
| | | activeName: "codeApply", |
| | | showCodeApply: true, |
| | | showResembleQuery: true, |
| | | showCodeApply: false, |
| | | showResembleQuery: false, |
| | | selfColumnType: { |
| | | codefixedsec: "combox", |
| | | codeclassifysec: "refer", |
| | |
| | | this.activeName = "resembleQuery"; |
| | | this.showResembleQuery = true; |
| | | } |
| | | this.$refs.FormTempalte.templateRender(res.data.formDefineVO.items); |
| | | this.$nextTick(() => { |
| | | this.$refs.FormTemplate.templateRender(res.data.formDefineVO.items); |
| | | }) |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | .catch(() => { |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 获取码值申请数据 |
| | | getCodeRule() { |
| | | getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => { |
| | | console.log(res, "resresresresres"); |
| | | if (res.data && res.data.code === 200) { |
| | | const typeList = [ |
| | | "codefixedsec", |
| | |
| | | this.secVOList = (res.data.data.secVOList || []).filter((item) => |
| | | typeList.includes(item.secType) |
| | | ); |
| | | console.log(this.secVOList, "this.secVOListthis.secVOList"); |
| | | this.$nextTick(() => { |
| | | if (this.secVOList.length > 0 && this.type === "add") { |
| | | this.showCodeApply = true; |
| | | this.activeName = "codeApply"; |
| | | this.$refs.CodeApply.templateRender(this.secVOList); |
| | | this.$nextTick(() => { |
| | | this.$refs.CodeApply.templateRender(this.secVOList); |
| | | }) |
| | | } else { |
| | | this.showCodeApply = false; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | async submit() { |
| | | // 进行表单校验 |
| | | const formValidate = await this.$refs.FormTempalte.validate(); |
| | | const formValidate = await this.$refs.FormTemplate.validate(); |
| | | if (!formValidate) return; |
| | | let codeValidate = true; |
| | | // 进行码值申请校验 |
| | |
| | | }; |
| | | }, |
| | | getType(item) { |
| | | return this.selfColumnType[item.sectype]; |
| | | return this.selfColumnType[item.secType]; |
| | | }, |
| | | getReferConfig(item) { |
| | | let params = {}; |
| | | if (item.sectype == "codeclassifysec") { |
| | | if (item.secType == "codeclassifysec") { |
| | | params = { |
| | | isMuti: false, |
| | | type: "grid", |
| | |
| | | : "", |
| | | }, |
| | | }; |
| | | } else if (item.sectype == "coderefersec") { |
| | | } else if (item.secType == "coderefersec") { |
| | | params = JSON.parse(item.referValueInfo); |
| | | } |
| | | return params; |
| | | }, |
| | | getDisabled(item) { |
| | | if (item.sectype === "codeclassifysec") { |
| | | if (item.secType === "codeclassifysec") { |
| | | if (item.parentClassifySecOid) { |
| | | if (!this.codeApplyForm[item.parentClassifySecOid]) { |
| | | return true; |