feat: 通知公告增加我已知晓,样式修改

This commit is contained in:
于晏彭 2023-05-23 10:47:27 +08:00
parent dbae5764b5
commit ce00eb8149
17 changed files with 69 additions and 16 deletions

View File

@ -37,6 +37,7 @@ export declare namespace Login {
showPassword: string;
}
interface ResLogin {
isManager: string | null;
token: string;
accountType: number;
account: string;

View File

@ -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);
};
// 修改工程定位信息

View File

@ -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) }));
}

View File

@ -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")

View File

@ -14,6 +14,7 @@ export interface GlobalState {
editPassword: boolean | null;
openDropdown: boolean | null;
path: string | null;
isManager: string | null;
}
/* themeConfigProp */

View File

@ -61,6 +61,7 @@
<el-table-column prop="readTime" label="查看时间" />
</el-table>
<template #footer>
<el-button type="primary" v-if="!store.isManager" @click="onKnow">我已知晓</el-button>
<el-button type="primary" @click="visible = false">关闭</el-button>
</template>
</el-dialog>
@ -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<AnnexFilesOptions[]>([]);
const current = ref<AnnexFilesOptions>({} 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) => {

View File

@ -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;
}
}

View File

@ -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([]);

View File

@ -66,7 +66,8 @@
<el-table-column prop="readTime" label="查看时间" />
</el-table>
<template #footer>
<el-button type="primary" @click="visible = false">关闭</el-button>
<el-button type="primary" v-if="!store.isManager" @click="onKnow">我已知晓</el-button>
<el-button type="primary" v-else @click="visible = false">关闭</el-button>
</template>
</el-dialog>
<el-dialog v-model="fileVisible" title="查看附件" width="30%" show-close>
@ -128,6 +129,7 @@ const rowList = ref({
content: "",
accetpList: {}
});
const rowNoticeId = ref("");
const annexFiles = ref<AnnexFilesOptions[]>([]);
const current = ref<AnnexFilesOptions>({} 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();
};
//

View File

@ -61,6 +61,7 @@
<el-table-column prop="readTime" label="查看时间" />
</el-table>
<template #footer>
<el-button type="primary" v-if="!store.isManager" @click="onKnow">我已知晓</el-button>
<el-button type="primary" @click="visible = false">关闭</el-button>
</template>
</el-dialog>
@ -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<AnnexFilesOptions[]>([]);
const current = ref<AnnexFilesOptions>({} 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) => {

View File

@ -135,6 +135,8 @@
margin: 20px 0;
.labelName {
color: #999;
font-size: 20px;
font-weight: 400;
.el-icon {
margin-right: 10px;
}

View File

@ -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({

View File

@ -61,6 +61,7 @@
<el-table-column prop="readTime" label="查看时间" />
</el-table>
<template #footer>
<el-button type="primary" v-if="!store.isManager" @click="onKnow">我已知晓</el-button>
<el-button type="primary" @click="visible = false">关闭</el-button>
</template>
</el-dialog>
@ -115,6 +116,7 @@ const rowList = ref({
content: "",
accetpList: {}
});
const rowNoticeId = ref("");
const annexFiles = ref<AnnexFilesOptions[]>([]);
const current = ref<AnnexFilesOptions>({} 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) => {

View File

@ -3,7 +3,7 @@
flex: 1;
flex-direction: column;
.steps {
padding: 0 6%;
padding: 2% 6%;
}
v-deep {
.is-process {

View File

@ -15,5 +15,6 @@
.steps {
width: 60%;
margin: 0 auto;
margin-top: 42px;
}
}

View File

@ -7,6 +7,7 @@
// background-color: #fff;
flex: 1;
.form {
background-color: #fff;
padding: 40px 12% 0 8%;
.row {
display: flex;

View File

@ -1,6 +1,7 @@
<template>
<div class="overview">
<el-form ref="ruleFormRef" :model="form" label-width="150px" :rules="rules" class="form" size="default">
<!-- <el-form ref="ruleFormRef" :model="form" label-width="150px" :rules="rules" class="form" size="default"> -->
<el-form ref="ruleFormRef" :model="form" label-width="150px" class="form" size="default">
<el-form-item label="项目名称:" prop="projectName">
<el-input placeholder="请输入" v-model="form.projectName" disabled />
</el-form-item>