tableWeeks.vue 54KB

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