Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
ec6077d39e
12
src/api/manage/indicatorMonitoring.js
Normal file
12
src/api/manage/indicatorMonitoring.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 查询检测检测项目结果曲线统计
|
||||||
|
export function curveStatistics(query) {
|
||||||
|
return request({
|
||||||
|
url: `/manage/projectResult/curveStatistics`,
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@ -9,67 +9,200 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rightheader">
|
<div class="rightheader">
|
||||||
|
<div class="time">
|
||||||
|
<el-date-picker v-model="measureTime" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||||
|
:clearable="false" value-format="yyyy-MM-dd" :picker-options="pickerOptions" end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
<div id="main"></div>
|
<div id="main"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
|
import {
|
||||||
|
curveStatistics
|
||||||
|
} from '@/api/manage/indicatorMonitoring'
|
||||||
export default {
|
export default {
|
||||||
name: "indicatorMonitoring",
|
name: "indicatorMonitoring",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getTime() > Date.now(); //禁止选择今天以后的时间
|
||||||
|
},
|
||||||
|
},
|
||||||
|
measureTime: [],
|
||||||
//左侧类型选中
|
//左侧类型选中
|
||||||
categoryindex: 0,
|
categoryindex: undefined,
|
||||||
//左侧选中的item
|
|
||||||
categoryItem: {},
|
|
||||||
//左侧list
|
//左侧list
|
||||||
categorylist: [{
|
categorylist: [{
|
||||||
id: 1,
|
id: 1,
|
||||||
title: '冠状动脉粥样硬化性心脏病',
|
title: '运动检测',
|
||||||
|
groupCode: 'sport'
|
||||||
}, {
|
}, {
|
||||||
id: 2,
|
id: 2,
|
||||||
title: '冠状动脉粥样硬化性心脏病冠状动脉粥样硬化性心脏病',
|
title: '血压测量',
|
||||||
}]
|
groupCode: 'bp'
|
||||||
|
}, {
|
||||||
|
id: 3,
|
||||||
|
title: '血糖测量',
|
||||||
|
groupCode: 'bg'
|
||||||
|
}],
|
||||||
|
query: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.categoryItem = this.categorylist[0]
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.info();
|
this.categoryindex = 0
|
||||||
|
this.query.groupCode = this.categorylist[0].groupCode
|
||||||
|
this.query.patientId = this.$route.query.patientId
|
||||||
|
this.query.title = '运动检测'
|
||||||
|
this.getinfo();
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'measureTime': {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.query.measureTimeStart = newValue[0]
|
||||||
|
this.query.measureTimeEnd = newValue[1]
|
||||||
|
this.getinfo();
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickcategory(item, index) {
|
clickcategory(item, index) {
|
||||||
this.categoryindex = index
|
this.categoryindex = index
|
||||||
this.categoryItem = item
|
this.query.groupCode = item.groupCode
|
||||||
|
this.query.title = item.title
|
||||||
|
this.query.patientId = this.$route.query.patientId
|
||||||
|
this.getinfo();
|
||||||
},
|
},
|
||||||
info() {
|
getinfo() {
|
||||||
|
curveStatistics(this.query).then(res => {
|
||||||
|
this.info(res.data);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
info(row) {
|
||||||
// 基于准备好的dom,初始化echarts实例
|
// 基于准备好的dom,初始化echarts实例
|
||||||
var myChart = echarts.init(document.getElementById('main'));
|
var chartDom = document.getElementById('main');
|
||||||
// 绘制图表
|
var myChart = echarts.init(chartDom);
|
||||||
myChart.setOption({
|
var option;
|
||||||
title: {
|
if (this.query.title == '运动检测') {
|
||||||
text: '运动监测'
|
option = {
|
||||||
},
|
title: {
|
||||||
tooltip: {},
|
text: this.query.title
|
||||||
xAxis: {
|
},
|
||||||
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子', '衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
|
tooltip: {
|
||||||
},
|
trigger: 'axis'
|
||||||
yAxis: {},
|
},
|
||||||
series: [
|
legend: {
|
||||||
{
|
},
|
||||||
name: '销量',
|
grid: {
|
||||||
type: 'bar',
|
left: '3%',
|
||||||
data: [5, 20, 36, 10, 10, 20, 5, 20, 36, 10, 10, 20]
|
right: '4%',
|
||||||
}
|
bottom: '0%',
|
||||||
]
|
containLabel: true
|
||||||
});
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: row.xlist
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '运动时长',
|
||||||
|
type: 'line',
|
||||||
|
data: row.ylist.运动时长
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '平均心率',
|
||||||
|
type: 'line',
|
||||||
|
data: row.ylist.平均心率
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
} else if (this.query.title == '血压测量') {
|
||||||
|
option = {
|
||||||
|
title: {
|
||||||
|
text: this.query.title
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: '3%',
|
||||||
|
right: '4%',
|
||||||
|
bottom: '0%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: row.xlist
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '收缩压',
|
||||||
|
type: 'line',
|
||||||
|
data: row.ylist.收缩压
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '舒张压',
|
||||||
|
type: 'line',
|
||||||
|
data: row.ylist.舒张压
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
} else if (this.query.title == '血糖测量') {
|
||||||
|
option = {
|
||||||
|
title: {
|
||||||
|
text: this.query.title
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: '3%',
|
||||||
|
right: '4%',
|
||||||
|
bottom: '0%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: row.xlist
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '空腹血糖',
|
||||||
|
type: 'line',
|
||||||
|
data: row.ylist.收缩压
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
option && myChart.setOption(option);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.header {
|
.header {
|
||||||
background-color: #fff !important;
|
background-color: #fff !important;
|
||||||
@ -80,11 +213,18 @@ export default {
|
|||||||
width: 75%;
|
width: 75%;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
border-left: 3px solid #DFE4ED;
|
border-left: 3px solid #DFE4ED;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.time {
|
||||||
|
position: absolute;
|
||||||
|
right: 50px;
|
||||||
|
top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
#main {
|
#main {
|
||||||
width: 1000px;
|
width: 1000px;
|
||||||
height: 450px;
|
height: 450px;
|
||||||
margin: 0 auto;
|
margin: 80px auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,5 +255,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -40,9 +40,9 @@
|
|||||||
<el-table-column label="问卷模板ID" align="center" prop="questionnaireId" />
|
<el-table-column label="问卷模板ID" align="center" prop="questionnaireId" />
|
||||||
<el-table-column label="问卷状态" align="center" prop="questionnaireStatus">
|
<el-table-column label="问卷状态" align="center" prop="questionnaireStatus">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<!-- active-text="已发布" inactive-text="未发布" -->
|
||||||
<el-switch v-model="scope.row.questionnaireStatus" active-color="#13ce66" inactive-color="#ff4949"
|
<el-switch v-model="scope.row.questionnaireStatus" active-color="#13ce66" inactive-color="#ff4949"
|
||||||
active-value="PUBLISHED" inactive-value="UNPUBLISHED" active-text="已发布" inactive-text="未发布"
|
active-value="PUBLISHED" inactive-value="UNPUBLISHED" @change="switchstatus($event, scope.row)">
|
||||||
@change="switchstatus($event, scope.row)">
|
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -181,6 +181,8 @@ export default {
|
|||||||
},
|
},
|
||||||
cleardepartment() {
|
cleardepartment() {
|
||||||
this.classificationform.diseaseTypeId = ''
|
this.classificationform.diseaseTypeId = ''
|
||||||
|
this.classificationform.departmentName = ''
|
||||||
|
this.classificationform.diseaseTypeName = ''
|
||||||
},
|
},
|
||||||
changedepartment(e) {
|
changedepartment(e) {
|
||||||
this.classificationform.departmentName = this.departmentlist.find(el => el.id == e).departmentName
|
this.classificationform.departmentName = this.departmentlist.find(el => el.id == e).departmentName
|
||||||
@ -196,7 +198,23 @@ export default {
|
|||||||
},
|
},
|
||||||
//切换发布状态
|
//切换发布状态
|
||||||
switchstatus(e, item) {
|
switchstatus(e, item) {
|
||||||
|
if (!item.departmentId && !this.diseaseTypeId) {
|
||||||
|
this.$message.error('请选择问卷所属的科室以及科室病种后发布!');
|
||||||
|
this.getList();
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let query = {
|
||||||
|
id: item.id,
|
||||||
|
questionnaireStatus: e
|
||||||
|
}
|
||||||
|
updateclassification(query).then(res => {
|
||||||
|
if (e == 'PUBLISHED') {
|
||||||
|
this.$modal.msgSuccess("修改为已发布");
|
||||||
|
} else if (e == 'UNPUBLISHED') {
|
||||||
|
this.$modal.msgSuccess("修改为未发布");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
// 节点单击事件
|
// 节点单击事件
|
||||||
handleNodeClick(data) {
|
handleNodeClick(data) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user