Browse Source

患者信息录入相关界面

master
aBin 4 years ago
parent
commit
800567b6d4
  1. 5
      src/App.vue
  2. 115
      src/components/Echarts/Categorymap.vue
  3. 86
      src/components/Echarts/Cisualmap.vue
  4. 66
      src/components/Echarts/Piemap.vue
  5. 2
      src/components/Echarts/Treemap.vue
  6. 1
      src/components/PatientInfo/PatientTable.vue
  7. 13
      src/config/api.js
  8. 898
      src/views/PatientInfo/PatientInfo.vue

5
src/App.vue

@ -36,6 +36,9 @@ export default {
const params = { userId }; const params = { userId };
this.getUserId(params); this.getUserId(params);
this.getHospitalId(); this.getHospitalId();
if (sessionStorage.getItem('patientId')) {
this.setPatientId(sessionStorage.getItem('patientId'));
}
const that = this; const that = this;
window.plugin = window.TallPlugin.init(); window.plugin = window.TallPlugin.init();
// created created便 // created created便
@ -49,7 +52,7 @@ export default {
methods: { methods: {
...mapActions('home', ['getUserId']), ...mapActions('home', ['getUserId']),
...mapMutations('home', ['setPtProps', 'setHospitalId']), ...mapMutations('home', ['setPtProps', 'setHospitalId', 'setPatientId']),
async getHospitalId() { async getHospitalId() {
try { try {

115
src/components/Echarts/Categorymap.vue

@ -12,7 +12,7 @@
</div> </div>
</template> </template>
<script> <script>
import { countAnalysis } from 'config/api'; import { HospitalComplete } from 'config/api';
export default { export default {
name: 'Categorymap', name: 'Categorymap',
data() { data() {
@ -22,45 +22,52 @@ export default {
height: '', height: '',
timer: null, timer: null,
list: [], list: [],
xDataList: [],
aList: [], //
bList: [], //
cList: [], //
dList: [], //
eList: [], //
}; };
}, },
mounted() { mounted() {
this.drawLine(); this.drawLine();
this.timer = setInterval(() => { // this.timer = setInterval(() => {
this.drawLine(); // this.drawLine();
}, 10000); // }, 10000);
let wh = window.innerWidth; // let wh = window.innerWidth;
let hg = window.innerHeight; // let hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
console.log(this.height); // console.log(this.height);
window.onresize = () => { // window.onresize = () => {
return (() => { // return (() => {
wh = window.innerWidth; // wh = window.innerWidth;
hg = window.innerHeight; // hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
})(); // })();
}; // };
}, },
destroyed() { destroyed() {
clearInterval(this.timer); clearInterval(this.timer);
}, },
methods: { methods: {
drawLine() { async drawLine() {
// domecharts // domecharts
let myChart = this.$echarts.init(document.getElementById('Categorymap')); let myChart = this.$echarts.init(document.getElementById('Categorymap'));
await this.getData();
// //
var option = { var option = {
legend: { legend: {
data: ['未完成', '已完成', '进行中', '废弃'], data: ['未完成', '已完成', '进行中', '废弃', '数据采集超时'],
top: 30, top: 30,
}, },
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
axisTick: { show: false }, axisTick: { show: false },
data: ['附属医院', '人民医院', '第五人民医院', '国药同煤总医院'], data: this.xDataList,
}, },
], ],
yAxis: [{ type: 'value' }], yAxis: [{ type: 'value' }],
@ -71,7 +78,7 @@ export default {
barGap: 0, barGap: 0,
// label: labelOption, // label: labelOption,
emphasis: { focus: 'series' }, emphasis: { focus: 'series' },
data: [320, 332, 301, 334], data: this.aList,
barWidth: 20, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
@ -102,7 +109,7 @@ export default {
type: 'bar', type: 'bar',
// label: labelOption, // label: labelOption,
emphasis: { focus: 'series' }, emphasis: { focus: 'series' },
data: [220, 182, 191, 234], data: this.bList,
barWidth: 20, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
@ -133,7 +140,7 @@ export default {
type: 'bar', type: 'bar',
// label: labelOption, // label: labelOption,
emphasis: { focus: 'series' }, emphasis: { focus: 'series' },
data: [150, 232, 201, 154], data: this.cList,
barWidth: 20, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
@ -164,7 +171,38 @@ export default {
type: 'bar', type: 'bar',
// label: labelOption, // label: labelOption,
emphasis: { focus: 'series' }, emphasis: { focus: 'series' },
data: [98, 77, 101, 99], data: this.dList,
barWidth: 20,
itemStyle: {
normal: {
label: {
formatter: '{c}',
show: true,
position: 'top',
textStyle: {
fontSize: '12',
color: '#000',
},
},
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#f00' }, //
{ offset: 1, color: '#F00' }, //
]),
},
emphasis: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#F00' }, //
{ offset: 1, color: '#F00' }, //
]),
},
},
},
{
name: '数据采集超时',
type: 'bar',
// label: labelOption,
emphasis: { focus: 'series' },
data: this.eList,
barWidth: 20, barWidth: 20,
itemStyle: { itemStyle: {
normal: { normal: {
@ -196,28 +234,29 @@ export default {
}, },
async getData() { async getData() {
try { try {
const params = { const params = { param: {} };
param: { const res = await HospitalComplete(params);
conditionList: [],
conditionListDate: [],
hospitalId: '',
hospitalization: '',
inpatientId: '',
inputStatus: '',
testQuestionsId: '',
},
};
const res = await countAnalysis(params);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { if (code === 200) {
this.list = data; console.log(data);
for (let i = 0; i < data.length; i++) {
this.forList(data[i]);
}
} else { } else {
console.log(msg); this.$message.error('获取数据失败');
} }
} catch (error) { } catch (error) {
this.$message.error('获取数据失败'); this.$message.error('获取数据失败');
} }
}, },
forList(obj) {
this.xDataList.push(obj.hospitalName);
this.aList.push(obj.unfinished);
this.bList.push(obj.completed);
this.cList.push(obj.underway);
this.dList.push(obj.discarded);
this.eList.push(obj.overtime);
},
}, },
}; };
</script> </script>

86
src/components/Echarts/Cisualmap.vue

@ -16,46 +16,63 @@ export default {
height: '', height: '',
timer: null, timer: null,
list: [], list: [],
dateList1: [], //
dataList1: [], //
dateList2: [], //
dataList2: [], //
}; };
}, },
mounted() { mounted() {
this.drawLine(); this.drawLine();
this.timer = setInterval(() => { // this.timer = setInterval(() => {
this.drawLine(); // this.drawLine();
}, 10000); // }, 10000);
let wh = window.innerWidth; // let wh = window.innerWidth;
let hg = window.innerHeight; // let hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
console.log(this.height); // console.log(this.height);
window.onresize = () => { // window.onresize = () => {
return (() => { // return (() => {
wh = window.innerWidth; // wh = window.innerWidth;
hg = window.innerHeight; // hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
})(); // })();
}; // };
}, },
methods: { methods: {
drawLine() { async drawLine() {
// domecharts // domecharts
let myChart1 = this.$echarts.init(document.getElementById('Cisualmap1')); let myChart1 = this.$echarts.init(document.getElementById('Cisualmap1'));
let myChart2 = this.$echarts.init(document.getElementById('Cisualmap2')); let myChart2 = this.$echarts.init(document.getElementById('Cisualmap2'));
await this.getData();
// //
var option1 = { var option1 = {
title: { title: {
left: 'center', left: 'center',
text: '新建病例', text: '新建病例',
}, },
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'empty',
},
{
type: 'inside',
xAxisIndex: 0,
filterMode: 'empty',
},
],
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: this.dateList1,
}, },
yAxis: { type: 'value' }, yAxis: { type: 'value' },
series: [ series: [
{ {
data: [820, 932, 901, 934, 1290, 1330, 1320], data: this.dataList1,
type: 'line', type: 'line',
areaStyle: { color: 'rgba(229,244,254,1)' }, areaStyle: { color: 'rgba(229,244,254,1)' },
lineStyle: { color: 'rgb(45,151,213)' }, lineStyle: { color: 'rgb(45,151,213)' },
@ -69,14 +86,26 @@ export default {
left: 'center', left: 'center',
text: '已完成病例', text: '已完成病例',
}, },
dataZoom: [
{
type: 'slider',
xAxisIndex: 0,
filterMode: 'empty',
},
{
type: 'inside',
xAxisIndex: 0,
filterMode: 'empty',
},
],
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: this.dateList2,
}, },
yAxis: { type: 'value' }, yAxis: { type: 'value' },
series: [ series: [
{ {
data: [820, 932, 901, 934, 1290, 1330, 1320], data: this.dataList2,
type: 'line', type: 'line',
areaStyle: { color: 'rgba(229,244,254,1)' }, areaStyle: { color: 'rgba(229,244,254,1)' },
lineStyle: { color: 'rgb(45,151,213)' }, lineStyle: { color: 'rgb(45,151,213)' },
@ -101,7 +130,12 @@ export default {
const res = await countCase(params); const res = await countCase(params);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { if (code === 200) {
this.list = data; for (let i = 0; i < data.newNums.length; i++) {
this.forNewList(data.newNums[i]);
}
for (let i = 0; i < data.overNums.length; i++) {
this.forOverList(data.overNums[i]);
}
} else { } else {
console.log(msg); console.log(msg);
} }
@ -109,6 +143,14 @@ export default {
this.$message.error('获取数据失败'); this.$message.error('获取数据失败');
} }
}, },
forNewList(obj) {
this.dateList1.push(obj.shijian);
this.dataList1.push(obj.nums);
},
forOverList(obj) {
this.dateList2.push(obj.shijian);
this.dataList2.push(obj.nums);
},
}, },
}; };
</script> </script>

66
src/components/Echarts/Piemap.vue

@ -5,6 +5,7 @@
</div> </div>
</template> </template>
<script> <script>
import { selAllYBS } from 'config/api';
export default { export default {
name: 'Piemap', name: 'Piemap',
data() { data() {
@ -13,35 +14,37 @@ export default {
width: '', width: '',
height: '', height: '',
timer: null, timer: null,
dataList: [],
}; };
}, },
mounted() { mounted() {
this.drawLine(); this.drawLine();
this.timer = setInterval(() => { // this.timer = setInterval(() => {
this.drawLine(); // this.drawLine();
}, 10000); // }, 10000);
let wh = window.innerWidth; // let wh = window.innerWidth;
let hg = window.innerHeight; // let hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
console.log(this.height); // console.log(this.height);
window.onresize = () => { // window.onresize = () => {
return (() => { // return (() => {
wh = window.innerWidth; // wh = window.innerWidth;
hg = window.innerHeight; // hg = window.innerHeight;
this.width = wh + 'px'; // this.width = wh + 'px';
this.height = hg + 'px'; // this.height = hg + 'px';
})(); // })();
}; // };
}, },
destroyed() { destroyed() {
clearInterval(this.timer); clearInterval(this.timer);
}, },
methods: { methods: {
drawLine() { async drawLine() {
// domecharts // domecharts
let myChart = this.$echarts.init(document.getElementById('Piemap')); let myChart = this.$echarts.init(document.getElementById('Piemap'));
// //
await this.getData();
var option = { var option = {
color: ['#FE9C58', '#7AEBFF', '#FFCC00', '#744CFF'], color: ['#FE9C58', '#7AEBFF', '#FFCC00', '#744CFF'],
legend: { top: 'bottom' }, legend: { top: 'bottom' },
@ -49,21 +52,36 @@ export default {
{ {
name: '面积模式', name: '面积模式',
type: 'pie', type: 'pie',
radius: [20, 120], radius: [20, 100],
center: ['50%', '50%'], center: ['50%', '50%'],
roseType: 'area', roseType: 'area',
itemStyle: { borderRadius: 8 }, itemStyle: { borderRadius: 8 },
data: [ data: this.dataList,
{ value: 40, name: '附属医院' },
{ value: 38, name: '人民医院' },
{ value: 32, name: '第五医院' },
{ value: 30, name: '国药同煤总医院' },
],
}, },
], ],
}; };
myChart.setOption(option); myChart.setOption(option);
}, },
async getData() {
try {
const res = await selAllYBS();
const { code, msg, data } = res.data;
if (code === 200) {
// console.log(data);
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);
}
} catch (error) {
console.log(error);
}
},
}, },
}; };
</script> </script>

2
src/components/Echarts/Treemap.vue

@ -90,7 +90,7 @@ export default {
async getData() { async getData() {
const params = { const params = {
param: { param: {
hospitalId: this.hospitalId ? this.ptProps.hospitalId : '', hospitalId: this.ptProps && this.ptProps.hospitalId ? this.ptProps.hospitalId : '',
userId: this.ptProps && this.ptProps.userId ? this.ptProps.userId : '', userId: this.ptProps && this.ptProps.userId ? this.ptProps.userId : '',
}, },
}; };

1
src/components/PatientInfo/PatientTable.vue

@ -110,6 +110,7 @@ export default {
// //
chooseItem(id) { chooseItem(id) {
this.setPatientId(id); this.setPatientId(id);
sessionStorage.setItem('patientId', id);
}, },
handleTableChange(pagination) { handleTableChange(pagination) {

13
src/config/api.js

@ -16,6 +16,10 @@ const statistics = `${tcm}/statistics`; // 数据统计相关接口
const conferenceRecords = `${tcm}/conferenceRecords`; // 会议纪要相关接口 const conferenceRecords = `${tcm}/conferenceRecords`; // 会议纪要相关接口
const biologicalSamples = `${tcm}/biologicalSamples`; // 生物样本相关接口 const biologicalSamples = `${tcm}/biologicalSamples`; // 生物样本相关接口
const hospatil = `${tcm}/hospatil`; // 医院相关接口 const hospatil = `${tcm}/hospatil`; // 医院相关接口
const file = `${tcm}/file`; // 文件相关接口
// 上传文件
export const upload = `${file}/upload`;
// 通过任务Id查询项目Id // 通过任务Id查询项目Id
export const getHId = params => axios.get(`${hospatil}/byProjectId?projectId=${params}`); export const getHId = params => axios.get(`${hospatil}/byProjectId?projectId=${params}`);
@ -37,7 +41,8 @@ export const selPatientMesList = params => axios.post(`${patient}/selPatientMesL
export const selSearchCriteriaList = params => axios.post(`${patient}/selSearchCriteriaList`, params); export const selSearchCriteriaList = params => axios.post(`${patient}/selSearchCriteriaList`, params);
// 试题相关接口:按code查看题目信息,code为空则查询全部 // 试题相关接口:按code查看题目信息,code为空则查询全部
export const queryAll = params => axios.post(`${tcm}/question/queryAll`, params); export const queryAll = params => axios.post(`${tcm}/question/query`, params);
// 查询所有对照组的信息 // 查询所有对照组的信息
export const getQuery = params => axios.post(`${inpatient}/query`, params); export const getQuery = params => axios.post(`${inpatient}/query`, params);
@ -47,9 +52,15 @@ export const complete = params => axios.post(`${statistics}/complete`, params);
// 查询病例分析 // 查询病例分析
export const countAnalysis = params => axios.post(`${statistics}/countAnalysis`, params); export const countAnalysis = params => axios.post(`${statistics}/countAnalysis`, params);
// 查询各医院病例完成情况
export const HospitalComplete = params => axios.post(`${statistics}/hospital/complete`, params);
// 查询每日病例统计 // 查询每日病例统计
export const countCase = params => axios.post(`${statistics}/countCase`, params); export const countCase = params => axios.post(`${statistics}/countCase`, params);
// 统计生物样本数量
export const selAllYBS = params => axios.get(`${biologicalSamples}/selAllYBS`);
// 添加会议记录 // 添加会议记录
export const saveConRec = params => axios.post(`${conferenceRecords}/save`, params); export const saveConRec = params => axios.post(`${conferenceRecords}/save`, params);

898
src/views/PatientInfo/PatientInfo.vue

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