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

DoctorAdviceDialog.vue 90KB

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