From 13bd9f17b0f044cc96c367bb9283465016359c62 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Fri, 17 Nov 2023 17:33:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=9B=86=E5=BA=93api=E8=B0=83?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/collect/collect.js | 38 +++- src/assets/styles/archives-manage.scss | 20 +- .../managementLibrary/anjuan/tableList.vue | 15 +- .../managementLibrary/index.vue | 20 +- .../managementLibrary/juannei/index.vue | 2 +- .../module/collectHeader.vue | 125 ++++++++++- .../managementLibrary/project/index.vue | 2 +- .../collectionLibrary/anjuan/content.vue | 6 +- .../collectionLibrary/anjuan/index.vue | 2 +- .../collectionLibrary/anjuan/tableList.vue | 37 ++-- .../collectionLibrary/file/index.vue | 11 +- .../collectionLibrary/index.vue | 85 ++++---- .../collectionLibrary/juannei/index.vue | 8 +- .../collectionLibrary/mixins/index.js | 7 +- .../module/collectHeader.vue | 201 ++++++++++++------ .../module/fourTest/index.vue | 2 +- .../collectionLibrary/project/index.vue | 19 +- src/views/components/category/PreviewForm.vue | 72 ++++--- 18 files changed, 473 insertions(+), 199 deletions(-) diff --git a/src/api/collect/collect.js b/src/api/collect/collect.js index 36bb34f..0bf080d 100644 --- a/src/api/collect/collect.js +++ b/src/api/collect/collect.js @@ -18,4 +18,40 @@ export function FetchInitCategoryView(params) { }) } -export default { FetchInitCategoryViewTable, FetchInitCategoryView } +// 添加项目/卷内/文件 +export function collectAdd(data) { + return request({ + url: 'api/collect/addArchives', + method: 'post', + data + }) +} + +// 添加项目/卷内/文件 +export function collectEdit(data) { + return request({ + url: 'api/collect/editArchives', + method: 'post', + data + }) +} + +// 删除 +export function collectDel(data) { + return request({ + url: 'api/collect/delArchives', + method: 'post', + data + }) +} + +// 根据门类父id获取卷内列表 +export function FetchDetailsById(params) { + return request({ + url: 'api/collect/getDetailsById', + method: 'get', + params + }) +} + +export default { collectAdd, collectEdit, collectDel, FetchInitCategoryViewTable, FetchInitCategoryView, FetchDetailsById } diff --git a/src/assets/styles/archives-manage.scss b/src/assets/styles/archives-manage.scss index 8d79861..80af257 100644 --- a/src/assets/styles/archives-manage.scss +++ b/src/assets/styles/archives-manage.scss @@ -938,13 +938,27 @@ } } +.collect-filter{ + display: flex; + // width: 360px; + height: 32px; + justify-content: flex-end; + .vue-treeselect{ + font-size: 12px; + margin-right: 10px !important; + .vue-treeselect__control{ + height: 33px !important; + } + } +} + .mangement-fixed-top{ - padding: 0 20px 10px 20px; + // padding: 0 20px 10px 20px; text-align: right; + flex: 1; color: #545B65; } - .drag-tip { display: block; padding-left: 20px; @@ -952,4 +966,4 @@ font-style: normal; font-weight: bold; font-size: 12px; -} \ No newline at end of file +} diff --git a/src/views/archivesManage/managementLibrary/anjuan/tableList.vue b/src/views/archivesManage/managementLibrary/anjuan/tableList.vue index ce6ebfd..f12da68 100644 --- a/src/views/archivesManage/managementLibrary/anjuan/tableList.vue +++ b/src/views/archivesManage/managementLibrary/anjuan/tableList.vue @@ -132,13 +132,19 @@ export default { data() { return { categoryId: 'F0F59CC713C83AE4BAB99B', - arcId: '256E752BC0280618840600' + arcId: '256E752BC0280618840600', + title: '' } }, watch: { selectedCategory: function(newValue, oldValue) { this.selections = [] this.$refs.table.clearSelection() + if (newValue.arrangeType === 1) { + this.title = '文件' + } else { + this.title = '案卷' + } }, tableDisplayFields(val) { this.doLayout() @@ -205,11 +211,16 @@ export default { // table - 当前选中得row clickRowHandler(row) { console.log('clickRowHandler', row) + if (this.selectedCategory.arrangeType === 1) { + this.title = '文件' + } else { + this.title = '案卷' + } if (this.timer) { clearTimeout(this.timer) } this.timer = setTimeout(() => { - this.openJuannei(row.archive_no) + this.openJuannei('所属' + this.title + ':' + row.archive_no) }, 300) this.selections = this.crud.selections }, diff --git a/src/views/archivesManage/managementLibrary/index.vue b/src/views/archivesManage/managementLibrary/index.vue index 1c2e3e0..9ab17a6 100644 --- a/src/views/archivesManage/managementLibrary/index.vue +++ b/src/views/archivesManage/managementLibrary/index.vue @@ -32,10 +32,11 @@ node-key="id" :expand-on-click-node="false" highlight-current + @node-click="handleNodeFilter" > - - {{ data.dictionaryName }} + + {{ data.dictionaryName || data.fondsName }} {{ data.dictionaryName }} @@ -195,7 +196,7 @@ export default { this.selectedCategory = val if (this.selectedCategory.isType !== 1) { - this.getInitArchivesClass(val.id) + this.getDictionaryTreeByCategoryId(val.id) } else { this.classifyTree = [] } @@ -222,18 +223,27 @@ export default { } }) }, - getInitArchivesClass(categoryId) { + getDictionaryTreeByCategoryId(categoryId) { this.classifyLoading = true const params = { 'categoryId': categoryId } FetchDictionaryTreeByCategoryId(params).then((res) => { - this.classifyTree = res + let fonds + if (res.fonds.length <= 1) { + fonds = [] + } else { + fonds = res.fonds + } + this.classifyTree = res.dictionarys.concat(fonds) this.classifyLoading = false }).catch(err => { console.log(err) }) }, + handleNodeFilter(val) { + console.log('val', val) + }, handleOpenAnjuan(data) { this.$refs.anjuanEle.anjuanDrawer = true // this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0 diff --git a/src/views/archivesManage/managementLibrary/juannei/index.vue b/src/views/archivesManage/managementLibrary/juannei/index.vue index 724aeb8..19f6386 100644 --- a/src/views/archivesManage/managementLibrary/juannei/index.vue +++ b/src/views/archivesManage/managementLibrary/juannei/index.vue @@ -195,7 +195,7 @@ export default { clearTimeout(this.timer) } this.timer = setTimeout(() => { - this.openFile(row.archive_no) + this.openFile('所属卷内:' + row.archive_no) }, 300) this.selections = this.crud.selections }, diff --git a/src/views/archivesManage/managementLibrary/module/collectHeader.vue b/src/views/archivesManage/managementLibrary/module/collectHeader.vue index ab32448..e0d43e9 100644 --- a/src/views/archivesManage/managementLibrary/module/collectHeader.vue +++ b/src/views/archivesManage/managementLibrary/module/collectHeader.vue @@ -1,14 +1,37 @@ @@ -167,6 +192,10 @@ diff --git a/src/views/collectReorganizi/collectionLibrary/module/fourTest/index.vue b/src/views/collectReorganizi/collectionLibrary/module/fourTest/index.vue index 436b87f..c0cac22 100644 --- a/src/views/collectReorganizi/collectionLibrary/module/fourTest/index.vue +++ b/src/views/collectReorganizi/collectionLibrary/module/fourTest/index.vue @@ -52,7 +52,7 @@ export default { }, mounted() { - console.log(this.tableData) + // console.log(this.tableData) }, methods: { handleComfireTest() { diff --git a/src/views/collectReorganizi/collectionLibrary/project/index.vue b/src/views/collectReorganizi/collectionLibrary/project/index.vue index 6dc529b..014ac9e 100644 --- a/src/views/collectReorganizi/collectionLibrary/project/index.vue +++ b/src/views/collectReorganizi/collectionLibrary/project/index.vue @@ -60,8 +60,8 @@ import { header, form } from '@crud/crud' import CollectHeader from '../module/collectHeader.vue' import ArchivesInfo from '../module/archivesInfo/index' -import tableData from '@/views/archivesManage/managementLibrary/anjuan/table.json' -import jsonData from '@/views/archivesManage/managementLibrary/anjuan/data.json' +// import tableData from '@/views/archivesManage/managementLibrary/anjuan/table.json' +// import jsonData from '@/views/archivesManage/managementLibrary/anjuan/data.json' export default { name: 'Project', components: { CollectHeader, ArchivesInfo }, @@ -91,19 +91,20 @@ export default { isTitleType: 2, categoryId: 'B073E8430B85B4821E7360', arcId: '2946C34412182B73FBC287', - activeIndex: '1' + activeIndex: '1', + selections: [] } }, watch: { selectedCategory: function(newValue, oldValue) { }, tableDisplayFields(val) { - this.doLayout() + // this.doLayout() } }, created() { - this.tableDisplayFields = tableData.data - this.projectData = jsonData.data.list.content + // this.tableDisplayFields = tableData.data + // this.projectData = jsonData.data.list.content }, mounted() { }, @@ -138,7 +139,7 @@ export default { if (this.timer) { clearTimeout(this.timer) } - console.log('tableDoubleClick', row) + // console.log('tableDoubleClick', row) this.arcId = row.id this.$refs.archivesInfo.detailTitle = '项目详情' this.$refs.archivesInfo.archivesInfoVisible = true @@ -147,12 +148,12 @@ export default { }, // table - 当前选中得row clickRowHandler(row) { - console.log('clickRowHandler', row) + // console.log('clickRowHandler', row) if (this.timer) { clearTimeout(this.timer) } this.timer = setTimeout(() => { - this.openAnjuan('所属项目' + row.archive_no) + this.openAnjuan('所属项目:' + row.archive_no) }, 300) this.selections = this.crud.selections }, diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue index f4bc797..36b6054 100644 --- a/src/views/components/category/PreviewForm.vue +++ b/src/views/components/category/PreviewForm.vue @@ -113,7 +113,8 @@