tableWeeks.vue 52KB

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