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. 924
      src/views/PatientInfo/PatientInfo.vue

5
src/App.vue

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

115
src/components/Echarts/Categorymap.vue

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

86
src/components/Echarts/Cisualmap.vue

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

66
src/components/Echarts/Piemap.vue

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

2
src/components/Echarts/Treemap.vue

@ -90,7 +90,7 @@ export default {
async getData() {
const params = {
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 : '',
},
};

1
src/components/PatientInfo/PatientTable.vue

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

13
src/config/api.js

@ -16,6 +16,10 @@ const statistics = `${tcm}/statistics`; // 数据统计相关接口
const conferenceRecords = `${tcm}/conferenceRecords`; // 会议纪要相关接口
const biologicalSamples = `${tcm}/biologicalSamples`; // 生物样本相关接口
const hospatil = `${tcm}/hospatil`; // 医院相关接口
const file = `${tcm}/file`; // 文件相关接口
// 上传文件
export const upload = `${file}/upload`;
// 通过任务Id查询项目Id
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);
// 试题相关接口:按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);
@ -47,9 +52,15 @@ export const complete = params => axios.post(`${statistics}/complete`, 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 selAllYBS = params => axios.get(`${biologicalSamples}/selAllYBS`);
// 添加会议记录
export const saveConRec = params => axios.post(`${conferenceRecords}/save`, params);

924
src/views/PatientInfo/PatientInfo.vue

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