From ce00eb8149c3a7c38c1af2bbaaedd40b6e191e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E6=99=8F=E5=BD=AD?= <995457985@qq.com> Date: Tue, 23 May 2023 10:47:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=88=91=E5=B7=B2=E7=9F=A5=E6=99=93=EF=BC=8C?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/interface/index.ts | 1 + src/api/modules/goverment.ts | 2 +- src/components/AMap/AMap.vue | 2 +- src/stores/index.ts | 11 ++++++++--- src/stores/interface/index.ts | 1 + src/views/enterprise/notice/myReceive/index.vue | 12 ++++++++++-- .../approve/company/components/unit-table.scss | 5 +++-- src/views/goverment/approve/engineering/index.vue | 3 ++- src/views/goverment/notice/myPosted/index.vue | 12 +++++++++++- src/views/goverment/notice/myReceive/index.vue | 12 +++++++++++- src/views/home/index.scss | 2 ++ src/views/login/components/LoginForm.vue | 5 +++-- src/views/project/notice/myReceive/index.vue | 10 ++++++++++ .../project/supervision/ProjectSupervision/duty.scss | 2 +- .../supervision/ProjectSupervision/index.scss | 1 + .../supervision/ProjectSupervision/overview.scss | 1 + .../supervision/ProjectSupervision/overview.vue | 3 ++- 17 files changed, 69 insertions(+), 16 deletions(-) diff --git a/src/api/interface/index.ts b/src/api/interface/index.ts index 25b7265..0e2c16b 100644 --- a/src/api/interface/index.ts +++ b/src/api/interface/index.ts @@ -37,6 +37,7 @@ export declare namespace Login { showPassword: string; } interface ResLogin { + isManager: string | null; token: string; accountType: number; account: string; diff --git a/src/api/modules/goverment.ts b/src/api/modules/goverment.ts index 3a1288a..e896fb2 100644 --- a/src/api/modules/goverment.ts +++ b/src/api/modules/goverment.ts @@ -70,7 +70,7 @@ export const rejectEngineeringApprove = (params: { id: string; suggest: number; }; // 修改工程定位信息 -export const editEngineeringApprovePosition = (params: { id: string; latitude: string; longitude: string }) => { +export const editEngineeringApprovePosition = (params: { id: string; latitude: string; longitude: string; address?: string }) => { return http.post(BASEURL + `/gov/engineering/editPosition`, params); }; // 修改工程定位信息 diff --git a/src/components/AMap/AMap.vue b/src/components/AMap/AMap.vue index 9d1b84d..5c0c32e 100644 --- a/src/components/AMap/AMap.vue +++ b/src/components/AMap/AMap.vue @@ -50,7 +50,7 @@ const setCenter = val => { coordinateInfo.lng = val?.lng || null; if (coordinateInfo.lat) { - console.log("eeeeeee", coordinateInfo); + // console.log("eeeeeee", coordinateInfo); map.value?.setCenter([+coordinateInfo.lng, +coordinateInfo.lat]); map.value?.add(new AMap.Marker({ position: new AMap.LngLat(+val.lng, +val.lat) })); } diff --git a/src/stores/index.ts b/src/stores/index.ts index e221651..1980bb0 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -21,9 +21,9 @@ export const GlobalStore = defineStore({ // 都是控制退出或者修改密码的时候遮挡视频的问题 editPassword: false, openDropdown: false, - // 点击跳转的时候村的数据 - Message: null, - projectDateAuth: null, + Message: null, // 点击跳转的时候存的数据 + projectDateAuth: null, //是否拥有所属工程的必填 + isManager: "", // element组件大小 assemblySize: "default", // language @@ -76,6 +76,10 @@ export const GlobalStore = defineStore({ setProjectDateAuth(projectDateAuth: number | null) { this.projectDateAuth = projectDateAuth; }, + // 判断所属工程有没有校验 + setIsManager(isManager: string | null) { + this.isManager = isManager; + }, // 都是解决视频组件遮挡修改密码或者退出的时候 seteditPassword(editPassword: boolean | null) { this.editPassword = editPassword; @@ -117,6 +121,7 @@ export const GlobalStore = defineStore({ this.openDropdown = null; this.path = null; this.Message = null; + this.isManager = null; } }, persist: piniaPersistConfig("GlobalState") diff --git a/src/stores/interface/index.ts b/src/stores/interface/index.ts index 1cee0f6..6b9152d 100644 --- a/src/stores/interface/index.ts +++ b/src/stores/interface/index.ts @@ -14,6 +14,7 @@ export interface GlobalState { editPassword: boolean | null; openDropdown: boolean | null; path: string | null; + isManager: string | null; } /* themeConfigProp */ diff --git a/src/views/enterprise/notice/myReceive/index.vue b/src/views/enterprise/notice/myReceive/index.vue index c512bd8..84f8779 100644 --- a/src/views/enterprise/notice/myReceive/index.vue +++ b/src/views/enterprise/notice/myReceive/index.vue @@ -61,6 +61,7 @@ @@ -93,9 +94,8 @@ import { ref, reactive, onMounted } from "vue"; import { ElMessage, ElMessageBox } from "element-plus"; import { ColumnProps } from "@/components/ProTable/interface"; import ProTable from "@/components/ProTable/index.vue"; -import { myNoticeReceivePage, noticeDetailMyPost } from "@/api/modules/common"; +import { myNoticeReceivePage, noticeDetailMyPost, noticeReadMyPost } from "@/api/modules/common"; import { GlobalStore } from "@/stores"; -import router from "@/routers"; import type { Options } from "@/views/goverment/approve/company/components/unit-table.vue"; import type { UploadFile } from "@/components/FilesUpload/FilesUpload.vue"; @@ -116,6 +116,7 @@ const rowList = ref({ content: "", accetpList: {} }); +const rowNoticeId = ref(""); const annexFiles = ref([]); const current = ref({} as AnnexFilesOptions); @@ -157,6 +158,13 @@ const onLook = async row => { annexFiles.value = result.annexFileList; rowList.value.accetpList = result.acceptList; visible.value = true; + rowNoticeId.value = row.noticeId; +}; +const onKnow = async () => { + await noticeReadMyPost({ noticeId: rowNoticeId.value }); + visible.value = false; + ElMessage.success("已知晓"); + proTable.value.getTableList(); }; const addAnnexFile = (row: AnnexFilesOptions) => { diff --git a/src/views/goverment/approve/company/components/unit-table.scss b/src/views/goverment/approve/company/components/unit-table.scss index b0bb9c5..063fb85 100644 --- a/src/views/goverment/approve/company/components/unit-table.scss +++ b/src/views/goverment/approve/company/components/unit-table.scss @@ -19,7 +19,7 @@ $primary: #409eff; } } .table { - min-height: 160px; + // min-height: 160px; margin-top: 15px; .input { display: flex; @@ -67,7 +67,8 @@ $primary: #409eff; top: calc(100% + 6px); left: 12px; width: 1px; - height: 270px; + height: 152px; + // 备注152不够 background-color: #999999; } } diff --git a/src/views/goverment/approve/engineering/index.vue b/src/views/goverment/approve/engineering/index.vue index 004ccd8..030ab99 100644 --- a/src/views/goverment/approve/engineering/index.vue +++ b/src/views/goverment/approve/engineering/index.vue @@ -853,9 +853,10 @@ const openMap = row => { }; const getAddress = async (e: any) => { - await editEngineeringApprovePosition({ id: id.value, latitude: e.lat, longitude: e.lng }); + await editEngineeringApprovePosition({ id: id.value, latitude: e.lat, longitude: e.lng, address: e.address }); isOpen.value = false; ElMessage.success("修改成功"); + proTable.value.getTableList(); }; const current = ref([]); diff --git a/src/views/goverment/notice/myPosted/index.vue b/src/views/goverment/notice/myPosted/index.vue index 9248382..c55db99 100644 --- a/src/views/goverment/notice/myPosted/index.vue +++ b/src/views/goverment/notice/myPosted/index.vue @@ -66,7 +66,8 @@ @@ -128,6 +129,7 @@ const rowList = ref({ content: "", accetpList: {} }); +const rowNoticeId = ref(""); const annexFiles = ref([]); const current = ref({} as AnnexFilesOptions); @@ -168,6 +170,14 @@ const onLook = async row => { annexFiles.value = result.annexFileList; rowList.value.accetpList = result.acceptList; visible.value = true; + rowNoticeId.value = row.noticeId; +}; + +const onKnow = async () => { + await noticeReadMyPost({ noticeId: rowNoticeId.value }); + visible.value = false; + ElMessage.success("已知晓"); + proTable.value.getTableList(); }; // 修改数据按钮 diff --git a/src/views/goverment/notice/myReceive/index.vue b/src/views/goverment/notice/myReceive/index.vue index 02248c0..5dcded7 100644 --- a/src/views/goverment/notice/myReceive/index.vue +++ b/src/views/goverment/notice/myReceive/index.vue @@ -61,6 +61,7 @@ @@ -93,7 +94,7 @@ import { ref, reactive, onMounted } from "vue"; import { ElMessage, ElMessageBox } from "element-plus"; import { ColumnProps } from "@/components/ProTable/interface"; import ProTable from "@/components/ProTable/index.vue"; -import { myNoticeReceivePage, noticeDetailMyPost } from "@/api/modules/common"; +import { myNoticeReceivePage, noticeDetailMyPost, noticeReadMyPost } from "@/api/modules/common"; import { GlobalStore } from "@/stores"; import router from "@/routers"; import type { Options } from "@/views/goverment/approve/company/components/unit-table.vue"; @@ -116,6 +117,7 @@ const rowList = ref({ content: "", accetpList: {} }); +const rowNoticeId = ref(""); const annexFiles = ref([]); const current = ref({} as AnnexFilesOptions); @@ -157,6 +159,14 @@ const onLook = async row => { annexFiles.value = result.annexFileList; rowList.value.accetpList = result.acceptList; visible.value = true; + rowNoticeId.value = row.noticeId; +}; + +const onKnow = async () => { + await noticeReadMyPost({ noticeId: rowNoticeId.value }); + visible.value = false; + ElMessage.success("已知晓"); + proTable.value.getTableList(); }; const addAnnexFile = (row: AnnexFilesOptions) => { diff --git a/src/views/home/index.scss b/src/views/home/index.scss index 9ff2c44..ab28281 100644 --- a/src/views/home/index.scss +++ b/src/views/home/index.scss @@ -135,6 +135,8 @@ margin: 20px 0; .labelName { color: #999; + font-size: 20px; + font-weight: 400; .el-icon { margin-right: 10px; } diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue index d8c9d5c..da4bb51 100644 --- a/src/views/login/components/LoginForm.vue +++ b/src/views/login/components/LoginForm.vue @@ -80,6 +80,7 @@ const login = (formEl: FormInstance | undefined) => { globalStore.setAccount(result.account); globalStore.setAccountType(result.accountType); globalStore.setProjectDateAuth(result.projectDateAuth); + globalStore.setIsManager(result.isManager); // 2.添加动态路由 // await initDynamicRouter(); @@ -94,8 +95,8 @@ const login = (formEl: FormInstance | undefined) => { } else { router.push(arr.value[result.accountType - 1]); } - // router.go(0); - router.push(arr.value[result.accountType - 1]); + router.go(0); + // router.push(arr.value[result.accountType - 1]); // 4.跳转到首页 // ElNotification({ diff --git a/src/views/project/notice/myReceive/index.vue b/src/views/project/notice/myReceive/index.vue index 337f882..43d51e7 100644 --- a/src/views/project/notice/myReceive/index.vue +++ b/src/views/project/notice/myReceive/index.vue @@ -61,6 +61,7 @@ @@ -115,6 +116,7 @@ const rowList = ref({ content: "", accetpList: {} }); +const rowNoticeId = ref(""); const annexFiles = ref([]); const current = ref({} as AnnexFilesOptions); @@ -156,6 +158,14 @@ const onLook = async row => { annexFiles.value = result.annexFileList; rowList.value.accetpList = result.acceptList; visible.value = true; + rowNoticeId.value = row.noticeId; +}; + +const onKnow = async () => { + await noticeReadMyPost({ noticeId: rowNoticeId.value }); + visible.value = false; + ElMessage.success("已知晓"); + proTable.value.getTableList(); }; const addAnnexFile = (row: AnnexFilesOptions) => { diff --git a/src/views/project/supervision/ProjectSupervision/duty.scss b/src/views/project/supervision/ProjectSupervision/duty.scss index 3a381aa..9c2a02d 100644 --- a/src/views/project/supervision/ProjectSupervision/duty.scss +++ b/src/views/project/supervision/ProjectSupervision/duty.scss @@ -3,7 +3,7 @@ flex: 1; flex-direction: column; .steps { - padding: 0 6%; + padding: 2% 6%; } v-deep { .is-process { diff --git a/src/views/project/supervision/ProjectSupervision/index.scss b/src/views/project/supervision/ProjectSupervision/index.scss index 336e62b..befd49f 100644 --- a/src/views/project/supervision/ProjectSupervision/index.scss +++ b/src/views/project/supervision/ProjectSupervision/index.scss @@ -15,5 +15,6 @@ .steps { width: 60%; margin: 0 auto; + margin-top: 42px; } } diff --git a/src/views/project/supervision/ProjectSupervision/overview.scss b/src/views/project/supervision/ProjectSupervision/overview.scss index 18cade5..a8e34e0 100644 --- a/src/views/project/supervision/ProjectSupervision/overview.scss +++ b/src/views/project/supervision/ProjectSupervision/overview.scss @@ -7,6 +7,7 @@ // background-color: #fff; flex: 1; .form { + background-color: #fff; padding: 40px 12% 0 8%; .row { display: flex; diff --git a/src/views/project/supervision/ProjectSupervision/overview.vue b/src/views/project/supervision/ProjectSupervision/overview.vue index 6fc2bb0..3acd785 100644 --- a/src/views/project/supervision/ProjectSupervision/overview.vue +++ b/src/views/project/supervision/ProjectSupervision/overview.vue @@ -1,6 +1,7 @@