123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906 |
- <!-- OH压疮评估 -->
- <template>
- <div class="patient-container">
- <patient-sidebar :id="patientID" defaultActive="5-4" @tran-patient="tranpatient"></patient-sidebar>
- <div>
- <div class="patient-app-container advice-container app-container">
- <div class="content_top">
- <!-- 左 -->
- <div style="width: 58%;">
- <div style="margin-bottom: 20px; display: flex;">
- <div style="flex:2" >
- <el-button type="primary" @click="OHadd" v-if="add_show">新增</el-button>
- <el-button style="background:#00B6D7;color:white" @click="editor_OH" v-if="zsgy_open==1">编辑</el-button>
- <el-button type="danger" @click="dele_OH" v-if="zsgy_open==1">删除</el-button>
- <el-button type="success" @click="print_OH" v-if="zsgy_open==1">打印</el-button>
- </div>
-
- <div style="flex:1" v-if="baocun_open==1">
- <el-button type="primary" @click="save_OH" v-if="this.qufen ==false">保存</el-button>
- <el-button type="primary" @click="updateBedPatientList" v-if="this.qufen == true && this.dele_id !=''">保存1</el-button>
- <el-button @click="cancel_OH" >取消</el-button>
- </div>
-
- </div>
- <div>
- <div style="font-size: 20px;margin-bottom: 20px;">OH压疮评估表</div>
- <div style="width: 100%;">
- <table class="table" border="1" style="width: 100%;">
- <thead>
- <tr>
- <th style="width: 150px;">项目</th>
- <th>分值</th>
- </tr>
- </thead>
- <tbody>
- <tr class="bg_color">
- <td class="start">自主体位变换</td>
- <td>
- <div class="jiange">
- <span v-for="item in tiwei" class="rightjiange" @change="handleCheckedCitiesChange($event,item)">
- <label><input type="checkbox" class="checkbox1" v-model="item.is_check" :value="item.value"/> {{ item.label }}</label>
- </span>
- </div>
- </td>
- </tr>
- <tr>
- <td class="start">病理性骨突出</td>
- <td>
- <div class="jiange">
- <span v-for="item in bingli" class="rightjiange" @change="bingligu(item)">
- <label><input type="checkbox" class="checkbox2" v-model="item.is_check" :value="item.value" /> {{ item.label }}</label>
- </span>
- </div>
- </td>
- </tr>
-
- <tr class="bg_color">
- <td class="start">浮肿</td>
- <td>
- <div class="jiange">
- <span v-for="item in edema" class="rightjiange" @change="fozhong_chang(item)">
- <label><input type="checkbox" class="checkbox3" name="ball" v-model="item.is_check" :value="item.value" /> {{ item.label }}</label>
- </span>
- </div>
- </td>
- </tr>
-
- <tr>
- <td class="start">关节痉挛</td>
- <td>
- <div class="jiange">
- <span v-for="item in guanjie" class="rightjiange" @change="guanjie_change(item)">
- <label><input type="checkbox" class="checkbox4" name="ball" v-model="item.is_check" :value="item.value" /> {{ item.label }}</label>
- </span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-
- <div style="vertical-align: top; margin: 10px 0px; position: relative;">
- <span style="position: relative; top: -55px;">护理措施:</span>
- <div style="margin-top: 20px;display: inline-block; width: 85%;">
- <el-input maxlength="200" type = "textarea" :rows="3" v-model="oh_huli" placeholder="输入护理措施,200字以内" ></el-input>
- </div>
- </div>
-
- <div>
- <div class="bottoms">
- <span>总分:</span>
- <el-input v-model="Totalpoints" style="width: 80px;"></el-input>分
- </div>
- <div class="bottoms">
- <span>评估日期:</span>
- <el-date-picker
- v-model="oh_date"
- type="date"
- placeholder="选择日期"
- value-format="yyyy-MM-dd"
- :clearable="false"
- style="width: 150px;">
- </el-date-picker>
- </div>
- <div class="bottoms">
- <span>评估人:</span>
- <el-select v-model="oh_appraiser" placeholder="请选择" style="width:120px;">
- <el-option
- v-for="item in oh_pinggr"
- :key="item.id"
- :label="item.label"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </div>
- </div>
- <div id="ctrl-xgtlpic-mask2" class="readonly" data-text="图片操作的遮罩层" v-show="append2 == false"></div>
- <div id="ctrl-xgtlpic-mask" class="readonly" data-text="图片操作的遮罩层" v-show="append == false"></div>
- </div>
-
- <hr style="width: 100%;margin-top: 20px; border: none;height: 1px;background: #DCDFE6;"/>
- <div class="shuoming">
- <p>说明:</p>
- <p>1、本表适用于急症科、血液净化科等非病房科室。</p>
- <p>2、总分:10分,分值越大风险越高 ;1-3分为低危;4-6分为中危;7-10分为高危。</p>
- <p>3、病理性骨突出指骶尾部(或受压部位骨突出处)两侧均高于皮肤
- <2cm为“无”;两侧均为2cm或一侧<2cm一侧2cm为“轻度/中度”;两侧均>2cm或一侧>2cm一侧2cm为“高度”。
- </p>
- <p>参考:北海道大学名授大浦武彦,堀田由浩. 利用OH 评估法进行压疮预防[M].东京:中央法规出版社,2005:11</p>
- </div>
- </div>
- <!-- 虚线 -->
- <div style="height: 100vh; width: 1px; border-left:1px dashed #DCDFE6 ;"></div>
- <!-- 右 -->
- <div style="width: 38%;">
- <div style="font-size: 20px; margin-bottom: 20px;">评估历史记录</div>
- <div style="width: 100%;">
- <el-table
- :data="history_OH"
- stripe
- border
- @row-click="dele_click"
- :highlight-current-row="true"
- :header-cell-style="{
- background: '#0077ff9f',color:'white'}"
- style="width: 100%">
- <el-table-column
- prop="date"
- label="评估日期"
- width="180">
- </el-table-column>
- <el-table-column
- prop="mark"
- label="总分"
- >
- </el-table-column>
- <el-table-column
- prop="evaluate"
- label="评估人"
- >
- </el-table-column>
- </el-table>
- </div>
- </div>
- </div>
- </div>
-
-
- </div>
- <!-- 打印 -->
- <el-dialog
- title="提示"
- :visible.sync="open_print"
- width="67%"
- >
- <div>
- <el-button type="primary" @click="print_pingfen" style="float:right">打印</el-button>
- <div id="mingxi" >
- <div class="diedao_content" style="">
- <div style="width:100%;margin-top: 20px;">
- <div style="text-align: center;"><h1>血液透析中心跌倒评估记录</h1></div>
- <div style="margin-top: 20px;font-size: 16px;">
- <span>患者姓名:{{ Patient_info.name }}</span>
- <span>透析号:{{ Patient_info.dialysis_no }}</span>
- <span>评估日期:{{ oh_date }}</span>
- <span>评估护士:{{ getpinggr(oh_appraiser) }}</span>
- <span>总分:{{ Totalpoints }}</span>
- <span>打印时间:{{ dayintime }}</span>
- </div>
- <table class="tables" border="1" style="width: 100%;border-collapse: collapse;">
- <thead>
- <tr>
- <th style="width: 150px;padding: 5px;">项目</th>
- <th style="padding: 5px;">分值</th>
- </tr>
- </thead>
- <tbody>
- <tr class="bg_color">
- <td class="start">自主体位变换</td>
- <td>
- <div class="jiange">
- <span v-for="item in tiwei" class="rightjiange" @change="handleCheckedCitiesChange($event,item)">
- <label><input type="checkbox" class="checkbox1" name="ball" v-model="item.is_check" :value="item.value"/> {{ item.label }}</label>
- </span>
- </div>
- </td>
- </tr>
- <tr>
- <td class="start">病理性骨突出</td>
- <td>
- <div class="jiange">
- <span v-for="item in bingli" class="rightjiange" @change="bingligu(item)">
- <label><input type="checkbox" class="checkbox2" name="ball" v-model="item.is_check" :value="item.value" /> {{ item.label }}</label>
- </span>
- </div>
- </td>
- </tr>
-
- <tr class="bg_color">
- <td class="start">浮肿</td>
- <td>
- <div class="jiange">
- <span v-for="item in edema" class="rightjiange" @change="fozhong_chang(item)">
- <label><input type="checkbox" class="checkbox3" name="ball" v-model="item.is_check" :value="item.value" /> {{ item.label }}</label>
- </span>
- </div>
- </td>
- </tr>
-
- <tr>
- <td class="start">关节痉挛</td>
- <td>
- <div class="jiange">
- <span v-for="item in guanjie" class="rightjiange" @change="guanjie_change(item)">
- <label><input type="checkbox" class="checkbox4" name="ball" v-model="item.is_check" :value="item.value" /> {{ item.label }}</label>
- </span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <div style="vertical-align: top; margin: 10px 0px; ">
- <span >护理措施:</span>
- <div style="margin-top: 20px;display: inline-block; width: 85%;height: 80px;">
- {{ oh_huli }}
- <!-- <el-input maxlength="200" type = "textarea" :rows="3" v-model="input" placeholder="输入护理措施,200字以内" ></el-input> -->
- </div>
- </div>
- <hr style="width: 100%;margin-top: 20px; border: 1px solid black;"/>
- <div class="shuoming">
- <p>说明:</p>
- <p>1、本表适用于急症科、血液净化科等非病房科室。</p>
- <p>2、总分:10分,分值越大风险越高 ;1-3分为低危;4-6分为中危;7-10分为高危。</p>
- <p>3、病理性骨突出指骶尾部(或受压部位骨突出处)两侧均高于皮肤
- <2cm为“无”;两侧均为2cm或一侧<2cm一侧2cm为“轻度/中度”;两侧均>2cm或一侧>2cm一侧2cm为“高度”。
- </p>
- <p>参考:北海道大学名授大浦武彦,堀田由浩. 利用OH 评估法进行压疮预防[M].东京:中央法规出版社,2005:11</p>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </el-dialog>
- <!-- 删除弹窗 -->
- <el-dialog
- title="提示"
- :visible.sync="dele_dialogVisible"
- width="30%">
- <span>确认删除该数据</span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dele_Cancel">取 消</el-button>
- <el-button type="primary" @click="deleclick">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import PatientSidebar from '../components/PatientSidebar.vue'
- import print from 'print-js'
- import { uParseTime } from '@/utils/tools'
- import {getAllNurseList,savePatientHpressuresore,getPatientBedlist,getPedPatientFallAssessmentById,deletePedPatientFallassment,updateBedPatientList} from '@/api/fallassement'
- export default {
- components:{
- PatientSidebar
- },
- data(){
- return{
- patientID:0,
- tiwei_num:null,
- bingli_num:null,
- edema_num:null,
- gaunjie_num:null,
- ball:'',
- input:'',
- history_OH:[],
- form:[],
- appraiser:null,
- value1:'',
- options:[],
- 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}],
- 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}],
- edema:[{value:0,label:'无(0分)',check:0,is_check:false},{value:3,label:'有(3分)',check:0,is_check:false}],
- guanjie:[{value:0,label:'无(0分)',check:0,is_check:false},{value:1,label:'有(1分)',check:0,is_check:false}],
- oh_pinggr:[{id:1,label:'小米'},{id:2,label:'千仞雪'},{id:3,label:'千亦雪'},],
- checkList:[],
- checkList1:[],
- checkList2:[],
- checkList3:[],
-
- append:false,//控制遮罩层
- append2:false,
- xingai:0,
- add_open:1,//新增按钮控制条件
- baocun_open:0,//控制保存取消显示
- add_show:true,//控制新增显示
- zsgy_open:0,//控制编辑,删除,打印显示
- cancel_num:0,//取消的条件
- open_print:false,
- dele_id:'',//删除的索引
- dele_dialogVisible:false,
- oh_huli:'',//护理措施
- oh_date:this.getTime(new Date()),
- oh_appraiser:null,
- dayintime:this.getTime(new Date()),//打印
- // oh_pinggr:[],
- nurseList:[],
- limit:10,
- page:1,
- total:0,
- id:0,
- index:0,
- OH_zong:0,
- Patient_info:{name:'',dialysis_no:''},
- qufen:false,
- }
- },
- methods:{
- tranpatient(event){
- console.log('event',event);
- this.Patient_info={
- name:event.name,
- dialysis_no:event.dialysis_no
- }
- },
- //选择的总分
- handleCheckedCitiesChange(e,item){
- console.log('vvvv','bbbb',item);
- for(let i=0;i<this.tiwei.length;i++){
- if(item.value == this.tiwei[i].value){
- if(this.tiwei[i].check == 0){
- this.tiwei[i].check =1
- this.tiwei[i].is_check = true
- this.tiwei_num = item.value
- }else{
- this.tiwei[i].check =0
- this.tiwei[i].is_check = false
- this.tiwei_num = 0
- }
- }else{
- this.tiwei[i].check =0
- this.tiwei[i].is_check = false
- }
- }
- console.log('oooo',this.tiwei);
- },
- bingligu(item){
- for(let i=0;i<this.bingli.length;i++){
- if(item.value == this.bingli[i].value){
- if(this.bingli[i].check == 0){
- this.bingli[i].check =1
- this.bingli[i].is_check = true
- this.bingli_num = item.value
- }else{
- this.bingli[i].check =0
- this.bingli[i].is_check = false
- this.bingli_num = 0
- }
- }else{
- this.bingli[i].check =0
- this.bingli[i].is_check = false
- }
- }
- },
- fozhong_chang(item){
- for(let i=0;i<this.edema.length;i++){
- if(item.value == this.edema[i].value){
- if(this.edema[i].check == 0){
- this.edema[i].check =1
- this.edema[i].is_check = true
- this.edema_num = item.value
- }else{
- this.edema[i].check =0
- this.edema[i].is_check = false
- this.edema_num = 0
- }
- }else{
- this.edema[i].check =0
- this.edema[i].is_check = false
- }
- }
- },
- guanjie_change(item){
- for(let i=0;i<this.guanjie.length;i++){
- if(item.value == this.guanjie[i].value){
- if(this.guanjie[i].check == 0){
- this.guanjie[i].check =1
- this.guanjie[i].is_check = true
- this.gaunjie_num = item.value
- }else{
- this.guanjie[i].check =0
- this.guanjie[i].is_check = false
- this.gaunjie_num = 0
- }
- }else{
- this.guanjie[i].check =0
- this.guanjie[i].is_check = false
- }
- }
- },
- // 新增
- OHadd(){
- if(this.add_open==1){
- this.append=true
- this.append2 = true
- this.baocun_open=1
- this.add_show =false
- this.zsgy_open= 0
- this.qufen =false
- }else{
- this.append = false
- this.append2 = false
- }
- // for(let i in this.tiwei){
- // this.tiwei[i].is_check = false,
- // this.tiwei[i].check = 0
- // }
- // for(let i in this.bingli){
- // this.bingli[i].is_check = false,
- // this.bingli[i].check = 0
- // }
- // for(let i in this.edema){
- // this.edema[i].is_check = false,
- // this.edema[i].check = 0
- // }
- // for(let i in this.guanjie){
- // this.guanjie[i].is_check = false,
- // this.guanjie[i].check = 0
- // }
- // this.Totalpoints=0
- // this.oh_huli = ''
- // this.oh_appraiser = null
- },
- //保存
- save_OH(){
- if(this.oh_appraiser==null){
- this.$message('请选择评估人')
- }else{
- this.baocun_open=0
- this.add_show=true
- this.zsgy_open=1
- this.cancel_num=1
- const data = {}
- var list =[]
- data['patient_id'] = this.patientID
- data['tiwei'] = this.tiwei_num
- data['bingli'] = this.bingli_num
- data['edema'] = this.edema_num
- data['guanjie'] = this.gaunjie_num
- data['oh_huli'] = this.oh_huli
- data['record_date'] = this.oh_date
- data['oh_appraiser'] = this.oh_appraiser
- data['total'] = this.Totalpoints
- list.push(data)
- var params={
- patient_id:this.patientID,
- record_date:this.oh_date,
- is_type:2,
- list:list,
- }
-
- // console.log("data",data)
- savePatientHpressuresore(params).then(response=>{
- if(response.data.state ==1){
- console.log('response.data.state',response.data);
- const item = response.data.data.pedFallssessment
- var oh_text = JSON.parse(item.text)
- // console.log('oh_data.text',JSON.parse(item.text));
- const arr ={
- id:item.id,
- date:this.getTime(item.record_date),
- mark:oh_text.total,
- evaluate:this.getpinggr(oh_text.oh_appraiser),
- list:oh_text
- }
- this.history_OH.push(arr)
- }
- })
- return this.history_OH
- }
- },
- //编辑
- editor_OH(){
- this.add_show=false
- this.zsgy_open=0
- this.baocun_open=1
- this.cancel_num=1
- this.append2 = true
- this.qufen =true
- },
- // 选中数据
- dele_click(row, column, event){
-
- this.dele_id=row.id
- console.log('row',this.dele_id);
- if(this.baocun_open == 1){
- this.add_show = true
- this.zsgy_open = 1
- this.baocun_open = 0
- this.append2 = false
- }
- getPedPatientFallAssessmentById(this.dele_id).then(response=>{
- if(response.data.state ==1){
- const oheditor = response.data.data.fallassessment
- var editor =JSON.parse(oheditor.text)
- if(oheditor.id == row.id){
- for(let i in this.tiwei){
- if(editor.tiwei == this.tiwei[i].value){
- this.tiwei[i].is_check = true
- this.tiwei[i].check = 1
- this.tiwei_num = editor.tiwei
- }else{
- this.tiwei[i].is_check = false
- this.tiwei[i].check = 0
- // this.tiwei_num = 0
- }
- }
- for(let i in this.bingli){
- if(editor.bingli == this.bingli[i].value){
- this.bingli[i].is_check = true
- this.bingli[i].check = 1
- this.bingli_num = editor.bingli
- }else{
- this.bingli[i].is_check = false
- this.bingli[i].check = 0
- // this.bingli_num = 0
- }
-
- }
- for(let i in this.edema){
- if(editor.edema == this.edema[i].value){
- this.edema[i].is_check = true
- this.edema[i].check = 1
- this.edema_num = editor.edema
- }else{
- this.edema[i].is_check = false
- this.edema[i].check = 0
- // this.edema_num = 0
- }
- }
- for(let i in this.guanjie){
- if(editor.guanjie == this.guanjie[i].value){
- this.guanjie[i].is_check = true
- this.guanjie[i].check = 1
- this.gaunjie_num = editor.guanjie
- }else{
- this.guanjie[i].is_check = false
- this.guanjie[i].check = 0
- // this.gaunjie_num = 0
- }
- }
- this.oh_appraiser = editor.oh_appraiser
- this.oh_huli = editor.oh_huli
- this.oh_date = editor.record_date
- this.Totalpoints = editor.total
- }
- console.log('data',this.Totalpoints,oheditor);
- }
- })
-
-
- // for(let i in this.tiwei){
- // if(row.list.tiwei == this.tiwei[i].value){
- // this.tiwei[i].is_check = true
- // this.tiwei[i].check = 1
- // }
- // }
- // for(let i in this.bingli){
- // if(row.list.bingli == this.bingli[i].value){
- // this.bingli[i].is_check = true
- // this.bingli[i].check = 1
- // }
- // }
- // for(let i in this.edema){
- // if(row.list.edema == this.edema[i].value){
- // this.edema[i].is_check = true
- // this.edema[i].check = 1
- // }
- // }
- // for(let i in this.guanjie){
- // if(row.list.guanjie == this.guanjie[i].value){
- // this.guanjie[i].is_check = true
- // this.guanjie[i].check = 1
- // }
- // }
- // this.oh_appraiser = row.list.oh_appraiser
- // this.oh_huli = row.list.oh_huli
- // this.oh_date = row.list.record_date
- // this.Totalpoints = row.mark
- // console.log('Totalpoints',this.Totalpoints);
- //row.id 为 选中当前行的id
- // deletePedPatientFallassment(row.id).then(response=>{
-
- // })
- },
- //删除
- dele_OH(){
- if(this.dele_id !=''){
- this.zsgy_open=0
- this.append=false
- this.dele_dialogVisible=true
- }else{
- this.$message('请选择需要删除的记录')
- }
-
- },
- // 删除确认
- deleclick(){
- deletePedPatientFallassment(this.dele_id).then(response=>{
- if(response.data.state == 1){
- this.$message({
- message:'删除成功',
- offset:150
- })
- console.log('1111111',response.data);
- for(let i in this.history_OH){
- if(this.dele_id == this.history_OH[i].id){
- this.history_OH.splice(i,1)
- }
- }
- }
- })
- // for(let i=0;i<this.history_OH.length;i++){
- // if(this.dele_id==this.history_OH[i].id){
- // this.history_OH.splice(i,1)
- // }
- // }
- this.dele_dialogVisible=false
- return this.history_OH
- },
- //打印
- print_OH(){
- this.open_print=true
- },
- dele_Cancel(){
- this.append=false
- this.zsgy_open=1
- this.add_show=true
- this.dele_dialogVisible=false
- },
- //取消
- cancel_OH(){
- const checkboxs=document.getElementsByClassName('ball')
- this.baocun_open=0
- console.log('1111',this.cancel_num);
- if(this.cancel_num==1){
- this.zsgy_open=1
- this.add_show=true
- }else{
- this.zsgy_open=0
- this.add_show=true
- this.append=false
- this.tiwei_num=''
- this.bingli_num=null
- this.edema_num=null
- this.gaunjie_num=null
- for(let i=0;i<checkboxs.length;i++){
- checkboxs[i].checked = false
- }
- }
-
- },
- print_pingfen(){
- 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}}'
- printJS({
- printable: 'mingxi',
- type: 'html',
- style: style,
- scanStyles: false
- })
- this.open_print=false
- },
- // 转换时间
- getTime(val) {
- if(val < 0){
- return ""
- }
- if(val == ""){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d}')
- }
- },
- // 评估护士
- getpinggr(id){
- for(let i in this.oh_pinggr){
- if(id == this.oh_pinggr[i].id){
- return this.oh_pinggr[i].label
- }
- }
- },
- getAllNurseList(){
- getAllNurseList().then(response=>{
- if(response.data.state ==1){
- var nurseList = response.data.data.nurseList
-
- this.nurseList =nurseList
- }
- })
- },
- // 数据源
- getlist(){
- var params = {
- patient_id:this.patientID,
- limit:this.limit,
- is_type:2,
- page:this.page,
- }
- getPatientBedlist(params).then(response=>{
- if(response.data.state ==1){
- var list = response.data.data.list
- list.forEach((item) => {
-
- var oh_text = JSON.parse(item.text)
- // console.log('oh_data.text',JSON.parse(item.text));
- const arr ={
- id:item.id,
- date:this.getTime(item.record_date),
- mark:oh_text.total,
- evaluate:this.getpinggr(oh_text.oh_appraiser),
- list:oh_text
- }
- this.history_OH.push(arr)
- });
- var total = response.data.data.total
- console.log('list',list);
- }
- })
- return this.history_OH
- },
- // 修改保存
- updateBedPatientList(){
- this.baocun_open=0
- this.add_show=true
- this.zsgy_open=1
- this.cancel_num=1
- const data = {}
- var list =[]
- data['patient_id'] = this.patientID
- data['tiwei'] = this.tiwei_num
- data['bingli'] = this.bingli_num
- data['edema'] = this.edema_num
- data['guanjie'] = this.gaunjie_num
- data['oh_huli'] = this.oh_huli
- data['record_date'] = this.oh_date
- data['oh_appraiser'] = this.oh_appraiser
- data['total'] = this.Totalpoints
- list.push(data)
- var params={
- patient_id:this.patientID,
- record_date:this.oh_date,
- is_type:2,
- list:list,
- id:this.dele_id,//选中当前行的id
- }
- updateBedPatientList(params).then(response=>{
- if(response.data.state ==1){
- var pedFallssessment = response.data.data.pedFallssessment
- var text = JSON.parse(pedFallssessment.text)
- for(let i in this.history_OH){
- if(pedFallssessment.id == this.history_OH[i].id){
- this.history_OH[i].id = pedFallssessment.id
- this.history_OH[i].date = text.record_date
- this.history_OH[i].mark = text.total
- this.history_OH[i].evaluate = this.getpinggr(text.oh_appraiser)
- this.history_OH[i].list = text
- }
- }
- console.log('gggggg',pedFallssessment);
- this.$message.success("保存成功")
- }
- })
- }
-
- },
- computed:{
- Totalpoints:{
- get(){
- this.OH_zong = this.gaunjie_num*1 + this.edema_num*1 + this.bingli_num*1 + this.tiwei_num*1
- return this.OH_zong
- },
- set(val){
- return this.OH_zong = val
- }
-
- }
- },
- created(){
- const id = this.$route.params && this.$route.params.id
- this.patientID = parseInt(id)
- console.log('this.$route.query.patient_id',this.patientID);
- this.getlist()
- }
- }
- </script>
- <style lang="scss" scoped>
- .content_top{
- display: flex;
- justify-content: space-between;
- }
- .bottoms{
- display: inline-block;
- margin-left: 10px;
- margin-top: 5px;
- }
- .shuoming p{
- margin-top: 5px;
- color: rgb(167, 165, 165);
- }
- .table{
- border: 1px solid #DCDFE6;
- border-collapse:collapse;
- border-spacing: 0;
- thead th{
- background: #0077ff9f;
- color: white;
- text-align: center;
- height: 40px;
- }
- tbody td{
- height: 40px;
- }
- .start{
- text-align: center;
- }
- .bing{
- width: 150px;
- text-align: center;
- }
- .bg_color{
- background: rgb(243, 240, 240);
- }
- .jiange{
- margin-left: 20px;
- color: black;
- }
- .rightjiange{
- margin-right: 40px;
- font-size: 15px;
- }
- input{
- -webkit-appearance: checkbox;
- }
- }
- #ctrl-xgtlpic-mask.readonly {
- z-index: 2000;
- }
- #ctrl-xgtlpic-mask2.readonly {
- z-index: 2000;
- }
- #ctrl-xgtlpic-mask {
- width: 85%;
- height: 100%;
- position: absolute;
- left: 196px;
- top: 131px;
- opacity: 0;
- z-index: -1;
- }
- #ctrl-xgtlpic-mask2 {
- width: 50%;
- height: 100%;
- position: absolute;
- left: 196px;
- top: 131px;
- opacity: 0;
- z-index: -1;
- }
- .tables {
- thead th{
- // background: #0077ff9f;
- // color: white;
- text-align: center;
- height: 40px;
- }
- tbody td{
- padding:0 10px;
- height: 40px;
- }
- input{
- -webkit-appearance: checkbox;
- }
- }
- </style>
|