Browse Source

完成消息通知接口的所有功能,房态管理的数据的渲染

hzj18279462576@163.com 3 years ago
parent
commit
2bfe369e01

+ 5 - 3
admin/src/api/api.js

@@ -2,10 +2,11 @@
 import * as doorLock from './doorLock'
 import * as doorLock from './doorLock'
 import * as fileServes from './fileServes'
 import * as fileServes from './fileServes'
 import * as hotelOrder from './hotelOrder'
 import * as hotelOrder from './hotelOrder'
-import * as hotelStaff from './hotelStaff'
+import * as hotelAdmin from './hotelAdmin'
 import * as houseType from './houseType'
 import * as houseType from './houseType'
 import * as normalUser from './normalUser'
 import * as normalUser from './normalUser'
 import * as room from './room'
 import * as room from './room'
+import * as roomRealTimeStatu from './roomRealTimeStatu'
 import * as systemnotice from './systemnotice'
 import * as systemnotice from './systemnotice'
 import * as systemSetup from './systemSetup'
 import * as systemSetup from './systemSetup'
 // 
 // 
@@ -38,12 +39,13 @@ export default {
     doorLock,      // 门锁
     doorLock,      // 门锁
     fileServes,    // 文件服务
     fileServes,    // 文件服务
     hotelOrder,    // 酒店订单
     hotelOrder,    // 酒店订单
-    hotelStaff,    // 酒店员工
+    hotelAdmin,    // 酒店员工
     houseType,     // 房型
     houseType,     // 房型
     normalUser,    // 普通用户
     normalUser,    // 普通用户
     room,          // 房间
     room,          // 房间
     systemnotice,  // 系统通知
     systemnotice,  // 系统通知
-    systemSetup    // 系统设置
+    systemSetup,    // 系统设置
+    roomRealTimeStatu  // 实时房态
 };
 };
 
 
 
 

+ 6 - 6
admin/src/api/hotelStaff.js

@@ -1,27 +1,27 @@
 import http from '../utils/http'
 import http from '../utils/http'
-let resquest = "/api/ihotel/hotelStaff"
+let resquest = "/api/ihotel/hotelAdmin"
 
 
 // 管理员登录
 // 管理员登录
-export function hotelStaffLogin(params) {
+export function hotelAdminLogin(params) {
     return http.post(`${resquest}/login`, params)
     return http.post(`${resquest}/login`, params)
 }
 }
 
 
 // 管理员列表
 // 管理员列表
-export function hotelStaffList(params) {
+export function hotelAdminList(params) {
     return http.get(`${resquest}/list`, params)
     return http.get(`${resquest}/list`, params)
 }
 }
 
 
 // 新增管理员
 // 新增管理员
-export function hotelStaffAdd(params) {
+export function hotelAdminAdd(params) {
     return http.post(`${resquest}/add`, params)
     return http.post(`${resquest}/add`, params)
 }
 }
 
 
 // 修改管理员
 // 修改管理员
-export function hotelStaffUpdate(params) {
+export function hotelAdminUpdate(params) {
     return http.put(`${resquest}/update`, params)
     return http.put(`${resquest}/update`, params)
 }
 }
 
 
 // 删除管理员
 // 删除管理员
-export function hotelStaffDelete(params) {
+export function hotelAdminDelete(params) {
     return http.delete(`${resquest}/delete`, params)
     return http.delete(`${resquest}/delete`, params)
 }
 }

+ 8 - 0
admin/src/api/roomRealTimeStatu.js

@@ -0,0 +1,8 @@
+import http from '../utils/http'
+let resquest = "/api/ihotel/roomRealTimeStatu"
+
+//  房态信息
+export function realData(params) {
+    console.log(params);
+    return http.get(`${resquest}/realData`, params)
+}

+ 1 - 1
admin/src/api/systemnotice.js

@@ -1,5 +1,5 @@
 import http from '../utils/http'
 import http from '../utils/http'
-let resquest = "/api/ihotel/ihotel/systemnotice"
+let resquest = "/api/ihotel/systemNotice"
 
 
 // 通知列表
 // 通知列表
 export function systemnoticeList(params) {
 export function systemnoticeList(params) {

+ 1 - 1
admin/src/store/modules/user.js

@@ -39,7 +39,7 @@ const actions = {
     login({ commit }, userInfo) {
     login({ commit }, userInfo) {
         const { username, password } = userInfo
         const { username, password } = userInfo
         return new Promise((resolve, reject) => {
         return new Promise((resolve, reject) => {
-            api.hotelStaff.hotelStaffLogin({ username: username.trim(), password: password })
+            api.hotelAdmin.hotelAdminLogin({ username: username.trim(), password: password })
                 .then((response) => {
                 .then((response) => {
                     console.log(response);
                     console.log(response);
                     const { data } = response
                     const { data } = response

+ 12 - 3
admin/src/utils/http.js

@@ -14,7 +14,10 @@ const http = {
             url: url,
             url: url,
             headers: ContentType ? ContentType : { 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' }
             headers: ContentType ? ContentType : { 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' }
         }
         }
-        if (params) config.params = params
+        // if (params) {
+        //     config.params = params
+        // }
+
         return request(config)
         return request(config)
     },
     },
     post(url, params, ContentType) {
     post(url, params, ContentType) {
@@ -36,7 +39,10 @@ const http = {
                 'Content-Type': 'application/json; charset=utf-8'
                 'Content-Type': 'application/json; charset=utf-8'
             }
             }
         }
         }
-        if (params) config.params = params
+        if (params) {
+            // config.params = params
+            config.data = params
+        }
         return request(config)
         return request(config)
     },
     },
     delete(url, params, ContentType) {
     delete(url, params, ContentType) {
@@ -47,7 +53,10 @@ const http = {
                 'Content-Type': 'application/json; charset=utf-8'
                 'Content-Type': 'application/json; charset=utf-8'
             }
             }
         }
         }
-        if (params) config.params = params
+        if (params) {
+            // config.params = params
+            config.data = params
+        }
         return request(config)
         return request(config)
     }
     }
 }
 }

+ 3 - 1
admin/src/utils/request.js

@@ -22,9 +22,11 @@ service.interceptors.request.use(config => {
     //如有需要:注意使用token的时候需要引入cookie方法或者用本地localStorage等方法,推荐js-cookie
     //如有需要:注意使用token的时候需要引入cookie方法或者用本地localStorage等方法,推荐js-cookie
     const token = Cookies.get('cook');//这里取token之前,你肯定需要先拿到token,存一下
     const token = Cookies.get('cook');//这里取token之前,你肯定需要先拿到token,存一下
     if (token) {
     if (token) {
-        config.params = { 'admin_token': token } //如果要求携带在参数中
+        // config.params = { 'admin_token': token } //如果要求携带在参数中
         config.headers['admin_token'] = token; //如果要求携带在请求头中
         config.headers['admin_token'] = token; //如果要求携带在请求头中
+        config.headers['admin-token'] = token; //如果要求携带在请求头中
     }
     }
+
     return config
     return config
 }, error => {
 }, error => {
     Promise.reject(error)
     Promise.reject(error)

+ 67 - 610
admin/src/views/home/index.vue

@@ -119,11 +119,15 @@
       <div class="room-floor wrapper">
       <div class="room-floor wrapper">
         <div class="floor" v-for="(items, i) in floorRoomDatas" :key="i">
         <div class="floor" v-for="(items, i) in floorRoomDatas" :key="i">
           <div class="header-title">
           <div class="header-title">
-            <div class="tier">{{ i + 1 }}层</div>
-            <span>/&nbsp; 共{{ items.length }}间</span>
+            <div class="tier">{{ parseInt(items.floor) }}层</div>
+            <span>/&nbsp; 共{{ items.room.length }}间</span>
           </div>
           </div>
           <div class="main-floor">
           <div class="main-floor">
-            <div class="room-num" v-for="(item, ind) in items" :key="ind">
+            <div
+              class="room-num"
+              v-for="(item, ind) in items.room"
+              :key="item.id"
+            >
               <el-popover
               <el-popover
                 placement="right"
                 placement="right"
                 trigger="click"
                 trigger="click"
@@ -146,18 +150,18 @@
                   slot="reference"
                   slot="reference"
                 >
                 >
                   <div class="title">
                   <div class="title">
-                    <span>{{ item.roomUnit }}</span>
+                    <span>{{ item.build }}栋{{ item.roomno }}</span>
                     <div class="state" :style="bgState(item.state)">
                     <div class="state" :style="bgState(item.state)">
-                      {{ item.state }}
+                      {{ item.roomTypeName }}
                     </div>
                     </div>
                   </div>
                   </div>
-                  <div class="teacher">{{ item.name }}</div>
+                  <div class="teacher">老师</div>
                   <div class="num">
                   <div class="num">
-                    <span>水:{{ item.water }}吨</span>&nbsp;&nbsp;
-                    <span>电:{{ item.electricity }}度</span>
+                    <span>水:22吨</span>&nbsp;&nbsp;
+                    <span>电:22度</span>
                   </div>
                   </div>
                   <div class="count-down">
                   <div class="count-down">
-                    <span>退房倒计时:{{ item.outRoom }}</span>
+                    <span>退房倒计时:1220</span>
                     <div class="tuifang" @click.stop="doorLock = true">
                     <div class="tuifang" @click.stop="doorLock = true">
                       <IconSvg :W="21" :H="21" name="tuifang" />
                       <IconSvg :W="21" :H="21" name="tuifang" />
                       <el-dialog
                       <el-dialog
@@ -167,17 +171,15 @@
                         :before-close="lockClose"
                         :before-close="lockClose"
                       >
                       >
                         <div class="text" style="margin-top: 13px">
                         <div class="text" style="margin-top: 13px">
-                          <span>门锁ID:{{ item.roomLock.id }}</span>
+                          <span>门锁ID:1111111</span>
                           <IconSvg :W="16" :H="16" name="edit" />
                           <IconSvg :W="16" :H="16" name="edit" />
                         </div>
                         </div>
                         <div class="text">
                         <div class="text">
-                          <span
-                            >门锁序列号:{{ item.roomLock.serialNumber }}</span
-                          >
+                          <span>门锁序列号:111111</span>
                           <IconSvg :W="16" :H="16" name="edit" />
                           <IconSvg :W="16" :H="16" name="edit" />
                         </div>
                         </div>
                         <div class="text">
                         <div class="text">
-                          <span>门锁密码:{{ item.roomLock.password }}</span>
+                          <span>门锁密码:1111111</span>
 
 
                           <span class="password" @click="sending"
                           <span class="password" @click="sending"
                             >下发密码</span
                             >下发密码</span
@@ -258,6 +260,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import moment from "moment";
 export default {
 export default {
   name: "Home",
   name: "Home",
   data() {
   data() {
@@ -268,6 +271,7 @@ export default {
       // 批量数据
       // 批量数据
       dialogVisible: false,
       dialogVisible: false,
       count: 20,
       count: 20,
+      roomno: "", // 房间号
       title: "",
       title: "",
       checked: true,
       checked: true,
       titles: ["批量开电", "批量开水", "批量关电", "批量关水"],
       titles: ["批量开电", "批量开水", "批量关电", "批量关水"],
@@ -324,599 +328,21 @@ export default {
         },
         },
       ],
       ],
       floorRoomDatas: [
       floorRoomDatas: [
-        [
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25",
-            electricity: "25",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已入住",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "保留房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "空闲",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已入住",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-        ],
-        [
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已入住",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "保留房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "空闲",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已入住",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "空闲",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-        ],
-        [
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已入住",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "保留房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "空闲",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已入住",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "空闲",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-        ],
-        [
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已入住",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "保留房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "空闲",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已入住",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "空闲",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "脏房",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-          {
-            roomUnit: "17栋1单元2层01房",
-            state: "已锁定",
-            name: "张强",
-            water: "25吨",
-            electricity: "25度",
-            outRoom: "00:13:26",
-            roomLock: {
-              id: "123456789",
-              serialNumber: "123456789",
-              password: "123456789",
-            },
-          },
-        ],
+        // [
+        //   {
+        //     roomUnit: "17栋1单元2层01房",
+        //     state: "已锁定",
+        //     name: "张强",
+        //     water: "25",
+        //     electricity: "25",
+        //     outRoom: "00:13:26",
+        //     roomLock: {
+        //       id: "123456789",
+        //       serialNumber: "123456789",
+        //       password: "123456789",
+        //     },
+        //   },
+        // ],
       ],
       ],
 
 
       defaultProps: {
       defaultProps: {
@@ -965,7 +391,6 @@ export default {
       isIndeterminate: true,
       isIndeterminate: true,
     };
     };
   },
   },
-  computed: {},
   mounted() {
   mounted() {
     document.getElementsByClassName(
     document.getElementsByClassName(
       "el-button--plain"
       "el-button--plain"
@@ -976,6 +401,38 @@ export default {
     document.getElementsByClassName(
     document.getElementsByClassName(
       "el-button--plain"
       "el-button--plain"
     )[2].children[0].innerText = ">";
     )[2].children[0].innerText = ">";
+
+    this.API.room.roomPageGroup().then((res) => {
+      res.data.list.forEach((item) => {
+        this.floorRoomDatas.push(item.floors[0]);
+      });
+      this.floorRoomDatas.forEach((item) => {
+        item.room.forEach((items) => {
+          items.roomno =
+            items.roomNo.split("-")[0] +
+            "单元" +
+            items.roomNo.split("-")[1] +
+            "层" +
+            items.roomNo.split("-")[2] +
+            "房";
+        });
+      });
+      let roomIds = [];
+      this.floorRoomDatas.forEach((item) => {
+        console.log(item.room);
+        item.room.forEach((item) => {
+          roomIds.push(item.id);
+        });
+      });
+      console.log(roomIds);
+      let startDay = moment().format("YYYY-MM-dd");
+      let endDay = moment(startDay).add(1, "days").format("YYYY-MM-dd");
+      this.API.roomRealTimeStatu
+        .realData({ startDay, endDay, roomIds })
+        .then((res) => {
+          console.log(res);
+        });
+    });
   },
   },
   methods: {
   methods: {
     bgState(e) {
     bgState(e) {
@@ -1213,7 +670,7 @@ export default {
                   color: #fff;
                   color: #fff;
                   text-align: center;
                   text-align: center;
                   line-height: 17px;
                   line-height: 17px;
-                  margin-left: 15px;
+                  margin-left: 7px;
                   background: rgba(41, 109, 227, 1);
                   background: rgba(41, 109, 227, 1);
                 }
                 }
               }
               }
@@ -1227,7 +684,7 @@ export default {
                 margin-left: 15px;
                 margin-left: 15px;
                 display: flex;
                 display: flex;
                 span {
                 span {
-                  margin-right: 60px;
+                  margin-right: 84px;
                 }
                 }
                 .tuifang {
                 .tuifang {
                   width: 21px;
                   width: 21px;

+ 103 - 421
admin/src/views/inform/index.vue

@@ -4,10 +4,10 @@
       <div slot="header" class="clearfix">
       <div slot="header" class="clearfix">
         <div class="inform-title">消息通知</div>
         <div class="inform-title">消息通知</div>
         <div class="inform-header">
         <div class="inform-header">
-          <el-input placeholder="请输入时间">
+          <el-input placeholder="请输入时间" v-model="inquireValue">
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
           </el-input>
           </el-input>
-          <el-button type="primary">查询</el-button>
+          <el-button type="primary" @click="inquire">查询</el-button>
         </div>
         </div>
       </div>
       </div>
       <div class="inform-body">
       <div class="inform-body">
@@ -15,15 +15,17 @@
           <div class="left">
           <div class="left">
             <el-button
             <el-button
               size="small"
               size="small"
-              @click="allRead($event, index)"
-              v-for="(item, index) in read"
+              @click="read($event, index)"
+              v-for="(item, index) in reads"
               :key="item"
               :key="item"
               :class="className[index]"
               :class="className[index]"
               >{{ item }}</el-button
               >{{ item }}</el-button
             >
             >
           </div>
           </div>
           <div class="right">
           <div class="right">
-            <el-button type="primary" size="small">一键已读</el-button>
+            <el-button type="primary" size="small" @click="allRead"
+              >一键已读</el-button
+            >
           </div>
           </div>
         </div>
         </div>
         <div class="inform-table">
         <div class="inform-table">
@@ -33,6 +35,7 @@
             height="576"
             height="576"
             style="width: 1550px"
             style="width: 1550px"
             stripe
             stripe
+            :row-click="rowClick"
             :cell-style="rowbg"
             :cell-style="rowbg"
             :header-cell-style="{
             :header-cell-style="{
               color: ' rgba(0, 0, 0, 1)',
               color: ' rgba(0, 0, 0, 1)',
@@ -40,27 +43,47 @@
             }"
             }"
           >
           >
             <el-table-column
             <el-table-column
-              prop="date"
+              prop="title"
               label="标题"
               label="标题"
               width="300"
               width="300"
               align="center"
               align="center"
             >
             >
               <template slot-scope="scope">
               <template slot-scope="scope">
-                <span class="yuan"></span>
-                <span style="margin-left: 10px">{{ scope.row.date }}</span>
+                <span
+                  class="yuan"
+                  v-show="scope.row.readFlag == 0 ? true : false"
+                ></span>
+                <span style="margin-left: 10px">{{ scope.row.title }}</span>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
 
 
-            <el-table-column prop="name" align="center" label="消息">
+            <el-table-column prop="content" align="center" label="消息">
             </el-table-column>
             </el-table-column>
 
 
             <el-table-column
             <el-table-column
-              prop="address"
+              prop="createTime"
               align="center"
               align="center"
               label="时间"
               label="时间"
               width="400"
               width="400"
             >
             >
             </el-table-column>
             </el-table-column>
+            <el-table-column
+              prop="address"
+              align="center"
+              label="操作"
+              width="150"
+            >
+              <template slot-scope="scope">
+                <span
+                  @click="handleDelete(scope.$index, scope.row)"
+                  class="operate"
+                  style="color: #296de3; cursor: pointer"
+                  v-show="scope.row.readFlag == 0 ? false : true"
+                >
+                  删除
+                </span>
+              </template>
+            </el-table-column>
           </el-table>
           </el-table>
         </div>
         </div>
         <div class="block">
         <div class="block">
@@ -70,7 +93,7 @@
             current-page.sync="1"
             current-page.sync="1"
             :page-size="8"
             :page-size="8"
             layout="prev, pager, next, jumper"
             layout="prev, pager, next, jumper"
-            :total="tableData.length"
+            :total="Data.length"
           >
           >
           </el-pagination>
           </el-pagination>
         </div>
         </div>
@@ -84,426 +107,71 @@ export default {
   name: "Inform",
   name: "Inform",
   data() {
   data() {
     return {
     return {
-      read: ["全部", "未读", "已读"],
+      reads: ["全部", "未读", "已读"],
       className: ["active", "", ""],
       className: ["active", "", ""],
-      data: [],
-      tableData: [
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.07.03 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.07.02 08:55:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.07.01 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 09:50:50",
-        },
-
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 10:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:55:50",
-        },
-
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 18:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.29 08:50:50",
-        },
-
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.28 18:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-        {
-          date: "续住通知",
-          name: "王小虎",
-          address: "2022.06.30 08:50:50",
-        },
-      ],
+      inquireValue: "",
+      data: [], // 当前页面显示的数据
+      Data: [], // 分页器显示的总数据
+      tableData: [], // 请求的总数据
     };
     };
   },
   },
   mounted() {
   mounted() {
     document.getElementsByClassName(
     document.getElementsByClassName(
       "el-pagination__jump"
       "el-pagination__jump"
     )[0].childNodes[0].nodeValue = "跳转到";
     )[0].childNodes[0].nodeValue = "跳转到";
-    this.handleCurrentChange(1);
+    this.dataList();
   },
   },
   methods: {
   methods: {
-    allRead($event, index) {
+    dataList() {
+      this.API.systemnotice.systemnoticeList().then((res) => {
+        console.log(res.data.list);
+        this.tableData = res.data.list;
+        this.tableData.forEach((item) => {
+          item.createTime = item.createTime.replace("T", " ");
+        });
+        this.Data = this.tableData;
+        this.handleCurrentChange(1);
+      });
+    },
+    // 查询
+    inquire() {
+      console.log(111);
+      this.Data = this.Data.filter((item, index) => {
+        return item.createTime.includes(this.inquireValue);
+      });
+      this.handleCurrentChange(1);
+    },
+    // 已读未读
+    read($event, index) {
       this.className = this.className.map((item) => (item = ""));
       this.className = this.className.map((item) => (item = ""));
       this.className[index] = "active";
       this.className[index] = "active";
+
+      if ($event.target.innerText == "全部") {
+        this.Data = this.tableData;
+      } else if ($event.target.innerText == "已读") {
+        this.Data = this.tableData.filter((item) => {
+          return item.readFlag == 1;
+        });
+      } else if ($event.target.innerText == "未读") {
+        this.Data = this.tableData.filter((item) => {
+          return item.readFlag == 0;
+        });
+      }
+      this.handleCurrentChange(1);
+    },
+    // 一键已读
+    allRead() {
+      let ids = [];
+      this.tableData.forEach((item) => {
+        if (item.readFlag == 0) {
+          ids.push(item.id);
+          console.log(item);
+        }
+      });
+      this.API.systemnotice.systemnoticeRead([ids]).then((res) => {
+        console.log(res);
+        this.dataList();
+      });
     },
     },
     rowbg(row) {
     rowbg(row) {
       if (row.rowIndex % 2 != 0) {
       if (row.rowIndex % 2 != 0) {
@@ -512,9 +180,23 @@ export default {
     },
     },
 
 
     handleCurrentChange(val) {
     handleCurrentChange(val) {
-      this.data = this.tableData.slice((val - 1) * 8, val * 8);
+      this.data = this.Data.slice((val - 1) * 8, val * 8);
       // console.log(`当前页: ${val}`);
       // console.log(`当前页: ${val}`);
     },
     },
+
+    rowClick(row, column, event) {
+      console.log(1111);
+      console.log(row, column, event);
+    },
+    //删除通知
+    handleDelete(index, row) {
+      let ids = [row.id];
+      console.log(ids);
+      this.API.systemnotice.systemnoticeDelete(ids).then((res) => {
+        console.log(res);
+      });
+      this.dataList();
+    },
   },
   },
 };
 };
 </script>
 </script>

+ 30 - 15
admin/src/views/staff/index.vue

@@ -168,23 +168,23 @@ export default {
       options: [
       options: [
         {
         {
           value: "选项1",
           value: "选项1",
-          label: "歌星1",
+          label: "测试部门",
         },
         },
         {
         {
           value: "选项2",
           value: "选项2",
-          label: "歌星2",
+          label: "软件部",
         },
         },
         {
         {
           value: "选项3",
           value: "选项3",
-          label: "歌星3",
+          label: "测试部门",
         },
         },
         {
         {
           value: "选项4",
           value: "选项4",
-          label: "歌星4",
+          label: "测试部门",
         },
         },
         {
         {
           value: "选项5",
           value: "选项5",
-          label: "歌星5",
+          label: "测试部门",
         },
         },
       ],
       ],
       currentPage: 1,
       currentPage: 1,
@@ -215,14 +215,17 @@ export default {
     document.getElementsByClassName(
     document.getElementsByClassName(
       "el-pagination__jump"
       "el-pagination__jump"
     )[0].childNodes[0].nodeValue = "跳转到";
     )[0].childNodes[0].nodeValue = "跳转到";
-    let cook = Cookies.get("cook");
-    this.API.hotelStaff.hotelStaffList(cook).then((res) => {
-      this.data = res.data.list;
-      this.datas = JSON.parse(JSON.stringify(this.data));
-      this.handleCurrentChange(this.currentPage);
-    });
+    this.hotelList();
   },
   },
   methods: {
   methods: {
+    hotelList() {
+      let cook = Cookies.get("cook");
+      this.API.hotelAdmin.hotelAdminList(cook).then((res) => {
+        this.data = res.data.list;
+        this.datas = JSON.parse(JSON.stringify(this.data));
+        this.handleCurrentChange(this.currentPage);
+      });
+    },
     allRead($event, index) {
     allRead($event, index) {
       this.className = this.className.map((item) => (item = ""));
       this.className = this.className.map((item) => (item = ""));
       this.className[index] = "active";
       this.className[index] = "active";
@@ -324,12 +327,16 @@ export default {
             phone: this.phoneValue,
             phone: this.phoneValue,
             username: this.staffValue,
             username: this.staffValue,
             position: this.position,
             position: this.position,
-            cardNumber: "1nqc87",
+            cardNumber: "16qc87",
             password: rsa.RSAencrypt("abc1234"),
             password: rsa.RSAencrypt("abc1234"),
             statu: "1",
             statu: "1",
           };
           };
           // console.log(this.position);
           // console.log(this.position);
-          this.API.hotelStaff.hotelStaffAdd(arr);
+
+          this.API.hotelAdmin.hotelStaffAdd(arr).then((res) => {
+            console.log(res);
+          });
+          this.hotelList();
           this.data = this.datas;
           this.data = this.datas;
           this.currentPage = Math.ceil(this.data.length / 8);
           this.currentPage = Math.ceil(this.data.length / 8);
           this.handleCurrentChange(this.currentPage);
           this.handleCurrentChange(this.currentPage);
@@ -361,12 +368,13 @@ export default {
       this.position = "";
       this.position = "";
     },
     },
     handleEdit(index, row) {
     handleEdit(index, row) {
-      // console.log(row);
+      console.log(row);
       this.editShow = true;
       this.editShow = true;
       this.phoneValue = row.phone;
       this.phoneValue = row.phone;
       this.phoneVal = row.phone;
       this.phoneVal = row.phone;
       this.staffValue = row.username;
       this.staffValue = row.username;
       this.position = row.position;
       this.position = row.position;
+      console.log(this.phoneValue);
     },
     },
     editSuccess() {
     editSuccess() {
       let reg_tel =
       let reg_tel =
@@ -398,8 +406,15 @@ export default {
             phone: this.phoneValue,
             phone: this.phoneValue,
             username: this.staffValue,
             username: this.staffValue,
             position: this.position,
             position: this.position,
+            cardNumber: "16qc67",
+            password: rsa.RSAencrypt("abc2234"),
+            statu: "1",
           };
           };
-          this.datas[editIndex] = arr;
+          // console.log(this.position);
+
+          this.API.hotelAdmin.hotelStaffUpdate(arr).then((res) => {
+            console.log(res);
+          });
           this.data = this.datas;
           this.data = this.datas;
           this.handleCurrentChange(this.currentPage);
           this.handleCurrentChange(this.currentPage);
           this.editShow = false;
           this.editShow = false;