From 3c3da249fd5e2d90229914d8faa5be01f15d05e6 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 24 十月 2023 09:24:10 +0800
Subject: [PATCH] 用户停用启用按钮修改,前端代码打包
---
Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue | 625 +++++++++-----------------------------------------------
1 files changed, 103 insertions(+), 522 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue b/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
index e6f1f5b..38d0fba 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
@@ -1,522 +1,103 @@
-<template>
- <FormTempalte
- ref="FormTempalte"
- :selfColumnType="selfColumnType"
- :selfColumnConfig="selfColumnConfig"
- :columnList="columnList"
- ></FormTempalte>
-</template>
-
-<script>
-import { getCodeRule } from "@/api/formTemplate.js";
-export default {
- name: "CodeApply",
- components: { FormTempalte: () => import('./FormTempalte.vue') },
- props: {
- visible: {
- type: Boolean,
- default: false,
- },
- codeClassifyOid: {
- type: String,
- default: "",
- },
- },
- data() {
- return {
- secVOList: [],
- formItems: [],
- trendsSpan: 8,
- selfColumnType: {
- codefixedsec: "combox",
- codeclassifysec: "refer",
- codevariablesec: "text",
- coderefersec: "refer",
- },
- selfColumnConfig: {
- function: {
- required: this.isRequired,
- dicData: this.getOptionList,
- type: this.getType,
- },
- exchange: {
- text: "name",
- field: "oid",
- prop: "oid",
- showField: "name",
- parentClassifySecOid: "parentClassifySecOid",
- label: "name",
- maxlength: "codeSecLength",
- data: "fixedValueVOList",
- },
- directVoluation: {
- search: true,
- props: {
- label: "id",
- value: "id",
- },
- },
- },
- columnList: [
- {
- btmname: "codebasicsec",
- checkInBy: "",
- checkInTime: null,
- checkOutBy: "",
- checkOutTime: null,
- codeDateFormatStr: "",
- codeFillFlag: "",
- codeFillLength: "",
- codeFillLimit: 0,
- codeFillSeparator: "",
- codeFillType: "",
- codeFillTypeText: "",
- codeGetValueType: "",
- codeGetValueTypeText: "",
- codeLevelType: "",
- codeLevelTypeText: "",
- codeLevelValue: 0,
- codeSecLength: "10",
- codeSecLengthType: "code_sec_length_variable",
- codeSecLengthTypeText: "",
- componentCodeFlag: "false",
- copyFromVersion: "",
- createTime: "2023-06-02 10:23:33.000",
- creator: "1",
- customCodeSerialClass: "",
- data: null,
- description: "",
- displayFlag: "false",
- filterSql: "",
- firstR: "1",
- firstV: "1",
- fixedValueVOList: [
- {
- btmname: "codefixedvalue",
- checkInBy: "",
- checkInTime: null,
- checkOutBy: "",
- checkOutTime: null,
- codefixedsecoid: "5591ED23-D218-8B84-9789-1E5EB21A49B9",
- codefixedsecoidName: null,
- copyFromVersion: "",
- createTime: "2023-06-02 10:47:45.000",
- creator: "1",
- data: null,
- description: "",
- firstR: "1",
- firstV: "1",
- id: "002",
- lastModifier: "1",
- lastModifyTime: "2023-06-02 10:47:45.000",
- lastR: "1",
- lastV: "1",
- lcStatus: "Exist",
- lcStatusText: "瀛樺湪",
- lctid: "defaultLC",
- name: "",
- nameOid: "B8BB82F0-9B9E-3E7C-4324-62F13A64B369",
- oid: "375AE030-DCB2-B116-1C71-DA1AB971E249",
- ordernum: 0,
- owner: "1",
- revisionOid: "9BF1CABA-EB6D-0B80-0938-D4DC779D5AF0",
- revisionRule: "",
- revisionSeq: 1,
- revisionValue: "",
- secretGrade: null,
- secretGradeText: "",
- ts: "2023-06-02 10:47:45.635",
- versionRule: "0",
- versionSeq: 1,
- versionValue: "1",
- },
- {
- btmname: "codefixedvalue",
- checkInBy: "",
- checkInTime: null,
- checkOutBy: "",
- checkOutTime: null,
- codefixedsecoid: "5591ED23-D218-8B84-9789-1E5EB21A49B9",
- codefixedsecoidName: null,
- copyFromVersion: "",
- createTime: "2023-06-02 10:47:42.000",
- creator: "1",
- data: null,
- description: "",
- firstR: "1",
- firstV: "1",
- id: "001",
- lastModifier: "1",
- lastModifyTime: "2023-06-02 10:47:42.000",
- lastR: "1",
- lastV: "1",
- lcStatus: "Exist",
- lcStatusText: "瀛樺湪",
- lctid: "defaultLC",
- name: "",
- nameOid: "804FA254-1158-C355-9CE2-7CA444955AFC",
- oid: "821F6250-C763-FB0E-92F5-A9C07F1B951C",
- ordernum: 0,
- owner: "1",
- revisionOid: "6CF50C9D-2606-948A-03B1-26158627CE33",
- revisionRule: "",
- revisionSeq: 1,
- revisionValue: "",
- secretGrade: null,
- secretGradeText: "",
- ts: "2023-06-02 10:47:42.527",
- versionRule: "0",
- versionSeq: 1,
- versionValue: "1",
- },
- ],
- getValueClass: "",
- id: "0001",
- lastModifier: "1",
- lastModifyTime: "2023-06-02 10:23:33.000",
- lastR: "1",
- lastV: "1",
- lcStatus: "Exist",
- lcStatusText: "瀛樺湪",
- lctid: "defaultLC",
- matchClassifyValueFlag: "",
- name: "鍥哄畾鐮佹",
- nameOid: "C01CA64B-8358-D3A7-D38D-9DE7A5D748C8",
- nullableFlag: "false",
- oid: "5591ED23-D218-8B84-9789-1E5EB21A49B9",
- orderNum: 1,
- owner: "1",
- parentClassifySecOid: "",
- parentClassifySecText: "",
- pkCodeRule: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
- referAttributeId: "",
- referAttributeName: "",
- referBtmId: "",
- referBtmName: "",
- referCodeClassifyOid: "",
- referCodeClassifyOidName: "",
- referConfig: "",
- referValueInfo: "",
- revisionOid: "EE7A9BC0-FEF3-061B-A750-132121D86D83",
- revisionRule: "",
- revisionSeq: 1,
- revisionValue: "",
- secretGrade: null,
- secretGradeText: "",
- sectype: "codefixedsec",
- sectypeText: "鍥哄畾鐮佹",
- serialDependFlag: "false",
- serialDependOrder: 0,
- serialStart: "",
- serialStep: 0,
- ts: "2023-06-02 10:23:33.733",
- valueCutLength: 0,
- valueCutType: "code_cut_none",
- valueCutTypeText: "涓嶆埅鍙�",
- versionRule: "0",
- versionSeq: 1,
- versionValue: "1",
- },
- {
- btmname: "codebasicsec",
- checkInBy: "",
- checkInTime: null,
- checkOutBy: "",
- checkOutTime: null,
- codeDateFormatStr: "",
- codeFillFlag: "",
- codeFillLength: "",
- codeFillLimit: 0,
- codeFillSeparator: "0",
- codeFillType: "code_fill_right",
- codeFillTypeText: "",
- codeGetValueType: "",
- codeGetValueTypeText: "",
- codeLevelType: "",
- codeLevelTypeText: "",
- codeLevelValue: 0,
- codeSecLength: "10",
- codeSecLengthType: "",
- codeSecLengthTypeText: "",
- componentCodeFlag: "false",
- copyFromVersion: "",
- createTime: "2023-06-02 10:24:07.000",
- creator: "1",
- customCodeSerialClass: "",
- data: null,
- description: "鍙彉鐮佹",
- displayFlag: "false",
- filterSql: "",
- firstR: "1",
- firstV: "1",
- fixedValueVOList: null,
- getValueClass: "",
- id: "0002",
- lastModifier: "1",
- lastModifyTime: "2023-06-02 10:24:07.000",
- lastR: "1",
- lastV: "1",
- lcStatus: "Exist",
- lcStatusText: "瀛樺湪",
- lctid: "defaultLC",
- matchClassifyValueFlag: "",
- name: "鍙彉鐮佹",
- nameOid: "02AED8DD-C40D-7E00-C88A-3DB65A3027A4",
- nullableFlag: "false",
- oid: "A4508759-4213-2F07-04ED-A8C224303F44",
- orderNum: 2,
- owner: "1",
- parentClassifySecOid: "",
- parentClassifySecText: "",
- pkCodeRule: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
- referAttributeId: "",
- referAttributeName: "",
- referBtmId: "",
- referBtmName: "",
- referCodeClassifyOid: "",
- referCodeClassifyOidName: "",
- referConfig: "",
- referValueInfo: "",
- revisionOid: "E4C77B6E-13AE-55EB-4147-64B4526BFEE4",
- revisionRule: "",
- revisionSeq: 1,
- revisionValue: "",
- secretGrade: null,
- secretGradeText: "",
- sectype: "codevariablesec",
- sectypeText: "鍙彉鐮佹",
- serialDependFlag: "false",
- serialDependOrder: 0,
- serialStart: "",
- serialStep: 0,
- ts: "2023-06-02 10:24:07.804",
- valueCutLength: 0,
- valueCutType: "",
- valueCutTypeText: "",
- versionRule: "0",
- versionSeq: 1,
- versionValue: "1",
- },
- {
- btmname: "codebasicsec",
- checkInBy: "",
- checkInTime: null,
- checkOutBy: "",
- checkOutTime: null,
- codeDateFormatStr: "",
- codeFillFlag: "",
- codeFillLength: "",
- codeFillLimit: 0,
- codeFillSeparator: "",
- codeFillType: "",
- codeFillTypeText: "",
- codeGetValueType: "",
- codeGetValueTypeText: "",
- codeLevelType: "",
- codeLevelTypeText: "",
- codeLevelValue: 0,
- codeSecLength: "10",
- codeSecLengthType: "code_sec_length_static",
- codeSecLengthTypeText: "",
- componentCodeFlag: "false",
- copyFromVersion: "",
- createTime: "2023-06-02 10:25:07.000",
- creator: "1",
- customCodeSerialClass: "",
- data: null,
- description: "鍒嗙被鐮佹瀛�",
- displayFlag: "false",
- filterSql: "",
- firstR: "1",
- firstV: "1",
- fixedValueVOList: [
- {
- btmname: "codefixedvalue",
- checkInBy: "",
- checkInTime: null,
- checkOutBy: "",
- checkOutTime: null,
- codefixedsecoid: "8FD660BF-BA04-AB4F-8076-B5C43845621B",
- codefixedsecoidName: null,
- copyFromVersion: "",
- createTime: "2023-06-02 10:43:44.000",
- creator: "1",
- data: null,
- description: "",
- firstR: "1",
- firstV: "1",
- id: "000101",
- lastModifier: "1",
- lastModifyTime: "2023-06-02 10:43:44.000",
- lastR: "1",
- lastV: "1",
- lcStatus: "Exist",
- lcStatusText: "瀛樺湪",
- lctid: "defaultLC",
- name: "",
- nameOid: "D135277F-E638-EB02-CEF1-AD99B889CA94",
- oid: "F7FEFFB7-0832-8CAF-2965-50757D01B878",
- ordernum: 0,
- owner: "1",
- revisionOid: "AF362124-06FD-F209-442F-8A13842CEB40",
- revisionRule: "",
- revisionSeq: 1,
- revisionValue: "",
- secretGrade: null,
- secretGradeText: "",
- ts: "2023-06-02 10:43:44.838",
- versionRule: "0",
- versionSeq: 1,
- versionValue: "1",
- },
- {
- btmname: "codefixedvalue",
- checkInBy: "",
- checkInTime: null,
- checkOutBy: "",
- checkOutTime: null,
- codefixedsecoid: "8FD660BF-BA04-AB4F-8076-B5C43845621B",
- codefixedsecoidName: null,
- copyFromVersion: "",
- createTime: "2023-06-02 10:43:49.000",
- creator: "1",
- data: null,
- description: "",
- firstR: "1",
- firstV: "1",
- id: "000102",
- lastModifier: "1",
- lastModifyTime: "2023-06-02 10:43:49.000",
- lastR: "1",
- lastV: "1",
- lcStatus: "Exist",
- lcStatusText: "瀛樺湪",
- lctid: "defaultLC",
- name: "",
- nameOid: "4F0F0F48-6146-5E62-7E4C-C1ED5E7D788C",
- oid: "F11E47E7-1360-5914-BA03-B6844E37AFB4",
- ordernum: 0,
- owner: "1",
- revisionOid: "B4797510-7232-B6FF-077D-918F9B36D3C3",
- revisionRule: "",
- revisionSeq: 1,
- revisionValue: "",
- secretGrade: null,
- secretGradeText: "",
- ts: "2023-06-02 10:43:49.254",
- versionRule: "0",
- versionSeq: 1,
- versionValue: "1",
- },
- ],
- getValueClass: "",
- id: "00031",
- lastModifier: "1",
- lastModifyTime: "2023-06-02 10:25:07.000",
- lastR: "1",
- lastV: "1",
- lcStatus: "Exist",
- lcStatusText: "瀛樺湪",
- lctid: "defaultLC",
- matchClassifyValueFlag: "",
- name: "鍒嗙被鐮佹瀛�",
- nameOid: "69BEE3EC-F560-1C41-F56B-107F5B43C051",
- nullableFlag: "false",
- oid: "8FD660BF-BA04-AB4F-8076-B5C43845621B",
- orderNum: 4,
- owner: "1",
- parentClassifySecOid: "",
- parentClassifySecText: "",
- pkCodeRule: "B95872A6-9CEA-D490-8F1B-9D26548CAF96",
- referAttributeId: "",
- referAttributeName: "",
- referBtmId: "",
- referBtmName: "",
- referCodeClassifyOid: "",
- referCodeClassifyOidName: "",
- referConfig: "",
- referValueInfo: "",
- revisionOid: "EA98821E-60A0-1D18-4F70-96B0E0740B44",
- revisionRule: "",
- revisionSeq: 1,
- revisionValue: "",
- secretGrade: null,
- secretGradeText: "",
- sectype: "codefixedsec",
- sectypeText: "鍥哄畾鐮佹",
- serialDependFlag: "false",
- serialDependOrder: 0,
- serialStart: "",
- serialStep: 0,
- ts: "2023-06-02 10:25:07.764",
- valueCutLength: 0,
- valueCutType: "code_cut_none",
- valueCutTypeText: "涓嶆埅鍙�",
- versionRule: "0",
- versionSeq: 1,
- versionValue: "1",
- },
- ],
- };
- },
- created() {
- this.handleResize();
- },
- mounted() {},
- methods: {
- getType(item) {
- return this.selfColumnType[item.sectype];
- },
- getCodeRule() {
- getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => {
- if (res.data && res.data.code === 200) {
- // this.defaultValue = res.data.data;
- // this.columnList = res.data.data.secVOList || [];
- // this.codeRuleOid = res.data.data.oid;
- this.$nextTick(() => {
- // 娴嬭瘯鏁版嵁灞曠ず
- // this.$refs.FormTempalte.init(res.data.data.secVOList);
- this.$refs.FormTempalte.init(this.columnList);
- });
- }
- });
- },
- handleResize() {
- let windowWidth = document.body.clientWidth;
- this.trendsSpan = 24 / Math.floor(windowWidth / 500);
- },
- 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 [];
- }
- },
- async validate() {
- return await this.$refs.FormTempalte.validate();
- },
- },
- watch: {},
-};
-</script>
-
-<style lang="less" scoped></style>
+<template>
+ <FormTemplate
+ ref="FormTemplate"
+ :selfColumnType="selfColumnType"
+ :selfColumnConfig="selfColumnConfig"
+ ></FormTemplate>
+</template>
+
+<script>
+export default {
+ name: "CodeApply",
+ components: { FormTemplate: () => import('./FormTemplate.vue') },
+ props: {
+ },
+ data() {
+ return {
+ secVOList: [],
+ formItems: [],
+ trendsSpan: 8,
+ selfColumnType: {
+ codefixedsec: "combox",
+ codeclassifysec: "refer",
+ codevariablesec: "text",
+ coderefersec: "refer",
+ },
+ selfColumnConfig: {
+ function: {
+ required: this.isRequired,
+ dicData: this.getOptionList,
+ type: this.getType,
+ },
+ exchange: {
+ text: "name",
+ field: "oid",
+ prop: "oid",
+ showField: "name",
+ parentClassifySecOid: "parentClassifySecOid",
+ label: "name",
+ maxlength: "codeSecLength",
+ data: "fixedValueVOList",
+ },
+ directVoluation: {
+ search: true,
+ props: {
+ label: "id",
+ value: "id",
+ },
+ },
+ },
+ };
+ },
+ created() {
+ this.handleResize();
+ },
+ mounted() {},
+ methods: {
+ getType(item) {
+ return this.selfColumnType[item.sectype];
+ },
+ 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 [];
+ }
+ },
+ init(columnList) {
+ this.$refs.FormTemplate.templateRender(columnList);
+ },
+ handleResize() {
+ let windowWidth = document.body.clientWidth;
+ this.trendsSpan = 24 / Math.floor(windowWidth / 500);
+ },
+
+
+ async validate() {
+ return await this.$refs.FormTemplate.validate();
+ },
+ },
+ watch: {},
+};
+</script>
+
+<style lang="less" scoped></style>
--
Gitblit v1.9.3