From 2fc52c10964ef98247e6e0eeb4be9c85c9d513f6 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 22 十一月 2024 11:06:17 +0800
Subject: [PATCH] 修改basic表单组件
---
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue | 34 +++++++++++++++-------------------
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue | 14 ++++++++------
2 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue
index 630a90e..ba912dd 100644
--- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue
+++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue
@@ -99,10 +99,6 @@
text: "input",
combox: "select",
truefalse: "switch",
- number: "number",
- textarea: "textarea",
- datetime: "datetime",
- date: "date",
refer: "refer",
multiFile:"upload",
richText:'richText'
@@ -190,24 +186,25 @@
let col= {
...item,
label: item.text,
- prop: item.field,
- showProp:item.showField,
+ prop: item.prop || item.field,
+ showProp:item.showProp || item.showField,
type: type,
- labelWidth: this.labelWidth || (item.text.length >= 6 ? 115 : 90),
- disabled: item.readOnly || this.disabled,
+ labelWidth:item.labelWidth || this.labelWidth || (item.text.length >= 6 ? 115 : 90),
+ disabled: item.disabled || this.disabled,
+ readonly:item.readonly || item.readOnly,
span: item.span
? item.span
: item.type === "textarea"
? 24
: this.span,
- value: item.defaultValue,
- display: !item.hidden,
- labelSuffix: item.suffix,
- suffixIcon: item.prefix,
- tip: item.tooltips,
- dictCode: item.comboxKey,
- valueFormat: item.dateFormate || "yyyy-MM-dd HH:mm:ss",
- format: item.dateFormate,
+ value: item.value || item.defaultValue,
+ display: item.display || !item.hidden,
+ labelSuffix: item.labelSuffix || item.suffix,
+ suffixIcon: item.suffixIcon || item.prefix,
+ tip: item.tip || item.tooltips,
+ dictCode: item.dictCode || item.comboxKey,
+ valueFormat: item.valueFormat ||item.dateFormate ,
+ format: item.format || item.dateFormate,
rules: this.isEdit?(type=="select" || type=="refer" || type=="date" || type=="datetime"?[{
required: item.required || false,
message: `璇烽�夋嫨${item.text}!`,
@@ -224,7 +221,8 @@
required: item.required|| false,
message: `璇疯緭鍏�${item.text}!`,
trigger: "submit"
- }]):[]
+ }]):[],
+
};
if(!this.isEdit){
col.placeholder=col.label;
@@ -266,8 +264,6 @@
});
}
});
- } else {
- col.dicData = [];
}
}
if (col.type==='refer') {
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
index eae35e2..abc4359 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formDialog.vue
@@ -123,7 +123,8 @@
label: '鏌ヨ妯℃澘鍚嶇О',
prop: 'qtName',
type: 'input',
- span:5,
+ span:4.5,
+ labelWidth: 100,
rules: [{
required: true,
message: "璇疯緭鍏ユ煡璇㈡ā鏉垮悕绉�",
@@ -134,8 +135,8 @@
prop: 'direction',
type: 'radio',
value:'positive',
- labelWidth:70,
- span: 3,
+ labelWidth:80,
+ span: 3.5,
dicData: [{
label: '姝e悜',
value: 'positive'
@@ -153,7 +154,8 @@
label: '鐗堟湰鐗堟',
prop: 'version',
type: 'select',
- span:5,
+ span:4,
+ labelWidth:110,
dicData: [{
label: '褰撳墠鐗堟湰褰撳墠鐗堟',
value: 1
@@ -172,7 +174,7 @@
label: '鏌ヨ鏄惁鏈変笅绾�',
prop: 'queryISLeaf',
type: 'switch',
- labelWidth:140,
+ labelWidth:150,
dicData: [ {
label: '鍚�',
value: false
@@ -185,7 +187,7 @@
label: '瀛愯妭鐐瑰眰娆℃暟',
prop: 'level',
type: 'number',
- span:3,
+ labelWidth:130,
value:1
}],
form:{
--
Gitblit v1.9.3