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

dialysisDoctorAdvice.vue 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <el-button
  6. size="small"
  7. icon="el-icon-printer"
  8. :disabled="selecting_schs.length == 0"
  9. @click="batchPrintAction"
  10. type="primary"
  11. >打印</el-button>
  12. </div>
  13. <div class="app-container">
  14. <!-- <div class="filter-container">
  15. <el-input style="width: 400px;" v-model="searchKey" class="filter-item"/>
  16. <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
  17. </div>-->
  18. <div class="cell clearfix">
  19. <label class="title">
  20. <span class="name">日期查询:</span>
  21. </label>
  22. <el-date-picker
  23. v-model="time"
  24. prefix-icon="el-icon-date"
  25. @change="changeTime"
  26. :editable="false"
  27. style="width: 250px;"
  28. type="date"
  29. placeholder="选择日期时间"
  30. align="right"
  31. format="yyyy-MM-dd"
  32. value-format="timestamp"
  33. ></el-date-picker>
  34. <!-- <el-button type="primary" :disabled="selecting_schs.length == 0" @click="batchPrintAction">打印</el-button> -->
  35. </div>
  36. <div class="cell clearfix">
  37. <label class="title"> <span class="name">排班班次</span> : </label>
  38. <div class="time">
  39. <ul class>
  40. <li
  41. :class="item.value == schedulType ? 'active' : ''"
  42. @click="selectSchedulType(item.value)"
  43. v-for="item in schedulArr"
  44. :key="item.value"
  45. >
  46. {{ item.label }}
  47. </li>
  48. </ul>
  49. </div>
  50. </div>
  51. <div class="cell clearfix">
  52. <label class="title"> <span class="name">分区</span> : </label>
  53. <div class="time">
  54. <ul class>
  55. <li
  56. :class="item.id == partitionType ? 'active' : ''"
  57. @click="selectPartitionType(item.id)"
  58. v-for="item in partitionArr"
  59. :key="item.id"
  60. >
  61. {{ item.name }}
  62. </li>
  63. </ul>
  64. </div>
  65. </div>
  66. <div class="cell clearfix">
  67. <label class="title"> <span class="name">给药途径</span> : </label>
  68. <div class="time">
  69. <ul class>
  70. <li
  71. :class="item.id == delivery_way ? 'active' : ''"
  72. @click="selectDeliveryWay(item.id)"
  73. v-for="item in deliveryWay"
  74. :key="item.id"
  75. >
  76. {{ item.name }}
  77. </li>
  78. </ul>
  79. </div>
  80. </div>
  81. <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  82. @selection-change="handleSelectionChange"
  83. :row-class-name="tableRowClassName"
  84. :span-method="objectSpanMethod"
  85. :cell-class-name="adviceNameShow"
  86. :modal-append-to-body="false"
  87. v-show="show">
  88. <el-table-column type="selection" width="55" align="center"></el-table-column>
  89. <el-table-column prop="date" label="姓名" align="center" min-width="26px">
  90. <template slot-scope="scope">
  91. <span>{{ scope.row.name }}</span>
  92. <br>
  93. ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
  94. <br>
  95. <span v-if="scope.row.mode_id == 1">(HD)</span>
  96. <span v-if="scope.row.mode_id == 2">(HDF)</span>
  97. <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
  98. <span v-if="scope.row.mode_id == 4">(HP)</span>
  99. <span v-if="scope.row.mode_id == 5">(HF)</span>
  100. <span v-if="scope.row.mode_id == 6">(SCUF)</span>
  101. <span v-if="scope.row.mode_id == 7">(IUF)</span>
  102. <span v-if="scope.row.mode_id == 8">(HFHD)</span>
  103. <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
  104. <span v-if="scope.row.mode_id == 10">(PHF)</span>
  105. <span v-if="scope.row.mode_id == 11">(HFR)</span>
  106. <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
  107. <span v-if="scope.row.mode_id == 13">(CRRT)</span>
  108. <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
  109. </template>
  110. </el-table-column>
  111. <el-table-column prop="date" label="透析器" align="center" min-width="26px">
  112. <template slot-scope="scope">
  113. <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
  117. <template slot-scope="scope">
  118. <span>
  119. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  120. </span>
  121. </template>
  122. </el-table-column>
  123. <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
  124. <template slot-scope="scope">
  125. <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
  126. <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
  127. {{ getAdviceContent(scope.row, 1)}}
  128. </span>
  129. </el-dropdown>
  130. <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
  131. <span class="el-dropdown-link">
  132. &emsp;{{ getAdviceContent(scope.row, 2)}}
  133. </span>
  134. </el-dropdown>
  135. </template>
  136. </el-table-column>
  137. <el-table-column
  138. prop="start_time"
  139. align="center"
  140. min-width="30px"
  141. label="执行时间"
  142. sortable
  143. >
  144. <template slot-scope="scope">
  145. <span v-if="scope.row.execution_time != 0">
  146. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  147. </span>
  148. <span v-else></span>
  149. </template>
  150. </el-table-column>
  151. <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
  152. <template slot-scope="scope">
  153. <span v-if="scope.row.parent_id == 0">
  154. {{getXuserName(scope.row.execution_staff)}}
  155. </span>
  156. <span v-else></span>
  157. </template>
  158. </el-table-column>
  159. <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
  160. <template slot-scope="scope">
  161. <span v-if="scope.row.parent_id == 0">
  162. {{getXuserName(scope.row.checker)}}
  163. </span>
  164. <span v-else></span>
  165. </template>
  166. </el-table-column>
  167. <el-table-column
  168. prop="check_time"
  169. align="center"
  170. min-width="30px"
  171. label="校对时间"
  172. sortable
  173. >
  174. <template slot-scope="scope">
  175. <span v-if="scope.row.check_time != 0">
  176. {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
  177. </span>
  178. <span v-else></span>
  179. </template>
  180. </el-table-column>
  181. <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
  182. <template slot-scope="scope">
  183. <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
  184. </template>
  185. </el-table-column>
  186. <el-table-column
  187. prop="created_time"
  188. align="center"
  189. min-width="30px"
  190. label="校对时间"
  191. sortable
  192. >
  193. <template slot-scope="scope">
  194. <span v-if="scope.row.created_time != 0">
  195. {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
  196. </span>
  197. <span v-else></span>
  198. </template>
  199. </el-table-column>
  200. </el-table>
  201. <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  202. @selection-change="handleSelectionChange"
  203. :row-class-name="tableRowClassName"
  204. :span-method="objectSpanMethod"
  205. :cell-class-name="adviceNameShow"
  206. :modal-append-to-body="false"
  207. v-show="showOne">
  208. <el-table-column type="selection" width="55" align="center"></el-table-column>
  209. <el-table-column prop="date" label="姓名" align="center" min-width="26px">
  210. <template slot-scope="scope">
  211. <span>{{ scope.row.name }}</span>
  212. <br>
  213. ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
  214. <br>
  215. <span v-if="scope.row.mode_id == 1">(HD)</span>
  216. <span v-if="scope.row.mode_id == 2">(HDF)</span>
  217. <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
  218. <span v-if="scope.row.mode_id == 4">(HP)</span>
  219. <span v-if="scope.row.mode_id == 5">(HF)</span>
  220. <span v-if="scope.row.mode_id == 6">(SCUF)</span>
  221. <span v-if="scope.row.mode_id == 7">(IUF)</span>
  222. <span v-if="scope.row.mode_id == 8">(HFHD)</span>
  223. <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
  224. <span v-if="scope.row.mode_id == 10">(PHF)</span>
  225. <span v-if="scope.row.mode_id == 11">(HFR)</span>
  226. <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
  227. <span v-if="scope.row.mode_id == 13">(CRRT)</span>
  228. <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
  229. </template>
  230. </el-table-column>
  231. <el-table-column prop="date" label="透析器" align="center" min-width="26px">
  232. <template slot-scope="scope">
  233. <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
  234. </template>
  235. </el-table-column>
  236. <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
  237. <template slot-scope="scope">
  238. <span>
  239. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  240. </span>
  241. </template>
  242. </el-table-column>
  243. <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
  244. <template slot-scope="scope">
  245. <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
  246. <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
  247. {{ getAdviceContent(scope.row, 1)}}
  248. </span>
  249. </el-dropdown>
  250. <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
  251. <span class="el-dropdown-link">
  252. &emsp;{{ getAdviceContent(scope.row, 2)}}
  253. </span>
  254. </el-dropdown>
  255. </template>
  256. </el-table-column>
  257. <el-table-column
  258. prop="start_time"
  259. align="center"
  260. min-width="30px"
  261. label="执行时间"
  262. sortable
  263. >
  264. <template slot-scope="scope">
  265. <span v-if="scope.row.execution_time != 0">
  266. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  267. </span>
  268. <span v-else></span>
  269. </template>
  270. </el-table-column>
  271. <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
  272. <template slot-scope="scope">
  273. <span v-if="scope.row.parent_id == 0">
  274. {{getXuserName(scope.row.execution_staff)}}
  275. </span>
  276. <span v-else></span>
  277. </template>
  278. </el-table-column>
  279. <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
  280. <template slot-scope="scope">
  281. <span v-if="scope.row.parent_id == 0">
  282. {{getXuserName(scope.row.checker)}}
  283. </span>
  284. <span v-else></span>
  285. </template>
  286. </el-table-column>
  287. <el-table-column
  288. prop="check_time"
  289. align="center"
  290. min-width="30px"
  291. label="校对时间"
  292. sortable
  293. >
  294. <template slot-scope="scope">
  295. <span v-if="scope.row.check_time != 0">
  296. {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
  297. </span>
  298. <span v-else></span>
  299. </template>
  300. </el-table-column>
  301. <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
  302. <template slot-scope="scope">
  303. <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
  304. </template>
  305. </el-table-column>
  306. <el-table-column
  307. prop="created_time"
  308. align="center"
  309. min-width="30px"
  310. label="校对时间"
  311. sortable
  312. >
  313. <template slot-scope="scope">
  314. <span v-if="scope.row.created_time != 0">
  315. {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
  316. </span>
  317. <span v-else></span>
  318. </template>
  319. </el-table-column>
  320. </el-table>
  321. </div>
  322. </div>
  323. </template>
  324. <script>
  325. const moment = require('moment')
  326. import { getSchedualPatient, GetAllZone } from "@/api/dialysis";
  327. import { parseTime } from "@/utils";
  328. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  329. import { getPrintTemplate } from "@/api/data";
  330. import { getSchedualDoctors } from '@/api/advice'
  331. export default {
  332. name: "Patient",
  333. data() {
  334. return {
  335. crumbs: [
  336. { path: false, name: "透析管理" },
  337. { path: false, name: "透析监测" }
  338. ],
  339. loading: false,
  340. time: "",
  341. search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
  342. patient_search_keyword: "",
  343. SchedualPatientsTableData: [],
  344. active: true,
  345. schedulType: 0,
  346. schedulArr: [
  347. { value: 0, label: "全部" },
  348. { value: 1, label: "上午" },
  349. { value: 2, label: "下午" },
  350. { value: 3, label: "晚上" }
  351. ],
  352. template_id: 0,
  353. partitionType: 0,
  354. total: 0,
  355. listQuery: {
  356. page: 1,
  357. limit: 10,
  358. schedul_type: 0,
  359. partition_type: 0,
  360. schedul_time: "",
  361. keywords: "",
  362. },
  363. selecting_schs: [],
  364. partitionArr: [],
  365. scheduleMap:[],
  366. show:true,
  367. showOne:false,
  368. deliveryWay:[],
  369. delivery_way:0,
  370. };
  371. },
  372. created() {
  373. var date = new Date();
  374. this.time = date;
  375. var year = date.getFullYear();
  376. var month = date.getMonth() + 1;
  377. var day = date.getDate();
  378. if (month < 10) {
  379. month = "0" + month;
  380. }
  381. if (day < 10) {
  382. day = "0" + day;
  383. }
  384. var nowDate = year + "-" + month + "-" + day;
  385. var date = new Date(nowDate + " 00:00:00");
  386. this.listQuery.schedul_time = date.getTime();
  387. this.getAllZone();
  388. this.getTemplateInfo();
  389. this.requestSchedualDoctors(this.time)
  390. // this.template_id = this.$store.getters.xt_user.template_info.template_id;
  391. },
  392. methods: {
  393. getTemplateInfo() {
  394. getPrintTemplate().then(response => {
  395. if (response.data.state == 0) {
  396. this.$message.error(response.data.msg);
  397. return false;
  398. } else {
  399. var template = response.data.data.template;
  400. this.template_id = template.template_id;
  401. }
  402. });
  403. },
  404. clickCurrent(val) {
  405. console.log(val);
  406. this.$router.push({
  407. path: "/dialysis/details",
  408. query: { patient_id: val.patient_id, date: val.sch_time_int,mode_id:val.mode_id }
  409. });
  410. },
  411. handleSelectionChange(val) {
  412. this.selecting_schs = val;
  413. },
  414. selectSchedulType(scheduleType) {
  415. this.schedulType = scheduleType;
  416. this.listQuery.schedul_type = scheduleType;
  417. this.requestSchedualDoctors(this.time);
  418. },
  419. selectPartitionType(partitionType) {
  420. this.partitionType = partitionType;
  421. this.listQuery.partition_type = partitionType;
  422. this.requestSchedualDoctors(this.time);
  423. },
  424. selectDeliveryWay(val){
  425. this.delivery_way = val
  426. this.requestSchedualDoctors(this.time)
  427. },
  428. changeTime() {
  429. this.listQuery.schedul_time = this.time;
  430. this.requestSchedualDoctors(this.time)
  431. },
  432. getAllZone: function() {
  433. GetAllZone().then(response => {
  434. if (response.data.state == 0) {
  435. this.$message.error(response.data.msg);
  436. return false;
  437. } else {
  438. this.partitionArr = response.data.data.zone;
  439. this.partitionArr.unshift({ id: 0, name: "全部" });
  440. var dics = response.data.data.dics
  441. var obj = {id:0,name:"全部"}
  442. this.deliveryWay.push(obj)
  443. this.deliveryWay.push(...dics)
  444. }
  445. });
  446. },
  447. requestSchedualDoctors (time) {
  448. var name = ""
  449. for(let i=0;i<this.deliveryWay.length;i++){
  450. if(this.delivery_way == this.deliveryWay[i].id){
  451. name = this.deliveryWay[i].name
  452. }
  453. }
  454. if(name == '全部'){
  455. name = ""
  456. }
  457. let newTime = moment(time).format('YYYY-MM-DD')
  458. getSchedualDoctors({
  459. date: newTime,
  460. patient_type: 0,
  461. advice_type: 2,
  462. delivery_way:name}).then(rs => {
  463. var resp = rs.data
  464. if (resp.state == 1) {
  465. this.admin_users = resp.data.adminUser
  466. var schedules = resp.data.scheduals
  467. console.log("schedules",schedules)
  468. var config = resp.data.config
  469. if(config.is_open == 0){
  470. this.show = true
  471. this.showOne = false
  472. let arr = []
  473. let newArr = []
  474. let newSchedules = []
  475. schedules.map(item => {
  476. item.doctor_advice.map(it =>{
  477. it.name = item.patient.name
  478. if(item.prescription != null){
  479. it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
  480. }
  481. it.schedule_type = item.schedule_type
  482. it.zoneId = item.device_number.zone.id
  483. it.dialysis_no = item.patient.dialysis_no
  484. it.mode_id = item.mode_id
  485. arr.push(it)
  486. })
  487. })
  488. if(this.schedulType == 0){
  489. newSchedules = arr
  490. }else{
  491. arr.map(item => {
  492. if (item.schedule_type == this.schedulType) {
  493. newSchedules.push(item)
  494. }
  495. })
  496. }
  497. if(this.partitionType == 0){
  498. this.scheduleMap = newSchedules
  499. }else {
  500. let a = []
  501. arr.map(item => {
  502. if(this.partitionType == item.zoneId){
  503. a.push(item)
  504. }
  505. })
  506. this.scheduleMap = a
  507. }
  508. this.scheduleMap.map(ele => {
  509. let firstIndex = this.scheduleMap.findIndex(item => {
  510. return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
  511. })
  512. if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
  513. newArr.push({
  514. length: this.scheduleMap.filter(item => {
  515. return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
  516. }).length,
  517. firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
  518. })
  519. }
  520. })
  521. this.indexInfoList = newArr
  522. }
  523. if(config.is_open == 1 || config.is_open == 2){
  524. this.show = false
  525. this.showOne = true
  526. var schedules = resp.data.hisAdvices
  527. let arr = []
  528. let newArr = []
  529. let newSchedules = []
  530. schedules.map(item => {
  531. item.doctor_advice.map(it =>{
  532. it.name = item.patient.name
  533. if(item.prescription != null){
  534. it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
  535. }
  536. it.schedule_type = item.schedule_type
  537. it.zoneId = item.device_number.zone.id
  538. it.dialysis_no = item.patient.dialysis_no
  539. it.mode_id = item.mode_id
  540. arr.push(it)
  541. })
  542. })
  543. if(this.schedulType == 0){
  544. newSchedules = arr
  545. }else{
  546. arr.map(item => {
  547. if (item.schedule_type == this.schedulType) {
  548. newSchedules.push(item)
  549. }
  550. })
  551. }
  552. if(this.partitionType == 0){
  553. this.scheduleMap = newSchedules
  554. }else {
  555. let a = []
  556. arr.map(item => {
  557. if(this.partitionType == item.zoneId){
  558. a.push(item)
  559. }
  560. })
  561. this.scheduleMap = a
  562. }
  563. this.scheduleMap.map(ele => {
  564. let firstIndex = this.scheduleMap.findIndex(item => {
  565. return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
  566. })
  567. if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
  568. newArr.push({
  569. length: this.scheduleMap.filter(item => {
  570. return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
  571. }).length,
  572. firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
  573. })
  574. }
  575. })
  576. this.indexInfoList = newArr
  577. }
  578. }
  579. })
  580. },
  581. getValue: function(val) {
  582. if (val != undefined) {
  583. return val.value;
  584. } else {
  585. return "";
  586. }
  587. },
  588. handleCurrentChange(val) {
  589. this.listQuery.page = val;
  590. this.getSchedualPatientList();
  591. },
  592. changeSearchMode: function() {
  593. if (this.search_mode == 1) {
  594. this.search_mode = 2;
  595. } else {
  596. this.search_mode = 1;
  597. }
  598. },
  599. searchPatientAction: function() {
  600. this.listQuery.keywords = this.patient_search_keyword;
  601. console.log(this.patient_search_keyword);
  602. if (this.patient_search_keyword.length == 0) {
  603. return;
  604. }
  605. this.getSchedualPatientList();
  606. },
  607. handleSizeChange(val) {
  608. this.listQuery.limit = val;
  609. this.getSchedualPatientList();
  610. },
  611. batchPrintAction: function() {
  612. if (this.selecting_schs.length === 0) {
  613. this.$message.error("请至少选择一条需要打印的内容");
  614. return false;
  615. }
  616. // 模板ID为6
  617. var sch_ids = [];
  618. for (let index = 0; index < this.selecting_schs.length; index++) {
  619. sch_ids.push(this.selecting_schs[index].patient_id);
  620. }
  621. // console.log("sch_ids",sch_ids)
  622. this.$store.dispatch("SetAdviceIDs", sch_ids);
  623. var name = ""
  624. for(let i=0;i<this.deliveryWay.length;i++){
  625. if(this.delivery_way == this.deliveryWay[i].id){
  626. name = this.deliveryWay[i].name
  627. }
  628. }
  629. if(name == '全部'){
  630. name = ""
  631. }
  632. this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name} });
  633. },
  634. batchPrintActionOne: function() {
  635. if (this.selecting_schs.length === 0) {
  636. this.$message.error("请至少选择一条需要打印的内容");
  637. return false;
  638. }
  639. var sch_ids = [];
  640. for (let index = 0; index < this.selecting_schs.length; index++) {
  641. sch_ids.push(this.selecting_schs[index].sch_id);
  642. }
  643. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  644. if (this.template_id == 2 || this.template_id == 0) {
  645. this.$router.push({ path: "/dialysis/print/batch/otherone" });
  646. } else if (this.template_id == 1) {
  647. this.$router.push({ path: "/dialysis/print/batch" });
  648. } else if (this.template_id == 5) {
  649. this.$router.push({ path: "/dialysis/print/batch/fiveone" });
  650. } else if (this.template_id == 22) {
  651. this.$router.push({ path: "/dialysis/print/batch/twentyTwo_one" });
  652. }
  653. },
  654. batchPrintActionTwo: function() {
  655. if (this.selecting_schs.length === 0) {
  656. this.$message.error("请至少选择一条需要打印的内容");
  657. return false;
  658. }
  659. var sch_ids = [];
  660. for (let index = 0; index < this.selecting_schs.length; index++) {
  661. sch_ids.push(this.selecting_schs[index].sch_id);
  662. }
  663. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  664. if (this.template_id == 2 || this.template_id == 0) {
  665. this.$router.push({ path: "/dialysis/print/batch/othertwo" });
  666. } else if (this.template_id == 1) {
  667. this.$router.push({ path: "/dialysis/print/batch" });
  668. } else if (this.template_id == 5) {
  669. this.$router.push({ path: "/dialysis/print/batch/fivetwo" });
  670. } else if (this.template_id == 22) {
  671. this.$router.push({ path: "/dialysis/print/batch/twentyTwo_two" });
  672. }
  673. },
  674. compare (property) {
  675. return function (a, b) {
  676. var value1 = a[property]
  677. var value2 = b[property]
  678. return value1 - value2
  679. }
  680. },
  681. tableRowClassName({ row, rowIndex }) {
  682. // if (row.stop_state == 1 || row.execution_state == 1) {
  683. // return 'stoped-row';
  684. // }
  685. // return 'success-rows'
  686. // row.index = rowIndex
  687. // const arr = this.hoverOrderArr
  688. // for (let i = 0; i < arr.length; i++) {
  689. // if (rowIndex == arr[i]) {
  690. // return 'success-row'
  691. // }
  692. // }
  693. },
  694. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  695. if (columnIndex === 0) {
  696. let index = this.indexInfoList.findIndex(item => { //遍历数组
  697. return item.firstIndex === rowIndex
  698. })
  699. if (index > -1) {
  700. return {
  701. rowspan: this.indexInfoList[index].length,
  702. colspan: 1
  703. }
  704. } else {
  705. return {
  706. rowspan: 0,
  707. colspan: 0
  708. }
  709. }
  710. }
  711. if (columnIndex === 1) {
  712. let index = this.indexInfoList.findIndex(item => { //遍历数组
  713. return item.firstIndex === rowIndex
  714. })
  715. if (index > -1) {
  716. return {
  717. rowspan: this.indexInfoList[index].length,
  718. colspan: 1
  719. }
  720. } else {
  721. return {
  722. rowspan: 0,
  723. colspan: 0
  724. }
  725. }
  726. }
  727. if (columnIndex === 2) {
  728. let index = this.indexInfoList.findIndex(item => { //遍历数组
  729. return item.firstIndex === rowIndex
  730. })
  731. if (index > -1) {
  732. return {
  733. rowspan: this.indexInfoList[index].length,
  734. colspan: 1
  735. }
  736. } else {
  737. return {
  738. rowspan: 0,
  739. colspan: 0
  740. }
  741. }
  742. }
  743. },
  744. adviceNameShow({ row, column, rowIndex, columnIndex }) {
  745. if (columnIndex == 2) {
  746. return 'dialysisadvicenamedisplay'
  747. } else {
  748. return ''
  749. }
  750. },
  751. getXuserName(id) {
  752. if (id <= 0) {
  753. return ''
  754. }
  755. var name = ''
  756. if (
  757. this.admin_users == null ||
  758. typeof this.admin_users.length === 'undefined'
  759. ) {
  760. return name
  761. }
  762. var leng = this.admin_users.length
  763. if (leng == 0) {
  764. return name
  765. }
  766. for (let index = 0; index < leng; index++) {
  767. if (this.admin_users[index].id == id) {
  768. name = this.admin_users[index].name
  769. break
  770. }
  771. }
  772. return name
  773. },
  774. getAdviceContent(row, isChild) {
  775. let tempSingleDoseDesc = ''
  776. let tempDrugSpecDesc = ''
  777. let tempPrescribingNumberDesc = ''
  778. if (row.prescribing_number) {
  779. tempPrescribingNumberDesc =
  780. row.prescribing_number + '' + row.prescribing_number_unit
  781. }
  782. if (row.single_dose) {
  783. if (this.template_id != 6) {
  784. tempSingleDoseDesc =
  785. ' 单次用量 ' + ' ' + row.single_dose + '' + row.single_dose_unit
  786. } else {
  787. tempSingleDoseDesc = row.single_dose + '' + row.single_dose_unit
  788. }
  789. }
  790. if (row.advice_desc) {
  791. tempDrugSpecDesc = '(' + row.advice_desc + row.drug_spec_unit + ')'
  792. }
  793. if (isChild == 1) {
  794. // 不是子药
  795. return (
  796. row.advice_name +
  797. tempDrugSpecDesc +
  798. ' ' +
  799. tempPrescribingNumberDesc +
  800. tempSingleDoseDesc +
  801. ' ' +
  802. row.delivery_way +
  803. ' ' +
  804. row.execution_frequency
  805. )
  806. } else {
  807. // 是子药
  808. return (
  809. row.advice_name +
  810. tempDrugSpecDesc +
  811. ' ' +
  812. tempPrescribingNumberDesc +
  813. tempSingleDoseDesc
  814. )
  815. }
  816. },
  817. handleSelectionChange(val){
  818. // console.log('val',val)
  819. this.selecting_schs = val;
  820. }
  821. },
  822. components: {
  823. BreadCrumb
  824. }
  825. };
  826. </script>
  827. <style rel="stylesheet/scss" lang="scss" scoped>
  828. .app-container {
  829. // margin: 20px;
  830. font-size: 15px;
  831. .filter-container {
  832. padding-bottom: 5px;
  833. }
  834. .cqd-dataTitle {
  835. color: #303133;
  836. font-size: 14px;
  837. border-bottom: 2px #e4e7ed solid;
  838. height: 36px;
  839. line-height: 36px;
  840. margin: 0 0 25px 0;
  841. position: relative;
  842. }
  843. .cqd-dataTitle::before {
  844. position: absolute;
  845. left: 0;
  846. bottom: -2px;
  847. content: "";
  848. width: 42px;
  849. height: 2px;
  850. background: #409eff;
  851. }
  852. .search-component {
  853. width: 500px;
  854. .searchBox {
  855. width: 300px;
  856. height: 36px;
  857. line-height: 36px;
  858. padding-left: 15px;
  859. border: 1px #dcdfe6 solid;
  860. border-right: none;
  861. outline: none;
  862. float: left;
  863. border-radius: 6px 0 0 6px;
  864. font-size: 14px;
  865. color: #333;
  866. background: #fff;
  867. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  868. }
  869. .searchBtn {
  870. background-color: #409eff;
  871. color: #fff;
  872. font-size: 15px;
  873. text-align: center;
  874. height: 36px;
  875. line-height: 36px;
  876. float: left;
  877. outline: none;
  878. width: 70px;
  879. border: none;
  880. border-radius: 0 6px 6px 0;
  881. font-family: "Microsoft Yahei";
  882. cursor: pointer;
  883. }
  884. }
  885. .amount {
  886. font-weight: normal;
  887. padding: 10px 0 0 0;
  888. color: #606266;
  889. font-size: 14px;
  890. span {
  891. color: #ef2525;
  892. font-family: "Arial";
  893. padding: 0 2px;
  894. }
  895. }
  896. }
  897. .el-table td,
  898. .el-table th.is-leaf,
  899. .el-table--border,
  900. .el-table--group {
  901. border-color: #d0d3da;
  902. }
  903. .el-table--border::after,
  904. .el-table--group::after,
  905. .el-table::before {
  906. background-color: #d0d3da;
  907. }
  908. .el-checkbox__inner::after {
  909. height: 10px;
  910. left: 7px;
  911. }
  912. .el-checkbox__inner {
  913. width: 20px;
  914. height: 20px;
  915. }
  916. </style>