绩效 1、无数据图标、api 注释 2、标准化得分 如果没有就不显示

This commit is contained in:
wyw 2026-05-28 09:51:41 +08:00
parent 0735f0f468
commit 1ca7043b1f

View File

@ -150,7 +150,7 @@
</view> </view>
<view class="performance"> <view class="performance">
<view> <view>
<view class="standard-content"> <view class="standard-content" v-if="standardScore != ''">
<view class="standard-wrap"> <view class="standard-wrap">
<view class="standard-left"> <view class="standard-left">
<view>标准化得分</view> <view>标准化得分</view>
@ -185,8 +185,8 @@
</view> </view>
</view> </view>
<view class="line-chart"> <!-- <view class="line-chart"> -->
<view class="line-chart-bottom">
<view class="line-chart-title"> <view class="line-chart-title">
<i class="iconfont icon-zhuzhuangtu" style="font-size: 16px;margin-right: 5px;"></i> <i class="iconfont icon-zhuzhuangtu" style="font-size: 16px;margin-right: 5px;"></i>
工作票完成数 工作票完成数
@ -196,7 +196,7 @@
</view> </view>
</view> </view>
<view class="line-chart"> <!-- <view class="line-chart">
<view class="line-chart-title"> <view class="line-chart-title">
<i class="iconfont icon-zhuzhuangtu" style="font-size: 16px;margin-right: 5px;"></i> <i class="iconfont icon-zhuzhuangtu" style="font-size: 16px;margin-right: 5px;"></i>
安全检查次数统计 安全检查次数统计
@ -204,9 +204,8 @@
<view class="charts-view"> <view class="charts-view">
<qiun-data-charts type="column" :opts="safeOpts" :chartData="safeChartData" /> <qiun-data-charts type="column" :opts="safeOpts" :chartData="safeChartData" />
</view> </view>
</view> -->
</view> <!-- <view class="line-chart-bottom">
<view class="line-chart-bottom">
<view class="line-chart-title"> <view class="line-chart-title">
<i class="iconfont icon-zhuzhuangtu" style="font-size: 16px;margin-right: 5px;"></i> <i class="iconfont icon-zhuzhuangtu" style="font-size: 16px;margin-right: 5px;"></i>
月度隐患整改情况 月度隐患整改情况
@ -214,16 +213,14 @@
<view class="charts-view"> <view class="charts-view">
<qiun-data-charts type="column" :opts="dangerOpts" :chartData="dangerChartData" /> <qiun-data-charts type="column" :opts="dangerOpts" :chartData="dangerChartData" />
</view> </view>
</view> -->
</view>
</view> </view>
</view> </view>
</view> </view>
<u-picker :show="modalShow" :columns="columns" @confirm="confirm" @change="changeHandler" @cancel="cancel"></u-picker> <u-picker :show="modalShow" :columns="columns" @confirm="confirm" @change="changeHandler"
@cancel="cancel"></u-picker>
</view> </view>
</template> </template>
@ -513,7 +510,7 @@
m = 12 + (curMonth - 5) m = 12 + (curMonth - 5)
} }
d = curDate.getDate() d = curDate.getDate()
const startTime = uni.$u.timeFormat(new Date(y, m, d), 'yyyy-mm-dd') const startTime = uni.$u.timeFormat(new Date(y, m, d), 'yyyy-mm-dd')
const endTime = uni.$u.timeFormat(new Date(), 'yyyy-mm-dd') const endTime = uni.$u.timeFormat(new Date(), 'yyyy-mm-dd')
let json = initFilter(orgId, User.NAME, "", "", "", startTime, endTime); let json = initFilter(orgId, User.NAME, "", "", "", startTime, endTime);
@ -540,7 +537,7 @@
this.getRiskLevel() this.getRiskLevel()
this.getClassActive() this.getClassActive()
this.getWorkTicket() this.getWorkTicket()
this.getDangerTotal() // this.getDangerTotal()
}, },
methods: { methods: {
@ -591,8 +588,11 @@
const orgId = uni.getStorageSync('orgId') const orgId = uni.getStorageSync('orgId')
let json = initFilter(orgId, this.MineCurrentType); let json = initFilter(orgId, this.MineCurrentType);
const res = await getStandardScore(json) const res = await getStandardScore(json)
if (res.IsSuccessful) { if (res.IsSuccessful && res.Data && res.Data.RESULT_TOTAL && res.Data.STAND_TOTAL != 0) {
debugger
this.standardScore = (Number(res.Data.RESULT_TOTAL / res.Data.STAND_TOTAL) * 100).toFixed(2); this.standardScore = (Number(res.Data.RESULT_TOTAL / res.Data.STAND_TOTAL) * 100).toFixed(2);
} else {
this.standardScore = ''
} }
}, },
@ -738,101 +738,101 @@
}, 500) }, 500)
} }
}, },
async getDangerTotal() { // async getDangerTotal() {
const orgId = uni.getStorageSync('orgId') // const orgId = uni.getStorageSync('orgId')
let json = initFilter( // let json = initFilter(
orgId, // orgId,
this.MineCurrentType, // this.MineCurrentType,
"NUM", // "NUM",
); // );
const res = await getDangerTotal(json) // const res = await getDangerTotal(json)
if (res.IsSuccessful) { // if (res.IsSuccessful) {
let xData = []; // let xData = [];
let data1 = []; // let data1 = [];
let data2 = []; // let data2 = [];
let data3 = []; // let data3 = [];
let seriesName = []; // let seriesName = [];
if (res.Data.ListSafeCheckYearMonth) { // if (res.Data.ListSafeCheckYearMonth) {
let ListSafeCheckYearMonth = res.Data.ListSafeCheckYearMonth.slice(-6) // let ListSafeCheckYearMonth = res.Data.ListSafeCheckYearMonth.slice(-6)
ListSafeCheckYearMonth.forEach((item) => { // ListSafeCheckYearMonth.forEach((item) => {
xData.push(item.MONTH + '月') // xData.push(item.MONTH + '')
seriesName = item.listSOURCENAME // seriesName = item.listSOURCENAME
data1.push(item.listListCount); // data1.push(item.listListCount);
}); // });
for (var i = 0; i < ListSafeCheckYearMonth[0].listListCount.length; i++) { // for (var i = 0; i < ListSafeCheckYearMonth[0].listListCount.length; i++) {
for (var j = 0; j < ListSafeCheckYearMonth.length; j++) { // for (var j = 0; j < ListSafeCheckYearMonth.length; j++) {
data2.push(data1[j][i]); // data2.push(data1[j][i]);
} // }
} // }
for (var i = 0; i < data2.length; i += ListSafeCheckYearMonth.length) { // for (var i = 0; i < data2.length; i += ListSafeCheckYearMonth.length) {
data3.push(data2.slice(i, i + ListSafeCheckYearMonth.length)) // data3.push(data2.slice(i, i + ListSafeCheckYearMonth.length))
} // }
setTimeout(() => { // setTimeout(() => {
let safeCheckConfig = { // let safeCheckConfig = {
categories: xData, // categories: xData,
series: [{ // series: [{
name: seriesName[0], // name: seriesName[0],
data: data3[0], // data: data3[0],
}, { // }, {
name: seriesName[1], // name: seriesName[1],
data: data3[1], // data: data3[1],
}, { // }, {
name: seriesName[2], // name: seriesName[2],
data: data3[2], // data: data3[2],
}, { // }, {
name: seriesName[3], // name: seriesName[3],
data: data3[3], // data: data3[3],
}], // }],
}; // };
this.safeChartData = JSON.parse(JSON.stringify(safeCheckConfig)); // this.safeChartData = JSON.parse(JSON.stringify(safeCheckConfig));
}, 500); // }, 500);
} // }
let xName = []; // let xName = [];
let yName = []; // let yName = [];
let legendName = []; // let legendName = [];
res.Data.ListC.forEach((item) => { // res.Data.ListC.forEach((item) => {
let name = item.NAME.split(","); // let name = item.NAME.split(",");
xName.push(name); // xName.push(name);
legendName.push(item.SOURCENAME); // legendName.push(item.SOURCENAME);
let valu = item.Val.split(","); // let valu = item.Val.split(",");
yName.push(valu); // yName.push(valu);
}); // });
let month = xName[0].map((item) => { // let month = xName[0].map((item) => {
return item.replace("月", ""); // return item.replace("", "");
}); // });
setTimeout(() => { // setTimeout(() => {
let monthDangerConfig = { // let monthDangerConfig = {
categories: xName[0], // categories: xName[0],
series: [{ // series: [{
name: legendName[0], // name: legendName[0],
// index: 1, // // index: 1,
type: "column", // type: "column",
data: yName[0] // data: yName[0]
}, // },
{ // {
name: legendName[1], // name: legendName[1],
// index: 1, // // index: 1,
type: "column", // type: "column",
data: yName[1] // data: yName[1]
}, // },
{ // {
name: legendName[2], // name: legendName[2],
// index: 1, // // index: 1,
type: "column", // type: "column",
data: yName[2] // data: yName[2]
}, // },
], // ],
}; // };
this.dangerChartData = JSON.parse(JSON.stringify(monthDangerConfig)); // this.dangerChartData = JSON.parse(JSON.stringify(monthDangerConfig));
}, 500) // }, 500)
} // }
} // }
}, },
computed: { computed: {
allFinishRate() { allFinishRate() {