Commit c64da17be716df2108e0fdf17834a588273f5828

Authored by 刘淇
1 parent b88fbd00

新的业务线

common/utils/common.js
... ... @@ -247,6 +247,14 @@ export const translateRoles = (roles = []) => {
247 247 'wy_worker': '物业养护员',
248 248 'Inspector_global': '全域督察员',
249 249 'AI_dispatcher': 'AI工单派发人员',
  250 + 'zxgl_inspector': '秩序管理巡查员',
  251 + 'zxgl_worker': '秩序管理养护员',
  252 + 'team_leader_zxgl': '秩序管理组长',
  253 + 'team_leader_hjws': '环境卫生养护组长',
  254 + 'hjws_worker': '环境卫生养护员',
  255 + 'hjws_inspector': '环境卫生巡查员',
  256 + 'group_approver': '应急抢险集团审批人员',
  257 + 'rescue_person': '抢险上报人员',
250 258 };
251 259 // 过滤有效角色 + 翻译 + 中文逗号拼接
252 260 return roles
... ...
pages-sub/daily/maintain-manage/finish-plan-detail.vue
... ... @@ -27,7 +27,7 @@
27 27 align="middle"
28 28 ></up-cell>
29 29  
30   - <!-- 3. 工单名称 -->
  30 +
31 31 <up-cell
32 32 title="养护周期"
33 33 :value="`${i.rate}${uni.$dict.getDictLabel('cycle_id_type', i.cycleId)}`"
... ...
pages-sub/daily/maintain-manage/record-detail-list.vue
... ... @@ -31,7 +31,7 @@
31 31 align="middle"
32 32 ></up-cell>
33 33  
34   - <!-- 3. 工单名称 -->
  34 +
35 35 <up-cell
36 36 title="养护周期"
37 37 :value="`${i.rate}${uni.$dict.getDictLabel('cycle_id_type', i.cycleId)}`"
... ...
pages-sub/daily/patrol-manage/finish-plan-detail.vue
... ... @@ -14,7 +14,7 @@
14 14 <view class="content-wrap" v-for="(i, index) in orderDetail" :key="index">
15 15 <!-- 工单详情内容 -->
16 16 <up-cell-group :border="false" inset >
17   - <!-- 1. 工单名称 -->
  17 +
18 18 <up-cell
19 19 align="middle"
20 20 >
... ... @@ -33,7 +33,7 @@
33 33 align="middle"
34 34 ></up-cell>
35 35  
36   - <!-- 3. 工单名称 -->
  36 +
37 37 <up-cell
38 38 title="养护周期"
39 39 :value="`${i.rate}${uni.$dict.getDictLabel('cycle_id_type', i.cycleId)}`"
... ...
pages-sub/daily/quick-order/add-order.vue
... ... @@ -66,9 +66,9 @@
66 66 </template>
67 67 </up-form-item>
68 68  
69   - <!-- 3. 工单名称(下拉框) -->
  69 + <!-- 3. 问题类型(下拉框) -->
70 70 <up-form-item
71   - label="工单名称"
  71 + label="问题类型"
72 72 prop="orderName"
73 73 border-bottom
74 74 required
... ... @@ -78,7 +78,7 @@
78 78 v-model="workOrderForm.orderName"
79 79 disabled
80 80 disabled-color="#ffffff"
81   - placeholder="请选择工单名称"
  81 + placeholder="请选择问题类型"
82 82 border="none"
83 83 ></up-input>
84 84 <template #right>
... ... @@ -164,11 +164,11 @@
164 164 @select="handleRoadNameSelect"
165 165 ></up-action-sheet>
166 166  
167   - <!-- 工单名称下拉弹窗 -->
  167 + <!-- 问题类型下拉弹窗 -->
168 168 <up-action-sheet
169 169 :show="showOrderName"
170 170 :actions="orderNameList"
171   - title="请选择工单名称"
  171 + title="请选择问题类型"
172 172 @close="showOrderName = false"
173 173 @select="handleOrderNameSelect"
174 174 ></up-action-sheet>
... ... @@ -189,9 +189,13 @@ export default {
189 189 'yl': '园林',
190 190 'sz': '市政',
191 191 'wy': '物业',
  192 + 'zx': '秩序管理',
  193 + 'hj': '环境卫生',
192 194 '园林': 'yl',
193 195 '市政': 'sz',
194   - '物业': 'wy'
  196 + '物业': 'wy',
  197 + '秩序管理': 'zx',
  198 + '环境卫生': 'hj',
195 199 },
196 200 busiLineOptions: [], // 业务线选项列表
197 201 // 问题照片列表
... ... @@ -210,7 +214,7 @@ export default {
210 214 roadId: 0, // 道路ID
211 215 roadName: '', // 道路名称
212 216 workLocation: '', // 工单位置
213   - orderName: '', // 工单名称
  217 + orderName: '', // 问题类型
214 218 problemDesc: '', // 情况描述
215 219 handleResult: '', // 处理结果描述(不必填)
216 220 lat: 0, // 纬度
... ... @@ -228,7 +232,7 @@ export default {
228 232 { type: 'string', required: true, message: '请选择道路名称', trigger: ['change', 'blur'] }
229 233 ],
230 234 orderName: [
231   - { type: 'string', required: true, message: '请选择工单名称', trigger: ['change', 'blur'] }
  235 + { type: 'string', required: true, message: '请选择问题类型', trigger: ['change', 'blur'] }
232 236 ],
233 237 problemDesc: [
234 238 { type: 'string', required: true, message: '请输入情况描述', trigger: ['change', 'blur'] },
... ... @@ -275,7 +279,7 @@ export default {
275 279 },
276 280 onShow() {
277 281 this.orderNameList = uni.$dict.transformLabelValueToNameValue(uni.$dict.getDictSimpleList('work_name'));
278   - console.log('工单名称列表:', this.orderNameList);
  282 + console.log('问题类型列表:', this.orderNameList);
279 283 },
280 284 methods: {
281 285 // 初始化业务线选项
... ... @@ -483,7 +487,7 @@ export default {
483 487 this.$refs.workOrderFormRef.validateField('roadName');
484 488 },
485 489 /**
486   - * 选择工单名称
  490 + * 选择问题类型
487 491 */
488 492 handleOrderNameSelect(e) {
489 493 console.log(e);
... ...
pages-sub/daily/quick-order/index.vue
... ... @@ -117,7 +117,7 @@ import { ref } from &#39;vue&#39;;
117 117 import { workorderPage } from "@/api/quick-order/quick-order";
118 118 import { timeFormat } from '@/uni_modules/uview-plus';
119 119 const selectedSortValue = ref(1);
120   -// 1 位置 2 工单名称 3 情况描述 4 工单编号
  120 +// 1 位置 2 问题类型 3 情况描述 4 工单编号
121 121 const sortOptions = ref([
122 122 {name: '位置', id: 1},
123 123 {name: '名称', id: 2},
... ... @@ -136,7 +136,7 @@ const queryList = async (pageNo, pageSize) =&gt; {
136 136 searchContent: searchValue.value.trim() || '',
137 137 pageNo: pageNo,
138 138 pageSize: pageSize,
139   - type: selectedSortValue.value // 1 位置 2 工单名称 3 情况描述 4 工单编号
  139 + type: selectedSortValue.value // 1 位置 2 问题类型 3 情况描述 4 工单编号
140 140 };
141 141 console.log('请求参数:', apiParams);
142 142 const res = await workorderPage(apiParams);
... ...
pages-sub/daily/quick-order/order-detail.vue
... ... @@ -53,9 +53,9 @@
53 53  
54 54 </up-cell>
55 55  
56   - <!-- 3. 工单名称 -->
  56 + <!-- 3. 问题类型 -->
57 57 <up-cell
58   - title="工单名称"
  58 + title="问题类型"
59 59 :value="orderDetail.orderName || '--'"
60 60 align="middle"
61 61 ></up-cell>
... ...
pages-sub/problem/ai-manage/index.vue
... ... @@ -73,7 +73,7 @@
73 73 <view class="u-line-1 u-body-value">{{ item.lonLatAddress || '-' }}</view>
74 74 </view>
75 75 <view class="u-body-item u-flex">
76   - <view class="u-body-item-title">工单名称:</view>
  76 + <view class="u-body-item-title">问题类型:</view>
77 77 <view class="u-line-1 u-body-value">{{ item.orderName || '未填写' }}</view>
78 78 </view>
79 79 <view class="u-body-item u-flex">
... ...
pages-sub/problem/regional-order-manage/add-order.vue
... ... @@ -24,9 +24,9 @@
24 24 ></up-input>
25 25 </up-form-item>
26 26  
27   - <!-- 2. 工单名称(下拉框) -->
  27 + <!-- 2. 问题类型(下拉框) -->
28 28 <up-form-item
29   - label="工单名称"
  29 + label="问题类型"
30 30 prop="orderName"
31 31 border-bottom
32 32 required
... ... @@ -36,7 +36,7 @@
36 36 v-model="workOrderForm.orderName"
37 37 disabled
38 38 disabled-color="#ffffff"
39   - placeholder="请选择工单名称"
  39 + placeholder="请选择问题类型"
40 40 border="none"
41 41 ></up-input>
42 42 <template #right>
... ... @@ -211,7 +211,9 @@ const CONST = {
211 211 // 路由地址
212 212 PAGE_ORDER_LIST: '/pages-sub/problem/regional-order-manage/index',
213 213 // 业务线映射
214   - BUSI_LINE_MAP: { yl: '园林', sz: '市政', wy: '物业', '园林': 'yl', '市政': 'sz', '物业': 'wy' },
  214 + BUSI_LINE_MAP: { yl: '园林', sz: '市政', wy: '物业', '园林': 'yl', '市政': 'sz', '物业': 'wy', 'zx': '秩序管理',
  215 + 'hj': '环境卫生', '秩序管理': 'zx',
  216 + '环境卫生': 'hj', },
215 217 // 角色标识
216 218 ROLE: { MANAGER: 'regional_manager', INSPECTOR: 'Inspector_global', PATROL: 'patrol_global' }
217 219 }
... ...
pages-sub/problem/regional-order-manage/add-patrol-order.vue
... ... @@ -24,9 +24,9 @@
24 24 ></up-input>
25 25 </up-form-item>
26 26  
27   - <!-- 2. 工单名称(下拉框) -->
  27 + <!-- 2. 问题类型(下拉框) -->
28 28 <up-form-item
29   - label="工单名称"
  29 + label="问题类型"
30 30 prop="orderName"
31 31 border-bottom
32 32 required
... ... @@ -36,7 +36,7 @@
36 36 v-model="workOrderForm.orderName"
37 37 disabled
38 38 disabled-color="#ffffff"
39   - placeholder="请选择工单名称"
  39 + placeholder="请选择问题类型"
40 40 border="none"
41 41 ></up-input>
42 42 <template #right>
... ... @@ -114,12 +114,16 @@ const userStore = useUserStore();
114 114 // ========== 业务线相关状态 ==========
115 115 // 业务线映射表
116 116 const busiLineMap = ref({
117   - 'yl': '园林',
118   - 'sz': '市政',
119   - 'wy': '物业',
120   - '园林': 'yl',
121   - '市政': 'sz',
122   - '物业': 'wy'
  117 + 'yl': '园林',
  118 + 'sz': '市政',
  119 + 'wy': '物业',
  120 + 'zx': '秩序管理',
  121 + 'hj': '环境卫生',
  122 + '园林': 'yl',
  123 + '市政': 'sz',
  124 + '物业': 'wy',
  125 + '秩序管理': 'zx',
  126 + '环境卫生': 'hj',
123 127 });
124 128  
125 129 // 业务线选项列表
... ...
pages-sub/problem/regional-order-manage/distribution-order.vue
... ... @@ -23,9 +23,9 @@
23 23 ></up-input>
24 24 </up-form-item>
25 25  
26   - <!-- 2. 工单名称(下拉框)【赋值回显 + 完全禁止修改】 -->
  26 + <!-- 2. 问题类型(下拉框)【赋值回显 + 完全禁止修改】 -->
27 27 <up-form-item
28   - label="工单名称"
  28 + label="问题类型"
29 29 prop="orderName"
30 30 border-bottom
31 31 required
... ... @@ -34,7 +34,7 @@
34 34 v-model="workOrderForm.orderName"
35 35 disabled
36 36  
37   - placeholder="暂无工单名称"
  37 + placeholder="暂无问题类型"
38 38 border="none"
39 39 ></up-input>
40 40 </up-form-item>
... ... @@ -209,11 +209,15 @@ const userStore = useUserStore();
209 209 // 业务线映射表
210 210 const busiLineMap = ref({
211 211 'yl': '园林',
212   - 'sz': '市政',
213   - 'wy': '物业',
214   - '园林': 'yl',
215   - '市政': 'sz',
216   - '物业': 'wy'
  212 + 'sz': '市政',
  213 + 'wy': '物业',
  214 + 'zx': '秩序管理',
  215 + 'hj': '环境卫生',
  216 + '园林': 'yl',
  217 + '市政': 'sz',
  218 + '物业': 'wy',
  219 + '秩序管理': 'zx',
  220 + '环境卫生': 'hj',
217 221 });
218 222  
219 223 // 业务线选项列表
... ... @@ -372,7 +376,7 @@ const echoOrderData = (orderItem) =&gt; {
372 376 workOrderForm.busiLineCn = busiLineMap.value[orderItem.busiLine];
373 377 }
374 378  
375   - // 回显基础字段【核心:工单位置/工单名称/情况描述 赋值】
  379 + // 回显基础字段【核心:工单位置/问题类型/情况描述 赋值】
376 380 workOrderForm.roadId = orderItem.roadId || 0;
377 381 workOrderForm.roadName = orderItem.roadName || '';
378 382 workOrderForm.workLocation = orderItem.lonLatAddress || orderItem.roadName || '';
... ...
pages-sub/problem/regional-order-manage/index.vue
... ... @@ -79,7 +79,7 @@
79 79 <view class="u-line-1 u-body-value">{{ item.lonLatAddress || '-' }}</view>
80 80 </view>
81 81 <view class="u-body-item u-flex">
82   - <view class="u-body-item-title">工单名称:</view>
  82 + <view class="u-body-item-title">问题类型:</view>
83 83 <view class="u-line-1 u-body-value">{{ item.orderName || '未填写' }}</view>
84 84 </view>
85 85 <view class="u-body-item u-flex">
... ...
pages-sub/problem/regional-order-manage/order-detail.vue
... ... @@ -42,10 +42,10 @@
42 42 </template>
43 43 </up-cell>
44 44  
45   - <!-- 工单名称 -->
  45 + <!-- 问题类型 -->
46 46 <up-cell align="middle">
47 47 <template #title>
48   - <view style="min-width: 200rpx">工单名称</view>
  48 + <view style="min-width: 200rpx">问题类型</view>
49 49 </template>
50 50 <template #value>
51 51 <view class="common-text-color up-line-1">{{ orderDetail.orderName || '--' }}</view>
... ...
pages-sub/problem/work-order-manage/add-order.vue
... ... @@ -67,9 +67,9 @@
67 67 </template>
68 68 </up-form-item>
69 69  
70   - <!-- 3. 工单名称(下拉框) -->
  70 + <!-- 3. 问题类型(下拉框) -->
71 71 <up-form-item
72   - label="工单名称"
  72 + label="问题类型"
73 73 prop="orderName"
74 74 border-bottom
75 75 required
... ... @@ -79,7 +79,7 @@
79 79 v-model="workOrderForm.orderName"
80 80 disabled
81 81 disabled-color="#ffffff"
82   - placeholder="请选择工单名称"
  82 + placeholder="请选择问题类型"
83 83 border="none"
84 84 ></up-input>
85 85 <template #right>
... ... @@ -212,12 +212,15 @@ const userStore = useUserStore();
212 212 // 业务线映射表(键:英文标识,值:中文名称;新增反向映射:中文->英文)
213 213 const busiLineMap = ref({
214 214 'yl': '园林',
215   - 'sz': '市政',
216   - 'wy': '物业',
217   - // 反向映射:用于通过中文名称(workOrderForm.busiLineCn)获取对应的英文标识
218   - '园林': 'yl',
219   - '市政': 'sz',
220   - '物业': 'wy'
  215 + 'sz': '市政',
  216 + 'wy': '物业',
  217 + 'zx': '秩序管理',
  218 + 'hj': '环境卫生',
  219 + '园林': 'yl',
  220 + '市政': 'sz',
  221 + '物业': 'wy',
  222 + '秩序管理': 'zx',
  223 + '环境卫生': 'hj',
221 224 });
222 225  
223 226 // 业务线选项列表(仅保留name字段=中文名称,适配单选框配置)
... ... @@ -308,7 +311,7 @@ const workOrderFormRules = reactive({
308 311 { type: 'string', required: true, message: '请选择道路名称', trigger: ['change', 'blur'] }
309 312 ],
310 313 orderName: [
311   - { type: 'string', required: true, message: '请选择工单名称', trigger: ['change', 'blur'] }
  314 + { type: 'string', required: true, message: '请选择问题类型', trigger: ['change', 'blur'] }
312 315 ],
313 316 pressingTypeName: [
314 317 { type: 'string', required: true, message: '请选择紧急程度', trigger: ['change'] }
... ... @@ -376,9 +379,9 @@ onShow(() =&gt; {
376 379 console.log(uni.$dict.getDictLabel('ai_image_status', 20))
377 380 console.log(uni.$dict.getDictSimpleList('work_name'))
378 381  
379   - // 初始化工单名称列表
  382 + // 初始化问题类型列表
380 383 orderNameList.value = uni.$dict.transformLabelValueToNameValue(uni.$dict.getDictSimpleList('work_name'))
381   - console.log('工单名称列表:', orderNameList.value)
  384 + console.log('问题类型列表:', orderNameList.value)
382 385  
383 386 // 初始化紧急程度列表
384 387 pressingTypeList.value = uni.$dict.transformLabelValueToNameValue(uni.$dict.getDictSimpleList('workorder_pressing_type'))
... ... @@ -496,7 +499,7 @@ const handleActionSheetOpen = (type) =&gt; {
496 499 list: roadNameList.value
497 500 },
498 501 orderName: {
499   - title: '请选择工单名称',
  502 + title: '请选择问题类型',
500 503 list: orderNameList.value
501 504 },
502 505 pressingType: {
... ...
pages-sub/problem/work-order-manage/index.vue
... ... @@ -319,7 +319,7 @@ const isInspector = computed(() =&gt; {
319 319 // patrol_global 全域巡查员
320 320 // regional_manager 大区经理
321 321  
322   - return userStore.userInfo?.roles?.includes('yl_inspector') || false;
  322 + return ['yl_inspector', 'zxgl_inspector', 'hjws_inspector'].some(role => userStore.userInfo?.roles?.includes(role)) || false;
323 323 });
324 324 // 回退弹窗相关
325 325 const rejectModalShow = ref(false); // 回退modal显示开关
... ... @@ -358,7 +358,7 @@ const queryList = async (pageNo, pageSize) =&gt; {
358 358 searchContent: searchValue.value.trim() || '',
359 359 pageNo,
360 360 pageSize,
361   - type: selectedSortValue.value // 1-位置 2-工单名称 3-情况描述 4-工单编号
  361 + type: selectedSortValue.value // 1-位置 2-问题类型 3-情况描述 4-工单编号
362 362 };
363 363 let res;
364 364 // 0-待办 1-已办 2-我发起的任务
... ...
pages-sub/problem/work-order-manage/order-detail.vue
... ... @@ -42,10 +42,10 @@
42 42 </template>
43 43 </up-cell>
44 44  
45   - <!-- 工单名称 -->
  45 + <!-- 问题类型-->
46 46 <up-cell align="middle">
47 47 <template #title>
48   - <view style="min-width: 200rpx">工单名称</view>
  48 + <view style="min-width: 200rpx">问题类型</view>
49 49 </template>
50 50 <template #value>
51 51 <view class="common-text-color up-line-1">{{ orderDetail.orderName || '--' }}</view>
... ...
pages/workbench/index.vue
... ... @@ -9,11 +9,13 @@
9 9 ></up-loading-page>
10 10  
11 11 <!-- 蓝色装饰块 -->
12   - <view class="blue-decor-block" v-show="!loading">
  12 + <view class="blue-decor-block" v-if="!loading">
13 13 <text class="welcome-text u-line-1">你好{{ userInfo?.user?.nickname || '' }}</text>
14 14 <text class="platform-name">蓟城山水全域智能运营管理平台</text>
15 15 </view>
16 16  
  17 +
  18 +
17 19 <!-- 内容容器 -->
18 20 <view class="content-wrap">
19 21 <!-- 空状态:过滤后无数据且非加载中时显示 -->
... ... @@ -22,6 +24,22 @@
22 24 mode="permission"
23 25 ></u-empty>
24 26  
  27 +
  28 + <view class="" v-if="!userInfo?.user?.nickname">
  29 + <text class="welcome-text u-line-1 " style="padding: 20px 0;text-align: center;">本小程序仅限特定服务人群使用,需验证账号后方可登录</text>
  30 +
  31 + <up-button
  32 + class="login-btn"
  33 + type="primary"
  34 + size="large"
  35 +
  36 + @click="ToLoginPage"
  37 + shape="circle"
  38 + >
  39 + 前往登录
  40 + </up-button>
  41 + </view>
  42 +
25 43 <!-- 菜单卡片列表:仅渲染有子节点的父模块 -->
26 44 <view class="menu-card-wrap">
27 45 <up-card
... ... @@ -118,16 +136,16 @@ onShow(async () =&gt; {
118 136  
119 137 // 未登录处理:跳转登录页,阻止后续逻辑执行
120 138 if (!isLogin()) {
121   - uni.showToast({title: '请先登录', icon: 'none', duration: 1500});
122   - setTimeout(() => {
123   - uni.reLaunch({
124   - url: '/pages/login/index',
125   - fail: (err) => {
126   - console.error('跳转登录页失败:', err);
127   - uni.showToast({title: '跳转登录页异常', icon: 'none'});
128   - }
129   - });
130   - }, 1500);
  139 + // uni.showToast({title: '请先登录', icon: 'none', duration: 1500});
  140 + // setTimeout(() => {
  141 + // uni.reLaunch({
  142 + // url: '/pages/login/index',
  143 + // fail: (err) => {
  144 + // console.error('跳转登录页失败:', err);
  145 + // uni.showToast({title: '跳转登录页异常', icon: 'none'});
  146 + // }
  147 + // });
  148 + // }, 1500);
131 149 loading.value = false;
132 150 return;
133 151 }
... ... @@ -144,6 +162,16 @@ onShow(async () =&gt; {
144 162 }
145 163 });
146 164  
  165 +const ToLoginPage = ()=> {
  166 + uni.reLaunch({
  167 + url: '/pages/login/index',
  168 + fail: (err) => {
  169 + console.error('跳转登录页失败:', err);
  170 + uni.showToast({title: '跳转登录页异常', icon: 'none'});
  171 + }
  172 + });
  173 +}
  174 +
147 175 const handleMenuClick = (item: MenuItem) => {
148 176 if (!item.jumpUrl) {
149 177 uni.showToast({title: '暂无跳转链接', icon: 'none', duration: 2000});
... ...