From cf3e3ef409f839bc7be56c09c99cee2654d77fa4 Mon Sep 17 00:00:00 2001 From: jazz <jazzxhunter@163.com> Date: 星期四, 07 十二月 2023 17:36:54 +0800 Subject: [PATCH] update_202312071736_项目-治疗室屏幕web-切图接口对接v3 --- src/utils/xio_fn.js | 10 ++++- src/assets/css/common.css | 1 src/pages/room/list.vue | 9 ++++ src/router/index.js | 2 + src/pages/room/detail.vue | 80 +++++++++++++++++++++++++++++---------- 5 files changed, 78 insertions(+), 24 deletions(-) diff --git a/src/assets/css/common.css b/src/assets/css/common.css index dd7193b..d7c43d4 100644 --- a/src/assets/css/common.css +++ b/src/assets/css/common.css @@ -35,6 +35,7 @@ flex: 1; -webkit-flex: 1; } +.flex-1-w1 {width: 1px;} .w1{width: 0.0732vw;}.h1{height: 0.0732vw;} .flex-center { diff --git a/src/pages/room/detail.vue b/src/pages/room/detail.vue index fec7abc..82bf9c3 100644 --- a/src/pages/room/detail.vue +++ b/src/pages/room/detail.vue @@ -69,17 +69,17 @@ <div class="guest_block flex-1"> <div class="guest_list"> <div v-for="(item, index) in assignTreatList" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)"> - <div class="guest_list__td flex flex-center"> - <div> - <div class="tx">{{ item.userName }}</div> - <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div> + <div class="guest_list__td"> + <div class="tx flex flex-ver"> + <div class="flex-1 flex-1-w1 ell">{{ item.userName }}</div> </div> + <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div> </div> <div class="guest_list__td flex flex-center"> <span class="tx">{{ item.startTime?item.startTime+'寮�濮�':'' }}</span> </div> <div class="guest_list__td flex flex-center"> - <span class="tx">{{ item.aDoctorName?item.aDoctorName+'(鍖荤敓)銆�':'' }}{{ item.aNurseName?item.aNurseName+'(鎶ゅ+)':'' }}</span> + <span class="tx flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(鍖荤敓)銆�':'' }}{{ item.aNurseName?item.aNurseName+'(鎶ゅ+)':'' }}</span> </div> <div class="guest_list__td flex flex-center"> <img class="icon" src="../../assets/img/choose.png"> @@ -96,7 +96,19 @@ <div v-if="roomInfo && roomInfo.roomNo" class="room_title">{{ roomInfo.roomNo }}</div> <div class="room_content"> <div class="tip">璇婄枟瀹夋帓</div> - <div class="name">{{ occupyInfoView.userName }}</div> + <!-- <div class="name">{{ occupyInfoView.userName }}</div> --> + <div class="name"> + <el-popover + placement="top" + width="400" + popper-class="top_tx" + trigger="click" + :popper-options="{ removeOnDestroy: true }" + > + <div>{{ occupyInfoView.userName }}</div> + <div slot="reference" class="tx ell">{{ occupyInfoView.userName }}</div> + </el-popover> + </div> <div v-if="occupyInfoView.ciq" class="ciq">({{ occupyInfoView.ciq }})</div> <div v-if="occupyInfoView.startTime" class="time">瀹夋帓娌荤枟鏃堕棿锛歿{ occupyInfoView.startTime }} 寮�濮�</div> </div> @@ -141,17 +153,17 @@ <div class="guest_block flex-1"> <div class="guest_list"> <div v-for="(item, index) in assignTreatList" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)"> - <div class="guest_list__td flex flex-center"> - <div> - <div class="tx">{{ item.userName }}</div> - <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div> + <div class="guest_list__td"> + <div class="tx flex flex-ver"> + <div class="flex-1 flex-1-w1 ell">{{ item.userName }}</div> </div> + <div class="tx" style="font-size: 14px;line-height: 20px;">{{ item.ciq || '' }}</div> </div> <div class="guest_list__td flex flex-center"> <span class="tx">{{ item.startTime?item.startTime+'寮�濮�':'' }}</span> </div> <div class="guest_list__td flex flex-center"> - <span class="tx">{{ item.aDoctorName?item.aDoctorName+'(鍖荤敓)銆�':'' }}{{ item.aNurseName?item.aNurseName+'(鎶ゅ+)':'' }}</span> + <span class="tx flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(鍖荤敓)銆�':'' }}{{ item.aNurseName?item.aNurseName+'(鎶ゅ+)':'' }}</span> </div> <div class="guest_list__td flex flex-center"> <img class="icon" src="../../assets/img/choose.png"> @@ -205,7 +217,7 @@ return this.occupyInfo // 娌℃湁鍗犵敤 } else { - // 娌′娇鐢ㄩ粯璁ゅ浜哄�� + // 杩樻病浣跨敤榛樿瀹汉鍊� if (!isUseDefault && this.assignTreatList && this.assignTreatList.length) { isUseDefault = true return this.assignTreatList[0] @@ -228,8 +240,8 @@ // 璁℃椂 this.countGetTime(this, 'timeObj', 'detail') // 杞getData锛�8绉掍竴娆� - this.pollingAjaxFn(this, 'getData', 'detail', 8000) - // this.getData() + // this.pollingAjaxFn(this, 'getData', 'detail', 8000) + this.getData() }, // 鑾峰彇鎴块棿璇︽儏 getData() { @@ -250,6 +262,18 @@ } }).then((res) => { if (res && res.data) { + // 娌荤枟鏃堕棿澶勭悊 + if (res.data.assignTreatList && res.data.assignTreatList.length) { + res.data.assignTreatList.forEach((o) => { + var st = (o.startTime).split(' ')[1].split(':') + o.startTime = `${st[0]}:${st[1]}` + }) + } + // 鍗犵敤淇℃伅娌荤枟鏃堕棿澶勭悊 + if (res.data.occupyInfo && res.data.occupyInfo.startTime) { + var ost = (res.data.occupyInfo.startTime).split(' ')[1].split(':') + res.data.occupyInfo.startTime = `${ost[0]}:${ost[1]}` + } for (const key in res.data) { this[key] = res.data[key] } @@ -259,6 +283,7 @@ }, // 杩斿洖 back() { + isUseDefault = false // 鍏抽棴璁℃椂 this.stopCountGetTime('detail') // 鍏抽棴杞 @@ -266,7 +291,7 @@ // 杩斿洖 this.$router.go(-1) }, - // 鐩存帴鐘舵�佸彉鏇� + // 鏈湁瀹夋帓鐩存帴鐘舵�佸彉鏇� statusChg(e) { var { tx, status } = e.currentTarget.dataset var { occupyInfoView, roomInfo } = this @@ -287,19 +312,18 @@ this.getData() }) }, - // 鏀瑰彉鎴块棿鐘舵�佸紓姝� + // 鏀瑰彉鎴块棿鐘舵�佸紓姝ユ柟娉� changeStatusFn(item = {}, status, cb) { var params = {} - // 鐘舵�� + // 鏇存敼鐨勭姸鎬� + params.status = status * 1 // 鎴块棿id if (this.id) { params.shopRoomId = this.id } - // 鏇存敼鐨勭姸鎬� - params.status = status * 1 // 娌荤枟璁板綍id if (item && item.id) { - params.vAssignTreatId = item.id + params.treatRecordId = item.id } Req.http.post({ url: 'treat/screen/room/status/update', @@ -320,7 +344,7 @@ // 鎵撳紑寮圭獥 this.$refs['XioRoomStatusChg'].showDialog() }, - // 鏇存敼鎴块棿鐘舵�� + // 鏇存敼鎴块棿鐘舵�侊紙閲嶇疆鐘舵�佺殑鏇存敼鏂规硶锛� changeStatus(opt) { var { occupyInfoView, roomInfo } = this console.log(opt.statusTx, opt.status) @@ -359,6 +383,13 @@ } } </script> + +<style> +.el-popper.top_tx { + text-align: center; + font-size: 25px; +} +</style> <style scoped> .page_header .reset_btn { @@ -501,6 +532,10 @@ font-family: PingFangSC-medium; margin-top: 13px; } +.page_container .main .room_content .name .tx { + max-width: 666px; + margin: auto; +} .page_container .main .room_content .ciq { line-height: 42px; color: rgba(51,51,51,1); @@ -539,6 +574,7 @@ font-weight: bold; } .page_container .right .guest_block { + background-color: #fff; overflow: auto; } .page_container .right .guest_list { @@ -559,6 +595,8 @@ font-size: 22px; text-align: center; font-family: PingFangSC-regular; + box-sizing: border-box; + padding: 0 5px; } .page_container .right .guest_list__td .icon { width: 20px; diff --git a/src/pages/room/list.vue b/src/pages/room/list.vue index f88839d..d5134fc 100644 --- a/src/pages/room/list.vue +++ b/src/pages/room/list.vue @@ -65,6 +65,7 @@ }, methods: { init() { + // 璁℃椂 this.countGetTime(this, 'timeObj', 'list') this.getShopList() this.getRoomList() @@ -110,6 +111,7 @@ this.stopPollingAjaxFn('list') this.$router.go(-1) }, + // 璺宠浆璇︽儏 selectRoom(item = {}) { this.$router.push({ path: `./room/detail?id=${item.id || ''}` @@ -125,7 +127,12 @@ line-height: 50px; color: rgba(255,255,255,1); font-size: 36px; - text-align: center; + text-align: right; + padding-right: 40px; +} +.page_choose_shop .el-select .el-input .el-select__caret { + font-size: 30px; + color: #fff; } </style> <style scoped> diff --git a/src/router/index.js b/src/router/index.js index 6c556fb..53ff605 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -32,11 +32,13 @@ path: '/room/list', name: 'roomList', component: () => import('@/pages/room/list') + // meta: { title: '娌荤枟瀹ゅ垪琛�', keepAlive: true } }, { path: '/room/detail', name: 'roomDetail', component: () => import('@/pages/room/detail') + // meta: { title: '娌荤枟瀹よ鎯�', keepAlive: false } } ] }) diff --git a/src/utils/xio_fn.js b/src/utils/xio_fn.js index d5d0a9f..8f7d8eb 100644 --- a/src/utils/xio_fn.js +++ b/src/utils/xio_fn.js @@ -41,15 +41,21 @@ * @param {Object} option 璇锋眰瀵硅薄 */ function httpOptionMd5Handle(option) { + // 褰撳墠鏃堕棿鎴� var timestamp = new Date().getTime() var sign, params + // data鍙傛暟瀛楁鎺掑簭锛�26瀛楁瘝A鍒癦鎺掑簭锛� + var newData = {} + Object.keys(option.data).sort().map(key => { + newData[key] = option.data[key] + }) // 鍙傛暟澶勭悊 - params = JSON.stringify(option.data) + params = JSON.stringify(newData) // if (params === '{}') { // params = '' // } // 闈瀖ock妯″紡 - if (option && !ismock) { + if (option) { option.header[`appId`] = APPID option.header[`timestamp`] = timestamp // 绛惧悕澶у啓 -- Gitblit v1.8.0