diff --git a/src/api/siteMessage.js b/src/api/siteMessage.js index e4962a9..4010db7 100644 --- a/src/api/siteMessage.js +++ b/src/api/siteMessage.js @@ -6,9 +6,9 @@ export function getSiteMessagePage(query) { url: '/siteMessage/pageList', method: 'get', params: query, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' - } + // headers: { + // 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' + // } }) } @@ -16,11 +16,8 @@ export function getSiteMessagePage(query) { export function updateSiteMessageStatus(query) { return request({ url: '/siteMessage/getSiteMessage', - method: 'get', - pamras: query, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' - } + method: 'POST', + data: query }) } @@ -28,10 +25,7 @@ export function updateSiteMessageStatus(query) { export function oneClickClear(query) { return request({ url: '/siteMessage/oneClickClear', - method: 'get', - pamras: query, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' - } + method: 'POST', + data: query }) } \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index d5c945a..9944188 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -137,7 +137,7 @@ const activeIndex = ref(0) // 消息列表查询条件 const tableParamsQuery = ref({ readFlag: 0, - pageNum: 1, + pageIndex: 1, pageSize: 10 }) const messageDateList = ref([]) @@ -178,7 +178,7 @@ const handleChageTab = (index) => { } // 查看更多 const handleLoadMore = () => { - tableParamsQuery.value.pageNum = tableParamsQuery.value.pageNum + 1 + tableParamsQuery.value.pageIndex = tableParamsQuery.value.pageIndex + 1 tableParamsQuery.value.readFlag = activeIndex.value if (activeIndex.value == 0) getMessage() else getReadMessage() @@ -187,12 +187,12 @@ const handleLoadMore = () => { const InitDot = () => { const search = { readFlag: 0, - pageNum: 1, + pageIndex: 1, pageSize: 1 } getSiteMessagePage(search).then(res => { if (res.code == 200) { - isShowDot.value = res.rows.length > 0 ? true : false + isShowDot.value = res.data.list.length > 0 ? true : false } else { isShowDot.value = false } @@ -200,10 +200,10 @@ const InitDot = () => { } // 查询未读消息 const InitMessage = () => { - tableParamsQuery.value.pageNum = 1 + tableParamsQuery.value.pageIndex = 1 getSiteMessagePage(tableParamsQuery.value).then(res => { if (res.code == 200) { - messageDateList.value = res.rows + messageDateList.value = res.data.list } }) } @@ -211,13 +211,13 @@ const InitMessage = () => { const getMessage = () => { getSiteMessagePage(tableParamsQuery.value).then(res => { if (res.code == 200) { - if (res.rows.length > 0) { - messageDateList.value = messageDateList.value.concat(res.rows); + if (res.data.list.length > 0) { + messageDateList.value = messageDateList.value.concat(res.data.list); } else { proxy.$modal.msgSuccess(`没有更多了...`) - if (tableParamsQuery.value.pageNum != 1) { - tableParamsQuery.value.pageNum = tableParamsQuery.value.pageNum - 1 + if (tableParamsQuery.value.pageIndex != 1) { + tableParamsQuery.value.pageIndex = tableParamsQuery.value.pageIndex - 1 } } } @@ -225,10 +225,10 @@ const getMessage = () => { } // 查询已读消息 const InitReadMessage = () => { - tableParamsQuery.value.pageNum = 1 + tableParamsQuery.value.pageIndex = 1 getSiteMessagePage(tableParamsQuery.value).then(res => { if (res.code == 200) { - messageDateList.value = res.rows; + messageDateList.value = res.data.list; } }) } @@ -236,13 +236,13 @@ const InitReadMessage = () => { const getReadMessage = () => { getSiteMessagePage(tableParamsQuery.value).then(res => { if (res.code == 200) { - if (res.rows.length > 0) { - messageDateList.value = messageDateList.value.concat(res.rows); + if (res.data.list.length > 0) { + messageDateList.value = messageDateList.value.concat(res.data.list); } else { proxy.$modal.msgSuccess(`没有更多了...`) - if (tableParamsQuery.value.pageNum != 1) { - tableParamsQuery.value.pageNum = tableParamsQuery.value.pageNum - 1 + if (tableParamsQuery.value.pageIndex != 1) { + tableParamsQuery.value.pageIndex = tableParamsQuery.value.pageIndex - 1 } } } @@ -261,7 +261,7 @@ const handleClearAll = () => { } // 跳转 const handleOpenLink = (messageId, msgType) => { - updateSiteMessageStatus({ id: messageId }).then(res => { + updateSiteMessageStatus({ id: messageId, readFlag: 1 }).then(res => { if (res.code == 200) { // 新用户注册审核提醒 esc if (msgType == 10) router.push('/system/userApproval') @@ -273,6 +273,7 @@ const handleOpenLink = (messageId, msgType) => { if (msgType == 40) router.push('/safetyReview/examinerEscTask') // 工具过期 esc if (msgType == 50) router.push('/ppeTool') + closeMessage() } else { proxy.$modal.msgError(`操作失败...`) } @@ -280,7 +281,7 @@ const handleOpenLink = (messageId, msgType) => { } // 标记已读 const handleReadMessage = (messageId) => { - updateSiteMessageStatus({ id: messageId }).then(res => { + updateSiteMessageStatus({ id: messageId, readFlag: 1 }).then(res => { if (res.code == 200) { if (activeIndex.value == 0) InitMessage() else InitReadMessage() diff --git a/src/router/index.js b/src/router/index.js index 014c594..647bc31 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -450,7 +450,7 @@ export const dynamicRoutes = [ path: '/databaseLibaryForm', component: Layout, hidden: true, - permissions: ['safetyReview:examinerTasks:add'], + permissions: ['databaseLibary:edit', 'databaseLibary:orgUpdate'], children: [ { path: ':Id(\\d+)?', @@ -492,7 +492,7 @@ export const dynamicRoutes = [ path: '/system/userApprovalDetail', component: Layout, hidden: true, - permissions: ['system:userApproval:approval'], + permissions: ['system:userApproval:viewDetail'], children: [ { path: ':userId(\\d+)', diff --git a/src/views/login.vue b/src/views/login.vue index fbd8af7..e9ea836 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -81,7 +81,7 @@ import systemLogo2 from '@/assets/images/systemLogo2.png' // 初始化 onMounted(() => { - getCode(); + // getCode(); getCookie(); // 设置初始值 carouselHeight.value = window.innerHeight; // 屏幕高度 @@ -107,8 +107,8 @@ const router = useRouter() const { proxy } = getCurrentInstance() const loginForm = ref({ - username: "admin", - password: "admin123", + username: "", + password: "", rememberMe: false, code: "", uuid: "" @@ -172,23 +172,23 @@ function handleLogin() { }).catch(() => { loading.value = false // 重新获取验证码 - if (captchaEnabled.value) { - getCode() - } + // if (captchaEnabled.value) { + // getCode() + // } }) } }) } -const getCode = () => { - getCodeImg().then(res => { - captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled - if (captchaEnabled.value) { - codeUrl.value = "data:image/gif;base64," + res.img - loginForm.value.uuid = res.uuid - } - }) -} +// const getCode = () => { +// getCodeImg().then(res => { +// captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled +// if (captchaEnabled.value) { +// codeUrl.value = "data:image/gif;base64," + res.img +// loginForm.value.uuid = res.uuid +// } +// }) +// } const getCookie = () => { const username = Cookies.get("username") diff --git a/src/views/qualification/escApproval/approvalDetail.vue b/src/views/qualification/escApproval/approvalDetail.vue index 3a6d59f..fe11af2 100644 --- a/src/views/qualification/escApproval/approvalDetail.vue +++ b/src/views/qualification/escApproval/approvalDetail.vue @@ -136,14 +136,7 @@ @click.stop="handleCardPreview(beforeConditionInfo.certificatePhoto)" /> - - - - - - +
diff --git a/src/views/qualification/escTask/components/LableApply.vue b/src/views/qualification/escTask/components/LableApply.vue index a1a5943..ef2ac69 100644 --- a/src/views/qualification/escTask/components/LableApply.vue +++ b/src/views/qualification/escTask/components/LableApply.vue @@ -63,9 +63,10 @@ 重新申请 - - 查看 + + + 查看 + 重新申请 - - 查看 + + + 查看 + - - +
diff --git a/src/views/qualification/escTask/components/QualificationReApplyForm.vue b/src/views/qualification/escTask/components/QualificationReApplyForm.vue index efbd408..38266e2 100644 --- a/src/views/qualification/escTask/components/QualificationReApplyForm.vue +++ b/src/views/qualification/escTask/components/QualificationReApplyForm.vue @@ -108,13 +108,7 @@ - - +
diff --git a/src/views/qualification/myQualifications/components/LableApply.vue b/src/views/qualification/myQualifications/components/LableApply.vue index f300c6a..5565bce 100644 --- a/src/views/qualification/myQualifications/components/LableApply.vue +++ b/src/views/qualification/myQualifications/components/LableApply.vue @@ -34,9 +34,10 @@ 重新申请 - - 查看 + + + 查看 + 重新申请 - 查看 + + 查看 + - - +
diff --git a/src/views/qualification/myQualifications/components/QualificationDetailForm.vue b/src/views/qualification/myQualifications/components/QualificationDetailForm.vue index a728f2b..ddee94b 100644 --- a/src/views/qualification/myQualifications/components/QualificationDetailForm.vue +++ b/src/views/qualification/myQualifications/components/QualificationDetailForm.vue @@ -136,14 +136,7 @@ @click.stop="handleCardPreview(beforeConditionInfo.certificatePhoto)" /> - - - - - - +
diff --git a/src/views/qualification/myQualifications/components/QualificationReApplyForm.vue b/src/views/qualification/myQualifications/components/QualificationReApplyForm.vue index fe04e57..3b86617 100644 --- a/src/views/qualification/myQualifications/components/QualificationReApplyForm.vue +++ b/src/views/qualification/myQualifications/components/QualificationReApplyForm.vue @@ -89,11 +89,6 @@ -
diff --git a/src/views/qualification/trainApproval/approvalDetail.vue b/src/views/qualification/trainApproval/approvalDetail.vue index c1e295b..5bc76b4 100644 --- a/src/views/qualification/trainApproval/approvalDetail.vue +++ b/src/views/qualification/trainApproval/approvalDetail.vue @@ -137,13 +137,6 @@ - - - - -
diff --git a/src/views/qualification/trainApproval/approvalForm.vue b/src/views/qualification/trainApproval/approvalForm.vue index 0af9b8a..2d0275e 100644 --- a/src/views/qualification/trainApproval/approvalForm.vue +++ b/src/views/qualification/trainApproval/approvalForm.vue @@ -137,13 +137,6 @@ - - - - -
diff --git a/src/views/system/section/index.vue b/src/views/system/section/index.vue index d83f1c5..b9bf227 100644 --- a/src/views/system/section/index.vue +++ b/src/views/system/section/index.vue @@ -18,7 +18,7 @@
+ v-hasPermi="['system:section:add']"> 新增 diff --git a/src/views/system/userApproval/index.vue b/src/views/system/userApproval/index.vue index 21129db..d5a4943 100644 --- a/src/views/system/userApproval/index.vue +++ b/src/views/system/userApproval/index.vue @@ -76,9 +76,9 @@