From a8cc3cbd2311a3c35c55fba34f9c322b354d5bb2 Mon Sep 17 00:00:00 2001 From: kun <1422840143@qq.com> Date: Wed, 7 Jun 2023 16:32:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/goverment.ts | 4 +- .../components/transformInfo.vue | 39 ++++++------ .../components/transformInfo.vue | 39 ++++++------ .../userManagement/departmentManage/index.vue | 2 +- src/views/goverment/notice/myPosted/index.vue | 1 + .../notice/newNotification/index.vue | 61 +++++++++++++++++-- .../qualitySupervision/checkStore/index.vue | 26 ++++---- .../components/transformInfo.vue | 37 +++++------ .../safetySupervision/checkStore/index.vue | 35 +++++------ .../components/transformInfo.vue | 37 +++++------ .../components/transformInfo.vue | 37 ++++++----- .../components/transformInfo.vue | 39 ++++++------ .../userManagement/departmentManage/index.vue | 2 +- 13 files changed, 217 insertions(+), 142 deletions(-) diff --git a/src/api/modules/goverment.ts b/src/api/modules/goverment.ts index 76d6551..be8a2fe 100644 --- a/src/api/modules/goverment.ts +++ b/src/api/modules/goverment.ts @@ -315,9 +315,9 @@ export const allOptionAudit = (params: any) => { export const timeLineData = (params: { inspectQuestionId: string }) => { return http.post(BASEURL + `/gov/inspectQuestionExamine/list`, params); }; -// 质量检查库大项分页列表 +// 质量检查库大项列表 export const bigStore = (params: FormData) => { - return http.post(BASEURL + `/gov/inspectLibrary/page`, params); + return http.post(BASEURL + `/gov/inspectLibrary/list`, params); }; // 质量检查库大项新增 export const bigStoreAdd = (params: FormData) => { diff --git a/src/views/enterprise/qualitySupervision/components/transformInfo.vue b/src/views/enterprise/qualitySupervision/components/transformInfo.vue index 49848b0..eb76eb8 100644 --- a/src/views/enterprise/qualitySupervision/components/transformInfo.vue +++ b/src/views/enterprise/qualitySupervision/components/transformInfo.vue @@ -16,7 +16,8 @@ 检查情况:{{ + >检查情况: + {{ basicData?.state == 1 ? "执法中" : basicData?.state == 2 @@ -28,8 +29,8 @@ : basicData?.state == 5 ? "已驳回" : "" - }} + }} + 工程名称:{{ basicData?.engineeringName }} @@ -126,7 +126,7 @@ -
隐患记录
+
隐患问题
创建人: {{ recordRowData.createByName }} @@ -151,7 +151,11 @@
整改情况 - 新增整改记录
@@ -339,7 +343,7 @@ const getInfo = async () => { recordData.value = res.result.inspectQuestionList; recordData.value.map(item => { item.image = eval(item.image); - if (item.state != 3) { + if (item.state == 1 || item.state == 4) { isFinished.value = false; } }); @@ -366,12 +370,9 @@ watch( () => props.detailsDialog, (n, o) => { visible1.value = n; - } -); -watch( - () => props.relativeId, - (n, o) => { - getInfo(); + if (n) { + getInfo(); + } } ); // 监听el-dialog显示状态,再通过@update:visible 通知父组件,一般是用于关 @@ -435,6 +436,10 @@ onMounted(() => {}); font-family: Source Han Sans CN-Medium, Source Han Sans CN; font-weight: 500; color: #333333; + > span { + font-weight: 400; + color: #008bff; + } } } } diff --git a/src/views/enterprise/safetySupervision/components/transformInfo.vue b/src/views/enterprise/safetySupervision/components/transformInfo.vue index 4f8c5a7..b76ddce 100644 --- a/src/views/enterprise/safetySupervision/components/transformInfo.vue +++ b/src/views/enterprise/safetySupervision/components/transformInfo.vue @@ -16,7 +16,8 @@ 检查情况:{{ + >检查情况: + {{ basicData?.state == 1 ? "执法中" : basicData?.state == 2 @@ -28,8 +29,8 @@ : basicData?.state == 5 ? "已驳回" : "" - }} + }} + 工程名称:{{ basicData?.engineeringName }} @@ -126,7 +126,7 @@ -
隐患记录
+
隐患问题
创建人: {{ recordRowData.createByName }} @@ -151,7 +151,11 @@
整改情况 - 新增整改记录
@@ -340,7 +344,7 @@ const getInfo = async () => { recordData.value = res.result.inspectQuestionList; recordData.value.map(item => { item.image = eval(item.image); - if (item.state != 3) { + if (item.state == 1 || item.state == 4) { isFinished.value = false; } }); @@ -367,12 +371,9 @@ watch( () => props.detailsDialog, (n, o) => { visible1.value = n; - } -); -watch( - () => props.relativeId, - (n, o) => { - getInfo(); + if (n) { + getInfo(); + } } ); // 监听el-dialog显示状态,再通过@update:visible 通知父组件,一般是用于关 @@ -436,6 +437,10 @@ onMounted(() => {}); font-family: Source Han Sans CN-Medium, Source Han Sans CN; font-weight: 500; color: #333333; + > span { + font-weight: 400; + color: #008bff; + } } } } diff --git a/src/views/enterprise/userManagement/departmentManage/index.vue b/src/views/enterprise/userManagement/departmentManage/index.vue index fd6bcfe..a04fa34 100644 --- a/src/views/enterprise/userManagement/departmentManage/index.vue +++ b/src/views/enterprise/userManagement/departmentManage/index.vue @@ -44,7 +44,7 @@
- 重置 + 保存
diff --git a/src/views/goverment/notice/myPosted/index.vue b/src/views/goverment/notice/myPosted/index.vue index 124fc24..828e315 100644 --- a/src/views/goverment/notice/myPosted/index.vue +++ b/src/views/goverment/notice/myPosted/index.vue @@ -180,6 +180,7 @@ const handleEditItem = async (row: any) => { const { result } = await noticeDetailMyPost({ noticeId: row.noticeId }); console.log(result); store.Message = result; + console.log(store.Message); router.push({ path: "/goverment/notice/newNotification/index", query: { noticeId: row.noticeId } }); }; diff --git a/src/views/goverment/notice/newNotification/index.vue b/src/views/goverment/notice/newNotification/index.vue index 908a8b0..8d987ea 100644 --- a/src/views/goverment/notice/newNotification/index.vue +++ b/src/views/goverment/notice/newNotification/index.vue @@ -203,8 +203,58 @@ let nameList = computed(val => { }); const onChange = (row: any) => { + console.log(tags); console.log(row); - tags.value = tags.value.includes(row) ? tags.value.filter(item => item !== row) : [...tags.value, row]; + let isExist = -1; + isExist = tags.value.find(item => { + if (item.acceptName) { + return ( + item.acceptName == row.realName || + item.acceptName == row.enterpriseName || + item.acceptName == row.projectName || + item.acceptName == row.acceptName + ); + } else { + if (item.realName) { + return item.realName == row.realName; + } else if (item.enterpriseName) { + return item.enterpriseName == row.enterpriseName; + } else if (item.projectName) { + return item.projectName == row.projectName; + } else if (item.acceptName) { + return item.acceptName == row.acceptName; + } + } + }); + console.log(isExist); + if (isExist) { + tags.value = tags.value.filter(item => { + if (item.acceptName) { + if (row.realName) { + return item.acceptName != row.realName; + } else if (row.enterpriseName) { + return item.acceptName != row.enterpriseName; + } else if (row.projectName) { + return item.acceptName != row.projectName; + } else if (row.acceptName) { + return item.acceptName != row.acceptName; + } + } else { + if (item.realName) { + return item.realName != row.realName; + } else if (item.enterpriseName) { + return item.enterpriseName != row.enterpriseName; + } else if (item.projectName) { + return item.projectName != row.projectName; + } else if (item.acceptName) { + return item.acceptName != row.acceptName; + } + } + }); + console.log(tags.value); + } else { + tags.value = [...tags.value, row]; + } }; const onAddData = () => { @@ -262,6 +312,7 @@ const handleSubmit = async (formEl: FormInstance | undefined) => { } else { (curr.accept = item.projectSn), (curr.acceptType = 4); } + console.log(curr); acceptsList.push(curr); }); @@ -274,7 +325,7 @@ const handleSubmit = async (formEl: FormInstance | undefined) => { }); }); await noticeeditmyPost({ - accepts: tags.value, + accepts: acceptsList, annexFileList: editFiles, content: leftForm.value.content, title: leftForm.value.title, @@ -331,8 +382,8 @@ onMounted(async () => { const res2 = await getproNamelist({}); // @ts-expect-error proList.value = res2.result; - - if (store.Message) { + console.log(store.Message); + if (store.Message && route.query.noticeId) { // searchForm.value.type = store.Message.type; searchForm.value.type = typeList.value[Number(store.Message.type)].value; console.log(leftForm.value.content); @@ -358,7 +409,7 @@ onMounted(async () => { }); item.files = files; - item.fileName = store.Message?.title; + // item.fileName = store.Message?.title; }); tags.value = store.Message.acceptList; diff --git a/src/views/goverment/qualitySupervision/checkStore/index.vue b/src/views/goverment/qualitySupervision/checkStore/index.vue index 5a19d8b..23dce46 100644 --- a/src/views/goverment/qualitySupervision/checkStore/index.vue +++ b/src/views/goverment/qualitySupervision/checkStore/index.vue @@ -2,8 +2,8 @@
-
隐患记录
+
隐患问题
创建人: {{ recordRowData.createByName }} @@ -338,12 +340,9 @@ watch( () => props.detailsDialog, (n, o) => { visible1.value = n; - } -); -watch( - () => props.relativeId, - (n, o) => { - getInfo(); + if (n) { + getInfo(); + } } ); // 监听el-dialog显示状态,再通过@update:visible 通知父组件,一般是用于关 @@ -408,6 +407,10 @@ onMounted(() => {}); font-weight: 500; color: #333333; } + > span { + font-weight: 400; + color: #008bff; + } } } .detail-table { diff --git a/src/views/goverment/safetySupervision/checkStore/index.vue b/src/views/goverment/safetySupervision/checkStore/index.vue index 1e18531..acba7ca 100644 --- a/src/views/goverment/safetySupervision/checkStore/index.vue +++ b/src/views/goverment/safetySupervision/checkStore/index.vue @@ -2,24 +2,20 @@
-
隐患记录
+
隐患问题
创建人: {{ recordRowData.createByName }} @@ -339,12 +341,9 @@ watch( () => props.detailsDialog, (n, o) => { visible1.value = n; - } -); -watch( - () => props.relativeId, - (n, o) => { - getInfo(); + if (n) { + getInfo(); + } } ); // 监听el-dialog显示状态,再通过@update:visible 通知父组件,一般是用于关 @@ -409,6 +408,10 @@ onMounted(() => {}); font-weight: 500; color: #333333; } + > span { + font-weight: 400; + color: #008bff; + } } } .detail-table { diff --git a/src/views/project/qualitySupervision/components/transformInfo.vue b/src/views/project/qualitySupervision/components/transformInfo.vue index 53242aa..b5b7604 100644 --- a/src/views/project/qualitySupervision/components/transformInfo.vue +++ b/src/views/project/qualitySupervision/components/transformInfo.vue @@ -16,7 +16,8 @@ 检查情况:{{ + >检查情况: + {{ basicData?.state == 1 ? "执法中" : basicData?.state == 2 @@ -28,8 +29,8 @@ : basicData?.state == 5 ? "已驳回" : "" - }} + }} + 工程名称:{{ basicData?.engineeringName }} @@ -126,7 +126,7 @@
-
隐患记录
+
隐患问题
创建人: {{ recordRowData.createByName }} @@ -151,7 +151,11 @@
整改情况 - 新增整改记录
@@ -367,12 +371,9 @@ watch( () => props.detailsDialog, (n, o) => { visible1.value = n; - } -); -watch( - () => props.relativeId, - (n, o) => { - getInfo(); + if (n) { + getInfo(); + } } ); // 监听el-dialog显示状态,再通过@update:visible 通知父组件,一般是用于关 @@ -436,6 +437,10 @@ onMounted(() => {}); font-family: Source Han Sans CN-Medium, Source Han Sans CN; font-weight: 500; color: #333333; + > span { + font-weight: 400; + color: #008bff; + } } } } diff --git a/src/views/project/safetySupervision/components/transformInfo.vue b/src/views/project/safetySupervision/components/transformInfo.vue index 95450bd..f7ff942 100644 --- a/src/views/project/safetySupervision/components/transformInfo.vue +++ b/src/views/project/safetySupervision/components/transformInfo.vue @@ -16,7 +16,8 @@ 检查情况:{{ + >检查情况: + {{ basicData?.state == 1 ? "执法中" : basicData?.state == 2 @@ -28,8 +29,8 @@ : basicData?.state == 5 ? "已驳回" : "" - }} + }} + 工程名称:{{ basicData?.engineeringName }} @@ -126,7 +126,7 @@
-
隐患记录
+
隐患问题
创建人: {{ recordRowData.createByName }} @@ -151,7 +151,11 @@
整改情况 - 新增整改记录
@@ -339,7 +343,7 @@ const getInfo = async () => { recordData.value = res.result.inspectQuestionList; recordData.value.map(item => { item.image = eval(item.image); - if (item.state != 3) { + if (item.state == 1 || item.state == 4) { isFinished.value = false; } }); @@ -366,12 +370,9 @@ watch( () => props.detailsDialog, (n, o) => { visible1.value = n; - } -); -watch( - () => props.relativeId, - (n, o) => { - getInfo(); + if (n) { + getInfo(); + } } ); // 监听el-dialog显示状态,再通过@update:visible 通知父组件,一般是用于关 @@ -435,6 +436,10 @@ onMounted(() => {}); font-family: Source Han Sans CN-Medium, Source Han Sans CN; font-weight: 500; color: #333333; + > span { + font-weight: 400; + color: #008bff; + } } } } diff --git a/src/views/project/userManagement/departmentManage/index.vue b/src/views/project/userManagement/departmentManage/index.vue index ea2f5db..707e442 100644 --- a/src/views/project/userManagement/departmentManage/index.vue +++ b/src/views/project/userManagement/departmentManage/index.vue @@ -44,7 +44,7 @@
- 重置 + 保存