|
@@ -9,22 +9,34 @@
|
|
|
<div class="middle-line-text">{{ allTestNum }}</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="bor-8 text-bg">
|
|
|
- <IndexSmallTitle title="筛查进度"/>
|
|
|
- <template v-if="userType === '4'">
|
|
|
- <IndexProgressBar
|
|
|
- v-for="(item, index) in screeningProgress"
|
|
|
- :key="index"
|
|
|
- :text="item.name"
|
|
|
- :percentage="item.value"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <IndexSmallTitle title="年龄占比"/>
|
|
|
- <IndexSmallPie :legend-data="groupEvaluationRatioData" />
|
|
|
- </div>
|
|
|
- <div class="bor-8 text-bg end">
|
|
|
- <IndexSmallTitle title="近段时间主要使用的:"/>
|
|
|
+ <div class="bor-8 text-bg half-middle">
|
|
|
<el-tabs>
|
|
|
+ <el-tab-pane>
|
|
|
+ <template slot="label">
|
|
|
+ <IndexSmallTitle title="年龄占比"/>
|
|
|
+ </template>
|
|
|
+ <IndexSmallPie ref="indexSmallPieRef" :legend-data="groupEvaluationRatioData" />
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane>
|
|
|
+ <template slot="label">
|
|
|
+ <IndexSmallTitle title="筛查进度"/>
|
|
|
+ </template>
|
|
|
+ <div class="progress-bar-outline">
|
|
|
+ <IndexProgressBar
|
|
|
+ v-for="(item, index) in screeningProgress"
|
|
|
+ :key="index"
|
|
|
+ :text="item.name"
|
|
|
+ :percentage="item.value"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <div class="bor-8 text-bg half-middle" id="bottomTableOutline">
|
|
|
+ <div class="top-absolut-div">
|
|
|
+ <IndexSmallTitle title="近段时间主要使用的:"/>
|
|
|
+ </div>
|
|
|
+ <el-tabs class="table-tabs">
|
|
|
<el-tab-pane label="量表">
|
|
|
<el-table :data="scaleList" border size="small" style="width: 100%" :height="tableHeight">
|
|
|
<el-table-column prop="name" label="名称"></el-table-column>
|
|
@@ -45,23 +57,35 @@
|
|
|
<div class="top-line-text">参与测评总人数</div>
|
|
|
<div class="middle-line-text">{{ allUserNum }}</div>
|
|
|
</div>
|
|
|
- <div class="bor-8 text-bg">
|
|
|
+ <div class="bor-8 text-bg half-middle">
|
|
|
<IndexSmallTitle title="动态数据"/>
|
|
|
- <IndexSmoothLine id="1" />
|
|
|
+ <IndexSmoothLine id="1" :x-data="dynamicData.xData" :y-data="dynamicData.yData" :names="dynamicData.names" />
|
|
|
</div>
|
|
|
- <div class="bor-8 text-bg end">
|
|
|
- <IndexSmallTitle title="实时预警"/>
|
|
|
- <el-tabs>
|
|
|
- <el-tab-pane label="学生个体">
|
|
|
- <el-table :data="attentionUserList" border size="small" style="width: 100%" :height="tableHeight">
|
|
|
-<!-- <el-table-column prop="name" label="名称"></el-table-column>-->
|
|
|
-<!-- <el-table-column prop="count" label="次数"></el-table-column>-->
|
|
|
- </el-table>
|
|
|
- </el-tab-pane>
|
|
|
+ <div class="bor-8 text-bg half-middle">
|
|
|
+ <div class="top-absolut-div">
|
|
|
+ <IndexSmallTitle title="实时预警:"/>
|
|
|
+ </div>
|
|
|
+ <el-tabs class="table-tabs">
|
|
|
<el-tab-pane label="群体">
|
|
|
<el-table :data="attentionGroupList" border size="small" style="width: 100%" :height="tableHeight">
|
|
|
-<!-- <el-table-column prop="name" label="名称"></el-table-column>-->
|
|
|
-<!-- <el-table-column prop="count" label="次数"></el-table-column>-->
|
|
|
+ <el-table-column prop="institution_name" label="学校班级" min-width="2">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.institution_name }}
|
|
|
+ {{ scope.row.group_name }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="count" label="数量" min-width="1"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="学生个体">
|
|
|
+ <el-table :data="attentionUserList" border size="small" style="width: 100%" :height="tableHeight">
|
|
|
+ <el-table-column prop="pet_name" label="学生名称" min-width="2"></el-table-column>
|
|
|
+ <el-table-column prop="institution_name" label="学校班级" min-width="3">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.institution_name }}
|
|
|
+ {{ scope.row.group_name }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
@@ -81,9 +105,16 @@
|
|
|
<IndexSmallTitle title="测评结果风险等级"/>
|
|
|
<IndexBar :x-data="riskLevelData.xData" :y-data="riskLevelData.yData" />
|
|
|
</div>
|
|
|
- <div class="bor-8 text-bg">
|
|
|
+ <div class="bor-8 text-bg half-middle">
|
|
|
<IndexSmallTitle title="风险变化趋势"/>
|
|
|
- <IndexSmoothLine id="2" color="#2AE3FF" transparent-color="rgba(42, 227, 255, 0)" />
|
|
|
+ <IndexSmoothLine
|
|
|
+ id="2"
|
|
|
+ color="#2AE3FF"
|
|
|
+ transparent-color="rgba(42, 227, 255, 0)"
|
|
|
+ :x-data="riskChangeData.xData"
|
|
|
+ :y-data="riskChangeData.yData"
|
|
|
+ :names="riskChangeData.names"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -110,38 +141,54 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
userType: '',
|
|
|
+ institutionNo: '', // 学校编号
|
|
|
+ tableHeight: 0, // table高度
|
|
|
|
|
|
- allTestNum: 0,
|
|
|
- allUserNum: 0,
|
|
|
- screeningProgress: [
|
|
|
+ allTestNum: 0, // 测评总次数
|
|
|
+ allUserNum: 0, // 参与测评总人数
|
|
|
+ screeningProgress: [ // 筛查进度
|
|
|
+ { name: '家长', value: 0 },
|
|
|
{ name: '学生', value: 0 }
|
|
|
],
|
|
|
|
|
|
- groupEvaluationRatioData: [],
|
|
|
+ groupEvaluationRatioData: [], // 年级占比
|
|
|
|
|
|
- dynamicData: {
|
|
|
+ dynamicData: { // 动态数据
|
|
|
xData: [],
|
|
|
- yData: []
|
|
|
+ yData: [],
|
|
|
+ names: ['近期测评人数']
|
|
|
},
|
|
|
|
|
|
- riskLevelData: {
|
|
|
+ riskChangeData: { // 风险变化趋势数据
|
|
|
+ xData: [],
|
|
|
+ yData: [],
|
|
|
+ names: []
|
|
|
+ },
|
|
|
+
|
|
|
+ riskLevelData: { // 测评结果风险等级
|
|
|
xData: ['高风险', '无风险'],
|
|
|
yData: [0, 0]
|
|
|
},
|
|
|
+ scaleList: [], // 量表
|
|
|
+ cognitiveTaskList: [], // 认知任务
|
|
|
+ attentionUserList: [], // 预警学生个体
|
|
|
+ attentionGroupList: [], // 预警群体
|
|
|
|
|
|
- tableHeight: 254, // table高度
|
|
|
- scaleList: [],
|
|
|
- cognitiveTaskList: [],
|
|
|
- attentionUserList: [],
|
|
|
- attentionGroupList: [],
|
|
|
-
|
|
|
- mapData: []
|
|
|
+ mapData: [] // 地图数据
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.userType = sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9528")
|
|
|
},
|
|
|
async mounted() {
|
|
|
+ let tempDom = document.querySelector('#bottomTableOutline')
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.tableHeight = tempDom.offsetHeight - 62
|
|
|
+ })
|
|
|
+
|
|
|
+ this.institutionNo = sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9527")
|
|
|
+ this.institutionNo = this.institutionNo && this.institutionNo !== 'null' ? this.institutionNo : ''
|
|
|
+
|
|
|
this.allTestNum = await this.getAllTestNum()
|
|
|
this.allUserNum = await this.getAllUserNum()
|
|
|
|
|
@@ -161,7 +208,12 @@ export default {
|
|
|
{ name: '六年级', value: 10 }
|
|
|
]
|
|
|
|
|
|
- await this.recentDetail()
|
|
|
+ let { xData, yData } = await this.recentDetail()
|
|
|
+ this.dynamicData = {
|
|
|
+ xData,
|
|
|
+ yData: [yData],
|
|
|
+ names: ['近期测评人数']
|
|
|
+ }
|
|
|
this.scaleList = await this.recentSubjectDetail()
|
|
|
|
|
|
this.cognitiveTaskList = await this.recentTaskDetail()
|
|
@@ -170,14 +222,16 @@ export default {
|
|
|
this.attentionUserList = await this.urgentAttentionUser()
|
|
|
this.attentionGroupList = await this.urgentAttentionGroup()
|
|
|
|
|
|
- await this.riskChangeChart()
|
|
|
+ this.riskChangeData = await this.riskChangeChart()
|
|
|
this.mapData = await this.psychologicalRiskMap()
|
|
|
},
|
|
|
methods: {
|
|
|
// 查询测评总次数
|
|
|
getAllTestNum() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/allTestNum`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/allTestNum`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(res.data.allTestNum)
|
|
|
})
|
|
|
})
|
|
@@ -186,7 +240,9 @@ export default {
|
|
|
// 查询测评总人数
|
|
|
getAllUserNum() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/allUserNum`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/allUserNum`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(res.data.allUserNum)
|
|
|
})
|
|
|
})
|
|
@@ -195,7 +251,9 @@ export default {
|
|
|
// 查询学生完成进度
|
|
|
finishUserNum() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/finishUserNum`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/finishUserNum`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(roundToFixed(res.data.finishNum / res.data.allNum, 2))
|
|
|
})
|
|
|
})
|
|
@@ -204,7 +262,9 @@ export default {
|
|
|
// 查询学校完成进度
|
|
|
finishInstitutionNum() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/finishInstitutionNum`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/finishInstitutionNum`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(res.data.map((item) => {
|
|
|
return {
|
|
|
name: item.institution_name,
|
|
@@ -218,7 +278,9 @@ export default {
|
|
|
// 各个年龄段(年级)学生参与测评的比例
|
|
|
groupEvaluationRatio() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/groupEvaluationRatio`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/groupEvaluationRatio`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(res.data)
|
|
|
})
|
|
|
})
|
|
@@ -227,8 +289,10 @@ export default {
|
|
|
// 动态数据图表(近段时间测评活动情况)
|
|
|
recentDetail() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/recentDetail`, {}, (res) => {
|
|
|
- resolve()
|
|
|
+ this.$http.get(`/index/recentDetail`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
+ resolve(res.data)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -236,7 +300,9 @@ export default {
|
|
|
// 近段时间主要使用量表:index/recentSubjectDetail
|
|
|
recentSubjectDetail() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/recentSubjectDetail`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/recentSubjectDetail`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(res.data)
|
|
|
})
|
|
|
})
|
|
@@ -245,7 +311,9 @@ export default {
|
|
|
// 近段时间主要使用认知任务:index/recentTaskDetail
|
|
|
recentTaskDetail() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/recentTaskDetail`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/recentTaskDetail`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(res.data)
|
|
|
})
|
|
|
})
|
|
@@ -254,7 +322,9 @@ export default {
|
|
|
// 紧急关注的学生个体:index/urgentAttentionUser
|
|
|
urgentAttentionUser() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/urgentAttentionUser`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/urgentAttentionUser`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(res.data)
|
|
|
})
|
|
|
})
|
|
@@ -263,7 +333,9 @@ export default {
|
|
|
// 紧急关注的群体信息:index/urgentAttentionGroup
|
|
|
urgentAttentionGroup() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/urgentAttentionGroup`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/urgentAttentionGroup`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(res.data)
|
|
|
})
|
|
|
})
|
|
@@ -272,7 +344,9 @@ export default {
|
|
|
// 测评结果风险等级柱状图:index/resultRiskLevel
|
|
|
resultRiskLevel() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/resultRiskLevel`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/resultRiskLevel`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve([res.data.warnNum, res.data.unWarnNum])
|
|
|
})
|
|
|
})
|
|
@@ -282,8 +356,10 @@ export default {
|
|
|
// 风险变化趋势折线图:index/riskChangeChart
|
|
|
riskChangeChart() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/riskChangeChart`, {}, (res) => {
|
|
|
- resolve()
|
|
|
+ this.$http.get(`/index/riskChangeChart`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
+ resolve(res.data)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -291,7 +367,9 @@ export default {
|
|
|
// 心理风险地图:index/psychologicalRiskMap
|
|
|
psychologicalRiskMap() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$http.get(`/index/psychologicalRiskMap`, {}, (res) => {
|
|
|
+ this.$http.get(`/index/psychologicalRiskMap`, {
|
|
|
+ institutionNo: this.institutionNo
|
|
|
+ }, (res) => {
|
|
|
resolve(res.data)
|
|
|
})
|
|
|
})
|
|
@@ -315,7 +393,7 @@ export default {
|
|
|
|
|
|
.top-header {
|
|
|
width: 100%;
|
|
|
- height: 65px;
|
|
|
+ height: 56px;
|
|
|
background-image: url('/static/assets/index/bg-header.png');
|
|
|
background-size: 100% 100%;
|
|
|
background-repeat: no-repeat;
|
|
@@ -324,7 +402,7 @@ export default {
|
|
|
|
|
|
.main-content {
|
|
|
width: 100%;
|
|
|
- height: calc(100% - 65px);
|
|
|
+ height: calc(100% - 56px);
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
@@ -349,25 +427,55 @@ export default {
|
|
|
width: calc(100% - 24px);
|
|
|
background-color: white;
|
|
|
padding: 12px;
|
|
|
- margin-top: 16px;
|
|
|
+ margin-top: 12px;
|
|
|
|
|
|
- &.end {
|
|
|
- flex: 1;
|
|
|
+ &.half-middle {
|
|
|
+ height: calc(41.2% - 36px);
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .top-absolut-div {
|
|
|
+ position: absolute;
|
|
|
+ top: 12px;
|
|
|
+ left: 12px;
|
|
|
+ width: 60%;
|
|
|
}
|
|
|
|
|
|
::v-deep .el-tabs {
|
|
|
- height: calc(100% - 26px);
|
|
|
+ height: 100%;
|
|
|
|
|
|
.el-tabs__header {
|
|
|
- padding-top: 3px !important;
|
|
|
+ padding-top: 0 !important;
|
|
|
margin-bottom: 6px;
|
|
|
+
|
|
|
+ .el-tabs__item {
|
|
|
+ height: 32px;
|
|
|
+ line-height: 32px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &.table-tabs {
|
|
|
+ .el-tabs__nav-scroll {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row-reverse;
|
|
|
+
|
|
|
+ .el-tabs__item {
|
|
|
+ font-size: 15px !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.el-tabs__content {
|
|
|
- height: calc(100% - 52px);
|
|
|
+ height: calc(100% - 38px);
|
|
|
|
|
|
.el-tab-pane {
|
|
|
height: 100%;
|
|
|
+
|
|
|
+ .progress-bar-outline {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ overflow-y: scroll;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -378,7 +486,7 @@ export default {
|
|
|
background-repeat: no-repeat;
|
|
|
background-position: center; /* 可选,让图片居中对齐 */
|
|
|
color: white;
|
|
|
- height: 130px;
|
|
|
+ height: 17.6%;
|
|
|
|
|
|
&.blue {
|
|
|
background-image: url('/static/assets/index/bg-item-blue.png');
|
|
@@ -391,19 +499,19 @@ export default {
|
|
|
.top-line-text {
|
|
|
margin: 12px 35px 8px;
|
|
|
line-height: 24px;
|
|
|
- font-size: 22px;
|
|
|
+ font-size: 18px;
|
|
|
}
|
|
|
|
|
|
.middle-line-text {
|
|
|
width: 100%;
|
|
|
text-align: center;
|
|
|
- font-size: 56px;
|
|
|
+ font-size: 48px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.map-item {
|
|
|
width: calc(100% - 16px);
|
|
|
- height: 284px;
|
|
|
+ height: 34.65%;
|
|
|
margin: 0 8px 20px;
|
|
|
background-image: url('/static/assets/index/bg-map.png');
|
|
|
background-size: 100% 100%;
|