FastProvince.vue 32KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808
  1. <template>
  2. <div class="fastProvince">
  3. <el-dialog
  4. title="提示"
  5. :visible.sync="dialogVisible"
  6. width="40%"
  7. >
  8. <div style="text-align: center">
  9. <p>您选择的区域酷医云暂未对接,请联系酷医云客服,我们将免费为您实现对接</p>
  10. <img style="width: 150px;height: 150px" src="../../../assets/home/kuyi_wechat.jpg"/>
  11. <p>服务热线</p>
  12. <p style="font-size: 16px">18682078150</p>
  13. </div>
  14. <span slot="footer" class="dialog-footer">
  15. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  16. </span>
  17. </el-dialog>
  18. <div class="cell clearfix">
  19. <el-form :model="form" ref="ruleForm" label-width="40px" class="demo-ruleForm" style="text-align: center">
  20. <el-form-item label="地区">
  21. <el-select v-model="form.province" clearable filterable placeholder="请选择" @change="changeProvince" style="width:150px;">
  22. <el-option
  23. v-for="item in provinces"
  24. :key="item.id"
  25. :label="item.name"
  26. :value="item.id">
  27. </el-option>
  28. </el-select>
  29. </el-form-item>
  30. </el-form>
  31. </div>
  32. <div class="cell clearfix" style="margin-bottom:0px;">
  33. <el-form :inline="true" :model="listQuery">
  34. <el-form-item label>
  35. <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:120px"></el-input>
  36. <el-button type="primary" style="padding: 10px 6px;" @click="onSearch" icon="el-icon-search">搜索</el-button>
  37. </el-form-item>
  38. </el-form>
  39. <div class="time" style="margin-left:40px;">
  40. <ul class="newUl">
  41. <li
  42. :class="item.state == wayType ? 'active' : ''"
  43. @click="chooseWay(item.state)"
  44. v-for="item in way"
  45. :key="item.value"
  46. >{{ item.label }}</li>
  47. </ul>
  48. </div>
  49. </div>
  50. <div style="flex:1">
  51. <div class="newContainer">
  52. <div style="width:270px">
  53. <div class="tableTitle">患者列表</div>
  54. <div class="cell clearfix" style="margin-bottom:10px;">
  55. <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 130px;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
  56. <el-input size="small" style="width:80px;" v-model.trim="search_input" class="filter-item"/>
  57. <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
  58. </div>
  59. <div class="cell clearfix" style="margin-bottom:10px;">
  60. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="width:130px;margin-right:10px;" @change="handleStateChange">
  61. <el-option
  62. v-for="item in patient_state"
  63. :key="item.value"
  64. :label="item.label"
  65. :value="item.value">
  66. </el-option>
  67. </el-select>
  68. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="width:130px;margin-right:10px;" @change="handleTreatChange">
  69. <el-option
  70. v-for="item in treat_state"
  71. :key="item.value"
  72. :label="item.label"
  73. :value="item.value">
  74. </el-option>
  75. </el-select>
  76. </div>
  77. <div class="cell clearfix" style="margin-bottom:10px;">
  78. <el-select v-model="scheduleStateVal" placeholder="班次" style="width:130px;margin-right:10px;" @change="handletimeType">
  79. <el-option
  80. v-for="item in schedule_options"
  81. :key="item.value"
  82. :label="item.label"
  83. :value="item.value">
  84. </el-option>
  85. </el-select>
  86. <el-select v-model="zoneVal" placeholder="分区" style="width:130px;margin-right:10px;" @change="handleZoneChange">
  87. <el-option
  88. v-for="item in zone_options"
  89. :key="item.id"
  90. :label="item.text"
  91. :value="item.id">
  92. </el-option>
  93. </el-select>
  94. </div>
  95. <div style="padding-right:20px;">
  96. <el-table
  97. ref="tab"
  98. @row-click="changePatient"
  99. highlight-current-row
  100. :data="tableData"
  101. height="500"
  102. border
  103. style="width: 100%">
  104. <el-table-column
  105. label="患者"
  106. >
  107. <template slot-scope="scope">
  108. {{ scope.row.patient ? scope.row.patient.name : '' }}
  109. </template>
  110. </el-table-column>
  111. <el-table-column
  112. label="透析号"
  113. >
  114. <template slot-scope="scope">
  115. {{ scope.row.patient ? scope.row.patient.dialysis_no : '' }}
  116. </template>
  117. </el-table-column>
  118. </el-table>
  119. </div>
  120. </div>
  121. <div style="flex:1;width:0;">
  122. <basic-info v-if="wayType == 0" :patient='patient'></basic-info>
  123. <treat-info v-if="wayType == 1" :patient='patient' :prescription='prescription' :predialysis_evaluation='predialysis_evaluation' :assessment_after_dislysis='assessment_after_dislysis' :monitor_records='monitor_records' :admin_users='admin_users' :dialysis_order="dialysis_order" :double_check="double_check" :selected_date='selected_date'></treat-info>
  124. <dialysis-params v-if="wayType == 2" :prescription='prescription' :doctor_advices='doctor_advices' :monitor_records='monitor_records' :patient='patient'></dialysis-params>
  125. <dialysis-summary v-if="wayType == 3" :treatment_summary='treatment_summary' :patient='patient'></dialysis-summary>
  126. <rescue-record v-if="wayType == 4" :doctor_advices='doctor_advices' :patient='patient' :prescription='prescription'></rescue-record>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </template>
  132. <script>
  133. import { GetDistrictsByUpid } from '@/api/district'
  134. import { getIsDocking } from '@/api/config'
  135. import basicInfo from "../fast/basicInfo"
  136. import treatInfo from "../fast/treatInfo"
  137. import dialysisParams from "../fast/dialysisParams"
  138. import dialysisSummary from "../fast/dialysisSummary"
  139. import rescueRecord from "../fast/rescueRecord"
  140. import {
  141. getDialysisRecordInitData,
  142. getDialysisSchedules,
  143. getDialysisScheduleDetail,
  144. } from "@/api/dialysis_record";
  145. import { parseTime } from "@/utils";
  146. export default {
  147. name: 'FastProvince',
  148. components:{
  149. basicInfo,
  150. treatInfo,
  151. dialysisParams,
  152. dialysisSummary,
  153. rescueRecord
  154. },
  155. data() {
  156. return {
  157. signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
  158. start_time: '',
  159. dialogVisible: false,
  160. end_time: '',
  161. provinces: [],
  162. citys:[],
  163. form: {
  164. province: '',
  165. city: ''
  166. },
  167. listQuery: {
  168. start_time: "",
  169. end_time: "",
  170. page: 1,
  171. limit: 10
  172. },
  173. way: [
  174. { value: 0, label: "基本信息", state: 0 },
  175. { value: 1, label: "治疗信息", state: 1 },
  176. { value: 2, label: "透析参数", state: 2 },
  177. { value: 3, label: "治疗小结", state: 3 },
  178. { value: 4, label: "抢救记录", state: 4 },
  179. ],
  180. wayType: 0,
  181. //
  182. tableData: [],
  183. selected_date: new Date(),
  184. // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
  185. search_keyword: '', // 确定用于搜索的关键字
  186. search_input: '', // 输入中的关键字
  187. patient_state:[
  188. {value: 0,label: '全部'},
  189. {value: 1,label: '已签到'},
  190. {value: 2,label: '未签到'},
  191. {value: 3,label: '已上机'},
  192. {value: 4,label: '已下机'},
  193. ],
  194. patientStateVal: 0,
  195. treat_state:[
  196. {value: 0,label: '全部'},
  197. {value: 1,label: '待开处方'},
  198. {value: 2,label: '待开小结'},
  199. ],
  200. treatStateVal: 0,
  201. schedule_options:[
  202. {value: 0,label: '全部'},
  203. {value: 1,label: '上午'},
  204. {value: 2,label: '下午'},
  205. {value: 3,label: '晚上'},
  206. ],
  207. scheduleStateVal: 0,
  208. zone_options:[
  209. { id: 0, text: '全部' }
  210. ],
  211. zoneVal:0,
  212. patient: { id: 0 }, // 患者信息
  213. schedual: { id: 0 }, // 患者排班信息
  214. prescription: { id: 0 }, // 透析处方
  215. solution: { id: 0 }, // 透析方案
  216. system_prescribe: { id: 0 },
  217. receiver_treatment_access: { id: 0 }, // 接诊评估
  218. predialysis_evaluation: { id: 0 }, // 透前评估
  219. doctor_advices: [], // 临时医嘱
  220. double_check: { id: 0 }, // 双人核对
  221. assessment_after_dislysis: { id: 0 }, // 透后评估
  222. treatment_summary: { id: 0 }, // 治疗小结
  223. monitor_records: [], // 透析监测
  224. dialysis_order: { id: 0 }, // 透析记录
  225. admin_users: [], // 系统用户列表
  226. devices: [], // 设备
  227. device_numbers: [], // 床位号
  228. admin_user_map: {}, // {user_id: admin_user object}
  229. device_map: {}, // {device_id: device}
  230. device_number_map: {}, // {device_number_id: device_number}
  231. niprocart_info: [],
  232. jms_info: [],
  233. fistula_needle_set_info: [],
  234. fistula_needle_set_16_info: [],
  235. hemoperfusion_info: [],
  236. dialyser_sterilised_info: [],
  237. filtryzer_info: [],
  238. dialyzers_info: [],
  239. injector_info: [],
  240. bloodlines_info: [],
  241. tubingHemodialysis_info: [],
  242. safe_package_info: [],
  243. aliquid_info: [],
  244. config: {},
  245. lastPredialysisEvaluation: { id: 0 },
  246. lastMonitorRecord: { id: 0 },
  247. lastAssessmentAfterDislysis: { id: 0 },
  248. lastDryWeightDislysis: { id: 0 },
  249. headNurses: [],
  250. lastDialysisPrescribe: { id: 0 },
  251. }
  252. },
  253. computed:{
  254. filtedSchedules: function() {
  255. var search_keyword = this.search_keyword
  256. if (search_keyword.length > 0) {
  257. var schedules = []
  258. for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  259. const scheduleInfo = this.zone_schedules[o_i]
  260. var originSchedules = scheduleInfo.schedules
  261. if (originSchedules.length == 0) {
  262. continue
  263. }
  264. var filtedSchedules = []
  265. for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  266. const schedule = originSchedules[s_i]
  267. if (schedule.patient.name.indexOf(search_keyword) != -1) {
  268. filtedSchedules.push(schedule)
  269. // break
  270. }
  271. }
  272. if (filtedSchedules.length > 0) {
  273. schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  274. }
  275. }
  276. return schedules
  277. }
  278. }
  279. },
  280. created() {
  281. this.getDistricts()
  282. var province = sessionStorage.getItem('province')
  283. if (province == null) {
  284. this.form.province = ''
  285. } else {
  286. this.form.province = parseInt(province)
  287. }
  288. this.getInitData()
  289. }, methods: {
  290. getDistricts: function() {
  291. GetDistrictsByUpid({ id: 0 }).then(response => {
  292. var res = response.data
  293. if (res.state === 1) {
  294. this.provinces = res.data.citys
  295. }
  296. }).catch(e => {
  297. })
  298. }, changeProvince(id) {
  299. getIsDocking({ config_type: 2, province: id, city: 0 }).then(response => {
  300. var res = response.data
  301. if (res.state == 1) {
  302. if (res.data.is_docking == 2) {
  303. this.$message.error('该地区尚未对接,请联系客服')
  304. this.dialogVisible = true
  305. this.form.province = ''
  306. } else {
  307. this.form.province = id
  308. this.dialogVisible = false
  309. sessionStorage.setItem('province', id)
  310. }
  311. } else {
  312. this.$message.error(res.msg)
  313. }
  314. }).catch(e => {
  315. })
  316. },
  317. chooseWay(way) {
  318. this.wayType = way;
  319. },
  320. onSearch(){},
  321. //日期
  322. handleScheduleDateChange: function() {
  323. this.treatStateVal = 0
  324. this.patientStateVal = 0
  325. this.zoneVal = 0
  326. this.scheduleStateVal = 0
  327. this.search_keyword = this.search_input = ''
  328. // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
  329. // zone: this.zone_selected,
  330. // schedule_type: this.schedule_type_selected,
  331. // schedule_date: this.selected_date,
  332. // })
  333. this.requestDialysisSchedules()
  334. },
  335. //初始化数据
  336. getInitData: function() {
  337. getDialysisRecordInitData().then(rs => {
  338. var resp = rs.data
  339. if (resp.state == 1) {
  340. var zones = resp.data.zones
  341. var schedules = resp.data.schedules
  342. var zone_options = [{ id: 0, text: '全部' }]
  343. for (let z_i = 0; z_i < zones.length; z_i++) {
  344. const zone = zones[z_i]
  345. zone_options.push({ id: zone.id, text: zone.name })
  346. }
  347. this.zone_options = zone_options
  348. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  349. this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
  350. this.getData()
  351. setTimeout(()=>{
  352. this.$refs.tab.setCurrentRow(this.tableData[0]);
  353. },10)
  354. let id = this.tableData[0].patient_id
  355. let date = this.tableData[0].schedule_date
  356. this.getScheduleDetail(id,date);
  357. } else {
  358. this.$message.error(resp.msg)
  359. }
  360. })
  361. },
  362. // 班次
  363. handletimeType: function(index) {
  364. this.scheduleStateVal = index
  365. // this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
  366. this.search_keyword = this.search_input = ''
  367. this.getData()
  368. },
  369. //分区
  370. handleZoneChange: function(index) {
  371. this.zoneVal = index
  372. // this.$store.dispatch('SetZoneSelected', { zone_selected: index })
  373. this.search_keyword = this.search_input = ''
  374. this.getData()
  375. },
  376. //患者状态
  377. handleStateChange: function(index) {
  378. this.patientStateVal = index
  379. // this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
  380. this.search_keyword = this.search_input = ''
  381. this.getData()
  382. },
  383. handleTreatChange: function(index) {
  384. this.treatStateVal = index
  385. // this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
  386. this.search_keyword = this.search_input = ''
  387. this.getData()
  388. },
  389. processedDialysisSchedules: function(schedules, zone_options) {
  390. var zoneMap = {}
  391. var scheduleMap = {}
  392. for (let z_i = 0; z_i < zone_options.length; z_i++) {
  393. const zone = zone_options[z_i]
  394. if (zone.id == 0) {
  395. continue
  396. }
  397. scheduleMap[zone.id] = []
  398. }
  399. for (let index = 0; index < schedules.length; index++) {
  400. const schedule = schedules[index]
  401. scheduleMap[schedule.device_number.zone.id].push(schedule)
  402. }
  403. var zone_schedules = []
  404. for (let index = 0; index < zone_options.length; index++) {
  405. const zone = zone_options[index]
  406. if (zone.id == 0) {
  407. continue
  408. }
  409. var schedules = scheduleMap[zone.id]
  410. zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
  411. }
  412. return zone_schedules
  413. },
  414. searchAction: function() {
  415. this.search_keyword = this.search_input
  416. this.scheduleStateVal = 0
  417. this.zoneVal = 0
  418. this.treatStateVal = 0
  419. this.patientStateVal = 0
  420. if(this.search_input != ''){
  421. let arr = []
  422. this.filtedSchedules.map(item => {
  423. arr.push(...item.schedules)
  424. })
  425. this.tableData = arr
  426. }else{
  427. this.getData()
  428. }
  429. },
  430. requestDialysisSchedules: function() {
  431. var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
  432. getDialysisSchedules(ymd).then(rs => {
  433. var resp = rs.data
  434. if (resp.state == 1) {
  435. var schedules = resp.data.schedules
  436. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  437. let newArr = []
  438. this.zone_schedules.map(item => {
  439. newArr.push(...item.schedules)
  440. })
  441. this.tableData = newArr
  442. } else {
  443. this.$message.error(resp.msg)
  444. }
  445. })
  446. },
  447. changePatient(schedual){
  448. let id = schedual.patient_id
  449. let date = schedual.schedule_date
  450. this.getScheduleDetail(id,date);
  451. },
  452. getData(){
  453. let patientArr = []
  454. patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  455. console.log('patientArr',patientArr)
  456. let arr1 = []
  457. if(this.patientStateVal == 0){
  458. arr1 = patientArr
  459. console.log(arr1)
  460. }else if(this.patientStateVal == 1){
  461. let arr = []
  462. arr = patientArr
  463. for (let i = 0; i <arr.length; i++) {
  464. for (let j = 0; j < arr[i].schedules.length; j++) {
  465. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || (arr[i].schedules[j].assessment_before_dislysis.weight_before == '' && arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' && arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == ''))) {
  466. // 删除元素后改变i的值
  467. arr[i].schedules.splice(j--, 1);
  468. }
  469. }
  470. }
  471. console.log("执行1",arr)
  472. arr1 = arr
  473. }else if(this.patientStateVal == 2){
  474. let arr = []
  475. arr = patientArr
  476. for (let i = 0; i < arr.length; i++) {
  477. for (let j = 0; j < arr[i].schedules.length; j++) {
  478. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
  479. // 删除元素后改变i的值
  480. console.log('几次')
  481. arr[i].schedules.splice(j--, 1);
  482. }
  483. }
  484. }
  485. console.log("执行2",arr)
  486. arr1 = arr
  487. }else if(this.patientStateVal == 3){
  488. let arr = []
  489. arr = patientArr
  490. for (let i = 0; i <arr.length; i++) {
  491. for (let j = 0; j < arr[i].schedules.length; j++) {
  492. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1))) {
  493. // 删除元素后改变i的值
  494. arr[i].schedules.splice(j--, 1);
  495. }
  496. }
  497. }
  498. console.log("执行1",arr)
  499. arr1 = arr
  500. }else if(this.patientStateVal == 4){
  501. let arr = []
  502. arr = patientArr
  503. for (let i = 0; i < arr.length; i++) {
  504. for (let j = 0; j < arr[i].schedules.length; j++) {
  505. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2))) {
  506. // 删除元素后改变i的值
  507. arr[i].schedules.splice(j--, 1);
  508. }
  509. }
  510. }
  511. console.log("执行2",arr)
  512. arr1 = arr
  513. }
  514. let arr2 = []
  515. if(this.treatStateVal == 0){
  516. arr2 = JSON.parse(JSON.stringify(arr1))
  517. }else if(this.treatStateVal == 1){
  518. let arr = []
  519. arr = JSON.parse(JSON.stringify(arr1))
  520. for (let i = 0; i < arr.length; i++) {
  521. for (let j = 0; j < arr[i].schedules.length; j++) {
  522. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].prescription != null || arr[i].schedules[j].prescription != null ? arr[i].schedules[j].prescription.creater != 0 : false)) {
  523. // 删除元素后改变i的值
  524. arr[i].schedules.splice(j--, 1);
  525. }
  526. }
  527. }
  528. arr2 = arr
  529. }else if(this.treatStateVal == 2){
  530. let arr = []
  531. arr = JSON.parse(JSON.stringify(arr1))
  532. for (let i = 0; i < arr.length; i++) {
  533. for (let j = 0; j < arr[i].schedules.length; j++) {
  534. if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
  535. // 删除元素后改变i的值
  536. arr[i].schedules.splice(j--, 1);
  537. }
  538. }
  539. }
  540. arr2 = arr
  541. }
  542. let arr3 = []
  543. if(this.scheduleStateVal == 0){
  544. arr3 = JSON.parse(JSON.stringify(arr2))
  545. }else{
  546. let arr = []
  547. arr = JSON.parse(JSON.stringify(arr2))
  548. for (let i = 0; i < arr.length; i++) {
  549. for (let j = 0; j < arr[i].schedules.length; j++) {
  550. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  551. // 删除元素后改变i的值
  552. arr[i].schedules.splice(j--, 1);
  553. }
  554. }
  555. }
  556. arr3 = arr
  557. console.log("上午",arr)
  558. }
  559. let arr4 = []
  560. if(this.zoneVal == 0){
  561. arr4 = JSON.parse(JSON.stringify(arr3))
  562. }else{
  563. let arr = []
  564. arr = JSON.parse(JSON.stringify(arr3))
  565. for (let i = 0; i < arr.length; i++) {
  566. if (this.zoneVal != arr[i].zone_id) {
  567. // 删除元素后改变i的值
  568. arr.splice(i--, 1);
  569. }
  570. }
  571. arr4 = arr
  572. }
  573. let newArr = []
  574. arr4.map(item => {
  575. newArr.push(...item.schedules)
  576. })
  577. this.tableData = newArr
  578. console.log('table',this.tableData)
  579. },
  580. getScheduleDetail: function(id,date) {
  581. var dateStr = parseTime(date, '{y}-{m}-{d}')
  582. this.doctor_advices = []
  583. getDialysisScheduleDetail(id, dateStr).then(rs => {
  584. var resp = rs.data
  585. if (resp.state == 1) {
  586. var patient = resp.data.patient // 患者信息
  587. var schedual = resp.data.schedual // 患者排班信息
  588. var prescription = resp.data.prescription // 透析处方
  589. if (prescription != null) {
  590. if (prescription.body_fluid == -2) {
  591. prescription.body_fluid = 0
  592. }
  593. }
  594. console.log('透析处方', prescription)
  595. var solution = resp.data.solution // 透析方案
  596. var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
  597. console.log('receiver_treatment_access', receiver_treatment_access)
  598. var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
  599. console.log('透前评估', predialysis_evaluation)
  600. if (predialysis_evaluation != null) {
  601. if (predialysis_evaluation.blood_access_part_id == -2) {
  602. predialysis_evaluation.blood_access_part_id = 0
  603. }
  604. }
  605. var doctor_advices = resp.data.doctor_advices // 临时医嘱
  606. // console.log("力气-------", doctor_advices);
  607. var double_check = resp.data.double_check // 双人核对
  608. var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
  609. // console.log("透后品谷数", assessment_after_dislysis);
  610. var treatment_summary = resp.data.treatment_summary // 治疗小结
  611. var monitor_records = resp.data.monitor_records // 透析监测
  612. var dialysis_order = resp.data.dialysis_order // 透析记录
  613. var niprocart_info = resp.data.niprocart_info
  614. var jms_info = resp.data.jms_info
  615. var fistula_needle_set_info = resp.data.fistula_needle_set_info
  616. var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
  617. var hemoperfusion_info = resp.data.hemoperfusion_info
  618. var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
  619. var filtryzer_info = resp.data.filtryzer_info
  620. var dialyzers_info = resp.data.dialyzers_info
  621. var injector_info = resp.data.injector_info
  622. var bloodlines_info = resp.data.bloodlines_info
  623. var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
  624. var safe_package_info = resp.data.safe_package_info
  625. var aliquid_info = resp.data.aliquid_info
  626. var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
  627. console.log('上次透前评估', lastPredialysisEvaluation)
  628. if (lastPredialysisEvaluation != null) {
  629. if (lastPredialysisEvaluation.blood_access_part_id == -2) {
  630. lastPredialysisEvaluation.blood_access_part_id = 0
  631. }
  632. }
  633. var lastMonitorRecord = resp.data.lastMonitorRecord
  634. var lastAssessmentAfterDislysis =
  635. resp.data.lastAssessmentAfterDislysis
  636. var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
  637. var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
  638. var system_prescribe = resp.data.system_prescribe
  639. // this.$refs.nav.setLastRecord(
  640. // lastPredialysisEvaluation,
  641. // lastMonitorRecord,
  642. // lastAssessmentAfterDislysis,
  643. // lastDialysisPrescribe,
  644. // lastDryWeightDislysis,
  645. // schedual,
  646. // system_prescribe
  647. // )
  648. var headNurses = resp.data.headNurse
  649. var config = resp.data.config
  650. this.lastPredialysisEvaluation = lastPredialysisEvaluation
  651. this.lastMonitorRecord = lastMonitorRecord
  652. this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
  653. this.lastDialysisPrescribe = lastDialysisPrescribe
  654. this.lastDryWeightDislysis = lastDryWeightDislysis
  655. this.headNurses = headNurses
  656. this.system_prescribe = system_prescribe
  657. this.niprocart_info = niprocart_info
  658. this.jms_info = jms_info
  659. this.fistula_needle_set_info = fistula_needle_set_info
  660. this.fistula_needle_set_16_info = fistula_needle_set_16_info
  661. this.hemoperfusion_info = hemoperfusion_info
  662. this.dialyser_sterilised_info = dialyser_sterilised_info
  663. this.filtryzer_info = filtryzer_info
  664. this.dialyzers_info = dialyzers_info
  665. this.injector_info = injector_info
  666. this.bloodlines_info = bloodlines_info
  667. this.tubingHemodialysis_info = tubingHemodialysis_info
  668. this.safe_package_info = safe_package_info
  669. this.aliquid_info = aliquid_info
  670. this.config = config
  671. this.patient = patient
  672. this.schedual = schedual == null ? { id: 0 } : schedual
  673. this.prescription = prescription == null ? { id: 0 } : prescription
  674. this.solution = solution == null ? { id: 0 } : solution
  675. this.receiver_treatment_access =
  676. receiver_treatment_access == null
  677. ? { id: 0 }
  678. : receiver_treatment_access
  679. this.predialysis_evaluation =
  680. predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation
  681. this.doctor_advices = doctor_advices == null ? [] : doctor_advices
  682. this.double_check = double_check == null ? { id: 0 } : double_check
  683. this.assessment_after_dislysis =
  684. assessment_after_dislysis == null
  685. ? { id: 0 }
  686. : assessment_after_dislysis
  687. this.treatment_summary =
  688. treatment_summary == null ? { id: 0 } : treatment_summary
  689. this.monitor_records = monitor_records == null ? [] : monitor_records
  690. this.dialysis_order =
  691. dialysis_order == null ? { id: 0 } : dialysis_order
  692. // this.$refs.stat_order.setAdvices(this.doctor_advices)
  693. // this.$refs.monitoring.setRecords(this.monitor_records)
  694. this.admin_users = resp.data.doctors
  695. this.devices = resp.data.devices
  696. this.device_numbers = resp.data.device_numbers
  697. var device_map = {}
  698. for (let index = 0; index < this.devices.length; index++) {
  699. const device = this.devices[index]
  700. device_map[device.id] = device
  701. }
  702. this.device_map = device_map
  703. var admin_map = {}
  704. for (let index = 0; index < this.admin_users.length; index++) {
  705. const admin = this.admin_users[index]
  706. admin_map[admin.id] = admin
  707. }
  708. this.admin_user_map = admin_map
  709. var device_number_map = {}
  710. for (let index = 0; index < this.device_numbers.length; index++) {
  711. const device_number = this.device_numbers[index]
  712. device_number_map[device_number.id] = device_number
  713. }
  714. this.device_number_map = device_number_map
  715. } else {
  716. this.$message.error(resp.msg)
  717. }
  718. if (this.lastDialysisPrescribe != null) {
  719. delete this.lastDialysisPrescribe.target_ultrafiltration
  720. }
  721. if (this.solution != null) {
  722. delete this.solution.target_ultrafiltration
  723. }
  724. })
  725. },
  726. },
  727. }
  728. </script>
  729. <style lang="scss" scoped>
  730. .fastProvince{
  731. .newUl{
  732. li{
  733. padding:10px 20px !important;
  734. }
  735. }
  736. }
  737. .tableTitle {
  738. font-size: 16px;
  739. color: #000;
  740. font-weight: bold;
  741. line-height: 40px;
  742. }
  743. </style>
  744. <style lang="scss">
  745. .fastProvince{
  746. .el-form-item{
  747. margin-bottom: 0;
  748. }
  749. // .el-button--medium{
  750. // padding: 10px 6px;
  751. // }
  752. }
  753. .newContainer{
  754. display: flex;
  755. .el-date-editor{
  756. .el-input__inner{
  757. padding-right:0px;
  758. }
  759. }
  760. .el-table td, .el-table th{
  761. text-align: center;
  762. }
  763. }
  764. </style>