From a701997d320b17bf06a8376f3bd1a820ffc7dbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Fri, 7 Jul 2023 15:21:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UAT=E6=8F=90=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E4=BC=98=E5=8C=96=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/App.vue | 3 + jero-web/src/config/router.config.js | 6 + jero-web/src/permission.js | 28 +- jero-web/src/utils/kkfileView.js | 5 +- jero-web/src/views/phoneView/handlingPage.vue | 3 +- .../src/views/phoneView/preHomoMangement.vue | 2 +- .../phoneView/problemKnowledgeBaseFile.vue | 55 + .../src/views/phoneView/processManagement.vue | 2 +- .../src/views/phoneView/recentBrowsing.vue | 25 +- jero-web/src/views/phoneView/search.vue | 12 +- jero-web/src/views/phoneView/searchList.vue | 27 +- jero-web/src/views/phoneView/taskData.vue | 15 +- jero-web/src/views/phoneView/toDoCenter.vue | 1785 +++++++++-------- 13 files changed, 1032 insertions(+), 936 deletions(-) create mode 100644 jero-web/src/views/phoneView/problemKnowledgeBaseFile.vue diff --git a/jero-web/src/App.vue b/jero-web/src/App.vue index 1caee63ae..c596ee1a8 100644 --- a/jero-web/src/App.vue +++ b/jero-web/src/App.vue @@ -216,4 +216,7 @@ height: 32px !important; line-height: 32px !important; } + .van-dialog .van-goods-action-button--danger{ + background: #00B3BE!important; + } \ No newline at end of file diff --git a/jero-web/src/config/router.config.js b/jero-web/src/config/router.config.js index ed1c2df03..92505da5d 100644 --- a/jero-web/src/config/router.config.js +++ b/jero-web/src/config/router.config.js @@ -716,6 +716,12 @@ export const phoneConstantRouterMap = [ name: 'phonePreHomoMangement', component: () => import('@/views/phoneView/preHomoMangement') }, + //法规月报详情页 + { + path: '/phoneProblemKnowledgeBaseFile', + name: 'phoneProblemKnowledgeBaseFile', + component: () => import('@/views/phoneView/problemKnowledgeBaseFile') + }, /* 手机端结束 */ { path: '/404', diff --git a/jero-web/src/permission.js b/jero-web/src/permission.js index 430dbd8d2..c319563c0 100644 --- a/jero-web/src/permission.js +++ b/jero-web/src/permission.js @@ -11,34 +11,7 @@ import { getAction } from '@/api/manage' import { welcome } from '@/utils/util' let isPhone = localStorage.getItem('isPhone') -console.log(isPhone) -// 判断当前设备 -function isMobile() { - var userAgentInfo = navigator.userAgent - - var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'] - - var mobile_flag = false - - //根据userAgent判断是否是手机 - for (var v = 0; v < mobileAgents.length; v++) { - if (userAgentInfo.indexOf(mobileAgents[v]) > 0) { - mobile_flag = true - break - } - } - var screen_width = window.screen.width - var screen_height = window.screen.height - - //根据屏幕分辨率判断是否是手机 - if (screen_width < 500 && screen_height < 800) { - mobile_flag = true - } - return mobile_flag -} - -let mobile = isMobile() NProgress.configure({ showSpinner: false }) // NProgress Configuration // TODO 线上部署在conmponetns/tools/UserMenu.vue的退出登录时需解开代码以及注释代码 @@ -49,6 +22,7 @@ const whiteList = ['/user/login', '/user/register', '/user/register-result', '/u // const whiteList = [] + // no redirect whitelist router.beforeEach((to, from, next) => { diff --git a/jero-web/src/utils/kkfileView.js b/jero-web/src/utils/kkfileView.js index 3b16f384e..750d1c578 100644 --- a/jero-web/src/utils/kkfileView.js +++ b/jero-web/src/utils/kkfileView.js @@ -10,11 +10,12 @@ export function kkFileView(fileName, fileId) { let fileSuffix = fileName.substring(index1, index2) if (fileSuffix == '.docx' || fileSuffix == '.doc' || fileSuffix == '.pdf' || fileSuffix == '.xlsx' || fileSuffix == '.xls') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadFileUrl + '/' + fileId + fileSuffix) - window.open(url,'_self') + return url } else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') { let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(downLoadImgUrl + '/' + fileId + fileSuffix) - window.open(url,'_self') + return url } else { Toast('当前格式不支持预览') + return '' } } \ No newline at end of file diff --git a/jero-web/src/views/phoneView/handlingPage.vue b/jero-web/src/views/phoneView/handlingPage.vue index 70e5495cb..39ad9ea69 100644 --- a/jero-web/src/views/phoneView/handlingPage.vue +++ b/jero-web/src/views/phoneView/handlingPage.vue @@ -68,7 +68,7 @@ activeTab: this.$route.query.activeTab, searchFlowType: this.$route.query.searchFlowType, checked: this.$route.query.checked, - selectModel: this.$route.query.selectModel + selectModel: this.$route.query.selectModel, } }) } else { @@ -82,6 +82,7 @@ taskDefinitionKey: this.$route.query.taskDefinitionKey, projectName: this.$route.query.projectName, id: item.id, + TaskKeyName:this.$route.query.TaskKeyName, isDisplay: this.isDisplay } }) diff --git a/jero-web/src/views/phoneView/preHomoMangement.vue b/jero-web/src/views/phoneView/preHomoMangement.vue index 078126f7a..d3feb419b 100644 --- a/jero-web/src/views/phoneView/preHomoMangement.vue +++ b/jero-web/src/views/phoneView/preHomoMangement.vue @@ -93,7 +93,7 @@ {{queryForm.deliveryResult}} - +
+ +
+ + + + + \ No newline at end of file diff --git a/jero-web/src/views/phoneView/processManagement.vue b/jero-web/src/views/phoneView/processManagement.vue index 688789188..a3816a618 100644 --- a/jero-web/src/views/phoneView/processManagement.vue +++ b/jero-web/src/views/phoneView/processManagement.vue @@ -104,7 +104,7 @@
- +
{{$t('resultofhandling')}} diff --git a/jero-web/src/views/phoneView/recentBrowsing.vue b/jero-web/src/views/phoneView/recentBrowsing.vue index b1856ee0e..b04313114 100644 --- a/jero-web/src/views/phoneView/recentBrowsing.vue +++ b/jero-web/src/views/phoneView/recentBrowsing.vue @@ -38,6 +38,7 @@ import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { mapGetters } from 'vuex' import { kkFileView } from '@/utils/kkfileView' + import { Dialog } from 'vant' export default { name: 'phoneRecentBrowsing', @@ -72,6 +73,10 @@ } }) }, + isBrowser() { + const userAgent = window.navigator.userAgent.toLowerCase() + return userAgent.includes('lark') || userAgent.includes('feishu') + }, recentBrowsingClick(item) { if (item.browseType == 'Document Library') { this.$router.push({ @@ -81,7 +86,25 @@ } }) } else if (item.browseType == 'Regulatory Monthly Report') { - kkFileView(item.title, item.fileId) + if (!this.isBrowser()) { + Dialog.alert({ + message: '未授权用户
Unauthorized User', + theme: 'round-button', + }).then(() => { + // on close + }); + return + } + let url = kkFileView(item.title, item.fileId) + if (url) { + this.$router.push({ + path: '/phoneProblemKnowledgeBaseFile', + query: { + fileName: item.title, + fileId: item.fileId + } + }) + } } else if (item.browseType == 'Knowledge sharing') { this.$router.push({ path: '/phoneProblemKnowledgeBase', diff --git a/jero-web/src/views/phoneView/search.vue b/jero-web/src/views/phoneView/search.vue index aeb816919..70833e760 100644 --- a/jero-web/src/views/phoneView/search.vue +++ b/jero-web/src/views/phoneView/search.vue @@ -10,7 +10,7 @@ :placeholder="$t('phoneSearch')"/>
-
+
@@ -21,11 +21,11 @@ '已存储'+documentLibraryTotal+'个文档'}}
-
+
{{$t('goToCheck')}}
-
+
@@ -36,11 +36,11 @@ '已存储'+problemKnowledgeBaseTotal+'个知识分享'}}
-
+
{{$t('goToCheck')}}
-
+
@@ -51,7 +51,7 @@ '已存储'+monthlyReportRegulationsTotal+'个法规月报'}}
-
+
{{$t('goToCheck')}}
diff --git a/jero-web/src/views/phoneView/searchList.vue b/jero-web/src/views/phoneView/searchList.vue index 1c0bd75da..7fc835654 100644 --- a/jero-web/src/views/phoneView/searchList.vue +++ b/jero-web/src/views/phoneView/searchList.vue @@ -2,7 +2,7 @@
- - - + + +
@@ -64,9 +64,9 @@
- - - + + + + :placeholder="$t('phoneSearch')"/>
@@ -18,7 +18,7 @@
- +
@@ -225,7 +225,7 @@ {{ $t('onlyMobilePhoneAreDisplayed') }}
- + @@ -239,326 +239,340 @@ \ No newline at end of file