|
|
@ -57,21 +57,25 @@ |
|
|
|
<a-layout-content ref="layoutContent" id="layoutContent"> |
|
|
|
<div class="global-layout-content" id="globalLayoutContent"> |
|
|
|
<router-view /> |
|
|
|
<a-drawer placement="bottom" closable :visible="termVisible" @close="onTermClose" |
|
|
|
</div> |
|
|
|
<a-modal v-model="termVisible" title="提示"> |
|
|
|
<template slot="footer"> |
|
|
|
<a-button key="submit" @click="handleTermin(0)">暂停急救</a-button> |
|
|
|
<a-button key="back" type="primary" @click="handleTermin(1)">终止急救</a-button> |
|
|
|
</template> |
|
|
|
<p style="line-height: 32px;"><a-icon type="exclamation-circle" style="color: orange;font-weight: bold;font-size: 20px;margin-right: 12px" />是否结束本次急救?</p> |
|
|
|
</a-modal> |
|
|
|
<!-- <a-drawer placement="bottom" :closable="false" :visible="termVisible" @close="onTermClose" |
|
|
|
:get-container="false" :wrap-style="{ position: 'absolute' }"> |
|
|
|
<div v-if="termVisible"> |
|
|
|
<div style="text-align: center;line-height: 3rem;font-weight: bold;font-size: 1.5rem;"> |
|
|
|
退出急救 |
|
|
|
</div> |
|
|
|
<div style="text-align: center;font-size: 1.2rem; line-height: 5rem;"> |
|
|
|
<div style="text-align: center;font-size: 1.2rem; line-height: 4.2rem;"> |
|
|
|
<div style="border-bottom: 1px solid #eee;" @click="handleTermin(1)">终止急救</div> |
|
|
|
<div @click="handleTermin(0)">暂停急救</div> |
|
|
|
<div style="border-bottom: 2px solid #eee;" @click="handleTermin(0)">暂停急救</div> |
|
|
|
<div style="color: rgba(0, 0, 0, 0.6);" @click="onTermClose">取消</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</a-drawer> |
|
|
|
</div> |
|
|
|
|
|
|
|
</a-drawer> --> |
|
|
|
<a-drawer placement="left" :visible="visible" width="320" @close="onClose" :getContainer="false" |
|
|
|
:closable="false" :wrap-style="{ position: 'absolute' }"> |
|
|
|
<div class="person-drawer"> |
|
|
@ -131,7 +135,8 @@ |
|
|
|
import store from '@/store'; |
|
|
|
import { |
|
|
|
loginInfo, |
|
|
|
messageQuery |
|
|
|
messageQuery, |
|
|
|
saveAidRecord, |
|
|
|
} from 'api'; |
|
|
|
import icon01 from '@/assets/images/slice/icon01.png' |
|
|
|
import icon01H from '@/assets/images/slice/icon01H.png' |
|
|
@ -207,7 +212,7 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapMutations('patient', ['setPatientData', 'setPatientDataCur']), |
|
|
|
...mapMutations('patient', ['setPatientData', 'setTimerData', 'setPatientDataCur']), |
|
|
|
handleClickMenu(item, index) { |
|
|
|
if (index != this.current) { |
|
|
|
this.current_ = this.current |
|
|
@ -256,9 +261,20 @@ |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
async handleTermin(status) { |
|
|
|
this.$message.info('结束急救,类型: ' + status) |
|
|
|
// this.termVisible = true; |
|
|
|
async handleTermin(finishStatus) { |
|
|
|
const { firstAidId } = this.patientData; |
|
|
|
let res = await saveAidRecord({ |
|
|
|
firstAidId, |
|
|
|
finishStatus |
|
|
|
}); |
|
|
|
const { code, data, msg } = res; |
|
|
|
if (code === 200) { |
|
|
|
this.setPatientData({}) |
|
|
|
this.setTimerData({}); |
|
|
|
this.$router.replace('/firstaid/patientList') |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
|
|
|
|
this.onTermClose() |
|
|
|
}, |
|
|
@ -287,7 +303,28 @@ |
|
|
|
this.current = this.current_ |
|
|
|
}, |
|
|
|
logout() { |
|
|
|
this.$confirm({ |
|
|
|
title: '提示', |
|
|
|
content: '退出登录后回终止本次急救, 确认要退出登录吗?', |
|
|
|
onOk: async () => { |
|
|
|
const { firstAidId } = this.patientData; |
|
|
|
let res = await saveAidRecord({ |
|
|
|
firstAidId, |
|
|
|
finishStatus: 1 |
|
|
|
}); |
|
|
|
const { code, data, msg } = res; |
|
|
|
if (code === 200) { |
|
|
|
this.setPatientData({}) |
|
|
|
this.setTimerData({}); |
|
|
|
this.$router.replace('/login') |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
onCancel() {}, |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|