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

computer_dialog.vue 38KB

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