From c35ba3169dadfa05d619812afbd21d11c24d102f Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Mon, 26 Jun 2023 17:22:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B53D=E5=88=87=E6=8D=A2=20/=20?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=88=86=E7=B1=BB=E6=90=9C=E7=B4=A2=20/=20?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=AF=BC=E5=85=A5=E6=9D=A1=E4=BB=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20/=20=E6=A1=A3=E6=A1=88=E6=90=9C=E7=B4=A2=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archivesManage/archivesList/index.vue | 40 +- .../archivesList/mixins/archives.js | 665 +++++++++--------- .../archivesManage/archivesSearch/index.vue | 45 +- .../fileImport/dataImport/index.vue | 80 ++- src/views/home.vue | 106 ++- src/views/storeManage/warehouse3D/index.vue | 1 + 6 files changed, 533 insertions(+), 404 deletions(-) diff --git a/src/views/archivesManage/archivesList/index.vue b/src/views/archivesManage/archivesList/index.vue index 7ca71d1..6a10142 100644 --- a/src/views/archivesManage/archivesList/index.vue +++ b/src/views/archivesManage/archivesList/index.vue @@ -126,7 +126,10 @@ export default { 'department': null, 'retention': null, 'securityClass': null, - 'organizationMatter': null + 'organizationMatter': null, + 'fondsNo': null, + 'recordType': null, + 'mediumType': null }, treeCurrentNode: null, nodeClick: false, @@ -256,7 +259,10 @@ export default { 'department': null, 'retention': null, 'securityClass': null, - 'organizationMatter': null + 'organizationMatter': null, + 'fondsNo': null, + 'recordType': null, + 'mediumType': null } this.$refs.smartTree.setCurrentKey(null) smartTreeList.forEach((item, index) => { @@ -291,7 +297,10 @@ export default { 'department': null, 'retention': null, 'securityClass': null, - 'organizationMatter': null + 'organizationMatter': null, + 'fondsNo': null, + 'recordType': null, + 'mediumType': null } if ((selectData && selectData.length > 1) || (selectData && selectData.length === 0)) { this.isProject = true @@ -343,7 +352,10 @@ export default { 'department': null, 'retention': null, 'securityClass': null, - 'organizationMatter': null + 'organizationMatter': null, + 'fondsNo': null, + 'recordType': null, + 'mediumType': null } if ((selectData && selectData.length > 1) || (selectData && selectData.length === 0)) { this.isAnjuan = true @@ -424,7 +436,10 @@ export default { 'department': null, 'retention': null, 'securityClass': null, - 'organizationMatter': null + 'organizationMatter': null, + 'fondsNo': null, + 'recordType': null, + 'mediumType': null } if (ele.$el.classList.contains('is-current')) { this.treeCurrentNode.classList.remove('is-current') @@ -451,6 +466,21 @@ export default { this.smartQuery.securityClass = selectedKey.dicName } break + case 'WZ': + if (selectedKey.dicCode !== 'WZ') { + this.smartQuery.recordType = selectedKey.dicName + } + break + case 'ZT': + if (selectedKey.dicCode !== 'ZT') { + this.smartQuery.mediumType = selectedKey.dicName + } + break + case 'QZH': + if (selectedKey.dicCode !== 'QZH') { + this.smartQuery.fondsNo = selectedKey.dicName + } + break default: if (selectedKey.dicCode !== 'Search_JGWT') { this.smartQuery.organizationMatter = selectedKey.dicName diff --git a/src/views/archivesManage/archivesList/mixins/archives.js b/src/views/archivesManage/archivesList/mixins/archives.js index d16fb54..d1c18a8 100644 --- a/src/views/archivesManage/archivesList/mixins/archives.js +++ b/src/views/archivesManage/archivesList/mixins/archives.js @@ -1,331 +1,334 @@ -import qs from 'qs' -import { exportFile } from '@/utils/index' -import { FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields } from '@/api/archivesManage/archivesList' -export const archivesCrud = { - // 组件共用属性 - data() { - return { - permission: { - add: ['admin', 'archivesList:add'], - edit: ['admin', 'archivesList:edit'], - del: ['admin', 'archivesList:del'], - download: ['admin', 'archivesList:download'] - }, - page: { - page: 1, - size: 10, - total: 0 - }, - storageTxt: [], - borrowTxt: [], - tableDisplayFields: [], // table-list-title字段 - getTableDisplayFieldsLoading: false, // table-loading - projectTableHeight: null, - anjuanTableHeight: null, - juanneiTableHeight: null, - formVisible: false, - formTitle: '新建档案', - formPreviewData: [], // 预览界面data - totalSumAll: 0, // 删除时,内部文件数据求和 - arrySort: [], // 多项sort-query - selections: [], // table已选择的 - categoryId: null, // 上传附件使用 - parentsId: null, // 父id - arcId: null, // 档案ID - yearGroup: [], // 智能分类 - 年度 - uploadFileVisible: false, // 上传附件 - isDesFormType: null // 区分是门类得还是档案得 - } - }, - // 组件共用方法 - methods: { - // 搜索-select - querySelect(name, val) { - this[name] = val - }, - rowKey(row) { - return row.id - }, - // table选中加上选中状态 - tableRowClassName({ row, rowIndex }) { - // console.log('添加类名', row, rowIndex) - let color = '' - this.selections.forEach(item => { - if (item.id === row.id) { - color = 'rowStyle' - } - }) - return color - }, - // 案卷 / 卷内 / 文件 导出 - doExport(type) { - this.crud.downloadLoading = true - if (type === 0 && this.selectedCategory.isType === 2) { - this.parentsId = this.projectSelection.id - } else if (type === 1 && this.selectedCategory.isType === 2) { - this.parentsId = this.anjuanSelection.id - } else { - this.parentsId = null - } - const params = { - 'categoryId': this.categoryId, - 'parentsId': this.parentsId - } - exportFile(this.baseApi + '/api/archives/exportArchives?' + qs.stringify(params)) - this.crud.downloadLoading = false - }, - // table - 表头项 - getTableItemCommon(type) { - if (type === 0) { - this.categoryId = this.selectedCategory.id - } else if (type === 1) { - if (this.selectedCategory.isType === 2) { - if (this.selectedCategory.children.length !== 0) { - this.categoryId = this.selectedCategory.children[0].id - } - } else { - this.categoryId = this.selectedCategory.id - } - } else if (type === 2) { - if (this.selectedCategory.isType === 2) { - if (this.selectedCategory.children.length !== 0) { - if (this.selectedCategory.children[0].children.length !== 0) { - this.categoryId = this.selectedCategory.children[0].children[0].id - } - } - } else if (this.selectedCategory.isType === 3) { - if (this.selectedCategory.children.length !== 0) { - this.categoryId = this.selectedCategory.children[0].id - } - } else { - this.categoryId = this.selectedCategory.id - } - } - - this.getTableDisplayFieldsLoading = true - this.selections = [] - FetchTableDisplayFields({ categoryId: this.categoryId }).then(data => { - if (data) { - this.arrySort = [] - this.tableDisplayFields = data - this.getTableDisplayFieldsLoading = false - const orderSortArry = this.tableDisplayFields.filter(item => item.queue).sort((a, b) => a.queue - b.queue) - orderSortArry.forEach(item => { - this.arrySort.push(item.fieldName + ',' + item.displayOrderBy) - }) - } - }) - }, - handleCurrentPage(val) { - this.page.page = val - // console.log(this.$refs.table.selection) - this.getTableList() - this.$nextTick(() => { - this.selections = this.$refs.table.selection - }) - }, - // table - list - getListCommon(name, heightName, type) { - if (type === 0) { - this.parentsId = null - } else if (type === 1) { - if (this.selectedCategory.isType === 3 || this.selectedCategory.isType === 5) { - this.parentsId = null - } else { - this.parentsId = this.projectSelection.id - } - } else if (type === 2) { - if (this.selectedCategory.isType !== 4) { - this.parentsId = this.anjuanSelection.id - } else { - this.parentsId = null - } - } - if (this.categoryId !== null) { // 防止项目下无案卷门类情况 - this.selections = [] - // this.page.page = isNaN(this.page.page - 1) ? 0 : this.page.page - 1 - this.formVisible = false - this.getTableDisplayFieldsLoading = true - const params = { - 'categoryId': this.categoryId, - 'parentsId': this.parentsId, - 'isdel': this.recycleMain.isdel, - 'page': this.page.page - 1, - 'size': this.page.size, - 'sort': this.arrySort, - 'queryType': this.query.queryType, - 'queryTitle': this.query.queryTitle, - 'itemNo': this.query.itemNo, - 'archiveCtgNo': this.query.archiveCtgNo, - 'responsibleby': this.query.responsibleby, - 'archiveNo': this.query.archiveNo, - 'archiveYear': this.smartQuery.archiveYear, - 'department': this.smartQuery.department, - 'retention': this.smartQuery.retention, - 'securityClass': this.smartQuery.securityClass, - 'organizationMatter': this.smartQuery.organizationMatter - } - FetchInitArchivesView(params).then(data => { - this.getTableDisplayFieldsLoading = false - if (data) { - this[name] = data.list.content - this.yearGroup = data.yearGroup - this.page.total = data.list.totalElements - - // 自适应高度 - if (this[name].length === 0 || this[name].length < 10) { - this[heightName] = '' - } else { - const h = '100vh' - this[heightName] = `calc(${h} - 434px)` - } - - if (name === 'anjuanData' || name === 'junneiData') { - this[name].forEach((item, index) => { - // 入库状态 - if (item.is_storage === 0) { - this.storageTxt[index] = '未入' - if (item.is_borrow === '') { - this.borrowTxt[index] = '-' - } - } else if (item.is_storage === 1) { - this.storageTxt[index] = '待入' - if (item.is_borrow === '') { - this.borrowTxt[index] = '-' - } - } else if (item.is_storage === 2) { - this.storageTxt[index] = '已入' - if (item.is_borrow === '') { - this.borrowTxt[index] = '在库' - } - } else if (item.is_storage === 3) { - this.storageTxt[index] = '待出' - if (item.is_borrow === '') { - this.borrowTxt[index] = '-' - } - } else if (item.is_storage === '') { - this.storageTxt[index] = '未入' - if (item.is_borrow === '') { - this.borrowTxt[index] = '-' - } - } - - // 借阅状态 - if (item.is_borrow === 1) { - this.borrowTxt[index] = '待借' - } else if (item.is_borrow === 2) { - this.borrowTxt[index] = '待借' - } else if (item.is_borrow === 3) { - this.borrowTxt[index] = '已借' - } else if (item.is_borrow === -1) { - this.borrowTxt[index] = '在库' - } - }) - } - } - }) - } - }, - // 著录界面-form/详情-api - handleForm(type, title, isAnOrJuan) { - if (type === 'add') { - this.formTitle = '新增' + title - this.arcId = null - // this.parentsId = this[name].id //案卷和卷内有 不确定 - } else if (type === 'edit') { - this.arcId = this.selections[0].id - this.formTitle = '编辑' + title - } - this.formVisible = true - this.form.dictionaryConfigId = {} - this.formPreviewData = [] - // 档案预编辑获取字段 - const params = { - categoryId: this.categoryId, - archivesId: this.arcId - } - this.getFormInfo(params, type, isAnOrJuan) - }, - getFormInfo(params, type, isAnOrJuan) { - FetchFormDisplayFields(params).then(data => { - this.formPreviewData = data.showFiled - this.$nextTick(() => { - if (type === 'edit') { - this.$refs.previewForm.addOrUpdateForm = data.echo - } else { - if (this.recycleMain.selectedCategory.isType !== 5) { - // 新增时拿到项目和案卷的相同的字段的值 - this.formPreviewData.forEach(item => { - if (isAnOrJuan === 1) { - if (this.recycleMain.selectedCategory.isType !== 3) { - if (this.recycleMain.projectSelection[item.fieldName]) { - this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.projectSelection)) - } - } - } else if (isAnOrJuan === 2) { - if (this.recycleMain.anjuanSelection[item.fieldName]) { - this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.anjuanSelection)) - } - } - }) - } - } - this.isDesFormType = 'arcives' - this.$refs.previewForm.FetchNoFormatField(this.categoryId) - }) - }) - }, - // form - submit - handlerArchivesSubmit() { - this.$refs.previewForm.submitForm('addOrUpdateForm', this.categoryId) - this.selections = [] - }, - // 选择删除 - toDelete(data) { - // 已装盒的档案不可删除 - const indexCaseBool = data.findIndex(item => item.case_no !== '') - if (indexCaseBool !== -1) { - this.$message.error('已装盒的档案不可删除!') - } else { - this.$refs.deltArchives.deleteVisible = true - this.getTotalSumAll() - } - }, - getTotalSumAll() { - this.totalSumAll = 0 - this.selections.map((item) => { if (!isNaN(item.children_num)) this.totalSumAll += item.children_num }) - if (isNaN(this.totalSumAll)) { - return 0 - } - return this.totalSumAll - }, - // 删除 - 关闭 - handleClose(done) { - this.formVisible = false - done() - }, - /* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */ - doLayout() { - this.$nextTick(() => { - this.$refs.table.doLayout() - }) - }, - // 上传附件 - uploadFile() { - this.uploadFileVisible = true - this.arcId = this.selections[0].id - this.$nextTick(() => { - this.$refs.uploadFile.tableData = [] - this.$refs.uploadFile.getFileList() - }) - }, - // 还原 - handleRestore() { - this.$refs.restore.restoreVisible = true - } - }, - // 组件挂载时的共用方法 - mounted() { - - } -} +import qs from 'qs' +import { exportFile } from '@/utils/index' +import { FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields } from '@/api/archivesManage/archivesList' +export const archivesCrud = { + // 组件共用属性 + data() { + return { + permission: { + add: ['admin', 'archivesList:add'], + edit: ['admin', 'archivesList:edit'], + del: ['admin', 'archivesList:del'], + download: ['admin', 'archivesList:download'] + }, + page: { + page: 1, + size: 10, + total: 0 + }, + storageTxt: [], + borrowTxt: [], + tableDisplayFields: [], // table-list-title字段 + getTableDisplayFieldsLoading: false, // table-loading + projectTableHeight: null, + anjuanTableHeight: null, + juanneiTableHeight: null, + formVisible: false, + formTitle: '新建档案', + formPreviewData: [], // 预览界面data + totalSumAll: 0, // 删除时,内部文件数据求和 + arrySort: [], // 多项sort-query + selections: [], // table已选择的 + categoryId: null, // 上传附件使用 + parentsId: null, // 父id + arcId: null, // 档案ID + yearGroup: [], // 智能分类 - 年度 + uploadFileVisible: false, // 上传附件 + isDesFormType: null // 区分是门类得还是档案得 + } + }, + // 组件共用方法 + methods: { + // 搜索-select + querySelect(name, val) { + this[name] = val + }, + rowKey(row) { + return row.id + }, + // table选中加上选中状态 + tableRowClassName({ row, rowIndex }) { + // console.log('添加类名', row, rowIndex) + let color = '' + this.selections.forEach(item => { + if (item.id === row.id) { + color = 'rowStyle' + } + }) + return color + }, + // 案卷 / 卷内 / 文件 导出 + doExport(type) { + this.crud.downloadLoading = true + if (type === 0 && this.selectedCategory.isType === 2) { + this.parentsId = this.projectSelection.id + } else if (type === 1 && this.selectedCategory.isType === 2) { + this.parentsId = this.anjuanSelection.id + } else { + this.parentsId = null + } + const params = { + 'categoryId': this.categoryId, + 'parentsId': this.parentsId + } + exportFile(this.baseApi + '/api/archives/exportArchives?' + qs.stringify(params)) + this.crud.downloadLoading = false + }, + // table - 表头项 + getTableItemCommon(type) { + if (type === 0) { + this.categoryId = this.selectedCategory.id + } else if (type === 1) { + if (this.selectedCategory.isType === 2) { + if (this.selectedCategory.children.length !== 0) { + this.categoryId = this.selectedCategory.children[0].id + } + } else { + this.categoryId = this.selectedCategory.id + } + } else if (type === 2) { + if (this.selectedCategory.isType === 2) { + if (this.selectedCategory.children.length !== 0) { + if (this.selectedCategory.children[0].children.length !== 0) { + this.categoryId = this.selectedCategory.children[0].children[0].id + } + } + } else if (this.selectedCategory.isType === 3) { + if (this.selectedCategory.children.length !== 0) { + this.categoryId = this.selectedCategory.children[0].id + } + } else { + this.categoryId = this.selectedCategory.id + } + } + + this.getTableDisplayFieldsLoading = true + this.selections = [] + FetchTableDisplayFields({ categoryId: this.categoryId }).then(data => { + if (data) { + this.arrySort = [] + this.tableDisplayFields = data + this.getTableDisplayFieldsLoading = false + const orderSortArry = this.tableDisplayFields.filter(item => item.queue).sort((a, b) => a.queue - b.queue) + orderSortArry.forEach(item => { + this.arrySort.push(item.fieldName + ',' + item.displayOrderBy) + }) + } + }) + }, + handleCurrentPage(val) { + this.page.page = val + // console.log(this.$refs.table.selection) + this.getTableList() + this.$nextTick(() => { + this.selections = this.$refs.table.selection + }) + }, + // table - list + getListCommon(name, heightName, type) { + if (type === 0) { + this.parentsId = null + } else if (type === 1) { + if (this.selectedCategory.isType === 3 || this.selectedCategory.isType === 5) { + this.parentsId = null + } else { + this.parentsId = this.projectSelection.id + } + } else if (type === 2) { + if (this.selectedCategory.isType !== 4) { + this.parentsId = this.anjuanSelection.id + } else { + this.parentsId = null + } + } + if (this.categoryId !== null) { // 防止项目下无案卷门类情况 + this.selections = [] + // this.page.page = isNaN(this.page.page - 1) ? 0 : this.page.page - 1 + this.formVisible = false + this.getTableDisplayFieldsLoading = true + const params = { + 'categoryId': this.categoryId, + 'parentsId': this.parentsId, + 'isdel': this.recycleMain.isdel, + 'page': this.page.page - 1, + 'size': this.page.size, + 'sort': this.arrySort, + 'queryType': this.query.queryType, + 'queryTitle': this.query.queryTitle, + 'itemNo': this.query.itemNo, + 'archiveCtgNo': this.query.archiveCtgNo, + 'responsibleby': this.query.responsibleby, + 'archiveNo': this.query.archiveNo, + 'archiveYear': this.smartQuery.archiveYear, + 'department': this.smartQuery.department, + 'retention': this.smartQuery.retention, + 'securityClass': this.smartQuery.securityClass, + 'organizationMatter': this.smartQuery.organizationMatter, + 'fondsNo': this.smartQuery.fondsNo, + 'recordType': this.smartQuery.recordType, + 'mediumType': this.smartQuery.mediumType + } + FetchInitArchivesView(params).then(data => { + this.getTableDisplayFieldsLoading = false + if (data) { + this[name] = data.list.content + this.yearGroup = data.yearGroup + this.page.total = data.list.totalElements + + // 自适应高度 + if (this[name].length === 0 || this[name].length < 10) { + this[heightName] = '' + } else { + const h = '100vh' + this[heightName] = `calc(${h} - 434px)` + } + + if (name === 'anjuanData' || name === 'junneiData') { + this[name].forEach((item, index) => { + // 入库状态 + if (item.is_storage === 0) { + this.storageTxt[index] = '未入' + if (item.is_borrow === '') { + this.borrowTxt[index] = '-' + } + } else if (item.is_storage === 1) { + this.storageTxt[index] = '待入' + if (item.is_borrow === '') { + this.borrowTxt[index] = '-' + } + } else if (item.is_storage === 2) { + this.storageTxt[index] = '已入' + if (item.is_borrow === '') { + this.borrowTxt[index] = '在库' + } + } else if (item.is_storage === 3) { + this.storageTxt[index] = '待出' + if (item.is_borrow === '') { + this.borrowTxt[index] = '-' + } + } else if (item.is_storage === '') { + this.storageTxt[index] = '未入' + if (item.is_borrow === '') { + this.borrowTxt[index] = '-' + } + } + + // 借阅状态 + if (item.is_borrow === 1) { + this.borrowTxt[index] = '待借' + } else if (item.is_borrow === 2) { + this.borrowTxt[index] = '待借' + } else if (item.is_borrow === 3) { + this.borrowTxt[index] = '已借' + } else if (item.is_borrow === -1) { + this.borrowTxt[index] = '在库' + } + }) + } + } + }) + } + }, + // 著录界面-form/详情-api + handleForm(type, title, isAnOrJuan) { + if (type === 'add') { + this.formTitle = '新增' + title + this.arcId = null + // this.parentsId = this[name].id //案卷和卷内有 不确定 + } else if (type === 'edit') { + this.arcId = this.selections[0].id + this.formTitle = '编辑' + title + } + this.formVisible = true + this.form.dictionaryConfigId = {} + this.formPreviewData = [] + // 档案预编辑获取字段 + const params = { + categoryId: this.categoryId, + archivesId: this.arcId + } + this.getFormInfo(params, type, isAnOrJuan) + }, + getFormInfo(params, type, isAnOrJuan) { + FetchFormDisplayFields(params).then(data => { + this.formPreviewData = data.showFiled + this.$nextTick(() => { + if (type === 'edit') { + this.$refs.previewForm.addOrUpdateForm = data.echo + } else { + if (this.recycleMain.selectedCategory.isType !== 5) { + // 新增时拿到项目和案卷的相同的字段的值 + this.formPreviewData.forEach(item => { + if (isAnOrJuan === 1) { + if (this.recycleMain.selectedCategory.isType !== 3) { + if (this.recycleMain.projectSelection[item.fieldName]) { + this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.projectSelection)) + } + } + } else if (isAnOrJuan === 2) { + if (this.recycleMain.anjuanSelection[item.fieldName]) { + this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.anjuanSelection)) + } + } + }) + } + } + this.isDesFormType = 'arcives' + this.$refs.previewForm.FetchNoFormatField(this.categoryId) + }) + }) + }, + // form - submit + handlerArchivesSubmit() { + this.$refs.previewForm.submitForm('addOrUpdateForm', this.categoryId) + this.selections = [] + }, + // 选择删除 + toDelete(data) { + // 已装盒的档案不可删除 + const indexCaseBool = data.findIndex(item => item.case_no !== '') + if (indexCaseBool !== -1) { + this.$message.error('已装盒的档案不可删除!') + } else { + this.$refs.deltArchives.deleteVisible = true + this.getTotalSumAll() + } + }, + getTotalSumAll() { + this.totalSumAll = 0 + this.selections.map((item) => { if (!isNaN(item.children_num)) this.totalSumAll += item.children_num }) + if (isNaN(this.totalSumAll)) { + return 0 + } + return this.totalSumAll + }, + // 删除 - 关闭 + handleClose(done) { + this.formVisible = false + done() + }, + /* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */ + doLayout() { + this.$nextTick(() => { + this.$refs.table.doLayout() + }) + }, + // 上传附件 + uploadFile() { + this.uploadFileVisible = true + this.arcId = this.selections[0].id + this.$nextTick(() => { + this.$refs.uploadFile.tableData = [] + this.$refs.uploadFile.getFileList() + }) + }, + // 还原 + handleRestore() { + this.$refs.restore.restoreVisible = true + } + }, + // 组件挂载时的共用方法 + mounted() { + + } +} diff --git a/src/views/archivesManage/archivesSearch/index.vue b/src/views/archivesManage/archivesSearch/index.vue index 2c3a029..372f77e 100644 --- a/src/views/archivesManage/archivesSearch/index.vue +++ b/src/views/archivesManage/archivesSearch/index.vue @@ -10,6 +10,7 @@ multiple collapse-tags placeholder="请选择" + @change="handleChose" > - - + + + + - - + - - - + + + + - + - - - + @@ -132,8 +130,17 @@ export default { } }, methods: { + handleChose(val) { + if (val.length < 1) { + this.$nextTick(() => { + this.select = ['maintitle'] // 重新设置 v-model 的值 + }) + return + } + }, getSelectLabel(option) { - return this.options.find((c) => c.value === option)?.label + const selectedOption = this.options.find((c) => c.value === option) + return selectedOption ? selectedOption.label : '' }, // 双击详情 handleDbClick(row) { @@ -158,6 +165,10 @@ export default { }, // 首页 / 搜索页切换操作 handleSearch() { + if (this.select.length === 0) { + this.$message.warning('请选择检索条件!') + return + } if (this.$route.path.indexOf('dashboard') !== -1) { this.$router.push('/archivesManage/archivesSearch') localStorage.setItem('homeSearchWords', this.keywords) diff --git a/src/views/archivesManage/fileImport/dataImport/index.vue b/src/views/archivesManage/fileImport/dataImport/index.vue index 9cec56e..87f1898 100644 --- a/src/views/archivesManage/fileImport/dataImport/index.vue +++ b/src/views/archivesManage/fileImport/dataImport/index.vue @@ -11,15 +11,16 @@
选择文件
@@ -84,6 +85,7 @@