Browse Source

病例搜索相关界面

master
aBin 4 years ago
parent
commit
02704552fe
  1. 99
      src/components/CaseTable/CaseTable.vue
  2. 1061
      src/views/CaseSearch/CaseSearch.vue
  3. 2
      src/views/PatientInfo/PatientInfo.vue

99
src/components/CaseTable/CaseTable.vue

@ -0,0 +1,99 @@
<template>
<div>
<!-- search -->
<div style="width: 100%" v-if="lists && lists.list && lists.list.length > 0">
<a-table
:columns="columns"
:data-source="lists.list"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
@change="setData"
bordered
class="white pa-3"
>
<template slot="hospitalId" slot-scope="text, record">
<span>{{ record.hospitalId }}</span>
</template>
<template slot="inputStatus" slot-scope="text, record">
<span v-if="record.inputStatus === 0">新建</span>
<span v-else-if="record.inputStatus === 1">数据搜集中</span>
<span v-else-if="record.inputStatus === 2">数据搜集完成</span>
<span v-else-if="record.inputStatus === 3">数据搜集超时</span>
<span v-else-if="record.inputStatus === 4">废弃</span>
</template>
</a-table>
</div>
<a-empty v-else />
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
const columns = [
{
title: '住院号',
align: 'center',
dataIndex: 'hospitalization',
key: 'hospitalization',
},
{
title: '医院',
align: 'center',
dataIndex: 'hosName',
key: 'hosName',
scopedSlots: { customRender: 'hosName' },
},
{
title: '对照组',
align: 'center',
dataIndex: 'name',
key: 'name',
scopedSlots: { customRender: 'name' },
},
{
title: '录入状态',
align: 'center',
dataIndex: 'inputStatus',
key: 'inputStatus',
scopedSlots: { customRender: 'inputStatus' },
},
];
export default {
name: 'CaseTable',
props: { lists: { type: Object, default: null } },
data() {
return {
columns,
loading: false,
};
},
computed: {
pagination() {
const { pageNum, pageSize, total } = this.lists;
return {
current: pageNum,
pageSize,
total: +total,
};
},
},
methods: {
...mapMutations('home', ['setPatientId']),
//
chooseItem(id) {
this.setPatientId(id);
},
setData(pagination) {
const { current } = pagination;
this.$emit('setData', current);
},
},
};
</script>

1061
src/views/CaseSearch/CaseSearch.vue

File diff suppressed because it is too large

2
src/views/PatientInfo/PatientInfo.vue

@ -693,8 +693,8 @@
</template>
<script>
import { queryAll, saveCaseMes, upload } from 'config/api';
import { mapState } from 'vuex';
import { queryAll, saveCaseMes, upload } from 'config/api';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 9 },

Loading…
Cancel
Save