血透系统PC前端

assessmentBeforeDislysisDialog.vue 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. <template>
  2. <el-dialog
  3. title="透前评估"
  4. :visible.sync="isVisibility"
  5. width="70%"
  6. >
  7. <!--<check-box-dialog-->
  8. <!--:propsForm="InnerDialogProps"-->
  9. <!--v-on:dialog-comfirm="innerDialogComfirm"-->
  10. <!--v-on:dialog-cancle="innerDialogCancle"-->
  11. <!--&gt;</check-box-dialog>-->
  12. <multi-select-box
  13. :propsForm="InnerDialogProps"
  14. v-on:dialog-comfirm="innerDialogComfirm"
  15. v-on:dialog-cancle="innerDialogCancle"
  16. ></multi-select-box>
  17. <el-form ref="assessmentBeforeDislysis" :model="assessmentBeforeDislysis" label-width="125px">
  18. <el-row :gutter="20">
  19. <el-col :span="8">
  20. <el-form-item label="透前体重(kg): ">
  21. <el-input type="number" v-model="assessmentBeforeDislysis.weight_before"></el-input>
  22. </el-form-item>
  23. </el-col>
  24. <el-col :span="8">
  25. <el-form-item label="干体重(kg):">
  26. <el-input type="number" v-model="assessmentBeforeDislysis.dry_weight"></el-input>
  27. </el-form-item>
  28. </el-col>
  29. <el-col :span="8">
  30. <el-form-item label="体温(℃):">
  31. <el-input type="number" v-model="assessmentBeforeDislysis.temperature"></el-input>
  32. </el-form-item>
  33. </el-col>
  34. </el-row>
  35. <el-row :gutter="20">
  36. <el-col :span="8">
  37. <el-form-item label="内瘘: ">
  38. <el-input v-model="assessmentBeforeDislysis.internal_fistula" readonly
  39. @focus="showInnerDialog('7')"></el-input>
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="8">
  43. <el-form-item label="内瘘皮肤情况: ">
  44. <el-input v-model="assessmentBeforeDislysis.internal_fistula_skin" readonly
  45. @focus="showInnerDialog('8')"></el-input>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="8">
  49. <el-form-item label="导管: ">
  50. <el-input v-model="assessmentBeforeDislysis.catheter" @focus="showInnerDialog('4')"></el-input>
  51. </el-form-item>
  52. </el-col>
  53. <!--<el-col :span="8">-->
  54. <!--<el-form-item label="附加物重(kg): ">-->
  55. <!--<el-input type="number" v-model="assessmentBeforeDislysis.additional_weight"></el-input>-->
  56. <!--</el-form-item>-->
  57. <!--</el-col>-->
  58. </el-row>
  59. <el-row :gutter="20">
  60. <el-col :span="8">
  61. <el-form-item label="导管打折: ">
  62. <el-select v-model="assessmentBeforeDislysis.catheter_bend">
  63. <el-option label="有" value="1"></el-option>
  64. <el-option label="无" value="2"></el-option>
  65. </el-select>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="8">
  69. <el-form-item label="收缩压(mmhg): ">
  70. <el-input type="number" v-model="assessmentBeforeDislysis.systolic_blood_pressure"></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="8">
  74. <el-form-item label="舒张压(mmhg): ">
  75. <el-input type="number" v-model="assessmentBeforeDislysis.diastolic_blood_pressure"></el-input>
  76. </el-form-item>
  77. </el-col>
  78. </el-row>
  79. <el-row :gutter="20">
  80. <el-col :span="8">
  81. <el-form-item label="脉率(次/分):">
  82. <el-input type="number" v-model="assessmentBeforeDislysis.pulse_frequency"></el-input>
  83. </el-form-item>
  84. </el-col>
  85. <el-col :span="8">
  86. <el-form-item label="血管通路部位: ">
  87. <el-select v-model="assessmentBeforeDislysis.blood_access_part_id">
  88. <el-option v-for="item in blood_access_part" :label="item.name" :value="item.id"
  89. :key="item.id"></el-option>
  90. </el-select>
  91. </el-form-item>
  92. </el-col>
  93. <el-col :span="8">
  94. <el-form-item label="血管通路操作: ">
  95. <el-select v-model="assessmentBeforeDislysis.blood_access_part_opera_id">
  96. <el-option v-for="item in blood_access_part_opera" :label="item.name" :value="item.id"
  97. :key="item.id"></el-option>
  98. </el-select>
  99. </el-form-item>
  100. </el-col>
  101. </el-row>
  102. <el-row :gutter="20">
  103. <el-col :span="8">
  104. <el-form-item label="并发症: ">
  105. <el-input v-model="assessmentBeforeDislysis.complication" @focus="showInnerDialog('5')"></el-input>
  106. </el-form-item>
  107. </el-col>
  108. <el-col :span="8">
  109. <el-form-item label="前次透析后:">
  110. <el-input v-model="assessmentBeforeDislysis.last_post_dialysis" @focus="showInnerDialog('1')"></el-input>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="8">
  114. <el-form-item label="透析期间: ">
  115. <el-input v-model="assessmentBeforeDislysis.dialysis_interphase" @focus="showInnerDialog('2')">></el-input>
  116. </el-form-item>
  117. </el-col>
  118. </el-row>
  119. <el-row :gutter="20">
  120. <el-col :span="8">
  121. <el-form-item label="透析前症状: ">
  122. <el-input v-model="assessmentBeforeDislysis.symptom_before_dialysis"
  123. @focus="showInnerDialog('3')"></el-input>
  124. </el-form-item>
  125. </el-col>
  126. <el-col :span="8">
  127. <el-form-item label="出血: ">
  128. <el-select v-model="assessmentBeforeDislysis.is_hemorrhage">
  129. <el-option label="是" value="1"></el-option>
  130. <el-option label="否" value="2"></el-option>
  131. </el-select>
  132. </el-form-item>
  133. </el-col>
  134. <el-col :span="8" v-if="assessmentBeforeDislysis.is_hemorrhage == 1">
  135. <el-form-item label="出血选项: ">
  136. <div>
  137. <el-input v-model="assessmentBeforeDislysis.hemorrhage" @focus="showInnerDialog('6')"></el-input>
  138. </div>
  139. </el-form-item>
  140. </el-col>
  141. </el-row>
  142. <el-row :gutter="20">
  143. <el-col :span="8" v-if="assessmentBeforeDislysis.is_hemorrhage == 1">
  144. <el-form-item label="其他出血情况: ">
  145. <el-input v-model="assessmentBeforeDislysis.hemorrhage_other"></el-input>
  146. </el-form-item>
  147. </el-col>
  148. </el-row>
  149. <el-row :gutter="20">
  150. <el-col :span="24">
  151. <el-form-item label="备注: ">
  152. <el-input type="textarea" v-model="assessmentBeforeDislysis.remark" :rows="5"></el-input>
  153. </el-form-item>
  154. </el-col>
  155. </el-row>
  156. </el-form>
  157. <span slot="footer" class="dialog-footer">
  158. <el-button @click="handleCancle">取 消</el-button>
  159. <el-button type="primary" @click="handleComfirm">确 定</el-button>
  160. </span>
  161. </el-dialog>
  162. </template>
  163. <script>
  164. import multiSelectBox from './MultiSelectBox'
  165. import {getDataConfig} from '@/utils/data'
  166. import {postAssessmentBeforeDislysis} from "@/api/dialysis"
  167. import {uParseTime} from "@/utils/tools";
  168. export default {
  169. components: {
  170. multiSelectBox,
  171. },
  172. name: "assessment-after-dislysis-dialog",
  173. data() {
  174. return {
  175. isVisibility: false,
  176. actualTreatmentHourShow: new Date(2018, 1, 1, 3, 0),
  177. record_date: '',
  178. cruorOptions: [],
  179. last_dialysis_after: [],
  180. dialysis_interphase: [],
  181. symptom_before_dialysis: [],
  182. catheter: [],
  183. complication: [],
  184. hemorrhage: [],
  185. blood_access_part: [],
  186. blood_access_part_opera: [],
  187. internal_fistula: [],
  188. internal_fistula_skin: [],
  189. isVisibiltyForCruorDialog: false,
  190. assessmentBeforeDislysis: {
  191. catheter_bend: '',
  192. internal_fistula_skin: '',
  193. weight_before: '',
  194. additional_weight: '',
  195. temperature: '',
  196. dry_weight:'',
  197. systolic_blood_pressure: '',
  198. diastolic_blood_pressure: '',
  199. symptom_before_dialysis: '',
  200. pulse_frequency: '',
  201. last_post_dialysis: '',
  202. dialysis_interphase: '',
  203. catheter: '',
  204. complication: '',
  205. remark: '',
  206. blood_access_part_id: '',
  207. blood_access_part_opera_id: '',
  208. internal_fistula: '',
  209. is_hemorrhage: '',
  210. hemorrhage: "",
  211. hemorrhage_other: "",
  212. },
  213. // InnerDialogProps: {
  214. // checkedCities: [],
  215. // values: [],
  216. // visibility: false,
  217. // isShowTextArea: true,
  218. // customData: '',
  219. // titles: '',
  220. // type: '', //不同弹框,用来匹配数据
  221. // }
  222. InnerDialogProps: {
  223. values: [],
  224. visibility: false,
  225. isShowTextArea: true,
  226. customContent: '',
  227. titles: '',
  228. type: '', //不同弹框类型,用来匹配数据
  229. },
  230. };
  231. },
  232. props: {
  233. predialysis_evaluation: { // 透前评估
  234. type: Object,
  235. default: () => {
  236. return {id: 0}
  237. }
  238. },
  239. patient: { // 患者信息
  240. type: Object,
  241. default: () => {
  242. return {id: 0}
  243. }
  244. },
  245. },
  246. methods: {
  247. show() {
  248. this.isVisibility = true;
  249. },
  250. hide() {
  251. this.isVisibility = false;
  252. },
  253. showInnerDialog: function (val) {
  254. this.InnerDialogProps.visibility = true
  255. switch (val) {
  256. case '1': //前次透析后
  257. this.InnerDialogProps.values = this.last_dialysis_after
  258. this.InnerDialogProps.titles = '前次透析后'
  259. this.InnerDialogProps.type = 'last_dialysis_after'
  260. this.InnerDialogProps.selected = this.assessmentBeforeDislysis.last_post_dialysis
  261. this.InnerDialogProps.isShowTextArea = true
  262. break
  263. case '2': //透析期间
  264. this.InnerDialogProps.values = this.dialysis_interphase
  265. this.InnerDialogProps.titles = '透析期间'
  266. this.InnerDialogProps.type = 'dialysis_interphase'
  267. this.InnerDialogProps.selected = this.assessmentBeforeDislysis.dialysis_interphase
  268. this.InnerDialogProps.isShowTextArea = true
  269. break
  270. break
  271. case '3': //透析前症状
  272. this.InnerDialogProps.values = this.symptom_before_dialysis
  273. this.InnerDialogProps.titles = '透析期间'
  274. this.InnerDialogProps.type = 'symptom_before_dialysis'
  275. this.InnerDialogProps.selected = this.assessmentBeforeDislysis.symptom_before_dialysis
  276. this.InnerDialogProps.isShowTextArea = true
  277. break
  278. case '4': //导管
  279. this.InnerDialogProps.values = this.catheter
  280. this.InnerDialogProps.titles = '导管'
  281. this.InnerDialogProps.type = 'catheter'
  282. this.InnerDialogProps.selected = this.assessmentBeforeDislysis.catheter
  283. this.InnerDialogProps.isShowTextArea = true
  284. break
  285. break
  286. case '5': //并发症
  287. this.InnerDialogProps.values = this.complication
  288. this.InnerDialogProps.titles = '并发症'
  289. this.InnerDialogProps.type = 'complication'
  290. this.InnerDialogProps.selected = this.assessmentBeforeDislysis.complication
  291. this.InnerDialogProps.isShowTextArea = true
  292. break
  293. case '6': //出血选项
  294. this.InnerDialogProps.values = this.hemorrhage
  295. this.InnerDialogProps.titles = '出血选项'
  296. this.InnerDialogProps.type = 'hemorrhage'
  297. this.InnerDialogProps.selected = this.assessmentBeforeDislysis.hemorrhage
  298. this.InnerDialogProps.isShowTextArea = false
  299. break
  300. case '7': //内瘘
  301. this.InnerDialogProps.values = this.internal_fistula
  302. this.InnerDialogProps.titles = '内瘘'
  303. this.InnerDialogProps.type = 'internal_fistula'
  304. this.InnerDialogProps.selected = this.assessmentBeforeDislysis.internal_fistula
  305. this.InnerDialogProps.isShowTextArea = false
  306. break
  307. case '8': //内瘘皮肤情况
  308. this.InnerDialogProps.values = this.internal_fistula_skin
  309. this.InnerDialogProps.titles = '内瘘皮肤情况'
  310. this.InnerDialogProps.type = 'internal_fistula_skin'
  311. this.InnerDialogProps.selected = this.assessmentBeforeDislysis.internal_fistula_skin
  312. this.InnerDialogProps.isShowTextArea = false
  313. break
  314. }
  315. }, innerDialogComfirm: function (val) {
  316. this.InnerDialogProps.visibility = false
  317. switch (val.type) {
  318. case 'last_dialysis_after':
  319. this.assessmentBeforeDislysis.last_post_dialysis = val.value.join(',')
  320. break
  321. case 'dialysis_interphase':
  322. this.assessmentBeforeDislysis.dialysis_interphase = val.value.join(',')
  323. break
  324. case 'symptom_before_dialysis':
  325. this.assessmentBeforeDislysis.symptom_before_dialysis = val.value.join(',')
  326. break
  327. case 'catheter':
  328. this.assessmentBeforeDislysis.catheter = val.value.join(',')
  329. break
  330. case 'complication':
  331. this.assessmentBeforeDislysis.complication = val.value.join(',')
  332. break
  333. case 'hemorrhage':
  334. this.assessmentBeforeDislysis.hemorrhage = val.value.join(',')
  335. break
  336. case 'internal_fistula':
  337. this.assessmentBeforeDislysis.internal_fistula = val.value.join(',')
  338. break
  339. case 'internal_fistula_skin':
  340. this.assessmentBeforeDislysis.internal_fistula_skin = val.value.join(',')
  341. break
  342. }
  343. }, innerDialogCancle: function () {
  344. this.InnerDialogProps.visibility = false
  345. }, handleComfirm: function () {
  346. let ParamsQuery = this.assessmentBeforeDislysis;
  347. ParamsQuery["patient"] = this.patient.id;
  348. ParamsQuery["record_date"] = this.record_date;
  349. postAssessmentBeforeDislysis(ParamsQuery).then(response => {
  350. if (response.data.state == 0) {
  351. this.$message.error(response.data.msg);
  352. return false;
  353. } else {
  354. this.$notify({
  355. title: "成功",
  356. message: "提交成功",
  357. type: "success",
  358. duration: 2000
  359. });
  360. let assessment_before_dislysis_resp = response.data.data.assessmentBeforeDislysis;
  361. //prop
  362. var predialysis_evaluation = this.predialysis_evaluation;
  363. for (var index in assessment_before_dislysis_resp) {
  364. // predialysis_evaluation[index] = assessment_before_dislysis_resp[index];
  365. this.$set(predialysis_evaluation, index, assessment_before_dislysis_resp[index])
  366. }
  367. this.hide()
  368. }
  369. });
  370. }, handleCancle: function () {
  371. this.isVisibility = false
  372. },
  373. },
  374. created() {
  375. this.last_dialysis_after = getDataConfig('hemodialysis', 'last_dialysis_after')
  376. this.dialysis_interphase = getDataConfig('hemodialysis', 'dialysis_duration')
  377. this.symptom_before_dialysis = getDataConfig('hemodialysis', 'dialysis_before')
  378. this.catheter = getDataConfig('hemodialysis', 'catheter')
  379. this.complication = getDataConfig('hemodialysis', 'complication')
  380. this.hemorrhage = getDataConfig('hemodialysis', 'hemorrhage')
  381. this.internal_fistula = getDataConfig('hemodialysis', 'internal_fistula')
  382. this.blood_access_part = getDataConfig('hemodialysis', 'vascular_access')
  383. this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
  384. this.internal_fistula_skin = getDataConfig('hemodialysis', 'internal_fistula_skin')
  385. var date = this.$route.query && this.$route.query.date;
  386. this.record_date = uParseTime(date, '{y}-{m}-{d}');
  387. }, watch: {
  388. isVisibility(val) {
  389. },
  390. "predialysis_evaluation.id": function () {
  391. if (this.predialysis_evaluation.id > 0) {
  392. for (var index in this.assessmentBeforeDislysis) {
  393. this.assessmentBeforeDislysis[index] = this.predialysis_evaluation[index];
  394. }
  395. // this.assessmentBeforeDislysis['catheter_bend'] = this.predialysis_evaluation['catheter_bend'].toString()
  396. // this.assessmentBeforeDislysis['is_hemorrhage'] = this.predialysis_evaluation['is_hemorrhage'].toString()
  397. if(this.predialysis_evaluation['catheter_bend'] == 0){
  398. this.assessmentBeforeDislysis['catheter_bend'] = ''
  399. }else{
  400. this.assessmentBeforeDislysis['catheter_bend'] = this.predialysis_evaluation['catheter_bend']+''
  401. }
  402. if(this.predialysis_evaluation['is_hemorrhage'] == 0){
  403. this.assessmentBeforeDislysis['is_hemorrhage'] = ''
  404. }else{
  405. this.assessmentBeforeDislysis['is_hemorrhage'] = this.predialysis_evaluation['is_hemorrhage']+''
  406. }
  407. if(this.predialysis_evaluation['blood_access_part_id'] == 0){
  408. this.assessmentBeforeDislysis['blood_access_part_id'] = ''
  409. }
  410. if(this.predialysis_evaluation['blood_access_part_opera_id'] == 0){
  411. this.assessmentBeforeDislysis['blood_access_part_opera_id'] = ''
  412. }
  413. if(this.predialysis_evaluation['weight_before'] == 0){
  414. this.assessmentBeforeDislysis['weight_before'] = ''
  415. }
  416. if(this.predialysis_evaluation['dry_weight'] == 0){
  417. this.assessmentBeforeDislysis['dry_weight'] = ''
  418. }
  419. if(this.predialysis_evaluation['temperature'] == 0){
  420. this.assessmentBeforeDislysis['temperature'] = ''
  421. }
  422. if(this.predialysis_evaluation['systolic_blood_pressure'] == 0){
  423. this.assessmentBeforeDislysis['systolic_blood_pressure'] = ''
  424. }
  425. if(this.predialysis_evaluation['diastolic_blood_pressure'] == 0){
  426. this.assessmentBeforeDislysis['diastolic_blood_pressure'] = ''
  427. }
  428. if(this.predialysis_evaluation['pulse_frequency'] == 0){
  429. this.assessmentBeforeDislysis['pulse_frequency'] = ''
  430. }
  431. if(this.predialysis_evaluation['pulse_frequency'] == 0){
  432. this.assessmentBeforeDislysis['pulse_frequency'] = ''
  433. }
  434. }
  435. },
  436. }
  437. }
  438. </script>
  439. <style scoped>
  440. </style>