From c6ecf0c7617745fd27dbfbc41ba1e113aad29bc7 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 8 Apr 2025 17:24:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=85=A7=E7=89=87=E7=BB=9F=E8=AE=A1=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 1 + .env.production | 1 + .../components/photo-class.vue | 41 +- .../components/photo-recent.vue | 181 +++-- .../components/photo-total.vue | 3 +- src/pages/comprehensiveQuery/index.vue | 548 +++++++++++++-- .../components/addAndEditForm.vue | 661 +++++++++++++----- src/pages/coordinatePhotos/index.vue | 6 +- .../coordinatePhotos/upload-record/index.vue | 146 ++-- .../components/addAndEditForm.vue | 634 ++++++++++------- src/pages/importantMatters/index.vue | 6 +- .../importantMatters/upload-record/index.vue | 120 +++- .../components/addAndEditForm.vue | 64 +- .../components/addAndEditForm.vue | 21 +- .../safetyMeasure/upload-record/index.vue | 2 +- .../components/addAndEditForm.vue | 69 +- src/services/common.js | 1 + src/services/comprehensiveQuery.js | 38 + src/services/coordinatePhotos.js | 46 ++ src/services/importantMatters.js | 46 ++ src/services/login.js | 1 + src/utils/http.js | 29 +- src/utils/index.js | 15 + vite.config.js | 3 +- 24 files changed, 1926 insertions(+), 757 deletions(-) create mode 100644 .env.development create mode 100644 .env.production create mode 100644 src/services/comprehensiveQuery.js create mode 100644 src/services/coordinatePhotos.js create mode 100644 src/services/importantMatters.js create mode 100644 src/utils/index.js diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..468692c --- /dev/null +++ b/.env.development @@ -0,0 +1 @@ +VITE_API_BASE_URL = /api diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..7317c8d --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +VITE_API_BASE_URL = http://localhost:3000/api \ No newline at end of file diff --git a/src/pages/comprehensiveQuery/components/photo-class.vue b/src/pages/comprehensiveQuery/components/photo-class.vue index 9d42b9e..de8be90 100644 --- a/src/pages/comprehensiveQuery/components/photo-class.vue +++ b/src/pages/comprehensiveQuery/components/photo-class.vue @@ -4,10 +4,16 @@ 照片分类 - + {{ icon.title }} - 5100张 + + {{ formatCustomNumber(props.imgCount[icon.imgNum]) }}张 + @@ -21,11 +27,27 @@ import icon_2 from '@/static/image/home_2.png' import icon_3 from '@/static/image/home_3.png' import icon_4 from '@/static/image/home_4.png' import icon_5 from '@/static/image/home_5.png' +import { formatCustomNumber } from '@/utils/index.js' + +const emits = defineEmits(['handleGetImgListByImgType']) const props = defineProps({ totalCount: { type: Number, default: () => 0, }, + imgCount: { + type: Object, + default: () => { + return { + totalNum: 0, //总照片数 + safetyVioNum: 0, // 安全违章 + safetyMeasNum: 0, // 安全措施落实 + qualityInsNum: 0, // 质量检查 + coordinatedPhotoNum: 0, // 协调照片 + importIssuesAndPublicityNum: 0, // 重要事项及宣传类 + } + }, + }, }) const iconList = ref([ @@ -33,28 +55,43 @@ const iconList = ref([ jumpPath: '/pages/safetyViolations/index', title: '安全违章', iconUrl: icon_1, + imgNum: 'safetyVioNum', + imgType: 1, }, { jumpPath: '/pages/qualityInspection/index', title: '质量检查', iconUrl: icon_2, + imgNum: 'qualityInsNum', + imgType: 2, }, { jumpPath: '/pages/safetyMeasure/index', title: '安全措施', iconUrl: icon_3, + imgNum: 'safetyMeasNum', + imgType: 3, }, { jumpPath: '/pages/coordinatePhotos/index', title: '协调照片', iconUrl: icon_4, + imgNum: 'coordinatedPhotoNum', + imgType: 4, }, { jumpPath: '/pages/importantMatters/index', title: '重要事项', iconUrl: icon_5, + imgNum: 'importIssuesAndPublicityNum', + imgType: 5, }, ]) + +// 根据图标类型查询 +const onSearchByClass = (type) => { + emits('handleGetImgListByImgType', type) +} diff --git a/src/pages/importantMatters/index.vue b/src/pages/importantMatters/index.vue index 7ec71f9..54f5ed5 100644 --- a/src/pages/importantMatters/index.vue +++ b/src/pages/importantMatters/index.vue @@ -8,7 +8,7 @@ /> - + @@ -21,12 +21,16 @@ import { onLoad } from '@dcloudio/uni-app' const { safeAreaInsets } = uni.getSystemInfoSync() const addAndEditFormType = ref(1) +const detailsId = ref('') const uploadRecordUrl = ref('/pages/importantMatters/upload-record/index') onLoad((query) => { if (query.type) { addAndEditFormType.value = query.type } + if (query.id) { + detailsId.value = query.id + } }) diff --git a/src/pages/importantMatters/upload-record/index.vue b/src/pages/importantMatters/upload-record/index.vue index 8dbff8f..ac7d59b 100644 --- a/src/pages/importantMatters/upload-record/index.vue +++ b/src/pages/importantMatters/upload-record/index.vue @@ -8,7 +8,7 @@