From 72fe11177f72ab0c6aa78fa10e374d3c0f2193ee Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 05 十二月 2024 10:33:09 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue | 42 ++++++++++++++++++++++++++++++------------ 1 files changed, 30 insertions(+), 12 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue b/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue index f8c8799..2b0c6fa 100644 --- a/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/authority/ui/dataAuthorization/index.vue @@ -47,10 +47,10 @@ width="70%" @close="addDialogClose"> <div> - <data-view ref="editView" key="editView" :btmNode="nodeRow" :selectRow="selectRow" :actionMap="actionMap" :readOnly="false" :height="clientHeight-340"></data-view> + <data-view ref="editView" key="editView" :btmNode="nodeRow" :selectRow="title === 'add'?{}:selectRow" :actionMap="actionMap" :readOnly="false" :height="clientHeight-260"></data-view> </div> <span slot="footer" class="dialog-footer"> - <el-button size="small" type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button> + <el-button size="small" type="primary" @click="addDialogSavaHandler">淇� 瀛�</el-button> <el-button size="small" @click="addDialogClose">鍙� 娑�</el-button> </span> </el-dialog> @@ -170,9 +170,9 @@ }, getTableList() { getData(this.nodeRow.attributes.name).then(res => { - /*if(typeof res.data == 'string'){ + if(typeof res.data == 'string'){ res.data=eval('('+res.data +')') - }*/ + } if(res.data.obj.tableHeader){ this.option.column=[ { label: '瑙勫垯鍚嶇О', @@ -255,8 +255,8 @@ }, //淇敼 editHandler(){ - if (func.isEmptyObject(this.nodeRow)) { - this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�'); + if (func.isEmptyObject(this.selectRow)) { + this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�'); return; } this.title = 'edit'; @@ -264,13 +264,31 @@ }, // 鏂板缂栬緫淇濆瓨 addDialogSavaHandler() { - saveGrand(this.viewData).then(res => { - if (res.data.code === 200) { - this.$message.success(res.data.obj); + let form=this.$refs.editView.form; + form.users='' + form.userGroups=''; + form.roles='' + this.$refs.editView.authData.forEach(item=>{ + let infos=item.name.split(', '); + infos[0]=infos[0].replace('{','') + if(infos[2]=='user}'){ + form.users+=infos[0]+',' + } + if(infos[2]=='userGroup}'){ + form.userGroups+=infos[0]+',' + } + if(infos[2]=='role}'){ + form.roles+=infos[0]+',' + } + }); + console.log(form) + //saveGrand(this.viewData).then(res => { + //if (res.data.code === 200) { + //this.$message.success(res.data.obj); this.getTableList(); this.addDialogClose(); - } - }) + //} + //}) }, // 鏂板缂栬緫瀵硅瘽妗嗗彇娑� addDialogClose() { @@ -278,7 +296,7 @@ }, //鍒犻櫎 delHandler(){ - if (func.isEmptyObject(this.nodeRow)) { + if (func.isEmptyObject(this.selectRow)) { this.$message.error('璇烽�夋嫨鏁版嵁'); return; } -- Gitblit v1.9.3