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

tableWeeks.vue 50KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555
  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. <el-select v-model="zone" multiple placeholder="请选择" @change="changeZone">
  89. <el-option
  90. v-for="item in zoneList"
  91. :key="item.id"
  92. :label="item.name"
  93. :value="item.id">
  94. </el-option>
  95. </el-select>
  96. </div>
  97. <el-table
  98. v-loading="isloading"
  99. :row-style="{ color: '#303133' }"
  100. :data="summarySchData"
  101. border
  102. :header-cell-style="{
  103. backgroundColor: 'rgb(245, 247, 250)',
  104. color: '#606266'
  105. }"
  106. style="width: 100%"
  107. >
  108. <el-table-column label="分区" min-width="70" align="center">
  109. <template slot-scope="scope">
  110. {{ scope.row.zone.name }}
  111. </template>
  112. </el-table-column>
  113. <el-table-column label="透析模式" min-width="100" align="center">
  114. <template slot-scope="scope">
  115. <!--{{getModeDesc(scope.row.list)}}-->
  116. <div v-html>{{getModeDesc(scope.row.list)}}</div>
  117. </template>
  118. </el-table-column>
  119. <el-table-column label="透析液" min-width="100" align="center">
  120. <template slot-scope="scope">
  121. <div v-html>{{getDialysisLiquidDesc(scope.row.list)}}</div>
  122. </template>
  123. </el-table-column>
  124. <el-table-column label="透析管路" min-width="100" align="center">
  125. <template slot-scope="scope">
  126. <div v-html>{{getDialysisPipeDesc(scope.row.list)}}</div>
  127. </template>
  128. </el-table-column>
  129. <el-table-column label="穿刺针" min-width="100" align="center">
  130. <template slot-scope="scope">
  131. <div v-html>{{getPunctureNeedleDesc(scope.row.list)}}</div>
  132. </template>
  133. </el-table-column>
  134. <el-table-column label="抗凝剂" min-width="100" align="center">
  135. <template slot-scope="scope">
  136. <div v-html>{{getAnticoagulantDesc(scope.row.list)}}</div>
  137. </template>
  138. </el-table-column>
  139. <el-table-column label="促红素" min-width="100" align="center">
  140. <template slot-scope="scope">
  141. <div v-html>{{getEPODesc(scope.row.list)}}</div>
  142. </template>
  143. </el-table-column>
  144. </el-table>
  145. <el-table
  146. v-loading="isloading"
  147. :row-style="{ color: '#303133' }"
  148. :data="scheduleData"
  149. border
  150. :header-cell-style="{
  151. backgroundColor: 'rgb(245, 247, 250)',
  152. color: '#606266'
  153. }"
  154. style="width: 100%"
  155. >
  156. <el-table-column label="透析处方" min-width="100" align="center">
  157. <template slot-scope="scope">
  158. <span v-if="scope.row.prescription.id>0">已确定</span>
  159. <span v-if="scope.row.prescription.id == 0">未确定</span>
  160. </template>
  161. </el-table-column>
  162. <el-table-column label="星期" min-width="100" align="center">
  163. <template slot-scope="scope">
  164. <span v-if="scope.row.schedule_week == 0">周日</span>
  165. <span v-if="scope.row.schedule_week == 1">周一</span>
  166. <span v-if="scope.row.schedule_week == 2">周二</span>
  167. <span v-if="scope.row.schedule_week == 3">周三</span>
  168. <span v-if="scope.row.schedule_week == 4">周四</span>
  169. <span v-if="scope.row.schedule_week == 5">周五</span>
  170. <span v-if="scope.row.schedule_week == 6">周六</span>
  171. </template>
  172. </el-table-column>
  173. <el-table-column label="姓名" min-width="100" align="center">
  174. <template slot-scope="scope">
  175. {{ scope.row.patient.name }}
  176. </template>
  177. </el-table-column>
  178. <el-table-column label="分区" min-width="70" align="center">
  179. <template slot-scope="scope">
  180. {{ scope.row.zone.name }}
  181. </template>
  182. </el-table-column>
  183. <el-table-column label="班次" min-width="70" align="center">
  184. <template slot-scope="scope">
  185. {{ getSchedulesType(scope.row.schedule_type) }}
  186. </template>
  187. </el-table-column>
  188. <el-table-column label="机号" min-width="70" align="center">
  189. <template slot-scope="scope">
  190. {{ scope.row.number.number }}
  191. </template>
  192. </el-table-column>
  193. <el-table-column label="透析模式" min-width="100" align="center">
  194. <template slot-scope="scope">
  195. {{
  196. scope.row.mode_id && modeOptions[scope.row.mode_id]
  197. ? modeOptions[scope.row.mode_id].name
  198. : ''
  199. }}
  200. </template>
  201. </el-table-column>
  202. <el-table-column label="透析器/灌流器" min-width="100" align="center">
  203. <template slot-scope="scope">
  204. <span v-if="org_id!=9987&&org_id!=10131&&org_id!=10215">
  205. <span v-if="scope.row.prescription.dialyzer_perfusion_apparatus!=''">
  206. <span>{{ scope.row.prescription.dialyzer_perfusion_apparatus }}</span>
  207. </span>
  208. <span v-if="scope.row.prescription.dialyzer_perfusion_apparatus==''&& scope.row.dialysissolution.id > 0 ">{{getDialysisDialyszerPerfusion(scope.row.patient_id)}}</span>
  209. </span>
  210. <span v-if="org_id==10131 || org_id == 10215">{{getDialysisDialyszerPerfusionOne(scope.row.patient_id,scope.row.mode_id,scope.row.solution)}}</span>
  211. {{scope.row.prescription.dialysis_dialyszers}}
  212. <span v-if="scope.row.prescription.dialysis_dialyszers!='' && scope.row.prescription.dialysis_irrigation!=''">/</span>
  213. <span v-if="scope.row.prescription.dialysis_irrigation!=''">{{scope.row.prescription.dialysis_irrigation}}</span>
  214. </template>
  215. </el-table-column>
  216. <el-table-column label="抗凝剂(商品名称)" min-width="70" align="center">
  217. <template slot-scope="scope">
  218. <span v-if="scope.row.dialysissolution.anticoagulant === 1">无肝素</span>
  219. <span v-if="scope.row.dialysissolution.anticoagulant === 2">普通肝素</span>
  220. <span v-if="scope.row.dialysissolution.anticoagulant === 3">低分子肝素</span>
  221. <span v-if="scope.row.dialysissolution.anticoagulant === 4">阿加曲班</span>
  222. <span v-if="scope.row.dialysissolution.anticoagulant === 5">枸橼酸钠</span>
  223. <span v-if="scope.row.dialysissolution.anticoagulant === 6">低分子肝素钙</span>
  224. <span v-if="scope.row.dialysissolution.anticoagulant === 7">低分子肝素钠</span>
  225. <span v-if="scope.row.dialysissolution.anticoagulant === 8">伊诺肝素</span>
  226. <span v-if="scope.row.dialysissolution.anticoagulant === 9">达肝素</span>
  227. <span v-if="scope.row.dialysissolution.anticoagulant === 10">体外抗凝</span>
  228. <span v-if="scope.row.dialysissolution.anticoagulant === 11">那曲肝素</span>
  229. <span v-if="scope.row.dialysissolution.antioxidant_commodity_name!=''">
  230. (<span>{{scope.row.prescription.antioxidant_commodity_name}}</span>)
  231. </span>
  232. </template>
  233. </el-table-column>
  234. <el-table-column label="总量" min-width="100" align="center">
  235. <template slot-scope="scope">
  236. <span v-if="scope.row.dialysissolution.anticoagulant == 1">{{
  237. scope.row.dialysissolution.anticoagulant_zongliang
  238. ? scope.row.dialysissolution.anticoagulant_zongliang + 'mg'
  239. : ''
  240. }}</span>
  241. <span v-if="scope.row.dialysissolution.anticoagulant == 2">{{
  242. scope.row.dialysissolution.anticoagulant_zongliang
  243. ? scope.row.dialysissolution.anticoagulant_zongliang + 'iu'
  244. : ''
  245. }}</span>
  246. <span v-if="scope.row.dialysissolution.anticoagulant == 3">{{
  247. scope.row.dialysissolution.anticoagulant_zongliang
  248. ? scope.row.dialysissolution.anticoagulant_zongliang + 'iu'
  249. : ''
  250. }}</span>
  251. <span v-if="scope.row.dialysissolution.anticoagulant == 4">{{
  252. scope.row.dialysissolution.anticoagulant_zongliang
  253. ? scope.row.dialysissolution.anticoagulant_zongliang + 'mg'
  254. : ''
  255. }}</span>
  256. <span v-if="scope.row.dialysissolution.anticoagulant == 5">{{
  257. scope.row.dialysissolution.anticoagulant_zongliang
  258. ? scope.row.dialysissolution.anticoagulant_zongliang + 'mg'
  259. : ''
  260. }}</span>
  261. <span v-if="scope.row.dialysissolution.anticoagulant == 6">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
  262. <span v-if="scope.row.dialysissolution.anticoagulant == 7">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
  263. <span v-if="scope.row.dialysissolution.anticoagulant == 8">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
  264. <span v-if="scope.row.dialysissolution.anticoagulant == 9">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
  265. <span v-if="scope.row.dialysissolution.anticoagulant == 10">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
  266. <span v-if="scope.row.dialysissolution.anticoagulant == 11">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
  267. </template>
  268. </el-table-column>
  269. <el-table-column label="长期医嘱" min-width="440" align="center">
  270. <template slot-scope="scope">
  271. <span style="white-space: pre">
  272. <span v-if="scope.row.doctoradvice.length >0">{{ getAdvice(scope.row.doctoradvice)}}</span>
  273. <span v-if="scope.row.hisdoctoradviceinfo.length>0">{{ getAdviceOne(scope.row.hisdoctoradviceinfo)}}</span>
  274. </span>
  275. </template>
  276. </el-table-column>
  277. </el-table>
  278. <el-dialog
  279. title="打印设置"
  280. :visible.sync="dialogVisible"
  281. width="30%"
  282. >
  283. <span>
  284. <ul>
  285. <li>
  286. <el-checkbox v-model="prescription_status">透析处方状态</el-checkbox>
  287. </li>
  288. <li>
  289. <el-checkbox v-model="week">星期</el-checkbox>
  290. </li>
  291. <li>
  292. <el-checkbox v-model="name">姓名</el-checkbox>
  293. </li>
  294. <li>
  295. <el-checkbox v-model="zone_name">分区</el-checkbox>
  296. </li>
  297. <li>
  298. <el-checkbox v-model="classes">班次</el-checkbox>
  299. </li>
  300. <li>
  301. <el-checkbox v-model="number">机号</el-checkbox>
  302. </li>
  303. <li>
  304. <el-checkbox v-model="mode">透析模式</el-checkbox>
  305. </li>
  306. <li>
  307. <el-checkbox v-model="dialyzers">透析器</el-checkbox>
  308. </li>
  309. <li>
  310. <el-checkbox v-model="perfusion_apparatus">灌流器</el-checkbox>
  311. </li>
  312. <li>
  313. <el-checkbox v-model="anticoagulant">抗凝剂(商品名称)</el-checkbox>
  314. </li>
  315. <li>
  316. <el-checkbox v-model="anticoagulant_zongliang">总量</el-checkbox>
  317. </li>
  318. <li>
  319. <el-checkbox v-model="doctor_advice">长期医嘱</el-checkbox>
  320. </li>
  321. </ul>
  322. </span>
  323. <span slot="footer" class="dialog-footer">
  324. <el-button @click="dialogVisible = false">取 消</el-button>
  325. <el-button type="primary" @click="saveRemindPrint">保 存</el-button>
  326. </span>
  327. </el-dialog>
  328. </div>
  329. </template>
  330. <script>
  331. import { getDataConfig } from '@/utils/data'
  332. import {
  333. getAllZoneList,
  334. getRemindPrintList,
  335. getScheduleList,
  336. getSchedules,
  337. getScheduleWeekDay,
  338. saveRemindPrint
  339. } from '@/api/schedule'
  340. import WeekItem from './WeekItem'
  341. export default {
  342. name: 'tableWeeks',
  343. props: {
  344. weekTime: {
  345. type: String,
  346. default: 'thisWeek'
  347. }
  348. },
  349. data() {
  350. return {
  351. isloading:false,
  352. weekArr: [
  353. { id: 0, name: '全部' },
  354. { id: 1, name: '周一' },
  355. { id: 2, name: '周二' },
  356. { id: 3, name: '周三' },
  357. { id: 4, name: '周四' },
  358. { id: 5, name: '周五' },
  359. { id: 6, name: '周六' },
  360. { id: 7, name: '周日' }
  361. ],
  362. anticoagulants_confit: null,
  363. week_type: '1',
  364. week_time: 0,
  365. pre_status: 0,
  366. weekTimes: [
  367. { id: 0, name: '全部' },
  368. { id: 1, name: '上午' },
  369. { id: 2, name: '下午' },
  370. { id: 3, name: '晚上' }
  371. ],
  372. preStatus: [
  373. { id: 0, name: '全部' },
  374. { id: 1, name: '已确认' },
  375. { id: 2, name: '未确认' }
  376. ],
  377. weekTitle: ['', '', '', '', '', '', ''],
  378. weekData: {
  379. Monday: [],
  380. Tuesday: [],
  381. Wednesday: [],
  382. Thursday: [],
  383. Friday: [],
  384. Saturday: [],
  385. Sunday: []
  386. },
  387. scheduleData: [],
  388. modeOptions: null,
  389. org_id: 0,
  390. dialogVisible: false,
  391. prescription_status: false,
  392. week: false,
  393. name: false,
  394. zone_name: false,
  395. classes: false,
  396. number: false,
  397. mode: false,
  398. dialyzers: false,
  399. perfusion_apparatus: false,
  400. anticoagulant: false,
  401. anticoagulant_zongliang: false,
  402. doctor_advice: false,
  403. form: {
  404. id: 0,
  405. prescription_status: '',
  406. week: '',
  407. name: '',
  408. zone: '',
  409. classes: '',
  410. number: '',
  411. mode: '',
  412. dialyzers: '',
  413. perfusion_apparatus: '',
  414. anticoagulant: '',
  415. anticoagulant_zongliang: '',
  416. doctor_advice: ''
  417. },
  418. // zone: 0,
  419. // zoneList: [{ id: 0, name: '全部' }],
  420. summarySchData: [],
  421. zone:0,
  422. zoneList:[],
  423. }
  424. },
  425. watch: {
  426. weekTime: function() {
  427. var theType = this.weekType(this.weekTime)
  428. this.getSchedules(theType)
  429. }
  430. },
  431. methods: {
  432. getModeName(mode_id) {
  433. return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
  434. }, getDialysisLiquidName(id) {
  435. let dialysate_formulation_options = getDataConfig(
  436. 'hemodialysis',
  437. 'dialysate_formulation'
  438. )
  439. // return this.$store.getters.dialysate_formulation[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
  440. for (let i = 0; i < dialysate_formulation_options.length; i++) {
  441. if (id == dialysate_formulation_options[i].id) {
  442. return dialysate_formulation_options[i].name
  443. }
  444. }
  445. return ''
  446. },getAnticoagulantName(id) {
  447. return this.$store.getters.anticoagulants_confit[id] != undefined ? this.$store.getters.anticoagulants_confit[id].name: ""
  448. },
  449. getModeDesc(list) {
  450. let modes = []
  451. for (let b = 0; b < list.length; b++) {
  452. let obj = {
  453. mode_id: list[b].mode_id,
  454. mode_name: this.getModeName(list[b].mode_id),
  455. count: 0
  456. }
  457. modes.push(obj)
  458. }
  459. modes = this.uniqueMode(modes)
  460. for (let i = 0; i < list.length; i++) {
  461. switch (list[i].mode_id) {
  462. case 1:
  463. for (let b = 0; b < modes.length; b++) {
  464. if (modes[b].mode_id == list[i].mode_id) {
  465. modes[b].count = modes[b].count + 1
  466. }
  467. }
  468. break
  469. case 2:
  470. for (let b = 0; b < modes.length; b++) {
  471. if (modes[b].mode_id == list[i].mode_id) {
  472. modes[b].count = modes[b].count + 1
  473. }
  474. }
  475. break
  476. case 3:
  477. for (let b = 0; b < modes.length; b++) {
  478. if (modes[b].mode_id == list[i].mode_id) {
  479. modes[b].count = modes[b].count + 1
  480. }
  481. }
  482. break
  483. case 4:
  484. for (let b = 0; b < modes.length; b++) {
  485. if (modes[b].mode_id == list[i].mode_id) {
  486. modes[b].count = modes[b].count + 1
  487. }
  488. }
  489. break
  490. case 5:
  491. for (let b = 0; b < modes.length; b++) {
  492. if (modes[b].mode_id == list[i].mode_id) {
  493. modes[b].count = modes[b].count + 1
  494. }
  495. }
  496. break
  497. case 6:
  498. for (let b = 0; b < modes.length; b++) {
  499. if (modes[b].mode_id == list[i].mode_id) {
  500. modes[b].count = modes[b].count + 1
  501. }
  502. }
  503. break
  504. case 7:
  505. for (let b = 0; b < modes.length; b++) {
  506. if (modes[b].mode_id == list[i].mode_id) {
  507. modes[b].count = modes[b].count + 1
  508. }
  509. }
  510. break
  511. case 8:
  512. for (let b = 0; b < modes.length; b++) {
  513. if (modes[b].mode_id == list[i].mode_id) {
  514. modes[b].count = modes[b].count + 1
  515. }
  516. }
  517. break
  518. case 9:
  519. for (let b = 0; b < modes.length; b++) {
  520. if (modes[b].mode_id == list[i].mode_id) {
  521. modes[b].count = modes[b].count + 1
  522. }
  523. }
  524. break
  525. case 10:
  526. for (let b = 0; b < modes.length; b++) {
  527. if (modes[b].mode_id == list[i].mode_id) {
  528. modes[b].count = modes[b].count + 1
  529. }
  530. }
  531. break
  532. case 11:
  533. for (let b = 0; b < modes.length; b++) {
  534. if (modes[b].mode_id == list[i].mode_id) {
  535. modes[b].count = modes[b].count + 1
  536. }
  537. }
  538. break
  539. case 12:
  540. for (let b = 0; b < modes.length; b++) {
  541. if (modes[b].mode_id == list[i].mode_id) {
  542. modes[b].count = modes[b].count + 1
  543. }
  544. }
  545. break
  546. case 13:
  547. for (let b = 0; b < modes.length; b++) {
  548. if (modes[b].mode_id == list[i].mode_id) {
  549. modes[b].count = modes[b].count + 1
  550. }
  551. }
  552. break
  553. case 14:
  554. for (let b = 0; b < modes.length; b++) {
  555. if (modes[b].mode_id == list[i].mode_id) {
  556. modes[b].count = modes[b].count + 1
  557. }
  558. }
  559. break
  560. case 19:
  561. for (let b = 0; b < modes.length; b++) {
  562. if (modes[b].mode_id == list[i].mode_id) {
  563. modes[b].count = modes[b].count + 1
  564. }
  565. }
  566. break
  567. case 20:
  568. for (let b = 0; b < modes.length; b++) {
  569. if (modes[b].mode_id == list[i].mode_id) {
  570. modes[b].count = modes[b].count + 1
  571. }
  572. }
  573. break
  574. case 21:
  575. for (let b = 0; b < modes.length; b++) {
  576. if (modes[b].mode_id == list[i].mode_id) {
  577. modes[b].count = modes[b].count + 1
  578. }
  579. }
  580. break
  581. case 22:
  582. for (let b = 0; b < modes.length; b++) {
  583. if (modes[b].mode_id == list[i].mode_id) {
  584. modes[b].count = modes[b].count + 1
  585. }
  586. }
  587. break
  588. case 23:
  589. for (let b = 0; b < modes.length; b++) {
  590. if (modes[b].mode_id == list[i].mode_id) {
  591. modes[b].count = modes[b].count + 1
  592. }
  593. }
  594. break
  595. }
  596. }
  597. let desc = ''
  598. for (let i = 0; i < modes.length; i++) {
  599. if (desc.length == 0) {
  600. desc = modes[i].mode_name + ': ' + modes[i].count + '次'
  601. } else {
  602. desc = desc + ' ' + modes[i].mode_name + ': ' + modes[i].count + '次'
  603. }
  604. }
  605. return desc
  606. },
  607. getDialysisLiquidDesc(list) {
  608. let modes = []
  609. for (let b = 0; b < list.length; b++) {
  610. let obj = {
  611. id: list[b].dialysissolution.dialysate_formulation,
  612. name: this.getDialysisLiquidName(list[b].dialysissolution.dialysate_formulation),
  613. count: 0
  614. }
  615. modes.push(obj)
  616. }
  617. modes = this.uniqueDialysisFormulation(modes)
  618. for (let i = 0; i < list.length; i++) {
  619. for (let c = 0; c < modes.length; c++) {
  620. if (modes[c].id == list[i].dialysissolution.dialysate_formulation) {
  621. modes[c].count = modes[c].count + 1
  622. }
  623. }
  624. }
  625. let desc = ''
  626. for (let b = 0; b < modes.length; b++) {
  627. if (desc.length == 0) {
  628. desc = modes[b].name + ': ' + modes[b].count
  629. } else {
  630. desc = desc + ' ' + modes[b].name + ': ' + modes[b].count
  631. }
  632. }
  633. return desc
  634. },
  635. getDialysisPipeDesc(list) {
  636. let dialysisPipe = []
  637. for (let b = 0; b < list.length; b++) {
  638. var hemodialysis_pipelines_arr = []
  639. if (list[b].dialysissolution.hemodialysis_pipelines.length > 0) {
  640. hemodialysis_pipelines_arr = list[b].dialysissolution.hemodialysis_pipelines.split(',')
  641. } else {
  642. hemodialysis_pipelines_arr = []
  643. }
  644. for (let c = 0; c < hemodialysis_pipelines_arr.length; c++) {
  645. let obj = {
  646. name: hemodialysis_pipelines_arr[c],
  647. count: 0
  648. }
  649. dialysisPipe.push(obj)
  650. }
  651. }
  652. console.log(dialysisPipe)
  653. dialysisPipe = this.uniqueDialysisPipe(dialysisPipe)
  654. console.log(dialysisPipe)
  655. let desc = ''
  656. for (let b = 0; b < dialysisPipe.length; b++) {
  657. for (let i = 0; i < list.length; i++) {
  658. let hemodialysis_pipelines_arr = list[i].dialysissolution.hemodialysis_pipelines.split(',')
  659. console.log(hemodialysis_pipelines_arr)
  660. for (let c = 0; c < hemodialysis_pipelines_arr.length; c++) {
  661. if (dialysisPipe[b].name == hemodialysis_pipelines_arr[c]) {
  662. dialysisPipe[b].count = dialysisPipe[b].count + list[i].dialysissolution.hemodialysis_pipelines_count
  663. }
  664. }
  665. }
  666. }
  667. for (let b = 0; b < dialysisPipe.length; b++) {
  668. if (desc.length == 0) {
  669. desc = dialysisPipe[b].name + ': ' + dialysisPipe[b].count + '支'
  670. } else {
  671. desc = desc + ' ' + dialysisPipe[b].name + ': ' + dialysisPipe[b].count + '支'
  672. }
  673. }
  674. return desc
  675. }
  676. ,
  677. getPunctureNeedleDesc(list) {
  678. let punctureNeedle = []
  679. for (let b = 0; b < list.length; b++) {
  680. var puncture_needle_arr = []
  681. if (list[b].dialysissolution.puncture_needle.length > 0) {
  682. puncture_needle_arr = list[b].dialysissolution.puncture_needle.split(',')
  683. } else {
  684. puncture_needle_arr = []
  685. }
  686. for (let c = 0; c < puncture_needle_arr.length; c++) {
  687. let obj = {
  688. name: puncture_needle_arr[c],
  689. count: 0
  690. }
  691. punctureNeedle.push(obj)
  692. }
  693. }
  694. punctureNeedle = this.uniqueDialysisPipe(punctureNeedle)
  695. let desc = ''
  696. for (let b = 0; b < punctureNeedle.length; b++) {
  697. for (let i = 0; i < list.length; i++) {
  698. let puncture_needle_arr = list[i].dialysissolution.puncture_needle.split(',')
  699. for (let c = 0; c < puncture_needle_arr.length; c++) {
  700. if (punctureNeedle[b].name == puncture_needle_arr[c]) {
  701. punctureNeedle[b].count = punctureNeedle[b].count + list[i].dialysissolution.puncture_needle_count
  702. }
  703. }
  704. }
  705. }
  706. for (let b = 0; b < punctureNeedle.length; b++) {
  707. if (desc.length == 0) {
  708. desc = punctureNeedle[b].name + ': ' + punctureNeedle[b].count + '支'
  709. } else {
  710. desc = desc + ' ' + punctureNeedle[b].name + ': ' + punctureNeedle[b].count + '支'
  711. }
  712. }
  713. return desc
  714. }
  715. ,
  716. getAnticoagulantDesc(list) {
  717. let modes = []
  718. for (let b = 0; b < list.length; b++) {
  719. let obj = {
  720. id: list[b].dialysissolution.anticoagulant,
  721. name: this.getAnticoagulantName(list[b].dialysissolution.anticoagulant),
  722. count: 0
  723. }
  724. modes.push(obj)
  725. }
  726. modes = this.uniqueAnticoagulant(modes)
  727. for (let i = 0; i < list.length; i++) {
  728. for (let c = 0; c < modes.length; c++) {
  729. if (modes[c].id == list[i].dialysissolution.anticoagulant) {
  730. modes[c].count = modes[c].count + 1
  731. }
  732. }
  733. }
  734. let desc = ''
  735. for (let b = 0; b < modes.length; b++) {
  736. if (desc.length == 0) {
  737. desc = modes[b].name + ': ' + modes[b].count + '支'
  738. } else {
  739. desc = desc + ' ' + modes[b].name + ': ' + modes[b].count + '支'
  740. }
  741. }
  742. return desc
  743. },
  744. getEPODesc(list) {
  745. let EPO = []
  746. for (let b = 0; b < list.length; b++) {
  747. var epo_arr = []
  748. if (list[b].dialysissolution.epo.length > 0) {
  749. epo_arr = list[b].dialysissolution.epo.split(',')
  750. } else {
  751. epo_arr = []
  752. }
  753. for (let c = 0; c < epo_arr.length; c++) {
  754. let obj = {
  755. name: epo_arr[c],
  756. count: 0
  757. }
  758. EPO.push(obj)
  759. }
  760. }
  761. EPO = this.uniqueDialysisPipe(EPO)
  762. let desc = ''
  763. for (let b = 0; b < EPO.length; b++) {
  764. for (let i = 0; i < list.length; i++) {
  765. let epo_arr = list[i].dialysissolution.epo.split(',')
  766. for (let c = 0; c < epo_arr.length; c++) {
  767. if (EPO[b].name == epo_arr[c]) {
  768. EPO[b].count = EPO[b].count + list[i].dialysissolution.epo_count
  769. }
  770. }
  771. }
  772. }
  773. for (let b = 0; b < EPO.length; b++) {
  774. if (desc.length == 0) {
  775. desc = EPO[b].name + ': ' + EPO[b].count + '支'
  776. } else {
  777. desc = desc + ' ' + EPO[b].name + ': ' + EPO[b].count + '支'
  778. }
  779. }
  780. return desc
  781. }
  782. ,
  783. printAction() {
  784. var zone = this.zone
  785. var newArr = []
  786. for(let i=0;i<this.zoneList.length;i++){
  787. newArr.push(this.zoneList[i].id)
  788. }
  789. var arr = newArr.join(",")
  790. var str = ""
  791. if(this.zone == 0){
  792. str = arr
  793. }
  794. if(zone != 0){
  795. str = zone.join(",")
  796. }
  797. this.$router.push({
  798. path: '/schedule/remind/print?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + str
  799. })
  800. }
  801. ,
  802. signPrint() {
  803. var zone = this.zone
  804. console.log("zone23232",zone)
  805. var newArr = []
  806. for(let i=0;i<this.zoneList.length;i++){
  807. newArr.push(this.zoneList[i].id)
  808. }
  809. var arr = newArr.join(",")
  810. var str = ""
  811. if(this.zone == 0){
  812. str = arr
  813. }
  814. if(zone != 0){
  815. str = zone.join(",")
  816. }
  817. this.$router.push({
  818. path: '/schedule/remind/print/setting?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + str + '&prestatus=' + this.pre_status+"&type="+1
  819. })
  820. }
  821. ,
  822. compare(property) {
  823. return function(a, b) {
  824. var value1 = a[property]
  825. var value2 = b[property]
  826. return value1 - value2
  827. }
  828. }
  829. ,
  830. getScheduleWeekDay() {
  831. const params = {
  832. week_type: this.week_type,
  833. week_time: this.week_time
  834. }
  835. getScheduleWeekDay(params).then(response => {
  836. this.scheduleData = []
  837. if (response.data.state == 1) {
  838. var scheduleData = response.data.data.schdules
  839. console.log('列表', scheduleData)
  840. for (let i = 0; i < scheduleData.length; i++) {
  841. scheduleData[i].sort = scheduleData[i].number.sort
  842. }
  843. var arr = scheduleData.sort(this.compare('sort'))
  844. var arr = scheduleData.sort(this.compare('sort'))
  845. this.scheduleData = arr
  846. } else {
  847. this.$message.error('网络错误')
  848. return false
  849. }
  850. })
  851. }
  852. ,
  853. uniqueZone(arr) {
  854. const res = new Map()
  855. return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
  856. }
  857. ,
  858. uniqueMode(arr) {
  859. const res = new Map()
  860. return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1))
  861. }
  862. ,
  863. uniqueDialysisPipe(arr) {
  864. const res = new Map()
  865. return arr.filter((arr) => !res.has(arr.name) && res.set(arr.name, 1))
  866. }
  867. ,
  868. uniqueDialysisFormulation(arr) {
  869. const res = new Map()
  870. return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
  871. }
  872. , uniqueAnticoagulant(arr) {
  873. const res = new Map()
  874. return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
  875. }
  876. ,
  877. getScheduleList() {
  878. var zone = this.zone
  879. var newArr = []
  880. for(let i=0;i<this.zoneList.length;i++){
  881. newArr.push(this.zoneList[i].id)
  882. }
  883. var arr = newArr.join(",")
  884. var str = ""
  885. if(this.zone == 0){
  886. str = arr
  887. }
  888. if(zone != 0){
  889. str = zone.join(",")
  890. }
  891. const params = {
  892. week_type: this.week_type,
  893. week_time: this.week_time,
  894. zone: str,
  895. }
  896. console.log("param",params)
  897. this.scheduleData = []
  898. this.isloading = true
  899. getScheduleList(params).then(response => {
  900. if (response.data.state == 1) {
  901. this.isloading = false
  902. console.log('22333333333', this.pre_status)
  903. var list = response.data.data.list
  904. console.log("list33333333333333333333",list)
  905. if (this.pre_status == 0) {
  906. for (let i = 0; i < list.length; i++) {
  907. list[i].sort = list[i].number.sort
  908. }
  909. var arr = list.sort(this.compare('sort'))
  910. this.scheduleData = arr
  911. //汇总逻辑
  912. var zones = []
  913. for (let b = 0; b < arr.length; b++) {
  914. zones.push(arr[b].zone)
  915. }
  916. zones = this.uniqueZone(zones)
  917. this.summarySchData = []
  918. for (let i = 0; i < zones.length; i++) {
  919. let obj = {
  920. zone: zones[i],
  921. list: []
  922. }
  923. for (let b = 0; b < arr.length; b++) {
  924. if (zones[i].id == arr[b].zone.id) {
  925. obj.list.push(arr[b])
  926. }
  927. }
  928. this.summarySchData.push(obj)
  929. }
  930. }
  931. if (this.pre_status == 1) {
  932. var newList = []
  933. for (let i = 0; i < list.length; i++) {
  934. if (list[i].prescription.id > 0) {
  935. newList.push(list[i])
  936. }
  937. }
  938. var arr = newList.sort(this.compare('sort'))
  939. this.scheduleData = arr
  940. //汇总逻辑
  941. var zones = []
  942. for (let b = 0; b < arr.length; b++) {
  943. zones.push(arr[b].zone)
  944. }
  945. zones = this.uniqueZone(zones)
  946. this.summarySchData = []
  947. for (let i = 0; i < zones.length; i++) {
  948. let obj = {
  949. zone: zones[i],
  950. list: []
  951. }
  952. for (let b = 0; b < arr.length; b++) {
  953. if (zones[i].id == arr[b].zone.id) {
  954. obj.list.push(arr[b])
  955. }
  956. }
  957. this.summarySchData.push(obj)
  958. }
  959. }
  960. if (this.pre_status == 2) {
  961. var newList = []
  962. for (let i = 0; i < list.length; i++) {
  963. if (list[i].prescription.id == 0) {
  964. newList.push(list[i])
  965. }
  966. }
  967. var arr = newList.sort(this.compare('sort'))
  968. this.scheduleData = arr
  969. //汇总逻辑
  970. var zones = []
  971. for (let b = 0; b < arr.length; b++) {
  972. zones.push(arr[b].zone)
  973. }
  974. zones = this.uniqueZone(zones)
  975. this.summarySchData = []
  976. for (let i = 0; i < zones.length; i++) {
  977. let obj = {
  978. zone: zones[i],
  979. list: []
  980. }
  981. for (let b = 0; b < arr.length; b++) {
  982. if (zones[i].id == arr[b].zone.id) {
  983. obj.list.push(arr[b])
  984. }
  985. }
  986. this.summarySchData.push(obj)
  987. }
  988. }
  989. }
  990. })
  991. }
  992. ,
  993. weekType(weekTime) {
  994. var theType = 2
  995. switch (weekTime) {
  996. case 'lastWeek':
  997. theType = 1
  998. break
  999. case 'thisWeek':
  1000. theType = 2
  1001. break
  1002. case 'nextWeek':
  1003. theType = 3
  1004. break
  1005. case 'nextTwoWeek':
  1006. theType = 4
  1007. break
  1008. default:
  1009. theType = 2
  1010. break
  1011. }
  1012. return theType
  1013. }
  1014. ,
  1015. weekPath(week) {
  1016. var weekArr = {
  1017. 1: 'Monday',
  1018. 2: 'Tuesday',
  1019. 3: 'Wednesday',
  1020. 4: 'Thursday',
  1021. 5: 'Friday',
  1022. 6: 'Saturday',
  1023. 7: 'Sunday'
  1024. }
  1025. if (typeof weekArr[week] == 'undefined') {
  1026. return ''
  1027. }
  1028. return weekArr[week]
  1029. }
  1030. ,
  1031. selectWeekType(type) {
  1032. this.week_type = type
  1033. this.getScheduleList()
  1034. }
  1035. ,
  1036. selectWeekTime(type) {
  1037. this.week_time = type
  1038. this.getScheduleList()
  1039. }
  1040. ,
  1041. selectPreStatus(type) {
  1042. this.pre_status = type
  1043. this.getScheduleList()
  1044. }
  1045. ,
  1046. selectZoneList(type) {
  1047. this.zone = type
  1048. this.getScheduleList()
  1049. }
  1050. ,
  1051. getSchedulesType: function(type) {
  1052. let type_name = ''
  1053. switch (type) {
  1054. case 1:
  1055. type_name = '上午'
  1056. break
  1057. case 2:
  1058. type_name = '下午'
  1059. break
  1060. case 3:
  1061. type_name = '晚上'
  1062. break
  1063. }
  1064. return type_name
  1065. }
  1066. ,
  1067. getAdvice: function(doctor_advice) {
  1068. if (doctor_advice.length > 0) {
  1069. let name = ''
  1070. for (let i = 0; i < doctor_advice.length; i++) {
  1071. let prescribing_number = ''
  1072. let single_dose = ''
  1073. let drug_spec = ''
  1074. if (doctor_advice[i].prescribing_number > 0) {
  1075. prescribing_number =
  1076. doctor_advice[i].prescribing_number +
  1077. doctor_advice[i].prescribing_number_unit
  1078. }
  1079. if (doctor_advice[i].single_dose > 0) {
  1080. single_dose =
  1081. ' 单次用量 ' +
  1082. doctor_advice[i].single_dose +
  1083. doctor_advice[i].single_dose_unit
  1084. }
  1085. if (doctor_advice[i].drug_spec > 0) {
  1086. drug_spec =
  1087. doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  1088. }
  1089. name =
  1090. name +
  1091. doctor_advice[i].advice_name +
  1092. ' ' +
  1093. drug_spec +
  1094. ' ' +
  1095. prescribing_number +
  1096. ' ' +
  1097. single_dose +
  1098. ' ' +
  1099. doctor_advice[i].delivery_way +
  1100. ' ' +
  1101. doctor_advice[i].execution_frequency +
  1102. ' ' +
  1103. doctor_advice[i].remark +
  1104. '\n'
  1105. if (doctor_advice[i].child.length > 0) {
  1106. for (let a = 0; a < doctor_advice[i].child.length; a++) {
  1107. if (doctor_advice[i].child[a].prescribing_number > 0) {
  1108. doctor_advice[i].child[a]['presc'] =
  1109. doctor_advice[i].child[a].prescribing_number +
  1110. doctor_advice[i].child[a].prescribing_number_unit
  1111. } else {
  1112. doctor_advice[i].child[a]['presc'] = ''
  1113. }
  1114. if (doctor_advice[i].child[a].single_dose > 0) {
  1115. doctor_advice[i].child[a]['single'] =
  1116. ' ' +
  1117. ' 单次用量 ' +
  1118. ' ' +
  1119. doctor_advice[i].child[a].single_dose +
  1120. doctor_advice[i].child[a].single_dose_unit
  1121. } else {
  1122. doctor_advice[i].child[a]['single'] = ''
  1123. }
  1124. name =
  1125. name +
  1126. '▲' +
  1127. doctor_advice[i].child[a].advice_name +
  1128. '' +
  1129. doctor_advice[i].child[a].advice_desc +
  1130. doctor_advice[i].child[a].drug_spec_unit +
  1131. doctor_advice[i].child[a].presc +
  1132. doctor_advice[i].child[a].single +
  1133. '\n'
  1134. }
  1135. }
  1136. }
  1137. return name
  1138. } else {
  1139. return ''
  1140. }
  1141. }
  1142. ,
  1143. getAdviceOne: function(doctor_advice) {
  1144. if (doctor_advice.length > 0) {
  1145. let name = ''
  1146. for (let i = 0; i < doctor_advice.length; i++) {
  1147. let prescribing_number = ''
  1148. let single_dose = ''
  1149. let drug_spec = ''
  1150. if (doctor_advice[i].prescribing_number > 0) {
  1151. prescribing_number =
  1152. doctor_advice[i].prescribing_number +
  1153. doctor_advice[i].prescribing_number_unit
  1154. }
  1155. if (doctor_advice[i].single_dose > 0) {
  1156. single_dose =
  1157. ' 单次用量 ' +
  1158. doctor_advice[i].single_dose +
  1159. doctor_advice[i].single_dose_unit
  1160. }
  1161. if (doctor_advice[i].drug_spec > 0) {
  1162. drug_spec =
  1163. doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  1164. }
  1165. name =
  1166. name +
  1167. doctor_advice[i].advice_name +
  1168. ' ' +
  1169. drug_spec +
  1170. ' ' +
  1171. prescribing_number +
  1172. ' ' +
  1173. single_dose +
  1174. ' ' +
  1175. doctor_advice[i].delivery_way +
  1176. ' ' +
  1177. doctor_advice[i].execution_frequency +
  1178. ' ' +
  1179. doctor_advice[i].remark +
  1180. '\n'
  1181. }
  1182. return name
  1183. } else {
  1184. return ''
  1185. }
  1186. }
  1187. ,
  1188. printActionSetting() {
  1189. this.getAllZoneList()
  1190. this.getlist()
  1191. this.dialogVisible = true
  1192. }
  1193. ,
  1194. saveRemindPrint() {
  1195. console.log('455555555', this.prescription_status)
  1196. if (this.perfusion_apparatus == true) {
  1197. console.log('3333')
  1198. this.form.perfusion_apparatus = 1
  1199. }
  1200. if (this.perfusion_apparatus == false) {
  1201. this.form.perfusion_apparatus = 2
  1202. }
  1203. if (this.prescription_status == true) {
  1204. this.form.prescription_status = 1
  1205. }
  1206. if (this.prescription_status == false) {
  1207. this.form.prescription_status = 2
  1208. }
  1209. if (this.week == true) {
  1210. this.form.week = 1
  1211. }
  1212. if (this.week == false) {
  1213. this.form.week = 2
  1214. }
  1215. if (this.name == true) {
  1216. this.form.name = 1
  1217. }
  1218. if (this.name == false) {
  1219. this.form.name = 2
  1220. }
  1221. if (this.zone_name == true) {
  1222. this.form.zone = 1
  1223. }
  1224. if (this.zone_name == false) {
  1225. this.form.zone = 2
  1226. }
  1227. if (this.classes == true) {
  1228. this.form.classes = 1
  1229. }
  1230. if (this.classes == false) {
  1231. this.form.classes = 2
  1232. }
  1233. if (this.number == true) {
  1234. this.form.number = 1
  1235. }
  1236. if (this.number == false) {
  1237. this.form.number = 2
  1238. }
  1239. if (this.mode == true) {
  1240. this.form.mode = 1
  1241. }
  1242. if (this.mode == false) {
  1243. this.form.mode = 2
  1244. }
  1245. if (this.dialyzers == true) {
  1246. this.form.dialyzers = 1
  1247. }
  1248. if (this.dialyzers == false) {
  1249. this.form.dialyzers = 2
  1250. }
  1251. if (this.anticoagulant == true) {
  1252. this.form.anticoagulant = 1
  1253. }
  1254. if (this.anticoagulant == false) {
  1255. this.form.anticoagulant = 2
  1256. }
  1257. if (this.anticoagulant_zongliang == true) {
  1258. this.form.anticoagulant_zongliang = 1
  1259. }
  1260. if (this.anticoagulant_zongliang == false) {
  1261. this.form.anticoagulant_zongliang = 2
  1262. }
  1263. if (this.doctor_advice == true) {
  1264. this.form.doctor_advice = 1
  1265. }
  1266. if (this.doctor_advice == false) {
  1267. this.form.doctor_advice = 2
  1268. }
  1269. console.log('555555555', this.form.prescription_status)
  1270. var params = {
  1271. id: this.form.id,
  1272. prescription_status: this.form.prescription_status,
  1273. week: this.form.week,
  1274. name: this.form.name,
  1275. zone: this.form.zone,
  1276. classes: this.form.classes,
  1277. number: this.form.number,
  1278. mode: this.form.mode,
  1279. dialyzers: this.form.dialyzers,
  1280. perfusion_apparatus: this.form.perfusion_apparatus,
  1281. anticoagulant: this.form.anticoagulant,
  1282. anticoagulant_zongliang: this.form.anticoagulant_zongliang,
  1283. doctor_advice: this.form.doctor_advice
  1284. }
  1285. console.log('params', params)
  1286. saveRemindPrint(params).then(response => {
  1287. if (response.data.state == 1) {
  1288. var settting = response.data.data.setting
  1289. this.$message.success('保存成功')
  1290. this.dialogVisible = false
  1291. this.getlist()
  1292. }
  1293. })
  1294. }
  1295. ,
  1296. getlist() {
  1297. getRemindPrintList().then(response => {
  1298. if (response.data.state == 1) {
  1299. var list = response.data.data.list
  1300. console.log('list222332', list)
  1301. if (list.anticoagulant == 1) {
  1302. console.log('进来22222')
  1303. this.anticoagulant = true
  1304. }
  1305. if (list.anticoagulant == 2) {
  1306. this.anticoagulant = false
  1307. }
  1308. if (list.anticoagulant_zongliang == 1) {
  1309. this.anticoagulant_zongliang = true
  1310. }
  1311. if (list.anticoagulant_zongliang == 2) {
  1312. this.anticoagulant_zongliang = false
  1313. }
  1314. if (list.classes == 1) {
  1315. this.classes = true
  1316. }
  1317. if (list.classes == 2) {
  1318. this.classes = false
  1319. }
  1320. if (list.dialyzers == 1) {
  1321. this.dialyzers = true
  1322. }
  1323. if (list.dialyzers == 2) {
  1324. this.dialyzers = false
  1325. }
  1326. if (list.doctor_advice == 1) {
  1327. this.doctor_advice = true
  1328. }
  1329. if (list.doctor_advice == 2) {
  1330. this.doctor_advice = false
  1331. }
  1332. if (list.name == 1) {
  1333. this.name = true
  1334. }
  1335. if (list.name == 2) {
  1336. this.name = false
  1337. }
  1338. if (list.number == 1) {
  1339. this.number = true
  1340. }
  1341. if (list.number == 2) {
  1342. this.number = false
  1343. }
  1344. if (list.perfusion_apparatus == 1) {
  1345. this.perfusion_apparatus = true
  1346. }
  1347. if (list.perfusion_apparatus == 2) {
  1348. this.perfusion_apparatus = false
  1349. }
  1350. if (list.prescription_status == 1) {
  1351. this.prescription_status = true
  1352. }
  1353. if (list.prescription_status == 2) {
  1354. this.prescription_status = false
  1355. }
  1356. if (list.week == 1) {
  1357. this.week = true
  1358. }
  1359. if (list.week == 2) {
  1360. this.week = false
  1361. }
  1362. if (list.zone == 1) {
  1363. this.zone_name = true
  1364. }
  1365. if (list.zone == 2) {
  1366. this.zone_name = false
  1367. }
  1368. if (list.mode == 1) {
  1369. this.mode = true
  1370. }
  1371. if (list.mode == 2) {
  1372. this.mode = false
  1373. }
  1374. this.form.id = list.id
  1375. }
  1376. })
  1377. }
  1378. ,
  1379. getAllZoneList() {
  1380. getAllZoneList().then(response => {
  1381. if (response.data.state == 1) {
  1382. var zonelist = response.data.data.zoneList
  1383. this.zoneList.push(...zonelist)
  1384. this.getScheduleList()
  1385. }
  1386. })
  1387. }
  1388. ,
  1389. getDialysisDialyszerPerfusion(patient_id) {
  1390. var name = ''
  1391. for (let i = 0; i < this.scheduleData.length; i++) {
  1392. if (patient_id == this.scheduleData[i].patient_id) {
  1393. // var arrLength = this.scheduleData[i].dialysissolution.length
  1394. // if (arrLength > 0) {
  1395. name = this.scheduleData[i].dialysissolution.dialysis_dialyszers
  1396. // }
  1397. }
  1398. }
  1399. return name
  1400. },
  1401. getDialysisDialyszerPerfusionOne(patient_id,mode_id,solution) {
  1402. var name = ''
  1403. for (let i = 0; i < solution.length; i++) {
  1404. if (mode_id == solution[i].mode_id) {
  1405. name = solution[i].dialyzer_perfusion_apparatus
  1406. }
  1407. }
  1408. console.log('name', name)
  1409. return name
  1410. },
  1411. changeZone(val){
  1412. this.zone = val
  1413. this.getScheduleList()
  1414. }
  1415. },
  1416. components: {
  1417. WeekItem
  1418. }
  1419. ,
  1420. created() {
  1421. this.getAllZoneList()
  1422. this.modeOptions = this.$store.getters.treatment_mode
  1423. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
  1424. this.week_type = new Date().getDay()
  1425. if (this.week_type == 0) {
  1426. this.week_type = 7
  1427. }
  1428. this.org_id = this.$store.getters.xt_user.org.id
  1429. }
  1430. }
  1431. </script>
  1432. <style rel="stylesheet/css" lang="scss">
  1433. .el-table td,
  1434. .el-table th.is-leaf,
  1435. .el-table--border,
  1436. .el-table--group {
  1437. border-color: #d0d3da;
  1438. }
  1439. .el-table--border::after,
  1440. .el-table--group::after,
  1441. .el-table::before {
  1442. background-color: #d0d3da;
  1443. }
  1444. </style>