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

DoctorAdviceDialog.vue 89KB

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