-
-
搜索
-
重置
+
@@ -118,7 +126,8 @@ export default {
total: 0
},
moveFile: true,
- isReserve: false
+ isReserve: false,
+ tabIndex: 0
}
},
mounted() {
@@ -134,17 +143,31 @@ export default {
handleNodeClick(data) {
if (data) {
this.currentCategory = data
- this.getViewTable()
+ if (this.currentCategory.isType !== 1) {
+ this.getViewTable()
+ } else {
+ this.tableDisplayFields = []
+ this.tableData = []
+ }
}
},
+ open() {
+ this.handleNodeClick()
+ this.getViewTable()
+ },
getViewTable() {
this.loading = true
this.tableDisplayFields = []
- console.log('this.collectLevel', this.currentCategory.arrangeType)
if (this.currentCategory.arrangeType === 1) {
this.currentLevel = 3
- } else {
+ } else if (this.currentCategory.arrangeType === 2) {
this.currentLevel = 2
+ } else {
+ if (this.tabIndex === 1) {
+ this.currentLevel = 2
+ } else {
+ this.currentLevel = 1
+ }
}
FetchInitCategoryViewTable({ categoryId: this.currentCategory.id, categoryLevel: this.currentLevel }).then((res) => {
if (res) {
@@ -182,16 +205,25 @@ export default {
this.loading = false
})
},
+ changeActiveTab(data) {
+ this.tabIndex = data
+ this.getViewTable()
+ this.moveSelections = []
+ },
clickRowHandler(row) {
this.moveSelections = []
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row)
- this.moveSelections.push(row)
+ // this.moveSelections.push(row)
},
selectionChangeHandler(selection, row) {
this.moveSelections = selection
},
handleComfireCollectMoveFile() {
+ console.log('this.collectLevel', this.collectLevel)
+ console.log('this.selectedCategory', this.selectedCategory)
+ console.log('this.selections', this.selections)
+ console.log(this.moveSelections)
if (this.moveSelections.length > 1) {
this.$message('该操作只可勾选唯一目标条目,请先确认!')
return false
@@ -201,7 +233,24 @@ export default {
} else if (this.currentCategory.arrangeType === 2) {
this.toCategoryLevel = 2
} else {
- this.toCategoryLevel = 1
+ console.log(this.collectLevel)
+ if (this.collectLevel === 3) {
+ if (this.moveSelections.length === 0) {
+ this.toCategoryLevel = 3
+ } else {
+ if (this.tabIndex === 1) {
+ this.toCategoryLevel = 2
+ } else {
+ this.toCategoryLevel = 3
+ }
+ }
+ } else {
+ if (this.tabIndex === 1) {
+ this.toCategoryLevel = 2
+ } else {
+ this.toCategoryLevel = 1
+ }
+ }
}
if (this.collectLevel === 2) {
if (this.toCategoryLevel === 3) {
@@ -209,16 +258,39 @@ export default {
return false
}
}
+ if (this.selectedCategory.id === this.currentCategory.id) {
+ this.$message('正在移动的档案只可移动到其他位置,不可选择本身!')
+ return false
+ }
const archivesIds = this.selections.map(item => item.id)
- const toArchivesIds = this.moveSelections.map(item => item.id)
+ // const toArchivesIds = this.moveSelections.map(item => item.id)
+ let toArchivesId
+ if (this.moveSelections.length === 0) {
+ toArchivesId = null
+ } else {
+ if (this.collectLevel === 3) {
+ console.log('this.tabIndex66', this.tabIndex)
+ if (this.tabIndex === 1) {
+ toArchivesId = this.moveSelections[0].id
+ } else {
+ if (this.selectedCategory.arrangeType === 1) {
+ toArchivesId = this.moveSelections[0].id
+ } else {
+ toArchivesId = null
+ }
+ }
+ } else {
+ toArchivesId = this.moveSelections[0].id
+ }
+ }
const params = {
- 'isReserve': this.isReserve, // 是否保留原条目
- 'categoryId': this.selectedCategory.id, // 门类id
- 'categoryLevel': this.collectLevel, // 门类级别
+ 'reserve': this.isReserve, // 是否保留原条目 true 保留 false 删除
+ 'categoryId': this.selectedCategory.id, // 需要移动的门类总id
+ 'categoryLevel': this.collectLevel, // 需要移动的门类级别
+ 'archivesIds': archivesIds, // 需要移动的档案id集合
'toCategoryId': this.currentCategory.id, // 移动到的门类id
'toCategoryLevel': this.toCategoryLevel, // 移动到的门类级别
- 'archivesIds': archivesIds, // 移动的档案id
- 'toArchivesIds': toArchivesIds // 移动到的档案id (选填)
+ 'toArchivesId': toArchivesId // 移动到的档案id (选填)
}
console.log(params)
FetchMove(params).then((res) => {
@@ -229,7 +301,7 @@ export default {
} else {
this.$message.error('移动失败')
}
- this.collectMoveFileVisible = false
+ this.handleCloseDialog()
})
},
handleSizeChange(size) {
@@ -249,6 +321,7 @@ export default {
this.$refs.table.clearSelection()
this.moveSelections = []
this.collectMoveFileVisible = false
+ this.isReserve = false
// 关闭弹框
// done()
}
@@ -288,8 +361,10 @@ export default {
width: 579px;
border-left: 1px solid #E6E8ED;
.head-search{
- padding: 20px 20px 0 0;
+ // padding: 0 20px 0 0;
+ flex: 1;
justify-content: flex-end;
+ margin-bottom: 0;
}
.table-list{
height: 440px;
@@ -324,6 +399,23 @@ export default {
}
}
}
+
+.collectMove-header{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20px 20px 20px 0;
+ .detail-tab .tab-nav{
+ margin: 0;
+ border-bottom: none;
+ }
+ .detail-tab .tab-nav li{
+ margin-right: 20px;
+ }
+ .detail-tab .tab-nav li.active-tab-nav{
+ padding-bottom: 0;
+ }
+}
.dialog-footer{
margin-top: 20px;
}
diff --git a/src/views/collectReorganizi/collectionLibrary/project/index.vue b/src/views/collectReorganizi/collectionLibrary/project/index.vue
index d8bc2c6..aaf4b34 100644
--- a/src/views/collectReorganizi/collectionLibrary/project/index.vue
+++ b/src/views/collectReorganizi/collectionLibrary/project/index.vue
@@ -10,6 +10,7 @@
:data="projectData"
highlight-current-row
style="width: 100%;"
+ height="calc(100vh - 418px)"
:row-key="rowKey"
:row-class-name="tableRowClassName"
@select-all="selectAll"