wally 4 years ago
parent
commit
bf9750548c
  1. 34
      src/components/BiologicalSampleSearch/SampleTable.vue
  2. 33
      src/components/BiologicalSampleSearch/Search.vue
  3. 28
      src/components/Echarts/Categorymap.vue
  4. 23
      src/components/Echarts/Cisualmap.vue
  5. 4
      src/components/MeetingPreview/MeetingPreview.vue
  6. 17
      src/config/api.js
  7. 39
      src/views/BiologicalSampleSearch/BiologicalSampleSearch.vue
  8. 90
      src/views/BiologicalSamples/BiologicalSamples.vue
  9. 29
      src/views/Meeting/Meeting.vue

34
src/components/BiologicalSampleSearch/SampleTable.vue

@ -1,19 +1,25 @@
<template>
<div>
<!-- search -->
<div style="width:100%" v-if="lists && lists.list && lists.list.length > 0">
<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"
:row-key="record => record.hospitalization"
@change="handleTableChange"
bordered
class="white pa-3"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
<template slot="sampleType" slot-scope="text, record">
<span v-if="record.sampleType === 0">抗血凝10ml</span>
<span v-else-if="record.sampleType === 1">促凝血5ml</span>
<span v-else-if="record.sampleType === 2">晨尿10ml</span>
<span v-else-if="record.sampleType === 3">24小时尿10ml</span>
</template>
<template slot="collectTime" slot-scope="text, record">
<span>{{ record.collectTime }}</span>
</template>
</a-table>
</div>
@ -25,18 +31,11 @@
import { mapMutations, mapState } from 'vuex';
const columns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
scopedSlots: { customRender: 'id' },
},
{
title: '医院',
align: 'center',
dataIndex: 'hospital',
key: 'hospital',
dataIndex: 'name',
key: 'name',
},
{
title: '住院号',
@ -47,14 +46,15 @@ const columns = [
{
title: '类型',
align: 'center',
dataIndex: 'type',
key: 'type',
dataIndex: 'sampleType',
key: 'sampleType',
scopedSlots: { customRender: 'sampleType' },
},
{
title: '采集时间',
align: 'center',
dataIndex: 'acquisitionTime',
key: 'acquisitionTime',
dataIndex: 'collectTime',
scopedSlots: { customRender: 'collectTime' },
},
];

33
src/components/BiologicalSampleSearch/Search.vue

@ -2,19 +2,10 @@
<!-- search -->
<div>
<div class="d-flex flex-row flex-nowrap">
<a-form
:form="form"
@submit="handleSubmit"
class="d-flex flex-nowrap align-center"
layout="inline"
>
<a-form :form="form" @submit="handleSubmit" class="d-flex flex-nowrap align-center" layout="inline">
<a-form-item>
<a-select placeholder="请选择医院" style="min-width: 150px" v-decorator="['hospital']">
<a-select-option
:key="item.id"
:value="item.id"
v-for="item in hospitals"
>{{ item.title }}</a-select-option>
<a-select-option :key="item.id" :value="item.id" v-for="item in hospitals">{{ item.title }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
@ -26,11 +17,7 @@
<a-input placeholder="患者住院号" style="width: 14em" v-decorator="['inpatientNumber']" />
</a-form-item>
<a-form-item>
<a-select
placeholder="请选择采集时间"
style="min-width: 150px"
v-decorator="['acquisitionTime']"
>
<a-select placeholder="请选择采集时间" style="min-width: 150px" v-decorator="['acquisitionTime']">
<a-select-option :key="t.id" :value="t.id" v-for="t in acquisitionTime">{{ t.title }}</a-select-option>
</a-select>
</a-form-item>
@ -67,33 +54,33 @@ export default {
],
types: [
{
id: 1,
id: 0,
title: '抗血凝10ml',
},
{
id: 2,
id: 1,
title: '促凝血5ml',
},
{
id: 3,
id: 2,
title: '晨尿10ml',
},
{
id: 4,
id: 3,
title: '24小时尿10ml',
},
],
acquisitionTime: [
{
id: 1,
id: 0,
title: '0天',
},
{
id: 2,
id: 14,
title: '14天',
},
{
id: 3,
id: 90,
title: '90天',
},
],

28
src/components/Echarts/Categorymap.vue

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-01-29 14:45:02
* @LastEditors: wally
* @LastEditTime: 2021-01-29 18:20:26
* @LastEditTime: 2021-02-19 15:50:23
-->
<template>
<!-- <div>数据统计组件</div> -->
@ -12,6 +12,7 @@
</div>
</template>
<script>
import { countAnalysis } from 'config/api';
export default {
name: 'Categorymap',
data() {
@ -20,6 +21,7 @@ export default {
width: '',
height: '',
timer: null,
list: [],
};
},
mounted() {
@ -192,6 +194,30 @@ export default {
};
myChart.setOption(option);
},
async getData() {
try {
const params = {
param: {
conditionList: [],
conditionListDate: [],
hospitalId: '',
hospitalization: '',
inpatientId: '',
inputStatus: '',
testQuestionsId: '',
},
};
const res = await countAnalysis(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.list = data;
} else {
console.log(msg);
}
} catch (error) {
this.$message.error('获取数据失败');
}
},
},
};
</script>

23
src/components/Echarts/Cisualmap.vue

@ -6,6 +6,7 @@
</div>
</template>
<script>
import { countCase } from 'config/api';
export default {
name: 'Cisualmap',
data() {
@ -14,6 +15,7 @@ export default {
width: '',
height: '',
timer: null,
list: [],
};
},
mounted() {
@ -86,6 +88,27 @@ export default {
myChart1.setOption(option1);
myChart2.setOption(option2);
},
async getData() {
try {
const params = {
param: {
endDate: '',
hospitalId: '',
startDate: '',
userId: '',
},
};
const res = await countCase(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.list = data;
} else {
console.log(msg);
}
} catch (error) {
this.$message.error('获取数据失败');
}
},
},
};
</script>

4
src/components/MeetingPreview/MeetingPreview.vue

@ -3,11 +3,7 @@
<a-button class="mr-3" type="primary">预览</a-button>
<a-modal footer title="会议记录预览" v-model="visible" width="1000px">
<div class="fill-width">
<!-- <a-card :bordered="false" title="会议记录预览"> -->
<a-card :bordered="false">
<!-- <div slot="extra">
<a-button @click="$emit('closeModal')" type="primary">返回</a-button>
</div>-->
<a-list bordered class="metting">
<a-list-item>
<span class="font-bold mb-2">会议时间</span>

17
src/config/api.js

@ -3,7 +3,7 @@
* @email: 18603454788@163.com
* @Date: 2021-01-29 11:16:27
* @LastEditors: wally
* @LastEditTime: 2021-02-18 16:20:23
* @LastEditTime: 2021-02-19 18:01:03
*/
import axios from 'axios';
let { proxyUrl, msgUrl } = require('@/config/setting');
@ -14,6 +14,7 @@ const imp = `${tcm}/import`; // 试题相关接口
const inpatient = `${tcm}/inpatient`; // 对照组接口
const statistics = `${tcm}/statistics`; // 数据统计相关接口
const conferenceRecords = `${tcm}/conferenceRecords`; // 会议纪要相关接口
const biologicalSamples = `${tcm}/biologicalSamples`; // 生物样本相关接口
// 保存患者病例信息
export const saveCaseMes = params => axios.post(`${patient}/saveCaseMes`, params);
@ -45,10 +46,16 @@ export const countAnalysis = params => axios.post(`${statistics}/countAnalysis`,
export const countCase = params => axios.post(`${statistics}/countCase`, params);
// 添加会议记录
export const saveConferenceRecords = params => axios.post(`${conferenceRecords}/save`, params);
export const saveConRec = params => axios.post(`${conferenceRecords}/save`, params);
// 查会议记录
export const selConRec = params => axios.post(`${conferenceRecords}/selConRec`, params);
// 查会议记录
export const getConRec = params => axios.post(`${conferenceRecords}/get`, params);
// 分享会议记录
export const shareMeeting = params => axios.post(`${conferenceRecords}/share`, params);
export const shareConRec = params => axios.post(`${conferenceRecords}/share`, params);
// 添加生物样本
export const addBiologicalSamples = params => axios.post(`${biologicalSamples}/addBiologicalSamples`, params);
// 搜索生物样本
export const selBiologicalSamples = params => axios.post(`${biologicalSamples}/selBiologicalSamples`, params);

39
src/views/BiologicalSampleSearch/BiologicalSampleSearch.vue

@ -1,3 +1,10 @@
<!--
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-02-19 16:04:48
* @LastEditors: wally
* @LastEditTime: 2021-02-19 17:59:27
-->
<template>
<div class="d-flex flex-column">
<search @searchPatientMes="searchPatientMes" />
@ -8,7 +15,7 @@
<script>
import Search from 'components/BiologicalSampleSearch/Search.vue';
import SampleTable from 'components/BiologicalSampleSearch/SampleTable.vue';
import { selPatientMes } from 'config/api';
import { selBiologicalSamples } from 'config/api';
import { mapState, mapActions } from 'vuex';
export default {
@ -17,8 +24,11 @@ export default {
data() {
return {
lists: { pageNum: 1, pageSize: 10, total: 1, list: [] },
hospitalization: '',
inpatientId: '',
collectTime: '', //
hospitalId: '', // id
hospitalization: '', //
pageNum: 1, //
sampleType: '', //
};
},
@ -32,24 +42,31 @@ export default {
searchPatientMes(value) {
if (value) {
this.hospitalId = value.hospital;
this.collectTime = value.acquisitionTime;
this.hospitalization = value.inpatientNumber;
this.inpatientId = value.groupValue;
this.sampleType = value.sampleType;
}
this.handleSelPatientMes();
},
async handleSelPatientMes(pageNum = 1) {
async handleSelPatientMes(current) {
try {
const { hospitalization, inpatientId } = this;
if (current) {
this.pageNum = current;
}
const { collectTime, hospitalId, hospitalization, pageNum, sampleType } = this;
const params = {
param: {
hospitalization,
inpatientId,
pageNum,
pageSize: 10,
collectTime: collectTime, //
hospitalId: hospitalId, // id
hospitalization: hospitalization, //
pageNum: pageNum, //
pageSize: 10, //
sampleType: sampleType, //
},
};
const res = await selPatientMes(params);
const res = await selBiologicalSamples(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.lists = data;

90
src/views/BiologicalSamples/BiologicalSamples.vue

@ -4,50 +4,30 @@
<a-card :bordered="false" title="生物样本">
<a-form :form="form" @submit="handleSubmit">
<!-- 住院号 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="住院号"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="住院号">
<a-input
placeholder="住院号"
v-decorator="[
'inpatientNumber',
{
rules: [
{ required: true, message: '住院号不能为空' },
{ whitespace: true, message: '住院号不能为空' },
{ max: 140, massage: '住院号最多140个字符' },
],
},
]"
'inpatientNumber',
{
rules: [
{ required: true, message: '住院号不能为空' },
{ whitespace: true, message: '住院号不能为空' },
{ max: 140, massage: '住院号最多140个字符' },
],
},
]"
/>
</a-form-item>
<!-- 样本类型 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="样本类型"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="样本类型">
<a-select placeholder="请选择样本类型" style="min-width: 150px" v-decorator="['sampleType']">
<a-select-option
:key="item.id"
:value="item.id"
v-for="item in types"
>{{ item.title }}</a-select-option>
<a-select-option :key="item.id" :value="item.id" v-for="item in types">{{ item.title }}</a-select-option>
</a-select>
</a-form-item>
<!-- 样本类型 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="样本类型"
>
<a-select
placeholder="请选择采集时间"
style="min-width: 150px"
v-decorator="['acquisitionTime']"
>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="采集时间">
<a-select placeholder="请选择采集时间" style="min-width: 150px" v-decorator="['acquisitionTime']">
<a-select-option :key="t.id" :value="t.id" v-for="t in acquisitionTime">{{ t.title }}</a-select-option>
</a-select>
</a-form-item>
@ -62,6 +42,7 @@
</template>
<script>
import { addBiologicalSamples } from 'config/api';
const formItemLayout = {
labelCol: { span: 4 },
wrapperCol: { span: 18 },
@ -77,33 +58,33 @@ export default {
inpatientNumber: '', //
types: [
{
id: 1,
id: 0,
title: '抗血凝10ml',
},
{
id: 2,
id: 1,
title: '促凝血5ml',
},
{
id: 3,
id: 2,
title: '晨尿10ml',
},
{
id: 4,
id: 3,
title: '24小时尿10ml',
},
],
acquisitionTime: [
{
id: 1,
id: 0,
title: '0天',
},
{
id: 2,
id: 14,
title: '14天',
},
{
id: 3,
id: 90,
title: '90天',
},
],
@ -117,19 +98,22 @@ export default {
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
// const param = values;
// const params = { param };
// console.log('params: ', params);
// const res = await addPage(params);
// const { data, msg, code } = res.data;
// this.$emit('closeModal');
// if (code === 200) {
// this.$message.success('');
// } else {
// throw msg;
// }
const param = {
sampleType: values.sampleType,
hospitalization: values.inpatientNumber,
collectTime: values.acquisitionTime,
};
const params = { param };
const res = await addBiologicalSamples(params);
const { data, msg, code } = res.data;
this.$emit('closeModal');
if (code === 200) {
this.$message.success('添加成功');
} else {
throw msg;
}
} catch (error) {
// this.$message.error(error || '');
this.$message.error(error || '添加失败');
}
}
});

29
src/views/Meeting/Meeting.vue

@ -3,11 +3,10 @@
<div class="metting">
<a-card :bordered="false" title="会议记录">
<div class="d-flex flex-nowrap" slot="extra">
<!-- <a-button @click="openPreview" class="mr-3" type="primary">预览</a-button> -->
<div @click="openPreview">
<meeting-preview class="mr-3" ref="meetingPreview" />
</div>
<a-button>分享</a-button>
<a-button @click="shareConRec">分享</a-button>
</div>
<a-form :form="form" @submit="handleSubmit">
<!-- 会议时间 -->
@ -90,11 +89,11 @@
</template>
<script>
import MeetingPreview from 'components/MeetingPreview/MeetingPreview.vue';
import QuillEditor from 'components/QuillEditor/QuillEditor.vue';
import moment from 'moment';
import { saveConferenceRecords } from 'config/api';
import { saveConRec, shareConRec } from 'config/api';
import { mapMutations } from 'vuex';
import MeetingPreview from 'components/MeetingPreview/MeetingPreview.vue';
const formItemLayout = {
labelCol: { span: 4 },
@ -161,7 +160,7 @@ export default {
const previewInfo = { host, place, startTime, endTime, participants, meetingMinutes, discussionContent };
//
const params = previewInfo;
this.saveConferenceRecords(params);
this.saveConRec(params);
} catch (error) {
this.$message.error(error || '提交失败');
}
@ -170,9 +169,9 @@ export default {
},
//
async saveConferenceRecords(params) {
async saveConRec(params) {
try {
const res = await saveConferenceRecords(params);
const res = await saveConRec(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('提交成功');
@ -191,6 +190,22 @@ export default {
await this.setPreviewInfo(previewInfo);
this.$refs.meetingPreview.openModal();
},
//
async shareConRec() {
try {
const params = { param: { taskId: 0 } };
const res = await shareConRec(params);
const { data, msg, code } = res.data;
if (code === 200) {
console.log('data: ', data);
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '分享失败');
}
},
},
};
</script>

Loading…
Cancel
Save