Browse Source

更新

wangqin
hui 1 year ago
parent
commit
8f0263e1e8
  1. 299
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/charts.js
  2. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/monthlyEquipment/index.vue
  3. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue
  4. 4
      ruoyi-ui/vue.config.js

299
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/charts.js

@ -1,94 +1,35 @@
import * as echarts from "echarts"; import * as echarts from "echarts";
var data1 = [
50, 32, 41, 61, 70, 39, 40, 55, 63, 55, 36, 45, 62, 74, 46, 73, 92, 60, 45,
33, 45, 66, 55, 32, 46, 36, 67, 49, 60, 55, 33, 35, 66,
];
var data2 = [
5, 12, 4, 6, 7, 9, 10, 15, 3, 5, 6, 15, 12, 4, 6, 7, 9, 10, 15, 3, 5, 6, 5,
12, 4, 6, 7, 9, 10, 15, 3, 5, 6,
];
let options = { let options = {
tooltip: { tooltip: {
trigger: "axis", trigger: 'axis',
backgroundColor: "rgba(17,95,182,0.5)", backgroundColor: 'rgba(17,95,182,0.5)',
textStyle: { textStyle: {
color: "#fff", color: "#fff"
}, },
formatter: function (params) { formatter: function (params) {
return ( return params[0].name + params[0].seriesName + ': ' + params[0].value
params[1].marker + }
"" +
params[1].name +
"\n" +
"<div>" +
"<span style='display:inline-block;border-radius:1px;width:10px;height:10px;background-color:#007AFF;option:0.5'></span>" +
"<span style=''> " +
params[1].seriesName +
": " +
params[1].value +
"\n" +
" </span>" +
"</div>" +
"<span style='display:inline-block;border-radius:1px;width:10px;height:10px;background-color:#FF9B61;'></span>" +
"" +
"<span style=''> " +
params[3].seriesName +
": " +
params[3].value
);
},
}, },
grid: { grid: {
left: "2%", left: '2%',
right: "2%", right: '2%',
top: "15%", top: '15%',
bottom: "12%", bottom: '12%'
}, },
xAxis: { xAxis: {
data: [ data: [],
"1日",
"2日",
"3日",
"4日",
"5日",
"6日",
"7日",
"8日",
"9日",
"10日",
"11日",
"12日",
"13日",
"14日",
"15日",
"16日",
"17日",
"18日",
"19日",
"20日",
"21日",
"22日",
"23日",
"24日",
"25日",
"26日",
"27日",
"28日",
"29日",
"30日",
],
show: true, show: true,
axisTick: { axisTick: {
show: false, show: false
}, },
axisLine: { axisLine: {
show: true, show: true,
lineStyle: { lineStyle: {
type: "solid", type: 'solid',
color: "#2D4377", color: '#2D4377',
opacity: 1, opacity: 1
}, }
}, },
// lineStyle: { // lineStyle: {
// show: true, // show: true,
@ -97,152 +38,126 @@ let options = {
axisLabel: { axisLabel: {
interval: 0, interval: 0,
textStyle: { textStyle: {
color: "rgba(255,255,255,0.8)", color: 'rgba(255,255,255,0.8)',
fontSize: 14, fontSize: 14
}, },
margin: 12, // 刻度标签与轴线之间的距离。 margin: 12 // 刻度标签与轴线之间的距离。
}, }
}, },
yAxis: [ yAxis: [{
{ min: 0,
min: 0, max: 100,
max: 100, type: 'value',
type: "value", minInterval: 20,
minInterval: 20, maxInterval: 20,
maxInterval: 20, name: "",
name: "(单位:万)", nameTextStyle: {
nameTextStyle: { align: 'left',
align: "left", color: 'rgba(255,255,255,0.8)',
color: "rgba(255,255,255,0.8)", padding: [0, 0, 0, -20],
padding: [0, 0, 0, -20], fontSize: 14
fontSize: 14, },
}, splitLine: {
splitLine: { show: true,
show: true, lineStyle: {
lineStyle: { type: 'dashed',
type: "dashed", color: '#2D4377',
color: "#2D4377", opacity: 0.5
opacity: 0.5, }
},
},
axisTick: {
show: false,
},
axisLine: {
show: true,
lineStyle: {
color: "#2D4377",
},
},
axisLabel: {
textStyle: {
color: "rgba(255,255,255,0.8)",
fontSize: 14,
},
},
data: ["0", "3", "6", "9", "12", "15", "18"],
}, },
], axisTick: {
show: false
},
axisLine: {
show: true,
lineStyle: {
color: '#2D4377',
}
},
axisLabel: {
textStyle: {
color: 'rgba(255,255,255,0.8)',
fontSize: 14
}
},
data: [
'0', '3', '6', '9', '12', '15', '18'
],
}],
legend: { legend: {
top: "5%", top: '5%',
right: "5%", right: '5%',
icon: "rect", icon: 'rect',
itemWidth: 25, itemWidth: 25,
itemHeight: 10, itemHeight: 10,
textStyle: { textStyle: {
color: "#fff", color: '#fff',
fontSize: 14, fontSize: 14
}, },
lineStyle: { lineStyle: {
show: false, show: false,
color: "#00E4BB", color: "#00E4BB",
}, },
data: [ data: [{
{ name: '高清网络球型摄像机',
name: "高清网络球型摄像机", itemStyle: {
itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
color: new echarts.graphic.LinearGradient( offset: 0,
0, color: '#00E4BB' // 0% 处的颜色
0, }, {
0, offset: 1,
1, color: '#003B4E' // 100% 处的颜色
[ }], false)
{
offset: 0,
color: "#00E4BB", // 0% 处的颜色
},
{
offset: 1,
color: "#003B4E", // 100% 处的颜色
},
],
false
),
},
},
{
name: "增涨率",
itemStyle: {
color: "#755400",
},
}, },
], },
itemGap: 12, // 设置间距 {
name: '增涨率',
itemStyle: {
color: "#755400"
}
}],
itemGap: 12 // 设置间距
}, },
series: [ series: [
// 下半截柱状图 // 下半截柱状图
{ {
name: "增收金额", name: '',
type: "bar", type: 'bar',
barWidth: 12, barWidth: 12,
barGap: "-100%", barGap: '-100%',
itemStyle: { itemStyle: { // lenged文本
// lenged文本
opacity: 1, opacity: 1,
barBorderRadius: [13, 13, 13, 13], barBorderRadius: [13, 13, 13, 13],
color: function (params) { color: function (params) {
var a = params.name.slice(0, 2); var a = params.name.slice(0, 2)
return new echarts.graphic.LinearGradient( return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
0, offset: 0,
0, color: '#00E4BB' // 0% 处的颜色
0, }, {
1, offset: 1,
[ color: '#003B4E' // 100% 处的颜色
{ }], false)
offset: 0, }
color: "#00E4BB", // 0% 处的颜色
},
{
offset: 1,
color: "#003B4E", // 100% 处的颜色
},
],
false
);
},
}, },
data: data1, data: []
}, },
{ {
name: "", name: '',
type: "bar", type: 'bar',
barWidth: 12, barWidth: 12,
barGap: "-100%", barGap: '-100%',
z: 0, z: 0,
itemStyle: { itemStyle: {
color: "#0BA7DA", color: '#0BA7DA',
opacity: 0.1, opacity: .1,
}, },
data: [ data: []
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, }
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, ]
100, 100, }
],
},
],
};
// option && myChart3.setOption(option); // option && myChart3.setOption(option);
// if (option && typeof option === "object") { // if (option && typeof option === "object") {
@ -264,4 +179,4 @@ let options = {
// }, 2600); // }, 2600);
// } // }
export default options; export default options;

12
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/components/monthlyEquipment/index.vue

@ -154,17 +154,7 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
.congestion { .congestion {
width: 100%; width: 100%;
padding: 0px 20px;
background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%);
border-radius: 5px 5px 5px 5px;
opacity: 1;
border: 1px solid;
border-image: linear-gradient(360deg,
rgba(55, 231, 255, 0.3),
rgba(55, 231, 255, 0)) 1 1;
display: flex; display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column; flex-direction: column;
.board { .board {
@ -213,4 +203,4 @@ export default {
transform: translate(0px, 10px); transform: translate(0px, 10px);
} }
}</style> }</style>

1
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue

@ -604,7 +604,6 @@ export default {
display: inline-flex; display: inline-flex;
width: 100%; width: 100%;
height: 100%; height: 100%;
--keep-ratio: scaleX(1) !important;
} }
} }

4
ruoyi-ui/vue.config.js

@ -49,9 +49,9 @@ module.exports = {
// target: `http://10.0.81.202:8087`, //现场后台 // target: `http://10.0.81.202:8087`, //现场后台
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁 // target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁 // target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
target: `http://10.168.78.135:8087`, //王钦 // target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2 // target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
// target: `http://10.168.68.42:8087`, //王思祥 target: `http://10.168.68.42:8087`, //王思祥
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save