Browse Source

文件柜api

master
xuhuajiao 6 days ago
parent
commit
ff99fbde2b
  1. 2
      package.json
  2. 31
      src/api/system/documentArchives.js
  3. 308
      src/views/archivesMIOD/‌filingCabinet/index.vue

2
package.json

@ -1,5 +1,5 @@
{ {
"name": "yxk-electronic-archives",
"name": "transportation-archives",
"version": "1.0.0", "version": "1.0.0",
"description": "电子档案管理系统", "description": "电子档案管理系统",
"license": "", "license": "",

31
src/api/system/documentArchives.js

@ -368,6 +368,32 @@ export function FetchBorrowerdsByIds(params) {
}) })
} }
// 文件流转柜绑定借阅者
export function FetchCabinetBingBorrower(data) {
return request({
url: 'api/documentCirculationCabinet/bingBorrower',
method: 'post',
data
})
}
// 文件流转柜解绑借阅者
export function FetchCabinetUnbingBorrower(data) {
return request({
url: 'api/documentCirculationCabinet/unbingBorrower',
method: 'post',
data
})
}
// 根据文件流转柜编号查询详情
export function FetchDocumentCirculationCabinetById(params) {
return request({
url: 'api/documentCirculationCabinet/getDocumentCirculationCabinetById' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
})
}
export default { export default {
FetchInitDocumentParam, FetchInitDocumentParam,
updateDocumentParam, updateDocumentParam,
@ -410,5 +436,8 @@ export default {
FetchLend, FetchLend,
FetchDocumentReturn, FetchDocumentReturn,
FetchBorrowerPassInit, FetchBorrowerPassInit,
FetchBorrowerdsByIds
FetchBorrowerdsByIds,
FetchCabinetBingBorrower,
FetchCabinetUnbingBorrower,
FetchDocumentCirculationCabinetById
} }

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

@ -7,52 +7,49 @@
<div <div
v-for="(item, index) in cabinetColumns[0]" v-for="(item, index) in cabinetColumns[0]"
:key="'col1-' + index" :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 }]"
: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.bound }]"
@click="selectCell(item)" @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>
<span class="cell-id">{{ item.id }}</span>
<!-- <span v-if="item.type === 'ld'" class="cell-label">{{ item.bound ? item.borrowName : '' }}</span> -->
<span class="cell-label">{{ item.bound ? item.borrowName : '' }}</span>
<span v-if="item.documentCount > 0" class="cell-file-count">{{ item.documentCount }}</span>
</div> </div>
</div> </div>
<div class="cabinet-column"> <div class="cabinet-column">
<div <div
v-for="(item, index) in cabinetColumns[1]" v-for="(item, index) in cabinetColumns[1]"
:key="'col2-' + index" :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 }]"
: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.bound }]"
@click="selectCell(item)" @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>
<span class="cell-id">{{ item.id }}</span>
<span class="cell-label">{{ item.bound ? item.borrowName : '' }}</span>
<span v-if="item.documentCount > 0" class="cell-file-count">{{ item.documentCount }}</span>
</div> </div>
</div> </div>
<div class="cabinet-column"> <div class="cabinet-column">
<div <div
v-for="(item, index) in cabinetColumns[2]" v-for="(item, index) in cabinetColumns[2]"
:key="'col3-' + index" :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 }]"
: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.bound }]"
@click="selectCell(item)" @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>
<span class="cell-id">{{ item.id }}</span>
<span class="cell-label">{{ item.bound ? item.borrowName : '' }}</span>
<span v-if="item.documentCount > 0" class="cell-file-count">{{ item.documentCount }}</span>
</div> </div>
</div> </div>
<div class="cabinet-column"> <div class="cabinet-column">
<div <div
v-for="(item, index) in cabinetColumns[3]" v-for="(item, index) in cabinetColumns[3]"
:key="'col4-' + index" :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 }]"
: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.bound }]"
@click="selectCell(item)" @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>
<span class="cell-id">{{ item.id }}</span>
<span class="cell-label">{{ item.bound ? item.borrowName : '' }}</span>
<span v-if="item.documentCount > 0" class="cell-file-count">{{ item.documentCount }}</span>
</div> </div>
</div> </div>
</div> </div>
@ -66,19 +63,19 @@
</div> </div>
<div class="info-row"> <div class="info-row">
<span class="info-label">绑定状态</span> <span class="info-label">绑定状态</span>
<span :class="['info-value', selectedCellInfo.type === 'department' && !selectedCellInfo.bound ? 'unbound' : '']">
{{ selectedCellInfo.type === 'department' ? (selectedCellInfo.bound ? '已绑定' : '未绑定') : '已绑定' }}
<span :class="['info-value', !selectedCellInfo.bound ? 'unbound' : '']">
{{ selectedCellInfo.bound ? '已绑定' : '未绑定' }}
</span> </span>
</div> </div>
<div class="info-row"> <div class="info-row">
<span class="info-label">绑定目标</span> <span class="info-label">绑定目标</span>
<span class="info-value"> <span class="info-value">
{{ selectedCellInfo.type === 'ld' ? selectedCellInfo.name : (selectedCellInfo.type === 'department' ? (selectedCellInfo.bound ? selectedCellInfo.borrowName : '-') : '') }}
{{ selectedCellInfo.bound ? selectedCellInfo.borrowName : '-' }}
</span> </span>
</div> </div>
</div> </div>
<div> <div>
<el-button v-if="selectedCellInfo.type === 'department' && !selectedCellInfo.bound" size="mini" @click="borrowerListVisible = true">
<el-button v-if="!selectedCellInfo.bound" size="mini" @click="borrowerListVisible = true">
<i class="iconfont icon-bendiguajie" /> <i class="iconfont icon-bendiguajie" />
绑定 绑定
</el-button> </el-button>
@ -95,7 +92,7 @@
ref="table" ref="table"
v-loading="crud.loading" v-loading="crud.loading"
class="archives-table" class="archives-table"
:data="crud.data"
:data="miodData"
style="width: 100%;" style="width: 100%;"
height="calc(100vh - 260px)" height="calc(100vh - 260px)"
@cell-dblclick="tableDoubleClick" @cell-dblclick="tableDoubleClick"
@ -147,10 +144,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="borrowNo" label="借阅证号" /> <el-table-column prop="borrowNo" label="借阅证号" />
<el-table-column prop="borrowNo" label="已绑定位置" />
<el-table-column prop="cabinetId" label="已绑定位置">
<template slot-scope="scope">
{{ scope.row.cabinetId ? String(scope.row.cabinetId).padStart(2, '0') : '-' }}
</template>
</el-table-column>
<el-table-column prop="create_time" label="操作" width="80"> <el-table-column prop="create_time" label="操作" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :loading="bindLoading[scope.$index]" size="mini" style="padding: 5px;" @click="handleBindCell(scope.$index, scope.row)">绑定</el-button>
<el-button :disabled="scope.row.cabinetId" :loading="bindLoading[scope.$index]" size="mini" style="padding: 5px;" @click="handleBindCell(scope.$index, scope.row)"> {{ scope.row.cabinetId ? '已绑定' : '绑定' }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -172,6 +173,7 @@
<script> <script>
import CRUD, { presenter, crud } from '@crud/crud' import CRUD, { presenter, crud } from '@crud/crud'
import { FetchInitBorrowerList } from '@/api/system/borrower' import { FetchInitBorrowerList } from '@/api/system/borrower'
import { FetchCabinetBingBorrower, FetchCabinetUnbingBorrower, FetchDocumentCirculationCabinetById } from '@/api/system/documentArchives'
import MidoArchivesInfo from '@/views/archivesMIOD/miodLibrary/module/detail' import MidoArchivesInfo from '@/views/archivesMIOD/miodLibrary/module/detail'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@ -181,7 +183,7 @@ export default {
mixins: [presenter(), crud()], mixins: [presenter(), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
url: 'api/documentArchives/initBorrowLog',
url: 'api/documentCirculationCabinet/initDocumentCirculationCabinet',
title: '文件流转柜管理', title: '文件流转柜管理',
optShow: { optShow: {
add: false, add: false,
@ -205,53 +207,53 @@ export default {
unbindLoading: false, unbindLoading: false,
cabinetColumns: [ 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: '01', borrowName: '', type: 'ld', bound: false, documentCount: 0 },
{ id: '02', borrowName: '', type: 'ld', bound: false, documentCount: 0 },
{ id: '03', borrowName: '', type: 'ld', bound: false, documentCount: 0 },
{ id: '04', borrowName: '', type: 'ld', bound: false, documentCount: 0 },
{ id: '05', borrowName: '', type: 'ld', bound: false, documentCount: 0 },
{ id: '06', borrowName: '', type: 'ld', bound: false, documentCount: 0 },
{ id: '07', borrowName: '', type: 'ld', bound: false, documentCount: 0 },
{ id: '08', borrowName: '', type: 'big', bound: false, documentCount: 0 }
], ],
[ [
{ 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: 0 },
{ id: '15', name: '', type: 'department', bound: true, borrowName: '货运处', fileCount: 0 },
{ id: '16', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '17', name: '', type: 'department', bound: true, borrowName: '办公室', fileCount: 0 },
{ id: '02-1', name: '', type: 'big' }
{ id: '09', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '10', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '11', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '12', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '13', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '14', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '15', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '16', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '17', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '18', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '19', borrowName: '', type: 'big', bound: false, documentCount: 0 }
], ],
[ [
{ id: '18', name: '', type: 'department', bound: true, borrowName: '港航处', fileCount: 0 },
{ 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: 0 },
{ id: '22', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '23', name: '', type: 'department', bound: true, borrowName: '公共交通处', fileCount: 0 },
{ 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: 0 },
{ id: '27', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '03-1', name: '', type: 'big' }
{ id: '20', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '21', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '22', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '23', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '24', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '25', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '26', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '27', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '28', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '29', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '30', borrowName: '', type: 'big', bound: false, documentCount: 0 }
], ],
[ [
{ id: '28', name: '', type: 'department', bound: true, borrowName: '综合执法支队', fileCount: 0 },
{ id: '29', name: '', type: 'department', bound: true, borrowName: '公路中心', fileCount: 0 },
{ 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: 0 },
{ id: '34', name: '', type: 'department', bound: false, borrowName: '', fileCount: 0 },
{ id: '35', name: '', type: 'department', bound: true, borrowName: '信息中心', fileCount: 0 },
{ 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' }
{ id: '31', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '32', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '33', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '34', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '35', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '36', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '37', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '38', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '39', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '40', borrowName: '', type: 'department', bound: false, documentCount: 0 },
{ id: '41', borrowName: '', type: 'big', bound: false, documentCount: 0 }
] ]
], ],
borrowerListVisible: false, borrowerListVisible: false,
@ -265,7 +267,9 @@ export default {
query: { query: {
search: '' search: ''
}, },
bindLoading: []
bindLoading: [],
lastSelectedCellId: null,
miodData: []
} }
}, },
computed: { computed: {
@ -279,20 +283,104 @@ export default {
}, },
mounted() { mounted() {
this.getBorrowerList() this.getBorrowerList()
this.selectCell(this.cabinetColumns[0][0])
}, },
methods: { methods: {
selectCell(item) { selectCell(item) {
if (item.type === 'empty' || item.type === 'big') return
if (item.type === 'empty') return
this.selectedCell = item.id this.selectedCell = item.id
this.selectedCellInfo = item this.selectedCellInfo = item
this.getMiodData()
}, },
[CRUD.HOOK.beforeRefresh]() { [CRUD.HOOK.beforeRefresh]() {
this.crud.params.page = undefined
this.crud.params.size = undefined
}, },
[CRUD.HOOK.afterRefresh](crud) { [CRUD.HOOK.afterRefresh](crud) {
if (crud.data && Array.isArray(crud.data)) {
this.transformCabinetData(crud.data)
}
},
transformCabinetData(data) {
const ldCells = []
const departmentCells = []
const bigCells = []
data.forEach(item => {
const cell = {
id: String(item.id).padStart(2, '0'),
type: item.cabinetType === 1 ? 'ld' : (item.cabinetType === 3 ? 'big' : 'department'),
documentCount: item.documentCount || 0,
bound: !!item.bindBorrower,
borrowName: item.borrowName || '',
borrowerType: item.borrowerType,
originalData: item
}
if (item.cabinetType === 1) {
ldCells.push(cell)
} else if (item.cabinetType === 3) {
bigCells.push(cell)
} else {
departmentCells.push(cell)
}
})
ldCells.sort((a, b) => parseInt(a.id) - parseInt(b.id))
departmentCells.sort((a, b) => parseInt(a.id) - parseInt(b.id))
bigCells.sort((a, b) => parseInt(a.id) - parseInt(b.id))
this.cabinetColumns = [
[...ldCells, bigCells[0]],
[...departmentCells.slice(0, 10), bigCells[1]],
[...departmentCells.slice(10, 20), bigCells[2]],
[...departmentCells.slice(20, 30), bigCells[3]]
]
this.$nextTick(() => {
//
if (this.lastSelectedCellId) {
let targetCell = null
for (const column of this.cabinetColumns) {
targetCell = column.find(cell => cell.id === this.lastSelectedCellId)
if (targetCell) break
}
if (targetCell) {
this.selectCell(targetCell)
return
}
}
if (this.cabinetColumns[0] && this.cabinetColumns[0][0]) {
this.selectCell(this.cabinetColumns[0][0])
}
})
},
getDocumentCirculationCabinetById() {
const params = {
id: this.selectedCellInfo.originalData.id
}
FetchDocumentCirculationCabinetById(params).then((res) => {
if (res.code !== 500) {
this.detailArcData = res.data || []
} else {
this.$message({ message: '获取文件流转柜详情失败', type: 'error', offset: 8 })
}
}).catch(err => {
console.log(err)
this.$message({ message: '获取文件流转柜详情失败', type: 'error', offset: 8 })
})
},
getMiodData() {
const params = {
id: this.selectedCellInfo.originalData.id
}
console.log('params', params)
// FetchCabinetBingBorrower(params).then((res) => {
// console.log('res', res)
// if (res.code !== 500) {
// this.miodData = res.data || []
// } else {
// this.$message({ message: '' + this.selectedCellInfo.id + '', type: 'error', offset: 8 })
// }
// }).catch(err => {
// console.log(err)
// })
}, },
handleBindCell(index, item) { handleBindCell(index, item) {
console.log('item', item)
this.$set(this.bindLoading, index, true) this.$set(this.bindLoading, index, true)
this.$confirm('此操作将绑定当前借阅者' + '<span>你是否还要继续?</span>', '提示', { this.$confirm('此操作将绑定当前借阅者' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续', confirmButtonText: '继续',
@ -300,23 +388,33 @@ export default {
type: 'warning', type: 'warning',
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
}).then(() => { }).then(() => {
// 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)
// })
const params = {
bindBorrower: item.id,
borrowType: null,
id: this.selectedCellInfo.originalData.id
}
console.log('params', params)
FetchCabinetBingBorrower(params).then((res) => {
console.log('res', res)
if (res.code !== 500) {
this.$message({ message: '绑定成功', type: 'success', offset: 8 })
this.lastSelectedCellId = this.selectedCellInfo.id
this.crud.refresh()
} else {
this.$message({ message: '绑定失败', type: 'error', offset: 8 })
}
this.borrowerListVisible = false
this.getBorrowerList()
}).catch(err => {
console.log(err)
this.borrowerListVisible = false
})
this.$set(this.bindLoading, index, false) this.$set(this.bindLoading, index, false)
}).catch(() => { }).catch(() => {
this.$set(this.bindLoading, index, false) this.$set(this.bindLoading, index, false)
}) })
}, },
unbindCell(cell) {
console.log('cell', cell)
unbindCell() {
this.unbindLoading = true this.unbindLoading = true
this.$confirm('此操作将解绑当前绑定的目标' + '<span>你是否还要继续?</span>', '提示', { this.$confirm('此操作将解绑当前绑定的目标' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续', confirmButtonText: '继续',
@ -324,16 +422,19 @@ export default {
type: 'warning', type: 'warning',
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
}).then(() => { }).then(() => {
// 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)
// })
const ids = [this.selectedCellInfo.originalData.id]
FetchCabinetUnbingBorrower(ids).then((res) => {
if (res.code !== 500) {
this.$message({ message: '解绑成功', type: 'success', offset: 8 })
this.lastSelectedCellId = this.selectedCellInfo.id
this.crud.refresh()
} else {
this.$message({ message: '解绑失败', type: 'error', offset: 8 })
}
this.getBorrowerList()
}).catch(err => {
console.log(err)
})
this.unbindLoading = false this.unbindLoading = false
}).catch(() => { }).catch(() => {
this.unbindLoading = false this.unbindLoading = false
@ -433,10 +534,10 @@ export default {
} }
.file-cabinet { .file-cabinet {
background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
// background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
border-radius: 8px; border-radius: 8px;
padding: 15px; padding: 15px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
margin-right: 20px; margin-right: 20px;
} }
@ -503,11 +604,6 @@ export default {
color: #999; color: #999;
} }
.cabinet-cell-big {
cursor: default;
pointer-events: none;
}
.cabinet-cell:hover:not(.cabinet-cell-empty) { .cabinet-cell:hover:not(.cabinet-cell-empty) {
border-color: #1890ff; border-color: #1890ff;
box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3); box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
@ -527,18 +623,12 @@ export default {
padding: 0 4px; padding: 0 4px;
} }
.cell-num {
font-size: 10px;
color: #999;
margin-top: 2px;
}
.cell-id { .cell-id {
position: absolute; position: absolute;
top: 2px; top: 2px;
left: 4px; left: 4px;
font-size: 10px; font-size: 10px;
color: #999;
color: #333;
} }
.cell-file-count { .cell-file-count {

Loading…
Cancel
Save