@@ -88,7 +88,8 @@ export default {
archivesTabIndex: 0,
archivesDetailsData: [],
archivesDetailsMetadata: [],
- xml_show: null
+ xml_show: null,
+ isShowUtilizeHandleBtn: false
}
},
computed: {
diff --git a/src/views/components/archivesDetail/uploadFile/index.vue b/src/views/components/archivesDetail/uploadFile/index.vue
index c1e69cf..e1f9eb5 100644
--- a/src/views/components/archivesDetail/uploadFile/index.vue
+++ b/src/views/components/archivesDetail/uploadFile/index.vue
@@ -63,16 +63,15 @@
-
-
+
@@ -122,6 +121,7 @@ import { FetchInitFileCategoryView } from '@/api/collect/collect'
import { archivesUpload } from '@/utils/upload'
import { downloadFile, getCurrentTime } from '@/utils/index'
import { mapGetters } from 'vuex'
+import { FetchIsAuthByLookType } from '@/api/archivesManage/library'
// import Sortable from 'sortablejs'
export default {
name: 'UploadFile',
@@ -149,6 +149,16 @@ export default {
default: function() {
return ''
}
+ },
+ isShowUtilizeHandleBtn: {
+ type: Boolean,
+ default: false
+ },
+ archivesDetailsData: {
+ type: Array,
+ default: function() {
+ return []
+ }
}
},
data() {
@@ -169,7 +179,14 @@ export default {
filePath: '', // 附件 - path
px: '', // 附件 - 分辨率
nowDate: '', // 当前时间
- previewSrc: '' // 查看大图src
+ previewSrc: '', // 查看大图src
+ authUtilize: {
+ 'look': false,
+ 'download': false,
+ 'print': false,
+ 'endTime': null,
+ 'startTime': null
+ }
}
},
computed: {
@@ -181,10 +198,32 @@ export default {
arcId: function(newValue, oldValue) {
}
},
+ mounted() {
+ this.getIsAuthByLookType()
+ console.log('archivesDetailsData', this.archivesDetailsData)
+ },
methods: {
- toPreview() {
- const routeData = this.$router.resolve({ path: '/preview' })
+ getIsAuthByLookType() {
+ const params = {
+ 'archivesId': this.arcId
+ }
+ FetchIsAuthByLookType(params).then(res => {
+ this.authUtilize = res
+ })
+ },
+ toPreview(row) {
+ const routeData = this.$router.resolve({
+ path: '/preview',
+ query: {
+ 'archiveNo': this.archivesDetailsData.find(item => item.fieldName === 'archive_no').context
+ }})
window.open(routeData.href, '_blank')
+ if (localStorage.getItem('documentId')) {
+ localStorage.removeItem('documentId')
+ }
+ // localStorage.setItem('fileParentInfo', JSON.stringify(this.archivesDetailsData))
+ localStorage.setItem('fileTables', JSON.stringify(this.tableData))
+ localStorage.setItem('fileCurrent', JSON.stringify(row))
},
getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB'
diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue
index f112ae0..e677a7a 100644
--- a/src/views/components/category/PreviewForm.vue
+++ b/src/views/components/category/PreviewForm.vue
@@ -1,4 +1,5 @@
+
@@ -73,14 +74,27 @@
-
-
-
+
+
+
有
无
+
@@ -233,7 +247,9 @@ export default {
mergeFileArcIds: null,
mergeFileCategory: null,
archivesType: null,
- activeIndex: null
+ activeIndex: null,
+ entityIndex: null,
+ fileList: []
}
},
computed: {
@@ -691,6 +707,7 @@ export default {
// 动态生成表单
editFormRow() {
this.rules = {}
+ this.entityIndex = this.formPreviewData.findIndex(item => item.fieldName === 'is_entity')
// if (this.isDesFormType === 'prearchiveLibrary' && this.archivesType === 'add') {
// this.$set(this.addOrUpdateForm, 'fileOriginal', null)
// }
@@ -928,6 +945,85 @@ export default {
}
})
},
+ async changeAiFile(e) {
+ const selectedFiles = Array.from(e.target.files)
+ const imageFiles = selectedFiles.filter(file => file.type.startsWith('image/'))
+ const nonImageFiles = selectedFiles.filter(file => !file.type.startsWith('image/'))
+
+ // 检查已有文件类型
+ const existingImageFiles = this.fileList.filter(item => item.formatType === 'image')
+ const existingNonImageFiles = this.fileList.filter(item => item.formatType !== 'image')
+
+ // 若已有图片文件,此次只能上传图片;若已有非图片文件,此次只能上传非图片文件
+ if (existingImageFiles.length > 0 && nonImageFiles.length > 0) {
+ this.$message.error('已有图片文件,此次只能上传图片文件')
+ return
+ }
+ if (existingNonImageFiles.length > 0 && imageFiles.length > 0) {
+ this.$message.error('已有非图片文件,此次只能上传非图片文件')
+ return
+ }
+
+ // 计算剩余可上传数量
+ const remainingImageSlots = 3 - existingImageFiles.length
+ const remainingNonImageSlots = 1 - existingNonImageFiles.length
+
+ // 检查图片文件数量
+ if (imageFiles.length > remainingImageSlots) {
+ this.$message.error(`图片文件最多还能选择 ${remainingImageSlots} 个`)
+ return
+ }
+
+ // 检查非图片文件数量
+ if (nonImageFiles.length > remainingNonImageSlots) {
+ this.$message.error(`非图片文件最多还能选择 ${remainingNonImageSlots} 个`)
+ return
+ }
+
+ const validFiles = imageFiles.length > 0 ? imageFiles : nonImageFiles
+
+ for (const file of validFiles) {
+ // 检查文件是否已存在
+ if (this.fileList.some(item => item.name === file.name)) {
+ this.$message.warning(`文件 ${file.name} 已存在,请勿重复上传`)
+ continue
+ }
+
+ const fileInfo = {
+ file: file,
+ size: file.size,
+ formatType: file.type.substring(0, file.type.indexOf('/')),
+ name: file.name,
+ postfix: file.name.substring(
+ file.name.lastIndexOf('.') + 1,
+ file.name.length
+ ),
+ px: ''
+ }
+
+ if (fileInfo.formatType === 'image') {
+ const fileBase64 = await this.getBase64(file)
+ const res = await this.getImgPx(fileBase64)
+ fileInfo.px = res.width + 'px*' + res.height + 'px'
+ }
+
+ this.fileList.push(fileInfo)
+
+ // 上传附件
+ // reDocumentUpload(this.baseApi + '/api/re-document/uploadFile', file, this.selectedDocument.id).then(res => {
+ // if (res.data.code === 200) {
+ // this.filePath = res.data.data;
+ // this.uploadSave();
+ // }
+ // });
+ }
+ },
+ deleteFile(item) {
+ const index = this.fileList.indexOf(item)
+ if (index !== -1) {
+ this.fileList.splice(index, 1)
+ }
+ },
// 上传附件 - 选择上传即保存
uploadSave() {
this.nowDate = getCurrentTime()
diff --git a/src/views/components/echarts/graph.vue b/src/views/components/echarts/graph.vue
index e0695b5..0ebe5e3 100644
--- a/src/views/components/echarts/graph.vue
+++ b/src/views/components/echarts/graph.vue
@@ -11,15 +11,12 @@
>
-
- {{ node.size }}
+
+ {{ node.text }}
-
节点名称:{{ currentNode.text }}
@@ -33,7 +30,7 @@