代码提交

main
jinna 2 years ago
parent a225ac7cee
commit dd17c0f4d7
  1. 206
      src/views/HomeView.vue
  2. 4
      vue.config.js

@ -1897,7 +1897,7 @@ export default {
top: "5%",
left: "22%",
// left: '30%',
right: this.isShowSubmit ? "15%" : "25%",
right: this.isShowSubmit ? "15%" : "24%",
bottom: "3%",
},
xAxis: {
@ -1953,52 +1953,52 @@ export default {
},
},
},
// {
// type: 'category',
// inverse: true,
// axisTick: {
// show: false
// },
// axisLine: {
// show: false
// },
// axisLabel: {
// show: true,
// inside: false,
// fontSize: 16,
// align:"right",
// color:"#fff",
// padding:this.isShowSubmit ? [50, -52, 0, 0] : [50, -40, 0, 0],
// formatter: function (value, index) {
// return value + ''
// },
// },
// data: this.deptPh.map((item) => item.value),
// },
// {
// type: 'category',
// inverse: true,
// axisTick: {
// show: false
// },
// axisLine: {
// show: false
// },
// axisLabel: {
// show: true,
// inside: false,
// formatter: function (value, index) {
// return '{b|' + value + '}';
// },
// rich: {
// b: {
// padding: [0, 0, 0, 50], fontSize: 16,
// color: "#33cdfb",
// }
// }
// },
// data: this.deptPh.map((item) => item.resolveRate),
// },
{
type: 'category',
inverse: true,
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
show: true,
inside: false,
fontSize: 16,
align:"right",
color:"#fff",
padding:this.isShowSubmit ? [50, -52, 0, 0] : [50, -40, 0, 0],
formatter: function (value, index) {
return value + '件'
},
},
data: this.deptPh.map((item) => item.value),
},
{
type: 'category',
inverse: true,
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
show: true,
inside: false,
formatter: function (value, index) {
return '{b|' + value + '}';
},
rich: {
b: {
padding: [0, 0, 0, 50], fontSize: 16,
color: "#33cdfb",
}
}
},
data: this.deptPh.map((item) => item.resolveRate),
},
],
dataZoom: [
//
@ -2009,6 +2009,20 @@ export default {
startValue: 0, //
endValue: 4, // 6
},
{
yAxisIndex: 1, //X0
show: false, //使
type: "slider", // dataZoom slider dataZoom
startValue: 0, //
endValue: 4, // 6
},
{
yAxisIndex: 2, //X0
show: false, //使
type: "slider", // dataZoom slider dataZoom
startValue: 0, //
endValue: 4, // 6
},
],
series: [
{
@ -2044,47 +2058,47 @@ export default {
barBorderRadius: [15, 15, 15, 15],
},
},
{
type: "bar",
barWidth: "13px",
barGap: "-113%",
itemStyle: {
normal: {
color: "transparent",
},
},
label: {
normal: {
show: true,
padding:this.isShowSubmit ? [0,0,0,-8] : [0, 0, 0, -15],
formatter: (series) => {
const item = series.data;
return `{num|${item.num > 10000 ? (item.num / 10000) + '万' : item.num}件}{per| ${item.per ? item.per : ''}}`;
},
rich: {
num: {
width:60,
fontSize: 16,
color: "#FFFFFFFF",
align:'right',
// padding:[0, -20,0, 0]
// backgroundColor:'red'
// {
// type: "bar",
// barWidth: "13px",
// barGap: "-113%",
// itemStyle: {
// normal: {
// color: "transparent",
// },
// },
// label: {
// normal: {
// show: true,
// // padding:this.isShowSubmit ? [0,0,0,-5] : [0, 0, 0, -8],
// formatter: (series) => {
// const item = series.data;
// return `{num|${item.num > 10000 ? (item.num / 10000) + '' : item.num}}{per| ${item.per ? item.per : ''}}`;
// },
// rich: {
// num: {
// width:45,
// fontSize: 16,
// color: "#FFFFFFFF",
// align:'right',
// // padding:this.isShowSubmit ? [0,-25,0,0] : [0, -20,0, 0],
// backgroundColor:'red'
},
per: {
// width:45,
fontSize: 16,
color: "#33cdfb",
align:'right',
// backgroundColor:'green',
// padding:[0, 18,0, 3]
},
},
position: "right",
},
},
data: maxData,
},
// },
// per: {
// // width:45,
// fontSize: 16,
// color: "#33cdfb",
// align:'right',
// // backgroundColor:'green',
// // padding:[0, 18,0, 18]
// },
// },
// position: "right",
// },
// },
// data: maxData,
// },
// {
// name: "",
// type: "scatter",
@ -2135,6 +2149,24 @@ export default {
this.option.dataZoom[0].endValue + 1;
this.option.dataZoom[0].startValue =
this.option.dataZoom[0].startValue + 1;
}
if (this.option.dataZoom[1].endValue == this.deptPh.length) {
this.option.dataZoom[1].endValue = 3;
this.option.dataZoom[1].startValue = 0;
} else {
this.option.dataZoom[1].endValue =
this.option.dataZoom[1].endValue + 1;
this.option.dataZoom[1].startValue =
this.option.dataZoom[1].startValue + 1;
}
if (this.option.dataZoom[2].endValue == this.deptPh.length) {
this.option.dataZoom[2].endValue = 3;
this.option.dataZoom[2].startValue = 0;
} else {
this.option.dataZoom[2].endValue =
this.option.dataZoom[2].endValue + 1;
this.option.dataZoom[2].startValue =
this.option.dataZoom[2].startValue + 1;
}
this.deptChart.setOption(this.option);
}, 2000);

@ -12,9 +12,9 @@ module.exports = defineConfig({
"/api": {
//本地服务接口地址
// target: 'http://localhost',
target: "http://192.168.1.106:80",
// target: "http://192.168.1.106:80",
// target: "http://127.0.0.1:10000",
// target: "http://192.168.1.106:80",
target: "http://127.0.0.1:10000",
// target: "http://tmpshop.cas-air.cn",
//远程演示服务地址,可用于直接启动项目
//target: 'https://saber.bladex.vip/api',

Loading…
Cancel
Save