下载模板
@@ -18,6 +18,7 @@
{{ item.name }}
+
@@ -86,12 +87,7 @@ export default {
return {
// 批量导入
bulkImportVisible: false,
- rules: {
- name: [
- { required: true, message: '请输入活动名称', trigger: 'blur' },
- { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
- ]
- },
+ rules: {},
form: {
file: null,
type: '追加',
@@ -104,13 +100,7 @@ export default {
label: '追加'
}
],
- fieldsOptions: [],
- fileNames: '', // 附件 - name
- formatType: '', // 附件 - type
- postfix: '', // 附件 - 文件后缀
- fileSize: '', // 附件 - 大小
- filePath: '', // 附件 - path
- nowDate: '' // 当前时间
+ fieldsOptions: []
}
},
computed: {
@@ -153,6 +143,14 @@ export default {
this.excelList.push(files[i])
}
},
+ // 附件旁边的X
+ deleteFile(file) {
+ const index = this.excelList.indexOf(file)
+ this.excelList.splice(index, 1)
+ if (this.excelList.length === 0) {
+ this.$message.info('已清空要导入的Excel数据文件!')
+ }
+ },
onSubmitImport(formName) {
if (this.excelList.length === 0) {
this.$message.error('请先上传Excel')
@@ -163,14 +161,16 @@ export default {
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
- 'file': this.form.file,
+ 'file': this.excelList[0],
'replicated': this.form.replicated.join(',')
}
console.log(params)
BatchImport(this.baseApi + '/api/collect/batchImport', params).then(res => {
console.log(res)
if (res.data.code !== 500) {
- this.$message.error('批量导入成功')
+ this.$message.success(res.data.data)
+ this.$emit('close-dialog')
+ this.handleCloseDialog()
} else {
this.$message.error('批量导入失败')
}
@@ -180,6 +180,14 @@ export default {
return false
}
})
+ },
+ handleCloseDialog(done) {
+ // 重置表单数据
+ this.$refs.form.resetFields()
+ this.bulkImportVisible = false
+ this.excelList = []
+ // 关闭弹框
+ // done()
}
}
}
@@ -215,6 +223,7 @@ export default {
.input-import{
margin-top: 0;
+ overflow: hidden;
}
.upload-excel{
color: #545B65;
@@ -258,8 +267,8 @@ export default {
font-size: 12px;
color: #A6ADB6;
i{
- font-size: 12px;
- color: #A6ADB6;
+ font-size: 12px !important;
+ color: #A6ADB6 !important;
}
}
}
diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
index 593b5da..a291696 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
@@ -67,9 +67,9 @@
批量导入
批量修改
- 案卷顺序调整
- 卷内顺序调整
- 文件顺序调整
+ 案卷顺序调整
+ 卷内顺序调整
+ 文件顺序调整
档号更新
卷内档号更新
@@ -174,10 +174,10 @@
-
+
-
-
+
+
@@ -228,20 +228,6 @@
-
-
-
-
-
此操作将导出所选数据
-
你是否还要继续?
-
-
-
-
-
@@ -310,7 +296,7 @@ import PreviewForm from '@/views/components/category/PreviewForm'
import UploadOriginal from './uploadOriginal/index'
import BlukImport from './bulkImport/index'
import BlukEditing from './blukEditing/index'
-import FileNumberAdjustment from './fileNumberAdjustment/index'
+// import FileNumberAdjustment from './fileNumberAdjustment/index'
import FileSeqAdjustment from './fileSeqAdjustment/index'
import CombineFile from './combineFile/index'
import InsertFile from './insertFile/index'
@@ -324,7 +310,7 @@ import { mapGetters } from 'vuex'
export default {
name: 'CollectHeader',
- components: { Treeselect, PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileNumberAdjustment, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
+ components: { Treeselect, PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
mixins: [collectionLibraryCrud, crud()],
props: {
selectedCategory: {
@@ -370,7 +356,6 @@ export default {
moveVisible: false,
uncoilVisible: false,
filingVisible: false,
- exportVisible: false,
returnVisible: false,
downloadVisible: false,
recoverVisible: false,
@@ -759,35 +744,40 @@ export default {
this.$refs.blukEditingRef.bulkEditingVisible = true
})
},
- // 案卷/文件顺序调整
- handleAdjustment(type) {
- if (this.selections.length < 2) {
- this.$message('请选择多个' + (type === 'file' ? '文件' : '案卷') + '后进行操作!')
- return false
- }
- if (type === 'anjuan') {
- this.$refs.fileNumberAdjustmentRef.titleAdjustment = '案卷顺序调整'
+ // 案卷/文件/卷内顺序调整
+ handleJnSeqAdjustment(type) {
+ if (type === 'juannei') {
+ if (this.selections.length === 0) {
+ this.$message('您还未勾选需要操作的条目,请先确认!')
+ return false
+ }
+ if (this.selections.length > 1) {
+ this.$message('卷内顺序调整操作只可勾选唯一目标条目,请先确认!')
+ return false
+ }
+ this.$nextTick(() => {
+ this.$refs.fileSeqAdjustmentRef.titleAdjustment = '卷内顺序调整'
+ this.$refs.fileSeqAdjustmentRef.isJuannei = true
+ })
} else {
- this.$refs.fileNumberAdjustmentRef.titleAdjustment = '文件顺序调整'
- }
- this.$refs.fileNumberAdjustmentRef.adjustmentVisible = true
- // if (this.selections.length === 0) {
- // this.$refs.fileNumberAdjustmentRef.adjustmentTipVisible = true
- // } else {
- // this.$refs.fileNumberAdjustmentRef.adjustmentVisible = true
- // }
- },
- // 卷内顺序调整
- handleJnSeqAdjustment() {
- if (this.selections.length === 0) {
- this.$message('您还未勾选需要操作的条目,请先确认!')
- return false
- }
- if (this.selections.length > 1) {
- this.$message('顺序调整操作只可勾选唯一目标条目,请先确认!')
- return false
+ if (this.selections.length < 2) {
+ this.$message('请选择多个' + (type === 'file' ? '文件' : '案卷') + '后进行操作!')
+ return false
+ }
+ this.$nextTick(() => {
+ if (type === 'anjuan') {
+ this.$refs.fileSeqAdjustmentRef.titleAdjustment = '案卷顺序调整'
+ } else {
+ this.$refs.fileSeqAdjustmentRef.titleAdjustment = '文件顺序调整'
+ }
+ this.$refs.fileSeqAdjustmentRef.isJuannei = false
+ })
}
+
this.$refs.fileSeqAdjustmentRef.adjustmentVisible = true
+ this.$nextTick(() => {
+ this.$refs.fileSeqAdjustmentRef.getDoArchivesAdjust()
+ })
},
// 档号更新
handleFileNumberUpdate(type) {
@@ -801,28 +791,34 @@ export default {
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
+ // updateType 更新类别 1.档号更新 2.卷内档号更新
+ let updateType
if (type === 0) {
- const archivesIds = []
- this.selections.forEach(val => {
- archivesIds.push(val.id)
- })
- const params = {
- 'categoryId': this.selectedCategory.id,
- 'categoryLevel': this.collectLevel,
- 'archivesIds': archivesIds
- }
- console.log(params)
- FetchUpdateArchivesNo(params).then((res) => {
- if (res.code !== 500) {
- this.crud.notify('档号更新成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
- this.handleSearch(this.collectLevel)
- } else {
- this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
- }
- }).catch(err => {
- console.log(err)
- })
+ updateType = 1
+ } else {
+ updateType = 2
}
+ const archivesIds = []
+ this.selections.forEach(val => {
+ archivesIds.push(val.id)
+ })
+ const params = {
+ 'categoryId': this.selectedCategory.id,
+ 'categoryLevel': this.collectLevel,
+ 'archivesIds': archivesIds,
+ 'updateType': updateType
+ }
+ console.log(params)
+ FetchUpdateArchivesNo(params).then((res) => {
+ if (res.code !== 500) {
+ this.crud.notify('档号更新成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
+ this.handleSearch(this.collectLevel)
+ } else {
+ this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
+ }
+ }).catch(err => {
+ console.log(err)
+ })
}).catch(() => {
})
},
@@ -885,10 +881,38 @@ export default {
},
// 导出
handleExport() {
- this.exportVisible = true
- },
- handleExportConfirm() {
- this.exportVisible = false
+ if (this.selections.length === 0) {
+ this.$message('您还未勾选需要操作的条目,请先确认!')
+ return false
+ }
+ this.$confirm('此操作将导出所选数据' + '
你是否还要继续?', '提示', {
+ confirmButtonText: '继续',
+ cancelButtonText: '取消',
+ type: 'warning',
+ dangerouslyUseHTMLString: true
+ }).then(() => {
+ // const archivesIds = []
+ // this.selections.forEach(val => {
+ // archivesIds.push(val.id)
+ // })
+ // const params = {
+ // 'categoryId': this.selectedCategory.id,
+ // 'categoryLevel': this.collectLevel,
+ // 'archivesIds': archivesIds
+ // }
+ // console.log(params)
+ // FetchUpdateArchivesNo(params).then((res) => {
+ // if (res.code !== 500) {
+ // this.crud.notify('档号更新成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
+ // this.handleSearch(this.collectLevel)
+ // } else {
+ // this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
+ // }
+ // }).catch(err => {
+ // console.log(err)
+ // })
+ }).catch(() => {
+ })
},
// 打印
handlePrint() {
diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/data.json b/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/data.json
deleted file mode 100644
index c805ad5..0000000
--- a/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/data.json
+++ /dev/null
@@ -1,22 +0,0 @@
-[
- {
- "id": 1,
- "label": "字段A",
- "isType": 1
- },
- {
- "id": 2,
- "label": "字段B",
- "isType": 0
- },
- {
- "id": 3,
- "label": "字段C",
- "isType": 1
- },
- {
- "id": 4,
- "label": "字段D",
- "isType": 1
- }
-]
diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue b/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue
index 23585dc..8bf21d5 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue
@@ -1,41 +1,50 @@
-
+
-
档案门类
-
-
-
- {{ data.cnName }}
-
-
- {{ data.cnName }}
-
-
- {{ data.cnName }}
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ field.fieldCnName }}
+
+
+
+ {{ scope.row[field.fieldName] }}
+
+