HospitalServiceHome.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. <template>
  2. <window-size :showBackNav="false">
  3. <div class="logo-div">
  4. <div style="display: flex">
  5. <div><img src="../../assets/thyy_logo.png" style="height: 60px"/></div>
  6. <div style="color: #00525e">
  7. <h3>医疗服务平台</h3>
  8. </div>
  9. </div>
  10. <div style="font-size: 13px">
  11. <i class="van-icon van-icon-user-o"></i>
  12. <span style="margin-left: 4px; color: #777" @click="router.push('/myPatientIdCards')">{{
  13. defaultPatientId
  14. }}</span>
  15. </div>
  16. </div>
  17. <div style="position: relative; width: 95%; margin-top: 10px; height: 70px; display: flex">
  18. <div
  19. style="
  20. width: 45%;
  21. margin-left: 5%;
  22. height: 70px;
  23. background-size: 100%;
  24. border-radius: 8px;
  25. display: flex;
  26. align-items: center;
  27. background-image: url('http://staticweb.hnthyy.cn/images/ybdzpzrk.png');
  28. "
  29. @click="toybdzpz"
  30. >
  31. </div>
  32. <div
  33. style="
  34. width: 45%;
  35. margin-left: 5%;
  36. height: 70px;
  37. background-size: 100%;
  38. border-radius: 8px;
  39. display: flex;
  40. align-items: center;
  41. background-image: url('http://staticweb.hnthyy.cn/images/dzjkkrk.png');
  42. "
  43. @click="todzjkk"
  44. >
  45. </div>
  46. </div>
  47. <div id="router-lane">
  48. <div style="height: 10px"></div>
  49. <van-row gutter="5">
  50. <van-col span="6" @click="routeTo('/appointment')">
  51. <img src="../../assets/hospital-service/yuyueguahao.png"/>
  52. <div class="icon-label">预约挂号</div>
  53. </van-col>
  54. <van-col span="6" @click="routeTo('/nightClinic')">
  55. <img src="../../assets/hospital-service/night-clinic.png"/>
  56. <div class="icon-label">夜间门诊</div>
  57. </van-col>
  58. <van-col span="6" @click="routeTo(filterPath('/unPaidList/', '/selectPayPatient'))">
  59. <img src="../../assets/hospital-service/menzhenjiaofei.png"/>
  60. <div class="icon-label">门诊缴费</div>
  61. </van-col>
  62. <van-col span="6" @click="routeTo(filterPath('/checkExamIndex/', '/selectExamPatient'))">
  63. <img src="../../assets/hospital-service/baogaochaxun.png"/>
  64. <div class="icon-label">报告查询</div>
  65. </van-col>
  66. </van-row>
  67. <div style="height: 10px"></div>
  68. <van-row gutter="5">
  69. <van-col span="6" @click="routeTo(filterPath('/inPatientService/', '/selectInpatientCard'))">
  70. <img src="../../assets/hospital-service/zhuyuanfuwu.png"/>
  71. <div class="icon-label">住院服务</div>
  72. </van-col>
  73. <van-col span="6" @click="routeTo(filterPath('/assessments/', '/selectAssessmentPatient'))">
  74. <img src="../../assets/hospital-service/wenjuandiaocha.png"/>
  75. <div class="icon-label">问卷调查</div>
  76. </van-col>
  77. <van-col span="6" @click="routeTo(filterPath('/physicalExamIndex/', '/selectPhysicalExamPatient'))">
  78. <img src="../../assets/hospital-service/tijianbaogao.png"/>
  79. <div class="icon-label">体检报告</div>
  80. </van-col>
  81. <van-col span="6" @click="routeTo(filterPath('/healthCartCategory/', '/selectHealthCartPatient'))">
  82. <img src="../../assets/hospital-service/gouwuche.png"/>
  83. <div class="icon-label">自助预约</div>
  84. </van-col>
  85. </van-row>
  86. <div style="height: 10px"></div>
  87. <van-row gutter="5">
  88. <van-col span="6" @click="routeTo('/onlineConsult')">
  89. <img src="../../assets/hospital-service/online-consult.png"/>
  90. <div class="icon-label">在线咨询</div>
  91. </van-col>
  92. <van-col span="6" @click="routeTo('/selectTargetPatient')">
  93. <img src="../../assets/hospital-service/appointmentmanagement.png"/>
  94. <div class="icon-label">挂号管理</div>
  95. </van-col>
  96. <van-col span="6" @click="routeTo('/selectPriceQueryBranch')">
  97. <img src="../../assets/hospital-service/price-query.png"/>
  98. <div class="icon-label">价格查询</div>
  99. </van-col>
  100. <van-col span="6" @click="clickComplaintsAndSuggestions">
  101. <img src="../../assets/hospital-service/complaints_and_suggestions.png"/>
  102. <div class="icon-label">投诉与建议</div>
  103. </van-col>
  104. </van-row>
  105. </div>
  106. <div style="width: 90%; margin-left: 5%; margin-top: 15px">
  107. <van-tag size="large" type="warning">名医直达</van-tag>
  108. </div>
  109. <div :style="swipeStyle">
  110. <div :style="loadingStyle" v-show="loading">
  111. <van-loading size="24px" type="spinner" vertical></van-loading>
  112. </div>
  113. <van-swipe :autoplay="10000" :show-indicators="false" vertical style="height: 100%">
  114. <van-swipe-item v-for="(arr, index) in doctors" :key="index">
  115. <div :style="swipeRowStyle" v-for="item in arr" :key="item.doctorCode" @click="clickDoctor(item)">
  116. <van-image
  117. round
  118. fit="cover"
  119. style="margin-top: 5px; margin-left: 5px"
  120. :width="portraitWidth"
  121. :height="portraitHeight"
  122. :src="'data:image/png;base64,' + item.portrait"
  123. />
  124. <div :style="infoStyle">
  125. {{ item.doctorName }} | {{ item.deptName }} | {{ item.doctorTitle }}
  126. <div v-show="item.introduction" :style="specialtyStyle">{{ item.introduction }}</div>
  127. </div>
  128. </div>
  129. </van-swipe-item>
  130. </van-swipe>
  131. </div>
  132. <div class="van-overlay" style="z-index: 2001" v-show="showComplaintsAndSuggestions">
  133. <div
  134. style="position: absolute; top: 60px; left: 30px; right: 30px; background: white; border-radius: 10px; padding-bottom: 20px">
  135. <div
  136. style="margin: 20px 0 20px 20px;font-size: 15px; font-weight: bold; padding-bottom: 10px; border-bottom: 1px solid gray">
  137. 投诉与建议
  138. </div>
  139. <van-field required v-model="complaintsAndSuggestions.department" label="投诉科室"></van-field>
  140. <van-field required v-model="complaintsAndSuggestions.object" label="投诉对象"></van-field>
  141. <van-field required v-model="complaintsAndSuggestions.content" label="投诉与建议"></van-field>
  142. <van-field required v-model="complaintsAndSuggestions.contact" label="联系方式"></van-field>
  143. <van-field v-model="complaintsAndSuggestions.name" label="您的姓名"></van-field>
  144. <div style="padding: 0 20px; color: orangered; font-size: 12px">
  145. 我们将在48小时之内和您进行联系,您的建议和意见是我们进步的动力!
  146. </div>
  147. <div style="display: flex; margin-top: 30px">
  148. <div style="width: 50%; padding: 12px">
  149. <van-button block @click="showComplaintsAndSuggestions = false">取消</van-button>
  150. </div>
  151. <div style="width: 50%; padding: 12px">
  152. <van-button block type="primary" @click="confirmComplaints">提交</van-button>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. </window-size>
  158. </template>
  159. <script>
  160. import {computed, onMounted, reactive, ref} from 'vue'
  161. import store from '../../store'
  162. import {getDate} from '../../utils/date'
  163. import router from '../../router'
  164. import axios from 'axios'
  165. import {submitComplaintsAndSuggestions} from "../../api/assessments";
  166. import {showDialog} from "vant";
  167. export default {
  168. setup() {
  169. const screenSize = store.state.screenSize
  170. const swipeStyle = {
  171. width: '90%',
  172. marginLeft: '5%',
  173. marginTop: '5px',
  174. height: screenSize.h - 460 + 'px',
  175. h: screenSize.h - 460,
  176. w: screenSize.w * 0.9,
  177. }
  178. const swipeRowStyle = {
  179. width: '100%',
  180. height: swipeStyle.h / 3 - 5 + 'px',
  181. marginBottom: '5px',
  182. borderRadius: '8px',
  183. backgroundColor: '#00525e',
  184. backgroundImage: 'linear-gradient(to bottom right, #03a0b8, #00525e)',
  185. display: 'flex',
  186. h: swipeStyle.h / 3 - 5,
  187. color: 'white',
  188. }
  189. const loadingStyle = {
  190. position: 'fixed',
  191. top: 400 + swipeStyle.h / 2 - 32 + 'px',
  192. left: 0,
  193. right: 0,
  194. bottom: '50px',
  195. }
  196. const portraitHeight = swipeRowStyle.h - 10 + 'px'
  197. const portraitWidth = swipeRowStyle.h * 0.65 + 'px'
  198. const infoStyle = {
  199. width: swipeStyle.w - swipeRowStyle.h * 0.65 - 10 + 'px',
  200. height: '32px',
  201. fontSize: '13px',
  202. fontWeight: 'bold',
  203. marginLeft: '10px',
  204. marginTop: swipeRowStyle.h / 2 - 20 + 'px',
  205. }
  206. const specialtyStyle = {
  207. overflow: 'hidden',
  208. textOverflow: 'ellipsis',
  209. whiteSpace: 'nowrap',
  210. fontSize: '12px',
  211. fontWeight: 'normal',
  212. paddingRight: '15px',
  213. }
  214. const cards = computed(() => {
  215. return store.state.patientCards
  216. })
  217. const filterPath = (singleCardPath, multipleCardsPath) => {
  218. return cards.value.length === 1 ? singleCardPath + cards.value[0].patientId : multipleCardsPath
  219. }
  220. const defaultPatientId = computed(() => {
  221. if (cards.value.length === 0) {
  222. return '未绑卡'
  223. }
  224. if (cards.value.length === 1) {
  225. return cards.value[0].patientId
  226. }
  227. for (let i = 0; i < cards.value.length; i++) {
  228. if (cards.value[i].isDefault === 1) {
  229. return cards.value[i].patientId
  230. }
  231. }
  232. })
  233. const doctors = computed(() => {
  234. return store.state.homePageDoctors
  235. })
  236. const date = getDate()
  237. const clickDoctor = (val) => {
  238. const path = '/doctorArrangement/' + date + '/' + val.deptCode + '/' + val.doctorCode
  239. router.push(path)
  240. }
  241. const routeTo = (val) => {
  242. router.push(val)
  243. }
  244. const toVaccinateAppointment = () => {
  245. if (cards.value.length === 1) {
  246. window.open('http://www.hnthyy.cn:8080/covidVaccinate/' + cards.value[0].patientId, '_self')
  247. } else {
  248. router.push('/selectCovidVaccinatePatient')
  249. }
  250. }
  251. // 前往医保电子凭证
  252. const toybdzpz = () => {
  253. store.commit('SET_LOADING', true)
  254. window.location.href =
  255. 'https://mp.weixin.qq.com/insurance/card/creditjump?cityid=430100&from=u1ZYLGrYTJspxoHAQoU96w.%3D#wechat_redirect'
  256. }
  257. const todzjkk = () => {
  258. router.push('/electronicHealthCardHome')
  259. }
  260. const showComplaintsAndSuggestions = ref(false)
  261. const complaintsAndSuggestions = reactive({
  262. openId: localStorage.getItem('openId'),
  263. department: null,
  264. object: null,
  265. content: null,
  266. contact: null,
  267. name: null,
  268. })
  269. const clickComplaintsAndSuggestions = () => {
  270. showComplaintsAndSuggestions.value = true
  271. }
  272. const confirmComplaints = () => {
  273. submitComplaintsAndSuggestions(complaintsAndSuggestions).then(res => {
  274. showComplaintsAndSuggestions.value = false
  275. complaintsAndSuggestions.department = null
  276. complaintsAndSuggestions.object = null
  277. complaintsAndSuggestions.content = null
  278. complaintsAndSuggestions.contact = null
  279. complaintsAndSuggestions.name = null
  280. showDialog({
  281. title: '提示',
  282. message: '提交成功!',
  283. }).then(() => {})
  284. })
  285. }
  286. const loading = ref(false)
  287. onMounted(() => {
  288. if (doctors.value.length === 0) {
  289. loading.value = true
  290. const url = import.meta.env.VITE_BASE_URL + '/homepage/selectHomePageDoctors'
  291. axios({
  292. withCredentials: true,
  293. url: url,
  294. }).then((res) => {
  295. store.commit('SET_HOMEPAGEDOCTORS', res.data.data)
  296. loading.value = false
  297. })
  298. }
  299. })
  300. return {
  301. filterPath,
  302. doctors,
  303. router,
  304. clickDoctor,
  305. swipeStyle,
  306. swipeRowStyle,
  307. portraitHeight,
  308. portraitWidth,
  309. infoStyle,
  310. specialtyStyle,
  311. defaultPatientId,
  312. routeTo,
  313. toVaccinateAppointment,
  314. loadingStyle,
  315. loading,
  316. toybdzpz,
  317. todzjkk,
  318. showComplaintsAndSuggestions,
  319. complaintsAndSuggestions,
  320. clickComplaintsAndSuggestions,
  321. confirmComplaints
  322. }
  323. },
  324. }
  325. </script>
  326. <style scoped>
  327. .logo-div {
  328. width: 92.5%;
  329. margin-left: 3%;
  330. height: 60px;
  331. line-height: 60px;
  332. display: flex;
  333. justify-content: space-between;
  334. }
  335. .big-box {
  336. margin-top: 10px;
  337. width: 90%;
  338. margin-left: 5%;
  339. height: 70px;
  340. background-size: 100%;
  341. border-radius: 8px;
  342. display: flex;
  343. align-items: center;
  344. }
  345. .hsjctext {
  346. font-size: 36px;
  347. color: rgba(4, 59, 104, 0.9);
  348. font-weight: bold;
  349. padding-left: 8px;
  350. }
  351. .large-icon {
  352. margin-left: 10px;
  353. margin-top: 11px;
  354. }
  355. .xinguanjiance {
  356. background: url('../../assets/hospital-service/xinguanjiancebackground.png') no-repeat !important;
  357. background-size: 100% !important;
  358. }
  359. .bold-text {
  360. font-weight: bold;
  361. }
  362. #router-lane .van-col {
  363. text-align: center;
  364. }
  365. #router-lane img {
  366. width: 32px;
  367. height: 32px;
  368. }
  369. .icon-label {
  370. font-size: 13px;
  371. color: #333;
  372. /* color:#048a9e; */
  373. }
  374. .doctor-loading-box {
  375. position: fixed;
  376. display: inline-block;
  377. width: 120px;
  378. padding: 15px 0;
  379. vertical-align: middle;
  380. background-color: #fff;
  381. border-radius: 4px;
  382. border: 1px solid #ebeef5;
  383. box-shadow: 1px 2px 9px 5px rgba(0, 0, 0, 0.1);
  384. }
  385. </style>