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