Browse Source

文件流转柜管理

master
xuhuajiao 2 weeks ago
parent
commit
249374cf6a
  1. 2
      .env.development
  2. 2
      src/layout/components/Navbar.vue
  3. 1
      src/layout/components/Sidebar/index.vue
  4. 558
      src/views/archivesMIOD/‌filingCabinet/index.vue
  5. 10
      src/views/home.vue

2
.env.development

@ -3,7 +3,7 @@ ENV = 'development'
# 接口地址 # 接口地址
# 许镇-本地服地址 # 许镇-本地服地址
VUE_APP_BASE_API = 'http://192.168.99.72:13000'
VUE_APP_BASE_API = 'http://192.168.99.63:13000'
# VUE_APP_BASE_API = 'http://192.168.99.67:13000' # VUE_APP_BASE_API = 'http://192.168.99.67:13000'
VUE_APP_AIDEEPSEEK_API = 'http://192.168.99.86:12123' VUE_APP_AIDEEPSEEK_API = 'http://192.168.99.86:12123'

2
src/layout/components/Navbar.vue

@ -135,7 +135,7 @@ export default {
} }
}, },
created() { created() {
store.dispatch('initborrowCar').then(() => {})
// store.dispatch('initborrowCar').then(() => {})
store.dispatch('initMySystemNotice').then(() => { }) store.dispatch('initMySystemNotice').then(() => { })
if (!localStorage.getItem('themeValue')) { if (!localStorage.getItem('themeValue')) {
this.changetheme('light') this.changetheme('light')

1
src/layout/components/Sidebar/index.vue

@ -52,7 +52,6 @@ export default {
} }
}, },
mounted() { mounted() {
console.log('sidebarRouters', this.sidebarRouters)
}, },
methods: { methods: {
handleSelect(key, keyPath) { handleSelect(key, keyPath) {

558
src/views/archivesMIOD/‌filingCabinet/index.vue

@ -0,0 +1,558 @@
<template>
<div class="app-container row-container">
<div class="filing-cabinet-wrapper">
<div class="file-cabinet">
<div class="cabinet-grid">
<div class="cabinet-column">
<div
v-for="(item, index) in cabinetColumns[0]"
:key="'col1-' + index"
:class="['cabinet-cell', { 'cabinet-cell-ld': item.type === 'ld', 'cabinet-cell-department': item.type === 'department', 'cabinet-cell-big': item.type === 'big', 'cabinet-cell-selected': selectedCell === item.id }]"
@click="selectCell(item)"
>
<span v-if="item.type !== 'big'" class="cell-id">{{ item.id }}</span>
<span v-if="item.type === 'ld'" class="cell-label">{{ item.name }}</span>
<span v-else-if="item.type === 'department'" class="cell-label">{{ item.name }}</span>
<span v-if="item.type !== 'big' && item.fileCount > 0" class="cell-file-count">{{ item.fileCount }}</span>
</div>
</div>
<div class="cabinet-column">
<div
v-for="(item, index) in cabinetColumns[1]"
:key="'col2-' + index"
:class="['cabinet-cell', { 'cabinet-cell-ld': item.type === 'ld', 'cabinet-cell-department': item.type === 'department', 'cabinet-cell-big': item.type === 'big', 'cabinet-cell-selected': selectedCell === item.id, 'cabinet-cell-unbound': item.type === 'department' && !item.bound }]"
@click="selectCell(item)"
>
<span v-if="item.type !== 'big'" class="cell-id">{{ item.id }}</span>
<span v-if="item.type === 'ld'" class="cell-label">{{ item.name }}</span>
<span v-else-if="item.type === 'department'" class="cell-label">{{ item.bound ? item.borrowName : '' }}</span>
<span v-if="item.type !== 'big' && item.bound && item.fileCount > 0" class="cell-file-count">{{ item.fileCount }}</span>
</div>
</div>
<div class="cabinet-column">
<div
v-for="(item, index) in cabinetColumns[2]"
:key="'col3-' + index"
:class="['cabinet-cell', { 'cabinet-cell-ld': item.type === 'ld', 'cabinet-cell-department': item.type === 'department', 'cabinet-cell-big': item.type === 'big', 'cabinet-cell-selected': selectedCell === item.id, 'cabinet-cell-unbound': item.type === 'department' && !item.bound }]"
@click="selectCell(item)"
>
<span v-if="item.type !== 'big'" class="cell-id">{{ item.id }}</span>
<span v-if="item.type === 'ld'" class="cell-label">{{ item.name }}</span>
<span v-else-if="item.type === 'department'" class="cell-label">{{ item.bound ? item.borrowName : '' }}</span>
<span v-if="item.type !== 'big' && item.bound && item.fileCount > 0" class="cell-file-count">{{ item.fileCount }}</span>
</div>
</div>
<div class="cabinet-column">
<div
v-for="(item, index) in cabinetColumns[3]"
:key="'col4-' + index"
:class="['cabinet-cell', { 'cabinet-cell-ld': item.type === 'ld', 'cabinet-cell-department': item.type === 'department', 'cabinet-cell-big': item.type === 'big', 'cabinet-cell-selected': selectedCell === item.id, 'cabinet-cell-unbound': item.type === 'department' && !item.bound }]"
@click="selectCell(item)"
>
<span v-if="item.type !== 'big'" class="cell-id">{{ item.id }}</span>
<span v-if="item.type === 'ld'" class="cell-label">{{ item.name }}</span>
<span v-else-if="item.type === 'department'" class="cell-label">{{ item.bound ? item.borrowName : '' }}</span>
<span v-if="item.type !== 'big' && item.bound && item.fileCount > 0" class="cell-file-count">{{ item.fileCount }}</span>
</div>
</div>
</div>
</div>
<div class="content-wrap">
<div v-if="selectedCellInfo" class="cabinet-info">
<div style="display: flex; justify-content: flex-start;">
<div class="info-row">
<span class="info-label">编号</span>
<span class="info-value">{{ selectedCellInfo.id }}</span>
</div>
<div class="info-row">
<span class="info-label">绑定状态</span>
<span :class="['info-value', selectedCellInfo.type === 'department' && !selectedCellInfo.bound ? 'unbound' : '']">
{{ selectedCellInfo.type === 'department' ? (selectedCellInfo.bound ? '已绑定' : '未绑定') : '已绑定' }}
</span>
</div>
<div class="info-row">
<span class="info-label">绑定目标</span>
<span class="info-value">
{{ selectedCellInfo.type === 'ld' ? selectedCellInfo.name : (selectedCellInfo.type === 'department' ? (selectedCellInfo.bound ? selectedCellInfo.borrowName : '-') : '') }}
</span>
</div>
</div>
<div>
<el-button v-if="selectedCellInfo.type === 'department' && !selectedCellInfo.bound" size="mini" @click="borrowerListVisible = true">
<i class="iconfont icon-bendiguajie" />
绑定
</el-button>
<el-button v-else class="unbind-btn" size="mini">
<i class="iconfont icon-jiebang" />
解绑
</el-button>
</div>
</div>
<div class="container-wrap">
<span class="right-top-line" />
<span class="left-bottom-line" />
<el-table
ref="table"
v-loading="crud.loading"
class="archives-table"
:data="crud.data"
style="width: 100%;"
height="calc(100vh - 260px)"
@cell-dblclick="tableDoubleClick"
>
<el-table-column type="index" label="序号" width="60" />
<el-table-column prop="reg_no" label="登记号" width="120" />
<el-table-column prop="details_type" label="文件类型" width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.details_type === 1">原件</el-tag>
<el-tag v-else>复印件</el-tag>
</template>
</el-table-column>
<el-table-column prop="maintitle" label="公文题名" min-width="140" show-overflow-tooltip />
<el-table-column prop="doc_no" label="发文字号" width="120" />
<el-table-column prop="doc_department" label="所属文件" width="120" />
<el-table-column prop="actual_return_time" label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button size="mini" style="padding: 5px;" :loading="removalLoaing[scope.$index]" @click="handleBatchDel(scope.$index, scope.row)">手动下架</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<el-dialog :close-on-click-modal="false" :modal-append-to-body="false" append-to-body title="绑定借阅者" :visible.sync="borrowerListVisible">
<div class="setting-dialog">
<div style="display: flex; justify-content: flex-start; margin-bottom: 15px;">
<el-input v-model="query.search" clearable size="small" placeholder="输入借阅者名称搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="handleSearch" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" style="margin-left: 10px;" @click="handleSearch">搜索</el-button>
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetSearch">重置</el-button>
</div>
<el-table
ref="borrowerTable"
v-loading="borrowerListLoading"
:data="borrowerList"
row-key="id"
height="300px"
>
<el-table-column prop="borrowName" label="借阅者名称" />
<el-table-column prop="borrowType" label="借阅者类型">
<template slot-scope="scope">
<div>
<span v-if="scope.row.borrowType === 1">部门</span>
<span v-if="scope.row.borrowType === 2">个人</span>
</div>
</template>
</el-table-column>
<el-table-column prop="borrowNo" label="借阅证号" />
<el-table-column prop="borrowNo" label="已绑定位置" />
<el-table-column prop="create_time" label="操作" width="80">
<template slot-scope="scope">
<el-button size="mini" style="padding: 5px;" @click="handleBindCell(scope.row)">绑定</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="borrowerPage.current"
:page-size="borrowerPage.size"
:total="borrowerPage.total"
:page-sizes="[10, 20, 50, 100]"
layout="total, prev, pager, next, sizes"
@size-change="handleBorrowerSizeChange"
@current-change="handleBorrowerPageChange"
/>
</div>
</el-dialog>
<MidoArchivesInfo ref="archivesInfo" :is-mido-record="true" :parent-info="parentInfo" :page-type="pageType" />
</div>
</template>
<script>
import CRUD, { presenter, crud } from '@crud/crud'
import { FetchInitBorrowerList } from '@/api/system/borrower'
import MidoArchivesInfo from '@/views/archivesMIOD/miodLibrary/module/detail'
import { mapGetters } from 'vuex'
export default {
name: 'FilingCabinet',
components: { MidoArchivesInfo },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
url: 'api/documentArchives/initBorrowLog',
title: '文件流转柜管理',
optShow: {
add: false,
edit: false,
del: false,
download: false,
reset: false,
group: false
}
})
},
data() {
return {
detailArcData: [],
categoryId: null,
parentInfo: null,
pageType: 'miodRecord',
removalLoaing: [],
selectedCell: null,
selectedCellInfo: null,
cabinetColumns: [
[
{ id: '01', name: 'LD1', type: 'ld', fileCount: 5 },
{ id: '02', name: 'LD2', type: 'ld', fileCount: 0 },
{ id: '03', name: 'LD3', type: 'ld', fileCount: 0 },
{ id: '04', name: 'LD4', type: 'ld', fileCount: 0 },
{ id: '05', name: 'LD5', type: 'ld', fileCount: 0 },
{ id: '06', name: 'LD6', type: 'ld', fileCount: 0 },
{ id: '07', name: 'LD7', type: 'ld', fileCount: 0 },
{ id: '01-1', name: '', type: 'big' }
],
[
{ id: '08', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '09', name: '', type: 'department', bound: true, borrowName: '财务审计处', fileCount: 0 },
{ id: '10', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '11', name: '', type: 'department', bound: true, borrowName: '规划处', fileCount: 0 },
{ id: '12', name: '', type: 'department', bound: true, borrowName: '建设管理处', fileCount: 9 },
{ id: '13', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '14', name: '', type: 'department', bound: true, borrowName: '客运处', fileCount: 7 },
{ id: '15', name: '', type: 'department', bound: true, borrowName: '货运处', fileCount: 11 },
{ id: '16', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '17', name: '', type: 'department', bound: true, borrowName: '办公室', fileCount: 14 },
{ id: '02-1', name: '', type: 'big' }
],
[
{ id: '18', name: '', type: 'department', bound: true, borrowName: '港航处', fileCount: 5 },
{ id: '19', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '20', name: '', type: 'department', bound: true, borrowName: '安全应急处', fileCount: 10 },
{ id: '21', name: '', type: 'department', bound: true, borrowName: '物流处', fileCount: 6 },
{ id: '22', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '23', name: '', type: 'department', bound: true, borrowName: '公共交通处', fileCount: 13 },
{ id: '24', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '25', name: '', type: 'department', bound: true, borrowName: '机关党委', fileCount: 7 },
{ id: '26', name: '', type: 'department', bound: true, borrowName: '办公室', fileCount: 9 },
{ id: '27', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '03-1', name: '', type: 'big' }
],
[
{ id: '28', name: '', type: 'department', bound: true, borrowName: '综合执法支队', fileCount: 16 },
{ id: '29', name: '', type: 'department', bound: true, borrowName: '公路中心', fileCount: 12 },
{ id: '30', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '31', name: '', type: 'department', bound: true, borrowName: '货运中心', fileCount: 5 },
{ id: '32', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '33', name: '', type: 'department', bound: true, borrowName: '客运中心', fileCount: 11 },
{ id: '34', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '35', name: '', type: 'department', bound: true, borrowName: '信息中心', fileCount: 9 },
{ id: '36', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '37', name: '', type: 'department', bound: true, borrowName: '财务中心', fileCount: 7 },
{ id: '04-1', name: '', type: 'big' }
]
],
borrowerListVisible: false,
borrowerList: [],
borrowerListLoading: false,
borrowerPage: {
current: 0,
size: 10,
total: 0
},
query: {
search: ''
}
}
},
computed: {
...mapGetters([
'baseApi'
])
},
watch: {
},
created() {
},
mounted() {
this.getBorrowerList()
this.selectCell(this.cabinetColumns[0][0])
},
methods: {
selectCell(item) {
if (item.type === 'empty' || item.type === 'big') return
this.selectedCell = item.id
this.selectedCellInfo = item
},
[CRUD.HOOK.beforeRefresh]() {
},
[CRUD.HOOK.afterRefresh](crud) {
},
handleBindCell(item) {
console.log('item', item)
},
tableDoubleClick(row) {
console.log('row', row)
this.parentInfo = row
this.$nextTick(() => {
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0
this.$refs.archivesInfo.getDetial()
})
},
handleSearch() {
this.borrowerPage.current = 0
this.getBorrowerList()
},
resetSearch() {
this.query.search = ''
this.borrowerPage.current = 0
this.getBorrowerList()
},
getBorrowerList() {
this.borrowerListLoading = true
const params = {
page: this.borrowerPage.current,
size: this.borrowerPage.size,
search: this.query.search
}
FetchInitBorrowerList(params).then(res => {
if (res && res.content) {
this.borrowerList = res.content || []
this.borrowerPage.total = res.totalElements || 0
} else {
this.borrowerList = []
this.borrowerPage.total = 0
}
this.borrowerListLoading = false
}).catch(err => {
console.error('获取借阅者列表失败:', err)
this.borrowerList = []
this.borrowerPage.total = 0
this.borrowerListLoading = false
})
},
handleBorrowerPageChange(page) {
this.borrowerPage.current = page
this.getBorrowerList()
},
handleBorrowerSizeChange(size) {
this.borrowerPage.size = size
this.borrowerPage.current = 0
this.getBorrowerList()
},
handleBatchDel(index, data) {
this.$set(this.removalLoaing, index, true)
this.$confirm('此操作将下架当前公文' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const params = data.map(item => {
return item.id
})
console.log(params)
// FetchDelAssistEnter(params).then((res) => {
// if (res.code !== 500) {
// this.$message({ message: '', type: 'success', offset: 8 })
// this.crud.refresh()
// } else {
// this.$message({ message: '', type: 'error', offset: 8 })
// }
// }).catch(err => {
// console.log(err)
// })
this.$set(this.removalLoaing, index, false)
}).catch(() => {
this.$set(this.removalLoaing, index, false)
})
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/collect-reorganizi.scss";
::v-deep .el-pagination{
margin: 24px 0 10px 0 !important
}
.filing-cabinet-wrapper {
display: flex;
justify-content: flex-start;
}
.file-cabinet {
background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
border-radius: 8px;
padding: 15px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
margin-right: 20px;
}
.cabinet-grid {
display: flex;
gap: 8px;
}
.cabinet-column {
display: flex;
flex-direction: column;
gap: 8px;
}
.cabinet-column:nth-child(1) .cabinet-cell {
height: 75px;
width: 100px;
}
.cabinet-column:nth-child(2) .cabinet-cell,
.cabinet-column:nth-child(3) .cabinet-cell,
.cabinet-column:nth-child(4) .cabinet-cell {
height: 50px;
width: 100px;
}
.cabinet-column .cabinet-cell-big {
height: 120px !important;
}
.cabinet-cell {
border-radius: 4px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
cursor: pointer;
transition: all 0.3s ease;
border: 1px solid #d9d9d9;
position: relative;
overflow: hidden;
}
.cabinet-cell-empty {
background: #fff;
border: 1px dashed #d9d9d9;
cursor: default;
}
.cabinet-cell-ld {
background: linear-gradient(145deg, #fff 0%, #f0f0f0 100%);
}
.cabinet-cell-department {
background: linear-gradient(145deg, #f5f7fa 0%, #e4e8ec 100%);
}
.cabinet-cell-unbound {
background: linear-gradient(145deg, #fafafa 0%, #e8e8e8 100%);
opacity: 0.6;
}
.cabinet-cell-unbound .cell-label {
color: #999;
}
.cabinet-cell-big {
cursor: default;
pointer-events: none;
}
.cabinet-cell:hover:not(.cabinet-cell-empty) {
border-color: #1890ff;
box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}
.cabinet-cell-selected {
border-color: #1890ff;
background: linear-gradient(145deg, #e6f7ff 0%, #b3d9ff 100%);
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.cell-label {
font-size: 12px;
color: #333;
font-weight: 500;
text-align: center;
padding: 0 4px;
}
.cell-num {
font-size: 10px;
color: #999;
margin-top: 2px;
}
.cell-id {
position: absolute;
top: 2px;
left: 4px;
font-size: 10px;
color: #999;
}
.cell-file-count {
position: absolute;
bottom: 2px;
right: 4px;
font-size: 11px;
color: #1890ff;
font-weight: bold;
// background: rgba(24, 144, 255, 0.1);
padding: 1px 4px;
border-radius: 4px;
}
.cabinet-info {
display: flex;
justify-content: space-between;
align-items: center;
// margin-top: 15px;
padding: 12px;
background: #fff;
border-radius: 6px;
border: 1px solid #e8e8e8;
}
.info-row {
display: flex;
margin-right: 20px;
font-size: 14px;
&:last-child {
margin-right: 0;
}
}
.info-label {
color: #999;
}
.info-value {
color: #333;
font-weight: 500;
}
.info-value.unbound {
color: #ED4A41;
}
.content-wrap {
width: calc(100% - 454px);
}
[data-theme=light] .el-button.unbind-btn,
[data-theme=light] .el-button.unbind-btn:hover,
[data-theme=light] .el-button.unbind-btn:focus{
color: #ED4A41;
border-color: #ED4A41;
background: transparent;
}
[data-theme=light] .el-button.unbind-btn.is-disabled,
[data-theme=light] .el-button.unbind-btn.is-disabled:hover,
[data-theme=light] .el-button.unbind-btn.is-disabled:focus{
color:#F6A5A0;
border-color:#F6A5A0;
background: rgba(252,49,49,0.2);
}
</style>

10
src/views/home.vue

@ -252,13 +252,16 @@ export default {
'detailsType': this.isOriginal ? 1 : null 'detailsType': this.isOriginal ? 1 : null
} }
FetchHomeBorrowLog(param).then(res => { FetchHomeBorrowLog(param).then(res => {
console.log('FetchHomeBorrowLog', res)
if (res && Array.isArray(res)) {
this.miodTableData = res this.miodTableData = res
} else {
this.miodTableData = []
}
}) })
}, },
getHomeRemindHandle() { getHomeRemindHandle() {
FetchHomeRemindHandle().then(res => { FetchHomeRemindHandle().then(res => {
console.log('remindData', res)
if (res && Array.isArray(res)) {
this.remindData = res.map(item => { this.remindData = res.map(item => {
return { return {
reg_no: item[0], reg_no: item[0],
@ -268,6 +271,9 @@ export default {
parents_id: item[4] parents_id: item[4]
} }
}) })
} else {
this.remindData = []
}
}) })
}, },
tableDoubleClick(row) { tableDoubleClick(row) {

Loading…
Cancel
Save