| | |
| | | <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> |
| | |
| | | }, |
| | | // 新增编辑保存 |
| | | 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() { |