浏览代码

no message

DESKTOP-B78GIPM\admin 2 年之前
父节点
当前提交
47b2e59b41
共有 3 个文件被更改,包括 28 次插入10 次删除
  1. 10 0
      pages/login/login.vue
  2. 16 8
      pages/roomStateDiagram/roomStateDiagram.vue
  3. 2 2
      utils/api.js

+ 10 - 0
pages/login/login.vue

@@ -27,6 +27,11 @@ export default {
 			    url: '/pages/index/index'
 			})
 		}
+        if (uni.getStorageSync('userInfo')) {
+            let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
+            this.username = userInfo.username
+            this.password = userInfo.password            
+        }
 	},
     methods: {
         login() {
@@ -43,6 +48,11 @@ export default {
                 if (res.code === 200) {
                     this.$store.commit('setToken', res.result.token)
                     uni.setStorageSync("token", res.result.token)
+                    let userInfo = {
+                        username: this.username,
+                        password: this.password
+                    }
+                    uni.setStorageSync("userInfo", JSON.stringify(userInfo))
                     uni.showToast({
                         icon: 'none',   
                         duration: 3000,

+ 16 - 8
pages/roomStateDiagram/roomStateDiagram.vue

@@ -50,7 +50,7 @@
         </div>
     </div>
     <u-action-sheet safeAreaInsetBottom :cancelText="'取消'" @close="show = false" :actions="listSheet" @select="selectClick" :title="'设置'" :show="show" v-if="selectData">
-        <div style="line-height:40px;" v-if="selectData.roomInfo.roomStatus === 2" @click="handleClean">置净</div>
+        <div style="line-height:40px;" v-if="selectData.roomInfo.roomStatus === 2 || selectData.roomInfo.roomStatus === 4" @click="handleClean">置净</div>
         <div style="line-height:40px;" v-else @click="handleDirty">置脏</div>
         <div style="line-height:40px;" v-if="selectData.roomInfo.roomStatus === 6" @click="handleOffLock">解锁</div>
         <div style="line-height:40px;" v-else @click="handleLock">锁定</div>
@@ -246,7 +246,11 @@ export default {
             }
             //在住
             if (this.current == 1) {
-                
+                arr.forEach(item => {
+                    item.rooms = item.rooms.filter(ele => {
+                        return ele.roomInfo.roomStatus == 3 || ele.roomInfo.roomStatus == 4
+                    })
+                })
             }
             //预离
             if (this.current == 2) {
@@ -282,11 +286,11 @@ export default {
             }
             //散客
             if (this.current == 6) {
-                // arr.forEach(ele => {
-                //     ele.rooms = ele.rooms.filter(item=>{
-                        
-                //     })
-                // })
+                arr.forEach(ele => {
+                    ele.rooms = ele.rooms.filter(item=>{
+                        return item.livingData && item.livingData.livingOrder && this.getCustomerSourceList(item.livingData.livingOrder.customerSource).indexOf('散') > -1
+                    })
+                })
             }
             //联房
             if (this.current == 7) {
@@ -294,7 +298,11 @@ export default {
             }
             //脏房
             if (this.current == 8) {
-                
+                arr.forEach(item => {
+                    item.rooms = item.rooms.filter(ele => {
+                        return ele.roomInfo.roomStatus == 2 || ele.roomInfo.roomStatus == 4
+                    })
+                })
             }
             console.log('arrarrarrarr', arr);
             this.dataList = JSON.parse(JSON.stringify(arr))

+ 2 - 2
utils/api.js

@@ -1,6 +1,6 @@
 import request from './request.js'
-const pre = 'http://118.195.195.200:8080/jeecg-boot'
-// const pre = '/api/jeecg-boot'
+// const pre = 'http://118.195.195.200:8080/jeecg-boot'
+const pre = '/api/jeecg-boot'
 
 /**
  * 登录