|
@@ -34,6 +34,17 @@
|
|
|
<!-- 待办事项标题 -->
|
|
<!-- 待办事项标题 -->
|
|
|
<view class="todo-title-box">
|
|
<view class="todo-title-box">
|
|
|
<text class="todo-title">我的待办事项</text>
|
|
<text class="todo-title">我的待办事项</text>
|
|
|
|
|
+ <picker
|
|
|
|
|
+ class="equip-picker"
|
|
|
|
|
+ :range="equipmentOptions"
|
|
|
|
|
+ range-key="label"
|
|
|
|
|
+ @change="onEquipTypeChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ <view class="picker-value">
|
|
|
|
|
+ <text>{{ currentEquipLabel }}</text>
|
|
|
|
|
+ <text class="picker-arrow">▼</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </picker>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 待办卡片列表 -->
|
|
<!-- 待办卡片列表 -->
|
|
@@ -83,6 +94,7 @@
|
|
|
import { ref, reactive, computed, onMounted, onUnmounted } from 'vue'
|
|
import { ref, reactive, computed, onMounted, onUnmounted } from 'vue'
|
|
|
import { useUserStore } from '@/store/user'
|
|
import { useUserStore } from '@/store/user'
|
|
|
import { useConfigStore } from '@/store/config'
|
|
import { useConfigStore } from '@/store/config'
|
|
|
|
|
+import { EquipmentType } from '@/utils/dictMap'
|
|
|
import { getMajorIssuesAuditList, getTaskEquipmentList, getTaskOrder } from '@/api/task'
|
|
import { getMajorIssuesAuditList, getTaskEquipmentList, getTaskOrder } from '@/api/task'
|
|
|
import { getPendingVerificationListApi } from '@/api/pendingVerification'
|
|
import { getPendingVerificationListApi } from '@/api/pendingVerification'
|
|
|
import { getPendingPreparationListApi } from '@/api/pendingPreparation'
|
|
import { getPendingPreparationListApi } from '@/api/pendingPreparation'
|
|
@@ -113,7 +125,26 @@ const userStore = useUserStore()
|
|
|
const userInfo = computed(() => userStore.userInfo)
|
|
const userInfo = computed(() => userStore.userInfo)
|
|
|
|
|
|
|
|
const configStore = useConfigStore()
|
|
const configStore = useConfigStore()
|
|
|
-const equipType = computed(() => configStore.equipType)
|
|
|
|
|
|
|
+const equipType = computed(() => configStore.getEquipType())
|
|
|
|
|
+
|
|
|
|
|
+const equipmentOptions = [
|
|
|
|
|
+ { label: '锅炉', value: EquipmentType.BOILER },
|
|
|
|
|
+ { label: '管道', value: EquipmentType.PIPE },
|
|
|
|
|
+ // { label: '压力容器', value: EquipmentType.CONTAINER },
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
|
|
+const currentEquipLabel = computed(() => {
|
|
|
|
|
+ return equipmentOptions.find((item) => item.value === equipType.value)?.label || '请选择'
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const onEquipTypeChange = (e: any) => {
|
|
|
|
|
+ const index = e.detail.value
|
|
|
|
|
+ const selected = equipmentOptions[index]
|
|
|
|
|
+ if (selected && selected.value !== equipType.value) {
|
|
|
|
|
+ configStore.switchEquipType(selected.value)
|
|
|
|
|
+ uni.reLaunch({ url: '/pages/home/index' })
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
// 获取屏幕宽度
|
|
// 获取屏幕宽度
|
|
|
const getWindowWidth = () => {
|
|
const getWindowWidth = () => {
|
|
@@ -421,15 +452,15 @@ const capabilityList = [
|
|
|
backgroundColor: '#F6FAFE',
|
|
backgroundColor: '#F6FAFE',
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: '单位信息查询',
|
|
|
|
|
- desc: '查看全部单位信息',
|
|
|
|
|
|
|
+ title: '单位信息',
|
|
|
|
|
+ desc: '查看单位信息',
|
|
|
iconUrl: iconMap.unitQuery,
|
|
iconUrl: iconMap.unitQuery,
|
|
|
path: '/pages/unitQuery/unitQuery',
|
|
path: '/pages/unitQuery/unitQuery',
|
|
|
backgroundColor: '#FEF7F6',
|
|
backgroundColor: '#FEF7F6',
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '体系文件',
|
|
title: '体系文件',
|
|
|
- desc: '查看全部体系文件',
|
|
|
|
|
|
|
+ desc: '查看体系文件',
|
|
|
iconUrl: iconMap.systemFile,
|
|
iconUrl: iconMap.systemFile,
|
|
|
path: '/pages/systemFile/systemFile',
|
|
path: '/pages/systemFile/systemFile',
|
|
|
backgroundColor: '#F6FBF6',
|
|
backgroundColor: '#F6FBF6',
|
|
@@ -520,10 +551,35 @@ const onRefresh = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.todo-title-box {
|
|
.todo-title-box {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
padding: 20px;
|
|
padding: 20px;
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.equip-picker {
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.picker-value {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ gap: 4px;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 4px 8px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ background-color: #f5f5f5;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.picker-arrow {
|
|
|
|
|
+ font-size: 10px;
|
|
|
|
|
+ color: #999;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.todo-title {
|
|
.todo-title {
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
color: rgb(51, 51, 51);
|
|
color: rgb(51, 51, 51);
|
|
@@ -541,7 +597,7 @@ const onRefresh = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.home-section {
|
|
.home-section {
|
|
|
- padding: 0 12px;
|
|
|
|
|
|
|
+ padding: 0 12px 20px 12px;
|
|
|
margin: 10px;
|
|
margin: 10px;
|
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|
|
|
border-radius: 6px;
|
|
border-radius: 6px;
|