tableWeeks.vue 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  1. <template>
  2. <div>
  3. <div class="cell clearfix" style="float: right">
  4. <el-button
  5. style="float: right"
  6. size="small"
  7. icon="el-icon-printer"
  8. @click="signPrint()"
  9. type="primary"
  10. >标签打印
  11. </el-button>
  12. <el-button
  13. style="float: right"
  14. size="small"
  15. icon="el-icon-printer"
  16. @click="printAction()"
  17. type="primary"
  18. >打印
  19. </el-button>
  20. <el-button
  21. style="float: right"
  22. size="small"
  23. icon="el-icon-printer"
  24. @click="printActionSetting()"
  25. type="primary">
  26. 打印设置
  27. </el-button>
  28. </div>
  29. <div class="cell clearfix">
  30. <label class="title"> <span class="name">时间</span> : </label>
  31. <div class="time">
  32. <ul class>
  33. <li
  34. :class="item.id == week_type ? 'active' : ''"
  35. @click="selectWeekType(item.id)"
  36. v-for="item in weekArr"
  37. :key="item.id"
  38. >
  39. {{ item.name }}
  40. </li>
  41. </ul>
  42. </div>
  43. </div>
  44. <div class="cell clearfix">
  45. <div class="title"><span class="name">班 次</span> :</div>
  46. <div class="time">
  47. <ul class>
  48. <li
  49. :class="item.id == week_time ? 'active' : ''"
  50. @click="selectWeekTime(item.id)"
  51. v-for="item in weekTimes"
  52. :key="item.id"
  53. >
  54. {{ item.name }}
  55. </li>
  56. </ul>
  57. </div>
  58. </div>
  59. <div class="cell clearfix">
  60. <div class="title"><span class="name">处方状态</span> :</div>
  61. <div class="time">
  62. <ul class>
  63. <li
  64. :class="item.id == pre_status ? 'active' : ''"
  65. @click="selectPreStatus(item.id)"
  66. v-for="item in preStatus"
  67. :key="item.id"
  68. >
  69. {{ item.name }}
  70. </li>
  71. </ul>
  72. </div>
  73. </div>
  74. <div class="cell clearfix">
  75. <div class="title"><span class="name">分区</span> :</div>
  76. <div class="time">
  77. <ul class>
  78. <li
  79. :class="item.id == zone ? 'active' : ''"
  80. @click="selectZoneList(item.id)"
  81. v-for="item in zoneList"
  82. :key="item.id"
  83. >
  84. {{ item.name }}
  85. </li>
  86. </ul>
  87. </div>
  88. </div>
  89. <el-table
  90. :row-style="{ color: '#303133' }"
  91. :data="scheduleData"
  92. border
  93. :header-cell-style="{
  94. backgroundColor: 'rgb(245, 247, 250)',
  95. color: '#606266'
  96. }"
  97. style="width: 100%"
  98. >
  99. <el-table-column label="透析处方" min-width="100" align="center">
  100. <template slot-scope="scope">
  101. <span v-if="scope.row.prescription.id>0">已确定</span>
  102. <span v-if="scope.row.prescription.id == 0">未确定</span>
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="星期" min-width="100" align="center">
  106. <template slot-scope="scope">
  107. <span v-if="scope.row.schedule_week == 0">周日</span>
  108. <span v-if="scope.row.schedule_week == 1">周一</span>
  109. <span v-if="scope.row.schedule_week == 2">周二</span>
  110. <span v-if="scope.row.schedule_week == 3">周三</span>
  111. <span v-if="scope.row.schedule_week == 4">周四</span>
  112. <span v-if="scope.row.schedule_week == 5">周五</span>
  113. <span v-if="scope.row.schedule_week == 6">周六</span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column label="姓名" min-width="100" align="center">
  117. <template slot-scope="scope">
  118. {{ scope.row.patient.name }}
  119. </template>
  120. </el-table-column>
  121. <el-table-column label="分区" min-width="70" align="center">
  122. <template slot-scope="scope">
  123. {{ scope.row.zone.name }}
  124. </template>
  125. </el-table-column>
  126. <el-table-column label="班次" min-width="70" align="center">
  127. <template slot-scope="scope">
  128. {{ getSchedulesType(scope.row.schedule_type) }}
  129. </template>
  130. </el-table-column>
  131. <el-table-column label="机号" min-width="70" align="center">
  132. <template slot-scope="scope">
  133. {{ scope.row.number.number }}
  134. </template>
  135. </el-table-column>
  136. <el-table-column label="透析模式" min-width="100" align="center">
  137. <template slot-scope="scope">
  138. {{
  139. scope.row.mode_id && modeOptions[scope.row.mode_id]
  140. ? modeOptions[scope.row.mode_id].name
  141. : ""
  142. }}
  143. </template>
  144. </el-table-column>
  145. <el-table-column label="透析器/灌流器" min-width="100" align="center">
  146. <template slot-scope="scope">
  147. <span v-if="org_id!=9987&&org_id!=10131">
  148. <span v-if="scope.row.prescription.dialyzer_perfusion_apparatus!=''">
  149. <span>{{ scope.row.prescription.dialyzer_perfusion_apparatus }}</span>
  150. </span>
  151. <span v-if="scope.row.prescription.dialyzer_perfusion_apparatus==''&& scope.row.dialysissolution.length>0 ">{{getDialysisDialyszerPerfusion(scope.row.patient_id)}}</span>
  152. </span>
  153. <span v-if="org_id==10131">{{getDialysisDialyszerPerfusionOne(scope.row.patient_id)}}</span>
  154. {{scope.row.prescription.dialysis_dialyszers}}
  155. <span v-if="scope.row.prescription.dialysis_dialyszers!='' && scope.row.prescription.dialysis_irrigation!=''">/</span>
  156. <span v-if="scope.row.prescription.dialysis_irrigation!=''">{{scope.row.prescription.dialysis_irrigation}}</span>
  157. </template>
  158. </el-table-column>
  159. <el-table-column label="抗凝剂(商品名称)" min-width="70" align="center">
  160. <template slot-scope="scope">
  161. <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
  162. <span v-if="scope.row.prescription.anticoagulant === 2">普通肝素</span>
  163. <span v-if="scope.row.prescription.anticoagulant === 3">低分子肝素</span>
  164. <span v-if="scope.row.prescription.anticoagulant === 4">阿加曲班</span>
  165. <span v-if="scope.row.prescription.anticoagulant === 5">枸橼酸钠</span>
  166. <span v-if="scope.row.prescription.anticoagulant === 6">低分子肝素钙</span>
  167. <span v-if="scope.row.prescription.anticoagulant === 7">低分子肝素钠</span>
  168. <span v-if="scope.row.prescription.antioxidant_commodity_name!=''">
  169. (<span>{{scope.row.prescription.antioxidant_commodity_name}}</span>)
  170. </span>
  171. </template>
  172. </el-table-column>
  173. <el-table-column label="总量" min-width="100" align="center">
  174. <template slot-scope="scope">
  175. <span v-if="scope.row.prescription.anticoagulant == 1">{{
  176. scope.row.prescription.anticoagulant_zongliang
  177. ? scope.row.prescription.anticoagulant_zongliang + "mg"
  178. : ""
  179. }}</span>
  180. <span v-if="scope.row.prescription.anticoagulant == 2">{{
  181. scope.row.prescription.anticoagulant_zongliang
  182. ? scope.row.prescription.anticoagulant_zongliang + "iu"
  183. : ""
  184. }}</span>
  185. <span v-if="scope.row.prescription.anticoagulant == 3">{{
  186. scope.row.prescription.anticoagulant_zongliang
  187. ? scope.row.prescription.anticoagulant_zongliang + "iu"
  188. : ""
  189. }}</span>
  190. <span v-if="scope.row.prescription.anticoagulant == 4">{{
  191. scope.row.prescription.anticoagulant_zongliang
  192. ? scope.row.prescription.anticoagulant_zongliang + "mg"
  193. : ""
  194. }}</span>
  195. <span v-if="scope.row.prescription.anticoagulant == 5">{{
  196. scope.row.prescription.anticoagulant_zongliang
  197. ? scope.row.prescription.anticoagulant_zongliang + "mg"
  198. : ""
  199. }}</span>
  200. <span v-if="scope.row.prescription.anticoagulant == 6">{{
  201. scope.row.prescription.anticoagulant_zongliang
  202. ? scope.row.prescription.anticoagulant_zongliang + "iu"
  203. : ""
  204. }}</span>
  205. <span v-if="scope.row.prescription.anticoagulant == 7">{{
  206. scope.row.prescription.anticoagulant_zongliang
  207. ? scope.row.prescription.anticoagulant_zongliang + "iu"
  208. : ""
  209. }}</span>
  210. </template>
  211. </el-table-column>
  212. <el-table-column label="长期医嘱" min-width="440" align="center">
  213. <template slot-scope="scope">
  214. <span style="white-space: pre">
  215. <span v-if="scope.row.doctoradvice.length >0">{{ getAdvice(scope.row.doctoradvice)}}</span>
  216. <span v-if="scope.row.hisdoctoradviceinfo.length>0">{{ getAdviceOne(scope.row.hisdoctoradviceinfo)}}</span>
  217. </span>
  218. </template>
  219. </el-table-column>
  220. </el-table>
  221. <el-dialog
  222. title="打印设置"
  223. :visible.sync="dialogVisible"
  224. width="30%"
  225. >
  226. <span>
  227. <ul>
  228. <li>
  229. <el-checkbox v-model="prescription_status">透析处方状态</el-checkbox>
  230. </li>
  231. <li>
  232. <el-checkbox v-model="week">星期</el-checkbox>
  233. </li>
  234. <li>
  235. <el-checkbox v-model="name">姓名</el-checkbox>
  236. </li>
  237. <li>
  238. <el-checkbox v-model="zone">分区</el-checkbox>
  239. </li>
  240. <li>
  241. <el-checkbox v-model="classes">班次</el-checkbox>
  242. </li>
  243. <li>
  244. <el-checkbox v-model="number">机号</el-checkbox>
  245. </li>
  246. <li>
  247. <el-checkbox v-model="mode">透析模式</el-checkbox>
  248. </li>
  249. <li>
  250. <el-checkbox v-model="dialyzers">透析器</el-checkbox>
  251. </li>
  252. <li>
  253. <el-checkbox v-model="perfusion_apparatus">灌流器</el-checkbox>
  254. </li>
  255. <li>
  256. <el-checkbox v-model="anticoagulant">抗凝剂(商品名称)</el-checkbox>
  257. </li>
  258. <li>
  259. <el-checkbox v-model="anticoagulant_zongliang">总量</el-checkbox>
  260. </li>
  261. <li>
  262. <el-checkbox v-model="doctor_advice">长期医嘱</el-checkbox>
  263. </li>
  264. </ul>
  265. </span>
  266. <span slot="footer" class="dialog-footer">
  267. <el-button @click="dialogVisible = false">取 消</el-button>
  268. <el-button type="primary" @click="saveRemindPrint">保 存</el-button>
  269. </span>
  270. </el-dialog>
  271. </div>
  272. </template>
  273. <script>
  274. import { getSchedules, getScheduleWeekDay,saveRemindPrint,getRemindPrintList,getScheduleList,getAllZoneList } from "@/api/schedule";
  275. import WeekItem from "./WeekItem";
  276. export default {
  277. name: "tableWeeks",
  278. props: {
  279. weekTime: {
  280. type: String,
  281. default: "thisWeek"
  282. }
  283. },
  284. data() {
  285. return {
  286. weekArr: [
  287. { id: 0, name: "全部" },
  288. { id: 1, name: "周一" },
  289. { id: 2, name: "周二" },
  290. { id: 3, name: "周三" },
  291. { id: 4, name: "周四" },
  292. { id: 5, name: "周五" },
  293. { id: 6, name: "周六" },
  294. { id: 7, name: "周日" }
  295. ],
  296. anticoagulants_confit: null,
  297. week_type: "1",
  298. week_time:0,
  299. pre_status:0,
  300. weekTimes:[
  301. {id:0,name:"全部"},
  302. {id:1,name:"上午"},
  303. {id:2,name:"下午"},
  304. {id:3,name:"晚上"},
  305. ],
  306. preStatus:[
  307. {id:0,name:"全部"},
  308. {id:1,name:"已确认"},
  309. {id:2,name:"未确认"}
  310. ],
  311. weekTitle: ["", "", "", "", "", "", ""],
  312. weekData: {
  313. Monday: [],
  314. Tuesday: [],
  315. Wednesday: [],
  316. Thursday: [],
  317. Friday: [],
  318. Saturday: [],
  319. Sunday: []
  320. },
  321. scheduleData: [],
  322. modeOptions: null,
  323. org_id:0,
  324. dialogVisible:false,
  325. prescription_status:false,
  326. week:false,
  327. name:false,
  328. zone:false,
  329. classes:false,
  330. number:false,
  331. mode:false,
  332. dialyzers:false,
  333. perfusion_apparatus:false,
  334. anticoagulant:false,
  335. anticoagulant_zongliang:false,
  336. doctor_advice:false,
  337. form:{
  338. id:0,
  339. prescription_status:"",
  340. week:"",
  341. name:"",
  342. zone:"",
  343. classes:"",
  344. number:"",
  345. mode:"",
  346. dialyzers:"",
  347. perfusion_apparatus:"",
  348. anticoagulant:"",
  349. anticoagulant_zongliang:"",
  350. doctor_advice:"",
  351. },
  352. zone:0,
  353. zoneList:[{id:0,name:"全部"}]
  354. };
  355. },
  356. watch: {
  357. weekTime: function() {
  358. var theType = this.weekType(this.weekTime);
  359. this.getSchedules(theType);
  360. }
  361. },
  362. methods: {
  363. printAction() {
  364. this.$router.push({
  365. path: "/schedule/remind/print?week_type=" + this.week_type+"&week_time="+this.week_time+"&zone="+this.zone
  366. });
  367. },
  368. signPrint(){
  369. this.$router.push({
  370. path:"/schedule/remind/print/setting?week_type=" + this.week_type+"&week_time="+this.week_time+"&zone="+this.zone+"&prestatus="+this.pre_status
  371. })
  372. },
  373. compare(property) {
  374. return function (a, b) {
  375. var value1 = a[property];
  376. var value2 = b[property];
  377. return value1 - value2;
  378. }
  379. },
  380. getScheduleWeekDay() {
  381. const params = {
  382. week_type:this.week_type,
  383. week_time:this.week_time,
  384. }
  385. getScheduleWeekDay(params).then(response => {
  386. this.scheduleData = [];
  387. if (response.data.state == 1) {
  388. var scheduleData = response.data.data.schdules;
  389. console.log("列表",scheduleData)
  390. for(let i=0;i<scheduleData.length;i++){
  391. scheduleData[i].sort = scheduleData[i].number.sort
  392. }
  393. var arr = scheduleData.sort(this.compare('sort'))
  394. var arr = scheduleData.sort(this.compare('sort'))
  395. this.scheduleData = arr
  396. } else {
  397. this.$message.error("网络错误");
  398. return false;
  399. }
  400. });
  401. },
  402. getScheduleList(){
  403. const params = {
  404. week_type:this.week_type,
  405. week_time:this.week_time,
  406. zone:this.zone,
  407. }
  408. getScheduleList(params).then(response=>{
  409. if(response.data.state ==1){
  410. console.log("22333333333",this.pre_status)
  411. var list = response.data.data.list
  412. if(this.pre_status == 0){
  413. for(let i=0;i<list.length;i++){
  414. list[i].sort = list[i].number.sort
  415. }
  416. var arr = list.sort(this.compare('sort'))
  417. console.log("list2222999999999",list)
  418. this.scheduleData = arr
  419. }
  420. if(this.pre_status == 1){
  421. var newList = []
  422. for(let i=0;i<list.length;i++){
  423. if(list[i].prescription.id > 0){
  424. newList.push(list[i])
  425. }
  426. }
  427. var arr = newList.sort(this.compare('sort'))
  428. this.scheduleData = arr
  429. }
  430. if(this.pre_status == 2){
  431. var newList = []
  432. for(let i=0;i<list.length;i++){
  433. if(list[i].prescription.id ==0){
  434. newList.push(list[i])
  435. }
  436. }
  437. var arr = newList.sort(this.compare('sort'))
  438. this.scheduleData = arr
  439. }
  440. }
  441. })
  442. },
  443. weekType(weekTime) {
  444. var theType = 2;
  445. switch (weekTime) {
  446. case "lastWeek":
  447. theType = 1;
  448. break;
  449. case "thisWeek":
  450. theType = 2;
  451. break;
  452. case "nextWeek":
  453. theType = 3;
  454. break;
  455. case "nextTwoWeek":
  456. theType = 4;
  457. break;
  458. default:
  459. theType = 2;
  460. break;
  461. }
  462. return theType;
  463. },
  464. weekPath(week) {
  465. var weekArr = {
  466. 1: "Monday",
  467. 2: "Tuesday",
  468. 3: "Wednesday",
  469. 4: "Thursday",
  470. 5: "Friday",
  471. 6: "Saturday",
  472. 7: "Sunday"
  473. };
  474. if (typeof weekArr[week] == "undefined") {
  475. return "";
  476. }
  477. return weekArr[week];
  478. },
  479. selectWeekType(type) {
  480. this.week_type = type;
  481. this.getScheduleList()
  482. },
  483. selectWeekTime(type){
  484. this.week_time = type
  485. this.getScheduleList()
  486. },
  487. selectPreStatus(type){
  488. this.pre_status = type
  489. this.getScheduleList()
  490. },
  491. selectZoneList(type){
  492. this.zone = type
  493. this.getScheduleList()
  494. },
  495. getSchedulesType: function(type) {
  496. let type_name = "";
  497. switch (type) {
  498. case 1:
  499. type_name = "上午";
  500. break;
  501. case 2:
  502. type_name = "下午";
  503. break;
  504. case 3:
  505. type_name = "晚上";
  506. break;
  507. }
  508. return type_name;
  509. },
  510. getAdvice: function(doctor_advice) {
  511. if (doctor_advice.length > 0) {
  512. let name = "";
  513. for (let i = 0; i < doctor_advice.length; i++) {
  514. let prescribing_number = "";
  515. let single_dose = "";
  516. let drug_spec = "";
  517. if (doctor_advice[i].prescribing_number > 0) {
  518. prescribing_number =
  519. doctor_advice[i].prescribing_number +
  520. doctor_advice[i].prescribing_number_unit;
  521. }
  522. if (doctor_advice[i].single_dose > 0) {
  523. single_dose =
  524. " 单次用量 " +
  525. doctor_advice[i].single_dose +
  526. doctor_advice[i].single_dose_unit;
  527. }
  528. if (doctor_advice[i].drug_spec > 0) {
  529. drug_spec =
  530. doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
  531. }
  532. name =
  533. name +
  534. doctor_advice[i].advice_name +
  535. " " +
  536. drug_spec +
  537. " " +
  538. prescribing_number +
  539. " " +
  540. single_dose +
  541. " " +
  542. doctor_advice[i].delivery_way +
  543. " " +
  544. doctor_advice[i].execution_frequency +
  545. " " +
  546. doctor_advice[i].remark +
  547. "\n";
  548. if (doctor_advice[i].child.length > 0) {
  549. for (let a = 0; a < doctor_advice[i].child.length; a++) {
  550. if (doctor_advice[i].child[a].prescribing_number > 0) {
  551. doctor_advice[i].child[a]["presc"] =
  552. doctor_advice[i].child[a].prescribing_number +
  553. doctor_advice[i].child[a].prescribing_number_unit;
  554. } else {
  555. doctor_advice[i].child[a]["presc"] = "";
  556. }
  557. if (doctor_advice[i].child[a].single_dose > 0) {
  558. doctor_advice[i].child[a]["single"] =
  559. " " +
  560. " 单次用量 " +
  561. " " +
  562. doctor_advice[i].child[a].single_dose +
  563. doctor_advice[i].child[a].single_dose_unit;
  564. } else {
  565. doctor_advice[i].child[a]["single"] = "";
  566. }
  567. name =
  568. name +
  569. "▲" +
  570. doctor_advice[i].child[a].advice_name +
  571. "" +
  572. doctor_advice[i].child[a].advice_desc +
  573. doctor_advice[i].child[a].drug_spec_unit +
  574. doctor_advice[i].child[a].presc +
  575. doctor_advice[i].child[a].single +
  576. "\n";
  577. }
  578. }
  579. }
  580. return name;
  581. }else{
  582. return ""
  583. }
  584. },
  585. getAdviceOne: function(doctor_advice) {
  586. if (doctor_advice.length > 0) {
  587. let name = "";
  588. for (let i = 0; i < doctor_advice.length; i++) {
  589. let prescribing_number = "";
  590. let single_dose = "";
  591. let drug_spec = "";
  592. if (doctor_advice[i].prescribing_number > 0) {
  593. prescribing_number =
  594. doctor_advice[i].prescribing_number +
  595. doctor_advice[i].prescribing_number_unit;
  596. }
  597. if (doctor_advice[i].single_dose > 0) {
  598. single_dose =
  599. " 单次用量 " +
  600. doctor_advice[i].single_dose +
  601. doctor_advice[i].single_dose_unit;
  602. }
  603. if (doctor_advice[i].drug_spec > 0) {
  604. drug_spec =
  605. doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
  606. }
  607. name =
  608. name +
  609. doctor_advice[i].advice_name +
  610. " " +
  611. drug_spec +
  612. " " +
  613. prescribing_number +
  614. " " +
  615. single_dose +
  616. " " +
  617. doctor_advice[i].delivery_way +
  618. " " +
  619. doctor_advice[i].execution_frequency +
  620. " " +
  621. doctor_advice[i].remark +
  622. "\n";
  623. }
  624. return name;
  625. }else{
  626. return ""
  627. }
  628. },
  629. printActionSetting(){
  630. this.getlist()
  631. this.dialogVisible = true
  632. },
  633. saveRemindPrint(){
  634. console.log("455555555",this.perfusion_apparatus)
  635. if(this.perfusion_apparatus == true){
  636. console.log("3333")
  637. this.form.perfusion_apparatus = 1
  638. }
  639. if(this.perfusion_apparatus == false){
  640. this.form.perfusion_apparatus = 2
  641. }
  642. if(this.prescription_status == true){
  643. this.form.prescription_status = 1
  644. }
  645. if(this.prescription_status == false){
  646. this.form.prescription_status = 2
  647. }
  648. if(this.week == true){
  649. this.form.week = 1
  650. }
  651. if(this.week == false){
  652. this.form.week = 2
  653. }
  654. if(this.name == true){
  655. this.form.name = 1
  656. }
  657. if(this.name == false){
  658. this.form.name = 2
  659. }
  660. if(this.zone == true){
  661. this.form.zone = 1
  662. }
  663. if(this.zone == false){
  664. this.form.zone = 2
  665. }
  666. if(this.classes == true){
  667. this.form.classes = 1
  668. }
  669. if(this.classes == false){
  670. this.form.classes = 2
  671. }
  672. if(this.number == true){
  673. this.form.number = 1
  674. }
  675. if(this.number == false){
  676. this.form.number = 2
  677. }
  678. if(this.mode == true){
  679. this.form.mode = 1
  680. }
  681. if(this.mode == false){
  682. this.form.mode = 2
  683. }
  684. if(this.dialyzers == true){
  685. this.form.dialyzers = 1
  686. }
  687. if(this.dialyzers == false){
  688. this.form.dialyzers = 2
  689. }
  690. if(this.anticoagulant == true){
  691. this.form.anticoagulant = 1
  692. }
  693. if(this.anticoagulant == false){
  694. this.form.anticoagulant = 2
  695. }
  696. if(this.anticoagulant_zongliang == true){
  697. this.form.anticoagulant_zongliang = 1
  698. }
  699. if(this.anticoagulant_zongliang == false){
  700. this.form.anticoagulant_zongliang = 2
  701. }
  702. if(this.doctor_advice == true){
  703. this.form.doctor_advice =1
  704. }
  705. if(this.doctor_advice == false){
  706. this.form.doctor_advice = 2
  707. }
  708. console.log("555555555",this.form.prescription_status)
  709. var params = {
  710. id:this.form.id,
  711. prescription_status:this.form.prescription_status,
  712. week:this.form.week,
  713. name:this.form.name,
  714. zone:this.form.zone,
  715. classes:this.form.classes,
  716. number:this.form.number,
  717. mode:this.form.mode,
  718. dialyzers:this.form.dialyzers,
  719. perfusion_apparatus:this.form.perfusion_apparatus,
  720. anticoagulant:this.form.anticoagulant,
  721. anticoagulant_zongliang:this.form.anticoagulant_zongliang,
  722. doctor_advice:this.form.doctor_advice,
  723. }
  724. console.log("params",params)
  725. saveRemindPrint(params).then(response=>{
  726. if(response.data.state == 1){
  727. var settting = response.data.data.setting
  728. this.$message.success("保存成功")
  729. this.dialogVisible = false
  730. this.getlist()
  731. }
  732. })
  733. },
  734. getlist(){
  735. getRemindPrintList().then(response=>{
  736. if(response.data.state == 1){
  737. var list = response.data.data.list
  738. console.log("list222332",list)
  739. if(list.anticoagulant == 1){
  740. console.log("进来22222")
  741. this.anticoagulant = true
  742. }
  743. if(list.anticoagulant == 2){
  744. this.anticoagulant = false
  745. }
  746. if(list.anticoagulant_zongliang == 1){
  747. this.anticoagulant_zongliang = true
  748. }
  749. if(list.anticoagulant_zongliang == 2){
  750. this.anticoagulant_zongliang = false
  751. }
  752. if(list.classes == 1 ){
  753. this.classes = true
  754. }
  755. if(list.classes == 2){
  756. this.classes = false
  757. }
  758. if(list.dialyzers == 1){
  759. this.dialyzers = true
  760. }
  761. if(list.dialyzers == 2){
  762. this.dialyzers = false
  763. }
  764. if(list.doctor_advice == 1){
  765. this.doctor_advice = true
  766. }
  767. if(list.doctor_advice == 2){
  768. this.doctor_advice = false
  769. }
  770. if(list.name == 1){
  771. this.name = true
  772. }
  773. if(list.name == 2){
  774. this.name = false
  775. }
  776. if(list.number == 1){
  777. this.number = true
  778. }
  779. if(list.number == 2){
  780. this.number = false
  781. }
  782. if(list.perfusion_apparatus == 1){
  783. this.perfusion_apparatus = true
  784. }
  785. if(list.perfusion_apparatus == 2){
  786. this.perfusion_apparatus = false
  787. }
  788. if(list.prescription_status == 1){
  789. this.prescription_status = true
  790. }
  791. if(list.prescription_status == 2){
  792. this.prescription_status = false
  793. }
  794. if(list.week == 1){
  795. this.week = true
  796. }
  797. if(list.week == 2){
  798. this.week = false
  799. }
  800. if(list.zone == 1){
  801. this.zone = true
  802. }
  803. if(list.zone == 2){
  804. this.zone = false
  805. }
  806. if(list.mode ==1){
  807. this.mode = true
  808. }
  809. if(list.mode == 2){
  810. this.mode = false
  811. }
  812. this.form.id = list.id
  813. }
  814. })
  815. },
  816. getAllZoneList(){
  817. getAllZoneList().then(response=>{
  818. if(response.data.state == 1){
  819. var zonelist = response.data.data.zoneList
  820. this.zoneList.push(...zonelist)
  821. }
  822. })
  823. },
  824. getDialysisDialyszerPerfusion(patient_id){
  825. var name = ""
  826. for(let i=0;i<this.scheduleData.length;i++){
  827. if(patient_id == this.scheduleData[i].patient_id){
  828. var arrLength = this.scheduleData[i].dialysissolution.length
  829. if(arrLength > 0){
  830. name = this.scheduleData[i].dialysissolution[arrLength - 1].dialysis_dialyszers
  831. }
  832. }
  833. }
  834. return name
  835. },
  836. getDialysisDialyszerPerfusionOne(patient_id){
  837. var name = ""
  838. for(let i=0;i<this.scheduleData.length;i++){
  839. if(patient_id == this.scheduleData[i].patient_id){
  840. var arrLength = this.scheduleData[i].dialysissolution.length
  841. console.log("病人ID",patient_id,"数组",this.scheduleData[i].dialysissolution)
  842. if(arrLength > 0){
  843. name = this.scheduleData[i].dialysissolution[arrLength - 1].dialyzer_perfusion_apparatus
  844. }
  845. }
  846. }
  847. console.log("name",name)
  848. return name
  849. },
  850. },
  851. components: {
  852. WeekItem
  853. },
  854. created() {
  855. this.modeOptions = this.$store.getters.treatment_mode;
  856. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
  857. this.week_type = new Date().getDay();
  858. if (this.week_type == 0) {
  859. this.week_type = 7;
  860. }
  861. this.org_id = this.$store.getters.xt_user.org.id
  862. this.getScheduleList()
  863. this.getAllZoneList()
  864. }
  865. };
  866. </script>
  867. <style rel="stylesheet/css" lang="scss">
  868. .el-table td,
  869. .el-table th.is-leaf,
  870. .el-table--border,
  871. .el-table--group {
  872. border-color: #d0d3da;
  873. }
  874. .el-table--border::after,
  875. .el-table--group::after,
  876. .el-table::before {
  877. background-color: #d0d3da;
  878. }
  879. </style>