From 83aa382fd3b88ec7a564f14d41a9c8e5d43beeb3 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 09 十二月 2024 10:26:31 +0800 Subject: [PATCH] 修改表单定义样式&&修改ui上下文btmName&&添加登录密码即将过期进入首页并提醒 --- Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue | 55 +++++++++++++++++++++++++++++++------------------------ 1 files changed, 31 insertions(+), 24 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue index 26cf5bf..f67bc3d 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/components/formDialog.vue @@ -35,7 +35,7 @@ <span style="display: flex;align-items: center; margin-right: 5px;"> <p class="tableTopLabel">鏌ヨ妯℃澘鍚嶇О锛�</p> - <el-select v-model="form.itemQtName" placeholder="璇烽�夋嫨鏌ヨ妯℃澘" size="mini"> + <el-select v-model="topForm.itemQtName" placeholder="璇烽�夋嫨鏌ヨ妯℃澘" size="mini"> <el-option v-for="(item,index) in searchQtNameList" :key="index" :label="item.qtName" :value="item.qtName"></el-option> </el-select> @@ -613,7 +613,8 @@ :show-header="false" border stripe - style="width: 100%"> + style="width: 100%" + @row-click="customOptionTableClick"> <el-table-column align="center" label="鍚嶇О" @@ -636,7 +637,9 @@ <el-button plain size="mini" style="margin-right: 5px" type="success" @click="optionAddClickHandler('dialog')">娣诲姞 </el-button> - <el-button plain size="mini" style="margin-left: 5px" type="danger">鍒犻櫎</el-button> + <el-button plain size="mini" style="margin-left: 5px" type="danger" + @click="optionDeleteClickHandler('dialog')">鍒犻櫎 + </el-button> </div> </el-form-item> </el-col> @@ -849,7 +852,6 @@ children: 'childNodes', }, treeLoad: (node, resolve) => { - // console.log(node); const params = { 'conditionMap[dataType]': node.data.data, 'conditionMap[parentId]': node.data.data, @@ -1050,7 +1052,11 @@ children: 'children', }, }, - treeData: [] + treeData: [], + optionRow: {}, + customOptionRow: {}, + optionCurrentIndex: 0, + customOptionCurrentIndex: 0 } }, computed: { @@ -1058,7 +1064,6 @@ const types = ['radio', 'checkbox', 'select']; return types.includes(this.form.itemType); // 灞曠ず }, - itemStyleTypeStatus() { const types = ['hidden', 'webeditor', 'radio', 'checkbox']; return !types.includes(this.form.itemType); // 涓嶅睍绀� @@ -1117,10 +1122,9 @@ itemType: 'text', itemName: data.data.name, itemCols: "1", - itemIsEditable:"0", - itemIsRequired:"0", + itemIsEditable: "0", + itemIsRequired: "0", } - console.log(data); const isDuplicate = this.formList.some(item => item.text === data.text); if (isDuplicate) { @@ -1137,7 +1141,6 @@ this.form = {...item}; this.topForm.position = index += 1; // this.$forceUpdate(); - console.log(this.form); }, // 璁剧疆鏄剧ず琛屾暟 @@ -1239,7 +1242,11 @@ // 閫夐」琛ㄦ牸琛岀偣鍑� optionTableClick(row) { - console.log(row); + this.optionRow = row; + }, + + customOptionTableClick(row) { + this.customOptionRow = row; }, // 閫夐」娣诲姞 @@ -1270,15 +1277,20 @@ const params = { key: optionObj.optionName, - value: optionObj.optionValue + value: optionObj.optionValue, + index: val === 'dialog' ? this.customOptionCurrentIndex++ : this.optionCurrentIndex++ }; itemKeyValueList.push(params); }, // 閫夐」鍒犻櫎 - optionDeleteClickHandler() { - + optionDeleteClickHandler(val) { + if (val === 'dialog') { + this.customForm.itemKeyValueList.splice(this.customOptionRow.index,1); + } else { + this.form.itemKeyValueList.splice(this.optionRow.index,1); + } }, // 娣诲姞鑷畾涔夌粍浠� @@ -1299,7 +1311,7 @@ this.formList = this.formList.map(item => { return { ...item, - itemField: item.text // 灏唅temField璧嬪�间负text锛屽洜涓哄繕璁扮埗缁勪欢涓轰粈涔堝湪缂栬緫鍥炲~鏃舵妸itemField璧嬪�间负text浜� + itemField: item.text // 灏唅temField閲嶆柊璧嬪�间负text锛屽洜涓哄繕璁板綋鏃跺湪鐖剁粍浠剁紪杈戝洖濉柟娉曢噷涓轰粈涔堟妸itemField璧嬪�间负text浜� }; }); const params = { @@ -1311,7 +1323,7 @@ viType: 1, // 瑙嗗浘绫诲瀷 viTypeText: "琛ㄥ崟", // 瑙嗗浘涓枃鍚嶇О prm: { - formQtName: this.form.qtName, // 鏌ヨ妯℃澘鍚嶇О + formQtName: this.topForm.itemQtName, // 鏌ヨ妯℃澘鍚嶇О showCols: this.topForm.showColumn, prmItemList: this.formList }, @@ -1411,7 +1423,6 @@ this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹繘琛屼繚瀛�'); return; } - // console.log(this.customAttrRow) this.customForm.text = this.customAttrRow.id; this.customAttrVisible = false; }, @@ -1423,11 +1434,9 @@ return; } - this.formList = this.formList.map(item => item.text === this.form.text ? this.form : item ); - console.log(this.formList); this.$message.success('搴旂敤鎴愬姛'); }, @@ -1485,13 +1494,11 @@ return `${key}=${oids.join(',')}`; // 鐢� , 杩炴帴鍚屼竴绫诲瀷鐨� oid }).join('&&'); // 鏈�鍚庣敤 && 杩炴帴涓嶅悓绫诲瀷 - // console.log(resultString); if (this.authType === 'attr') { this.customForm.itemRight = resultString; } else { this.form.itemRight = resultString; } - // this.form.itemRight = resultString; this.authDialogClose(); } @@ -1533,8 +1540,8 @@ font-size: 14px } -.formItemMargin { - margin: 10px 0 10px 0; -} +//.formItemMargin { +// margin: 10px 0 10px 0; +//} </style> -- Gitblit v1.9.3