| | |
| | | <el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button> |
| | | <el-button type="text" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button> |
| | | <el-button text type="primary" size="small" @click="table_del(scope.row, scope.$index)">删除</el-button> |
| | | <el-button text type="primary" size="small" @click="addPerson(scope.row, scope.$index)">新增子项</el-button> |
| | | <el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index,'fixed')">新增子项</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | name: "allocation", |
| | | data(){ |
| | | return { |
| | | selection: [], |
| | | applicationList: [], |
| | | searchData: { |
| | | name: "", |
| | |
| | | methods: { |
| | | handleSuccess(formAddMenu) { |
| | | this.searchData.parentId = formAddMenu.parentId; |
| | | this.searchBtn(); |
| | | this.searchClearBtn(); |
| | | }, |
| | | tableLoad(row,treeNode,resolve) { |
| | | this.searchData.parentId= row.id; |
| | |
| | | this.$HTTP.post("/api/blade-system/menu/remove?ids="+row.id).then(res=> { |
| | | if(res.code == 200) { |
| | | that.$message.success("操作成功"); |
| | | that.searchBtn(); |
| | | that.searchclick(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | |
| | | this.$refs.saveDialog.open() |
| | | }) |
| | | }, |
| | | table_edit(row){ |
| | | table_edit(row,index,fixed){ |
| | | this.dialog.save = true |
| | | this.$HTTP.get("/api/blade-system/menu/detail?id="+row.id).then(res=> { |
| | | if(res.code == 200) { |
| | | this.dialog.save = true; |
| | | this.$nextTick(() => { |
| | | if(fixed) { //判断新增子项 |
| | | res.data.fixed = "fixed"; |
| | | } |
| | | this.$refs.saveDialog.open('edit').setData(res.data); |
| | | }) |
| | | } |
| | |
| | | this.$refs.saveDialog.open('show').setData(row) |
| | | }) |
| | | }, |
| | | handleSelectionChange() {}, |
| | | delPerson() {}, |
| | | handleSelectionChange(selection) { |
| | | this.selection = selection; |
| | | }, |
| | | delPerson() { |
| | | if(this.selection.length == 0) { |
| | | this.$message({ |
| | | message: '请选择至少一条数据', |
| | | type: 'warning' |
| | | }); |
| | | return; |
| | | } |
| | | var selStr = ""; |
| | | this.selection.map(item=> { |
| | | selStr += item.id + "," |
| | | }) |
| | | selStr = selStr.replace(/,$/, ''); |
| | | var that = this; |
| | | this.$HTTP.post("/api/blade-system/menu/remove?ids="+selStr).then(res=> { |
| | | if(res.code == 200) { |
| | | that.$message.success("操作成功"); |
| | | that.searchclick(); |
| | | } |
| | | }) |
| | | }, |
| | | changeDepartment() { |
| | | this.departmentVisible = true; |
| | | }, |