From 37c26bd3e0113311b7648a2b92802693935200c8 Mon Sep 17 00:00:00 2001 From: liugongyu <290219706@qq.com> Date: Wed, 10 Dec 2025 14:52:13 +0800 Subject: [PATCH] 巡查计划 --- api/patrol-manage/patrol-plan.js | 35 +++++++++++++++++++++++++++++++++++ components/empty-view/empty-view.vue | 21 +++++++++++++++++++++ main.js | 4 ++-- pages-sub/daily/patrol-manage/add-patrol-record/index.vue | 277 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pages-sub/daily/patrol-manage/patrol-plan/index.vue | 228 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------- pages.json | 9 +++++---- pages/login/index.vue | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------ pages/workbench/index.vue | 272 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------- 8 files changed, 590 insertions(+), 454 deletions(-) create mode 100644 api/patrol-manage/patrol-plan.js create mode 100644 components/empty-view/empty-view.vue diff --git a/api/patrol-manage/patrol-plan.js b/api/patrol-manage/patrol-plan.js new file mode 100644 index 0000000..4b5475f --- /dev/null +++ b/api/patrol-manage/patrol-plan.js @@ -0,0 +1,35 @@ +// api/user.js +import { post, get } from '@/common/utils/request'; + +/** + * 登录接口 + * @param {Object} params {mobile, password, code} + * @returns {Promise} + */ +export const login = (params) => { + return post('/admin-api/system/auth/login', params); +}; + +/** + * 巡检计划汇总 + * @returns {Promise} + */ +export const inspectionPlanPage = (params) => { + return get('/app-api/app/garden/inspection-plan/page',params); +}; + +/** + * 退出登录 + * @returns {Promise} + */ +export const logout = () => { + return post('/admin-api/system/auth/logout'); +}; + +/** + * 模块列表用这个 + * @returns {Promise} + */ +export const moduleList = () => { + return get('/app-api/member/app-module/list'); +}; diff --git a/components/empty-view/empty-view.vue b/components/empty-view/empty-view.vue new file mode 100644 index 0000000..653c368 --- /dev/null +++ b/components/empty-view/empty-view.vue @@ -0,0 +1,21 @@ + + + + + \ No newline at end of file diff --git a/main.js b/main.js index 37b9f44..cd04af4 100644 --- a/main.js +++ b/main.js @@ -3,7 +3,7 @@ import App from './App' import uviewPlus from '@/uni_modules/uview-plus' // 导入 Pinia 实例(你的 stores/index.js 导出的 pinia) import pinia from '@/pinia/index' - +import EmptyView from '@/components/empty-view/empty-view.vue'; // #ifdef VUE3 import { createSSRApp } from 'vue' @@ -16,7 +16,7 @@ export function createApp() { // 4. 注册 Pinia(核心:在 app 挂载前注册) app.use(pinia) - + app.component('EmptyView', EmptyView) // 5. 返回 app + pinia(可选,便于调试) return { app, diff --git a/pages-sub/daily/patrol-manage/add-patrol-record/index.vue b/pages-sub/daily/patrol-manage/add-patrol-record/index.vue index 569c3d2..c09864b 100644 --- a/pages-sub/daily/patrol-manage/add-patrol-record/index.vue +++ b/pages-sub/daily/patrol-manage/add-patrol-record/index.vue @@ -1,40 +1,38 @@ \ No newline at end of file diff --git a/pages-sub/daily/patrol-manage/patrol-plan/index.vue b/pages-sub/daily/patrol-manage/patrol-plan/index.vue index d52f070..b7913a0 100644 --- a/pages-sub/daily/patrol-manage/patrol-plan/index.vue +++ b/pages-sub/daily/patrol-manage/patrol-plan/index.vue @@ -2,200 +2,189 @@ - - - + style="margin: 20rpx 20rpx 0" + > - + + - + + - 道路名称: {{ item.roadName }} - 所属街道: - {{ item.street }} + {{ item.streetName }} - 养护级别: - {{ item.maintainLevel }} + {{ levelMap[item.levelId] || '未知级别' }} 计划明细 - 计划类型: - {{ item.planType }} + {{ planTypeMap[item.planTypeId] || '未知类型' }} - 计划时间: - {{ item.planTime }} + {{ formatPlanTime(item.beginTime, item.endTime) }} - - \ No newline at end of file diff --git a/pages.json b/pages.json index dd3f56e..9202040 100644 --- a/pages.json +++ b/pages.json @@ -15,7 +15,8 @@ { "path": "pages/workbench/index", "style": { - "navigationBarTitleText": "工作台" + "navigationBarTitleText": "工作台", + "navigationStyle": "custom" } }, { @@ -32,8 +33,7 @@ { "path": "patrol-manage/patrol-plan/index", "style": { - "navigationBarTitleText": "巡查计划", - "enablePullDownRefresh": false + "navigationBarTitleText": "巡查计划" } }, { @@ -150,7 +150,8 @@ "custom": { "^u--(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue", "^up-(.*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue", - "^u-([^-].*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue" + "^u-([^-].*)": "@/uni_modules/uview-plus/components/u-$1/u-$1.vue", + "^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue" } }, "globalStyle": { diff --git a/pages/login/index.vue b/pages/login/index.vue index 2f6753e..4921466 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -1,7 +1,13 @@