diff --git a/src/api/rightsComfort/supervision.ts b/src/api/rightsComfort/supervision.ts new file mode 100644 index 0000000..d9d074c --- /dev/null +++ b/src/api/rightsComfort/supervision.ts @@ -0,0 +1,16 @@ +import request from "@/api/request"; + +//获取分页数据 +export function getListData(query){ + return request.get({ + url:'/rights/supervise', + query: query + }) +} + +//获取数据详情 +export function getDetail(id){ + return request.get({ + url:`/rights/supervise/${id}` + }) +} diff --git a/src/components/datav/card.vue b/src/components/datav/card.vue index e3a07aa..4697820 100644 --- a/src/components/datav/card.vue +++ b/src/components/datav/card.vue @@ -3,7 +3,7 @@
{{ title }}
-
{{ subTitle }}
+
{{ subTitle }}
@@ -19,8 +19,18 @@ defineProps({ subTitle: { type: String, default: "" + }, + titleClick:{ + type:Function, + default:function (){ + console.log("点击测试") + } } }); + + + + @@ -59,4 +69,4 @@ defineProps({ font-size: 14px; } } - \ No newline at end of file + diff --git a/src/components/datav/header.vue b/src/components/datav/header.vue index 309e1ca..f321cfe 100644 --- a/src/components/datav/header.vue +++ b/src/components/datav/header.vue @@ -7,7 +7,7 @@ - 现场督察 + 督导检查 @@ -110,4 +110,4 @@ header { text-decoration: none; } } - \ No newline at end of file + diff --git a/src/views/datav/Jwpy.vue b/src/views/datav/Jwpy.vue index 7cac599..cc62623 100644 --- a/src/views/datav/Jwpy.vue +++ b/src/views/datav/Jwpy.vue @@ -5,7 +5,7 @@
- + @@ -43,41 +43,41 @@ - -
- - - - - - - - - -
-
+ + + + + + + + + + + + + + + + + + + + + + +
- + @@ -87,23 +87,23 @@ - - - - - - - - + + + + + + + + + + + + + + + + +
@@ -684,7 +684,7 @@ const option3 = ref({ const option4 = ref({ tooltip: {}, legend: { - data: ['下发数', '查实数', '办结数'], + data: ['下发数', '查实数'], textStyle: { color: '#fff', }, @@ -745,22 +745,22 @@ const option4 = ref({ {offset: 1, color: 'rgba(255,219,49,0)'}]) } }, - { - name: '办结数', - type: 'bar', - data: [], - label: { - show: true, - position: 'right', - color:'#fff' - }, - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ - offset: 0, - color: '#6FDBA0' - }, {offset: 1, color: '#6FDBA0'}]) - } - } + // { + // name: '办结数', + // type: 'bar', + // data: [], + // label: { + // show: true, + // position: 'right', + // color:'#fff' + // }, + // itemStyle: { + // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + // offset: 0, + // color: '#6FDBA0' + // }, {offset: 1, color: '#6FDBA0'}]) + // } + // } ], grid: {left: '17%', right: '0%', top: '10%', bottom: '10%'}, }); @@ -858,8 +858,15 @@ async function getData() { // 返回数据数组是连着的 这里需要分组 const group2 = temp.filter(item => item.SetName === "(省)县市考评"); const group3 = temp.filter(item => item.SetName === "(省)区"); - tableData2.value = group2 - tableData3.value = group3 + let orgSortArray =[ + '芙蓉','天心','岳麓','开福','雨花','高新','望城','长沙县','浏阳','宁乡' + ] + + let groupData =temp.filter(item => item.SetName === "(省)县市考评" || item.SetName === "(省)区"); + groupData= filterAndSortObjectsByName(groupData,orgSortArray) + tableData2.value=groupData; + // tableData2.value = group2 + // tableData3.value = group3 console.log('综合满意度排名.value', tableData1.value) }); @@ -906,6 +913,35 @@ async function getData() { } + +/** + * 过滤并排序函数 + * @param objects 目标集合 + * @param keywords 关键字集合 + * */ +const filterAndSortObjectsByName = (objects, keywords) => { + // 过滤出包含关键字的名字的对象 + const filteredObjects = objects.filter(obj => { + return keywords.some(keyword => obj.OrganizeName.includes(keyword)); + }); + // 定义一个映射对象,用于存储关键字和对应的索引 + const keywordIndexMap = {}; + keywords.forEach((keyword, index) => { + keywordIndexMap[keyword] = index; + }); + // 自定义排序函数 + const sortFunction = (a, b) => { + const keywordA = keywords.find(keyword => a.OrganizeName.includes(keyword)); + const keywordB = keywords.find(keyword => b.OrganizeName.includes(keyword)); + if (!keywordA) return 1; + if (!keywordB) return -1; + return keywordIndexMap[keywordA] - keywordIndexMap[keywordB]; + }; + // 对过滤后的对象数组进行排序 + const sortedObjects = filteredObjects.sort(sortFunction); + return sortedObjects; +}; + // endregion // region 数据 diff --git a/src/views/datav/MailVisits.vue b/src/views/datav/MailVisits.vue index 283436e..256ffc6 100644 --- a/src/views/datav/MailVisits.vue +++ b/src/views/datav/MailVisits.vue @@ -1161,7 +1161,6 @@ function open(path) { color: #fff; } - diff --git a/src/views/datav/SceneInsp.vue b/src/views/datav/SceneInsp.vue index 8cad159..29ff442 100644 --- a/src/views/datav/SceneInsp.vue +++ b/src/views/datav/SceneInsp.vue @@ -5,7 +5,7 @@
- + - + + + + + +