Browse Source

系统功能

aleyds 11 months ago
parent
commit
c22ba682c2

+ 1 - 1
src/api/system/role.js

@@ -47,7 +47,7 @@ export function dataScope(data) {
 // 角色状态修改
 export function changeRoleStatus(roleId, status) {
   const data = {
-    roleId,
+    id,
     status
   }
   return request({

+ 2 - 2
src/api/system/user.js

@@ -58,9 +58,9 @@ export function resetUserPwd(userId, password) {
 }
 
 // 用户状态修改
-export function changeUserStatus(userId, status) {
+export function changeUserStatus(id, status) {
   const data = {
-    userId,
+    id,
     status
   }
   return request({

+ 1 - 1
src/views/system/role/index.vue

@@ -397,7 +397,7 @@ 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() {

+ 2 - 3
src/views/system/user/index.vue

@@ -184,8 +184,7 @@
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item command="handleResetPwd" icon="el-icon-key"
                     v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>
-                  <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"
-                    v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>
+
                 </el-dropdown-menu>
               </el-dropdown>
             </template>
@@ -496,7 +495,7 @@ export default {
     // 用户状态修改
     handleStatusChange(row) {
       let text = row.status === "0" ? "启用" : "停用";
-      this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
+      this.$modal.confirm('确认要"' + text + '""' + row.name + '"用户吗?').then(function() {
         return changeUserStatus(row.id, row.status);
       }).then(() => {
         this.$modal.msgSuccess(text + "成功");