update code

dev
haha 2024-06-16 22:03:02 +08:00
parent 622b35aabe
commit ee79818c76
5 changed files with 341 additions and 949 deletions

View File

@ -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)=> { const getVideoPassage=(deptId,projectId,passageType,importance)=> {
return request({ return request({
url: `/bgscreen/aiBoxVideo/getVideoPassage?deptId=${deptId||0}&projectId=${projectId||0}&passageType=${passageType}&importance=${importance}`, 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)=> { const selectGroupCountVideoConfig=(deptId,projectId)=> {
return request({ return request({
@ -31,8 +46,10 @@ const selectGroupCountVideoConfig=(deptId,projectId)=> {
export default{ export default{
list,
listView, listView,
getVideoPassage, getVideoPassage,
groupCountByAlarmType, groupCountByAlarmType,
selectGroupCountVideoConfig selectGroupCountVideoConfig,
groupCountByProject
} }

View File

@ -2,7 +2,7 @@ import Vue from 'vue'
Vue.component("project-overview-chart", { Vue.component("project-overview-chart", {
template: ` template: `
<div class='project-overview-chart' style="position: relative" @click="doClick"> <div class='project-overview-chart' style="position: relative" @click="doClick">
<div :style="{'height': height+'px'}" ref="warningPieChart"> <div :style="'height:'+height+'px;'+(width?('width:'+width+'px;'):'')" ref="warningPieChart">
</div> </div>
<div class="chart-gif chart-overview-gif" style="{'top':gifTop}"></div> <div class="chart-gif chart-overview-gif" style="{'top':gifTop}"></div>
@ -19,6 +19,9 @@ Vue.component("project-overview-chart", {
typedata:{ typedata:{
type: Array, type: Array,
}, },
width:{
type:Number
},
height:{ height:{
type:Number type:Number
}, },
@ -94,20 +97,20 @@ Vue.component("project-overview-chart", {
orient: "vertical", orient: "vertical",
icon: "circle", icon: "circle",
itemWidth: 12,
itemGap: 8, itemGap: 0,
textStyle: { textStyle: {
color: "#c3dbfd", color: "#c3dbfd",
fontSize: 14, fontSize: 6,
rich: { rich: {
name: { name: {
color: "#c3dbfd", color: "#c3dbfd",
padding: [10, 5, 20, 5], padding: [0, 0, 0, 0],
}, },
percent: { percent: {
color: "#18DB9F", color: "#18DB9F",
fontSize: 16, fontSize: 6,
padding: [0, 5, 0, 5], padding: [0, 0, 0, 0],
}, },
}, },
}, },
@ -117,7 +120,7 @@ Vue.component("project-overview-chart", {
if(total_datas==0){ if(total_datas==0){
percent=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||{})}; let opt={...legendOption,...(this.legendOpt||{})};
@ -130,7 +133,7 @@ Vue.component("project-overview-chart", {
itemGap :10, itemGap :10,
textStyle: { textStyle: {
color: "#0dd2fd", color: "#0dd2fd",
fontSize: 24, fontSize: 14,
fontWeight: "bold", fontWeight: "bold",
align: "center", align: "center",
}, },
@ -160,8 +163,8 @@ Vue.component("project-overview-chart", {
series: [ series: [
{ {
name: "品类金额占比", name: "品类金额占比",
type: "pie", type: "pie",
center: ["25%", "50%"], center: ["0%", "50%"],
radius: ["46%", "63%"], radius: ["46%", "63%"],
data: data, data: data,
label: { label: {
@ -180,7 +183,7 @@ Vue.component("project-overview-chart", {
type: "pie", type: "pie",
clockWise: false, //顺时加载 clockWise: false, //顺时加载
hoverAnimation: false, //鼠标移入变大 hoverAnimation: false, //鼠标移入变大
center: ["25%", "50%"], center: ["0%", "50%"],
radius: ["70%", "70%"], radius: ["70%", "70%"],
label: { label: {
normal: { normal: {

View File

@ -1,6 +1,6 @@
<template> <template>
<div class='project-overview-chart' style="position: relative" @click="doClick"> <div class='project-overview-chart' style="position: relative" @click="doClick">
<div :style="{'height': height+'px'}" ref="warningPieChart"> <div :style="'height:'+height+'px;'+(width?('width:'+width+'px;'):'')" ref="warningPieChart">
</div> </div>
<div class="chart-gif chart-overview-gif" :style="'top:'+gifTop"></div> <div class="chart-gif chart-overview-gif" :style="'top:'+gifTop"></div>
@ -26,6 +26,9 @@ export default {
typedata:{ typedata:{
type: Array, type: Array,
}, },
width:{
type:Number
},
height:{ height:{
type:Number type:Number
}, },

File diff suppressed because it is too large Load Diff

View File

@ -37,8 +37,8 @@ module.exports = defineConfig({
} }
}, },
'/jhapi':{ '/jhapi':{
target: `http://62.234.3.186/jhapi/`, //target: `http://62.234.3.186/jhapi/`,
//target: `http://127.0.0.1:8090/jhapi/`, target: `http://127.0.0.1:8090/jhapi/`,
//target: `http://szgc.jhncidg.com/jhapi/`, //target: `http://szgc.jhncidg.com/jhapi/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {