From 82dcea603fc12698824ea44fef2fd8bfeb828656 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期二, 26 九月 2023 18:16:30 +0800
Subject: [PATCH] 集成接口参数配置修改
---
Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue | 206 +++++++++++++++++++++++++-------------------------
1 files changed, 103 insertions(+), 103 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue b/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
index eb23a6f..38d0fba 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/CodeApply.vue
@@ -1,103 +1,103 @@
-<template>
- <FormTempalte
- ref="FormTempalte"
- :selfColumnType="selfColumnType"
- :selfColumnConfig="selfColumnConfig"
- ></FormTempalte>
-</template>
-
-<script>
-export default {
- name: "CodeApply",
- components: { FormTempalte: () => import('./FormTempalte.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.FormTempalte.templateRender(columnList);
- },
- handleResize() {
- let windowWidth = document.body.clientWidth;
- this.trendsSpan = 24 / Math.floor(windowWidth / 500);
- },
-
-
- 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