PathInfo.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template>
  2. <div class="path-wrap">
  3. <div class="content">
  4. <p class="info">挂号用户信息查询如下:</p>
  5. <div class="con">
  6. <p class="name">
  7. <span>{{pathInfo.patientName}}</span>|
  8. <span>{{pathInfo.patientSex}}</span>|
  9. <span>{{pathInfo.patientAge}}岁</span>
  10. </p>
  11. <p>
  12. <span>挂号科室:</span>
  13. <span>{{pathInfo.hospitalDeptName}}</span>
  14. </p>
  15. <p>
  16. <span>门诊号:</span>
  17. <span>{{pathInfo.recordId}}</span>
  18. <span style="margin-left:.20rem">预约医生:</span>
  19. <span>{{pathInfo.doctorName}}</span>
  20. </p>
  21. <p>
  22. <span>预约时间:</span>
  23. <span>{{time}}</span>
  24. </p>
  25. <p class="already" v-if="type !== 1">{{text[type]}}</p>
  26. </div>
  27. <div class="out-box">
  28. <div class="emery">
  29. <div class="baner">
  30. <p>{{pathInfo.hospitalName}}</p>
  31. <p class="big">智能预问诊</p>
  32. </div>
  33. <div class="inner">
  34. <p>该系统通过智能引导式问诊,帮助医生规范、全面的采集患者的症状、体征、病史等信息,从而实现诊疗流程的优化和配置。</p>
  35. <button @click="getStart">开始</button>
  36. </div>
  37. <!-- <p v-if="type==3">您已完成过一次预问诊,是否再次录入</p> -->
  38. </div>
  39. <div class="child" v-if="child.length>0&&child[0].value==1 && !hideChild">
  40. <div class="baner">
  41. <p>{{pathInfo.hospitalName}}</p>
  42. <p class="big">儿童体质检测</p>
  43. </div>
  44. <div class="inner">
  45. <p>该标准将为0-12岁儿童在为体质辨识及与中医体质相关疾病的预防、养生保健、健康管理提供依据,使体质分类科学化、规范化。</p>
  46. <button>开始</button>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. <Submit
  52. v-if="submit"
  53. :fail="message"
  54. showType="fail"
  55. ></Submit>
  56. </div>
  57. </template>
  58. <script type="text/javascript">
  59. import api from '@utils/api.js'
  60. import Submit from '../common/Submit';
  61. import {getUrlArgObject,setScroll,dateParser} from '@utils/tools.js'
  62. import BScroll from 'better-scroll';
  63. export default {
  64. name:'PathInfo',
  65. data(){
  66. return {
  67. pathInfo:{},
  68. child:[],
  69. type:null, //1-未做过;3-只做过问诊;4-只做过体质辨识;6-都做过
  70. text:{
  71. "3":'您已完成过一次预问诊,是否再次录入',
  72. // "4":'您已完成过一次儿童体质辨识,是否再次录入',
  73. // "6":'您已完成过一次预问诊和儿童体质辨识,是否再次录入',
  74. "6":'您已完成过一次预问诊,是否再次录入',
  75. },
  76. isReady:false,
  77. hideChild:true, //隐藏儿童
  78. submit:false,
  79. scroll:null,
  80. message:'',
  81. time:'',
  82. params:{}
  83. }
  84. },
  85. created(){
  86. this.getPathInfo();
  87. this.getSysConfig();
  88. this.$store.commit('initAllData');//初始化store数据
  89. },
  90. mounted(){
  91. this.$nextTick(()=>{
  92. let scroll = setScroll(BScroll,true,'.path-wrap')
  93. this.scroll = scroll
  94. })
  95. },
  96. methods:{
  97. getPathInfo(){
  98. let query = this.$route.query
  99. let hasQuery = JSON.stringify(query) == '{}'
  100. let tmpTime = dateParser(!hasQuery&&query.recordTime) || (localStorage.getItem('loginParam')&&dateParser(JSON.parse(localStorage.getItem('loginParam')).time))
  101. this.time = tmpTime
  102. const params = {
  103. 'hospitalCode':!hasQuery&&query.hospitalCode||'',
  104. 'hospitalDeptCode':!hasQuery&&query.hospitalDeptCode||'',
  105. 'doctorCode':!hasQuery&&query.doctorCode||'',
  106. 'patientCode':!hasQuery&&query.patientCode||'',
  107. 'recordId':!hasQuery&&query.recordId||'',
  108. 'recordTime':!hasQuery&&query.recordTime||''
  109. }
  110. if(!hasQuery&&query.scan){//扫码进入的
  111. localStorage.removeItem('loginParam')
  112. localStorage.removeItem('loginData')
  113. localStorage.setItem('scan',true)//保存扫码标记
  114. localStorage.setItem('infoParam',JSON.stringify(params))//保存扫码信息,登录进入需删除该参数
  115. }else{//登陆进入的
  116. localStorage.removeItem('infoParam')
  117. localStorage.removeItem('scan')
  118. }
  119. api.getPathInfo(params).then((res)=>{
  120. const result = res.data;
  121. if(result.code==0){
  122. this.pathInfo = result.data;
  123. this.$store.commit('savePathInfo',result.data);
  124. this.recordCheck(); //校验是否填过
  125. this.getAll(); //获取模板
  126. }
  127. })
  128. },
  129. getSysConfig(){
  130. let query = this.$route.query
  131. let hasQuery = JSON.stringify(query) == '{}'
  132. const param = {
  133. 'hospitalCode':!hasQuery&&query.hospitalCode||'',
  134. }
  135. api.getSysConfig(param).then((res)=>{
  136. const result = res.data;
  137. if(result.code==0){
  138. const datas = result.data;
  139. this.child = datas.filter((item)=>{return item.code == "constitution_show"})
  140. this.$store.commit('saveSysConfig',datas)
  141. }
  142. })
  143. },
  144. recordCheck(){
  145. const param = {
  146. 'doctorId':this.pathInfo.doctorId,
  147. 'hospitalDeptId':this.pathInfo.hospitalDeptId,
  148. 'hospitalId':this.pathInfo.hospitalId,
  149. 'inquiryCode':this.pathInfo.recordId,
  150. 'patientId':this.pathInfo.patientId
  151. }
  152. api.recordCheck(param).then((res)=>{
  153. const result = res.data;
  154. if(result.code==0){
  155. this.type = result.data.type;
  156. }
  157. })
  158. },
  159. getAll(){
  160. const param = {
  161. 'age':this.pathInfo.patientAge,
  162. 'relationId':this.pathInfo.selfDeptId,
  163. 'mouduleType':1, //根据科室划分
  164. 'sexType':this.pathInfo.patientSex=='男'?1:(this.pathInfo.patientSex=='女'?2:3),
  165. }
  166. api.getAll(param).then((res)=>{
  167. const result = res.data;
  168. if(result.code==0){
  169. const datas = result.data;
  170. this.$store.commit('saveAll',datas)
  171. let access = datas.filter(item=>item.type == 1).length>0
  172. this.isReady=access
  173. }else{
  174. this.defaultWaring(result.msg)
  175. }
  176. })
  177. },
  178. getStart(){
  179. const pathInfo = this.pathInfo;
  180. if(JSON.stringify(pathInfo)=='{}'){
  181. this.defaultWaring('网络异常请稍后重试');
  182. return
  183. }
  184. if(this.isReady){
  185. // this.$router.push({path:'/tab'})
  186. this.$router.replace({path:'/tab'})
  187. }else{
  188. this.defaultWaring('请先维护症状模块')
  189. }
  190. },
  191. defaultWaring(msg){
  192. this.submit = true
  193. this.message = msg
  194. let timer = setTimeout(() => {
  195. this.submit = false
  196. clearTimeout(timer)
  197. }, 2000);
  198. },
  199. },
  200. components:{
  201. Submit
  202. }
  203. }
  204. </script>
  205. <style lang="less" scoped>
  206. .path-wrap{
  207. font-size: .28rem;
  208. position: absolute;
  209. width: 100%;
  210. height: 100%;
  211. .content {
  212. padding-top: .5rem;
  213. padding-bottom: .2rem;
  214. box-sizing: border-box;
  215. }
  216. .info{
  217. font-size: .32rem;
  218. font-weight: 700;
  219. color: #040428;
  220. margin-left: .6rem;
  221. font-weight: bold;
  222. }
  223. .con{
  224. margin-left: .6rem;
  225. position: relative;
  226. >p{
  227. color: #7C828E;
  228. margin-top: .27rem;
  229. }
  230. .name{
  231. color: #7C828E;
  232. margin-top: .27rem;
  233. span{
  234. margin-right: .08rem;
  235. }
  236. }
  237. .dept{
  238. p{
  239. display: inline-block;
  240. margin-top: .27rem;
  241. span{
  242. color: #7C828E;
  243. }
  244. }
  245. p:first-child{
  246. margin-right: .25rem;
  247. }
  248. }
  249. .already{
  250. position: absolute;
  251. left: 0;
  252. bottom:-.6rem;
  253. color: #7C828E;
  254. }
  255. }
  256. .out-box{
  257. white-space: nowrap;
  258. overflow-x: auto;
  259. padding:0 .15rem .15rem 0;
  260. -webkit-overflow-scrolling: touch;
  261. text-align: center;//隐藏儿童
  262. }
  263. .emery,.child{
  264. display: inline-block;
  265. vertical-align: top;
  266. width:5.1rem;
  267. margin-top: .91rem;
  268. box-sizing: border-box;
  269. .baner{
  270. box-sizing: border-box;
  271. width:100%;
  272. height: 2.3rem;
  273. padding-top: .5rem;
  274. p{
  275. color:#fff;
  276. }
  277. .big{
  278. font-size: .56rem;
  279. margin-top: .12rem;
  280. }
  281. }
  282. .inner{
  283. height: 4.5rem;
  284. box-shadow:-.05rem .05rem .10rem -.04rem #989da3,.05rem .05rem .10rem -.04rem #989da3;
  285. border-radius: 0 0 .20rem .20rem;
  286. padding: .45rem .6rem .6rem;
  287. box-sizing: border-box;
  288. position: relative;
  289. p{
  290. font-size: .24rem;
  291. line-height: .5rem;
  292. white-space: normal;
  293. min-height: 100px;
  294. }
  295. button{
  296. width: 4rem;
  297. height: .88rem;
  298. color: #fff;
  299. font-size: .32rem;
  300. margin: .40rem 0 0 -.05rem;
  301. background: -webkit-gradient(linear, right top, left top, from(#4F8BFF), to(#4F4FFF));
  302. background: -webkit-linear-gradient(right, #4F8BFF, #4F4FFF);
  303. box-shadow: 0 .12rem .24rem 0 rgba(79,129,255,0.40);
  304. border-radius: .44rem;
  305. }
  306. }
  307. }
  308. .emery .baner{
  309. background: url('../images/banerbg@1.5x.png') no-repeat;
  310. background-size: cover;
  311. }
  312. .child .baner{
  313. background: url('../images/childbg@1.5x.png') no-repeat;
  314. background-size: cover;
  315. }
  316. }
  317. </style>