From 1d109550d49dd846275af38d25354f4dbad8945e Mon Sep 17 00:00:00 2001 From: jazz <jazzxhunter@163.com> Date: 星期三, 13 十二月 2023 11:42:08 +0800 Subject: [PATCH] update_202312131141_房间增加敷麻状态,且刷新按钮改为刷新整个浏览器页面 --- src/utils/xio_fn.js | 2 + config/index.js | 3 + src/pages/room/list.vue | 6 ++- src/App.vue | 6 ++- src/pages/room/detail.vue | 62 +++++++++++++++++++------------ 5 files changed, 50 insertions(+), 29 deletions(-) diff --git a/config/index.js b/config/index.js index c989342..235e808 100644 --- a/config/index.js +++ b/config/index.js @@ -24,9 +24,10 @@ '/api_test': { // 娴嬭瘯鐜 // target: 'http://192.168.31.69:8080', target: 'https://test6.phiskin.com/', // 瀵煎尰 + // target: 'https://serv3.phiskin.com/', // 瀵煎尰绾夸笂 // target: 'https://test6.phiskin.com/phi_appt/', // 鏂伴绾his鍚庡彴 // target: 'http://hymctest.huoxiongit.com/',// 杩欎釜鏄綘鏈嶅姟鍣ㄥ紑鍚殑鎺ュ彛 - changeOrigin: true,// 鏄惁璺ㄥ煙 + changeOrigin: true, // 鏄惁璺ㄥ煙 pathRewrite: { '^/api_test': '' } diff --git a/src/App.vue b/src/App.vue index 2aefc40..5f4bbe0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -29,9 +29,10 @@ // 鍏ュ彛鍙傛暟 // 杩欓噷娉ㄩ噴鍏ュ彛鍙傛暟 -import Login from '@/utils/jun_login.js' +// import Login from '@/utils/jun_login.js' import wxsign from '@/utils/wxsign.js' -import Config from './config' +// import Config from './config' +// import xioFn from './utils/xio_fn.js' // import eruda from 'eruda' export default { name: 'App', @@ -121,6 +122,7 @@ // this.$refs.audio.play() // if(Config.isWxLoginType) this.wxinit() + }, methods: { // 寰俊鍒濆鍖� diff --git a/src/pages/room/detail.vue b/src/pages/room/detail.vue index 97605ec..87d634c 100644 --- a/src/pages/room/detail.vue +++ b/src/pages/room/detail.vue @@ -11,7 +11,7 @@ </div> </div> <div class="right flex-1 flex flex-jcfe flex-ver"> - <el-button type="primary" icon="el-icon-refresh" class="reset_btn flex flex-center" size="small" style="width: 100px;" @click="getData">鍒锋柊</el-button> + <el-button type="primary" icon="el-icon-refresh" class="reset_btn flex flex-center" size="small" style="width: 100px;" @click="resetPage">鍒锋柊</el-button> <div class="reset_btn flex flex-center" @click="resetStatus">閲嶇疆鎴块棿鐘舵��</div> <div class="page_date"> <div class="page_week">{{ timeObj.week }}</div> @@ -69,11 +69,11 @@ <div class="main flex-1"> <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div> <div v-if="roomInfo" class="room_main_tip">-{{ statusTx[roomInfo.status] }}-</div> - <div v-if="roomInfo && roomInfo.status >= 1" class="room_left_btn_box flex flex-ver"> - <div v-if="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('瀹汉浼戞伅', 2)">瀹汉浼戞伅</div> - <div v-if="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div> - <div v-if="roomInfo.status == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div> - <div v-if="roomInfo.status == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('绌洪棽', 0)">缁撴潫鎵撴壂</div> + <div v-show="roomInfo && roomInfo.status >= 1" class="room_left_btn_box flex flex-ver"> + <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('瀹汉浼戞伅', 2)">瀹汉浼戞伅</div> + <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div> + <div v-show="roomInfo.status == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div> + <div v-show="roomInfo.status == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('绌洪棽', 0)">缁撴潫鎵撴壂</div> </div> </div> <div class="right"> @@ -131,12 +131,14 @@ <div v-if="occupyInfoView.ciq" class="ciq">({{ occupyInfoView.ciq }})</div> <div v-if="occupyInfoView.startTime" class="time">瀹夋帓娌荤枟鏃堕棿锛歿{ occupyInfoView.startTime }} 寮�濮�</div> </div> - <div v-if="roomInfo" class="room_left_btn_box flex flex-ver" style="margin-top: 105px;"> - <div v-if="roomInfo.status == 0" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('浣跨敤涓�', 1)">寮�濮嬫不鐤�</div> - <div v-if="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('瀹汉浼戞伅', 2)">瀹汉浼戞伅</div> - <div v-if="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div> - <div v-if="roomInfo.status == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div> - <div v-if="roomInfo.status == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('绌洪棽', 0)">缁撴潫鎵撴壂</div> + <div v-show="roomInfo" class="room_left_btn_box flex flex-ver" style="margin-top: 105px;"> + <div v-show="roomInfo.status == 0" class="room_left_btn_box__item flex flex-1 flex-center b-green btn_ani" @click="setStatus('鏁烽夯涓�', 4)">寮�濮嬫暦楹�</div> + <div v-show="roomInfo.status == 0" class="room_left_btn_box__item flex flex-1 flex-center green btn_ani" @click="setStatus('浣跨敤涓�', 1)">寮�濮嬫不鐤�</div> + <div v-show="roomInfo.status == 4" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('浣跨敤涓�', 1)">寮�濮嬫不鐤�</div> + <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center yellow btn_ani" @click="setStatus('瀹汉浼戞伅', 2)">瀹汉浼戞伅</div> + <div v-show="roomInfo.status == 1" class="room_left_btn_box__item flex-1 flex flex-center gray btn_ani" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div> + <div v-show="roomInfo.status == 2" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('鎵撴壂涓�', 3)">閫氱煡鎵撴壂</div> + <div v-show="roomInfo.status == 3" class="room_left_btn_box__item flex flex-center green btn_ani" @click="setStatus('绌洪棽', 0)">缁撴潫鎵撴壂</div> </div> </div> <div class="right flex flex-col"> @@ -217,6 +219,7 @@ // 鏇存敼鎴块棿鐘舵�佺獥 import XioRoomStatusChg from '@/components/xio_room_status_chg' import Req from '../../utils/jun_httpInstall' // http 璇锋眰 +// import xioFn from './utils/xio_fn.js' var isUseDefault = false // 鏄惁宸蹭娇鐢ㄩ粯璁ゅ浜� var isUseDefaultChg = 0// 宸蹭娇鐢ㄩ粯璁ゅ浜哄悗鎴块棿鏄惁鏈夋敼鍙樼姸鎬� export default { @@ -232,7 +235,7 @@ roomInfo: {}, occupyInfo: '', // 褰撳墠鍗犵敤浜虹殑淇℃伅 assignTreatList: [], - statusTx: ['绌洪棽', '浣跨敤涓�', '瀹汉浼戞伅', '鎵撴壂涓�'], + statusTx: ['绌洪棽', '浣跨敤涓�', '瀹汉浼戞伅', '鎵撴壂涓�', '鏁烽夯涓�'], timeObj: {}, // week锛氭槦鏈燂紝date锛氬勾鏈堟棩锛宼imeMin锛氭椂鍒嗭紝time锛氭椂鍒嗙锛宼imeStamp锛氭椂闂存埑 curTreatId: '' } @@ -300,8 +303,12 @@ // 鑾峰彇褰撳墠娌荤枟淇℃伅 gatCurTreatInfo() { if (this.assignTreatList && this.assignTreatList.length) { - return this.assignTreatList.find((o) => {return o.id === this.curTreatId}) + return this.assignTreatList.find((o) => { return o.id === this.curTreatId }) } + }, + // 鍒锋柊娴忚鍣ㄩ〉闈� + resetPage() { + window.location.reload() }, // 鑾峰彇鎴块棿璇︽儏 getData() { @@ -321,7 +328,7 @@ data: { roomInfo: { roomNo: 'xx', - status: 0 // 0绌洪棽 1浣跨敤 2浼戞伅 3鎵撴壂 + status: 0 // 0绌洪棽 1浣跨敤 2浼戞伅 3鎵撴壂 4 鏁烽夯涓� }, assignTreatList: [{ startTime: '2023-12-08 00:00:00' @@ -603,6 +610,16 @@ margin-top: 163px; } .page_container .main .room_left_btn_box__item { + width: 500px; + height: 150px; + line-height: 73px; + border-radius: 10px; + font-size: 50px; + text-align: center; + margin: auto; +} +.page_container .main .room_left_btn_box__item.flex-1 { + width: auto; height: 150px; line-height: 58px; border-radius: 10px; @@ -612,9 +629,9 @@ margin-right: 20px; font-weight: bold; } -.page_container .main .room_left_btn_box__item:last-child { +/* .page_container .main .room_left_btn_box__item:last-child { margin-right: 0; -} +} */ .page_container .main .room_left_btn_box__item.yellow { color: rgba(255,255,255,1); background-color: rgba(233,157,66,1); @@ -624,15 +641,12 @@ color: rgba(79,79,79,1); } .page_container .main .room_left_btn_box__item.green { - width: 500px; - height: 150px; - line-height: 73px; - border-radius: 10px; background-color: rgba(47,174,206,1); color: rgba(255,255,255,1); - font-size: 50px; - text-align: center; - margin: auto; +} +.page_container .main .room_left_btn_box__item.b-green { + background-color: rgba(79,167,114,1); + color: rgba(255,255,255,1); } .page_container .main .room_content { margin-top: 30px; diff --git a/src/pages/room/list.vue b/src/pages/room/list.vue index 5d9e0bb..2e1d4ed 100644 --- a/src/pages/room/list.vue +++ b/src/pages/room/list.vue @@ -45,6 +45,7 @@ <script> // import Login from '../utils/jun_login.js' import Req from '../../utils/jun_httpInstall' // http 璇锋眰 +// import xioFn from './utils/xio_fn.js' export default { name: 'RoomList', components: {}, @@ -75,9 +76,10 @@ this.getShopList() this.getRoomList() }, - // 鍒锋柊椤甸潰 + // 鍒锋柊娴忚鍣ㄩ〉闈� resetPage() { - this.getRoomList() + window.location.reload() + // this.getRoomList() }, // 鑾峰彇闂ㄥ簵鍒楄〃 getShopList() { diff --git a/src/utils/xio_fn.js b/src/utils/xio_fn.js index 8f7d8eb..7389c96 100644 --- a/src/utils/xio_fn.js +++ b/src/utils/xio_fn.js @@ -7,6 +7,7 @@ // 閫氱敤function锛岄�氳繃鍏ㄥ眬瀹夎锛屾垨import寮曠敤璋冪敤 import config from '../config' // 鍩熷悕閰嶇疆 import md5 from 'js-md5' +// import axios from 'axios' // 鍩虹閰嶇疆 - 鑾峰彇褰撳墠鐜 var ismock = config.ismock var isTestView = config.isTestView @@ -67,6 +68,7 @@ } var fn = { + fn_obj, uuid, httpOptionMd5Handle, /** -- Gitblit v1.8.0