From 4b5375f65d469193122411883792002647e8044d Mon Sep 17 00:00:00 2001 From: pengwei Date: Sat, 24 May 2025 16:47:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:1=E3=80=81=E5=A4=A7=E5=B1=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/datav.ts | 12 +- src/api/screen/jwpy.ts | 4 +- src/views/datav/Jwpy.vue | 471 ++++++++------ src/views/datav/Jwpy2.vue | 991 ++++++++++++++++++++++++++++++ src/views/datav/RightsComfort.vue | 2 +- src/views/work/Confinement.vue | 21 - 6 files changed, 1283 insertions(+), 218 deletions(-) create mode 100644 src/views/datav/Jwpy2.vue diff --git a/src/api/datav.ts b/src/api/datav.ts index d97c8ec..7265945 100644 --- a/src/api/datav.ts +++ b/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]}` @@ -59,4 +68,5 @@ export function getAuditProblems(time) { endTime: time[1] } }); -} \ No newline at end of file +} + diff --git a/src/api/screen/jwpy.ts b/src/api/screen/jwpy.ts index 8d8bd64..774b54d 100644 --- a/src/api/screen/jwpy.ts +++ b/src/api/screen/jwpy.ts @@ -1,4 +1,6 @@ import outrequest from "../outrequest"; +import request from "../request"; + export function GetDCQK(PeriodId, PeriodSonID, OrgNo, TaskID) { @@ -141,4 +143,4 @@ export function GetOffLineStatisticsSetList(orgCode) { url: `/out-police-service/api/Business/GetOffLineStatisticsSetList`, body: formData }); -} \ No newline at end of file +} diff --git a/src/views/datav/Jwpy.vue b/src/views/datav/Jwpy.vue index e0f3fef..8653f85 100644 --- a/src/views/datav/Jwpy.vue +++ b/src/views/datav/Jwpy.vue @@ -3,63 +3,11 @@
+ + + - - - -
-
- {{ reviewOk[0].dczl }} -
-
- 调查总量 -
-
-
- -
-
- {{ reviewOk[0].State3 }} -
-
- 有效回复 -
-
-
- -
-
- {{ reviewOk[0].mys }} -
-
- 满意 -
-
-
- -
-
- {{ reviewOk[0].jbmys }} -
-
- 基本满意 -
-
-
- -
-
- {{ reviewOk[0].bmys }} -
-
- 不满意数 -
-
-
-
- -
@@ -95,38 +43,90 @@ -
-

业务满意率

- - - - - - - - - - -
+ + + + +
+ + + + + + + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + +
+
+
+
+ + +
+ +

+ 统计周期: 年份{{yearValue}} 月份{{monthValue}} 单位{{orgValue}} {{taskValue}} +

+
+
- + + - + + + - + + + +
+ + + + + +
- +
- - - - -
- - - - - - - - - -
-
- -
- - - - - - - - - -
-
-
- - -
- - - - - - - - - -
-
-
-
-
-
- - - -
-
- -
- + + + + +
+ + + + + + + + + +
-

单项调查情况 昨日数据下发 -

- - - - - - - + +
+ +
+
+
@@ -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,30 +357,44 @@ 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')); if (chart) { chart.dispatchAction({type: 'highlight', name: targetName,}); } else { - + } console.log("年份" + selectYear.value + " 月份" + selectMonth.value + " 单位" + selectOrg.value + " task" + task.value) } catch (error) { @@ -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 @@ -893,7 +976,7 @@ const getCellStyle = (smyltb) => { } .el-table .cell { - padding: 0; + padding: 0; text-align: center; } @@ -979,4 +1062,4 @@ h3 { } - \ No newline at end of file + diff --git a/src/views/datav/Jwpy2.vue b/src/views/datav/Jwpy2.vue new file mode 100644 index 0000000..d3a9a83 --- /dev/null +++ b/src/views/datav/Jwpy2.vue @@ -0,0 +1,991 @@ + + + + + + + diff --git a/src/views/datav/RightsComfort.vue b/src/views/datav/RightsComfort.vue index 79106a9..c8f65ff 100644 --- a/src/views/datav/RightsComfort.vue +++ b/src/views/datav/RightsComfort.vue @@ -521,7 +521,7 @@ const option = ref({
  • 受侵害人数 ${dataItem.victimNumber}
  • 抚慰人数 ${dataItem.comfortPersonNumber}
  • 打击处理人数 ${dataItem.hitPersonNumber}
  • -
  • 抚慰金额 ${dataItem.comfortMoney}
  • +
  • 抚慰金额 ${dataItem.comfortMoney|| '-'}
  • `; diff --git a/src/views/work/Confinement.vue b/src/views/work/Confinement.vue index f0f9f12..8f26589 100644 --- a/src/views/work/Confinement.vue +++ b/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,