Merge branch 'bjxz-rain' into bjxz-dev

This commit is contained in:
kun 2024-05-14 11:35:12 +08:00
commit a7d2486f0b
3 changed files with 164 additions and 50 deletions

View File

@ -111,7 +111,7 @@
</div> </div>
<div style="position: relative;height:100%"> <div style="position: relative;height:100%">
<div class="chart" ref="radarCharts"></div> <div class="chart" ref="radarCharts"></div>
<div v-if="!examineInfo2.investigateNum"> <div v-if="examineInfo2.flag">
<div class="placeholderBox"> <div class="placeholderBox">
<img src="@/assets/images/noData.png" alt="" /> <img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p> <p>暂无数据</p>
@ -124,8 +124,9 @@
<div class="blockInner"> <div class="blockInner">
<!-- 分包单位 --> <!-- 分包单位 -->
<div class="box-between"> <div class="box-between">
<div>风险走势图{{ riskCount }}{{ riskCount == '-' ? '' : '%' }}<span :style="riskCount > 0 ? 'color:green' : 'color:red'">{{ <div>风险走势图{{ riskCount }}{{ riskCount == '-' ? '' : '%' }}<span
riskCount > 0 ? '↑' : '↓' }}</span>比上月{{ riskName }}</div> :style="riskCount > 0 ? 'color:green' : 'color:red'">{{
riskCount > 0 ? '↑' : '↓' }}</span>比上月{{ riskName }}</div>
<!-- <el-date-picker v-model="value1" type="daterange" range-separator="至" start-placeholder="开始日期" <!-- <el-date-picker v-model="value1" type="daterange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" size="mini"> end-placeholder="结束日期" size="mini">
</el-date-picker> --> </el-date-picker> -->
@ -250,11 +251,12 @@ export default {
overdueNotCloseNum: 0, overdueNotCloseNum: 0,
}, },
examineInfo2: { examineInfo2: {
dangerNum :0, dangerNum: 0,
generalRiskNum :0, generalRiskNum: 0,
largerRiskNum :0, largerRiskNum: 0,
greatFaultLevelNum :0, greatFaultLevelNum: 0,
lowRiskNum:0, lowRiskNum: 0,
flag: false,
}, },
examineInfoFlag: true, examineInfoFlag: true,
@ -328,6 +330,8 @@ export default {
this.examineInfoFlag = false; this.examineInfoFlag = false;
} }
} }
}).catch(() => {
this.examineInfo2.flag = true;
}); });
}, },
getStatsByEnterprise(time) { getStatsByEnterprise(time) {
@ -467,7 +471,22 @@ export default {
data: this.enterpriseList.map(item => item.totalNum), data: this.enterpriseList.map(item => item.totalNum),
type: 'bar', type: 'bar',
barWidth: '20%', barWidth: '20%',
color: "#268dff" color: "#268dff",
label: {
show: true, //
position: 'top', //
formatter: function (val) {
if (val.value !== 0) {
return val.value;
} else {
return '';
}
},
textStyle: { //
color: '#1a1a1a',
// fontSize: 12
}
},
} }
] ]
@ -481,6 +500,14 @@ export default {
// //
radarCharts(el) { radarCharts(el) {
let ageChart = echarts.init(el); let ageChart = echarts.init(el);
const data = [
this.examineInfo2.investigateNum,
this.examineInfo2.notCloseNum,
this.examineInfo2.overdueNotCloseNum,
this.examineInfo2.rectificationNum,
this.examineInfo2.reviewNum,
this.examineInfo2.verificationNum];
const maxCount = data.sort((a,b) => b - a)[0];
let option = { let option = {
legend: { legend: {
icon: 'roundRect', icon: 'roundRect',
@ -497,27 +524,32 @@ export default {
indicator: [ indicator: [
{ {
name: '排查记录', name: '排查记录',
max: parseInt(this.examineInfo2.investigateNum) + 10, max: maxCount,
}, },
{ {
name: '未闭合', name: '未闭合',
max: parseInt(this.examineInfo2.notCloseNum) + 10, max: maxCount,
// max: parseInt(this.examineInfo2.notCloseNum),
}, },
{ {
name: '超期未关闭', name: '超期未关闭',
max: parseInt(this.examineInfo2.overdueNotCloseNum) + 10, max: maxCount,
// max: parseInt(this.examineInfo2.overdueNotCloseNum),
}, },
{ {
name: '待整改', name: '待整改',
max: parseInt(this.examineInfo2.rectificationNum) + 10, max: maxCount,
// max: parseInt(this.examineInfo2.rectificationNum),
}, },
{ {
name: '待复查', name: '待复查',
max: parseInt(this.examineInfo2.reviewNum) + 10, max: maxCount,
// max: parseInt(this.examineInfo2.reviewNum),
}, },
{ {
name: '待核验', name: '待核验',
max: parseInt(this.examineInfo2.verificationNum) + 10, max: maxCount,
// max: parseInt(this.examineInfo2.verificationNum),
}, },
] ]
}, },
@ -533,13 +565,7 @@ export default {
}, },
data: [ data: [
{ {
value: [ value: data,
this.examineInfo2.investigateNum,
this.examineInfo2.notCloseNum,
this.examineInfo2.overdueNotCloseNum,
this.examineInfo2.rectificationNum,
this.examineInfo2.reviewNum,
this.examineInfo2.verificationNum],
name: '质量检查', name: '质量检查',
itemStyle: { // itemStyle: { //
color: 'rgba(84,112,198,1)', color: 'rgba(84,112,198,1)',
@ -669,7 +695,7 @@ export default {
}; };
ageChart.setOption(option); ageChart.setOption(option);
ageChart.on('mousemove', (params) => { ageChart.on('mousemove', (params) => {
if(params.dataIndex == 0){ if (params.dataIndex == 0) {
this.riskCount = 0; this.riskCount = 0;
this.riskName = "暂无"; this.riskName = "暂无";
return return
@ -735,7 +761,7 @@ export default {
return colorList[colors.dataIndex]; return colorList[colors.dataIndex];
} }
}, },
avoidLabelOverlap:true, avoidLabelOverlap: true,
// emphasis: { // emphasis: {
// label: { // label: {
// show: true, // show: true,
@ -833,7 +859,22 @@ export default {
data: this.inspectionList.map(item => item.y), data: this.inspectionList.map(item => item.y),
type: 'bar', type: 'bar',
barWidth: '35%', barWidth: '35%',
color: "#268dff" color: "#268dff",
label: {
show: true, //
position: 'right', //
formatter: function (val) {
if (val.value !== 0) {
return val.value;
} else {
return '';
}
},
textStyle: { //
color: '#1a1a1a',
// fontSize: 12
}
},
} }
] ]

View File

@ -111,7 +111,7 @@
</div> </div>
<div style="position: relative;height:100%"> <div style="position: relative;height:100%">
<div class="chart" ref="radarCharts"></div> <div class="chart" ref="radarCharts"></div>
<div v-if="!examineInfo2.investigateNum"> <div v-if="examineInfo2.flag">
<div class="placeholderBox"> <div class="placeholderBox">
<img src="@/assets/images/noData.png" alt="" /> <img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p> <p>暂无数据</p>
@ -256,6 +256,7 @@ export default {
largerRiskNum: 0, largerRiskNum: 0,
greatFaultLevelNum: 0, greatFaultLevelNum: 0,
lowRiskNum: 0, lowRiskNum: 0,
flag: false,
}, },
examineInfoFlag: true, examineInfoFlag: true,
@ -329,6 +330,8 @@ export default {
this.examineInfoFlag = false; this.examineInfoFlag = false;
} }
} }
}).catch(() => {
this.examineInfo2.flag = true;
}); });
}, },
getStatsByEnterprise(time) { getStatsByEnterprise(time) {
@ -468,7 +471,22 @@ export default {
data: this.enterpriseList.map(item => item.totalNum), data: this.enterpriseList.map(item => item.totalNum),
type: 'bar', type: 'bar',
barWidth: '20%', barWidth: '20%',
color: "#268dff" color: "#268dff",
label: {
show: true, //
position: 'right', //
formatter: function (val) {
if (val.value !== 0) {
return val.value;
} else {
return '';
}
},
textStyle: { //
color: '#1a1a1a',
// fontSize: 12
}
},
} }
] ]
@ -482,6 +500,14 @@ export default {
// //
radarCharts(el) { radarCharts(el) {
let ageChart = echarts.init(el); let ageChart = echarts.init(el);
const data = [
this.examineInfo2.investigateNum,
this.examineInfo2.notCloseNum,
this.examineInfo2.overdueNotCloseNum,
this.examineInfo2.rectificationNum,
this.examineInfo2.reviewNum,
this.examineInfo2.verificationNum];
const maxCount = data.sort((a,b) => b - a)[0];
let option = { let option = {
legend: { legend: {
icon: 'roundRect', icon: 'roundRect',
@ -498,27 +524,27 @@ export default {
indicator: [ indicator: [
{ {
name: '排查记录', name: '排查记录',
max: parseInt(this.examineInfo2.investigateNum) + 10, max: maxCount,
}, },
{ {
name: '未闭合', name: '未闭合',
max: parseInt(this.examineInfo2.notCloseNum) + 10, max: maxCount,
}, },
{ {
name: '超期未关闭', name: '超期未关闭',
max: parseInt(this.examineInfo2.overdueNotCloseNum) + 10, max: maxCount,
}, },
{ {
name: '待整改', name: '待整改',
max: parseInt(this.examineInfo2.rectificationNum) + 10, max: maxCount,
}, },
{ {
name: '待复查', name: '待复查',
max: parseInt(this.examineInfo2.reviewNum) + 10, max: maxCount,
}, },
{ {
name: '待核验', name: '待核验',
max: parseInt(this.examineInfo2.verificationNum) + 10, max: data.sort((a,b) => b - a)[0],
}, },
] ]
}, },
@ -534,13 +560,7 @@ export default {
}, },
data: [ data: [
{ {
value: [ value: data,
this.examineInfo2.investigateNum,
this.examineInfo2.notCloseNum,
this.examineInfo2.overdueNotCloseNum,
this.examineInfo2.rectificationNum,
this.examineInfo2.reviewNum,
this.examineInfo2.verificationNum],
name: '安全检查', name: '安全检查',
itemStyle: { // itemStyle: { //
color: 'rgba(84,112,198,1)', color: 'rgba(84,112,198,1)',
@ -834,7 +854,22 @@ export default {
data: this.inspectionList.map(item => item.y), data: this.inspectionList.map(item => item.y),
type: 'bar', type: 'bar',
barWidth: '35%', barWidth: '35%',
color: "#268dff" color: "#268dff",
label: {
show: true, //
position: 'right', //
formatter: function (val) {
if (val.value !== 0) {
return val.value;
} else {
return '';
}
},
textStyle: { //
color: '#1a1a1a',
// fontSize: 12
}
},
} }
] ]

View File

@ -126,12 +126,12 @@
</div> </div>
<div style="position: relative;height: 50%;"> <div style="position: relative;height: 50%;">
<div v-if="deductScoreInfo.deductScoreList.length == 0"> <div v-if="deductScoreInfo.deductScoreList.length == 0">
<div class="placeholderBox"> <div class="placeholderBox">
<img src="@/assets/images/noData.png" alt="" /> <img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p> <p>暂无数据</p>
</div>
</div> </div>
</div> </div>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -447,7 +447,7 @@ export default {
}, },
grid: { grid: {
left: '14%', left: '14%',
right: '8%', right: '9%',
top: '10%', top: '10%',
bottom: "10%", bottom: "10%",
// containLabel: true, // containLabel: true,
@ -499,16 +499,54 @@ export default {
} }
}, },
}, },
dataZoom: [
{
id: 'dataZoomY',
type: 'inside',
yAxisIndex: [0],
brushSelect: false,
zoomOnMouseWheel: false,
moveOnMouseWheel: true, //
moveOnMouseMove: true, //
preventDefaultMouseMove: false,
start:100,
startValue: 0,
endValue: 3,
//
width: 8,
//
// height: "80%",
//
right: 3,
//
handleSize: 0,
filterMode: 'empty',
top: "top",
},
],
series: [ series: [
{ {
data: this.safeList.map(item => item.y), data: this.safeList.map(item => item.y),
type: 'bar', type: 'bar',
barWidth: '35%', barWidth: '35%',
color: "#268dff" color: "#268dff",
label: {
show: true, //
position: 'right', //
formatter: function (val) {
if (val.value !== 0) {
return val.value;
} else {
return '';
}
},
textStyle: { //
color: '#1a1a1a',
// fontSize: 12
}
},
} }
] ],
}; };
ageChart.setOption(option); ageChart.setOption(option);
window.addEventListener("resize", () => { window.addEventListener("resize", () => {