From 0031aeb637ece742a31d4fac20241495e6808d68 Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Wed, 24 Jan 2024 16:51:14 +0800
Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E5=9C=A8=E7=BA=BF?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E7=9A=84=E6=9F=A5=E7=9C=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/ApproveBaseInfo.vue | 13 +-
.../modules/BaseInfoForm.vue | 12 +-
.../modules/CheckContentProcessModal.vue | 185 ++++++++++++++++++
.../modules/CommentModal.vue | 18 +-
.../modules/CommentObjectEnterBaseInfo.vue | 14 +-
.../modules/ConfirmWhetherCommentBaseInfo.vue | 13 +-
.../modules/DepartLiaisonCollectBaseInfo.vue | 13 +-
.../modules/DepartLiaisonIssueBaseInfo.vue | 13 +-
.../DepartLiaisonLeaderApproveBaseInfo.vue | 13 +-
...MainDrafterCollectUploadMinuteBaseInfo.vue | 6 +-
.../modules/OtherDrafterProofreadBaseInfo.vue | 13 +-
.../modules/ScorerMarkBaseInfo.vue | 13 +-
.../modules/StandardizationAuditBaseInfo.vue | 13 +-
13 files changed, 305 insertions(+), 34 deletions(-)
create mode 100644 src/views/workCenter/enterpriseStandardRevision/modules/CheckContentProcessModal.vue
diff --git a/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue b/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue
index d618bdc4..914e6810 100644
--- a/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue
@@ -47,6 +47,8 @@ import TextContentModal from '../../../businessSupport/askForAdvice/modules/Text
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { kkFilePreview } from '@/utils/kkFilePreview'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
+import { Base64 } from 'js-base64'
export default {
name: 'ApproveBaseInfo',
@@ -179,8 +181,15 @@ export default {
},
// 在线编辑的查看
onlineEditView () {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
- kkFilePreview(fileFullUrl)
+ queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
+ if (res.success) {
+ const file = res.result
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ window.open(url, '_blank')
+ }
+ })
}
}
}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue b/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue
index eaae9b79..a0564414 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/BaseInfoForm.vue
@@ -692,7 +692,17 @@ export default {
resultList.push(error)
})
if (resultList.every(tt => !tt)) {
- return true
+ // 实施日期需要比发布日期至少大15天
+ // 发布日期15天后的日期
+ const releaseDate = new Date(Date.parse(this.formInline.release_date))
+ const releaseDateAfter = releaseDate.setDate(releaseDate.getDate() + 15)
+ if (new Date(Date.parse(this.formInline.implementation_date)) <= releaseDateAfter) {
+ // 实施日期小于等于发布日期的15天后
+ this.$message.warning(this.$t('implementationNeedGreaterThan'))
+ return false
+ } else {
+ return true
+ }
}
return false
}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CheckContentProcessModal.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CheckContentProcessModal.vue
new file mode 100644
index 00000000..c02317b5
--- /dev/null
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/CheckContentProcessModal.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+ event.target.value = event.target.value.trim()"
+ v-decorator.trim="[ 'clause', validatorRules.clause ]" />
+
+
+ event.target.value = event.target.value.trim()"
+ v-decorator.trim="[ 'requirement', validatorRules.requirement ]" />
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue
index 4808f3f7..e09a53cb 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentModal.vue
@@ -65,6 +65,7 @@ import { previewPdf } from '@/utils/previewPdf'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { USER_INFO } from '../../../../store/mutation-types'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
const Base64 = require('js-base64').Base64
@@ -147,7 +148,7 @@ export default {
getFileInfo (fileId) {
return new Promise(resolve => {
let fileInfo
- getFileInfo({ id: fileId }).then(res => {
+ queryFileInfoByEditId({ id: fileId }).then(res => {
if (res.success) {
fileInfo = res.result
}
@@ -157,17 +158,10 @@ export default {
})
},
handlePreview (file) {
- const fileSuffix = file.fileName ? file.fileName.split('.')[file.fileName.split('.').length - 1].toLowerCase() : ''
- if (fileSuffix === 'pdf') {
- // pdf预览
- const url = previewPdf(file.id)
- this.iframeSrc = url
- } else if (fileSuffix === 'docx') {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
- // word文件仍使用KKFile进行预览
- const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
- this.iframeSrc = url
- }
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ this.iframeSrc = url
},
close () {
this.visible = false
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue
index d0c1c9a8..9f4573be 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue
@@ -55,6 +55,8 @@ import CommentModal from './CommentModal'
import Vue from 'vue'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
+import { Base64 } from 'js-base64'
export default {
name: 'CommentObjectEnterBaseInfo',
@@ -121,6 +123,7 @@ export default {
}
],
dataSource: [],
+ documentUrl: window._CONFIG.documentUrl,
onEditFile: '' // 在线编辑的文件id
}
},
@@ -207,8 +210,15 @@ export default {
},
// 在线编辑的查看
onlineEditView () {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
- kkFilePreview(fileFullUrl)
+ queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
+ if (res.success) {
+ const file = res.result
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ window.open(url, '_blank')
+ }
+ })
}
}
}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue
index eccab43a..571dee82 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/ConfirmWhetherCommentBaseInfo.vue
@@ -64,6 +64,8 @@ import UserSelection from '@/components/selection/UserSelection'
import Vue from 'vue'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
+import { Base64 } from 'js-base64'
export default {
name: 'ConfirmWhetherCommentBaseInfo',
components: { BaseInfoForm, UserSelection },
@@ -128,8 +130,15 @@ export default {
},
// 在线编辑的查看
onlineEditView () {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
- kkFilePreview(fileFullUrl)
+ queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
+ if (res.success) {
+ const file = res.result
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ window.open(url, '_blank')
+ }
+ })
}
}
}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue
index 994c6819..dd01a98e 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue
@@ -73,6 +73,8 @@ import UserSelection from '@/components/selection/UserSelection'
import Vue from 'vue'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
+import { Base64 } from 'js-base64'
export default {
name: 'DepartLiaisonCollectBaseInfo',
@@ -236,8 +238,15 @@ export default {
},
// 在线编辑的查看
onlineEditView () {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
- kkFilePreview(fileFullUrl)
+ queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
+ if (res.success) {
+ const file = res.result
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ window.open(url, '_blank')
+ }
+ })
}
}
}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue
index c2a22190..f0984468 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonIssueBaseInfo.vue
@@ -63,6 +63,8 @@ import UserSelectByWorkGroup from '@/components/selection/UserSelectByWorkGroup'
import Vue from 'vue'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
+import { Base64 } from 'js-base64'
export default {
name: 'DepartLiaisonIssueBaseInfo',
@@ -147,8 +149,15 @@ export default {
},
// 在线编辑的查看
onlineEditView () {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
- kkFilePreview(fileFullUrl)
+ queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
+ if (res.success) {
+ const file = res.result
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ window.open(url, '_blank')
+ }
+ })
}
}
}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue
index 3d2f9d58..6702325c 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue
@@ -55,6 +55,8 @@ import CommentModal from './CommentModal'
import Vue from 'vue'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
+import { Base64 } from 'js-base64'
export default {
name: 'DepartLiaisonLeaderApproveBaseInfo',
@@ -217,8 +219,15 @@ export default {
},
// 在线编辑的查看
onlineEditView () {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
- kkFilePreview(fileFullUrl)
+ queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
+ if (res.success) {
+ const file = res.result
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ window.open(url, '_blank')
+ }
+ })
}
}
}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue
index 0bb78396..0d16f8ab 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectUploadMinuteBaseInfo.vue
@@ -161,7 +161,7 @@
-
+
@@ -171,7 +171,6 @@
import BaseInfoForm from './BaseInfoForm'
import UserSelection from '@/components/selection/UserSelection'
import JTable from '@/components/jero/JTable'
-import CheckContentModal from '@/views/enterpriseStandardLibrary/standard/modules/CheckContentModal'
import UploadFile from '@/components/UploadFile'
import Vue from 'vue'
import { previewPdf } from '@/utils/previewPdf'
@@ -179,6 +178,7 @@ import { downloadFile, getFileAccessHttpUrl } from '@/api/manage'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { onlineEditor } from '../../../../utils/onlyOfficeUtils'
+import CheckContentProcessModal from './CheckContentProcessModal'
// 支持预览的文件后缀
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
@@ -187,7 +187,7 @@ const FILE_TYPE_PDF = 'pdf'
export default {
name: 'MainDrafterCollectUploadMinuteBaseInfo',
- components: { BaseInfoForm, UserSelection, JTable, CheckContentModal, UploadFile },
+ components: { CheckContentProcessModal, BaseInfoForm, UserSelection, JTable, UploadFile },
props: {
disabled: {
type: Boolean,
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue
index f19d6929..7ff91050 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/OtherDrafterProofreadBaseInfo.vue
@@ -23,6 +23,8 @@ import BaseInfoForm from './BaseInfoForm'
import Vue from 'vue'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
+import { Base64 } from 'js-base64'
export default {
name: 'OtherDrafterProofreadBaseInfo',
components: { BaseInfoForm },
@@ -48,8 +50,15 @@ export default {
},
// 在线编辑的查看
onlineEditView () {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
- kkFilePreview(fileFullUrl)
+ queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
+ if (res.success) {
+ const file = res.result
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ window.open(url, '_blank')
+ }
+ })
}
}
}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue
index 900d32bc..f60b06da 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/ScorerMarkBaseInfo.vue
@@ -38,6 +38,8 @@ import BaseInfoForm from './BaseInfoForm'
import { kkFilePreview } from '@/utils/kkFilePreview'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
+import { Base64 } from 'js-base64'
const fixDataSourse = [
{
id: 1,
@@ -396,8 +398,15 @@ export default {
},
// 在线编辑的查看
onlineEditView () {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
- kkFilePreview(fileFullUrl)
+ queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
+ if (res.success) {
+ const file = res.result
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ window.open(url, '_blank')
+ }
+ })
}
}
}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue
index a328c801..a55c71c7 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/StandardizationAuditBaseInfo.vue
@@ -118,6 +118,8 @@ import UserSelection from '@/components/selection/UserSelection'
import Vue from 'vue'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
+import { queryFileInfoByEditId } from '../../../../api/workCenter'
+import { Base64 } from 'js-base64'
export default {
name: 'StandardizationAuditBaseInfo',
@@ -219,8 +221,15 @@ export default {
},
// 在线编辑的查看
onlineEditView () {
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${this.onEditFile}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.onEditFile_dictText}`
- kkFilePreview(fileFullUrl)
+ queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
+ if (res.success) {
+ const file = res.result
+ const filePaths = file.filePath.split('/')
+ const fileName = filePaths[filePaths.length - 1]
+ const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
+ window.open(url, '_blank')
+ }
+ })
}
}
}