|
|
@ -241,46 +241,57 @@ export default { |
|
|
|
this.toCategoryLevel = 2 |
|
|
|
} else { |
|
|
|
// 项目内 |
|
|
|
// 需要移动的门类级别 |
|
|
|
console.log('this.collectLevel', this.collectLevel) |
|
|
|
if (this.collectLevel === 3) { |
|
|
|
// 卷内级 |
|
|
|
// 选择了项目门类,但是没选文件,则进入未整理的,即文件级 |
|
|
|
if (this.moveSelections.length === 0) { |
|
|
|
this.toCategoryLevel = 3 |
|
|
|
} else { |
|
|
|
// 有指定的目标,案卷列表tab |
|
|
|
if (this.tabIndex === 1) { |
|
|
|
this.toCategoryLevel = 2 |
|
|
|
} else { |
|
|
|
this.toCategoryLevel = 3 |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 案卷级 |
|
|
|
if (this.tabIndex === 1) { |
|
|
|
this.toCategoryLevel = 2 |
|
|
|
} else { |
|
|
|
this.toCategoryLevel = 1 |
|
|
|
} |
|
|
|
} |
|
|
|
this.toCategoryLevel = 2 |
|
|
|
// // 需要移动的门类级别 |
|
|
|
// if (this.collectLevel === 3) { |
|
|
|
// console.log('444') |
|
|
|
// // 卷内级 |
|
|
|
// // 选择了项目门类,但是没选文件,则进入未整理的,即文件级 |
|
|
|
// if (this.moveSelections.length === 0) { |
|
|
|
// this.toCategoryLevel = 3 |
|
|
|
// console.log('555') |
|
|
|
// } else { |
|
|
|
// console.log('666') |
|
|
|
// // 有指定的目标,案卷列表tab |
|
|
|
// if (this.tabIndex === 1) { |
|
|
|
// this.toCategoryLevel = 2 |
|
|
|
// console.log('777') |
|
|
|
// } else { |
|
|
|
// this.toCategoryLevel = 3 |
|
|
|
// console.log('888') |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// console.log('999') |
|
|
|
// // 案卷级 |
|
|
|
// if (this.tabIndex === 1) { |
|
|
|
// console.log('10') |
|
|
|
// this.toCategoryLevel = 2 |
|
|
|
// } else { |
|
|
|
// console.log('11') |
|
|
|
// this.toCategoryLevel = 1 |
|
|
|
// } |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
if (this.collectLevel === 2) { |
|
|
|
if (this.toCategoryLevel === 3) { |
|
|
|
this.$message({ message: '案卷不可移动到文件级,请先确认!', offset: 8 }) |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('parentsId', this.parentsId) |
|
|
|
console.log('this.currentCategory', this.currentCategory) |
|
|
|
console.log('this.collectLevel', this.collectLevel) |
|
|
|
console.log('this.toCategoryLevel', this.toCategoryLevel) |
|
|
|
console.log('this.selections', this.selections) |
|
|
|
console.log('this.moveSelections', this.moveSelections) |
|
|
|
|
|
|
|
// if (this.collectLevel === 2) { |
|
|
|
// if (this.toCategoryLevel === 3) { |
|
|
|
// this.$message({ message: '案卷不可移动到文件级,请先确认!', offset: 8 }) |
|
|
|
// return false |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
if (this.collectLevel === this.toCategoryLevel) { |
|
|
|
if (this.moveSelections.length === 0) { |
|
|
|
if (this.currentCategory.arrangeType !== 1) { |
|
|
|
this.$message({ message: '请选择一个案卷条目进行移动操作!', offset: 8 }) |
|
|
|
this.$message({ message: '1请选择一个案卷条目进行移动操作!', offset: 8 }) |
|
|
|
return false |
|
|
|
} else { |
|
|
|
if (this.selectedCategory.id === this.currentCategory.id) { |
|
|
@ -297,56 +308,24 @@ export default { |
|
|
|
this.$message({ message: '正在移动的档案不操作移动到自身档案下!', offset: 8 }) |
|
|
|
return false |
|
|
|
} |
|
|
|
// const targetId = this.moveSelections[0].id |
|
|
|
// const isExists = archivesIds.includes(targetId) |
|
|
|
|
|
|
|
// if (isExists) { |
|
|
|
// this.$message({ message: '正在移动的档案不操作移动到自身档案下!', offset: 8 }) |
|
|
|
// return false |
|
|
|
// } |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (this.moveSelections.length === 0) { |
|
|
|
if (this.currentCategory.arrangeType === 2) { |
|
|
|
this.$message({ message: '请选择一个案卷条目进行移动操作!', offset: 8 }) |
|
|
|
return false |
|
|
|
} |
|
|
|
this.$message({ message: '请选择一个案卷条目进行移动操作!', offset: 8 }) |
|
|
|
return false |
|
|
|
} else { |
|
|
|
if (this.currentCategory.arrangeType === 1) { |
|
|
|
this.$message({ message: '不可选择文件条目进行移动!', offset: 8 }) |
|
|
|
return false |
|
|
|
} else { |
|
|
|
if (this.parentsId === this.moveSelections[0].id) { |
|
|
|
this.$message({ message: '正在移动的档案不操作移动到自身档案下!', offset: 8 }) |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// if (this.collectLevel === 3 && this.toCategoryLevel === 2) { |
|
|
|
// if (this.moveSelections.length !== 0) { |
|
|
|
// if (this.parentsId === this.moveSelections[0].id) { |
|
|
|
// this.$message({ message: '正在移动的档案不操作移动到自身档案下!', offset: 8 }) |
|
|
|
// return false |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
console.log('this.toCategoryLevel', this.toCategoryLevel) |
|
|
|
|
|
|
|
// if (this.currentCategory.arrangeType === 3 && this.collectLevel === 2) { |
|
|
|
// if (this.moveSelections.length === 0) { |
|
|
|
// this.$message({ message: '请选择一个项目条目进行移动操作!', offset: 8 }) |
|
|
|
// return false |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// if (this.currentCategory.arrangeType === 3 && this.collectLevel === 3) { |
|
|
|
// if (this.moveSelections.length === 0) { |
|
|
|
// this.$message({ message: '请选择一个案卷条目进行移动操作!', offset: 8 }) |
|
|
|
// return false |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
console.log('this.selections', this.selections) |
|
|
|
console.log('this.moveSelections', this.moveSelections) |
|
|
|
|
|
|
|
// const toArchivesIds = this.moveSelections.map(item => item.id) |
|
|
|
let toArchivesId |
|
|
|
if (this.moveSelections.length === 0) { |
|
|
@ -367,7 +346,7 @@ export default { |
|
|
|
// toArchivesId = this.moveSelections[0].id |
|
|
|
// } |
|
|
|
} |
|
|
|
// this.btnLoading = true |
|
|
|
this.btnLoading = true |
|
|
|
const params = { |
|
|
|
'reserve': this.isReserve, // 是否保留原条目 true 保留 false 删除 |
|
|
|
'categoryId': this.selectedCategory.id, // 需要移动的门类总id |
|
|
|