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

DoctorAdviceDialog.vue 89KB

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