From 08610444d8ba39c670043083be3ae7a7bc4aba6c Mon Sep 17 00:00:00 2001
From: xuhuajiao <13476289682@163.com>
Date: Thu, 14 Dec 2023 17:29:44 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=9B=86=E5=BA=93-=E7=A7=BB=E5=8A=A8/?=
=?UTF-8?q?=E6=8F=92=E4=BB=B6/=E5=90=88=E5=8D=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/collect/collect.js | 12 +-
.../module/collectHeader.vue | 4 +-
.../module/collectMoveFile/index.vue | 100 ++++++--------
.../module/combineFile/index.vue | 2 +-
.../module/insertFile/index.vue | 128 ++++++++++++++----
5 files changed, 156 insertions(+), 90 deletions(-)
diff --git a/src/api/collect/collect.js b/src/api/collect/collect.js
index c1dfb54..1569eac 100644
--- a/src/api/collect/collect.js
+++ b/src/api/collect/collect.js
@@ -171,6 +171,15 @@ export function FetchMergeArchives(data) {
})
}
+// 插件
+export function FetchInsertSingle(data) {
+ return request({
+ url: 'api/collect/insertSingle',
+ method: 'post',
+ data
+ })
+}
+
export default {
collectAdd,
collectEdit,
@@ -188,5 +197,6 @@ export default {
FetchDoArchivesAdjust,
FetchArchivesAdjust,
FetchDisbandArchives,
- FetchMergeArchives
+ FetchMergeArchives,
+ FetchInsertSingle
}
diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
index 8b59926..005fcba 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
@@ -184,7 +184,7 @@
-
+
@@ -857,6 +857,8 @@ export default {
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
+ console.log(this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData)
+ this.$refs.insertFileRef.fileNoSelectionData = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData
this.$refs.insertFileRef.getInsertViewTable()
}).catch(() => {
})
diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue b/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue
index 8bf21d5..8a29623 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -8,8 +8,9 @@
-
-
+
+ 搜索
+ 重置
import CategoryTree from '@/views/components/categoryTree'
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect'
-import CRUD, { presenter, crud } from '@crud/crud'
-import rrOperation from '@crud/RR.operation'
export default {
name: 'CollectMoveFile',
- components: { CategoryTree, rrOperation },
- mixins: [presenter(), crud()],
- cruds() {
- return CRUD({
- url: 'api/category/menu',
- crudMethod: { },
- optShow: {
- add: false,
- edit: false,
- del: false,
- reset: true,
- download: false,
- group: false
+ components: { CategoryTree },
+ props: {
+ selectedCategory: {
+ type: Object,
+ default: function() {
+ return {}
}
- })
+ },
+ collectLevel: {
+ type: Number,
+ default: function() {
+ return null
+ }
+ },
+ selections: {
+ type: Array,
+ default: () => []
+ }
},
data() {
return {
- defaultProps: {
- children: 'children',
- label: 'cnName'
- },
query: {
- search: ''
+ search: null
},
currentCategory: null,
+ currentLevel: null,
collectMoveFileVisible: false,
loading: false,
arrySort: [],
tableData: [],
tableDisplayFields: [],
- selections: [],
+ moveSelections: [],
page: {
page: 1,
size: 10,
@@ -122,41 +121,16 @@ export default {
checkList: []
}
},
- created() {
- },
mounted() {
},
methods: {
+ resetQuery() {
+ this.query.search = null
+ this.getViewTableList()
+ },
getRowKey(row) {
return row.id
},
- opened() {
- this.refresh()
- },
- refresh() {
- if (this.$refs.treeMove) {
- let currentKey
- if (this.crud.data[0].isType === 1) {
- console.log(currentKey)
- currentKey = this.findNode(this.crud.data[0].children, (node) => {
- return node.isType !== 1
- })
- } else {
- currentKey = this.crud.data[0]
- }
- // 设置某个节点的当前选中状态
- this.$refs.treeMove.setCurrentKey(currentKey.id)
- this.$nextTick(() => {
- // 设置某个节点的父级展开
- const selectedKey = this.$refs.treeMove.getCurrentNode()
- if (this.$refs.treeMove.getNode(selectedKey) && this.$refs.treeMove.getNode(selectedKey).parent) {
- this.expandParents(this.$refs.treeMove.getNode(selectedKey).parent)
- }
- // 选中节点的门类详情
- this.handleMoveNodeClick(selectedKey)
- })
- }
- },
handleNodeClick(data) {
if (data) {
this.currentCategory = data
@@ -166,7 +140,13 @@ export default {
getViewTable() {
this.loading = true
this.tableDisplayFields = []
- FetchInitCategoryViewTable({ categoryId: this.currentCategory.id, categoryLevel: 3 }).then((res) => {
+ console.log('this.collectLevel', this.currentCategory.arrangeType)
+ if (this.currentCategory.arrangeType === 1) {
+ this.currentLevel = 3
+ } else {
+ this.currentLevel = 2
+ }
+ FetchInitCategoryViewTable({ categoryId: this.currentCategory.id, categoryLevel: this.currentLevel }).then((res) => {
if (res) {
this.arrySort = []
this.tableDisplayFields = res
@@ -188,7 +168,7 @@ export default {
this.loading = true
const params = {
'categoryId': this.currentCategory.id,
- 'categoryLevel': 3,
+ 'categoryLevel': this.currentLevel,
'search': this.query.search,
'page': this.page.page - 1,
'size': this.page.size
@@ -203,13 +183,13 @@ export default {
})
},
clickRowHandler(row) {
- this.selections = []
+ this.moveSelections = []
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row)
- this.selections.push(row)
+ this.moveSelections.push(row)
},
selectionChangeHandler(selection, row) {
- this.selections = selection
+ this.moveSelections = selection
},
handleComfireCollectMoveFile() {
this.collectMoveFileVisible = false
@@ -217,9 +197,11 @@ export default {
handleSizeChange(size) {
this.page.size = size
this.page.page = 1
+ this.getViewTableList()
},
handleCurrentPage(val) {
this.page.page = val
+ this.getViewTableList()
}
}
}
diff --git a/src/views/collectReorganizi/collectionLibrary/module/combineFile/index.vue b/src/views/collectReorganizi/collectionLibrary/module/combineFile/index.vue
index 61af5ae..ee33193 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/combineFile/index.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/combineFile/index.vue
@@ -73,7 +73,7 @@ export default {
this.$message.success('合卷成功')
this.$emit('close-dialog')
} else {
- this.$message.success('合卷失败')
+ this.$message.error('合卷失败')
}
this.combineFileVisible = false
})
diff --git a/src/views/collectReorganizi/collectionLibrary/module/insertFile/index.vue b/src/views/collectReorganizi/collectionLibrary/module/insertFile/index.vue
index fefb937..640bece 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/insertFile/index.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/insertFile/index.vue
@@ -1,13 +1,14 @@
-
+
-
- 搜索
+
+ 搜索
重置