From 731e320a23d1f9ad06d4ab0e187dfc7475b44361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Fri, 25 Aug 2023 14:51:06 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=B3=BB=E7=BB=9F=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E3=80=81=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9=EF=BC=9B=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E7=BC=96=E8=BE=91=E6=8C=AA=E5=88=B0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 2 +- src/common/onlyOffice/onlyOfficeEdit.js | 48 ++++++++++++------ src/components/layouts/TabLayout.vue | 2 +- src/components/layouts/UserLayout.vue | 14 +++--- src/components/page/GlobalHeader.vue | 6 +-- src/components/tools/Logo.vue | 49 +++++++++++-------- src/mixins/ConfigurableTableMixin.js | 1 - src/views/dashboard/Analysis.vue | 9 ++-- .../domesticStandard/DomesticStandardList.vue | 13 +++++ src/views/user/Login.vue | 17 ++++++- 10 files changed, 107 insertions(+), 54 deletions(-) create mode 100644 src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue diff --git a/public/index.html b/public/index.html index d12a0d4e..cdc7103a 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ - JeroBoot平台 + 中国重汽标准法规管理模块系统 diff --git a/src/common/onlyOffice/onlyOfficeEdit.js b/src/common/onlyOffice/onlyOfficeEdit.js index c394e59a..8da57a14 100644 --- a/src/common/onlyOffice/onlyOfficeEdit.js +++ b/src/common/onlyOffice/onlyOfficeEdit.js @@ -1,19 +1,39 @@ -import store from '@/store' +// import store from '@/store' import { getFileInfo } from '@api/api' -export default (fileId, showFileName) => { - getFileInfo({ id: fileId }).then(res => { - if (res.success) { - const userId = store.getters.userInfo.id - const userName = store.getters.userInfo.username - const fileInfo = res.result || {} - const fullFilePathArr = fileInfo.url.split('/') - const fileName = fileInfo.fileName - const fileSuffix = fileName ? fileName.split('.')[fileName.split('.').length - 1] : '' - const filePath = `${fullFilePathArr[0]}/` - const fileDownloadUrl = `${window._CONFIG.onlyOfficeDownloadFileUrl}/${fileInfo.url}` - const url = `${window._CONFIG.onlyOfficeUrl}/editor?attId=${fileId}&userId=${userId}&userName=${userName}&filePath=${filePath}&fileName=${fileName}&oldFileName=${showFileName}&fileType=${fileSuffix}&key=${fileId}&fileUrl=${fileDownloadUrl}` - window.open(url, '_blank') +export default async (fileId, showFileName) => { + let fileInfo = {} + // 如果有fileId就从接口获取文件信息,否则打开默认模板 + if (fileId) { + fileInfo = await getFileInfoData(fileId) || {} + } else { + // 这个是福田现在的模板 + fileInfo = { + fileName: 'task_9ad64b01_top_9ad64b01_node.docx', + url: 'model/task_9ad64b01/task_9ad64b01_top_9ad64b01_node.docx"' } + } + // const userId = store.getters.userInfo.id + // const userName = store.getters.userInfo.username + const fullFilePathArr = fileInfo.url.split('/') + const fileName = fileInfo.fileName + const fileSuffix = fileName ? fileName.split('.')[fileName.split('.').length - 1] : '' + const filePath = `${fullFilePathArr[0]}/${fullFilePathArr[1]}/` + // 这会儿不用登录,先把关于用户信息的东西去掉 + // &userId=${userId}&userName=${userName} + const url = `${window._CONFIG.onlyOfficeUrl}/editor?attId=${fileInfo.id}&filePath=${filePath}&fileName=${fileName}&oldFileName=${showFileName}&fileType=${fileSuffix}&key=${fileId}&isEdit=123` + window.open(url, '_blank') +} + +const getFileInfoData = (id) => { + return new Promise(resolve => { + let fileInfo + getFileInfo({ id }).then(res => { + if (res.success) { + fileInfo = res.result + } + }).finally(() => { + resolve(fileInfo) + }) }) } diff --git a/src/components/layouts/TabLayout.vue b/src/components/layouts/TabLayout.vue index 182ac939..9d6a6dba 100644 --- a/src/components/layouts/TabLayout.vue +++ b/src/components/layouts/TabLayout.vue @@ -139,7 +139,7 @@ export default { methods: { // update-begin-author:sunjianlei date:20200120 for: 动态更改页面标题 changeTitle (title) { - const projectTitle = 'Jero-Boot 企业级快速开发平台' + const projectTitle = '中国重汽标准法规管理模块系统' // 首页特殊处理 if (this.$route.path === indexKey) { document.title = projectTitle diff --git a/src/components/layouts/UserLayout.vue b/src/components/layouts/UserLayout.vue index 88057031..37b6ce73 100644 --- a/src/components/layouts/UserLayout.vue +++ b/src/components/layouts/UserLayout.vue @@ -2,13 +2,13 @@
- -
- 合众未来 - HEZHONGWEILAI -
+ + + + + + +
diff --git a/src/components/page/GlobalHeader.vue b/src/components/page/GlobalHeader.vue index 26bee392..9be52332 100644 --- a/src/components/page/GlobalHeader.vue +++ b/src/components/page/GlobalHeader.vue @@ -17,7 +17,7 @@ :type="collapsed ? 'menu-unfold' : 'menu-fold'" @click="toggle"/> - 欢迎进入 Jero-Boot 平台 + 中国重汽标准法规管理模块系统 Jero-Boot @@ -192,9 +192,9 @@ export default { .header { z-index: 2; - color: white; + color: #1D2129; height: @height; - background-color: @primary-color; + background-color: white; transition: background 300ms; /* dark 样式 */ diff --git a/src/components/tools/Logo.vue b/src/components/tools/Logo.vue index 15c96f5d..e297537a 100644 --- a/src/components/tools/Logo.vue +++ b/src/components/tools/Logo.vue @@ -3,8 +3,8 @@ - logo - logo + +

{{ title }}

@@ -21,7 +21,7 @@ export default { props: { title: { type: String, - default: 'Jero-Boot Pro', + default: '研发云平台', required: false }, showTitle: { @@ -38,27 +38,34 @@ export default { } diff --git a/src/mixins/ConfigurableTableMixin.js b/src/mixins/ConfigurableTableMixin.js index 1f28c587..6747de0b 100644 --- a/src/mixins/ConfigurableTableMixin.js +++ b/src/mixins/ConfigurableTableMixin.js @@ -49,7 +49,6 @@ export const ConfigurableTableMixin = { loading: false, orderBy: '1', orderByField: '', - getTableHeaderData: null, // 获取表头数据的方法 operateMaxNum: 1, // 操作列的column operateColumn: { diff --git a/src/views/dashboard/Analysis.vue b/src/views/dashboard/Analysis.vue index 44d365de..3536235f 100644 --- a/src/views/dashboard/Analysis.vue +++ b/src/views/dashboard/Analysis.vue @@ -1,22 +1,21 @@ diff --git a/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue new file mode 100644 index 00000000..8adb5184 --- /dev/null +++ b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 750b03da..fde4d7c6 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -92,6 +92,17 @@ +