doctorItemBox.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. <template>
  2. <view class="doctor_box">
  3. <!-- 正常排班 -->
  4. <view class="docotr_item">
  5. <view class="doctor_item_nav">
  6. <view class="doctor_item_nav_img">
  7. <image :src="doctorItem.PhotoUrl || iconUrl.icon_doctor" mode="widthFix"></image>
  8. </view>
  9. <view class="doctor_item_nav_tit">
  10. <view class="doctor_item_nav_subtit">
  11. <text class="doctor_item_nav_subtit_val">{{doctorItem.DoctorName}}</text>
  12. <text v-if="doctorItem.DoctorTitle || doctorItem.Title" class="doctor_item_nav_subtit_txt">{{doctorItem.DoctorTitle||doctorItem.Title}}</text>
  13. </view>
  14. <view v-if="doctorItem.Spec" class="doctor_item_nav_info">
  15. {{doctorItem.Spec}}
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 院区 -->
  20. <view class="hosList displayFlexRow">
  21. <hosList :hosId="doctorItem.ChoiceHosId" pageType="noFristAuto" @getHosId="getHosId" style="width: 100%;"></hosList>
  22. </view>
  23. <text class="non_schedul_text" v-if="doctorItem.Scheduling && doctorItem.Scheduling.length == 0">暂无排班</text>
  24. <!-- 排班 -->
  25. <view class="scheduling_box" v-for="(schedulItem, schedulIndex) in doctorItem.Scheduling" :key="schedulIndex">
  26. <view class="scheduling_dept_box displayFlexBetween" @click="foldList(schedulIndex)">
  27. <view class="scheduling_deptName_box displayFlexRow">
  28. <view class="backgroundCustom "></view>
  29. <text>{{schedulItem.DeptName}}</text>
  30. </view>
  31. <image class="arrow" :class="{ 'transform_rotate_90': schedulItem.Check }" :src="iconUrl.icon_right"></image>
  32. </view>
  33. <view class="time_list" v-if="schedulItem.Check">
  34. <view class="time_item displayFlexCol" :class="{'time_item_stop': (item.IsHalt==7 && item.WaitLeaveCount <= 0) || item.IsHalt==2}"
  35. v-for="(item, index) in (schedulItem.showAllSchedu ? schedulItem.Data_1 : schedulItem.Data_1_Diy)"
  36. :key="index"
  37. @click="toClinic(item, index, schedulItem)">
  38. <view>{{item.RegDateDiy}}</view>
  39. <view style="margin-top: 12upx;">{{item.WeekName}} {{item.TimeSliceStr}}</view>
  40. <image v-if="item.IsHalt==7" class="time_item_img" :src="iconUrl.full2"></image>
  41. <image v-if="item.IsHalt==2" class="time_item_img" :src="iconUrl.stop"></image>
  42. <image v-if="item.IsHalt == 7 && item.WaitLeaveCount > 0" class="time_item_img" :src="iconUrl.yyghWait"></image>
  43. </view>
  44. <view class="time_item colorCustom" @click.stop="showAll(schedulIndex)" v-if="schedulItem.Data_1 && schedulItem.Data_1.length > 6">
  45. {{schedulItem.showAllSchedu?'收起':'全部排班'}}
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- 组 -->
  51. <view class="docotr_item" v-if="doctorItem.IsGroup" @click="toClinic(null, null, null, 'group')">
  52. <view>
  53. <view class="group_title_box">
  54. <image class="group_top_bg" :src="iconUrl.group_top_bg" mode=""/>
  55. <image class="recommend_yy" :src="iconUrl.recommend_yy" mode=""/>
  56. </view>
  57. <view class="group_content_box displayFlexRow">
  58. <text>吴赞艺诊疗组</text>
  59. </view>
  60. </view>
  61. <text class="non_schedul_text" v-if="doctorItem.Scheduling && doctorItem.Scheduling.length == 0">暂无排班</text>
  62. <!-- 排班 -->
  63. <view class="scheduling_box" v-for="(schedulItem, schedulIndex) in doctorItem.Scheduling" :key="schedulIndex">
  64. <view class="scheduling_dept_box displayFlexBetween" @click.stop="foldList(schedulIndex)">
  65. <view class="scheduling_deptName_box displayFlexRow">
  66. <view class="backgroundCustom "></view>
  67. <text>{{schedulItem.DeptName}}</text>
  68. </view>
  69. <image class="arrow" :class="{ 'transform_rotate_90': schedulItem.Check }" :src="iconUrl.icon_right"></image>
  70. </view>
  71. <view class="time_list" v-if="schedulItem.Check">
  72. <view class="time_item displayFlexCol" :class="{'time_item_stop': (item.IsHalt==7 && item.WaitLeaveCount <= 0) || item.IsHalt==2}"
  73. v-for="(item, index) in (schedulItem.showAllSchedu ? schedulItem.Data_1 : schedulItem.Data_1_Diy)"
  74. :key="index"
  75. @click.stop="toClinic(item, index, schedulItem)">
  76. <view>{{item.RegDateDiy}}</view>
  77. <view style="margin-top: 12upx;">{{item.WeekName}} {{item.TimeSliceStr}}</view>
  78. <image v-if="item.IsHalt==7" class="time_item_img" :src="iconUrl.full2"></image>
  79. <image v-if="item.IsHalt==2" class="time_item_img" :src="iconUrl.stop"></image>
  80. <image v-if="item.IsHalt == 7 && item.WaitLeaveCount > 0" class="time_item_img" :src="iconUrl.yyghWait"></image>
  81. </view>
  82. <view class="time_item colorCustom" @click.stop="showAll(schedulIndex)" v-if="schedulItem.Data_1 && schedulItem.Data_1.length > 6">
  83. {{schedulItem.showAllSchedu?'收起':'全部排班'}}
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 显示医生详情 -->
  90. <view class="doctor_info_alert" v-if="doctorAlert">
  91. <view style="height:100%; ">
  92. <view class="pop_box box_radius displayFlexRow">
  93. <text class="tit">{{doctorItem.DoctorName}}</text>
  94. <image class="arrow_icon" :src="iconUrl.ic_selectiondepartment_search_del" @click="hideDoctorInfo"></image>
  95. </view>
  96. <view class="doctor_info_alert_main">
  97. <view class="doctor_info_item">
  98. <text>科室:</text>
  99. <text>{{doctorItem.DeptName}}</text>
  100. </view>
  101. <view class="doctor_info_item">
  102. <text>职称:</text>
  103. <text>{{doctorItem.Title}}</text>
  104. </view>
  105. <view class="doctor_info_item">
  106. <text>擅长:</text>
  107. <text>{{doctorItem.Spec}}</text>
  108. </view>
  109. <view class="doctor_info_item">
  110. <text>介绍:</text>
  111. <text>{{doctorItem.Intro}}</text>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <view class="mask" v-if="doctorAlert" @click="hideDoctorInfo"></view>
  117. </template>
  118. <script setup lang="ts">
  119. import { ref } from 'vue';
  120. import common from '@/utils/common';
  121. import icon from '@/utils/icon';
  122. import hosList from '@/pages/st1/components/hosList/hosList.vue';
  123. import { pagesPatientFn } from '@/utils';
  124. const props = defineProps({
  125. pageType: {
  126. type: String,
  127. default: ""
  128. },
  129. doctorItem: {
  130. type: Object,
  131. default: () => ({})
  132. },
  133. querySchData: {
  134. type: Object,
  135. default: () => ({})
  136. },
  137. tabbarType: {
  138. type: String,
  139. default: ""
  140. },
  141. groupCode: {
  142. type: String,
  143. default: ""
  144. },
  145. groupName: {
  146. type: String,
  147. default: ""
  148. },
  149. groupInfo: {
  150. type: Object,
  151. default: () => ({})
  152. },
  153. yzTag: {
  154. type: Boolean,
  155. default: true
  156. },
  157. });
  158. const emit = defineEmits(['getHosId']);
  159. const iconUrl = ref(icon)
  160. const doctorAlert = ref(false);
  161. const serviceId = ref('');
  162. const today = ref(common.newDay());
  163. /** 折叠列表 */
  164. const foldList = (childIndex: number) => {
  165. if (props.doctorItem.Scheduling && props.doctorItem.Scheduling[childIndex]) {
  166. props.doctorItem.Scheduling[childIndex].Check = !props.doctorItem.Scheduling[childIndex].Check;
  167. }
  168. };
  169. /** 选中的医院Id */
  170. const getHosId = (e: any) => {
  171. emit("getHosId", e);
  172. };
  173. /** 点击医生具体排班时间 */
  174. const toClinic = (item: any, index: any, schedulItem: any, tag?: string) => {
  175. if (tag == "group") {
  176. let groupInfo = props.doctorItem.GroupInfo;
  177. let url = `/pagesPatient/st1/business/yygh/PA-yyghDoctorGroup/PA-yyghDoctorGroup?groupInfo=${encodeURIComponent(JSON.stringify(groupInfo))}&hosId=${props.doctorItem.ChoiceHosId}`;
  178. common.goToUrl(url);
  179. return;
  180. }
  181. // 判断(约满且无候补)或者停诊
  182. if ((item.IsHalt == 7 && item.WaitLeaveCount <= 0) || item.IsHalt == '2') {
  183. return;
  184. }
  185. /**判断有卡无卡 有无就诊人 有无最后操作就诊人的路径跳转处理 */
  186. pagesPatientFn.handleRouter({ currentTarget: { dataset: { dataitem: item, index: index } } }, 'yyghClinicMsg', serviceId.value, index);
  187. };
  188. /** 点击查看全部排班 */
  189. const showAll = (schedulIndex: number) => {
  190. if (props.doctorItem.Scheduling && props.doctorItem.Scheduling[schedulIndex]) {
  191. props.doctorItem.Scheduling[schedulIndex].showAllSchedu = !props.doctorItem.Scheduling[schedulIndex].showAllSchedu;
  192. }
  193. };
  194. /** 关闭医生详情 */
  195. const hideDoctorInfo = () => {
  196. doctorAlert.value = false;
  197. };
  198. </script>
  199. <style lang="scss" scoped>
  200. /* 弹性布局-横向 */
  201. .displayFlexRow {
  202. display: flex;
  203. flex-direction: row;
  204. justify-content: center;
  205. align-items: center;
  206. }
  207. /* 弹性布局-纵向 */
  208. .displayFlexCol {
  209. display: flex;
  210. flex-direction: column;
  211. justify-content: center;
  212. align-items: center;
  213. }
  214. /* 弹性布局-横向两端对齐 */
  215. .displayFlexBetween {
  216. display: flex;
  217. flex-wrap: wrap;
  218. justify-content: space-between;
  219. align-items: center;
  220. }
  221. /* 弹性布局-靠左 */
  222. .displayFlexLeft {
  223. display: flex;
  224. flex-wrap: wrap;
  225. justify-content: left;
  226. align-items: center;
  227. }
  228. .doctor_item_nav {
  229. display: flex;
  230. position: relative;
  231. padding: 17upx 0;
  232. }
  233. .doctor_item_nav_img {
  234. width: 88.3upx;
  235. height: 88.3upx;
  236. border-radius: 50%;
  237. margin-right: 25upx;
  238. overflow: hidden;
  239. }
  240. .doctor_item_nav_tit {
  241. width: 82%;
  242. }
  243. .doctor_item_nav_subtit_val {
  244. font-size: 32upx;
  245. font-family: PingFang SC;
  246. font-weight: 800;
  247. color: #222326;
  248. margin-right: 12upx;
  249. }
  250. .doctor_item_nav_subtit_txt {
  251. height: 36upx;
  252. line-height: 28upx;
  253. font-size: 24upx;
  254. font-family: PingFang SC;
  255. color: var(--auxiliaryColor);
  256. padding: 0upx 7upx;
  257. position: relative;
  258. display: inline-block;
  259. background: #FFFBF4;
  260. border: 1upx solid #FADAB2;
  261. }
  262. .doctor_item_nav_info {
  263. font-size: 28upx;
  264. font-family: Source Han Sans CN;
  265. font-weight: 500;
  266. color: #62626D;
  267. line-height: 40upx;
  268. margin-top: 10upx;
  269. overflow: hidden;
  270. text-overflow: ellipsis;
  271. display: -webkit-box;
  272. -webkit-line-clamp: 2;
  273. line-clamp: 2;
  274. -webkit-box-orient: vertical;
  275. }
  276. /* 排班 */
  277. .scheduling_dept_box {
  278. margin: 24upx 0 12upx;
  279. }
  280. .scheduling_deptName_box view {
  281. width: 14upx;
  282. height: 14upx;
  283. border-radius: 14upx;
  284. margin-right: 20upx;
  285. background: #3164fe;
  286. }
  287. .scheduling_deptName_box text {
  288. font-size: 32upx;
  289. color: #333;
  290. }
  291. .time_list {
  292. display: flex;
  293. flex-wrap: wrap;
  294. align-items: center;
  295. }
  296. .time_item {
  297. margin: 23upx 2% 0 0;
  298. width: 32%;
  299. height: 110upx;
  300. line-height: 110upx;
  301. background: #F1F1F6;
  302. border-radius: 20upx;
  303. font-size: 28upx;
  304. color: #222326;
  305. text-align: center;
  306. position: relative;
  307. }
  308. .time_item:nth-child(3n){
  309. margin-right: 0;
  310. }
  311. .time_item_img {
  312. width: 61upx;
  313. height: 54upx;
  314. position: absolute;
  315. right: 0;
  316. top: 0;
  317. }
  318. .time_item_stop view{
  319. color: #8A8A99;
  320. }
  321. .transform_rotate_90 {
  322. transform: rotate(90deg) !important;
  323. }
  324. .arrow {
  325. width: 14upx;
  326. height: 23upx;
  327. margin-right: 30upx;
  328. }
  329. .doctor_box {
  330. width: 100%;
  331. }
  332. .docotr_item {
  333. width: 100%;
  334. padding: 30upx;
  335. box-sizing: border-box;
  336. margin-bottom: 30upx;
  337. background: white;
  338. border-radius: 24upx;
  339. position: relative;
  340. }
  341. .doctor_info {
  342. margin-bottom: 15upx;
  343. justify-content: flex-start;
  344. align-items: flex-end;
  345. }
  346. .doctor_info text:nth-child(1) {
  347. font-size: 36upx;
  348. color: #222326;
  349. font-weight: bold;
  350. margin-right: 16upx;
  351. }
  352. .doctor_info text:nth-child(2) {
  353. height: 40upx;
  354. line-height: 40upx;
  355. font-size: 24upx;
  356. font-family: PingFang SC;
  357. color: #d18e09;
  358. padding: 0upx 13upx;
  359. position: relative;
  360. display: inline-block;
  361. background: #FFFBF4;
  362. }
  363. .overdue::after {
  364. content: "";
  365. position: absolute;
  366. top: -50%;
  367. bottom: -50%;
  368. left: -50%;
  369. right: -50%;
  370. width: 200%;
  371. height: 200%;
  372. -webkit-transform: scale(0.5);
  373. transform: scale(0.5);
  374. border: solid 1px #e9dab9;
  375. border-radius: 4px;
  376. box-sizing: border-box;
  377. }
  378. .non_schedul_text {
  379. display: block;
  380. width: 100%;
  381. padding: 30upx 0;
  382. box-sizing: border-box;
  383. font-size: 30upx;
  384. color: #666;
  385. text-align: center;
  386. }
  387. .non_schedul {
  388. padding: 30upx;
  389. box-sizing: border-box;
  390. font-size: 30upx;
  391. color: #999;
  392. }
  393. /* 组 */
  394. .group_title_box {
  395. width: 100%;
  396. height: 80upx;
  397. position: relative;
  398. }
  399. .group_top_bg {
  400. width: 100%;
  401. height: 100%;
  402. }
  403. .recommend_yy {
  404. width: 150upx;
  405. height: 34upx;
  406. position: absolute;
  407. left: 30upx;
  408. bottom: 14upx;
  409. z-index: 1;
  410. }
  411. .group_content_box {
  412. padding: 30upx;
  413. padding-bottom: 0;
  414. box-sizing: border-box;
  415. justify-content: flex-start;
  416. }
  417. .group_content_box text {
  418. font-size: 30upx;
  419. font-weight: bold;
  420. }
  421. /* 医生详情框 */
  422. .doctor_info_alert {
  423. width: 100%;
  424. height: 75%;
  425. position: fixed;
  426. left: 0;
  427. bottom: 0upx;
  428. z-index: 26;
  429. background-color: #fff;
  430. border-radius: 20upx 20upx 0 0;
  431. }
  432. .doctor_info_alert_main {
  433. height: 90%;
  434. padding: 30upx;
  435. padding-top: 15upx;
  436. box-sizing: border-box;
  437. overflow: auto;
  438. }
  439. .pop_box {
  440. width: 100%;
  441. height: 10%;
  442. position: relative;
  443. background: white;
  444. padding: 0 30upx;
  445. position: relative;
  446. }
  447. .pop_box .tit {
  448. font-size: 36upx;
  449. font-weight: bold;
  450. }
  451. .pop_box .arrow_icon {
  452. width: 30upx;
  453. height: 30upx;
  454. position: absolute;
  455. top: 50%;
  456. right: 40upx;
  457. margin-top: -15upx;
  458. }
  459. .box_radius {
  460. border-radius: 20upx 20upx 0 0;
  461. }
  462. .pop-box,
  463. .doctor_info_item text:nth-child(1) {
  464. font-size: 32upx;
  465. font-family: PingFang SC;
  466. font-weight: bold;
  467. color: #333;
  468. }
  469. .pop-box .tit {
  470. display: inline-block;
  471. width: 100%;
  472. line-height: 100upx;
  473. font-size: 36upx;
  474. font-family: PingFang SC;
  475. font-weight: bold;
  476. color: #333;
  477. text-align: center;
  478. }
  479. .pop-box image {
  480. width: 30upx;
  481. height: 30upx;
  482. position: absolute;
  483. top: 50%;
  484. right: 30upx;
  485. margin-top: -15upx;
  486. }
  487. .doctor_info_item {
  488. margin-bottom: 30upx;
  489. }
  490. .doctor_info_item text:nth-child(2) {
  491. font-size: 32upx;
  492. font-family: PingFang SC;
  493. color: #666;
  494. line-height: 48upx;
  495. }
  496. .mask {
  497. z-index: 25;
  498. }
  499. </style>