| | |
| | | data() {
|
| | | return {
|
| | | secVOList: [],
|
| | | localSecVOList: [],
|
| | | showCodeApply: false,
|
| | | selfColumnType: {
|
| | | codefixedsec: "combox",
|
| | |
| | | codeApplyForm: {},
|
| | | }
|
| | | },
|
| | | created() {
|
| | | this.getCodeRule()
|
| | | },
|
| | | methods: {
|
| | | // 获取码值申请数据
|
| | | getCodeRule() {
|
| | | getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => {
|
| | | getCodeRule({ codeClassifyOid: this.localCodeClassifyOid }).then((res) => {
|
| | | if (res.data && res.data.code === 200) {
|
| | | const typeList = [
|
| | | "codefixedsec",
|
| | |
| | | "coderefersec",
|
| | | ];
|
| | | this.secVOList = res.data.data.secVOList || []
|
| | | let localSecVOList = (res.data.data.secVOList || []).filter((item) =>
|
| | | this.localSecVOList = (res.data.data.secVOList || []).filter((item) =>
|
| | | typeList.includes(item.secType)
|
| | | );
|
| | | if (localSecVOList.length > 0) {
|
| | | if (this.localSecVOList.length > 0) {
|
| | | this.showCodeApply = true
|
| | | this.$nextTick(() => {
|
| | | this.$refs.CodeApply.templateRender(localSecVOList);
|
| | | if (this.batchApplyCodeTableData) {
|
| | | this.batchApplyCodeTableData[this.codeRuleOid]["localSecVOList"] = this.localSecVOList
|
| | | }
|
| | | this.$refs.CodeApply.templateRender(this.localSecVOList);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | },
|
| | | getCodeApplyFormData(codeApplyForm) {
|
| | | this.codeApplyForm = codeApplyForm;
|
| | | if (this.batchApplyCodeTableData) {
|
| | | this.batchApplyCodeTableData[this.codeRuleOid]["codeApply"] = codeApplyForm
|
| | | }
|
| | | },
|
| | | getType(item) {
|
| | | console.log(item.secType, 'item.secType');
|
| | |
| | | },
|
| | | };
|
| | | } else if (item.secType == "coderefersec") {
|
| | | params = JSON.parse(item.referConfig);
|
| | | params = JSON.parse(item.referValueInfo);
|
| | | }
|
| | | return params;
|
| | | },
|
| | |
| | | // 参照组件数据变更
|
| | | referConfigDataUpdate(data) {
|
| | | const { field } = data;
|
| | | this.secVOList = this.secVOList.map((item) => {
|
| | | 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.secVOList);
|
| | | this.$refs.CodeApply.templateRender(this.localSecVOList);
|
| | | },
|
| | | }
|
| | | } |