OHpressuresore.vue 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  1. <!-- OH压疮评估 -->
  2. <template>
  3. <div class="patient-container">
  4. <patient-sidebar :id="patientID" defaultActive="5-4" @tran-patient="tranpatient"></patient-sidebar>
  5. <div>
  6. <div class="patient-app-container advice-container app-container">
  7. <div class="content_top">
  8. <!-- 左 -->
  9. <div style="width: 58%;">
  10. <div style="margin-bottom: 20px; display: flex;">
  11. <div style="flex:2" >
  12. <el-button type="primary" @click="OHadd" v-if="add_show">新增</el-button>
  13. <el-button style="background:#00B6D7;color:white" @click="editor_OH" v-if="zsgy_open==1">编辑</el-button>
  14. <el-button type="danger" @click="dele_OH" v-if="zsgy_open==1">删除</el-button>
  15. <el-button type="success" @click="print_OH" v-if="zsgy_open==1">打印</el-button>
  16. </div>
  17. <div style="flex:1" v-if="baocun_open==1">
  18. <el-button type="primary" @click="save_OH" v-if="this.qufen ==false">保存</el-button>
  19. <el-button type="primary" @click="updateBedPatientList" v-if="this.qufen == true && this.dele_id !=''">保存1</el-button>
  20. <el-button @click="cancel_OH" >取消</el-button>
  21. </div>
  22. </div>
  23. <div>
  24. <div style="font-size: 20px;margin-bottom: 20px;">OH压疮评估表</div>
  25. <div style="width: 100%;">
  26. <table class="table" border="1" style="width: 100%;">
  27. <thead>
  28. <tr>
  29. <th style="width: 150px;">项目</th>
  30. <th>分值</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <tr class="bg_color">
  35. <td class="start">自主体位变换</td>
  36. <td>
  37. <div class="jiange">
  38. <span v-for="item in tiwei" class="rightjiange" @change="handleCheckedCitiesChange($event,item)">
  39. <label><input type="checkbox" class="checkbox1" v-model="item.is_check" :value="item.value"/>&nbsp;{{ item.label }}</label>
  40. </span>
  41. </div>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td class="start">病理性骨突出</td>
  46. <td>
  47. <div class="jiange">
  48. <span v-for="item in bingli" class="rightjiange" @change="bingligu(item)">
  49. <label><input type="checkbox" class="checkbox2" v-model="item.is_check" :value="item.value" />&nbsp;{{ item.label }}</label>
  50. </span>
  51. </div>
  52. </td>
  53. </tr>
  54. <tr class="bg_color">
  55. <td class="start">浮肿</td>
  56. <td>
  57. <div class="jiange">
  58. <span v-for="item in edema" class="rightjiange" @change="fozhong_chang(item)">
  59. <label><input type="checkbox" class="checkbox3" name="ball" v-model="item.is_check" :value="item.value" />&nbsp;{{ item.label }}</label>
  60. </span>
  61. </div>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td class="start">关节痉挛</td>
  66. <td>
  67. <div class="jiange">
  68. <span v-for="item in guanjie" class="rightjiange" @change="guanjie_change(item)">
  69. <label><input type="checkbox" class="checkbox4" name="ball" v-model="item.is_check" :value="item.value" />&nbsp;{{ item.label }}</label>
  70. </span>
  71. </div>
  72. </td>
  73. </tr>
  74. </tbody>
  75. </table>
  76. </div>
  77. <div style="vertical-align: top; margin: 10px 0px; position: relative;">
  78. <span style="position: relative; top: -55px;">护理措施:</span>
  79. <div style="margin-top: 20px;display: inline-block; width: 85%;">
  80. <el-input maxlength="200" type = "textarea" :rows="3" v-model="oh_huli" placeholder="输入护理措施,200字以内" ></el-input>
  81. </div>
  82. </div>
  83. <div>
  84. <div class="bottoms">
  85. <span>总分:</span>
  86. <el-input v-model="Totalpoints" style="width: 80px;"></el-input>分
  87. </div>
  88. <div class="bottoms">
  89. <span>评估日期:</span>
  90. <el-date-picker
  91. v-model="oh_date"
  92. type="date"
  93. placeholder="选择日期"
  94. value-format="yyyy-MM-dd"
  95. :clearable="false"
  96. style="width: 150px;">
  97. </el-date-picker>
  98. </div>
  99. <div class="bottoms">
  100. <span>评估人:</span>
  101. <el-select v-model="oh_appraiser" placeholder="请选择" style="width:120px;">
  102. <el-option
  103. v-for="item in oh_pinggr"
  104. :key="item.id"
  105. :label="item.label"
  106. :value="item.id"
  107. >
  108. </el-option>
  109. </el-select>
  110. </div>
  111. </div>
  112. <div id="ctrl-xgtlpic-mask2" class="readonly" data-text="图片操作的遮罩层" v-show="append2 == false"></div>
  113. <div id="ctrl-xgtlpic-mask" class="readonly" data-text="图片操作的遮罩层" v-show="append == false"></div>
  114. </div>
  115. <hr style="width: 100%;margin-top: 20px; border: none;height: 1px;background: #DCDFE6;"/>
  116. <div class="shuoming">
  117. <p>说明:</p>
  118. <p>1、本表适用于急症科、血液净化科等非病房科室。</p>
  119. <p>2、总分:10分,分值越大风险越高 ;1-3分为低危;4-6分为中危;7-10分为高危。</p>
  120. <p>3、病理性骨突出指骶尾部(或受压部位骨突出处)两侧均高于皮肤
  121. <2cm为“无”;两侧均为2cm或一侧<2cm一侧2cm为“轻度/中度”;两侧均>2cm或一侧>2cm一侧2cm为“高度”。
  122. </p>
  123. <p>参考:北海道大学名授大浦武彦,堀田由浩. 利用OH 评估法进行压疮预防[M].东京:中央法规出版社,2005:11</p>
  124. </div>
  125. </div>
  126. <!-- 虚线 -->
  127. <div style="height: 100vh; width: 1px; border-left:1px dashed #DCDFE6 ;"></div>
  128. <!-- 右 -->
  129. <div style="width: 38%;">
  130. <div style="font-size: 20px; margin-bottom: 20px;">评估历史记录</div>
  131. <div style="width: 100%;">
  132. <el-table
  133. :data="history_OH"
  134. stripe
  135. border
  136. @row-click="dele_click"
  137. :highlight-current-row="true"
  138. :header-cell-style="{
  139. background: '#0077ff9f',color:'white'}"
  140. style="width: 100%">
  141. <el-table-column
  142. prop="date"
  143. label="评估日期"
  144. width="180">
  145. </el-table-column>
  146. <el-table-column
  147. prop="mark"
  148. label="总分"
  149. >
  150. </el-table-column>
  151. <el-table-column
  152. prop="evaluate"
  153. label="评估人"
  154. >
  155. </el-table-column>
  156. </el-table>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. <!-- 打印 -->
  163. <el-dialog
  164. title="提示"
  165. :visible.sync="open_print"
  166. width="67%"
  167. >
  168. <div>
  169. <el-button type="primary" @click="print_pingfen" style="float:right">打印</el-button>
  170. <div id="mingxi" >
  171. <div class="diedao_content" style="">
  172. <div style="width:100%;margin-top: 20px;">
  173. <div style="text-align: center;"><h1>血液透析中心跌倒评估记录</h1></div>
  174. <div style="margin-top: 20px;font-size: 16px;">
  175. <span>患者姓名:{{ Patient_info.name }}</span>
  176. <span>透析号:{{ Patient_info.dialysis_no }}</span>
  177. <span>评估日期:{{ oh_date }}</span>
  178. <span>评估护士:{{ getpinggr(oh_appraiser) }}</span>
  179. <span>总分:{{ Totalpoints }}</span>
  180. <span>打印时间:{{ dayintime }}</span>
  181. </div>
  182. <table class="tables" border="1" style="width: 100%;border-collapse: collapse;">
  183. <thead>
  184. <tr>
  185. <th style="width: 150px;padding: 5px;">项目</th>
  186. <th style="padding: 5px;">分值</th>
  187. </tr>
  188. </thead>
  189. <tbody>
  190. <tr class="bg_color">
  191. <td class="start">自主体位变换</td>
  192. <td>
  193. <div class="jiange">
  194. <span v-for="item in tiwei" class="rightjiange" @change="handleCheckedCitiesChange($event,item)">
  195. <label><input type="checkbox" class="checkbox1" name="ball" v-model="item.is_check" :value="item.value"/>&nbsp;{{ item.label }}</label>
  196. </span>
  197. </div>
  198. </td>
  199. </tr>
  200. <tr>
  201. <td class="start">病理性骨突出</td>
  202. <td>
  203. <div class="jiange">
  204. <span v-for="item in bingli" class="rightjiange" @change="bingligu(item)">
  205. <label><input type="checkbox" class="checkbox2" name="ball" v-model="item.is_check" :value="item.value" />&nbsp;{{ item.label }}</label>
  206. </span>
  207. </div>
  208. </td>
  209. </tr>
  210. <tr class="bg_color">
  211. <td class="start">浮肿</td>
  212. <td>
  213. <div class="jiange">
  214. <span v-for="item in edema" class="rightjiange" @change="fozhong_chang(item)">
  215. <label><input type="checkbox" class="checkbox3" name="ball" v-model="item.is_check" :value="item.value" />&nbsp;{{ item.label }}</label>
  216. </span>
  217. </div>
  218. </td>
  219. </tr>
  220. <tr>
  221. <td class="start">关节痉挛</td>
  222. <td>
  223. <div class="jiange">
  224. <span v-for="item in guanjie" class="rightjiange" @change="guanjie_change(item)">
  225. <label><input type="checkbox" class="checkbox4" name="ball" v-model="item.is_check" :value="item.value" />&nbsp;{{ item.label }}</label>
  226. </span>
  227. </div>
  228. </td>
  229. </tr>
  230. </tbody>
  231. </table>
  232. <div style="vertical-align: top; margin: 10px 0px; ">
  233. <span >护理措施:</span>
  234. <div style="margin-top: 20px;display: inline-block; width: 85%;height: 80px;">
  235. {{ oh_huli }}
  236. <!-- <el-input maxlength="200" type = "textarea" :rows="3" v-model="input" placeholder="输入护理措施,200字以内" ></el-input> -->
  237. </div>
  238. </div>
  239. <hr style="width: 100%;margin-top: 20px; border: 1px solid black;"/>
  240. <div class="shuoming">
  241. <p>说明:</p>
  242. <p>1、本表适用于急症科、血液净化科等非病房科室。</p>
  243. <p>2、总分:10分,分值越大风险越高 ;1-3分为低危;4-6分为中危;7-10分为高危。</p>
  244. <p>3、病理性骨突出指骶尾部(或受压部位骨突出处)两侧均高于皮肤
  245. <2cm为“无”;两侧均为2cm或一侧<2cm一侧2cm为“轻度/中度”;两侧均>2cm或一侧>2cm一侧2cm为“高度”。
  246. </p>
  247. <p>参考:北海道大学名授大浦武彦,堀田由浩. 利用OH 评估法进行压疮预防[M].东京:中央法规出版社,2005:11</p>
  248. </div>
  249. </div>
  250. </div>
  251. </div>
  252. </div>
  253. </el-dialog>
  254. <!-- 删除弹窗 -->
  255. <el-dialog
  256. title="提示"
  257. :visible.sync="dele_dialogVisible"
  258. width="30%">
  259. <span>确认删除该数据</span>
  260. <span slot="footer" class="dialog-footer">
  261. <el-button @click="dele_Cancel">取 消</el-button>
  262. <el-button type="primary" @click="deleclick">确 定</el-button>
  263. </span>
  264. </el-dialog>
  265. </div>
  266. </template>
  267. <script>
  268. import PatientSidebar from '../components/PatientSidebar.vue'
  269. import print from 'print-js'
  270. import { uParseTime } from '@/utils/tools'
  271. import {getAllNurseList,savePatientHpressuresore,getPatientBedlist,getPedPatientFallAssessmentById,deletePedPatientFallassment,updateBedPatientList} from '@/api/fallassement'
  272. export default {
  273. components:{
  274. PatientSidebar
  275. },
  276. data(){
  277. return{
  278. patientID:0,
  279. tiwei_num:null,
  280. bingli_num:null,
  281. edema_num:null,
  282. gaunjie_num:null,
  283. ball:'',
  284. input:'',
  285. history_OH:[],
  286. form:[],
  287. appraiser:null,
  288. value1:'',
  289. options:[],
  290. tiwei:[{id:1,value:0,label:'能(0分)',check:0,is_check:false},{id:2,value:1.5,label:'不能完全自立(1.5分)',check:0,is_check:false},{id:3,value:3,label:'不能(3分)',check:0,is_check:false}],
  291. bingli:[{value:0,label:'无(0分)',check:0,is_check:false},{value:1.5,label:'轻度/中度(1.5分)',check:0,is_check:false},{value:3,label:'高度(3分)',check:0,is_check:false}],
  292. edema:[{value:0,label:'无(0分)',check:0,is_check:false},{value:3,label:'有(3分)',check:0,is_check:false}],
  293. guanjie:[{value:0,label:'无(0分)',check:0,is_check:false},{value:1,label:'有(1分)',check:0,is_check:false}],
  294. oh_pinggr:[{id:1,label:'小米'},{id:2,label:'千仞雪'},{id:3,label:'千亦雪'},],
  295. checkList:[],
  296. checkList1:[],
  297. checkList2:[],
  298. checkList3:[],
  299. append:false,//控制遮罩层
  300. append2:false,
  301. xingai:0,
  302. add_open:1,//新增按钮控制条件
  303. baocun_open:0,//控制保存取消显示
  304. add_show:true,//控制新增显示
  305. zsgy_open:0,//控制编辑,删除,打印显示
  306. cancel_num:0,//取消的条件
  307. open_print:false,
  308. dele_id:'',//删除的索引
  309. dele_dialogVisible:false,
  310. oh_huli:'',//护理措施
  311. oh_date:this.getTime(new Date()),
  312. oh_appraiser:null,
  313. dayintime:this.getTime(new Date()),//打印
  314. // oh_pinggr:[],
  315. nurseList:[],
  316. limit:10,
  317. page:1,
  318. total:0,
  319. id:0,
  320. index:0,
  321. OH_zong:0,
  322. Patient_info:{name:'',dialysis_no:''},
  323. qufen:false,
  324. }
  325. },
  326. methods:{
  327. tranpatient(event){
  328. console.log('event',event);
  329. this.Patient_info={
  330. name:event.name,
  331. dialysis_no:event.dialysis_no
  332. }
  333. },
  334. //选择的总分
  335. handleCheckedCitiesChange(e,item){
  336. console.log('vvvv','bbbb',item);
  337. for(let i=0;i<this.tiwei.length;i++){
  338. if(item.value == this.tiwei[i].value){
  339. if(this.tiwei[i].check == 0){
  340. this.tiwei[i].check =1
  341. this.tiwei[i].is_check = true
  342. this.tiwei_num = item.value
  343. }else{
  344. this.tiwei[i].check =0
  345. this.tiwei[i].is_check = false
  346. this.tiwei_num = 0
  347. }
  348. }else{
  349. this.tiwei[i].check =0
  350. this.tiwei[i].is_check = false
  351. }
  352. }
  353. console.log('oooo',this.tiwei);
  354. },
  355. bingligu(item){
  356. for(let i=0;i<this.bingli.length;i++){
  357. if(item.value == this.bingli[i].value){
  358. if(this.bingli[i].check == 0){
  359. this.bingli[i].check =1
  360. this.bingli[i].is_check = true
  361. this.bingli_num = item.value
  362. }else{
  363. this.bingli[i].check =0
  364. this.bingli[i].is_check = false
  365. this.bingli_num = 0
  366. }
  367. }else{
  368. this.bingli[i].check =0
  369. this.bingli[i].is_check = false
  370. }
  371. }
  372. },
  373. fozhong_chang(item){
  374. for(let i=0;i<this.edema.length;i++){
  375. if(item.value == this.edema[i].value){
  376. if(this.edema[i].check == 0){
  377. this.edema[i].check =1
  378. this.edema[i].is_check = true
  379. this.edema_num = item.value
  380. }else{
  381. this.edema[i].check =0
  382. this.edema[i].is_check = false
  383. this.edema_num = 0
  384. }
  385. }else{
  386. this.edema[i].check =0
  387. this.edema[i].is_check = false
  388. }
  389. }
  390. },
  391. guanjie_change(item){
  392. for(let i=0;i<this.guanjie.length;i++){
  393. if(item.value == this.guanjie[i].value){
  394. if(this.guanjie[i].check == 0){
  395. this.guanjie[i].check =1
  396. this.guanjie[i].is_check = true
  397. this.gaunjie_num = item.value
  398. }else{
  399. this.guanjie[i].check =0
  400. this.guanjie[i].is_check = false
  401. this.gaunjie_num = 0
  402. }
  403. }else{
  404. this.guanjie[i].check =0
  405. this.guanjie[i].is_check = false
  406. }
  407. }
  408. },
  409. // 新增
  410. OHadd(){
  411. if(this.add_open==1){
  412. this.append=true
  413. this.append2 = true
  414. this.baocun_open=1
  415. this.add_show =false
  416. this.zsgy_open= 0
  417. this.qufen =false
  418. }else{
  419. this.append = false
  420. this.append2 = false
  421. }
  422. // for(let i in this.tiwei){
  423. // this.tiwei[i].is_check = false,
  424. // this.tiwei[i].check = 0
  425. // }
  426. // for(let i in this.bingli){
  427. // this.bingli[i].is_check = false,
  428. // this.bingli[i].check = 0
  429. // }
  430. // for(let i in this.edema){
  431. // this.edema[i].is_check = false,
  432. // this.edema[i].check = 0
  433. // }
  434. // for(let i in this.guanjie){
  435. // this.guanjie[i].is_check = false,
  436. // this.guanjie[i].check = 0
  437. // }
  438. // this.Totalpoints=0
  439. // this.oh_huli = ''
  440. // this.oh_appraiser = null
  441. },
  442. //保存
  443. save_OH(){
  444. if(this.oh_appraiser==null){
  445. this.$message('请选择评估人')
  446. }else{
  447. this.baocun_open=0
  448. this.add_show=true
  449. this.zsgy_open=1
  450. this.cancel_num=1
  451. const data = {}
  452. var list =[]
  453. data['patient_id'] = this.patientID
  454. data['tiwei'] = this.tiwei_num
  455. data['bingli'] = this.bingli_num
  456. data['edema'] = this.edema_num
  457. data['guanjie'] = this.gaunjie_num
  458. data['oh_huli'] = this.oh_huli
  459. data['record_date'] = this.oh_date
  460. data['oh_appraiser'] = this.oh_appraiser
  461. data['total'] = this.Totalpoints
  462. list.push(data)
  463. var params={
  464. patient_id:this.patientID,
  465. record_date:this.oh_date,
  466. is_type:2,
  467. list:list,
  468. }
  469. // console.log("data",data)
  470. savePatientHpressuresore(params).then(response=>{
  471. if(response.data.state ==1){
  472. console.log('response.data.state',response.data);
  473. const item = response.data.data.pedFallssessment
  474. var oh_text = JSON.parse(item.text)
  475. // console.log('oh_data.text',JSON.parse(item.text));
  476. const arr ={
  477. id:item.id,
  478. date:this.getTime(item.record_date),
  479. mark:oh_text.total,
  480. evaluate:this.getpinggr(oh_text.oh_appraiser),
  481. list:oh_text
  482. }
  483. this.history_OH.push(arr)
  484. }
  485. })
  486. return this.history_OH
  487. }
  488. },
  489. //编辑
  490. editor_OH(){
  491. this.add_show=false
  492. this.zsgy_open=0
  493. this.baocun_open=1
  494. this.cancel_num=1
  495. this.append2 = true
  496. this.qufen =true
  497. },
  498. // 选中数据
  499. dele_click(row, column, event){
  500. this.dele_id=row.id
  501. console.log('row',this.dele_id);
  502. if(this.baocun_open == 1){
  503. this.add_show = true
  504. this.zsgy_open = 1
  505. this.baocun_open = 0
  506. this.append2 = false
  507. }
  508. getPedPatientFallAssessmentById(this.dele_id).then(response=>{
  509. if(response.data.state ==1){
  510. const oheditor = response.data.data.fallassessment
  511. var editor =JSON.parse(oheditor.text)
  512. if(oheditor.id == row.id){
  513. for(let i in this.tiwei){
  514. if(editor.tiwei == this.tiwei[i].value){
  515. this.tiwei[i].is_check = true
  516. this.tiwei[i].check = 1
  517. this.tiwei_num = editor.tiwei
  518. }else{
  519. this.tiwei[i].is_check = false
  520. this.tiwei[i].check = 0
  521. // this.tiwei_num = 0
  522. }
  523. }
  524. for(let i in this.bingli){
  525. if(editor.bingli == this.bingli[i].value){
  526. this.bingli[i].is_check = true
  527. this.bingli[i].check = 1
  528. this.bingli_num = editor.bingli
  529. }else{
  530. this.bingli[i].is_check = false
  531. this.bingli[i].check = 0
  532. // this.bingli_num = 0
  533. }
  534. }
  535. for(let i in this.edema){
  536. if(editor.edema == this.edema[i].value){
  537. this.edema[i].is_check = true
  538. this.edema[i].check = 1
  539. this.edema_num = editor.edema
  540. }else{
  541. this.edema[i].is_check = false
  542. this.edema[i].check = 0
  543. // this.edema_num = 0
  544. }
  545. }
  546. for(let i in this.guanjie){
  547. if(editor.guanjie == this.guanjie[i].value){
  548. this.guanjie[i].is_check = true
  549. this.guanjie[i].check = 1
  550. this.gaunjie_num = editor.guanjie
  551. }else{
  552. this.guanjie[i].is_check = false
  553. this.guanjie[i].check = 0
  554. // this.gaunjie_num = 0
  555. }
  556. }
  557. this.oh_appraiser = editor.oh_appraiser
  558. this.oh_huli = editor.oh_huli
  559. this.oh_date = editor.record_date
  560. this.Totalpoints = editor.total
  561. }
  562. console.log('data',this.Totalpoints,oheditor);
  563. }
  564. })
  565. // for(let i in this.tiwei){
  566. // if(row.list.tiwei == this.tiwei[i].value){
  567. // this.tiwei[i].is_check = true
  568. // this.tiwei[i].check = 1
  569. // }
  570. // }
  571. // for(let i in this.bingli){
  572. // if(row.list.bingli == this.bingli[i].value){
  573. // this.bingli[i].is_check = true
  574. // this.bingli[i].check = 1
  575. // }
  576. // }
  577. // for(let i in this.edema){
  578. // if(row.list.edema == this.edema[i].value){
  579. // this.edema[i].is_check = true
  580. // this.edema[i].check = 1
  581. // }
  582. // }
  583. // for(let i in this.guanjie){
  584. // if(row.list.guanjie == this.guanjie[i].value){
  585. // this.guanjie[i].is_check = true
  586. // this.guanjie[i].check = 1
  587. // }
  588. // }
  589. // this.oh_appraiser = row.list.oh_appraiser
  590. // this.oh_huli = row.list.oh_huli
  591. // this.oh_date = row.list.record_date
  592. // this.Totalpoints = row.mark
  593. // console.log('Totalpoints',this.Totalpoints);
  594. //row.id 为 选中当前行的id
  595. // deletePedPatientFallassment(row.id).then(response=>{
  596. // })
  597. },
  598. //删除
  599. dele_OH(){
  600. if(this.dele_id !=''){
  601. this.zsgy_open=0
  602. this.append=false
  603. this.dele_dialogVisible=true
  604. }else{
  605. this.$message('请选择需要删除的记录')
  606. }
  607. },
  608. // 删除确认
  609. deleclick(){
  610. deletePedPatientFallassment(this.dele_id).then(response=>{
  611. if(response.data.state == 1){
  612. this.$message({
  613. message:'删除成功',
  614. offset:150
  615. })
  616. console.log('1111111',response.data);
  617. for(let i in this.history_OH){
  618. if(this.dele_id == this.history_OH[i].id){
  619. this.history_OH.splice(i,1)
  620. }
  621. }
  622. }
  623. })
  624. // for(let i=0;i<this.history_OH.length;i++){
  625. // if(this.dele_id==this.history_OH[i].id){
  626. // this.history_OH.splice(i,1)
  627. // }
  628. // }
  629. this.dele_dialogVisible=false
  630. return this.history_OH
  631. },
  632. //打印
  633. print_OH(){
  634. this.open_print=true
  635. },
  636. dele_Cancel(){
  637. this.append=false
  638. this.zsgy_open=1
  639. this.add_show=true
  640. this.dele_dialogVisible=false
  641. },
  642. //取消
  643. cancel_OH(){
  644. const checkboxs=document.getElementsByClassName('ball')
  645. this.baocun_open=0
  646. console.log('1111',this.cancel_num);
  647. if(this.cancel_num==1){
  648. this.zsgy_open=1
  649. this.add_show=true
  650. }else{
  651. this.zsgy_open=0
  652. this.add_show=true
  653. this.append=false
  654. this.tiwei_num=''
  655. this.bingli_num=null
  656. this.edema_num=null
  657. this.gaunjie_num=null
  658. for(let i=0;i<checkboxs.length;i++){
  659. checkboxs[i].checked = false
  660. }
  661. }
  662. },
  663. print_pingfen(){
  664. const style= '@media print {.diedao_content{background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0;} .tables thead th{ text-align: center;height: 40px;} .tables tbody td{height: 40px;padding:0 10px}}'
  665. printJS({
  666. printable: 'mingxi',
  667. type: 'html',
  668. style: style,
  669. scanStyles: false
  670. })
  671. this.open_print=false
  672. },
  673. // 转换时间
  674. getTime(val) {
  675. if(val < 0){
  676. return ""
  677. }
  678. if(val == ""){
  679. return ""
  680. }else {
  681. return uParseTime(val, '{y}-{m}-{d}')
  682. }
  683. },
  684. // 评估护士
  685. getpinggr(id){
  686. for(let i in this.oh_pinggr){
  687. if(id == this.oh_pinggr[i].id){
  688. return this.oh_pinggr[i].label
  689. }
  690. }
  691. },
  692. getAllNurseList(){
  693. getAllNurseList().then(response=>{
  694. if(response.data.state ==1){
  695. var nurseList = response.data.data.nurseList
  696. this.nurseList =nurseList
  697. }
  698. })
  699. },
  700. // 数据源
  701. getlist(){
  702. var params = {
  703. patient_id:this.patientID,
  704. limit:this.limit,
  705. is_type:2,
  706. page:this.page,
  707. }
  708. getPatientBedlist(params).then(response=>{
  709. if(response.data.state ==1){
  710. var list = response.data.data.list
  711. list.forEach((item) => {
  712. var oh_text = JSON.parse(item.text)
  713. // console.log('oh_data.text',JSON.parse(item.text));
  714. const arr ={
  715. id:item.id,
  716. date:this.getTime(item.record_date),
  717. mark:oh_text.total,
  718. evaluate:this.getpinggr(oh_text.oh_appraiser),
  719. list:oh_text
  720. }
  721. this.history_OH.push(arr)
  722. });
  723. var total = response.data.data.total
  724. console.log('list',list);
  725. }
  726. })
  727. return this.history_OH
  728. },
  729. // 修改保存
  730. updateBedPatientList(){
  731. this.baocun_open=0
  732. this.add_show=true
  733. this.zsgy_open=1
  734. this.cancel_num=1
  735. const data = {}
  736. var list =[]
  737. data['patient_id'] = this.patientID
  738. data['tiwei'] = this.tiwei_num
  739. data['bingli'] = this.bingli_num
  740. data['edema'] = this.edema_num
  741. data['guanjie'] = this.gaunjie_num
  742. data['oh_huli'] = this.oh_huli
  743. data['record_date'] = this.oh_date
  744. data['oh_appraiser'] = this.oh_appraiser
  745. data['total'] = this.Totalpoints
  746. list.push(data)
  747. var params={
  748. patient_id:this.patientID,
  749. record_date:this.oh_date,
  750. is_type:2,
  751. list:list,
  752. id:this.dele_id,//选中当前行的id
  753. }
  754. updateBedPatientList(params).then(response=>{
  755. if(response.data.state ==1){
  756. var pedFallssessment = response.data.data.pedFallssessment
  757. var text = JSON.parse(pedFallssessment.text)
  758. for(let i in this.history_OH){
  759. if(pedFallssessment.id == this.history_OH[i].id){
  760. this.history_OH[i].id = pedFallssessment.id
  761. this.history_OH[i].date = text.record_date
  762. this.history_OH[i].mark = text.total
  763. this.history_OH[i].evaluate = this.getpinggr(text.oh_appraiser)
  764. this.history_OH[i].list = text
  765. }
  766. }
  767. console.log('gggggg',pedFallssessment);
  768. this.$message.success("保存成功")
  769. }
  770. })
  771. }
  772. },
  773. computed:{
  774. Totalpoints:{
  775. get(){
  776. this.OH_zong = this.gaunjie_num*1 + this.edema_num*1 + this.bingli_num*1 + this.tiwei_num*1
  777. return this.OH_zong
  778. },
  779. set(val){
  780. return this.OH_zong = val
  781. }
  782. }
  783. },
  784. created(){
  785. const id = this.$route.params && this.$route.params.id
  786. this.patientID = parseInt(id)
  787. console.log('this.$route.query.patient_id',this.patientID);
  788. this.getlist()
  789. }
  790. }
  791. </script>
  792. <style lang="scss" scoped>
  793. .content_top{
  794. display: flex;
  795. justify-content: space-between;
  796. }
  797. .bottoms{
  798. display: inline-block;
  799. margin-left: 10px;
  800. margin-top: 5px;
  801. }
  802. .shuoming p{
  803. margin-top: 5px;
  804. color: rgb(167, 165, 165);
  805. }
  806. .table{
  807. border: 1px solid #DCDFE6;
  808. border-collapse:collapse;
  809. border-spacing: 0;
  810. thead th{
  811. background: #0077ff9f;
  812. color: white;
  813. text-align: center;
  814. height: 40px;
  815. }
  816. tbody td{
  817. height: 40px;
  818. }
  819. .start{
  820. text-align: center;
  821. }
  822. .bing{
  823. width: 150px;
  824. text-align: center;
  825. }
  826. .bg_color{
  827. background: rgb(243, 240, 240);
  828. }
  829. .jiange{
  830. margin-left: 20px;
  831. color: black;
  832. }
  833. .rightjiange{
  834. margin-right: 40px;
  835. font-size: 15px;
  836. }
  837. input{
  838. -webkit-appearance: checkbox;
  839. }
  840. }
  841. #ctrl-xgtlpic-mask.readonly {
  842. z-index: 2000;
  843. }
  844. #ctrl-xgtlpic-mask2.readonly {
  845. z-index: 2000;
  846. }
  847. #ctrl-xgtlpic-mask {
  848. width: 85%;
  849. height: 100%;
  850. position: absolute;
  851. left: 196px;
  852. top: 131px;
  853. opacity: 0;
  854. z-index: -1;
  855. }
  856. #ctrl-xgtlpic-mask2 {
  857. width: 50%;
  858. height: 100%;
  859. position: absolute;
  860. left: 196px;
  861. top: 131px;
  862. opacity: 0;
  863. z-index: -1;
  864. }
  865. .tables {
  866. thead th{
  867. // background: #0077ff9f;
  868. // color: white;
  869. text-align: center;
  870. height: 40px;
  871. }
  872. tbody td{
  873. padding:0 10px;
  874. height: 40px;
  875. }
  876. input{
  877. -webkit-appearance: checkbox;
  878. }
  879. }
  880. </style>