PathInfo.vue 9.3 KB

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