From fbf4f0990b1f3b4f06a198f47d6513494f690d2c Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 04 十二月 2023 11:50:56 +0800 Subject: [PATCH] 整合代码 --- Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue b/Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue index 44eb04b..a92827c 100644 --- a/Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue +++ b/Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue @@ -116,8 +116,8 @@ </div> </el-footer> <el-dialog :visible.sync="editVisble" append-to-body title="淇敼鍙敤瀛楃" width="40%"> - <el-input v-model="characterValue" size="small"></el-input> - <span slot="footer" class="dialog-footer"> + <el-input v-model="characterValue" size="small"></el-input> + <span slot="footer" class="dialog-footer"> <el-button @click="editVisble = false">鍙� 娑�</el-button> <el-button type="primary" @click="editSaveHandler">纭� 瀹�</el-button> </span> @@ -163,12 +163,12 @@ this.getCodeRule(); }, methods: { - editDialog(){ - if(this.editValueList.length > 1){ + editDialog() { + if (this.editValueList.length > 1) { this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹紒'); return; } - if(this.editValueList.length === 0){ + if (this.editValueList.length === 0) { this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹紒'); return; } @@ -186,9 +186,14 @@ this.characterEditOldValue = row[column.property]; if (this.editValueList.includes(row[column.property])) { this.$message.warning('璇锋鏌ュ瓧绗﹂泦鏄惁鏈夐噸澶嶏紒') + } else if (row[column.property] === undefined || row[column.property] === null) { + this.$message.warning('璇锋鏌ュ瓧绗﹂泦鏄惁鏈夌┖鍊硷紒'); } else { this.editValueList.push(row[column.property]); } + // else if (this.editValueList.some(value => value.trim() === '')) { + // this.$message.warning('璇锋鏌ュ瓧绗﹂泦鏄惁鏈夌┖鍊硷紒'); + // } }, async getCodeRule() { try { @@ -235,14 +240,17 @@ this.$message.warning('璇峰~鍐欒娣诲姞鐨勫�硷紒'); return; // 鍒ゆ柇杈撳叆鍊� } + ; if (this.editValueList.length != 0) { this.$message.warning('璇峰厛鍙栨秷宸查�夋嫨鐨勫�硷紒'); return; // 鍒ゆ柇杈撳叆鍊� } + ; const targetObject = this.characterReleasedList.find(obj => obj.oid === this.select); if (!targetObject) { return; // 鏌ユ壘瀵瑰簲typeText } + ; const codeRuleCharacterVO = { codeRuleId: this.select, chartType: "charset", -- Gitblit v1.9.3