1
This commit is contained in:
parent
5612ff3aa7
commit
579f64f66e
@ -18,8 +18,8 @@
|
|||||||
<view class="user-name">{{`${userInfo.NAME}(${userInfo.CODE})`}}</view>
|
<view class="user-name">{{`${userInfo.NAME}(${userInfo.CODE})`}}</view>
|
||||||
<!-- <view class="user-phone">{{userInfo.PHONE}}</view> -->
|
<!-- <view class="user-phone">{{userInfo.PHONE}}</view> -->
|
||||||
<view class="dep-num">
|
<view class="dep-num">
|
||||||
<text class="dep-num-name">{{userInfo.Nav_Department.NAME}}</text>
|
<text class="dep-num-name" v-if="userInfo.Nav_Department">{{userInfo.Nav_Department.NAME}}</text>
|
||||||
<text>{{userInfo.PHONE}}</text>
|
<text v-if="userInfo.PHONE">{{userInfo.PHONE}}</text>
|
||||||
<!-- <text>|</text>
|
<!-- <text>|</text>
|
||||||
<text>工号:{{userInfo.CODE}}</text> -->
|
<text>工号:{{userInfo.CODE}}</text> -->
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -86,9 +86,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="data-wrap">
|
<!-- <view class="data-wrap">
|
||||||
<view class="data-title">
|
<view class="data-title">
|
||||||
<!-- <view class="data-badge" style="background-color: #3CA272"></view> -->
|
|
||||||
<text class="data-text">个人学时</text>
|
<text class="data-text">个人学时</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;flex-direction: row;align-items: flex-end;">
|
<view style="display: flex;flex-direction: row;align-items: flex-end;">
|
||||||
@ -96,7 +95,7 @@
|
|||||||
<view style="font-size: 12px;margin-bottom: 3px;margin-left: 2px;"></view>
|
<view style="font-size: 12px;margin-bottom: 3px;margin-left: 2px;"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -137,7 +136,7 @@
|
|||||||
<view class="per-title">
|
<view class="per-title">
|
||||||
<!-- <view :class="chooseIndex === true? 'personal-choose':'personal'" @click="changePerIndex">个人绩效</view> -->
|
<!-- <view :class="chooseIndex === true? 'personal-choose':'personal'" @click="changePerIndex">个人绩效</view> -->
|
||||||
<view class="tissue-choose">组织绩效</view>
|
<view class="tissue-choose">组织绩效</view>
|
||||||
<view class="tissue-pro" @click="changePicker">
|
<!-- <view class="tissue-pro" @click="changePicker">
|
||||||
<view>
|
<view>
|
||||||
<view class="production" v-if="MineType === '10'">生产单元:选矿厂</view>
|
<view class="production" v-if="MineType === '10'">生产单元:选矿厂</view>
|
||||||
<view class="production" v-if="MineType === '20'">生产单元:尾矿库</view>
|
<view class="production" v-if="MineType === '20'">生产单元:尾矿库</view>
|
||||||
@ -146,11 +145,11 @@
|
|||||||
<view class="production" v-if="MineType==null">生产单元:{{columns[0][0]}}</view>
|
<view class="production" v-if="MineType==null">生产单元:{{columns[0][0]}}</view>
|
||||||
|
|
||||||
<u-icon name="arrow-down" size="12"></u-icon>
|
<u-icon name="arrow-down" size="12"></u-icon>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="performance">
|
<view class="performance">
|
||||||
<view>
|
<view>
|
||||||
<view class="standard-content">
|
<!-- <view class="standard-content">
|
||||||
<view class="standard-wrap">
|
<view class="standard-wrap">
|
||||||
<view class="standard-left">
|
<view class="standard-left">
|
||||||
<view>标准化得分</view>
|
<view>标准化得分</view>
|
||||||
@ -163,7 +162,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="line-chart">
|
<view class="line-chart">
|
||||||
<view class="line-chart-title">
|
<view class="line-chart-title">
|
||||||
@ -175,7 +174,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>
|
||||||
班组活动完成率
|
班组活动完成率
|
||||||
@ -195,7 +194,7 @@
|
|||||||
<qiun-data-charts type="bar" :opts="workOpts" :chartData="workChartData" />
|
<qiun-data-charts type="bar" :opts="workOpts" :chartData="workChartData" />
|
||||||
</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>
|
||||||
@ -223,20 +222,20 @@
|
|||||||
</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>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getChartData,
|
// getChartData,
|
||||||
getStandardScore,
|
// getStandardScore,
|
||||||
getRiskLevel,
|
getRiskLevel,
|
||||||
getClassActive,
|
getClassActive,
|
||||||
getWorkTicket,
|
getWorkTicket,
|
||||||
getDangerTotal,
|
getDangerTotal,
|
||||||
getTrainHours
|
// getTrainHours
|
||||||
} from '../../services/app'
|
} from '../../services/app'
|
||||||
import {
|
import {
|
||||||
initFilter,
|
initFilter,
|
||||||
@ -296,8 +295,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MineType: '',
|
// MineType: '',
|
||||||
MineCurrentType: '',
|
// MineCurrentType: '',
|
||||||
localMintype: [],
|
localMintype: [],
|
||||||
standardScore: 0,
|
standardScore: 0,
|
||||||
openPerson: true,
|
openPerson: true,
|
||||||
@ -461,8 +460,8 @@
|
|||||||
// this.getWordServerData();
|
// this.getWordServerData();
|
||||||
},
|
},
|
||||||
async onShow() {
|
async onShow() {
|
||||||
this.getTrainHours()
|
// this.getTrainHours()
|
||||||
this.MineType = uni.getStorageSync('MineType')
|
// this.MineType = uni.getStorageSync('MineType')
|
||||||
// this.MineCurrentType =uni.getStorageSync('MineType')
|
// this.MineCurrentType =uni.getStorageSync('MineType')
|
||||||
const orgId = uni.getStorageSync('orgId')
|
const orgId = uni.getStorageSync('orgId')
|
||||||
const {
|
const {
|
||||||
@ -471,35 +470,35 @@
|
|||||||
|
|
||||||
|
|
||||||
let newarr = [];
|
let newarr = [];
|
||||||
if (User.MineType) {
|
// if (User.MineType) {
|
||||||
this.localMintype = User.MineType.split(",");
|
// this.localMintype = User.MineType.split(",");
|
||||||
if (this.localMintype.length !== 0) {
|
// if (this.localMintype.length !== 0) {
|
||||||
if (uni.getStorageSync('MineType') == '') {
|
// if (uni.getStorageSync('MineType') == '') {
|
||||||
uni.setStorageSync('MineType', this.localMintype[0])
|
// uni.setStorageSync('MineType', this.localMintype[0])
|
||||||
this.MineType = this.localMintype[0]
|
// this.MineType = this.localMintype[0]
|
||||||
// this.MineType = this.localMintype[0]
|
// // this.MineType = this.localMintype[0]
|
||||||
}
|
// }
|
||||||
if (User.MineType.split(",").indexOf("10") > -1) {
|
// if (User.MineType.split(",").indexOf("10") > -1) {
|
||||||
newarr.push('选矿厂')
|
// newarr.push('选矿厂')
|
||||||
this.columns = [newarr]
|
// this.columns = [newarr]
|
||||||
}
|
// }
|
||||||
if (User.MineType.split(",").indexOf("20") > -1) {
|
// if (User.MineType.split(",").indexOf("20") > -1) {
|
||||||
|
|
||||||
newarr.push('尾矿库')
|
// newarr.push('尾矿库')
|
||||||
this.columns = [newarr]
|
// this.columns = [newarr]
|
||||||
}
|
// }
|
||||||
if (User.MineType.split(",").indexOf("30") > -1) {
|
// if (User.MineType.split(",").indexOf("30") > -1) {
|
||||||
newarr.push('露天矿')
|
// newarr.push('露天矿')
|
||||||
this.columns = [newarr]
|
// this.columns = [newarr]
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (this.MineType === '10' || this.MineType === '20') {
|
// if (this.MineType === '10' || this.MineType === '20') {
|
||||||
this.MineCurrentType = '10'
|
// this.MineCurrentType = '10'
|
||||||
} else {
|
// } else {
|
||||||
this.MineCurrentType = '30'
|
// this.MineCurrentType = '30'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
const curDate = new Date()
|
const curDate = new Date()
|
||||||
const curYear = curDate.getFullYear()
|
const curYear = curDate.getFullYear()
|
||||||
@ -516,30 +515,30 @@
|
|||||||
|
|
||||||
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);
|
||||||
const res = await getChartData(json)
|
// const res = await getChartData(json)
|
||||||
if (res.IsSuccessful) {
|
// if (res.IsSuccessful) {
|
||||||
this.chartData = res.Data
|
// this.chartData = res.Data
|
||||||
const preLineChartData = (res.Data?.groupDataLine || []).splice(-6, 6)
|
// const preLineChartData = (res.Data?.groupDataLine || []).splice(-6, 6)
|
||||||
const lineChartConfig = {
|
// const lineChartConfig = {
|
||||||
categories: preLineChartData.map(i => i.MONTHStr.split('年')[1]),
|
// categories: preLineChartData.map(i => i.MONTHStr.split('年')[1]),
|
||||||
series: [{
|
// series: [{
|
||||||
name: "完成率",
|
// name: "完成率",
|
||||||
data: preLineChartData.map(i => i.FINISH_RATE)
|
// data: preLineChartData.map(i => i.FINISH_RATE)
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: "及时完成率",
|
// name: "及时完成率",
|
||||||
data: preLineChartData.map(i => i.NORMAL_FINISH_RATE)
|
// data: preLineChartData.map(i => i.NORMAL_FINISH_RATE)
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
}
|
// }
|
||||||
this.lineChartData = JSON.parse(JSON.stringify(lineChartConfig));
|
// this.lineChartData = JSON.parse(JSON.stringify(lineChartConfig));
|
||||||
this.tableData = res.Data?.groupData || []
|
// this.tableData = res.Data?.groupData || []
|
||||||
}
|
// }
|
||||||
this.getStandard()
|
// this.getStandard()
|
||||||
this.getRiskLevel()
|
this.getRiskLevel()
|
||||||
this.getClassActive()
|
// this.getClassActive()
|
||||||
this.getWorkTicket()
|
// this.getWorkTicket()
|
||||||
this.getDangerTotal()
|
this.getDangerTotal()
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -550,29 +549,29 @@
|
|||||||
changeOpen() {
|
changeOpen() {
|
||||||
this.openPerson = !this.openPerson
|
this.openPerson = !this.openPerson
|
||||||
},
|
},
|
||||||
confirm(e) {
|
// confirm(e) {
|
||||||
this.modalShow = false
|
// this.modalShow = false
|
||||||
if (e.value[0] === '选矿厂') {
|
// if (e.value[0] === '选矿厂') {
|
||||||
uni.setStorageSync('MineType', '10')
|
// // uni.setStorageSync('MineType', '10')
|
||||||
uni.reLaunch({
|
// uni.reLaunch({
|
||||||
url: '/pages/performance/index1'
|
// url: '/pages/performance/index1'
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
if (e.value[0] === '尾矿库') {
|
// if (e.value[0] === '尾矿库') {
|
||||||
uni.setStorageSync('MineType', '20')
|
// uni.setStorageSync('MineType', '20')
|
||||||
uni.reLaunch({
|
// uni.reLaunch({
|
||||||
url: '/pages/performance/index1'
|
// url: '/pages/performance/index1'
|
||||||
})
|
// })
|
||||||
|
|
||||||
}
|
// }
|
||||||
if (e.value[0] === '露天矿') {
|
// if (e.value[0] === '露天矿') {
|
||||||
uni.setStorageSync('MineType', '30')
|
// uni.setStorageSync('MineType', '30')
|
||||||
uni.reLaunch({
|
// uni.reLaunch({
|
||||||
url: '/pages/performance/index1'
|
// url: '/pages/performance/index1'
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
},
|
// },
|
||||||
cancel() {
|
cancel() {
|
||||||
this.modalShow = false
|
this.modalShow = false
|
||||||
},
|
},
|
||||||
@ -587,20 +586,20 @@
|
|||||||
this.trainHours = nums.toFixed(2)
|
this.trainHours = nums.toFixed(2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getStandard() {
|
// async getStandard() {
|
||||||
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) {
|
||||||
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);
|
||||||
}
|
// }
|
||||||
|
|
||||||
},
|
// },
|
||||||
async getRiskLevel() {
|
async getRiskLevel() {
|
||||||
const orgId = uni.getStorageSync('orgId')
|
const orgId = uni.getStorageSync('orgId')
|
||||||
let json = initFilter(orgId);
|
let json = initFilter(orgId);
|
||||||
extendOrder(json, "CREATE_TIME", 0);
|
extendOrder(json, "CREATE_TIME", 0);
|
||||||
extendRule(json, "COLOR", 1, this.MineCurrentType);
|
// extendRule(json, "COLOR", 1, );
|
||||||
const res = await getRiskLevel(json)
|
const res = await getRiskLevel(json)
|
||||||
if (res.IsSuccessful) {
|
if (res.IsSuccessful) {
|
||||||
let riskLevel = [];
|
let riskLevel = [];
|
||||||
@ -673,7 +672,7 @@
|
|||||||
const orgId = uni.getStorageSync('orgId')
|
const orgId = uni.getStorageSync('orgId')
|
||||||
let json = initFilter(
|
let json = initFilter(
|
||||||
orgId,
|
orgId,
|
||||||
this.MineCurrentType,
|
'',
|
||||||
"NUM",
|
"NUM",
|
||||||
"desc",
|
"desc",
|
||||||
undefined,
|
undefined,
|
||||||
@ -706,7 +705,7 @@
|
|||||||
const orgId = uni.getStorageSync('orgId')
|
const orgId = uni.getStorageSync('orgId')
|
||||||
let json = initFilter(
|
let json = initFilter(
|
||||||
orgId,
|
orgId,
|
||||||
this.MineCurrentType,
|
'',
|
||||||
"NUM",
|
"NUM",
|
||||||
"desc",
|
"desc",
|
||||||
);
|
);
|
||||||
@ -742,7 +741,7 @@
|
|||||||
const orgId = uni.getStorageSync('orgId')
|
const orgId = uni.getStorageSync('orgId')
|
||||||
let json = initFilter(
|
let json = initFilter(
|
||||||
orgId,
|
orgId,
|
||||||
this.MineCurrentType,
|
'30',
|
||||||
"NUM",
|
"NUM",
|
||||||
);
|
);
|
||||||
const res = await getDangerTotal(json)
|
const res = await getDangerTotal(json)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export default {
|
|||||||
// const user = uni.getStorageSync('loginUserVerify')
|
// const user = uni.getStorageSync('loginUserVerify')
|
||||||
// const RootOrgId = uni.getStorageSync('RootOrgId')
|
// const RootOrgId = uni.getStorageSync('RootOrgId')
|
||||||
const appInfoData = uni.getStorageSync('appInfo')
|
const appInfoData = uni.getStorageSync('appInfo')
|
||||||
const tenant = uni.getStorageSync('Tenant') || ''
|
const tenant = uni.getStorageSync('Tenant') || '01'
|
||||||
const userId = appInfoData?.User?.ID || ''
|
const userId = appInfoData?.User?.ID || ''
|
||||||
const userName = appInfoData?.User?.NAME || ''
|
const userName = appInfoData?.User?.NAME || ''
|
||||||
const orgId = appInfoData?.User?.ORG_ID || ''
|
const orgId = appInfoData?.User?.ORG_ID || ''
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user