From 3328aec7bc4cc2c090f015cba905a82d6d52870c Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期日, 19 十月 2025 10:34:29 +0800
Subject: [PATCH] fix:更新
---
app/pages/index.vue | 520 +++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 355 insertions(+), 165 deletions(-)
diff --git a/app/pages/index.vue b/app/pages/index.vue
index 5539ffa..82ed65a 100644
--- a/app/pages/index.vue
+++ b/app/pages/index.vue
@@ -5,17 +5,17 @@
<view class="user-info-content">
<view class="user-details">
<view class="user-name">{{ userName || '鏈櫥褰�' }}</view>
- <view class="vehicle-info">
+ <view class="vehicle-info" @click="goToBindVehicle">
<text v-if="boundVehicle">鍏宠仈杞︾墝鍙凤細{{ boundVehicle }}</text>
<text v-else>鏈粦瀹氳溅鐗屽彿</text>
+ <uni-icons
+ :type="boundVehicle ? 'loop' : 'plus-filled'"
+ size="18"
+ :color="boundVehicle ? '#007AFF' : '#999'"
+ style="margin-left: 8rpx;"
+ ></uni-icons>
</view>
</view>
- <button
- class="bind-vehicle-btn"
- @click="goToBindVehicle"
- >
- {{ boundVehicle ? '鏇存崲杞﹁締' : '缁戝畾杞﹁締' }}
- </button>
</view>
</view>
@@ -78,46 +78,59 @@
<!-- 鎿嶄綔鎸夐挳 -->
<view class="task-actions">
- <button
- class="action-btn"
- :class="{ disabled: isActionDisabled(task, 'depart') }"
- @click="handleTaskAction(task, 'depart')"
- v-if="task.status !== 'completed'"
- >
- 鍑哄彂
- </button>
- <button
- class="action-btn"
- :class="{ disabled: isActionDisabled(task, 'arrive') }"
- @click="handleTaskAction(task, 'arrive')"
- v-if="task.status !== 'completed'"
- >
- 宸插埌杈�
- </button>
- <button
- class="action-btn"
- :class="{ disabled: isActionDisabled(task, 'return') }"
- @click="handleTaskAction(task, 'return')"
- v-if="task.status !== 'completed'"
- >
- 杩旂▼
- </button>
- <button
- class="action-btn"
- :class="{ disabled: isActionDisabled(task, 'settle') }"
- @click="handleTaskAction(task, 'settle')"
- v-if="task.status !== 'completed'"
- >
- 缁撶畻
- </button>
- <button
- class="action-btn primary"
- :class="{ disabled: isActionDisabled(task, 'complete') }"
- @click="handleTaskAction(task, 'complete')"
- v-if="task.status !== 'completed'"
- >
- 宸插畬鎴�
- </button>
+ <!-- 寰呭鐞嗙姸鎬�: 鏄剧ず鍑哄彂銆佸彇娑� -->
+ <template v-if="task.taskStatus === 'PENDING'">
+ <button
+ class="action-btn primary"
+ @click="handleTaskAction(task, 'depart')"
+ >
+ 鍑哄彂
+ </button>
+ <button
+ class="action-btn cancel"
+ @click="handleTaskAction(task, 'cancel')"
+ >
+ 鍙栨秷
+ </button>
+ </template>
+
+ <!-- 鍑哄彂涓姸鎬�: 鏄剧ず宸插埌杈俱�佸己鍒剁粨鏉� -->
+ <template v-else-if="task.taskStatus === 'DEPARTING'">
+ <button
+ class="action-btn primary"
+ @click="handleTaskAction(task, 'arrive')"
+ >
+ 宸插埌杈�
+ </button>
+ <button
+ class="action-btn cancel"
+ @click="handleTaskAction(task, 'forceCancel')"
+ >
+ 寮哄埗缁撴潫
+ </button>
+ </template>
+
+ <!-- 宸插埌杈剧姸鎬�: 鏄剧ず宸茶繑绋� -->
+ <template v-else-if="task.taskStatus === 'ARRIVED'">
+ <button
+ class="action-btn primary"
+ @click="handleTaskAction(task, 'return')"
+ >
+ 宸茶繑绋�
+ </button>
+ </template>
+
+ <!-- 杩旂▼涓姸鎬�: 鏄剧ず宸插畬鎴� -->
+ <template v-else-if="task.taskStatus === 'RETURNING'">
+ <button
+ class="action-btn primary"
+ @click="handleTaskAction(task, 'complete')"
+ >
+ 宸插畬鎴�
+ </button>
+ </template>
+
+ <!-- 宸插畬鎴�/宸插彇娑�: 涓嶆樉绀烘寜閽� -->
</view>
</view>
@@ -132,14 +145,18 @@
<script>
import { mapState } from 'vuex'
+ import { getMyTasks, changeTaskStatus } from '@/api/task'
+ import { getUserProfile } from '@/api/system/user'
+ import { getUserBoundVehicle } from '@/api/vehicle'
export default {
data() {
return {
- // 妯℃嫙鐢ㄦ埛缁戝畾鐨勮溅杈嗕俊鎭�
- boundVehicle: '绮12345', // 妯℃嫙宸茬粦瀹氳溅杈�
+ // 鐢ㄦ埛缁戝畾鐨勮溅杈嗕俊鎭�
+ boundVehicle: '',
+ boundVehicleId: null,
- // 妯℃嫙娑堟伅鏁版嵁
+ // 娑堟伅鏁版嵁
messages: [
{
id: 1,
@@ -183,69 +200,23 @@
}
],
- // 妯℃嫙姝e湪杩愯鐨勪换鍔″垪琛�
- taskList: [
- {
- id: 1,
- title: '绱ф�ョ淮淇换鍔�',
- type: 'maintenance', // 缁翠慨淇濆吇
- startLocation: '骞垮窞甯傚ぉ娌冲尯XX璺�123鍙�',
- endLocation: '骞垮窞甯傜櫧浜戝尯YY璺�456鍙�',
- startTime: '2023-05-15 15:00',
- assignee: '寮犱笁',
- status: 'pending',
- vehicle: '绮12345',
- taskNo: 'RW20230515001'
- },
- {
- id: 2,
- title: '瀹氭湡淇濆吇浠诲姟',
- type: 'maintenance', // 缁翠慨淇濆吇
- startLocation: '娣卞湷甯傚崡灞卞尯XX璺�789鍙�',
- endLocation: '娣卞湷甯傜鐢板尯YY璺�999鍙�',
- startTime: '2023-05-14 10:00',
- assignee: '鏉庡洓',
- status: 'processing',
- vehicle: '绮67890',
- taskNo: 'RW20230514002'
- },
- {
- id: 5,
- title: '鎬ユ晳杞繍浠诲姟',
- type: 'emergency', // 鎬ユ晳杞繍
- startLocation: '骞垮窞甯傝秺绉�鍖哄尰闄㈣矾1鍙�',
- endLocation: '骞垮窞甯傛捣鐝犲尯鍖婚櫌璺�2鍙�',
- startTime: '2023-05-16 14:00',
- assignee: '寮犲尰鐢�,鏉庢姢澹�',
- status: 'pending',
- vehicle: '绮33333',
- taskNo: 'RW20230516005'
- },
- {
- id: 6,
- title: '绂忕杞︿换鍔�',
- type: 'welfare', // 绂忕杞�
- startLocation: '骞垮窞甯傝崝婀惧尯绀惧尯璺�10鍙�',
- endLocation: '骞垮窞甯傚ぉ娌冲尯鍏昏�侀櫌璺�20鍙�',
- startTime: '2023-05-17 08:00',
- assignee: '鐜嬪徃鏈�',
- status: 'processing',
- vehicle: '绮44444',
- taskNo: 'RW20230517006'
- }
- ]
+ // 姝e湪杩愯鐨勪换鍔″垪琛�
+ taskList: [],
+ loading: false
}
},
computed: {
...mapState({
- userName: state => state.user.name
+ userName: state => state.user.name,
+ currentUser: state => state.user
}),
- // 姝e湪杩愯鐨勪换鍔★紙寰呭鐞嗗拰澶勭悊涓殑浠诲姟锛�
+ // 姝e湪杩愯鐨勪换鍔★紙寰呭鐞嗗拰鍚勭澶勭悊涓殑浠诲姟锛�
runningTasks() {
- return this.taskList.filter(task =>
- task.status === 'pending' || task.status === 'processing'
- );
+ return this.taskList.filter(task => {
+ // 鍖呭惈寰呭鐞嗐�佸嚭鍙戜腑銆佸凡鍒拌揪銆佽繑绋嬩腑绛夋墍鏈夋湭瀹屾垚鐨勭姸鎬�
+ return ['PENDING', 'DEPARTING', 'ARRIVED', 'RETURNING', 'IN_PROGRESS'].includes(task.taskStatus)
+ });
},
// 鏈娑堟伅鏁伴噺
@@ -253,7 +224,161 @@
return this.messages.filter(message => !message.read).length;
}
},
+ onLoad() {
+ // 鍔犺浇鐢ㄦ埛缁戝畾杞﹁締淇℃伅
+ this.loadUserVehicle()
+ // 鍔犺浇姝e湪杩愯鐨勪换鍔�
+ this.loadRunningTasks()
+ },
+ onShow() {
+ // 姣忔鏄剧ず椤甸潰鏃跺埛鏂颁换鍔″垪琛ㄥ拰缁戝畾杞﹁締
+ this.loadUserVehicle()
+ this.loadRunningTasks()
+ },
+ onPullDownRefresh() {
+ // 涓嬫媺鍒锋柊
+ this.loadRunningTasks()
+ setTimeout(() => {
+ uni.stopPullDownRefresh()
+ }, 1000)
+ },
methods: {
+ // 鍔犺浇鐢ㄦ埛缁戝畾鐨勮溅杈嗕俊鎭�
+ loadUserVehicle() {
+ const userId = this.currentUser.userId
+ if (!userId) {
+ console.error('鐢ㄦ埛鏈櫥褰曪紝鏃犳硶鑾峰彇缁戝畾杞﹁締淇℃伅')
+ this.boundVehicle = ''
+ this.boundVehicleId = null
+ return
+ }
+
+ getUserBoundVehicle(userId).then(response => {
+ if (response.code === 200 && response.data) {
+ const vehicle = response.data
+ this.boundVehicle = vehicle.vehicleNumber || '鏈煡杞︾墝'
+ this.boundVehicleId = vehicle.vehicleId
+ console.log('鐢ㄦ埛缁戝畾杞﹁締:', this.boundVehicle)
+ } else {
+ this.boundVehicle = ''
+ this.boundVehicleId = null
+ }
+ }).catch(error => {
+ console.error('鑾峰彇缁戝畾杞﹁締淇℃伅澶辫触:', error)
+ this.boundVehicle = ''
+ this.boundVehicleId = null
+ })
+ },
+
+ // 鍔犺浇鐢ㄦ埛淇℃伅锛堜繚鐣欎互鍏煎涔嬪墠鐨勪唬鐮侊級
+ loadUserProfile() {
+ const userId = this.currentUser.userId
+ if (!userId) {
+ console.error('鐢ㄦ埛鏈櫥褰曪紝鏃犳硶鑾峰彇鐢ㄦ埛淇℃伅')
+ return
+ }
+
+ getUserProfile().then(response => {
+ const userInfo = response.data || response
+ // 鑾峰彇鐢ㄦ埛缁戝畾鐨勮溅杈嗕俊鎭�
+ if (userInfo.boundVehicle) {
+ this.boundVehicle = userInfo.boundVehicle.vehicleNumber
+ this.boundVehicleId = userInfo.boundVehicle.vehicleId
+ }
+ }).catch(error => {
+ console.error('鑾峰彇鐢ㄦ埛淇℃伅澶辫触:', error)
+ })
+ },
+
+ // 鍔犺浇姝e湪杩愯鐨勪换鍔�
+ loadRunningTasks() {
+ const userId = this.currentUser.userId
+ if (!userId) {
+ console.error('鐢ㄦ埛鏈櫥褰曪紝鏃犳硶鍔犺浇浠诲姟鍒楄〃')
+ return
+ }
+
+ this.loading = true
+ // 浣跨敤 /task/my 鎺ュ彛鑾峰彇褰撳墠鐢ㄦ埛鐩稿叧鐨勬墍鏈変换鍔★紙鐢ㄦ埛鍒涘缓銆佸垎閰嶇粰鐢ㄦ埛銆佹墽琛屼汉鏄敤鎴凤級
+ getMyTasks().then(response => {
+ this.loading = false
+ // 鏍规嵁鍚庣杩斿洖鐨勬暟鎹粨鏋勮繘琛岃В鏋�
+ const data = response.data || response.rows || response || []
+ // 杩囨护鍑烘湭瀹屾垚鐨勪换鍔�
+ const allTasks = Array.isArray(data) ? data : []
+ this.taskList = allTasks
+ .filter(task => {
+ // 鍙樉绀烘湭瀹屾垚鍜屾湭鍙栨秷鐨勪换鍔�
+ return task.taskStatus !== 'COMPLETED' && task.taskStatus !== 'CANCELLED'
+ })
+ .map(task => {
+ // 浠巃ssignedVehicles鏁扮粍涓幏鍙栬溅杈嗕俊鎭�
+ let vehicleInfo = '鏈垎閰嶈溅杈�'
+ if (task.assignedVehicles && task.assignedVehicles.length > 0) {
+ const firstVehicle = task.assignedVehicles[0]
+ vehicleInfo = firstVehicle.vehicleNo || '鏈煡杞︾墝'
+ if (task.assignedVehicles.length > 1) {
+ vehicleInfo += ` 绛�${task.assignedVehicles.length}杈哷
+ }
+ }
+
+ return {
+ ...task,
+ // 鏍煎紡鍖栨樉绀哄瓧娈�
+ id: task.taskId,
+ type: task.taskType,
+ vehicle: vehicleInfo,
+ vehicleList: task.assignedVehicles || [],
+ startLocation: this.formatAddress(task.departureAddress || task.startLocation || '鏈缃�'),
+ endLocation: this.formatAddress(task.destinationAddress || task.endLocation || '鏈缃�'),
+ startTime: task.plannedStartTime ? this.formatDateTime(task.plannedStartTime) : '鏈缃�',
+ assignee: task.assigneeName || '鏈垎閰�',
+ taskNo: task.taskCode || '鏈煡缂栧彿',
+ status: this.convertStatus(task.taskStatus) // 杞崲鐘舵�佹牸寮忎互鍏煎鏃I
+ }
+ })
+ }).catch(error => {
+ this.loading = false
+ console.error('鍔犺浇浠诲姟鍒楄〃澶辫触:', error)
+ })
+ },
+
+ // 鏍煎紡鍖栨棩鏈熸椂闂�
+ formatDateTime(dateTime) {
+ if (!dateTime) return ''
+ const date = new Date(dateTime)
+ return date.toLocaleString('zh-CN', {
+ year: 'numeric',
+ month: '2-digit',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit'
+ })
+ },
+
+ // 鏍煎紡鍖栧湴鍧� - 鍙樉绀�-鍓嶉潰鐨勯儴鍒�
+ formatAddress(address) {
+ if (!address) return '鏈缃�'
+ const dashIndex = address.indexOf('-')
+ if (dashIndex > 0) {
+ return address.substring(0, dashIndex)
+ }
+ return address
+ },
+
+ // 杞崲鐘舵�佹牸寮忥紙灏嗘暟鎹簱鐘舵�佽浆鎹负UI浣跨敤鐨勭姸鎬侊級
+ convertStatus(dbStatus) {
+ const statusMap = {
+ 'PENDING': 'pending',
+ 'DEPARTING': 'processing',
+ 'ARRIVED': 'processing',
+ 'RETURNING': 'processing',
+ 'IN_PROGRESS': 'processing',
+ 'COMPLETED': 'completed',
+ 'CANCELLED': 'cancelled'
+ }
+ return statusMap[dbStatus] || 'pending'
+ },
// 璺宠浆鍒扮粦瀹氳溅杈嗛〉闈�
goToBindVehicle() {
// 璺宠浆鍒扮粦瀹氳溅杈嗙殑椤甸潰
@@ -267,79 +392,131 @@
// 鏌ョ湅浠诲姟璇︽儏
viewTaskDetail(task) {
- // 璺宠浆鍒颁换鍔¤鎯呴〉闈�
- this.$tab.navigateTo(`/pages/task/detail?id=${task.id}`);
- },
-
- // 鍒ゆ柇鎿嶄綔鎸夐挳鏄惁绂佺敤
- isActionDisabled(task, action) {
- // 鏍规嵁浠诲姟鐘舵�佸拰鎿嶄綔绫诲瀷鍒ゆ柇鏄惁绂佺敤
- switch (action) {
- case 'depart':
- return task.status !== 'pending';
- case 'arrive':
- return task.status !== 'processing';
- case 'return':
- return task.status !== 'processing';
- case 'settle':
- return task.status !== 'processing';
- case 'complete':
- return task.status !== 'processing';
- default:
- return false;
- }
+ // 璺宠浆鍒颁换鍔¤鎯呴〉闈� - 浣跨敤taskId
+ this.$tab.navigateTo(`/pages/task/detail?id=${task.taskId || task.id}`);
},
// 澶勭悊浠诲姟鎿嶄綔
handleTaskAction(task, action) {
- if (this.isActionDisabled(task, action)) {
- return;
- }
-
switch (action) {
case 'depart':
- // 鍑哄彂鎿嶄綔锛屾牴鎹换鍔$被鍨嬫樉绀轰笉鍚岀殑纭淇℃伅
- let departMessage = '纭畾瑕佹爣璁颁负宸插嚭鍙戝悧锛�';
- if (task.type !== 'maintenance' && task.type !== 'refuel' && task.type !== 'inspection') {
- departMessage = '鍙戝嚭鍘荤洰鐨勫湴,纭锛�';
- }
- this.$modal.confirm(departMessage).then(() => {
- task.status = 'processing';
- this.$modal.showToast('宸插嚭鍙�');
- // 杩欓噷鍙互璋冪敤API鏇存柊浠诲姟鐘舵��
+ // 鍑哄彂 -> 鐘舵�佸彉涓哄嚭鍙戜腑
+ this.$modal.confirm('纭畾瑕佸嚭鍙戝悧锛�').then(() => {
+ this.updateTaskStatus(task.taskId, 'DEPARTING', '浠诲姟宸插嚭鍙�')
}).catch(() => {});
break;
+
+ case 'cancel':
+ // 鍙栨秷 -> 浜屾纭鍚庣姸鎬佸彉涓哄凡鍙栨秷
+ this.$modal.confirm('纭畾瑕佸彇娑堟浠诲姟鍚楋紵').then(() => {
+ this.updateTaskStatus(task.taskId, 'CANCELLED', '浠诲姟宸插彇娑�')
+ }).catch(() => {});
+ break;
+
case 'arrive':
- // 宸插埌杈炬搷浣�
- this.$modal.confirm('宸茬粡鍒拌揪鐩殑鍦帮紝纭锛�').then(() => {
- this.$modal.showToast('宸插埌杈�');
- // 杩欓噷鍙互璋冪敤API鏇存柊浠诲姟鐘舵��
+ // 宸插埌杈� -> 鐘舵�佸彉涓哄凡鍒拌揪
+ this.$modal.confirm('纭宸插埌杈剧洰鐨勫湴锛�').then(() => {
+ this.updateTaskStatus(task.taskId, 'ARRIVED', '宸插埌杈剧洰鐨勫湴')
}).catch(() => {});
break;
+
+ case 'forceCancel':
+ // 寮哄埗缁撴潫 -> 鐘舵�佸彉涓哄凡鍙栨秷
+ this.$modal.confirm('纭畾瑕佸己鍒剁粨鏉熸浠诲姟鍚楋紵').then(() => {
+ this.updateTaskStatus(task.taskId, 'CANCELLED', '浠诲姟宸插己鍒剁粨鏉�')
+ }).catch(() => {});
+ break;
+
case 'return':
- // 杩旂▼鎿嶄綔
- this.$modal.confirm('鐜板湪宸茬粡杩旂▼涓紝纭锛�').then(() => {
- this.$modal.showToast('杩旂▼涓�');
- // 杩欓噷鍙互璋冪敤API鏇存柊浠诲姟鐘舵��
+ // 宸茶繑绋� -> 鐘舵�佸彉涓鸿繑绋嬩腑
+ this.$modal.confirm('纭寮�濮嬭繑绋嬶紵').then(() => {
+ this.updateTaskStatus(task.taskId, 'RETURNING', '宸插紑濮嬭繑绋�')
}).catch(() => {});
break;
- case 'settle':
- // 缁撶畻鎿嶄綔锛岃烦杞埌缁撶畻椤甸潰
- this.$tab.navigateTo(`/pages/task/settlement?id=${task.id}`);
- break;
+
case 'complete':
- // 宸插畬鎴愭搷浣�
- this.$modal.confirm('浠诲姟鏄惁宸茬粡鍏ㄩ儴瀹屾垚锛岀‘璁わ紵').then(() => {
- task.status = 'completed';
- this.$modal.showToast('浠诲姟宸插畬鎴�');
- // 杩欓噷鍙互璋冪敤API鏇存柊浠诲姟鐘舵��
+ // 宸插畬鎴� -> 鐘舵�佸彉涓哄凡瀹屾垚
+ this.$modal.confirm('纭浠诲姟宸插畬鎴愶紵').then(() => {
+ this.updateTaskStatus(task.taskId, 'COMPLETED', '浠诲姟宸插畬鎴�')
}).catch(() => {});
break;
}
},
+ // 鏇存柊浠诲姟鐘舵��
+ updateTaskStatus(taskId, status, remark) {
+ // 鑾峰彇GPS浣嶇疆淇℃伅
+ this.getLocationAndUpdateStatus(taskId, status, remark)
+ },
+
+ // 鑾峰彇浣嶇疆淇℃伅骞舵洿鏂扮姸鎬�
+ getLocationAndUpdateStatus(taskId, status, remark) {
+ const that = this
+
+ // 浣跨敤uni.getLocation鑾峰彇GPS浣嶇疆
+ uni.getLocation({
+ type: 'gcj02',
+ geocode: true,
+ altitude: true,
+ success: function(res) {
+ console.log('GPS瀹氫綅鎴愬姛:', res)
+
+ const statusData = {
+ taskStatus: status,
+ remark: remark,
+ latitude: res.latitude,
+ longitude: res.longitude,
+ locationAddress: res.address ? res.address.street || res.address.poiName || '' : '',
+ locationProvince: res.address ? res.address.province || '' : '',
+ locationCity: res.address ? res.address.city || '' : '',
+ locationDistrict: res.address ? res.address.district || '' : '',
+ gpsAccuracy: res.accuracy,
+ altitude: res.altitude,
+ speed: res.speed,
+ heading: res.direction || res.heading
+ }
+
+ changeTaskStatus(taskId, statusData).then(response => {
+ that.$modal.showToast('鐘舵�佹洿鏂版垚鍔�')
+ that.loadRunningTasks()
+ }).catch(error => {
+ console.error('鏇存柊浠诲姟鐘舵�佸け璐�:', error)
+ that.$modal.showToast('鐘舵�佹洿鏂板け璐ワ紝璇烽噸璇�')
+ })
+ },
+ fail: function(err) {
+ console.error('GPS瀹氫綅澶辫触:', err)
+
+ that.$modal.confirm('GPS瀹氫綅澶辫触锛屾槸鍚︾户缁洿鏂扮姸鎬侊紵').then(() => {
+ const statusData = {
+ taskStatus: status,
+ remark: remark
+ }
+
+ changeTaskStatus(taskId, statusData).then(response => {
+ that.$modal.showToast('鐘舵�佹洿鏂版垚鍔�')
+ that.loadRunningTasks()
+ }).catch(error => {
+ console.error('鏇存柊浠诲姟鐘舵�佸け璐�:', error)
+ that.$modal.showToast('鐘舵�佹洿鏂板け璐ワ紝璇烽噸璇�')
+ })
+ }).catch(() => {})
+ }
+ })
+ },
+
getStatusText(status) {
+ // 鏀寔鏂版棫涓ょ鐘舵�佹牸寮�
const statusMap = {
+ // 鏂版牸寮忥紙鏁版嵁搴撶姸鎬侊級
+ 'PENDING': '寰呭鐞�',
+ 'DEPARTING': '鍑哄彂涓�',
+ 'ARRIVED': '宸插埌杈�',
+ 'RETURNING': '杩旂▼涓�',
+ 'COMPLETED': '宸插畬鎴�',
+ 'CANCELLED': '宸插彇娑�',
+ 'IN_PROGRESS': '澶勭悊涓�',
+ // 鏃ф牸寮忥紙UI鐘舵�侊級
'pending': '寰呭鐞�',
'processing': '澶勭悊涓�',
'completed': '宸插畬鎴�'
@@ -349,6 +526,13 @@
getTaskTypeText(type) {
const typeMap = {
+ // 鏂版牸寮忥紙鏁版嵁搴撶被鍨嬶級
+ 'MAINTENANCE': '缁翠慨淇濆吇',
+ 'FUEL': '鍔犳补',
+ 'OTHER': '鍏朵粬',
+ 'EMERGENCY_TRANSFER': '鎬ユ晳杞繍',
+ 'WELFARE': '绂忕杞�',
+ // 鏃ф牸寮忥紙UI绫诲瀷锛�
'maintenance': '缁翠慨淇濆吇',
'refuel': '鍔犳补',
'inspection': '宸℃',
@@ -402,6 +586,8 @@
align-items: center;
.user-details {
+ flex: 1;
+
.user-name {
font-size: 36rpx;
font-weight: bold;
@@ -412,15 +598,14 @@
.vehicle-info {
font-size: 28rpx;
color: #666;
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+
+ &:active {
+ opacity: 0.7;
+ }
}
- }
-
- .bind-vehicle-btn {
- background-color: #007AFF;
- color: white;
- border-radius: 10rpx;
- padding: 15rpx 30rpx;
- font-size: 28rpx;
}
}
}
@@ -568,6 +753,11 @@
color: white;
}
+ &.cancel {
+ background-color: #ff3b30;
+ color: white;
+ }
+
&.disabled {
opacity: 0.5;
}
--
Gitblit v1.9.1