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>
|
4f475013
刘淇
k线图
|
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">
|
53012a16
刘淇
首页 优化
|
14
|
<up-badge type="error" showZero="true" max="999" :value="msgCount"></up-badge>
|
4f475013
刘淇
k线图
|
15
|
</view>
|
12e66ec8
刘淇
新增树
|
16
17
18
|
</view>
</view>
|
4f475013
刘淇
k线图
|
19
|
<view class="content-wrap">
|
1d3624b0
刘淇
首页。养护任务
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<!-- 图表区域 增加平滑动画容器 -->
<view class="chart-wrap" v-show="showChartArea">
<!-- 任务完成情况标题 -->
<view class="module-title">任务完成情况</view>
<!-- 任务完成情况卡片 -->
<view class="task-chart-card">
<view class="card-header">
<view class="unit-tip">单位: 个</view>
<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>
|
4f475013
刘淇
k线图
|
34
|
</view>
|
4f475013
刘淇
k线图
|
35
|
|
1d3624b0
刘淇
首页。养护任务
|
36
37
38
39
40
|
<!-- 双折线K线图 -->
<view class="chart-container">
<uni-charts v-if="!isDatePickerOpen" type="line" :data="klineChartData" :categories="klineCategories"
:option="klineOption" :width="chartWidth" :height="chartHeight" />
</view>
|
12e66ec8
刘淇
新增树
|
41
42
|
</view>
</view>
|
12e66ec8
刘淇
新增树
|
43
|
|
1d3624b0
刘淇
首页。养护任务
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
<view class="con-wrap">
<view class="con-title">养护任务 </view>
<!-- 手写Tab切换:胶囊分段样式 -->
<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>
<!-- 动态组信息文案 -->
<view class="tip-top" style="padding: 8px 0 0 70px;">
<text>{{ tipText }}</text>
</view>
<!-- 顶部进度提示栏 -->
<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>
<scroll-view
class="task-list-container"
scroll-y
@scroll="onListScroll"
@scrolltoupper="handleTouchTop"
enhanced
>
<view v-if="taskList.length === 0" class="empty-box">
<up-empty />
</view>
<view class="task-item" v-for="(item, index) in taskList" :key="`${item.taskName}_${index}`"
hover-class="task-item--hover" @click="handleTaskClick(item)">
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
82
|
<view class="task-item__content">
|
1d3624b0
刘淇
首页。养护任务
|
83
84
85
|
<view class="name-fixed-wrap">
<view class="task-item__name ">
事项{{ index + 1 }}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
86
|
</view>
|
1d3624b0
刘淇
首页。养护任务
|
87
88
|
<view class="task-name-text">
{{ item.taskName || '无' }}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
89
90
|
</view>
</view>
|
1d3624b0
刘淇
首页。养护任务
|
91
92
93
94
95
96
97
98
99
100
101
102
|
<view v-if="currentTabValue === 0" class="task-item__footer" style="padding-left: 60px;">
<image class="loc-icon" src="https://img.jichengshanshui.com.cn:28207/appimg/定位icon@3x.png" mode="aspectFit"></image>
<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>
<text>历史完成率{{ item.efficiencyPercent }}%</text>
</template>
</view>
|
4f475013
刘淇
k线图
|
103
|
</view>
|
4f475013
刘淇
k线图
|
104
|
</view>
|
1d3624b0
刘淇
首页。养护任务
|
105
106
|
</scroll-view>
</view>
|
12e66ec8
刘淇
新增树
|
107
|
</view>
|
12e66ec8
刘淇
新增树
|
108
|
</view>
|
c293da23
刘淇
新园林init
|
109
110
|
</template>
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
111
|
<script setup lang="ts">
|
1d3624b0
刘淇
首页。养护任务
|
112
113
114
115
|
import { ref, computed, nextTick } from 'vue';
import { onShow,onUnload } from '@dcloudio/uni-app'
import { useUserStore } from '@/pinia/user';
import { timeFormat } from '@/uni_modules/uview-plus';
|
4f475013
刘淇
k线图
|
116
|
import uniCharts from '@/components/uni-charts/uni-charts.vue';
|
1d3624b0
刘淇
首页。养护任务
|
117
118
119
120
121
122
|
import { getUnreadCount } from "@/api/user";
import {
getTaskCompletionSummary,
taskDetailsWithDistance,
taskDetailsWithSmartSort
} from "@/api/index/index";
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
123
|
|
1d3624b0
刘淇
首页。养护任务
|
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
const userStore = useUserStore();
const deptId = computed(() => String(userStore.userInfo?.user?.deptId ?? ''));
// ====================== 只需要在这里统一维护分组配置 ======================
type GroupItem = {
deptId: string;
label: string;
showTipHeader: boolean; // 是否展示顶部进度条
useWalkText: boolean; // 是否展示步行距离文案
};
const groupConfig: GroupItem[] = [
{ deptId: '364', label: '[组2 A1B2 纯效率·有提醒]', showTipHeader: true, useWalkText: true },
{ deptId: '337', label: '[组3 A2B1 个性化·无提醒]', showTipHeader: false, useWalkText: false },
{ deptId: '338', label: '[组4 A2B2 个性化·有提醒]', showTipHeader: true, useWalkText: false },
];
// 默认组1配置
const defaultGroup: GroupItem = { deptId: '', label: '[组1 A1B1 纯效率·无提醒]', showTipHeader: false, useWalkText: true };
// 获取当前部门配置对象
const currentGroup = computed(() => {
const target = groupConfig.find(item => item.deptId === deptId.value);
return target ?? defaultGroup;
});
// 下面全部自动读取配置,无需写if/switch
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
|
154
|
|
1d3624b0
刘淇
首页。养护任务
|
155
156
|
const finishNum = ref(0);
const avgNum = ref(0);
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
157
|
const msgCount = ref(0);
|
1d3624b0
刘淇
首页。养护任务
|
158
159
160
|
const currentTabValue = ref(0);
const dateRange = ref<string[]>([]);
|
5b5a4862
刘淇
按钮放大
|
161
|
const yesterday = new Date();
|
1d3624b0
刘淇
首页。养护任务
|
162
|
yesterday.setDate(yesterday.getDate() - 1);
|
5b5a4862
刘淇
按钮放大
|
163
|
const maxDate = ref(timeFormat(yesterday, 'yyyy-mm-dd'));
|
1d3624b0
刘淇
首页。养护任务
|
164
|
const minDate = '2026-01-06';
|
5b5a4862
刘淇
按钮放大
|
165
|
|
5b5a4862
刘淇
按钮放大
|
166
|
const isDatePickerOpen = ref(false);
|
5b5a4862
刘淇
按钮放大
|
167
168
169
|
const handlePopupShow = () => {
isDatePickerOpen.value = true;
};
|
5b5a4862
刘淇
按钮放大
|
170
171
172
|
const handlePopupHide = () => {
isDatePickerOpen.value = false;
};
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
173
|
|
1d3624b0
刘淇
首页。养护任务
|
174
175
176
177
178
179
180
181
182
183
184
185
|
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;
});
const chooseOptions = computed(() => [
{ title: `待办事项(${todoTotal.value})`, id: 'todo' },
{ title: `已办事项(${doneTotal.value})`, id: 'done' }
]);
|
c293da23
刘淇
新园林init
|
186
|
|
1d3624b0
刘淇
首页。养护任务
|
187
188
|
const currentLon = ref<string>('');
const currentLat = ref<string>('');
|
4f475013
刘淇
k线图
|
189
190
|
const chartWidth = ref(0);
const chartHeight = ref(300);
|
1d3624b0
刘淇
首页。养护任务
|
191
192
|
const klineCategories = ref<string[]>([]);
|
4f475013
刘淇
k线图
|
193
|
const klineChartData = ref([
|
12e66ec8
刘淇
新增树
|
194
|
{
|
4570c70a
刘淇
消息中心
|
195
|
name: '已完成任务数',
|
1d3624b0
刘淇
首页。养护任务
|
196
|
data: [] as number[],
|
4f475013
刘淇
k线图
|
197
|
color: '#25AF69'
|
12e66ec8
刘淇
新增树
|
198
199
|
},
{
|
6bce1057
刘淇
ai 大区经理
|
200
|
name: '总任务数',
|
1d3624b0
刘淇
首页。养护任务
|
201
|
data: [] as number[],
|
4f475013
刘淇
k线图
|
202
203
204
|
color: '#B34C17'
}
]);
|
4570c70a
刘淇
消息中心
|
205
|
|
4f475013
刘淇
k线图
|
206
207
208
|
const klineOption = ref({
grid: {
top: '25%',
|
53012a16
刘淇
首页 优化
|
209
|
left: '12%',
|
4f475013
刘淇
k线图
|
210
|
right: '8%',
|
53012a16
刘淇
首页 优化
|
211
|
bottom: '16%'
|
12e66ec8
刘淇
新增树
|
212
|
},
|
4f475013
刘淇
k线图
|
213
|
xAxis: {
|
1d3624b0
刘淇
首页。养护任务
|
214
|
axisLabel: { fontSize: 12, color: '#666' }
|
12e66ec8
刘淇
新增树
|
215
|
},
|
4f475013
刘淇
k线图
|
216
217
|
yAxis: {
min: 0,
|
1d3624b0
刘淇
首页。养护任务
|
218
219
|
splitLine: { lineStyle: { color: '#f5f5f7' } },
axisLabel: { fontSize: 12, color: '#666' }
|
12e66ec8
刘淇
新增树
|
220
|
},
|
4f475013
刘淇
k线图
|
221
222
|
tooltip: {
trigger: 'axis',
|
1d3624b0
刘淇
首页。养护任务
|
223
|
formatter: (params: any[]) => {
|
4570c70a
刘淇
消息中心
|
224
225
|
return `${params[0].name}<br/>
${params[0].seriesName}: ${params[0].data}<br/>
|
4f475013
刘淇
k线图
|
226
227
228
229
230
231
|
${params[1].seriesName}: ${params[1].data}`;
}
},
legend: {
show: true,
top: '5%',
|
1d3624b0
刘淇
首页。养护任务
|
232
|
textStyle: { fontSize: 12 }
|
12e66ec8
刘淇
新增树
|
233
|
}
|
4f475013
刘淇
k线图
|
234
235
|
});
|
4f475013
刘淇
k线图
|
236
|
const userName = computed(() => userStore.userInfo?.user?.nickname || '用户');
|
4f475013
刘淇
k线图
|
237
|
|
1d3624b0
刘淇
首页。养护任务
|
238
|
const rpx2px = (rpx: number) => {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
239
|
const systemInfo = uni.getSystemInfoSync();
|
1d3624b0
刘淇
首页。养护任务
|
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
return Math.floor(systemInfo.screenWidth / 750 * rpx);
};
// ========== 滚动逻辑 终极优化 ==========
const showChartArea = ref(true);
// 隐藏阈值:超过80rpx收起
const scrollHideThreshold = rpx2px(80);
// 安全显示区间:≤80rpx一律显示,覆盖所有回弹残留(70/80/90)
const safeShowThreshold = rpx2px(130);
let scrollTimer: number | null = null;
// 下拉触顶强制展示
const handleTouchTop = () => {
showChartArea.value = true;
|
4f475013
刘淇
k线图
|
254
255
|
};
|
1d3624b0
刘淇
首页。养护任务
|
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
|
const onListScroll = (e: any) => {
const scrollTop = e.detail.scrollTop;
console.log('scrollTop', scrollTop)
if (scrollTimer) clearTimeout(scrollTimer);
// 实时:只要在安全区间立刻显示
if (scrollTop <= safeShowThreshold) {
showChartArea.value = true;
} else if (scrollTop > scrollHideThreshold) {
showChartArea.value = false;
}
// 滚动停止兜底二次校验
scrollTimer = setTimeout(() => {
if (scrollTop <= safeShowThreshold) {
showChartArea.value = true;
}
}, 100);
};
// 切换tab重置图表显示
const handleTabClick = (tabIndex: number) => {
if (currentTabValue.value === tabIndex) return;
currentTabValue.value = tabIndex;
// 切换tab强制显示图表
showChartArea.value = true;
};
// 页面每次显示强制重置图表为显示状态
onShow(async () => {
showChartArea.value = true;
chartWidth.value = rpx2px(750 - 60);
chartHeight.value = rpx2px(300);
initRecent7Days();
getUnread();
await loadAllTaskByDept();
});
// 页面销毁清除定时器
onUnload(() => {
if (scrollTimer) clearTimeout(scrollTimer);
});
// ======================================
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(err)
}
})
},
fail: () => {
uni.showModal({
title: '需要定位权限',
content: '请允许获取位置才能正常使用',
confirmText: '去设置',
success: (modal) => {
if (modal.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(err)
}
})
}
},
fail: (err) => {
reject('获取权限失败:' + err.errMsg)
}
})
})
}
|
4f475013
刘淇
k线图
|
358
|
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
359
|
const initRecent7Days = async () => {
|
5b5a4862
刘淇
按钮放大
|
360
|
const yesterday = new Date();
|
1d3624b0
刘淇
首页。养护任务
|
361
|
yesterday.setDate(yesterday.getDate() - 1);
|
5b5a4862
刘淇
按钮放大
|
362
|
const sevenDaysAgo = new Date(yesterday);
|
1d3624b0
刘淇
首页。养护任务
|
363
|
sevenDaysAgo.setDate(yesterday.getDate() - 6);
|
5b5a4862
刘淇
按钮放大
|
364
|
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
365
366
|
dateRange.value = [
timeFormat(sevenDaysAgo, 'yyyy-mm-dd'),
|
5b5a4862
刘淇
按钮放大
|
367
|
timeFormat(yesterday, 'yyyy-mm-dd')
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
368
|
];
|
1d3624b0
刘淇
首页。养护任务
|
369
|
initChartData(dateRange.value[0], dateRange.value[1]);
|
4f475013
刘淇
k线图
|
370
371
|
};
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
372
373
374
375
376
377
378
379
380
|
const getUnread = async () => {
try {
const res = await getUnreadCount();
msgCount.value = res || 0;
} catch (error) {
console.error('获取未读消息数失败:', error);
msgCount.value = 0;
}
};
|
4570c70a
刘淇
消息中心
|
381
|
|
1d3624b0
刘淇
首页。养护任务
|
382
|
const initChartData = async (beginTime: string, endTime: string) => {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
383
|
try {
|
1d3624b0
刘淇
首页。养护任务
|
384
|
const postData = { beginTime, endTime };
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
385
|
const res = await getTaskCompletionSummary(postData);
|
1d3624b0
刘淇
首页。养护任务
|
386
387
388
|
klineCategories.value = res.map((item: any) => item.currentDate);
klineChartData.value[0].data = res.map((item: any) => item.completedNum);
klineChartData.value[1].data = res.map((item: any) => item.countpendingNum);
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
389
390
391
392
|
} catch (error) {
console.error('获取图表数据失败:', error);
}
};
|
4f475013
刘淇
k线图
|
393
|
|
1d3624b0
刘淇
首页。养护任务
|
394
|
const loadDistanceApiTask = async (lon: string, lat: string) => {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
395
|
try {
|
1d3624b0
刘淇
首页。养护任务
|
396
397
|
const paramsTodo = { queryType: 1, currentLon: lon, currentLat: lat };
const paramsDone = { queryType: 2, currentLon: lon, currentLat: lat };
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
398
|
const [todoRes, doneRes] = await Promise.all([
|
1d3624b0
刘淇
首页。养护任务
|
399
400
|
taskDetailsWithDistance(paramsTodo),
taskDetailsWithDistance(paramsDone)
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
401
|
]);
|
1d3624b0
刘淇
首页。养护任务
|
402
403
404
405
406
407
408
409
410
411
412
413
414
415
|
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' });
console.error('加载distance接口任务报错', err);
todoFullList.value = [];
doneFullList.value = [];
todoTotal.value = 0;
doneTotal.value = 0;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
416
|
}
|
4f475013
刘淇
k线图
|
417
418
|
};
|
1d3624b0
刘淇
首页。养护任务
|
419
|
const loadSmartSortTask = async (lon: string, lat: string) => {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
420
|
try {
|
1d3624b0
刘淇
首页。养护任务
|
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
|
const [todoRes, doneRes] = await Promise.all([
taskDetailsWithSmartSort({
queryType: 1,
currentLon: lon,
currentLat: lat
}),
taskDetailsWithSmartSort({
queryType: 2,
currentLon: lon,
currentLat: lat
})
]);
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' });
console.error('加载smartSort接口任务报错', err);
todoFullList.value = [];
doneFullList.value = [];
todoTotal.value = 0;
doneTotal.value = 0;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
447
448
449
|
}
};
|
1d3624b0
刘淇
首页。养护任务
|
450
451
452
453
454
455
456
457
458
459
|
const loadAllTaskByDept = async () => {
const loc = await getCurrentLocation();
currentLon.value = loc.lon;
currentLat.value = loc.lat;
if (useDistanceApi.value) {
await loadDistanceApiTask(loc.lon, loc.lat);
} else {
await loadSmartSortTask(loc.lon, loc.lat);
}
};
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
460
|
|
1d3624b0
刘淇
首页。养护任务
|
461
|
const handleDateConfirm = (e: string[]) => {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
462
|
dateRange.value = e;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
463
|
initChartData(e[0], e[1]);
|
4f475013
刘淇
k线图
|
464
|
};
|
12e66ec8
刘淇
新增树
|
465
|
|
4f475013
刘淇
k线图
|
466
|
const handleMsgClick = () => {
|
1d3624b0
刘淇
首页。养护任务
|
467
|
uni.navigateTo({ url: '/pages-sub/msg/index' });
|
4f475013
刘淇
k线图
|
468
469
|
};
|
1d3624b0
刘淇
首页。养护任务
|
470
471
472
473
474
475
476
477
|
const handleTaskClick = (item: any) => {
if (item.taskType == "maintain") {
if (currentTabValue.value === 0) {
uni.navigateTo({ url: `/pages-sub/daily/maintain-manage/add-record?planNo=${item.planNo || ''}` });
}
if (currentTabValue.value === 1) {
uni.navigateTo({ url: `/pages-sub/daily/maintain-manage/finish-plan-detail?planNo=${item.planNo || ''}` });
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
478
|
}
|
1d3624b0
刘淇
首页。养护任务
|
479
480
481
482
483
484
485
486
487
|
if (item.taskType == "inspection") {
if (currentTabValue.value === 0) {
uni.navigateTo({ url: `/pages-sub/daily/patrol-manage/add-patrol-record?planNo=${item.planNo}&batchNo=${item.batchNo}` });
}
if (currentTabValue.value === 1) {
uni.navigateTo({ url: `/pages-sub/daily/patrol-manage/finish-plan-detail?planNo=${item.planNo || ''}` });
}
}
};
|
c293da23
刘淇
新园林init
|
488
489
|
</script>
|
12e66ec8
刘淇
新增树
|
490
|
<style scoped lang="scss">
|
4f475013
刘淇
k线图
|
491
492
|
$primary-color: #1677ff;
$danger-color: #E53935;
|
4f475013
刘淇
k线图
|
493
494
495
496
497
|
$text-color: #333;
$text-color-light: #666;
$text-color-placeholder: #999;
$bg-color: #f5f5f7;
$card-bg: #fff;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
498
499
500
501
502
|
$border-radius: 16px;
$card-radius: 5px;
$spacing-sm: 5px;
$spacing-md: 10px;
$spacing-lg: 15px;
|
1d3624b0
刘淇
首页。养护任务
|
503
|
$border-color: #e5e5e5;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
504
505
|
.page-container {
|
1d3624b0
刘淇
首页。养护任务
|
506
|
height: 100vh;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
507
|
background-color: $bg-color;
|
1d3624b0
刘淇
首页。养护任务
|
508
509
510
|
overflow: hidden;
display: flex;
flex-direction: column;
|
12e66ec8
刘淇
新增树
|
511
512
|
}
|
12e66ec8
刘淇
新增树
|
513
|
.user-info-bar {
|
1d3624b0
刘淇
首页。养护任务
|
514
|
flex-shrink: 0;
|
4f475013
刘淇
k线图
|
515
516
|
background: url("https://img.jichengshanshui.com.cn:28207/appimg/bg.jpg") no-repeat;
background-size: 100% 100%;
|
24c0bbe7
刘淇
登录账号密码 加密存储
|
517
|
padding: 80px $spacing-lg 135px;
|
12e66ec8
刘淇
新增树
|
518
519
520
521
|
display: flex;
justify-content: space-between;
align-items: center;
color: #fff;
|
12e66ec8
刘淇
新增树
|
522
|
|
4f475013
刘淇
k线图
|
523
|
.username {
|
4570c70a
刘淇
消息中心
|
524
|
font-size: 16px;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
525
|
margin-bottom: 4px;
|
4f475013
刘淇
k线图
|
526
|
}
|
4f475013
刘淇
k线图
|
527
|
.login-desc {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
528
|
font-size: 16px;
|
12e66ec8
刘淇
新增树
|
529
|
}
|
12e66ec8
刘淇
新增树
|
530
531
|
.msg-icon {
position: relative;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
532
|
padding: 5px;
|
578c1373
刘淇
样式优化
|
533
|
top: 10px;
|
4f475013
刘淇
k线图
|
534
|
border-radius: 50%;
|
4f475013
刘淇
k线图
|
535
536
537
|
&--hover {
background-color: rgba(255, 255, 255, 0.2);
}
|
12e66ec8
刘淇
新增树
|
538
539
|
.msg-badge {
position: absolute;
|
578c1373
刘淇
样式优化
|
540
541
|
top: -2px;
right: -3px;
|
12e66ec8
刘淇
新增树
|
542
543
544
545
|
}
}
}
|
4f475013
刘淇
k线图
|
546
|
.content-wrap {
|
1d3624b0
刘淇
首页。养护任务
|
547
|
flex: 1;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
548
|
margin-top: -122px;
|
4f475013
刘淇
k线图
|
549
550
|
border-radius: $border-radius $border-radius 0 0;
background-color: $bg-color;
|
4f475013
刘淇
k线图
|
551
|
overflow: hidden;
|
1d3624b0
刘淇
首页。养护任务
|
552
553
554
555
556
557
558
559
560
561
562
563
564
565
|
display: flex;
flex-direction: column;
}
.chart-wrap {
flex-shrink: 0;
transition: all 0.35s ease-out;
opacity: 1;
overflow: hidden;
}
.chart-wrap[hidden] {
opacity: 0;
height: 0;
margin: 0;
|
4f475013
刘淇
k线图
|
566
|
}
|
12e66ec8
刘淇
新增树
|
567
|
|
4f475013
刘淇
k线图
|
568
|
.module-title {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
569
|
padding: $spacing-lg;
|
578c1373
刘淇
样式优化
|
570
|
font-size: 14px;
|
4f475013
刘淇
k线图
|
571
572
|
font-weight: 600;
color: $text-color-light;
|
1d3624b0
刘淇
首页。养护任务
|
573
|
flex-shrink: 0;
|
4f475013
刘淇
k线图
|
574
575
576
577
578
579
580
|
}
.task-chart-card {
background-color: $card-bg;
border-radius: $card-radius;
margin: 0 $spacing-lg $spacing-md;
padding: $spacing-md;
|
1d3624b0
刘淇
首页。养护任务
|
581
|
flex-shrink: 0;
|
12e66ec8
刘淇
新增树
|
582
583
584
|
.card-header {
display: flex;
justify-content: space-between;
|
12e66ec8
刘淇
新增树
|
585
|
align-items: center;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
586
|
font-size: 12px;
|
4f475013
刘淇
k线图
|
587
588
|
color: $text-color-placeholder;
margin-bottom: $spacing-md;
|
4f475013
刘淇
k线图
|
589
|
.date-picker-wrap {
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
590
591
|
padding: 2px 4px;
border-radius: 3px;
|
4f475013
刘淇
k线图
|
592
|
transition: background-color 0.2s;
|
5b5a4862
刘淇
按钮放大
|
593
594
|
position: relative;
z-index: 999;
|
4f475013
刘淇
k线图
|
595
596
597
|
&:active {
background-color: $bg-color;
}
|
12e66ec8
刘淇
新增树
|
598
599
|
}
}
|
4f475013
刘淇
k线图
|
600
|
.chart-container {
|
12e66ec8
刘淇
新增树
|
601
|
width: 100%;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
602
|
height: 150px;
|
4f475013
刘淇
k线图
|
603
604
605
|
display: flex;
align-items: center;
justify-content: center;
|
12e66ec8
刘淇
新增树
|
606
607
|
}
}
|
1d3624b0
刘淇
首页。养护任务
|
608
609
610
611
612
613
614
615
616
617
|
.con-wrap {
border-radius: 8px;
background-color: #fff;
margin: 0 15px;
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
|
12e66ec8
刘淇
新增树
|
618
|
|
1d3624b0
刘淇
首页。养护任务
|
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
|
.con-title {
padding: 10px 15px;
border-bottom: 1px solid #f0e9e9;
flex-shrink: 0;
}
.custom-tab-wrap {
display: flex;
align-items: center;
gap: 20rpx;
padding: 20rpx 0 20rpx 20rpx;
background: #fff;
flex-shrink: 0;
}
.tab-capsule {
padding: 10rpx 20rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #999;
background: #f5f5f5;
border-radius: 0;
transition: all 0.2s ease;
font-weight: 500;
}
.tab-capsule.active {
color: #d4af37;
background: #fff8dc;
}
.tip-header {
display: flex;
align-items: center;
gap: 8rpx;
padding: 12rpx 15rpx;
background: #e6f7ff;
font-size: 14px;
color: #000;
flex-shrink: 0;
}
.tip-top {
padding: 8px 0 0 70px;
flex-shrink: 0;
|
12e66ec8
刘淇
新增树
|
665
666
|
}
|
4f475013
刘淇
k线图
|
667
|
.task-list-container {
|
1d3624b0
刘淇
首页。养护任务
|
668
669
670
671
672
673
674
675
|
width: 100%;
height: 100%;
padding-bottom: 300rpx;
box-sizing: border-box;
}
.empty-box {
padding: 60rpx 0;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
676
|
}
|
12e66ec8
刘淇
新增树
|
677
|
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
678
679
680
681
|
.task-item {
padding: $spacing-md;
transition: background-color 0.2s;
border-bottom: 1px solid $border-color;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
682
683
684
|
&:last-child {
border-bottom: none;
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
685
686
687
|
&--hover {
background-color: $bg-color;
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
688
689
690
|
&__content {
width: 100%;
}
|
1d3624b0
刘淇
首页。养护任务
|
691
692
693
694
695
696
697
698
699
700
701
702
703
704
|
.name-fixed-wrap {
display: flex;
}
.task-item__name {
width: 60px;
}
.task-name-text {
flex: 1;
font-size: 14px;
color: $text-color;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
705
|
&__name {
|
1d3624b0
刘淇
首页。养护任务
|
706
|
font-size: 15px;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
707
|
color: $text-color;
|
1d3624b0
刘淇
首页。养护任务
|
708
|
display: inline-block;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
709
|
}
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
710
711
|
&__footer {
display: flex;
|
1d3624b0
刘淇
首页。养护任务
|
712
713
714
715
716
|
align-items: flex-start;
gap: 6rpx;
font-size: 13px;
color: $text-color-light;
margin-top: $spacing-sm;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
717
|
align-items: center;
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
718
719
|
}
}
|
1d3624b0
刘淇
首页。养护任务
|
720
721
722
723
|
.loc-icon {
width: 20px;
height: 20px;
}
|
4f475013
刘淇
k线图
|
724
|
|
cf70629b
刘淇
养护计划 照片 自己写样式
|
725
726
|
.urgency-tag {
color: #7D7D7D;
|
12e66ec8
刘淇
新增树
|
727
728
|
}
</style>
|