longDoctorAdvice.vue 73KB

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