c293da23
刘淇
新园林init
|
1
|
<template>
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
2
|
<view class="page-container">
|
12e66ec8
刘淇
新增树
|
3
4
5
|
<!-- 用户信息栏 -->
<view class="user-info-bar">
<view class="user-info">
|
12e66ec8
刘淇
新增树
|
6
|
<view class="user-text">
|
e2e5221c
刘淇
验证码登录
|
7
8
|
<view class="username">你好{{ userName }}</view>
<view class="login-desc">蓟城山水全域智能运营管理平台</view>
|
12e66ec8
刘淇
新增树
|
9
10
|
</view>
</view>
|
13203a04
刘淇
首页 统计
|
11
|
<!-- <view class="msg-icon" @click="handleMsgClick" hover-class="msg-icon--hover">
|
1d3624b0
刘淇
首页。养护任务
|
12
|
<up-icon name="chat" color="#fff" size="24" />
|
578c1373
刘淇
样式优化
|
13
|
<view class="msg-badge">
|
13203a04
刘淇
首页 统计
|
14
|
<up-badge type="error" show-zero max="999" :value="msgCount"></up-badge>
|
4f475013
刘淇
k线图
|
15
|
</view>
|
13203a04
刘淇
首页 统计
|
16
|
</view> -->
|
12e66ec8
刘淇
新增树
|
17
|
</view>
|
4f475013
刘淇
k线图
|
18
|
<view class="content-wrap">
|
1d3624b0
刘淇
首页。养护任务
|
19
20
21
22
|
<!-- 图表区域 增加平滑动画容器 -->
<view class="chart-wrap" v-show="showChartArea">
<!-- 任务完成情况标题 -->
<view class="module-title">任务完成情况</view>
|
1d3624b0
刘淇
首页。养护任务
|
23
24
|
<!-- 任务完成情况卡片 -->
<view class="task-chart-card">
|
bc215493
刘淇
考勤记录
|
25
26
27
28
|
<view class="card-header">
<view class="unit-tip">数字指标</view>
<!-- ActionSheet 点击唤起 -->
<view class="sort-trigger" @click="openActionSheet">
|
13203a04
刘淇
首页 统计
|
29
|
<view class="sort-text">{{ sortLabel }}</view>
|
bc215493
刘淇
考勤记录
|
30
31
32
33
34
35
36
37
38
39
40
|
<up-icon name="arrow-down" size="14" style="margin-left:4rpx;"></up-icon>
</view>
<!-- ActionSheet组件 -->
<up-action-sheet :show="showActionSheet" :actions="actionSheetOptions" @select="handleSheetSelect"
@close="showActionSheet = false" />
<view class="date-picker-wrap">
<neo-datetime-pro v-model="dateRange" type="daterange" :clearable="false" placeholder="请选择日期范围"
@confirm="handleDateConfirm" :max-date="maxDate" @popup-show="handlePopupShow"
@popup-hide="handlePopupHide" />
</view>
</view>
|
1d3624b0
刘淇
首页。养护任务
|
41
|
<!-- 双折线K线图 -->
|
ee792d52
刘淇
动态表单
|
42
|
<!-- <view class="chart-container">
|
1d3624b0
刘淇
首页。养护任务
|
43
44
|
<uni-charts v-if="!isDatePickerOpen" type="line" :data="klineChartData" :categories="klineCategories"
:option="klineOption" :width="chartWidth" :height="chartHeight" />
|
ee792d52
刘淇
动态表单
|
45
|
</view> -->
|
bc215493
刘淇
考勤记录
|
46
47
48
49
50
51
52
|
<up-grid :border="false" col="4">
<up-grid-item v-for="(baseListItem, baseListIndex) in baseList" :key="baseListIndex">
<view class="grid-item-icon-box">
<up-icon :name="baseListItem.name" size="32" color="#1677ff"></up-icon>
<text class="grid-num-icon">{{ baseListItem.num }}</text>
<text class="grid-label-icon">{{ baseListItem.title }}</text>
</view>
|
ee792d52
刘淇
动态表单
|
53
|
</up-grid-item>
|
bc215493
刘淇
考勤记录
|
54
|
</up-grid>
|
12e66ec8
刘淇
新增树
|
55
56
|
</view>
</view>
|
1d3624b0
刘淇
首页。养护任务
|
57
|
<view class="con-wrap">
|
13203a04
刘淇
首页 统计
|
58
59
60
61
62
63
64
65
66
67
68
|
<!-- ========= 一级大Tab【养护任务 / 巡检任务 / 工单】权限控制 ========= -->
<view class="main-tab-wrap">
<view
v-if="showMainTabYh"
class="main-tab-item"
:class="{active: mainTab === 'maintain'}"
@click="handleMainTabClick('maintain')"
>养护任务</view>
<view
v-if="showMainTabXj"
class="main-tab-item"
|
0c577b68
刘淇
首页tab切换
|
69
70
|
:class="{active: mainTab === 'inspection'}"
@click="handleMainTabClick('inspection')"
|
13203a04
刘淇
首页 统计
|
71
72
73
74
75
76
77
78
|
>巡检任务</view>
<view
class="main-tab-item"
:class="{active: mainTab === 'workorder'}"
@click="handleMainTabClick('workorder')"
>工单</view>
</view>
<!-- 手写Tab切换:胶囊分段样式(待办/已办)【原有样式完全保留不动】 -->
|
1d3624b0
刘淇
首页。养护任务
|
79
80
81
82
83
84
85
86
|
<view class="custom-tab-wrap">
<view class="tab-capsule" :class="{ active: currentTabValue === 0 }" @click="handleTabClick(0)">
待办事项({{ todoTotal }})
</view>
<view class="tab-capsule" :class="{ active: currentTabValue === 1 }" @click="handleTabClick(1)">
已办事项({{ doneTotal }})
</view>
</view>
|
1d3624b0
刘淇
首页。养护任务
|
87
88
89
90
91
|
<!-- 顶部进度提示栏 -->
<view v-if="showTipHeader" class="tip-header">
<up-icon name="checkmark-circle" color="#00b42a" size="20"></up-icon>
<text style="color: #1677ff;">今日组内:您已经完成{{ finishNum }}项,小组均值{{ avgNum }}项</text>
</view>
|
13203a04
刘淇
首页 统计
|
92
|
<scroll-view class="task-list-container" scroll-y @scroll="onListScroll" @scrolltoupper="handleTouchTop" enhanced>
|
1d3624b0
刘淇
首页。养护任务
|
93
|
<view v-if="taskList.length === 0" class="empty-box">
|
13203a04
刘淇
首页 统计
|
94
|
<up-empty></up-empty>
|
1d3624b0
刘淇
首页。养护任务
|
95
96
97
|
</view>
<view class="task-item" v-for="(item, index) in taskList" :key="`${item.taskName}_${index}`"
hover-class="task-item--hover" @click="handleTaskClick(item)">
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
98
|
<view class="task-item__content">
|
1d3624b0
刘淇
首页。养护任务
|
99
|
<view class="name-fixed-wrap">
|
13203a04
刘淇
首页 统计
|
100
|
<view class="task-item__name">
|
bc215493
刘淇
考勤记录
|
101
|
事项{{ index + 1 }}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
102
|
</view>
|
1d3624b0
刘淇
首页。养护任务
|
103
104
|
<view class="task-name-text">
{{ item.taskName || '无' }}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
105
106
|
</view>
</view>
|
13203a04
刘淇
首页 统计
|
107
|
<view v-if="currentTabValue === 0" class="task-item__footer" style="padding-left: 60rpx;">
|
bc215493
刘淇
考勤记录
|
108
109
|
<image class="loc-icon" src="https://img.jichengshanshui.com.cn:28207/appimg/定位icon@3x.png"
mode="aspectFit"></image>
|
1d3624b0
刘淇
首页。养护任务
|
110
111
112
113
114
115
|
<template v-if="isWalkTextMode">
<text>距离当前{{ item.distance }}m ·约{{ item.estimatedWalkingMinutes }}分钟步行</text>
</template>
<template v-else>
<text>{{ item.distance }}m ·</text>
<up-icon name="star-fill" color="#ffd21d" size="20"></up-icon>
|
6cc0ab0e
刘淇
养护任务
|
116
|
<text>历史完成率{{ item.historyCompletionRate }}%</text>
|
1d3624b0
刘淇
首页。养护任务
|
117
118
|
</template>
</view>
|
4f475013
刘淇
k线图
|
119
|
</view>
|
4f475013
刘淇
k线图
|
120
|
</view>
|
1d3624b0
刘淇
首页。养护任务
|
121
122
|
</scroll-view>
</view>
|
12e66ec8
刘淇
新增树
|
123
|
</view>
|
12e66ec8
刘淇
新增树
|
124
|
</view>
|
c293da23
刘淇
新园林init
|
125
126
|
</template>
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
127
|
<script setup lang="ts">
|
9441e28e
刘淇
考勤打卡
|
128
129
|
import { ref, computed, nextTick, watch } from 'vue';
import { onShow, onUnload } from '@dcloudio/uni-app';
|
1d3624b0
刘淇
首页。养护任务
|
130
|
import { useUserStore } from '@/pinia/user';
|
bc215493
刘淇
考勤记录
|
131
|
import { timeFormat } from '@/uni_modules/uview-plus';
|
13203a04
刘淇
首页 统计
|
132
|
// import uniCharts from '@/components/uni-charts/uni-charts.vue';
|
1d3624b0
刘淇
首页。养护任务
|
133
134
|
import { getUnreadCount } from "@/api/user";
import {
|
25904bec
刘淇
养护重新改
|
135
|
// getTaskCompletionSummary,
|
1d3624b0
刘淇
首页。养护任务
|
136
|
taskDetailsWithDistance,
|
9441e28e
刘淇
考勤打卡
|
137
138
139
|
taskDetailsWithSmartSort,
getCurrentOrg,
orgTaskIndicator
|
1d3624b0
刘淇
首页。养护任务
|
140
|
} from "@/api/index/index";
|
1d3624b0
刘淇
首页。养护任务
|
141
|
const userStore = useUserStore();
|
9441e28e
刘淇
考勤打卡
|
142
|
const deptId = computed(() => String(userStore.userInfo?.deptId ?? ''));
|
1d3624b0
刘淇
首页。养护任务
|
143
|
|
6cc0ab0e
刘淇
养护任务
|
144
|
// ====================== 分组配置(多部门归属同一组) ======================
|
1d3624b0
刘淇
首页。养护任务
|
145
|
type GroupItem = {
|
9441e28e
刘淇
考勤打卡
|
146
|
deptIds: string[];
|
1d3624b0
刘淇
首页。养护任务
|
147
|
label: string;
|
9441e28e
刘淇
考勤打卡
|
148
149
|
showTipHeader: boolean;
useWalkText: boolean;
|
1d3624b0
刘淇
首页。养护任务
|
150
|
};
|
1d3624b0
刘淇
首页。养护任务
|
151
|
const groupConfig: GroupItem[] = [
|
6cc0ab0e
刘淇
养护任务
|
152
153
|
{
deptIds: ['361', '363', '279', '277', '270'],
|
9441e28e
刘淇
考勤打卡
|
154
|
label: '[组2 A1B2 纯效率·有提醒]',
|
6cc0ab0e
刘淇
养护任务
|
155
156
157
|
showTipHeader: true,
useWalkText: true
},
|
6cc0ab0e
刘淇
养护任务
|
158
159
|
{
deptIds: ['252', '273', '274', '337', '359', '360'],
|
9441e28e
刘淇
考勤打卡
|
160
|
label: '[组3 A2B1 个性化·无提醒]',
|
6cc0ab0e
刘淇
养护任务
|
161
162
163
|
showTipHeader: false,
useWalkText: false
},
|
6cc0ab0e
刘淇
养护任务
|
164
165
|
{
deptIds: ['281', '272', '271', '338', '280'],
|
9441e28e
刘淇
考勤打卡
|
166
|
label: '[组4 A2B2 个性化·有提醒]',
|
6cc0ab0e
刘淇
养护任务
|
167
168
169
|
showTipHeader: true,
useWalkText: false
},
|
1d3624b0
刘淇
首页。养护任务
|
170
|
];
|
6cc0ab0e
刘淇
养护任务
|
171
172
|
const defaultGroup: GroupItem = {
deptIds: [],
|
9441e28e
刘淇
考勤打卡
|
173
|
label: '[组1 A1B1 纯效率·无提醒]',
|
6cc0ab0e
刘淇
养护任务
|
174
175
176
|
showTipHeader: false,
useWalkText: true
};
|
1d3624b0
刘淇
首页。养护任务
|
177
|
const currentGroup = computed(() => {
|
6cc0ab0e
刘淇
养护任务
|
178
|
const targetDept = deptId.value;
|
9441e28e
刘淇
考勤打卡
|
179
180
181
|
for (const g of groupConfig) {
if (g.deptIds.includes(targetDept)) {
return g;
|
6cc0ab0e
刘淇
养护任务
|
182
183
|
}
}
|
6cc0ab0e
刘淇
养护任务
|
184
|
return defaultGroup;
|
1d3624b0
刘淇
首页。养护任务
|
185
|
});
|
1d3624b0
刘淇
首页。养护任务
|
186
187
188
189
190
|
const tipText = computed(() => currentGroup.value.label);
const showTipHeader = computed(() => currentGroup.value.showTipHeader);
const isWalkTextMode = computed(() => currentGroup.value.useWalkText);
const useDistanceApi = computed(() => currentGroup.value.useWalkText);
// =========================================================================
|
c293da23
刘淇
新园林init
|
191
|
|
13203a04
刘淇
首页 统计
|
192
193
|
// ========== 一级Tab:养护/巡检/工单 =========
// 默认期望打开 maintain,watch权限自动修正
|
0c577b68
刘淇
首页tab切换
|
194
|
const mainTab = ref<'maintain' | 'inspection' | 'workorder'>('maintain');
|
13203a04
刘淇
首页 统计
|
195
196
197
198
199
200
201
|
// ✅ 修复:用户角色数组
const userRoles = computed<string[]>(() => userStore.userInfo?.roles || []);
console.log('当前用户角色数组:', userRoles.value)
// 权限控制角色列表:包含这些角色,则隐藏对应tab
const hideYhRoleList = ['patrol_leader', 'patrol_global', 'yl_inspector', 'hjws_inspector', 'zxgl_inspector'];
|
a4ce4276
刘淇
秩序管理组长 不让看巡查
|
202
|
const hideXjRoleList = ['zxgl_worker', 'team_leader_hjws', 'hjws_worker', 'team_leader_wy', 'wy_worker', 'yl_worker', 'team_leader_yl','team_leader_zxgl'];
|
13203a04
刘淇
首页 统计
|
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
// ✅ 修复:用户角色数组 和 黑名单数组 存在交集 → 隐藏养护tab
const showMainTabYh = computed(() => {
// 判断:用户角色里是否存在任意一个在hideYhRoleList中的角色
const hasHideRole = userRoles.value.some(role => hideYhRoleList.includes(role));
return !hasHideRole;
});
// ✅ 修复:巡检tab权限
const showMainTabXj = computed(() => {
const hasHideRole = userRoles.value.some(role => hideXjRoleList.includes(role));
return !hasHideRole;
});
// 获取可见tab数组,用于自动选中
const availableTabList = computed(() => {
|
0c577b68
刘淇
首页tab切换
|
218
|
const list: Array<'maintain' | 'inspection' | 'workorder'> = [];
|
13203a04
刘淇
首页 统计
|
219
|
if (showMainTabYh.value) list.push('maintain');
|
0c577b68
刘淇
首页tab切换
|
220
|
if (showMainTabXj.value) list.push('inspection');
|
13203a04
刘淇
首页 统计
|
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
list.push('workorder');
return list;
});
// 监听权限变化:如果当前选中tab不可见,自动切到第一个可用tab
watch([showMainTabYh, showMainTabXj], () => {
const available = availableTabList.value;
console.log('可用tab列表', available);
if (!available.includes(mainTab.value)) {
mainTab.value = available[0];
console.log(`当前角色无【养护任务】权限,自动切换至:${mainTab.value}`)
}
}, { immediate: true });
// 一级Tab切换事件
|
0c577b68
刘淇
首页tab切换
|
236
|
const handleMainTabClick = async (tabKey: 'maintain' | 'inspection' | 'workorder') => {
|
13203a04
刘淇
首页 统计
|
237
238
239
240
241
242
243
244
|
if (mainTab.value === tabKey) return;
mainTab.value = tabKey;
currentTabValue.value = 0; // 切大tab默认回到待办
showChartArea.value = true;
// 重新拉取对应类型任务
await loadAllTaskByDept();
};
|
1d3624b0
刘淇
首页。养护任务
|
245
246
|
const finishNum = ref(0);
const avgNum = ref(0);
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
247
|
const msgCount = ref(0);
|
1d3624b0
刘淇
首页。养护任务
|
248
|
const currentTabValue = ref(0);
|
1d3624b0
刘淇
首页。养护任务
|
249
|
const dateRange = ref<string[]>([]);
|
5b5a4862
刘淇
按钮放大
|
250
|
const yesterday = new Date();
|
9fee3e9c
刘淇
首页日期 可以选今日
|
251
|
// yesterday.setDate(yesterday.getDate() - 1);
|
bc215493
刘淇
考勤记录
|
252
253
|
const maxDate = ref(timeFormat(yesterday, 'yyyy-mm-dd'));
// const minDate = '2026-01-06';
|
5b5a4862
刘淇
按钮放大
|
254
|
const isDatePickerOpen = ref(false);
|
5b5a4862
刘淇
按钮放大
|
255
256
257
|
const handlePopupShow = () => {
isDatePickerOpen.value = true;
};
|
5b5a4862
刘淇
按钮放大
|
258
259
260
|
const handlePopupHide = () => {
isDatePickerOpen.value = false;
};
|
1d3624b0
刘淇
首页。养护任务
|
261
262
263
264
265
266
267
|
const todoTotal = ref(0);
const doneTotal = ref(0);
const todoFullList = ref<any[]>([]);
const doneFullList = ref<any[]>([]);
const taskList = computed(() => {
return currentTabValue.value === 0 ? todoFullList.value : doneFullList.value;
});
|
1d3624b0
刘淇
首页。养护任务
|
268
269
|
const chooseOptions = computed(() => [
{ title: `待办事项(${todoTotal.value})`, id: 'todo' },
|
9441e28e
刘淇
考勤打卡
|
270
|
{ title: `已办事项(${doneTotal.value})`, id: 'done' },
|
1d3624b0
刘淇
首页。养护任务
|
271
|
]);
|
1d3624b0
刘淇
首页。养护任务
|
272
273
|
const currentLon = ref<string>('');
const currentLat = ref<string>('');
|
4f475013
刘淇
k线图
|
274
275
|
const chartWidth = ref(0);
const chartHeight = ref(300);
|
1d3624b0
刘淇
首页。养护任务
|
276
|
const klineCategories = ref<string[]>([]);
|
4f475013
刘淇
k线图
|
277
|
const klineChartData = ref([
|
12e66ec8
刘淇
新增树
|
278
|
{
|
4570c70a
刘淇
消息中心
|
279
|
name: '已完成任务数',
|
1d3624b0
刘淇
首页。养护任务
|
280
|
data: [] as number[],
|
4f475013
刘淇
k线图
|
281
|
color: '#25AF69'
|
12e66ec8
刘淇
新增树
|
282
283
|
},
{
|
6bce1057
刘淇
ai 大区经理
|
284
|
name: '总任务数',
|
1d3624b0
刘淇
首页。养护任务
|
285
|
data: [] as number[],
|
4f475013
刘淇
k线图
|
286
287
288
|
color: '#B34C17'
}
]);
|
4f475013
刘淇
k线图
|
289
290
291
|
const klineOption = ref({
grid: {
top: '25%',
|
53012a16
刘淇
首页 优化
|
292
|
left: '12%',
|
9441e28e
刘淇
考勤打卡
|
293
|
right: '12%',
|
53012a16
刘淇
首页 优化
|
294
|
bottom: '16%'
|
12e66ec8
刘淇
新增树
|
295
|
},
|
4f475013
刘淇
k线图
|
296
|
xAxis: {
|
1d3624b0
刘淇
首页。养护任务
|
297
|
axisLabel: { fontSize: 12, color: '#666' }
|
12e66ec8
刘淇
新增树
|
298
|
},
|
4f475013
刘淇
k线图
|
299
300
|
yAxis: {
min: 0,
|
1d3624b0
刘淇
首页。养护任务
|
301
302
|
splitLine: { lineStyle: { color: '#f5f5f7' } },
axisLabel: { fontSize: 12, color: '#666' }
|
12e66ec8
刘淇
新增树
|
303
|
},
|
4f475013
刘淇
k线图
|
304
305
|
tooltip: {
trigger: 'axis',
|
1d3624b0
刘淇
首页。养护任务
|
306
|
formatter: (params: any[]) => {
|
4570c70a
刘淇
消息中心
|
307
|
return `${params[0].name}<br/>
|
9441e28e
刘淇
考勤打卡
|
308
309
|
${params[0].seriesName}: ${params[0].value}<br/>
${params[1].seriesName}: ${params[1].value}`;
|
4f475013
刘淇
k线图
|
310
311
312
313
314
|
}
},
legend: {
show: true,
top: '5%',
|
1d3624b0
刘淇
首页。养护任务
|
315
|
textStyle: { fontSize: 12 }
|
12e66ec8
刘淇
新增树
|
316
|
}
|
4f475013
刘淇
k线图
|
317
|
});
|
13203a04
刘淇
首页 统计
|
318
|
const baseList = ref<Array<{ num: string; title: string; name: string }>>([]);
|
9441e28e
刘淇
考勤打卡
|
319
320
321
|
const orgOptions = ref<any[]>([]);
const value1 = ref<number | string>('');
const showActionSheet = ref(false);
|
25904bec
刘淇
养护重新改
|
322
323
324
325
326
327
328
329
330
331
332
333
334
335
|
// 日期选择确认回调
const handleDateConfirm = async (range: string[]) => {
console.log('选择的日期范围:', range);
dateRange.value = range;
const [startDate, endDate] = range;
// 1. 更新图表数据
// await initChartData(startDate, endDate);
// 2. 刷新组织指标卡片(数字指标4格卡片)
if(value1.value){
await fetchOrgIndicator(Number(value1.value), startDate, endDate);
}
};
|
9441e28e
刘淇
考勤打卡
|
336
337
338
339
340
341
342
343
344
|
watch(orgOptions, async (list) => {
if (list.length && !value1.value) {
value1.value = list[0].value;
// 拿到默认组织后,拉指标
if (dateRange.value.length === 2) {
await fetchOrgIndicator(Number(value1.value), dateRange.value[0], dateRange.value[1]);
}
}
}, { immediate: true });
|
9441e28e
刘淇
考勤打卡
|
345
346
|
const actionSheetOptions = computed(() => {
return orgOptions.value.map(opt => ({
|
ee792d52
刘淇
动态表单
|
347
348
|
name: opt.label,
value: opt.value
|
9441e28e
刘淇
考勤打卡
|
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
|
}));
});
const sortLabel = computed(() => {
const cur = orgOptions.value.find(i => i.value === value1.value);
return cur?.label ?? "";
});
const openActionSheet = () => {
showActionSheet.value = true;
};
// ActionSheet选中组织:刷新指标
const handleSheetSelect = async (item: { name: string; value: number }) => {
value1.value = item.value;
showActionSheet.value = false;
console.log('选中组织:', item.value);
if (dateRange.value.length === 2) {
await fetchOrgIndicator(item.value, dateRange.value[0], dateRange.value[1]);
}
};
|
13203a04
刘淇
首页 统计
|
367
|
const userName = computed(() => userStore.userInfo.user.nickname || '用户');
|
1d3624b0
刘淇
首页。养护任务
|
368
|
const rpx2px = (rpx: number) => {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
369
|
const systemInfo = uni.getSystemInfoSync();
|
1d3624b0
刘淇
首页。养护任务
|
370
371
|
return Math.floor(systemInfo.screenWidth / 750 * rpx);
};
|
9441e28e
刘淇
考勤打卡
|
372
|
// ========== 滚动逻辑 ==========
|
1d3624b0
刘淇
首页。养护任务
|
373
|
const showChartArea = ref(true);
|
1d3624b0
刘淇
首页。养护任务
|
374
|
const scrollHideThreshold = rpx2px(80);
|
1d3624b0
刘淇
首页。养护任务
|
375
376
|
const safeShowThreshold = rpx2px(130);
let scrollTimer: number | null = null;
|
1d3624b0
刘淇
首页。养护任务
|
377
378
|
const handleTouchTop = () => {
showChartArea.value = true;
|
4f475013
刘淇
k线图
|
379
|
};
|
1d3624b0
刘淇
首页。养护任务
|
380
381
|
const onListScroll = (e: any) => {
const scrollTop = e.detail.scrollTop;
|
1d3624b0
刘淇
首页。养护任务
|
382
|
if (scrollTimer) clearTimeout(scrollTimer);
|
1d3624b0
刘淇
首页。养护任务
|
383
384
385
386
387
|
if (scrollTop <= safeShowThreshold) {
showChartArea.value = true;
} else if (scrollTop > scrollHideThreshold) {
showChartArea.value = false;
}
|
1d3624b0
刘淇
首页。养护任务
|
388
389
390
391
392
393
|
scrollTimer = setTimeout(() => {
if (scrollTop <= safeShowThreshold) {
showChartArea.value = true;
}
}, 100);
};
|
1d3624b0
刘淇
首页。养护任务
|
394
395
396
|
const handleTabClick = (tabIndex: number) => {
if (currentTabValue.value === tabIndex) return;
currentTabValue.value = tabIndex;
|
1d3624b0
刘淇
首页。养护任务
|
397
398
|
showChartArea.value = true;
};
|
25904bec
刘淇
养护重新改
|
399
400
|
|
9441e28e
刘淇
考勤打卡
|
401
402
403
404
405
406
407
408
409
410
411
412
413
|
// ========== 公共函数:请求 orgTaskIndicator 指标接口 ==========
const fetchOrgIndicator = async (orgId: number, beginDate: string, endDate: string) => {
try {
// 日期字符串转毫秒时间戳
const beginTime = new Date(beginDate).getTime();
const endTime = new Date(endDate).getTime();
const res = await orgTaskIndicator({
orgId,
beginTime,
endTime
});
console.log('orgTaskIndicator 返回:', res);
baseList.value = [
|
bc215493
刘淇
考勤记录
|
414
415
416
417
|
{ num: String(res.totalCnt ?? 0), title: '应办任务数', name: 'file-text' },
{ num: String(res.doneCnt ?? 0), title: '已办任务数', name: 'checkmark-circle' },
{ num: String(res.pendingCnt ?? 0), title: '待办任务数', name: 'clock' },
{ num: String(res.overdueCnt ?? 0), title: '超时未完成', name: 'close-circle' }
|
9441e28e
刘淇
考勤打卡
|
418
|
];
|
9441e28e
刘淇
考勤打卡
|
419
420
421
422
|
} catch (err) {
console.error('orgTaskIndicator 请求失败:', err);
}
};
|
9441e28e
刘淇
考勤打卡
|
423
424
425
426
|
// ========== 初始化日期范围(近7天) ==========
const initRecent7Days = () => {
const now = new Date();
const end = new Date(now);
|
13203a04
刘淇
首页 统计
|
427
|
end.setDate(end.getDate());
|
9441e28e
刘淇
考勤打卡
|
428
|
const start = new Date(end);
|
25904bec
刘淇
养护重新改
|
429
|
start.setDate(start.getDate() );
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
430
|
dateRange.value = [
|
bc215493
刘淇
考勤记录
|
431
432
|
timeFormat(start, 'yyyy-mm-dd'),
timeFormat(end, 'yyyy-mm-dd')
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
433
|
];
|
bc215493
刘淇
考勤记录
|
434
|
console.log(dateRange.value)
|
25904bec
刘淇
养护重新改
|
435
|
// initChartData(dateRange.value[0], dateRange.value[1]);
|
4f475013
刘淇
k线图
|
436
|
};
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
437
438
439
440
441
|
const getUnread = async () => {
try {
const res = await getUnreadCount();
msgCount.value = res || 0;
} catch (error) {
|
9441e28e
刘淇
考勤打卡
|
442
443
444
|
console.error('获取未读消息失败:', error);
}
};
|
9441e28e
刘淇
考勤打卡
|
445
446
447
448
449
450
451
452
|
// getOrg:只拉组织下拉选项,不处理指标
const getOrg = async () => {
try {
const res = await getCurrentOrg();
console.log('getCurrentOrg组织下拉:', res);
orgOptions.value = res.options || [];
} catch (error) {
console.error('获取组织下拉失败:', error);
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
453
454
|
}
};
|
1d3624b0
刘淇
首页。养护任务
|
455
|
const initChartData = async (beginTime: string, endTime: string) => {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
456
|
try {
|
1d3624b0
刘淇
首页。养护任务
|
457
|
const postData = { beginTime, endTime };
|
25904bec
刘淇
养护重新改
|
458
|
// const res = await getTaskCompletionSummary(postData);
|
1d3624b0
刘淇
首页。养护任务
|
459
460
|
klineCategories.value = res.map((item: any) => item.currentDate);
klineChartData.value[0].data = res.map((item: any) => item.completedNum);
|
9441e28e
刘淇
考勤打卡
|
461
|
klineChartData.value[1].data = res.map((item: any) => item.countPendingNum);
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
462
|
} catch (error) {
|
9441e28e
刘淇
考勤打卡
|
463
|
console.error('图表数据请求失败:', error);
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
464
465
|
}
};
|
13203a04
刘淇
首页 统计
|
466
|
const loadDistanceApiTask = async (lon: string, lat: string, taskType: string) => {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
467
|
try {
|
13203a04
刘淇
首页 统计
|
468
469
|
const paramsTodo = { queryType: 1, currentLon: lon, currentLat: lat, taskType };
const paramsDone = { queryType: 2, currentLon: lon, currentLat: lat, taskType };
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
470
|
const [todoRes, doneRes] = await Promise.all([
|
1d3624b0
刘淇
首页。养护任务
|
471
472
|
taskDetailsWithDistance(paramsTodo),
taskDetailsWithDistance(paramsDone)
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
473
|
]);
|
1d3624b0
刘淇
首页。养护任务
|
474
475
476
477
478
479
480
481
482
|
todoFullList.value = todoRes?.sortedTasks || [];
doneFullList.value = doneRes?.sortedTasks || [];
todoTotal.value = Number(todoRes?.totalPendingTasks) || 0;
doneTotal.value = Number(doneRes?.totalPendingTasks) || 0;
finishNum.value = todoRes?.teamProgress?.userCompletedCount ?? 0;
avgNum.value = doneRes?.teamProgress?.teamAverage ?? 0;
await nextTick();
} catch (err) {
uni.showToast({ title: '加载任务失败', icon: 'none' });
|
9441e28e
刘淇
考勤打卡
|
483
|
console.error('loadDistanceApiTask error', err);
|
1d3624b0
刘淇
首页。养护任务
|
484
485
486
487
|
todoFullList.value = [];
doneFullList.value = [];
todoTotal.value = 0;
doneTotal.value = 0;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
488
|
}
|
4f475013
刘淇
k线图
|
489
|
};
|
13203a04
刘淇
首页 统计
|
490
|
const loadSmartSortTask = async (lon: string, lat: string, taskType: string) => {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
491
|
try {
|
1d3624b0
刘淇
首页。养护任务
|
492
|
const [todoRes, doneRes] = await Promise.all([
|
13203a04
刘淇
首页 统计
|
493
494
|
taskDetailsWithSmartSort({ queryType: 1, currentLon: lon, currentLat: lat, taskType }),
taskDetailsWithSmartSort({ queryType: 2, currentLon: lon, currentLat: lat, taskType })
|
1d3624b0
刘淇
首页。养护任务
|
495
496
497
498
499
500
501
502
503
504
|
]);
todoFullList.value = todoRes?.sortedTasks || [];
doneFullList.value = doneRes?.sortedTasks || [];
todoTotal.value = Number(todoRes?.totalPendingTasks) || 0;
doneTotal.value = Number(doneRes?.totalPendingTasks) || 0;
finishNum.value = todoRes?.teamProgress?.userCompletedCount ?? 0;
avgNum.value = doneRes?.teamProgress?.teamAverage ?? 0;
await nextTick();
} catch (err) {
uni.showToast({ title: '加载任务失败', icon: 'none' });
|
9441e28e
刘淇
考勤打卡
|
505
|
console.error('loadSmartSortTask error', err);
|
1d3624b0
刘淇
首页。养护任务
|
506
507
508
509
|
todoFullList.value = [];
doneFullList.value = [];
todoTotal.value = 0;
doneTotal.value = 0;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
510
511
|
}
};
|
1d3624b0
刘淇
首页。养护任务
|
512
513
514
515
|
const loadAllTaskByDept = async () => {
const loc = await getCurrentLocation();
currentLon.value = loc.lon;
currentLat.value = loc.lat;
|
13203a04
刘淇
首页 统计
|
516
517
518
519
520
521
522
|
// 根据一级Tab选择不同接口
if (mainTab.value === 'maintain') {
if (useDistanceApi.value) {
await loadDistanceApiTask(loc.lon, loc.lat, 'maintain');
} else {
await loadSmartSortTask(loc.lon, loc.lat, 'maintain');
}
|
0c577b68
刘淇
首页tab切换
|
523
|
} else if (mainTab.value === 'inspection') {
|
13203a04
刘淇
首页 统计
|
524
|
if (useDistanceApi.value) {
|
0c577b68
刘淇
首页tab切换
|
525
|
await loadDistanceApiTask(loc.lon, loc.lat, 'inspection');
|
13203a04
刘淇
首页 统计
|
526
|
} else {
|
0c577b68
刘淇
首页tab切换
|
527
|
await loadSmartSortTask(loc.lon, loc.lat, 'inspection');
|
13203a04
刘淇
首页 统计
|
528
529
530
|
}
} else if (mainTab.value === 'workorder') {
// ========= 工单tab,后续对接工单接口,先置空列表占位 =========
|
9fee3e9c
刘淇
首页日期 可以选今日
|
531
532
533
534
535
|
if (useDistanceApi.value) {
await loadDistanceApiTask(loc.lon, loc.lat, 'workorder');
} else {
await loadSmartSortTask(loc.lon, loc.lat, 'workorder');
}
|
9441e28e
刘淇
考勤打卡
|
536
|
}
|
4f475013
刘淇
k线图
|
537
|
};
|
9441e28e
刘淇
考勤打卡
|
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
|
const getCurrentLocation = (): Promise<{ lon: string; lat: string }> => {
return new Promise((resolve, reject) => {
uni.getSetting({
success: (settingRes) => {
if (!settingRes.authSetting['scope.userLocation']) {
uni.authorize({
scope: 'scope.userLocation',
success: () => {
uni.getLocation({
type: 'gcj02',
success: (loc) => {
resolve({
lon: loc.longitude.toFixed(6),
lat: loc.latitude.toFixed(6)
});
},
fail: (err) => {
uni.showToast({ title: '获取位置失败,请开启定位', icon: 'none' });
reject('定位失败');
}
});
},
fail: () => {
uni.showModal({
title: '需要定位权限',
content: '允许定位才能查看任务距离',
confirmText: '去设置',
success: (modalRes) => {
if (modalRes.confirm) {
uni.openSetting();
}
}
});
reject('拒绝定位');
}
});
} else {
uni.getLocation({
type: 'gcj02',
success: (loc) => {
resolve({
lon: loc.longitude.toFixed(6),
lat: loc.latitude.toFixed(6)
});
},
fail: (err) => {
uni.showToast({ title: '获取位置失败,请开启定位', icon: 'none' });
reject('定位失败');
}
});
}
},
fail: (err) => {
reject('获取权限设置失败');
}
});
});
|
4f475013
刘淇
k线图
|
595
|
};
|
9441e28e
刘淇
考勤打卡
|
596
597
598
|
const handleMsgClick = () => {
uni.navigateTo({ url: '/pages-sub/msg/msg' });
};
|
1d3624b0
刘淇
首页。养护任务
|
599
600
601
|
const handleTaskClick = (item: any) => {
if (item.taskType == "maintain") {
if (currentTabValue.value === 0) {
|
9441e28e
刘淇
考勤打卡
|
602
603
604
605
606
607
608
|
uni.navigateTo({
url: `/pages-sub/daily/maintain-add?planNo=${item.planNo || ''}&planTypeId=${item.planTypeId ?? ''}&businessLine=${item.busiLine ?? ''}`
});
} else {
uni.navigateTo({
url: `/pages-sub/daily/maintain-detail?planNo=${item.planNo || ''}`
});
|
1d3624b0
刘淇
首页。养护任务
|
609
|
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
610
|
}
|
1d3624b0
刘淇
首页。养护任务
|
611
612
|
if (item.taskType == "inspection") {
if (currentTabValue.value === 0) {
|
9441e28e
刘淇
考勤打卡
|
613
614
615
616
617
618
619
|
uni.navigateTo({
url: `/pages-sub/daily/inspect-add?planNo=${item.planNo}&batchNo=${item.batchNo}`
});
} else {
uni.navigateTo({
url: `/pages-sub/daily/inspect-detail?planNo=${item.planNo || ''}`
});
|
1d3624b0
刘淇
首页。养护任务
|
620
621
622
|
}
}
};
|
9441e28e
刘淇
考勤打卡
|
623
624
625
626
627
|
onShow(async () => {
showChartArea.value = true;
chartWidth.value = rpx2px(750 - 60);
chartHeight.value = rpx2px(300);
initRecent7Days();
|
13203a04
刘淇
首页 统计
|
628
|
// getUnread();
|
9441e28e
刘淇
考勤打卡
|
629
630
631
|
await getOrg(); // 拉取组织下拉列表
await loadAllTaskByDept();
});
|
9441e28e
刘淇
考勤打卡
|
632
633
634
|
onUnload(() => {
if (scrollTimer) clearTimeout(scrollTimer);
});
|
c293da23
刘淇
新园林init
|
635
636
|
</script>
|
12e66ec8
刘淇
新增树
|
637
|
<style scoped lang="scss">
|
4f475013
刘淇
k线图
|
638
639
|
$primary-color: #1677ff;
$danger-color: #E53935;
|
4f475013
刘淇
k线图
|
640
641
|
$text-color: #333;
$text-color-light: #666;
|
13203a04
刘淇
首页 统计
|
642
|
$text-placeholder: #999;
|
4f475013
刘淇
k线图
|
643
644
|
$bg-color: #f5f5f7;
$card-bg: #fff;
|
13203a04
刘淇
首页 统计
|
645
646
647
|
$border-radius: 16rpx;
$card-radius: 5rpx;
$spacing-sm: 5rpx;
|
9fee3e9c
刘淇
首页日期 可以选今日
|
648
|
$spacing-md: 12rpx;
|
13203a04
刘淇
首页 统计
|
649
|
$spacing-lg: 15rpx;
|
1d3624b0
刘淇
首页。养护任务
|
650
|
$border-color: #e5e5e5;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
651
|
.page-container {
|
1d3624b0
刘淇
首页。养护任务
|
652
|
height: 100vh;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
653
|
background-color: $bg-color;
|
1d3624b0
刘淇
首页。养护任务
|
654
655
656
|
overflow: hidden;
display: flex;
flex-direction: column;
|
12e66ec8
刘淇
新增树
|
657
|
}
|
12e66ec8
刘淇
新增树
|
658
|
.user-info-bar {
|
1d3624b0
刘淇
首页。养护任务
|
659
|
flex-shrink: 0;
|
4f475013
刘淇
k线图
|
660
661
|
background: url("https://img.jichengshanshui.com.cn:28207/appimg/bg.jpg") no-repeat;
background-size: 100% 100%;
|
13203a04
刘淇
首页 统计
|
662
|
padding: 140rpx $spacing-lg 165rpx;
|
12e66ec8
刘淇
新增树
|
663
664
665
666
|
display: flex;
justify-content: space-between;
align-items: center;
color: #fff;
|
4f475013
刘淇
k线图
|
667
|
.username {
|
13203a04
刘淇
首页 统计
|
668
669
|
font-size: 32rpx;
margin-bottom: 4rpx;
|
4f475013
刘淇
k线图
|
670
|
}
|
4f475013
刘淇
k线图
|
671
|
.login-desc {
|
13203a04
刘淇
首页 统计
|
672
|
font-size: 28rpx;
|
12e66ec8
刘淇
新增树
|
673
|
}
|
12e66ec8
刘淇
新增树
|
674
675
|
.msg-icon {
position: relative;
|
13203a04
刘淇
首页 统计
|
676
677
|
padding: 5rpx;
top: 10rpx;
|
4f475013
刘淇
k线图
|
678
|
border-radius: 50%;
|
4f475013
刘淇
k线图
|
679
680
681
|
&--hover {
background-color: rgba(255, 255, 255, 0.2);
}
|
12e66ec8
刘淇
新增树
|
682
683
|
.msg-badge {
position: absolute;
|
13203a04
刘淇
首页 统计
|
684
685
|
top: -2rpx;
right: -3rpx;
|
12e66ec8
刘淇
新增树
|
686
687
688
|
}
}
}
|
4f475013
刘淇
k线图
|
689
|
.content-wrap {
|
1d3624b0
刘淇
首页。养护任务
|
690
|
flex: 1;
|
13203a04
刘淇
首页 统计
|
691
|
margin-top: -122rpx;
|
4f475013
刘淇
k线图
|
692
693
|
border-radius: $border-radius $border-radius 0 0;
background-color: $bg-color;
|
4f475013
刘淇
k线图
|
694
|
overflow: hidden;
|
1d3624b0
刘淇
首页。养护任务
|
695
696
697
|
display: flex;
flex-direction: column;
}
|
1d3624b0
刘淇
首页。养护任务
|
698
699
700
701
702
|
.chart-wrap {
flex-shrink: 0;
transition: all 0.35s ease-out;
opacity: 1;
overflow: hidden;
|
13203a04
刘淇
首页 统计
|
703
704
705
706
707
|
&[hidden] {
opacity: 0;
height: 0;
margin: 0;
}
|
1d3624b0
刘淇
首页。养护任务
|
708
|
}
|
4f475013
刘淇
k线图
|
709
|
.module-title {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
710
|
padding: $spacing-lg;
|
13203a04
刘淇
首页 统计
|
711
|
font-size: 28rpx;
|
4f475013
刘淇
k线图
|
712
713
|
font-weight: 600;
color: $text-color-light;
|
1d3624b0
刘淇
首页。养护任务
|
714
|
flex-shrink: 0;
|
4f475013
刘淇
k线图
|
715
|
}
|
4f475013
刘淇
k线图
|
716
717
718
719
720
|
.task-chart-card {
background-color: $card-bg;
border-radius: $card-radius;
margin: 0 $spacing-lg $spacing-md;
padding: $spacing-md;
|
1d3624b0
刘淇
首页。养护任务
|
721
|
flex-shrink: 0;
|
12e66ec8
刘淇
新增树
|
722
723
724
|
.card-header {
display: flex;
justify-content: space-between;
|
12e66ec8
刘淇
新增树
|
725
|
align-items: center;
|
13203a04
刘淇
首页 统计
|
726
727
|
font-size: 24rpx;
color: $text-placeholder;
|
4f475013
刘淇
k线图
|
728
|
margin-bottom: $spacing-md;
|
4f475013
刘淇
k线图
|
729
|
.date-picker-wrap {
|
13203a04
刘淇
首页 统计
|
730
|
border-radius: 3rpx;
|
4f475013
刘淇
k线图
|
731
|
transition: background-color 0.2s;
|
5b5a4862
刘淇
按钮放大
|
732
733
|
position: relative;
z-index: 999;
|
4f475013
刘淇
k线图
|
734
735
736
|
&:active {
background-color: $bg-color;
}
|
12e66ec8
刘淇
新增树
|
737
738
|
}
}
|
4f475013
刘淇
k线图
|
739
|
.chart-container {
|
12e66ec8
刘淇
新增树
|
740
|
width: 100%;
|
13203a04
刘淇
首页 统计
|
741
|
height: 150rpx;
|
4f475013
刘淇
k线图
|
742
743
744
|
display: flex;
align-items: center;
justify-content: center;
|
12e66ec8
刘淇
新增树
|
745
746
|
}
}
|
1d3624b0
刘淇
首页。养护任务
|
747
|
.con-wrap {
|
13203a04
刘淇
首页 统计
|
748
|
border-radius: 8rpx;
|
1d3624b0
刘淇
首页。养护任务
|
749
|
background-color: #fff;
|
13203a04
刘淇
首页 统计
|
750
|
margin: 0 15rpx;
|
1d3624b0
刘淇
首页。养护任务
|
751
752
753
754
755
756
|
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
|
13203a04
刘淇
首页 统计
|
757
758
759
760
761
762
|
// ========= 【仅一级Tab:养护/巡检/工单】下划线样式,其余全部保留原有css =========
.main-tab-wrap {
display: flex;
align-items: center;
background: #fff;
padding: 0 30rpx;
|
1d3624b0
刘淇
首页。养护任务
|
763
|
}
|
13203a04
刘淇
首页 统计
|
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
|
.main-tab-item {
padding: 24rpx 16rpx;
font-size: 30rpx;
color: #666;
position: relative;
transition: color 0.24s;
&.active {
color: #1677ff;
font-weight: 500;
&::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 4rpx;
background-color: #1677ff;
border-radius: 2rpx;
}
}
}
// 待办/已办胶囊tab【原样保留你原来的样式,完全没改动!!】
|
1d3624b0
刘淇
首页。养护任务
|
786
787
788
789
790
791
792
793
|
.custom-tab-wrap {
display: flex;
align-items: center;
gap: 20rpx;
padding: 20rpx 0 20rpx 20rpx;
background: #fff;
flex-shrink: 0;
}
|
1d3624b0
刘淇
首页。养护任务
|
794
795
|
.tab-capsule {
padding: 10rpx 20rpx;
|
1d3624b0
刘淇
首页。养护任务
|
796
797
798
799
800
801
|
font-size: 28rpx;
color: #999;
background: #f5f5f5;
border-radius: 0;
transition: all 0.2s ease;
font-weight: 500;
|
13203a04
刘淇
首页 统计
|
802
803
804
805
|
&.active {
color: #d4af37;
background: #fff8dc;
}
|
1d3624b0
刘淇
首页。养护任务
|
806
|
}
|
1d3624b0
刘淇
首页。养护任务
|
807
808
809
810
811
812
|
.tip-header {
display: flex;
align-items: center;
gap: 8rpx;
padding: 12rpx 15rpx;
background: #e6f7ff;
|
13203a04
刘淇
首页 统计
|
813
|
font-size: 28rpx;
|
1d3624b0
刘淇
首页。养护任务
|
814
815
816
|
color: #000;
flex-shrink: 0;
}
|
1d3624b0
刘淇
首页。养护任务
|
817
|
.tip-top {
|
13203a04
刘淇
首页 统计
|
818
|
padding: 8rpx 0 0 70rpx;
|
1d3624b0
刘淇
首页。养护任务
|
819
|
flex-shrink: 0;
|
12e66ec8
刘淇
新增树
|
820
|
}
|
4f475013
刘淇
k线图
|
821
|
.task-list-container {
|
1d3624b0
刘淇
首页。养护任务
|
822
823
|
width: 100%;
height: 100%;
|
9fee3e9c
刘淇
首页日期 可以选今日
|
824
|
padding-bottom: 220rpx;
|
1d3624b0
刘淇
首页。养护任务
|
825
826
|
box-sizing: border-box;
}
|
1d3624b0
刘淇
首页。养护任务
|
827
828
|
.empty-box {
padding: 60rpx 0;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
829
|
}
|
ee792d52
刘淇
动态表单
|
830
831
832
|
.sort-trigger {
display: flex;
align-items: center;
|
13203a04
刘淇
首页 统计
|
833
834
835
836
837
838
839
840
|
font-size: 24rpx;
color: $text-placeholder;
.sort-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 220rpx;
}
|
ee792d52
刘淇
动态表单
|
841
|
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
842
843
844
|
.task-item {
padding: $spacing-md;
transition: background-color 0.2s;
|
13203a04
刘淇
首页 统计
|
845
|
border-bottom: 1rpx solid $border-color;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
846
847
848
|
&:last-child {
border-bottom: none;
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
849
850
851
|
&--hover {
background-color: $bg-color;
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
852
853
854
|
&__content {
width: 100%;
}
|
1d3624b0
刘淇
首页。养护任务
|
855
856
857
|
.name-fixed-wrap {
display: flex;
}
|
1d3624b0
刘淇
首页。养护任务
|
858
|
.task-item__name {
|
25904bec
刘淇
养护重新改
|
859
|
width: 88rpx;
|
1d3624b0
刘淇
首页。养护任务
|
860
|
}
|
bc215493
刘淇
考勤记录
|
861
862
|
.task-name-text {
flex: 1;
|
25904bec
刘淇
养护重新改
|
863
|
font-size: 28rpx;
|
bc215493
刘淇
考勤记录
|
864
865
866
867
868
869
870
|
color: $text-color;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
871
|
&__name {
|
25904bec
刘淇
养护重新改
|
872
|
font-size: 28rpx;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
873
|
color: $text-color;
|
1d3624b0
刘淇
首页。养护任务
|
874
|
display: inline-block;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
875
|
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
876
877
|
&__footer {
display: flex;
|
1d3624b0
刘淇
首页。养护任务
|
878
879
|
align-items: flex-start;
gap: 6rpx;
|
25904bec
刘淇
养护重新改
|
880
|
font-size: 26rpx;
|
1d3624b0
刘淇
首页。养护任务
|
881
882
|
color: $text-color-light;
margin-top: $spacing-sm;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
883
|
align-items: center;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
884
885
|
}
}
|
1d3624b0
刘淇
首页。养护任务
|
886
|
.loc-icon {
|
13203a04
刘淇
首页 统计
|
887
888
|
width: 28rpx;
height: 28rpx;
|
1d3624b0
刘淇
首页。养护任务
|
889
|
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
890
891
|
.urgency-tag {
color: #7D7D7D;
|
12e66ec8
刘淇
新增树
|
892
|
}
|
bc215493
刘淇
考勤记录
|
893
|
.grid-item-icon-box {
|
13203a04
刘淇
首页 统计
|
894
895
896
897
|
display: flex;
flex-direction: column;
align-items: center;
padding: 16rpx;
|
bc215493
刘淇
考勤记录
|
898
899
|
}
.grid-num-icon {
|
13203a04
刘淇
首页 统计
|
900
901
902
903
|
font-size: 40rpx;
font-weight: 600;
color: #333;
margin-top: 8rpx;
|
bc215493
刘淇
考勤记录
|
904
905
|
}
.grid-label-icon {
|
13203a04
刘淇
首页 统计
|
906
907
908
|
font-size: 22rpx;
color: #666;
margin-top: 4rpx;
|
bc215493
刘淇
考勤记录
|
909
|
}
|
13203a04
刘淇
首页 统计
|
910
|
</style>
|