longDoctorAdvice.vue 72KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <div>
  6. <el-button
  7. size="small"
  8. icon="el-icon-printer"
  9. :disabled="selecting_schs.length == 0"
  10. @click="signPrintAction"
  11. type="primary"
  12. style="margin-right:10"
  13. >标签打印
  14. </el-button>
  15. <el-button
  16. size="small"
  17. icon="el-icon-printer"
  18. :disabled="selecting_schs.length == 0"
  19. @click="batchPrintAction"
  20. type="primary"
  21. >医嘱打印
  22. </el-button>
  23. </div>
  24. </div>
  25. <div class="app-container">
  26. <div class="filter-container">
  27. <el-autocomplete
  28. class="checkSearch"
  29. popper-class="my-autocomplete"
  30. v-model.trim="listQuery.keyword"
  31. :fetch-suggestions="querySearchAsync"
  32. :trigger-on-focus="false"
  33. placeholder="患者姓名"
  34. @select="handleSelect"
  35. >
  36. <i class="el-icon-search el-input__icon" slot="suffix"></i>
  37. <template slot-scope="{ item }">
  38. <div class="name">{{ item.name }}</div>
  39. </template>
  40. </el-autocomplete>
  41. <el-button type="primary" @click="toSeach">搜索</el-button>
  42. </div>
  43. <div class="cell clearfix">
  44. <label class="title">
  45. <span class="name">日期查询:</span>
  46. </label>
  47. <el-date-picker
  48. v-model="time"
  49. prefix-icon="el-icon-date"
  50. @change="changeTime"
  51. :editable="false"
  52. style="width: 250px;"
  53. type="date"
  54. placeholder="选择日期时间"
  55. align="right"
  56. format="yyyy-MM-dd"
  57. value-format="timestamp"
  58. ></el-date-picker>
  59. </div>
  60. <div class="cell clearfix">
  61. <label class="title">
  62. <span class="name">排序:</span>
  63. </label>
  64. <el-select v-model="sort" placeholder="请选择" @change="selectSortType">
  65. <el-option
  66. v-for="item in options"
  67. :key="item.name"
  68. :label="item.name"
  69. :value="item.id"
  70. >
  71. </el-option>
  72. </el-select>
  73. </div>
  74. <div class="cell clearfix">
  75. <label class="title"> <span class="name">排班班次</span> : </label>
  76. <div class="time">
  77. <ul class>
  78. <li
  79. :class="item.value == schedulType ? 'active' : ''"
  80. @click="selectSchedulType(item.value)"
  81. v-for="item in schedulArr"
  82. :key="item.value"
  83. >
  84. {{ item.label }}
  85. </li>
  86. </ul>
  87. </div>
  88. </div>
  89. <!-- <div class="cell clearfix">
  90. <label class="title"> <span class="name">收费状态</span> : </label>
  91. <div class="time">
  92. <ul class>
  93. <li
  94. :class="item.id == costType ? 'active' : ''"
  95. @click="selectCostType(item.id)"
  96. v-for="item in costArr"
  97. :key="item.id"
  98. >
  99. {{ item.name }}
  100. </li>
  101. </ul>
  102. </div>
  103. </div> -->
  104. <div class="cell clearfix">
  105. <label class="title"> <span class="name">分区</span> : </label>
  106. <div class="time">
  107. <ul class>
  108. <li
  109. :class="item.id == partitionType ? 'active' : ''"
  110. @click="selectPartitionType(item.id)"
  111. v-for="item in partitionArr"
  112. :key="item.id"
  113. >
  114. {{ item.name }}
  115. </li>
  116. </ul>
  117. </div>
  118. </div>
  119. <div class="cell clearfix">
  120. <label class="title"> <span class="name">给药途径</span> : </label>
  121. <div class="time">
  122. <ul class>
  123. <li
  124. :class="item.id == delivery_way ? 'active' : ''"
  125. @click="selectDeliveryWay(item.id)"
  126. v-for="item in deliveryWay"
  127. :key="item.id"
  128. >
  129. {{ item.name }}
  130. </li>
  131. </ul>
  132. </div>
  133. </div>
  134. <div class="cell clearfix">
  135. <label class="title"> <span class="name">执行频率</span> : </label>
  136. <div class="time">
  137. <ul class>
  138. <li
  139. :class="item.id == execution_frequency ? 'active' : ''"
  140. @click="selectFrequencyWay(item.id)"
  141. v-for="item in excutList"
  142. :key="item.id"
  143. >
  144. {{ item.name }}
  145. </li>
  146. </ul>
  147. </div>
  148. </div>
  149. <div class="cell clearfix">
  150. <label class="title"> <span class="name">执行状态</span> : </label>
  151. <div class="time">
  152. <ul class>
  153. <li
  154. :class="item.id == excution_way ? 'active' : ''"
  155. @click="selectExcutionWay(item.id)"
  156. v-for="item in executionList"
  157. :key="item.id"
  158. >
  159. {{ item.name }}
  160. </li>
  161. </ul>
  162. </div>
  163. </div>
  164. <!-- <div style="margin-top: 10px;margin-left:600px;margin-bottom:10px">
  165. <el-button type="primary" size="small" @click="toExcution">执行医嘱</el-button>
  166. <el-button type="primary" size="small" @click="toCheck">医嘱核对</el-button>
  167. <el-button type="primary" size="small" @click="toSettle">收费</el-button>
  168. </div> -->
  169. <div style="margin-top: 10px;margin-bottom:10px">
  170. <el-button type="primary" size="small" @click="toStaticOne" >统计</el-button>
  171. </div>
  172. <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  173. @selection-change="handleSelectionChange"
  174. :span-method="objectSpanMethod"
  175. :cell-class-name="adviceNameShow"
  176. :modal-append-to-body="false"
  177. highlight-current-row
  178. @current-change="handleCurrentChangeList"
  179. v-show="show"
  180. @row-click="handleRowClick">
  181. <el-table-column type="selection" width="55" align="center"></el-table-column>
  182. <el-table-column prop="date" label="姓名" align="center" min-width="26px">
  183. <template slot-scope="scope">
  184. <span>{{ scope.row.name }}</span>
  185. <br>
  186. ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
  187. <br>
  188. <span v-if="scope.row.mode_id == 1">(HD)</span>
  189. <span v-if="scope.row.mode_id == 2">(HDF)</span>
  190. <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
  191. <span v-if="scope.row.mode_id == 4">(HP)</span>
  192. <span v-if="scope.row.mode_id == 5">(HF)</span>
  193. <span v-if="scope.row.mode_id == 6">(SCUF)</span>
  194. <span v-if="scope.row.mode_id == 7">(IUF)</span>
  195. <span v-if="scope.row.mode_id == 8">(HFHD)</span>
  196. <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
  197. <span v-if="scope.row.mode_id == 10">(PHF)</span>
  198. <span v-if="scope.row.mode_id == 11">(HFR)</span>
  199. <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
  200. <span v-if="scope.row.mode_id == 13">(CRRT)</span>
  201. <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
  202. <span v-if="scope.row.mode_id == 24">I-HDF</span>
  203. </template>
  204. </el-table-column>
  205. <el-table-column label="分区床位" width="100">
  206. <template slot-scope="scope" >
  207. {{scope.row.zone_name}}/{{scope.row.number}}
  208. </template>
  209. </el-table-column>
  210. <el-table-column prop="date" label="透析器" align="center" min-width="26px">
  211. <template slot-scope="scope">
  212. <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
  213. <span v-if="scope.row.dialysis_dialyszers!=''">{{scope.row.dialysis_dialyszers}}</span>
  214. <span v-if="scope.row.dialysis_irrigation!=''">{{scope.row.dialysis_irrigation}}</span>
  215. </template>
  216. </el-table-column>
  217. <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
  218. <template slot-scope="scope">
  219. <span>
  220. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  221. </span>
  222. </template>
  223. </el-table-column>
  224. <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
  225. <template slot-scope="scope">
  226. <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
  227. <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
  228. {{ getAdviceContent(scope.row, 1)}}
  229. </span>
  230. </el-dropdown>
  231. <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
  232. <span class="el-dropdown-link">
  233. &emsp;{{ getAdviceContent(scope.row, 2)}}
  234. </span>
  235. </el-dropdown>
  236. </template>
  237. </el-table-column>
  238. <el-table-column
  239. prop="start_time"
  240. align="center"
  241. min-width="30px"
  242. label="执行时间"
  243. sortable
  244. >
  245. <template slot-scope="scope">
  246. <span v-if="scope.row.execution_time != 0">
  247. {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
  248. </span>
  249. <span v-else></span>
  250. </template>
  251. </el-table-column>
  252. <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
  253. <template slot-scope="scope">
  254. <span v-if="scope.row.parent_id == 0">
  255. {{getXuserName(scope.row.execution_staff)}}
  256. </span>
  257. <span v-else>{{getXuserName(scope.row.execution_staff)}}</span>
  258. </template>
  259. </el-table-column>
  260. <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
  261. <template slot-scope="scope">
  262. <span v-if="scope.row.parent_id == 0">
  263. {{getXuserName(scope.row.checker)}}
  264. </span>
  265. <span v-else>{{getXuserName(scope.row.checker)}}</span>
  266. </template>
  267. </el-table-column>
  268. <el-table-column
  269. prop="check_time"
  270. align="center"
  271. min-width="30px"
  272. label="校对时间"
  273. sortable
  274. >
  275. <template slot-scope="scope">
  276. <span v-if="scope.row.check_time != 0">
  277. {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
  278. </span>
  279. <span v-else>
  280. </span>
  281. </template>
  282. </el-table-column>
  283. <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
  284. <template slot-scope="scope">
  285. <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
  286. </template>
  287. </el-table-column>
  288. <el-table-column
  289. prop="created_time"
  290. align="center"
  291. min-width="30px"
  292. label="校对时间"
  293. sortable
  294. >
  295. <template slot-scope="scope">
  296. <span v-if="scope.row.created_time != 0">
  297. {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
  298. </span>
  299. <span v-else></span>
  300. </template>
  301. </el-table-column>
  302. <!-- <el-table-column
  303. prop="created_time"
  304. align="center"
  305. min-width="30px"
  306. label="收费状态"
  307. sortable
  308. >
  309. <template slot-scope="scope">
  310. <span v-if="scope.row.is_settle == 1">
  311. 已收费
  312. </span>
  313. <span v-if="scope.row.is_settle == 2 || scope.row.is_settle == 0">
  314. 未收费
  315. </span>
  316. <span v-else></span>
  317. </template>
  318. </el-table-column> -->
  319. </el-table>
  320. <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  321. @selection-change="handleSelectionChangeOne"
  322. @current-change="handleCurrentChangeList"
  323. :span-method="objectSpanMethod"
  324. :cell-class-name="adviceNameShow"
  325. highlight-current-row
  326. :modal-append-to-body="false"
  327. v-show="showOne">
  328. <el-table-column type="selection" width="55" align="center"></el-table-column>
  329. <el-table-column prop="date" label="姓名" align="center" min-width="26px">
  330. <template slot-scope="scope">
  331. <span>{{ scope.row.name }}</span>
  332. <br>
  333. ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
  334. <br>
  335. <span v-if="scope.row.mode_id == 1">(HD)</span>
  336. <span v-if="scope.row.mode_id == 2">(HDF)</span>
  337. <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
  338. <span v-if="scope.row.mode_id == 4">(HP)</span>
  339. <span v-if="scope.row.mode_id == 5">(HF)</span>
  340. <span v-if="scope.row.mode_id == 6">(SCUF)</span>
  341. <span v-if="scope.row.mode_id == 7">(IUF)</span>
  342. <span v-if="scope.row.mode_id == 8">(HFHD)</span>
  343. <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
  344. <span v-if="scope.row.mode_id == 10">(PHF)</span>
  345. <span v-if="scope.row.mode_id == 11">(HFR)</span>
  346. <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
  347. <span v-if="scope.row.mode_id == 13">(CRRT)</span>
  348. <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
  349. <span v-if="scope.row.mode_id == 24">I-HDF</span>
  350. </template>
  351. </el-table-column>
  352. <el-table-column prop="date" label="透析器" align="center" min-width="26px">
  353. <template slot-scope="scope">
  354. <span>
  355. {{ scope.row.dialyzer_perfusion_apparatus }}
  356. <span v-if="scope.row.dialysis_dialyszers!=''">{{scope.row.dialysis_dialyszers}}</span>
  357. <span v-if="scope.row.dialysis_irrigation!=''">{{scope.row.dialysis_irrigation}}</span>
  358. </span>
  359. </template>
  360. </el-table-column>
  361. <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
  362. <template slot-scope="scope">
  363. <span>
  364. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  365. </span>
  366. </template>
  367. </el-table-column>
  368. <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
  369. <template slot-scope="scope">
  370. <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
  371. <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
  372. {{ getAdviceContent(scope.row, 1)}}
  373. </span>
  374. </el-dropdown>
  375. <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
  376. <span class="el-dropdown-link">
  377. &emsp;{{ getAdviceContent(scope.row, 2)}}
  378. </span>
  379. </el-dropdown>
  380. </template>
  381. </el-table-column>
  382. <el-table-column
  383. prop="start_time"
  384. align="center"
  385. min-width="30px"
  386. label="执行时间"
  387. sortable
  388. >
  389. <template slot-scope="scope">
  390. <span v-if="scope.row.execution_time != 0">
  391. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  392. </span>
  393. <span v-else></span>
  394. </template>
  395. </el-table-column>
  396. <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
  397. <template slot-scope="scope">
  398. <span v-if="scope.row.parent_id == 0">
  399. {{getXuserName(scope.row.execution_staff)}}
  400. </span>
  401. <span v-else></span>
  402. </template>
  403. </el-table-column>
  404. <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
  405. <template slot-scope="scope">
  406. <span v-if="scope.row.parent_id == 0">
  407. {{getXuserName(scope.row.checker)}}
  408. </span>
  409. <span v-else></span>
  410. </template>
  411. </el-table-column>
  412. <el-table-column
  413. prop="check_time"
  414. align="center"
  415. min-width="30px"
  416. label="校对时间"
  417. sortable
  418. >
  419. <template slot-scope="scope">
  420. <span v-if="scope.row.check_time != 0">
  421. {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
  422. </span>
  423. <span v-else></span>
  424. </template>
  425. </el-table-column>
  426. <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
  427. <template slot-scope="scope">
  428. <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
  429. </template>
  430. </el-table-column>
  431. <el-table-column
  432. prop="created_time"
  433. align="center"
  434. min-width="30px"
  435. label="校对时间"
  436. sortable
  437. >
  438. <template slot-scope="scope">
  439. <span v-if="scope.row.created_time != 0">
  440. {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
  441. </span>
  442. <span v-else></span>
  443. </template>
  444. </el-table-column>
  445. </el-table>
  446. <el-dialog
  447. title="选择执行时间"
  448. :visible.sync="execTimeDialogVisible"
  449. width="400px"
  450. :modal-append-to-body="false"
  451. >
  452. <el-date-picker
  453. v-model="execTime"
  454. format="yyyy-MM-dd HH:mm:00"
  455. value-format="yyyy-MM-dd HH:mm:00"
  456. type="datetime"
  457. placeholder="选择执行时间"
  458. style="width:100%"
  459. ></el-date-picker>
  460. <span slot="footer" class="dialog-footer">
  461. <el-button @click="execTimeDialogVisible = false">取 消</el-button>
  462. <el-button type="primary" @click="excutionDoctorAdvice" :loading="exceLoading">保 存</el-button>
  463. </span>
  464. </el-dialog>
  465. <el-dialog
  466. title="选择执行时间"
  467. :visible.sync="execTimeDialogVisibleOne"
  468. width="400px"
  469. :modal-append-to-body="false"
  470. >
  471. <el-date-picker
  472. v-model="execTime"
  473. format="yyyy-MM-dd HH:mm:00"
  474. value-format="yyyy-MM-dd HH:mm:00"
  475. type="datetime"
  476. placeholder="选择执行时间"
  477. style="width:100%"
  478. ></el-date-picker>
  479. <span slot="footer" class="dialog-footer">
  480. <el-button @click="execTimeDialogVisibleOne = false">取 消</el-button>
  481. <el-button type="primary" @click="excutionDoctorAdviceOne" :loading="exceLoading">保 存</el-button>
  482. </span>
  483. </el-dialog>
  484. <!-- 长沙南雅 -->
  485. <el-dialog
  486. title="药品统计表"
  487. :visible.sync="startdialogVisibleOne"
  488. width="70%">
  489. <span>
  490. <div class="cell clearfix" style="margin-bottom:10px">
  491. <label class="title"> <span class="name">排班班次</span> : </label>
  492. <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleTypeOne" >
  493. <el-option
  494. v-for="item in schedulArr"
  495. :key="item.value"
  496. :label="item.label"
  497. :value="item.value">
  498. </el-option>
  499. </el-select>
  500. <label class="title"> <span class="name">病区选择</span> : </label>
  501. <el-select v-model="partion_type" placeholder="请选择" @change="changePartionTypeOne" multiple>
  502. <el-option
  503. v-for="item in partitionArr"
  504. :key="item.id"
  505. :label="item.name"
  506. :value="item.id">
  507. </el-option>
  508. </el-select>
  509. <el-button size="small" icon="el-icon-printer" @click="toPrintTwo" type="primary">打印</el-button>
  510. </div>
  511. <el-table
  512. :data="tableDataList"
  513. border
  514. :row-style="{ color: '#303133' }"
  515. :header-cell-style="{
  516. backgroundColor: 'rgb(245, 247, 250)',
  517. color: '#606266'
  518. }"
  519. >
  520. <el-table-column
  521. align="center"
  522. prop="name"
  523. label="序号"
  524. width="100"
  525. >
  526. <template slot-scope="scope" >
  527. <span v-if="scope.row.is_total == 1">{{scope.$index+1}}</span>
  528. <span v-if="scope.row.is_total == 0">总计</span>
  529. </template>
  530. </el-table-column>
  531. <el-table-column
  532. align="center"
  533. prop="name"
  534. label="区域"
  535. width="100"
  536. >
  537. <template slot-scope="scope" >
  538. <span v-if="scope.row.is_total ==1">
  539. {{scope.row.zone_name }}
  540. </span>
  541. </template>
  542. </el-table-column>
  543. <el-table-column
  544. align="center"
  545. prop="name"
  546. label="透析模式"
  547. width="150"
  548. >
  549. <template slot-scope="scope">
  550. <span v-if="scope.row.is_total == 1">
  551. {{getModeId(scope.row.child)}}
  552. </span>
  553. </template>
  554. </el-table-column>
  555. <el-table-column
  556. align="center"
  557. prop="name"
  558. v-for="(item,index) in tabHead"
  559. :key="index"
  560. :label="item.advice_name"
  561. >
  562. <template slot-scope="scope">
  563. <span v-if="scope.row.is_total ==1">
  564. <span v-if="scope.row.child[index]!=null">{{getDrugCount(scope.row.child,item.advice_name)}}</span>
  565. <span v-if="item&&item.advice_name == '肝素钠注射剂'">
  566. {{getDrugAdviceCount(item.advice_name,scope.row.zone_name)}}
  567. </span>
  568. </span>
  569. <span v-if="scope.row.is_total == 0">
  570. {{getAllSumCount(item.advice_name)}}
  571. </span>
  572. </template>
  573. </el-table-column>
  574. </el-table>
  575. </span>
  576. <span slot="footer" class="dialog-footer">
  577. <el-button @click="startdialogVisibleOne = false">取 消</el-button>
  578. <el-button type="primary" @click="startdialogVisibleOne = false">确 定</el-button>
  579. </span>
  580. </el-dialog>
  581. </div>
  582. </div>
  583. </template>
  584. <script>
  585. const moment = require('moment')
  586. import { getSchedualPatient, GetAllZone,getLongDialysisAdviceToday } from "@/api/dialysis";
  587. import { parseTime } from "@/utils";
  588. import { uParseTime } from '@/utils/tools'
  589. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  590. import { getPrintTemplate } from "@/api/data";
  591. import { getNewLongSchedualDoctors,excutionDoctorAdvice,checkNewDoctorAdvice,settleNewDoctorAdvice,excutionDoctorAdviceById,GetMobileScheduleList } from '@/api/advice'
  592. import { PostSearch } from '@/api/patient'
  593. export default {
  594. name: "Patient",
  595. data() {
  596. return {
  597. crumbs: [
  598. { path: false, name: "透析管理" },
  599. { path: false, name: "透析监测" }
  600. ],
  601. loading: false,
  602. time: "",
  603. search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
  604. patient_search_keyword: "",
  605. SchedualPatientsTableData: [],
  606. active: true,
  607. schedulType: 0,
  608. schedulArr: [
  609. { value: 0, label: "全部" },
  610. { value: 1, label: "上午" },
  611. { value: 2, label: "下午" },
  612. { value: 3, label: "晚上" }
  613. ],
  614. template_id: 0,
  615. partitionType: 0,
  616. costType:0,
  617. total: 0,
  618. listQuery: {
  619. page: 1,
  620. limit: 10,
  621. schedul_type: 0,
  622. partition_type: 0,
  623. schedul_time: "",
  624. keywords: "",
  625. },
  626. selecting_schs: [],
  627. partitionArr: [],
  628. scheduleMap:[],
  629. show:true,
  630. showOne:false,
  631. deliveryWay:[],
  632. executionList:[
  633. {id:0,name:"全部"},
  634. {id:1,name:"已执行"},
  635. {id:2,name:"未执行"},
  636. ],
  637. delivery_way:0,
  638. patient_id:0,
  639. org_id:0,
  640. excution_way:0,
  641. options:[
  642. {id:0,name:"请选择"},
  643. {id:1,name:"按床位排序"},
  644. {id:2,name:"按签到时间排序"},
  645. ],
  646. costArr:[
  647. {id:0,name:"全部"},
  648. {id:1,name:"已收费"},
  649. {id:2,name:"未收费"}
  650. ],
  651. sort:0,
  652. config:{},
  653. execTime: '',
  654. execTimeDialogVisible:false,
  655. exceLoading:false,
  656. is_sort:0,
  657. hoverOrderArr:[],
  658. is_status:0,
  659. execTimeDialogVisibleOne:false,
  660. current_row:{},
  661. tableList:[],
  662. startdialogVisible:false,
  663. startdialogVisibleOne:false,
  664. schedule_type:0,
  665. partion_type:0,
  666. druglist:[],
  667. config:{},
  668. tabHead:[],
  669. tableDataList:[],
  670. adminUserList:[],
  671. doctorMap:[],
  672. excutList:[],
  673. execution_frequency:"",
  674. zoneIdList:[],
  675. partion_str:"",
  676. };
  677. },
  678. created() {
  679. var date = new Date();
  680. this.time = date;
  681. var year = date.getFullYear();
  682. var month = date.getMonth() + 1;
  683. var day = date.getDate();
  684. if (month < 10) {
  685. month = "0" + month;
  686. }
  687. if (day < 10) {
  688. day = "0" + day;
  689. }
  690. var nowDate = year + "-" + month + "-" + day;
  691. var date = new Date(nowDate + " 00:00:00");
  692. this.listQuery.schedul_time = date.getTime();
  693. this.getAllZone();
  694. this.getTemplateInfo();
  695. this.requestSchedualDoctors(this.time)
  696. this.org_id = this.$store.getters.xt_user.template_info.org_id;
  697. },
  698. methods: {
  699. getTemplateInfo() {
  700. getPrintTemplate().then(response => {
  701. if (response.data.state == 0) {
  702. this.$message.error(response.data.msg);
  703. return false;
  704. } else {
  705. var template = response.data.data.template;
  706. this.template_id = template.template_id;
  707. }
  708. });
  709. },
  710. clickCurrent(val) {
  711. //console.log(val);
  712. this.$router.push({
  713. path: "/dialysis/details",
  714. query: { patient_id: val.patient_id, date: val.sch_time_int,mode_id:val.mode_id }
  715. });
  716. },
  717. selectSchedulType(scheduleType) {
  718. this.schedulType = scheduleType;
  719. this.listQuery.schedul_type = scheduleType;
  720. this.requestSchedualDoctors(this.time);
  721. },
  722. selectPartitionType(partitionType) {
  723. this.partitionType = partitionType;
  724. this.listQuery.partition_type = partitionType;
  725. this.requestSchedualDoctors(this.time);
  726. },
  727. selectCostType(costType){
  728. this.costType = costType
  729. this.requestSchedualDoctors(this.time);
  730. },
  731. selectDeliveryWay(val){
  732. this.delivery_way = val
  733. this.requestSchedualDoctors(this.time)
  734. },
  735. selectFrequencyWay(val){
  736. this.execution_frequency = val
  737. this.requestSchedualDoctors(this.time)
  738. },
  739. selectExcutionWay(val){
  740. this.excution_way = val
  741. this.requestSchedualDoctors(this.time)
  742. },
  743. changeTime() {
  744. this.listQuery.schedul_time = this.time;
  745. this.requestSchedualDoctors(this.time)
  746. },
  747. getAllZone: function() {
  748. GetAllZone().then(response => {
  749. if (response.data.state == 0) {
  750. this.$message.error(response.data.msg);
  751. return false;
  752. } else {
  753. this.partitionArr = response.data.data.zone;
  754. for(let i=0;i<this.partitionArr.length;i++){
  755. this.zoneIdList.push(this.partitionArr[i].id)
  756. }
  757. var dics = response.data.data.dics
  758. var obj = {id:0,name:"全部"}
  759. this.deliveryWay.push(obj)
  760. this.deliveryWay.push(...dics)
  761. var objOne = {id:0,name:"全部"}
  762. this.excutList.push(objOne)
  763. var efs = response.data.data.efs
  764. this.excutList.push(...efs)
  765. console.log("执行瓶绿",this.excutList)
  766. }
  767. });
  768. },
  769. requestSchedualDoctors (time) {
  770. var name = ""
  771. for(let i=0;i<this.deliveryWay.length;i++){
  772. if(this.delivery_way == this.deliveryWay[i].id){
  773. name = this.deliveryWay[i].name
  774. }
  775. }
  776. if(name == '全部'){
  777. name = ""
  778. }
  779. var nameOne = ""
  780. for(let i=0;i<this.excutList.length;i++){
  781. if(this.execution_frequency == this.excutList[i].id){
  782. nameOne = this.excutList[i].name
  783. }
  784. }
  785. if(nameOne == '全部'){
  786. nameOne = ""
  787. }
  788. let newTime = moment(time).format('YYYY-MM-DD')
  789. var schedule_type = this.listQuery.schedul_type
  790. var partition_type = this.listQuery.partition_type
  791. getNewLongSchedualDoctors({date: newTime,patient_type: 0,advice_type: 1,delivery_way:name,schedule_type:schedule_type,partition_type:partition_type,patient_id:this.patient_id,excution_way:this.excution_way,cost_type:this.costType,execution_frequency:nameOne}).then(rs => {
  792. var resp = rs.data
  793. if (resp.state == 1) {
  794. this.admin_users = resp.data.adminUser
  795. var schedules = resp.data.scheduals
  796. if(schedules!=null && schedules.length >0){
  797. }
  798. for(let i=0;i<schedules.length;i++){
  799. schedules[i].new_doctor_advice = []
  800. for(let j=0;j<schedules[i].doctor_advice.length;j++){
  801. if((schedules[i].doctor_advice[j].frequency_type == 1) || (schedules[i].doctor_advice[j].frequency_type == 3 && schedules[i].doctor_advice[j].week_day.indexOf(this.getweekday(time))!=-1)){
  802. schedules[i].new_doctor_advice.push(schedules[i].doctor_advice[j])
  803. }
  804. }
  805. }
  806. console.log("schedules-----------",schedules)
  807. var newList = []
  808. if(this.is_sort == 0){
  809. newList = schedules
  810. }
  811. if(this.is_sort == 1){
  812. schedules.map(item => {
  813. item.is_sort = item.device_number.sort
  814. item.assess_time = item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  815. })
  816. newList = schedules.sort(this.compare('is_sort'))
  817. }
  818. if(this.is_sort == 2){
  819. schedules.map(item => {
  820. item.is_sort = item.device_number.sort
  821. item.assess_time = item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  822. })
  823. newList = schedules.sort(this.compare('assess_time'))
  824. }
  825. this.show = true
  826. this.showOne = false
  827. let arr = []
  828. let newArr = []
  829. let newSchedules = []
  830. newList.map(item => {
  831. item.new_doctor_advice.map(it =>{
  832. it.name = item.patient.name
  833. if(item.prescription != null){
  834. it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
  835. it.dialysis_dialyszers = item.prescription.dialysis_dialyszers
  836. it.dialysis_irrigation = item.prescription.dialysis_irrigation
  837. }
  838. it.schedule_type = item.schedule_type
  839. it.zoneId = item.device_number.zone.id
  840. it.dialysis_no = item.patient.dialysis_no
  841. it.mode_id = item.mode_id
  842. it.number = item.device_number.number
  843. it.zone_name = item.device_number.zone.name
  844. it.sort = item.device_number.sort,
  845. arr.push(it)
  846. })
  847. item.is_sort = item.device_number.sort
  848. item.assess_time = item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  849. })
  850. if(this.schedulType == 0){
  851. newSchedules = arr
  852. }else{
  853. arr.map(item => {
  854. if (item.schedule_type == this.schedulType) {
  855. newSchedules.push(item)
  856. }
  857. })
  858. }
  859. if(this.partitionType == 0){
  860. this.scheduleMap = newSchedules
  861. }else {
  862. let a = []
  863. arr.map(item => {
  864. if(this.partitionType == item.zoneId){
  865. a.push(item)
  866. }
  867. })
  868. this.scheduleMap = a
  869. }
  870. console.log("this.scheduleMap",this.scheduleMap)
  871. this.scheduleMap.map(ele => {
  872. let firstIndex = this.scheduleMap.findIndex(item => {
  873. return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
  874. })
  875. if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
  876. newArr.push({
  877. length: this.scheduleMap.filter(item => {
  878. return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
  879. }).length,
  880. firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
  881. })
  882. }
  883. })
  884. this.indexInfoList = newArr
  885. console.log("this.scheduleMap", this.scheduleMap)
  886. }
  887. })
  888. },
  889. compare:function (k) {
  890. return function (a, b) {
  891. var M = a[k];
  892. var N = b[k];
  893. return M - N; // 从低向高排
  894. // return N - M; // 从高向低排
  895. }
  896. },
  897. getValue: function(val) {
  898. if (val != undefined) {
  899. return val.value;
  900. } else {
  901. return "";
  902. }
  903. },
  904. handleCurrentChange(val) {
  905. this.listQuery.page = val;
  906. this.getSchedualPatientList();
  907. },
  908. changeSearchMode: function() {
  909. if (this.search_mode == 1) {
  910. this.search_mode = 2;
  911. } else {
  912. this.search_mode = 1;
  913. }
  914. },
  915. searchPatientAction: function() {
  916. this.listQuery.keywords = this.patient_search_keyword;
  917. console.log(this.patient_search_keyword);
  918. if (this.patient_search_keyword.length == 0) {
  919. return;
  920. }
  921. this.getSchedualPatientList();
  922. },
  923. handleSizeChange(val) {
  924. this.listQuery.limit = val;
  925. this.getSchedualPatientList();
  926. },
  927. batchPrintAction: function() {
  928. if (this.selecting_schs.length === 0) {
  929. this.$message.error("请至少选择一条需要打印的内容");
  930. return false;
  931. }
  932. // 模板ID为6
  933. var sch_ids = [];
  934. for (let index = 0; index < this.selecting_schs.length; index++) {
  935. sch_ids.push(this.selecting_schs[index].patient_id);
  936. }
  937. this.$store.dispatch("SetAdviceIDs", sch_ids);
  938. var name = ""
  939. for(let i=0;i<this.deliveryWay.length;i++){
  940. if(this.delivery_way == this.deliveryWay[i].id){
  941. name = this.deliveryWay[i].name
  942. }
  943. }
  944. if(name == '全部'){
  945. name = ""
  946. }
  947. this.$router.push({ path: "/dialysis/doctorlongAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name} });
  948. },
  949. signPrintAction:function(){
  950. if (this.selecting_schs.length === 0) {
  951. this.$message.error("请至少选择一条需要打印的内容");
  952. return false;
  953. }
  954. // 模板ID为6
  955. var sch_ids = [];
  956. for (let index = 0; index < this.selecting_schs.length; index++) {
  957. sch_ids.push(this.selecting_schs[index].patient_id);
  958. }
  959. this.$store.dispatch("SetAdviceIDs", sch_ids);
  960. var name = ""
  961. for(let i=0;i<this.deliveryWay.length;i++){
  962. if(this.delivery_way == this.deliveryWay[i].id){
  963. name = this.deliveryWay[i].name
  964. }
  965. }
  966. if(name == '全部'){
  967. name = ""
  968. }
  969. var nameOne = ""
  970. for(let i=0;i<this.excutList.length;i++){
  971. if(this.execution_frequency == this.excutList[i].id){
  972. nameOne = this.excutList[i].name
  973. }
  974. }
  975. if(nameOne == '全部'){
  976. nameOne = ""
  977. }
  978. this.$router.push({ path: "/dialysis/signLongPrint",query:{time: new Date(this.time).getTime(),delivery_way:name,execution_frequency:nameOne,patient_id:this.patient_id} });
  979. },
  980. batchPrintActionOne: function() {
  981. if (this.selecting_schs.length === 0) {
  982. this.$message.error("请至少选择一条需要打印的内容");
  983. return false;
  984. }
  985. var sch_ids = [];
  986. for (let index = 0; index < this.selecting_schs.length; index++) {
  987. sch_ids.push(this.selecting_schs[index].sch_id);
  988. }
  989. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  990. if (this.template_id == 2 || this.template_id == 0) {
  991. this.$router.push({ path: "/dialysis/print/batch/otherone" });
  992. } else if (this.template_id == 1) {
  993. this.$router.push({ path: "/dialysis/print/batch" });
  994. } else if (this.template_id == 5) {
  995. this.$router.push({ path: "/dialysis/print/batch/fiveone" });
  996. } else if (this.template_id == 22) {
  997. this.$router.push({ path: "/dialysis/print/batch/twentyTwo_one" });
  998. }
  999. },
  1000. batchPrintActionTwo: function() {
  1001. if (this.selecting_schs.length === 0) {
  1002. this.$message.error("请至少选择一条需要打印的内容");
  1003. return false;
  1004. }
  1005. var sch_ids = [];
  1006. for (let index = 0; index < this.selecting_schs.length; index++) {
  1007. sch_ids.push(this.selecting_schs[index].sch_id);
  1008. }
  1009. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  1010. if (this.template_id == 2 || this.template_id == 0) {
  1011. this.$router.push({ path: "/dialysis/print/batch/othertwo" });
  1012. } else if (this.template_id == 1) {
  1013. this.$router.push({ path: "/dialysis/print/batch" });
  1014. } else if (this.template_id == 5) {
  1015. this.$router.push({ path: "/dialysis/print/batch/fivetwo" });
  1016. } else if (this.template_id == 22) {
  1017. this.$router.push({ path: "/dialysis/print/batch/twentyTwo_two" });
  1018. }
  1019. },
  1020. compare (property) {
  1021. return function (a, b) {
  1022. var value1 = a[property]
  1023. var value2 = b[property]
  1024. return value1 - value2
  1025. }
  1026. },
  1027. // tableRowClassName({ row, rowIndex }) {
  1028. // if (row.stop_state == 1 || row.execution_state == 1) {
  1029. // return 'stoped-row';
  1030. // }
  1031. // return 'success-rows'
  1032. // row.index = rowIndex
  1033. // const arr = this.hoverOrderArr
  1034. // for (let i = 0; i < arr.length; i++) {
  1035. // if (rowIndex == arr[i]) {
  1036. // return 'success-row'
  1037. // }
  1038. // }
  1039. // },
  1040. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  1041. if (columnIndex === 0) {
  1042. let index = this.indexInfoList.findIndex(item => { //遍历数组
  1043. return item.firstIndex === rowIndex
  1044. })
  1045. if (index > -1) {
  1046. return {
  1047. rowspan: this.indexInfoList[index].length,
  1048. colspan: 1
  1049. }
  1050. } else {
  1051. return {
  1052. rowspan: 0,
  1053. colspan: 0
  1054. }
  1055. }
  1056. }
  1057. if (columnIndex === 1) {
  1058. let index = this.indexInfoList.findIndex(item => { //遍历数组
  1059. return item.firstIndex === rowIndex
  1060. })
  1061. if (index > -1) {
  1062. return {
  1063. rowspan: this.indexInfoList[index].length,
  1064. colspan: 1
  1065. }
  1066. } else {
  1067. return {
  1068. rowspan: 0,
  1069. colspan: 0
  1070. }
  1071. }
  1072. }
  1073. if (columnIndex === 2) {
  1074. let index = this.indexInfoList.findIndex(item => { //遍历数组
  1075. return item.firstIndex === rowIndex
  1076. })
  1077. if (index > -1) {
  1078. return {
  1079. rowspan: this.indexInfoList[index].length,
  1080. colspan: 1
  1081. }
  1082. } else {
  1083. return {
  1084. rowspan: 0,
  1085. colspan: 0
  1086. }
  1087. }
  1088. }
  1089. },
  1090. adviceNameShow({ row, column, rowIndex, columnIndex }) {
  1091. if (columnIndex == 2) {
  1092. return 'dialysisadvicenamedisplay'
  1093. } else {
  1094. return ''
  1095. }
  1096. },
  1097. getXuserName(id) {
  1098. if (id <= 0) {
  1099. return ''
  1100. }
  1101. var name = ''
  1102. if (
  1103. this.admin_users == null ||
  1104. typeof this.admin_users.length === 'undefined'
  1105. ) {
  1106. return name
  1107. }
  1108. var leng = this.admin_users.length
  1109. if (leng == 0) {
  1110. return name
  1111. }
  1112. for (let index = 0; index < leng; index++) {
  1113. if (this.admin_users[index].id == id) {
  1114. name = this.admin_users[index].name
  1115. break
  1116. }
  1117. }
  1118. return name
  1119. },
  1120. getAdviceContent(row, isChild) {
  1121. let tempSingleDoseDesc = ''
  1122. let tempDrugSpecDesc = ''
  1123. let tempPrescribingNumberDesc = ''
  1124. if (row.prescribing_number) {
  1125. tempPrescribingNumberDesc =
  1126. row.prescribing_number + '' + row.prescribing_number_unit
  1127. }
  1128. if (row.single_dose) {
  1129. if (this.template_id != 6) {
  1130. tempSingleDoseDesc =
  1131. ' 单次用量 ' + ' ' + row.single_dose + '' + row.single_dose_unit
  1132. } else {
  1133. tempSingleDoseDesc = row.single_dose ? row.single_dose : '' + '' + row.single_dose_unit ? row.single_dose_unit : ''
  1134. }
  1135. }
  1136. if (row.advice_desc) {
  1137. tempDrugSpecDesc = '(' + row.advice_desc + row.drug_spec_unit + ')'
  1138. }
  1139. if (isChild == 1) {
  1140. return (
  1141. row.advice_name +
  1142. tempDrugSpecDesc +
  1143. ' ' +
  1144. tempPrescribingNumberDesc +
  1145. tempSingleDoseDesc +
  1146. ' ' +
  1147. row.delivery_way +
  1148. ' ' +
  1149. row.execution_frequency
  1150. )
  1151. } else {
  1152. // 是子药
  1153. return (
  1154. row.advice_name +
  1155. tempDrugSpecDesc +
  1156. ' ' +
  1157. tempPrescribingNumberDesc +
  1158. tempSingleDoseDesc
  1159. )
  1160. }
  1161. },
  1162. handleSelectionChange(val){
  1163. console.log("val88888888",val)
  1164. this.selecting_schs = val;
  1165. this.is_status = 1
  1166. },
  1167. handleSelectionChangeOne(val){
  1168. this.selecting_schs = val;
  1169. this.is_status = 1
  1170. console.log("val32323323223",val)
  1171. },
  1172. querySearchAsync(keyword, cb) {
  1173. let key = '';
  1174. if (keyword != undefined) {
  1175. key = keyword
  1176. }
  1177. let searchArray = []
  1178. PostSearch(key).then(response => {
  1179. if (response.data.state == 1) {
  1180. searchArray = response.data.data.patient
  1181. console.log('searcharrya', searchArray)
  1182. cb(searchArray)
  1183. }
  1184. })
  1185. return searchArray
  1186. },
  1187. handleSelect(val) {
  1188. console.log("val323223232323232323",val)
  1189. this.patient_id = val.id
  1190. this.listQuery.keyword = val.name
  1191. this.requestSchedualDoctors(this.time)
  1192. },
  1193. toSeach(){
  1194. this.patient_id = 0
  1195. this.requestSchedualDoctors(this.time)
  1196. },
  1197. toExcution(){
  1198. if(this.selecting_schs.length ==0){
  1199. this.$message.error("请勾选需要执行的医嘱")
  1200. return false
  1201. }
  1202. console.log("hhhahhhahhh",this.is_status)
  1203. if(this.is_status == 1){
  1204. this.execTimeDialogVisible = true
  1205. }
  1206. if(this.is_status == 2){
  1207. this.execTimeDialogVisibleOne = true
  1208. }
  1209. },
  1210. excutionDoctorAdvice(){
  1211. if (this.execTime.length == 0) {
  1212. this.$message.error('请选择执行时间!')
  1213. return false
  1214. }
  1215. var execTime = Math.round(new Date(this.execTime).getTime() / 1000)
  1216. var ids=[]
  1217. if(this.selecting_schs!=null && this.selecting_schs.length >0){
  1218. for(let i=0;i<this.selecting_schs.length;i++){
  1219. ids.push(this.selecting_schs[i].patient_id)
  1220. }
  1221. }
  1222. var str = ids.join(",")
  1223. var params = {
  1224. str:str,
  1225. advice_date: moment(this.time).format('YYYY-MM-DD'),
  1226. is_open:this.config.is_open,
  1227. exec_time:execTime
  1228. }
  1229. console.log("params232322323wo",params)
  1230. this.exceLoading = true
  1231. excutionDoctorAdvice(params).then(response=>{
  1232. if(response.data.state == 1){
  1233. if(response.data.data.msg == 2){
  1234. var drug_name = response.data.data.drug.drug_name
  1235. var dose = response.data.data.drug.dose
  1236. var dose_unit = response.data.data.drug.dose_unit
  1237. var min_number = response.data.data.drug.min_number
  1238. var max_unit = response.data.data.drug.max_unit
  1239. var min_unit = response.data.data.drug.min_unit
  1240. var str = drug_name + " "+dose+dose_unit +"*"+min_number +max_unit +"/"+min_unit
  1241. this.$message.error(str +"库存不足,执行失败!")
  1242. this.exceLoading = false
  1243. this.execTimeDialogVisible = false
  1244. this.requestSchedualDoctors(this.time)
  1245. }
  1246. if(response.data.data.msg == 3){
  1247. this.$message.error("执行人和核对人不能是同一个人,执行失败!")
  1248. }
  1249. }
  1250. })
  1251. },
  1252. toCheck(){
  1253. if(this.selecting_schs.length ==0){
  1254. this.$message.error("请勾选需要执行的医嘱")
  1255. return false
  1256. }
  1257. var ids=[]
  1258. if(this.selecting_schs!=null && this.selecting_schs.length >0){
  1259. for(let i=0;i<this.selecting_schs.length;i++){
  1260. ids.push(this.selecting_schs[i].patient_id)
  1261. }
  1262. }
  1263. var str = ids.join(",")
  1264. var params = {
  1265. str:str,
  1266. advice_date: moment(this.time).format('YYYY-MM-DD'),
  1267. is_open:this.config.is_open,
  1268. }
  1269. checkNewDoctorAdvice(params).then(response=>{
  1270. if(response.data.state == 1){
  1271. if(response.data.data.msg == 2){
  1272. var advice = response.data.data.advice
  1273. this.$message.error(advice.advice_name +"执行人和核对人不能是同一个人,核对失败!")
  1274. this.requestSchedualDoctors(this.time)
  1275. }else{
  1276. this.$message.success("核对成功!")
  1277. this.requestSchedualDoctors(this.time)
  1278. }
  1279. }
  1280. })
  1281. },
  1282. toSettle(){
  1283. if(this.selecting_schs.length ==0){
  1284. this.$message.error("请勾选需要执行的医嘱")
  1285. return false
  1286. }
  1287. var ids=[]
  1288. if(this.selecting_schs!=null && this.selecting_schs.length >0){
  1289. for(let i=0;i<this.selecting_schs.length;i++){
  1290. ids.push(this.selecting_schs[i].patient_id)
  1291. }
  1292. }
  1293. var str = ids.join(",")
  1294. var params = {
  1295. str:str,
  1296. advice_date: moment(this.time).format('YYYY-MM-DD'),
  1297. is_open:this.config.is_open,
  1298. }
  1299. settleNewDoctorAdvice(params).then(response=>{
  1300. if(response.data.state == 1){
  1301. this.$message.success("收费成功!")
  1302. this.requestSchedualDoctors(this.time)
  1303. }
  1304. })
  1305. },
  1306. selectSortType(id){
  1307. this.is_sort = id
  1308. this.requestSchedualDoctors(this.time);
  1309. },
  1310. handleRowClick (row) {
  1311. },
  1312. tableRowClassName({row, rowIndex}) {
  1313. row.index = rowIndex
  1314. if(row.index = rowIndex){
  1315. return 'success-row'
  1316. }
  1317. },
  1318. handleCurrentChangeList(row){
  1319. this.selecting_schs.push(row)
  1320. this.current_row= row
  1321. this.is_status = 2
  1322. },
  1323. excutionDoctorAdviceOne(){
  1324. if(this.current_row.execution_state == 1){
  1325. this.$message.error("所选医嘱已核对,无需再核对!")
  1326. return false
  1327. }
  1328. if (this.execTime.length == 0) {
  1329. this.$message.error('请选择执行时间!')
  1330. return false
  1331. }
  1332. var execTime = Math.round(new Date(this.execTime).getTime() / 1000)
  1333. var params= {
  1334. advice_id:this.current_row.id,
  1335. advice_date: moment(this.time).format('YYYY-MM-DD'),
  1336. exec_time:execTime,
  1337. }
  1338. excutionDoctorAdviceById(params).then(response=>{
  1339. if(response.data.state == 1){
  1340. if(response.data.data.msg == 2){
  1341. var drug_name = response.data.data.drug.drug_name
  1342. var dose = response.data.data.drug.dose
  1343. var dose_unit = response.data.data.drug.dose_unit
  1344. var min_number = response.data.data.drug.min_number
  1345. var max_unit = response.data.data.drug.max_unit
  1346. var min_unit = response.data.data.drug.min_unit
  1347. var str = drug_name + " "+dose+dose_unit +"*"+min_number +max_unit +"/"+min_unit
  1348. this.$message.error(str +"库存不足,执行失败!")
  1349. this.exceLoading = false
  1350. this.execTimeDialogVisibleOne = false
  1351. this.requestSchedualDoctors(this.time)
  1352. }
  1353. if(response.data.data.msg == 1){
  1354. var msg = response.data.data.msg
  1355. this.$message.success("执行成功!")
  1356. this.exceLoading = false
  1357. this.execTimeDialogVisibleOne = false
  1358. this.requestSchedualDoctors(this.time)
  1359. }
  1360. if(response.data.data.msg == 3){
  1361. this.$message.error("执行人与核对人不能是同一个人,执行失败!")
  1362. }
  1363. }
  1364. })
  1365. },
  1366. toStaticOne() {
  1367. var str = ""
  1368. if(this.partion_type==0){
  1369. str = this.zoneIdList.join(",")
  1370. }
  1371. if(this.partion_type!=0){
  1372. str = this.partion_type.join(",")
  1373. }
  1374. this.partion_str = ""
  1375. this.partion_str = str
  1376. this.tableList = []
  1377. var params = {
  1378. schedule_type:this.schedule_type,
  1379. partion_type:str,
  1380. selected_date: moment(this.time).format('YYYY-MM-DD'),
  1381. }
  1382. getLongDialysisAdviceToday(params).then(response=>{
  1383. if(response.data.state == 1){
  1384. var doctorList = []
  1385. var druglist = response.data.data.drug
  1386. this.druglist = druglist
  1387. this.startdialogVisibleOne = true
  1388. var list = response.data.data.list
  1389. console.log("list2332233223",list)
  1390. if(list!=null && list.length>0){
  1391. for(let i=0;i<list.length;i++){
  1392. list[i].new_doctor_advice = []
  1393. for(let j=0;j<list[i].xt_doctor_advice.length;j++){
  1394. if((list[i].xt_doctor_advice[j].frequency_type == 1) || (list[i].xt_doctor_advice[j].frequency_type == 3 && list[i].xt_doctor_advice[j].week_day.indexOf(this.getweekday(this.time))!=-1)){
  1395. list[i].new_doctor_advice.push(list[i].xt_doctor_advice[j])
  1396. }
  1397. }
  1398. }
  1399. }
  1400. this.adminUserList = response.data.data.doctorList
  1401. if(list!=null && list.length > 0){
  1402. for(let i=0;i<list.length;i++){
  1403. for(let j=0;j<list[i].new_doctor_advice.length;j++){
  1404. list[i].new_doctor_advice[j].mode_id = list[i].mode_id
  1405. list[i].new_doctor_advice[j].zone_name = list[i].device_number.zone.name
  1406. list[i].new_doctor_advice[j].sort = list[i].device_number.zone.sort
  1407. doctorList.push(list[i].new_doctor_advice[j])
  1408. }
  1409. }
  1410. }
  1411. if(doctorList!=null && doctorList.length > 0){
  1412. let dataInfo = {}
  1413. doctorList.forEach((item, index) => {
  1414. item.advice_name = item.advice_name.replace(/\s/g,"")
  1415. let { advice_name } = item
  1416. if (!dataInfo[advice_name]) {
  1417. dataInfo[advice_name] = {
  1418. advice_name:item.advice_name,
  1419. child: [],
  1420. count:0,
  1421. execution_staff:item.execution_staff,
  1422. specification_name:item.advice_desc +item.drug_spec_unit,
  1423. patient_id:item.patient_id,
  1424. }
  1425. }
  1426. })
  1427. let arr = Object.values(dataInfo)
  1428. for(let i=0;i<arr.length;i++){
  1429. for(let j=0;j<doctorList.length;j++){
  1430. if(arr[i].advice_name == doctorList[j].advice_name){
  1431. arr[i].child.push(doctorList[j])
  1432. }
  1433. }
  1434. }
  1435. this.tabHead = arr
  1436. console.log("tabHead",this.tabHead)
  1437. }
  1438. this.doctorMap = []
  1439. if(doctorList!=null && doctorList.length > 0){
  1440. let dataInfoOne = {}
  1441. doctorList.forEach((item, index) => {
  1442. if(item.advice_name == "肝素钠注射剂"){
  1443. this.doctorMap.push(item)
  1444. }
  1445. let { zone_name } = item
  1446. if (!dataInfoOne[zone_name]) {
  1447. dataInfoOne[zone_name] = {
  1448. zone_name:item.zone_name,
  1449. child: [],
  1450. count:0,
  1451. sort:item.sort,
  1452. }
  1453. }
  1454. })
  1455. let newArr = Object.values(dataInfoOne)
  1456. if(newArr!=null && newArr.length >0){
  1457. for(let i=0;i<newArr.length;i++){
  1458. for(let j=0;j<doctorList.length;j++){
  1459. if(newArr[i].zone_name == doctorList[j].zone_name){
  1460. newArr[i].child.push(doctorList[j])
  1461. }
  1462. }
  1463. }
  1464. }
  1465. var newList = newArr.sort(this.compareList('sort'))
  1466. if(newList!=null && newList.length >0){
  1467. for(let i=0;i<newList.length;i++){
  1468. newList[i].is_total = 1
  1469. }
  1470. }
  1471. var obj = {is_total:0,count:0,execution_staff:0,child:[],zone_name:""}
  1472. newList.push(obj)
  1473. this.tableDataList = newList
  1474. console.log("999999999999999999-------",this.tableDataList)
  1475. }
  1476. }
  1477. })
  1478. },
  1479. getDrugAdviceCount(advice_name,zone_name){
  1480. var str = ""
  1481. var arr =[]
  1482. var arrOne = []
  1483. if(this.doctorMap!=null && this.doctorMap.length>0){
  1484. for(let i=0;i<this.doctorMap.length;i++){
  1485. if(this.doctorMap[i].advice_name!="" || this.doctorMap[i].advice_name!=undefined){
  1486. this.doctorMap[i].advice_name = this.doctorMap[i].advice_name.replace(/\s/g,"")
  1487. }
  1488. if(this.doctorMap[i].advice_name == advice_name && this.doctorMap[i].zone_name == zone_name && this.doctorMap[i].delivery_way =="导管封管"){
  1489. arr.push(this.doctorMap[i])
  1490. }
  1491. if(this.doctorMap[i].advice_name == advice_name && this.doctorMap[i].zone_name == zone_name && this.doctorMap[i].delivery_way.indexOf("泵入")!=-1){
  1492. arrOne.push(this.doctorMap[i])
  1493. }
  1494. }
  1495. }
  1496. if(arr!=null && arr.length >0){
  1497. var total = 0
  1498. for(let i=0;i<arr.length;i++){
  1499. total +=arr[i].prescribing_number
  1500. }
  1501. str = "封管" +"("+total+")"
  1502. }
  1503. if(arrOne!=null && arrOne.length >0){
  1504. var total_one = 0
  1505. for(let i=0;i<arrOne.length;i++){
  1506. total_one +=arrOne[i].prescribing_number
  1507. }
  1508. str = str + "泵入" +"("+total_one+")"
  1509. }
  1510. return str
  1511. },
  1512. getSpecification(id){
  1513. var specification_name = ""
  1514. for(let i=0;i<this.druglist.length;i++){
  1515. if(id == this.druglist[i].id){
  1516. specification_name = this.druglist[i].dose+this.druglist[i].dose_unit +"*"+this.druglist[i].min_number+this.druglist[i].min_unit +"/"+this.druglist[i].max_unit
  1517. }
  1518. }
  1519. return specification_name
  1520. },
  1521. getCount(val){
  1522. var count = 0
  1523. if(val!=null && val.length > 0){
  1524. for(let i=0;i<val.length;i++){
  1525. count += parseInt(val[i].prescribing_number)
  1526. }
  1527. }
  1528. if(count > 0){
  1529. return count
  1530. }else{
  1531. return 0
  1532. }
  1533. },
  1534. getHisCount(val,max_unit,min_unit,min_number){
  1535. var total = 0
  1536. var max_str = "";
  1537. var min_str = "";
  1538. for(let i=0;i<val.length;i++){
  1539. total+=parseInt(val[i].prescribing_number)
  1540. }
  1541. if (total < min_number) {
  1542. min_str = total + min_unit;
  1543. }
  1544. if (total == 0) {
  1545. min_str = "";
  1546. max_str = "";
  1547. }
  1548. if (total >= min_number) {
  1549. if (parseInt(total / min_number) != 0) {
  1550. max_str = parseInt(total / min_number) + max_unit;
  1551. }
  1552. if (total % min_number != 0) {
  1553. min_str = (total % min_number) + min_unit;
  1554. }
  1555. }
  1556. return max_str + min_str;
  1557. },
  1558. toPrintOne(){
  1559. var schedule_date = moment(this.time).format('YYYY-MM-DD')
  1560. this.$router.push({path:"/dialysis/doctorAdviceStaticPrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date+"&is_open="+this.config.is_open})
  1561. },
  1562. toPrintTwo(){
  1563. var schedule_date = moment(this.time).format('YYYY-MM-DD')
  1564. this.$router.push({path:"/dialysis/doctorLongNewAdvicePrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date})
  1565. },
  1566. toExportListOne(){
  1567. import('@/vendor/Export2Excel').then(excel => {
  1568. if(this.tableList!=null && this.tableList.length > 0){
  1569. for(let i=0;i<this.tableList.length;i++){
  1570. this.tableList[i].index = i+1
  1571. if(this.config.is_open == 1){
  1572. this.tableList[i].total_count = this.getHisCount(this.tableList[i].child,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
  1573. }
  1574. if(this.config.is_open!=1){
  1575. this.tableList[i].total_count = this.getCount(this.tableList[i].child)
  1576. }
  1577. }
  1578. }
  1579. const tHeader = ['序号','药品名称','规格','数量']
  1580. const filterVal = ['index','advice_name','specification_name','total_count']
  1581. const data = this.formatJson(filterVal, this.tableList)
  1582. excel.export_json_to_excel({
  1583. header: tHeader,
  1584. data,
  1585. filename: '药品统计'
  1586. })
  1587. this.downloadLoading = false
  1588. })
  1589. },
  1590. formatJson(filterVal, jsonData) {
  1591. return jsonData.map(v => filterVal.map(j => v[j]));
  1592. },
  1593. changeScheduleType(){
  1594. this.tableList = []
  1595. this.toStatic()
  1596. },
  1597. changePartionType(){
  1598. this.tableList = []
  1599. this.toStatic()
  1600. },
  1601. changeScheduleTypeOne(){
  1602. this.tableDataList = []
  1603. this.toStaticOne()
  1604. },
  1605. changePartionTypeOne(){
  1606. this.tableDataList = []
  1607. this.toStaticOne()
  1608. },
  1609. getModeId(val){
  1610. if(val!=null && val.length > 0){
  1611. let dataInfo = {}
  1612. val.forEach((item, index) => {
  1613. let { patient_id } = item
  1614. if (!dataInfo[patient_id]) {
  1615. dataInfo[patient_id] = {
  1616. patient_id:item.patient_id,
  1617. child: [],
  1618. count:0,
  1619. mode_id:item.mode_id,
  1620. }
  1621. }
  1622. })
  1623. let newArr = Object.values(dataInfo)
  1624. if(newArr!=null && newArr.length >0){
  1625. let dataInfo = {}
  1626. newArr.forEach((item, index) => {
  1627. let { mode_id } = item
  1628. if (!dataInfo[mode_id]) {
  1629. dataInfo[mode_id] = {
  1630. mode_id:item.mode_id,
  1631. child: [],
  1632. count:0,
  1633. }
  1634. }
  1635. })
  1636. let hisNewArr = Object.values(dataInfo)
  1637. if(hisNewArr!=null && hisNewArr.length >0){
  1638. for(let i=0;i<hisNewArr.length;i++){
  1639. for(let j=0;j<newArr.length;j++){
  1640. if(hisNewArr[i].mode_id == newArr[j].mode_id){
  1641. hisNewArr[i].child.push(newArr[j])
  1642. }
  1643. }
  1644. }
  1645. }
  1646. var str = ""
  1647. for(let i=0;i<hisNewArr.length;i++){
  1648. if(hisNewArr[i].mode_id == 1){
  1649. hisNewArr[i].mode_id = "HD"
  1650. }
  1651. if(hisNewArr[i].mode_id == 2){
  1652. hisNewArr[i].mode_id = "HDF"
  1653. }
  1654. if(hisNewArr[i].mode_id == 3){
  1655. hisNewArr[i].mode_id = "HD+HP"
  1656. }
  1657. if(hisNewArr[i].mode_id == 4){
  1658. hisNewArr[i].mode_id = "HP"
  1659. }
  1660. if(hisNewArr[i].mode_id == 5){
  1661. hisNewArr[i].mode_id = "HF"
  1662. }
  1663. if(hisNewArr[i].mode_id == 6){
  1664. hisNewArr[i].mode_id = "SCUF"
  1665. }
  1666. if(hisNewArr[i].mode_id == 7){
  1667. hisNewArr[i].mode_id = "IUF"
  1668. }
  1669. if(hisNewArr[i].mode_id == 8){
  1670. hisNewArr[i].mode_id = "HFHD"
  1671. }
  1672. if(hisNewArr[i].mode_id == 9){
  1673. hisNewArr[i].mode_id = "HFHD+HP"
  1674. }
  1675. if(hisNewArr[i].mode_id == 10){
  1676. hisNewArr[i].mode_id = "PHF"
  1677. }
  1678. if(hisNewArr[i].mode_id == 11){
  1679. hisNewArr[i].mode_id = "HFR"
  1680. }
  1681. if(hisNewArr[i].mode_id == 12){
  1682. hisNewArr[i].mode_id = "HDF+HP"
  1683. }
  1684. if(hisNewArr[i].mode_id == 13){
  1685. hisNewArr[i].mode_id = "CRRT"
  1686. }
  1687. if(hisNewArr[i].mode_id == 14){
  1688. hisNewArr[i].mode_id = "腹水回输"
  1689. }
  1690. if(hisNewArr[i].mode_id == 15){
  1691. hisNewArr[i].mode_id = "IUF+HD"
  1692. }
  1693. if(hisNewArr[i].mode_id == 20){
  1694. hisNewArr[i].mode_id = "UF"
  1695. }
  1696. if(hisNewArr[i].mode_id == 21){
  1697. hisNewArr[i].mode_id = "HD+"
  1698. }
  1699. if(hisNewArr[i].mode_id == 22){
  1700. hisNewArr[i].mode_id = "血浆胆红素吸附+HDF"
  1701. }
  1702. if(hisNewArr[i].mode_id == 23){
  1703. hisNewArr[i].mode_id = "血浆胆红素吸附"
  1704. }
  1705. if(hisNewArr[i].mode_id == 24){
  1706. hisNewArr[i].mode_id = "I-HDF"
  1707. }
  1708. if(hisNewArr[i].mode_id == 25){
  1709. hisNewArr[i].mode_id = "HD高通"
  1710. }
  1711. if(hisNewArr[i].mode_id == 26){
  1712. hisNewArr[i].mode_id = "CVVH"
  1713. }
  1714. if(hisNewArr[i].mode_id == 27){
  1715. hisNewArr[i].mode_id = "CVVHD"
  1716. }
  1717. if(hisNewArr[i].mode_id == 28){
  1718. hisNewArr[i].mode_id = "CVVHDF"
  1719. }
  1720. if(hisNewArr[i].mode_id == 29){
  1721. hisNewArr[i].mode_id = "PE"
  1722. }
  1723. if(hisNewArr[i].mode_id == 30){
  1724. hisNewArr[i].mode_id = "血浆胆红素吸附+HP"
  1725. }
  1726. if(hisNewArr[i].mode_id == 31){
  1727. hisNewArr[i].mode_id = "HPD"
  1728. }
  1729. if(hisNewArr[i].mode_id == 32){
  1730. hisNewArr[i].mode_id = "HDP"
  1731. }
  1732. str += hisNewArr[i].mode_id +"("+hisNewArr[i].child.length+")" +"\n"
  1733. }
  1734. return str
  1735. }
  1736. // return newArr.length
  1737. }
  1738. },
  1739. getDrugCount(val,advice_name){
  1740. if(val!=null){
  1741. for(let i=0;i<val.length;i++){
  1742. val[i].advice_name = val[i].advice_name.replace(/\s/g,"")
  1743. }
  1744. }
  1745. if(val!=null && val.length >0){
  1746. let dataInfo = {}
  1747. val.forEach((item, index) => {
  1748. let { advice_name } = item
  1749. if (!dataInfo[advice_name]) {
  1750. dataInfo[advice_name] = {
  1751. advice_name:item.advice_name,
  1752. child: [],
  1753. count:0,
  1754. }
  1755. }
  1756. })
  1757. let newArr = Object.values(dataInfo)
  1758. if(newArr!=null && newArr.length >0){
  1759. for(let i=0;i<newArr.length;i++){
  1760. for(let j=0;j<val.length;j++){
  1761. if(newArr[i].advice_name == val[j].advice_name){
  1762. newArr[i].child.push(val[j])
  1763. }
  1764. }
  1765. }
  1766. }
  1767. var total = 0
  1768. var newHisArr =[]
  1769. if(newArr!=null && newArr.length >0){
  1770. for(let i=0;i<newArr.length;i++){
  1771. if(newArr[i].advice_name == advice_name){
  1772. newHisArr.push(newArr[i])
  1773. }
  1774. }
  1775. }
  1776. if(newHisArr!=null && newHisArr.length>0){
  1777. for(let i=0;i<newHisArr.length;i++){
  1778. for(let j=0;j<newHisArr[i].child.length;j++){
  1779. total += parseInt(newHisArr[i].child[j].prescribing_number)
  1780. }
  1781. }
  1782. }
  1783. return total
  1784. }
  1785. },
  1786. getAdminUserName(id){
  1787. var name = ""
  1788. for(let i=0;i<this.adminUserList.length;i++){
  1789. if(id == this.adminUserList[i].id){
  1790. name = this.adminUserList[i].name
  1791. }
  1792. }
  1793. return name
  1794. },
  1795. getZoneName(val){
  1796. var zone_name = ""
  1797. if(val!=null && val.length >0){
  1798. zone_name = val[0].zone_name
  1799. }
  1800. return zone_name
  1801. },
  1802. compareList: function (k) {
  1803. return function (a, b) {
  1804. var M = a[k]
  1805. var N = b[k]
  1806. return M - N // 从低向高排
  1807. // return N - M; // 从高向低排
  1808. }
  1809. },
  1810. getSummaries(param) {
  1811. const { columns, data } = param;
  1812. const sums = [];
  1813. columns.forEach((column, index) => {
  1814. console.log("index---------",index)
  1815. if (index === 0) {
  1816. sums[index] = '总数';
  1817. return;
  1818. }
  1819. if(index > 2){
  1820. const values = data.map(item => item[column.property]);
  1821. console.log("data0----------------",data)
  1822. }
  1823. });
  1824. return sums;
  1825. },
  1826. getAllSumCount(advice_name){
  1827. var hisNewArr =[]
  1828. if(this.tabHead.length!=null && this.tabHead.length >0){
  1829. for(let i=0;i<this.tabHead.length;i++){
  1830. if(this.tabHead[i].advice_name == advice_name){
  1831. hisNewArr.push(this.tabHead[i])
  1832. }
  1833. }
  1834. }
  1835. var total = 0
  1836. if(hisNewArr!=null && hisNewArr.length > 0){
  1837. for(let i=0;i<hisNewArr.length;i++){
  1838. for(let j=0;j<hisNewArr[i].child.length;j++){
  1839. total += parseInt(hisNewArr[i].child[j].prescribing_number)
  1840. }
  1841. }
  1842. }
  1843. if (total > 0) {
  1844. return total
  1845. }else{
  1846. return 0
  1847. }
  1848. },
  1849. getTimeSix(val) {
  1850. if(val == ""){
  1851. return ""
  1852. }else {
  1853. return uParseTime(val, '{y}-{m}-{d}')
  1854. }
  1855. },
  1856. toJiao(){
  1857. GetMobileScheduleList().then(response=>{
  1858. if(response.data.state == 1){
  1859. var schedule = response.data.data.schedule
  1860. this.$message.success("保存成功!")
  1861. }
  1862. })
  1863. },
  1864. getweekday(date){
  1865. var weekArray = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六");
  1866. var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date
  1867. return week;
  1868. }
  1869. },
  1870. components: {
  1871. BreadCrumb
  1872. }
  1873. };
  1874. </script>
  1875. <style rel="stylesheet/scss" lang="scss" scoped>
  1876. .app-container {
  1877. // margin: 20px;
  1878. font-size: 15px;
  1879. .filter-container {
  1880. padding-bottom: 5px;
  1881. }
  1882. .cqd-dataTitle {
  1883. color: #303133;
  1884. font-size: 14px;
  1885. border-bottom: 2px #e4e7ed solid;
  1886. height: 36px;
  1887. line-height: 36px;
  1888. margin: 0 0 25px 0;
  1889. position: relative;
  1890. }
  1891. .cqd-dataTitle::before {
  1892. position: absolute;
  1893. left: 0;
  1894. bottom: -2px;
  1895. content: "";
  1896. width: 42px;
  1897. height: 2px;
  1898. background: #409eff;
  1899. }
  1900. .search-component {
  1901. width: 500px;
  1902. .searchBox {
  1903. width: 300px;
  1904. height: 36px;
  1905. line-height: 36px;
  1906. padding-left: 15px;
  1907. border: 1px #dcdfe6 solid;
  1908. border-right: none;
  1909. outline: none;
  1910. float: left;
  1911. border-radius: 6px 0 0 6px;
  1912. font-size: 14px;
  1913. color: #333;
  1914. background: #fff;
  1915. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  1916. }
  1917. .searchBtn {
  1918. background-color: #409eff;
  1919. color: #fff;
  1920. font-size: 15px;
  1921. text-align: center;
  1922. height: 36px;
  1923. line-height: 36px;
  1924. float: left;
  1925. outline: none;
  1926. width: 70px;
  1927. border: none;
  1928. border-radius: 0 6px 6px 0;
  1929. font-family: "Microsoft Yahei";
  1930. cursor: pointer;
  1931. }
  1932. }
  1933. .amount {
  1934. font-weight: normal;
  1935. padding: 10px 0 0 0;
  1936. color: #606266;
  1937. font-size: 14px;
  1938. span {
  1939. color: #ef2525;
  1940. font-family: "Arial";
  1941. padding: 0 2px;
  1942. }
  1943. }
  1944. .el-table td .cell{
  1945. white-space: pre-wrap;
  1946. }
  1947. }
  1948. .el-table td,
  1949. .el-table th.is-leaf,
  1950. .el-table--border,
  1951. .el-table--group {
  1952. border-color: #d0d3da;
  1953. }
  1954. .el-table--border::after,
  1955. .el-table--group::after,
  1956. .el-table::before {
  1957. background-color: #d0d3da;
  1958. }
  1959. .el-checkbox__inner::after {
  1960. height: 10px;
  1961. left: 7px;
  1962. }
  1963. .el-checkbox__inner {
  1964. width: 20px;
  1965. height: 20px;
  1966. }
  1967. </style>