Browse Source

Merge branch 'master' of http://dzgogs.hw.hongweisoft.com/tourism_project/tourism_merchant_ui

# Conflicts:
#	src/views/system/user/index.vue
MONSTER-ygh 11 months ago
parent
commit
a24d9b026f

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

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

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

@@ -397,7 +397,7 @@ export default {
     handleStatusChange(row) {
     handleStatusChange(row) {
       let text = row.status === "0" ? "启用" : "停用";
       let text = row.status === "0" ? "启用" : "停用";
       this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function() {
       this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function() {
-        return changeRoleStatus(row.roleId, row.status);
+        return changeRoleStatus(row.id, row.status);
       }).then(() => {
       }).then(() => {
         this.$modal.msgSuccess(text + "成功");
         this.$modal.msgSuccess(text + "成功");
       }).catch(function() {
       }).catch(function() {

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

@@ -120,7 +120,6 @@
               icon="el-icon-upload2"
               icon="el-icon-upload2"
               size="mini"
               size="mini"
               @click="handleImport"
               @click="handleImport"
-              v-if="false" 
               v-hasPermi="['system:user:import']"
               v-hasPermi="['system:user:import']"
             >导入</el-button>
             >导入</el-button>
           </el-col>
           </el-col>
@@ -185,9 +184,7 @@
                 <el-dropdown-menu slot="dropdown">
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item command="handleResetPwd" icon="el-icon-key"
                   <el-dropdown-item command="handleResetPwd" icon="el-icon-key"
                     v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>
                     v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>
-                  <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"
-                  v-if="false"  
-                  v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>
+
                 </el-dropdown-menu>
                 </el-dropdown-menu>
               </el-dropdown>
               </el-dropdown>
             </template>
             </template>
@@ -430,9 +427,6 @@ export default {
           { required: true, message: "用户名称不能为空", trigger: "blur" },
           { required: true, message: "用户名称不能为空", trigger: "blur" },
           { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
           { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
         ],
         ],
-        name: [
-          { required: true, message: "用户名称不能为空", trigger: "blur" }
-        ],
         nickName: [
         nickName: [
           { required: true, message: "用户昵称不能为空", trigger: "blur" }
           { required: true, message: "用户昵称不能为空", trigger: "blur" }
         ],
         ],
@@ -501,7 +495,7 @@ export default {
     // 用户状态修改
     // 用户状态修改
     handleStatusChange(row) {
     handleStatusChange(row) {
       let text = row.status === "0" ? "启用" : "停用";
       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);
         return changeUserStatus(row.id, row.status);
       }).then(() => {
       }).then(() => {
         this.$modal.msgSuccess(text + "成功");
         this.$modal.msgSuccess(text + "成功");