Browse Source

首页3D切换 / 档案分类搜索 / 档案导入条件增加 / 档案搜索相关修改

master
xuhuajiao 2 years ago
parent
commit
c35ba3169d
  1. 40
      src/views/archivesManage/archivesList/index.vue
  2. 665
      src/views/archivesManage/archivesList/mixins/archives.js
  3. 45
      src/views/archivesManage/archivesSearch/index.vue
  4. 80
      src/views/archivesManage/fileImport/dataImport/index.vue
  5. 106
      src/views/home.vue
  6. 1
      src/views/storeManage/warehouse3D/index.vue

40
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

665
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() {
}
}

45
src/views/archivesManage/archivesSearch/index.vue

@ -10,6 +10,7 @@
multiple
collapse-tags
placeholder="请选择"
@change="handleChose"
>
<el-option
v-for="item in options"
@ -39,38 +40,35 @@
height="calc(100vh - 493px)"
@row-dblclick="handleDbClick"
>
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column type="index" label="序号" width="60" align="center" />
<el-table-column prop="child" label="子条数目" align="center" width="100" />
<el-table-column prop="security_class" label="密级" align="center" min-width="100" />
<el-table-column prop="retention" label="保管期限" align="center" min-width="100" />
<el-table-column prop="archive_year" label="年度" align="center" min-width="100" />
<el-table-column prop="fonds_no" label="全宗号" align="center" min-width="180" />
<el-table-column prop="category_type" label="门类级别" align="center" min-width="100">
<template slot-scope="scope">
<!-- 门类级别 -->
<span v-if="scope.row.category_type === 5" style="width:56px">文件级</span>
<span v-if="scope.row.category_type === 4" style="width:56px">卷内级</span>
<span v-if="scope.row.category_type === 3" style="width:56px">案卷级</span>
</template>
</el-table-column>
<el-table-column prop="case_name" label="门类名称" align="center" min-width="170" />
<el-table-column prop="fonds_no" label="全宗号" align="center" min-width="180" />
<el-table-column prop="category_name" label="门类名称" align="center" min-width="170" />
<el-table-column prop="archive_no" label="档号" align="center" min-width="180" />
<el-table-column prop="archive_year" label="归档年度" align="center" min-width="100" />
<el-table-column prop="maintitle" label="题名" align="center" min-width="240" />
<el-table-column prop="security_class" label="保密程度" align="center" min-width="100" />
<el-table-column prop="department" label="部门" align="center" min-width="100" />
<el-table-column type="serial_no" label="序号" width="100" align="center" />
<el-table-column type="arrive_class" label="收发类别" width="140" align="center" />
<el-table-column type="doc_no" label="发文字号" width="140" align="center" />
<el-table-column type="temp_no" label="临时卷号" width="140" align="center" />
<el-table-column prop="case_name" label="盒名称" align="center" min-width="180" />
<el-table-column prop="folder_location_details" label="所在位置" align="center" min-width="260">
<el-table-column prop="folder_location" label="所在位置" align="center" min-width="260">
<template slot-scope="scope">
<span v-if="!scope.row.folder_location_details">-</span>
<span v-if="!scope.row.folder_location">-</span>
<span v-else>
<el-tag effect="dark">{{ scope.row.folder_location_details }}</el-tag>
<el-tag effect="dark">{{ scope.row.folder_location }}</el-tag>
</span>
</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间" align="center" min-width="180">
<template slot-scope="scope">
<div>{{ scope.row.create_time | parseTime }}</div>
</template>
</el-table-column>
<el-table-column prop="created_date" label="成文日期" align="center" min-width="180" />
</el-table>
<el-pagination :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" />
</div>
@ -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)

80
src/views/archivesManage/fileImport/dataImport/index.vue

@ -11,15 +11,16 @@
<div v-if="isShow01" class="step-content step-upload">
<el-upload
ref="upload"
:limit="1"
:on-exceed="handleExceed"
:headers="headers"
:before-upload="beforeUpload"
:before-remove="beforeRemove"
:auto-upload="false"
:on-success="handleSuccess"
:on-error="handleError"
:on-remove="handleRemove"
:on-change="changeFile"
accept=".zip"
:file-list="fileList"
:action="fileUploadApi + '?name=' + name"
>
<div class="upload-zip"><i class="el-icon-upload2" />选择文件</div>
@ -84,6 +85,7 @@
<script>
import { mapGetters } from 'vuex'
import { getToken } from '@/utils/auth'
import detail from '../module/detail.vue'
export default {
name: 'DataImport',
@ -91,7 +93,9 @@ export default {
data() {
return {
name: '',
headers: {
Authorization: getToken()
},
deleteVisible: false,
form: {
file: true,
@ -101,7 +105,8 @@ export default {
},
isShow01: true,
isShow02: false,
isShow03: false
isShow03: false,
fileList: []
}
},
computed: {
@ -114,10 +119,15 @@ export default {
},
methods: {
handleStep01() {
if (this.fileList.length === 0) {
this.$message.warning('请上传相关文件 !')
return
}
this.isShow01 = false
this.isShow02 = true
},
handleReturn02() {
this.fileList = []
this.isShow01 = true
this.isShow02 = false
this.isShow03 = false
@ -132,36 +142,32 @@ export default {
this.isShow02 = true
this.isShow03 = false
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!')
} else {
console.log('error submit!!')
return false
}
})
},
//
upload() {
//
changeFile(file, fileList) {
if (fileList.length > 1) {
fileList.splice(0, 1)
}
this.fileList = fileList
},
// , , false Promise reject
beforeUpload(file) {
},
handleRemove(file, fileList) {
console.log(file, fileList)
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
const sizeLimit = file.size / 1024 / 1024 > 10
if (sizeLimit) {
this.$message.warning('上传文件大小不能超过 10MB!')
}
const fileFamart = file.name.split('.')[file.name.split('.').length - 1]
if (fileFamart !== 'zip') {
this.$message.warning('必须上传zip格式的文件!')
}
return !sizeLimit && fileFamart === 'zip'
},
beforeRemove(file, fileList) {
return this.$confirm('此操作将清空所选数据, 是否继续?', '提示')
},
handleSuccess(response, file, fileList) {
// this.crud.notify('', CRUD.NOTIFICATION_TYPE.SUCCESS)
// this.$refs.upload.clearFiles()
// this.crud.status.add = CRUD.STATUS.NORMAL
// this.crud.resetForm()
// this.crud.toQuery()
//
handleRemove(file, fileList) {
this.fileList = []
console.log(file, fileList)
},
//
handleError(e, file, fileList) {
@ -172,6 +178,24 @@ export default {
duration: 2500
})
this.loading = false
},
//
handleSuccess(response, file, fileList) {
// this.crud.notify('', CRUD.NOTIFICATION_TYPE.SUCCESS)
// this.$refs.upload.clearFiles()
// this.crud.status.add = CRUD.STATUS.NORMAL
// this.crud.resetForm()
// this.crud.toQuery()
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!')
} else {
console.log('error submit!!')
return false
}
})
}
}
}

106
src/views/home.vue

@ -18,7 +18,7 @@
<!-- <div class="chart-wrapper">
<pie-chart />
</div> -->
<div class="container-left" style="height: 100%;margin: 0">
<div class="container-left" style="height: 100%;margin: 0; position: relative;">
<span class="right-top-line" />
<span class="left-bottom-line" />
<h3 class=" table-title">
@ -26,26 +26,52 @@
<svg-icon icon-class="a-3Dkufang" class-name="warehouse-svg" />3D库房
</p>
</h3>
<div class="warehouse-tab">
<ul class="warehouse-nav">
<li @click="changeActiveTab(0)">
<span />
<p>全景图</p>
</li>
<li @click="changeActiveTab(1)">
<span />
<p>档案库</p>
</li>
<li @click="changeActiveTab(2)">
<span />
<p>整理室</p>
</li>
<li @click="changeActiveTab(3)">
<span />
<p>阅览室</p>
</li>
</ul>
<div class="home-floor-tab">
<p :class="{ 'active-floor': floorIndex == 0 }" @click="changeFloorTab(0)">5楼</p>
<p :class="{ 'active-floor': floorIndex == 1 }" @click="changeFloorTab(1)">7楼</p>
</div>
<el-carousel ref="carouselRef" trigger="click" :interval="4000" indicator-position="none" height="110px" arrow="never" @change="handleChange">
<el-carousel-item>
<div class="warehouse-tab">
<ul class="warehouse-nav">
<li @click="changeActiveTab(1,0)">
<span />
<p>全景图</p>
</li>
<li @click="changeActiveTab(1,1)">
<span />
<p>档案库</p>
</li>
<li @click="changeActiveTab(1,2)">
<span />
<p>整理室</p>
</li>
<li @click="changeActiveTab(1,3)">
<span />
<p>阅览室</p>
</li>
</ul>
</div>
</el-carousel-item>
<el-carousel-item>
<div class="warehouse-tab">
<ul class="warehouse-nav">
<li @click="changeActiveTab(0,4)">
<span />
<p>全景图</p>
</li>
<li @click="changeActiveTab(0,5)">
<span />
<p>现行文件室</p>
</li>
<li @click="changeActiveTab(0,6)">
<span />
<p>待销文件室</p>
</li>
</ul>
</div>
</el-carousel-item>
</el-carousel>
</div>
</el-col>
</el-row>
@ -159,13 +185,24 @@ export default {
mixins: [statisticsCrud],
data() {
return {
waitBorrowerData: []
waitBorrowerData: [],
floorIndex: 0
}
},
created() {
this.getWaitBorrower()
},
mounted() {
},
methods: {
handleChange(index) {
this.floorIndex = index
},
changeFloorTab(index) {
this.floorIndex = index
const carousel = this.$refs.carouselRef
carousel.setActiveItem(index)
},
// handleSetLineChartData(type) {
// this.lineChartData = lineChartData[type]
// },
@ -176,11 +213,12 @@ export default {
}
})
},
changeActiveTab(id) {
changeActiveTab(floorId, roomId) {
this.$router.push({
name: 'warehouse3D',
params: {
roomId: id
floorId: floorId,
roomId: roomId
}
})
}
@ -327,4 +365,26 @@ export default {
}
}
}
.home-floor-tab{
position: absolute;
right: 14px;
top: 10px;
color: #fff;
display: flex;
justify-self: flex-start;
p{
font-size: 14px;
padding:2px 6px;
margin-right: 6px;
color: #339cff;
border: 1px solid #339cff;
border-radius: 4px;
cursor: pointer;
&.active-floor,
&:hover{
color: #fff;
background-color: #113d72;
}
}
}
</style>

1
src/views/storeManage/warehouse3D/index.vue

@ -101,6 +101,7 @@ export default {
created() {
// this.initWebSocket()
if (this.$route.params.roomId) {
this.floorIndex = this.$route.params.floorId
this.activeIndex = this.$route.params.roomId
}
displayConfigApi.list({ storeroomId: '' }).then((data) => {

Loading…
Cancel
Save