AddContent.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <template>
  2. <div class="symp-wrap">
  3. <div class="choose">
  4. <ul class="addPart">
  5. <li v-for="(item,idx) in dataTrd">
  6. <p class="question">{{idx+1 + '. ' +item.name}}</p>
  7. <Radio v-if="item.controlType==1"
  8. :item="item"
  9. :key="item.id"
  10. @updata="updataData"/>
  11. <CheckBox v-if="item.controlType==2"
  12. :item="item"
  13. :key="item.id"
  14. @updata="updataData"/>
  15. <ComTextArea
  16. v-if="item.controlType == 5"
  17. :item="item"
  18. @updata="updataData"
  19. @changeAreaVal="changeAreaVal($event,idx)"
  20. ></ComTextArea>
  21. <Input v-if="item.controlType==6 || item.controlType==7"
  22. :item="item"
  23. :key="item.id"
  24. @updata="updataData"/>
  25. <template
  26. v-if="item.controlType == 3"
  27. v-for="(part,index) in item.questionDetailList"
  28. >
  29. <MultiLineInput
  30. v-if="item.controlType == 3"
  31. :msg="part.name"
  32. :part="part"
  33. @updata="updataData($event,index,item)"
  34. ></MultiLineInput>
  35. </template>
  36. </li>
  37. </ul>
  38. <div class="thanks">
  39. <p>感谢您的回答,您的病历已经自动生成。</p>
  40. <p>您可以点击预览病历回顾病情;或者点击顶部修改病历采集信息。</p>
  41. <p>如果没有需要修改的内容,请点击提交,医生便能看到您的病历。</p>
  42. </div>
  43. </div>
  44. <div class="foot">
  45. <span class="back" @click="back">{{'返回'+ preName}}</span>
  46. <span class="next" @click="next">预览</span>
  47. </div>
  48. </div>
  49. </template>
  50. <script type="text/javascript">
  51. import ComTextArea from '../common/ComTextArea.vue';
  52. import MultiLineInput from '../common/MultiLineInput.vue';
  53. import Input from '../common/Input.vue';
  54. import Radio from '../common/Radio.vue';
  55. import CheckBox from '../common/CheckBox.vue';
  56. export default {
  57. name: 'AddContent',
  58. props: ['allMoudles','preName'],
  59. data() {
  60. return {
  61. dataTrd: [],
  62. val: ''
  63. }
  64. },
  65. mounted() {
  66. this.dataTrd = this.allMoudles && this.allMoudles.moduleDetailDTOList
  67. // this.dataTrd = [{
  68. // "id": 2,
  69. // "name": "请问您胸痛的部位在哪里?(可多选)",
  70. // "tagName": "胸痛-疼痛部位",
  71. // "type": 1,
  72. // "controlType": 2,
  73. // "itemType": 1,
  74. // "tagType": 1,
  75. // "labelPrefix": "",
  76. // "labelSuffix": "",
  77. // "url": "{imageUrlPrefix}/group1/M01/00/04/wKgC7F0CCWiAQWClAADJ_AlXG1M535.jpg",
  78. // "description": "",
  79. // "exclusionType": 0,
  80. // "questionDetailList": [{
  81. // "id": 1,
  82. // "name": "部位1",
  83. // "description": "部位1简述",
  84. // "questionId": 2,
  85. // "orderNo": 1,
  86. // "exclusion": 0,
  87. // "remark": null
  88. // }, {
  89. // "id": 2,
  90. // "name": "部位2",
  91. // "description": "部位2简述",
  92. // "questionId": 2,
  93. // "orderNo": 2,
  94. // "exclusion": 0,
  95. // "remark": null
  96. // }, {
  97. // "id": 3,
  98. // "name": "部位3",
  99. // "description": "",
  100. // "questionId": 2,
  101. // "orderNo": 3,
  102. // "exclusion": 0,
  103. // "remark": null
  104. // }, {
  105. // "id": 4,
  106. // "name": "部位4",
  107. // "description": "",
  108. // "questionId": 2,
  109. // "orderNo": 4,
  110. // "exclusion": 0,
  111. // "remark": null
  112. // }],
  113. // "questionMapping": [],
  114. // "remark": null
  115. // }, {
  116. // "id": 4,
  117. // "name": "请问您本次疼痛发作的持续时间如何",
  118. // "tagName": "胸痛-持续时间",
  119. // "type": 1,
  120. // "controlType": 1,
  121. // "itemType": 1,
  122. // "tagType": 1,
  123. // "labelPrefix": "",
  124. // "labelSuffix": "",
  125. // "url": "",
  126. // "description": "",
  127. // "exclusionType": 0,
  128. // "questionDetailList": [{
  129. // "id": 9,
  130. // "name": "呈阵发性疼痛",
  131. // "description": "",
  132. // "questionId": 4,
  133. // "orderNo": 1,
  134. // "exclusion": 0,
  135. // "remark": null
  136. // }, {
  137. // "id": 10,
  138. // "name": "呈持续性疼痛,已持续${input_时间}",
  139. // "description": "",
  140. // "questionId": 4,
  141. // "orderNo": 2,
  142. // "exclusion": 0,
  143. // "remark": null
  144. // }, {
  145. // "id": 11,
  146. // "name": "呈一过性疼痛,只痛了一次就不痛了",
  147. // "description": "",
  148. // "questionId": 4,
  149. // "orderNo": 3,
  150. // "exclusion": 0,
  151. // "remark": null
  152. // }],
  153. // "questionMapping": [],
  154. // "remark": null
  155. // }, {
  156. // "id": 5,
  157. // "name": "请问您是否有能缓解疼痛的方法",
  158. // "tagName": "胸痛-缓解方法",
  159. // "type": 1,
  160. // "controlType": 2,
  161. // "itemType": 1,
  162. // "tagType": 1,
  163. // "labelPrefix": "",
  164. // "labelSuffix": "",
  165. // "url": "",
  166. // "description": "",
  167. // "exclusionType": 0,
  168. // "questionDetailList": [{
  169. // "id": 12,
  170. // "name": "休息后可自行缓解",
  171. // "description": "",
  172. // "questionId": 5,
  173. // "orderNo": 1,
  174. // "exclusion": 0,
  175. // "remark": null
  176. // }, {
  177. // "id": 13,
  178. // "name": "服用硝酸甘油后可缓解",
  179. // "description": "",
  180. // "questionId": 5,
  181. // "orderNo": 2,
  182. // "exclusion": 0,
  183. // "remark": null
  184. // }, {
  185. // "id": 14,
  186. // "name": "其他可缓解方法:${input_}",
  187. // "description": "",
  188. // "questionId": 5,
  189. // "orderNo": 3,
  190. // "exclusion": 0,
  191. // "remark": null
  192. // }],
  193. // "questionMapping": [],
  194. // "remark": null
  195. // }, {
  196. // "id": 7,
  197. // "name": "请问您咳嗽有多长时间了?",
  198. // "tagName": "胸痛-时间",
  199. // "type": 1,
  200. // "controlType": 6,
  201. // "itemType": 1,
  202. // "tagType": 1,
  203. // "labelPrefix": "",
  204. // "labelSuffix": "",
  205. // "url": "",
  206. // "description": "",
  207. // "exclusionType": 0,
  208. // "questionDetailList": [],
  209. // "questionMapping": [],
  210. // "remark": null
  211. // }, {
  212. // "id": 8,
  213. // "name": "请问您什么情况下感觉咳嗽加重?(可多选)",
  214. // "tagName": "胸痛-咳嗽加重",
  215. // "type": 1,
  216. // "controlType": 2,
  217. // "itemType": 1,
  218. // "tagType": 1,
  219. // "labelPrefix": "",
  220. // "labelSuffix": "",
  221. // "url": "",
  222. // "description": "",
  223. // "exclusionType": 0,
  224. // "questionDetailList": [{
  225. // "id": 18,
  226. // "name": "晚上",
  227. // "description": "",
  228. // "questionId": 8,
  229. // "orderNo": 1,
  230. // "exclusion": 0,
  231. // "remark": null
  232. // }, {
  233. // "id": 19,
  234. // "name": "白天",
  235. // "description": "",
  236. // "questionId": 8,
  237. // "orderNo": 2,
  238. // "exclusion": 0,
  239. // "remark": null
  240. // }, {
  241. // "id": 20,
  242. // "name": "晨起",
  243. // "description": "",
  244. // "questionId": 8,
  245. // "orderNo": 3,
  246. // "exclusion": 0,
  247. // "remark": null
  248. // }, {
  249. // "id": 21,
  250. // "name": "活动",
  251. // "description": "",
  252. // "questionId": 8,
  253. // "orderNo": 4,
  254. // "exclusion": 0,
  255. // "remark": null
  256. // }, {
  257. // "id": 22,
  258. // "name": "不清楚",
  259. // "description": "",
  260. // "questionId": 8,
  261. // "orderNo": 5,
  262. // "exclusion": 0,
  263. // "remark": null
  264. // }, {
  265. // "id": 23,
  266. // "name": "以上都不是:${input_}",
  267. // "description": "",
  268. // "questionId": 8,
  269. // "orderNo": 6,
  270. // "exclusion": 0,
  271. // "remark": null
  272. // }],
  273. // "questionMapping": [],
  274. // "remark": null
  275. // },{
  276. // "id": 35,
  277. // "name": "请填写您现在的生命体征情况",
  278. // "tagName": "生命体征",
  279. // "type": 52,
  280. // "controlType": 3,
  281. // "itemType": 1,
  282. // "tagType": 1,
  283. // "labelPrefix": "",
  284. // "labelSuffix": "",
  285. // "url": "",
  286. // "description": "",
  287. // "exclusionType": null,
  288. // "questionDetailList": [{
  289. // "id": 28,
  290. // "name": "血压:${number_收缩压/舒张压}mmHg",
  291. // "description": "",
  292. // "questionId": 35,
  293. // "orderNo": 1,
  294. // "exclusion": 0,
  295. // "remark": null
  296. // }, {
  297. // "id": 29,
  298. // "name": "脉搏:${number_} 次/分",
  299. // "description": "",
  300. // "questionId": 35,
  301. // "orderNo": 2,
  302. // "exclusion": 0,
  303. // "remark": null
  304. // }],
  305. // "questionMapping": [],
  306. // "remark": null,
  307. // "prefix": "",
  308. // "suffix": "",
  309. // "moduleId": 4,
  310. // "questionId": 35,
  311. // "flag": "",
  312. // "relationModule": null,
  313. // "relationModuleName": null
  314. // },{
  315. // "id": 34,
  316. // "name": "如有其他补充内容请继续输入",
  317. // "tagName": "补充内容",
  318. // "type": 52,
  319. // "controlType": 5,
  320. // "itemType": 1,
  321. // "tagType": 1,
  322. // "labelPrefix": "",
  323. // "labelSuffix": "",
  324. // "url": "",
  325. // "description": "",
  326. // "exclusionType": null,
  327. // "questionDetailList": [],
  328. // "questionMapping": [],
  329. // "remark": null,
  330. // "prefix": "",
  331. // "suffix": "",
  332. // "moduleId": 4,
  333. // "questionId": 34,
  334. // "flag": "",
  335. // "relationModule": null,
  336. // "relationModuleName": null
  337. // }]
  338. },
  339. methods: {
  340. back() {
  341. this.$emit("back");
  342. },
  343. changeAreaVal(value, idx) {
  344. // console.log(value,idx)
  345. this.val = value
  346. },
  347. next(){
  348. this.$store.commit('setText',{data:this.dataTrd,type:4});
  349. this.$emit('next','preview')
  350. },
  351. setDetail(obj){
  352. this.labelDetail = obj.detail;
  353. this.ppId = obj.ppId;
  354. this.show = true;
  355. },
  356. updateOrig(){
  357. let origin = this.$store.state.diagnose.origin;
  358. // this.dtoList = origin;console.log("更新:",origin)
  359. },
  360. updataData(data,idx,item){
  361. let mapping = this.dataTrd;
  362. if(data.controlType == 3){//多行输入,多了一层需单独处理
  363. let tmpLis = item.questionDetailList
  364. tmpLis.splice(idx,1,data)
  365. // console.log(this.dataTrd,7878)
  366. // this.$store.commit('setDatas',{data:this.checkDatas,pId:this.checkDatas.id,type:this.type,ppId:this.ppId});
  367. // this.$store.commit('setText',{text:msg,pId:this.checkDatas.id,type:this.type,flag:true});
  368. return;
  369. }
  370. for(let i in mapping){
  371. if(mapping[i].id==data.id){
  372. mapping.splice(i,1,data)
  373. }
  374. }
  375. this.$store.commit('setDataAll',data);
  376. },
  377. },
  378. components: {
  379. ComTextArea,
  380. MultiLineInput,
  381. Input,
  382. Radio,
  383. CheckBox
  384. }
  385. }
  386. </script>
  387. <style lang="less" scoped>
  388. @import "../less/base.less";
  389. .symp-wrap {
  390. font-size: 0.3rem;
  391. padding-right: .3rem;
  392. h3 {
  393. color: #000;
  394. margin-bottom: 0.36rem;
  395. }
  396. }
  397. .choose {
  398. padding-bottom: 0.2rem;
  399. .addPart {
  400. li {
  401. margin-bottom: 0.1rem;
  402. }
  403. .question {
  404. margin-bottom: 0.2rem;
  405. font-weight: bold;
  406. }
  407. }
  408. }
  409. .foot{
  410. .dbfooter;
  411. }
  412. .thanks {
  413. font-size: .28rem /* 28/100 */;
  414. color: #666666;
  415. letter-spacing: 0;
  416. text-align: justify;
  417. line-height: .48rem /* 48/100 */;
  418. }
  419. .label{
  420. .label;
  421. }
  422. </style>