界面功能优化

This commit is contained in:
jiangzhe 2024-05-27 10:45:03 +08:00
parent de3674f7ec
commit 29a89ff21b
7 changed files with 52 additions and 65 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<el-config-provider :locale="appStore.locale" :size="size"> <el-config-provider :locale="appStore.locale" :size="size">
<router-view /> <router-view :key="$route.fullPath" />
</el-config-provider> </el-config-provider>
</template> </template>

View File

@ -24,7 +24,7 @@
<el-descriptions-item label="活动名称">{{ info.sessionName }}</el-descriptions-item> <el-descriptions-item label="活动名称">{{ info.sessionName }}</el-descriptions-item>
<el-descriptions-item label="发起人">{{ info.createName }}</el-descriptions-item> <el-descriptions-item label="发起人">{{ info.createName }}</el-descriptions-item>
<el-descriptions-item label="过期时间"> <el-descriptions-item label="截止时间">
{{ info.expireTime }} {{ info.expireTime }}
</el-descriptions-item> </el-descriptions-item>

View File

@ -289,7 +289,6 @@ const handleUpdate = async (row?: any) => {
current.value.userId = row.userId current.value.userId = row.userId
current.value.nickName = row.nickName current.value.nickName = row.nickName
getStaticList() getStaticList()
// const _warnId = row?.warnId || ids.value[0] // const _warnId = row?.warnId || ids.value[0]
@ -330,7 +329,7 @@ function handleExport(row: any) {
recordId: row.recordId, recordId: row.recordId,
userId: current.value.userId, userId: current.value.userId,
nickName: current.value.nickName nickName: current.value.nickName
}, `${current.value.nickName}.pdf`) }, `${current.value.nickName}-${row.scaleName}.pdf`)
} }
onMounted(() => { onMounted(() => {

View File

@ -81,7 +81,7 @@
<span>完成数量</span> <span>完成数量</span>
<span>时间</span> <span>时间</span>
</div> </div>
<vue3-seamless-scroll :list="list" class="scroll"> <vue3-seamless-scroll :list="list" class="scroll" :classOptions="classOptions">
<div class="item" v-for="(item, index) in list" :key="index"> <div class="item" v-for="(item, index) in list" :key="index">
<span>{{ item.sessionName }}</span> <span>{{ item.sessionName }}</span>
<span>{{ item.value }} / {{ item.total }}</span> <span>{{ item.value }} / {{ item.total }}</span>
@ -99,7 +99,7 @@
</div> </div>
<div class="item-right-2 boxall"> <div class="item-right-2 boxall">
<div class="alltitle">预警统计</div> <div class="alltitle">风险统计</div>
<div class="box-btn"> <div class="box-btn">
<el-radio-group v-model="rightPie2Radio" fill="#031D50" @change="rightPie2RadioChange"> <el-radio-group v-model="rightPie2Radio" fill="#031D50" @change="rightPie2RadioChange">
<el-radio-button value="year">当年</el-radio-button> <el-radio-button value="year">当年</el-radio-button>
@ -143,6 +143,10 @@ use([
let showTime = ref('') let showTime = ref('')
let timer: any = null let timer: any = null
const classOptions = {
step: 20
}
function time() { function time() {
let dt = new Date(); let dt = new Date();
let y = dt.getFullYear(); let y = dt.getFullYear();
@ -364,9 +368,9 @@ const centerBar1Option = ref({
}, },
grid: { grid: {
top: "20%", top: "20%",
right: "50", right: "40",
bottom: "30", bottom: "30",
left: "30", left: "40",
}, },
legend: { legend: {
data: [], data: [],
@ -710,9 +714,9 @@ const rightBar1Option = ref({
axisPointer: { type: 'shadow' }, axisPointer: { type: 'shadow' },
}, "grid": { }, "grid": {
"top": "15%", "top": "15%",
"right": "10%", "right": "6%",
"bottom": "30", "bottom": "30",
"left": "10%", "left": "6%",
}, },
legend: { legend: {
data: ['预警数', '干预数'], data: ['预警数', '干预数'],
@ -842,8 +846,8 @@ async function getHalfMonthData() {
res.data.forEach(v => { res.data.forEach(v => {
xAxisData.push(v.name) xAxisData.push(v.name)
warnData.push(v.value) warnData.push(v.spareValue)
interveneData.push(v.spareValue) interveneData.push(v.value)
}); });
rightBar1Option.value.xAxis[0].data = xAxisData rightBar1Option.value.xAxis[0].data = xAxisData
@ -884,11 +888,11 @@ const rightPie2Option = ref({
} }
}, },
series: [{ series: [{
name: '预警统计', name: '风险统计',
type: 'pie', type: 'pie',
radius: ['50%', '70%'], radius: ['50%', '70%'],
center: ['50%', '50%'], center: ['50%', '50%'],
color: ['rgb(131,249,103)', '#FBFE27', '#FE5050', '#1DB7E5'], //'#FBFE27','rgb(11,228,96)','#FE5050' // color: ['rgb(131,249,103)', '#FBFE27', '#FE5050', '#1DB7E5'], //'#FBFE27','rgb(11,228,96)','#FE5050'
data: [], data: [],
roseType: 'radius', roseType: 'radius',
label: { label: {
@ -1278,4 +1282,4 @@ li {
} }
} }
} }
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<el-row justify="space-around" align="center"> <el-row justify="space-around">
<el-col :span="12"> <el-col :span="12">
<img class="avater" :src="userStore.avatar" />{{ getGreeting() }} <img class="avater" :src="userStore.avatar" />{{ getGreeting() }}
</el-col> </el-col>
@ -207,34 +207,29 @@ const leftPieOption = ref({
type: 'pie', type: 'pie',
radius: ['50%', '70%'], radius: ['50%', '70%'],
center: ['50%', '50%'], center: ['50%', '50%'],
color: ['rgb(131,249,103)', '#FBFE27', '#FE5050', '#1DB7E5'], //'#FBFE27','rgb(11,228,96)','#FE5050' // color: ['rgb(131,249,103)', '#FBFE27', '#FE5050', '#1DB7E5'], //'#FBFE27','rgb(11,228,96)','#FE5050'
data: [], data: [],
roseType: 'radius', roseType: 'radius',
label: { label: {
normal: { formatter: ['{c|{c}}', '{b|{b}}'].join('\n'),
formatter: ['{c|{c}}', '{b|{b}}'].join('\n'), rich: {
rich: { c: {
c: { fontSize: 20,
fontSize: 20, lineHeight: 5
lineHeight: 5
},
b: {
fontSize: 14,
height: 44
},
}, },
} b: {
fontSize: 14,
height: 44
},
},
}, },
labelLine: { labelLine: {
normal: { lineStyle: {
lineStyle: { color: 'rgb(98,137,169)',
color: 'rgb(98,137,169)', },
}, smooth: 0.2,
smooth: 0.2, length: 10,
length: 10, length2: 20,
length2: 20,
}
} }
}] }]
}) })
@ -271,7 +266,7 @@ const centerBarOption = ref({
} }
}, },
legend: { legend: {
data: ['发布数', '测评数'], data: [],
right: 'center', right: 'center',
top: 0, top: 0,
itemWidth: 12, itemWidth: 12,
@ -290,9 +285,7 @@ const centerBarOption = ref({
data: [], data: [],
axisLabel: { axisLabel: {
formatter: function (value: any) { return value.split("").join("\n"); }, formatter: function (value: any) { return value.split("").join("\n"); },
textStyle: { fontSize: 14,
fontSize: 14,
}
} }
}, },
@ -307,14 +300,11 @@ const centerBarOption = ref({
} }
}, },
axisLabel: { axisLabel: {
textStyle: { color: '#95989D',
color: '#95989D', fontSize: 14,
fontSize: 14,
}
}, },
axisLine: { show: false }, axisLine: { show: false },
}, },
series: [ series: [
] ]
}) })
@ -332,6 +322,7 @@ async function getGradeData() {
}); });
const seriesData = [{ name: '发布数', data: seriesPublishData, type: 'bar' }, { name: '测评数', data: seriesEvaluationData, type: 'bar' }] const seriesData = [{ name: '发布数', data: seriesPublishData, type: 'bar' }, { name: '测评数', data: seriesEvaluationData, type: 'bar' }]
centerBarOption.value.legend.data = ['发布数', '测评数']
centerBarOption.value.xAxis.data = xAxisData centerBarOption.value.xAxis.data = xAxisData
centerBarOption.value.series = seriesData centerBarOption.value.series = seriesData
} }
@ -427,10 +418,7 @@ onMounted(() => {
getInterveneNumData() getInterveneNumData()
initChart() initChart()
})
onUnmounted(() => {
disposeChart()
}) })
// import { initWebSocket } from '@/utils/websocket'; // import { initWebSocket } from '@/utils/websocket';

View File

@ -275,10 +275,16 @@ const resetQuery = () => {
const publishType = ref(); const publishType = ref();
const handleAdd = (type: any) => { const handleAdd = (type: any) => {
reset(); reset();
dialog.visible = true;
dialog.title = "量表测评发布";
publishType.value = type publishType.value = type
dialog.visible = true;
if (publishType.value == 0) {
dialog.title = "量表个测发布";
} else {
dialog.title = "量表普测发布";
}
} }
/** 提交按钮 */ /** 提交按钮 */

View File

@ -229,10 +229,9 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="岗位"> <el-form-item label="用户类型">
<el-select v-model="form.postIds" multiple placeholder="请选择"> <el-select v-model="form.userType" placeholder="请选择" style="width: 100%">
<el-option v-for="item in postOptions" :key="item.postId" :label="item.postName" :value="item.postId" <el-option v-for="item in userTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
:disabled="item.status == '1'"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -245,15 +244,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="用户类型">
<el-select v-model="form.userType" placeholder="请选择" style="width: 100%">
<el-option v-for="item in userTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注"> <el-form-item label="备注">