Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

computer_dialog.vue 36KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121
  1. <template>
  2. <div>
  3. <el-dialog
  4. title="透析上机"
  5. class="newDialog"
  6. :visible.sync="visible"
  7. width="854px"
  8. :modal-append-to-body="false"
  9. >
  10. <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
  11. <multi-select-box
  12. :propsForm="InnerDialogProps"
  13. v-on:dialog-comfirm="innerDialogComfirm"
  14. v-on:dialog-cancle="innerDialogCancle"
  15. ></multi-select-box>
  16. <el-form :model="form" ref="form" label-width="100px">
  17. <el-form-item
  18. label="班次"
  19. v-if="isShowFiled('班次')"
  20. :prop="isName('班次')"
  21. >
  22. <el-select
  23. v-model="form.schedual_type"
  24. placeholder="请选择班次"
  25. @change="changeSchedualType"
  26. >
  27. <el-option
  28. v-for="(item, index) in schedules_type"
  29. :key="index"
  30. :value="item.id"
  31. :label="item.name"
  32. ></el-option>
  33. </el-select>
  34. </el-form-item>
  35. <el-form-item
  36. label="上机床位"
  37. v-if="isShowFiled('上机床位')"
  38. :prop="isName('上机床位')"
  39. :rules="isCheckmust('上机床位')"
  40. >
  41. <el-select v-model="form.bed_id" placeholder="请选择上机床位">
  42. <el-option
  43. v-for="(bed, index) in zone_beds"
  44. :key="index"
  45. :value="bed.id"
  46. :label="bed.number"
  47. ></el-option>
  48. </el-select>
  49. </el-form-item>
  50. <el-form-item
  51. label="上机护士"
  52. v-if="isShowFiled('上机护士')"
  53. prop="nurse_id"
  54. :rules="isCheckmust('上机护士')"
  55. >
  56. <el-select v-model="form.nurse_id" placeholder="请选择上机护士">
  57. <el-option
  58. v-for="(admin, index) in admins"
  59. :key="index"
  60. :value="admin.id"
  61. :label="admin.name"
  62. ></el-option>
  63. </el-select>
  64. </el-form-item>
  65. <el-form-item
  66. label="穿刺者"
  67. v-if="isShowFiled('穿刺者')"
  68. prop="puncture_nurse_id"
  69. >
  70. <el-select
  71. v-model="form.puncture_nurse_id"
  72. placeholder="请选择穿刺护士"
  73. >
  74. <el-option
  75. v-for="(admin, index) in adminRoles"
  76. :key="index"
  77. :value="admin.id"
  78. :label="admin.name"
  79. ></el-option>
  80. </el-select>
  81. </el-form-item>
  82. <el-form-item
  83. label="质控护士"
  84. v-if="isShowFiled('质控护士')"
  85. prop="quality_nurse_id"
  86. :rules="isCheckmust('质控护士')"
  87. >
  88. <el-select
  89. v-model="form.quality_nurse_id"
  90. placeholder="请选择质控护士"
  91. >
  92. <el-option
  93. v-for="(admin, index) in adminRoles"
  94. :key="index"
  95. :value="admin.id"
  96. :label="admin.name"
  97. ></el-option>
  98. </el-select>
  99. </el-form-item>
  100. <el-form-item
  101. label="换药护士"
  102. v-if="isShowFiled('换药护士')"
  103. :prop="isName('换药护士')"
  104. :rules="isCheckmust('换药护士')"
  105. >
  106. <el-select v-model="form.change_nurse" placeholder="换药护士">
  107. <el-option
  108. v-for="(admin, index) in adminRoles"
  109. :key="index"
  110. :value="admin.id"
  111. :label="admin.name"
  112. ></el-option>
  113. </el-select>
  114. </el-form-item>
  115. <el-form-item
  116. label="冲管护士"
  117. v-if="isShowFiled('冲管护士')"
  118. :prop="isName('冲管护士')"
  119. :rules="isCheckmust('冲管护士')"
  120. >
  121. <el-select v-model="form.washpipe_nurse" placeholder="请选择冲管护士">
  122. <el-option
  123. v-for="(admin, index) in admins"
  124. :key="index"
  125. :value="admin.id"
  126. :label="admin.name"
  127. ></el-option>
  128. </el-select>
  129. </el-form-item>
  130. <el-form-item
  131. label="疑难穿刺护士"
  132. v-if="isShowFiled('疑难穿刺护士')"
  133. :prop="isName('疑难穿刺护士')"
  134. :rules="isCheckmust('疑难穿刺护士')"
  135. >
  136. <el-select
  137. v-model="form.difficult_puncture_nurse"
  138. placeholder="请选择疑难穿刺护士"
  139. >
  140. <el-option
  141. v-for="(admin, index) in adminRoles"
  142. :key="index"
  143. :value="admin.id"
  144. :label="admin.name"
  145. ></el-option>
  146. </el-select>
  147. </el-form-item>
  148. <el-form-item
  149. label="新开瘘护士"
  150. v-if="isShowFiled('新开瘘护士')"
  151. :prop="isName('新开瘘护士')"
  152. :rules="isCheckmust('新开瘘护士')"
  153. >
  154. <el-select
  155. v-model="form.new_fistula_nurse"
  156. placeholder="请选择新开瘘护士"
  157. >
  158. <el-option
  159. v-for="(admin, index) in adminRoles"
  160. :key="index"
  161. :value="admin.id"
  162. :label="admin.name"
  163. ></el-option>
  164. </el-select>
  165. </el-form-item>
  166. <el-form-item
  167. label="引血(ml/min)"
  168. v-if="isShowFiled('引血')"
  169. :prop="isName('引血')"
  170. :rules="isCheckmust('引血')"
  171. >
  172. <el-input
  173. type="number"
  174. v-model="form.blood_drawing"
  175. style="width: 200px"
  176. ></el-input>
  177. </el-form-item>
  178. <el-form-item
  179. label="穿刺针"
  180. v-if="isShowFiled('穿刺针')"
  181. :prop="isName('穿刺针')"
  182. :rules="isCheckmust('穿刺针')"
  183. >
  184. <el-input
  185. v-model="form.puncture_needle"
  186. @focus="showInnerDialog('11')"
  187. style="width: 200px"
  188. ></el-input>
  189. </el-form-item>
  190. <el-form-item
  191. label="穿刺方式: "
  192. v-if="isShowFiled('穿刺方式')"
  193. :prop="isName('穿刺方式')"
  194. :rules="isCheckmust('穿刺方式')"
  195. >
  196. <el-input
  197. v-model="form.puncture_way"
  198. readonly
  199. style="width: 200px"
  200. @focus="showInnerDialog('13')"
  201. >
  202. </el-input>
  203. </el-form-item>
  204. <el-form-item
  205. label="透析器:"
  206. v-if="isShowFiled('透析器')"
  207. :prop="isName('透析器')"
  208. :rules="isCheckmust('透析器')"
  209. >
  210. <el-input
  211. v-model="form.dialysis_dialyszers"
  212. style="width: 200px"
  213. @focus="showInnerDialog('7')"
  214. ></el-input>
  215. </el-form-item>
  216. <el-form-item
  217. label="灌流器:"
  218. v-if="isShowFiled('灌流器')"
  219. :prop="isName('灌流器')"
  220. :rules="isCheckmust('灌流器')"
  221. >
  222. <el-input
  223. v-model="form.dialysis_irrigation"
  224. style="width: 200px"
  225. @focus="showInnerDialog('8')"
  226. ></el-input>
  227. </el-form-item>
  228. <el-form-item
  229. label="血管通路:"
  230. v-if="isShowFiled('血管通路')"
  231. prop="blood_access_id"
  232. :rules="isCheckmust('血管通路')"
  233. >
  234. <el-select v-model="form.blood_access_id" placeholder="请选择" @change="changeBloodAccessOpion">
  235. <el-option :key="0" label="请选择" :value="0"></el-option>
  236. <el-option
  237. v-for="(option, index) in blood_access_option"
  238. :key="index + 'i'"
  239. :label="option.name"
  240. :value="option.id"
  241. ></el-option>
  242. </el-select>
  243. </el-form-item>
  244. <el-form-item
  245. label="导管备注:"
  246. :prop="isName('导管备注')"
  247. :rules="isCheckmust('导管备注')"
  248. v-if="isShowFiled('导管备注') && blood_access_option_name!=undefined&&blood_access_option_name.indexOf('置管') !== -1"
  249. >
  250. <el-select @change="dialysisSummarySelectChange" v-model="value2">
  251. <el-option
  252. v-for="(item, index) in summary"
  253. :label="item.text"
  254. :value="item.value"
  255. :key="index"
  256. ></el-option>
  257. </el-select>
  258. </el-form-item>
  259. <el-form-item
  260. :prop="isName('导管备注')"
  261. :rules="isCheckmust('导管备注')"
  262. v-if="isShowFiled('导管备注') && blood_access_option_name!=undefined&&blood_access_option_name.indexOf('置管') !== -1"
  263. >
  264. <el-input
  265. type="textarea"
  266. v-model="form.catheter_operation"
  267. :rows="4"
  268. ></el-input>
  269. </el-form-item>
  270. <el-form-item
  271. label="核酸检测日期:"
  272. style="width: 300px"
  273. :prop="isName('核酸检测日期')"
  274. :rules="isCheckmust('核酸检测日期')"
  275. v-if="isShowFiled('核酸检测日期')"
  276. >
  277. <el-date-picker
  278. type="date"
  279. format="yyyy-MM-dd"
  280. value-format="yyyy-MM-dd"
  281. placeholder="选择时间"
  282. v-model="form.nuclein_date"
  283. style="width: 100%"
  284. ></el-date-picker>
  285. </el-form-item>
  286. <el-form-item
  287. label="上机时间 :"
  288. style="width: 300px"
  289. :prop="isName('上机时间')"
  290. :rules="isCheckmust('上机时间')"
  291. v-if="isShowFiled('上机时间')"
  292. >
  293. <el-date-picker
  294. type="datetime"
  295. format="yyyy-MM-dd HH:mm"
  296. value-format="yyyy-MM-dd HH:mm"
  297. placeholder="选择时间"
  298. v-model="form.start_time"
  299. style="width: 100%"
  300. ></el-date-picker>
  301. </el-form-item>
  302. <el-form-item>
  303. <el-button
  304. v-if="dialysis_order.id == 0"
  305. @click="submit('form')"
  306. type="primary"
  307. :loading="loading"
  308. >执行上机</el-button
  309. >
  310. <el-button v-else type="info" :disabled="true">已上机</el-button>
  311. <el-button
  312. v-if="dialysis_order.id > 0"
  313. type="primary"
  314. @click="editOrder('form')"
  315. >修改上机
  316. </el-button>
  317. </el-form-item>
  318. </el-form>
  319. </el-dialog>
  320. </div>
  321. </template>
  322. <script>
  323. import axios from "axios";
  324. import {
  325. GetSchedualNumber,
  326. PostModifyStartDialysis,
  327. startDialysis,
  328. } from "@/api/dialysis_record";
  329. import { uParseTime } from "@/utils/tools";
  330. import { getDataConfig } from "@/utils/data";
  331. import { parseTime } from "@/utils";
  332. import store from "@/store";
  333. import multiSelectBox from "./MultiSelectBox";
  334. import request from "@/utils/request";
  335. const moment = require("moment");
  336. export default {
  337. name: "ComputerDialog",
  338. components: {
  339. multiSelectBox,
  340. },
  341. data() {
  342. return {
  343. showTxt: "",
  344. hasPermission: true,
  345. zone_beds: [],
  346. visible: false,
  347. loading: false,
  348. template_id: 0,
  349. patient_id: 0,
  350. schedule_date: 0,
  351. start_time: 0,
  352. creator: 0,
  353. form: {
  354. washpipe_nurse: "",
  355. bed_id: "",
  356. nurse_id: "",
  357. start_time: "",
  358. puncture_nurse_id: "",
  359. blood_drawing: 100,
  360. change_nurse: "",
  361. difficult_puncture_nurse: "",
  362. new_fistula_nurse: "",
  363. quality_nurse_id: "",
  364. puncture_needle: "",
  365. puncture_way: "",
  366. dialysis_dialyszers: "",
  367. dialysis_irrigation: "",
  368. blood_access_id: "",
  369. nuclein_date: moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
  370. catheter_operation:""
  371. },
  372. blood_access_option: [],
  373. schedual_type: 0,
  374. schedules_type: [
  375. { id: 1, name: "上午" },
  376. { id: 2, name: "下午" },
  377. { id: 3, name: "晚上" },
  378. ], // 该排班的区里的床位
  379. isPremission: false,
  380. adminRoles: [{ id: 0, name: "请选择" }],
  381. org_id: 0,
  382. punctureNeedleOptions: [],
  383. puncture_ways: [],
  384. InnerDialogProps: {
  385. values: [],
  386. visibility: false,
  387. isShowTextArea: true,
  388. customContent: "",
  389. titles: "",
  390. type: "", // 不同弹框类型,用来匹配数据
  391. },
  392. dialyzers: [],
  393. irrigations: [],
  394. summary:[],
  395. blood_access_option_name:"",
  396. value2:""
  397. };
  398. },
  399. props: {
  400. dialysis_order: {
  401. type: Object,
  402. },
  403. schedule: {
  404. type: Object,
  405. },
  406. admins: {
  407. type: Array,
  408. },
  409. device_numbers: {
  410. type: Array,
  411. },
  412. special_premission: {
  413. type: Array,
  414. },
  415. patient: {
  416. type: Object,
  417. },
  418. stockType: {
  419. type: Array,
  420. default: () => {
  421. return [];
  422. },
  423. },
  424. lastOrder: {
  425. type: Object,
  426. },
  427. },
  428. mounted() {},
  429. created() {
  430. this.template_id = this.$store.getters.xt_user.template_info.template_id;
  431. this.org_id = this.$store.getters.xt_user.template_info.org_id;
  432. this.patient_id = this.$route.query.patient_id;
  433. this.schedule_date = this.$route.query.date;
  434. this.form.nurse_id =
  435. this.dialysis_order.id == 0
  436. ? this.$store.getters.xt_user.user.id
  437. : this.dialysis_order.start_nurse;
  438. this.form.puncture_nurse_id =
  439. this.dialysis_order.id == 0
  440. ? this.$store.getters.xt_user.user.id
  441. : this.dialysis_order.puncture_nurse;
  442. this.form.washpipe_nurse =
  443. this.dialysis_order.id == 0
  444. ? this.$store.getters.xt_user.user.id
  445. : this.dialysis_order.washpipe_nurse;
  446. if (this.form.puncture_nurse_id == 0) {
  447. this.form.puncture_nurse_id = this.$store.getters.xt_user.user.id;
  448. }
  449. if (this.form.change_nurse == 0) {
  450. this.form.change_nurse = this.$store.getters.xt_user.user.id;
  451. }
  452. if (this.form.washpipe_nurse == 0) {
  453. this.form.washpipe_nurse = this.$store.getters.xt_user.user.id;
  454. }
  455. if (this.form.difficult_puncture_nurse == 0) {
  456. this.form.difficult_puncture_nurse = this.$store.getters.xt_user.user.id;
  457. }
  458. if (this.form.new_fistula_nurse == 0) {
  459. this.form.new_fistula_nurse = this.$store.getters.xt_user.user.id;
  460. }
  461. // console.log("dialysis_order9999999999wo", this.dialysis_order);
  462. this.form.puncture_needle = this.dialysis_order.puncture_needle;
  463. this.form.puncture_way = this.dialysis_order.puncture_way;
  464. this.form.dialysis_dialyszers = this.dialysis_order.dialysis_dialyszers;
  465. this.form.dialysis_irrigation = this.dialysis_order.dialysis_irrigation;
  466. this.form.blood_access_id = this.dialysis_order.blood_access_id;
  467. this.blood_access_option_name = this.changeBloodAccessOpion(this.dialysis_order.blood_access_id)
  468. // this.form.schedual_type = this.dialysis_order.schedule_type
  469. // this.schedual_type = this.dialysis_order.schedule_type
  470. // console.log("班次",this.form.schedual_type)
  471. this.punctureNeedleOptions = getDataConfig(
  472. "hemodialysis",
  473. "puncture_needle"
  474. );
  475. this.puncture_ways = getDataConfig("hemodialysis", "puncture_method");
  476. this.blood_access_option = getDataConfig(
  477. "hemodialysis",
  478. "vascular_access_desc"
  479. );
  480. this.summary = getDataConfig('catheter_operation', 'catheter_operation')
  481. },
  482. watch: {
  483. patient: {
  484. handler(newVal) {
  485. this.patient_id = newVal.id;
  486. },
  487. deep: true,
  488. },
  489. "schedule.id": function () {},
  490. "dialysis_order.id": function () {
  491. this.form.nurse_id =
  492. this.dialysis_order.id == 0
  493. ? this.$store.getters.xt_user.user.id
  494. : this.dialysis_order.start_nurse;
  495. this.form.puncture_nurse_id =
  496. this.dialysis_order.id == 0
  497. ? this.$store.getters.xt_user.user.id
  498. : this.dialysis_order.puncture_nurse;
  499. this.form.washpipe_nurse =
  500. this.dialysis_order.id == 0
  501. ? this.$store.getters.xt_user.user.id
  502. : this.dialysis_order.washpipe_nurse;
  503. this.form.change_nurse =
  504. this.dialysis_order.id == 0
  505. ? this.$store.getters.xt_user.user.id
  506. : this.dialysis_order.change_nurse;
  507. this.form.difficult_puncture_nurse =
  508. this.dialysis_order.id == 0
  509. ? this.$store.getters.xt_user.user.id
  510. : this.dialysis_order.difficult_puncture_nurse;
  511. this.form.new_fistula_nurse =
  512. this.dialysis_order.id == 0
  513. ? this.$store.getters.xt_user.user.id
  514. : this.dialysis_order.new_fistula_nurse;
  515. this.form.quality_nurse_id =
  516. this.dialysis_order.id == 0
  517. ? this.$store.getters.xt_user.user.id
  518. : this.dialysis_order.quality_nurse_id;
  519. this.form.puncture_needle = this.dialysis_order.puncture_needle;
  520. this.form.puncture_way = this.dialysis_order.puncture_way;
  521. this.form.dialysis_dialyszers = this.dialysis_order.dialysis_dialyszers;
  522. this.form.dialysis_irrigation = this.dialysis_order.dialysis_irrigation;
  523. this.form.blood_access_id = this.dialysis_order.blood_access_id;
  524. var blood_access_option_name = this.changeBloodAccessOpionOne(this.dialysis_order.blood_access_id)
  525. // this.form.schedual_type = this.dialysis_order.schedule_type
  526. // console.log("8823832323223",this.form.schedual_type)
  527. this.blood_access_option_name = blood_access_option_name
  528. this.form.catheter_operation = this.dialysis_order.catheter_operation
  529. this.form.nuclein_date =
  530. this.dialysis_order.id == 0
  531. ? this.getTimeOne(this.lastOrder.nuclein_date)
  532. : this.getTimeOne(this.dialysis_order.nuclein_date);
  533. var nowDate = new Date();
  534. var nowYear = nowDate.getFullYear();
  535. var nowMonth = nowDate.getMonth() + 1;
  536. var nowDay = nowDate.getDate();
  537. var nowHours = nowDate.getHours();
  538. var nowMinutes = nowDate.getMinutes();
  539. var nowSeconds = nowDate.getSeconds();
  540. var time =
  541. nowYear +
  542. "-" +
  543. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  544. "-" +
  545. (nowDay < 10 ? "0" + nowDay : nowDay) +
  546. " " +
  547. (nowHours < 10 ? "0" + nowHours : nowHours) +
  548. ":" +
  549. (nowMinutes < 10 ? "0" + nowMinutes : nowMinutes);
  550. this.form.start_time =
  551. this.dialysis_order.id == 0
  552. ? time
  553. : this.getTime(this.dialysis_order.start_time, "{y}-{m}-{d} {h}:{i}");
  554. },
  555. admins: function () {
  556. console.log("admins", this.admins);
  557. if (this.admins.length > 0) {
  558. for (let i = 0; i < this.admins.length; i++) {
  559. this.adminRoles.push(this.admins[i]);
  560. }
  561. }
  562. console.log("人员", this.adminRoles);
  563. },
  564. stockType: function () {
  565. console.log("stockType", this.stockType);
  566. var arr = [];
  567. var arrTwo = [];
  568. for (let i = 0; i < this.stockType.length; i++) {
  569. if (this.stockType[i].stock_attribute == 2) {
  570. arr.push(this.stockType[i]);
  571. }
  572. if (this.stockType[i].stock_attribute == 3) {
  573. arrTwo.push(this.stockType[i]);
  574. }
  575. }
  576. var dialyzator = [];
  577. var irrigation = [];
  578. for (let i = 0; i < arr.length; i++) {
  579. for (let j = 0; j < arr[i].GoodInfo.length; j++) {
  580. dialyzator.push(arr[i].GoodInfo[j]);
  581. }
  582. }
  583. this.dialyzers = dialyzator;
  584. for (let i = 0; i < arrTwo.length; i++) {
  585. for (let j = 0; j < arrTwo[i].GoodInfo.length; j++) {
  586. irrigation.push(arrTwo[i].GoodInfo[j]);
  587. }
  588. }
  589. this.irrigations = irrigation;
  590. },
  591. },
  592. computed: {},
  593. methods: {
  594. isName(name) {
  595. let filedList = store.getters.xt_user.fileds;
  596. for (let i = 0; i < filedList.length; i++) {
  597. if (filedList[i].module == 7 && filedList[i].filed_name_cn == name) {
  598. return filedList[i].filed_name;
  599. }
  600. }
  601. },
  602. isCheckmust(name) {
  603. let filedList = store.getters.xt_user.fileds;
  604. for (let i = 0; i < filedList.length; i++) {
  605. if (
  606. filedList[i].module == 7 &&
  607. filedList[i].filed_name_cn == name &&
  608. filedList[i].is_show == 1&&
  609. filedList[i].is_write == 1
  610. ) {
  611. return [{ required: true, message: `请输入${name}` }];
  612. }
  613. if (
  614. name == "穿刺者" ||
  615. name == "质控护士" ||
  616. name == "换药护士" ||
  617. name == "血管通路"
  618. ) {
  619. return [
  620. { required: true, message: `请输入${name}`,trigger: ['blur','change'] },
  621. { required: true, pattern: /^[1-9]\d*$/, message: `请输入${name}`,trigger: ['blur','change'] },
  622. ];
  623. }
  624. }
  625. },
  626. isShowFiled(name) {
  627. var filedList = store.getters.xt_user.fileds;
  628. for (let i = 0; i < filedList.length; i++) {
  629. if (
  630. filedList[i].module == 7 &&
  631. filedList[i].filed_name_cn == name &&
  632. filedList[i].is_show == 1
  633. ) {
  634. return true;
  635. }
  636. }
  637. return false;
  638. },
  639. changeSchedualType: function (schedual_type) {
  640. let ParamsQuery = {};
  641. ParamsQuery["schedual_type"] = schedual_type;
  642. ParamsQuery["record_date"] = this.$route.query.date;
  643. GetSchedualNumber(ParamsQuery).then((response) => {
  644. if (response.data.state == 0) {
  645. return false;
  646. } else {
  647. this.temp_device_numbers = response.data.data.number;
  648. for (
  649. let index = 0;
  650. index < this.temp_device_numbers.length;
  651. index++
  652. ) {
  653. const device_number = this.temp_device_numbers[index];
  654. this.temp_device_numbers[index]["number"] =
  655. device_number["zone_name"] + "-" + device_number["number"];
  656. }
  657. this.zone_beds = this.temp_device_numbers;
  658. this.form.bed_id = this.zone_beds[0].id;
  659. }
  660. });
  661. },
  662. GetSchedualNumber: function () {
  663. let ParamsQuery = {};
  664. ParamsQuery["schedual_type"] = this.schedual_type;
  665. ParamsQuery["record_date"] = this.$route.query.date;
  666. console.log("列表33333333333333333333", ParamsQuery);
  667. // console.log("路由",this.$route.query.date)
  668. GetSchedualNumber(ParamsQuery).then((response) => {
  669. if (response.data.state == 0) {
  670. this.$message.error(response.data.msg);
  671. return false;
  672. } else {
  673. this.temp_device_numbers = response.data.data.number;
  674. for (
  675. let index = 0;
  676. index < this.temp_device_numbers.length;
  677. index++
  678. ) {
  679. const device_number = this.temp_device_numbers[index];
  680. this.temp_device_numbers[index]["number"] =
  681. device_number["zone_name"] + "-" + device_number["number"];
  682. }
  683. this.zone_beds = this.temp_device_numbers;
  684. this.form.bed_id =
  685. this.dialysis_order.id == 0
  686. ? this.schedule.bed_id
  687. : this.dialysis_order.bed_id;
  688. if (this.dialysis_order.id == 0) {
  689. let isFilter = true;
  690. for (let i = 0; i < this.zone_beds.length; i++) {
  691. if (this.zone_beds[i].id == this.schedule.bed_id) {
  692. isFilter = false;
  693. }
  694. }
  695. if (isFilter) {
  696. this.form.bed_id = this.zone_beds[0].id;
  697. }
  698. } else {
  699. for (let i = 0; i < this.device_numbers.length; i++) {
  700. if (this.device_numbers[i].id == this.dialysis_order.bed_id) {
  701. let obj = {};
  702. obj = this.device_numbers[i];
  703. if (
  704. obj["number"].indexOf(this.device_numbers[i]["zone_name"]) ==
  705. -1
  706. ) {
  707. obj["number"] =
  708. this.device_numbers[i]["zone_name"] +
  709. "-" +
  710. this.device_numbers[i]["number"];
  711. }
  712. this.zone_beds.unshift(obj);
  713. this.zone_beds.sort((a, b) => a.id - b.id);
  714. }
  715. }
  716. }
  717. }
  718. });
  719. },
  720. getTime(value, temp) {
  721. if (value != undefined) {
  722. return parseTime(value, temp);
  723. }
  724. return "";
  725. },
  726. getTimeOne(val) {
  727. if (val == "") {
  728. return "";
  729. } else {
  730. return uParseTime(val, "{y}-{m}-{d}");
  731. }
  732. },
  733. show: function (dialysis, lastOrder) {
  734. this.record = dialysis;
  735. this.getPermission();
  736. this.visible = true;
  737. var nowDate = new Date();
  738. var nowYear = nowDate.getFullYear();
  739. var nowMonth = nowDate.getMonth() + 1;
  740. var nowDay = nowDate.getDate();
  741. var nowHours = nowDate.getHours();
  742. var nowMinutes = nowDate.getMinutes();
  743. var nowSeconds = nowDate.getSeconds();
  744. this.form.nuclein_date =
  745. this.dialysis_order.id == 0
  746. ? this.getTimeOne(lastOrder.nuclein_date)
  747. : this.getTimeOne(this.dialysis_order.nuclein_date);
  748. if (this.dialysis_order.id != 0) {
  749. this.form.start_time = this.getTime(
  750. this.dialysis_order.start_time,
  751. "{y}-{m}-{d} {h}:{i}"
  752. );
  753. } else {
  754. this.form.start_time =
  755. nowYear +
  756. "-" +
  757. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  758. "-" +
  759. (nowDay < 10 ? "0" + nowDay : nowDay) +
  760. " " +
  761. (nowHours < 10 ? "0" + nowHours : nowHours) +
  762. ":" +
  763. (nowMinutes < 10 ? "0" + nowMinutes : nowMinutes);
  764. }
  765. console.log("hhahhahahahaha",this.dialysis_order)
  766. if (this.dialysis_order.id == 0) {
  767. let now = new Date();
  768. let hour = now.getHours();
  769. if (hour >= 6 && hour < 12) {
  770. this.schedual_type = 1;
  771. } else if (hour >= 12 && hour < 18) {
  772. this.schedual_type = 2;
  773. } else if (hour >= 18) {
  774. this.schedual_type = 3;
  775. }
  776. } else {
  777. this.form.schedual_type = this.dialysis_order.schedual_type;
  778. this.schedual_type = this.dialysis_order.schedual_type;
  779. }
  780. if (this.dialysis_order.id > 0) {
  781. if (this.dialysis_order.creator == 0) {
  782. this.creator = this.dialysis_order.start_nurse;
  783. } else {
  784. this.creator = this.dialysis_order.creator;
  785. }
  786. }
  787. this.GetSchedualNumber();
  788. },
  789. hide: function () {
  790. this.visible = false;
  791. },
  792. submit: function (formName) {
  793. console.log(this.form,'this.form')
  794. this.$refs.form.validate((valid) => {
  795. if (valid) {
  796. if (this.form.start_time == "" || this.form.start_time == null) {
  797. this.$message.error("开始时间不能为空");
  798. return;
  799. }
  800. console.log(this.dialysis_order);
  801. this.loading = true;
  802. let mode = "1";
  803. var blood_drawing = this.form.blood_drawing.toString();
  804. console.log("质控护士", this.form.quality_nurse_id);
  805. console.log("this.form.nuclein_date", this.form.nuclein_date);
  806. startDialysis(
  807. this.patient_id,
  808. this.schedule_date
  809. ? parseTime(this.schedule_date, "{y}-{m}-{d}")
  810. : parseTime(new Date(), "{y}-{m}-{d}"),
  811. this.form.nurse_id,
  812. this.form.bed_id,
  813. this.form.lood_drawing,
  814. this.form.puncture_nurse_id,
  815. this.form.start_time,
  816. this.schedual_type,
  817. mode,
  818. this.form.washpipe_nurse,
  819. this.form.change_nurse,
  820. this.form.difficult_puncture_nurse,
  821. this.form.new_fistula_nurse,
  822. blood_drawing,
  823. this.form.quality_nurse_id,
  824. this.form.puncture_needle,
  825. this.form.puncture_way,
  826. this.form.dialysis_dialyszers,
  827. this.form.dialysis_irrigation,
  828. this.form.blood_access_id,
  829. this.form.nuclein_date,
  830. this.form.catheter_operation
  831. ).then((rs) => {
  832. this.loading = false;
  833. var resp = rs.data;
  834. if (resp.state == 1) {
  835. var resp_dialysis_order = resp.data.dialysis_order;
  836. var this_order = this.dialysis_order;
  837. for (const key in resp_dialysis_order) {
  838. this.$set(this_order, key, resp_dialysis_order[key]);
  839. }
  840. let orgId = parseInt(sessionStorage.getItem("org_id"));
  841. // axios.get('/api/index/uppatient?org_id='+ orgId + '&admin_user_id='+ this.form.nurse_id + '&patient_id=' + this.patient_id + '&up_time=' + (new Date(this.form.start_time).getTime() / 1000)).then((res) => {
  842. // console.log('res',res.data)
  843. // })
  844. this.hide();
  845. this.$emit("monitor", resp.data.monitor);
  846. this.$message.success("上机成功");
  847. } else {
  848. this.$message.error(resp.msg);
  849. }
  850. });
  851. } else {
  852. return false;
  853. }
  854. });
  855. },
  856. editOrder() {
  857. let ParamsQuery = {};
  858. ParamsQuery["schedual_type"] = this.schedual_type;
  859. ParamsQuery["id"] = this.dialysis_order.id;
  860. ParamsQuery["nurse"] = this.form.nurse_id;
  861. ParamsQuery["bed"] = this.form.bed_id;
  862. ParamsQuery["start_time"] = this.form.start_time;
  863. ParamsQuery["puncture_nurse"] = this.form.puncture_nurse_id;
  864. ParamsQuery["washpipe_nurse"] = this.form.washpipe_nurse;
  865. ParamsQuery["change_nurse"] = this.form.change_nurse;
  866. ParamsQuery["difficult_puncture_nurse"] =
  867. this.form.difficult_puncture_nurse;
  868. ParamsQuery["new_fistula_nurse"] = this.form.new_fistula_nurse;
  869. ParamsQuery["blood_drawing"] = this.form.blood_drawing;
  870. ParamsQuery["quality_nurse"] = this.form.quality_nurse_id;
  871. ParamsQuery["puncture_needle"] = this.form.puncture_needle;
  872. ParamsQuery["puncture_way"] = this.form.puncture_way;
  873. ParamsQuery["dialysis_dialyszers"] = this.form.dialysis_dialyszers;
  874. ParamsQuery["dialysis_irrigation"] = this.form.dialysis_irrigation;
  875. ParamsQuery["blood_access_id"] = this.form.blood_access_id;
  876. ParamsQuery["nuclein_date"] = this.form.nuclein_date;
  877. ParamsQuery["mode"] = "2";
  878. ParamsQuery['catheter_operation'] = this.form.catheter_operation
  879. if (this.dialysis_order.creator != this.$store.getters.xt_user.user.id) {
  880. ParamsQuery["mode"] = "3";
  881. }
  882. console.log(this.form,'this.form')
  883. this.$refs.form.validate((valid) => {
  884. if (valid) {
  885. PostModifyStartDialysis(ParamsQuery).then((rs) => {
  886. var resp = rs.data;
  887. if (resp.state == 1) {
  888. this.$message.success("修改成功");
  889. this.hide();
  890. var resp_dialysis_order = resp.data.dialysis_order;
  891. var this_order = this.dialysis_order;
  892. for (const key in resp_dialysis_order) {
  893. this.$set(this_order, key, resp_dialysis_order[key]);
  894. this.$emit("assessmentAfterDislysis", resp.data.after);
  895. }
  896. } else {
  897. this.$message.error(resp.msg);
  898. }
  899. });
  900. }else{
  901. return false;
  902. }
  903. })
  904. },
  905. getPermission() {
  906. request
  907. .get("/api/func_per/get", {
  908. params: {
  909. create_url: "/api/dialysis/start_record?mode=1",
  910. modify_url: "/api/start_dialysis/modify?mode=2",
  911. modify_other_url: "/api/start_dialysis/modify?mode=3",
  912. module: 0,
  913. },
  914. })
  915. .then((res) => {
  916. console.log(res);
  917. console.log("上机", this.record);
  918. if (res.data.state == 0) {
  919. this.hasPermission = false;
  920. } else if (res.data.state == 1) {
  921. if (this.record.id != "" && this.record.creater != 0) {
  922. //有数据
  923. if (this.record.creater == this.$store.getters.xt_user.user.id) {
  924. //创建人是自己
  925. if (res.data.data.is_has_modify == false) {
  926. this.hasPermission = false;
  927. this.showTxt = "你没有修改执行上机权限";
  928. }
  929. } else {
  930. //创建人不是自己
  931. if (res.data.data.is_has_modify_other == false) {
  932. this.hasPermission = false;
  933. this.showTxt = "你没有修改他人执行上机权限";
  934. }
  935. }
  936. } else if (this.record.id == "" || this.record.creater == 0) {
  937. if (res.data.data.is_has_create == false) {
  938. this.hasPermission = false;
  939. this.showTxt = "你没有执行上机权限";
  940. }
  941. }
  942. }
  943. });
  944. },
  945. showInnerDialog: function (val) {
  946. console.log("val32323223232323wi", val);
  947. this.InnerDialogProps.visibility = true;
  948. switch (val) {
  949. case "7": // 透析器
  950. for (let i = 0; i < this.dialyzers.length; i++) {
  951. this.dialyzers[i].name = this.dialyzers[i].specification_name;
  952. }
  953. this.InnerDialogProps.values = this.dialyzers;
  954. this.InnerDialogProps.titles = "透析器";
  955. this.InnerDialogProps.type = "dialyzers";
  956. this.InnerDialogProps.selected = this.form.dialysis_dialyszers;
  957. this.InnerDialogProps.isShowTextArea = false;
  958. break;
  959. case "8":
  960. for (let i = 0; i < this.irrigations.length; i++) {
  961. this.irrigations[i].name = this.irrigations[i].specification_name;
  962. }
  963. this.InnerDialogProps.values = this.irrigations;
  964. this.InnerDialogProps.titles = "灌流器";
  965. this.InnerDialogProps.type = "irrigations";
  966. this.InnerDialogProps.selected = this.form.dialysis_irrigation;
  967. this.InnerDialogProps.isShowTextArea = false;
  968. break;
  969. case "11": //穿刺针
  970. this.InnerDialogProps.values = this.punctureNeedleOptions;
  971. this.InnerDialogProps.titles = "穿刺针";
  972. this.InnerDialogProps.type = "puncture_needle";
  973. this.InnerDialogProps.selected = this.form.puncture_needle;
  974. this.InnerDialogProps.isShowTextArea = false;
  975. break;
  976. case "13": // 穿刺方式
  977. this.InnerDialogProps.values = this.puncture_ways;
  978. this.InnerDialogProps.titles = "穿刺方式";
  979. this.InnerDialogProps.type = "puncture_way";
  980. this.InnerDialogProps.selected = this.form.puncture_way;
  981. this.InnerDialogProps.isShowTextArea = false;
  982. break;
  983. }
  984. },
  985. innerDialogComfirm: function (val) {
  986. this.InnerDialogProps.visibility = false;
  987. switch (val.type) {
  988. case "puncture_needle":
  989. this.form.puncture_needle = val.value.join(",");
  990. break;
  991. case "puncture_way":
  992. this.form.puncture_way = val.value.join(",");
  993. break;
  994. case "dialyzers":
  995. this.form.dialysis_dialyszers = val.value.join(",");
  996. break;
  997. case "irrigations":
  998. this.form.dialysis_irrigation = val.value.join(",");
  999. break;
  1000. }
  1001. },
  1002. innerDialogCancle: function () {
  1003. this.InnerDialogProps.visibility = false;
  1004. },
  1005. dialysisSummarySelectChange: function (values) {
  1006. if (this.form.catheter_operation == "") {
  1007. this.form.catheter_operation = values;
  1008. } else {
  1009. if (this.form.catheter_operation.indexOf(values) == -1) {
  1010. if (
  1011. this.form.catheter_operation
  1012. .charAt(this.form.catheter_operation.length - 1)
  1013. .indexOf("。") == -1
  1014. ) {
  1015. this.form.catheter_operation =
  1016. this.form.catheter_operation+ "," + values;
  1017. } else {
  1018. this.form.catheter_operation =
  1019. this.form.catheter_operation + "," + values;
  1020. this.form.catheter_operation =
  1021. this.form.catheter_operation+ values;
  1022. }
  1023. }
  1024. }
  1025. },
  1026. changeBloodAccessOpion(id){
  1027. var name = ""
  1028. for(let i=0;i<this.blood_access_option.length;i++){
  1029. console.log("id9999",this.blood_access_option[i].id)
  1030. if(id == this.blood_access_option[i].id){
  1031. name = this.blood_access_option[i].name
  1032. }
  1033. }
  1034. this.blood_access_option_name = name
  1035. },
  1036. changeBloodAccessOpionOne(id){
  1037. var name = ""
  1038. for(let i=0;i<this.blood_access_option.length;i++){
  1039. console.log("id9999",this.blood_access_option[i].id)
  1040. if(id == this.blood_access_option[i].id){
  1041. name = this.blood_access_option[i].name
  1042. }
  1043. }
  1044. return name
  1045. }
  1046. },
  1047. };
  1048. </script>
  1049. <style scoped>
  1050. .txsj {
  1051. text-align: center;
  1052. margin-bottom: 20px;
  1053. }
  1054. .warnTxt {
  1055. text-align: center;
  1056. margin: 0 auto;
  1057. background: #faa331;
  1058. max-width: 240px;
  1059. padding: 10px 20px;
  1060. border-radius: 4px;
  1061. margin-bottom: 10px;
  1062. color: #fff;
  1063. }
  1064. </style>
  1065. <style lang="scss">
  1066. .newDialog {
  1067. .el-dialog__body {
  1068. padding: 10px 20px 30px;
  1069. }
  1070. }
  1071. </style>