大屏(首页概况):代码简化

This commit is contained in:
Jack 2022-07-30 18:48:42 +08:00
parent 43dce609c5
commit c08f971fff

View File

@ -474,8 +474,6 @@ import airQulityChart from '@/components/chart/airQulityChart'
import { getWorkerStatisticsCountApi } from '@/assets/js/api/company/project'
import { getProjectDetail, editProjectInfo } from '@/assets/js/api/baseInfo.js'
import {
selectSecurityManageStatisticsApi,
selectQualityStatisticsApi,
getAllTowerDangerInfo,
getAllLifterDangerInfo,
getEnvironmentInfo,
@ -489,7 +487,6 @@ import {
environmentDevList
} from '@/assets/js/api/environmentManage'
import {
getPageDetail,
eidtProjectShowConfig,
queryBySnData
} from '@/assets/js/api/projectSummary.js'
@ -533,12 +530,6 @@ export default {
}
],
optionListIndex: 1,
ops: {
vuescroll: {
// wheelScrollDuration: 0,
wheelDirectionReverse: true
}
},
stageList: this.$t('message.companyDiagram.CONSTRUCTIONSTAGE'),
projectData: {
constructionStage: 10,
@ -683,9 +674,7 @@ export default {
tooltip: {
trigger: 'axis',
// 线
axisPointer: {
type: 'none'
}
axisPointer: { type: 'none' }
},
// ['','','','']
xAxis: [
@ -695,46 +684,27 @@ export default {
name: this.$t('message.companyDiagram.devNum'),
show: false,
splitLine: {
lineStyle: {
color: '#fff',
type: 'dashed'
}
lineStyle: { color: '#fff', type: 'dashed' }
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: '#fff',
type: 'solid'
}
lineStyle: { color: '#fff', type: 'solid' }
},
axisLabel: {
color: '#fff'
}
axisLabel: { color: '#fff' }
},
{
type: 'value'
}
{ type: 'value' }
],
yAxis: {
type: 'category',
data: this.$t('message.companyDiagram.echarTitleData'),
axisLine: {
lineStyle: {
color: '#fff',
type: 'dashed'
},
lineStyle: { color: '#fff', type: 'dashed' },
show: false
},
axisTick: {
show: false
},
axisLabel: {
color: '#fff',
fontSize: 12 //
}
axisTick: { show: false },
axisLabel: { color: '#fff', fontSize: 12 }
},
series: [
{
@ -963,64 +933,6 @@ export default {
}
)
},
createPieChart(data, div, color, title) {
let that = this
let monitor = echarts.init(div)
// monitor.clear();
var option = {
color: color ? color : ['#5181F6', '#61D2B9', '#F67F51', '#7851F6'],
title: {
show: true,
text: data[0].value + data[1].value,
x: '48%',
y: '36%',
z: 5,
textAlign: 'center',
textStyle: {
color: 'rgba(255, 255, 255, 1)',
fontSize: 20
},
subtext: title,
subtextStyle: {
color: 'rgba(255, 255, 255, 0.8)',
fontSize: 13
}
},
grid: {
right: 0
},
legend: {
show: false
},
// tooltip: {
// // data: ['线', '线'],
// trigger: "item",
// formatter: "{a} <br/>{b}: {c} ({d}%)",
// },
series: [
{
name: '',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
data: data
}
]
}
// if(color){
// option.series[0].radius=["75%", "85%"]
// option.title.x="45%"
// option.legend.show=false
// }
monitor.setOption(option)
},
//
handleBeforeUpload(file, type) {
console.log(file)
@ -1105,13 +1017,11 @@ export default {
height: 220px;
}
.weatherItem {
/*float: left;*/
display: inline-block;
width: 101px;
text-align: center;
padding: 13px 5px;
margin-top: -5px;
// height: calc(100% - 13px);
height: 165px;
margin-left: 12px;
background: linear-gradient(rgba(21, 25, 33, 0.06), rgba(6, 248, 179, 0.06));
@ -1131,7 +1041,6 @@ export default {
height: 36px;
display: flex;
align-items: center;
// margin: 15px 0;
justify-content: center;
}
.weather {
@ -1139,9 +1048,6 @@ export default {
color: #ffffff;
margin-bottom: 3px;
}
// .temp{
// margin-bottom: 16px;
// }
}
.weatherItem {
background: linear-gradient(rgba(5, 11, 59, 0.1), rgba(40, 109, 221, 0.1));
@ -1169,8 +1075,6 @@ export default {
border-bottom: 3px #27a3e2 solid;
}
}
.imgBox {
}
.listItem {
color: white;
font-size: 15px;
@ -1318,33 +1222,16 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
// align-content: space-around;
flex-wrap: wrap;
position: absolute;
left: 10%;
top: 8%;
// top: 10%;
.attendance-cards-item {
width: 50%;
height: 40%;
box-sizing: border-box;
display: flex;
// flex-direction: column;
align-items: center;
// text-align: center;
// :nth-child(1) {
// display: block;
// color: white;
// font-size: 14px;
// font-family: PingFangSC-Light;
// }
// :nth-child(2) {
// display: block;
// margin-top: 5px;
// color: rgba(255, 255, 255, 0.8);
// font-size: 11px;
// }
.cards-item-left {
width: 65px;
text-align: center;
@ -1372,19 +1259,12 @@ export default {
}
.list_item {
width: 100%;
// height: 14%;
display: flex;
font-size: 12px;
margin-top: 3%;
color: rgba(255, 255, 255, 0.8);
// .img{
// width: 100px;
// height: 100px;
// margin-right: 17px;
// }
.title {
width: 240px;
// height: 18%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;