doubleCheckDialog.vue 44KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154
  1. <template>
  2. <el-dialog title="双人核对"
  3. :visible.sync="isVisibility"
  4. :modal-append-to-body="false"
  5. width="854px">
  6. <el-form :inline="true" class="demo-form-inline newInline" :model="doubleReview" label-width="105px">
  7. <el-form-item label="透析物品核查 : ">
  8. <el-radio v-model="doubleReview.dialysis_item_check" label="1" @change="changeRadio">正确</el-radio>
  9. <!-- <el-radio v-model="doubleReview.dialysis_item_check" label="2">错误</el-radio> -->
  10. </el-form-item>
  11. <el-form-item class="newItem" label="差错描述 : " label-width="90px">
  12. <el-input v-model="doubleReview.dialysis_item_desc"></el-input>
  13. </el-form-item>
  14. </el-form>
  15. <el-form :inline="true" class="demo-form-inline newCheckBox" :model="doubleReview" label-width="110px">
  16. <el-checkbox-group v-model="checkList" @change="changeBox">
  17. <el-checkbox :label="diazes"></el-checkbox>
  18. <el-checkbox :label="puncture_needle"></el-checkbox>
  19. <el-checkbox :label="dialysate_formulation"></el-checkbox>
  20. <el-checkbox :label="kalium"></el-checkbox>
  21. <el-checkbox :label="calcium"></el-checkbox>
  22. </el-checkbox-group>
  23. </el-form>
  24. <el-form :inline="true" class="demo-form-inline newInline" :model="doubleReview" label-width="105px">
  25. <el-form-item label="透析参数核查 : ">
  26. <el-radio v-model="doubleReview.dialysis_parameter_check" label="1" @change="changeRadioTwo">正确</el-radio>
  27. <!-- <el-radio v-model="doubleReview.dialysis_parameter_check" label="2">错误</el-radio> -->
  28. </el-form-item>
  29. <el-form-item class="newItem" label="差错描述 : " label-width="90px">
  30. <el-input v-model="doubleReview.dialysis_parameter_desc"></el-input>
  31. </el-form-item>
  32. </el-form>
  33. <el-form class="newCheckBox">
  34. <el-checkbox-group v-model="checkListOne" @change="changeBoxOne" >
  35. <el-checkbox :label="dialys_mode"></el-checkbox>
  36. <el-checkbox :label="long_time"></el-checkbox>
  37. <el-checkbox :label="target_ultrafiltration"></el-checkbox>
  38. <el-checkbox :label="anticoagulant" ></el-checkbox>
  39. <el-checkbox :label="anticoagulant_shouji"></el-checkbox>
  40. <el-checkbox :label="anticoagulant_weichi"></el-checkbox>
  41. <el-checkbox :label="anticoagulant_zongliang"></el-checkbox>
  42. <el-checkbox :label="displace_liqui_part"></el-checkbox>
  43. <el-checkbox :label="replacement_total"></el-checkbox>
  44. <el-checkbox :label="blood_flow_volume"></el-checkbox>
  45. <el-checkbox :label="dialysate_flow"></el-checkbox>
  46. </el-checkbox-group>
  47. </el-form>
  48. <el-form :inline="true" class="demo-form-inline newInline" :model="doubleReview" label-width="105px">
  49. <el-form-item label="血管通路核查 : ">
  50. <el-radio v-model="doubleReview.vascular_access_verification" label="1" @change="changeRadioThree">正确</el-radio>
  51. <!-- <el-radio v-model="doubleReview.vascular_access_verification" label="2">错误</el-radio> -->
  52. </el-form-item>
  53. <el-form-item class="newItem" label="差错描述 : " label-width="90px">
  54. <el-input v-model="doubleReview.vascular_access_desc"></el-input>
  55. </el-form-item>
  56. </el-form>
  57. <el-form class="newCheckBox">
  58. <el-checkbox-group v-model="checkListTwo" @change="changeBoxTwo">
  59. <el-checkbox :label="blood_access_part_opera_id">
  60. </el-checkbox>
  61. <el-checkbox label="动静脉接错"></el-checkbox>
  62. <el-checkbox label="渗血"></el-checkbox>
  63. <el-checkbox label="压迫" ></el-checkbox>
  64. <el-checkbox label="折叠"></el-checkbox>
  65. <el-checkbox label="滑脱"></el-checkbox>
  66. </el-checkbox-group>
  67. </el-form>
  68. <el-form :inline="true" class="demo-form-inline newInline" :model="doubleReview" label-width="105px">
  69. <el-form-item label="管道连接核查 : ">
  70. <el-radio v-model="doubleReview.pipeline_connection_check" label="1" @change="changeRadioFour">正确</el-radio>
  71. <!-- <el-radio v-model="doubleReview.pipeline_connection_check" label="2">错误</el-radio> -->
  72. </el-form-item>
  73. <el-form-item class="newItem" label="差错描述 : " label-width="90px">
  74. <el-input v-model="doubleReview.pipeline_connection_desc"></el-input>
  75. </el-form-item>
  76. </el-form>
  77. <el-form class="newCheckBox">
  78. <el-checkbox-group v-model="checkListThree" @change="changeBoxThree">
  79. <el-checkbox label="泵前补液测管未夹"></el-checkbox>
  80. <el-checkbox label="肝素管夹未开启"></el-checkbox>
  81. <el-checkbox label="透析器连接错误"></el-checkbox>
  82. <el-checkbox label="动静脉壶页面不标准" ></el-checkbox>
  83. <el-checkbox label="静脉管路未卡入保护夹"></el-checkbox>
  84. <el-checkbox label="压力传感器夹未打开"></el-checkbox>
  85. <el-checkbox label="接口连接松动"></el-checkbox>
  86. <el-checkbox label="管路打折"></el-checkbox>
  87. </el-checkbox-group>
  88. </el-form>
  89. <el-form :inline="true" class="demo-form-inline" :model="doubleReview" label-width="120px">
  90. <el-form-item label="第一核对时间:">
  91. <el-time-picker
  92. v-model="first_check_time"
  93. format='HH:mm'
  94. value-format="HH:mm"
  95. placeholder="请输入核对时间">
  96. </el-time-picker>
  97. </el-form-item>
  98. <el-form-item label="第一核对人员">
  99. <el-select v-model="doubleReview.creater" placeholder="请选择核对人">
  100. <el-option v-for="(admin, index) in admin_users" :key="index" :value="admin.id"
  101. :label="admin.name"></el-option>
  102. </el-select>
  103. </el-form-item>
  104. <el-form-item label="第二核对时间:">
  105. <el-time-picker
  106. v-model="check_time"
  107. format='HH:mm'
  108. value-format="HH:mm"
  109. placeholder="请输入核对时间">
  110. </el-time-picker>
  111. </el-form-item>
  112. <el-form-item label="第二核对人员">
  113. <el-select v-model="doubleReview.modifier" placeholder="请选择核对人">
  114. <el-option v-for="(admin, index) in admin_users" :key="index" :value="admin.id"
  115. :label="admin.name"></el-option>
  116. </el-select>
  117. </el-form-item>
  118. </el-form>
  119. <el-form :inline="true" class="demo-form-inline" :model="doubleReview" label-width="110px">
  120. <p style="margin-left: 13px;margin-top: 10px" v-if="doubleReview.creater != 0">{{getFirstCheckDesc()}}</p>
  121. <p style="margin-left: 13px;margin-top: 10px" v-if="doubleReview.modifier != 0">{{getScondCheckDesc()}}</p>
  122. </el-form>
  123. <div slot="footer" class="dialog-footer">
  124. <el-button @click="handleCancle">取 消</el-button>
  125. <el-button type="primary" @click="handleComfirm">保 存</el-button>
  126. </div>
  127. </el-dialog>
  128. </template>
  129. <script>
  130. import { postDoubleCheck } from '@/api/dialysis'
  131. import { uParseTime } from '@/utils/tools'
  132. import { parseTime } from '@/utils'
  133. import { getDataConfig } from '@/utils/data'
  134. export default {
  135. name: 'doubleCheckDialog',
  136. data() {
  137. return {
  138. isVisibility: false,
  139. time: '',
  140. isClose: false,
  141. check_time: 0,
  142. first_check_time: 0,
  143. doubleReview: {
  144. dialysis_item_check: '1',
  145. dialysis_parameter_check: '1',
  146. vascular_access_verification: '1',
  147. pipeline_connection_check: '1',
  148. dialysis_item_desc: '',
  149. dialysis_parameter_desc: '',
  150. vascular_access_desc: '',
  151. pipeline_connection_desc: '',
  152. collator: '',
  153. creater: this.$store.getters.xt_user.user.id,
  154. modifier: '',
  155. created_time: 0,
  156. updated_time: 0,
  157. check_time: 0,
  158. first_check_time: 0
  159. },
  160. dialysate_formulation_options:[],
  161. record_date: '',
  162. checkList: [],
  163. checkListOne:[],
  164. checkListTwo:[],
  165. checkListThree:[],
  166. diazes:"透析器/灌流器:",
  167. puncture_needle:"穿刺针:",
  168. dialysate_formulation:"透析液配方:",
  169. kalium:"钾:",
  170. calcium:"钙:",
  171. dialys_mode:"透析模式:",
  172. long_time:"透析时长:",
  173. target_ultrafiltration:"目标超滤量:",
  174. anticoagulant:"抗凝剂:",
  175. anticoagulant_shouji:"首剂:",
  176. anticoagulant_weichi:"维持:",
  177. anticoagulant_zongliang:"总量:",
  178. displace_liqui_part:"置换液:",
  179. replacement_total:"置换总量:",
  180. blood_flow_volume:"处方血流量:",
  181. dialysate_flow:"透析液流量:",
  182. blood_access_part_opera_id:"通路类型:"
  183. }
  184. }, methods: {
  185. show() {
  186. console.log(this.double_check)
  187. this.isVisibility = true
  188. if (this.double_check.id > 0) {
  189. this.first_check_time = uParseTime(
  190. this.double_check.first_check_time,
  191. '{y}-{m}-{d} {h}:{i}'
  192. ).split(' ')[1]
  193. if(this.$store.getters.xt_user.user.id == this.double_check.creater || this.double_check.modifier > 0){
  194. if(this.double_check.modifier > 0){
  195. this.check_time = uParseTime(
  196. this.doubleReview.check_time,
  197. '{y}-{m}-{d} {h}:{i}'
  198. ).split(' ')[1]
  199. console.log('真性感')
  200. }
  201. }else if(this.$store.getters.xt_user.user.id != this.double_check.creater && this.double_check.modifier == 0){
  202. this.check_time = uParseTime(
  203. new Date(),
  204. '{y}-{m}-{d} {h}:{i}'
  205. ).split(' ')[1]
  206. this.doubleReview.modifier = this.$store.getters.xt_user.user.id
  207. }
  208. if(this.doubleReview.modifier == 0){
  209. this.doubleReview.modifier = ""
  210. }
  211. console.log( this.first_check_time )
  212. console.log( this.check_time )
  213. } else {
  214. var nowDate = new Date()
  215. var nowHours = nowDate.getHours()
  216. var nowMinutes = nowDate.getMinutes()
  217. if(this.$store.getters.xt_user.user.id != this.double_check.creater && this.double_check.modifier == 0){
  218. this.check_time = (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
  219. }
  220. this.first_check_time = (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
  221. console.log( this.first_check_time )
  222. console.log( this.check_time )
  223. }
  224. },
  225. hide() {
  226. this.isVisibility = false
  227. },
  228. handleCancle: function() {
  229. this.isVisibility = false
  230. },
  231. handleComfirm: function() {
  232. if (this.patient.id <= 0) {
  233. this.$message.error('没有选择患者')
  234. return
  235. }
  236. var first_check_time = this.record_date + ' ' + this.first_check_time
  237. var check_time = this.record_date + ' ' + this.check_time
  238. var first_time = new Date(first_check_time).getTime()
  239. var second_time = new Date(check_time).getTime()
  240. if (first_time >= second_time) {
  241. this.$message.error('第一次核对时间不能大于或者等于第二次核对时间')
  242. return
  243. }
  244. if (this.doubleReview.creater == this.doubleReview.modifier) {
  245. this.$message.error('第一次核对人不能与第二次核对人相同')
  246. return
  247. }
  248. let ParamsQuery = this.doubleReview
  249. ParamsQuery['patient'] = this.patient.id
  250. ParamsQuery['record_date'] = this.record_date
  251. if(this.check_time){
  252. ParamsQuery['check_time'] = this.record_date + ' ' + this.check_time
  253. }
  254. // ParamsQuery['check_time'] = this.record_date + ' ' + this.check_time
  255. if(this.first_check_time){
  256. ParamsQuery['first_check_time'] = this.record_date + ' ' + this.first_check_time
  257. }
  258. ParamsQuery['creater'] = this.doubleReview.creater
  259. ParamsQuery['modifier'] = this.doubleReview.modifier
  260. postDoubleCheck(ParamsQuery).then(response => {
  261. if (response.data.state == 0) {
  262. this.$message.error(response.data.msg)
  263. return false
  264. } else {
  265. this.$notify({
  266. title: '成功',
  267. message: '提交成功',
  268. type: 'success',
  269. duration: 2000
  270. })
  271. this.doubleReview.creater = response.data.data.doubleCheck.creater
  272. this.doubleReview.check_time =
  273. response.data.data.doubleCheck.check_time
  274. this.doubleReview.first_check_time =
  275. response.data.data.doubleCheck.first_check_time
  276. this.doubleReview.modifier = response.data.data.doubleCheck.modifier
  277. this.first_check_time = uParseTime(
  278. this.doubleReview.first_check_time,
  279. '{y}-{m}-{d} {h}:{i}'
  280. ).split(' ')[1]
  281. // if(this.$store.getters.xt_user.user.id != this.double_check.creater && this.double_check.modifier == 0){
  282. // this.check_time = uParseTime(
  283. // this.doubleReview.check_time,
  284. // '{y}-{m}-{d} {h}:{i}'
  285. // ).split(' ')[1]
  286. // }
  287. let doublecheck_resp = response.data.data.doubleCheck
  288. var doubleCheck = this.double_check
  289. for (var index in doublecheck_resp) {
  290. // doubleCheck[index] = doublecheck_resp[index];
  291. this.$set(doubleCheck, index, doublecheck_resp[index])
  292. }
  293. this.hide()
  294. }
  295. })
  296. },
  297. getFirstCheckDesc: function () {
  298. if(this.double_check.creater > 0){
  299. if (
  300. this.doubleReview.first_check_time > 0 &&
  301. this.doubleReview.check_time > 0
  302. ) {
  303. if (this.doubleReview.first_check_time < this.doubleReview.check_time) {
  304. let time = uParseTime(
  305. this.doubleReview.first_check_time,
  306. "{y}-{m}-{d} {h}:{i}:{s}"
  307. );
  308. if (this.doubleReview.creater <= 0) {
  309. return "";
  310. }
  311. var desc = "";
  312. if (
  313. this.admin_users == null ||
  314. typeof this.admin_users.length == "undefined"
  315. ) {
  316. return "";
  317. }
  318. var leng = this.admin_users.length;
  319. if (leng == 0) {
  320. return "";
  321. }
  322. for (let index = 0; index < leng; index++) {
  323. if (this.admin_users[index].id == this.doubleReview.creater) {
  324. let name = this.admin_users[index].name;
  325. desc = "第一核对人员:" + name + " 第一核对时间:" + time;
  326. break;
  327. }
  328. }
  329. return desc;
  330. } else {
  331. let time = uParseTime(
  332. this.doubleReview.check_time,
  333. "{y}-{m}-{d} {h}:{i}:{s}"
  334. );
  335. if (this.doubleReview.modifier <= 0) {
  336. return "";
  337. }
  338. var desc = "";
  339. if (
  340. this.admin_users == null ||
  341. typeof this.admin_users.length == "undefined"
  342. ) {
  343. return "";
  344. }
  345. var leng = this.admin_users.length;
  346. if (leng == 0) {
  347. return "";
  348. }
  349. for (let index = 0; index < leng; index++) {
  350. if (this.admin_users[index].id == this.doubleReview.modifier) {
  351. let name = this.admin_users[index].name;
  352. desc = "第一核对人员:" + name + " 第一核对时间:" + time;
  353. break;
  354. }
  355. }
  356. return desc;
  357. }
  358. } else {
  359. let time = uParseTime(
  360. this.doubleReview.first_check_time,
  361. "{y}-{m}-{d} {h}:{i}:{s}"
  362. );
  363. if (this.doubleReview.creater <= 0) {
  364. return "";
  365. }
  366. var desc = "";
  367. if (
  368. this.admin_users == null ||
  369. typeof this.admin_users.length == "undefined"
  370. ) {
  371. return "";
  372. }
  373. var leng = this.admin_users.length;
  374. if (leng == 0) {
  375. return "";
  376. }
  377. for (let index = 0; index < leng; index++) {
  378. if (this.admin_users[index].id == this.doubleReview.creater) {
  379. let name = this.admin_users[index].name;
  380. desc = "第一核对人员:" + name + " 第一核对时间:" + time;
  381. break;
  382. }
  383. }
  384. return desc;
  385. }
  386. }
  387. },
  388. getScondCheckDesc: function () {
  389. if(this.double_check.modifier > 0){
  390. if (
  391. this.doubleReview.first_check_time > 0 &&
  392. this.doubleReview.check_time > 0
  393. ) {
  394. if (this.doubleReview.first_check_time < this.doubleReview.check_time) {
  395. let time = uParseTime(
  396. this.doubleReview.check_time,
  397. "{y}-{m}-{d} {h}:{i}:{s}"
  398. );
  399. if (this.doubleReview.modifier <= 0) {
  400. return "";
  401. }
  402. var desc = "";
  403. if (
  404. this.admin_users == null ||
  405. typeof this.admin_users.length == "undefined"
  406. ) {
  407. return desc;
  408. }
  409. var leng = this.admin_users.length;
  410. if (leng == 0) {
  411. return desc;
  412. }
  413. for (let index = 0; index < leng; index++) {
  414. if (this.admin_users[index].id == this.doubleReview.modifier ) {
  415. let name = this.admin_users[index].name;
  416. desc = "第二核对人员:" + name + " 第二核对时间:" + time;
  417. break;
  418. }
  419. }
  420. return desc;
  421. } else {
  422. let time = uParseTime(
  423. this.doubleReview.first_check_time,
  424. "{y}-{m}-{d} {h}:{i}:{s}"
  425. );
  426. if (this.doubleReview.creater <= 0) {
  427. return "";
  428. }
  429. var desc = "";
  430. if (
  431. this.admin_users == null ||
  432. typeof this.admin_users.length == "undefined"
  433. ) {
  434. return desc;
  435. }
  436. var leng = this.admin_users.length;
  437. if (leng == 0) {
  438. return desc;
  439. }
  440. for (let index = 0; index < leng; index++) {
  441. if (this.admin_users[index].id == this.doubleReview.creater) {
  442. let name = this.admin_users[index].name;
  443. desc = "第二核对人员:" + name + " 第二核对时间:" + time;
  444. break;
  445. }
  446. }
  447. return desc;
  448. }
  449. } else {
  450. let time = uParseTime(
  451. this.doubleReview.check_time,
  452. "{y}-{m}-{d} {h}:{i}:{s}"
  453. );
  454. if (this.doubleReview.modifier <= 0) {
  455. return "";
  456. }
  457. var desc = "";
  458. if (
  459. this.admin_users == null ||
  460. typeof this.admin_users.length == "undefined"
  461. ) {
  462. return desc;
  463. }
  464. var leng = this.admin_users.length;
  465. if (leng == 0) {
  466. return desc;
  467. }
  468. for (let index = 0; index < leng; index++) {
  469. if (this.admin_users[index].id == this.doubleReview.modifier) {
  470. let name = this.admin_users[index].name;
  471. desc = "第二核对人员:" + name + " 第二核对时间:" + time;
  472. break;
  473. }
  474. }
  475. return desc;
  476. }
  477. }
  478. },
  479. changeBox(val){
  480. var arr = []
  481. var str = val.join(';')
  482. console.log("strw222222222",str)
  483. if(str.indexOf('透析器/灌流器')!=-1 && this.prescription!=null){
  484. arr.push("透析器/灌流器:"+(this.prescription.dialyzer_perfusion_apparatus?this.prescription.dialyzer_perfusion_apparatus:""))
  485. }
  486. if(str.indexOf('透析器/灌流器')!=-1 && this.prescription==null){
  487. arr.push("透析器/灌流器:")
  488. }
  489. if(str.indexOf('穿刺针')!=-1 && this.predialysis_evaluation.id!=0){
  490. arr.push("穿刺针:"+this.predialysis_evaluation.puncture_needle)
  491. }
  492. if(str.indexOf('穿刺针')!=-1 && this.predialysis_evaluation.id==0){
  493. arr.push("穿刺针:")
  494. }
  495. if(str.indexOf('透析液配方')!=-1 && this.prescription!=null){
  496. arr.push("透析液配方:"+this.GetDialysateFormulationById(this.prescription.dialysate_formulation))
  497. }
  498. if(str.indexOf('透析液配方')!=-1 && this.prescription==null){
  499. arr.push("透析液配方:")
  500. }
  501. if(str.indexOf('钾')!=-1 && this.prescription!=null ){
  502. arr.push("钾:"+(this.prescription.kalium?this.prescription.kalium:""))
  503. }
  504. if(str.indexOf('钾')!=-1 && this.prescription==null ){
  505. arr.push("钾:")
  506. }
  507. if(str.indexOf('钙')!=-1 && this.prescription!=null ){
  508. arr.push("钙:"+(this.prescription.calcium?this.prescription.calcium:""))
  509. }
  510. if(str.indexOf('钙')!=-1 && this.prescription==null ){
  511. arr.push("钙:")
  512. }
  513. console.log("arr",arr)
  514. this.doubleReview.dialysis_item_desc = arr.join(";")
  515. if(val.length > 0){
  516. this.doubleReview.dialysis_item_check = 2
  517. }else{
  518. this.doubleReview.dialysis_item_check = "1"
  519. }
  520. },
  521. changeBoxOne(val){
  522. var arr = []
  523. var str = val.join(';')
  524. console.log("strw222222222",str)
  525. if(str.indexOf('透析模式')!=-1 && this.prescription!=null){
  526. arr.push("透析模式:"+(this.getMode(this.prescription.mode_id)?this.getMode(this.prescription.mode_id):""))
  527. }
  528. if(str.indexOf('透析模式')!=-1 && this.prescription==null){
  529. arr.push("透析模式:")
  530. }
  531. if(str.indexOf('透析时长')!=-1 && this.prescription!=null){
  532. arr.push("透析时长:"+(this.prescription.dialysis_duration?this.prescription.dialysis_duration:""))
  533. }
  534. if(str.indexOf('透析时长')!=-1 && this.prescription==null){
  535. arr.push("透析时长:")
  536. }
  537. if(str.indexOf("目标超滤量")!=-1 && this.prescription!=null){
  538. arr.push("目标超滤量:"+(this.prescription.target_ultrafiltration?this.prescription.target_ultrafiltration:""))
  539. }
  540. if(str.indexOf("目标超滤量")!=-1 && this.prescription==null){
  541. arr.push("目标超滤量:")
  542. }
  543. if(str.indexOf("抗凝剂")!=-1 && this.prescription!=null){
  544. arr.push("抗凝剂:"+(this.prescription.anticoagulant?this.prescription.anticoagulant:""))
  545. }
  546. if(str.indexOf("抗凝剂")!=-1 && this.prescription==null){
  547. arr.push("抗凝剂:")
  548. }
  549. if(str.indexOf("首剂")!=-1 && this.prescription!=null){
  550. arr.push("首剂:"+(this.prescription.anticoagulant_shouji?this.prescription.anticoagulant_shouji:""))
  551. }
  552. if(str.indexOf("首剂")!=-1 && this.prescription==null){
  553. arr.push("首剂:")
  554. }
  555. if(str.indexOf("维持")!=-1 && this.prescription!=null){
  556. arr.push("维持:"+(this.prescription.anticoagulant_weichi?this.prescription.anticoagulant_weichi:""))
  557. }
  558. if(str.indexOf("维持")!=-1 && this.prescription==null){
  559. arr.push("维持:")
  560. }
  561. if(str.indexOf("总量")!=-1 && this.prescription!=null){
  562. arr.push("总量:"+(this.prescription.anticoagulant_zongliang?this.prescription.anticoagulant_zongliang:""))
  563. }
  564. if(str.indexOf("总量")!=-1 && this.prescription==null){
  565. arr.push("总量:")
  566. }
  567. if(str.indexOf("置换液")!=-1 && this.prescription!=null){
  568. arr.push("置换液:"+(this.prescription.displace_liqui_part?this.prescription.displace_liqui_part:""))
  569. }
  570. if(str.indexOf("置换液")!=-1 && this.prescription==null){
  571. arr.push("置换液:")
  572. }
  573. if(str.indexOf("置换总量")!=-1 && this.prescription!=null){
  574. arr.push("置换总量:"+(this.prescription.replacement_total?this.prescription.replacement_total:""))
  575. }
  576. if(str.indexOf("置换总量")!=-1 && this.prescription==null){
  577. arr.push("置换总量:")
  578. }
  579. if(str.indexOf("处方血流量")!=-1 && this.prescription!=null){
  580. arr.push("处方血流量:"+(this.prescription.blood_flow_volume?this.prescription.blood_flow_volume:""))
  581. }
  582. if(str.indexOf("处方血流量")!=-1 && this.prescription==null){
  583. arr.push("处方血流量:")
  584. }
  585. if(str.indexOf("透析液流量")!=-1 && this.prescription!=null){
  586. arr.push("透析液流量:"+(this.prescription.dialysate_flow?this.prescription.dialysate_flow:""))
  587. }
  588. if(str.indexOf("透析液流量")!=-1 && this.prescription==null){
  589. arr.push("透析液流量:")
  590. }
  591. console.log("arr",arr)
  592. this.doubleReview.dialysis_parameter_desc = arr.join(";")
  593. if(val.length>0){
  594. this.doubleReview.dialysis_parameter_check = 2
  595. }else{
  596. this.doubleReview.dialysis_parameter_check = "1"
  597. }
  598. },
  599. changeBoxTwo(val){
  600. var arr = []
  601. var str = val.join(';')
  602. console.log("strw222222222",str)
  603. if(str.indexOf('通路类型')!=-1 && this.predialysis_evaluation.id!=0){
  604. arr.push("通路类型:"+this.getBloodAccess(this.predialysis_evaluation.blood_access_part_opera_id))
  605. }
  606. if(str.indexOf('通路类型')!=-1 && this.predialysis_evaluation.id==0){
  607. arr.push("通路类型:")
  608. }
  609. if(str.indexOf('动静脉接错')!=-1){
  610. arr.push("动静脉接错:")
  611. }
  612. if(str.indexOf('渗血')!=-1){
  613. arr.push("渗血:")
  614. }
  615. if(str.indexOf('压迫')!=-1){
  616. arr.push("压迫:")
  617. }
  618. if(str.indexOf('折叠')!=-1){
  619. arr.push("折叠:")
  620. }
  621. if(str.indexOf('滑脱')!=-1){
  622. arr.push("滑脱:")
  623. }
  624. console.log("arr",arr)
  625. this.doubleReview.vascular_access_desc = arr.join(";")
  626. if(val.length>0){
  627. this.doubleReview.vascular_access_verification = 2
  628. }else{
  629. this.doubleReview.vascular_access_verification = "1"
  630. }
  631. },
  632. changeBoxThree(val){
  633. var arr = []
  634. var str = val.join(';')
  635. console.log("strw222222222",str)
  636. if(str.indexOf('泵前补液测管未夹')!=-1){
  637. arr.push("泵前补液测管未夹:")
  638. }
  639. if(str.indexOf('肝素管夹未开启')!=-1){
  640. arr.push("肝素管夹未开启:")
  641. }
  642. if(str.indexOf('透析器连接错误')!=-1){
  643. arr.push("透析器连接错误:")
  644. }
  645. if(str.indexOf('动静脉壶页面不标准')!=-1){
  646. arr.push("动静脉壶页面不标准:")
  647. }
  648. if(str.indexOf('静脉管路未卡入保护夹')!=-1){
  649. arr.push("静脉管路未卡入保护夹:")
  650. }
  651. if(str.indexOf("压力传感器夹未打开")!=-1){
  652. arr.push("压力传感器夹未打开")
  653. }
  654. if(str.indexOf('接口连接松动')!=-1){
  655. arr.push("接口连接松动")
  656. }
  657. if(str.indexOf("管路打折")!=-1){
  658. arr.push("管路打折")
  659. }
  660. this.doubleReview.pipeline_connection_desc = arr.join(";")
  661. if(val.length > 0){
  662. this.doubleReview.pipeline_connection_check = 2
  663. }else{
  664. this.doubleReview.pipeline_connection_check = "1"
  665. }
  666. },
  667. changeRadio(val){
  668. if(val == 1){
  669. this.doubleReview.dialysis_item_desc = ""
  670. this.checkList =[]
  671. }
  672. },
  673. changeRadioTwo(val){
  674. if(val == 1){
  675. this.doubleReview.dialysis_parameter_desc = ""
  676. this.checkListOne = []
  677. }
  678. },
  679. changeRadioThree(val){
  680. if(val == 1){
  681. this.doubleReview.vascular_access_desc = ""
  682. this.checkListTwo = []
  683. }
  684. },
  685. changeRadioFour(val){
  686. if(val == 1){
  687. this.doubleReview.pipeline_connection_desc = ""
  688. this.checkListThree = []
  689. }
  690. },
  691. GetDialysateFormulationById(val) {
  692. this.dialysate_formulation_options = getDataConfig('hemodialysis','dialysate_formulation')
  693. console.log("透析液配方",this.dialysate_formulation_options)
  694. let name = ''
  695. let dfl = this.dialysate_formulation_options.length
  696. for (let index = 0; index < dfl; index++) {
  697. if (this.dialysate_formulation_options[index].id == val) {
  698. name = this.dialysate_formulation_options[index].name
  699. break
  700. }
  701. }
  702. return name
  703. },
  704. getMode(id){
  705. var name = ""
  706. if(id == 1){
  707. name = "HD"
  708. }
  709. if(id == 2){
  710. name = "HDF"
  711. }
  712. if(id == 3){
  713. name = "HD+HP"
  714. }
  715. if(id == 4){
  716. name = "HP"
  717. }
  718. if(id == 5){
  719. name = "HF"
  720. }
  721. if(id == 6){
  722. name = "SCUF"
  723. }
  724. if(id == 7){
  725. name = "IUF"
  726. }
  727. if(id == 8){
  728. name = "HFHD"
  729. }
  730. if(id == 9){
  731. name = "HFHD+HP"
  732. }
  733. if(id == 10){
  734. name = "PHF"
  735. }
  736. if(id == 11){
  737. name = "HFR"
  738. }
  739. if(id == 12){
  740. name = "HDF+HP"
  741. }
  742. if(id == 13){
  743. name = "CRRT"
  744. }
  745. if(id == 14){
  746. name = "腹水回输"
  747. }
  748. if(id == 19){
  749. name = "IUF+HD"
  750. }
  751. if(id == 20){
  752. name = "UF"
  753. }
  754. return name
  755. },
  756. getAnticoagulant(id){
  757. var name = ""
  758. if(id == 1){
  759. name = "无肝素"
  760. }
  761. if(id == 2){
  762. name = "普通肝素"
  763. }
  764. if(id == 3){
  765. name = "低分子肝素"
  766. }
  767. if(id == 4){
  768. name = "阿加曲班"
  769. }
  770. if(id == 5){
  771. name = "枸橼酸钠"
  772. }
  773. if(id == 6){
  774. name ="低分子肝素钙"
  775. }
  776. if(id == 7){
  777. name = "低分子肝素钠"
  778. }
  779. return name
  780. },
  781. getBloodAccess(id){
  782. let vascular_access_desc = getDataConfig(
  783. 'hemodialysis',
  784. 'vascular_access_desc'
  785. )
  786. var name = ""
  787. for(let i=0;i<vascular_access_desc.length;i++){
  788. if(vascular_access_desc[i].id == id){
  789. name = vascular_access_desc[i].name
  790. }
  791. }
  792. return name
  793. }
  794. },
  795. props: {
  796. admin_users: { //系统用户列表
  797. type: Array,
  798. default: () => {
  799. return []
  800. }
  801. },
  802. double_check: { // 双人核对
  803. type: Object,
  804. default: () => {
  805. return { id: 0 }
  806. }
  807. },
  808. patient: { // 患者信息
  809. type: Object,
  810. default: () => {
  811. return { id: 0 }
  812. }
  813. },
  814. predialysis_evaluation: { // 透前评估
  815. type: Object,
  816. default: () => {
  817. return { id: 0 }
  818. }
  819. },
  820. prescription: {
  821. // 透析处方
  822. type: Object,
  823. default: () => {
  824. return { id: 0 }
  825. }
  826. },
  827. },
  828. watch: {
  829. isVisibility(val) {
  830. if(this.prescription!=null && this.prescription.id!=0){
  831. this.diazes = this.diazes + this.prescription.dialyzer_perfusion_apparatus
  832. this.dialysate_formulation = this.dialysate_formulation + this.GetDialysateFormulationById(this.prescription.dialysate_formulation)
  833. this.kalium = this.kalium + (this.prescription.kalium?this.prescription.kalium:"")
  834. this.calcium = this.calcium + (this.prescription.calcium?this.prescription.calcium:"")
  835. this.dialys_mode = this.dialys_mode + this.getMode(this.prescription.mode_id)
  836. this.long_time = this.long_time + (this.prescription.dialysis_duration?this.prescription.dialysate_formulation:"")
  837. this.target_ultrafiltration = this.target_ultrafiltration + (this.prescription.target_ultrafiltration?this.prescription.target_ultrafiltration:"")
  838. this.anticoagulant = this.anticoagulant + this.getAnticoagulant(this.prescription.anticoagulant)
  839. this.anticoagulant_shouji = this.anticoagulant_shouji + (this.prescription.anticoagulant_shouji?this.prescription.anticoagulant_shouji:"")
  840. this.anticoagulant_weichi = this.anticoagulant_weichi + (this.prescription.anticoagulant_weichi?this.prescription.anticoagulant_weichi:"")
  841. this.anticoagulant_zongliang = this.anticoagulant_zongliang+(this.prescription.anticoagulant_zongliang?this.prescription.anticoagulant_zongliang:"")
  842. this.displace_liqui_part = this.displace_liqui_part + (this.prescription.displace_liqui_part?this.prescription.displace_liqui_part:"")
  843. this.replacement_total = this.replacement_total + (this.prescription.replacement_total?this.prescription.replacement_total:"")
  844. this.dialysate_flow = this.dialysate_flow + (this.prescription.dialysate_flow?this.prescription.dialysate_flow:"")
  845. }
  846. if(this.predialysis_evaluation!=null && this.predialysis_evaluation.id!=0){
  847. this.puncture_needle = this.puncture_needle + this.predialysis_evaluation.puncture_needle
  848. this.blood_access_part_opera_id = this.blood_access_part_opera_id + this.getBloodAccess(this.predialysis_evaluation.blood_access_part_opera_id)
  849. }
  850. if(this.double_check !=null && this.double_check.id!=0){
  851. console.log("双人核对",this.double_check)
  852. if(this.double_check.dialysis_item_desc.indexOf("透析器/灌流器")!=-1){
  853. this.checkList.push("透析器/灌流器:"+this.prescription.dialyzer_perfusion_apparatus)
  854. console.log("222222",this.checkList)
  855. }
  856. if(this.double_check.dialysis_item_desc.indexOf("穿刺针")!=-1){
  857. this.checkList.push("穿刺针:"+(this.predialysis_evaluation.puncture_needle?this.predialysis_evaluation.puncture_needle:""))
  858. }
  859. if(this.double_check.dialysis_item_desc.indexOf("透析液配方:")!=-1){
  860. this.checkList.push("透析液配方:"+this.GetDialysateFormulationById(this.prescription.dialysate_formulation))
  861. }
  862. if(this.double_check.dialysis_item_desc.indexOf("钾:")!=-1){
  863. this.checkList.push("钾:"+(this.prescription.kalium?this.prescription.kalium:""))
  864. }
  865. if(this.double_check.dialysis_item_desc.indexOf("钙:")!=-1){
  866. this.checkList.push("钙:"+(this.prescription.calcium?this.prescription.calcium:""))
  867. }
  868. if(this.double_check.dialysis_parameter_desc.indexOf("透析模式:")!=-1){
  869. this.checkListOne.push("透析模式:"+this.getMode(this.prescription.mode_id))
  870. }
  871. if(this.double_check.dialysis_parameter_desc.indexOf("透析时长")!=-1){
  872. this.checkListOne.push("透析时长:"+(this.prescription.dialysis_duration?this.prescription.dialysate_formulation:""))
  873. }
  874. if(this.double_check.dialysis_parameter_desc.indexOf("目标超滤量")!=-1){
  875. this.checkListOne.push("目标超滤量:"+(this.prescription.target_ultrafiltration?this.prescription.target_ultrafiltration:""))
  876. }
  877. if(this.double_check.dialysis_parameter_desc.indexOf("抗凝剂")!=-1){
  878. this.checkListOne.push("抗凝剂:"+this.getAnticoagulant(this.prescription.anticoagulant))
  879. }
  880. if(this.double_check.dialysis_parameter_desc.indexOf("首剂")!=-1){
  881. this.checkListOne.push("首剂:"+(this.prescription.anticoagulant_shouji?this.prescription.anticoagulant_shouji:""))
  882. }
  883. if(this.double_check.dialysis_parameter_desc.indexOf("维持")!=-1){
  884. this.checkListOne.push("维持:"+(this.prescription.anticoagulant_weichi?this.prescription.anticoagulant_weichi:""))
  885. }
  886. if(this.double_check.dialysis_parameter_desc.indexOf("总量")!=-1){
  887. this.checkListOne.push("总量:"+(this.prescription.anticoagulant_zongliang?this.prescription.anticoagulant_zongliang:""))
  888. }
  889. if(this.double_check.dialysis_parameter_desc.indexOf("置换液")!=-1){
  890. this.checkListOne.push("置换液:"+(this.prescription.displace_liqui_part?this.prescription.displace_liqui_part:""))
  891. }
  892. if(this.double_check.dialysis_parameter_desc.indexOf("置换总量")!=-1){
  893. this.checkListOne.push("置换总量:"+(this.prescription.replacement_total?this.prescription.replacement_total:""))
  894. }
  895. if(this.double_check.dialysis_parameter_desc.indexOf("处方血流量")!=-1){
  896. this.checkListOne.push("处方血流量:"+(this.prescription.blood_flow_volume?this.prescription.blood_flow_volume:""))
  897. }
  898. if(this.double_check.dialysis_parameter_desc.indexOf("透析液流量")!=-1){
  899. this.checkListOne.push("透析液流量:"+(this.prescription.dialysate_flow?this.prescription.dialysate_flow:""))
  900. }
  901. if(this.double_check.vascular_access_desc.indexOf("通路类型")!=-1){
  902. this.checkListTwo.push("通路类型:"+this.getBloodAccess(this.predialysis_evaluation.blood_access_part_opera_id))
  903. }
  904. if(this.double_check.vascular_access_desc.indexOf("动静脉接错")!=-1){
  905. this.checkListTwo.push("动静脉接错")
  906. }
  907. if(this.double_check.vascular_access_desc.indexOf("渗血")!=-1){
  908. this.checkListTwo.push("渗血")
  909. }
  910. if(this.double_check.vascular_access_desc.indexOf("压迫")!=-1){
  911. this.checkListTwo.push("压迫")
  912. }
  913. if(this.double_check.vascular_access_desc.indexOf("折叠")!=-1){
  914. this.checkListTwo.push("折叠")
  915. }
  916. if(this.double_check.vascular_access_desc.indexOf("滑脱")!=-1){
  917. this.checkListTwo.push("滑脱")
  918. }
  919. if(this.double_check.pipeline_connection_desc.indexOf("泵前补液测管未夹")!=-1){
  920. this.checkListThree.push("泵前补液测管未夹")
  921. }
  922. if(this.double_check.pipeline_connection_desc.indexOf("肝素管夹未开启")!=-1){
  923. this.checkListThree.push("肝素管夹未开启")
  924. }
  925. if(this.double_check.pipeline_connection_desc.indexOf("透析器连接错误")!=-1){
  926. this.checkListThree.push("透析器连接错误")
  927. }
  928. if(this.double_check.pipeline_connection_desc.indexOf("动静脉壶页面不标准")!=-1){
  929. this.checkListThree.push("动静脉壶页面不标准")
  930. }
  931. if(this.double_check.pipeline_connection_desc.indexOf("静脉管路未卡入保护夹")!=-1){
  932. this.checkListThree.push("静脉管路未卡入保护夹")
  933. }
  934. if(this.double_check.pipeline_connection_desc.indexOf("压力传感器夹未打开")){
  935. this.checkListThree.push("压力传感器夹未打开")
  936. }
  937. if(this.double_check.pipeline_connection_desc.indexOf("接口连接松动")){
  938. this.checkListThree.push("接口连接松动")
  939. }
  940. if(this.double_check.pipeline_connection_desc.indexOf("管路打折")){
  941. this.checkListThree.push("管路打折")
  942. }
  943. console.log("hhh",this.checkListOne)
  944. }
  945. },
  946. 'double_check.id': function() {
  947. if (this.double_check.id > 0) {
  948. for (var index in this.doubleReview) {
  949. this.doubleReview[index] = this.double_check[index] + ''
  950. }
  951. this.doubleReview.created_time = this.double_check['created_time']
  952. this.doubleReview.creater = this.double_check['creater']
  953. this.doubleReview.updated_time = this.double_check['updated_time']
  954. this.doubleReview.modifier = this.double_check['modifier']
  955. this.doubleReview.dialysis_item_desc = this.double_check['dialysis_item_desc']
  956. this.doubleReview.dialysis_parameter_desc = this.double_check['dialysis_parameter_desc']
  957. this.doubleReview.vascular_access_desc = this.double_check['vascular_access_desc']
  958. this.doubleReview.pipeline_connection_desc = this.double_check['pipeline_connection_desc']
  959. this.doubleReview.created_time = this.double_check['created_time']
  960. this.doubleReview.creater = this.double_check['creater']
  961. this.doubleReview.updated_time = this.double_check['updated_time']
  962. this.doubleReview.modifier = this.double_check['modifier']
  963. this.doubleReview.check_time = this.double_check['check_time']
  964. this.doubleReview.first_check_time = this.double_check['first_check_time']
  965. this.first_check_time = uParseTime(
  966. this.doubleReview.first_check_time,
  967. '{y}-{m}-{d} {h}:{i}'
  968. ).split(' ')[1]
  969. if(this.$store.getters.xt_user.user.id == this.double_check.creater || this.double_check.modifier > 0){
  970. this.check_time = uParseTime(
  971. this.doubleReview.check_time,
  972. '{y}-{m}-{d} {h}:{i}'
  973. ).split(' ')[1]
  974. }else if(this.$store.getters.xt_user.user.id != this.double_check.creater && this.double_check.modifier == 0){
  975. this.check_time = uParseTime(
  976. new Date(),
  977. '{y}-{m}-{d} {h}:{i}'
  978. ).split(' ')[1]
  979. this.doubleReview.modifier = this.$store.getters.xt_user.user.id
  980. }
  981. } else {
  982. this.dialysis_item_check = '1'
  983. this.dialysis_parameter_check = '1'
  984. this.vascular_access_verification = '1'
  985. this.pipeline_connection_check = '1'
  986. this.doubleReview.dialysis_item_desc = ''
  987. this.doubleReview.dialysis_parameter_desc = ''
  988. this.doubleReview.vascular_access_desc = ''
  989. this.doubleReview.pipeline_connection_desc = ''
  990. var nowDate = new Date()
  991. var nowYear = nowDate.getFullYear()
  992. var nowMonth = nowDate.getMonth() + 1
  993. var nowDay = nowDate.getDate()
  994. var nowHours = nowDate.getHours()
  995. var nowMinutes = nowDate.getMinutes()
  996. if(this.$store.getters.xt_user.user.id != this.double_check.creater && this.double_check.modifier == 0){
  997. this.check_time = (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
  998. }
  999. this.first_check_time = (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
  1000. }
  1001. }
  1002. },
  1003. created() {
  1004. var date = this.$route.query && this.$route.query.date
  1005. this.record_date = uParseTime(date, '{y}-{m}-{d}')
  1006. var nowDate = new Date()
  1007. var nowYear = nowDate.getFullYear()
  1008. var nowMonth = nowDate.getMonth() + 1
  1009. var nowDay = nowDate.getDate()
  1010. var nowHours = nowDate.getHours()
  1011. var nowMinutes = nowDate.getMinutes()
  1012. if(this.$store.getters.xt_user.user.id != this.double_check.creater && this.double_check.modifier == 0){
  1013. this.check_time = (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
  1014. }
  1015. this.first_check_time = (nowHours < 10 ? '0' + nowHours : nowHours) + ':' + (nowMinutes < 10 ? '0' + nowMinutes : nowMinutes)
  1016. }
  1017. }
  1018. </script>
  1019. <style lang="scss">
  1020. .newInline{
  1021. display: flex;
  1022. }
  1023. .newItem{
  1024. flex: 1;
  1025. display: flex !important;
  1026. .el-form-item__content{
  1027. width: 100%;
  1028. }
  1029. }
  1030. .newCheckBox{
  1031. margin-bottom: 10px;
  1032. .el-checkbox{
  1033. margin-bottom: 10px;
  1034. }
  1035. }
  1036. </style>