From 1e363c55cfef0a4e2a202d4c27d8c1da03075c83 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 23 一月 2024 14:25:51 +0800
Subject: [PATCH] 主题库定义-输入框清空事件
---
Source/UBCS-WEB/src/mixins/codeApply.js | 828 +++++++++++++---------------------------------------------
1 files changed, 190 insertions(+), 638 deletions(-)
diff --git a/Source/UBCS-WEB/src/mixins/codeApply.js b/Source/UBCS-WEB/src/mixins/codeApply.js
index 98234c6..4416eab 100644
--- a/Source/UBCS-WEB/src/mixins/codeApply.js
+++ b/Source/UBCS-WEB/src/mixins/codeApply.js
@@ -1,638 +1,190 @@
-import { getCodeRule } from "@/api/formTemplate.js";
-export default {
- data() {
- return {
- secVOList: [],
- showCodeApply: false,
- selfColumnType: {
- codefixedsec: "combox",
- codeclassifysec: "refer",
- codevariablesec: "text",
- coderefersec: "refer",
- },
- selfColumnConfig: {
- function: {
- required: this.isRequired,
- dicData: this.getOptionList,
- type: this.getType,
- referConfig: this.getReferConfig,
- readOnly: this.getDisabled,
- },
- exchange: {
- text: "name",
- field: "oid",
- prop: "oid",
- showField: "name",
- parentClassifySecOid: "parentClassifySecOid",
- label: "name",
- maxlength: "codeSecLength",
- data: "fixedValueVOList",
- },
- directVoluation: {
- search: true,
- span: 12,
- props: {
- label: "id",
- value: "id",
- },
- },
- },
- codeApplyForm: {},
- }
- },
- created() {
- this.getCodeRule()
- },
- methods: {
- // 鑾峰彇鐮佸�肩敵璇锋暟鎹�
- getCodeRule() {
- getCodeRule({ codeClassifyOid: '1673234841140858880' }).then((res) => {
- if (res.data && res.data.code === 200) {
- const typeList = [
- "codefixedsec",
- "codeclassifysec",
- "codevariablesec",
- "coderefersec",
- ];
- this.secVOList = (res.data.data.secVOList || []).filter((item) =>
- typeList.includes(item.sectype)
- );
- this.secVOList = [
- {
- "oid": "1673235191453323264",
- "id": "gdmd",
- "name": "鍥哄畾鐮佹",
- "tenantId": "",
- "description": "",
- "revisionOid": "1673235191453323267",
- "nameOid": "1673235191453323265",
- "btmname": "codebasicsec",
- "lastR": "1",
- "firstR": "1",
- "lastV": "1",
- "firstV": "1",
- "creator": "0",
- "createTime": "2023-06-26 15:42:11",
- "lastModifier": "0",
- "lastModifyTime": "2023-06-26 15:42:11",
- "revisionRule": "",
- "revisionSeq": 1,
- "revisionValue": "",
- "versionRule": "0",
- "versionSeq": 1,
- "versionValue": "1",
- "lctid": "",
- "lcStatus": "",
- "lcStatusText": "",
- "ts": "2023-06-26 15:42:11.506",
- "owner": "1",
- "copyFromVersion": "",
- "secretGrade": -1,
- "secretGradeText": "",
- "data": {},
- "sectype": "codefixedsec",
- "secTypeText": "鍥哄畾鐮佹",
- "pkCodeRule": "1673234841140858880",
- "orderNum": 1,
- "codeSecLengthType": "code_sec_length_variable",
- "codeSecLengthTypeText": "鍙彉闀垮害",
- "codeSecLength": "10",
- "referAttributeName": "",
- "referAttributeId": "",
- "getValueClass": "",
- "codeDateFormatStr": "",
- "codeLevelType": "",
- "codeLevelTypeText": "",
- "codeLevelValue": -1,
- "valueCutLength": -1,
- "valueCutType": "",
- "valueCutTypeText": "",
- "codeGetValueType": "",
- "codeGetValueTypeText": "",
- "referCodeClassifyOid": "",
- "referCodeClassifyOidName": "",
- "referBtmId": "",
- "referBtmName": "",
- "referConfig": "",
- "referValueInfo": "",
- "filterSql": "",
- "serialStart": "",
- "serialStep": -1,
- "codeFillType": "",
- "codeFillTypeText": "",
- "codeFillSeparator": "0",
- "codeFillLength": "",
- "codeFillLimit": -1,
- "codeFillFlag": "false",
- "customCodeSerialClass": "",
- "matchClassifyValueFlag": "false",
- "parentClassifySecOid": "",
- "parentClassifySecText": "",
- "nullableFlag": "false",
- "componentCodeFlag": "false",
- "serialDependFlag": "false",
- "displayFlag": "false",
- "serialDependOrder": 0,
- "fixedValueVOList": [
- {
- "oid": "1673235247598276608",
- "id": "001",
- "name": "",
- "tenantId": "",
- "description": "",
- "revisionOid": "1673235247615053824",
- "nameOid": "1673235247598276609",
- "btmname": "codefixedvalue",
- "lastR": "1",
- "firstR": "1",
- "lastV": "1",
- "firstV": "1",
- "creator": "0",
- "createTime": "2023-06-26 15:42:24",
- "lastModifier": "0",
- "lastModifyTime": "2023-06-26 15:42:24",
- "revisionRule": "",
- "revisionSeq": 1,
- "revisionValue": "",
- "versionRule": "0",
- "versionSeq": 1,
- "versionValue": "1",
- "lctid": "",
- "lcStatus": "",
- "lcStatusText": "",
- "ts": "2023-06-26 15:42:24.892",
- "owner": "1",
- "copyFromVersion": "",
- "secretGrade": -1,
- "secretGradeText": "",
- "data": {},
- "codeFixedSecOid": "1673235191453323264",
- "codefixedsecoidName": "",
- "orderNum": 1
- },
- {
- "oid": "1673235273523269632",
- "id": "002",
- "name": "",
- "tenantId": "",
- "description": "",
- "revisionOid": "1673235273535852544",
- "nameOid": "1673235273523269633",
- "btmname": "codefixedvalue",
- "lastR": "1",
- "firstR": "1",
- "lastV": "1",
- "firstV": "1",
- "creator": "0",
- "createTime": "2023-06-26 15:42:31",
- "lastModifier": "0",
- "lastModifyTime": "2023-06-26 15:42:31",
- "revisionRule": "",
- "revisionSeq": 1,
- "revisionValue": "",
- "versionRule": "0",
- "versionSeq": 1,
- "versionValue": "1",
- "lctid": "",
- "lcStatus": "",
- "lcStatusText": "",
- "ts": "2023-06-26 15:42:31.073",
- "owner": "1",
- "copyFromVersion": "",
- "secretGrade": -1,
- "secretGradeText": "",
- "data": {},
- "codeFixedSecOid": "1673235191453323264",
- "codefixedsecoidName": "",
- "orderNum": 2
- }
- ]
- },
- {
- "oid": "1673235394948370432",
- "id": "flmdf",
- "name": "鍒嗙被鐮佹鐖�",
- "tenantId": "",
- "description": "",
- "revisionOid": "1673235394948370435",
- "nameOid": "1673235394948370433",
- "btmname": "codebasicsec",
- "lastR": "1",
- "firstR": "1",
- "lastV": "1",
- "firstV": "1",
- "creator": "0",
- "createTime": "2023-06-26 15:43:00",
- "lastModifier": "0",
- "lastModifyTime": "2023-06-26 15:43:00",
- "revisionRule": "",
- "revisionSeq": 1,
- "revisionValue": "",
- "versionRule": "0",
- "versionSeq": 1,
- "versionValue": "1",
- "lctid": "",
- "lcStatus": "",
- "lcStatusText": "",
- "ts": "2023-06-26 15:43:00.023",
- "owner": "1",
- "copyFromVersion": "",
- "secretGrade": -1,
- "secretGradeText": "",
- "data": {},
- "sectype": "codeclassifysec",
- "secTypeText": "鍒嗙被鐮佹",
- "pkCodeRule": "1673234841140858880",
- "orderNum": 2,
- "codeSecLengthType": "code_sec_length_variable",
- "codeSecLengthTypeText": "鍙彉闀垮害",
- "codeSecLength": "10",
- "referAttributeName": "",
- "referAttributeId": "",
- "getValueClass": "",
- "codeDateFormatStr": "",
- "codeLevelType": "",
- "codeLevelTypeText": "",
- "codeLevelValue": -1,
- "valueCutLength": -1,
- "valueCutType": "",
- "valueCutTypeText": "",
- "codeGetValueType": "",
- "codeGetValueTypeText": "",
- "referCodeClassifyOid": "",
- "referCodeClassifyOidName": "",
- "referBtmId": "",
- "referBtmName": "",
- "referConfig": "",
- "referValueInfo": "",
- "filterSql": "",
- "serialStart": "",
- "serialStep": -1,
- "codeFillType": "",
- "codeFillTypeText": "",
- "codeFillSeparator": "0",
- "codeFillLength": "",
- "codeFillLimit": -1,
- "codeFillFlag": "false",
- "customCodeSerialClass": "",
- "matchClassifyValueFlag": "false",
- "parentClassifySecOid": "",
- "parentClassifySecText": "",
- "nullableFlag": "false",
- "componentCodeFlag": "false",
- "serialDependFlag": "false",
- "displayFlag": "false",
- "serialDependOrder": 0,
- "fixedValueVOList": []
- },
- {
- "oid": "1673235616541839360",
- "id": "flmdz",
- "name": "鍒嗙被鐮佹瀛�",
- "tenantId": "",
- "description": "",
- "revisionOid": "1673235616541839363",
- "nameOid": "1673235616541839361",
- "btmname": "codebasicsec",
- "lastR": "1",
- "firstR": "1",
- "lastV": "1",
- "firstV": "1",
- "creator": "0",
- "createTime": "2023-06-26 15:43:52",
- "lastModifier": "0",
- "lastModifyTime": "2023-06-26 15:43:52",
- "revisionRule": "",
- "revisionSeq": 1,
- "revisionValue": "",
- "versionRule": "0",
- "versionSeq": 1,
- "versionValue": "1",
- "lctid": "",
- "lcStatus": "",
- "lcStatusText": "",
- "ts": "2023-06-26 15:43:52.855",
- "owner": "1",
- "copyFromVersion": "",
- "secretGrade": -1,
- "secretGradeText": "",
- "data": {},
- "sectype": "codeclassifysec",
- "secTypeText": "鍒嗙被鐮佹",
- "pkCodeRule": "1673234841140858880",
- "orderNum": 3,
- "codeSecLengthType": "code_sec_length_variable",
- "codeSecLengthTypeText": "鍙彉闀垮害",
- "codeSecLength": "10",
- "referAttributeName": "",
- "referAttributeId": "",
- "getValueClass": "",
- "codeDateFormatStr": "",
- "codeLevelType": "",
- "codeLevelTypeText": "",
- "codeLevelValue": -1,
- "valueCutLength": -1,
- "valueCutType": "",
- "valueCutTypeText": "",
- "codeGetValueType": "",
- "codeGetValueTypeText": "",
- "referCodeClassifyOid": "",
- "referCodeClassifyOidName": "",
- "referBtmId": "",
- "referBtmName": "",
- "referConfig": "",
- "referValueInfo": "",
- "filterSql": "",
- "serialStart": "",
- "serialStep": -1,
- "codeFillType": "",
- "codeFillTypeText": "",
- "codeFillSeparator": "0",
- "codeFillLength": "",
- "codeFillLimit": -1,
- "codeFillFlag": "false",
- "customCodeSerialClass": "",
- "matchClassifyValueFlag": "false",
- "parentClassifySecOid": "1673235394948370432",
- "parentClassifySecText": "鍒嗙被鐮佹鐖�",
- "nullableFlag": "false",
- "componentCodeFlag": "false",
- "serialDependFlag": "false",
- "displayFlag": "false",
- "serialDependOrder": 0,
- "fixedValueVOList": []
- },
- {
- "oid": "1673235886290112512",
- "id": "kbmd",
- "name": "鍙彉鐮佹",
- "tenantId": "",
- "description": "",
- "revisionOid": "1673235886290112515",
- "nameOid": "1673235886290112513",
- "btmname": "codebasicsec",
- "lastR": "1",
- "firstR": "1",
- "lastV": "1",
- "firstV": "1",
- "creator": "0",
- "createTime": "2023-06-26 15:44:57",
- "lastModifier": "0",
- "lastModifyTime": "2023-06-26 15:44:57",
- "revisionRule": "",
- "revisionSeq": 1,
- "revisionValue": "",
- "versionRule": "0",
- "versionSeq": 1,
- "versionValue": "1",
- "lctid": "",
- "lcStatus": "",
- "lcStatusText": "",
- "ts": "2023-06-26 15:44:57.168",
- "owner": "1",
- "copyFromVersion": "",
- "secretGrade": -1,
- "secretGradeText": "",
- "data": {},
- "sectype": "codevariablesec",
- "secTypeText": "鍙彉鐮佹",
- "pkCodeRule": "1673234841140858880",
- "orderNum": 4,
- "codeSecLengthType": "code_sec_length_variable",
- "codeSecLengthTypeText": "鍙彉闀垮害",
- "codeSecLength": "10",
- "referAttributeName": "",
- "referAttributeId": "",
- "getValueClass": "",
- "codeDateFormatStr": "",
- "codeLevelType": "",
- "codeLevelTypeText": "",
- "codeLevelValue": -1,
- "valueCutLength": -1,
- "valueCutType": "",
- "valueCutTypeText": "",
- "codeGetValueType": "",
- "codeGetValueTypeText": "",
- "referCodeClassifyOid": "",
- "referCodeClassifyOidName": "",
- "referBtmId": "",
- "referBtmName": "",
- "referConfig": "",
- "referValueInfo": "",
- "filterSql": "",
- "serialStart": "",
- "serialStep": -1,
- "codeFillType": "code_fill_left",
- "codeFillTypeText": "",
- "codeFillSeparator": "0",
- "codeFillLength": "",
- "codeFillLimit": -1,
- "codeFillFlag": "false",
- "customCodeSerialClass": "",
- "matchClassifyValueFlag": "false",
- "parentClassifySecOid": "",
- "parentClassifySecText": "",
- "nullableFlag": "false",
- "componentCodeFlag": "false",
- "serialDependFlag": "false",
- "displayFlag": "false",
- "serialDependOrder": 0,
- "fixedValueVOList": []
- },
- {
- "oid": "1673236217442996224",
- "id": "yymd",
- "name": "寮曠敤鐮佹",
- "tenantId": "",
- "description": "",
- "revisionOid": "1673236217442996227",
- "nameOid": "1673236217442996225",
- "btmname": "codebasicsec",
- "lastR": "1",
- "firstR": "1",
- "lastV": "1",
- "firstV": "1",
- "creator": "0",
- "createTime": "2023-06-26 15:46:16",
- "lastModifier": "0",
- "lastModifyTime": "2023-06-26 15:46:16",
- "revisionRule": "",
- "revisionSeq": 1,
- "revisionValue": "",
- "versionRule": "0",
- "versionSeq": 1,
- "versionValue": "1",
- "lctid": "",
- "lcStatus": "",
- "lcStatusText": "",
- "ts": "2023-06-26 15:46:16.121",
- "owner": "1",
- "copyFromVersion": "",
- "secretGrade": -1,
- "secretGradeText": "",
- "data": {},
- "sectype": "coderefersec",
- "secTypeText": "寮曠敤鐮佹",
- "pkCodeRule": "1673234841140858880",
- "orderNum": 5,
- "codeSecLengthType": "code_sec_length_variable",
- "codeSecLengthTypeText": "鍙彉闀垮害",
- "codeSecLength": "",
- "referAttributeName": "",
- "referAttributeId": "",
- "getValueClass": "",
- "codeDateFormatStr": "",
- "codeLevelType": "",
- "codeLevelTypeText": "",
- "codeLevelValue": -1,
- "valueCutLength": -1,
- "valueCutType": "",
- "valueCutTypeText": "",
- "codeGetValueType": "",
- "codeGetValueTypeText": "",
- "referCodeClassifyOid": "",
- "referCodeClassifyOidName": "",
- "referBtmId": "referconfig",
- "referBtmName": "鍙傜収閰嶇疆琛�",
- "referConfig": "{\"codeSrchCondConfigVOS\":[],\"codeShowFieldConfigVOS\":[{\"field\":\"displaytable\",\"title\":\"displaytable\",\"sort\":false,\"attrSortField\":\"displaytable\",\"isquery\":false,\"$cellEdit\":false,\"$index\":0,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"},{\"field\":\"mapfields\",\"title\":\"mapfields\",\"sort\":false,\"attrSortField\":\"mapfields\",\"isquery\":false,\"$cellEdit\":false,\"$index\":1,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"},{\"field\":\"displaytable\",\"title\":\"displaytable\",\"sort\":false,\"attrSortField\":\"displaytable\",\"isquery\":false,\"$cellEdit\":false,\"$index\":2,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"}],\"referTypeName\":\"鍙傜収閰嶇疆琛╘",\"referType\":\"referconfig\",\"textField\":\"name\",\"valueField\":\"oid\",\"type\":\"default\",\"url\":\"\",\"backPath\":\"\",\"method\":\"GET\",\"height\":\"\",\"useFormKey\":\"\",\"paramForFormKey\":\"\",\"isMuti\":false,\"mapFields\":\"\",\"isOpenGlobal\":true,\"isPersistence\":true,\"id\":\"004\",\"name\":\"娴嬭瘯寮曠敤鐮佹\",\"limit\":\"\",\"sortField\":\"\",\"sortType\":\"\"}",
- "referValueInfo": "{\"codeSrchCondConfigVOS\":[],\"codeShowFieldConfigVOS\":[{\"field\":\"displaytable\",\"title\":\"displaytable\",\"sort\":false,\"attrSortField\":\"displaytable\",\"isquery\":false,\"$cellEdit\":false,\"$index\":0,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"},{\"field\":\"mapfields\",\"title\":\"mapfields\",\"sort\":false,\"attrSortField\":\"mapfields\",\"isquery\":false,\"$cellEdit\":false,\"$index\":1,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"},{\"field\":\"displaytable\",\"title\":\"displaytable\",\"sort\":false,\"attrSortField\":\"displaytable\",\"isquery\":false,\"$cellEdit\":false,\"$index\":2,\"$fieldTypeText\":\"\",\"$fixedPosition\":\"\"}],\"referTypeName\":\"鍙傜収閰嶇疆琛╘",\"referType\":\"referconfig\",\"textField\":\"name\",\"valueField\":\"oid\",\"type\":\"default\",\"url\":\"\",\"backPath\":\"\",\"method\":\"GET\",\"height\":\"\",\"useFormKey\":\"\",\"paramForFormKey\":\"\",\"isMuti\":false,\"mapFields\":\"\",\"isOpenGlobal\":true,\"isPersistence\":true,\"id\":\"004\",\"name\":\"娴嬭瘯寮曠敤鐮佹\",\"limit\":\"\",\"sortField\":\"\",\"sortType\":\"\"}",
- "filterSql": "",
- "serialStart": "",
- "serialStep": -1,
- "codeFillType": "",
- "codeFillTypeText": "",
- "codeFillSeparator": "0",
- "codeFillLength": "",
- "codeFillLimit": -1,
- "codeFillFlag": "false",
- "customCodeSerialClass": "",
- "matchClassifyValueFlag": "false",
- "parentClassifySecOid": "",
- "parentClassifySecText": "",
- "nullableFlag": "false",
- "componentCodeFlag": "false",
- "serialDependFlag": "false",
- "displayFlag": "false",
- "serialDependOrder": 0,
- "fixedValueVOList": []
- }
- ]
- if (this.secVOList.length > 0) {
- this.showCodeApply = true
- this.$nextTick(() => {
- this.$refs.CodeApply.templateRender(this.secVOList);
- });
- }
-
- }
- });
- },
- getCodeApplyFormData(codeApplyForm) {
- this.codeApplyForm = codeApplyForm;
- },
- getType(item) {
- console.log(item.sectype, 'item.sectype');
- return this.selfColumnType[item.sectype];
- },
- getReferConfig(item) {
- let params = {};
- if (item.sectype == "codeclassifysec") {
- params = {
- isMuti: false,
- type: "grid",
- tableConfig: {
- limit: -1,
- cols: [
- {
- field: "id",
- title: "鑻辨枃鍚嶇О",
- sort: true,
- width: 150,
- },
- {
- field: "name",
- title: "涓枃鍚嶇О",
- sort: true,
- width: 150,
- },
- {
- field: "description",
- title: "鎻忚堪",
- width: 250,
- },
- ],
- queryColumns: [
- {
- field: "id",
- title: "鑻辨枃鍚嶇О",
- },
- {
- field: "name",
- title: "涓枃鍚嶇О",
- },
- ],
- },
- url: "api/ubcs-code/ubcs-code/mdmEngineController/listCodeClassifyValueBySecOid",
- extraParams: {
- classifySecOid: item.oid,
- parentClassifyValueOid: item.parentClassifySecOid
- ? this.codeApplyForm[item.parentClassifySecOid]
- : "",
- },
- };
- } else if (item.sectype == "coderefersec") {
- params = JSON.parse(item.referValueInfo);
- }
- return params;
- },
- getDisabled(item) {
- if (item.sectype === "codeclassifysec") {
- if (item.parentClassifySecOid) {
- if (!this.codeApplyForm[item.parentClassifySecOid]) {
- return true;
- } else {
- return false;
- }
- }
- }
- },
- isRequired(item) {
- return item.nullableFlag != "true";
- },
- getOptionList(item) {
- if (
- Array.isArray(item.fixedValueVOList) &&
- item.fixedValueVOList.length > 0
- ) {
- const configAttr = {
- key: "id",
- value: "id",
- };
- const optionList = item.fixedValueVOList.map((item) => {
- for (const key in configAttr) {
- if (Object.hasOwnProperty.call(configAttr, key)) {
- const element = configAttr[key];
- item[key] = item[element];
- }
- }
- return item;
- });
- return optionList;
- } else {
- return [];
- }
- },
- // 鍙傜収缁勪欢鏁版嵁鍙樻洿
- referConfigDataUpdate(data) {
- const { field } = data;
- this.secVOList = this.secVOList.map((item) => {
- if (item.parentClassifySecOid === field) {
- this.$refs.CodeApply.form[item.oid] = undefined;
- this.$refs.CodeApply.form[item.name] = undefined;
- }
- return item;
- });
- this.$refs.CodeApply.templateRender(this.secVOList);
- },
- }
-}
\ No newline at end of file
+import { getCodeRule } from "@/api/formTemplate.js";
+export default {
+ data() {
+ return {
+ secVOList: [],
+ localSecVOList: [],
+ showCodeApply: false,
+ selfColumnType: {
+ codefixedsec: "combox",
+ codeclassifysec: "refer",
+ codevariablesec: "text",
+ coderefersec: "refer",
+ },
+ selfColumnConfig: {
+ function: {
+ required: this.isRequired,
+ dicData: this.getOptionList,
+ type: this.getType,
+ referConfig: this.getReferConfig,
+ readOnly: this.getDisabled,
+ },
+ exchange: {
+ text: "name",
+ field: "oid",
+ prop: "oid",
+ showField: "name",
+ parentClassifySecOid: "parentClassifySecOid",
+ label: "name",
+ maxlength: "codeSecLength",
+ data: "fixedValueVOList",
+ },
+ directVoluation: {
+ search: true,
+ span: 12,
+ props: {
+ label: "id",
+ value: "id",
+ },
+ },
+ },
+ codeApplyForm: {},
+ }
+ },
+ created() {
+ if (this.type === 'batchImportApply') {
+ this.getCodeRule()
+ }
+ },
+ methods: {
+ // 鑾峰彇鐮佸�肩敵璇锋暟鎹�
+ getCodeRule() {
+ getCodeRule({ codeClassifyOid: this.localCodeClassifyOid || this.codeClassifyOid }).then((res) => {
+ if (res.data && res.data.code === 200) {
+ const typeList = [
+ "codefixedsec",
+ "codeclassifysec",
+ "codevariablesec",
+ "coderefersec",
+ ];
+ this.secVOList = res.data.data.secVOList || []
+ this.localSecVOList = (res.data.data.secVOList || []).filter((item) =>
+ typeList.includes(item.secType)
+ );
+ if (this.localSecVOList.length > 0) {
+ this.showCodeApply = true
+ this.$nextTick(() => {
+ if (this.batchApplyCodeTableData) {
+ this.batchApplyCodeTableData[this.codeRuleOid]["localSecVOList"] = this.localSecVOList
+ }
+ this.$refs.CodeApply.templateRender(this.localSecVOList);
+ });
+ } else {
+ this.showCodeApply = false
+ }
+
+ }
+ });
+ },
+ getCodeApplyFormData(codeApplyForm) {
+ this.codeApplyForm = codeApplyForm;
+ if (this.batchApplyCodeTableData) {
+ this.batchApplyCodeTableData[this.codeRuleOid]["codeApply"] = codeApplyForm
+ }
+ },
+ getType(item) {
+ console.log(item.secType, 'item.secType');
+ return this.selfColumnType[item.secType];
+ },
+ getReferConfig(item) {
+ let params = {};
+ if (item.secType == "codeclassifysec") {
+ params = {
+ isMuti: false,
+ type: "grid",
+ tableConfig: {
+ limit: -1,
+ cols: [
+ {
+ field: "id",
+ title: "鑻辨枃鍚嶇О",
+ sort: true,
+ width: 150,
+ },
+ {
+ field: "name",
+ title: "涓枃鍚嶇О",
+ sort: true,
+ width: 150,
+ },
+ {
+ field: "description",
+ title: "鎻忚堪",
+ width: 250,
+ },
+ ],
+ queryColumns: [
+ {
+ field: "id",
+ title: "鑻辨枃鍚嶇О",
+ },
+ {
+ field: "name",
+ title: "涓枃鍚嶇О",
+ },
+ ],
+ },
+ url: "api/ubcs-code/ubcs-code/mdmEngineController/listCodeClassifyValueBySecOid",
+ extraParams: {
+ classifySecOid: item.oid,
+ parentClassifyValueOid: item.parentClassifySecOid
+ ? this.codeApplyForm[item.parentClassifySecOid]
+ : "",
+ },
+ };
+ } else if (item.secType == "coderefersec") {
+ params = JSON.parse(item.referValueInfo);
+ }
+ return params;
+ },
+ getDisabled(item) {
+ if (item.secType === "codeclassifysec") {
+ if (item.parentClassifySecOid) {
+ if (!this.codeApplyForm[item.parentClassifySecOid]) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+ },
+ isRequired(item) {
+ return item.nullableFlag != "true";
+ },
+ getOptionList(item) {
+ if (
+ Array.isArray(item.fixedValueVOList) &&
+ item.fixedValueVOList.length > 0
+ ) {
+ const configAttr = {
+ key: "id",
+ value: "id",
+ };
+ const optionList = item.fixedValueVOList.map((item) => {
+ for (const key in configAttr) {
+ if (Object.hasOwnProperty.call(configAttr, key)) {
+ const element = configAttr[key];
+ item[key] = item[element];
+ }
+ }
+ return item;
+ });
+ return optionList;
+ } else {
+ return [];
+ }
+ },
+ // 鍙傜収缁勪欢鏁版嵁鍙樻洿
+ referConfigDataUpdate(data) {
+ const { field } = data;
+ this.localSecVOList = this.localSecVOList.map((item) => {
+ if (item.parentClassifySecOid === field) {
+ this.$refs.CodeApply.form[item.oid] = undefined;
+ this.$refs.CodeApply.form[item.name] = undefined;
+ }
+ return item;
+ });
+ this.$refs.CodeApply.templateRender(this.localSecVOList);
+ },
+ }
+}
--
Gitblit v1.9.3