|
|
@@ -119,7 +119,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
- <template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
|
|
+ <template slot-scope="scope" v-if="scope.row.id !== 1">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@@ -397,10 +397,12 @@ export default {
|
|
|
handleStatusChange(row) {
|
|
|
let text = row.status === "0" ? "启用" : "停用";
|
|
|
this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function() {
|
|
|
- return changeRoleStatus(row.roleId, row.status);
|
|
|
+ return changeRoleStatus(row.id, row.status);
|
|
|
}).then(() => {
|
|
|
+
|
|
|
this.$modal.msgSuccess(text + "成功");
|
|
|
}).catch(function() {
|
|
|
+
|
|
|
row.status = row.status === "0" ? "1" : "0";
|
|
|
});
|
|
|
},
|
|
|
@@ -507,9 +509,9 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- const roleId = row.roleId || this.ids
|
|
|
- const roleMenu = this.getRoleMenuTreeselect(roleId);
|
|
|
- getRole(roleId).then(response => {
|
|
|
+ const id = row.id || this.ids
|
|
|
+ const roleMenu = this.getRoleMenuTreeselect(Number(id));
|
|
|
+ getRole(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.$nextTick(() => {
|
|
|
@@ -555,7 +557,7 @@ export default {
|
|
|
submitForm: function() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- if (this.form.roleId != undefined) {
|
|
|
+ if (this.form.id != undefined) {
|
|
|
this.form.menuIds = this.getMenuAllCheckedKeys();
|
|
|
updateRole(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|