|
@@ -22,7 +22,7 @@
|
|
|
<view class="scroll-view-item_H">
|
|
<view class="scroll-view-item_H">
|
|
|
<text
|
|
<text
|
|
|
class="status-txt"
|
|
class="status-txt"
|
|
|
- :class="{ 'stauts-sel': statusFilter === '' }"
|
|
|
|
|
|
|
+ :class="{ 'stauts-sel': statusFilter == '' }"
|
|
|
@click="filterByStatus('')"
|
|
@click="filterByStatus('')"
|
|
|
>
|
|
>
|
|
|
全部
|
|
全部
|
|
@@ -31,7 +31,7 @@
|
|
|
<view class="scroll-view-item_H">
|
|
<view class="scroll-view-item_H">
|
|
|
<text
|
|
<text
|
|
|
class="status-txt"
|
|
class="status-txt"
|
|
|
- :class="{ 'stauts-sel': statusFilter === 'to_self' }"
|
|
|
|
|
|
|
+ :class="{ 'stauts-sel': statusFilter == 'to_self' }"
|
|
|
@click="filterByStatus('to_self')"
|
|
@click="filterByStatus('to_self')"
|
|
|
>
|
|
>
|
|
|
待自评
|
|
待自评
|
|
@@ -40,7 +40,7 @@
|
|
|
<view class="scroll-view-item_H">
|
|
<view class="scroll-view-item_H">
|
|
|
<text
|
|
<text
|
|
|
class="status-txt"
|
|
class="status-txt"
|
|
|
- :class="{ 'stauts-sel': statusFilter === 'to_re' }"
|
|
|
|
|
|
|
+ :class="{ 'stauts-sel': statusFilter == 'to_re' }"
|
|
|
@click="filterByStatus('to_re')"
|
|
@click="filterByStatus('to_re')"
|
|
|
>
|
|
>
|
|
|
待复评
|
|
待复评
|
|
@@ -50,7 +50,7 @@
|
|
|
<view class="scroll-view-item_H">
|
|
<view class="scroll-view-item_H">
|
|
|
<text
|
|
<text
|
|
|
class="status-txt"
|
|
class="status-txt"
|
|
|
- :class="{ 'stauts-sel': statusFilter === 'returned' }"
|
|
|
|
|
|
|
+ :class="{ 'stauts-sel': statusFilter == 'returned' }"
|
|
|
@click="filterByStatus('returned')"
|
|
@click="filterByStatus('returned')"
|
|
|
>
|
|
>
|
|
|
已退回
|
|
已退回
|
|
@@ -59,7 +59,7 @@
|
|
|
<view class="scroll-view-item_H">
|
|
<view class="scroll-view-item_H">
|
|
|
<text
|
|
<text
|
|
|
class="status-txt"
|
|
class="status-txt"
|
|
|
- :class="{ 'stauts-sel': statusFilter === 'to_final' }"
|
|
|
|
|
|
|
+ :class="{ 'stauts-sel': statusFilter == 'to_final' }"
|
|
|
@click="filterByStatus('to_final')"
|
|
@click="filterByStatus('to_final')"
|
|
|
>
|
|
>
|
|
|
待终评
|
|
待终评
|
|
@@ -68,7 +68,7 @@
|
|
|
<view class="scroll-view-item_H">
|
|
<view class="scroll-view-item_H">
|
|
|
<text
|
|
<text
|
|
|
class="status-txt"
|
|
class="status-txt"
|
|
|
- :class="{ 'stauts-sel': statusFilter === 'appealing' }"
|
|
|
|
|
|
|
+ :class="{ 'stauts-sel': statusFilter == 'appealing' }"
|
|
|
@click="filterByStatus('appealing')"
|
|
@click="filterByStatus('appealing')"
|
|
|
>
|
|
>
|
|
|
申诉中
|
|
申诉中
|
|
@@ -76,7 +76,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<text
|
|
<text
|
|
|
class="status-txt"
|
|
class="status-txt"
|
|
|
- :class="{ 'stauts-sel': statusFilter === 'to_confirm' }"
|
|
|
|
|
|
|
+ :class="{ 'stauts-sel': statusFilter == 'to_confirm' }"
|
|
|
@click="filterByStatus('to_confirm')"
|
|
@click="filterByStatus('to_confirm')"
|
|
|
>
|
|
>
|
|
|
待确认
|
|
待确认
|
|
@@ -89,21 +89,21 @@
|
|
|
<view class="stats-tabs">
|
|
<view class="stats-tabs">
|
|
|
<text
|
|
<text
|
|
|
class="tab-item"
|
|
class="tab-item"
|
|
|
- :class="{ 'tab-active': activeTab === 'ranking' }"
|
|
|
|
|
|
|
+ :class="{ 'tab-active': activeTab == 'ranking' }"
|
|
|
@click="switchTab('ranking')"
|
|
@click="switchTab('ranking')"
|
|
|
>
|
|
>
|
|
|
个人排名
|
|
个人排名
|
|
|
</text>
|
|
</text>
|
|
|
<text
|
|
<text
|
|
|
class="tab-item"
|
|
class="tab-item"
|
|
|
- :class="{ 'tab-active': activeTab === 'score' }"
|
|
|
|
|
|
|
+ :class="{ 'tab-active': activeTab == 'score' }"
|
|
|
@click="switchTab('score')"
|
|
@click="switchTab('score')"
|
|
|
>
|
|
>
|
|
|
月度工分
|
|
月度工分
|
|
|
</text>
|
|
</text>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 个人排名内容 -->
|
|
<!-- 个人排名内容 -->
|
|
|
- <view v-if="activeTab === 'ranking'" class="ranking-content">
|
|
|
|
|
|
|
+ <view v-if="activeTab == 'ranking'" class="ranking-content">
|
|
|
<!-- 排名模块 -->
|
|
<!-- 排名模块 -->
|
|
|
<view v-if="rankingItems.length > 0">
|
|
<view v-if="rankingItems.length > 0">
|
|
|
<view class="ranking-item-wrapper" v-for="(item, index) in rankingItems" :key="index">
|
|
<view class="ranking-item-wrapper" v-for="(item, index) in rankingItems" :key="index">
|
|
@@ -123,14 +123,14 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 月度工分内容 -->
|
|
<!-- 月度工分内容 -->
|
|
|
- <view v-if="activeTab === 'score'" class="score-content">
|
|
|
|
|
|
|
+ <view v-if="activeTab == 'score'" class="score-content">
|
|
|
<view class="stats-header">
|
|
<view class="stats-header">
|
|
|
<text class="stats-title">{{ monthTitle }}月度工分</text>
|
|
<text class="stats-title">{{ monthTitle }}月度工分</text>
|
|
|
<view class="month-filters">
|
|
<view class="month-filters">
|
|
|
<view class="month-tab">
|
|
<view class="month-tab">
|
|
|
<text
|
|
<text
|
|
|
class="month-filter"
|
|
class="month-filter"
|
|
|
- :class="{ 'month-filter-sel': selectedMonth === 'prev' }"
|
|
|
|
|
|
|
+ :class="{ 'month-filter-sel': selectedMonth == 'prev' }"
|
|
|
@click="changeMonth('prev')"
|
|
@click="changeMonth('prev')"
|
|
|
>
|
|
>
|
|
|
上月
|
|
上月
|
|
@@ -139,7 +139,7 @@
|
|
|
<view class="month-tab">
|
|
<view class="month-tab">
|
|
|
<text
|
|
<text
|
|
|
class="month-filter"
|
|
class="month-filter"
|
|
|
- :class="{ 'month-filter-sel': selectedMonth === 'current' }"
|
|
|
|
|
|
|
+ :class="{ 'month-filter-sel': selectedMonth == 'current' }"
|
|
|
@click="changeMonth('current')"
|
|
@click="changeMonth('current')"
|
|
|
>
|
|
>
|
|
|
本月
|
|
本月
|
|
@@ -148,7 +148,7 @@
|
|
|
<view class="month-tab">
|
|
<view class="month-tab">
|
|
|
<text
|
|
<text
|
|
|
class="month-filter"
|
|
class="month-filter"
|
|
|
- :class="{ 'month-filter-sel': selectedMonth === 'custom' }"
|
|
|
|
|
|
|
+ :class="{ 'month-filter-sel': selectedMonth == 'custom' }"
|
|
|
@click="showCustomDatePicker"
|
|
@click="showCustomDatePicker"
|
|
|
>
|
|
>
|
|
|
自定义
|
|
自定义
|
|
@@ -216,16 +216,16 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="btn-group">
|
|
<view class="btn-group">
|
|
|
<view
|
|
<view
|
|
|
- v-if="getPropertyValue(item, 'scoringStatus') == 'to_self' || getPropertyValue(item, 'scoringStatus') == 'returned'"
|
|
|
|
|
|
|
+ v-if="canHandleScore(item, 'to_self')"
|
|
|
class="btn-primary info-value"
|
|
class="btn-primary info-value"
|
|
|
- @click.stop="handleScoreClick(item, 'self')"
|
|
|
|
|
|
|
+ @click.stop="handleScoreClick(item, 'to_self')"
|
|
|
>
|
|
>
|
|
|
<text class="btn-text">自评</text>
|
|
<text class="btn-text">自评</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view
|
|
<view
|
|
|
- v-if="getPropertyValue(item, 'scoringStatus') == 'to_re'"
|
|
|
|
|
|
|
+ v-if="canHandleScore(item, 'to_re')"
|
|
|
class="btn-primary info-value"
|
|
class="btn-primary info-value"
|
|
|
- @click.stop="handleScoreClick(item, 're')"
|
|
|
|
|
|
|
+ @click.stop="handleScoreClick(item, 'to_re')"
|
|
|
>
|
|
>
|
|
|
<text class="btn-text">复评</text>
|
|
<text class="btn-text">复评</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -282,7 +282,7 @@
|
|
|
import { getDictDataByType } from '@/api/dict/index'
|
|
import { getDictDataByType } from '@/api/dict/index'
|
|
|
import { selectHomePageData } from '@/api/index/index'
|
|
import { selectHomePageData } from '@/api/index/index'
|
|
|
import type { SysDictData } from '@/types/dict'
|
|
import type { SysDictData } from '@/types/dict'
|
|
|
- import {checkPermi} from '../../utils/storage'
|
|
|
|
|
|
|
+ import {checkPermi, getUserInfo} from '../../utils/storage'
|
|
|
|
|
|
|
|
// 数据状态
|
|
// 数据状态
|
|
|
const searchKeyword = ref<string>('')
|
|
const searchKeyword = ref<string>('')
|
|
@@ -299,6 +299,10 @@
|
|
|
const rank = ref<number | null>(null)
|
|
const rank = ref<number | null>(null)
|
|
|
const totalRankingUsers = ref<number | null>(null)
|
|
const totalRankingUsers = ref<number | null>(null)
|
|
|
const customDate = ref<string>('')
|
|
const customDate = ref<string>('')
|
|
|
|
|
+
|
|
|
|
|
+ // 用户信息
|
|
|
|
|
+ const userId = ref<string>("")
|
|
|
|
|
+ const roles = ref<string>('')
|
|
|
|
|
|
|
|
// 新增:标签切换相关
|
|
// 新增:标签切换相关
|
|
|
const activeTab = ref<string>('ranking') // 默认显示个人排名
|
|
const activeTab = ref<string>('ranking') // 默认显示个人排名
|
|
@@ -399,7 +403,7 @@
|
|
|
|
|
|
|
|
// 部门排名(东山电场)
|
|
// 部门排名(东山电场)
|
|
|
if (data.hasOwnProperty('deptSort') && data.hasOwnProperty('scoreDept')) {
|
|
if (data.hasOwnProperty('deptSort') && data.hasOwnProperty('scoreDept')) {
|
|
|
- const deptSort = typeof data['deptSort'] === 'number' ? data['deptSort'] as number : 0;
|
|
|
|
|
|
|
+ const deptSort = typeof data['deptSort'] == 'number' ? data['deptSort'] as number : 0;
|
|
|
const scoreDept = Array.isArray(data['scoreDept']) ? data['scoreDept'] as any[] : [];
|
|
const scoreDept = Array.isArray(data['scoreDept']) ? data['scoreDept'] as any[] : [];
|
|
|
// 只有当部门排序大于0且scoreDept数组不为空时才添加
|
|
// 只有当部门排序大于0且scoreDept数组不为空时才添加
|
|
|
if (deptSort > 0 && scoreDept.length > 0) {
|
|
if (deptSort > 0 && scoreDept.length > 0) {
|
|
@@ -413,7 +417,7 @@
|
|
|
|
|
|
|
|
// 中心排名(陆上设备维护中心)
|
|
// 中心排名(陆上设备维护中心)
|
|
|
if (data.hasOwnProperty('centerSort') && data.hasOwnProperty('scoreCenter')) {
|
|
if (data.hasOwnProperty('centerSort') && data.hasOwnProperty('scoreCenter')) {
|
|
|
- const centerSort = typeof data['centerSort'] === 'number' ? data['centerSort'] as number : 0;
|
|
|
|
|
|
|
+ const centerSort = typeof data['centerSort'] == 'number' ? data['centerSort'] as number : 0;
|
|
|
const scoreCenter = Array.isArray(data['scoreCenter']) ? data['scoreCenter'] as any[] : [];
|
|
const scoreCenter = Array.isArray(data['scoreCenter']) ? data['scoreCenter'] as any[] : [];
|
|
|
// 只有当中心排序大于0且scoreCenter数组不为空时才添加
|
|
// 只有当中心排序大于0且scoreCenter数组不为空时才添加
|
|
|
if (centerSort > 0 && scoreCenter.length > 0) {
|
|
if (centerSort > 0 && scoreCenter.length > 0) {
|
|
@@ -427,7 +431,7 @@
|
|
|
|
|
|
|
|
// 公司排名
|
|
// 公司排名
|
|
|
if (data.hasOwnProperty('companySort') && data.hasOwnProperty('scoreCompany')) {
|
|
if (data.hasOwnProperty('companySort') && data.hasOwnProperty('scoreCompany')) {
|
|
|
- const companySort = typeof data['companySort'] === 'number' ? data['companySort'] as number : 0;
|
|
|
|
|
|
|
+ const companySort = typeof data['companySort'] == 'number' ? data['companySort'] as number : 0;
|
|
|
const scoreCompany = Array.isArray(data['scoreCompany']) ? data['scoreCompany'] as any[] : [];
|
|
const scoreCompany = Array.isArray(data['scoreCompany']) ? data['scoreCompany'] as any[] : [];
|
|
|
// 只有当公司排序大于0且scoreCompany数组不为空时才添加
|
|
// 只有当公司排序大于0且scoreCompany数组不为空时才添加
|
|
|
if (companySort > 0 && scoreCompany.length > 0) {
|
|
if (companySort > 0 && scoreCompany.length > 0) {
|
|
@@ -452,7 +456,7 @@
|
|
|
activeTab.value = tab;
|
|
activeTab.value = tab;
|
|
|
|
|
|
|
|
// 当切换到个人排名标签时,获取排名数据
|
|
// 当切换到个人排名标签时,获取排名数据
|
|
|
- if (tab === 'ranking') {
|
|
|
|
|
|
|
+ if (tab == 'ranking') {
|
|
|
fetchRankingData();
|
|
fetchRankingData();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -693,16 +697,16 @@
|
|
|
function getStatistics() {
|
|
function getStatistics() {
|
|
|
// Convert 'current' and 'prev' values to actual date strings
|
|
// Convert 'current' and 'prev' values to actual date strings
|
|
|
let monthValue = '';
|
|
let monthValue = '';
|
|
|
- if (selectedMonth.value === 'custom') {
|
|
|
|
|
|
|
+ if (selectedMonth.value == 'custom') {
|
|
|
monthValue = customDate.value;
|
|
monthValue = customDate.value;
|
|
|
- } else if (selectedMonth.value === 'current') {
|
|
|
|
|
|
|
+ } else if (selectedMonth.value == 'current') {
|
|
|
const now = new Date();
|
|
const now = new Date();
|
|
|
monthValue = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}`;
|
|
monthValue = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}`;
|
|
|
- } else if (selectedMonth.value === 'prev') {
|
|
|
|
|
|
|
+ } else if (selectedMonth.value == 'prev') {
|
|
|
const now = new Date();
|
|
const now = new Date();
|
|
|
const prevMonth = now.getMonth(); // getMonth() returns 0-11
|
|
const prevMonth = now.getMonth(); // getMonth() returns 0-11
|
|
|
- const prevYear = prevMonth === 0 ? now.getFullYear() - 1 : now.getFullYear();
|
|
|
|
|
- const monthStr = prevMonth === 0 ? '12' : prevMonth.toString().padStart(2, '0');
|
|
|
|
|
|
|
+ const prevYear = prevMonth == 0 ? now.getFullYear() - 1 : now.getFullYear();
|
|
|
|
|
+ const monthStr = prevMonth == 0 ? '12' : prevMonth.toString().padStart(2, '0');
|
|
|
monthValue = `${prevYear}-${monthStr}`;
|
|
monthValue = `${prevYear}-${monthStr}`;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -774,9 +778,9 @@
|
|
|
|
|
|
|
|
// Convert 'current' and 'prev' values to actual date strings
|
|
// Convert 'current' and 'prev' values to actual date strings
|
|
|
let monthValue = '';
|
|
let monthValue = '';
|
|
|
- if (selectedMonth.value === 'custom') {
|
|
|
|
|
|
|
+ if (selectedMonth.value == 'custom') {
|
|
|
monthValue = customDate.value;
|
|
monthValue = customDate.value;
|
|
|
- } else if (selectedMonth.value === 'current') {
|
|
|
|
|
|
|
+ } else if (selectedMonth.value == 'current') {
|
|
|
const now = new Date();
|
|
const now = new Date();
|
|
|
const m = now.getMonth() + 1
|
|
const m = now.getMonth() + 1
|
|
|
let mStr = m.toString()
|
|
let mStr = m.toString()
|
|
@@ -784,11 +788,11 @@
|
|
|
mStr = '0' + mStr
|
|
mStr = '0' + mStr
|
|
|
}
|
|
}
|
|
|
monthValue = `${now.getFullYear()}-${mStr}`;
|
|
monthValue = `${now.getFullYear()}-${mStr}`;
|
|
|
- } else if (selectedMonth.value === 'prev') {
|
|
|
|
|
|
|
+ } else if (selectedMonth.value == 'prev') {
|
|
|
const now = new Date();
|
|
const now = new Date();
|
|
|
const prevMonth = now.getMonth(); // getMonth() returns 0-11
|
|
const prevMonth = now.getMonth(); // getMonth() returns 0-11
|
|
|
- const prevYear = prevMonth === 0 ? now.getFullYear() - 1 : now.getFullYear();
|
|
|
|
|
- let monthStr = prevMonth === 0 ? '12' : prevMonth.toString()
|
|
|
|
|
|
|
+ const prevYear = prevMonth == 0 ? now.getFullYear() - 1 : now.getFullYear();
|
|
|
|
|
+ let monthStr = prevMonth == 0 ? '12' : prevMonth.toString()
|
|
|
if (prevMonth !== 0 && prevMonth < 10) {
|
|
if (prevMonth !== 0 && prevMonth < 10) {
|
|
|
monthStr = '0' + monthStr
|
|
monthStr = '0' + monthStr
|
|
|
}
|
|
}
|
|
@@ -1014,12 +1018,12 @@
|
|
|
const idStr = '' + id
|
|
const idStr = '' + id
|
|
|
const orderTypeStr = '' + orderType
|
|
const orderTypeStr = '' + orderType
|
|
|
|
|
|
|
|
- if (operationType === 'self') {
|
|
|
|
|
|
|
+ if (operationType == 'to_self') {
|
|
|
// 自评操作:跳转到自评页面
|
|
// 自评操作:跳转到自评页面
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: `/pages/score/detail/selfEvaluate?id=${idStr}&orderType=${orderTypeStr}`
|
|
url: `/pages/score/detail/selfEvaluate?id=${idStr}&orderType=${orderTypeStr}`
|
|
|
})
|
|
})
|
|
|
- } else if (operationType === 're') {
|
|
|
|
|
|
|
+ } else if (operationType == 'to_re') {
|
|
|
// 复评操作:跳转到复评页面
|
|
// 复评操作:跳转到复评页面
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: `/pages/score/detail/reEvaluate?id=${idStr}&orderType=${orderTypeStr}`
|
|
url: `/pages/score/detail/reEvaluate?id=${idStr}&orderType=${orderTypeStr}`
|
|
@@ -1032,22 +1036,33 @@
|
|
|
function canHandleScore(item: any | null, operationType: string): boolean {
|
|
function canHandleScore(item: any | null, operationType: string): boolean {
|
|
|
if (item == null) return false
|
|
if (item == null) return false
|
|
|
|
|
|
|
|
|
|
+ let permit: string[] = []
|
|
|
|
|
+ const orderItem = item as UTSJSONObject
|
|
|
const scoringStatus = getPropertyValue(item, 'scoringStatus')
|
|
const scoringStatus = getPropertyValue(item, 'scoringStatus')
|
|
|
|
|
+ const orderType = getPropertyValue(item, 'orderType')
|
|
|
|
|
+ const teamLeaderId = parseInt(getPropertyValue(item, 'teamLeaderId'))
|
|
|
|
|
|
|
|
- // 根据评分状态和操作类型决定是否显示操作按钮
|
|
|
|
|
- if (operationType === 'self' && (scoringStatus === 'to_self' || scoringStatus === 'returned')) {
|
|
|
|
|
- // 自评操作:状态为to_self或returned时显示
|
|
|
|
|
- return true
|
|
|
|
|
- } else if (operationType === 're' && scoringStatus === 'to_re') {
|
|
|
|
|
- // 复评操作:状态为to_re时显示
|
|
|
|
|
- return true
|
|
|
|
|
|
|
+ // 根据评分状态和操作类型决定权限
|
|
|
|
|
+ if (scoringStatus == 'to_self' || scoringStatus == 'returned') {
|
|
|
|
|
+ // 自评权限
|
|
|
|
|
+ if (operationType == 'to_self' && (teamLeaderId == parseInt(userId.value) || roles.value.includes("管理员"))) {
|
|
|
|
|
+ permit = ['gxt:orderScore:selfEvaluation']
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (scoringStatus == 'to_re') {
|
|
|
|
|
+ // 复评权限
|
|
|
|
|
+ if (operationType == 'to_re') {
|
|
|
|
|
+ permit = ['gxt:orderScore:review']
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return false
|
|
|
|
|
|
|
+ // 检查权限
|
|
|
|
|
+ return checkPermi(permit)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function formatNumber(value: number | null) {
|
|
function formatNumber(value: number | null) {
|
|
|
- if (value === null) return '0.0'
|
|
|
|
|
|
|
+ if (value == null) return '0.0'
|
|
|
return value.toFixed(2)
|
|
return value.toFixed(2)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1076,6 +1091,14 @@
|
|
|
// 检查权限设置tabbar
|
|
// 检查权限设置tabbar
|
|
|
tabbar[2] = checkPermi(['gxt:app:worktime']) ? 1 : 0
|
|
tabbar[2] = checkPermi(['gxt:app:worktime']) ? 1 : 0
|
|
|
tabbar[3] = checkPermi(['gxt:app:score']) ? 1 : 0
|
|
tabbar[3] = checkPermi(['gxt:app:score']) ? 1 : 0
|
|
|
|
|
+
|
|
|
|
|
+ // 获取用户信息
|
|
|
|
|
+ const userInfo = getUserInfo()
|
|
|
|
|
+ if (userInfo != null) {
|
|
|
|
|
+ const userIdStr = userInfo['userId'].toString()
|
|
|
|
|
+ userId.value = userIdStr
|
|
|
|
|
+ roles.value = userInfo['roleNames'].toString()
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
loadStatusDictList()
|
|
loadStatusDictList()
|
|
|
loadInspectionTypeDictList()
|
|
loadInspectionTypeDictList()
|
|
@@ -1092,7 +1115,7 @@
|
|
|
onShow(() => {
|
|
onShow(() => {
|
|
|
// 检查是否有来自子页面的刷新标记
|
|
// 检查是否有来自子页面的刷新标记
|
|
|
const needRefresh = uni.getStorageSync('needRefresh')
|
|
const needRefresh = uni.getStorageSync('needRefresh')
|
|
|
- if (needRefresh === true) {
|
|
|
|
|
|
|
+ if (needRefresh == true) {
|
|
|
// 清除标记
|
|
// 清除标记
|
|
|
uni.removeStorageSync('needRefresh')
|
|
uni.removeStorageSync('needRefresh')
|
|
|
// 延迟执行刷新,确保页面完全加载后再刷新数据
|
|
// 延迟执行刷新,确保页面完全加载后再刷新数据
|
|
@@ -1119,9 +1142,9 @@
|
|
|
// 获取排名类型(dept, center, company)
|
|
// 获取排名类型(dept, center, company)
|
|
|
function getRankingType(index: number): string {
|
|
function getRankingType(index: number): string {
|
|
|
// 根据索引返回对应的排名类型
|
|
// 根据索引返回对应的排名类型
|
|
|
- if (index === 0) return 'dept';
|
|
|
|
|
- if (index === 1) return 'center';
|
|
|
|
|
- if (index === 2) return 'company';
|
|
|
|
|
|
|
+ if (index == 0) return 'dept';
|
|
|
|
|
+ if (index == 1) return 'center';
|
|
|
|
|
+ if (index == 2) return 'company';
|
|
|
return 'dept'; // 默认返回部门排名
|
|
return 'dept'; // 默认返回部门排名
|
|
|
}
|
|
}
|
|
|
|
|
|