|
@ -97,7 +97,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="allFieldData.length === 0" class="empty-data" /> |
|
|
|
|
|
|
|
|
<div v-if="allFieldData.length === 0 && allCorrField.length === 0" class="empty-data" /> |
|
|
</div> |
|
|
</div> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button type="text" @click="batchVisible = false">取消</el-button> |
|
|
<el-button type="text" @click="batchVisible = false">取消</el-button> |
|
@ -116,7 +116,7 @@ import { FetchInitDocumentFieldByPid } from '@/api/system/fileLibrary/fileLibrar |
|
|
import { FetchCategoryMenu, FetchInitCategoryFieldByPid } from '@/api/system/category/category' |
|
|
import { FetchCategoryMenu, FetchInitCategoryFieldByPid } from '@/api/system/category/category' |
|
|
import { FetchArchivesScopeByCategoryId } from '@/api/system/archivesScope' |
|
|
import { FetchArchivesScopeByCategoryId } from '@/api/system/archivesScope' |
|
|
import { FetchCheckRepeat } from '@/api/system/fieldMate' |
|
|
import { FetchCheckRepeat } from '@/api/system/fieldMate' |
|
|
// import { FetchBatchToFile } from '@/api/prearchiveLibrary/prearchiveLibrary' |
|
|
|
|
|
|
|
|
import { FetchBatchToFile } from '@/api/prearchiveLibrary/prearchiveLibrary' |
|
|
import Treeselect from '@riophae/vue-treeselect' |
|
|
import Treeselect from '@riophae/vue-treeselect' |
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
|
|
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect' |
|
|
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect' |
|
@ -135,6 +135,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
selectionsArc: [], |
|
|
batchVisible: false, |
|
|
batchVisible: false, |
|
|
rulesOptions: [], |
|
|
rulesOptions: [], |
|
|
categoryTree: [], |
|
|
categoryTree: [], |
|
@ -251,7 +252,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
res.forEach((item, index) => { |
|
|
res.forEach((item, index) => { |
|
|
this.selectStatus.push({ mode: true, fiedType: 2, value: '', field: item, isInput: item.isInput }) |
|
|
|
|
|
|
|
|
this.selectStatus.push({ mode: true, fiedType: 1, value: '', field: item, isInput: item.isInput }) |
|
|
}) |
|
|
}) |
|
|
this.rightLoading = false |
|
|
this.rightLoading = false |
|
|
}) |
|
|
}) |
|
@ -297,7 +298,6 @@ export default { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
if (this.form.categoryId) { |
|
|
if (this.form.categoryId) { |
|
|
this.$refs.scopeModule.$refs.tree2.setCurrentKey(this.form.categoryId) |
|
|
this.$refs.scopeModule.$refs.tree2.setCurrentKey(this.form.categoryId) |
|
|
console.log(this.batchCategory) |
|
|
|
|
|
this.$refs.scopeModule.handleNodeClick2(this.batchCategory) |
|
|
this.$refs.scopeModule.handleNodeClick2(this.batchCategory) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -345,7 +345,7 @@ export default { |
|
|
// 切换 "字段值" / "默认值" |
|
|
// 切换 "字段值" / "默认值" |
|
|
selectChangeFiedType(index) { |
|
|
selectChangeFiedType(index) { |
|
|
this.options.forEach((item) => { |
|
|
this.options.forEach((item) => { |
|
|
if (this.selectStatus[index].fiedType === 1) { |
|
|
|
|
|
|
|
|
if (this.selectStatus[index].fiedType === 2) { |
|
|
this.selectStatus.splice(index, 1, { mode: false, fiedType: this.selectStatus[index].fiedType, value: this.allFieldData[index].categoryFieldId.isDefaultValue, field: item, isInput: item.isInput }) |
|
|
this.selectStatus.splice(index, 1, { mode: false, fiedType: this.selectStatus[index].fiedType, value: this.allFieldData[index].categoryFieldId.isDefaultValue, field: item, isInput: item.isInput }) |
|
|
} else { |
|
|
} else { |
|
|
this.selectStatus.splice(index, 1, { mode: true, fiedType: this.selectStatus[index].fiedType, value: '', field: item, isInput: item.isInput }) |
|
|
this.selectStatus.splice(index, 1, { mode: true, fiedType: this.selectStatus[index].fiedType, value: '', field: item, isInput: item.isInput }) |
|
@ -390,33 +390,50 @@ export default { |
|
|
// }, []) |
|
|
// }, []) |
|
|
// } |
|
|
// } |
|
|
// const indices = getIndicesByMode(false) |
|
|
// const indices = getIndicesByMode(false) |
|
|
console.log(this.selectStatus) |
|
|
|
|
|
const filteredDocumentList = this.selectStatus.map(item => { |
|
|
|
|
|
if (item.hasOwnProperty('field')) { |
|
|
|
|
|
const fieldValue = item['field'] // 获取指定字段的值 |
|
|
|
|
|
return { |
|
|
|
|
|
...fieldValue, // 提取整个field字段,并复制其内容 |
|
|
|
|
|
getType: item.fiedType // 在field字段中添加getType字段并赋值 |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
return item |
|
|
|
|
|
|
|
|
// const arrAL = this.selectStatus.map(item => { |
|
|
|
|
|
// if (item.hasOwnProperty('field')) { |
|
|
|
|
|
// return { |
|
|
|
|
|
// documentValue: item['field'].fieldName, |
|
|
|
|
|
// getType: item.fiedType // 在field字段中添加getType字段并赋值 |
|
|
|
|
|
// } |
|
|
|
|
|
// } else { |
|
|
|
|
|
// return item |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// console.log(arrAL) |
|
|
|
|
|
const dtos = this.allFieldData.map((item, index) => { |
|
|
|
|
|
return { |
|
|
|
|
|
'categoryValue': item.categoryFieldId.fieldName, |
|
|
|
|
|
'documentValue': this.selectStatus[index].fiedType === 2 ? item.categoryFieldId.isDefaultValue : this.selectStatus[index].field.fieldName, |
|
|
|
|
|
'getType': this.selectStatus[index].fiedType, |
|
|
|
|
|
'isRequired': item.categoryFieldId.isRequired |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
console.log('filteredDocumentList', filteredDocumentList) |
|
|
|
|
|
console.log(this.allFieldData) |
|
|
|
|
|
const filteredCategoryList = this.allFieldData.map(item => { |
|
|
|
|
|
|
|
|
const archivesIds = this.selectionsArc.map(item => { |
|
|
|
|
|
return item.id |
|
|
}) |
|
|
}) |
|
|
console.log(filteredCategoryList) |
|
|
|
|
|
|
|
|
|
|
|
const params = { |
|
|
const params = { |
|
|
'archivesIds': [], |
|
|
|
|
|
'categoryId': this.selectedDocument.id, |
|
|
|
|
|
'documentId': this.form.categoryId, |
|
|
|
|
|
'dtos': [] |
|
|
|
|
|
|
|
|
'archivesIds': archivesIds, |
|
|
|
|
|
'documentId': this.selectedDocument.id, |
|
|
|
|
|
'categoryId': this.form.categoryId, |
|
|
|
|
|
'dtos': dtos |
|
|
} |
|
|
} |
|
|
console.log(params) |
|
|
console.log(params) |
|
|
// FetchBatchToFile().then((res) => { |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
FetchBatchToFile(params).then((res) => { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
if (res === 'SUCCESS') { |
|
|
|
|
|
this.$emit('refresh') |
|
|
|
|
|
this.batchVisible = false |
|
|
|
|
|
Object.assign(this.form, { |
|
|
|
|
|
ruleName: null, |
|
|
|
|
|
scope: null, |
|
|
|
|
|
documentId: null, |
|
|
|
|
|
categoryId: null |
|
|
|
|
|
}) |
|
|
|
|
|
this.selectedCategoryName = null |
|
|
|
|
|
this.allFieldData = [] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
normalizer(node) { |
|
|
normalizer(node) { |
|
|
if (node.children && !node.children.length) { |
|
|
if (node.children && !node.children.length) { |
|
|