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

EditGroupAdvice.vue 95KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560
  1. <template>
  2. <div id="user-edit-group-advice">
  3. <el-dialog
  4. title="编辑医嘱"
  5. :visible.sync="groupEditFormVisible"
  6. width="700px"
  7. >
  8. <el-form
  9. ref="groupForm"
  10. :rules="groupRules"
  11. :model="groupForm"
  12. label-width="90px"
  13. >
  14. <el-row>
  15. <el-col :span="12">
  16. <el-form-item label="医嘱类型 :">
  17. <el-select
  18. v-model="groupForm.advice_type"
  19. placeholder="请选择"
  20. disabled
  21. >
  22. <el-option
  23. :label="item.label"
  24. :key="item.value"
  25. :value="item.value"
  26. v-for="item in adviceTypeOptions"
  27. ></el-option>
  28. </el-select>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="12">
  32. <el-form-item label="开始时间 :" required prop="start_time">
  33. <el-date-picker
  34. type="datetime"
  35. format="yyyy-MM-dd HH:mm"
  36. value-format="yyyy-MM-dd HH:mm"
  37. placeholder="选择时间"
  38. v-model="groupForm.start_time"
  39. ></el-date-picker>
  40. </el-form-item>
  41. </el-col>
  42. </el-row>
  43. <el-row>
  44. <el-col :span="12">
  45. <el-form-item label="开嘱医生 :">
  46. <span>{{ groupForm.advice_doctor }} </span>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="12">
  50. <el-form-item label="开嘱时间 :">
  51. <span>{{ groupForm.advice_date }} </span>
  52. </el-form-item>
  53. </el-col>
  54. </el-row>
  55. <el-row style="margin-bottom: 20px">
  56. <el-col :span="2">&nbsp;</el-col>
  57. <el-col :span="5">
  58. <el-button
  59. :disabled="
  60. $store.getters.xt_user.subscibe.state == 3 ? true : false
  61. "
  62. @click="openAdviceTemplate()"
  63. round
  64. >选择医嘱模板
  65. </el-button>
  66. </el-col>
  67. <el-col :span="5">
  68. <el-button
  69. :disabled="
  70. $store.getters.xt_user.subscibe.state == 3 ? true : false
  71. "
  72. round
  73. @click="openGroupAdvice(0)"
  74. >新增医嘱内容
  75. </el-button>
  76. </el-col>
  77. <el-col :span="5">
  78. <el-button
  79. :disabled="
  80. $store.getters.xt_user.subscibe.state == 3 ? true : false
  81. "
  82. round
  83. @click="openDeleteGroupAdvice()"
  84. >删除医嘱内容
  85. </el-button>
  86. </el-col>
  87. <el-col :span="5">
  88. <el-button
  89. :disabled="
  90. $store.getters.xt_user.subscibe.state == 3 ? true : false
  91. "
  92. round
  93. @click="openGroupAdvice(1)"
  94. >修改医嘱内容
  95. </el-button>
  96. </el-col>
  97. </el-row>
  98. <el-row>
  99. <el-col :span="24">
  100. <el-table
  101. id="user-edit-advice-name-table"
  102. :data="groupForm.adviceNames"
  103. border
  104. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  105. fit
  106. highlight-current-row
  107. :row-class-name="groupClassName"
  108. @current-change="selectGroupAdvice"
  109. style="width: 100%"
  110. :row-key="getRowKey"
  111. ref="advicenametable"
  112. type="expand"
  113. default-expand-all
  114. >
  115. <el-table-column
  116. label="医嘱内容"
  117. property="advice_name"
  118. style="word-break: keep-all;white-space:nowrap;"
  119. ></el-table-column>
  120. <el-table-column label="药品规格" property="advice_desc">
  121. <template slot-scope="scope">
  122. <span v-if="scope.row.advice_desc"
  123. >{{ scope.row.advice_desc
  124. }}{{ scope.row.drug_spec_unit }}</span
  125. >
  126. </template>
  127. </el-table-column>
  128. <el-table-column
  129. label="开药数量"
  130. min-width="80"
  131. property="prescribing_number"
  132. align="center"
  133. >
  134. <template slot-scope="scope">
  135. <span v-if="scope.row.prescribing_number != 0"
  136. >{{ scope.row.prescribing_number
  137. }}{{ scope.row.prescribing_number_unit }}</span
  138. >
  139. </template>
  140. </el-table-column>
  141. <el-table-column
  142. label="单次用量"
  143. min-width="80"
  144. property="single_dose"
  145. align="center"
  146. >
  147. <template slot-scope="scope">
  148. <span v-if="scope.row.single_dose != 0"
  149. >{{ scope.row.single_dose
  150. }}{{ scope.row.single_dose_unit }}</span
  151. >
  152. </template>
  153. </el-table-column>
  154. <el-table-column
  155. label="给药途径"
  156. min-width="80"
  157. property="delivery_way"
  158. align="center"
  159. >
  160. <template slot-scope="scope">
  161. <span v-if="scope.row.parent_row == 0">{{
  162. scope.row.delivery_way
  163. }}</span>
  164. </template>
  165. </el-table-column>
  166. <el-table-column
  167. label="执行频率"
  168. min-width="80"
  169. property="execution_frequency"
  170. align="center"
  171. >
  172. <template slot-scope="scope">
  173. <span v-if="scope.row.parent_row == 0">{{
  174. scope.row.execution_frequency
  175. }}</span>
  176. </template>
  177. </el-table-column>
  178. <el-table-column
  179. label="提醒频率"
  180. min-width="80"
  181. property="execution_frequency"
  182. align="center"
  183. >
  184. <template slot-scope="scope">
  185. <span v-if="scope.row.frequency_type == 1">每次必推</span>
  186. <span v-if="scope.row.frequency_type == 2"
  187. >{{ scope.row.day_count }}天/1次</span
  188. >
  189. <span v-if="scope.row.frequency_type == 3"
  190. >每周{{ scope.row.week_day }}</span
  191. >
  192. </template>
  193. </el-table-column>
  194. </el-table>
  195. </el-col>
  196. </el-row>
  197. </el-form>
  198. </el-dialog>
  199. <el-dialog
  200. title="选择医嘱模板"
  201. :visible.sync="templateFormVisible"
  202. width="72%"
  203. :close-on-click-modal="false"
  204. >
  205. <el-row :gutter="20">
  206. <el-col :span="8">
  207. <el-table
  208. :data="adviceTemplates"
  209. ref="templatetable"
  210. border
  211. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  212. highlight-current-row
  213. @current-change="templateTableChange"
  214. style="width: 100%"
  215. >
  216. <el-table-column prop="name" label="模板名称"></el-table-column>
  217. </el-table>
  218. </el-col>
  219. <el-col :span="16">
  220. <el-table
  221. id="dialysis-update-select-template-table"
  222. :data="selectedTemp.list"
  223. border
  224. :span-method="spanselecttable"
  225. @select="selectAdvice"
  226. @selection-change="changeAdvice"
  227. @select-all="selectAllTemplateAdvice"
  228. row-key="row_key"
  229. ref="selecttemplatetable"
  230. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  231. style="width: 100%;margin-top: 10px;margin-bottom: 10px;"
  232. >
  233. <el-table-column type="selection" width="55"></el-table-column>
  234. <el-table-column
  235. label="医嘱内容"
  236. property="advice_name"
  237. style="word-break: keep-all;white-space:nowrap;"
  238. ></el-table-column>
  239. <el-table-column label="药品规格" property="advice_desc">
  240. <template slot-scope="scope">
  241. <span v-if="scope.row.advice_desc"
  242. >{{ scope.row.advice_desc
  243. }}{{ scope.row.drug_spec_unit }}</span
  244. >
  245. </template>
  246. </el-table-column>
  247. <el-table-column
  248. label="开药数量"
  249. min-width="80"
  250. property="prescribing_number"
  251. align="center"
  252. >
  253. <template slot-scope="scope">
  254. <span v-if="scope.row.prescribing_number != 0"
  255. >{{ scope.row.prescribing_number
  256. }}{{ scope.row.prescribing_number_unit }}</span
  257. >
  258. </template>
  259. </el-table-column>
  260. <el-table-column
  261. label="单次用量"
  262. min-width="80"
  263. property="single_dose"
  264. align="center"
  265. >
  266. <template slot-scope="scope">
  267. <span v-if="scope.row.single_dose != 0"
  268. >{{ scope.row.single_dose
  269. }}{{ scope.row.single_dose_unit }}</span
  270. >
  271. </template>
  272. </el-table-column>
  273. <el-table-column
  274. label="给药途径"
  275. min-width="80"
  276. property="delivery_way"
  277. align="center"
  278. >
  279. <template slot-scope="scope">
  280. <span v-if="scope.row.parent_row == 0">{{
  281. scope.row.delivery_way
  282. }}</span>
  283. </template>
  284. </el-table-column>
  285. <el-table-column
  286. label="执行频率"
  287. min-width="80"
  288. property="execution_frequency"
  289. align="center"
  290. >
  291. <template slot-scope="scope">
  292. <span v-if="scope.row.parent_row == 0">{{
  293. scope.row.execution_frequency
  294. }}</span>
  295. </template>
  296. </el-table-column>
  297. <el-table-column
  298. v-if="groupForm.advice_type == 1"
  299. label="提醒频率"
  300. min-width="80"
  301. align="center"
  302. >
  303. <template slot-scope="scope">
  304. <span v-if="scope.row.frequency_type == 1">每次必推</span>
  305. <span v-if="scope.row.frequency_type == 2"
  306. >{{ scope.row.day_count }}天/1次</span
  307. >
  308. <span v-if="scope.row.frequency_type == 3"
  309. >每周{{ scope.row.week_days }}</span
  310. >
  311. </template>
  312. </el-table-column>
  313. </el-table>
  314. </el-col>
  315. </el-row>
  316. <div slot="footer" class="dialog-footer">
  317. <el-button @click="cancleDialog()">取 消</el-button>
  318. <el-button
  319. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  320. type="primary"
  321. @click="newAddTempForm()"
  322. >保 存
  323. </el-button>
  324. </div>
  325. </el-dialog>
  326. <el-dialog
  327. title="选择医嘱模板"
  328. :visible.sync="oldTemplateFormVisible"
  329. width="700px"
  330. >
  331. <el-form ref="templateForm" :rules="templateRules" :model="templateForm">
  332. <el-row>
  333. <el-col :span="24">
  334. <el-form-item prop="id">
  335. <el-select
  336. v-model="templateForm.id"
  337. filterable
  338. clearable
  339. placeholder="请选择(输入可搜索)"
  340. style="width:100%"
  341. >
  342. <el-option
  343. v-for="item in adviceTemplates"
  344. :key="item.id"
  345. :label="item.name"
  346. :value="item.id"
  347. ></el-option>
  348. </el-select>
  349. </el-form-item>
  350. </el-col>
  351. </el-row>
  352. </el-form>
  353. <div slot="footer" class="dialog-footer">
  354. <el-button @click="templateFormVisible = false">取消</el-button>
  355. <el-button
  356. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  357. type="primary"
  358. @click="addTempForm('templateForm')"
  359. >保 存
  360. </el-button>
  361. </div>
  362. </el-dialog>
  363. <el-dialog
  364. :title="nameFormTitle"
  365. :visible.sync="nameFormVisible"
  366. width="800px"
  367. >
  368. <el-form
  369. ref="nameForm"
  370. :rules="nameRules"
  371. :model="nameForm"
  372. label-width="120px"
  373. >
  374. <el-row>
  375. <el-col :span="10">
  376. <el-form-item label="医嘱内容 :" required prop="advice_name">
  377. <el-select
  378. v-model="nameForm.advice_name"
  379. filterable
  380. clearable
  381. allow-create
  382. :disabled="isChild"
  383. placeholder="请选择(输入可搜索)"
  384. style="width:200px"
  385. @change="changeDrugName"
  386. >
  387. <el-option
  388. v-for="(item,index) in all_drug"
  389. :key="index"
  390. :label="item.drug_name"
  391. :value="item.drug_name"
  392. ></el-option>
  393. </el-select>
  394. </el-form-item>
  395. </el-col>
  396. <el-col :span="14">
  397. <!--<el-form-item label="规格 :" prop="advice_desc">-->
  398. <!--<el-input v-model="nameForm.advice_desc"></el-input>-->
  399. <!--</el-form-item>-->
  400. <el-form-item label="药品规格 :" prop="advice_desc">
  401. <el-col :span="10">
  402. <el-select
  403. v-model="nameForm.advice_desc"
  404. filterable
  405. clearable
  406. allow-create
  407. :disabled="isChild"
  408. placeholder="请选择(输入可搜索)"
  409. style="width:150px"
  410. @change="changeDrugDesc"
  411. >
  412. <el-option
  413. v-for="item in drugSpec"
  414. :key="item.id"
  415. :label="item.drug_spec"
  416. :value="item.drug_spec"
  417. ></el-option>
  418. </el-select>
  419. </el-col>
  420. <el-col class="line" :span="2">&nbsp;</el-col>
  421. <el-col :span="10">
  422. <el-select
  423. v-model="nameForm.drug_spec_unit"
  424. filterable
  425. clearable
  426. allow-create
  427. placeholder="选择"
  428. >
  429. <el-option
  430. v-for="item in unitsOption"
  431. :key="item.id"
  432. :label="item.name"
  433. :value="item.name"
  434. ></el-option>
  435. </el-select>
  436. </el-col>
  437. </el-form-item>
  438. </el-col>
  439. </el-row>
  440. <el-row>
  441. <el-col :span="12">
  442. <el-form-item label="单次用量 :" prop="single_dose">
  443. <el-col :span="8">
  444. <el-input v-model="nameForm.single_dose"></el-input>
  445. </el-col>
  446. <el-col class="line" :span="2">&nbsp;</el-col>
  447. <el-col :span="14">
  448. <el-select
  449. v-model="nameForm.single_dose_unit"
  450. filterable
  451. clearable
  452. allow-create
  453. placeholder="选择"
  454. >
  455. <el-option
  456. v-for="item in unitsOption"
  457. :key="item.id"
  458. :label="item.name"
  459. :value="item.name"
  460. ></el-option>
  461. </el-select>
  462. </el-col>
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="12">
  466. <el-form-item label="开药数量 :" prop="prescribing_number">
  467. <el-col :span="8">
  468. <el-input v-model="nameForm.prescribing_number"></el-input>
  469. </el-col>
  470. <el-col class="line" :span="2">&nbsp;</el-col>
  471. <el-col :span="14">
  472. <el-select
  473. v-model="nameForm.prescribing_number_unit"
  474. filterable
  475. clearable
  476. allow-create
  477. placeholder="选择"
  478. >
  479. <el-option
  480. v-for="item in unitsOption"
  481. :key="item.id"
  482. :label="item.name"
  483. :value="item.name"
  484. ></el-option>
  485. </el-select>
  486. </el-col>
  487. </el-form-item>
  488. </el-col>
  489. </el-row>
  490. <el-row>
  491. <el-col :span="12">
  492. <el-form-item label="给药途径 :" prop="delivery_way">
  493. <el-select
  494. v-model="nameForm.delivery_way"
  495. filterable
  496. clearable
  497. allow-create
  498. :disabled="isChild"
  499. placeholder="请选择(输入可搜索)"
  500. style="width:100%"
  501. >
  502. <el-option
  503. v-for="item in deliveryWayOptions"
  504. :key="item.id"
  505. :label="item.name"
  506. :value="item.name"
  507. ></el-option>
  508. </el-select>
  509. </el-form-item>
  510. </el-col>
  511. <el-col :span="12">
  512. <el-form-item label="执行频率 :" prop="execution_frequency">
  513. <el-select
  514. v-model="nameForm.execution_frequency"
  515. filterable
  516. clearable
  517. allow-create
  518. :disabled="isChild"
  519. placeholder="请选择(输入可搜索)"
  520. style="width:100%"
  521. >
  522. <el-option
  523. v-for="item in executionFrequencyOptions"
  524. :key="item.id"
  525. :label="item.name"
  526. :value="item.name"
  527. ></el-option>
  528. </el-select>
  529. </el-form-item>
  530. </el-col>
  531. <el-col :span="24" v-if="groupForm.advice_type == 1 && !isChild">
  532. <el-form-item label="周期提醒 :">
  533. <el-radio-group v-model="nameForm.frequency_type">
  534. <el-radio :label="1">每次必推</el-radio>
  535. <el-radio :label="2">天数频率</el-radio>
  536. <el-radio :label="3">星期频率</el-radio>
  537. </el-radio-group>
  538. </el-form-item>
  539. </el-col>
  540. <el-col :span="12" v-if="nameForm.frequency_type == 2">
  541. <el-form-item prop="day_count">
  542. <el-input
  543. style="width: 50px"
  544. v-model="nameForm.day_count"
  545. ></el-input
  546. >&nbsp; 天/一次
  547. </el-form-item>
  548. </el-col>
  549. <el-col :span="24" v-if="nameForm.frequency_type == 3">
  550. <el-form-item prop="weekday">
  551. <el-checkbox-group v-model="weeks">
  552. <el-checkbox label="周一" name="type"></el-checkbox>
  553. <el-checkbox label="周二" name="type"></el-checkbox>
  554. <el-checkbox label="周三" name="type"></el-checkbox>
  555. <el-checkbox label="周四" name="type"></el-checkbox>
  556. <el-checkbox label="周五" name="type"></el-checkbox>
  557. <el-checkbox label="周六" name="type"></el-checkbox>
  558. <el-checkbox label="周日" name="type"></el-checkbox>
  559. </el-checkbox-group>
  560. </el-form-item>
  561. </el-col>
  562. </el-row>
  563. </el-form>
  564. <div slot="footer" class="dialog-footer">
  565. <el-button @click="nameFormVisible = false">取消</el-button>
  566. <el-button
  567. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  568. type="primary"
  569. @click="submitNameForm('nameForm')"
  570. >保 存
  571. </el-button>
  572. </div>
  573. </el-dialog>
  574. </div>
  575. </template>
  576. <script>
  577. import {
  578. CreateNewDoctorAdvice,
  579. CreateNewGroupAdvice,
  580. DeleteNewDoctorAdvice,
  581. DeleteNewGroupAdvice,
  582. EditNewDoctorAdvice,
  583. getAdviceConfig,
  584. getDoctorAdviceList,
  585. StopDoctorAdvice
  586. } from "@/api/advice";
  587. import { getSelfMedicalList,getDrugDescByDrugName } from "@/api/drug/drug"
  588. export default {
  589. name: "EditGroupAdvice",
  590. data() {
  591. return {
  592. weeks: [],
  593. editRowKey: 0,
  594. templateFormVisible: false,
  595. oldTemplateFormVisible: false,
  596. groupEditFormVisible: false,
  597. nameFormVisible: false,
  598. groupSelectRow: null,
  599. nameFormTitle: "",
  600. isChild: false,
  601. isEdit: false,
  602. groupRules: {
  603. advice_type: [{ required: true, message: "请选择医嘱类型" }],
  604. advice_date: [{ required: true, message: "请选择医嘱时间" }],
  605. start_time: [{ required: true, message: "请选择开始时间" }],
  606. advice_name: [{ required: true, message: "请填写医嘱内容" }],
  607. advice_doctor: [{ required: true, message: "请选择开嘱医生" }]
  608. },
  609. nameRules: {
  610. advice_name: [{ required: true, message: "请填写医嘱内容" }]
  611. },
  612. templateRules: {
  613. id: [{ required: true, message: "请选择医嘱模板" }]
  614. },
  615. templateForm: { id: "" },
  616. nameForm: {
  617. advice_name: "",
  618. advice_desc: "",
  619. single_dose: "",
  620. single_dose_unit: "",
  621. drug_spec: "",
  622. drug_spec_unit: "",
  623. prescribing_number: "",
  624. prescribing_number_unit: "",
  625. delivery_way: "",
  626. execution_frequency: 0,
  627. isEdit: 0,
  628. index: 0,
  629. id: 0,
  630. children: [],
  631. way:"",
  632. drug_id:"",
  633. src_type:""
  634. },
  635. drugOptions: [],
  636. deliveryWayOptions: [],
  637. executionFrequencyOptions: [],
  638. adviceTemplates: [],
  639. submitGroupForm: {
  640. advice_type: "",
  641. advice_date: "",
  642. start_time: "",
  643. adviceNames: [],
  644. advice_doctor: "",
  645. remark: "",
  646. parent_id: 0
  647. },
  648. selectedTemp: { id: 0, name: "", org_id: 0, list: [], rows: [] },
  649. selectedTemplate: [],
  650. allSelectedTemplate: [],
  651. adviceTemplateMaps: {},
  652. medicals:[],
  653. drugSpec:[],
  654. all_drug:[],
  655. current_drug_name:"",
  656. current_drug_spec: "",
  657. drug_id: 0,
  658. src_type:""
  659. };
  660. },
  661. props: {
  662. patientID: 0,
  663. adviceType: 0,
  664. adminusername: "",
  665. rowKey: 0,
  666. weekList: [
  667. { id: 1, name: "周一" },
  668. { id: 2, name: "周二" },
  669. { id: 3, name: "周三" },
  670. { id: 4, name: "周四" },
  671. { id: 5, name: "周五" },
  672. { id: 6, name: "周六" },
  673. { id: 7, name: "周日" }
  674. ],
  675. weekday: [],
  676. groupFormVisible: false,
  677. groupForm: {
  678. advice_type: "",
  679. advice_date: "",
  680. start_time: "",
  681. adviceNames: [],
  682. advice_doctor: "",
  683. remark: "",
  684. parent_id: 0,
  685. remind: 0,
  686. frequency_type: 0,
  687. day_count: "",
  688. doctor: 0
  689. },
  690. adviceTypeOptions: {
  691. type: Array,
  692. default: function() {
  693. return [];
  694. }
  695. },
  696. unitsOption: {
  697. type: Array,
  698. default: function() {
  699. return [];
  700. }
  701. },
  702. adviceTableData: {
  703. type: Array,
  704. default: function() {
  705. return [];
  706. }
  707. }
  708. },
  709. methods: {
  710. openDeleteGroupAdvice() {
  711. if (this.groupSelectRow === null) {
  712. this.$message.error("未选择要删除的医嘱内容");
  713. return;
  714. }
  715. var content = "";
  716. if (this.groupSelectRow.children.length > 0) {
  717. content = "确认删除此医嘱内容,包括它的子药?";
  718. } else {
  719. content = "确认删除此医嘱内容?";
  720. }
  721. var isChild = !!this.groupSelectRow.parent_row;
  722. var title = isChild ? "删除子药内容" : "删除医嘱内容";
  723. var msg = isChild ? "确认删除此子药内容?" : content;
  724. this.$confirm(msg, title, {
  725. confirmButtonText: "确定",
  726. cancelButtonText: "取消",
  727. type: "warning"
  728. })
  729. .then(() => {
  730. let mode = "";
  731. if (this.groupForm.advice_type == 1) {
  732. mode = "1-6";
  733. if (this.groupForm.doctor != this.$store.getters.xt_user.user.id) {
  734. mode = "1-7";
  735. }
  736. } else if (this.groupForm.advice_type == 3) {
  737. mode = "4-1";
  738. if (this.groupForm.doctor != this.$store.getters.xt_user.user.id) {
  739. mode = "5-1";
  740. }
  741. }
  742. DeleteNewDoctorAdvice(this.groupSelectRow.id, mode).then(response => {
  743. if (response.data.state == 0) {
  744. this.$message.error(response.data.msg);
  745. return false;
  746. } else {
  747. this.$notify({
  748. title: "成功",
  749. message: "医嘱已经删除",
  750. type: "success",
  751. duration: 2000
  752. });
  753. var ale = this.groupForm.adviceNames.length;
  754. var atle = this.adviceTableData.length;
  755. for (let index = atle - 1; index >= 0; index--) {
  756. if (
  757. this.adviceTableData[index].parent_id ===
  758. this.groupSelectRow.id ||
  759. this.adviceTableData[index].id === this.groupSelectRow.id
  760. ) {
  761. this.adviceTableData.splice(index, 1);
  762. }
  763. }
  764. if (isChild) {
  765. for (const index in this.groupForm.adviceNames) {
  766. if (
  767. this.groupForm.adviceNames[index].row_key ==
  768. this.groupSelectRow.parent_row
  769. ) {
  770. for (const j in this.groupForm.adviceNames[index]
  771. .children) {
  772. if (
  773. this.groupForm.adviceNames[index].children[j].row_key ==
  774. this.groupSelectRow.row_key
  775. ) {
  776. this.groupForm.adviceNames[index].children.splice(j, 1);
  777. this.$set(
  778. this.groupForm.adviceNames,
  779. index,
  780. this.groupForm.adviceNames[index]
  781. );
  782. break;
  783. }
  784. }
  785. }
  786. }
  787. } else {
  788. for (const index in this.groupForm.adviceNames) {
  789. if (
  790. this.groupForm.adviceNames[index].row_key ==
  791. this.groupSelectRow.row_key
  792. ) {
  793. this.groupForm.adviceNames.splice(index, 1);
  794. break;
  795. }
  796. }
  797. }
  798. if (isChild) {
  799. for (const index in this.groupForm.adviceNames) {
  800. if (
  801. this.groupForm.adviceNames[index].row_key ==
  802. this.groupSelectRow.parent_row
  803. ) {
  804. for (const j in this.groupForm.adviceNames[index]
  805. .children) {
  806. if (
  807. this.groupForm.adviceNames[index].children[j].row_key ==
  808. this.groupSelectRow.row_key
  809. ) {
  810. this.groupForm.adviceNames[index].children.splice(j, 1);
  811. this.$set(
  812. this.groupForm.adviceNames,
  813. index,
  814. this.groupForm.adviceNames[index]
  815. );
  816. this.toggleRowExpansion();
  817. break;
  818. }
  819. }
  820. }
  821. }
  822. } else {
  823. for (const index in this.groupForm.adviceNames) {
  824. if (
  825. this.groupForm.adviceNames[index].row_key ==
  826. this.groupSelectRow.row_key
  827. ) {
  828. this.groupForm.adviceNames.splice(index, 1);
  829. this.toggleRowExpansion();
  830. break;
  831. }
  832. }
  833. }
  834. }
  835. });
  836. })
  837. .catch(() => {});
  838. },
  839. submitNameForm(formName) {
  840. if(this.src_type == ""){
  841. this.nameForm.way = 0
  842. this.nameForm.drug_id = 0
  843. }
  844. if(this.src_type == 2){ //自备药
  845. var arr = this.nameForm.advice_name.split("(自备药)")
  846. this.nameForm.advice_name = arr[0]
  847. }
  848. // if(typeof(this.nameForm.advice_name) == "string"){
  849. // this.nameForm.advice_name == this.nameForm.advice_name
  850. // }
  851. // if(typeof(this.nameForm.advice_name) == "number"){
  852. // var drug_name = ""
  853. // var name = ""
  854. // var way = 0
  855. // this.nameForm.drug_id = this.nameForm.advice_name
  856. // for(let i=0;i<this.medicals.length;i++){
  857. // if(this.nameForm.advice_name == this.medicals[i].id){
  858. // name = this.medicals[i].drug_name
  859. // way = this.medicals[i].way
  860. // }
  861. // }
  862. // if(way == 1){
  863. // drug_name = name
  864. // }
  865. // if(way == 2){
  866. // var arr = name.split("(自备药)")
  867. // drug_name = arr[0]
  868. // }
  869. // this.nameForm.advice_name = drug_name
  870. // this.nameForm.way = way
  871. // }
  872. var _this = this;
  873. this.$refs[formName].validate(valid => {
  874. if (valid) {
  875. if (_this.nameForm.isEdit) {
  876. var submitForm = null;
  877. if (!this.isChild) {
  878. submitForm = {
  879. advice_type: _this.groupForm.advice_type,
  880. advice_date: _this.groupForm.advice_date,
  881. start_time: _this.groupForm.start_time,
  882. advice_name: _this.nameForm.advice_name,
  883. advice_desc: _this.nameForm.advice_desc,
  884. single_dose: "" + _this.nameForm.single_dose,
  885. single_dose_unit: _this.nameForm.single_dose_unit,
  886. drug_spec: "" + _this.nameForm.drug_spec,
  887. drug_spec_unit: _this.nameForm.drug_spec_unit,
  888. prescribing_number: "" + _this.nameForm.prescribing_number,
  889. prescribing_number_unit: _this.nameForm.prescribing_number_unit,
  890. delivery_way: _this.nameForm.delivery_way,
  891. execution_frequency: _this.nameForm.execution_frequency,
  892. isEdit: 0,
  893. id: 0,
  894. advice_doctor: "",
  895. remark: _this.groupForm.remark,
  896. parent_id: _this.groupSelectRow.parent_id,
  897. groupno: _this.groupForm.groupno,
  898. frequency_type: _this.nameForm.frequency_type,
  899. day_count: _this.nameForm.day_count.toString(),
  900. week_days: this.weeks
  901. .filter(function(s) {
  902. return s && s.trim();
  903. })
  904. .join(",")
  905. };
  906. } else {
  907. submitForm = {
  908. advice_type: _this.groupForm.advice_type,
  909. advice_date: _this.groupForm.advice_date,
  910. start_time: _this.groupForm.start_time,
  911. advice_name: _this.nameForm.advice_name,
  912. advice_desc: _this.nameForm.advice_desc,
  913. single_dose: "" + _this.nameForm.single_dose,
  914. single_dose_unit: _this.nameForm.single_dose_unit,
  915. drug_spec: "" + _this.nameForm.drug_spec,
  916. drug_spec_unit: _this.nameForm.drug_spec_unit,
  917. prescribing_number: "" + _this.nameForm.prescribing_number,
  918. prescribing_number_unit: _this.nameForm.prescribing_number_unit,
  919. delivery_way: _this.nameForm.delivery_way,
  920. execution_frequency: _this.nameForm.execution_frequency,
  921. isEdit: 0,
  922. id: 0,
  923. advice_doctor: "",
  924. remark: _this.groupForm.remark,
  925. parent_id: _this.groupSelectRow.parent_id,
  926. groupno: _this.groupForm.groupno,
  927. frequency_type: 0,
  928. day_count: "0",
  929. week_days: ""
  930. };
  931. }
  932. let mode = "";
  933. if (_this.groupForm.advice_type == 1) {
  934. // if(_this.nameForm.)
  935. mode = "1-3";
  936. if (
  937. _this.groupForm.doctor != _this.$store.getters.xt_user.user.id
  938. ) {
  939. mode = "1-4";
  940. }
  941. } else if (_this.groupForm.advice_type == 3) {
  942. mode = "2-1";
  943. if (
  944. _this.groupForm.doctor != _this.$store.getters.xt_user.user.id
  945. ) {
  946. mode = "3-1";
  947. }
  948. }
  949. EditNewDoctorAdvice(
  950. this.patientID,
  951. this.groupSelectRow.id,
  952. submitForm,
  953. mode
  954. ).then(response => {
  955. if (response.data.state == 0) {
  956. this.$message.error(response.data.msg);
  957. return false;
  958. } else {
  959. this.$notify({
  960. title: "成功",
  961. message: "修改医嘱成功",
  962. type: "success",
  963. duration: 2000
  964. });
  965. var ale = _this.groupForm.adviceNames.length;
  966. var atle = _this.adviceTableData.length;
  967. for (let index = 0; index < atle; index++) {
  968. if (
  969. _this.groupSelectRow.id == _this.adviceTableData[index].id
  970. ) {
  971. var advice = response.data.data.advice;
  972. _this.adviceTableData[index].drug_spec = advice.drug_spec;
  973. _this.adviceTableData[index].drug_spec_unit =
  974. advice.drug_spec_unit;
  975. _this.adviceTableData[index].start_time = advice.start_time;
  976. _this.adviceTableData[index].advice_name =
  977. advice.advice_name;
  978. _this.adviceTableData[index].advice_desc =
  979. advice.advice_desc;
  980. _this.adviceTableData[index].single_dose =
  981. advice.single_dose;
  982. _this.adviceTableData[index].single_dose_unit =
  983. advice.single_dose_unit;
  984. _this.adviceTableData[index].delivery_way =
  985. advice.delivery_way;
  986. _this.adviceTableData[index].execution_frequency =
  987. advice.execution_frequency;
  988. _this.adviceTableData[index].prescribing_number =
  989. advice.prescribing_number;
  990. _this.adviceTableData[index].prescribing_number_unit =
  991. advice.prescribing_number_unit;
  992. _this.adviceTableData[index].frequency_type =
  993. advice.frequency_type;
  994. _this.adviceTableData[index].day_count = advice.day_count;
  995. _this.adviceTableData[index].week_day = advice.week_day;
  996. break;
  997. }
  998. }
  999. if (_this.isChild) {
  1000. for (let index = 0; index < ale; index++) {
  1001. if (
  1002. _this.groupSelectRow.parent_row ==
  1003. _this.groupForm.adviceNames[index].row_key
  1004. ) {
  1005. var cle =
  1006. _this.groupForm.adviceNames[index].children.length;
  1007. var children =
  1008. _this.groupForm.adviceNames[index].children;
  1009. for (let j = 0; j < ale; j++) {
  1010. if (
  1011. _this.groupSelectRow.row_key == children[j].row_key
  1012. ) {
  1013. _this.groupForm.adviceNames[index].children[
  1014. j
  1015. ].advice_name = _this.nameForm.advice_name;
  1016. _this.groupForm.adviceNames[index].children[
  1017. j
  1018. ].advice_desc = _this.nameForm.advice_desc;
  1019. _this.groupForm.adviceNames[index].children[
  1020. j
  1021. ].single_dose = "" + _this.nameForm.single_dose;
  1022. _this.groupForm.adviceNames[index].children[
  1023. j
  1024. ].single_dose_unit = _this.nameForm.single_dose_unit;
  1025. _this.groupForm.adviceNames[index].children[
  1026. j
  1027. ].drug_spec = "" + _this.nameForm.drug_spec;
  1028. _this.groupForm.adviceNames[index].children[
  1029. j
  1030. ].drug_spec_unit = _this.nameForm.drug_spec_unit;
  1031. _this.groupForm.adviceNames[index].children[
  1032. j
  1033. ].prescribing_number =
  1034. "" + _this.nameForm.prescribing_number;
  1035. _this.groupForm.adviceNames[index].children[
  1036. j
  1037. ].prescribing_number_unit =
  1038. _this.nameForm.prescribing_number_unit;
  1039. _this.groupForm.adviceNames[index].children[
  1040. j
  1041. ].delivery_way = _this.nameForm.delivery_way;
  1042. _this.groupForm.adviceNames[index].children[
  1043. j
  1044. ].execution_frequency =
  1045. _this.nameForm.execution_frequency;
  1046. _this.$set(
  1047. _this.groupForm.adviceNames[index].children,
  1048. j,
  1049. _this.groupForm.adviceNames[index].children[j]
  1050. );
  1051. break;
  1052. }
  1053. }
  1054. }
  1055. }
  1056. } else {
  1057. for (let index = 0; index < ale; index++) {
  1058. if (
  1059. _this.groupSelectRow.row_key ==
  1060. _this.groupForm.adviceNames[index].row_key
  1061. ) {
  1062. _this.groupForm.adviceNames[index].advice_name =
  1063. _this.nameForm.advice_name;
  1064. _this.groupForm.adviceNames[index].advice_desc =
  1065. "" + _this.nameForm.advice_desc;
  1066. _this.groupForm.adviceNames[index].single_dose =
  1067. "" + _this.nameForm.single_dose;
  1068. _this.groupForm.adviceNames[index].single_dose_unit =
  1069. _this.nameForm.single_dose_unit;
  1070. _this.groupForm.adviceNames[index].drug_spec =
  1071. "" + _this.nameForm.drug_spec;
  1072. _this.groupForm.adviceNames[index].drug_spec_unit =
  1073. _this.nameForm.drug_spec_unit;
  1074. _this.groupForm.adviceNames[index].prescribing_number =
  1075. "" + _this.nameForm.prescribing_number;
  1076. _this.groupForm.adviceNames[
  1077. index
  1078. ].prescribing_number_unit =
  1079. _this.nameForm.prescribing_number_unit;
  1080. _this.groupForm.adviceNames[index].delivery_way =
  1081. _this.nameForm.delivery_way;
  1082. _this.groupForm.adviceNames[index].execution_frequency =
  1083. _this.nameForm.execution_frequency;
  1084. _this.groupForm.adviceNames[index].frequency_type =
  1085. _this.nameForm.frequency_type;
  1086. _this.groupForm.adviceNames[index].day_count =
  1087. _this.nameForm.day_count;
  1088. _this.groupForm.adviceNames[
  1089. index
  1090. ].week_day = _this.weeks.join(",");
  1091. console.log(_this.weeks);
  1092. _this.$set(
  1093. _this.groupForm.adviceNames,
  1094. index,
  1095. _this.groupForm.adviceNames[index]
  1096. );
  1097. break;
  1098. }
  1099. }
  1100. }
  1101. }
  1102. });
  1103. // this.weeks = []
  1104. } else {
  1105. if (_this.isChild) {
  1106. var submitForm = {
  1107. advice_type: _this.groupForm.advice_type,
  1108. advice_date: _this.groupForm.advice_date,
  1109. start_time: _this.groupForm.start_time,
  1110. advice_name: _this.nameForm.advice_name,
  1111. advice_desc: _this.nameForm.advice_desc,
  1112. single_dose: "" + _this.nameForm.single_dose,
  1113. single_dose_unit: _this.nameForm.single_dose_unit,
  1114. drug_spec: "" + _this.nameForm.drug_spec,
  1115. drug_spec_unit: _this.nameForm.drug_spec_unit,
  1116. prescribing_number: "" + _this.nameForm.prescribing_number,
  1117. prescribing_number_unit: _this.nameForm.prescribing_number_unit,
  1118. delivery_way: _this.nameForm.delivery_way,
  1119. execution_frequency: _this.nameForm.execution_frequency,
  1120. isEdit: 0,
  1121. id: 0,
  1122. advice_doctor: "",
  1123. remark: _this.groupForm.remark,
  1124. parent_id: _this.groupSelectRow.id,
  1125. groupno: _this.groupForm.groupno
  1126. };
  1127. let mode = "";
  1128. if (_this.groupForm.advice_type == 1) {
  1129. mode = "1-2";
  1130. } else {
  1131. mode = "1-1";
  1132. }
  1133. CreateNewDoctorAdvice(this.patientID, submitForm, mode).then(
  1134. response => {
  1135. if (response.data.state == 0) {
  1136. this.$message.error(response.data.msg);
  1137. return false;
  1138. } else {
  1139. this.$notify({
  1140. title: "成功",
  1141. message: "新增医嘱成功",
  1142. type: "success",
  1143. duration: 2000
  1144. });
  1145. if (
  1146. _this.adviceType == _this.groupForm.advice_type ||
  1147. _this.adviceType == 0
  1148. ) {
  1149. var spliceIndex = -1;
  1150. for (
  1151. let index = _this.adviceTableData.length - 1;
  1152. ;
  1153. index--
  1154. ) {
  1155. if (
  1156. _this.adviceTableData[index].parent_id ===
  1157. _this.groupSelectRow.id
  1158. ) {
  1159. spliceIndex = index;
  1160. break;
  1161. } else if (
  1162. _this.adviceTableData[index].id ===
  1163. _this.groupSelectRow.id
  1164. ) {
  1165. spliceIndex = index;
  1166. break;
  1167. }
  1168. }
  1169. if (spliceIndex > -1) {
  1170. spliceIndex += 1;
  1171. if (spliceIndex === _this.adviceTableData.length) {
  1172. _this.adviceTableData.push(response.data.data.advice);
  1173. } else {
  1174. _this.adviceTableData.splice(
  1175. spliceIndex,
  1176. 0,
  1177. response.data.data.advice
  1178. );
  1179. }
  1180. }
  1181. var ale = _this.groupForm.adviceNames.length;
  1182. for (let index = 0; index < ale; index++) {
  1183. if (
  1184. _this.nameForm.parent_row ==
  1185. _this.groupForm.adviceNames[index].row_key
  1186. ) {
  1187. _this.editRowKey++;
  1188. _this.nameForm.row_key = _this.editRowKey;
  1189. _this.groupForm.adviceNames[index].children.push(
  1190. _this.nameForm
  1191. );
  1192. _this.$set(
  1193. _this.groupForm.adviceNames,
  1194. index,
  1195. _this.groupForm.adviceNames[index]
  1196. );
  1197. break;
  1198. }
  1199. }
  1200. }
  1201. // _this.resetForm(formName);
  1202. return false;
  1203. }
  1204. }
  1205. );
  1206. } else {
  1207. _this.nameForm.week_days = this.weeks
  1208. .filter(function(s) {
  1209. return s && s.trim();
  1210. })
  1211. .join(",");
  1212. _this.submitGroupForm = {
  1213. advice_type: _this.groupForm.advice_type,
  1214. advice_date: _this.groupForm.advice_date,
  1215. start_time: _this.groupForm.start_time,
  1216. adviceNames: [
  1217. {
  1218. advice_name: _this.nameForm.advice_name,
  1219. advice_desc: _this.nameForm.advice_desc,
  1220. single_dose: "" + _this.nameForm.single_dose,
  1221. single_dose_unit: _this.nameForm.single_dose_unit,
  1222. drug_spec: "" + _this.nameForm.drug_spec,
  1223. drug_spec_unit: _this.nameForm.drug_spec_unit,
  1224. prescribing_number: "" + _this.nameForm.prescribing_number,
  1225. prescribing_number_unit:
  1226. _this.nameForm.prescribing_number_unit,
  1227. delivery_way: _this.nameForm.delivery_way,
  1228. execution_frequency: _this.nameForm.execution_frequency,
  1229. template_id:
  1230. "D" + new Date().getTime() + this.getRandValue(),
  1231. frequency_type: _this.nameForm.frequency_type,
  1232. day_count: _this.nameForm.day_count.toString(),
  1233. week_days: _this.nameForm.week_days,
  1234. isEdit: 0,
  1235. id: 0,
  1236. children: [],
  1237. parent_row: 0
  1238. }
  1239. ],
  1240. advice_doctor: "",
  1241. remark: _this.groupForm.remark,
  1242. parent_id: 0
  1243. };
  1244. console.log(_this.groupForm.advice_type);
  1245. let mode = "";
  1246. if (_this.groupForm.advice_type == 1) {
  1247. mode = "1-2";
  1248. } else {
  1249. mode = "1-1";
  1250. }
  1251. CreateNewGroupAdvice(
  1252. _this.patientID,
  1253. _this.groupForm.groupno,
  1254. _this.submitGroupForm,
  1255. mode
  1256. ).then(response => {
  1257. if (response.data.state == 0) {
  1258. _this.$message.error(response.data.msg);
  1259. return false;
  1260. } else {
  1261. _this.$notify({
  1262. title: "成功",
  1263. message: "新增成功",
  1264. type: "success",
  1265. duration: 2000
  1266. });
  1267. this.weeks = [];
  1268. if (
  1269. _this.adviceType == _this.groupForm.advice_type ||
  1270. _this.adviceType == 0
  1271. ) {
  1272. // var alen = response.data.data.advices.length
  1273. // for (let index = alen-1; index >=0; index--) {
  1274. // this.adviceTableData.unshift(response.data.data.advices[index]);
  1275. // }
  1276. // for (const index in response.data.data.advices) {
  1277. // _this.adviceTableData.unshift(response.data.data.advices[index]);
  1278. // }
  1279. var groups = response.data.data.advices;
  1280. var childMap = {};
  1281. for (const index in groups) {
  1282. if (groups[index].parent_id == 0) {
  1283. continue;
  1284. }
  1285. if (groups[index].parent_id in childMap === false) {
  1286. childMap[groups[index].parent_id] = [];
  1287. }
  1288. childMap[groups[index].parent_id].push(groups[index]);
  1289. }
  1290. var parentArr = [];
  1291. for (const index in groups) {
  1292. if (groups[index].parent_id > 0) {
  1293. continue;
  1294. }
  1295. parentArr.push(groups[index]);
  1296. }
  1297. var groupNo = groups[0].groupno;
  1298. var newData = { groupNo: parentArr };
  1299. for (const index in _this.adviceTableData) {
  1300. if (_this.adviceTableData[index].groupno == groupNo) {
  1301. for (const i in parentArr) {
  1302. if (parentArr[i].id in childMap) {
  1303. for (const j in childMap[parentArr[i].id]) {
  1304. _this.adviceTableData.splice(
  1305. index,
  1306. 0,
  1307. childMap[parentArr[i].id][j]
  1308. );
  1309. }
  1310. }
  1311. _this.adviceTableData.splice(index, 0, parentArr[i]);
  1312. }
  1313. break;
  1314. }
  1315. }
  1316. for (const index in groups) {
  1317. if (groups[index].parent_id > 0) {
  1318. continue;
  1319. }
  1320. _this.editRowKey++;
  1321. var item = {
  1322. advice_name: groups[index].advice_name,
  1323. advice_desc: groups[index].advice_desc,
  1324. single_dose: "" + groups[index].single_dose,
  1325. single_dose_unit: groups[index].single_dose_unit,
  1326. drug_spec: "" + groups[index].drug_spec,
  1327. drug_spec_unit: groups[index].drug_spec_unit,
  1328. prescribing_number:
  1329. "" + groups[index].prescribing_number,
  1330. prescribing_number_unit:
  1331. groups[index].prescribing_number_unit,
  1332. delivery_way: groups[index].delivery_way,
  1333. execution_frequency: groups[index].execution_frequency,
  1334. frequency_type: groups[index].frequency_type,
  1335. day_count: groups[index].day_count,
  1336. week_day: groups[index].week_day,
  1337. isEdit: 0,
  1338. index: 0,
  1339. id: groups[index].id,
  1340. children: [],
  1341. parent_row: 0,
  1342. row_key: _this.editRowKey
  1343. };
  1344. if (item.id in childMap) {
  1345. for (const key in childMap[item.id]) {
  1346. _this.editRowKey++;
  1347. var child = {
  1348. advice_name: childMap[item.id][key].advice_name,
  1349. advice_desc: childMap[item.id][key].advice_desc,
  1350. single_dose:
  1351. "" + childMap[item.id][key].single_dose,
  1352. single_dose_unit:
  1353. childMap[item.id][key].single_dose_unit,
  1354. drug_spec: "" + childMap[item.id][key].drug_spec,
  1355. drug_spec_unit:
  1356. childMap[item.id][key].drug_spec_unit,
  1357. prescribing_number:
  1358. "" + childMap[item.id][key].prescribing_number,
  1359. prescribing_number_unit:
  1360. childMap[item.id][key].prescribing_number_unit,
  1361. delivery_way: childMap[item.id][key].delivery_way,
  1362. execution_frequency:
  1363. childMap[item.id][key].execution_frequency,
  1364. isEdit: 0,
  1365. index: 0,
  1366. id: childMap[item.id][key].id,
  1367. children: [],
  1368. parent_row: item.row_key,
  1369. row_key: _this.editRowKey
  1370. };
  1371. item.children.push(child);
  1372. }
  1373. _this.$set(item, "children", item.children);
  1374. }
  1375. _this.groupForm.adviceNames.unshift(item);
  1376. }
  1377. }
  1378. _this.resetForm(formName);
  1379. return false;
  1380. }
  1381. });
  1382. }
  1383. }
  1384. _this.nameFormVisible = false;
  1385. }
  1386. });
  1387. },
  1388. getRandValue() {
  1389. var charactors = "1234567890";
  1390. var value = "",
  1391. i;
  1392. for (let j = 1; j <= 4; j++) {
  1393. i = parseInt(10 * Math.random());
  1394. value = value + charactors.charAt(i);
  1395. }
  1396. return value;
  1397. },
  1398. openGroupChild() {
  1399. if (this.groupSelectRow === null) {
  1400. this.$message.error("未选择医嘱内容,无法添加子药");
  1401. return;
  1402. } else if (this.groupSelectRow.parent_row > 0) {
  1403. this.$notify.error({
  1404. title: "错误",
  1405. message: "子药不能添加子药"
  1406. });
  1407. return;
  1408. }
  1409. this.nameForm = {
  1410. advice_name: "",
  1411. advice_desc: "",
  1412. single_dose: "",
  1413. single_dose_unit: "",
  1414. drug_spec: "",
  1415. drug_spec_unit: "",
  1416. prescribing_number: "",
  1417. prescribing_number_unit: "",
  1418. delivery_way: this.groupSelectRow.delivery_way,
  1419. execution_frequency: this.groupSelectRow.execution_frequency,
  1420. isEdit: 0,
  1421. index: 0,
  1422. children: [],
  1423. parent_row: this.groupSelectRow.row_key,
  1424. id: 0
  1425. };
  1426. this.isChild = true;
  1427. this.nameFormVisible = true;
  1428. this.nameFormTitle = "添加子药内容";
  1429. },
  1430. openGroupAdvice(isEdit) {
  1431. this.isChild = false;
  1432. if (isEdit) {
  1433. if (this.groupSelectRow === null) {
  1434. this.$message.error("未选择要修改的医嘱内容");
  1435. return;
  1436. }
  1437. if (this.groupSelectRow.parent_row) {
  1438. this.isChild = true;
  1439. }
  1440. this.nameForm = {
  1441. advice_name: this.groupSelectRow.advice_name,
  1442. advice_desc: this.groupSelectRow.advice_desc,
  1443. single_dose: this.groupSelectRow.single_dose,
  1444. single_dose_unit: this.groupSelectRow.single_dose_unit,
  1445. drug_spec: this.groupSelectRow.drug_spec,
  1446. drug_spec_unit: this.groupSelectRow.drug_spec_unit,
  1447. prescribing_number: this.groupSelectRow.prescribing_number,
  1448. prescribing_number_unit: this.groupSelectRow.prescribing_number_unit,
  1449. delivery_way: this.isChild ? "" : this.groupSelectRow.delivery_way,
  1450. execution_frequency: this.isChild
  1451. ? ""
  1452. : this.groupSelectRow.execution_frequency,
  1453. isEdit: 1,
  1454. index: this.groupSelectRow.index,
  1455. id: this.groupSelectRow.id,
  1456. children: [],
  1457. parent_row: this.groupSelectRow.parent_row,
  1458. day_count: this.groupSelectRow.day_count,
  1459. week_days: this.groupSelectRow.week_day,
  1460. frequency_type: this.groupSelectRow.frequency_type
  1461. };
  1462. if (!this.isChild) {
  1463. this.weeks = this.groupSelectRow.week_day.split(",");
  1464. }
  1465. this.nameFormTitle = "修改医嘱内容";
  1466. } else {
  1467. this.nameForm = {
  1468. advice_name: "",
  1469. advice_desc: "",
  1470. single_dose: "",
  1471. single_dose_unit: "",
  1472. drug_spec: "",
  1473. drug_spec_unit: "",
  1474. prescribing_number: "",
  1475. prescribing_number_unit: "",
  1476. delivery_way: "",
  1477. execution_frequency: "",
  1478. template_id: "",
  1479. isEdit: 0,
  1480. index: 0,
  1481. id: 0,
  1482. children: [],
  1483. parent_row: 0,
  1484. day_count: "",
  1485. week_days: "",
  1486. frequency_type: 0
  1487. };
  1488. this.nameFormTitle = "新增医嘱内容";
  1489. }
  1490. this.nameFormVisible = true;
  1491. },
  1492. changeAdvice(selection) {
  1493. this.selectedTemplate = selection;
  1494. },
  1495. selectAdvice(selection, row) {
  1496. // this.selectedTemplate = [];
  1497. var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id]
  1498. .DoctorAdviceTemplate;
  1499. for (let y = 0; y < adviceArray.length; y++) {
  1500. adviceArray[y].selection = false;
  1501. }
  1502. if (selection.length > 0) {
  1503. for (let y = 0; y < adviceArray.length; y++) {
  1504. for (let i = 0; i < selection.length; i++) {
  1505. if (adviceArray[y].id == selection[i].advice_id) {
  1506. adviceArray[y].selection = true;
  1507. }
  1508. }
  1509. }
  1510. }
  1511. if (row.children.length > 0) {
  1512. for (const index in row.children) {
  1513. this.$refs.selecttemplatetable.toggleRowSelection(
  1514. row.children[index]
  1515. );
  1516. }
  1517. }
  1518. // 下面两步的作用是为了上选中的数据的输出顺序不变
  1519. for (const index in this.selectedTemp.list) {
  1520. this.$refs.selecttemplatetable.toggleRowSelection(
  1521. this.selectedTemp.list[index]
  1522. );
  1523. if (this.selectedTemp.list[index].children.length > 0) {
  1524. for (const j in this.selectedTemp.list[index].children) {
  1525. this.$refs.selecttemplatetable.toggleRowSelection(
  1526. this.selectedTemp.list[index].children[j]
  1527. );
  1528. }
  1529. }
  1530. }
  1531. for (const index in this.selectedTemp.list) {
  1532. this.$refs.selecttemplatetable.toggleRowSelection(
  1533. this.selectedTemp.list[index]
  1534. );
  1535. if (this.selectedTemp.list[index].children.length > 0) {
  1536. for (const j in this.selectedTemp.list[index].children) {
  1537. this.$refs.selecttemplatetable.toggleRowSelection(
  1538. this.selectedTemp.list[index].children[j]
  1539. );
  1540. }
  1541. }
  1542. }
  1543. },
  1544. spanselecttable({ row, column, rowIndex, columnIndex }) {
  1545. if (columnIndex == 0) {
  1546. const _row = this.selectedTemp.rows[rowIndex];
  1547. const _col = _row > 0 ? 1 : 0;
  1548. return {
  1549. rowspan: _row,
  1550. colspan: _col
  1551. };
  1552. }
  1553. },
  1554. calcselectedTemp() {
  1555. var rowKeys = 0;
  1556. for (const index in this.selectedTemp.list) {
  1557. var pkey = rowKeys;
  1558. this.selectedTemp.rows[rowKeys] = 1;
  1559. if (this.selectedTemp.list[index].children.length > 0) {
  1560. for (const childindex in this.selectedTemp.list[index].children) {
  1561. rowKeys++;
  1562. this.selectedTemp.rows[pkey] += 1;
  1563. this.selectedTemp.rows[rowKeys] = 0;
  1564. }
  1565. }
  1566. rowKeys++;
  1567. this.$nextTick(function() {
  1568. if (this.selectedTemp.list[index].selection) {
  1569. this.$refs.selecttemplatetable.toggleRowSelection(
  1570. this.selectedTemp.list[index]
  1571. );
  1572. }
  1573. });
  1574. }
  1575. },
  1576. templateTableChange(currentRow, oldCurrentRow) {
  1577. this.selectedTemp = { id: 0, name: "", org_id: 0, list: [], rows: [] };
  1578. if (currentRow == null) {
  1579. return false;
  1580. }
  1581. this.selectedTemp.id = currentRow.id;
  1582. this.selectedTemp.name = currentRow.name;
  1583. this.selectedTemp.org_id = currentRow.org_id;
  1584. if (this.selectedTemp.id in this.adviceTemplateMaps) {
  1585. var mapid = this.selectedTemp.id;
  1586. var thisRowKey = 0;
  1587. for (const index in this.adviceTemplateMaps[mapid]
  1588. .DoctorAdviceTemplate) {
  1589. thisRowKey++;
  1590. var item = {
  1591. advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1592. index
  1593. ].advice_name,
  1594. advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1595. index
  1596. ].advice_desc,
  1597. single_dose:
  1598. "" +
  1599. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  1600. .single_dose,
  1601. single_dose_unit: this.adviceTemplateMaps[mapid]
  1602. .DoctorAdviceTemplate[index].single_dose_unit,
  1603. drug_spec:
  1604. "" +
  1605. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  1606. .drug_spec,
  1607. drug_spec_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1608. index
  1609. ].drug_spec_unit,
  1610. prescribing_number:
  1611. "" +
  1612. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  1613. .prescribing_number,
  1614. prescribing_number_unit: this.adviceTemplateMaps[mapid]
  1615. .DoctorAdviceTemplate[index].prescribing_number_unit,
  1616. delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1617. index
  1618. ].delivery_way,
  1619. execution_frequency: this.adviceTemplateMaps[mapid]
  1620. .DoctorAdviceTemplate[index].execution_frequency,
  1621. advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1622. index
  1623. ].id,
  1624. selection: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1625. index
  1626. ].selection,
  1627. isEdit: 0,
  1628. id: 0,
  1629. children: [],
  1630. parent_row: 0,
  1631. row_key: thisRowKey,
  1632. day_count: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1633. index
  1634. ].day_count,
  1635. week_days: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1636. index
  1637. ].week_days,
  1638. frequency_type: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1639. index
  1640. ].frequency_type
  1641. };
  1642. if (
  1643. "children" in
  1644. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index] &&
  1645. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].children
  1646. .length > 0
  1647. ) {
  1648. var parentRow = thisRowKey;
  1649. var children = this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  1650. index
  1651. ].children;
  1652. for (const key in children) {
  1653. thisRowKey++;
  1654. var child = {
  1655. advice_id: children[key].id,
  1656. advice_name: children[key].advice_name,
  1657. advice_desc: children[key].advice_desc,
  1658. single_dose: "" + children[key].single_dose,
  1659. single_dose_unit: children[key].single_dose_unit,
  1660. drug_spec: "" + children[key].drug_spec,
  1661. drug_spec_unit: children[key].drug_spec_unit,
  1662. prescribing_number: "" + children[key].prescribing_number,
  1663. prescribing_number_unit: children[key].prescribing_number_unit,
  1664. delivery_way: children[key].delivery_way,
  1665. execution_frequency: children[key].execution_frequency,
  1666. isEdit: 0,
  1667. id: 0,
  1668. children: [],
  1669. parent_row: parentRow,
  1670. row_key: thisRowKey
  1671. };
  1672. item.children.push(child);
  1673. }
  1674. this.$set(item, "children", item.children);
  1675. }
  1676. this.selectedTemp.list.unshift(item);
  1677. }
  1678. }
  1679. },
  1680. newAddTempForm() {
  1681. this.allSelectedTemplate = [];
  1682. var thisRowKey = 0;
  1683. for (const indexs in this.adviceTemplateMaps) {
  1684. const adviceTemplate = this.adviceTemplateMaps[indexs];
  1685. for (const index in adviceTemplate.DoctorAdviceTemplate) {
  1686. if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
  1687. thisRowKey++;
  1688. var item = {
  1689. advice_name:
  1690. adviceTemplate.DoctorAdviceTemplate[index].advice_name,
  1691. advice_desc:
  1692. adviceTemplate.DoctorAdviceTemplate[index].advice_desc,
  1693. single_dose:
  1694. "" + adviceTemplate.DoctorAdviceTemplate[index].single_dose,
  1695. single_dose_unit:
  1696. adviceTemplate.DoctorAdviceTemplate[index].single_dose_unit,
  1697. drug_spec:
  1698. "" + adviceTemplate.DoctorAdviceTemplate[index].drug_spec,
  1699. drug_spec_unit:
  1700. adviceTemplate.DoctorAdviceTemplate[index].drug_spec_unit,
  1701. prescribing_number:
  1702. "" +
  1703. adviceTemplate.DoctorAdviceTemplate[index].prescribing_number,
  1704. prescribing_number_unit:
  1705. adviceTemplate.DoctorAdviceTemplate[index]
  1706. .prescribing_number_unit,
  1707. delivery_way:
  1708. adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
  1709. execution_frequency:
  1710. adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
  1711. advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
  1712. selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
  1713. day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
  1714. frequency_type:
  1715. adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
  1716. week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
  1717. template_id: "T" + adviceTemplate.DoctorAdviceTemplate[index].id,
  1718. isEdit: 0,
  1719. id: 0,
  1720. children: [],
  1721. parent_row: 0,
  1722. row_key: thisRowKey
  1723. };
  1724. if (
  1725. "children" in adviceTemplate.DoctorAdviceTemplate[index] &&
  1726. adviceTemplate.DoctorAdviceTemplate[index].children.length > 0
  1727. ) {
  1728. var parentRow = thisRowKey;
  1729. var children =
  1730. adviceTemplate.DoctorAdviceTemplate[index].children;
  1731. for (const key in children) {
  1732. thisRowKey++;
  1733. var child = {
  1734. advice_id: children[key].id,
  1735. advice_name: children[key].advice_name,
  1736. advice_desc: children[key].advice_desc,
  1737. single_dose: "" + children[key].single_dose,
  1738. single_dose_unit: children[key].single_dose_unit,
  1739. drug_spec: "" + children[key].drug_spec,
  1740. drug_spec_unit: children[key].drug_spec_unit,
  1741. prescribing_number: "" + children[key].prescribing_number,
  1742. prescribing_number_unit:
  1743. children[key].prescribing_number_unit,
  1744. delivery_way: children[key].delivery_way,
  1745. execution_frequency: children[key].execution_frequency,
  1746. isEdit: 0,
  1747. id: 0,
  1748. children: [],
  1749. parent_row: parentRow,
  1750. row_key: thisRowKey
  1751. };
  1752. item.children.push(child);
  1753. this.allSelectedTemplate.unshift(child);
  1754. }
  1755. this.$set(item, "children", item.children);
  1756. }
  1757. this.allSelectedTemplate.unshift(item);
  1758. adviceTemplate.DoctorAdviceTemplate[index].selection = false;
  1759. }
  1760. }
  1761. }
  1762. var childMap = {};
  1763. for (const index in this.allSelectedTemplate) {
  1764. if (this.allSelectedTemplate[index].parent_row > 0) {
  1765. if (!(this.allSelectedTemplate[index].parent_row in childMap)) {
  1766. childMap[this.allSelectedTemplate[index].parent_row] = [];
  1767. }
  1768. childMap[this.allSelectedTemplate[index].parent_row].push(
  1769. this.allSelectedTemplate[index]
  1770. );
  1771. }
  1772. }
  1773. this.submitGroupForm = {
  1774. advice_type: this.groupForm.advice_type,
  1775. advice_date: this.groupForm.advice_date,
  1776. start_time: this.groupForm.start_time,
  1777. adviceNames: [],
  1778. advice_doctor: "",
  1779. remark: this.groupForm.remark,
  1780. parent_id: 0
  1781. };
  1782. for (const index in this.allSelectedTemplate) {
  1783. if (this.allSelectedTemplate[index].parent_row > 0) {
  1784. continue;
  1785. }
  1786. this.editRowKey++;
  1787. var item = {
  1788. advice_name: this.allSelectedTemplate[index].advice_name,
  1789. advice_desc: this.allSelectedTemplate[index].advice_desc,
  1790. single_dose: "" + this.allSelectedTemplate[index].single_dose,
  1791. single_dose_unit: this.allSelectedTemplate[index].single_dose_unit,
  1792. drug_spec: "" + this.allSelectedTemplate[index].drug_spec,
  1793. drug_spec_unit: this.allSelectedTemplate[index].drug_spec_unit,
  1794. prescribing_number:
  1795. "" + this.allSelectedTemplate[index].prescribing_number,
  1796. prescribing_number_unit: this.allSelectedTemplate[index]
  1797. .prescribing_number_unit,
  1798. delivery_way: this.allSelectedTemplate[index].delivery_way,
  1799. execution_frequency: this.allSelectedTemplate[index]
  1800. .execution_frequency,
  1801. day_count: this.allSelectedTemplate[index].day_count.toString(),
  1802. frequency_type: this.allSelectedTemplate[index].frequency_type,
  1803. week_days: this.allSelectedTemplate[index].week_days,
  1804. template_id: this.allSelectedTemplate[index].template_id,
  1805. isEdit: 0,
  1806. id: 0,
  1807. children: [],
  1808. parent_row: 0,
  1809. row_key: this.editRowKey
  1810. };
  1811. if (this.allSelectedTemplate[index].children.length > 0) {
  1812. if (this.allSelectedTemplate[index].row_key in childMap) {
  1813. var parentRow = this.editRowKey;
  1814. var children = childMap[this.allSelectedTemplate[index].row_key];
  1815. for (const key in children) {
  1816. this.editRowKey++;
  1817. var child = {
  1818. advice_name: children[key].advice_name,
  1819. advice_desc: children[key].advice_desc,
  1820. single_dose: "" + children[key].single_dose,
  1821. single_dose_unit: children[key].single_dose_unit,
  1822. drug_spec: "" + children[key].drug_spec,
  1823. drug_spec_unit: children[key].drug_spec_unit,
  1824. prescribing_number: "" + children[key].prescribing_number,
  1825. prescribing_number_unit: children[key].prescribing_number_unit,
  1826. delivery_way: children[key].delivery_way,
  1827. execution_frequency: children[key].execution_frequency,
  1828. isEdit: 0,
  1829. id: 0,
  1830. children: [],
  1831. parent_row: parentRow,
  1832. row_key: this.editRowKey
  1833. };
  1834. item.children.push(child);
  1835. }
  1836. this.$set(item, "children", item.children);
  1837. }
  1838. }
  1839. this.submitGroupForm.adviceNames.unshift(item);
  1840. }
  1841. console.log(this.groupForm.advice_type);
  1842. let mode = "";
  1843. if (this.groupForm.advice_type == 1) {
  1844. mode = "1-2";
  1845. } else {
  1846. mode = "1-1";
  1847. }
  1848. CreateNewGroupAdvice(
  1849. this.patientID,
  1850. this.groupForm.groupno,
  1851. this.submitGroupForm,
  1852. mode
  1853. ).then(response => {
  1854. if (response.data.state == 0) {
  1855. this.$message.error(response.data.msg);
  1856. return false;
  1857. } else {
  1858. this.$notify({
  1859. title: "成功",
  1860. message: "新增成功",
  1861. type: "success",
  1862. duration: 2000
  1863. });
  1864. var groups = response.data.data.advices;
  1865. var childMap = {};
  1866. for (const index in groups) {
  1867. if (groups[index].parent_id == 0) {
  1868. continue;
  1869. }
  1870. if (groups[index].parent_id in childMap === false) {
  1871. childMap[groups[index].parent_id] = [];
  1872. }
  1873. childMap[groups[index].parent_id].push(groups[index]);
  1874. }
  1875. var parentArr = [];
  1876. for (const index in groups) {
  1877. if (groups[index].parent_id > 0) {
  1878. continue;
  1879. }
  1880. parentArr.push(groups[index]);
  1881. }
  1882. var groupNo = groups[0].groupno;
  1883. var newData = { groupNo: parentArr };
  1884. for (const index in this.adviceTableData) {
  1885. if (this.adviceTableData[index].groupno == groupNo) {
  1886. for (const i in parentArr) {
  1887. if (parentArr[i].id in childMap) {
  1888. for (const j in childMap[parentArr[i].id]) {
  1889. this.adviceTableData.splice(
  1890. index,
  1891. 0,
  1892. childMap[parentArr[i].id][j]
  1893. );
  1894. }
  1895. }
  1896. this.adviceTableData.splice(index, 0, parentArr[i]);
  1897. }
  1898. break;
  1899. }
  1900. }
  1901. for (const index in groups) {
  1902. if (groups[index].parent_id > 0) {
  1903. continue;
  1904. }
  1905. this.editRowKey++;
  1906. var item = {
  1907. advice_name: groups[index].advice_name,
  1908. advice_desc: groups[index].advice_desc,
  1909. single_dose: "" + groups[index].single_dose,
  1910. single_dose_unit: groups[index].single_dose_unit,
  1911. drug_spec: "" + groups[index].drug_spec,
  1912. drug_spec_unit: groups[index].drug_spec_unit,
  1913. prescribing_number: "" + groups[index].prescribing_number,
  1914. prescribing_number_unit: groups[index].prescribing_number_unit,
  1915. delivery_way: groups[index].delivery_way,
  1916. execution_frequency: groups[index].execution_frequency,
  1917. day_count: groups[index].day_count,
  1918. frequency_type: groups[index].frequency_type,
  1919. week_day: groups[index].week_day,
  1920. template_id: groups[index].template_id,
  1921. isEdit: 0,
  1922. index: 0,
  1923. id: groups[index].id,
  1924. children: [],
  1925. parent_row: 0,
  1926. row_key: this.editRowKey
  1927. };
  1928. if (item.id in childMap) {
  1929. for (const key in childMap[item.id]) {
  1930. this.editRowKey++;
  1931. var child = {
  1932. advice_name: childMap[item.id][key].advice_name,
  1933. advice_desc: childMap[item.id][key].advice_desc,
  1934. single_dose: "" + childMap[item.id][key].single_dose,
  1935. single_dose_unit: childMap[item.id][key].single_dose_unit,
  1936. drug_spec: "" + childMap[item.id][key].drug_spec,
  1937. drug_spec_unit: childMap[item.id][key].drug_spec_unit,
  1938. prescribing_number:
  1939. "" + childMap[item.id][key].prescribing_number,
  1940. prescribing_number_unit:
  1941. childMap[item.id][key].prescribing_number_unit,
  1942. delivery_way: childMap[item.id][key].delivery_way,
  1943. execution_frequency:
  1944. childMap[item.id][key].execution_frequency,
  1945. isEdit: 0,
  1946. index: 0,
  1947. id: childMap[item.id][key].id,
  1948. children: [],
  1949. parent_row: item.row_key,
  1950. row_key: this.editRowKey
  1951. };
  1952. item.children.push(child);
  1953. }
  1954. this.$set(item, "children", item.children);
  1955. }
  1956. this.groupForm.adviceNames.unshift(item);
  1957. console.log(this.groupForm);
  1958. }
  1959. return false;
  1960. }
  1961. });
  1962. this.templateFormVisible = false;
  1963. },
  1964. addTempForm(formName) {
  1965. var _this = this;
  1966. this.$refs[formName].validate(valid => {
  1967. if (valid) {
  1968. if (_this.templateForm.id in _this.adviceTemplateMaps) {
  1969. _this.submitGroupForm = {
  1970. advice_type: _this.groupForm.advice_type,
  1971. advice_date: _this.groupForm.advice_date,
  1972. start_time: _this.groupForm.start_time,
  1973. adviceNames: [],
  1974. advice_doctor: "",
  1975. remark: _this.groupForm.remark,
  1976. parent_id: 0
  1977. };
  1978. var mapid = _this.templateForm.id;
  1979. for (const index in _this.adviceTemplateMaps[mapid]
  1980. .DoctorAdviceTemplate) {
  1981. _this.editRowKey++;
  1982. var item = {
  1983. advice_name:
  1984. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  1985. .advice_name,
  1986. advice_desc:
  1987. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  1988. .advice_desc,
  1989. single_dose:
  1990. "" +
  1991. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  1992. .single_dose,
  1993. single_dose_unit:
  1994. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  1995. .single_dose_unit,
  1996. drug_spec:
  1997. "" +
  1998. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  1999. .drug_spec,
  2000. drug_spec_unit:
  2001. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  2002. .drug_spec_unit,
  2003. prescribing_number:
  2004. "" +
  2005. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  2006. .prescribing_number,
  2007. prescribing_number_unit:
  2008. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  2009. .prescribing_number_unit,
  2010. delivery_way:
  2011. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  2012. .delivery_way,
  2013. execution_frequency:
  2014. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  2015. .execution_frequency,
  2016. isEdit: 0,
  2017. id: 0,
  2018. children: [],
  2019. parent_row: 0,
  2020. row_key: _this.editRowKey
  2021. };
  2022. if (
  2023. "children" in
  2024. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index] &&
  2025. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  2026. .children
  2027. ) {
  2028. var parentRow = _this.editRowKey;
  2029. var children =
  2030. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  2031. .children;
  2032. for (const key in children) {
  2033. _this.editRowKey++;
  2034. var child = {
  2035. advice_name: children[key].advice_name,
  2036. advice_desc: children[key].advice_desc,
  2037. single_dose: "" + children[key].single_dose,
  2038. single_dose_unit: children[key].single_dose_unit,
  2039. drug_spec: "" + children[key].drug_spec,
  2040. drug_spec_unit: children[key].drug_spec_unit,
  2041. prescribing_number: "" + children[key].prescribing_number,
  2042. prescribing_number_unit:
  2043. children[key].prescribing_number_unit,
  2044. delivery_way: children[key].delivery_way,
  2045. execution_frequency: children[key].execution_frequency,
  2046. isEdit: 0,
  2047. id: 0,
  2048. children: [],
  2049. parent_row: parentRow,
  2050. row_key: _this.editRowKey
  2051. };
  2052. item.children.push(child);
  2053. }
  2054. _this.$set(item, "children", item.children);
  2055. }
  2056. _this.submitGroupForm.adviceNames.push(item);
  2057. }
  2058. let mode = "";
  2059. console.log(this.groupForm.advice_type);
  2060. if (this.groupForm.advice_type == 1) {
  2061. mode = "1-2";
  2062. } else {
  2063. mode = "1-1";
  2064. }
  2065. CreateNewGroupAdvice(
  2066. _this.patientID,
  2067. _this.groupForm.groupno,
  2068. _this.submitGroupForm,
  2069. mode
  2070. ).then(response => {
  2071. if (response.data.state == 0) {
  2072. _this.$message.error(response.data.msg);
  2073. return false;
  2074. } else {
  2075. _this.$notify({
  2076. title: "成功",
  2077. message: "新增成功",
  2078. type: "success",
  2079. duration: 2000
  2080. });
  2081. if (
  2082. _this.adviceType == _this.groupForm.advice_type ||
  2083. _this.adviceType == 0
  2084. ) {
  2085. // var alen = response.data.data.advices.length
  2086. // for (let index = alen-1; index >=0; index--) {
  2087. // _this.adviceTableData.unshift(response.data.data.advices[index]);
  2088. // }
  2089. // for (const index in response.data.data.advices) {
  2090. // _this.adviceTableData.unshift(response.data.data.advices[index]);
  2091. // }
  2092. var groups = response.data.data.advices;
  2093. var childMap = {};
  2094. for (const index in groups) {
  2095. if (groups[index].parent_id == 0) {
  2096. continue;
  2097. }
  2098. if (groups[index].parent_id in childMap === false) {
  2099. childMap[groups[index].parent_id] = [];
  2100. }
  2101. childMap[groups[index].parent_id].push(groups[index]);
  2102. }
  2103. var parentArr = [];
  2104. for (const index in groups) {
  2105. if (groups[index].parent_id > 0) {
  2106. continue;
  2107. }
  2108. parentArr.push(groups[index]);
  2109. }
  2110. var groupNo = groups[0].groupno;
  2111. var newData = { groupNo: parentArr };
  2112. for (const index in _this.adviceTableData) {
  2113. if (_this.adviceTableData[index].groupno == groupNo) {
  2114. for (const i in parentArr) {
  2115. if (parentArr[i].id in childMap) {
  2116. for (const j in childMap[parentArr[i].id]) {
  2117. _this.adviceTableData.splice(
  2118. index,
  2119. 0,
  2120. childMap[parentArr[i].id][j]
  2121. );
  2122. }
  2123. }
  2124. _this.adviceTableData.splice(index, 0, parentArr[i]);
  2125. }
  2126. break;
  2127. }
  2128. }
  2129. // for (const index in parentArr) {
  2130. // if(parentArr[index].id in childMap) {
  2131. // for (const j in childMap[parentArr[index].id]) {
  2132. // _this.adviceTableData.unshift(childMap[parentArr[index].id][j]);
  2133. // }
  2134. // }
  2135. // _this.adviceTableData.unshift(parentArr[index]);
  2136. // }
  2137. for (const index in groups) {
  2138. if (groups[index].parent_id > 0) {
  2139. continue;
  2140. }
  2141. _this.editRowKey++;
  2142. var item = {
  2143. advice_name: groups[index].advice_name,
  2144. advice_desc: groups[index].advice_desc,
  2145. single_dose: "" + groups[index].single_dose,
  2146. single_dose_unit: groups[index].single_dose_unit,
  2147. drug_spec: "" + groups[index].drug_spec,
  2148. drug_spec_unit: groups[index].drug_spec_unit,
  2149. prescribing_number: "" + groups[index].prescribing_number,
  2150. prescribing_number_unit:
  2151. groups[index].prescribing_number_unit,
  2152. delivery_way: groups[index].delivery_way,
  2153. execution_frequency: groups[index].execution_frequency,
  2154. isEdit: 0,
  2155. index: 0,
  2156. id: groups[index].id,
  2157. children: [],
  2158. parent_row: 0,
  2159. row_key: _this.editRowKey
  2160. };
  2161. if (item.id in childMap) {
  2162. for (const key in childMap[item.id]) {
  2163. _this.editRowKey++;
  2164. var child = {
  2165. advice_name: childMap[item.id][key].advice_name,
  2166. advice_desc: childMap[item.id][key].advice_desc,
  2167. single_dose: "" + childMap[item.id][key].single_dose,
  2168. single_dose_unit:
  2169. childMap[item.id][key].single_dose_unit,
  2170. drug_spec: "" + childMap[item.id][key].drug_spec,
  2171. drug_spec_unit: childMap[item.id][key].drug_spec_unit,
  2172. prescribing_number:
  2173. "" + childMap[item.id][key].prescribing_number,
  2174. prescribing_number_unit:
  2175. childMap[item.id][key].prescribing_number_unit,
  2176. delivery_way: childMap[item.id][key].delivery_way,
  2177. execution_frequency:
  2178. childMap[item.id][key].execution_frequency,
  2179. isEdit: 0,
  2180. index: 0,
  2181. id: childMap[item.id][key].id,
  2182. children: [],
  2183. parent_row: item.row_key,
  2184. row_key: _this.editRowKey
  2185. };
  2186. item.children.push(child);
  2187. }
  2188. _this.$set(item, "children", item.children);
  2189. }
  2190. _this.groupForm.adviceNames.unshift(item);
  2191. }
  2192. }
  2193. _this.resetForm(formName);
  2194. return false;
  2195. }
  2196. });
  2197. }
  2198. _this.templateFormVisible = false;
  2199. }
  2200. });
  2201. },
  2202. openAdviceTemplate() {
  2203. this.templateForm = { id: "" };
  2204. this.selectedTemp = { id: 0, name: "", org_id: 0, list: [], rows: [] };
  2205. this.selectedTemplate = [];
  2206. if (typeof this.$refs.templatetable !== "undefined") {
  2207. this.$refs.templatetable.setCurrentRow(null);
  2208. }
  2209. if (this.groupForm.advice_type == 1) {
  2210. this.getAdviceConfig(1);
  2211. } else if (this.groupForm.advice_type == 3) {
  2212. this.getAdviceConfig(0);
  2213. }
  2214. this.templateFormVisible = true;
  2215. },
  2216. selectAllTemplateAdvice(selection) {
  2217. var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id]
  2218. .DoctorAdviceTemplate;
  2219. for (let y = 0; y < adviceArray.length; y++) {
  2220. adviceArray[y].selection = false;
  2221. }
  2222. if (selection.length > 0) {
  2223. for (let y = 0; y < adviceArray.length; y++) {
  2224. for (let i = 0; i < selection.length; i++) {
  2225. if (adviceArray[y].id == selection[i].advice_id) {
  2226. adviceArray[y].selection = true;
  2227. }
  2228. }
  2229. }
  2230. }
  2231. },
  2232. selectGroupAdvice(row) {
  2233. this.groupSelectRow = row;
  2234. },
  2235. groupClassName({ row, rowIndex }) {
  2236. row.index = rowIndex;
  2237. },
  2238. getRowKey(row) {
  2239. return row.row_key;
  2240. },
  2241. resetForm(formName) {
  2242. this.$refs[formName].resetFields();
  2243. },
  2244. open() {
  2245. this.groupEditFormVisible = true;
  2246. this.groupSelectRow = null;
  2247. if (typeof this.$refs.advicenametable !== "undefined") {
  2248. this.$refs.advicenametable.setCurrentRow(null);
  2249. }
  2250. },
  2251. cancleDialog() {
  2252. this.templateFormVisible = false;
  2253. for (const indexs in this.adviceTemplateMaps) {
  2254. const adviceTemplate = this.adviceTemplateMaps[indexs];
  2255. for (const index in adviceTemplate.DoctorAdviceTemplate) {
  2256. adviceTemplate.DoctorAdviceTemplate[index].selection = false;
  2257. }
  2258. }
  2259. },
  2260. getAdviceConfig(type) {
  2261. getAdviceConfig(type).then(response => {
  2262. if (response.data.state == 1) {
  2263. this.deliveryWayOptions =
  2264. response.data.data.drugways === null
  2265. ? []
  2266. : response.data.data.drugways;
  2267. this.executionFrequencyOptions =
  2268. response.data.data.efs === null ? [] : response.data.data.efs;
  2269. this.adviceTemplates =
  2270. response.data.data.advice_templates === null
  2271. ? []
  2272. : response.data.data.advice_templates;
  2273. var templateLen = this.adviceTemplates.length;
  2274. for (let index = 0; index < templateLen; index++) {
  2275. if (!this.adviceTemplates[index].DoctorAdviceTemplate) {
  2276. continue;
  2277. }
  2278. var DoctorAdviceTemplate = this.adviceTemplates[index]
  2279. .DoctorAdviceTemplate;
  2280. for (let i = 0; i < DoctorAdviceTemplate.length; i++) {
  2281. DoctorAdviceTemplate[i].selection = false;
  2282. }
  2283. var item = this.adviceTemplates[index];
  2284. item.DoctorAdviceTemplate = [];
  2285. var datMap = {};
  2286. for (const key in DoctorAdviceTemplate) {
  2287. if (DoctorAdviceTemplate[key].parent_id == 0) {
  2288. datMap[DoctorAdviceTemplate[key].id] =
  2289. DoctorAdviceTemplate[key];
  2290. }
  2291. }
  2292. for (const key in DoctorAdviceTemplate) {
  2293. if (DoctorAdviceTemplate[key].parent_id in datMap) {
  2294. if ("children" in datMap[DoctorAdviceTemplate[key].parent_id]) {
  2295. datMap[DoctorAdviceTemplate[key].parent_id].children.push(
  2296. DoctorAdviceTemplate[key]
  2297. );
  2298. } else {
  2299. datMap[DoctorAdviceTemplate[key].parent_id].children = [];
  2300. datMap[DoctorAdviceTemplate[key].parent_id].children.push(
  2301. DoctorAdviceTemplate[key]
  2302. );
  2303. }
  2304. }
  2305. }
  2306. for (const key in datMap) {
  2307. item.DoctorAdviceTemplate.push(datMap[key]);
  2308. }
  2309. this.$set(
  2310. this.adviceTemplateMaps,
  2311. this.adviceTemplates[index].id,
  2312. item
  2313. );
  2314. console.log(this.adviceTemplates);
  2315. }
  2316. }
  2317. });
  2318. },
  2319. rand(min, max) {
  2320. return Math.floor(Math.random() * (max - min)) + min;
  2321. },
  2322. //
  2323. getSelfMedicalList(){
  2324. const params = {
  2325. patient_id:this.patientID
  2326. }
  2327. getSelfMedicalList(params).then(response=>{
  2328. if (response.data.state == 1) {
  2329. this.arr_drug = []
  2330. var medicalList = response.data.data.private_drug_list
  2331. var base_drug_list = response.data.data.base_drug_list
  2332. var base_drug_cofig = response.data.data.base_drug_config
  2333. var private_drug_cofig = response.data.data.private_drug_config
  2334. if(private_drug_cofig != null&&private_drug_cofig.drug_start == 1) {
  2335. for (let i = 0; i < medicalList.length; i++) {
  2336. if(medicalList[i].drug_specs != null) {
  2337. for (let a = 0; a < medicalList[i].drug_specs.length; a++) {
  2338. medicalList[i].drug_specs[a]['type'] = 2
  2339. }
  2340. }
  2341. let obj = {
  2342. drug_name: "",
  2343. drug_desc: "",
  2344. delivery_way: "",
  2345. execution_frequency: "",
  2346. single_dose: "",
  2347. single_dose_unit: "",
  2348. prescribing_number: "",
  2349. prescribing_number_unit: "",
  2350. type_id: "",
  2351. type: "",
  2352. custom_id: "",
  2353. drug_specs: [],
  2354. }
  2355. medicalList[i].drug_name = medicalList[i].drug_name + "(自备药)"
  2356. obj.drug_name = medicalList[i].drug_name
  2357. obj.delivery_way = medicalList[i].delivery_way
  2358. obj.execution_frequency = medicalList[i].execution_frequency
  2359. obj.single_dose = medicalList[i].single_dose
  2360. obj.prescribing_number = medicalList[i].prescribing_number
  2361. obj.type_id = medicalList[i].id
  2362. obj.type = 2
  2363. obj.custom_id = this.rand(10000000, 99999999)
  2364. obj.drug_specs = medicalList[i].drug_specs
  2365. this.all_drug.push(obj)
  2366. }
  2367. }
  2368. for (let i = 0; i < base_drug_list.length; i++) {
  2369. if(base_drug_list[i].drug_specs != null) {
  2370. for (let a = 0; a < base_drug_list[i].drug_specs.length; a++) {
  2371. base_drug_list[i].drug_specs[a]['type'] = 1
  2372. }
  2373. }
  2374. let obj = {
  2375. drug_name: "",
  2376. drug_desc: "",
  2377. delivery_way: "",
  2378. execution_frequency: "",
  2379. single_dose: "",
  2380. single_dose_unit: "",
  2381. prescribing_number: "",
  2382. prescribing_number_unit: "",
  2383. type_id: "",
  2384. type: "",
  2385. custom_id: "",
  2386. drug_specs: [],
  2387. }
  2388. obj.drug_name = base_drug_list[i].drug_name
  2389. obj.delivery_way = base_drug_list[i].delivery_way
  2390. obj.execution_frequency = base_drug_list[i].execution_frequency
  2391. obj.single_dose = base_drug_list[i].single_dose
  2392. obj.prescribing_number = base_drug_list[i].prescribing_number
  2393. obj.type_id = base_drug_list[i].id
  2394. obj.type = 1
  2395. obj.custom_id = this.rand(10000000, 99999999)
  2396. obj.drug_specs = base_drug_list[i].drug_specs
  2397. this.all_drug.push(obj)
  2398. console.log("中2222222222222222222",this.all_drug)
  2399. }
  2400. }
  2401. })
  2402. },
  2403. changeDrugName(name){
  2404. this.current_drug_name = name
  2405. this.nameForm.advice_desc = ''
  2406. this.drugSpec = []
  2407. for (let i = 0; i < this.all_drug.length; i++) {
  2408. if (this.all_drug[i].drug_name == name) {
  2409. this.drugSpec = this.all_drug[i].drug_specs
  2410. }
  2411. }
  2412. },
  2413. changeDrugDesc(name) {
  2414. this.current_drug_spec = name
  2415. for (let i = 0; i < this.drugSpec.length; i++) {
  2416. if (this.drugSpec[i].drug_spec == name) {
  2417. this.nameForm.advice_desc = this.drugSpec[i].drug_spec
  2418. this.nameForm.prescribing_number = this.drugSpec[i].prescribing_number.toString()
  2419. this.nameForm.single_dose = this.drugSpec[i].single_dose.toString()
  2420. this.nameForm.delivery_way = this.drugSpec[i].delivery_way.toString()
  2421. this.nameForm.execution_frequency = this.drugSpec[i].execution_frequency.toString()
  2422. this.drug_id = this.drugSpec[i].id
  2423. this.src_type = this.drugSpec[i].type
  2424. this.nameForm.drug_id = this.drugSpec[i].id
  2425. this.nameForm.way = this.drugSpec[i].type
  2426. }
  2427. }
  2428. }
  2429. },
  2430. watch: {
  2431. rowKey: function() {
  2432. this.editRowKey = this.rowKey;
  2433. },
  2434. "selectedTemp.list": function() {
  2435. this.calcselectedTemp();
  2436. }
  2437. },
  2438. created(){
  2439. //获取自备药
  2440. this.getSelfMedicalList()
  2441. }
  2442. };
  2443. </script>
  2444. <style>
  2445. #user-edit-advice-name-table .expanded {
  2446. display: table-row !important;
  2447. }
  2448. #user-edit-advice-name-table .el-table__expand-icon {
  2449. -webkit-transform: rotate(90deg) !important;
  2450. transform: rotate(90deg) !important;
  2451. }
  2452. #dialysis-update-select-template-table .el-table__row {
  2453. display: table-row !important;
  2454. }
  2455. #dialysis-update-select-template-table .el-table__expand-icon {
  2456. -webkit-transform: rotate(90deg) !important;
  2457. transform: rotate(90deg) !important;
  2458. }
  2459. </style>