修改UAT提出的优化点

This commit is contained in:
范强强
2023-07-10 10:05:15 +08:00
parent eaeb368349
commit 0a90b461d1
7 changed files with 207 additions and 86 deletions
+3
View File
@@ -0,0 +1,3 @@
img {
width: 100%;
}
+77 -77
View File
@@ -482,83 +482,83 @@ export const constantRouterMap = [
/* 手机端开始 */ /* 手机端开始 */
//搜索 //搜索
{ // {
path: '/phoneSearch', // path: '/phoneSearch',
name: 'phoneSearch', // name: 'phoneSearch',
component: () => import('@/views/phoneView/search') // component: () => import('@/views/phoneView/search')
}, // },
//待办中心 // //待办中心
{ // {
path: '/phoneToDoCenter', // path: '/phoneToDoCenter',
name: 'phoneToDoCenter', // name: 'phoneToDoCenter',
component: () => import('@/views/phoneView/toDoCenter') // component: () => import('@/views/phoneView/toDoCenter')
}, // },
//任务数据 // //任务数据
{ // {
path: '/phoneTaskData', // path: '/phoneTaskData',
name: 'phoneTaskData', // name: 'phoneTaskData',
component: () => import('@/views/phoneView/taskData') // component: () => import('@/views/phoneView/taskData')
}, // },
//我的 // //我的
{ // {
path: '/phoneHome', // path: '/phoneHome',
name: 'phoneHome', // name: 'phoneHome',
component: () => import('@/views/phoneView/home') // component: () => import('@/views/phoneView/home')
}, // },
//搜索列表 // //搜索列表
{ // {
path: '/phoneSearchList', // path: '/phoneSearchList',
name: 'phoneSearchList', // name: 'phoneSearchList',
component: () => import('@/views/phoneView/searchList') // component: () => import('@/views/phoneView/searchList')
}, // },
//文档详情 // //文档详情
{ // {
path: '/phoneDocumentDetails', // path: '/phoneDocumentDetails',
name: 'phoneDocumentDetails', // name: 'phoneDocumentDetails',
component: () => import('@/views/phoneView/documentDetails') // component: () => import('@/views/phoneView/documentDetails')
}, // },
//流程 // //流程
{ // {
path: '/phoneProcessManagement', // path: '/phoneProcessManagement',
name: 'phoneProcessManagement', // name: 'phoneProcessManagement',
component: () => import('@/views/phoneView/processManagement') // component: () => import('@/views/phoneView/processManagement')
}, // },
//知识分享 // //知识分享
{ // {
path: '/phoneProblemKnowledgeBase', // path: '/phoneProblemKnowledgeBase',
name: 'phoneProblemKnowledgeBase', // name: 'phoneProblemKnowledgeBase',
component: () => import('@/views/phoneView/problemKnowledgeBase') // component: () => import('@/views/phoneView/problemKnowledgeBase')
}, // },
//办理页面 // //办理页面
{ // {
path: '/phoneHandlingPage', // path: '/phoneHandlingPage',
name: 'phoneHandlingPage', // name: 'phoneHandlingPage',
component: () => import('@/views/phoneView/handlingPage') // component: () => import('@/views/phoneView/handlingPage')
}, // },
//我的收藏 // //我的收藏
{ // {
path: '/phoneMyCollection', // path: '/phoneMyCollection',
name: 'phoneMyCollection', // name: 'phoneMyCollection',
component: () => import('@/views/phoneView/myCollection') // component: () => import('@/views/phoneView/myCollection')
}, // },
//最近预览 // //最近预览
{ // {
path: '/phoneRecentBrowsing', // path: '/phoneRecentBrowsing',
name: 'phoneRecentBrowsing', // name: 'phoneRecentBrowsing',
component: () => import('@/views/phoneView/recentBrowsing') // component: () => import('@/views/phoneView/recentBrowsing')
}, // },
//我的订阅 // //我的订阅
{ // {
path: '/phoneMySubscribe', // path: '/phoneMySubscribe',
name: 'phoneMySubscribe', // name: 'phoneMySubscribe',
component: () => import('@/views/phoneView/mySubscribe') // component: () => import('@/views/phoneView/mySubscribe')
}, // },
//perhome办理流程 // //perhome办理流程
{ // {
path: '/phonePreHomoMangement', // path: '/phonePreHomoMangement',
name: 'phonePreHomoMangement', // name: 'phonePreHomoMangement',
component: () => import('@/views/phoneView/preHomoMangement') // component: () => import('@/views/phoneView/preHomoMangement')
}, // },
/* 手机端结束 */ /* 手机端结束 */
// { // {
// path:'/vehicleinformation', // path:'/vehicleinformation',
@@ -103,7 +103,7 @@
import { getAction, postAction, downFile } from '@/api/manage' import { getAction, postAction, downFile } from '@/api/manage'
import { kkFileView } from '@/utils/kkfileView' import { kkFileView } from '@/utils/kkfileView'
import eventBUs from '../../common/event' import eventBUs from '../../common/event'
import { Toast } from 'vant' import { Dialog, Toast } from 'vant'
export default { export default {
name: 'phoneDocumentDetails', name: 'phoneDocumentDetails',
@@ -261,8 +261,30 @@
this.getPage() this.getPage()
} }
}, },
isBrowser() {
const userAgent = window.navigator.userAgent.toLowerCase()
return userAgent.includes('lark') || userAgent.includes('feishu')
},
fileClick(item) { fileClick(item) {
kkFileView(item.fileName, item.id) if (!this.isBrowser()) {
Dialog.alert({
message: '未授权用户 <br> Unauthorized User',
theme: 'round-button',
}).then(() => {
// on close
});
return
}
let url = kkFileView(item.fileName, item.id)
if (url) {
this.$router.push({
path: '/phoneProblemKnowledgeBaseFile',
query: {
fileName: item.fileName,
fileId: item.id
}
})
}
}, },
urlClick(item) { urlClick(item) {
window.open(item.value) window.open(item.value)
@@ -490,8 +490,30 @@
this.form.deliveryResult.splice(index, 1) this.form.deliveryResult.splice(index, 1)
this.form = { ...this.form } this.form = { ...this.form }
}, },
isBrowser() {
const userAgent = window.navigator.userAgent.toLowerCase()
return userAgent.includes('lark') || userAgent.includes('feishu')
},
deliverablesResultFileClick(item) { deliverablesResultFileClick(item) {
kkFileView(item.fileName, item.id) if (!this.isBrowser()) {
Dialog.alert({
message: '未授权用户 <br> Unauthorized User',
theme: 'round-button',
}).then(() => {
// on close
});
return
}
let url = kkFileView(item.fileName, item.id)
if (url) {
this.$router.push({
path: '/phoneProblemKnowledgeBaseFile',
query: {
fileName: item.fileName,
fileId: item.id
}
})
}
}, },
standardClick(item) { standardClick(item) {
this.$router.push({ this.$router.push({
@@ -354,8 +354,30 @@
vanField.focus() vanField.focus()
}) })
}, },
isBrowser() {
const userAgent = window.navigator.userAgent.toLowerCase()
return userAgent.includes('lark') || userAgent.includes('feishu')
},
fileClick(item) { fileClick(item) {
kkFileView(item.fileName, item.id) if (!this.isBrowser()) {
Dialog.alert({
message: '未授权用户 <br> Unauthorized User',
theme: 'round-button',
}).then(() => {
// on close
});
return
}
let url = kkFileView(item.fileName, item.id)
if (url) {
this.$router.push({
path: '/phoneProblemKnowledgeBaseFile',
query: {
fileName: item.fileName,
fileId: item.id
}
})
}
}, },
messageClick(item) { messageClick(item) {
this.isDisplay = true this.isDisplay = true
@@ -2,6 +2,7 @@
<div class="box"> <div class="box">
<iframe :src="url" frameborder="0" marginwidth="0" <iframe :src="url" frameborder="0" marginwidth="0"
id="iframeEle" id="iframeEle"
@load="loadFrame"
width="100%" height="100%"></iframe> width="100%" height="100%"></iframe>
</div> </div>
</template> </template>
@@ -17,12 +18,22 @@
} }
}, },
mounted() { mounted() {
document.title = 'NIO GRP' document.title = 'NIO GRP'
// this.url = 'http://10.0.3.22:8012/onlinePreview?url=aHR0cDovL2xvY2FsaG9zdDo4MDEyL2RlbW8vR0JUXzQxNjMwXzIwMjJfQ04ucGRm' // this.url = 'http://localhost:3000/phoneHome'
this.url = kkFileView(this.$route.query.fileName,this.$route.query.fileId) this.url = kkFileView(this.$route.query.fileName,this.$route.query.fileId)
}, },
methods: {} methods: {
loadFrame() {
const iframe = document.getElementById("iframeEle");
const body = iframe.contentWindow.document;
const head = body.getElementsByTagName('head')
const cssLink = document.createElement("link");
cssLink.href = "/iframe.css";
cssLink.rel = "stylesheet";
cssLink.type = "text/css";
head[0].appendChild(cssLink);
},
}
} }
</script> </script>
@@ -215,6 +215,7 @@
import Vue from 'vue' import Vue from 'vue'
import { kkFileView } from '@/utils/kkfileView' import { kkFileView } from '@/utils/kkfileView'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { Dialog } from 'vant'
export default { export default {
name: 'phoneProcessManagement', name: 'phoneProcessManagement',
@@ -264,11 +265,51 @@
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
isBrowser() {
const userAgent = window.navigator.userAgent.toLowerCase()
return userAgent.includes('lark') || userAgent.includes('feishu')
},
dataSourceFileClick(item) { dataSourceFileClick(item) {
kkFileView(item.fileName, item.id) if (!this.isBrowser()) {
Dialog.alert({
message: '未授权用户 <br> Unauthorized User',
theme: 'round-button',
}).then(() => {
// on close
});
return
}
let url = kkFileView(item.fileName, item.id)
if (url) {
this.$router.push({
path: '/phoneProblemKnowledgeBaseFile',
query: {
fileName: item.fileName,
fileId: item.id
}
})
}
}, },
approvalFileClick(item, index) { approvalFileClick(item, index) {
kkFileView(item.approvalFileName[index], item.approvalFile[index]) if (!this.isBrowser()) {
Dialog.alert({
message: '未授权用户 <br> Unauthorized User',
theme: 'round-button',
}).then(() => {
// on close
});
return
}
let url = kkFileView(item.approvalFileName[index],item.approvalFile[index])
if (url) {
this.$router.push({
path: '/phoneProblemKnowledgeBaseFile',
query: {
fileName: item.approvalFileName[index],
fileId: item.approvalFile[index]
}
})
}
}, },
iconClick() { iconClick() {
if (this.$route.query.goRouter) { if (this.$route.query.goRouter) {