diff --git a/src/views/AIAssistant/AIDigitalHuman/index.vue b/src/views/AIAssistant/AIDigitalHuman/index.vue index b6ff49b..11d3420 100644 --- a/src/views/AIAssistant/AIDigitalHuman/index.vue +++ b/src/views/AIAssistant/AIDigitalHuman/index.vue @@ -29,14 +29,14 @@
- +
{{ word }}
深度思考
- 发送 + 发送
@@ -244,7 +244,8 @@ export default { font-size: 16px; line-height: 24px; border: none; - padding: 20px; + padding: 0 20px; + margin: 20px 0; color: #fff; background-color: transparent; } @@ -464,4 +465,8 @@ export default { border-radius: 12px; padding: 0 !important; } +::v-deep .el-textarea__inner { + resize: none; + border: none; +} diff --git a/src/views/AIAssistant/AIIntelligentCoding/aiForm copy.vue b/src/views/AIAssistant/AIIntelligentCoding/aiForm copy.vue deleted file mode 100644 index e90c928..0000000 --- a/src/views/AIAssistant/AIIntelligentCoding/aiForm copy.vue +++ /dev/null @@ -1,294 +0,0 @@ - - - - - diff --git a/src/views/AIAssistant/AIIntelligentCoding/aiForm.vue b/src/views/AIAssistant/AIIntelligentCoding/aiForm.vue index 680d063..6366da4 100644 --- a/src/views/AIAssistant/AIIntelligentCoding/aiForm.vue +++ b/src/views/AIAssistant/AIIntelligentCoding/aiForm.vue @@ -14,11 +14,11 @@ - 保存 + 保存
-
+
@@ -49,7 +49,7 @@
-
+
@@ -73,7 +73,14 @@
-

{{ fileName }}

+
+

{{ fileName }}

+ 解析中... +
+ 600KB + 约2.9万字 +
+
- +
@@ -94,14 +101,14 @@
-
+
@@ -129,6 +136,7 @@ export default { data() { return { formTitle: '', + formType: 1, formVisible: false, editorRef: 'test', editorContent: '', @@ -140,16 +148,17 @@ export default { }, isCollapsed: false, inputValue: '', - imageUrl: '', fileName: '', - isImage: false, fileType: '', message: [], controller: null, arequestData: { model: 'deepseek-r1:14b', messages: [] - } + }, + isUploading: false, + progress: 0, + animationDuration: 0 } }, computed: { @@ -191,11 +200,42 @@ export default { } this.fileType = file.type - this.isImage = false this.fileName = file.name - this.imageUrl = '' + this.isUploading = true + this.progress = 0 // 这种情况前端就给个提示:您上传的文件不是纯文本格式,暂不支持解析 + + // const startTime = Date.now() + // const formData = new FormData() + // formData.append('file', file) + + // try { + // // 发送文件上传请求 + // const response = await axios.post('/upload', formData, { + // headers: { + // 'Content-Type': 'multipart/form-data' + // } + // }) + + // const endTime = Date.now() + // const uploadTime = (endTime - startTime) / 1000 + // this.animationDuration = uploadTime + + // // 处理上传成功的逻辑 + // this.$message.success('文件上传成功') + // } catch (error) { + // // 处理上传失败的逻辑 + // this.$message.error('文件上传失败') + // } finally { + // this.isUploading = false + // } + + const uploadTime = 2 + this.animationDuration = uploadTime + setTimeout(() => { + this.isUploading = false + }, uploadTime * 1000) } }, async handleMessage(e) { @@ -326,10 +366,12 @@ export default { this.editorContent = talkContent }, deleteFile() { - this.imageUrl = '' this.fileName = '' this.fileType = '' - this.isImage = false + // 清空 input type="file" 的数据 + if (this.$refs.fileInput) { + this.$refs.fileInput.value = '' + } }, handleCloseForm() { this.inputValue = '' @@ -341,7 +383,32 @@ export default { this.$refs.form.validate(valid => { if (valid) { console.log('保存数据', this.form) - this.handleCloseForm() + + this.$confirm('此操作将发布当前编研主题' + '你是否还要继续?', '提示', { + confirmButtonText: '继续', + cancelButtonText: '取消', + type: 'warning', + dangerouslyUseHTMLString: true + }).then(() => { + // const ids = data.map(item => item.id) + // const params = { + // 'ids': ids, + // 'operator': this.user.username + // } + // crudEditing.del(params).then((res) => { + // console.log(res) + // if (res.code !== 500) { + // this.$message({ message: '删除成功', type: 'success', offset: 8 }) + // } else { + // this.$message({ message: res.message, type: 'error', offset: 8 }) + // } + // this.initData() + // }).catch(err => { + // console.log(err) + // }) + this.handleCloseForm() + }).catch(() => { + }) } }) }, @@ -459,10 +526,22 @@ export default { } } .upload-use-file{ + position: relative; width: 200px; background-color: rgba(0,0,0,.04); border-radius: 6px; margin-bottom: 10px; + &::after{ + content: ''; + position: absolute; + top: 0; + left: 0; + width: 0; + height: 100%; + background-color: rgba(0,0,0,.06); + border-radius: 6px; + } + img{ display: block; width: 60px; @@ -478,8 +557,28 @@ export default { font-size: 12px; padding: 10px; cursor: pointer; - p{ + + .file-right-info{ margin-left: 10px; + line-height: 26px; + p{ + font-size: 14px; + color: #000; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + } + span{ + color: rgba(0,0,0,.3); + } + .file-info{ + span{ + font-size: 12px; + padding-right: 4px; + } + } } .delt-file{ display: none; @@ -514,7 +613,6 @@ export default { padding: 0 !important; resize: none; border: none; - } .ai-form-btn{ display: flex; @@ -542,7 +640,11 @@ export default { ::-webkit-scrollbar-thumb { background-color:rgba(0,0,0,.1); } + } + ::v-deep .v-note-wrapper{ + width: 100% !important; + min-height: auto !important; } } .get-content-style{ @@ -564,4 +666,23 @@ export default { cursor: pointer; } } +.upload-use-file.animate-after{ + &::after{ + animation: load var(--animation-duration) forwards; + } +} +@keyframes load { + from { + width: 0; + } + to { + width: 100%; + } +} + +.el-form{ + display: flex; + justify-content: space-between; + align-items: flex-start; +} diff --git a/src/views/AIAssistant/AIIntelligentCoding/index.vue b/src/views/AIAssistant/AIIntelligentCoding/index.vue index d4d958e..11ba175 100644 --- a/src/views/AIAssistant/AIIntelligentCoding/index.vue +++ b/src/views/AIAssistant/AIIntelligentCoding/index.vue @@ -49,98 +49,41 @@ - - + - + + - +
-
- -
    -
  • AI编研正文
  • -
  • AI文档附件
  • -
-
- - - +
+
+

专题名称:{{ onlineContent && onlineContent.title }}

+

编研类型:{{ onlineContent && onlineContent.type }}

- - - - - - - - - - - - - - +
- -
@@ -148,11 +91,8 @@ import CRUD, { presenter, crud } from '@crud/crud' import crudEditing from '@/api/archiveUtilize/archiveEditing' import pagination from '@crud/Pagination' -// import DateRangePicker from '@/components/DateRangePicker' import crudOperation from '@crud/CRUD.operation' -// import eForm from '../../archiveUtilize/archiveEditing/form.vue' import aiForm from './aiForm' -// import EditingDetail from './module/detail' import { mapGetters } from 'vuex' export default { @@ -238,38 +178,38 @@ export default { if (type === 1) { this.$refs.aiForm.formTitle = '新增AI编研' } else { - this.$refs.aiForm.formTitle = '新增AI编研' - this.$refs.aiForm.form = { - 'id': row.id, - 'title': row.title, - 'editor1': row.editor1, - 'editor2': row.editor2, - 'researchType': row.researchType, - 'startTime': row.startTime, - 'endTime': row.endTime, - 'remarks': row.remarks - } - if (row.editor1) { - var usernames = row.editor1.split(',') - var matchedItems = [] - for (var i = 0; i < this.$refs.aiForm.userTable.length; i++) { - if (usernames.includes(this.$refs.aiForm.userTable[i].username)) { - matchedItems.push(this.$refs.aiForm.userTable[i]) - } - } - this.$refs.aiForm.userMainSelected = matchedItems - } + this.$refs.aiForm.formTitle = '编辑AI编研' + // this.$refs.aiForm.form = { + // 'id': row.id, + // 'title': row.title, + // 'editor1': row.editor1, + // 'editor2': row.editor2, + // 'researchType': row.researchType, + // 'startTime': row.startTime, + // 'endTime': row.endTime, + // 'remarks': row.remarks + // } + // if (row.editor1) { + // var usernames = row.editor1.split(',') + // var matchedItems = [] + // for (var i = 0; i < this.$refs.aiForm.userTable.length; i++) { + // if (usernames.includes(this.$refs.aiForm.userTable[i].username)) { + // matchedItems.push(this.$refs.aiForm.userTable[i]) + // } + // } + // this.$refs.aiForm.userMainSelected = matchedItems + // } - if (row.editor2) { - var usernames2 = row.editor2.split(',') - var matchedItems2 = [] - for (var j = 0; j < this.$refs.aiForm.userTable.length; j++) { - if (usernames2.includes(this.$refs.aiForm.userTable[j].username)) { - matchedItems2.push(this.$refs.aiForm.userTable[j]) - } - } - this.$refs.aiForm.userOtherSelected = matchedItems2 - } + // if (row.editor2) { + // var usernames2 = row.editor2.split(',') + // var matchedItems2 = [] + // for (var j = 0; j < this.$refs.aiForm.userTable.length; j++) { + // if (usernames2.includes(this.$refs.aiForm.userTable[j].username)) { + // matchedItems2.push(this.$refs.aiForm.userTable[j]) + // } + // } + // this.$refs.aiForm.userOtherSelected = matchedItems2 + // } } this.$refs.aiForm.formType = type this.$refs.aiForm.formVisible = true @@ -281,39 +221,32 @@ export default { type: 'warning', dangerouslyUseHTMLString: true }).then(() => { - const ids = data.map(item => item.id) - const params = { - 'ids': ids, - 'operator': this.user.username - } - crudEditing.del(params).then((res) => { - console.log(res) - if (res.code !== 500) { - this.$message({ message: '删除成功', type: 'success', offset: 8 }) - } else { - this.$message({ message: res.message, type: 'error', offset: 8 }) - } - this.initData() - }).catch(err => { - console.log(err) - }) + // const ids = data.map(item => item.id) + // const params = { + // 'ids': ids, + // 'operator': this.user.username + // } + // crudEditing.del(params).then((res) => { + // console.log(res) + // if (res.code !== 500) { + // this.$message({ message: '删除成功', type: 'success', offset: 8 }) + // } else { + // this.$message({ message: res.message, type: 'error', offset: 8 }) + // } + // this.initData() + // }).catch(err => { + // console.log(err) + // }) }).catch(() => { }) }, clickRowHandler(row) { this.$refs.table.toggleRowSelection(row) }, - // tableDoubleClick(row) { - // // this.currentResearch = row - // // this.$refs.editingDetail.archivesTabIndex = 0 - // // this.$refs.editingDetail.getDetail(row) - // // this.$refs.editingDetail.editingDetailVisible = true - // }, tableDoubleClick(row) { - this.onlineTabIndex = 0 this.currentResearchOnline = row this.onlineEditDetail = true - this.onlineContent = `` + this.onlineContent = '' // const params = { // 'researchOnlineId': row.id // } @@ -325,68 +258,15 @@ export default { // }) }, handleCloseDialog(done) { - this.lendDetail = false this.onlineEditDetail = false - }, - // changeMy(val) { - // if (val) { - // this.crud.query.participants = this.user.username - // } else { - // this.crud.query.participants = '' - // } - // this.crud.toQuery() - // }, - changeOnlineTab(data) { - this.onlineTabIndex = data - if (this.onlineTabIndex === 1) { - // const paramsFile = { - // 'researchOnlineId': this.currentResearchOnline.id, - // 'page': 0, - // 'size': 10 - // } - // console.log('paramsFile', paramsFile) - // FetchInitResearchOnlineFileList(paramsFile).then((res) => { - // console.log(res) - // this.detailArcData = res.content - // }).catch(err => { - // console.log(err) - // }) - this.detailArcData = [ - { - 'id': '4028e3c38d67ac83018d680836c2000f', - 'onlineId': '4028e3c38d67ac83018d6807660b000d', - 'fileName': 'AI赋能档案管理的研究与展望.docx', - 'fileType': 'docx', - 'fileSize': 147535, - 'filePath': '/researchOnlineFile/4028e3c38d67ac83018d680560230004/4028e3c38d67ac83018d6807660b000d/d2d41cf5-9b2d-4f2f-bc1b-f00e7c1a3962.zip', - 'create_by': 'admin', - 'update_by': 'admin', - 'create_time': 1706847385000, - 'update_time': 1706847385000 - }, - { - 'id': '4028e3c38d67ac83018d680817fa000e', - 'onlineId': '4028e3c38d67ac83018d6807660b000d', - 'fileName': 'AI赋能档案管理的研究与展望.pdf', - 'fileType': 'pdf', - 'fileSize': 176996, - 'filePath': '/researchOnlineFile/4028e3c38d67ac83018d680560230004/4028e3c38d67ac83018d6807660b000d/3e308a02-a7e9-4e45-97b3-cb659c994221.zip', - 'create_by': 'admin', - 'update_by': 'admin', - 'create_time': 1706847377000, - 'update_time': 1706847377000 - } - ] - } - }, - getFileSize(fileSize) { - const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB' - const fileSizeInB = fileSize + 'B' - return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB } } } diff --git a/src/views/AIAssistant/AIknowledgeGraph/index.vue b/src/views/AIAssistant/AIknowledgeGraph/index.vue index e40df67..51b2754 100644 --- a/src/views/AIAssistant/AIknowledgeGraph/index.vue +++ b/src/views/AIAssistant/AIknowledgeGraph/index.vue @@ -35,8 +35,7 @@
- - +
@@ -139,22 +138,26 @@ export default { if (val) { localStorage.setItem('currentArchivesKey', JSON.stringify(val)) this.selectedCategory = val - // this.selectedCategory.cnName - const parmas = { - 'searchKey': 'id', // id / title - 'searchValue': 'E0B3627CBED49E53609245', - 'tableName': 'Category' // 节点名称 - } - FetchInitShowByCategory(parmas).then((res) => { - console.log(res) - this.graphData = res - }).catch(err => { - console.log(err) - }) - // this.$nextTick(() => { - // }) + // this.getOrigionGraphData('E0B3627CBED49E53609245', 'Category') + + this.$refs.graphRefs.getOrigionGraphData(null, 'E0B3627CBED49E53609245', 'Category') } }, + getOrigionGraphData(id, tableName) { + // this.selectedCategory.cnName + // E0B3627CBED49E53609245 + const parmas = { + 'searchKey': 'id', // id / title + 'searchValue': id, + 'tableName': tableName // 节点名称 + } + FetchInitShowByCategory(parmas).then((res) => { + console.log(res) + this.graphData = res + }).catch(err => { + console.log(err) + }) + }, filterData(data) { return data.filter(node => { if (node.children && node.children.length > 0) { diff --git a/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue b/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue index ade1083..ded96ae 100644 --- a/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue +++ b/src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue @@ -1,6 +1,10 @@