Browse Source

角色关联酒店

WIN-B904R0U0NNS\Administrator 2 years ago
parent
commit
ac399576ba

+ 3 - 2
src/utils/excloudHotelIdParamPath/CesRoomLayoutPriceController.js

@@ -2,6 +2,7 @@ export default {
     name: '房价管理模块',
     excloudUrls: [
         '/sys/randomImage',
-        '/rooms/cesRoomBuildingFloor/delete'
+        '/rooms/cesRoomBuildingFloor/delete',
+        '/sys/role/list',
     ]
-}
+}

+ 34 - 27
src/views/system/RoleList.vue

@@ -68,23 +68,25 @@
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
           <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
 
-
-          <a-dropdown>
-            <a class="ant-dropdown-link">
-              更多 <a-icon type="down" />
-            </a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handlePerssion(record.id)">授权</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
+<!--          <a-dropdown>-->
+<!--            <a class="ant-dropdown-link">-->
+<!--              更多 <a-icon type="down" />-->
+<!--            </a>-->
+<!--            <a-menu slot="overlay">-->
+<!--              <a-menu-item>-->
+<!--                <a @click="handlePerssion(record.id)">授权</a>-->
+<!--              </a-menu-item>-->
+<!--              <a-menu-item>-->
+<!--                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
+<!--                  <a>删除</a>-->
+<!--                </a-popconfirm>-->
+<!--              </a-menu-item>-->
+<!--            </a-menu>-->
+<!--          </a-dropdown>-->
         </span>
 
 
@@ -131,15 +133,20 @@
             }
           },
           {
-            title: '角色名称',
+            title: '商家名称',
             align:"center",
-            dataIndex: 'roleName'
+            dataIndex: 'hotelName'
           },
           {
-            title: '角色编码',
+            title: '角色名称',
             align:"center",
-            dataIndex: 'roleCode'
+            dataIndex: 'roleName'
           },
+          // {
+          //   title: '角色编码',
+          //   align:"center",
+          //   dataIndex: 'roleCode'
+          // },
           {
             title: '备注',
             align:"center",
@@ -151,12 +158,12 @@
             align:"center",
             sorter: true
           },
-          {
-            title: '更新时间',
-            dataIndex: 'updateTime',
-            align:"center",
-            sorter: true
-          },
+          // {
+          //   title: '更新时间',
+          //   dataIndex: 'updateTime',
+          //   align:"center",
+          //   sorter: true
+          // },
           {
             title: '操作',
             dataIndex: 'action',
@@ -191,4 +198,4 @@
 </script>
 <style scoped>
   @import '~@assets/less/common.less'
-</style>
+</style>

+ 7 - 1
src/views/system/UserList.vue

@@ -2,10 +2,14 @@
   <a-card style="width: 100%; height: 100%">
     <a-tabs default-active-key="1">
       <a-tab-pane key="1">
+        <span slot="tab"> 角色管理 </span>
+        <role-list></role-list>
+      </a-tab-pane>
+      <a-tab-pane key="2">
         <span slot="tab"> 员工管理 </span>
         <yuangong-list></yuangong-list>
       </a-tab-pane>
-      <a-tab-pane key="2">
+      <a-tab-pane key="3">
         <span slot="tab"> 业主管理 </span>
         <yezhu-list></yezhu-list>
       </a-tab-pane>
@@ -16,8 +20,10 @@
 <script>
 import YuangongList from "./YuangongList.vue";
 import YezhuList from "./YezhuList.vue";
+import RoleList from './RoleList'
 export default {
   components: {
+    RoleList,
     YuangongList,
     YezhuList,
   },

+ 5 - 0
src/views/system/modules/RoleModal.vue

@@ -47,6 +47,8 @@
 <script>
   import {addRole,editRole,duplicateCheck,queryTreeListForRole,queryRolePermission,
     saveRolePermission,saveRoleAndPermission,editRoleAndPermission } from '@/api/api'
+
+  const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
   export default {
     name: "RoleModal",
     data () {
@@ -114,6 +116,9 @@
           if (valid) {
             that.confirmLoading = true;
             let obj;
+            if (hotelInfo && hotelInfo.id){
+              this.model.hotelId = hotelInfo.id;
+            }
             var param = {
               role: this.model,
               permissionJson: {

+ 3 - 3
src/views/system/modules/UserModal.vue

@@ -175,7 +175,7 @@ export default {
       title: "操作",
       visible: false,
       model: {
-       
+
       },
       labelCol: {
         xs: { span: 24 },
@@ -226,7 +226,7 @@ export default {
       this.resetScreenSize();
       that.userId = record.id;
       that.model = Object.assign({}, { selectedroles: '', selecteddeparts: '' }, record);
-      
+
       //身份为上级显示负责部门,否则不显示
       if (this.model.userIdentity == 2) {
         this.departIdShow = true;
@@ -236,7 +236,7 @@ export default {
 
       if (record.hasOwnProperty("id")) {
         that.getUserRoles(record.id);
-        that.getUserDeparts(record.id);
+        // that.getUserDeparts(record.id);
       }
       console.log('that.model=', that.model)
     },