From 45999097f0705704a2ba9a70b339e18c28fc03b3 Mon Sep 17 00:00:00 2001 From: jazz <jazzxhunter@163.com> Date: 星期三, 27 十二月 2023 20:16:35 +0800 Subject: [PATCH] update_202312272015_单个治疗室多个客人的逻辑编写 --- src/components/xio_room_guest_info_box/index.vue | 270 +++++++++++++++ src/config/index.js | 11 src/components/xio_room_guest_box/index.vue | 142 ++++++++ src/components/xio_room_info_block/index.vue | 127 +++++++ src/pages/room/detail.vue | 429 ++++++++++--------------- 5 files changed, 714 insertions(+), 265 deletions(-) diff --git a/src/components/xio_room_guest_box/index.vue b/src/components/xio_room_guest_box/index.vue new file mode 100644 index 0000000..d6ae849 --- /dev/null +++ b/src/components/xio_room_guest_box/index.vue @@ -0,0 +1,142 @@ +<template> + <div class="guest_box"> + <div class="guest_title flex flex-center">绛夊緟璇婄枟</div> + <div class="guest_block flex-1"> + <div v-if="assignTreatListViewCom && assignTreatListViewCom.length" class="guest_list"> + <div v-for="(item, index) in assignTreatListViewCom" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)"> + <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 flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(鍖荤敓)銆�':'' }}{{ item.aNurseName?item.aNurseName+'(鎶ゅ+)':'' }}</span> + </div> + <div class="guest_list__td flex flex-center"> + <div v-if="!item.act" class="tx" style="text-decoration: underline;color: #227beb;">鍒囨崲</div> + <!-- <div class="icon"> + <img class="img" src="static/imgs/choose.png"> + </div> --> + </div> + </div> + </div> + <div v-if="!assignTreatListViewCom || !assignTreatListViewCom.length" class="guest_list"> + <div class="guest_list__row flex flex-center rowtip">鏆傛棤鏁版嵁</div> + </div> + </div> + </div> +</template> + +<script> +export default { + name: 'XioRoomStatusChg', + props: { + assignTreatListViewCom: { + type: Array, + default: () => { + return [] + } + } + }, + data() { + return { + isShow: false + } + }, + methods: { + noop() { + return + }, + // 纭 + selectCustomer(item) { + this.$emit('selectCustomer', item) + }, + // 鏄剧ず寮圭獥 + showDialog() { + this.isShow = true + }, + // 鍏抽棴寮圭獥 + hideDialog() { + this.isShow = false + this.$emit('confirm', { }) + } + } +} +</script> + +<style scoped> +.guest_title { + height: 60px; + line-height: 28px; + border-radius: 10px 10px 0px 0px; + background-color: rgba(255,255,255,1); + color: rgba(34,123,235,1); + font-size: 20px; + text-align: center; + font-family: Roboto; + font-weight: bold; +} +.guest_block { + background-color: #fff; + overflow: auto; +} +.guest_list { + background-color: #fff; + padding-bottom: 23px; +} +.guest_list__row { + min-height: 75px; + background-color: rgba(34,123,235,0.1); +} +.guest_list__row:nth-child(2n) { + background-color: #fff; +} +.guest_list__row.rowtip { + background-color: #fff; + line-height: 30px; + color: rgba(0,0,0,.5); + font-size: 22px; +} +.guest_list__td {} +.guest_list__td .tx { + line-height: 30px; + color: rgba(16,16,16,1); + font-size: 22px; + text-align: center; + font-family: PingFangSC-regular; + box-sizing: border-box; + padding: 0 5px; +} +.guest_list__td .icon { + width: 20px; + height: 20px; + display: block; +} +.guest_list__td .icon .img { + width: 100%; + height: 100%; +} +.guest_list__td:nth-child(1) { + width: 19.54%; +} +.guest_list__td:nth-child(2) { + width: 21.86%; +} +.guest_list__td:nth-child(3) { + width: 46.06%; +} +.guest_list__td:nth-child(4) { + width: 12.54%; +} +.guest_box { + margin-top: 65px; + width: 100%; + height: 345px; + background-color: #fff; + overflow: hidden; +} +</style> diff --git a/src/components/xio_room_guest_info_box/index.vue b/src/components/xio_room_guest_info_box/index.vue new file mode 100644 index 0000000..9f74b9f --- /dev/null +++ b/src/components/xio_room_guest_info_box/index.vue @@ -0,0 +1,270 @@ +<template> + <div class="guest_info_box"> + <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> appellationName --> + <div v-show="isShowAppellationName" class="flex flex-center"> + <div class="flex flex-ver"> + <div class="name">{{ occupyInfoView.appellationName }}</div> + <div class="name_icon" @click="tapAppellationHandle"> + <img class="img" src="static/imgs/eye.png"> + </div> + </div> + </div> + <div v-show="!isShowAppellationName" class="flex flex-center"> + <div class="flex flex-ver"> + <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 class="name_icon" @click="tapAppellationHandle"> + <img class="img" src="static/imgs/eye.png"> + </div> + </div> + </div> + <div v-if="occupyInfoView.ciq" class="ciq">({{ occupyInfoView.ciq }})</div> + <div v-if="occupyInfoView.startTime" class="time">瀹夋帓娌荤枟鏃堕棿锛歿{ occupyInfoView.startTime }} 寮�濮�</div> + </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" style="margin-right: 0;" @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" style="margin-right: 0;" @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> +</template> + +<script> +export default { + name: 'XioRoomStatusChg', + props: { + roomInfo: { + type: Object, + default: () => { + return {} + } + }, + occupyInfoView: { + type: [Object, Array], + default: () => { + return {} + } + } + }, + data() { + return { + isShowAppellationName: true + } + }, + methods: { + noop() { + return + }, + // 鐐瑰嚮鏄剧ず闅愯棌绉拌皳 + tapAppellationHandle() { + this.isShowAppellationName = !this.isShowAppellationName + }, + setStatus(tx, status) { + this.$emit('setStatus', { tx, status }) + }, + // 纭 + confirm() { + this.isShow = false + this.$emit('confirm', { }) + }, + // 鏄剧ず寮圭獥 + showDialog() { + this.isShow = true + }, + // 鍏抽棴寮圭獥 + hideDialog() { + this.isShow = false + this.$emit('confirm', { }) + } + } +} +</script> + +<style scoped> +.guest_info_box { + width: 100%; + height: 100%; + box-sizing: border-box; + padding-top: 39px; +} +.guest_info_box .room_title { + line-height: 50px; + color: rgba(255,255,255,1); + font-size: 36px; + text-align: center; + font-family: PingFangSC-medium; + padding: 10px 0; + background-color: rgba(34,123,235,1); + width: 400px; + margin: 0 auto 0 auto; +} +.guest_info_box .room_main_tip { + line-height: 168px; + font-size: 120px; + color: rgba(46,77,124,1); + text-align: center; + font-family: PingFangSC-medium; + margin-top: 107px; + /* font-weight: bold; */ +} +.guest_info_box .room_main_tip.gray { + color: rgba(154,154,154,1); +} +.guest_info_box .btn_box { + margin-top: 130px; +} +.guest_info_box .btn_box__item { + width: 250px; + height: 120px; + border-radius: 10px; + box-shadow: 0px 2px 6px 0px rgba(206,206,206,1); + margin-right: 70px; + cursor: pointer; +} +.guest_info_box .btn_box__item:last-child { + margin-right: 0; +} +.guest_info_box .btn_box__item.white { + background-color: rgba(255,255,255,1); +} +.guest_info_box .btn_box__item.blue { + background-color: rgba(46,77,124,1); +} +.guest_info_box .btn_box__item.yellow { + background-color: rgba(255,199,115,1); +} +.guest_info_box .btn_box__item.gray { + background-color: rgba(206,206,206,1); +} +.guest_info_box .btn_box__item .icon { + width: 60px; + height: 60px; + display: block; + margin-right: 17px; +} +.guest_info_box .btn_box__item .icon .img { + width: 100%; + height: 100%; +} +.guest_info_box .btn_box__item .tx { + line-height: 37px; + color: rgba(51,51,51,1); + font-size: 26px; + text-align: center; + font-family: PingFangSC-medium; +} +.guest_info_box .btn_box__item .tx.white { + color: rgba(255,255,255,1); +} +.guest_info_box .room_left_btn_box { + padding: 0 23px; + margin-top: 163px; +} +.guest_info_box .room_left_btn_box__item { + width: 500px; + height: 150px; + line-height: 73px; + border-radius: 10px; + font-size: 50px; + text-align: center; + margin: auto; +} +.guest_info_box .room_left_btn_box__item.flex-1 { + width: auto; + height: 150px; + line-height: 58px; + border-radius: 10px; + font-size: 40px; + text-align: center; + font-family: Microsoft Yahei; + margin-right: 20px; + font-weight: bold; +} +/* .guest_info_box .room_left_btn_box__item:last-child { + margin-right: 0; +} */ +.guest_info_box .room_left_btn_box__item.yellow { + color: rgba(255,255,255,1); + background-color: rgba(233,157,66,1); +} +.guest_info_box .room_left_btn_box__item.gray { + background-color: rgba(206,206,206,1); + color: rgba(79,79,79,1); +} +.guest_info_box .room_left_btn_box__item.green { + background-color: rgba(47,174,206,1); + color: rgba(255,255,255,1); +} +.guest_info_box .room_left_btn_box__item.b-green { + background-color: rgba(79,167,114,1); + color: rgba(255,255,255,1); +} +.guest_info_box .room_content { + margin-top: 30px; +} +.guest_info_box .room_content .tip { + line-height: 33px; + color: rgba(79,79,79,1); + font-size: 24px; + text-align: center; + font-family: PingFangSC-medium; +} +.guest_info_box .room_content .name { + line-height: 168px; + color: rgba(51,51,51,1); + font-size: 120px; + text-align: center; + font-family: PingFangSC-medium; + margin-top: 13px; +} +.guest_info_box .room_content .name .tx { + max-width: 666px; + margin: auto; + text-align: center; +} +.guest_info_box .room_content .name_icon { + width: 40px; + height: 40px; + display: block; + margin-top: 13px; + padding: 20px; +} +.guest_info_box .room_content .name_icon .img { + width: 100%; + height: 100%; +} +.guest_info_box .room_content .ciq { + line-height: 42px; + color: rgba(51,51,51,1); + font-size: 30px; + text-align: center; + font-family: PingFangSC-regular; + margin-top: -5px; +} +.guest_info_box .room_content .time { + line-height: 42px; + color: rgba(0,0,0,1); + font-size: 30px; + text-align: center; + font-family: PingFangSC-medium; + font-weight: bold; + margin-top: 21px; +} +</style> diff --git a/src/components/xio_room_info_block/index.vue b/src/components/xio_room_info_block/index.vue new file mode 100644 index 0000000..a4486a5 --- /dev/null +++ b/src/components/xio_room_info_block/index.vue @@ -0,0 +1,127 @@ +<template> + <div class="room_info"> + <div class="staff_box flex flex-ver flex-sb"> + <div class="staff_box_item flex-1 flex flex-center"> + <div> + <div class="staff_box_item__title">鍒嗚瘖椤鹃棶</div> + <div class="staff_box_item__name">{{ occupyInfoView.adviserName || '' }}</div> + </div> + </div> + <div class="staff_box_item flex-1 flex flex-center"> + <div> + <div class="staff_box_item__title">鎵ц鍖荤敓</div> + <div class="staff_box_item__name">{{ occupyInfoView.aDoctorName || '' }}</div> + </div> + </div> + <div class="staff_box_item flex-1 flex flex-center"> + <div> + <div class="staff_box_item__title">鎵ц鎶ゅ+</div> + <div class="staff_box_item__name">{{ occupyInfoView.aNurseName || '' }}</div> + </div> + </div> + </div> + <div class="room_info_project"> + <div class="room_info_project_block"> + <div class="tx">{{ occupyInfoView.projectName || '' }}</div> + </div> + </div> + </div> +</template> + +<script> +export default { + name: 'XioRoomStatusChg', + props: { + occupyInfoView: { + type: [Object, Array], + default: () => { + return {} + } + } + }, + data() { + return { + + } + }, + methods: { + noop() { + return + }, + // 纭 + confirm() { + this.isShow = false + this.$emit('confirm', { }) + }, + // 鏄剧ず寮圭獥 + showDialog() { + this.isShow = true + }, + // 鍏抽棴寮圭獥 + hideDialog() { + this.isShow = false + this.$emit('confirm', { }) + } + } +} +</script> + +<style scoped> +.room_info { + width: 100%; + height: 100%; + border-radius: 10px; + background-color: rgba(255,255,255,0.3); + box-sizing: border-box; + padding-top: 30px; +} +.room_info .staff_box { +} +.room_info .staff_box_item { + height: 180px; +} +.room_info .staff_box_item:nth-child(1) { + background-color: rgba(255,255,255,0.1); +} +.room_info .staff_box_item:nth-child(2) { + background-color: rgba(255,255,255,0.3); + margin: 0 10px; +} +.room_info .staff_box_item:nth-child(3) { + background-color: rgba(255,255,255,0.1); +} +.room_info .staff_box_item__title { + line-height: 28px; + color: rgba(255,255,255,1); + font-size: 20px; + text-align: center; + font-family: PingFangSC-regular; +} +.room_info .staff_box_item__name { + line-height: 56px; + color: rgba(255,255,255,1); + font-size: 40px; + text-align: center; + font-family: PingFangSC-medium; + margin-top: 5px; +} +.room_info .room_info_project { + padding: 36px 20px 20px 20px; + height: 138px; + box-sizing: border-box; + overflow: hidden; +} +.room_info .room_info_project_block { + box-sizing: border-box; + width: 100%; + height: 100%; + overflow: auto; +} +.room_info .room_info_project .tx { + line-height: 39px; + color: rgba(255,255,255,1); + font-size: 28px; + text-align: center; + font-family: PingFangSC-regular; +} +</style> diff --git a/src/config/index.js b/src/config/index.js index 5a01f9b..12bd2c8 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -7,7 +7,7 @@ import appId from './appid.js' -var ismock = 0// 铏氭嫙鏁版嵁 0涓嶄娇鐢� 1浣跨敤 +var ismock = 1// 铏氭嫙鏁版嵁 0涓嶄娇鐢� 1浣跨敤 var istest = 2// 0绾夸笂 1鏈湴 2娴嬭瘯鐜 var isConsole = 1// 鏄惁灞忚斀console 0灞忚斀 1寮�鏀� var debug = isConsole @@ -25,7 +25,6 @@ if (is_use_test_server) { isTestView = 1 } - } const pdomain = '/' // 绾夸笂 @@ -50,8 +49,8 @@ const search = location.search // 鍙傛暟鏁扮粍 let querys = [] - if (search && search.indexOf('?')>-1) { - querys = search.split('?')[1].split('&').filter((str)=>{ + if (search && search.indexOf('?') > -1) { + querys = search.split('?')[1].split('&').filter((str) => { const key = str.split('=')[0] const value = str.split('=')[1] return (key != 'code' && key != 'state') @@ -62,7 +61,7 @@ // 琛ュ厖鍙傛暟 if (querys.length) { - indexUrl += '?'+querys.join('&') + indexUrl += '?' + querys.join('&') } return long.replace('{{appid}}', appid).replace('{{scope}}', scope).replace('{{url}}', encodeURIComponent(indexUrl)) @@ -73,7 +72,7 @@ console.log = () => {} } -var domain; +var domain if (istest == 0) domain = pdomain // 绾夸笂 if (istest == 1) domain = tdomain // 鏈湴 diff --git a/src/pages/room/detail.vue b/src/pages/room/detail.vue index 776f69f..ee10f21 100644 --- a/src/pages/room/detail.vue +++ b/src/pages/room/detail.vue @@ -21,6 +21,7 @@ <!-- <div class="page_time">{{ timeObj.time }}</div> --> </div> </div> + <div class="page_header_placeholer" /> <!-- 鏈湁瀹夋帓 --> <div v-if="!occupyInfoView && (!assignTreatListView || !assignTreatListView.length)" class="page_container flex flex-1"> <div class="main flex-1"> @@ -77,142 +78,22 @@ </div> </div> <div class="right"> - <div class="right_block flex flex-col"> - <div class="guest_title flex flex-center">绛夊緟璇婄枟</div> - <div class="guest_block flex-1" style="border-radius: 0 0 10px 10px;"> - <div v-if="assignTreatListView && assignTreatListView.length" class="guest_list"> - <div v-for="(item, index) in assignTreatListView" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)"> - <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 flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(鍖荤敓)銆�':'' }}{{ item.aNurseName?item.aNurseName+'(鎶ゅ+)':'' }}</span> - </div> - <div class="guest_list__td flex flex-center"> - <div v-if="!item.act" class="tx" style="text-decoration: underline;color: #227beb;">鍒囨崲</div> - <!-- <div class="icon"> - <img class="img" src="static/imgs/choose.png"> - </div> --> - </div> - </div> - </div> - <div v-if="!assignTreatListView || !assignTreatListView.length" class="guest_list"> - <div class="guest_list__row flex flex-center rowtip">鏆傛棤鏁版嵁</div> - </div> - </div> + <div class="right_block"> + <XioRoomGuestBox ref="XioRoomGuestBox" :assign-treat-list-view-com="assignTreatListView" @selectCustomer="selectCustomer" /> </div> </div> </div> - <!-- 瀹汉鍜屾湁瀹夋帓 --> + <!-- 瀹汉鍜屾湁瀹夋帓 over-width --> <div v-if="occupyInfoView" class="page_container flex flex-1"> <div class="main flex-1"> - <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> appellationName --> - <div v-show="isShowAppellationName" class="flex flex-center"> - <div class="flex flex-ver"> - <div class="name">{{ occupyInfoView.appellationName }}</div> - <div class="name_icon" @click="tapAppellationHandle"> - <img class="img" src="static/imgs/eye.png"> - </div> - </div> - </div> - <div v-show="!isShowAppellationName" class="flex flex-center"> - <div class="flex flex-ver"> - <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 class="name_icon" @click="tapAppellationHandle"> - <img class="img" src="static/imgs/eye.png"> - </div> - </div> - </div> - <div v-if="occupyInfoView.ciq" class="ciq">({{ occupyInfoView.ciq }})</div> - <div v-if="occupyInfoView.startTime" class="time">瀹夋帓娌荤枟鏃堕棿锛歿{ occupyInfoView.startTime }} 寮�濮�</div> - </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> + <XioRoomGuestInfoBox ref="XioRoomGuestInfoBox" :room-info="roomInfo" :occupy-info-view="occupyInfoView" @setStatus="setComStatus" /> </div> <div class="right flex flex-col"> - <div class="room_info flex-1"> - <div class="staff_box flex flex-ver flex-sb"> - <div class="staff_box_item flex-1 flex flex-center"> - <div> - <div class="staff_box_item__title">鍒嗚瘖椤鹃棶</div> - <div class="staff_box_item__name">{{ occupyInfoView.adviserName || '' }}</div> - </div> - </div> - <div class="staff_box_item flex-1 flex flex-center"> - <div> - <div class="staff_box_item__title">鎵ц鍖荤敓</div> - <div class="staff_box_item__name">{{ occupyInfoView.aDoctorName || '' }}</div> - </div> - </div> - <div class="staff_box_item flex-1 flex flex-center"> - <div> - <div class="staff_box_item__title">鎵ц鎶ゅ+</div> - <div class="staff_box_item__name">{{ occupyInfoView.aNurseName || '' }}</div> - </div> - </div> - </div> - <div class="room_info_project"> - <div class="room_info_project_block"> - <div class="tx">{{ occupyInfoView.projectName || '' }}</div> - </div> - </div> + <div class="flex-1"> + <XioRoomInfoBlock ref="XioRoomInfoBlock" :occupy-info-view="occupyInfoView" /> </div> - <div class="guest_box flex flex-col" style="border-radius: 10px;"> - <div class="guest_title flex flex-center">绛夊緟璇婄枟</div> - <div class="guest_block flex-1"> - <div v-if="assignTreatListView && assignTreatListView.length" class="guest_list"> - <div v-for="(item, index) in assignTreatListView" :key="index" class="guest_list__row flex flex-ver" @click="selectCustomer(item)"> - <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 flex-1 flex-1-w1 ell">{{ item.aDoctorName?item.aDoctorName+'(鍖荤敓)銆�':'' }}{{ item.aNurseName?item.aNurseName+'(鎶ゅ+)':'' }}</span> - </div> - <div class="guest_list__td flex flex-center"> - <div v-if="!item.act" class="tx" style="text-decoration: underline;color: #227beb;">鍒囨崲</div> - <!-- <div class="icon"> - <img class="img" src="static/imgs/choose.png"> - </div> --> - </div> - </div> - </div> - <div v-if="!assignTreatListView || !assignTreatListView.length" class="guest_list"> - <div class="guest_list__row flex flex-center rowtip">鏆傛棤鏁版嵁</div> - </div> - </div> + <div class="flex flex-col" style="border-radius: 10px;"> + <XioRoomGuestBox ref="XioRoomGuestBox" :assign-treat-list-view-com="assignTreatListView" @selectCustomer="selectCustomer" /> </div> </div> </div> @@ -231,6 +112,12 @@ // 瀹汉浼戞伅 2 // 寰呮墦鎵�/閫氱煡鎵撴壂 3 // import Login from '../utils/jun_login.js' +// 鎴块棿瀹汉淇℃伅 +import XioRoomGuestInfoBox from '@/components/xio_room_guest_info_box' +// 鎴块棿璐熻矗鍛樺伐淇℃伅 +import XioRoomInfoBlock from '@/components/xio_room_info_block' +// 鎴块棿瀹㈡埛棰勭害鍒楄〃淇℃伅 +import XioRoomGuestBox from '@/components/xio_room_guest_box' // 閫夋嫨瀹汉寮圭獥 import XioCustomerSelect from '@/components/xio_customer_select' // 鏇存敼鎴块棿鐘舵�佺獥 @@ -246,6 +133,9 @@ export default { name: 'RoomDetail', components: { + XioRoomGuestInfoBox, + XioRoomInfoBlock, + XioRoomGuestBox, XioCustomerSelect, XioRoomStatusChg, XioRoomOffNarcosisNotice @@ -260,10 +150,31 @@ statusTx: ['绌洪棽', '浣跨敤涓�', '瀹汉浼戞伅', '鎵撴壂涓�', '鏁烽夯涓�'], timeObj: {}, // week锛氭槦鏈燂紝date锛氬勾鏈堟棩锛宼imeMin锛氭椂鍒嗭紝time锛氭椂鍒嗙锛宼imeStamp锛氭椂闂存埑 curTreatId: '', - isShowAppellationName: true // 鏄惁鏄剧ず绉拌皳 + curTreatIds: '' + // isShowAppellationName: true // 鏄惁鏄剧ず绉拌皳 } }, + // todo 椤甸潰鏄剧ず鍙婃暟缁勫鐞� computed: { + occupyInfoViewArr() { + // 缂撳瓨璁板綍 + if (this.curTreatIds) { + return this.getCurTreatArr(this.curTreatIds) + } else { + if (this.occupyInfo) { + this.occupyInfoViewArrIdsHandle(this.occupyInfo) + return [this.occupyInfo] + } else { + if ((!isUseDefault || (isUseDefault && isUseDefaultChg === 0)) && this.assignTreatList && this.assignTreatList.length) { + isUseDefault = true + this.occupyInfoViewArrIdsHandle(this.assignTreatList[0]) + return [this.assignTreatList[0]] + } else { + return '' + } + } + } + }, occupyInfoView() { console.log('00000000000000000000000', this.occupyInfo, isUseDefault, isUseDefaultChg) // 鏈夊綋鍓嶉�変腑鐨勶紝鏍规嵁闇�姹備慨鏀瑰鍔犻�変腑涓嶆洿鏀圭姸鎬侊紝鐢辩┖闂插紑濮� @@ -304,6 +215,9 @@ console.log('roomDetail mounted') // 璁板綍褰撳墠鐨勬不鐤桰D var curTreatId = localStorage.getItem('curTreatId') + // 璁板綍褰撳墠鐨勬不鐤桰D鏁扮粍 + var curTreatIds = localStorage.getItem('curTreatIds') + // 鍗搁夯鐩稿叧 var localOffNarcosisIds = localStorage.getItem('offNarcosisIds') var localIsOffNarcosisShow = localStorage.getItem('isOffNarcosisShow') // 鑾峰彇鏄惁宸查�氱煡鍗搁夯鏁扮粍 @@ -315,6 +229,14 @@ } if (localIsOffNarcosisShow) { isOffNarcosisShow = localIsOffNarcosisShow + } + // 鏁扮粍 + if (curTreatIds) { + try { + this.curTreatIds = JSON.parse(curTreatIds) + } catch (error) { + this.curTreatIds = '' + } } this.curTreatId = curTreatId || '' this.id = this.$route.query.id || '' @@ -334,6 +256,14 @@ // 杞getData锛�8绉掍竴娆� this.pollingAjaxFn(this, 'getData', 'detail', 8000) // this.getData() + }, + // 鍒濆鍗犵敤id鏁扮粍澶勭悊 + occupyInfoViewArrIdsHandle(item) { + if (!this.curTreatIds) { + this.curTreatIds = [] + } + this.curTreatIds.push(item.id) + this.setLocalCurTreatIds() }, // 璁剧疆宸查�氱煡鍗搁夯id鏁扮粍 setLocalStorageOffNarcosisIds() { @@ -361,8 +291,24 @@ this.$refs['XioRoomOffNarcosisNotice'].showDialog() }, // 鐐瑰嚮鏄剧ず闅愯棌绉拌皳 - tapAppellationHandle() { - this.isShowAppellationName = !this.isShowAppellationName + // tapAppellationHandle() { + // this.isShowAppellationName = !this.isShowAppellationName + // }, + // 鑾峰彇褰撳墠娌荤枟淇℃伅(鏁扮粍) + getCurTreatArr(ids) { + var arr = [] + if (this.assignTreatList && this.assignTreatList.length) { + this.assignTreatList.forEach((o) => { + if (ids && ids.length) { + ids.forEach((_o) => { + if (_o === o.id) { + arr.push(o) + } + }) + } + }) + } + return arr }, // 鑾峰彇褰撳墠娌荤枟淇℃伅 gatCurTreatInfo() { @@ -394,9 +340,47 @@ roomNo: 'xx', status: 0 // 0绌洪棽 1浣跨敤 2浼戞伅 3鎵撴壂 4 鏁烽夯涓� }, - assignTreatList: [{ - startTime: '2023-12-08 00:00:00' - }], + assignTreatList: [ + { + id: 'a111', + startTime: '2023-12-08 00:00:00', + userName: '榛勫槈鑽�', + gender: 1, + hempStatus: 0, + ciq: '123', + adviserName: 'a鍚�', + aDoctorName: 'b鍚�', + aNurseName: 'c鍚�', + projectName: 'xxxxXXxxx', + userId: '111' + }, + { + id: 'a222', + startTime: '2023-12-08 00:15:00', + userName: '鏉庡痉鍗�', + gender: 1, + hempStatus: 0, + ciq: '456', + adviserName: 'd鍚�', + aDoctorName: 'e鍚�', + aNurseName: 'f鍚�', + projectName: 'xxxxXXxxx', + userId: '222' + }, + { + id: 'a333', + startTime: '2023-12-08 00:20:00', + userName: '鐚涘鍙�', + gender: 2, + hempStatus: 0, + ciq: '789', + adviserName: 'g鍚�', + aDoctorName: 'h鍚�', + aNurseName: 'i鍚�', + projectName: 'xxxxXXxxx', + userId: '333' + } + ], occupyInfo: null } } @@ -483,6 +467,15 @@ this.getData() }) }, + // 鎸夋祦绋嬭缃埧闂寸姸鎬� + setComStatus(opt) { + var { occupyInfoView, roomInfo } = this + console.log(opt.tx, opt.status) + this.changeStatusFn(occupyInfoView, opt.status, () => { + // 鍒锋柊璇︽儏 + this.getData() + }) + }, // 鏀瑰彉鎴块棿鐘舵�佸紓姝ユ柟娉� changeStatusFn(item = {}, status, cb) { var params = {} @@ -523,7 +516,7 @@ // 閲嶇疆榛樿宸蹭娇鐢ㄥ浜虹殑鍙傛暟 isUseDefault = false isUseDefaultChg = 0 - this.isShowAppellationName = true + // this.isShowAppellationName = true } // console.log('8888888888888888888888888888888888', res) cb && cb() @@ -568,12 +561,22 @@ }, // 閫夋嫨瀹㈡埛纭畾 selectCustomerSubmit(opt) { - console.log('submit', opt) + console.log('=======================>submit', opt) // 纭畾閫夋嫨鐨勭敤鎴凤紝璁板綍id localStorage.setItem('curTreatId', opt.id) this.curTreatId = opt.id + if (this.curTreatIds && this.curTreatIds.length) { + var flag = this.curTreatIds.find((o) => { return o === opt.id }) + if (!flag) { + this.curTreatIds.push(opt.id) + } + this.setLocalCurTreatIds() + } + if (this.occupyInfoViewArr && this.occupyInfoViewArr.length) { + this.occupyInfoViewArr.push(opt) + } // 閲嶇疆鎴块棿鐘舵�� - if (this.roomInfo && this.roomInfo.status) { + if (this.roomInfo) { this.changeStatusFn({}, 0, () => { // 鍒锋柊璇︽儏 this.getData() @@ -581,6 +584,10 @@ } // 鍏抽棴寮圭獥 this.$refs['XioCustomerSelect'].hideDialog() + }, + // 璁剧疆鏈湴缂撳瓨ids鏁扮粍 + setLocalCurTreatIds() { + localStorage.setItem('curTreatIds', JSON.stringify(this.curTreatIds)) } } } @@ -597,6 +604,16 @@ .page{ overflow: auto; } +.page_header_placeholer { + height: 100px; +} +.page_header { + position: fixed; + top: 0; + left: 23px; + right: 23px; + z-index: 1; +} .page_header .reset_btn { width: 200px; height: 60px; @@ -610,6 +627,9 @@ cursor: pointer; border: 0; margin-left: 20px; +} +.page_container.over-width { + width: 150%; } .page_container .main { /* height: 100%; */ @@ -792,129 +812,20 @@ width: 100%; height: 100%; } -.page_container .right .guest_title { - height: 60px; - line-height: 28px; - border-radius: 10px 10px 0px 0px; - background-color: rgba(255,255,255,1); - color: rgba(34,123,235,1); - font-size: 20px; - text-align: center; - font-family: Roboto; - font-weight: bold; -} -.page_container .right .guest_block { - background-color: #fff; - overflow: auto; -} -.page_container .right .guest_list { - background-color: #fff; - padding-bottom: 23px; -} -.page_container .right .guest_list__row { - min-height: 75px; - background-color: rgba(34,123,235,0.1); -} -.page_container .right .guest_list__row:nth-child(2n) { - background-color: #fff; -} -.page_container .right .guest_list__row.rowtip { - background-color: #fff; - line-height: 30px; - color: rgba(0,0,0,.5); - font-size: 22px; -} -.page_container .right .guest_list__td {} -.page_container .right .guest_list__td .tx { - line-height: 30px; - color: rgba(16,16,16,1); - 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; - height: 20px; - display: block; -} -.page_container .right .guest_list__td .icon .img { +.page_container .right_block .guest_box { + margin-top: 0; width: 100%; height: 100%; -} -.page_container .right .guest_list__td:nth-child(1) { - width: 19.54%; -} -.page_container .right .guest_list__td:nth-child(2) { - width: 21.86%; -} -.page_container .right .guest_list__td:nth-child(3) { - width: 46.06%; -} -.page_container .right .guest_list__td:nth-child(4) { - width: 12.54%; -} -.page_container .right .room_info { - width: 100%; - border-radius: 10px; - background-color: rgba(255,255,255,0.3); -} -.page_container .right .room_info .staff_box { - margin-top: 30px; -} -.page_container .right .room_info .staff_box_item { - height: 180px; -} -.page_container .right .room_info .staff_box_item:nth-child(1) { - background-color: rgba(255,255,255,0.1); -} -.page_container .right .room_info .staff_box_item:nth-child(2) { - background-color: rgba(255,255,255,0.3); - margin: 0 10px; -} -.page_container .right .room_info .staff_box_item:nth-child(3) { - background-color: rgba(255,255,255,0.1); -} -.page_container .right .room_info .staff_box_item__title { - line-height: 28px; - color: rgba(255,255,255,1); - font-size: 20px; - text-align: center; - font-family: PingFangSC-regular; -} -.page_container .right .room_info .staff_box_item__name { - line-height: 56px; - color: rgba(255,255,255,1); - font-size: 40px; - text-align: center; - font-family: PingFangSC-medium; - margin-top: 5px; -} -.page_container .right .room_info .room_info_project { - padding: 36px 20px 20px 20px; - height: 138px; - box-sizing: border-box; - overflow: hidden; -} -.page_container .right .room_info .room_info_project_block { - box-sizing: border-box; - width: 100%; - height: 100%; - overflow: auto; -} -.page_container .right .room_info .room_info_project .tx { - line-height: 39px; - color: rgba(255,255,255,1); - font-size: 28px; - text-align: center; - font-family: PingFangSC-regular; -} -.page_container .right .guest_box { - margin-top: 65px; - width: 100%; - height: 345px; - background-color: #fff; - overflow: hidden; + -webkit-flex-flow: column; + flex-flow: column; + display: box; + display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */ + display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */ + display: -ms-flexbox; /* TWEENER - IE 10 */ + display: -webkit-flex; /* NEW - Chrome */ + display: -moz-flex; + display: -ms-flex; + display: -o-flex; + display: flex; } </style> -- Gitblit v1.8.0