diff --git a/src/api/outrequest.ts b/src/api/outrequest.ts new file mode 100644 index 0000000..1b6262a --- /dev/null +++ b/src/api/outrequest.ts @@ -0,0 +1,114 @@ + +import { getToken, deleteToken } from '@/utils/token' +import feedback from '@/utils/feedback' + + +export const BASE_PATH = '' + +type Options = { + url: string, + method?: 'GET' | 'POST' | 'PUT' | 'DELETE', + headers?: Record, + query?: Record, + params?: Record, + body?: string | FormData | Record, + showErrorMsg: bool +}; + +function get(options: Options) { + options.method = 'GET'; + return ajax(options.url, options) +} + +function post(options: Options) { + options.method = 'POST'; + return ajax(options.url, options) +} + +function put(options: Options) { + options.method = 'PUT'; + return ajax(options.url, options) +} + +function del(options: Options) { + options.method = 'DELETE'; + return ajax(options.url, options) +} + +let isRelogin = false; +function ajax(url: string, options: Options) { + const headers: Record = { + + "Authorization": getToken() + }; + let body: string | FormData; + if (options?.params && Object.keys(options.params).length > 0) { + if (options.method === 'GET') { + options.query = options.params; + } else { + body = JSON.stringify(options.params); + } + } + if (options?.query) { + // 解决 query 的值为 undefined 的情况 + if (options.query instanceof Object) { + const params = {} + for (let k of Object.keys(options.query)) { + if (options.query[k] === undefined || options.query[k] === null) { + continue; + } + params[k] = options.query[k] + } + url += (url.indexOf('?') > -1 ? '&' : '?') + new URLSearchParams(params).toString(); + } else { + url += (url.indexOf('?') > -1 ? '&' : '?') + new URLSearchParams(options.query).toString(); + } + } + if (options?.body) { + if (options.body instanceof FormData) { + body = options.body; + } else { + headers["Content-Type"] = "application/json" + if (options.body instanceof String) { + body = options.body; + } + if (options.body instanceof Array || (options.body instanceof Object && Object.keys(options.body).length > 0)) { + body = JSON.stringify(options.body); + } + } + } + return new Promise((resolve, reject) => { + fetch(`${BASE_PATH}${url}`, { + method: options.method, + body: body, + headers: { ...headers, ...options.headers } + }).then(response => { + if (response.status === 413) { + return; + } + return response.json(); + }).then(res => { + if (res.code === 200 || res.httpStatusCode===0) { + resolve(res.data) + } else { + let message = res.message; + if (res.code === 401) { + deleteToken() + location.href = '/' + } + feedback.msgError(message) + reject(res) + } + + }) + }) +} + +const outrequest = { + get, + post, + put, + del +} + +export default outrequest; \ No newline at end of file diff --git a/src/api/request.ts b/src/api/request.ts index 4540cb6..4bbaeff 100644 --- a/src/api/request.ts +++ b/src/api/request.ts @@ -88,7 +88,7 @@ function ajax(url: string, options: Options) { } return response.json(); }).then(res => { - if (res.code === 200) { + if (res.code === 200 || res.httpStatusCode===0) { resolve(res.data) } else { let message = res.message; diff --git a/src/api/screen/jwpy.ts b/src/api/screen/jwpy.ts index e69de29..ab97d2f 100644 --- a/src/api/screen/jwpy.ts +++ b/src/api/screen/jwpy.ts @@ -0,0 +1,99 @@ +import outrequest from "../outrequest"; + + +export function GetDCQK() { + let formData = new FormData(); + formData.append("PeriodId", 6); + formData.append("PeriodSonID", -1); + formData.append("OrgNo", 4301); + formData.append("TaskID", 2); + return outrequest.post({ + url: `/out-police-service/api/DSJ/GetDCQK`, + body: formData + }); +} + +export function GetBMYYBQS() { + let formData = new FormData(); + formData.append("PeriodId", 6); + formData.append("PeriodSonID", -1); + formData.append("OrgNo", 4301); + formData.append("TaskID", 2); + return outrequest.post({ + url: `/out-police-service/api/DSJ/GetBMYYBQS`, + body: formData + }); +} + +export function GetZHMYLPM() { + let formData = new FormData(); + formData.append("PeriodId", 6); + formData.append("PeriodSonID", -1); + formData.append("OrgNo", 4301); + formData.append("TaskID", 2); + return outrequest.post({ + url: `/out-police-service/api/DSJ/GetZHMYLPM`, + body: formData + }); +} + +export function GetRCSQQK() { + let formData = new FormData(); + formData.append("PeriodId", 6); + formData.append("PeriodSonID", -1); + formData.append("OrgNo", 4301); + formData.append("TaskID", 2); + return outrequest.post({ + url: `/out-police-service/api/DSJ/GetRCSQQK`, + body: formData + }); +} + +export function GetDXFX() { + let formData = new FormData(); + formData.append("PeriodId", 6); + formData.append("PeriodSonID", -1); + formData.append("OrgNo", 4301); + formData.append("TaskID", 2); + return outrequest.post({ + url: `/out-police-service/api/DSJ/GetDXFX`, + body: formData + }); +} + +export function GetZRSJXF() { + let formData = new FormData(); + formData.append("PeriodId", 6); + formData.append("PeriodSonID", -1); + formData.append("OrgNo", 4301); + formData.append("TaskID", 2); + return outrequest.post({ + url: `/out-police-service/api/DSJ/GetZRSJXF`, + body: formData + }); +} + +export function GetGLFW() { + let formData = new FormData(); + formData.append("PeriodId", 6); + formData.append("PeriodSonID", -1); + formData.append("OrgNo", 4301); + formData.append("TaskID", 2); + return outrequest.post({ + url: `/out-police-service/api/DSJ/GetGLFW`, + body: formData + }); +} + + +export function GetDITU() { + let formData = new FormData(); + formData.append("PeriodId", 6); + formData.append("PeriodSonID", -1); + formData.append("OrgNo", 4301); + formData.append("TaskID", 2); + return outrequest.post({ + url: `/out-police-service/api/DSJ/GetDITU`, + body: formData + }); +} diff --git a/src/views/datav/Gobal.vue b/src/views/datav/Gobal.vue index d0f6148..7677af2 100644 --- a/src/views/datav/Gobal.vue +++ b/src/views/datav/Gobal.vue @@ -155,7 +155,7 @@ const ywzblist = ref([]); // 业务类型占比 const wtlxlist = ref([]); // 问题类型占比 const tcwtlist = ref([]); // 突出问题排名 const mapData = ref([]); // 地图数据 -let gobalTempMapVoList = [ +let gobalTempMapVoList = ref([ { "name": "天心分局", "totalPro": 11, @@ -165,106 +165,11 @@ let gobalTempMapVoList = [ "policePro": 11, "reviewPro": 11 } -]; // 地图临时测试数据 +]); // 地图临时测试数据 // endregion const router = useRouter(); -// region 地图相关 -echarts.registerMap("changsha", changshaMap); -const option = ref({ - geo: { - map: "changsha", - }, - tooltip: { - trigger: 'item', - formatter: function (params) { - console.log(params) - const dataItem = gobalTempMapVoList.find(item => item.name.includes(params.name.substring(0, 2))); - if (dataItem) { - return ` -
-
${dataItem.name}
-
-
    -
  • 问题总数 ${dataItem.totalPro}
  • -
  • 督察问题 ${dataItem.supervisePro}
  • -
  • 案件核查问题 ${dataItem.caseVerifyPro}
  • -
  • 信访投诉问题 ${dataItem.mailPro}
  • -
  • 民意感知问题 ${dataItem.policePro}
  • -
-
-
`; - } else { - return `
-
${dataItem.name}
-
-
    -
  • 问题总数 0
  • -
  • 督察问题 0
  • -
  • 案件核查问题 0
  • -
  • 信访投诉问题 0
  • -
  • 民意感知问题 0
  • -
-
-
`; - } - }, - // backgroundColor: "#031577", // - // borderColor: "#0A2F86", - // borderWidth: 0, // 设置边框宽度为1像素 - // borderRadius: 3, // 设置边框半径为3像素 - // shadowBlur: 0, // 设置阴影模糊程度为8像素 - // shadowOffsetX: 0, // 设置水平阴影位移量为0像素 - // shadowOffsetY: 0, // 设置垂直阴影位移量为6像素 - }, - visualMap: { - type: "piecewise", - bottom: 10, - pieces: [ - { min: 0, max: 500, label: "问题数低于500" }, { min: 501, max: 1000, label: "问题数介于500-1000" }, { min: 1001, label: "问题数高于1000" }, - ], - right: 10, - realtime: false, - orient: "horizontal", - textStyle: { - color: "#fff", - }, - calculable: true, - inRange: { - color: ["#4987F6", "#F6A149", "#D34343",], - }, - }, - 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: gobalTempMapVoList.map(item => ({ - name: item.name, - value: item.totalPro // 将 totalPro 值映射到 value 字段 - })) - } - ], -}) - -// endregion // region问题趋势线状图 @@ -410,7 +315,7 @@ function getData() { }); getAllGobalCount(time.value).then((res) => { overview.value = res.overview; - gobalTempMapVoList = res.gobalTempMapVoList; + gobalTempMapVoList.value = res.gobalTempMapVoList; }); getGobalRecentlyTrendByMonth(new Date().getFullYear()).then((res) => { proTrend.value.xAxis.data = res.monthList; @@ -430,6 +335,7 @@ onMounted(() => { watch(time, () => { getData(); }); +// endregion const colors = [ { @@ -447,6 +353,98 @@ const colors = [ ]; + +// region 地图相关 +echarts.registerMap("changsha", changshaMap); +const option = ref({ + geo: { + map: "changsha", + }, + tooltip: { + trigger: 'item', + formatter: function (params) { + // console.log(gobalTempMapVoList.value) + const dataItem = gobalTempMapVoList.value.find(item => item.name.includes(params.name.substring(0, 2))); + // console.log(dataItem.name) + if (dataItem) { + return ` +
+
${dataItem.name}
+
+
    +
  • 问题总数 ${dataItem.totalPro}
  • +
  • 督察问题 ${dataItem.supervisePro}
  • +
  • 案件核查问题 ${dataItem.caseVerifyPro}
  • +
  • 信访投诉问题 ${dataItem.mailPro}
  • +
  • 民意感知问题 ${dataItem.policePro}
  • +
+
+
`; + } else { + return `
+
${dataItem.name}
+
+
    +
  • 问题总数 0
  • +
  • 督察问题 0
  • +
  • 案件核查问题 0
  • +
  • 信访投诉问题 0
  • +
  • 民意感知问题 0
  • +
+
+
`; + } + }, + }, + visualMap: { + 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: gobalTempMapVoList.value.map(item => { + const data = { + name: item.name, + value: item.totalPro, + }; + console.log(item.totalPro); // 打印每个数据项 + return data; + }) + } + ], +}) // endregion diff --git a/src/views/datav/Jwpy.vue b/src/views/datav/Jwpy.vue index afe3c63..75413be 100644 --- a/src/views/datav/Jwpy.vue +++ b/src/views/datav/Jwpy.vue @@ -66,7 +66,7 @@
- {{ reviewOk.bmys }} + {{ dcmyd.length > 0 && dcmyd[2] && dcmyd[2].FinalRP !== undefined ? dcmyd[2].FinalRP : '0' }}
上期满意度 @@ -74,7 +74,7 @@
- {{ reviewOk.bmys }} + {{ dcmyd.length > 0 && dcmyd[0] && dcmyd[0].FinalRP !== undefined ? dcmyd[0].FinalRP : '0' }}
当前调查满意度 @@ -88,7 +88,6 @@ :option="option1" autoresize /> -
@@ -103,15 +102,19 @@ :style="{ width: '100%', marginTop: '20px', fontSize: fontSize + 'px' }" :header-cell-style="headerCellStyle" :row-style="tableRowStyle" - :show-summary='true' + :highlight-current-row="false" > - - - - - - + + + + + + + +
@@ -137,10 +140,70 @@ - Header - Main + +
+ + + + + + + +
+
+ +
+ + + + + + + +
+
- Aside + + +
+ + + + + + + +
+
@@ -165,7 +228,25 @@ /> - +
+

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

+ + + + + + +
@@ -180,8 +261,30 @@ import vCharts from "vue-echarts"; import changshaMap from "@/assets/data/changsha.json"; import * as echarts from "echarts/core"; -import {getMailVisitsData, getRecentlyMailTrend, getRecentlyMailTrend12337} from "@/api/datav"; -import moment from "moment/moment.js"; +import {GetBMYYBQS, GetDCQK, GetDITU, GetDXFX, GetGLFW, GetRCSQQK, GetZHMYLPM, GetZRSJXF} from "@/api/screen/jwpy.ts"; + + +// region 左边 +// 调查情况 +const reviewOk = ref({ + LevelType: "湖南", + State2: 164279, + State3: 104659, + bmys: "1615", + dczl: 392902, + jtl: "68.45%", + yxhf: "104659", + yxl: "38.92%" +}); +// 调查滿意度 +const dcmyd = ref([]); +// endregion + +// region 右边 +const bmyybqs = ref([]); +const dxfx = ref([]); +// endregion + echarts.registerMap("changsha", changshaMap); let mapDataList = reactive([ @@ -271,21 +374,12 @@ const option = { data: mapDataList, }, ], - }; -const option1 = { +const option1 = ref({ xAxis: { type: "category", boundaryGap: false, - data: [ - "9/10", - "9/11", - "9/12", - "9/13", - "9/13", - "9/13", - - ], + data: [], }, yAxis: { type: "value", @@ -328,19 +422,12 @@ const option1 = { }, ]), }, - data: [ - 100, - 25, - 50, - 70, - 10, - 10, - ], + data: [], }, ], grid: {left: '10%', right: '10%', top: '10%', bottom: '20%', containLabel: true}, -} -const option2 = { +}) +const option2 = ref({ xAxis: { type: "category", boundaryGap: false, @@ -402,46 +489,1129 @@ const option2 = { }, ], grid: {left: '10%', right: '10%', top: '10%', bottom: '20%', containLabel: true}, -} -const option3 = { - title: {text: '柱状图示例'}, +}) +const option3 = ref({ tooltip: {}, - legend: {data: ['销量']}, + legend: { + data: ['本期', '上一期', '去年同期'], + textStyle: { + color: '#fff', + }, + }, grid: { left: '10%', right: '10%', top: '10%', bottom: '10%' }, - xAxis: {type: 'category', data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']}, - yAxis: {type: 'value'}, - series: [{ - name: '销量', - type: 'bar', - data: [5, 20, 36, 10, 10, 20], - itemStyle: { - 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)'}]) + xAxis: { + type: 'category', + data: [] + }, + yAxis: { + type: 'value' + }, + 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'}]) + } } - }] -}; + ] + +}); + + +// region 表格数据 +const tableData = ref([]) +const tableData1 = ref([]) +const tableData2 = ref([]) +const tableData3 = ref([]) +const tableData4 = ref([]) +// endregion + + +onMounted(() => { + getData(); +}); + +function getData() { + GetDCQK().then((res) => { + reviewOk.value = res + }); + GetGLFW().then((res) => { + dcmyd.value = res.lstson + option1.value.xAxis.data = dcmyd.value[0].lstson.map(item => item.SonPeriodName); + option1.value.series[0].data = dcmyd.value[0].lstson.map(item => item.FinalRP); + }); + GetZRSJXF().then((res) => { + let tempTable = res.lstShen + tempTable = tempTable.filter(item => item.Name !== null) + tableData.value = tempTable; + }); + // 综合满意度排名 + GetZHMYLPM().then((res) => { + tableData1.value = res.lstCity + let temp = res.lstSheng; + const group2 = temp.filter(item => item.SetName === "(省)县市考评"); + const group3 = temp.filter(item => item.SetName === "(省)区"); + tableData2.value = group2 + tableData3.value = group3 + }); + + // 不满意样本趋势 + GetBMYYBQS().then((res) => { + bmyybqs.value = res + }); + + // 单项分析 + GetDXFX().then((res) => { + dxfx.value = res.lstson + }); + + // GetRCSQQK().then((res) => { }); + + // GetZRSJXF().then((res) => { }); + // GetDITU().then((res) => { }); +} + + +setTimeout(() => { + reviewOk.value = { + LevelType: "省", + dczl: 1410919, + jtl: "67.84%", + yxhf: "490980", + yxl: "51.3%", + mys: "462939", + jbmys: "21688", + bmys: "6353", + State2: 466175, + State3: 490980 + } + + // 调查满意度 + dcmyd.value = [ + { + Bak: "满意度", + FinalRP: 95.3, + lstson: [ + { + "State3": 43486, + "FinalRP": 94.37, + "PeriodSonID": "37", + "SonSerialNo": 1, + "SonPeriodName": "1月" + }, + { + "State3": 28974, + "FinalRP": 94.12, + "PeriodSonID": "38", + "SonSerialNo": 2, + "SonPeriodName": "2月" + }, + { + "State3": 36326, + "FinalRP": 94.68, + "PeriodSonID": "39", + "SonSerialNo": 3, + "SonPeriodName": "3月" + }, + { + "State3": 47753, + "FinalRP": 96.11, + "PeriodSonID": "40", + "SonSerialNo": 4, + "SonPeriodName": "4月" + }, + { + "State3": 55153, + "FinalRP": 95.89, + "PeriodSonID": "41", + "SonSerialNo": 5, + "SonPeriodName": "5月" + }, + { + "State3": 50433, + "FinalRP": 95.29, + "PeriodSonID": "42", + "SonSerialNo": 6, + "SonPeriodName": "6月" + }, + { + "State3": 63952, + "FinalRP": 95.77, + "PeriodSonID": "43", + "SonSerialNo": 7, + "SonPeriodName": "7月" + }, + { + "State3": 53520, + "FinalRP": 94.94, + "PeriodSonID": "44", + "SonSerialNo": 8, + "SonPeriodName": "8月" + }, + { + "State3": 48500, + "FinalRP": 95.81, + "PeriodSonID": "45", + "SonSerialNo": 9, + "SonPeriodName": "9月" + }, + { + "State3": 45397, + "FinalRP": 95.64, + "PeriodSonID": "46", + "SonSerialNo": 10, + "SonPeriodName": "10月" + }, + { + "State3": 17486, + "FinalRP": 95.77, + "PeriodSonID": "47", + "SonSerialNo": 11, + "SonPeriodName": "11月" + }, + { + "State3": 0, + "FinalRP": 0, + "PeriodSonID": "48", + "SonSerialNo": 12, + "SonPeriodName": "12月" + } + ] + }, + { + "Bak": "去年同期", + "FinalRP": 97.23, + "lstson": [ + { + "State3": 43486, + "FinalRP": 96.46, + "PeriodSonID": "37", + "SonSerialNo": 1, + "SonPeriodName": "1月" + }, + { + "State3": 28974, + "FinalRP": 97.27, + "PeriodSonID": "38", + "SonSerialNo": 2, + "SonPeriodName": "2月" + }, + { + "State3": 36326, + "FinalRP": 97.15, + "PeriodSonID": "39", + "SonSerialNo": 3, + "SonPeriodName": "3月" + }, + { + "State3": 47753, + "FinalRP": 97.26, + "PeriodSonID": "40", + "SonSerialNo": 4, + "SonPeriodName": "4月" + }, + { + "State3": 55153, + "FinalRP": 97.18, + "PeriodSonID": "41", + "SonSerialNo": 5, + "SonPeriodName": "5月" + }, + { + "State3": 50433, + "FinalRP": 97.4, + "PeriodSonID": "42", + "SonSerialNo": 6, + "SonPeriodName": "6月" + }, + { + "State3": 63952, + "FinalRP": 97.07, + "PeriodSonID": "43", + "SonSerialNo": 7, + "SonPeriodName": "7月" + }, + { + "State3": 53520, + "FinalRP": 97.19, + "PeriodSonID": "44", + "SonSerialNo": 8, + "SonPeriodName": "8月" + }, + { + "State3": 48500, + "FinalRP": 97.36, + "PeriodSonID": "45", + "SonSerialNo": 9, + "SonPeriodName": "9月" + }, + { + "State3": 45397, + "FinalRP": 97.2, + "PeriodSonID": "46", + "SonSerialNo": 10, + "SonPeriodName": "10月" + }, + { + "State3": 17486, + "FinalRP": 97.49, + "PeriodSonID": "47", + "SonSerialNo": 11, + "SonPeriodName": "11月" + }, + { + "State3": 0, + "FinalRP": 97.83, + "PeriodSonID": "48", + "SonSerialNo": 12, + "SonPeriodName": "12月" + } + ] + }, + { + Bak: "上一期", + FinalRP: 0, + lstson: [ + { + "State3": 43486, + "FinalRP": 0, + "PeriodSonID": "37", + "SonSerialNo": 1, + "SonPeriodName": "1月" + }, + { + "State3": 28974, + "FinalRP": 94.37, + "PeriodSonID": "38", + "SonSerialNo": 2, + "SonPeriodName": "2月" + }, + { + "State3": 36326, + "FinalRP": 94.12, + "PeriodSonID": "39", + "SonSerialNo": 3, + "SonPeriodName": "3月" + }, + { + "State3": 47753, + "FinalRP": 94.68, + "PeriodSonID": "40", + "SonSerialNo": 4, + "SonPeriodName": "4月" + }, + { + "State3": 55153, + "FinalRP": 96.11, + "PeriodSonID": "41", + "SonSerialNo": 5, + "SonPeriodName": "5月" + }, + { + "State3": 50433, + "FinalRP": 95.89, + "PeriodSonID": "42", + "SonSerialNo": 6, + "SonPeriodName": "6月" + }, + { + "State3": 63952, + "FinalRP": 95.29, + "PeriodSonID": "43", + "SonSerialNo": 7, + "SonPeriodName": "7月" + }, + { + "State3": 53520, + "FinalRP": 95.77, + "PeriodSonID": "44", + "SonSerialNo": 8, + "SonPeriodName": "8月" + }, + { + "State3": 48500, + "FinalRP": 94.94, + "PeriodSonID": "45", + "SonSerialNo": 9, + "SonPeriodName": "9月" + }, + { + "State3": 45397, + "FinalRP": 95.81, + "PeriodSonID": "46", + "SonSerialNo": 10, + "SonPeriodName": "10月" + }, + { + "State3": 17486, + "FinalRP": 95.64, + "PeriodSonID": "47", + "SonSerialNo": 11, + "SonPeriodName": "11月" + }, + { + "State3": 0, + "FinalRP": 95.77, + "PeriodSonID": "48", + "SonSerialNo": 12, + "SonPeriodName": "12月" + } + ] + }] + option1.value.xAxis.data = dcmyd.value[0].lstson.map(item => item.SonPeriodName); + option1.value.series[0].data = dcmyd.value[0].lstson.map(item => item.FinalRP); + + // 不满意趋势 + bmyybqs.value = [ + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "37", + "SonSerialNo": 1, + "SonPeriodName": "1月", + "QACount": 956, + "State3": "43486" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "38", + "SonSerialNo": 2, + "SonPeriodName": "2月", + "QACount": 531, + "State3": "28974" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "39", + "SonSerialNo": 3, + "SonPeriodName": "3月", + "QACount": 692, + "State3": "36326" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "40", + "SonSerialNo": 4, + "SonPeriodName": "4月", + "QACount": 483, + "State3": "47753" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "41", + "SonSerialNo": 5, + "SonPeriodName": "5月", + "QACount": 606, + "State3": "55153" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "42", + "SonSerialNo": 6, + "SonPeriodName": "6月", + "QACount": 606, + "State3": "50433" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "43", + "SonSerialNo": 7, + "SonPeriodName": "7月", + "QACount": 650, + "State3": "63952" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "44", + "SonSerialNo": 8, + "SonPeriodName": "8月", + "QACount": 605, + "State3": "53520" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "45", + "SonSerialNo": 9, + "SonPeriodName": "9月", + "QACount": 511, + "State3": "48500" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "46", + "SonSerialNo": 10, + "SonPeriodName": "10月", + "QACount": 557, + "State3": "45397" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "47", + "SonSerialNo": 11, + "SonPeriodName": "11月", + "QACount": 156, + "State3": "17486" + }, + { + "PeriodID": "6", + "PeriodName": "2024年全年", + "PeriodSonID": "48", + "SonSerialNo": 12, + "SonPeriodName": "12月", + "QACount": 0, + "State3": "0" + } + ]; + option2.value.xAxis.data = bmyybqs.value.map(item => item.SonPeriodName); + option2.value.series[0].data = bmyybqs.value.map(item => item.QACount); + + // 单项分析 + dxfx.value = [ + { + "Bak": "本周期", + "lstson": [ + { + "MasterID": "33", + "MasterName": "省驾考(自动)", + "FinalRP": "9.9536" + }, + { + "MasterID": "35", + "MasterName": "省车辆上户(自动)", + "FinalRP": "9.9301" + }, + { + "MasterID": "36", + "MasterName": "省身份证办理(自动)", + "FinalRP": "9.9502" + }, + { + "MasterID": "37", + "MasterName": "省110接处警(自动)", + "FinalRP": "18.7852" + }, + { + "MasterID": "38", + "MasterName": "省122接处警(自动)", + "FinalRP": "14.4708" + }, + { + "MasterID": "92", + "MasterName": "省户政(自动)", + "FinalRP": "9.9580" + }, + { + "MasterID": "93", + "MasterName": "省案件当事人2020(自动)", + "FinalRP": "22.2535" + } + ] + }, + { + "Bak": "上一期", + "lstson": [ + { + "MasterID": "33", + "MasterName": "省驾考(自动)", + "FinalRP": "0.0000" + }, + { + "MasterID": "35", + "MasterName": "省车辆上户(自动)", + "FinalRP": "0.0000" + }, + { + "MasterID": "36", + "MasterName": "省身份证办理(自动)", + "FinalRP": "0.0000" + }, + { + "MasterID": "37", + "MasterName": "省110接处警(自动)", + "FinalRP": "0.0000" + }, + { + "MasterID": "38", + "MasterName": "省122接处警(自动)", + "FinalRP": "0.0000" + }, + { + "MasterID": "92", + "MasterName": "省户政(自动)", + "FinalRP": "0.0000" + }, + { + "MasterID": "93", + "MasterName": "省案件当事人2020(自动)", + "FinalRP": "0.0000" + } + ] + }, + { + "Bak": "去年同期", + "lstson": [ + { + "MasterID": "33", + "MasterName": "省驾考(自动)", + "FinalRP": "9.9366" + }, + { + "MasterID": "35", + "MasterName": "省车辆上户(自动)", + "FinalRP": "9.9212" + }, + { + "MasterID": "36", + "MasterName": "省身份证办理(自动)", + "FinalRP": "9.9483" + }, + { + "MasterID": "37", + "MasterName": "省110接处警(自动)", + "FinalRP": "19.3654" + }, + { + "MasterID": "38", + "MasterName": "省122接处警(自动)", + "FinalRP": "14.6298" + }, + { + "MasterID": "92", + "MasterName": "省户政(自动)", + "FinalRP": "9.9482" + }, + { + "MasterID": "93", + "MasterName": "省案件当事人2020(自动)", + "FinalRP": "23.4803" + } + ] + } + ]; + 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); + // 业务满意度 + let tempTable = [ + { + "MasterID": "37", + "Name": "110", + "MasterName": "省110接处警(自动)", + "zMasterID": null, + "zMasterName": null, + "zdcl": null, + "Allzdcl": null, + "zbmys": null, + "Allzbmys": null, + "Allyzh": null, + "yzh": null, + "Allwzh": null, + "wzh": null, + "sdcl": "108317", + "sbmys": "1308", + "smyl": "18.79", + "smyltb": "-0.58", + "State3": 35920, + "DissatisfiedNum": 1308, + "SatisfiedNum": 31117, + "BasicallySatisfiedNum": 3495 + }, + { + "MasterID": "38", + "Name": "122", + "MasterName": "省122接处警(自动)", + "zMasterID": null, + "zMasterName": null, + "zdcl": null, + "Allzdcl": null, + "zbmys": null, + "Allzbmys": null, + "Allyzh": null, + "yzh": null, + "Allwzh": null, + "wzh": null, + "sdcl": "520208", + "sbmys": "3425", + "smyl": "14.47", + "smyltb": "-0.16", + "State3": 188505, + "DissatisfiedNum": 3425, + "SatisfiedNum": 172181, + "BasicallySatisfiedNum": 12899 + }, + { + "MasterID": "93", + "Name": "案件", + "MasterName": "省案件当事人2020(自动)", + "zMasterID": null, + "zMasterName": null, + "zdcl": null, + "Allzdcl": null, + "zbmys": null, + "Allzbmys": null, + "Allyzh": null, + "yzh": null, + "Allwzh": null, + "wzh": null, + "sdcl": "46383", + "sbmys": "1044", + "smyl": "22.25", + "smyltb": "-1.23", + "State3": 14336, + "DissatisfiedNum": 1044, + "SatisfiedNum": 11168, + "BasicallySatisfiedNum": 2124 + }, + { + "MasterID": "35", + "Name": "车辆上户", + "MasterName": "省车辆上户(自动)", + "zMasterID": null, + "zMasterName": null, + "zdcl": null, + "Allzdcl": null, + "zbmys": null, + "Allzbmys": null, + "Allyzh": null, + "yzh": null, + "Allwzh": null, + "wzh": null, + "sdcl": "285177", + "sbmys": "261", + "smyl": "9.93", + "smyltb": "0.01", + "State3": 85379, + "DissatisfiedNum": 261, + "SatisfiedNum": 83776, + "BasicallySatisfiedNum": 1342 + }, + { + "MasterID": "33", + "Name": "驾考", + "MasterName": "省驾考(自动)", + "zMasterID": null, + "zMasterName": null, + "zdcl": null, + "Allzdcl": null, + "zbmys": null, + "Allzbmys": null, + "Allyzh": null, + "yzh": null, + "Allwzh": null, + "wzh": null, + "sdcl": "194532", + "sbmys": "141", + "smyl": "9.95", + "smyltb": "0.02", + "State3": 83910, + "DissatisfiedNum": 141, + "SatisfiedNum": 82775, + "BasicallySatisfiedNum": 994 + }, + { + "MasterID": "92", + "Name": "户口", + "MasterName": "省户政(自动)", + "zMasterID": null, + "zMasterName": null, + "zdcl": null, + "Allzdcl": null, + "zbmys": null, + "Allzbmys": null, + "Allyzh": null, + "yzh": null, + "Allwzh": null, + "wzh": null, + "sdcl": "119882", + "sbmys": "97", + "smyl": "9.96", + "smyltb": "0.01", + "State3": 38943, + "DissatisfiedNum": 97, + "SatisfiedNum": 38580, + "BasicallySatisfiedNum": 266 + }, + { + "MasterID": "36", + "Name": "身份证", + "MasterName": "省身份证办理(自动)", + "zMasterID": null, + "zMasterName": null, + "zdcl": null, + "Allzdcl": null, + "zbmys": null, + "Allzbmys": null, + "Allyzh": null, + "yzh": null, + "Allwzh": null, + "wzh": null, + "sdcl": "136420", + "sbmys": "77", + "smyl": "9.95", + "smyltb": "0.00", + "State3": 43987, + "DissatisfiedNum": 77, + "SatisfiedNum": 43342, + "BasicallySatisfiedNum": 568 + }, + { + "MasterID": "0", + "Name": null, + "MasterName": "(省)全市", + "zMasterID": null, + "zMasterName": null, + "zdcl": null, + "Allzdcl": null, + "zbmys": null, + "Allzbmys": null, + "Allyzh": null, + "yzh": null, + "Allwzh": null, + "wzh": null, + "sdcl": "1410919", + "sbmys": "6353", + "smyl": "95.30", + "smyltb": "-1.93", + "State3": 490980, + "DissatisfiedNum": 6353, + "SatisfiedNum": 462939, + "BasicallySatisfiedNum": 21688 + } + ] + tempTable = tempTable.filter(item => item.Name !== null) + tableData.value =tempTable + + let temp = [ + { + "OrganizeID": null, + "OrganizeName": "(省)县市考评", + "FinalRP": "满意度", + "TBRp": null, + "TBRpts": null, + "SetName": null, + "MydRanking": "排名", + "State3": 0 + }, + { + "OrganizeID": "430124", + "OrganizeName": "宁乡市公安局", + "FinalRP": "95.94", + "TBRp": "97.64", + "TBRpts": "-1.70", + "SetName": "(省)县市考评", + "MydRanking": "1", + "State3": 25511 + }, + { + "OrganizeID": "430112", + "OrganizeName": "望城分局", + "FinalRP": "95.54", + "TBRp": "97.55", + "TBRpts": "-2.01", + "SetName": "(省)县市考评", + "MydRanking": "2", + "State3": 22472 + }, + { + "OrganizeID": "430181", + "OrganizeName": "浏阳市公安局", + "FinalRP": "95.11", + "TBRp": "97.32", + "TBRpts": "-2.21", + "SetName": "(省)县市考评", + "MydRanking": "3", + "State3": 29790 + }, + { + "OrganizeID": "430121", + "OrganizeName": "长沙县公安局", + "FinalRP": "94.59", + "TBRp": "96.87", + "TBRpts": "-2.28", + "SetName": "(省)县市考评", + "MydRanking": "4", + "State3": 38369 + }, + { + "OrganizeID": null, + "OrganizeName": "(省)区", + "FinalRP": "满意度", + "TBRp": null, + "TBRpts": null, + "SetName": null, + "MydRanking": "排名", + "State3": 0 + }, + { + "OrganizeID": "430197", + "OrganizeName": "公共交通治安管理分局", + "FinalRP": "95.45", + "TBRp": "93.18", + "TBRpts": "2.27", + "SetName": "(省)区", + "MydRanking": "1", + "State3": 301 + }, + { + "OrganizeID": "430102", + "OrganizeName": "芙蓉分局", + "FinalRP": "94.64", + "TBRp": "97.31", + "TBRpts": "-2.67", + "SetName": "(省)区", + "MydRanking": "2", + "State3": 7543 + }, + { + "OrganizeID": "430199", + "OrganizeName": "高新区分局", + "FinalRP": "94.35", + "TBRp": "97.10", + "TBRpts": "-2.75", + "SetName": "(省)区", + "MydRanking": "3", + "State3": 5267 + }, + { + "OrganizeID": "430105", + "OrganizeName": "开福分局", + "FinalRP": "94.15", + "TBRp": "97.05", + "TBRpts": "-2.90", + "SetName": "(省)区", + "MydRanking": "4", + "State3": 10019 + }, + { + "OrganizeID": "430103", + "OrganizeName": "天心分局", + "FinalRP": "93.93", + "TBRp": "97.55", + "TBRpts": "-3.62", + "SetName": "(省)区", + "MydRanking": "5", + "State3": 16279 + }, + { + "OrganizeID": "430111", + "OrganizeName": "雨花分局", + "FinalRP": "93.43", + "TBRp": "95.78", + "TBRpts": "-2.35", + "SetName": "(省)区", + "MydRanking": "6", + "State3": 20850 + }, + { + "OrganizeID": "430104", + "OrganizeName": "岳麓分局", + "FinalRP": "92.92", + "TBRp": "95.96", + "TBRpts": "-3.04", + "SetName": "(省)区", + "MydRanking": "7", + "State3": 27422 + }, + { + "OrganizeID": "430100", + "OrganizeName": "长沙市直属", + "FinalRP": "91.05", + "TBRp": "97.17", + "TBRpts": "-6.12", + "SetName": "(省)区", + "MydRanking": "8", + "State3": 674 + } + ] + const group2 = temp.filter(item => item.SetName === "(省)县市考评"); + const group3 = temp.filter(item => item.SetName === "(省)区"); + tableData1.value = [ + { + "OrganizeID": "4301", + "OrganizeName": "湖南省长沙市公安局", + "FinalRP": "95.30", + "TBRp": "97.23", + "TBRpts": "-1.93", + "SetName": "(省)全市", + "MydRanking": "1", + "State3": 490980 + } + ] + tableData2.value = group2 + tableData3.value = group3 + + let text = [ + { + "Name": "110", + "MasterID": "37", + "dxyw": null, + "sdcl": "108317", + "bmyzs": "1308", + "rcmzs": "0", + "tgs": "0", + "wsqs": "1347", + "LastDayVisitCount": 0, + "LastDayQACount": 3, + "State3": 35920 + }, + { + "Name": "122", + "MasterID": "38", + "dxyw": null, + "sdcl": "520208", + "bmyzs": "3425", + "rcmzs": "0", + "tgs": "0", + "wsqs": "3360", + "LastDayVisitCount": 0, + "LastDayQACount": 8, + "State3": 188505 + }, + { + "Name": "案件", + "MasterID": "93", + "dxyw": null, + "sdcl": "46383", + "bmyzs": "1044", + "rcmzs": "0", + "tgs": "0", + "wsqs": "1000", + "LastDayVisitCount": 0, + "LastDayQACount": 3, + "State3": 14336 + }, + { + "Name": "车辆上户", + "MasterID": "35", + "dxyw": null, + "sdcl": "285177", + "bmyzs": "261", + "rcmzs": "0", + "tgs": "0", + "wsqs": "243", + "LastDayVisitCount": 0, + "LastDayQACount": 0, + "State3": 85379 + }, + { + "Name": "驾考", + "MasterID": "33", + "dxyw": null, + "sdcl": "194532", + "bmyzs": "141", + "rcmzs": "0", + "tgs": "0", + "wsqs": "332", + "LastDayVisitCount": 0, + "LastDayQACount": 0, + "State3": 83910 + }, + { + "Name": "户口", + "MasterID": "92", + "dxyw": null, + "sdcl": "119882", + "bmyzs": "97", + "rcmzs": "0", + "tgs": "0", + "wsqs": "89", + "LastDayVisitCount": 0, + "LastDayQACount": 0, + "State3": 38943 + }, + { + "Name": "身份证", + "MasterID": "36", + "dxyw": null, + "sdcl": "136420", + "bmyzs": "77", + "rcmzs": "0", + "tgs": "0", + "wsqs": "76", + "LastDayVisitCount": 0, + "LastDayQACount": 0, + "State3": 43987 + }, + { + "Name": null, + "MasterID": "0", + "dxyw": null, + "sdcl": "1410919", + "bmyzs": "6353", + "rcmzs": "0", + "tgs": "0", + "wsqs": "6447", + "LastDayVisitCount": 0, + "LastDayQACount": 14, + "State3": 490980 + } + ] + text = text.filter(item => item.Name !== null) + + tableData4.value =text +}, 2000) + + + + +// region 表格样式 const fontSize = ref(11) const headerCellStyle = ref({ fontSize: '11px', /* 设置表头字体大小 */ color: '#24D2EE', /* 设置表头字体颜色 */ backgroundColor: '#04144E', /* 设置表头背景颜色 */ - height: '15px', /* 设置表头高度 */ + height: '60px', /* 设置表头高度 */ padding: '0 0 0 0', /* 设置表头内边距 */ + lineHeight: '60px', }); - const tableRowStyle = (row) => { return { backgroundColor: '#04144E', color: "#FFFFFF" }; }; - - // 自定义总合行样式 const summaryCellStyle = () => { return { @@ -449,8 +1619,6 @@ const summaryCellStyle = () => { color: "#FFFFFF" }; }; - - // 定义汇总方法 const getSummaries = (param) => { const {columns, data} = param; @@ -478,139 +1646,33 @@ const getSummaries = (param) => { return sums; }; - - -// region 调查情况 -const overview = ref({ - total: 0, - countryMail: 0, - policeMail: 0, - commissionerMail: 0, - numMail: 0, -}); - -const reviewOk = ref({ - State2: 164279, - State3: 104659, - bmys: "1615", - dczl: 392902, - jtl: "68.45%", - yxhf: "104659", - yxl: "38.92%" -}); -// endregion - -// region 调查滿意度 - +const calculateSatisfaction = (row) => { + const validCount = row.sdcl || 0 // 有效数 + const dissatisfiedCount = row.sbmys || 0 // 不满意数 + return validCount - dissatisfiedCount // 返回基本满意数 +} // endregion + -/** - * 初始化 - */ -let timer; -const time = ref([ - moment().startOf("year").format("YYYY-MM-DD"), - moment().format("YYYY-MM-DD"), -]); -const currentYear = new Date().getFullYear(); - -function initRecentlyMailTrend() { - getRecentlyMailTrend({ - sourcesCode: "1", - year: currentYear, - startTime: time.value[0], - endTime: time.value[1] - }).then((data) => { - // 更新图表的 xAxis 和 series 数据 - // option1.value.xAxis.data = data.monthList; - // option1.value.series[0].data = data.totalList; - }); -} - -watch(time, () => { - getData(); - // initRecentlyMailTrend() -}) -onMounted(() => { - getData(); - initRecentlyMailTrend(); + \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 61a81ff..ab4d056 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -28,7 +28,13 @@ export default ({ mode }) => { target: 'http://127.0.0.1:8080/', changeOrigin: true, rewrite: (p) => p.replace(/^\/api\/v2/, '') - } + }, + '/out-police-service/': { + target: 'http://127.0.0.1:8080/', + changeOrigin: true, + rewrite: (p) => p.replace(/^\/out-polic-service/, '') + }, + } }, plugins: [