|
@ -37,68 +37,89 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<template slot="edit" slot-scope="text, record"> |
|
|
<template slot="edit" slot-scope="text, record"> |
|
|
<a-button @click="showModal(record.id, record.hospitalization, record.code)" class="mr-4" size="small" type="primary"> |
|
|
<div class="d-flex flex-column"> |
|
|
|
|
|
<a-popconfirm placement="left" ok-text="确定" cancel-text="取消" @confirm="handleOk"> |
|
|
|
|
|
<a-icon slot="icon" type="question-circle" /> |
|
|
|
|
|
<template slot="title"> |
|
|
|
|
|
<div style="width: auto"> |
|
|
|
|
|
您是否要为<br />住院号为:{{ hospitalization }} , 研究编号为: {{ recordCode }}<br />的病例进行信息录入? |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
<a-button @click="showModal(record.id, record.hospitalization, record.code)" size="small" type="primary"> 选择 </a-button> |
|
|
|
|
|
</a-popconfirm> |
|
|
|
|
|
<!-- <a-button @click="showModal(record.id, record.hospitalization, record.code)" class="mr-4" size="small" type="primary"> |
|
|
选择 |
|
|
选择 |
|
|
</a-button> |
|
|
</a-button> --> |
|
|
<a-button type="primary" size="small" class="mr-4" @click="details(record.id, record.hospitalization, record.code)"> |
|
|
<a-button type="primary" size="small" class="mt-4" @click="details(record.id, record.hospitalization, record.code)"> |
|
|
查看详情 |
|
|
查看详情 |
|
|
</a-button> |
|
|
</a-button> |
|
|
<a-button v-if="record.inputStatus < 5" size="small" type="primary" @click="showStatus(record.id, record.inputStatus)"> |
|
|
<a-popconfirm placement="left" ok-text="确定" cancel-text="取消" @confirm="submit(record.id)"> |
|
|
修改状态 |
|
|
<!-- <a-icon slot="icon" type="none" /> --> |
|
|
</a-button> |
|
|
<a-icon slot="icon" type="exclamation-circle" /> |
|
|
|
|
|
<template slot="title"> |
|
|
|
|
|
<div>修改状态:</div> |
|
|
|
|
|
<a-radio-group v-model="recordStatus"> |
|
|
|
|
|
<a-radio :style="radioStyle" v-for="(a, b) in status" :value="b" :key="b"> {{ a }} </a-radio> |
|
|
|
|
|
</a-radio-group> |
|
|
|
|
|
</template> |
|
|
|
|
|
<a-button class="mt-4" v-if="record.inputStatus < 5" size="small" type="primary" @click="handleChange(record.inputStatus)"> |
|
|
|
|
|
修改状态 |
|
|
|
|
|
</a-button> |
|
|
|
|
|
</a-popconfirm> |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</a-table> |
|
|
</a-table> |
|
|
</div> |
|
|
</div> |
|
|
<a-empty v-else /> |
|
|
<a-empty v-else /> |
|
|
<a-modal title="选择患者" width="600px" v-model="visible" @ok="handleOk" @cancel="handleCancel"> |
|
|
<!-- <a-modal title="选择病例" width="600px" v-model="visible" @ok="handleOk" @cancel="handleCancel"> |
|
|
是否要录入住院号为: |
|
|
是否要录入住院号为: |
|
|
<span style="color: green">{{ hospitalization }}</span> |
|
|
<span style="color: green">{{ hospitalization }}</span> |
|
|
, 研究编号为: |
|
|
, 研究编号为: |
|
|
<span style="color: green">{{ recordCode }}</span> |
|
|
<span style="color: green">{{ recordCode }}</span> |
|
|
, 的患者的相关数据 |
|
|
, 的病例的相关数据 |
|
|
</a-modal> |
|
|
</a-modal> --> |
|
|
<a-modal title="修改状态" width="600px" v-model="statusModal" @ok="submit"> |
|
|
|
|
|
<a-select :default-value="recordStatus" style="width: 240px" @change="handleChange"> |
|
|
|
|
|
<a-select-option v-for="(item, index) in status" :value="index" :key="index"> {{ item }} </a-select-option> |
|
|
|
|
|
</a-select> |
|
|
|
|
|
</a-modal> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { mapMutations, mapState } from 'vuex'; |
|
|
import { mapMutations, mapState } from 'vuex'; |
|
|
import { generatePatientReport, upPatientMes } from 'config/api'; |
|
|
import { checkPatientComplete, upPatientMes } from 'config/api'; |
|
|
|
|
|
|
|
|
const columns = [ |
|
|
const columns = [ |
|
|
{ |
|
|
// { |
|
|
title: '序号', |
|
|
// title: '序号', |
|
|
align: 'center', |
|
|
// align: 'center', |
|
|
dataIndex: 'id', |
|
|
// dataIndex: 'id', |
|
|
key: 'id', |
|
|
// width: 60, |
|
|
scopedSlots: { customRender: 'id' }, |
|
|
// key: 'id', |
|
|
}, |
|
|
// scopedSlots: { customRender: 'id' }, |
|
|
|
|
|
// }, |
|
|
{ |
|
|
{ |
|
|
title: '研究编号', |
|
|
title: '研究编号', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
dataIndex: 'code', |
|
|
dataIndex: 'code', |
|
|
|
|
|
width: 100, |
|
|
key: 'code', |
|
|
key: 'code', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '住院号', |
|
|
title: '住院号', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
dataIndex: 'hospitalization', |
|
|
dataIndex: 'hospitalization', |
|
|
|
|
|
width: 160, |
|
|
key: 'hospitalization', |
|
|
key: 'hospitalization', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '主治医生', |
|
|
title: '主治医生', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
dataIndex: 'doctorName', |
|
|
dataIndex: 'doctorName', |
|
|
|
|
|
width: 100, |
|
|
key: 'doctorName', |
|
|
key: 'doctorName', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '组别', |
|
|
title: '组别', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
dataIndex: 'name', |
|
|
dataIndex: 'name', |
|
|
|
|
|
width: 160, |
|
|
key: 'name', |
|
|
key: 'name', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -106,6 +127,7 @@ const columns = [ |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
dataIndex: 'inputStatus', |
|
|
dataIndex: 'inputStatus', |
|
|
key: 'inputStatus', |
|
|
key: 'inputStatus', |
|
|
|
|
|
width: 120, |
|
|
scopedSlots: { customRender: 'inputStatus' }, |
|
|
scopedSlots: { customRender: 'inputStatus' }, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -113,7 +135,8 @@ const columns = [ |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
dataIndex: 'edit', |
|
|
dataIndex: 'edit', |
|
|
key: 'edit', |
|
|
key: 'edit', |
|
|
width: 300, |
|
|
width: 80, |
|
|
|
|
|
textAlign: 'center', |
|
|
scopedSlots: { customRender: 'edit' }, |
|
|
scopedSlots: { customRender: 'edit' }, |
|
|
}, |
|
|
}, |
|
|
]; |
|
|
]; |
|
@ -127,15 +150,20 @@ export default { |
|
|
return { |
|
|
return { |
|
|
columns, |
|
|
columns, |
|
|
loading: false, |
|
|
loading: false, |
|
|
visible: false, |
|
|
|
|
|
hasPatientId: false, |
|
|
hasPatientId: false, |
|
|
patientId: '', // 患者Id |
|
|
patientId: '', // 病例Id |
|
|
hospitalization: '', // 患者住院号 |
|
|
hospitalization: '', // 病例住院号 |
|
|
recordCode: '', // 患者研究编号 |
|
|
recordCode: '', // 病例研究编号 |
|
|
status: ['新建', '数据搜集中', '数据搜集完成', '数据搜集超时', '废弃'], |
|
|
status: ['新建', '数据搜集中', '数据搜集完成', '数据搜集超时', '废弃'], |
|
|
statusModal: false, |
|
|
statusModal: false, |
|
|
recordStatus: 0, |
|
|
recordStatus: 0, |
|
|
recordId: '', |
|
|
recordId: '', |
|
|
|
|
|
radioStyle: { |
|
|
|
|
|
width: '200px', |
|
|
|
|
|
display: 'block', |
|
|
|
|
|
height: '30px', |
|
|
|
|
|
lineHeight: '30px', |
|
|
|
|
|
}, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -156,26 +184,21 @@ export default { |
|
|
this.patientId = id; |
|
|
this.patientId = id; |
|
|
this.hospitalization = hospitalization; |
|
|
this.hospitalization = hospitalization; |
|
|
this.recordCode = recordCode; |
|
|
this.recordCode = recordCode; |
|
|
this.visible = true; |
|
|
|
|
|
}, |
|
|
|
|
|
handleCancel(e) { |
|
|
|
|
|
this.visible = false; |
|
|
|
|
|
this.visible1 = false; |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handleOk() { |
|
|
handleOk() { |
|
|
this.chooseItem(this.patientId, this.hospitalization, this.recordCode); |
|
|
this.chooseItem(this.patientId, this.hospitalization, this.recordCode); |
|
|
this.visible1 = true; |
|
|
|
|
|
}, |
|
|
}, |
|
|
handleChange(e) { |
|
|
handleChange(e) { |
|
|
this.recordType = e; |
|
|
this.recordStatus = e; |
|
|
}, |
|
|
}, |
|
|
// 修改审核状态 |
|
|
// 修改审核状态 |
|
|
async submit() { |
|
|
async submit(id) { |
|
|
try { |
|
|
try { |
|
|
const params = { |
|
|
const params = { |
|
|
param: { |
|
|
param: { |
|
|
id: this.recordId, |
|
|
id, |
|
|
inputStatus: this.recordType, |
|
|
inputStatus: typeof this.recordStatus === 'number' ? this.recordStatus : this.recordStatus.target.value, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
const res = await upPatientMes(params); |
|
|
const res = await upPatientMes(params); |
|
@ -192,23 +215,32 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 选择病患 |
|
|
// 选择病患 |
|
|
async chooseItem(id, hospitalization, recordCode) { |
|
|
chooseItem(id, hospitalization, recordCode) { |
|
|
|
|
|
this.setPatientId(id); |
|
|
|
|
|
this.setHospitalization(hospitalization); |
|
|
|
|
|
this.setRecordCode(recordCode); |
|
|
|
|
|
localStorage.setItem('patientId', id); |
|
|
|
|
|
localStorage.setItem('hospitalization', hospitalization); |
|
|
|
|
|
localStorage.setItem('recordCode', recordCode); |
|
|
|
|
|
this.generator(id, hospitalization); |
|
|
|
|
|
}, |
|
|
|
|
|
// 生成新报告单 |
|
|
|
|
|
async generator(patientId, serialNumber) { |
|
|
try { |
|
|
try { |
|
|
this.setPatientId(id); |
|
|
const params = { |
|
|
this.setHospitalization(hospitalization); |
|
|
param: { |
|
|
this.setRecordCode(recordCode); |
|
|
patientId, |
|
|
localStorage.setItem('patientId', id); |
|
|
serialNumber, |
|
|
localStorage.setItem('hospitalization', hospitalization); |
|
|
}, |
|
|
localStorage.setItem('recordCode', recordCode); |
|
|
}; |
|
|
const params = { param: { patientId: id } }; |
|
|
const res = await checkPatientComplete(params); |
|
|
const res = await generatePatientReport(params); |
|
|
|
|
|
const { code, msg, data } = res.data; |
|
|
const { code, msg, data } = res.data; |
|
|
|
|
|
console.log(data); |
|
|
if (code === 200) { |
|
|
if (code === 200) { |
|
|
console.log(data); |
|
|
console.log(data); |
|
|
localStorage.setItem('reportId', data.id); |
|
|
localStorage.setItem('reportId', data.id); |
|
|
} |
|
|
} |
|
|
if (localStorage.getItem('patientId') && localStorage.getItem('hospitalization')) { |
|
|
if (localStorage.getItem('patientId') && localStorage.getItem('hospitalization')) { |
|
|
this.visible = false; |
|
|
|
|
|
this.$message.success('选择成功'); |
|
|
this.$message.success('选择成功'); |
|
|
this.setShowTable(1); |
|
|
this.setShowTable(1); |
|
|
} |
|
|
} |
|
@ -216,13 +248,13 @@ export default { |
|
|
console.log(error); |
|
|
console.log(error); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 页码跳转 |
|
|
handleTableChange(pagination) { |
|
|
handleTableChange(pagination) { |
|
|
const { current } = pagination; |
|
|
const { current } = pagination; |
|
|
this.$emit('handleSelPatientMes', current); |
|
|
this.$emit('handleSelPatientMes', current); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 查看患者的详情 |
|
|
// 查看病例的详情 |
|
|
details(Id, hospitalization, code) { |
|
|
details(Id, hospitalization, code) { |
|
|
this.setPatientId(Id); |
|
|
this.setPatientId(Id); |
|
|
this.setHospitalization(hospitalization); |
|
|
this.setHospitalization(hospitalization); |
|
@ -232,13 +264,6 @@ export default { |
|
|
localStorage.setItem('recordCode', code); |
|
|
localStorage.setItem('recordCode', code); |
|
|
this.$router.push('/patientInfo'); |
|
|
this.$router.push('/patientInfo'); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 修改审核状态 |
|
|
|
|
|
showStatus(id, inputStatus) { |
|
|
|
|
|
this.recordId = id; |
|
|
|
|
|
this.recordStatus = inputStatus; |
|
|
|
|
|
this.statusModal = true; |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|