Browse Source

fix:1、大屏优化

main
pengwei 7 months ago
parent
commit
4b5375f65d
  1. 10
      src/api/datav.ts
  2. 2
      src/api/screen/jwpy.ts
  3. 423
      src/views/datav/Jwpy.vue
  4. 991
      src/views/datav/Jwpy2.vue
  5. 2
      src/views/datav/RightsComfort.vue
  6. 21
      src/views/work/Confinement.vue

10
src/api/datav.ts

@ -18,6 +18,15 @@ export function getMailVisitsData(times) {
});
}
export function selectDistribution(times){
console.log('time2')
return request.get({
url: `/datav/Jwpy?beginTime=${times[0]}&endTime=${times[1]}`
});
}
export function getRightsComfortData(times) {
return request.get({
url: `/datav/rightsComfort?beginTime=${times[0]}&endTime=${times[1]}`
@ -60,3 +69,4 @@ export function getAuditProblems(time) {
}
});
}

2
src/api/screen/jwpy.ts

@ -1,4 +1,6 @@
import outrequest from "../outrequest";
import request from "../request";
export function GetDCQK(PeriodId, PeriodSonID, OrgNo, TaskID) {

423
src/views/datav/Jwpy.vue

@ -3,63 +3,11 @@
<div class="wrapper">
<datav-header/>
<main>
<el-row :gutter="16">
<el-col :span="6">
<datav-card title="调查情况" style="height: 156px">
<el-row class="mb-32">
<el-col :span="5">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content">
{{ reviewOk[0].dczl }}
</div>
<div class="descriptions_label">
调查总量
</div>
</div>
</el-col>
<el-col :span="5">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content">
{{ reviewOk[0].State3 }}
</div>
<div class="descriptions_label">
有效回复
</div>
</div>
</el-col>
<el-col :span="5">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content">
{{ reviewOk[0].mys }}
</div>
<div class="descriptions_label">
满意
</div>
</div>
</el-col>
<el-col :span="5">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content">
{{ reviewOk[0].jbmys }}
</div>
<div class="descriptions_label">
基本满意
</div>
</div>
</el-col>
<el-col :span="4">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content yellow">
{{ reviewOk[0].bmys }}
</div>
<div class="descriptions_label">
不满意数
</div>
</div>
</el-col>
</el-row>
</datav-card>
<datav-card title="调查滿意度">
<el-container>
<el-header>
@ -95,38 +43,90 @@
</el-main>
</el-container>
</datav-card>
<datav-card title="单位满意率">
<el-container>
<el-header>
<div style="background-color:#04144E; ">
<h3 style="color: white">业务满意率</h3>
<!-- 市州考评-->
<el-table
:highlight-current-row="false"
:highlight-hover-row='false'
:data="tableData"
height="350"
:summary-cell-style="summaryCellStyle"
:summary-method="getSummaries"
:data="tableData1"
height="70"
:style="{ width: '100%', marginTop: '10px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyleTableData1"
:show-summary='false'
:highlight-current-row='false'
>
<el-table-column prop="OrganizeName" label="市州考评" />
<el-table-column prop="FinalRP" label="滿意度" width="66px"/>
<el-table-column prop="TBRp" label="上期满意度" width="66px"/>
<el-table-column prop="TBRpts" label="同比上期" width="66px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-header>
<el-main>
<div style="background-color:#04144E; ">
<!-- 县市考评-->
<el-table
:data="tableData2"
height="215"
:style="{ width: '100%', marginTop: '20px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyleTableData2"
:show-summary='false'
>
<el-table-column prop="OrganizeName" label="县市考评" />
<el-table-column prop="FinalRP" label="滿意度" width="66px"/>
<el-table-column prop="TBRp" label="上期满意度" width="66px"/>
<el-table-column prop="TBRpts" label="同比上期" width="66px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>
</template>
</el-table-column>
</el-table>
<!-- -->
<el-table
:data="tableData3"
height="360"
:style="{ width: '100%', marginTop: '10px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyle"
:show-summary='true'
:show-summary='false'
>
<el-table-column prop="Name" label="单项业务" width="77px"/>
<el-table-column prop="sdcl" label="有效数" width="77px"/>
<el-table-column prop="BasicallySatisfiedNum" label="基本满意数" width="77px"/>
<el-table-column prop="sbmys" label="不满意数" width="77px"/>
<el-table-column prop="smyl" label="满意率" width="77px"/>
<el-table-column prop="smyltb" label="同比" width="77px">
<el-table-column prop="OrganizeName" label="区"/>
<el-table-column prop="FinalRP" label="滿意度" width="66px"/>
<el-table-column prop="TBRp" label="上期满意度" width="66px"/>
<el-table-column prop="TBRpts" label="同比上期" width="66px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.smyltb)">{{ scope.row.smyltb }}</span>
<span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-main>
</el-container>
</datav-card>
</el-col>
<el-col :span="12">
<div class="datav-col" style="margin-top: 10px">
<el-row justify="center" v-if="isSelectVisible" :gutter="20" class="mt-16" @click="toggleSelect">
<p>
统计周期 年份{{yearValue}} 月份{{monthValue}} 单位{{orgValue}} {{taskValue}}
</p>
</el-row>
</div>
<el-row justify="center" :gutter="20" class="mt-16">
<el-col :span="4">
<el-select v-model="selectYear" placeholder="请选择" @change="handleYearChange">
<el-select v-if="!isSelectVisible" v-model="selectYear" placeholder="请选择" @change="handleYearChange">
<el-option
v-for="item in years"
:key="item.ID"
@ -136,7 +136,8 @@
</el-select>
</el-col>
<el-col :span="4">
<el-select v-model="selectMonth" placeholder="请选择" @change="handleMonthChange">
<el-select v-if="!isSelectVisible" v-model="selectMonth" placeholder="请选择" @change="handleMonthChange">
<el-option
v-for="item in months"
:key="item.ID"
@ -146,7 +147,9 @@
</el-select>
</el-col>
<el-col :span="6">
<el-tree-select
v-if="!isSelectVisible"
v-model="selectOrg"
:data="org"
check-strictly
@ -158,7 +161,9 @@
/>
</el-col>
<el-col :span="4">
<el-select v-model="task" placeholder="请选择" @change="handleTaskChange">
<el-select v-if="!isSelectVisible" v-model="task" placeholder="请选择" @change="handleTaskChange">
<el-option
v-for="item in content"
:key="item.ID"
@ -168,8 +173,37 @@
</el-select>
</el-col>
</el-row>
<div class="flex gap-42">
<datav-statistic
:value="reviewOk[0].dczl"
title="调查总量"
style="width: 20%"
/>
<datav-statistic
:value="reviewOk[0].State3 "
title="有效回复"
style="width: 20%"
/>
<datav-statistic
:value="reviewOk[0].mys"
title="满意"
style="width: 20%"
@click="open('/query?open=12337')"
/>
<datav-statistic
:value="reviewOk[0].jbmys"
title="基本满意"
style="width: 20%"
/>
<datav-statistic
:value="reviewOk[0].bmys "
title="不满意数"
style="width: 20%"
/>
</div>
<v-charts
style="height: 450px"
:option="option"
@ -177,122 +211,54 @@
@click="handleChartClick"
class="map-option"
/>
<datav-card title="综合滿意度排名">
<datav-card title="不满意样本趋势" sub-title="不满意样本" >
<div class="common-layout">
<el-container>
<el-container>
<el-header>
<div style="background-color:#04144E; ">
<el-table
:data="tableData1"
height="70"
:style="{ width: '100%', marginTop: '20px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyleTableData1"
:show-summary='false'
:highlight-current-row='false'
>
<el-table-column prop="SetName" label="排名" width="72px"/>
<el-table-column prop="OrganizeName" label="市州考评" width="129"/>
<el-table-column prop="FinalRP" label="滿意度" width="75px"/>
<el-table-column prop="TBRp" label="上期满意度" width="75px"/>
<el-table-column prop="TBRpts" label="同比上期" width="75px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-header>
<el-main>
<div style="background-color:#04144E; ">
<el-table
:data="tableData2"
height="215"
:style="{ width: '100%', marginTop: '70px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyleTableData2"
:show-summary='false'
>
<el-table-column prop="MydRanking" label="排名" width="55px"/>
<el-table-column prop="OrganizeName" label="县市考评"/>
<el-table-column prop="FinalRP" label="滿意度" width="66px"/>
<el-table-column prop="TBRp" label="上期满意度" width="66px"/>
<el-table-column prop="TBRpts" label="同比上期" width="66px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>
</template>
</el-table-column>
</el-table>
<v-charts
:option="option2"
autoresize
/>
</div>
</el-main>
</el-container>
</datav-card>
</el-col>
<el-aside width="445px">
<div style="background-color:#04144E; height: 360px ">
<el-col :span="6">
<datav-card title="项目满意率">
<div style="height: 350px">
<el-table
:data="tableData3"
height="360"
:highlight-current-row="false"
:highlight-hover-row='false'
:data="tableData"
height="350"
:summary-cell-style="summaryCellStyle"
:summary-method="getSummaries"
:style="{ width: '100%', marginTop: '20px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyle"
:show-summary='false'
:show-summary='true'
>
<el-table-column prop="MydRanking" label="排名"/>
<el-table-column prop="OrganizeName" label="区"/>
<el-table-column prop="FinalRP" label="滿意度"/>
<el-table-column prop="TBRp" label="上期满意度"/>
<el-table-column prop="TBRpts" label="同比上期" width="86px">
<el-table-column prop="Name" label="单项业务" width="77px"/>
<el-table-column prop="sdcl" label="有效数" width="77px"/>
<el-table-column prop="BasicallySatisfiedNum" label="基本满意数" width="77px"/>
<el-table-column prop="sbmys" label="不满意数" width="77px"/>
<el-table-column prop="smyl" label="满意率" width="77px"/>
<el-table-column prop="smyltb" label="同比" width="77px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>
<span :style="getCellStyle(scope.row.smyltb)">{{ scope.row.smyltb }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-aside>
</el-container>
</div>
</datav-card>
</el-col>
<el-col :span="6">
<datav-card title="不满意样本趋势" sub-title="不满意样本" style="height: 156px">
<div style="height: 150px">
<v-charts
:option="option2"
autoresize
/>
</div>
</datav-card>
<datav-card title="单项分析">
<div style="height: 226px">
<div style="background-color:#04144E; ">
<datav-card title="项目下发情况">
<div style="height: 480px">
<v-charts
:option="option3"
:option="option4"
autoresize
/>
</div>
</datav-card>
<div style="background-color:#04144E; ">
<h3 style="color: white">单项调查情况 <span style="font-size: 14px; color: #597AE9">昨日数据下发</span>
</h3>
<el-table
:data="tableData4"
height="350"
:summary-cell-style="summaryCellStyle"
:summary-method="getSummaries"
:style="{ width: '100%', marginTop: '20px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyle"
:show-summary='true'
>
<el-table-column prop="Name" label="单项业务"/>
<el-table-column prop="sdcl" label="有效数"/>
<el-table-column prop="bmyzs" label="省不满意数"/>
<el-table-column prop="LastDayQACount" label="新增调查数"/>
</el-table>
</div>
</el-col>
@ -319,6 +285,8 @@ import {
GetZHMYLPM,
GetZRSJXF, qx_get
} from "@/api/screen/jwpy.ts";
import moment from "moment/moment";
import {selectDistribution} from "@/api/datav";
// region
@ -338,6 +306,12 @@ const selectOrg = ref() // 选择的组织机构
const task = ref() // id
const content = ref([{}]) // id
const yearValue = ref()
const orgValue =ref()
const taskValue =ref()
const monthValue= ref()
const tableData = ref([]) //
const tableData1 = ref([]) //
const tableData2 = ref([])
@ -349,6 +323,22 @@ const treeProps = {
label: 'text',
children: 'children'
};
const time = ref([
moment().startOf("year").format("YYYY-MM-DD"),
moment().format("YYYY-MM-DD"),
]);
const getDistributionFun = async()=>{
console.log('---------')
console.log("time",time.value)
const res = await selectDistribution(time.value);
option4.value.series[0].data=res.total;
option4.value.series[1].data=res.processing;
option4.value.series[2].data=res.total;
option4.value.yAxis.data=res.name;
}
//
@ -367,23 +357,37 @@ watch(selectYear, (newYearID) => {
months.value = []; //
}
});
let isSelectVisible = ref(true)
const toggleSelect=()=> {
isSelectVisible.value = !isSelectVisible.value; // el-select
};
// region
const handleYearChange = (checkedYear) => {
toggleSelect()
console.log(checkedYear)
yearValue.value= years.value.find(s=>s.ID === checkedYear).PeriodName;
console.log("年份" + selectYear.value + " 月份" + selectMonth.value + " 单位" + selectOrg.value + " task" + task.value)
getData();
}
const handleMonthChange = (checkedMonth) => {
toggleSelect()
monthValue.value= months.value.find(s=>s.ID === checkedMonth).SonPeriodName;
console.log(monthValue.value)
console.log("年份" + selectYear.value + " 月份" + selectMonth.value + " 单位" + selectOrg.value + " task" + task.value)
getData();
}
//
const handleOrgChange = async (checkedOrg) => {
toggleSelect()
try {
// 使 await task
content.value = await GetOffLineStatisticsSetList(selectOrg.value);
task.value = content.value[0].ID;
taskValue.value= content.value[0].text;
//
const targetName = mapDataList.value.find(item => item.value === checkedOrg).name;
const chart = echarts.getInstanceByDom(document.querySelector('.map-option'));
@ -400,6 +404,8 @@ const handleOrgChange = async (checkedOrg) => {
};
//
const handleTaskChange = (checkedTask) => {
toggleSelect()
taskValue.value= task.value.find(s=>s.ID === checkedTask).SetName;
console.log("年份" + selectYear.value + " 月份" + selectMonth.value + " 单位" + selectOrg.value + " task" + task.value)
getData();
}
@ -678,19 +684,91 @@ const option3 = ref({
],
grid: {left: '8%', right: '0%', top: '10%', bottom: '10%'},
});
const option4 = ref({
tooltip: {},
legend: {
data: ['下发数', '查实数', '办结数'],
textStyle: {
color: '#fff',
},
},
xAxis: {
type: 'value',
axisLabel: {
margin: 10,
},
},
yAxis: {
type: 'category',
data:[],
axisLabel: {
fontSize:10,
color: '#fff',
},
splitLine: {
show: true, lineStyle: {
color: ['#193775'], // x线
width: 1, // 线
type: 'solid' // 线 'solid', 'dashed', 'dotted'
}
}
},
series: [
{
name: '下发数',
type: 'bar',
data: [],
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(40,230,255,0.63)'
}, {offset: 1, color: 'rgba(40,230,255,0)'}])
},
},
{
name: '查实数',
type: 'bar',
data: [],
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[{offset: 0, color: 'rgba(255,218,51,0.52)'},
{offset: 1, color: 'rgba(255,219,49,0)'}])
}
},
{
name: '办结数',
type: 'bar',
data: [],
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#6FDBA0'
}, {offset: 1, color: '#6FDBA0'}])
}
}
],
grid: {left: '8%', right: '0%', top: '10%', bottom: '10%'},
});
// region
onMounted(async () => {
await getDistributionFun();
//
const resYears = await GetMyPeriod();
years.value = resYears.map(item => ({
resYears.map(item => ({
ID: item.ID,
PeriodName: item.PeriodName
}));
if (years.value.length > 0) {
selectYear.value = years.value[0].ID; //
console.log("第一个年份" + selectYear.value)
yearValue.value = years.value[0].PeriodName;
}
//
@ -711,6 +789,7 @@ onMounted(async () => {
months.value.unshift({SonPeriodName: '全年', ID: '-1'});
}
selectMonth.value = months.value[0].ID;
monthValue.value = months.value[0].SonPeriodName;
}
//
@ -719,6 +798,7 @@ onMounted(async () => {
if (org.value.length > 0) {
selectOrg.value = org.value[0].id;
console.log(selectOrg.value);
orgValue.value = org.value[0].text;
}
const resTasks = await GetOffLineStatisticsSetList(selectOrg.value);
@ -726,6 +806,7 @@ onMounted(async () => {
if (content.value.length > 0) {
console.log(content.value[0]);
task.value = content.value[0].ID;
taskValue.value = content.value[0].SetName;
}
//
await getData();
@ -795,6 +876,8 @@ async function getData() {
option.value.series.data = mapDataList.value
});
getDistributionFun();
}
// endregion

991
src/views/datav/Jwpy2.vue

@ -0,0 +1,991 @@
<template>
<el-scrollbar height="100vh">
<div class="wrapper">
<datav-header/>
<main>
<el-row :gutter="16">
<el-col :span="6">
<datav-card title="调查情况" style="height: 156px">
<el-row class="mb-32">
<el-col :span="5">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content">
{{ reviewOk[0].dczl }}
</div>
<div class="descriptions_label">
调查总量
</div>
</div>
</el-col>
<el-col :span="5">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content">
{{ reviewOk[0].State3 }}
</div>
<div class="descriptions_label">
有效回复
</div>
</div>
</el-col>
<el-col :span="5">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content">
{{ reviewOk[0].mys }}
</div>
<div class="descriptions_label">
满意
</div>
</div>
</el-col>
<el-col :span="5">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content">
{{ reviewOk[0].jbmys }}
</div>
<div class="descriptions_label">
基本满意
</div>
</div>
</el-col>
<el-col :span="4">
<div class="descriptions_cell text-center margin-top-30">
<div class="descriptions_content yellow">
{{ reviewOk[0].bmys }}
</div>
<div class="descriptions_label">
不满意数
</div>
</div>
</el-col>
</el-row>
</datav-card>
<datav-card title="调查滿意度">
<el-container>
<el-header>
<el-row class="mb-32">
<el-col :span="11">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
{{
dcmyd.length > 0 && dcmyd[1] && dcmyd[1].FinalRP !== undefined ? dcmyd[1].FinalRP : '0'
}}
</div>
<div class="descriptions_label">
上期满意度
</div>
</div>
</el-col>
<el-col :span="11">
<div class="descriptions_cell text-center height-118">
<div class="descriptions_content yellow">
{{
dcmyd.length > 0 && dcmyd[0] && dcmyd[0].FinalRP !== undefined ? dcmyd[0].FinalRP : '0'
}}
</div>
<div class="descriptions_label ">
当前调查满意度
</div>
</div>
</el-col>
</el-row>
</el-header>
<el-main style="height: 165px">
<v-charts :option="option1" autoresize/>
</el-main>
</el-container>
</datav-card>
<div style="background-color:#04144E; ">
<h3 style="color: white">业务满意率</h3>
<el-table
:highlight-current-row="false"
:highlight-hover-row='false'
:data="tableData"
height="350"
:summary-cell-style="summaryCellStyle"
:summary-method="getSummaries"
:style="{ width: '100%', marginTop: '20px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyle"
:show-summary='true'
>
<el-table-column prop="Name" label="单项业务" width="77px"/>
<el-table-column prop="sdcl" label="有效数" width="77px"/>
<el-table-column prop="BasicallySatisfiedNum" label="基本满意数" width="77px"/>
<el-table-column prop="sbmys" label="不满意数" width="77px"/>
<el-table-column prop="smyl" label="满意率" width="77px"/>
<el-table-column prop="smyltb" label="同比" width="77px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.smyltb)">{{ scope.row.smyltb }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="12">
<el-row justify="center" :gutter="20" class="mt-16">
<el-col :span="4">
<el-select v-model="selectYear" placeholder="请选择" @change="handleYearChange">
<el-option
v-for="item in years"
:key="item.ID"
:label="item.PeriodName"
:value="item.ID">
</el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-select v-model="selectMonth" placeholder="请选择" @change="handleMonthChange">
<el-option
v-for="item in months"
:key="item.ID"
:label="item.SonPeriodName"
:value="item.ID">
</el-option>
</el-select>
</el-col>
<el-col :span="6">
<el-tree-select
v-model="selectOrg"
:data="org"
check-strictly
:props="treeProps"
:expand-on-click-node="false"
node-key="id"
:style="{ fontSize: '12px', }"
@change="handleOrgChange"
/>
</el-col>
<el-col :span="4">
<el-select v-model="task" placeholder="请选择" @change="handleTaskChange">
<el-option
v-for="item in content"
:key="item.ID"
:label="item.SetName"
:value="item.ID">
</el-option>
</el-select>
</el-col>
</el-row>
<v-charts
style="height: 450px"
:option="option"
autoresize
@click="handleChartClick"
class="map-option"
/>
<datav-card title="综合滿意度排名">
<div class="common-layout">
<el-container>
<el-container>
<el-header>
<div style="background-color:#04144E; ">
<!-- 市州考评-->
<el-table
:data="tableData1"
height="70"
:style="{ width: '100%', marginTop: '20px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyleTableData1"
:show-summary='false'
:highlight-current-row='false'
>
<el-table-column prop="SetName" label="排名" width="72px"/>
<el-table-column prop="OrganizeName" label="市州考评" width="129"/>
<el-table-column prop="FinalRP" label="滿意度" width="75px"/>
<el-table-column prop="TBRp" label="上期满意度" width="75px"/>
<el-table-column prop="TBRpts" label="同比上期" width="75px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-header>
<el-main>
<div style="background-color:#04144E; ">
<!-- 县市考评-->
<el-table
:data="tableData2"
height="215"
:style="{ width: '100%', marginTop: '70px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyleTableData2"
:show-summary='false'
>
<el-table-column prop="MydRanking" label="排名" width="55px"/>
<el-table-column prop="OrganizeName" label="县市考评"/>
<el-table-column prop="FinalRP" label="滿意度" width="66px"/>
<el-table-column prop="TBRp" label="上期满意度" width="66px"/>
<el-table-column prop="TBRpts" label="同比上期" width="66px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-main>
</el-container>
<el-aside width="445px">
<!-- -->
<div style="background-color:#04144E; height: 360px ">
<el-table
:data="tableData3"
height="360"
:style="{ width: '100%', marginTop: '20px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyle"
:show-summary='false'
>
<el-table-column prop="MydRanking" label="排名"/>
<el-table-column prop="OrganizeName" label="区"/>
<el-table-column prop="FinalRP" label="滿意度"/>
<el-table-column prop="TBRp" label="上期满意度"/>
<el-table-column prop="TBRpts" label="同比上期" width="86px">
<template v-slot="scope">
<span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-aside>
</el-container>
</div>
</datav-card>
</el-col>
<el-col :span="6">
<datav-card title="不满意样本趋势" sub-title="不满意样本" style="height: 156px">
<div style="height: 150px">
<v-charts
:option="option2"
autoresize
/>
</div>
</datav-card>
<datav-card title="单项分析">
<div style="height: 226px">
<v-charts
:option="option3"
autoresize
/>
</div>
</datav-card>
<div style="background-color:#04144E; ">
<h3 style="color: white">单项调查情况 <span style="font-size: 14px; color: #597AE9">昨日数据下发</span>
</h3>
<el-table
:data="tableData4"
height="350"
:summary-cell-style="summaryCellStyle"
:summary-method="getSummaries"
:style="{ width: '100%', marginTop: '20px', fontSize: fontSize + 'px' }"
:header-cell-style="headerCellStyle"
:row-style="tableRowStyle"
:show-summary='true'
>
<el-table-column prop="Name" label="单项业务"/>
<el-table-column prop="sdcl" label="有效数"/>
<el-table-column prop="bmyzs" label="省不满意数"/>
<el-table-column prop="LastDayQACount" label="新增调查数"/>
</el-table>
</div>
</el-col>
</el-row>
</main>
</div>
</el-scrollbar>
</template>
<script setup>
import vCharts from "vue-echarts";
import changshaMap from "@/assets/data/changsha.json";
import * as echarts from "echarts/core";
import {
GetBMYYBQS, GetCustomOffLineSonPeriodSet,
GetDCQK,
GetDITU,
GetDXFX,
GetGLFW,
GetMyPeriod, GetOffLineStatisticsSetList,
GetRCSQQK,
GetZHMYLPM,
GetZRSJXF, qx_get
} from "@/api/screen/jwpy.ts";
// region
const reviewOk = ref([{}]); //
const dcmyd = ref([]); // 滿
const bmyybqs = ref([]); //
const dxfx = ref([]); //
const tempMap = ref([]) //
const mapDataList = ref([]); //
const years = ref([{}]) //
const selectYear = ref(); //
const tempMonths = ref([{}]) //
const months = ref([{}]) //
const selectMonth = ref(); //
const org = ref([]) //
const selectOrg = ref() //
const task = ref() // id
const content = ref([{}]) // id
const tableData = ref([]) //
const tableData1 = ref([]) //
const tableData2 = ref([])
const tableData3 = ref([])
const tableData4 = ref([]) //
// endregion
//
const treeProps = {
label: 'text',
children: 'children'
};
//
watch(selectYear, (newYearID) => {
if (newYearID) {
const temp = years.value.filter(item => item.ID === selectYear.value)
if (temp.length > 0 && temp[0].PeriodName.includes("半")) {
months.value = tempMonths.value.filter(item => item.PeriodID === newYearID);
months.value.unshift({SonPeriodName: '半年度', ID: '-1'});
} else {
months.value = tempMonths.value.filter(item => item.PeriodID === newYearID);
months.value.unshift({SonPeriodName: '全年', ID: '-1'});
}
selectMonth.value = months.value[0].ID;
} else {
months.value = []; //
}
});
// region
const handleYearChange = (checkedYear) => {
console.log("年份" + selectYear.value + " 月份" + selectMonth.value + " 单位" + selectOrg.value + " task" + task.value)
getData();
}
const handleMonthChange = (checkedMonth) => {
console.log("年份" + selectYear.value + " 月份" + selectMonth.value + " 单位" + selectOrg.value + " task" + task.value)
getData();
}
//
const handleOrgChange = async (checkedOrg) => {
try {
// 使 await task
content.value = await GetOffLineStatisticsSetList(selectOrg.value);
task.value = content.value[0].ID;
//
const targetName = mapDataList.value.find(item => item.value === checkedOrg).name;
const chart = echarts.getInstanceByDom(document.querySelector('.map-option'));
if (chart) {
chart.dispatchAction({type: 'highlight', name: targetName,});
} else {
}
console.log("年份" + selectYear.value + " 月份" + selectMonth.value + " 单位" + selectOrg.value + " task" + task.value)
} catch (error) {
console.error("Error fetching data:", error);
}
await getData();
};
//
const handleTaskChange = (checkedTask) => {
console.log("年份" + selectYear.value + " 月份" + selectMonth.value + " 单位" + selectOrg.value + " task" + task.value)
getData();
}
//
const handleChartClick = async (params) => {
if (params.componentType === 'series') {
const targetName = params.name === '长沙县' ? '长沙县公安局' : params.name.substring(0, 2);
const clickedData = mapDataList.value.find(item => item.name.includes(targetName));
if (clickedData) {
selectOrg.value = clickedData.value;
console.log(`地区:${params.name} id:${selectOrg.value} 年:${selectYear.value} 月:${selectMonth.value}`);
try {
content.value = await GetOffLineStatisticsSetList(selectOrg.value);
task.value = content.value[0].ID;
} catch (error) {
console.error("Error fetching data:", error);
}
} else {
console.error("没有找到匹配的数据项");
}
}
await getData();
// 滿
// let tempId = setTimeout(discovery, 300);
};
// endregion
//
const discovery = async () => {
//
await GetZHMYLPM(selectYear.value, selectMonth.value, selectOrg.value, task.value, selectOrg.value === '4301' ? 1 : 2).then((res) => {
tableData1.value = res[0].lstCity
let temp = res[0].lstSheng;
//
// const group2 = temp.filter(item => item.SetName === "()");
const group3 = temp.filter(item => item.SetName === "(省)派出所");
// tableData2.value = group2
tableData3.value = group3
});
}
echarts.registerMap("changsha", changshaMap);
const option = ref({
geo: {
map: "changsha",
},
visualMap: {
show: false,
type: "piecewise",
bottom: 10,
pieces: [
{min: 0, max: 500, label: "问题数低于500", color: "#F6A149"},
{min: 501, max: 1000, label: "问题数介于500-1000", color: "#F6A149"},
{min: 1001, label: "问题数高于1000", color: "#D34343"},
],
right: 10,
realtime: false,
orient: "horizontal",
textStyle: {
color: "#fff",
},
calculable: true,
},
series: [
{
name: "长沙",
type: "map",
map: "changsha",
hoverAnimation: true,
label: {
show: true,
color: "white",
},
itemStyle: {
normal: {
areaColor: "#02215E",
borderColor: "#1773c3",
},
},
emphasis: {
areaColor: "#FFD700", //
borderColor: "#FF0000", //
borderWidth: 4 //
},
data: []
}
],
})
const option1 = ref({
xAxis: {
type: "category",
boundaryGap: true,
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月',],
axisLabel: {
interval: 0,
},
axisTick: {
show: false // x
}
},
yAxis: {
type: "value",
splitLine: {
show: true,
lineStyle: {
color: "#193775",
},
},
axisLabel: {
margin: 20,
},
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
label: {
backgroundColor: '#6a7985'
}
}
},
series: [
{
type: "line",
smooth: true,
label: {
show: false
},
lineStyle: {
color: "#FFDB31",
width: 4,
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(255,218,51,0.25)", //
},
{
offset: 1,
color: "rgba(255,219,49,0)", //
},
]),
},
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], //
},
],
grid: {left: '0%', right: '0%', top: '5%', bottom: '0%', containLabel: true},
})
const option2 = ref({
xAxis: {
type: "category",
boundaryGap: true,
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月',],
axisTick: {
show: false // x
},
axisLabel: {
interval: 0,
},
},
yAxis: {
type: "value",
splitLine: {
show: true,
lineStyle: {
color: "#193775",
},
},
axisLabel: {
margin: 20,
},
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
label: {
backgroundColor: '#6a7985'
}
}
},
series: [
{
type: "line",
smooth: true,
label: {
show: false
},
lineStyle: {
color: "#6FDBA0",
width: 4,
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(109, 221, 159, 0.47)'
}, {offset: 1, color: 'rgba(109, 221, 159, 0)'}])
},
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], //
},
],
grid: {left: '5%', right: '5%', top: '10%', bottom: '20%', containLabel: true},
})
const option3 = ref({
tooltip: {},
legend: {
data: ['本期', '上一期', '去年同期'],
textStyle: {
color: '#fff',
},
},
xAxis: {
type: 'category',
data: [],
axisLabel: {
interval: 0, //
fontSize: 5,
color: '#fff',
},
},
yAxis: {
type: 'value',
axisLabel: {
margin: 10,
},
splitLine: {
show: true, lineStyle: {
color: ['#193775'], // x线
width: 1, // 线
type: 'solid' // 线 'solid', 'dashed', 'dotted'
}
}
},
series: [
{
name: '本期',
type: 'bar',
data: [],
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(40,230,255,0.63)'
}, {offset: 1, color: 'rgba(40,230,255,0)'}])
},
},
{
name: '上一期',
type: 'bar',
data: [],
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[{offset: 0, color: 'rgba(255,218,51,0.52)'},
{offset: 1, color: 'rgba(255,219,49,0)'}])
}
},
{
name: '去年同期',
type: 'line',
data: [],
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#6FDBA0'
}, {offset: 1, color: '#6FDBA0'}])
}
}
],
grid: {left: '8%', right: '0%', top: '10%', bottom: '10%'},
});
// region
onMounted(async () => {
//
const resYears = await GetMyPeriod();
years.value = resYears.map(item => ({
ID: item.ID,
PeriodName: item.PeriodName
}));
if (years.value.length > 0) {
selectYear.value = years.value[0].ID; //
console.log("第一个年份" + selectYear.value)
}
//
const resMonths = await GetCustomOffLineSonPeriodSet();
tempMonths.value = resMonths.map(item => ({
ID: item.ID,
SonPeriodName: item.SonPeriodName,
PeriodID: item.PeriodID,
}));
// value -1
if (tempMonths.value.length > 0) {
const temp = years.value.filter(item => item.ID === selectYear.value)
if (temp.length > 0 && temp[0].PeriodName.includes("半")) {
months.value = tempMonths.value.filter(item => item.PeriodID === selectYear.value);
months.value.unshift({SonPeriodName: '半年度', ID: '-1'});
} else {
months.value = tempMonths.value.filter(item => item.PeriodID === selectYear.value);
months.value.unshift({SonPeriodName: '全年', ID: '-1'});
}
selectMonth.value = months.value[0].ID;
}
//
const resOrgs = await qx_get();
org.value = resOrgs;
if (org.value.length > 0) {
selectOrg.value = org.value[0].id;
console.log(selectOrg.value);
}
const resTasks = await GetOffLineStatisticsSetList(selectOrg.value);
content.value = resTasks;
if (content.value.length > 0) {
console.log(content.value[0]);
task.value = content.value[0].ID;
}
//
await getData();
});
async function getData() {
//
GetDCQK(selectYear.value, selectMonth.value, selectOrg.value, task.value).then((res) => {
reviewOk.value = res
});
//
GetGLFW(selectYear.value, selectOrg.value, task.value).then((res) => {
dcmyd.value = res
option1.value.xAxis.data = dcmyd.value[0].lstson.slice(-6).map(item => item.SonPeriodName);
option1.value.series[0].data = dcmyd.value[0].lstson.slice(-6).map(item => item.FinalRP);
});
//
GetZRSJXF(selectYear.value, selectMonth.value, selectOrg.value, task.value).then((res) => {
let temp = res.lstShen
temp = temp.filter(item => item.Name !== null);
tableData.value = temp
});
console.log('selectOrg', selectOrg.value)
//
GetZHMYLPM(selectYear.value, selectMonth.value, selectOrg.value, task.value, selectOrg.value === '4301' ? 1 : 2).then((res) => {
tableData1.value = res[0].lstCity
let temp = res[0].lstSheng;
//
const group2 = temp.filter(item => item.SetName === "(省)县市考评");
const group3 = temp.filter(item => item.SetName === "(省)区");
tableData2.value = group2
tableData3.value = group3
});
//
GetBMYYBQS(selectYear.value, selectOrg.value, task.value).then((res) => {
bmyybqs.value = res;
option2.value.xAxis.data = bmyybqs.value.map(item => item.SonPeriodName);
option2.value.series[0].data = bmyybqs.value.map(item => item.QACount);
});
//
GetDXFX(selectYear.value, selectMonth.value, selectOrg.value, task.value).then((res) => {
dxfx.value = res;
option3.value.xAxis.data = dxfx.value[0].lstson.map(item => item.MasterName);
option3.value.series[0].data = dxfx.value[0].lstson.map(item => item.FinalRP); //
option3.value.series[1].data = dxfx.value[1].lstson.map(item => item.FinalRP); //
option3.value.series[2].data = dxfx.value[2].lstson.map(item => item.FinalRP); //
});
//
GetRCSQQK(selectYear.value, selectMonth.value, selectOrg.value, task.value).then((res) => {
let text = res
text = text.filter(item => item.Name !== null)
tableData4.value = text
});
//
GetDITU(selectYear.value).then((res) => {
tempMap.value = res
mapDataList.value = tempMap.value.map(org => {
return {name: org.OrganizeName, value: org.OrganizeID};
})
option.value.series.data = mapDataList.value
});
}
// endregion
// region
// endregion
// region
const fontSize = ref(11)
const headerCellStyle = ref({
fontSize: '11px', /* 设置表头字体大小 */
color: '#24D2EE', /* 设置表头字体颜色 */
backgroundColor: '#04144E', /* 设置表头背景颜色 */
height: '0px', /* 设置表头高度 */
padding: '0 0 0 0', /* 设置表头内边距 */
lineHeight: '0px',
});
const tableRowStyle = (row) => {
return {
backgroundColor: '#04144E',
color: "#FFFFFF",
height: '40px',
};
};
const tableRowStyleTableData1 = (row) => {
return {
backgroundColor: '#04144E',
color: "#FFFFFF",
height: '50px',
};
};
const tableRowStyleTableData2 = () => {
return {
backgroundColor: '#04144E',
color: "#FFFFFF",
height: '50px',
};
}
//
const summaryCellStyle = () => {
return {
backgroundColor: '#04144E',
color: "#FFFFFF"
};
};
//
const getSummaries = (param) => {
const {columns, data} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
// 2 便
sums[index] = Number.isInteger(sums[index]) ? sums[index] : sums[index].toFixed(2);
} else {
sums[index] = 'N/A';
}
});
return sums;
};
const getCellStyle = (smyltb) => {
if (smyltb > 0) {
return {color: 'green'};
} else {
return {color: 'red'};
}
}
// endregion
</script>
<style lang="scss" scoped>
@import "@/style/datav.scss";
:deep() {
.el-table__footer-wrapper tfoot td.el-table__cell {
background-color: #09256D;
}
.el-scrollbar__wrap--hidden-default {
background-color: #03154D;
}
.el-table .cell {
padding: 0;
text-align: center;
}
.el-table .el-table__row:hover {
//background-color: transparent !important;
}
.el-table {
--el-table-row-hover-bg-color: transparent;
--el-table-border-color: #193775;
}
.el-select__wrapper {
background-color: #1C3472;
//border: 0px solid ;
}
.el-select__placeholder {
font-weight: 400;
font-size: 14px;
color: #FFFFFF;
}
.el-select.is-focus {
border-color: red; /* 去掉高亮时的边框颜色 */
box-shadow: none; /* 去掉高亮时的阴影 */
}
}
.dropdown-container {
position: absolute;
right: 30px;
top: 65px;
}
.datav-tab-item {
display: flex;
justify-content: center;
align-items: center;
}
.descriptions_content {
font-size: 18px;
font-weight: 700;
}
.margin-top-30 {
margin-top: 30px;
}
.height-118 {
height: 118px;
}
.custom-footer-row {
background-color: #FB3131;
font-weight: bold;
color: #333;
}
.custom-footer-cell {
text-align: center;
padding: 10px;
}
h3 span {
float: right;
}
h3 {
line-height: 50px;
margin-top: 10px;
margin-bottom: 0px;
}
.yellow {
color: #ffd04b;
}
</style>

2
src/views/datav/RightsComfort.vue

@ -521,7 +521,7 @@ const option = ref({
<li>受侵害人数 <span>${dataItem.victimNumber}</span></li>
<li>抚慰人数 <span>${dataItem.comfortPersonNumber}</span></li>
<li>打击处理人数 <span>${dataItem.hitPersonNumber}</span></li>
<li>抚慰金额 <span>${dataItem.comfortMoney}</span></li>
<li>抚慰金额 <span>${dataItem.comfortMoney|| '-'}</span></li>
</ul>
</div>
</div>`;

21
src/views/work/Confinement.vue

@ -66,27 +66,6 @@ const rules = ref({
trigger: ['blur'],
}
],
joinPartyTime: [
{
required: true,
message: '请输入入党(团)时间',
trigger: ['blur'],
}
],
joinWorkTime: [
{
required: true,
message: '请输入参加工作时间',
trigger: ['blur'],
}
],
joinPoliceTime: [
{
required: true,
message: '请输入参加公安工作时间',
trigger: ['blur'],
}
],
education: [
{
required: true,

Loading…
Cancel
Save