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

DoctorAdviceDialog.vue 89KB

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