dukai 3 年之前
父節點
當前提交
73ebd02922
共有 1 個文件被更改,包括 15 次插入4 次删除
  1. 15 4
      src/views/system/role/index.vue

+ 15 - 4
src/views/system/role/index.vue

@@ -376,12 +376,14 @@ export default {
 		},
 		// 功能权限列表
 		getFunctionalAuthority() {
+			this.getList()
 			this.roleLineDbclick(this.objRole)
 			this.headShow = false
 		},
 		// 表头权限;列表
 		getHeaderPermission() {
 			this.functionalLineDbclick(this.objFun)
+			this.getList()
 		},
 		/** 查询角色列表 */
 		getList() {
@@ -842,13 +844,22 @@ export default {
 		handleDelete(row) {
 			const roleIds = row.roleId || this.ids
 			this.$modal
-				.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?')
+				.confirm('是否确认删除角色为"' + row.roleName + '"的数据项?')
 				.then(function () {
 					return delRole(roleIds)
 				})
-				.then(() => {
-					this.getList()
-					this.$modal.msgSuccess('删除成功')
+				.then((res) => {
+					if (res.code === 200) {
+						this.getList()
+						this.$modal.msgSuccess('删除成功')
+					}else if (res.code === 500) {
+						this.getList()
+						this.$notify({
+							title: '警告',
+							message: res.msg,
+							type: 'warning'
+						});
+					}
 				})
 				.catch(() => {})
 		},