From e93ebf16844c57f43863d727121a91fdc431c7f3 Mon Sep 17 00:00:00 2001 From: 王彪总 Date: Fri, 23 Oct 2026 14:42:23 +0800 Subject: [PATCH] 业务线 小程序不用写死,从后端接口获取 --- App.vue | 67 +++++++++++++++++++++++++++++++++++++++++++++++-------------------- api/maintain-manage/maintain-manage.js | 3 ++- common/config/env.js | 6 +++--- common/styles/ui-standard.scss | 587 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/utils/common.js | 20 +++++++++++++++++++- components/grouped-picker/grouped-picker.vue | 18 +++++++++--------- components/my-cascader/my-cascader.vue | 4 ++-- components/unified-task-actions/unified-task-actions.vue | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------- components/work-field-form/work-field-form.vue | 10 +++++----- pages-sub/daily/attendanceRecord.vue | 40 ++++++++++++++++++++++------------------ pages-sub/daily/maintain-manage/add-record.vue | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------- pages-sub/daily/maintain-manage/finish-plan-detail.vue | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------- pages-sub/daily/maintain-manage/index.vue | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------- pages-sub/daily/maintain-manage/now-list-page.vue | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------- pages-sub/daily/maintain-manage/pending-plan-detail.vue | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------- pages-sub/daily/maintain-manage/record-detail-list.vue | 190 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------- pages-sub/daily/maintain-manage/road-detail-list.vue | 71 +++++++++++++++++++++++++++++++++++++++++------------------------------ pages-sub/daily/maintain-manage/type-list-page.vue | 295 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------- pages-sub/daily/maintain-manage/type-list.vue | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------- pages-sub/daily/patrol-manage/add-patrol-record.vue | 249 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------- pages-sub/daily/patrol-manage/finish-plan-detail.vue | 190 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------- pages-sub/daily/patrol-manage/index.vue | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------- pages-sub/daily/patrol-manage/pending-plan-detail.vue | 234 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------- pages-sub/daily/quick-order/add-order.vue | 402 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------- pages-sub/daily/quick-order/index.vue | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------- pages-sub/daily/quick-order/order-detail.vue | 225 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------- pages-sub/data/tree-archive/addInspect.vue | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------ pages-sub/data/tree-archive/addTree.vue | 460 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------ pages-sub/data/tree-archive/editTree.vue | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------- pages-sub/data/tree-archive/index.vue | 283 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------- pages-sub/data/tree-archive/inspectDetail.vue | 4 ++-- pages-sub/data/tree-archive/logDetail.vue | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------- pages-sub/data/tree-archive/treeRecord.vue | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------- pages-sub/msg/index.vue | 13 ++++++++++--- pages-sub/problem/ai-manage/index.vue | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------- pages-sub/problem/regional-order-manage/add-order.vue | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------- pages-sub/problem/regional-order-manage/add-patrol-order.vue | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------- pages-sub/problem/regional-order-manage/distribution-order.vue | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------- pages-sub/problem/regional-order-manage/index.vue | 72 ++++++++++++++++++++++++++++++++++++++++++++++++------------------------ pages-sub/problem/regional-order-manage/list-detail.vue | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------- pages-sub/problem/regional-order-manage/list.vue | 16 ++++++++-------- pages-sub/problem/regional-order-manage/order-detail.vue | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------- pages-sub/problem/work-order-manage/add-maintain-order.vue | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------- pages-sub/problem/work-order-manage/add-order.vue | 276 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------- pages-sub/problem/work-order-manage/distribution-order.vue | 205 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------- pages-sub/problem/work-order-manage/index.vue | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------- pages-sub/problem/work-order-manage/order-detail.vue | 274 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------- pages.json | 4 ++-- pages/index/index.vue | 26 +++++++++++++------------- pages/login/index.vue | 6 +++--- pages/mine/index.vue | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------- pages/workbench/index.vue | 10 +++++----- uni.scss | 32 +++++++++++++++++++++++++++++++- 53 files changed, 5068 insertions(+), 2014 deletions(-) create mode 100644 common/styles/ui-standard.scss diff --git a/App.vue b/App.vue index fa480ff..7c9738b 100644 --- a/App.vue +++ b/App.vue @@ -44,7 +44,7 @@ const checkLoginStatus = () => { /* 你的全局样式 */ page { - background-color: #f8f8f8; + background-color: #F4F6FA; height: 100%; } @@ -57,9 +57,9 @@ page { width: 100%; .common-name{ flex: 1; // 占满剩余空间,挤压标签到右侧 - font-size: 28rpx; + font-size: 32rpx; font-weight: 500; - color: #333; + color: #1F2937; // 关键:单行文本溢出省略 white-space: nowrap; overflow: hidden; @@ -69,13 +69,13 @@ page { } // 已失效标签样式 .common-invalid-tag { - color: #f56c6c; - font-size: 24rpx; + color: #6B7280; + font-size: 22rpx; flex-shrink: 0; // 禁止标签被压缩 } .common-finish-tag{ - color: #5ac725; - font-size: 24rpx; + color: #16A34A; + font-size: 22rpx; flex-shrink: 0; // 禁止标签被压缩 } } @@ -84,7 +84,7 @@ page { } .u-body-item { - margin-bottom: 16rpx; + margin-bottom: 6rpx; &:last-child { margin-bottom: 0; } @@ -107,17 +107,44 @@ page { // 底部按钮样式 +// 底部固定操作栏:全站统一(白底 + 阴影 + 安全区 + 24rpx 左右留白) .fixed-bottom-btn-wrap { position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; - padding: 0; - /* #ifdef MP-WEIXIN */ - //padding-bottom: constant(safe-area-inset-bottom); - //padding-bottom: env(safe-area-inset-bottom); - /* #endif */ + box-sizing: border-box; + padding: 16rpx 24rpx !important; + padding-bottom: calc(16rpx + env(safe-area-inset-bottom)) !important; + background-color: #ffffff !important; + box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06) !important; +} + +// 工单详情等多按钮操作栏:按钮更小更密,保持紧凑内边距 +.fixed-bottom-btn-wrap.order-action-bar { + padding: 10rpx 14rpx !important; + padding-bottom: calc(10rpx + env(safe-area-inset-bottom)) !important; +} + +// 底部固定栏主按钮:统一为顶部导航栏同色(pages.json navigationBarBackgroundColor: #2563EB) +.fixed-bottom-btn-wrap .u-button { + height: 88rpx !important; + border-radius: 16rpx !important; + background-color: #2563EB !important; + background-image: none !important; + border-color: #2563EB !important; +} +.fixed-bottom-btn-wrap .u-button__text { + font-size: 30rpx !important; + font-weight: 500 !important; +} + +// 卡片:uview up-card 与自绘卡片(.form-card / .plan-card)统一圆角与阴影 +.u-card { + border-radius: 16rpx !important; + box-shadow: 0 4rpx 16rpx rgba(17, 24, 39, 0.06) !important; + background-color: #ffffff !important; } .commonPageLRpadding{ padding-left: 15px; @@ -125,8 +152,8 @@ page { } .common-text-color{ - font-size: 14px; - color: #606266 + font-size: 26rpx; + color: #4B5563 } // 通用按钮样式(支持任意top值,无需批量生成类名) @@ -136,7 +163,7 @@ page { top: var(--btn-top, 100px); right: 15px; //transform: translateX(-50%); - background-color: #3c9cff; + background-color: #2563EB; color: #ffffff; border: none; border-radius: 4px; @@ -150,20 +177,20 @@ page { // 点击态 &:active { - background-color: #2b88ee; + background-color: #1D4ED8; opacity: 0.9; } // 禁用态 &.disabled { - background-color: #a0c8f5; + background-color: #93B4F5; cursor: not-allowed; opacity: 0.7; } } - - +/* UI 统一规范层(必须放在最后,覆盖上面各页面的旧配色/旧字号) */ +@import "@/common/styles/ui-standard.scss"; \ No newline at end of file diff --git a/api/maintain-manage/maintain-manage.js b/api/maintain-manage/maintain-manage.js index 3c47537..06b903f 100644 --- a/api/maintain-manage/maintain-manage.js +++ b/api/maintain-manage/maintain-manage.js @@ -83,7 +83,8 @@ export const maintainPlan= (params) => { * @returns {Promise} */ export const maintainPlanNum= (params) => { - return get('/admin-api/garden/maintain-plan-detail/page',params); + // 走 app-api:后端按登录用户的部门 + 角色过滤批次,并返回进行中的 commitId(结束任务要用) + return get('/app-api/app/garden/maintain-plan-detail/page',params); }; diff --git a/common/config/env.js b/common/config/env.js index ae149a1..4b9f83e 100644 --- a/common/config/env.js +++ b/common/config/env.js @@ -2,12 +2,12 @@ const env = { // 开发环境 development: { - baseUrl: 'https://test.jichengshanshui.com.cn:28302', + // baseUrl: 'https://test.jichengshanshui.com.cn:28302', // https://test.jichengshanshui.com.cn:28302 - // baseUrl: 'http://192.168.1.111:48081', + baseUrl: 'http://192.168.1.163:48081', - uploadUrl: 'https://test.jichengshanshui.com.cn:28302', + uploadUrl: 'http://192.168.1.163:48081', // baseApi:'admin-api', // appApi:'app-api' }, diff --git a/common/styles/ui-standard.scss b/common/styles/ui-standard.scss new file mode 100644 index 0000000..5868890 --- /dev/null +++ b/common/styles/ui-standard.scss @@ -0,0 +1,587 @@ +/* ========================================================================== + * JCSS 小程序 · UI 统一规范层 + * -------------------------------------------------------------------------- + * 依据:jcss-mp-design/index.html(42 页设计稿,1px = 2rpx) + * 引入:App.vue 全局 style(非 scoped),一处改动全站生效 + * 约束:只定义样式;不涉及任何 JS / 接口 / 状态判断 / 点击事件 / 数据渲染 + * ========================================================================== */ + +/* ========================================================================== + * 1. 设计令牌(与设计稿 :root 变量一一对应,px × 2 = rpx) + * ========================================================================== */ +/* --- 1.1 品牌色 --- */ +$j-brand: #2563EB; +$j-brand-a: #1D4ED8; +$j-brand-light: #EBF3FF; + +/* --- 1.2 操作语义色:严格绑定按钮类型 --- */ +$j-approve: #16A34A; // 审批通过 · 绿 +$j-assign: #2563EB; // 分配 / 转派 / 详情 · 蓝 +$j-return: #D97706; // 退回 · 橙 +$j-reject: #DC2626; // 驳回 / 危险操作 · 红 +$j-neutral: #6B7280; // 撤回 / 次要 · 灰 +$j-doing: #0891B2; // 进行中 · 青 + +/* --- 1.2.1 操作按钮色板(列表 / 详情卡片按钮,按设计稿 94 取色) --- */ +$j-btn-primary: #3B9DFF; // 分配 / 详情 · 亮蓝 +$j-btn-primary-a: #2E8AE6; +$j-btn-success: #078D0A; // 审批通过 / 实施 / 结束 · 深绿 +$j-btn-success-a: #066B08; +$j-btn-warning: #F9AE3D; // 退回 · 琥珀 +$j-btn-warning-a: #E39A2C; +$j-btn-danger: #F56C6C; // 驳回 / 危险操作 · 柔红 +$j-btn-danger-a: #E05959; +$j-btn-info: #909399; // 撤回 / 次要 · 灰 +$j-btn-info-a: #7D8085; +$j-btn-transfer: #0891B2; // 转办 / 转派 · 青 +$j-btn-transfer-a: #077A96; + +/* --- 1.3 语义底色(标签 / 提示条) --- */ +$j-approve-bg: #EAF7EF; +$j-assign-bg: #EBF3FF; +$j-return-bg: #FDF4E7; +$j-reject-bg: #FDECEC; +$j-neutral-bg: #F4F5F7; +$j-doing-bg: #E6F6FA; + +/* --- 1.4 点击态:同色系明暗微调,不换主色 --- */ +$j-approve-a: #12833C; +$j-assign-a: #1D4ED8; +$j-return-a: #B96504; +$j-reject-a: #B91C1C; +$j-neutral-a: #565E6B; + +/* --- 1.5 文本色 --- */ +$j-text-title: #1F2937; // 卡片主标题 +$j-text-label: #9CA3AF; // 标签(浅灰) +$j-text-value: #4B5563; // 内容值 +$j-text-weak: #9CA3AF; // 辅助说明 +$j-text-strong: #1F2937; // 强调值 + +/* --- 1.6 字号层级(全站 6 档) --- */ +$j-fs-title: 32rpx; // 16px 卡片主标题 +$j-fs-lg: 30rpx; // 15px 次级标题 +$j-fs-label: 26rpx; // 13px 标签 / 内容值 +$j-fs-value: 26rpx; // 13px 内容值 +$j-fs-btn: 24rpx; // 12px 按钮文字 +$j-fs-tip: 22rpx; // 11px 标签 / 辅助说明 + +/* --- 1.7 间距 --- */ +$j-sp-xs: 8rpx; // 4px +$j-sp-sm: 16rpx; // 8px +$j-sp-md: 24rpx; // 12px +$j-sp-lg: 32rpx; // 16px +$j-gap-item: 6rpx; // 3px 信息行之间 +$j-gap-btn: 16rpx; // 8px 按钮之间 +$j-page-pad: 24rpx; // 12px 页面内边距 +$j-card-pad: 24rpx; // 12px 卡片内边距 + +/* --- 1.8 容器色 --- */ +$j-bg: #F4F6FA; // 页面底 +$j-card: #ffffff; // 卡片 +$j-line: #E8EBF0; // 分隔线 +$j-block: #F4F6FA; // 弱区块 / 次级标签底 + +/* --- 1.9 圆角(4px / 8px / 12px / 胶囊) --- */ +$j-r-btn: 8rpx; +$j-r-card: 16rpx; +$j-r-lg: 24rpx; +$j-r-pill: 999rpx; + +/* --- 1.10 阴影 --- */ +$j-shadow-card: 0 4rpx 16rpx rgba(17, 24, 39, 0.06); +$j-shadow-float: 0 -8rpx 28rpx rgba(17, 24, 39, 0.08); + +/* ========================================================================== + * 2. 信息项:标签自然宽 + 值右对齐(设计稿 .kv) + * -------------------------------------------------------------------------- + * 设计稿不固定标签列宽:标签浅灰靠左,值占满剩余宽度并右对齐, + * 因此各行内容值的右边缘天然对齐,不会参差不齐。 + * ========================================================================== */ +.u-body-item { + display: flex !important; + align-items: flex-start !important; + gap: $j-sp-sm !important; + margin-bottom: $j-gap-item !important; + + &:last-child { + margin-bottom: 0 !important; + } +} + +/* 单行信息项(带 common-item-center)仍按垂直居中排版 */ +.u-body-item.common-item-center { + align-items: center !important; +} + +.u-body-item-title { + flex: 0 0 auto !important; + width: auto !important; + min-width: 0 !important; + font-size: $j-fs-label !important; + font-weight: 400 !important; + color: $j-text-label !important; + line-height: 1.5 !important; + white-space: nowrap; +} + +.u-body-value { + flex: 1 1 auto; + min-width: 0; + font-size: $j-fs-value !important; + font-weight: 400 !important; + color: $j-text-value !important; + line-height: 1.5 !important; + text-align: right; + word-break: break-all; +} + +/* 卡片主标题:比信息项高一级 */ +.common-card-list .common-name, +.card-header .common-name, +.common-card-title { + font-size: $j-fs-title !important; + font-weight: 500 !important; + color: $j-text-title !important; + line-height: 1.4 !important; +} + +/* ========================================================================== + * 3. 操作按钮:五类语义色 + 统一尺寸(含三套现有实现) + * -------------------------------------------------------------------------- + * task-btn:列表卡按钮 order-action-btn:详情底部按钮 + * 均为 56rpx 高(28px)/ 24rpx 白字 / 8rpx 圆角,文字过长省略不换行 + * ========================================================================== */ +.task-btn, +.order-action-btn { + box-sizing: border-box; + height: 56rpx; + line-height: 56rpx; + padding: 0 24rpx; + border-radius: $j-r-btn; + font-size: $j-fs-btn !important; + font-weight: 400; + color: #ffffff !important; // 按钮内文字统一白色 + text-align: center !important; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + transition: background-color 0.15s ease; +} + +// 亮蓝:详情等次要主操作 +.task-btn--primary, +.order-action-btn--primary { + background-color: $j-btn-primary !important; + + &:active { + background-color: $j-btn-primary-a !important; + } +} + +// 深蓝:分配(卡片主操作,比「详情」深一级) +.task-btn--assign, +.order-action-btn--assign { + background-color: $j-assign !important; + + &:active { + background-color: $j-assign-a !important; + } +} + +// 深绿:审批通过 / 实施 / 结束 +.task-btn--success, +.order-action-btn--success { + background-color: $j-btn-success !important; + + &:active { + background-color: $j-btn-success-a !important; + } +} + +// 琥珀:退回 +.task-btn--warning, +.order-action-btn--warning { + background-color: $j-btn-warning !important; + + &:active { + background-color: $j-btn-warning-a !important; + } +} + +// 青:转办 / 转派 +.task-btn--transfer, +.order-action-btn--transfer { + background-color: $j-btn-transfer !important; + + &:active { + background-color: $j-btn-transfer-a !important; + } +} + +// 红:驳回 / 危险操作 +.task-btn--error, +.order-action-btn--error { + background-color: $j-btn-danger !important; + + &:active { + background-color: $j-btn-danger-a !important; + } +} + +// 灰:撤回 / 次要 +.task-btn--info, +.order-action-btn--info { + background-color: $j-btn-info !important; + + &:active { + background-color: $j-btn-info-a !important; + } +} + +/* ========================================================================== + * 4. 按钮行:auto-fit 自适应换行 + * -------------------------------------------------------------------------- + * 原实现为 grid repeat(var(--cols)),列数由 JS 算出(最多 5 列), + * 按钮多时被压窄溢出。改为 auto-fit 后由容器宽度决定每行个数: + * 5 个 → 3+2 两行;3 个 → 一行等分;2 个 → 各占一半;1 个 → 独占一行 + * JS 传入的 --cols 自动失效(仅样式层变化,不改 JS)。 + * ========================================================================== */ +.task-btn-row, +.order-action-row { + display: grid !important; + grid-template-columns: repeat(auto-fit, minmax(144rpx, 1fr)) !important; + gap: $j-gap-btn !important; + margin-bottom: 0 !important; +} + +.task-btn-row > view, +.order-action-row > view { + min-width: 0; // 防止长文案撑破栅格 +} + +/* ========================================================================== + * 5. 通用绝对定位按钮(历史实现,仅保留配色,新页面改用 .card-action-row) + * ========================================================================== */ +.common-custom-btn { + background-color: $j-assign !important; + color: #ffffff !important; + border-radius: $j-r-btn !important; + padding: 8rpx 24rpx !important; + font-size: $j-fs-btn !important; + line-height: 1.4; + text-align: center; + white-space: nowrap; + transition: background-color 0.15s ease; + + &:active { + background-color: $j-assign-a !important; + } + + &.disabled { + background-color: #93B4F5 !important; + opacity: 0.7; + } +} + +/* ========================================================================== + * 5.1 卡片内按钮语义化(设计稿 .btn.sm / .btn-link) + * -------------------------------------------------------------------------- + * 主操作 = 蓝底白字 / 次要操作 = 白底描边 / 危险操作 = 红色文字 + * 尺寸:高 56rpx(28px) · 字号 24rpx(12px) · 圆角 8rpx(4px) · 左右 24rpx + * ========================================================================== */ +.mini-btn { + box-sizing: border-box; + display: flex; + align-items: center; + justify-content: center; + min-width: 120rpx; + height: 56rpx; + padding: 0 $j-sp-md; + font-size: $j-fs-btn !important; + font-weight: 400; + color: #ffffff !important; + text-align: center !important; + border-radius: $j-r-btn; + flex-shrink: 0; + white-space: nowrap; + transition: background-color 0.15s ease; +} + +.mini-btn--primary { + background-color: $j-assign !important; + + &:active { + background-color: $j-assign-a !important; + } +} + +.mini-btn--info { + background-color: $j-neutral !important; + + &:active { + background-color: $j-neutral-a !important; + } +} + +/* 次要操作:白底描边,与主操作同一行时形成主次对比 */ +.mini-btn--plain { + color: $j-text-value !important; + background-color: #ffffff !important; + border: 1rpx solid $j-line; + + &:active { + background-color: $j-block !important; + } +} + +/* 置为失效 / 删除类危险操作:红色文字按钮,占位与普通按钮一致 */ +.btn-text-danger, +.btn-set-invalid { + flex-shrink: 0; + padding: 8rpx 0; + font-size: $j-fs-label !important; + font-weight: 400; + color: $j-reject !important; + line-height: 1.4; + white-space: nowrap; + transition: color 0.15s ease; + + &:active { + color: $j-reject-a !important; + opacity: 0.8; + } +} + +/* ========================================================================== + * 6. 详情页统一:u-cell 排版收口(设计稿 .card.pad + .kv) + * -------------------------------------------------------------------------- + * 三类工单(养护 / 区域 / AI)详情都用 up-cell 渲染字段,此处统一层级: + * 标签 26rpx #9CA3AF 左 / 内容值 26rpx #4B5563 右 / 行内 16rpx 上下 + * 注意:uview-plus 单元格内部类名为 u-cell__xxx(组件内为 scoped 样式), + * 全局层必须带 !important 才生效。 + * ========================================================================== */ +.u-cell__body { + display: flex !important; + justify-content: space-between !important; + padding: 16rpx $j-card-pad !important; +} + +/* 单元格之间的分隔线沿用 uview 的 u-line,仅去掉卡片最后一行的尾线 */ +.u-cell-group__wrapper > .u-cell:last-child .u-line { + display: none !important; +} + +.u-cell__title-text, +.u-cell__label { + font-size: $j-fs-label !important; + font-weight: 400 !important; + color: $j-text-label !important; + line-height: 1.5 !important; +} + +/* 标题插槽(#title 自定义 view)同样收到「标签」层级 */ +.u-cell__title > view { + font-size: $j-fs-label !important; + font-weight: 400 !important; + color: $j-text-label !important; + line-height: 1.5 !important; +} + +.u-cell__value { + font-size: $j-fs-value !important; + font-weight: 400 !important; + color: $j-text-value !important; + line-height: 1.5 !important; + text-align: right !important; + word-break: break-all; +} + +/* 插槽内的内容值统一走 .common-text-color(App.vue 中定义为 #4B5563) */ + +/* 信息区块统一成卡片:四周留白一致,标题/内容与边框保持固定间距 */ +.u-cell-group { + box-sizing: border-box; + margin: 0 $j-page-pad $j-sp-md !important; + border-radius: $j-r-card; + overflow: hidden; + background-color: $j-card; +} + +/* 级联选择器弹层内的单元格保持原样(多列并排,不能加外边距) */ +.area-item .u-cell-group { + margin: 0 !important; + border-radius: 0; + background-color: transparent; +} + +/* 「我的」页单元格本来就在白色圆角面板内,不再叠加卡片外框 */ +.mine-content .u-cell-group { + margin-left: 0 !important; + margin-right: 0 !important; + border-radius: 0; +} + +/* 详情页附图区块:与上方信息卡同宽同圆角,避免出现整宽的白色通栏 */ +.img-tabs-block { + margin: 0 $j-page-pad $j-sp-md; + border-radius: $j-r-card; + overflow: hidden; +} + +/* ========================================================================== + * 6.1 卡片内的操作区(设计稿 .tcard-foot) + * -------------------------------------------------------------------------- + * 操作按钮不再用绝对定位悬浮在卡片上,统一收进底部操作区: + * 上方 16rpx 留白 + 1rpx 分隔线,按钮右对齐,间距 16rpx + * ========================================================================== */ +.card-action-row { + display: flex; + align-items: center; + justify-content: flex-end; + gap: $j-gap-btn; + margin-top: $j-sp-sm; + padding-top: $j-sp-sm; + border-top: 1rpx solid $j-line; +} + +/* ========================================================================== + * 7. 状态标签(设计稿 .tag:高 40rpx / 字号 22rpx / 圆角 8rpx / 左右 16rpx) + * ========================================================================== */ +.urgency-tag, +.common-invalid-tag, +.common-finish-tag, +.common-pending-tag, +.common-timeout-tag, +.status-tag { + display: inline-flex !important; + align-items: center !important; + flex-shrink: 0; + height: 40rpx; + padding: 0 $j-sp-sm; + font-size: $j-fs-tip !important; + font-weight: 500; + border-radius: $j-r-btn; + line-height: 1; + white-space: nowrap; +} + +/* 待完成:浅蓝底蓝字 */ +.common-pending-tag { + background-color: $j-assign-bg !important; + color: $j-assign !important; +} + +/* 已完成:浅绿底绿字 */ +.common-finish-tag { + background-color: $j-approve-bg !important; + color: $j-approve !important; +} + +/* 已失效:灰底灰字(设计稿 invalid 为中性灰,不是红色) */ +.common-invalid-tag { + background-color: $j-neutral-bg !important; + color: $j-neutral !important; +} + +/* 超时:浅红底红字 */ +.common-timeout-tag { + background-color: $j-reject-bg !important; + color: $j-reject !important; +} + +/* ========================================================================== + * 8. 全局文本基线 + * ========================================================================== */ +page { + font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; + font-size: $j-fs-value; + color: $j-text-title; + line-height: 1.5; + -webkit-font-smoothing: antialiased; + -webkit-text-size-adjust: 100%; + background-color: $j-bg; +} + +/* ========================================================================== + * 9. Tab 组件统一 + * ========================================================================== */ +.u-tabs__wrapper__nav__line { + background-color: $j-brand !important; +} + +.u-tabs__wrapper__nav__item__text { + font-size: 28rpx !important; // 设计稿 tab 字号 14px +} + +/* --- 9.1 首页下划线式一级 Tab --- */ +.main-tab-item { + font-size: $j-fs-lg; + color: $j-text-value; + font-weight: 400; + + &.active { + color: $j-brand; + font-weight: 500; + + &::after { + background-color: $j-brand; + } + } +} + +/* --- 9.2 胶囊 Tab --- */ +.tab-capsule { + font-size: $j-fs-label; + color: $j-text-weak; + background-color: $j-block; + border-radius: $j-r-btn; + + &.active { + color: $j-brand; + background-color: $j-brand-light; + } +} + +/* ========================================================================== + * 9.3 搜索条(设计稿 .search-bar / .sbox) + * -------------------------------------------------------------------------- + * u-search 在 animation=true 时右侧「搜索」宽度为 0,只在输入框聚焦后才展开; + * 设计稿要求常显,这里用样式补回宽度与间距,不修改组件 props。 + * 圆角按设计稿做成圆角矩形(8px),不是左右全圆的胶囊。 + * ========================================================================== */ +.u-search__content { + border-radius: $j-r-card !important; +} + +.u-search__action { + width: 40px !important; + margin-left: $j-sp-sm !important; + font-size: $j-fs-label !important; + color: $j-brand !important; +} + +/* ========================================================================== + * 10. 弹层收起兜底:过渡层不拦截点击 + * -------------------------------------------------------------------------- + * uview-plus 的 u-transition 把 mergeStyle 里的 display:none 注释掉了, + * 收起动画结束后要等 setTimeout(onTransitionEnd) 才真正移除节点。 + * u-popup 的遮罩是 position:fixed + z-index 10075 的全屏层,收起时透明度 + * 已降为 0,一旦该定时器被页面重渲染打断,就会残留一个「看不见但吃点击」 + * 的透明层,表现为页面正常显示、所有按钮却都点不动。 + * 这里让处于收起动画的过渡层不接收点击:无功能变化(300ms 收起期间本来 + * 也不该再点下层),但可以彻底消除上述残留遮挡。 + * ========================================================================== */ +.u-transition.u-fade-leave-active, +.u-transition.u-fade-up-leave-active, +.u-transition.u-fade-down-leave-active, +.u-transition.u-fade-left-leave-active, +.u-transition.u-fade-right-leave-active, +.u-transition.u-fade-zoom-leave-active, +.u-transition.u-slide-up-leave-active, +.u-transition.u-slide-down-leave-active, +.u-transition.u-slide-left-leave-active, +.u-transition.u-slide-right-leave-active, +.u-transition.u-zoom-leave-active { + pointer-events: none !important; +} diff --git a/common/utils/common.js b/common/utils/common.js index 57fb9a3..2f249d2 100644 --- a/common/utils/common.js +++ b/common/utils/common.js @@ -105,7 +105,14 @@ export const buzStatusMap = { * 工作流节点动作按钮颜色(与统一动作弹窗保持一致) * @param {string} code - 动作编码,如 ASSIGN/REJECT/RETURN_PREV */ -export const getActionButtonType = (code) => { +export const getActionButtonType = (code, name) => { + // 名称优先:部分流程把「退回」配成了 COMPLETE 编码,只看编码会渲染成绿色 + const text = name || '' + if (text.includes('驳回') || text.includes('拒绝')) return 'error' + if (text.includes('退回') || text.includes('回退') || text.includes('不通过')) return 'warning' + if (text.includes('转办') || text.includes('转派') || text.includes('转交')) return 'transfer' + // 分配是卡片主操作:用比「详情」更深的品牌蓝 + if (code === 'ASSIGN' || text.includes('分配') || text.includes('指派')) return 'assign' switch (code) { case 'APPROVE': case 'HANDLE': @@ -124,6 +131,17 @@ export const getActionButtonType = (code) => { } /** + * 操作按钮行每行按钮数:单个按钮占一半宽度(左对齐),多个按钮等分,最多 5 个一行 + * @param {number} count - 按钮总数 + * @returns {number} 栅格列数 + */ +export const getActionRowCols = (count) => { + const total = Number(count) || 0 + // 1 个按钮时用 2 列,按钮占 1 列即页面一半 + return total <= 1 ? 2 : Math.min(total, 5) +} + +/** * 计算两个时间的时间差,返回格式化字符串(天/小时/分钟/秒,按需显示,无无效单位) * @param {string | Date | number} startTime - 开始时间(时间字符串/Date对象/10位/13位时间戳) * @param {string | Date | number} endTime - 结束时间(时间字符串/Date对象/10位/13位时间戳) diff --git a/components/grouped-picker/grouped-picker.vue b/components/grouped-picker/grouped-picker.vue index 65dc144..9437c5c 100644 --- a/components/grouped-picker/grouped-picker.vue +++ b/components/grouped-picker/grouped-picker.vue @@ -35,8 +35,8 @@ @change="onTabChange" :lineWidth="30" :lineHeight="4" - activeColor="#2979ff" - lineColor="#2979ff" + activeColor="#2563EB" + lineColor="#2563EB" inactiveColor="#606266" > @@ -92,7 +92,7 @@ - + @@ -487,9 +487,9 @@ watch( height: 28rpx; padding: 0 6rpx; border-radius: 14rpx; - background: #2979ff; + background: #2563EB; color: #ffffff; - font-size: 20rpx; + font-size: 24rpx; line-height: 28rpx; text-align: center; } @@ -537,8 +537,8 @@ watch( justify-content: center; &.is-checked { - background: #2979ff; - border-color: #2979ff; + background: #2563EB; + border-color: #2563EB; } } @@ -562,7 +562,7 @@ watch( .gp-row-crumb { margin-top: 4rpx; - font-size: 22rpx; + font-size: 24rpx; color: #909399; } @@ -609,7 +609,7 @@ watch( .gp-empty { padding: 60rpx 0; - font-size: 26rpx; + font-size: 28rpx; color: #c0c4cc; text-align: center; } diff --git a/components/my-cascader/my-cascader.vue b/components/my-cascader/my-cascader.vue index 5f49528..2f5f4d6 100644 --- a/components/my-cascader/my-cascader.vue +++ b/components/my-cascader/my-cascader.vue @@ -337,10 +337,10 @@ onMounted(() => { } .trigger-text { font-size: 28rpx; - color: #333; + color: #1a1a1a; } .trigger-icon { - color: #999; + color: #909399; } .area-box { diff --git a/components/unified-task-actions/unified-task-actions.vue b/components/unified-task-actions/unified-task-actions.vue index 2a1c3ad..418df46 100644 --- a/components/unified-task-actions/unified-task-actions.vue +++ b/components/unified-task-actions/unified-task-actions.vue @@ -4,6 +4,7 @@ mode="bottom" round closeable + bg-color="#F4F6FA" :safe-area-inset-bottom="true" @close="close" > @@ -15,7 +16,7 @@ - 处理人 + + + 处理人 + - {{ reasonLabel }} + + + {{ reasonLabel }} + - 附件(必填) + + + 附件(必填) + { current.value = null } -/** 动作按钮颜色 */ -const getButtonType = (code) => { +/** 动作按钮颜色:名称优先(部分流程「退回」用的是 COMPLETE 编码) */ +const getButtonType = (code, name) => { + const text = name || '' + if (text.includes('驳回') || text.includes('拒绝')) return 'error' + if (text.includes('退回') || text.includes('回退') || text.includes('不通过')) return 'warning' + if (text.includes('转办') || text.includes('转派') || text.includes('转交')) return 'info' switch (code) { case 'APPROVE': case 'HANDLE': @@ -285,17 +299,20 @@ defineExpose({ open }) diff --git a/components/work-field-form/work-field-form.vue b/components/work-field-form/work-field-form.vue index d743693..6f657bb 100644 --- a/components/work-field-form/work-field-form.vue +++ b/components/work-field-form/work-field-form.vue @@ -798,7 +798,7 @@ export default { :deep(.u-number-box__input) { width: 264rpx !important; height: 72rpx; - font-size: 32rpx; + font-size: 30rpx; } :deep(.u-number-box__btn) { @@ -819,7 +819,7 @@ export default { .unit-text { font-size: 28rpx; - color: #333; + color: #1a1a1a; } } @@ -853,7 +853,7 @@ export default { flex: 1; min-width: 0; font-size: 28rpx; - color: #333; + color: #1a1a1a; } } @@ -878,14 +878,14 @@ export default { flex: 1; min-width: 0; font-size: 28rpx; - color: #333; + color: #1a1a1a; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .file-del { - font-size: 26rpx; + font-size: 28rpx; color: #ff4d4f; } } diff --git a/pages-sub/daily/attendanceRecord.vue b/pages-sub/daily/attendanceRecord.vue index 868b73c..1eb5359 100644 --- a/pages-sub/daily/attendanceRecord.vue +++ b/pages-sub/daily/attendanceRecord.vue @@ -254,17 +254,19 @@ onMounted(async () => { diff --git a/pages-sub/daily/maintain-manage/finish-plan-detail.vue b/pages-sub/daily/maintain-manage/finish-plan-detail.vue index a2568b4..8fd821f 100644 --- a/pages-sub/daily/maintain-manage/finish-plan-detail.vue +++ b/pages-sub/daily/maintain-manage/finish-plan-detail.vue @@ -5,41 +5,40 @@ v-if="loading" :loading="true" title="加载中..." - color="#3c9cff" + color="#2563EB" > - - + + {{ item.planName || '无计划名称' }} - - - 置为失效 - - - - 完成次数:{{ item.planFinishNum }}次 - 任务次数:第{{ item.planFinishNum +1 }}次 - - - 去作业 - 去查看 - 去查看 + + + 任务次数 + 完成 {{ item.planFinishNum }} 次 + + 第 {{ item.planNum === 1 ? (item.sortNum || 1) : (item.planFinishNum + 1) }} 次 - - + + - 有效期:{{ timeFormat(item.beginTime, 'yyyy-mm-dd') }}—{{ + 有效期 + {{ timeFormat(item.beginTime, 'yyyy-mm-dd') }}—{{ timeFormat(item.endTime, 'yyyy-mm-dd') }} - - 结束任务 + + + + + + 置为失效 + + + + 结束任务 + + 去作业 + 去查看 + 去查看 + - - + - 确定置为失效吗? + + * + 失效原因 + + + + 失效凭证(选填,最多3张) + + @@ -61,10 +79,10 @@ diff --git a/pages-sub/daily/patrol-manage/add-patrol-record.vue b/pages-sub/daily/patrol-manage/add-patrol-record.vue index 4604bdc..f614187 100644 --- a/pages-sub/daily/patrol-manage/add-patrol-record.vue +++ b/pages-sub/daily/patrol-manage/add-patrol-record.vue @@ -1,72 +1,95 @@