血透系统pad前端

MonitDialog.vue 47KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379
  1. <template>
  2. <div>
  3. <div v-loading="loading">
  4. <div class="Dialog" v-show="listPanel">
  5. <div class="DialogTit">
  6. <span class="iconfont" @click="close()">&#xe6e9;</span>
  7. <h1 class="name">透析监测</h1>
  8. <span class="success">&nbsp;</span>
  9. </div>
  10. <div style="width:100%;background: #fff;">
  11. <div class="yzNav" style="width:80%">
  12. <span @click="openForm()">新增监测</span>
  13. <span @click="openEidtForm()">修改监测</span>
  14. <span @click="deleteForm()">删除监测</span>
  15. </div>
  16. </div>
  17. <div class="DialogContent choose" id="dialogTop">
  18. <div style="width:100%;overflow:hildden;">
  19. <table class="table" style>
  20. <tr @click="selectRow(-1, null)">
  21. <th v-if="isShow('监测时间')" width="60px">时间</th>
  22. <th v-if="isShow('血压')" width="60px">血压(mmHg)</th>
  23. <th v-if="isShow('脉搏')" width="50px">脉搏(次/分)</th>
  24. <th v-if="isShow('体温')" width="50px">体温(℃)</th>
  25. <th v-if="isShow('呼吸频率')" width="80px">呼吸频率(次/分)</th>
  26. <th v-if="isShow('血流量')" width="70px">血流量(ml/min)</th>
  27. <th width="76px">静脉压/动脉压(mmHg)</th>
  28. <th v-if="isShow('跨膜压')" width="70px">跨膜压(mmHg)</th>
  29. <th v-if="isShow('超滤量') && template_id ==6" width="60px">超滤量(ml)</th>
  30. <th v-if="isShow('超滤量') && template_id !=6" width="60px">超滤量(L)</th>
  31. <th v-if="isShow('钠浓度')" width="82px">钠浓度(mmol/L)</th>
  32. <th v-if="isShow('透析液温度')" width="82px">透析液温度(℃)</th>
  33. <th v-if="isShow('置换率') && template_id ==6" width="92px">置换率(ml/min)</th>
  34. <th v-if="isShow('置换率') && template_id !=6" width="92px">置换率(L/h)</th>
  35. <th v-if="isShow('置换量') && template_id ==6" width="50px">置换量(ml)</th>
  36. <th v-if="isShow('置换量') && template_id !=6" width="50px">置换量(L)</th>
  37. <th v-if="isShow('SpO₂') && template_id !=6" width="50px">SpO₂(%)</th>
  38. <th v-if="isShow('电导度')" width="50px">电导度(mS/m)</th>
  39. <th v-if="isShow('置换液流量')" width="50px">置换液流量(ml/h)</th>
  40. <th v-if="isShow('病情变化')" width="92px">病情变化</th>
  41. <th v-if="isShow('处理')" width="92px">处理</th>
  42. <th v-if="isShow('结果')" width="92px">结果</th>
  43. </tr>
  44. <tr
  45. v-for="(item,index) in monitorRecords"
  46. :key="index"
  47. :value="item.value"
  48. @click="selectRow(index, item)"
  49. :class="index==currentIndex?rowClass:''"
  50. >
  51. <td v-if="isShow('监测时间')">{{parseTime(item.operate_time, '{y}-{m}-{d} {h}:{i}')}}</td>
  52. <td
  53. v-if="isShow('血压')"
  54. >{{item.systolic_blood_pressure?item.systolic_blood_pressure:''}}/{{item.diastolic_blood_pressure?item.diastolic_blood_pressure:''}}</td>
  55. <td v-if="isShow('脉搏')">{{item.pulse_frequency?item.pulse_frequency:''}}</td>
  56. <td v-if="isShow('体温')">{{item.temperature?item.temperature:''}}</td>
  57. <td v-if="isShow('呼吸频率')">{{item.breathing_rate?item.breathing_rate:''}}</td>
  58. <td v-if="isShow('血流量')">{{item.blood_flow_volume?item.blood_flow_volume:''}}</td>
  59. <td>{{item.venous_pressure?item.venous_pressure:''}}/{{item.arterial_pressure?item.arterial_pressure:''}}</td>
  60. <td
  61. v-if="isShow('跨膜压')"
  62. >{{item.transmembrane_pressure?item.transmembrane_pressure:''}}</td>
  63. <td
  64. v-if="isShow('超滤量')"
  65. >{{item.ultrafiltration_volume?item.ultrafiltration_volume:''}}</td>
  66. <td v-if="isShow('钠浓度')">{{item.sodium_concentration?item.sodium_concentration:''}}</td>
  67. <td
  68. v-if="isShow('透析液温度')"
  69. >{{item.dialysate_temperature?item.dialysate_temperature:''}}</td>
  70. <td v-if="isShow('置换率')">{{item.replacement_rate?item.replacement_rate:''}}</td>
  71. <td
  72. v-if="isShow('置换量')"
  73. >{{item.displacement_quantity?item.displacement_quantity:''}}</td>
  74. <td
  75. v-if="isShow('SpO₂')"
  76. >{{item.blood_oxygen_saturation?item.blood_oxygen_saturation:''}}</td>
  77. <td v-if="isShow('电导度')">{{item.conductivity?item.conductivity:''}}</td>
  78. <td
  79. v-if="isShow('置换液流量')"
  80. >{{item.displacement_flow_quantity?item.displacement_flow_quantity:''}}</td>
  81. <td v-if="isShow('病情变化')">{{item.symptom}}</td>
  82. <td v-if="isShow('处理')">{{item.dispose}}</td>
  83. <td v-if="isShow('结果')">{{item.result}}</td>
  84. </tr>
  85. </table>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="Dialog" v-show="formPanel">
  90. <div class="DialogTit">
  91. <div class="back" @click="formPanel=false;listPanel=true;">
  92. <span class="iconfont">&#xe720;</span>返回
  93. </div>
  94. <h1 class="name">{{formTitle}}</h1>
  95. <span class="success" v-if="form.id>0" @click="submitEditAction()">保存</span>
  96. <span class="success" v-else @click="submitAction()">保存</span>
  97. </div>
  98. <div class="DialogContent choose">
  99. <div class="content">
  100. <div class="cell" v-if="isShow('监测时间')">
  101. <label>监测时间</label>
  102. <input
  103. type="text"
  104. class="inputBox"
  105. @click="chooseTime()"
  106. v-on:change="timechange()"
  107. :value="parseTime(this.form.operate_time, '{y}-{m}-{d} {h}:{i}')"
  108. readonly
  109. />
  110. </div>
  111. <div class="cell" v-if="isShow('收缩压')">
  112. <label>收缩压(mmHg)</label>
  113. <input
  114. type="number"
  115. @focus="inputFocus"
  116. onclick="this.select();"
  117. class="inputBox"
  118. v-model="form.systolic_bp"
  119. />
  120. </div>
  121. <div class="cell" v-if="isShow('舒张压')">
  122. <label>舒张压(mmHg)</label>
  123. <input
  124. type="number"
  125. @focus="inputFocus"
  126. onclick="this.select();"
  127. class="inputBox"
  128. v-model="form.diastolic_bp"
  129. />
  130. </div>
  131. <div class="cell" v-if="isShow('脉搏')">
  132. <label>脉搏(次/分)</label>
  133. <input
  134. type="number"
  135. @focus="inputFocus"
  136. onclick="this.select();"
  137. class="inputBox"
  138. v-model="form.pulse_frequency"
  139. />
  140. </div>
  141. <div class="cell" v-if="isShow('体温')">
  142. <label>体温(℃)</label>
  143. <input
  144. type="number"
  145. @focus="inputFocus"
  146. onclick="this.select();"
  147. class="inputBox"
  148. v-model="form.temperature"
  149. />
  150. </div>
  151. <div class="cell" v-if="isShow('呼吸频率')">
  152. <label>呼吸频率(次/分)</label>
  153. <input
  154. type="number"
  155. @focus="inputFocus"
  156. onclick="this.select();"
  157. class="inputBox"
  158. v-model="form.breathing_rated"
  159. />
  160. </div>
  161. <div class="cell" v-if="isShow('血流量')">
  162. <label>血流量(ml/min)</label>
  163. <input
  164. type="number"
  165. @focus="inputFocus"
  166. onclick="this.select();"
  167. class="inputBox"
  168. v-model="form.blood_flow_volume"
  169. />
  170. </div>
  171. <div class="cell">
  172. <label>静脉压(mmHg)</label>
  173. <input
  174. type="number"
  175. @focus="inputFocus"
  176. onclick="this.select();"
  177. class="inputBox"
  178. v-model="form.venous_pressure"
  179. style="width:60%"
  180. />
  181. <button
  182. class="typeButton"
  183. style="width:30%;padding: 0.18rem 0; color: #fff; background: #409eff;border-radius:5px"
  184. @click="venousPressureChange(1)"
  185. >转换</button>
  186. </div>
  187. <div class="cell" v-if="isShow('跨膜压')">
  188. <label>跨膜压(mmHg)</label>
  189. <input
  190. type="number"
  191. @focus="inputFocus"
  192. onclick="this.select();"
  193. class="inputBox"
  194. v-model="form.transmembrane_pressure"
  195. style="width:60%"
  196. />
  197. <button
  198. class="typeButton"
  199. style="width:30%;padding: 0.18rem 0; color: #fff; background: #409eff;border-radius:5px"
  200. @click="venousPressureChange(2)"
  201. >转换</button>
  202. </div>
  203. <div class="cell" v-if="isShow('超滤量')">
  204. <label v-if="template_id == 6">超滤量(ml)</label>
  205. <label v-else>超滤量(L)</label>
  206. <input
  207. type="number"
  208. @focus="inputFocus"
  209. onclick="this.select();"
  210. class="inputBox"
  211. v-model="form.ultrafiltration_volume"
  212. />
  213. </div>
  214. <div class="cell" v-if="isShow('超滤率')">
  215. <label v-if="template_id == 6">超滤率(ml/h)</label>
  216. <label v-else>超滤率(L/h)</label>
  217. <input
  218. type="number"
  219. @focus="inputFocus"
  220. onclick="this.select();"
  221. class="inputBox"
  222. v-model="form.ultrafiltration_rate"
  223. />
  224. </div>
  225. <div class="cell">
  226. <label>动脉压(mmHg)</label>
  227. <input
  228. type="number"
  229. @focus="inputFocus"
  230. onclick="this.select();"
  231. class="inputBox"
  232. v-model="form.arterial_pressure"
  233. style="width:60%"
  234. />
  235. <button
  236. class="typeButton"
  237. style="width:30%;padding: 0.18rem 0; color: #fff; background: #409eff;border-radius:5px"
  238. @click="venousPressureChange(3)"
  239. >转换</button>
  240. </div>
  241. <div class="cell" v-if="isShow('透析液温度')">
  242. <label>透析液温度(℃)</label>
  243. <input
  244. type="number"
  245. @focus="inputFocus"
  246. onclick="this.select();"
  247. class="inputBox"
  248. v-model="form.dialysate_temperature"
  249. />
  250. </div>
  251. <div class="cell" v-if="isShow('钠浓度')">
  252. <label>钠浓度(mmol/L)</label>
  253. <input
  254. type="number"
  255. @focus="inputFocus"
  256. onclick="this.select();"
  257. class="inputBox"
  258. v-model="form.sodium_concentration"
  259. />
  260. </div>
  261. <div class="cell" v-if="isShow('置换率')">
  262. <label v-if="template_id == 6">置换率(ml/min)</label>
  263. <label v-else>置换率(L/h)</label>
  264. <input
  265. type="number"
  266. @focus="inputFocus"
  267. onclick="this.select();"
  268. class="inputBox"
  269. v-model="form.replacement_rate"
  270. />
  271. </div>
  272. <div class="cell" v-if="isShow('置换量')">
  273. <label v-if="template_id == 6">置换量(ml)</label>
  274. <label v-else>置换量(L)</label>
  275. <input
  276. type="number"
  277. @focus="inputFocus"
  278. onclick="this.select();"
  279. class="inputBox"
  280. v-model="form.displacement_quantity"
  281. />
  282. </div>
  283. <div class="cell" v-if="isShow('SpO₂')">
  284. <label v-if="template_id == 6">SpO₂(%)</label>
  285. <label v-else>SpO₂(%)</label>
  286. <input
  287. type="number"
  288. @focus="inputFocus"
  289. onclick="this.select();"
  290. class="inputBox"
  291. v-model="form.blood_oxygen_saturation"
  292. />
  293. </div>
  294. <div class="cell" v-if="isShow('电导度')">
  295. <label>电导度(mS/m)</label>
  296. <input
  297. type="number"
  298. @focus="inputFocus"
  299. onclick="this.select();"
  300. class="inputBox"
  301. v-model="form.conductivity"
  302. />
  303. </div>
  304. <div class="cell" v-if="isShow('置换液流量')">
  305. <label>置换液流量(ml/h)</label>
  306. <input
  307. type="number"
  308. @focus="inputFocus"
  309. onclick="this.select();"
  310. class="inputBox"
  311. v-model="form.displacement_flow_quantity"
  312. />
  313. </div>
  314. <div class="cell width" v-if="isShow('KT/V')">
  315. <label>KT/V(在线)</label>
  316. <!-- <input type="text" class="inputBox" v-model="form.ktv"> -->
  317. <textarea
  318. @focus="inputFocus"
  319. class="inputBox"
  320. style="width: 100%;"
  321. :rows="4"
  322. v-model="form.ktv"
  323. ></textarea>
  324. </div>
  325. <div class="cell width" v-if="isShow('病情变化')">
  326. <label>病情变化</label>
  327. <input
  328. type="text"
  329. class="inputBox"
  330. style="width: 100%;margin-bottom:5px;"
  331. v-model="form.symptom"
  332. readonly
  333. placeholder="选择 "
  334. @click="showSubMenu('symptom')"
  335. />
  336. <textarea
  337. @focus="inputFocus"
  338. class="inputBox"
  339. style="width: 100%;"
  340. :rows="4"
  341. v-model="form.symptom"
  342. ></textarea>
  343. </div>
  344. <div class="cell width" v-if="isShow('处理')">
  345. <label>处理</label>
  346. <!-- <input type="text" class="inputBox" v-model="form.dispose"> -->
  347. <input
  348. type="text"
  349. class="inputBox"
  350. style="width: 100%;margin-bottom:5px;"
  351. v-model="form.dispose"
  352. readonly
  353. placeholder="选择"
  354. @click="showSubMenu('dispose')"
  355. />
  356. <textarea
  357. @focus="inputFocus"
  358. class="inputBox"
  359. style="width: 100%;"
  360. :rows="4"
  361. v-model="form.dispose"
  362. ></textarea>
  363. </div>
  364. <div class="cell width" v-if="isShow('结果')">
  365. <label>结果</label>
  366. <!-- <input type="text" class="inputBox" v-model="form.result"> -->
  367. <input
  368. type="text"
  369. class="inputBox"
  370. style="width: 100%;margin-bottom:5px;"
  371. v-model="form.result"
  372. readonly
  373. placeholder="选择"
  374. @click="showSubMenu('result')"
  375. />
  376. <textarea
  377. @focus="lastInputFocus"
  378. @blur="lastInputBlur"
  379. class="inputBox"
  380. style="width: 100%;"
  381. :rows="4"
  382. v-model="form.result"
  383. ></textarea>
  384. </div>
  385. <div class="cell width">
  386. <label>监测人:</label>
  387. <span class="doctor">{{doctor}}</span>
  388. </div>
  389. </div>
  390. </div>
  391. </div>
  392. </div>
  393. <mt-datetime-picker ref="picker" type="datetime" @confirm="handleConfirm" v-model="pickertime"></mt-datetime-picker>
  394. <check-box-sub-menu
  395. :visibility="visibility"
  396. v-on:menu-cancle="menuCancle"
  397. v-on:menu-comfirm="menuComfirm"
  398. :propsForm="propForm"
  399. ></check-box-sub-menu>
  400. </div>
  401. </template>
  402. <script>
  403. import {
  404. addMonitorRecord,
  405. deleteMonitorRecord,
  406. editMonitorRecord,
  407. GetMonitor,
  408. GetMonitorToday
  409. } from '@/api/dialysis'
  410. import { parseTime } from '@/utils'
  411. import { Dialog, Toast } from 'vant'
  412. import CheckBoxSubMenu from './subMenu/checkBoxSubMenu'
  413. import { getDataConfig } from '@/utils/data'
  414. export default {
  415. name: 'MonitDialog',
  416. props: {
  417. monitor_records: {
  418. type: Array
  419. },
  420. patient: {
  421. type: Object
  422. },
  423. order: {
  424. type: Object
  425. },
  426. last_monitor_record: {
  427. type: Object
  428. }
  429. },
  430. data () {
  431. return {
  432. loading: false,
  433. formTitle: '新增监测',
  434. formPanel: false,
  435. listPanel: true,
  436. tableDate: [],
  437. monitorRecords: this.monitor_records,
  438. pickertime: new Date(),
  439. monitor_time_str: '',
  440. // monitor_date_str: "",
  441. currentIndex: -1,
  442. currentRow: null,
  443. rowClass: 'row-class-active',
  444. template_id: 0,
  445. visibility: false,
  446. today_last_monitor_record: {},
  447. propForm: {
  448. title: '',
  449. list: [],
  450. optionList: [],
  451. isMultiple: 2,
  452. result: [], // 选中的值
  453. type: 1, // 用来区分不同子菜单,方便对返回值进行赋值
  454. selectId: 0
  455. },
  456. form: {
  457. // patient_id: 0,
  458. // order_id: 0,
  459. monitor_date: 0,
  460. // monitor_time: "00:00",
  461. operate_time: 0,
  462. pulse_frequency: '', // 脉率
  463. breathing_rated: '', // 呼吸频率
  464. systolic_bp: '', // 收缩压
  465. diastolic_bp: '', // 舒张压
  466. blood_flow_volume: '', // 血流量
  467. venous_pressure: '', // 静脉压
  468. arterial_pressure: '', // 动脉压
  469. transmembrane_pressure: '', // 跨膜压
  470. ultrafiltration_rate: '', // 超滤率
  471. ultrafiltration_volume: '', // 超滤量
  472. sodium_concentration: '', // 钠浓度
  473. dialysate_temperature: '', // 透析液温度
  474. temperature: '', // 体温
  475. replacement_rate: '', // 置换率
  476. displacement_quantity: '', // 置换量
  477. conductivity: '',
  478. displacement_flow_quantity: '',
  479. ktv: '', // KT/V(在线)
  480. symptom: '', // 症状
  481. dispose: '', // 处理
  482. result: '', // 结果,
  483. blood_oxygen_saturation: '',
  484. monitoring_nurse: this.$store.getters.user.user.id // 监测人
  485. },
  486. doctor: this.$store.getters.user.user.user_name
  487. }
  488. },
  489. created () {
  490. var date = this.$route.query && this.$route.query.date
  491. this.template_id = this.$store.getters.user.template_info.template_id
  492. // date *= 1000;
  493. // var newDate = new Date(date);
  494. // var cDate = new Date();
  495. // var y = newDate.getFullYear();
  496. // var m = newDate.getMonth() + 1;
  497. // var d = newDate.getDate();
  498. // if (isNaN(y) || isNaN(m) || isNaN(d)) {
  499. // // newDate = new Date();
  500. // y = cDate.getFullYear();
  501. // m = cDate.getMonth() + 1;
  502. // d = cDate.getDate();
  503. // }
  504. // var h = cDate.getHours();
  505. // var mi = cDate.getMinutes();
  506. // var pickertime = (h < 10 ? "0" + h : h) + ":" + (mi < 10 ? "0" + mi : mi);
  507. // var monitor_date_str =
  508. // y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
  509. // this.form.monitor_date = Math.round(
  510. // new Date(monitor_date_str + " 00:00:00").getTime() / 1000
  511. // );
  512. // this.form.monitor_date = parseInt((new Date(date.getFullYear, date.getMonth, date.getDate, 0, 0, 0, 0)).getTime()) //parseTime(date, "{y}-{m}-{d}") + " 00:00:00"
  513. this.form.monitor_date = date
  514. this.form.operate_time = this.pickertime.getTime()
  515. },
  516. methods: {
  517. timechange () {
  518. debugger
  519. },
  520. venousPressureChange (type) {
  521. if (type == 1) {
  522. this.form.venous_pressure = Math.ceil(
  523. Math.round(this.form.venous_pressure * 7.5)
  524. )
  525. } else if (type == 2) {
  526. this.form.transmembrane_pressure = Math.ceil(
  527. Math.round(this.form.transmembrane_pressure * 7.5)
  528. )
  529. } else {
  530. this.form.arterial_pressure = Math.ceil(
  531. Math.round(this.form.arterial_pressure * 7.5)
  532. )
  533. }
  534. },
  535. isShow (name) {
  536. var filedList = this.$store.getters.user.fileds
  537. for (let i = 0; i < filedList.length; i++) {
  538. if (
  539. filedList[i].module == 4 &&
  540. filedList[i].filed_name_cn == name &&
  541. filedList[i].is_show == 1
  542. ) {
  543. return true
  544. }
  545. }
  546. return false
  547. },
  548. getLastRecordTody () {
  549. let params = {
  550. patient_id: this.patient.id
  551. }
  552. GetMonitorToday(params).then(rs => {
  553. var resp = rs.data.data
  554. this.today_last_monitor_record = resp.monitor
  555. // this.form.operate_time = Date.parse(new Date())
  556. this.form.operate_time = resp.monitor.operate_time ? (resp.monitor.operate_time + 3600) * 1000 : Date.parse(new Date())
  557. this.form.pulse_frequency = '' // this.last_monitor_record.pulse_frequency;
  558. this.form.breathing_rated = resp.monitor.breathing_rate ? resp.monitor.breathing_rate : ''
  559. this.form.systolic_bp = '' // this.last_monitor_record.systolic_blood_pressure;
  560. this.form.diastolic_bp = '' // this.last_monitor_record.diastolic_blood_pressure;
  561. this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume : ''
  562. this.form.venous_pressure = '' // this.last_monitor_record.venous_pressure;
  563. this.form.arterial_pressure = '' // this.last_monitor_record.arterial_pressure;
  564. this.form.transmembrane_pressure = '' // this.last_monitor_record.transmembrane_pressure;
  565. this.form.ultrafiltration_rate = resp.monitor.ultrafiltration_rate ? resp.monitor.ultrafiltration_rate : ''
  566. this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume ? resp.monitor.ultrafiltration_volume : ''
  567. this.form.sodium_concentration = resp.monitor.sodium_concentration ? resp.monitor.sodium_concentration : ''
  568. this.form.dialysate_temperature = resp.monitor.dialysate_temperature ? resp.monitor.dialysate_temperature : ''
  569. this.form.temperature = resp.monitor.temperature ? resp.monitor.temperature : ''
  570. this.form.replacement_rate = resp.monitor.replacement_rate ? resp.monitor.replacement_rate : ''
  571. this.form.displacement_quantity = '' // this.last_monitor_record.displacement_quantity;
  572. this.form.conductivity = ''
  573. this.form.displacement_flow_quantity = ''
  574. this.form.ktv = '' // this.last_monitor_record.ktv;
  575. this.form.symptom = '' // this.last_monitor_record.symptom;
  576. this.form.dispose = '' // this.last_monitor_record.dispose;
  577. this.form.result = '' // this.last_monitor_record.result;
  578. this.form.id = -1
  579. console.log(this.form)
  580. })
  581. },
  582. getLastRecord () {
  583. let params = {
  584. patient_id: this.patient.id
  585. }
  586. GetMonitor(params).then(rs => {
  587. var resp = rs.data
  588. if (resp.state == 1) {
  589. var monitor = resp.data.monitor
  590. if (monitor.systolic_blood_pressure == 0) {
  591. this.form.systolic_bp = ''
  592. } else {
  593. this.form.systolic_bp = monitor.systolic_blood_pressure
  594. }
  595. if (monitor.diastolic_blood_pressure == 0) {
  596. this.form.diastolic_bp = ''
  597. } else {
  598. this.form.diastolic_bp = monitor.diastolic_blood_pressure
  599. }
  600. if (monitor.pulse_frequency == 0) {
  601. this.form.pulse_frequency = ''
  602. } else {
  603. this.form.pulse_frequency = monitor.pulse_frequency
  604. }
  605. if (monitor.breathing_rate == 0) {
  606. this.form.breathing_rated = ''
  607. } else {
  608. this.form.breathing_rated = monitor.breathing_rate
  609. }
  610. if (monitor.blood_flow_volume == 0) {
  611. this.form.blood_flow_volume = ''
  612. } else {
  613. this.form.blood_flow_volume = monitor.blood_flow_volume
  614. }
  615. if (monitor.venous_pressure == 0) {
  616. this.form.venous_pressure = ''
  617. } else {
  618. this.form.venous_pressure = monitor.venous_pressure
  619. }
  620. if (monitor.arterial_pressure == 0) {
  621. this.form.arterial_pressure = ''
  622. } else {
  623. this.form.arterial_pressure = monitor.arterial_pressure
  624. }
  625. if (monitor.transmembrane_pressure == 0) {
  626. this.form.transmembrane_pressure = ''
  627. } else {
  628. this.form.transmembrane_pressure = monitor.transmembrane_pressure
  629. }
  630. if (monitor.ultrafiltration_rate == 0) {
  631. this.form.ultrafiltration_rate = ''
  632. } else {
  633. this.form.ultrafiltration_rate = monitor.ultrafiltration_rate
  634. }
  635. if (monitor.ultrafiltration_volume == 0) {
  636. this.form.ultrafiltration_volume = ''
  637. } else {
  638. this.form.ultrafiltration_volume = monitor.ultrafiltration_volume
  639. }
  640. if (monitor.sodium_concentration == 0) {
  641. this.form.sodium_concentration = ''
  642. } else {
  643. this.form.sodium_concentration = monitor.sodium_concentration
  644. }
  645. if (monitor.dialysate_temperature == 0) {
  646. this.form.dialysate_temperature = ''
  647. } else {
  648. this.form.dialysate_temperature = monitor.dialysate_temperature
  649. }
  650. if (monitor.temperature == 0) {
  651. this.form.temperature = ''
  652. } else {
  653. this.form.temperature = monitor.temperature
  654. }
  655. if (monitor.replacement_rate == 0) {
  656. this.form.replacement_rate = ''
  657. } else {
  658. this.form.replacement_rate = monitor.replacement_rate
  659. }
  660. if (monitor.displacement_quantity == 0) {
  661. this.form.displacement_quantity = ''
  662. } else {
  663. this.form.displacement_quantity = monitor.displacement_quantity
  664. }
  665. if (monitor.conductivity == 0) {
  666. this.form.conductivity = ''
  667. } else {
  668. this.form.conductivity = monitor.conductivity
  669. }
  670. if (monitor.displacement_flow_quantity == 0) {
  671. this.form.displacement_flow_quantity = ''
  672. } else {
  673. this.form.displacement_flow_quantity =
  674. monitor.displacement_flow_quantity
  675. }
  676. this.form.ktv = monitor.ktv
  677. this.form.symptom = monitor.symptom
  678. this.form.dispose = monitor.dispose
  679. this.form.result = monitor.result
  680. this.form.operate_time = new Date(
  681. monitor.operate_time * 1000
  682. ).getTime()
  683. this.form.id = -1
  684. }
  685. })
  686. },
  687. selectRow (index, row) {
  688. this.currentIndex = index
  689. this.currentRow = row
  690. },
  691. inputFocus: function (event) {
  692. var input = event.target
  693. setTimeout(function () {
  694. input.parentNode.scrollIntoView()
  695. }, 0)
  696. // if (input.setSelectionRange) {
  697. // setTimeout(function () {
  698. // input.setSelectionRange(0, input.value.length);
  699. // }, 0);
  700. // } else if (input.createTextRange) {
  701. // var rng = input.createTextRange();
  702. // rng.move('character', input.value.length);
  703. // rng.select();
  704. // }
  705. },
  706. lastInputFocus: function (event) {
  707. var input = event.target
  708. setTimeout(function () {
  709. input.style.marginBottom = '2rem'
  710. input.parentNode.scrollIntoView()
  711. }, 0)
  712. },
  713. lastInputBlur: function (event) {
  714. var input = event.target
  715. setTimeout(function () {
  716. input.style.marginBottom = ''
  717. }, 0)
  718. },
  719. close: function () {
  720. this.$emit('close')
  721. },
  722. setRecords (records) {
  723. this.monitorRecords = records
  724. },
  725. parseTime (time, layout) {
  726. return parseTime(time, layout)
  727. },
  728. addRecords (records) {
  729. this.tableDate.push(...records)
  730. },
  731. deleteForm () {
  732. if (this.currentIndex < 0 || this.currentRow == null) {
  733. Toast.fail('请先选择要删除的记录')
  734. return false
  735. }
  736. Dialog.confirm({
  737. title: '删除监测记录',
  738. message: '是否删除该监测记录'
  739. })
  740. .then(() => {
  741. let params = {
  742. record_id: this.currentRow.id,
  743. patient_id: this.patient.id
  744. }
  745. deleteMonitorRecord(params).then(rs => {
  746. var resp = rs.data
  747. if (resp.state == 1) {
  748. var recordId = resp.data.record_id
  749. this.$emit('did_delete_monitor', recordId)
  750. Toast.success('删除成功')
  751. } else {
  752. Toast.fail(resp.msg)
  753. }
  754. })
  755. })
  756. .catch(() => {})
  757. },
  758. handleConfirm (time) {
  759. this.form.operate_time = time.getTime()
  760. // var timeMap = time.split(":");
  761. // this.form.monitor_time = time;
  762. // this.monitor_time_str =
  763. // parseTime(this.form.monitor_date, "{y}-{m}-{d}") +
  764. // " " +
  765. // this.form.monitor_time;
  766. // this.monitor_time_str = this.handleTime(time);
  767. // this.form.monitor_time = parseTime(time, "{h}:{i}")
  768. // this.form.monitor_date = Math.round(new Date(parseTime(time, "{y}-{m}-{d}") + " 00:00:00").getTime()/1000);
  769. },
  770. handleTime (time) {
  771. var year = time.getFullYear()
  772. var month = time.getMonth() + 1
  773. var day = time.getDate()
  774. var hour = time.getHours()
  775. var minute = time.getMinutes()
  776. if (month < 10) {
  777. month = '0' + month
  778. }
  779. if (day < 10) {
  780. day = '0' + day
  781. }
  782. if (hour < 10) {
  783. hour = '0' + hour
  784. }
  785. if (minute < 10) {
  786. minute = '0' + minute
  787. }
  788. return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':00'
  789. },
  790. chooseTime () {
  791. this.$refs.picker.open()
  792. },
  793. openEidtForm () {
  794. if (this.currentIndex < 0 || this.currentRow == null) {
  795. Toast.fail('请先选择要修改的记录')
  796. return false
  797. }
  798. this.formTitle = '修改监测'
  799. this.formPanel = true
  800. this.listPanel = false
  801. // console.log("this.currentRow", this.currentRow);
  802. if (this.currentRow.systolic_blood_pressure == 0) {
  803. this.form.systolic_bp = ''
  804. } else {
  805. this.form.systolic_bp = this.currentRow.systolic_blood_pressure
  806. }
  807. if (this.currentRow.diastolic_blood_pressure == 0) {
  808. this.form.diastolic_bp = ''
  809. } else {
  810. this.form.diastolic_bp = this.currentRow.diastolic_blood_pressure
  811. }
  812. if (this.currentRow.pulse_frequency == 0) {
  813. this.form.pulse_frequency = ''
  814. } else {
  815. this.form.pulse_frequency = this.currentRow.pulse_frequency
  816. }
  817. if (this.currentRow.breathing_rate == 0) {
  818. this.form.breathing_rated = ''
  819. } else {
  820. this.form.breathing_rated = this.currentRow.breathing_rate
  821. }
  822. if (this.currentRow.blood_flow_volume == 0) {
  823. this.form.blood_flow_volume = ''
  824. } else {
  825. this.form.blood_flow_volume = this.currentRow.blood_flow_volume
  826. }
  827. if (this.currentRow.venous_pressure == 0) {
  828. this.form.venous_pressure = ''
  829. } else {
  830. this.form.venous_pressure = this.currentRow.venous_pressure
  831. }
  832. if (this.currentRow.arterial_pressure == 0) {
  833. this.form.arterial_pressure = ''
  834. } else {
  835. this.form.arterial_pressure = this.currentRow.arterial_pressure
  836. }
  837. if (this.currentRow.transmembrane_pressure == 0) {
  838. this.form.transmembrane_pressure = ''
  839. } else {
  840. this.form.transmembrane_pressure = this.currentRow.transmembrane_pressure
  841. }
  842. if (this.currentRow.ultrafiltration_rate == 0) {
  843. this.form.ultrafiltration_rate = ''
  844. } else {
  845. this.form.ultrafiltration_rate = this.currentRow.ultrafiltration_rate
  846. }
  847. if (this.currentRow.ultrafiltration_volume == 0) {
  848. this.form.ultrafiltration_volume = ''
  849. } else {
  850. this.form.ultrafiltration_volume = this.currentRow.ultrafiltration_volume
  851. }
  852. if (this.currentRow.sodium_concentration == 0) {
  853. this.form.sodium_concentration = ''
  854. } else {
  855. this.form.sodium_concentration = this.currentRow.sodium_concentration
  856. }
  857. if (this.currentRow.dialysate_temperature == 0) {
  858. this.form.dialysate_temperature = ''
  859. } else {
  860. this.form.dialysate_temperature = this.currentRow.dialysate_temperature
  861. }
  862. if (this.currentRow.temperature == 0) {
  863. this.form.temperature = ''
  864. } else {
  865. this.form.temperature = this.currentRow.temperature
  866. }
  867. if (this.currentRow.replacement_rate == 0) {
  868. this.form.replacement_rate = ''
  869. } else {
  870. this.form.replacement_rate = this.currentRow.replacement_rate
  871. }
  872. if (this.currentRow.displacement_quantity == 0) {
  873. this.form.displacement_quantity = ''
  874. } else {
  875. this.form.displacement_quantity = this.currentRow.displacement_quantity
  876. }
  877. if (this.currentRow.conductivity == 0) {
  878. this.form.conductivity = ''
  879. } else {
  880. this.form.conductivity = this.currentRow.conductivity
  881. }
  882. if (this.currentRow.displacement_flow_quantity == 0) {
  883. this.form.displacement_flow_quantity = ''
  884. } else {
  885. this.form.displacement_flow_quantity = this.currentRow.displacement_flow_quantity
  886. }
  887. if (this.currentRow.ktv == 0) {
  888. this.form.ktv = ''
  889. } else {
  890. this.form.ktv = this.currentRow.ktv
  891. }
  892. this.form.blood_oxygen_saturation = this.currentRow.blood_oxygen_saturation
  893. this.form.symptom = this.currentRow.symptom
  894. this.form.dispose = this.currentRow.dispose
  895. this.form.result = this.currentRow.result
  896. this.form.id = this.currentRow.id
  897. this.form.operate_time = this.currentRow.operate_time * 1000
  898. // this.monitor_time_str =
  899. // parseTime(this.form.monitor_date, "{y}-{m}-{d}") +
  900. // " " +
  901. // this.form.monitor_time;
  902. },
  903. openForm () {
  904. this.formTitle = '新增监测'
  905. this.formPanel = true
  906. this.listPanel = false
  907. // if(this.monitor_time_str == "") {
  908. var date = this.$route.query && this.$route.query.date
  909. date *= 1000
  910. var newDate = new Date(date)
  911. var y = newDate.getFullYear()
  912. var m = newDate.getMonth() + 1
  913. var d = newDate.getDate()
  914. var record_date =
  915. y + '/' + (m < 10 ? '0' + m : m) + '/' + (d < 10 ? '0' + d : d)
  916. this.form.monitor_date =
  917. new Date(record_date + ' 00:00:00').getTime() / 1000
  918. var nowTime = new Date()
  919. // this.form.monitor_time = parseTime(nowTime, "{h}:{i}");
  920. // this.monitor_time_str = this.handleTime(nowTime);
  921. // this.monitor_time_str = record_date + " " + this.form.monitor_time;
  922. this.getLastRecordTody()
  923. // }
  924. },
  925. submitEditAction: function () {
  926. this.loading = true
  927. Toast.loading({ forbidClick: true, duration: 0 })
  928. var params = {}
  929. params.patient_id = this.patient.id
  930. params.order_id = this.order == null ? 0 : this.order.id
  931. params.date = this.form.monitor_date
  932. // params.time = this.form.monitor_time;
  933. params.operate_time = parseInt(this.form.operate_time / 1000)
  934. params.pulse_frequency = this.form.pulse_frequency
  935. params.breathing_rated = this.form.breathing_rated
  936. params.systolic_bp = this.form.systolic_bp
  937. params.diastolic_bp = this.form.diastolic_bp
  938. params.blood_flow_volume = this.form.blood_flow_volume
  939. params.venous_pressure = this.form.venous_pressure
  940. params.arterial_pressure = this.form.arterial_pressure
  941. params.transmembrane_pressure = this.form.transmembrane_pressure
  942. params.ultrafiltration_rate = this.form.ultrafiltration_rate
  943. params.ultrafiltration_volume = this.form.ultrafiltration_volume
  944. params.sodium_concentration = this.form.sodium_concentration
  945. params.dialysate_temperature = this.form.dialysate_temperature
  946. params.temperature = this.form.temperature
  947. params.replacement_rate = this.form.replacement_rate
  948. params.displacement_quantity = this.form.displacement_quantity
  949. params.ktv = this.form.ktv
  950. params.conductivity = this.form.conductivity
  951. params.symptom = this.form.symptom
  952. params.dispose = this.form.dispose
  953. params.result = this.form.result
  954. params.monitoring_nurse = this.form.monitoring_nurse
  955. params.displacement_flow_quantity = this.form.displacement_flow_quantity
  956. params.blood_oxygen_saturation = this.form.blood_oxygen_saturation
  957. params.id = this.form.id
  958. editMonitorRecord(params).then(rs => {
  959. var resp = rs.data
  960. if (resp.state == 1) {
  961. this.loading = false
  962. var monitor = resp.data.monitor
  963. this.$emit('did_edit_monitor', monitor)
  964. this.selectRow(-1, null)
  965. this.form.pulse_frequency = ''
  966. this.form.breathing_rated = ''
  967. this.form.systolic_bp = ''
  968. this.form.diastolic_bp = ''
  969. this.form.blood_flow_volume = ''
  970. this.form.venous_pressure = ''
  971. this.form.arterial_pressure = ''
  972. this.form.transmembrane_pressure = ''
  973. this.form.ultrafiltration_rate = ''
  974. this.form.ultrafiltration_volume = ''
  975. this.form.sodium_concentration = ''
  976. this.form.dialysate_temperature = ''
  977. this.form.temperature = ''
  978. this.form.replacement_rate = ''
  979. this.form.displacement_quantity = ''
  980. this.form.ktv = ''
  981. this.form.blood_oxygen_saturation = ''
  982. this.form.symptom = ''
  983. this.form.dispose = ''
  984. this.form.result = ''
  985. this.form.conductivity = ''
  986. this.form.displacement_flow_quantity = ''
  987. this.form.id = -1
  988. Toast.success('修改成功')
  989. this.formPanel = false
  990. this.listPanel = true
  991. } else {
  992. this.loading = false
  993. Toast.fail(resp.msg)
  994. }
  995. }).catch(error => {
  996. Toast.fail('请求失败')
  997. })
  998. },
  999. submitAction: function () {
  1000. this.loading = true
  1001. Toast.loading({ forbidClick: true, duration: 0 })
  1002. var params = {}
  1003. params.patient_id = this.patient.id
  1004. params.order_id = this.order == null ? 0 : this.order.id
  1005. params.date = this.form.monitor_date
  1006. params.operate_time = parseInt(this.form.operate_time / 1000)
  1007. params.pulse_frequency = this.form.pulse_frequency
  1008. params.breathing_rated = this.form.breathing_rated
  1009. params.systolic_bp = this.form.systolic_bp
  1010. params.diastolic_bp = this.form.diastolic_bp
  1011. params.blood_flow_volume = this.form.blood_flow_volume
  1012. params.venous_pressure = this.form.venous_pressure
  1013. params.arterial_pressure = this.form.arterial_pressure
  1014. params.transmembrane_pressure = this.form.transmembrane_pressure
  1015. params.ultrafiltration_rate = this.form.ultrafiltration_rate
  1016. params.ultrafiltration_volume = this.form.ultrafiltration_volume
  1017. params.sodium_concentration = this.form.sodium_concentration
  1018. params.dialysate_temperature = this.form.dialysate_temperature
  1019. params.temperature = this.form.temperature
  1020. params.replacement_rate = this.form.replacement_rate
  1021. params.displacement_quantity = this.form.displacement_quantity
  1022. params.conductivity = this.form.conductivity
  1023. params.displacement_flow_quantity = this.form.displacement_flow_quantity
  1024. params.blood_oxygen_saturation = this.form.blood_oxygen_saturation
  1025. params.ktv = this.form.ktv
  1026. params.symptom = this.form.symptom
  1027. params.dispose = this.form.dispose
  1028. params.result = this.form.result
  1029. params.monitoring_nurse = this.form.monitoring_nurse
  1030. addMonitorRecord(params)
  1031. .then(rs => {
  1032. var resp = rs.data
  1033. if (resp.state == 1) {
  1034. this.loading = false
  1035. var monitor = resp.data.monitor
  1036. this.$emit('did_add_monitor', monitor)
  1037. // this.monitor_records.unshift(monitor)
  1038. // this.monitor_records= this.quickSort(this.monitor_records,"operate_time",false)
  1039. this.form.pulse_frequency = ''
  1040. this.form.breathing_rated = ''
  1041. this.form.systolic_bp = ''
  1042. this.form.diastolic_bp = ''
  1043. this.form.blood_flow_volume = ''
  1044. this.form.venous_pressure = ''
  1045. this.form.arterial_pressure = ''
  1046. this.form.transmembrane_pressure = ''
  1047. this.form.ultrafiltration_rate = ''
  1048. this.form.ultrafiltration_volume = ''
  1049. this.form.sodium_concentration = ''
  1050. this.form.dialysate_temperature = ''
  1051. this.form.temperature = ''
  1052. this.form.replacement_rate = ''
  1053. this.form.displacement_quantity = ''
  1054. this.form.ktv = ''
  1055. this.form.symptom = ''
  1056. this.form.dispose = ''
  1057. this.form.result = ''
  1058. this.form.conductivity = ''
  1059. this.form.displacement_flow_quantity = ''
  1060. // this.last_monitor_record.sodium_concentration =
  1061. // monitor.sodium_concentration
  1062. // this.last_monitor_record.dialysate_temperature =
  1063. // monitor.dialysate_temperature
  1064. Toast.success('新增成功')
  1065. this.formPanel = false
  1066. this.listPanel = true
  1067. } else {
  1068. this.loading = false
  1069. Toast.fail(resp.msg)
  1070. }
  1071. })
  1072. .catch(err => {
  1073. this.loading = false
  1074. Toast.fail(err)
  1075. })
  1076. },
  1077. showSubMenu: function (val) {
  1078. switch (val) {
  1079. case 'symptom':
  1080. this.propForm.type = 1
  1081. this.formPanel = false
  1082. this.propForm.title = '病情变化'
  1083. this.visibility = true
  1084. this.propForm.list = getDataConfig('hemodialysis', 'symptoms')
  1085. this.propForm.optionList = []
  1086. this.propForm.isMultiple = 2
  1087. if (this.form.symptom.length > 0) {
  1088. this.propForm.result = this.form.symptom.split(',')
  1089. } else {
  1090. this.propForm.result = []
  1091. }
  1092. break
  1093. case 'dispose':
  1094. this.propForm.type = 2
  1095. this.formPanel = false
  1096. this.propForm.title = '处理'
  1097. this.visibility = true
  1098. this.propForm.list = getDataConfig('hemodialysis', 'deals')
  1099. this.propForm.optionList = []
  1100. this.propForm.isMultiple = 2
  1101. if (this.form.dispose.length > 0) {
  1102. this.propForm.result = this.form.dispose.split(',')
  1103. } else {
  1104. this.propForm.result = []
  1105. }
  1106. break
  1107. case 'result':
  1108. this.propForm.type = 3
  1109. this.formPanel = false
  1110. this.propForm.title = '结果'
  1111. this.visibility = true
  1112. this.propForm.list = getDataConfig('hemodialysis', 'results')
  1113. this.propForm.optionList = []
  1114. this.propForm.isMultiple = 2
  1115. if (this.form.result.length > 0) {
  1116. this.propForm.result = this.form.result.split(',')
  1117. } else {
  1118. this.propForm.result = []
  1119. }
  1120. break
  1121. }
  1122. },
  1123. menuCancle: function () {
  1124. this.visibility = false
  1125. this.formPanel = true
  1126. },
  1127. menuComfirm: function (val) {
  1128. this.visibility = false
  1129. this.formPanel = true
  1130. switch (val.type) {
  1131. case 1:
  1132. this.form.symptom = val.result.join(',')
  1133. break
  1134. case 2:
  1135. this.form.dispose = val.result.join(',')
  1136. break
  1137. case 3:
  1138. this.form.result = val.result.join(',')
  1139. break
  1140. }
  1141. },
  1142. open: function () {
  1143. this.listPanel = true
  1144. this.formPanel = false
  1145. this.visibility = false
  1146. this.$refs.picker.close()
  1147. var dialogTop = document.querySelector('#dialogTop')
  1148. if (dialogTop != null) {
  1149. this.$nextTick(() => {
  1150. dialogTop.scrollTop = 0
  1151. })
  1152. }
  1153. },
  1154. parseTime: function (time, format) {
  1155. return parseTime(time, format)
  1156. },
  1157. quickSort (arr, name, snum) {
  1158. // 如果数组<=1,则直接返回
  1159. if (arr.length <= 1) {
  1160. return arr
  1161. }
  1162. var pivotIndex = Math.floor(arr.length / 2)
  1163. // 找基准,并把基准从原数组删除
  1164. var pivot = arr.splice(pivotIndex, 1)[0]
  1165. var middleNum = pivot[name]
  1166. // 定义左右数组
  1167. var left = []
  1168. var right = []
  1169. // 比基准小的放在left,比基准大的放在right
  1170. if (snum) {
  1171. for (var i = 0; i < arr.length; i++) {
  1172. if (arr[i][name] <= middleNum) {
  1173. left.push(arr[i])
  1174. } else {
  1175. right.push(arr[i])
  1176. }
  1177. }
  1178. } else {
  1179. for (var i = 0; i < arr.length; i++) {
  1180. if (arr[i][name] <= middleNum) {
  1181. left.push(arr[i])
  1182. } else {
  1183. right.push(arr[i])
  1184. }
  1185. }
  1186. }
  1187. // 递归,返回所需数组
  1188. return this.quickSort(left, name, snum).concat(
  1189. [pivot],
  1190. this.quickSort(right, name, snum)
  1191. )
  1192. }
  1193. },
  1194. components: {
  1195. CheckBoxSubMenu
  1196. }
  1197. }
  1198. </script>
  1199. <style style="stylesheet/scss" lang="scss" scoped>
  1200. .DialogContent {
  1201. .content {
  1202. .cell {
  1203. float: left;
  1204. width: 4.8rem;
  1205. margin: 0.35rem 0 0 0.5rem !important;
  1206. label {
  1207. display: block;
  1208. height: 0.55rem;
  1209. line-height: 0.55rem;
  1210. color: $pgh-color;
  1211. font-size: 0.45rem;
  1212. margin-bottom: 0.2rem;
  1213. }
  1214. select {
  1215. width: 100%;
  1216. padding: 0.2rem 0;
  1217. border: 1px $border-color solid;
  1218. border-radius: 2px;
  1219. padding-left: 5px;
  1220. }
  1221. .inputBox {
  1222. border: 1px $border-color solid;
  1223. border-radius: 2px;
  1224. padding: 0.18rem 0;
  1225. padding-left: 5px;
  1226. width: 100%;
  1227. @media only screen and (max-width: 415px) {
  1228. padding: 12px 0;
  1229. }
  1230. @media only screen and (min-width: 415px) and (max-width: 767px) {
  1231. padding: 9.4px 0;
  1232. }
  1233. @media only screen and (min-width: 768px) {
  1234. height: 60px;
  1235. line-height: 60px;
  1236. font-size: 0.45rem;
  1237. }
  1238. }
  1239. .typeButton {
  1240. height: 38px;
  1241. line-height: 38px;
  1242. font-size: 0.42rem;
  1243. padding: 0 !important;
  1244. @media only screen and (min-width: 415px) and (max-width: 767px) {
  1245. font-size: 0.4rem;
  1246. }
  1247. @media only screen and (min-width: 768px) {
  1248. height: 60px;
  1249. line-height: 60px;
  1250. font-size: 0.45rem;
  1251. padding: 0 !important;
  1252. }
  1253. }
  1254. .input_focus {
  1255. margin-bottom: 2rem;
  1256. }
  1257. .textarea {
  1258. width: 100%;
  1259. height: 1.22rem;
  1260. border: 1px $border-color solid;
  1261. border-radius: 2px;
  1262. padding-left: 5px;
  1263. }
  1264. }
  1265. .width {
  1266. width: 95%;
  1267. @include box-sizing;
  1268. label {
  1269. display: inline-block;
  1270. }
  1271. button {
  1272. background: $main-color;
  1273. color: #fff;
  1274. border-radius: 6px;
  1275. width: 3.1rem;
  1276. height: 0.9rem;
  1277. line-height: 0.9rem;
  1278. text-align: center;
  1279. margin: 0 0 0.9rem 0;
  1280. }
  1281. }
  1282. .center {
  1283. text-align: center;
  1284. }
  1285. }
  1286. }
  1287. .row-class-active > td {
  1288. background: #badcff !important;
  1289. }
  1290. .doctor {
  1291. font-size: 0.45rem;
  1292. }
  1293. </style>
  1294. <style lang="scss">
  1295. .el-table td {
  1296. padding: 0;
  1297. }
  1298. .el-table th {
  1299. padding: 6px 0;
  1300. }
  1301. </style>