Commit 06eeda541a4de4f534f1dd2c654b92d86958b34f
1 parent
2bffa686
样式优化
Showing
5 changed files
with
82 additions
and
221 deletions
common/config/env.js
| @@ -2,10 +2,10 @@ | @@ -2,10 +2,10 @@ | ||
| 2 | const env = { | 2 | const env = { |
| 3 | // 开发环境 | 3 | // 开发环境 |
| 4 | development: { | 4 | development: { |
| 5 | - baseUrl: 'http://192.168.1.55:48081', | ||
| 6 | - uploadUrl:'http://192.168.1.55:48081', | ||
| 7 | - // baseUrl: 'https://test.jichengshanshui.com.cn:28302', | ||
| 8 | - // uploadUrl: 'https://test.jichengshanshui.com.cn:28302', | 5 | + // baseUrl: 'http://192.168.1.55:48081', |
| 6 | + // uploadUrl:'http://192.168.1.55:48081', | ||
| 7 | + baseUrl: 'https://test.jichengshanshui.com.cn:28302', | ||
| 8 | + uploadUrl: 'https://test.jichengshanshui.com.cn:28302', | ||
| 9 | // baseApi:'admin-api', | 9 | // baseApi:'admin-api', |
| 10 | // appApi:'app-api' | 10 | // appApi:'app-api' |
| 11 | }, | 11 | }, |
pages-sub/daily/maintain-manage/index.vue
| @@ -3,30 +3,6 @@ | @@ -3,30 +3,6 @@ | ||
| 3 | <!-- 吸顶区域 --> | 3 | <!-- 吸顶区域 --> |
| 4 | <up-sticky> | 4 | <up-sticky> |
| 5 | <view class="sticky-wrap"> | 5 | <view class="sticky-wrap"> |
| 6 | - <!-- 第一行标签:养护类型 --> | ||
| 7 | - <!-- <up-tabs | ||
| 8 | - v-model="activeType" | ||
| 9 | - :list="typeTabs" | ||
| 10 | - line-width="40rpx" | ||
| 11 | - active-color="#2563EB" | ||
| 12 | - inactive-color="#606266" | ||
| 13 | - :scrollable="true" | ||
| 14 | - class="first-tabs" | ||
| 15 | - @click="handleTypeChange" | ||
| 16 | - ></up-tabs> --> | ||
| 17 | - | ||
| 18 | - <!-- 第二行标签:状态筛选 --> | ||
| 19 | - <!-- <up-tabs | ||
| 20 | - v-model="activeStatus" | ||
| 21 | - :list="statusTabs" | ||
| 22 | - line-width="40rpx" | ||
| 23 | - active-color="#2563EB" | ||
| 24 | - inactive-color="#606266" | ||
| 25 | - :scrollable="true" | ||
| 26 | - class="second-tabs" | ||
| 27 | - @click="handleStatusChange" | ||
| 28 | - ></up-tabs> --> | ||
| 29 | - | ||
| 30 | <!-- 动态搜索框(道路名称/计划名称) --> | 6 | <!-- 动态搜索框(道路名称/计划名称) --> |
| 31 | <up-search | 7 | <up-search |
| 32 | v-model="searchValue" | 8 | v-model="searchValue" |
| @@ -44,7 +20,6 @@ | @@ -44,7 +20,6 @@ | ||
| 44 | ></up-search> | 20 | ></up-search> |
| 45 | </view> | 21 | </view> |
| 46 | </up-sticky> | 22 | </up-sticky> |
| 47 | - | ||
| 48 | <!-- 内容区域 - 集成z-paging分页 --> | 23 | <!-- 内容区域 - 集成z-paging分页 --> |
| 49 | <z-paging | 24 | <z-paging |
| 50 | ref="pagingRef" | 25 | ref="pagingRef" |
| @@ -52,14 +27,12 @@ | @@ -52,14 +27,12 @@ | ||
| 52 | @query="fetchData" | 27 | @query="fetchData" |
| 53 | :auto-show-system-loading="true" | 28 | :auto-show-system-loading="true" |
| 54 | > | 29 | > |
| 55 | - <!-- 空数据提示 --> | ||
| 56 | - <template #empty> | ||
| 57 | - <empty-view/> | ||
| 58 | - </template> | ||
| 59 | - | 30 | + <!-- 空数据提示 --> |
| 31 | + <template #empty> | ||
| 32 | + <empty-view /> | ||
| 33 | + </template> | ||
| 60 | <!-- 道路类型卡片 --> | 34 | <!-- 道路类型卡片 --> |
| 61 | <view v-if="activeType === '道路'" class="common-card-list maintain-card-list"> | 35 | <view v-if="activeType === '道路'" class="common-card-list maintain-card-list"> |
| 62 | - | ||
| 63 | <up-card | 36 | <up-card |
| 64 | :border="false" | 37 | :border="false" |
| 65 | :foot-border-top="false" | 38 | :foot-border-top="false" |
| @@ -77,137 +50,36 @@ | @@ -77,137 +50,36 @@ | ||
| 77 | <view class="common-card-title common-name u-line-1">{{ item.roadName || '无道路名称' }}</view> | 50 | <view class="common-card-title common-name u-line-1">{{ item.roadName || '无道路名称' }}</view> |
| 78 | </view> | 51 | </view> |
| 79 | </template> | 52 | </template> |
| 80 | - | ||
| 81 | <template #body> | 53 | <template #body> |
| 82 | <view class="card-body"> | 54 | <view class="card-body"> |
| 83 | -<!-- <view class="">--> | ||
| 84 | -<!-- <up-button--> | ||
| 85 | -<!-- type="primary"--> | ||
| 86 | -<!-- size="mini"--> | ||
| 87 | -<!-- @click="goToDetail(item)"--> | ||
| 88 | -<!-- class="submit-record-btn"--> | ||
| 89 | -<!-- >--> | ||
| 90 | -<!-- 计划明细--> | ||
| 91 | -<!-- </up-button>--> | ||
| 92 | -<!-- </view>--> | ||
| 93 | - | ||
| 94 | -<!-- <view class="u-body-item u-flex">--> | ||
| 95 | -<!-- <view class="u-body-item-title">批次号:</view>--> | ||
| 96 | -<!-- <view class="u-line-1 u-body-value">{{ item.batchNo || '-' }}</view>--> | ||
| 97 | -<!-- </view>--> | ||
| 98 | - <view class="u-body-item u-flex"> | 55 | + <view class="u-body-item"> |
| 99 | <view class="u-body-item-title">道路名称:</view> | 56 | <view class="u-body-item-title">道路名称:</view> |
| 100 | <view class="u-line-1 u-body-value">{{ item.roadName || '-' }}</view> | 57 | <view class="u-line-1 u-body-value">{{ item.roadName || '-' }}</view> |
| 101 | </view> | 58 | </view> |
| 102 | - <!-- <view class="u-body-item u-flex"> | ||
| 103 | - <view class="u-body-item-title">计划名称:</view> | ||
| 104 | - <view class="u-line-1 u-body-value">{{ item.planName || '-' }}</view> | ||
| 105 | - </view> --> | ||
| 106 | - | ||
| 107 | - | ||
| 108 | - <!-- <view class="u-body-item u-flex"> | ||
| 109 | - <view class="u-body-item-title">所属街道:</view> | ||
| 110 | - <view class="u-line-1 u-body-value">{{ item.streetName }} | ||
| 111 | - </view> | ||
| 112 | - </view> --> | ||
| 113 | - | ||
| 114 | - <view class="u-body-item u-flex"> | 59 | + <view class="u-body-item"> |
| 115 | <view class="u-body-item-title">业务线:</view> | 60 | <view class="u-body-item-title">业务线:</view> |
| 116 | <view class="u-line-1 u-body-value">{{ uni.$dict.getDictLabel('business_line', item.busiLine) || item.busiLine || '-' }}</view> | 61 | <view class="u-line-1 u-body-value">{{ uni.$dict.getDictLabel('business_line', item.busiLine) || item.busiLine || '-' }}</view> |
| 117 | </view> | 62 | </view> |
| 118 | - | ||
| 119 | - <view class="u-body-item u-flex"> | 63 | + <view class="u-body-item"> |
| 120 | <view class="u-body-item-title">养护级别:</view> | 64 | <view class="u-body-item-title">养护级别:</view> |
| 121 | <view class="u-line-1 u-body-value">{{ uni.$dict.getDictLabel('conserve_level', item.levelId) || '-' }}</view> | 65 | <view class="u-line-1 u-body-value">{{ uni.$dict.getDictLabel('conserve_level', item.levelId) || '-' }}</view> |
| 122 | </view> | 66 | </view> |
| 123 | - | ||
| 124 | <!-- 操作区:统一收底 --> | 67 | <!-- 操作区:统一收底 --> |
| 125 | <view class="card-action-row"> | 68 | <view class="card-action-row"> |
| 126 | <view class="mini-btn mini-btn--primary" @click="goToDetail(item)">执行任务</view> | 69 | <view class="mini-btn mini-btn--primary" @click="goToDetail(item)">执行任务</view> |
| 127 | </view> | 70 | </view> |
| 128 | - | ||
| 129 | -<!-- <view class="u-body-item u-flex">--> | ||
| 130 | -<!-- <view class="u-body-item-title">计划时间:</view>--> | ||
| 131 | -<!-- <view class="u-line-1 u-body-value">{{ timeFormat(item.beginTime, 'yyyy-mm-dd') || '-' }} 至--> | ||
| 132 | -<!-- {{ timeFormat(item.endTime, 'yyyy-mm-dd') || '-' }}--> | ||
| 133 | -<!-- </view>--> | ||
| 134 | -<!-- </view>--> | ||
| 135 | - </view> | ||
| 136 | - </template> | ||
| 137 | - </up-card> | ||
| 138 | - </view> | ||
| 139 | - | ||
| 140 | - <!-- 其他养护类型卡片(补植/浇水等) --> | ||
| 141 | - <view v-else class="common-card-list maintain-card-list"> | ||
| 142 | - | ||
| 143 | - <up-card | ||
| 144 | - :border="false" | ||
| 145 | - :foot-border-top="false" | ||
| 146 | - :head-border-bottom="false" | ||
| 147 | - margin="0" | ||
| 148 | - padding-head="24rpx 24rpx 0" | ||
| 149 | - padding-body="16rpx 24rpx 24rpx" | ||
| 150 | - box-shadow="0 4rpx 16rpx rgba(17, 24, 39, 0.06)" | ||
| 151 | - v-for="(item,index) in currentList" | ||
| 152 | - :key="`${item.planNo}_${index}`" | ||
| 153 | - | ||
| 154 | - > | ||
| 155 | - <!-- 自定义标题区域 --> | ||
| 156 | - <template #head> | ||
| 157 | - <view class="card-header"> | ||
| 158 | - <view class="common-card-title u-line-1">{{ item.planName || '无计划名称' }}</view> | ||
| 159 | - </view> | ||
| 160 | - </template> | ||
| 161 | - | ||
| 162 | - <template #body> | ||
| 163 | - <view class="card-body"> | ||
| 164 | - <view class="u-body-item u-flex"> | ||
| 165 | - <view class="u-body-item-title">计划编码:</view> | ||
| 166 | - <view class="u-line-1 u-body-value">{{ item.planNo || '-' }}</view> | ||
| 167 | - </view> | ||
| 168 | - <view class="u-body-item u-flex"> | ||
| 169 | - <view class="u-body-item-title">养护周期:</view> | ||
| 170 | - <view class="u-line-1 u-body-value">{{ item.rate || '-' }} | ||
| 171 | - {{ uni.$dict.getDictLabel('cycle_id_type', item.cycleId) }} | ||
| 172 | - </view> | ||
| 173 | - </view> | ||
| 174 | - | ||
| 175 | - <view class="u-body-item u-flex"> | ||
| 176 | - <view class="u-body-item-title">计划完成次数:</view> | ||
| 177 | - <view class="u-line-1 u-body-value">{{ item.planNum || 0 }}</view> | ||
| 178 | - </view> | ||
| 179 | - | ||
| 180 | - <view class="u-body-item u-flex"> | ||
| 181 | - <view class="u-body-item-title">已完成次数:</view> | ||
| 182 | - <view class="u-line-1 u-body-value">{{ item.planFinishNum || 0 }}</view> | ||
| 183 | - </view> | ||
| 184 | - | ||
| 185 | - <view class="u-body-item u-flex"> | ||
| 186 | - <view class="u-body-item-title">计划有效期:</view> | ||
| 187 | - <view class="u-line-1 u-body-value">{{ timeFormat(item.beginTime, 'yyyy-mm-dd') || '-' }} 至 | ||
| 188 | - {{ timeFormat(item.endTime, 'yyyy-mm-dd') || '-' }} | ||
| 189 | - </view> | ||
| 190 | - </view> | ||
| 191 | - | ||
| 192 | - <!-- 操作区:统一收底 --> | ||
| 193 | - <view class="card-action-row" v-if="item.finishState!==3"> | ||
| 194 | - <view class="mini-btn mini-btn--primary" @click="submitRecord(item)">提交记录</view> | ||
| 195 | - </view> | ||
| 196 | </view> | 71 | </view> |
| 197 | </template> | 72 | </template> |
| 198 | </up-card> | 73 | </up-card> |
| 199 | - | ||
| 200 | </view> | 74 | </view> |
| 201 | </z-paging> | 75 | </z-paging> |
| 202 | </view> | 76 | </view> |
| 203 | </template> | 77 | </template> |
| 204 | - | ||
| 205 | <script setup> | 78 | <script setup> |
| 206 | import { ref, computed } from 'vue' | 79 | import { ref, computed } from 'vue' |
| 207 | import { onLoad, onShow } from '@dcloudio/uni-app' | 80 | import { onLoad, onShow } from '@dcloudio/uni-app' |
| 208 | -import { maintainPlan } from "@/api/maintain-manage/maintain-manage"; | 81 | +import { maintainPlan } from "@/api/maintain-manage/maintain-manage"; |
| 209 | import { timeFormat } from '@/uni_modules/uview-plus'; | 82 | import { timeFormat } from '@/uni_modules/uview-plus'; |
| 210 | - | ||
| 211 | // 初始化响应式数据 | 83 | // 初始化响应式数据 |
| 212 | const typeTabs = ref([]) | 84 | const typeTabs = ref([]) |
| 213 | const statusTabs = ref([ | 85 | const statusTabs = ref([ |
| @@ -216,56 +88,46 @@ const statusTabs = ref([ | @@ -216,56 +88,46 @@ const statusTabs = ref([ | ||
| 216 | { name: '已完成', id: '2' }, | 88 | { name: '已完成', id: '2' }, |
| 217 | { name: '已终止', id: '4' } | 89 | { name: '已终止', id: '4' } |
| 218 | ]) | 90 | ]) |
| 219 | - | ||
| 220 | // 核心响应式数据 | 91 | // 核心响应式数据 |
| 221 | const activeType = ref('道路') | 92 | const activeType = ref('道路') |
| 222 | const activeStatus = ref('1') | 93 | const activeStatus = ref('1') |
| 223 | const searchValue = ref('') | 94 | const searchValue = ref('') |
| 224 | const pagingRef = ref(null) // z-paging实例 | 95 | const pagingRef = ref(null) // z-paging实例 |
| 225 | - | ||
| 226 | // 分页参数 | 96 | // 分页参数 |
| 227 | const pageSize = ref(10) | 97 | const pageSize = ref(10) |
| 228 | const currentList = ref([]) // z-paging绑定的列表 | 98 | const currentList = ref([]) // z-paging绑定的列表 |
| 229 | - | ||
| 230 | // 处理字典数据的方法 | 99 | // 处理字典数据的方法 |
| 231 | const handleDictData = () => { | 100 | const handleDictData = () => { |
| 232 | // 获取养护类型字典 | 101 | // 获取养护类型字典 |
| 233 | const tabList = uni.$dict.getDictSimpleList('maintain_type') | 102 | const tabList = uni.$dict.getDictSimpleList('maintain_type') |
| 234 | console.log('原始字典数据:', tabList) | 103 | console.log('原始字典数据:', tabList) |
| 235 | - | ||
| 236 | if (!tabList || tabList.length === 0) { | 104 | if (!tabList || tabList.length === 0) { |
| 237 | console.warn('养护类型字典数据为空,请检查字典配置') | 105 | console.warn('养护类型字典数据为空,请检查字典配置') |
| 238 | typeTabs.value = [{ name: '道路', planTypeId: '', id: '道路' }] | 106 | typeTabs.value = [{ name: '道路', planTypeId: '', id: '道路' }] |
| 239 | return | 107 | return |
| 240 | } | 108 | } |
| 241 | - | ||
| 242 | // 1. 过滤掉临时养护(包含"临时养护"的项) | 109 | // 1. 过滤掉临时养护(包含"临时养护"的项) |
| 243 | const filteredList = tabList.filter(item => !item.label.includes('临时养护')) | 110 | const filteredList = tabList.filter(item => !item.label.includes('临时养护')) |
| 244 | - | ||
| 245 | // 2. 转换为 {name: 字典原生标签, planTypeId: 字典值, id: 标签名} 格式 | 111 | // 2. 转换为 {name: 字典原生标签, planTypeId: 字典值, id: 标签名} 格式 |
| 246 | const convertedList = filteredList.map(item => ({ | 112 | const convertedList = filteredList.map(item => ({ |
| 247 | name: item.label, // 直接使用字典原始名称 | 113 | name: item.label, // 直接使用字典原始名称 |
| 248 | planTypeId: item.value, | 114 | planTypeId: item.value, |
| 249 | id: item.label // 兼容up-tabs的id字段 | 115 | id: item.label // 兼容up-tabs的id字段 |
| 250 | })) | 116 | })) |
| 251 | - | ||
| 252 | // 3. 补充道路类型(放在第一位) | 117 | // 3. 补充道路类型(放在第一位) |
| 253 | convertedList.unshift({ | 118 | convertedList.unshift({ |
| 254 | name: '道路', | 119 | name: '道路', |
| 255 | planTypeId: '', | 120 | planTypeId: '', |
| 256 | id: '道路' | 121 | id: '道路' |
| 257 | }) | 122 | }) |
| 258 | - | ||
| 259 | // 赋值给typeTabs | 123 | // 赋值给typeTabs |
| 260 | typeTabs.value = convertedList | 124 | typeTabs.value = convertedList |
| 261 | console.log('处理后的字典数据:', typeTabs.value) | 125 | console.log('处理后的字典数据:', typeTabs.value) |
| 262 | } | 126 | } |
| 263 | - | ||
| 264 | // 动态搜索框占位符 | 127 | // 动态搜索框占位符 |
| 265 | const searchPlaceholder = computed(() => { | 128 | const searchPlaceholder = computed(() => { |
| 266 | return activeType.value === '道路' ? '请输入道路名称' : '请输入计划名称' | 129 | return activeType.value === '道路' ? '请输入道路名称' : '请输入计划名称' |
| 267 | }) | 130 | }) |
| 268 | - | ||
| 269 | // 养护类型切换 | 131 | // 养护类型切换 |
| 270 | const handleTypeChange = (item) => { | 132 | const handleTypeChange = (item) => { |
| 271 | console.log('切换养护类型:', item) | 133 | console.log('切换养护类型:', item) |
| @@ -274,7 +136,6 @@ const handleTypeChange = (item) => { | @@ -274,7 +136,6 @@ const handleTypeChange = (item) => { | ||
| 274 | // 重置分页并刷新 | 136 | // 重置分页并刷新 |
| 275 | pagingRef.value?.reload() | 137 | pagingRef.value?.reload() |
| 276 | } | 138 | } |
| 277 | - | ||
| 278 | // 状态筛选切换 | 139 | // 状态筛选切换 |
| 279 | const handleStatusChange = (item) => { | 140 | const handleStatusChange = (item) => { |
| 280 | console.log('切换状态:', item) | 141 | console.log('切换状态:', item) |
| @@ -282,28 +143,25 @@ const handleStatusChange = (item) => { | @@ -282,28 +143,25 @@ const handleStatusChange = (item) => { | ||
| 282 | // 重置分页并刷新 | 143 | // 重置分页并刷新 |
| 283 | pagingRef.value?.reload() | 144 | pagingRef.value?.reload() |
| 284 | } | 145 | } |
| 285 | - | ||
| 286 | // 搜索处理 | 146 | // 搜索处理 |
| 287 | const handleSearch = () => { | 147 | const handleSearch = () => { |
| 288 | console.log('搜索关键词:', searchValue.value) | 148 | console.log('搜索关键词:', searchValue.value) |
| 289 | // 重置分页并刷新 | 149 | // 重置分页并刷新 |
| 290 | pagingRef.value?.reload() | 150 | pagingRef.value?.reload() |
| 291 | } | 151 | } |
| 292 | - | ||
| 293 | // 核心数据请求方法(适配z-paging的query回调) | 152 | // 核心数据请求方法(适配z-paging的query回调) |
| 294 | const fetchData = async (pageNo, pageSize) => { | 153 | const fetchData = async (pageNo, pageSize) => { |
| 295 | try { | 154 | try { |
| 296 | let res = null | 155 | let res = null |
| 297 | - const currentType = typeTabs.value.find(item => item.name === activeType.value) | ||
| 298 | - res = await maintainPlan({ | ||
| 299 | - // planTypeId: currentType?.planTypeId || '', | ||
| 300 | - roadName: searchValue.value.trim(), | ||
| 301 | - pageNo, | ||
| 302 | - pageSize, | ||
| 303 | - finishState:1 | ||
| 304 | - // finishState: activeStatus.value | ||
| 305 | - }) | ||
| 306 | - | 156 | + const currentType = typeTabs.value.find(item => item.name === activeType.value) |
| 157 | + res = await maintainPlan({ | ||
| 158 | + // planTypeId: currentType?.planTypeId || '', | ||
| 159 | + roadName: searchValue.value.trim(), | ||
| 160 | + pageNo, | ||
| 161 | + pageSize, | ||
| 162 | + finishState: 1 | ||
| 163 | + // finishState: activeStatus.value | ||
| 164 | + }) | ||
| 307 | // 告诉z-paging数据加载完成 | 165 | // 告诉z-paging数据加载完成 |
| 308 | // res.list为当前页数据,res.total为总条数(如果接口返回) | 166 | // res.list为当前页数据,res.total为总条数(如果接口返回) |
| 309 | pagingRef.value?.complete(res?.list || [], res?.total) | 167 | pagingRef.value?.complete(res?.list || [], res?.total) |
| @@ -314,7 +172,6 @@ const fetchData = async (pageNo, pageSize) => { | @@ -314,7 +172,6 @@ const fetchData = async (pageNo, pageSize) => { | ||
| 314 | pagingRef.value?.complete(false) | 172 | pagingRef.value?.complete(false) |
| 315 | } | 173 | } |
| 316 | } | 174 | } |
| 317 | - | ||
| 318 | // 跳转到计划明细页面 | 175 | // 跳转到计划明细页面 |
| 319 | const goToDetail = (item) => { | 176 | const goToDetail = (item) => { |
| 320 | // 存入完整对象给下一页 | 177 | // 存入完整对象给下一页 |
| @@ -323,7 +180,6 @@ const goToDetail = (item) => { | @@ -323,7 +180,6 @@ const goToDetail = (item) => { | ||
| 323 | url: `/pages-sub/daily/maintain-manage/type-list` | 180 | url: `/pages-sub/daily/maintain-manage/type-list` |
| 324 | }) | 181 | }) |
| 325 | } | 182 | } |
| 326 | - | ||
| 327 | // 提交记录 | 183 | // 提交记录 |
| 328 | const submitRecord = (item) => { | 184 | const submitRecord = (item) => { |
| 329 | console.log('提交记录:', item) | 185 | console.log('提交记录:', item) |
| @@ -336,23 +192,18 @@ const submitRecord = (item) => { | @@ -336,23 +192,18 @@ const submitRecord = (item) => { | ||
| 336 | url: `/pages-sub/daily/maintain-manage/pending-plan-detail?finishState=${item.finishState}&planNo=${item.planNo}&planTypeId=${item.planTypeId}&businessType=${item.busiLine}` | 192 | url: `/pages-sub/daily/maintain-manage/pending-plan-detail?finishState=${item.finishState}&planNo=${item.planNo}&planTypeId=${item.planTypeId}&businessType=${item.busiLine}` |
| 337 | }) | 193 | }) |
| 338 | } | 194 | } |
| 339 | - | ||
| 340 | - | ||
| 341 | } | 195 | } |
| 342 | - | ||
| 343 | // 页面加载时初始化数据 | 196 | // 页面加载时初始化数据 |
| 344 | onLoad(() => { | 197 | onLoad(() => { |
| 345 | // 先处理字典数据 | 198 | // 先处理字典数据 |
| 346 | handleDictData() | 199 | handleDictData() |
| 347 | }) | 200 | }) |
| 348 | -onShow(()=>{ | 201 | +onShow(() => { |
| 349 | // 初始化分页数据 | 202 | // 初始化分页数据 |
| 350 | pagingRef.value?.reload() | 203 | pagingRef.value?.reload() |
| 351 | }) | 204 | }) |
| 352 | </script> | 205 | </script> |
| 353 | - | ||
| 354 | <style scoped lang="scss"> | 206 | <style scoped lang="scss"> |
| 355 | - | ||
| 356 | /* 页面底色:统一浅灰蓝(设计稿 --page-bg) */ | 207 | /* 页面底色:统一浅灰蓝(设计稿 --page-bg) */ |
| 357 | .page-container { | 208 | .page-container { |
| 358 | min-height: 100vh; | 209 | min-height: 100vh; |
| @@ -360,32 +211,49 @@ onShow(()=>{ | @@ -360,32 +211,49 @@ onShow(()=>{ | ||
| 360 | box-sizing: border-box; | 211 | box-sizing: border-box; |
| 361 | } | 212 | } |
| 362 | // 吸顶区域样式 | 213 | // 吸顶区域样式 |
| 363 | -/* 筛选条:上下各 12px(设计稿 .search-bar 上 8px / 下 12px, | ||
| 364 | - * 本页类型 Tabs 在代码里是注释状态,没有 Tabs 时上下取同一档 12px 更匀) */ | ||
| 365 | .sticky-wrap { | 214 | .sticky-wrap { |
| 366 | background-color: #fff; | 215 | background-color: #fff; |
| 367 | padding: 24rpx 0; | 216 | padding: 24rpx 0; |
| 368 | border-bottom: 1rpx solid #E8EBF0; | 217 | border-bottom: 1rpx solid #E8EBF0; |
| 369 | - | ||
| 370 | .first-tabs, .second-tabs { | 218 | .first-tabs, .second-tabs { |
| 371 | margin: 10rpx 0; | 219 | margin: 10rpx 0; |
| 372 | } | 220 | } |
| 373 | } | 221 | } |
| 374 | - | ||
| 375 | -/* 卡片列表:页面左右 24rpx、卡片之间 24rpx(设计稿 .body) | ||
| 376 | - * 顶部留白 = 吸顶筛选条高度(12+32+12=56px) + 12px 间距;z-paging 内容从容器顶部起算, | ||
| 377 | - * 不留这段会被吸顶筛选条盖住卡片标题 */ | 222 | +/* 卡片列表 */ |
| 378 | .maintain-card-list { | 223 | .maintain-card-list { |
| 379 | display: flex; | 224 | display: flex; |
| 380 | flex-direction: column; | 225 | flex-direction: column; |
| 381 | gap: 24rpx; | 226 | gap: 24rpx; |
| 382 | padding: 136rpx 24rpx 24rpx; | 227 | padding: 136rpx 24rpx 24rpx; |
| 228 | + position: relative; | ||
| 229 | + .card-action-row { | ||
| 230 | + position: absolute; | ||
| 231 | + top: 50px; | ||
| 232 | + right: 20px; | ||
| 233 | + } | ||
| 383 | } | 234 | } |
| 384 | - | ||
| 385 | -/* 卡片体:内边距由 up-card 的 paddingBody 控制,此处不再叠加 */ | 235 | +/* 卡片体 */ |
| 386 | .card-body { | 236 | .card-body { |
| 387 | padding: 0; | 237 | padding: 0; |
| 388 | } | 238 | } |
| 389 | 239 | ||
| 390 | - | ||
| 391 | -</style> | ||
| 392 | \ No newline at end of file | 240 | \ No newline at end of file |
| 241 | +.u-body-item { | ||
| 242 | + display: flex; | ||
| 243 | + align-items: center; | ||
| 244 | + margin-bottom: 16rpx; | ||
| 245 | +} | ||
| 246 | +/* ✅固定标题盒子宽度,文字右对齐,实现冒号竖对齐 */ | ||
| 247 | +.u-body-item-title { | ||
| 248 | + width: 100rpx!important; | ||
| 249 | + flex-shrink: 0; | ||
| 250 | + // text-align: right; | ||
| 251 | + font-size: 26rpx; | ||
| 252 | + color: #606266; | ||
| 253 | +} | ||
| 254 | +.u-body-value { | ||
| 255 | + flex: 1; | ||
| 256 | + padding-left:16rpx; | ||
| 257 | + font-size: 26rpx; | ||
| 258 | + color: #333; | ||
| 259 | +} | ||
| 260 | +</style> |
pages-sub/daily/maintain-manage/type-list-page.vue
| @@ -17,20 +17,30 @@ | @@ -17,20 +17,30 @@ | ||
| 17 | <view class="plan-name-wrap"> | 17 | <view class="plan-name-wrap"> |
| 18 | <view class="plan-name u-line-1">{{ item.planName || '无计划名称' }}</view> | 18 | <view class="plan-name u-line-1">{{ item.planName || '无计划名称' }}</view> |
| 19 | <!-- 同一批次下多个期次的计划名称相同,必须显示计划编码才能区分 --> | 19 | <!-- 同一批次下多个期次的计划名称相同,必须显示计划编码才能区分 --> |
| 20 | - <view class="plan-no u-line-1" v-if="item.planNo">计划编码:{{ item.planNo }}</view> | 20 | + |
| 21 | </view> | 21 | </view> |
| 22 | </view> | 22 | </view> |
| 23 | + | ||
| 24 | + | ||
| 25 | + <view class="info-row"> | ||
| 26 | + <!-- timeFormat(start, 'yyyy-mm-dd'), --> | ||
| 27 | + <view class="info-label">计划编码:</view> | ||
| 28 | + <view class="info-value u-line-1">{{item.planNo }}—{{ | ||
| 29 | + timeFormat(item.endTime, 'yyyy-mm-dd') }} | ||
| 30 | + </view> | ||
| 31 | + </view> | ||
| 32 | + | ||
| 23 | <!-- 有效期 --> | 33 | <!-- 有效期 --> |
| 24 | <view class="info-row"> | 34 | <view class="info-row"> |
| 25 | <!-- timeFormat(start, 'yyyy-mm-dd'), --> | 35 | <!-- timeFormat(start, 'yyyy-mm-dd'), --> |
| 26 | - <view class="info-label">有效期</view> | 36 | + <view class="info-label">有效期:</view> |
| 27 | <view class="info-value u-line-1">{{ timeFormat(item.beginTime, 'yyyy-mm-dd') }}—{{ | 37 | <view class="info-value u-line-1">{{ timeFormat(item.beginTime, 'yyyy-mm-dd') }}—{{ |
| 28 | timeFormat(item.endTime, 'yyyy-mm-dd') }} | 38 | timeFormat(item.endTime, 'yyyy-mm-dd') }} |
| 29 | </view> | 39 | </view> |
| 30 | </view> | 40 | </view> |
| 31 | <!-- 任务次数 --> | 41 | <!-- 任务次数 --> |
| 32 | <view class="info-row"> | 42 | <view class="info-row"> |
| 33 | - <view class="info-label">任务次数</view> | 43 | + <view class="info-label">任务次数:</view> |
| 34 | <!-- 已完成:一次一条期次时每个期次只完成 1 次,必须带上期次序号才能区分多次提交记录 --> | 44 | <!-- 已完成:一次一条期次时每个期次只完成 1 次,必须带上期次序号才能区分多次提交记录 --> |
| 35 | <view class="info-value" v-if="activeStatus === '2'"> | 45 | <view class="info-value" v-if="activeStatus === '2'"> |
| 36 | 有效期内第 {{ item.sortNum || 1 }} 个任务,共提交 {{ item.submitCount || 0 }} 次 | 46 | 有效期内第 {{ item.sortNum || 1 }} 个任务,共提交 {{ item.submitCount || 0 }} 次 |
| @@ -395,16 +405,12 @@ onUnload(() => { | @@ -395,16 +405,12 @@ onUnload(() => { | ||
| 395 | background: #fff; | 405 | background: #fff; |
| 396 | border-bottom: 1rpx solid #E8EBF0; | 406 | border-bottom: 1rpx solid #E8EBF0; |
| 397 | } | 407 | } |
| 398 | -/* 卡片列表:页面左右 24rpx、卡片之间 24rpx(设计稿 .body) | ||
| 399 | - * 顶部留白 = 吸顶 Tabs 高度 + 12px 间距,z-paging 内容从容器顶部起算, | ||
| 400 | - * 不留这段会被吸顶 Tabs 盖住卡片标题(与原页面 padding-top:100rpx 等效) */ | ||
| 401 | .card-list { | 408 | .card-list { |
| 402 | padding: 112rpx 24rpx 24rpx; | 409 | padding: 112rpx 24rpx 24rpx; |
| 403 | display: flex; | 410 | display: flex; |
| 404 | flex-direction: column; | 411 | flex-direction: column; |
| 405 | gap: 24rpx; | 412 | gap: 24rpx; |
| 406 | } | 413 | } |
| 407 | -/* 卡片:12px 内边距 / 8px 圆角 / 卡片阴影(设计稿 .tcard) */ | ||
| 408 | .task-card { | 414 | .task-card { |
| 409 | background: #fff; | 415 | background: #fff; |
| 410 | border-radius: 16rpx; | 416 | border-radius: 16rpx; |
| @@ -413,12 +419,10 @@ onUnload(() => { | @@ -413,12 +419,10 @@ onUnload(() => { | ||
| 413 | display: flex; | 419 | display: flex; |
| 414 | flex-direction: column; | 420 | flex-direction: column; |
| 415 | } | 421 | } |
| 416 | -/* 标题行:标题占满剩余宽度,状态标签靠右(设计稿 .tcard-head) */ | ||
| 417 | .card-head { | 422 | .card-head { |
| 418 | display: flex; | 423 | display: flex; |
| 419 | align-items: center; | 424 | align-items: center; |
| 420 | gap: 16rpx; | 425 | gap: 16rpx; |
| 421 | - /* 与 .plan-no / .info-row 的间距保持一致,卡内文字行上下距离统一 */ | ||
| 422 | margin-bottom: 8rpx; | 426 | margin-bottom: 8rpx; |
| 423 | } | 427 | } |
| 424 | .plan-name-wrap { | 428 | .plan-name-wrap { |
| @@ -437,26 +441,28 @@ onUnload(() => { | @@ -437,26 +441,28 @@ onUnload(() => { | ||
| 437 | color: #6B7280; | 441 | color: #6B7280; |
| 438 | line-height: 1.4; | 442 | line-height: 1.4; |
| 439 | } | 443 | } |
| 444 | + | ||
| 440 | .info-row { | 445 | .info-row { |
| 441 | display: flex; | 446 | display: flex; |
| 442 | align-items: center; | 447 | align-items: center; |
| 443 | - justify-content: space-between; | ||
| 444 | - gap: 16rpx; | 448 | + gap: 0; |
| 445 | margin-bottom: 8rpx; | 449 | margin-bottom: 8rpx; |
| 446 | } | 450 | } |
| 447 | .info-label { | 451 | .info-label { |
| 452 | + width: 130rpx !important; | ||
| 453 | + flex-shrink: 0; | ||
| 448 | font-size: 26rpx; | 454 | font-size: 26rpx; |
| 449 | color: #6B7280; | 455 | color: #6B7280; |
| 450 | - flex-shrink: 0; | ||
| 451 | } | 456 | } |
| 452 | .info-value { | 457 | .info-value { |
| 453 | flex: 1; | 458 | flex: 1; |
| 454 | min-width: 0; | 459 | min-width: 0; |
| 460 | + padding-left: 16rpx; | ||
| 455 | font-size: 26rpx; | 461 | font-size: 26rpx; |
| 456 | color: #1F2937; | 462 | color: #1F2937; |
| 457 | text-align: left; | 463 | text-align: left; |
| 458 | } | 464 | } |
| 459 | -/* 操作区统一收底:上 16rpx 留白 + 分隔线(设计稿 .tcard-foot) */ | 465 | + |
| 460 | .action-row { | 466 | .action-row { |
| 461 | display: flex; | 467 | display: flex; |
| 462 | align-items: center; | 468 | align-items: center; |
| @@ -472,22 +478,15 @@ onUnload(() => { | @@ -472,22 +478,15 @@ onUnload(() => { | ||
| 472 | gap: 16rpx; | 478 | gap: 16rpx; |
| 473 | margin-left: auto; | 479 | margin-left: auto; |
| 474 | } | 480 | } |
| 475 | -// 置为失效(红字)/ 去作业(蓝)/ 去查看(灰)/ 结束任务(白底描边) | ||
| 476 | -// 尺寸与配色统一由全局 .btn-text-danger、.mini-btn 系列控制 | ||
| 477 | -/* 卡片操作按钮:统一按钮形态,主色 #3b9dff | ||
| 478 | - * 浅底(置为失效) / 描边(结束任务) / 实心(去作业) | ||
| 479 | - * 需 !important 覆盖全局 .mini-btn 的白字与 .btn-text-danger 等既有配色 */ | ||
| 480 | .btn-brand-soft { | 481 | .btn-brand-soft { |
| 481 | color: #3b9dff !important; | 482 | color: #3b9dff !important; |
| 482 | background-color: #EAF4FF !important; | 483 | background-color: #EAF4FF !important; |
| 483 | } | 484 | } |
| 484 | - | ||
| 485 | .btn-brand-outline { | 485 | .btn-brand-outline { |
| 486 | color: #3b9dff !important; | 486 | color: #3b9dff !important; |
| 487 | background-color: #ffffff !important; | 487 | background-color: #ffffff !important; |
| 488 | border: 1rpx solid #3b9dff; | 488 | border: 1rpx solid #3b9dff; |
| 489 | } | 489 | } |
| 490 | - | ||
| 491 | .btn-brand-solid { | 490 | .btn-brand-solid { |
| 492 | color: #ffffff !important; | 491 | color: #ffffff !important; |
| 493 | background-color: #3b9dff !important; | 492 | background-color: #3b9dff !important; |
| @@ -497,8 +496,6 @@ onUnload(() => { | @@ -497,8 +496,6 @@ onUnload(() => { | ||
| 497 | box-sizing: border-box; | 496 | box-sizing: border-box; |
| 498 | padding: 10rpx 0; | 497 | padding: 10rpx 0; |
| 499 | } | 498 | } |
| 500 | - | ||
| 501 | -/* 失效原因(必填):标签 + 输入域 */ | ||
| 502 | .invalid-modal-label { | 499 | .invalid-modal-label { |
| 503 | display: flex; | 500 | display: flex; |
| 504 | align-items: center; | 501 | align-items: center; |
| @@ -507,13 +504,11 @@ onUnload(() => { | @@ -507,13 +504,11 @@ onUnload(() => { | ||
| 507 | font-size: 28rpx; | 504 | font-size: 28rpx; |
| 508 | color: #1F2937; | 505 | color: #1F2937; |
| 509 | } | 506 | } |
| 510 | - | ||
| 511 | .invalid-modal-required { | 507 | .invalid-modal-required { |
| 512 | color: #DC2626; | 508 | color: #DC2626; |
| 513 | } | 509 | } |
| 514 | - | ||
| 515 | -/* 失效凭证上传:与上方原因输入框保持同样的间距 */ | ||
| 516 | .upload-wrap { | 510 | .upload-wrap { |
| 517 | margin-top: 16rpx; | 511 | margin-top: 16rpx; |
| 518 | } | 512 | } |
| 519 | </style> | 513 | </style> |
| 514 | + |
pages-sub/daily/maintain-manage/type-list.vue
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | <text class="info-label">{{ row.label }}:</text> | 8 | <text class="info-label">{{ row.label }}:</text> |
| 9 | <view class="info-value"> | 9 | <view class="info-value"> |
| 10 | <view class="info-line" v-for="(value, idx) in row.values" :key="idx" | 10 | <view class="info-line" v-for="(value, idx) in row.values" :key="idx" |
| 11 | - :class="{ 'info-line--count': row.label === '待完成任务' }">{{ value }}</view> | 11 | + :class="{ 'info-line--count': row.label === '待完成数' }">{{ value }}</view> |
| 12 | </view> | 12 | </view> |
| 13 | </view> | 13 | </view> |
| 14 | </view> | 14 | </view> |
| @@ -82,7 +82,7 @@ onShow(() => { | @@ -82,7 +82,7 @@ onShow(() => { | ||
| 82 | { label: '计划类型', values: [type.planTypeName || '--'] }, | 82 | { label: '计划类型', values: [type.planTypeName || '--'] }, |
| 83 | { label: '执行时间', values: uniq(batches.map((batch: any) => | 83 | { label: '执行时间', values: uniq(batches.map((batch: any) => |
| 84 | `${formatDate(batch.beginTime)} - ${formatDate(batch.endTime)}`)) }, | 84 | `${formatDate(batch.beginTime)} - ${formatDate(batch.endTime)}`)) }, |
| 85 | - { label: '待完成任务', values: [`${pendingCount}次`] } | 85 | + { label: '待完成数', values: [`${pendingCount}次`] } |
| 86 | ] | 86 | ] |
| 87 | } | 87 | } |
| 88 | }) | 88 | }) |
| @@ -131,21 +131,18 @@ onUnload(()=>{ | @@ -131,21 +131,18 @@ onUnload(()=>{ | ||
| 131 | .info-row { | 131 | .info-row { |
| 132 | display: flex; | 132 | display: flex; |
| 133 | align-items: flex-start; | 133 | align-items: flex-start; |
| 134 | - justify-content: space-between; | ||
| 135 | - gap: 16rpx; | ||
| 136 | } | 134 | } |
| 137 | - | ||
| 138 | .info-label { | 135 | .info-label { |
| 139 | - flex-shrink: 0; | ||
| 140 | - font-size: 26rpx; | ||
| 141 | - color: #6B7280; | ||
| 142 | - line-height: 1.5; | 136 | + width: 130rpx !important; |
| 137 | + flex-shrink: 0; | ||
| 138 | + font-size: 26rpx; | ||
| 139 | + color: #6B7280; | ||
| 140 | + line-height: 1.5; | ||
| 143 | } | 141 | } |
| 144 | - | ||
| 145 | .info-value { | 142 | .info-value { |
| 146 | flex: 1; | 143 | flex: 1; |
| 147 | min-width: 0; | 144 | min-width: 0; |
| 148 | - text-align: left; | 145 | + padding-left: 16rpx; |
| 149 | } | 146 | } |
| 150 | 147 | ||
| 151 | .info-line { | 148 | .info-line { |
pages/mine/index.vue
| @@ -119,7 +119,7 @@ export default { | @@ -119,7 +119,7 @@ export default { | ||
| 119 | /* 页面底:设计稿 --page-bg */ | 119 | /* 页面底:设计稿 --page-bg */ |
| 120 | .page-container { | 120 | .page-container { |
| 121 | min-height: 100vh; | 121 | min-height: 100vh; |
| 122 | - padding-bottom: 48rpx; | 122 | + // padding-bottom: 48rpx; |
| 123 | box-sizing: border-box; | 123 | box-sizing: border-box; |
| 124 | background-color: #F4F6FA; | 124 | background-color: #F4F6FA; |
| 125 | /* 竖向 flex:头部固定高度,卡片+按钮组在剩余区域居中 */ | 125 | /* 竖向 flex:头部固定高度,卡片+按钮组在剩余区域居中 */ |
| @@ -129,8 +129,9 @@ export default { | @@ -129,8 +129,9 @@ export default { | ||
| 129 | 129 | ||
| 130 | /* 卡片 + 退出登录按钮:作为一组在头部以下的剩余空间里垂直居中 */ | 130 | /* 卡片 + 退出登录按钮:作为一组在头部以下的剩余空间里垂直居中 */ |
| 131 | .mine-body { | 131 | .mine-body { |
| 132 | - flex: 1; | 132 | + // flex: 1; |
| 133 | display: flex; | 133 | display: flex; |
| 134 | + padding-top: 30px; | ||
| 134 | flex-direction: column; | 135 | flex-direction: column; |
| 135 | justify-content: center; | 136 | justify-content: center; |
| 136 | } | 137 | } |
| @@ -143,7 +144,7 @@ export default { | @@ -143,7 +144,7 @@ export default { | ||
| 143 | display: flex; | 144 | display: flex; |
| 144 | align-items: center; | 145 | align-items: center; |
| 145 | /* 卡片不再上压,底部留白按原视觉高度(120 - 80 重叠)收成 40rpx */ | 146 | /* 卡片不再上压,底部留白按原视觉高度(120 - 80 重叠)收成 40rpx */ |
| 146 | - padding: 48rpx 32rpx 40rpx; | 147 | + padding: 148rpx 32rpx 40rpx; |
| 147 | box-sizing: border-box; | 148 | box-sizing: border-box; |
| 148 | background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 60%, #3B82F6 100%); | 149 | background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 60%, #3B82F6 100%); |
| 149 | } | 150 | } |