From ee79818c766d7665b0848851aed10b8eee766e96 Mon Sep 17 00:00:00 2001 From: haha Date: Sun, 16 Jun 2024 22:03:02 +0800 Subject: [PATCH] update code --- src/api/video/aiBoxVideo.js | 19 +- src/components/project-overview-chart.js | 27 +- src/components/project-overview-chart.vue | 5 +- src/pages/toAIVideoProject.vue | 1235 +++++---------------- vue.config.js | 4 +- 5 files changed, 341 insertions(+), 949 deletions(-) diff --git a/src/api/video/aiBoxVideo.js b/src/api/video/aiBoxVideo.js index a8f37cc..33389fe 100644 --- a/src/api/video/aiBoxVideo.js +++ b/src/api/video/aiBoxVideo.js @@ -7,6 +7,14 @@ const listView=(deptId,projectId)=> { }) } +const list=(data,pageNum,pageSize)=> { + return request({ + url: `/bgscreen/aiBoxVideo/list?pageNum=${pageNum}&pageSize=${pageSize}`, + data:data, + method: 'post' + }) +} + const getVideoPassage=(deptId,projectId,passageType,importance)=> { return request({ url: `/bgscreen/aiBoxVideo/getVideoPassage?deptId=${deptId||0}&projectId=${projectId||0}&passageType=${passageType}&importance=${importance}`, @@ -21,6 +29,13 @@ const groupCountByAlarmType=(deptId,projectId,now)=> { }) } +const groupCountByProject=(deptId,projectId)=> { + return request({ + url: `/bgscreen/aiBoxVideo/groupCountByProject?deptId=${deptId||0}&projectId=${projectId||0}`, + method: 'get' + }) +} + // 查询视频分布汇总 const selectGroupCountVideoConfig=(deptId,projectId)=> { return request({ @@ -31,8 +46,10 @@ const selectGroupCountVideoConfig=(deptId,projectId)=> { export default{ + list, listView, getVideoPassage, groupCountByAlarmType, - selectGroupCountVideoConfig + selectGroupCountVideoConfig, + groupCountByProject } \ No newline at end of file diff --git a/src/components/project-overview-chart.js b/src/components/project-overview-chart.js index 5559f0c..8ed17a2 100644 --- a/src/components/project-overview-chart.js +++ b/src/components/project-overview-chart.js @@ -2,7 +2,7 @@ import Vue from 'vue' Vue.component("project-overview-chart", { template: `
-
+
@@ -19,6 +19,9 @@ Vue.component("project-overview-chart", { typedata:{ type: Array, }, + width:{ + type:Number + }, height:{ type:Number }, @@ -94,20 +97,20 @@ Vue.component("project-overview-chart", { orient: "vertical", icon: "circle", - itemWidth: 12, - itemGap: 8, + + itemGap: 0, textStyle: { color: "#c3dbfd", - fontSize: 14, + fontSize: 6, rich: { name: { color: "#c3dbfd", - padding: [10, 5, 20, 5], + padding: [0, 0, 0, 0], }, percent: { color: "#18DB9F", - fontSize: 16, - padding: [0, 5, 0, 5], + fontSize: 6, + padding: [0, 0, 0, 0], }, }, }, @@ -117,7 +120,7 @@ Vue.component("project-overview-chart", { if(total_datas==0){ percent=0; } - return "{name| " + name + "}"+this.sp+"{val|" + res[0].value + "} {percent|" + percent + "%}"; + return "{name| " + name + "}"+this.sp+" {val|" + res[0].value + "} {percent|" + percent + "%}"; }, }; let opt={...legendOption,...(this.legendOpt||{})}; @@ -130,7 +133,7 @@ Vue.component("project-overview-chart", { itemGap :10, textStyle: { color: "#0dd2fd", - fontSize: 24, + fontSize: 14, fontWeight: "bold", align: "center", }, @@ -160,8 +163,8 @@ Vue.component("project-overview-chart", { series: [ { name: "品类金额占比", - type: "pie", - center: ["25%", "50%"], + type: "pie", + center: ["0%", "50%"], radius: ["46%", "63%"], data: data, label: { @@ -180,7 +183,7 @@ Vue.component("project-overview-chart", { type: "pie", clockWise: false, //顺时加载 hoverAnimation: false, //鼠标移入变大 - center: ["25%", "50%"], + center: ["0%", "50%"], radius: ["70%", "70%"], label: { normal: { diff --git a/src/components/project-overview-chart.vue b/src/components/project-overview-chart.vue index c8f7794..dcc60c8 100644 --- a/src/components/project-overview-chart.vue +++ b/src/components/project-overview-chart.vue @@ -1,6 +1,6 @@ diff --git a/vue.config.js b/vue.config.js index 1d6c37e..6a80e09 100644 --- a/vue.config.js +++ b/vue.config.js @@ -37,8 +37,8 @@ module.exports = defineConfig({ } }, '/jhapi':{ - target: `http://62.234.3.186/jhapi/`, - //target: `http://127.0.0.1:8090/jhapi/`, + //target: `http://62.234.3.186/jhapi/`, + target: `http://127.0.0.1:8090/jhapi/`, //target: `http://szgc.jhncidg.com/jhapi/`, changeOrigin: true, pathRewrite: {