HospitalServiceHome.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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 style="position: absolute; top: 60px; left: 30px; right: 30px; background: white; border-radius: 10px; padding-bottom: 20px">
  134. <div style="margin: 20px 0 20px 20px;font-size: 15px; font-weight: bold; padding-bottom: 10px; border-bottom: 1px solid gray">投诉与建议</div>
  135. <van-field required v-model="complaintsAndSuggestions.department" label="投诉科室"></van-field>
  136. <van-field required v-model="complaintsAndSuggestions.object" label="投诉对象"></van-field>
  137. <van-field required v-model="complaintsAndSuggestions.content" label="投诉与建议"></van-field>
  138. <van-field required v-model="complaintsAndSuggestions.contact" label="联系方式"></van-field>
  139. <van-field v-model="complaintsAndSuggestions.name" label="您的姓名"></van-field>
  140. <div style="display: flex; margin-top: 30px">
  141. <div style="width: 50%; padding: 12px">
  142. <van-button block @click="showComplaintsAndSuggestions = false">取消</van-button>
  143. </div>
  144. <div style="width: 50%; padding: 12px">
  145. <van-button block type="primary" @click="confirmComplaints">提交</van-button>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </window-size>
  151. </template>
  152. <script>
  153. import {computed, onMounted, reactive, ref} from 'vue'
  154. import store from '../../store'
  155. import {getDate} from '../../utils/date'
  156. import router from '../../router'
  157. import axios from 'axios'
  158. import {Dialog, Toast} from "vant";
  159. import {submitComplaintsAndSuggestions} from "../../api/assessments";
  160. export default {
  161. setup() {
  162. const windowSize = store.state.windowSize
  163. const swipeStyle = {
  164. width: '90%',
  165. marginLeft: '5%',
  166. marginTop: '5px',
  167. height: windowSize.h - 460 + 'px',
  168. h: windowSize.h - 460,
  169. w: windowSize.w * 0.9,
  170. }
  171. const swipeRowStyle = {
  172. width: '100%',
  173. height: swipeStyle.h / 3 - 5 + 'px',
  174. marginBottom: '5px',
  175. borderRadius: '8px',
  176. backgroundColor: '#00525e',
  177. backgroundImage: 'linear-gradient(to bottom right, #03a0b8, #00525e)',
  178. display: 'flex',
  179. h: swipeStyle.h / 3 - 5,
  180. color: 'white',
  181. }
  182. const loadingStyle = {
  183. position: 'fixed',
  184. top: 400 + swipeStyle.h / 2 - 32 + 'px',
  185. left: 0,
  186. right: 0,
  187. bottom: '50px',
  188. }
  189. const portraitHeight = swipeRowStyle.h - 10 + 'px'
  190. const portraitWidth = swipeRowStyle.h * 0.65 + 'px'
  191. const infoStyle = {
  192. width: swipeStyle.w - swipeRowStyle.h * 0.65 - 10 + 'px',
  193. height: '32px',
  194. fontSize: '13px',
  195. fontWeight: 'bold',
  196. marginLeft: '10px',
  197. marginTop: swipeRowStyle.h / 2 - 20 + 'px',
  198. }
  199. const specialtyStyle = {
  200. overflow: 'hidden',
  201. textOverflow: 'ellipsis',
  202. whiteSpace: 'nowrap',
  203. fontSize: '12px',
  204. fontWeight: 'normal',
  205. paddingRight: '15px',
  206. }
  207. const cards = computed(() => {
  208. return store.state.patientCards
  209. })
  210. const filterPath = (singleCardPath, multipleCardsPath) => {
  211. return cards.value.length === 1 ? singleCardPath + cards.value[0].patientId : multipleCardsPath
  212. }
  213. const defaultPatientId = computed(() => {
  214. if (cards.value.length === 0) {
  215. return '未绑卡'
  216. }
  217. if (cards.value.length === 1) {
  218. return cards.value[0].patientId
  219. }
  220. for (let i = 0; i < cards.value.length; i++) {
  221. if (cards.value[i].isDefault === 1) {
  222. return cards.value[i].patientId
  223. }
  224. }
  225. })
  226. const doctors = computed(() => {
  227. return store.state.homePageDoctors
  228. })
  229. const date = getDate()
  230. const clickDoctor = (val) => {
  231. const path = '/doctorArrangement/' + date + '/' + val.deptCode + '/' + val.doctorCode
  232. router.push(path)
  233. }
  234. const routeTo = (val) => {
  235. router.push(val)
  236. }
  237. const toVaccinateAppointment = () => {
  238. if (cards.value.length === 1) {
  239. window.open('http://www.hnthyy.cn:8080/covidVaccinate/' + cards.value[0].patientId, '_self')
  240. } else {
  241. router.push('/selectCovidVaccinatePatient')
  242. }
  243. }
  244. const toybdzpz = () => {
  245. store.commit('SET_LOADING', true)
  246. window.location.href =
  247. 'https://mp.weixin.qq.com/insurance/card/creditjump?cityid=430100&from=u1ZYLGrYTJspxoHAQoU96w.%3D#wechat_redirect'
  248. }
  249. const todzjkk = () => {
  250. router.push('/electronicHealthCardHome')
  251. }
  252. const showComplaintsAndSuggestions = ref(false)
  253. const complaintsAndSuggestions = reactive({
  254. openId: localStorage.getItem('openId'),
  255. department: null,
  256. object: null,
  257. content: null,
  258. contact: null,
  259. name: null,
  260. })
  261. const clickComplaintsAndSuggestions = () => {
  262. showComplaintsAndSuggestions.value = true
  263. }
  264. const confirmComplaints = () => {
  265. submitComplaintsAndSuggestions(complaintsAndSuggestions).then(res => {
  266. showComplaintsAndSuggestions.value = false
  267. Dialog.alert({
  268. title: '提示',
  269. message: '提交成功!',
  270. })
  271. })
  272. }
  273. const loading = ref(false)
  274. onMounted(() => {
  275. if (doctors.value.length === 0) {
  276. loading.value = true
  277. const url = import.meta.env.VITE_BASE_URL + '/homepage/selectHomePageDoctors'
  278. axios({
  279. withCredentials: true,
  280. url: url,
  281. }).then((res) => {
  282. store.commit('SET_HOMEPAGEDOCTORS', res.data.data)
  283. loading.value = false
  284. })
  285. }
  286. })
  287. return {
  288. filterPath,
  289. doctors,
  290. router,
  291. clickDoctor,
  292. swipeStyle,
  293. swipeRowStyle,
  294. portraitHeight,
  295. portraitWidth,
  296. infoStyle,
  297. specialtyStyle,
  298. defaultPatientId,
  299. routeTo,
  300. toVaccinateAppointment,
  301. loadingStyle,
  302. loading,
  303. toybdzpz,
  304. todzjkk,
  305. showComplaintsAndSuggestions,
  306. complaintsAndSuggestions,
  307. clickComplaintsAndSuggestions,
  308. confirmComplaints
  309. }
  310. },
  311. }
  312. </script>
  313. <style scoped>
  314. .logo-div {
  315. width: 92.5%;
  316. margin-left: 3%;
  317. height: 60px;
  318. line-height: 60px;
  319. display: flex;
  320. justify-content: space-between;
  321. }
  322. .big-box {
  323. margin-top: 10px;
  324. width: 90%;
  325. margin-left: 5%;
  326. height: 70px;
  327. background-size: 100%;
  328. border-radius: 8px;
  329. display: flex;
  330. align-items: center;
  331. }
  332. .hsjctext {
  333. font-size: 36px;
  334. color: rgba(4, 59, 104, 0.9);
  335. font-weight: bold;
  336. padding-left: 8px;
  337. }
  338. .large-icon {
  339. margin-left: 10px;
  340. margin-top: 11px;
  341. }
  342. .xinguanjiance {
  343. background: url('../../assets/hospital-service/xinguanjiancebackground.png') no-repeat !important;
  344. background-size: 100% !important;
  345. }
  346. .bold-text {
  347. font-weight: bold;
  348. }
  349. #router-lane .van-col {
  350. text-align: center;
  351. }
  352. #router-lane img {
  353. width: 32px;
  354. height: 32px;
  355. }
  356. .icon-label {
  357. font-size: 13px;
  358. color: #333;
  359. /* color:#048a9e; */
  360. }
  361. .doctor-loading-box {
  362. position: fixed;
  363. display: inline-block;
  364. width: 120px;
  365. padding: 15px 0;
  366. vertical-align: middle;
  367. background-color: #fff;
  368. border-radius: 4px;
  369. border: 1px solid #ebeef5;
  370. box-shadow: 1px 2px 9px 5px rgba(0, 0, 0, 0.1);
  371. }
  372. </style>