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

computer_dialog.vue 36KB

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