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