From 9276283519b3aee53938afd82147265bdbc9e3e0 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 28 七月 2023 12:00:52 +0800
Subject: [PATCH] 修改样式
---
Source/UBCS-WEB/src/views/modeling/originalAdd.vue | 98 +++++++++++++++++++++++++++++++++---------------
1 files changed, 67 insertions(+), 31 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/modeling/originalAdd.vue b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue
index c6e0c48..14cea7e 100644
--- a/Source/UBCS-WEB/src/views/modeling/originalAdd.vue
+++ b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue
@@ -17,9 +17,9 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="鏍囩" label-width="100px">
+<!-- <el-form-item label="鏍囩" label-width="100px">
<el-input v-model="attribute.hashtag"></el-input>
- </el-form-item>
+ </el-form-item>-->
<el-form-item label="榛樿鍊�" label-width="100px">
<el-input v-model="attribute.defaultValue"></el-input>
</el-form-item>
@@ -37,17 +37,16 @@
<el-form-item label="鎻忚堪" label-width="100px">
<el-input v-model="attribute.description" type="text"></el-input>
</el-form-item>
-
<el-tabs v-model="activeName" @tab-click="handleClick" stretch="true">
<el-tab-pane label="鍙傜収" name="referTab">
- <el-form-item label="鍙傜収绫诲瀷" label-width="100px">
+ <el-form-item label="鍙傜収绫诲瀷" label-width="100px" class="referTypeForm">
<el-select v-model="attribute.referTypeKey" @change="referTypeSelectChange">
<el-option v-for="item in btmRefer.referTypeList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="鍙傜収鍚嶇О" label-width="100px">
+ <el-form-item label="鍙傜収鍚嶇О" label-width="100px" class="referNameForm">
<el-input v-model="attribute.referToName" @focus="openReferConfig" clearable="true"
:disabled="referToFlag" @clear="clearReferTo">
<i slot="suffix" class="el-input__icon el-icon-search"></i>
@@ -61,14 +60,16 @@
</el-input>
</el-form-item>
<el-form-item label="鏋氫妇椤�" label-width="100px">
-
+ <el-tag v-for="eItem in dictEnums" :key="eItem.itemName" type="info">
+ {{eItem.itemName}}
+ </el-tag>
</el-form-item>
</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitAttribute">纭畾</el-button>
- <el-button @click="cancleSubmit">鍙栨秷</el-button>
+ <el-button @click="cancelSubmit">鍙栨秷</el-button>
</div>
<!-- 閫夋嫨鍙傜収鏃剁殑寮圭獥 -->
<el-dialog title="鍙傜収鍒楄〃" :visible.sync="btmRefer.show" append-to-body @close="closeReferDialog" width="80%"
@@ -104,7 +105,7 @@
</el-container>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmBtm" size="small">纭畾</el-button>
- <el-button @click="cancleBtm" size="small">鍙栨秷</el-button>
+ <el-button @click="cancelBtm" size="small">鍙栨秷</el-button>
</div>
</el-dialog>
<!-- 閫夋嫨鏋氫妇鏃剁殑寮圭獥 -->
@@ -119,7 +120,7 @@
</avue-crud>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmEnum" size="small">纭畾</el-button>
- <el-button @click="cancleEnum" size="small">鍙栨秷</el-button>
+ <el-button @click="cancelEnum" size="small">鍙栨秷</el-button>
</div>
</el-dialog>
</el-dialog>
@@ -223,7 +224,7 @@
addBtn: false,
refreshBtn: false,
columnBtn: false,
- selection: true,
+ // selection: true,
menu: false,
border: true,
reserveSelection: true,
@@ -267,7 +268,12 @@
value: 'oid',
}
}
- }
+ },
+ dictEnums: [],
+ enumEditFlag: false,
+ enumInitFlag: false,
+ referInitFlag: false,
+ referEditFlag: false,
}
},
created() {
@@ -286,9 +292,23 @@
};
this.referToFlag = true;
this.$refs.form.resetFields();
+ this.dictEnums = [];
},
submitAttribute() {
const that = this;
+ if (that.referInitFlag && that.referEditFlag){
+ this.$set(this.attribute,'dictCode','');
+ this.$set(this.attribute,'dictKey','');
+ this.$set(this.attribute,'dictValue','');
+ this.$set(this.attribute,'usingDict','');
+ }
+ if (that.enumInitFlag && that.enumEditFlag){
+ this.$set(this.attribute,'referTypeCode','');
+ this.$set(this.attribute,'referTypeKey','');
+ this.$set(this.attribute,'referTypeValue','');
+ this.$set(this.attribute,'referToId','');
+ this.$set(this.attribute,'referToName','');
+ }
this.$refs.form.validate(function (pass, field) {
if (pass) {
add(that.attribute).then(res => {
@@ -302,21 +322,23 @@
}
})
},
- cancleSubmit() {
+ cancelSubmit() {
this.closeSubmitDialog();
},
closeEnumDialog() {
- this.cancleEnum();
+ this.cancelEnum();
},
closeReferDialog() {
- this.cancleBtm();
+ this.cancelBtm();
},
confirmBtm() {
this.attribute.referToId = this.btmRefer.selectItem.oid;
this.attribute.referToName = this.btmRefer.selectItem.name;
this.btmRefer.show = false;
+ this.referEditFlag = true;
+ this.enumEditFlag = false;
},
- cancleBtm() {
+ cancelBtm() {
this.btmRefer.selectItem = {};
this.btmRefer.show = false;
this.btmRefer.selectRow = '';
@@ -326,8 +348,13 @@
this.attribute.dictCode = this.enumRefer.selectItem.name;
this.attribute.dictValue = this.enumRefer.selectItem.label;
this.enumRefer.show = false;
+ getDictionary({code :this.enumRefer.selectItem.name}).then(res => {
+ this.dictEnums = res.data.data;
+ });
+ this.referEditFlag = false;
+ this.enumEditFlag = true;
},
- cancleEnum() {
+ cancelEnum() {
this.enumRefer.selectItem = {};
this.enumRefer.show = false;
this.enumRefer.selectRow = '';
@@ -345,13 +372,12 @@
this.domain.data = res.data.data;
})
this.btmRefer.show = true;
-
},
// 鍙傜収绫诲瀷鏍戠殑鐐瑰嚮浜嬩欢
nodeClick(data) {
// 鍖哄垎涓氬姟绫诲瀷鐨勬煡璇㈠拰閾炬帴绫诲瀷鐨勬煡璇�
if (this.attribute.referTypeKey == 'btmType') {
- btmPage(this.btmRefer.btmPage.currentPage, this.btmRefer.btmPage.pageSize, { domain: data.id }).then(res => {
+ btmPage(this.btmRefer.btmPage.currentPage, this.btmRefer.btmPage.pageSize, { bizDomain: data.id }).then(res => {
this.btmRefer.data = res.data.data.records;
this.btmRefer.btmPage.total = res.data.data.total;
})
@@ -431,18 +457,16 @@
this.btmRefer.selectItem = {};
this.btmRefer.selectRow = '';
},
- // handleClick(tab){
- // // 鍥犱负鍙兘鍙傜収鍜屾灇涓句簩閫変竴銆傛墍浠ュ湪鍒囨崲鐨勬椂鍊欐妸灞炴�х粰娓呯┖銆�
- // this.$delete(this.attribute,'referTypeCode');
- // this.$delete(this.attribute,'referTypeKey');
- // this.$delete(this.attribute,'referTypeValue');
- // this.$delete(this.attribute,'referToId');
- // this.$delete(this.attribute,'referToName');
- // this.$delete(this.attribute,'dictCode');
- // this.$delete(this.attribute,'dictKey');
- // this.$delete(this.attribute,'dictValue');
- // this.$delete(this.attribute,'usingDict');
- // }
+ handleClick(tab){
+ // 鍥犱负鍙兘鍙傜収鍜屾灇涓句簩閫変竴銆傛墍浠ュ湪鍒囨崲鐨勬椂鍊欐妸灞炴�х粰娓呯┖銆�
+ if (tab.name === 'enumTab'){
+ this.enumInitFlag = true;
+ this.referInitFlag = false;
+ }else {
+ this.enumInitFlag = false;
+ this.referInitFlag = true;
+ }
+ }
}
}
</script>
@@ -462,4 +486,16 @@
.attributeForm>.el-form-item>.el-form-item__content>.el-select>.el-input>.el-input__inner {
width: 200px;
-}</style>
\ No newline at end of file
+}
+.attributeForm>.el-form-item>.el-form-item__content{
+ width :190px;
+}
+
+.referTypeForm > .el-form-item__content > .el-select > .el-input>.el-input__inner {
+ width: 200px;
+}
+
+.referNameForm > .el-form-item__content > .el-input > .el-input__inner {
+ width: 200px;
+}
+</style>
--
Gitblit v1.9.3