Browse Source

数据分析统计图数据缓存问题解决

master
aBin 4 years ago
parent
commit
5b4a14500a
  1. 23
      src/common/portrait.styl
  2. 78
      src/components/CaseTable/CaseKTOne.vue
  3. 82
      src/components/CaseTable/CaseKTTwo.vue
  4. 58
      src/components/CaseTable/CaseTable.vue
  5. 89
      src/components/Echarts/Analysis.vue
  6. 94
      src/components/Echarts/Cisualmap.vue
  7. 6
      src/components/Echarts/Piemap.vue
  8. 75
      src/components/Echarts/PiemapHos.vue
  9. 68
      src/components/Echarts/Treemap.vue
  10. 4
      src/components/MeetingPreview/MeetingPreview.vue
  11. 9
      src/config/api.js
  12. 9
      src/store/modules/home/mutations.js
  13. 1
      src/store/modules/home/state.js
  14. 85
      src/views/CaseAnalysis/CaseAnalysis.vue
  15. 83
      src/views/CaseSearch/CaseSearch.vue
  16. 22
      src/views/Index/Index.vue
  17. 17
      src/views/Meeting/Meeting.vue
  18. 1123
      src/views/PatientInfo/PatientInfo.vue

23
src/common/portrait.styl

@ -197,7 +197,7 @@
height: 40px;
font-size: 14px;
right: 50px;
top: 60px;
top: 50px;
}
// flex
.d-flex{
@ -258,6 +258,11 @@
cursor:pointer;
}
.pointerEdit {
font-size: 16px;
margin-right: 20px;
}
.fill-height{
height:100%;
}
@ -323,3 +328,19 @@ h2{
.fill-height{
height:100%;
}
// .ant-form-item-label {
// text-align: left;
// }
// .ant-form-item-control {
// width:100%
// }
.ant-form-item-children(:only-child) {
display: flex;
flex-wrap: nowrap;
}
.ant-card-head-title {
font-weight: 600 !important;
font-size: 18px !important;
}

78
src/components/CaseTable/CaseKTOne.vue

@ -0,0 +1,78 @@
<template>
<div class="flex-column">
<a-form :form="form">
<div v-for="(item, index) in caseList" :key="index" style="width: 100%">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" :label="item.name" label-align="left">
<a-form-item v-if="item.optionStatus === 1" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
<a-input-number
placeholder="最小值"
style="width: 100px; margin-left: 40px"
:min="0"
@change="onChange($event, item.code, 'min')"
/>~
<a-input-number placeholder="最大值" style="width: 100px" :min="0" @change="onChange($event, item.code, 'max')" />
</a-form-item>
<!-- <a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
v-if="item.children.length > 0"
label-align="left"
> -->
<CaseKTTwo v-if="item.children.length > 0" :case-list="item.children" style="margin-top: 40px" />
<!-- </a-form-item> -->
</a-form-item>
</div>
</a-form>
</div>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import { searchParam } from 'config/api';
import CaseKTTwo from './CaseKTTwo';
const formItemLayout = {
labelCol: { span: 5 },
wrapperCol: { span: 18 },
};
const tailItemLayout = { wrapperCol: { span: 18, offset: 4 } };
export default {
name: 'CaseKTOne',
components: { CaseKTTwo },
props: {
caseList: {
type: Array,
default: () => [],
},
},
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'page-add' }),
form1: this.$form.createForm(this, { name: 'search' }),
};
},
methods: {
...mapMutations('home', ['setCaseData']),
onChange(e, code, str) {
console.log(e);
let obj = {};
if (str === 'min') {
obj = {
code,
start: e,
};
} else {
obj = {
code,
end: e,
};
}
this.setCaseData(obj);
},
},
};
</script>
<style lang="stylus" scoped></style>

82
src/components/CaseTable/CaseKTTwo.vue

@ -0,0 +1,82 @@
<template>
<div class="flex-column">
<a-form :form="form">
<div v-for="(item, index) in caseList" :key="index" style="width: 100%">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" :label="item.name">
<a-form-item
v-if="item.optionStatus === 1"
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label-align="left"
>
<a-input-number
placeholder="最小值"
style="width: 100px; margin-left: 40px"
:min="0"
@change="onChange1($event, item.code, 'min')"
/>~
<a-input-number placeholder="最大值" style="width: 100px" :min="0" @change="onChange1($event, item.code, 'max')" />
</a-form-item>
<!-- <a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
v-if="item.children.length > 0"
label-align="left"
> -->
<CaseKTOne v-if="item.children.length > 0" :case-list="item.children" style="margin-top: 40px" />
<!-- </a-form-item> -->
</a-form-item>
</div>
</a-form>
</div>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import CaseKTOne from './CaseKTOne';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18 },
};
const tailItemLayout = { wrapperCol: { span: 18, offset: 4 } };
export default {
name: 'CaseKTOne',
components: { CaseKTOne },
props: {
caseList: {
type: Array,
default: () => [],
},
},
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'page-add' }),
form1: this.$form.createForm(this, { name: 'search' }),
activeKey: [],
};
},
methods: {
...mapMutations('home', ['setCaseData']),
onChange1(e, code, str) {
let obj = {};
if (str === 'min') {
obj = {
code,
start: e,
};
} else {
obj = {
code,
end: e,
};
}
this.setCaseData(obj);
},
},
};
</script>
<style lang="stylus" scoped></style>

58
src/components/CaseTable/CaseTable.vue

@ -23,16 +23,23 @@
<span v-else-if="record.inputStatus === 4">废弃</span>
</template>
<template slot="id" slot-scope="text, record">
<a-button type="primary" @click="details(record.id)">查看详情</a-button>
<a-icon @click="showEditModal(record.id, record.inputStatus)" class="pointer pointerEdit" theme="twoTone" type="edit" />
<a-button type="primary" @click="details(record.id, record.hospitalization)">查看详情</a-button>
</template>
</a-table>
</div>
<a-empty v-else />
<a-modal title="修改状态" :visible="visible" :confirm-loading="confirmLoading" @ok="handleOk" @cancel="handleCancel">
<a-select :default-value="defaultValue" :key="defaultValue" style="width: 200px" @change="handleChange">
<a-select-option v-for="(item, index) in statusList" :value="index" :key="index"> {{ item }} </a-select-option>
</a-select>
</a-modal>
</div>
</template>
<script>
import { mapMutations, mapState } from 'vuex';
import { upPatientMes } from 'config/api';
const columns = [
{
title: '住院号',
@ -79,6 +86,12 @@ export default {
return {
columns,
loading: false,
visible: false,
confirmLoading: false,
recordId: '',
recordType: '',
defaultValue: '',
statusList: ['新建', '数据搜集中', '数据搜集完成', '数据搜集超时', '废弃'],
};
},
@ -94,7 +107,7 @@ export default {
},
methods: {
...mapMutations('home', ['setPatientId']),
...mapMutations('home', ['setPatientId', 'setHospitalization']),
//
chooseItem(id) {
@ -104,11 +117,46 @@ export default {
const { current } = pagination;
this.$emit('setData', current);
},
details(Id) {
console.log(Id);
localStorage.setItem('patientId', Id);
details(Id, hospitalization) {
console.log(Id, hospitalization);
this.setPatientId(Id);
this.setHospitalization(hospitalization);
this.$router.push('/patientInfo');
},
showEditModal(id, inputStatus) {
this.recordId = id;
this.recordType = inputStatus;
this.defaultValue = this.statusList[inputStatus];
this.visible = true;
console.log(this.recordType);
},
async handleOk() {
try {
const params = {
param: {
id: this.recordId,
inputStatus: this.recordType,
},
};
const res = await upPatientMes(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.$emit('setData');
this.visible = false;
this.$message.success('修改成功');
} else {
this.$message.error('修改失败');
}
} catch (error) {
this.$message.error(error);
}
},
handleCancel() {
this.visible = false;
},
handleChange(e) {
this.recordType = e;
},
},
};
</script>

89
src/components/Echarts/Analysis.vue

@ -33,11 +33,40 @@ export default {
nameList: [], //
dataList: [],
series: [],
stringList: [],
colorList: ['#5470C6', '#91CC75', '#FAC858', '#EE6666', '#73C0DE'],
};
},
computed: {
option() {
return {
tooltip: {
trigger: 'axis',
axisPointer: {
//
type: 'shadow', // 线'line' | 'shadow'
},
},
legend: { data: this.lists.stringList },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
},
xAxis: { type: 'value' },
yAxis: {
type: 'category',
data: this.nameList,
},
series: this.series,
};
},
},
watch: {
lists() {
async lists() {
// debugger;
this.nameList = [];
this.dataList = [];
this.series = [];
@ -47,35 +76,34 @@ export default {
this.nameList.push(this.lists.selGroupNums[i].name);
let arr = [];
//
// if (this.lists.selGroupNums[i].list.length > 0) {
console.log(this.lists.stringList);
for (let j = 0; j < this.lists.stringList.length; j++) {
let obj = {
name: this.lists.stringList[j],
value: 0,
};
// list
for (let k = 0; k < this.lists.selGroupNums[i].list.length; k++) {
// listcontent content value
if (this.lists.selGroupNums[i].list[k].content === this.lists.stringList[j]) {
let obj = {
name: this.lists.selGroupNums[i].list[k].content,
value: this.lists.selGroupNums[i].list[k].nums,
};
arr.push(obj);
break;
// list
} else if (k === this.lists.selGroupNums[i].list.length - 1) {
let obj = {
name: this.lists.stringList[i],
value: 0,
};
arr.push(obj);
obj.value = this.lists.selGroupNums[i].list[k].nums;
break;
}
}
arr.push(obj);
}
// }
this.dataList.push(arr);
}
//
for (let i = 0; i < this.dataList[0].length; i++) {
let arr1 = [];
for (let k = 0; k < this.dataList.length; k++) {
arr1.push(this.dataList[k][i].value);
if (this.dataList[k][i]) {
arr1.push(this.dataList[k][i].value);
}
}
let obj = {
name: this.dataList[0][i].name,
@ -88,7 +116,8 @@ export default {
};
this.series.push(obj);
}
this.drawLine();
console.log(this.series);
await this.drawLine();
},
},
mounted() {
@ -97,31 +126,11 @@ export default {
methods: {
drawLine() {
// domecharts
let myChart = this.$echarts.init(document.getElementById('Analysis'));
let myChart = document.getElementById('Analysis');
//
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
//
type: 'shadow', // 线'line' | 'shadow'
},
},
legend: { data: this.lists.stringList },
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
},
xAxis: { type: 'value' },
yAxis: {
type: 'category',
data: this.nameList,
},
series: this.series,
};
myChart.setOption(option);
myChart.removeAttribute('_echarts_instance_');
let myChart1 = this.$echarts.init(myChart);
myChart1.setOption(this.option);
},
},
};

94
src/components/Echarts/Cisualmap.vue

@ -106,13 +106,15 @@ export default {
};
},
},
watch: {
hospitalId() {
this.init(this.drawLine);
},
},
// watch: {
// hospitalId() {
// this.init(this.drawLine);
// },
// },
mounted() {
this.init(this.drawLine);
setTimeout(() => {
this.init(this.drawLine);
}, 500);
},
methods: {
async drawLine() {
@ -121,82 +123,10 @@ export default {
let myChart2 = this.$echarts.init(document.getElementById('Cisualmap2'));
await this.getData();
//
var option1 = {
title: {
left: 'center',
text: '新建病例',
},
tooltip: {
trigger: 'item',
formatter: '数量 : {c}',
},
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'empty',
},
{
type: 'inside',
xAxisIndex: 0,
filterMode: 'empty',
},
],
xAxis: {
type: 'category',
data: this.dateList1,
},
yAxis: { type: 'value' },
series: [
{
data: this.dataList1,
type: 'line',
areaStyle: { color: 'rgba(229,244,254,1)' },
lineStyle: { color: 'rgb(45,151,213)' },
itemStyle: { color: 'rgb(45,151,213)' },
smooth: true,
},
],
};
var option2 = {
title: {
left: 'center',
text: '已完成病例',
},
tooltip: {
trigger: 'item',
formatter: '数量 : {c}',
},
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'empty',
},
{
type: 'inside',
xAxisIndex: 0,
filterMode: 'empty',
},
],
xAxis: {
type: 'category',
data: this.dateList2,
},
yAxis: { type: 'value' },
series: [
{
data: this.dataList2,
type: 'line',
areaStyle: { color: 'rgba(229,244,254,1)' },
lineStyle: { color: 'rgb(45,151,213)' },
itemStyle: { color: 'rgb(45,151,213)' },
smooth: true,
},
],
};
myChart1.setOption(this.option1);
myChart2.setOption(this.option2);
setTimeout(() => {
myChart1.setOption(this.option1);
myChart2.setOption(this.option2);
}, 100);
},
async getData() {
try {

6
src/components/Echarts/Piemap.vue

@ -1,7 +1,7 @@
<template>
<!-- <div>数据统计组件</div> -->
<div style="width: 50%; height: 300px" class="chart-box">
<div id="Piemap" style="height: 300px"></div>
<div style="width: 100%; height: 300px; text-align: center" class="chart-box">
<div id="Piemap" style="width: 100%; height: 300px"></div>
</div>
</template>
<script>
@ -35,7 +35,7 @@ export default {
{
name: '生物样本数量',
type: 'pie',
radius: [20, 100],
radius: ['20%', '80%'],
center: ['50%', '50%'],
roseType: 'area',
itemStyle: { borderRadius: 8 },

75
src/components/Echarts/PiemapHos.vue

@ -0,0 +1,75 @@
<template>
<!-- <div>数据统计组件</div> -->
<div style="width: 50%; height: 300px" class="chart-box">
<div id="PiemapHos" style="height: 300px"></div>
</div>
</template>
<script>
import { selByHosAllYBS } from 'config/api';
import mixins from 'views/Mixin/mixin.js';
import { mapState } from 'vuex';
export default {
name: 'PiemapHos',
mixins: [mixins],
data() {
return {
// msg: 'Welcome to Your Vue.js App',
width: '',
height: '',
dataList: [],
};
},
computed: mapState('home', ['hospitalId']),
mounted() {
this.init(this.drawLine);
},
methods: {
async drawLine() {
// domecharts
let myChart = this.$echarts.init(document.getElementById('PiemapHos'));
//
await this.getData();
var option = {
tooltip: { trigger: 'item' },
color: ['#FE9C58', '#7AEBFF', '#FFCC00', '#744CFF'],
legend: { top: 'bottom' },
series: [
{
name: '生物样本数量',
type: 'pie',
radius: [20, 100],
center: ['50%', '50%'],
roseType: 'area',
itemStyle: { borderRadius: 8 },
data: this.dataList,
},
],
};
myChart.setOption(option);
},
async getData() {
try {
const params = { param: { hospitalId: this.hospitalId } };
const res = await selByHosAllYBS(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data, 123);
for (let i = 0; i < data.length; i++) {
var obj = {
value: data[i].nums,
name: data[i].name,
};
this.dataList.push(obj);
}
} else {
console.log(msg, 132);
}
} catch (error) {
console.log(error);
}
},
},
};
</script>
<style lang="stylus" scoped ></style>

68
src/components/Echarts/Treemap.vue

@ -1,7 +1,7 @@
<template>
<!-- <div>数据统计组件</div> -->
<div style="width: 50%; height: 300px" class="chart-box">
<div id="Treemap" style="height: 300px"></div>
<div style="width: 100%; height: 300px; text-align: center" class="chart-box">
<div id="Treemap" style="width: 100%; height: 300px"></div>
</div>
</template>
<script>
@ -18,6 +18,7 @@ export default {
width: '',
height: '',
valueList: [],
nameList: [],
maxNum: 0,
};
},
@ -28,14 +29,9 @@ export default {
tooltip: { trigger: 'axis' },
radar: [
{
indicator: [
{ text: '已完成', max: this.maxNum },
{ text: '废弃', max: this.maxNum },
{ text: '进行中', max: this.maxNum },
{ text: '未完成', max: this.maxNum },
],
indicator: this.nameList,
center: ['50%', '50%'],
radius: 120,
radius: '80%',
},
],
series: [
@ -69,42 +65,12 @@ export default {
// domecharts
await this.getData();
let myChart = this.$echarts.init(document.getElementById('Treemap'));
//
var option = {
tooltip: { trigger: 'axis' },
radar: [
{
indicator: [
{ text: '已完成', max: this.maxNum },
{ text: '废弃', max: this.maxNum },
{ text: '进行中', max: this.maxNum },
{ text: '未完成', max: this.maxNum },
],
center: ['50%', '50%'],
radius: 120,
},
],
series: [
{
type: 'radar',
tooltip: { trigger: 'item' },
areaStyle: { color: 'rgba(84,112,198,0.9)' },
lineStyle: { color: 'rgb(84,112,198)' },
itemStyle: { color: 'rgb(84,112,198)' },
data: [
{
value: this.valueList,
name: '病例统计',
},
],
},
],
};
myChart.setOption(this.option);
},
async getData() {
try {
this.valueList = [];
this.nameList = [];
this.maxNum = 0;
const params = {
param: {
@ -116,21 +82,23 @@ export default {
const { code, data, msg } = res.data;
if (code === 200) {
// console.log(data);
for (let key in data) {
this.valueList.push(data[key]);
}
console.log(this.valueList);
for (let i = 0; i < this.valueList.length; i++) {
if (this.valueList[i] > this.maxNum) {
this.maxNum = this.valueList[i];
for (let i = 0; i < data.length; i++) {
if (data[i].nums > this.maxNum) {
this.maxNum = data[i].nums;
}
}
for (let i = 0; i < data.length; i++) {
this.valueList.push(data[i].nums);
let obj = {
text: data[i].name,
max: this.maxNum,
};
this.nameList.push(obj);
}
} else {
console.log(msg);
}
} catch (error) {
console.log(error);
}
} catch (error) {}
},
},
};

4
src/components/MeetingPreview/MeetingPreview.vue

@ -4,7 +4,7 @@
<a-modal footer title="会议记录预览" v-model="visible" width="1000px">
<div class="fill-width">
<a-card :bordered="false">
<a-list bordered class="metting">
<a-list class="metting">
<a-list-item>
<span class="font-bold mb-2">会议时间</span>
{{ previewInfo.startTime || '' }} {{ previewInfo.endTime }}
@ -29,7 +29,7 @@
<span v-dompurify-html="previewInfo.discussionContent"></span>
</div>
</a-list-item>
<a-list-item class="d-flex flex-column align-left">
<a-list-item class="d-flex flex-column align-left" v-if="previewInfo.meetingMinutes">
<span class="font-bold mb-2">会议纪要</span>
<div class="fill-width">
<span v-dompurify-html="previewInfo.meetingMinutes"></span>

9
src/config/api.js

@ -34,6 +34,9 @@ export const saveCaseMes = params => axios.post(`${patient}/saveCaseMes`, params
// 添加患者基本信息
export const savePatientMes = params => axios.post(`${patient}/savePatientMes`, params);
// 修改患者录入状态
export const upPatientMes = params => axios.post(`${patient}/upPatientMes`, params);
// 查询患者基本信息
export const selPatientMes = params => axios.post(`${patient}/selPatientMes`, params);
@ -82,6 +85,9 @@ export const addBiologicalSamples = params => axios.post(`${biologicalSamples}/a
// 搜索生物样本
export const selBiologicalSamples = params => axios.post(`${biologicalSamples}/selBiologicalSamples`, params);
// 搜索某个医院的病例完成情况
export const selByHosAllYBS = params => axios.post(`${biologicalSamples}/selByHosAllYBS`, params);
// 进行中的患者进度
export const patientProgress = params => axios.post(`${statistics}/selPatientProgress`, params);
@ -90,3 +96,6 @@ export const adjacentTasks = params => axios.post(`${statistics}/adjacentTasks`,
// 生成报告单
export const generatePatientReport = params => axios.post(`${question}/generatePatientReport`, params);
// 查询认知量表的搜索条件
export const searchParam = params => axios.post(`${question}/patientReport/searchParam`, params);

9
src/store/modules/home/mutations.js

@ -79,6 +79,15 @@ const mutations = {
setHospitalId(state, data) {
state.hospitalId = data;
},
/**
* 设置认知量表答题答案
* @param {object} state
* @param {object} data
*/
setCaseData(state, data) {
state.caseData = data;
},
};
export default mutations;

1
src/store/modules/home/state.js

@ -7,6 +7,7 @@ const state = {
previewInfo: { host: '', place: '', startTime: '', endTime: '', participants: '', meetingMinutes: '', discussionContent: '' }, // 预览信息
ptProps: null, // 接受PT传过来的 pluginId,projectId,roleId,taskId,userId
hospitalId: '', // 医院Id
caseData: null, // 病例 搜索/分析 下的认知量表所做的每道题,每次改变重新存一次
};
export default state;

85
src/views/CaseAnalysis/CaseAnalysis.vue

@ -725,9 +725,16 @@
<!-- </div> -->
</a-collapse>
</a-form>
<a-collapse v-model="activeKey1">
<a-collapse-panel header="认知量表">
<CaseKTOne :case-list="caseList" />
</a-collapse-panel>
</a-collapse>
<div style="padding: 4px 0 40px 0">
<span>分析内容:</span>
<a-cascader
style="width: 200px"
class="ml-3"
:field-names="{ label: 'name', value: 'id', children: 'optionVos' }"
:options="options"
:display-render="displayRender"
@ -741,7 +748,7 @@
</a-select-option>
</a-select>
</div>
<a-button class="white--text px-10" type="primary" @click="setData()">搜索</a-button>
<a-button class="white--text px-10" type="primary" @click="setData">搜索</a-button>
<a-card style="width: 100%; height: 600px; margin-top: 10px" title="病例分析统计">
<analysis :lists="lists" />
</a-card>
@ -750,7 +757,8 @@
<script>
import { mapState, mapActions } from 'vuex';
import { getHList, selSearchCriteriaList, queryAll, countAnalysis, upload, queryQuestion } from 'config/api';
import { getHList, selSearchCriteriaList, queryAll, countAnalysis, upload, queryQuestion, searchParam } from 'config/api';
import CaseKTOne from 'components/CaseTable/CaseKTOne.vue';
import Analysis from 'components/Echarts/Analysis';
const formItemLayout = {
labelCol: { span: 6 },
@ -759,7 +767,7 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 18, offset: 4 } };
export default {
name: 'CaseAnalysis',
components: { Analysis },
components: { Analysis, CaseKTOne },
data() {
return {
formItemLayout,
@ -816,6 +824,9 @@ export default {
options: [], //
testQuestionsId: '', // Id
inpatientList: [], // Id
caseList: [],
caseAnswer: [], //
activeKey1: [],
};
},
computed: {
@ -826,12 +837,64 @@ export default {
return { Authorization: `Bearer ${token}` };
},
},
watch: {
caseData(val) {
if (this.caseAnswer.length === 0) {
if (typeof val.start === 'number') {
const obj = {
code: val.code,
start: val.start,
end: '',
};
this.caseAnswer.push(obj);
} else {
const obj = {
code: val.code,
start: '',
end: val.end,
};
this.caseAnswer.push(obj);
}
} else {
for (let i = 0; i < this.caseAnswer.length; i++) {
if (val.code === this.caseAnswer[i].code) {
if (typeof val.start === 'number') {
this.caseAnswer[i].start = val.start;
break;
} else {
this.caseAnswer[i].end = val.end;
break;
}
} else if (i === this.caseAnswer.length - 1) {
if (typeof val.start === 'number') {
const obj = {
code: val.code,
start: val.start,
end: '',
};
this.caseAnswer.push(obj);
break;
} else {
const obj = {
code: val.code,
start: '',
end: val.end,
};
this.caseAnswer.push(obj);
break;
}
}
}
}
},
},
created() {
this.getQues();
this.getControlGroups();
this.handleSearchCriteriaList();
this.getHos();
this.setData();
this.getSearchParam();
},
methods: {
@ -1140,7 +1203,7 @@ export default {
},
//
changeQues(value) {
this.testQuestionsId = parseInt(value);
this.testQuestionsId = value[value.length - 1];
},
displayRender({ labels }) {
return labels[labels.length - 1];
@ -1163,6 +1226,7 @@ export default {
hospitalization: this.setObj.hospitalization, //
inpatientId: this.inpatientList, // id
inputStatus: this.setObj.inputStatus, //
reportParams: this.caseAnswer, //
testQuestionsId: this.testQuestionsId,
},
};
@ -1178,6 +1242,19 @@ export default {
this.$message.error('error');
}
},
//
async getSearchParam() {
try {
const params = { param: { parentCode: 'KT' } };
const res = await searchParam(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.caseList = data;
}
} catch (error) {
console.log(error);
}
},
},
};
</script>

83
src/views/CaseSearch/CaseSearch.vue

@ -722,6 +722,11 @@
<!-- </div> -->
</a-collapse>
</a-form>
<a-collapse v-model="activeKey1">
<a-collapse-panel header="认知量表">
<CaseKTOne :case-list="caseList" />
</a-collapse-panel>
</a-collapse>
<a-button class="white--text px-10" type="primary" @click="setData()" style="margin-top: 40px">搜索</a-button>
<case-table :lists="lists" @setData="setData" class="mt-3" />
</div>
@ -729,8 +734,9 @@
<script>
import { mapState, mapActions } from 'vuex';
import { getHList, selSearchCriteriaList, queryAll, selPatientMesList, upload } from 'config/api';
import { getHList, selSearchCriteriaList, queryAll, selPatientMesList, upload, searchParam } from 'config/api';
import CaseTable from 'components/CaseTable/CaseTable.vue';
import CaseKTOne from 'components/CaseTable/CaseKTOne.vue';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 9 },
@ -738,7 +744,7 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 18, offset: 4 } };
export default {
name: 'CaseSearch',
components: { CaseTable },
components: { CaseTable, CaseKTOne },
data() {
return {
formItemLayout,
@ -792,22 +798,76 @@ export default {
],
lists: { pageNum: 1, pageSize: 10, total: 1, list: [] },
activeKey: [], //
activeKey1: [],
caseList: [],
caseAnswer: [], //
};
},
computed: {
...mapState('home', ['patientId', 'controlGroups']),
...mapState('home', ['patientId', 'controlGroups', 'caseData']),
//
headers() {
const token = sessionStorage.getItem('anyringToken');
return { Authorization: `Bearer ${token}` };
},
},
watch: {
caseData(val) {
if (this.caseAnswer.length === 0) {
if (typeof val.start === 'number') {
const obj = {
code: val.code,
start: val.start,
end: '',
};
this.caseAnswer.push(obj);
} else {
const obj = {
code: val.code,
start: '',
end: val.end,
};
this.caseAnswer.push(obj);
}
} else {
for (let i = 0; i < this.caseAnswer.length; i++) {
if (val.code === this.caseAnswer[i].code) {
if (typeof val.start === 'number') {
this.caseAnswer[i].start = val.start;
break;
} else {
this.caseAnswer[i].end = val.end;
break;
}
} else if (i === this.caseAnswer.length - 1) {
if (typeof val.start === 'number') {
const obj = {
code: val.code,
start: val.start,
end: '',
};
this.caseAnswer.push(obj);
break;
} else {
const obj = {
code: val.code,
start: '',
end: val.end,
};
this.caseAnswer.push(obj);
break;
}
}
}
}
},
},
created() {
this.getControlGroups();
this.handleSearchCriteriaList();
this.getHos();
this.setData();
this.getSearchParam();
},
methods: {
@ -1105,6 +1165,7 @@ export default {
},
//
async setData(current) {
// console.log(this.caseAnswer);
if (current) {
this.pageNum = current;
}
@ -1117,6 +1178,7 @@ export default {
hospitalization: this.setObj.hospitalization, //
inpatientId: this.setObj.inpatientId, // id
inputStatus: this.setObj.inputStatus, //
reportParams: this.caseAnswer, //
pageNum: this.pageNum,
pageSize: this.pageSize,
},
@ -1133,6 +1195,19 @@ export default {
this.$message.error('error');
}
},
//
async getSearchParam() {
try {
const params = { param: { parentCode: 'KT' } };
const res = await searchParam(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.caseList = data;
}
} catch (error) {
console.log(error);
}
},
},
};
</script>

22
src/views/Index/Index.vue

@ -1,13 +1,16 @@
<template>
<div class="flex-wrap">
<div class="fill-width mb-3 flex-wrap">
<a-card style="width: 100%; height: 400px" title="病例统计及各医院生物样本统计">
<treemap style="float: left" />
<piemap style="float: left" />
<a-card style="width: 50%; height: 400px; float: left" title="病例统计">
<treemap style="margin: auto" />
</a-card>
<a-card style="width: 50%; height: 400px; float: right" :title="hospitalId ? '生物样本统计' : '各医院生物样本统计'">
<piemap style="margin: auto" v-if="hospitalId === ''" />
<piemap-hos style="margin: auto" v-else />
</a-card>
</div>
<div class="fill-width mb-3">
<a-card style="width: 100%; height: 400px" title="各院病例分析">
<a-card style="width: 100%; height: 400px" title="各院病例分析">
<categorymap />
</a-card>
</div>
@ -16,11 +19,6 @@
<cisualmap />
</a-card>
</div>
<!-- <div class="fill-width">
<a-card style="width: 100%; height: 400px" title="各医院生物样本统计">
<piemap />
</a-card>
</div> -->
</div>
</template>
@ -29,16 +27,18 @@ import Treemap from 'components/Echarts/Treemap.vue';
import Cisualmap from 'components/Echarts/Cisualmap.vue';
import Categorymap from 'components/Echarts/Categorymap.vue';
import Piemap from 'components/Echarts/Piemap.vue';
import PiemapHos from 'components/Echarts/PiemapHos.vue';
import { mapState } from 'vuex';
export default {
name: 'Index',
components: { Treemap, Cisualmap, Categorymap, Piemap },
components: { Treemap, Cisualmap, Categorymap, Piemap, PiemapHos },
data() {
return {
str: '',
showVideo: false,
};
},
computed: mapState('home', ['hospitalId']),
methods: {},
};
</script>

17
src/views/Meeting/Meeting.vue

@ -30,7 +30,7 @@
</a-form-item>
<!-- 参会人员 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="参会人员">
<quill-editor :max-size="maxSize" :placeholder="placeholderParticipants" :value="participants" @changeInput="changeInput" />
<quill-editor :max-size="max500" :placeholder="placeholderParticipants" :value="participants" @changeInput="changeInput" />
</a-form-item>
<!-- 研讨内容 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="研讨内容">
@ -81,6 +81,7 @@ export default {
endTime: '', //
placeholderParticipants: '请在此输入参会人员...',
maxSize: 2048,
max500: 500,
placeholderContent: '请在此输入研讨内容...',
placeholderMeeting: '请在此输入会议纪要...',
visible: false,
@ -127,7 +128,16 @@ export default {
if (!err) {
try {
const { host, place, startTime, endTime, participants, discussionContent, meetingMinutes } = this;
const previewInfo = { host, place, startTime, endTime, participants, meetingMinutes, discussionContent };
const previewInfo = {
host,
place,
startTime,
endTime,
participants,
meetingMinutes,
discussionContent,
taskId: this.ptProps.taskId,
};
//
const params = { param: previewInfo };
this.saveConRec(params);
@ -192,7 +202,8 @@ export default {
const res = await shareConRec(params);
const { data, msg, code } = res.data;
if (code === 200) {
console.log('data: ', data);
// console.log('data: ', data);
window.open(data.path);
} else {
throw msg;
}

1123
src/views/PatientInfo/PatientInfo.vue

File diff suppressed because it is too large
Loading…
Cancel
Save