diff --git a/src/utils/request.js b/src/utils/request.js index 3b4f6e5..da330fe 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -2,7 +2,7 @@ import axios from "axios"; import { ElMessage } from "element-plus"; import tools from "@/utils/tools"; import router from "../router"; -axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' +// axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' axios.defaults.timeout = 120000; // HTTP request 拦截器 diff --git a/src/view/echarts_jz/eP1.vue b/src/view/echarts_jz/eP1.vue index f092f5e..a9d7752 100644 --- a/src/view/echarts_jz/eP1.vue +++ b/src/view/echarts_jz/eP1.vue @@ -1,296 +1,297 @@ - - +
+ - +}; +var time; +const setChart = () => { + var myChart = echarts.init(chart.value); + myChart.setOption(data.option); + time = setInterval(() => { + angle = angle + 2; + myChart.setOption(data.option, true); + }, 100); +}; +onBeforeUnmount(() => { + if (time) { + clearInterval(time); + } +}); +// 使用生命钩子 +onBeforeMount(() => { + setTimeout(() => { + data.dataValue=props.list; + getOption(); + setChart(); + }, 600); +}); + \ No newline at end of file diff --git a/src/view/echarts_jz/eP3.vue b/src/view/echarts_jz/eP3.vue index 3187942..b471870 100644 --- a/src/view/echarts_jz/eP3.vue +++ b/src/view/echarts_jz/eP3.vue @@ -8,7 +8,25 @@ import { onMounted, onBeforeMount, reactive, ref } from "vue"; import * as echarts from "echarts"; const emit = defineEmits(["shuju"]); const props = defineProps({ - list: { + list1: { + type: Array, + default: () => { + return []; + }, + }, + list2: { + type: Array, + default: () => { + return []; + }, + }, + list3: { + type: Array, + default: () => { + return []; + }, + }, + year: { type: Array, default: () => { return []; @@ -43,13 +61,11 @@ const colors = [ ]; // const valueList = [20, 53, 47, 65, 29, 11, 10]; const data = reactive({ - list: [], option: {}, - Max: 20000, valueList: [4504, 16086, 6130, 2844, 4967, 179, 1685, 5010], valueList2: [1181, 2177, 3720, 3711, 4642, 1654, 3395, 5552], valueList3: [1181, 2177, 3720, 3711, 4642, 1654, 3395, 5552], - xxname: ["1月", "2月", "3月", "4月","5月"], + year: [], }); // 注册5个面图形:左侧、前面、右面、上面、下面 //c0:左下角,c1:右下角,c2:右上角,c3:左上角 @@ -403,7 +419,7 @@ const getOption = () => { xAxis: [ { type: "category", - data: data.xxname, + data: data.year, axisLine: { show: false, }, @@ -417,13 +433,13 @@ const getOption = () => { color: "#fff", fontSize: 16, formatter: function (value) { - return value.length > 3 ? value.slice(0, 2) + "..." : value; + return value.length > 4 ? value.slice(0, 3) + "..." : value; }, }, }, { type: "category", - data: data.xxname, + data: data.year, axisLine: { show: false, }, @@ -441,7 +457,7 @@ const getOption = () => { ], yAxis: { min: 0, - max: data.Max, + // interval: 100, type: "value", axisLine: { @@ -756,31 +772,12 @@ const setChart = () => { emit("shuju", params.name, params.seriesIndex); }); }; -const getMaxCeilingValue = (arr) => { - let max = Math.max(...arr); // 找到数组中的最大值 - return Math.ceil(max / 100) * 100; // 将最大值向上取整到最近的100的倍数 -}; -const setChart1 = () => { - data.valueList = []; - data.xxname = []; - if (data.list.length !== 0) { - data.list.forEach((item) => { - data.xxname.push(item.name); //信息名 - data.valueList.push(item.num); //信息数 - }); - } -}; - onBeforeMount(() => { setTimeout(() => { - data.xxname.forEach((item, index) => { - props.list.forEach((itemm, indexx) => { - if (item == itemm.xzjd) { - data.valueList[index] = itemm.qrrs; - data.valueList2[index] = itemm.qcrs; - } - }); - }); + data.year=props.year; + data.valueList=props.list1; + data.valueList2=props.list2; + data.valueList3=props.list3; getOption(); setChart(); }, 800); diff --git a/src/view/echarts_jz/eP4.vue b/src/view/echarts_jz/eP4.vue index ae5de51..cb47afe 100644 --- a/src/view/echarts_jz/eP4.vue +++ b/src/view/echarts_jz/eP4.vue @@ -8,22 +8,22 @@ import * as echarts from "echarts"; const props = defineProps({ list: { - type: Array, + type: String, default: () => { - return {}; + return ''; }, }, }); const data = reactive({ option: {}, + dataValue: 0, }); let angle = 0; // 角度 - let dataValue = 86; const chart = ref(); // 创建DOM引用 const getOption = () => { data.option = { title: { - text: `{v|${dataValue}}{unit|%}`, + text: `{v|${data.dataValue}}{unit|次}`, x: "center", y: "center", textStyle: { @@ -224,14 +224,14 @@ animation: false, // 关闭饼图动画 data: [ { - value: dataValue, + value: data.dataValue, itemStyle: { color: "RGBA(0, 139, 255, 1)", }, }, { name: "未完成", - value: 100 - dataValue, + value: 100 - data.dataValue, label: { show: false, }, @@ -287,6 +287,7 @@ // 使用生命钩子 onBeforeMount(() => { setTimeout(() => { + data.dataValue=props.list getOption(); setChart(); }, 600); diff --git a/src/view/echarts_jz/zwfw1.vue b/src/view/echarts_jz/zwfw1.vue index cbe1845..e0bbcfd 100644 --- a/src/view/echarts_jz/zwfw1.vue +++ b/src/view/echarts_jz/zwfw1.vue @@ -40,34 +40,6 @@ const data1 = ref([ const getOption = () => { data.option = { - // legend: { - // selectedMode: false, - // itemWidth: 10, - // itemHeight: 10, - // itemGap: 10, - // icon: "circle", - // data: ["2.0收件数", "", "总收件数"], - // bottom: "3%", - // width: 380, - // textStyle: { - // color: "#ffffff", // 修改图例颜色为红色 - // }, - // formatter: function (params) { - // var num = ""; - // for (let i = 0; i < data.dataList.length; i++) { - // if (data.dataList[i].name == params) { - // num = data.dataList[i].value; - // } - // } - // if(params == "总收件数"){ - // return params + " " +num; - // }else{ - // return params + " " +num; - // } - - // }, - // }, - title: [ { text: `${data.percent}%`, diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index a7b5466..0b402c5 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -98,8 +98,11 @@