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

tableWeeks.vue 51KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559
  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">
  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">{{getDialysisDialyszerPerfusionOne(scope.row.patient_id)}}</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. if (this.pre_status == 0) {
  905. for (let i = 0; i < list.length; i++) {
  906. list[i].sort = list[i].number.sort
  907. }
  908. var arr = list.sort(this.compare('sort'))
  909. this.scheduleData = arr
  910. //汇总逻辑
  911. var zones = []
  912. for (let b = 0; b < arr.length; b++) {
  913. zones.push(arr[b].zone)
  914. }
  915. zones = this.uniqueZone(zones)
  916. this.summarySchData = []
  917. for (let i = 0; i < zones.length; i++) {
  918. let obj = {
  919. zone: zones[i],
  920. list: []
  921. }
  922. for (let b = 0; b < arr.length; b++) {
  923. if (zones[i].id == arr[b].zone.id) {
  924. obj.list.push(arr[b])
  925. }
  926. }
  927. this.summarySchData.push(obj)
  928. }
  929. }
  930. if (this.pre_status == 1) {
  931. var newList = []
  932. for (let i = 0; i < list.length; i++) {
  933. if (list[i].prescription.id > 0) {
  934. newList.push(list[i])
  935. }
  936. }
  937. var arr = newList.sort(this.compare('sort'))
  938. this.scheduleData = arr
  939. //汇总逻辑
  940. var zones = []
  941. for (let b = 0; b < arr.length; b++) {
  942. zones.push(arr[b].zone)
  943. }
  944. zones = this.uniqueZone(zones)
  945. this.summarySchData = []
  946. for (let i = 0; i < zones.length; i++) {
  947. let obj = {
  948. zone: zones[i],
  949. list: []
  950. }
  951. for (let b = 0; b < arr.length; b++) {
  952. if (zones[i].id == arr[b].zone.id) {
  953. obj.list.push(arr[b])
  954. }
  955. }
  956. this.summarySchData.push(obj)
  957. }
  958. }
  959. if (this.pre_status == 2) {
  960. var newList = []
  961. for (let i = 0; i < list.length; i++) {
  962. if (list[i].prescription.id == 0) {
  963. newList.push(list[i])
  964. }
  965. }
  966. var arr = newList.sort(this.compare('sort'))
  967. this.scheduleData = arr
  968. //汇总逻辑
  969. var zones = []
  970. for (let b = 0; b < arr.length; b++) {
  971. zones.push(arr[b].zone)
  972. }
  973. zones = this.uniqueZone(zones)
  974. this.summarySchData = []
  975. for (let i = 0; i < zones.length; i++) {
  976. let obj = {
  977. zone: zones[i],
  978. list: []
  979. }
  980. for (let b = 0; b < arr.length; b++) {
  981. if (zones[i].id == arr[b].zone.id) {
  982. obj.list.push(arr[b])
  983. }
  984. }
  985. this.summarySchData.push(obj)
  986. }
  987. }
  988. }
  989. })
  990. }
  991. ,
  992. weekType(weekTime) {
  993. var theType = 2
  994. switch (weekTime) {
  995. case 'lastWeek':
  996. theType = 1
  997. break
  998. case 'thisWeek':
  999. theType = 2
  1000. break
  1001. case 'nextWeek':
  1002. theType = 3
  1003. break
  1004. case 'nextTwoWeek':
  1005. theType = 4
  1006. break
  1007. default:
  1008. theType = 2
  1009. break
  1010. }
  1011. return theType
  1012. }
  1013. ,
  1014. weekPath(week) {
  1015. var weekArr = {
  1016. 1: 'Monday',
  1017. 2: 'Tuesday',
  1018. 3: 'Wednesday',
  1019. 4: 'Thursday',
  1020. 5: 'Friday',
  1021. 6: 'Saturday',
  1022. 7: 'Sunday'
  1023. }
  1024. if (typeof weekArr[week] == 'undefined') {
  1025. return ''
  1026. }
  1027. return weekArr[week]
  1028. }
  1029. ,
  1030. selectWeekType(type) {
  1031. this.week_type = type
  1032. this.getScheduleList()
  1033. }
  1034. ,
  1035. selectWeekTime(type) {
  1036. this.week_time = type
  1037. this.getScheduleList()
  1038. }
  1039. ,
  1040. selectPreStatus(type) {
  1041. this.pre_status = type
  1042. this.getScheduleList()
  1043. }
  1044. ,
  1045. selectZoneList(type) {
  1046. this.zone = type
  1047. this.getScheduleList()
  1048. }
  1049. ,
  1050. getSchedulesType: function(type) {
  1051. let type_name = ''
  1052. switch (type) {
  1053. case 1:
  1054. type_name = '上午'
  1055. break
  1056. case 2:
  1057. type_name = '下午'
  1058. break
  1059. case 3:
  1060. type_name = '晚上'
  1061. break
  1062. }
  1063. return type_name
  1064. }
  1065. ,
  1066. getAdvice: function(doctor_advice) {
  1067. if (doctor_advice.length > 0) {
  1068. let name = ''
  1069. for (let i = 0; i < doctor_advice.length; i++) {
  1070. let prescribing_number = ''
  1071. let single_dose = ''
  1072. let drug_spec = ''
  1073. if (doctor_advice[i].prescribing_number > 0) {
  1074. prescribing_number =
  1075. doctor_advice[i].prescribing_number +
  1076. doctor_advice[i].prescribing_number_unit
  1077. }
  1078. if (doctor_advice[i].single_dose > 0) {
  1079. single_dose =
  1080. ' 单次用量 ' +
  1081. doctor_advice[i].single_dose +
  1082. doctor_advice[i].single_dose_unit
  1083. }
  1084. if (doctor_advice[i].drug_spec > 0) {
  1085. drug_spec =
  1086. doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  1087. }
  1088. name =
  1089. name +
  1090. doctor_advice[i].advice_name +
  1091. ' ' +
  1092. drug_spec +
  1093. ' ' +
  1094. prescribing_number +
  1095. ' ' +
  1096. single_dose +
  1097. ' ' +
  1098. doctor_advice[i].delivery_way +
  1099. ' ' +
  1100. doctor_advice[i].execution_frequency +
  1101. ' ' +
  1102. doctor_advice[i].remark +
  1103. '\n'
  1104. if (doctor_advice[i].child.length > 0) {
  1105. for (let a = 0; a < doctor_advice[i].child.length; a++) {
  1106. if (doctor_advice[i].child[a].prescribing_number > 0) {
  1107. doctor_advice[i].child[a]['presc'] =
  1108. doctor_advice[i].child[a].prescribing_number +
  1109. doctor_advice[i].child[a].prescribing_number_unit
  1110. } else {
  1111. doctor_advice[i].child[a]['presc'] = ''
  1112. }
  1113. if (doctor_advice[i].child[a].single_dose > 0) {
  1114. doctor_advice[i].child[a]['single'] =
  1115. ' ' +
  1116. ' 单次用量 ' +
  1117. ' ' +
  1118. doctor_advice[i].child[a].single_dose +
  1119. doctor_advice[i].child[a].single_dose_unit
  1120. } else {
  1121. doctor_advice[i].child[a]['single'] = ''
  1122. }
  1123. name =
  1124. name +
  1125. '▲' +
  1126. doctor_advice[i].child[a].advice_name +
  1127. '' +
  1128. doctor_advice[i].child[a].advice_desc +
  1129. doctor_advice[i].child[a].drug_spec_unit +
  1130. doctor_advice[i].child[a].presc +
  1131. doctor_advice[i].child[a].single +
  1132. '\n'
  1133. }
  1134. }
  1135. }
  1136. return name
  1137. } else {
  1138. return ''
  1139. }
  1140. }
  1141. ,
  1142. getAdviceOne: function(doctor_advice) {
  1143. if (doctor_advice.length > 0) {
  1144. let name = ''
  1145. for (let i = 0; i < doctor_advice.length; i++) {
  1146. let prescribing_number = ''
  1147. let single_dose = ''
  1148. let drug_spec = ''
  1149. if (doctor_advice[i].prescribing_number > 0) {
  1150. prescribing_number =
  1151. doctor_advice[i].prescribing_number +
  1152. doctor_advice[i].prescribing_number_unit
  1153. }
  1154. if (doctor_advice[i].single_dose > 0) {
  1155. single_dose =
  1156. ' 单次用量 ' +
  1157. doctor_advice[i].single_dose +
  1158. doctor_advice[i].single_dose_unit
  1159. }
  1160. if (doctor_advice[i].drug_spec > 0) {
  1161. drug_spec =
  1162. doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  1163. }
  1164. name =
  1165. name +
  1166. doctor_advice[i].advice_name +
  1167. ' ' +
  1168. drug_spec +
  1169. ' ' +
  1170. prescribing_number +
  1171. ' ' +
  1172. single_dose +
  1173. ' ' +
  1174. doctor_advice[i].delivery_way +
  1175. ' ' +
  1176. doctor_advice[i].execution_frequency +
  1177. ' ' +
  1178. doctor_advice[i].remark +
  1179. '\n'
  1180. }
  1181. return name
  1182. } else {
  1183. return ''
  1184. }
  1185. }
  1186. ,
  1187. printActionSetting() {
  1188. this.getAllZoneList()
  1189. this.getlist()
  1190. this.dialogVisible = true
  1191. }
  1192. ,
  1193. saveRemindPrint() {
  1194. console.log('455555555', this.perfusion_apparatus)
  1195. if (this.perfusion_apparatus == true) {
  1196. console.log('3333')
  1197. this.form.perfusion_apparatus = 1
  1198. }
  1199. if (this.perfusion_apparatus == false) {
  1200. this.form.perfusion_apparatus = 2
  1201. }
  1202. if (this.prescription_status == true) {
  1203. this.form.prescription_status = 1
  1204. }
  1205. if (this.prescription_status == false) {
  1206. this.form.prescription_status = 2
  1207. }
  1208. if (this.week == true) {
  1209. this.form.week = 1
  1210. }
  1211. if (this.week == false) {
  1212. this.form.week = 2
  1213. }
  1214. if (this.name == true) {
  1215. this.form.name = 1
  1216. }
  1217. if (this.name == false) {
  1218. this.form.name = 2
  1219. }
  1220. if (this.zone_name == true) {
  1221. this.form.zone = 1
  1222. }
  1223. if (this.zone_name == false) {
  1224. this.form.zone = 2
  1225. }
  1226. if (this.classes == true) {
  1227. this.form.classes = 1
  1228. }
  1229. if (this.classes == false) {
  1230. this.form.classes = 2
  1231. }
  1232. if (this.number == true) {
  1233. this.form.number = 1
  1234. }
  1235. if (this.number == false) {
  1236. this.form.number = 2
  1237. }
  1238. if (this.mode == true) {
  1239. this.form.mode = 1
  1240. }
  1241. if (this.mode == false) {
  1242. this.form.mode = 2
  1243. }
  1244. if (this.dialyzers == true) {
  1245. this.form.dialyzers = 1
  1246. }
  1247. if (this.dialyzers == false) {
  1248. this.form.dialyzers = 2
  1249. }
  1250. if (this.anticoagulant == true) {
  1251. this.form.anticoagulant = 1
  1252. }
  1253. if (this.anticoagulant == false) {
  1254. this.form.anticoagulant = 2
  1255. }
  1256. if (this.anticoagulant_zongliang == true) {
  1257. this.form.anticoagulant_zongliang = 1
  1258. }
  1259. if (this.anticoagulant_zongliang == false) {
  1260. this.form.anticoagulant_zongliang = 2
  1261. }
  1262. if (this.doctor_advice == true) {
  1263. this.form.doctor_advice = 1
  1264. }
  1265. if (this.doctor_advice == false) {
  1266. this.form.doctor_advice = 2
  1267. }
  1268. console.log('555555555', this.form.prescription_status)
  1269. var params = {
  1270. id: this.form.id,
  1271. prescription_status: this.form.prescription_status,
  1272. week: this.form.week,
  1273. name: this.form.name,
  1274. zone: this.form.zone,
  1275. classes: this.form.classes,
  1276. number: this.form.number,
  1277. mode: this.form.mode,
  1278. dialyzers: this.form.dialyzers,
  1279. perfusion_apparatus: this.form.perfusion_apparatus,
  1280. anticoagulant: this.form.anticoagulant,
  1281. anticoagulant_zongliang: this.form.anticoagulant_zongliang,
  1282. doctor_advice: this.form.doctor_advice
  1283. }
  1284. console.log('params', params)
  1285. saveRemindPrint(params).then(response => {
  1286. if (response.data.state == 1) {
  1287. var settting = response.data.data.setting
  1288. this.$message.success('保存成功')
  1289. this.dialogVisible = false
  1290. this.getlist()
  1291. }
  1292. })
  1293. }
  1294. ,
  1295. getlist() {
  1296. getRemindPrintList().then(response => {
  1297. if (response.data.state == 1) {
  1298. var list = response.data.data.list
  1299. console.log('list222332', list)
  1300. if (list.anticoagulant == 1) {
  1301. console.log('进来22222')
  1302. this.anticoagulant = true
  1303. }
  1304. if (list.anticoagulant == 2) {
  1305. this.anticoagulant = false
  1306. }
  1307. if (list.anticoagulant_zongliang == 1) {
  1308. this.anticoagulant_zongliang = true
  1309. }
  1310. if (list.anticoagulant_zongliang == 2) {
  1311. this.anticoagulant_zongliang = false
  1312. }
  1313. if (list.classes == 1) {
  1314. this.classes = true
  1315. }
  1316. if (list.classes == 2) {
  1317. this.classes = false
  1318. }
  1319. if (list.dialyzers == 1) {
  1320. this.dialyzers = true
  1321. }
  1322. if (list.dialyzers == 2) {
  1323. this.dialyzers = false
  1324. }
  1325. if (list.doctor_advice == 1) {
  1326. this.doctor_advice = true
  1327. }
  1328. if (list.doctor_advice == 2) {
  1329. this.doctor_advice = false
  1330. }
  1331. if (list.name == 1) {
  1332. this.name = true
  1333. }
  1334. if (list.name == 2) {
  1335. this.name = false
  1336. }
  1337. if (list.number == 1) {
  1338. this.number = true
  1339. }
  1340. if (list.number == 2) {
  1341. this.number = false
  1342. }
  1343. if (list.perfusion_apparatus == 1) {
  1344. this.perfusion_apparatus = true
  1345. }
  1346. if (list.perfusion_apparatus == 2) {
  1347. this.perfusion_apparatus = false
  1348. }
  1349. if (list.prescription_status == 1) {
  1350. this.prescription_status = true
  1351. }
  1352. if (list.prescription_status == 2) {
  1353. this.prescription_status = false
  1354. }
  1355. if (list.week == 1) {
  1356. this.week = true
  1357. }
  1358. if (list.week == 2) {
  1359. this.week = false
  1360. }
  1361. if (list.zone == 1) {
  1362. this.zone_name = true
  1363. }
  1364. if (list.zone == 2) {
  1365. this.zone_name = false
  1366. }
  1367. if (list.mode == 1) {
  1368. this.mode = true
  1369. }
  1370. if (list.mode == 2) {
  1371. this.mode = false
  1372. }
  1373. this.form.id = list.id
  1374. }
  1375. })
  1376. }
  1377. ,
  1378. getAllZoneList() {
  1379. getAllZoneList().then(response => {
  1380. if (response.data.state == 1) {
  1381. var zonelist = response.data.data.zoneList
  1382. this.zoneList.push(...zonelist)
  1383. this.getScheduleList()
  1384. }
  1385. })
  1386. }
  1387. ,
  1388. getDialysisDialyszerPerfusion(patient_id) {
  1389. var name = ''
  1390. for (let i = 0; i < this.scheduleData.length; i++) {
  1391. if (patient_id == this.scheduleData[i].patient_id) {
  1392. // var arrLength = this.scheduleData[i].dialysissolution.length
  1393. // if (arrLength > 0) {
  1394. name = this.scheduleData[i].dialysissolution.dialysis_dialyszers
  1395. // }
  1396. }
  1397. }
  1398. return name
  1399. }
  1400. ,
  1401. getDialysisDialyszerPerfusionOne(patient_id) {
  1402. var name = ''
  1403. for (let i = 0; i < this.scheduleData.length; i++) {
  1404. if (patient_id == this.scheduleData[i].patient_id) {
  1405. // var arrLength = this.scheduleData[i].dialysissolution
  1406. // console.log('病人ID', patient_id, '数组', this.scheduleData[i].dialysissolution)
  1407. // if (arrLength > 0) {
  1408. name = this.scheduleData[i].dialysissolution.dialyzer_perfusion_apparatus
  1409. // }
  1410. }
  1411. }
  1412. console.log('name', name)
  1413. return name
  1414. },
  1415. changeZone(val){
  1416. this.zone = val
  1417. this.getScheduleList()
  1418. }
  1419. },
  1420. components: {
  1421. WeekItem
  1422. }
  1423. ,
  1424. created() {
  1425. this.getAllZoneList()
  1426. this.modeOptions = this.$store.getters.treatment_mode
  1427. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
  1428. this.week_type = new Date().getDay()
  1429. if (this.week_type == 0) {
  1430. this.week_type = 7
  1431. }
  1432. this.org_id = this.$store.getters.xt_user.org.id
  1433. }
  1434. }
  1435. </script>
  1436. <style rel="stylesheet/css" lang="scss">
  1437. .el-table td,
  1438. .el-table th.is-leaf,
  1439. .el-table--border,
  1440. .el-table--group {
  1441. border-color: #d0d3da;
  1442. }
  1443. .el-table--border::after,
  1444. .el-table--group::after,
  1445. .el-table::before {
  1446. background-color: #d0d3da;
  1447. }
  1448. </style>