| | |
| | | <el-dialog |
| | | v-dialogDrag |
| | | v-loading="statisticsLoading" |
| | | :destroy-on-close="true" |
| | | :visible.sync="statisticsVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 导入角色 --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" @updata="getTableList" title="导入角色"></upload-file> |
| | | <upload-file ref="upload" :tipList="tipList" :fileType="upFileType" :fileUrl="fileUrl" @updata="getTableList" title="导入角色"></upload-file> |
| | | |
| | | </basic-container> |
| | | </template> |
| | |
| | | label: '角色', |
| | | prop: 'pkPersonName', |
| | | sortable: true, |
| | | overHidden: true, |
| | | }, |
| | | ] |
| | | }, |
| | | upFileType: ['xls', 'xlsx'], |
| | | fileUrl: 'api/roleQueryController/importRole', |
| | | tipList:["角色导入只有 名称 和 描述 两列,且名称为必输项不能为空"] |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | |
| | | // 添加 |
| | | rowSaveHandler(row, done) { |
| | | rowSaveHandler(row, done,loading) { |
| | | delete row.roleClassifyText; |
| | | addRole(row).then(res => { |
| | | console.log(res) |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done(); |
| | | } |
| | | }).catch(err =>{ |
| | | console.log(err); |
| | | loading(); |
| | | }) |
| | | done(); |
| | | }, |
| | | |
| | | // 编辑 |
| | | rowUpdateHandler(row, index, done) { |
| | | rowUpdateHandler(row, index, done,loading) { |
| | | delete row.roleClassifyText; |
| | | updateRole(row).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done(); |
| | | } |
| | | }).catch(err => { |
| | | loading(); |
| | | console.log(err); |
| | | }); |
| | | done() |
| | | }, |
| | | |
| | | // 删除 |
| | |
| | | let params = { |
| | | ids: row.oid |
| | | } |
| | | deleteRole(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | } |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }) |
| | | |
| | | this.$confirm('您确定要删除当前角色吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteRole(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 多选删除 |