From 247aa6397ebdb5249a1213af11aaaf560568b0c3 Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期五, 02 八月 2024 15:43:50 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue | 36 +++++++++++++++++++++--------------- 1 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue index c2cb92a..4842e75 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue @@ -306,7 +306,7 @@ </el-form-item> - <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鏋氫妇鍊硷細'" prop="enumSwitch"> + <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鍊煎煙锛�'" prop="enumSwitch"> <el-select v-if="form.enumSwitch" v-model="form.enumId" placeholder="璇烽�夋嫨鏋氫妇绫诲瀷" @change="enumSelectChange"> <el-option v-for="(item,index) in attributeDataTypePickList" :key="index" :label="item.key" @@ -320,8 +320,8 @@ <el-button size="mini" @click="enumAddHandler"> = </el-button> </div> </el-form-item> - <el-form-item label="褰撳墠鏋氫妇鍊硷細" prop="rangeValue"> - <textarea v-model="form.rangeValue" + <el-form-item :label="form.enumSwitch ? '褰撳墠鏋氫妇鍊硷細' : '褰撳墠鍊煎煙锛�'" prop="rangeValue"> + <textarea v-model="form.rangeValue" :readonly="form.enumSwitch" style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;"> </textarea> </el-form-item> @@ -336,7 +336,7 @@ </el-form-item> - <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鏋氫妇鍊硷細'" prop="enumSwitch"> + <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鍊煎煙锛�'" prop="enumSwitch"> <el-select v-if="form.enumSwitch" v-model="form.enumId" placeholder="璇烽�夋嫨鏋氫妇绫诲瀷" @change="enumSelectChange"> <el-option v-for="(item,index) in attributeDataTypePickList" :key="index" :label="item.key" @@ -356,8 +356,8 @@ <el-button size="mini" @click="operationHandler('()')"> () </el-button> </div> </el-form-item> - <el-form-item label="褰撳墠鏋氫妇鍊硷細" prop="rangeValue"> - <textarea v-model="form.rangeValue" + <el-form-item :label="form.enumSwitch ? '褰撳墠鏋氫妇鍊硷細' : '褰撳墠鍊煎煙锛�'" prop="rangeValue"> + <textarea v-model="form.rangeValue" :readonly="form.enumSwitch" style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;"> </textarea> </el-form-item> @@ -365,7 +365,7 @@ <!-- VTDouble --> <div v-if="form.attributeDataType === 'VTDouble'" class="right"> <h3>鍊煎煙</h3> - <el-form-item label="娣诲姞鏋氫妇鍊硷細" prop="enumAddValue"> + <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鍊煎煙锛�'" prop="enumAddValue"> <el-input v-model="form.enumAddValue"> </el-input> </el-form-item> @@ -380,7 +380,7 @@ <el-button size="mini" @click="operationHandler('()')"> () </el-button> </div> </el-form-item> - <el-form-item label="褰撳墠鏋氫妇鍊硷細" prop="rangeValue"> + <el-form-item :label="form.enumSwitch ? '褰撳墠鏋氫妇鍊硷細' : '褰撳墠鍊煎煙锛�'" prop="rangeValue"> <textarea v-model="form.rangeValue" style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;"> </textarea> @@ -458,7 +458,7 @@ append-to-body="true" class="avue-dialog" title="鏌ョ湅浣跨敤鑼冨洿" - width="70%" + width="60%" > <avue-crud ref="checkViewCrud" @@ -479,7 +479,7 @@ getUsedAttributeList, getEnumMapByType, deleteAttributes, - download, + exportAttributes, downloadAttributeTemplate, getBizTypes, getAllLtName, @@ -682,7 +682,13 @@ this.form.attributeDataType === 'VTFilePath'; }, rangeOptionValue() { - return this.form.rangeValue.split('\n') + let values = this.form.rangeValue.split('\n'); + + // 澶勭悊姣忎釜鍊硷紝鍘婚櫎绛夊彿鍓嶇殑閮ㄥ垎锛屽彧淇濈暀绛夊彿鍚庣殑閮ㄥ垎 + return values.map(value => { + let parts = value.split('='); + return parts.length > 1 ? parts[1].trim() : value.trim(); + }); } }, methods: { @@ -907,16 +913,16 @@ enumSelectChange(val) { const list = this.attributeDataTypePickList.find(item => item.key === val).values; this.form.rangeValue = list.join('\n'); - this.form.defaultValue = list[0]; + this.form.defaultValue = this.rangeOptionValue[0]; }, // 浣跨敤鏋氫妇switch婊戝潡change浜嬩欢 switchEnumChange(status) { if (status) { this.form.enumId = this.attributeDataTypePickList[0].key; - this.form.defaultValue = this.attributeDataTypePickList[0].values[0]; const list = this.attributeDataTypePickList[0].values; this.form.rangeValue = list.join('\n'); + this.form.defaultValue = this.rangeOptionValue[0]; } else { this.form.defaultValue = ""; this.form.rangeValue = ""; @@ -1209,7 +1215,7 @@ } addAttribute(this.form).then(res => { if (res.data.code === 200) { - this.$message.success(res.data.msg); + this.$message.success(res.data.obj); this.getTableList(); this.form = form; this.addVisible = false; @@ -1247,7 +1253,7 @@ } let attrNames = this.selectList.map(item => item.id).join(','); - download({attrNames: attrNames}).then(res => { + exportAttributes({attrNames: attrNames}).then(res => { func.downloadFileByBlobHandler(res); this.$message.success('瀵煎嚭鎴愬姛'); }).catch(err => { -- Gitblit v1.9.3