8 changed files with 632 additions and 101 deletions
-
22src/api/archiveUtilize/cart.js
-
4src/layout/components/Navbar.vue
-
6src/router/routers.js
-
61src/views/archiveUtilize/archiveSearch/module/resultList.vue
-
334src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue
-
71src/views/archivesManage/managementLibrary/index.vue
-
86src/views/collectReorganizi/collectionLibrary/index.vue
-
149src/views/system/user/cart.vue
@ -0,0 +1,22 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
// import qs from 'qs'
|
||||
|
|
||||
|
// 添加档案至借阅车
|
||||
|
export function FetchAddBorrowCar(data) { |
||||
|
return request({ |
||||
|
url: 'api/archivesUtilize/addBorrowCar', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 添加借阅流程
|
||||
|
export function FetchInitAddBorrowFlow(data) { |
||||
|
return request({ |
||||
|
url: 'api/archivesUtilize/addBorrowFlow', |
||||
|
ethod: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export default { FetchAddBorrowCar, FetchInitAddBorrowFlow } |
@ -0,0 +1,334 @@ |
|||||
|
<template> |
||||
|
<el-dialog :title="title" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="lendFormVisible" :before-close="handleCloseDialog" @opened="opened"> |
||||
|
<div class="setting-dialog"> |
||||
|
<el-form ref="form" :model="form" :rules="rules" inline label-width="100px"> |
||||
|
<el-form-item label="利用人" prop="applicant"> |
||||
|
<el-input v-model="form.applicant" style="width: 280px;" disabled /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="利用流程" prop="title"> |
||||
|
<el-input v-model="form.title" style="width: 280px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="开始时间" prop="giveStartTime"> |
||||
|
<el-date-picker |
||||
|
v-model="form.giveStartTime" |
||||
|
:picker-options="pickerStartTime" |
||||
|
type="date" |
||||
|
align="right" |
||||
|
format="yyyy-MM-dd" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期" |
||||
|
style="width: 280px;" |
||||
|
disabled |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="结束时间" prop="giveEndTime"> |
||||
|
<el-date-picker |
||||
|
v-model="form.giveEndTime" |
||||
|
:picker-options="pickerEndTime" |
||||
|
type="date" |
||||
|
align="right" |
||||
|
format="yyyy-MM-dd" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期" |
||||
|
style="width: 280px;" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-row> |
||||
|
<el-form-item label="利用事由" prop="reason"> |
||||
|
<el-input v-model="form.reason" type="textarea" :rows="4" style="width: 703px;" /> |
||||
|
</el-form-item> |
||||
|
</el-row> |
||||
|
<!-- <el-row> |
||||
|
<el-form-item label="状态" prop="status"> |
||||
|
<span class="row-state soon-state">即将到期</span> |
||||
|
<span class="row-state end-state">利用中</span> |
||||
|
<span class="row-state cancel-state">已过期</span> |
||||
|
</el-form-item> |
||||
|
</el-row> --> |
||||
|
</el-form> |
||||
|
<el-table |
||||
|
ref="table" |
||||
|
:data="detailArcData" |
||||
|
style="width: 100%;" |
||||
|
height="calc(100vh - 560px)" |
||||
|
> |
||||
|
<el-table-column type="index" label="序号" align="center" width="55" /> |
||||
|
<el-table-column prop="maintitle" label="档案文件" show-overflow-tooltip> |
||||
|
<template slot-scope="scope"> |
||||
|
<div class="title-style"><span>文件</span>【{{ scope.row.archiveNo }}】{{ scope.row.maintitle }}</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="checkedId" label="利用方式" width="340"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-checkbox-group v-model="scope.row.checkedId" class="checkbox-style" @change="handleChecked"> |
||||
|
<el-checkbox v-for="item in List" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox> |
||||
|
</el-checkbox-group> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<!-- <el-table-column prop="createTime" label="实体借阅状态" align="center" width="110"> |
||||
|
<template> |
||||
|
<div> |
||||
|
<span class="row-state soon-state">即将到期</span> |
||||
|
<span class="row-state end-state">利用中</span> |
||||
|
<span class="row-state cancel-state">已过期</span> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> --> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button @click.native="handleCloseDialog">取消</el-button> |
||||
|
<el-button type="primary" @click="submitForm">提交</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { FetchFondsDetail } from '@/api/system/fonds' |
||||
|
import { FetchIntoFlowBusiness } from '@/api/archivesManage/library' |
||||
|
import { FetchBusinessFlowTitle } from '@/api/collect/collect' |
||||
|
import { mapGetters } from 'vuex' |
||||
|
import { getCurrentTime } from '@/utils/index' |
||||
|
export default { |
||||
|
name: 'LendForm', |
||||
|
components: { }, |
||||
|
data() { |
||||
|
return { |
||||
|
title: '利用详情', |
||||
|
lendFormVisible: false, |
||||
|
form: { |
||||
|
applicant: null, |
||||
|
title: null, |
||||
|
giveStartTime: null, |
||||
|
giveEndTime: null, |
||||
|
reason: null, |
||||
|
fondsNo: null |
||||
|
}, |
||||
|
detailArcData: [], |
||||
|
List: [ |
||||
|
{ |
||||
|
value: 1, |
||||
|
label: '电子查看' |
||||
|
}, |
||||
|
{ |
||||
|
value: 2, |
||||
|
label: '下载' |
||||
|
}, |
||||
|
{ |
||||
|
value: 3, |
||||
|
label: '打印' |
||||
|
}, |
||||
|
{ |
||||
|
value: 4, |
||||
|
label: '实体借阅' |
||||
|
} |
||||
|
], |
||||
|
rules: { |
||||
|
title: [ |
||||
|
{ required: true, message: '标题不可为空', trigger: 'blur' } |
||||
|
], |
||||
|
giveStartTime: [ |
||||
|
{ required: true, message: '开始时间不可为空', trigger: 'blur' } |
||||
|
], |
||||
|
giveEndTime: [ |
||||
|
{ required: true, message: '结束时间不可为空', trigger: 'blur' } |
||||
|
], |
||||
|
reason: [ |
||||
|
{ required: true, message: '利用事由不可为空', trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'user', |
||||
|
'baseApi' |
||||
|
]), |
||||
|
pickerStartTime() { |
||||
|
const _this = this |
||||
|
return { |
||||
|
disabledDate: time => { |
||||
|
if (_this.form.giveEndTime) { |
||||
|
const giveEndTime = _this.form.giveEndTime.replace(/-/g, '/') |
||||
|
return time.getTime() > new Date(giveEndTime) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
pickerEndTime() { |
||||
|
const _this = this |
||||
|
return { |
||||
|
disabledDate: time => { |
||||
|
if (_this.form.giveStartTime) { |
||||
|
const giveStartTime = _this.form.giveStartTime.replace(/-/g, '/') |
||||
|
return time.getTime() < new Date(giveStartTime) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
}, |
||||
|
methods: { |
||||
|
opened() { |
||||
|
this.form.applicant = this.user.username |
||||
|
this.form.giveStartTime = getCurrentTime() |
||||
|
this.getFondsDetail() |
||||
|
// this.$refs.archivesListModule.getViewTable() |
||||
|
}, |
||||
|
handleChecked(item) { |
||||
|
console.log('item', item) |
||||
|
}, |
||||
|
getFondsDetail() { |
||||
|
FetchFondsDetail({ id: this.user.fonds.id }).then((res) => { |
||||
|
this.form.fondsNo = res.fondsNo |
||||
|
if (res.fondsNo) { |
||||
|
this.getBusinessFlowTitle() |
||||
|
} |
||||
|
}).catch(err => { |
||||
|
console.log(err) |
||||
|
}) |
||||
|
}, |
||||
|
getBusinessFlowTitle() { |
||||
|
const params = { |
||||
|
'username': this.user.username, |
||||
|
'fondsNo': this.form.fondsNo, |
||||
|
'businessType': 5 |
||||
|
} |
||||
|
FetchBusinessFlowTitle(params).then((res) => { |
||||
|
if (res.code !== 500) { |
||||
|
console.log(res) |
||||
|
this.form.title = res |
||||
|
} else { |
||||
|
this.$message({ message: '失败', type: 'error', offset: 8 }) |
||||
|
} |
||||
|
}).catch(err => { |
||||
|
console.log(err) |
||||
|
}) |
||||
|
}, |
||||
|
submitForm() { |
||||
|
this.$refs['form'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
const archivesIds = [] |
||||
|
this.selections.forEach(val => { |
||||
|
archivesIds.push(val.id) |
||||
|
}) |
||||
|
const params = { |
||||
|
'title': this.form.title, // 流程名称 |
||||
|
'applicant': this.user.username, // 申请人 |
||||
|
'archivesIds': archivesIds, |
||||
|
'businessType': 5, |
||||
|
'categoryId': this.selectedCategory.id, |
||||
|
'categoryLevel': this.collectLevel, |
||||
|
'reason': this.form.reason, |
||||
|
'fondsNo': this.form.fondsNo, // 原始全宗 |
||||
|
'targetFondsNo': this.targetFondsNo ? this.targetFondsNo.fondsId : null// 目标全宗号 |
||||
|
// 'targetPosition': 'string', // 目的位置 |
||||
|
// 'startPosition': 'string', // 开始位置 |
||||
|
// 'givegiveStartTime': null, // 赋权开始时间 |
||||
|
// 'giveEndTime': null // 赋权结束时间 |
||||
|
} |
||||
|
console.log(params) |
||||
|
FetchIntoFlowBusiness(params).then((res) => { |
||||
|
if (res.code !== 5001) { |
||||
|
this.$message({ message: '操作提交成功', type: 'success', offset: 8 }) |
||||
|
this.$emit('close-dialog') |
||||
|
} else { |
||||
|
// const message = JSON.parse(res.message) |
||||
|
// this.$message.error(message.fail.join(',') + '操作提交失败') |
||||
|
this.$message({ message: res.message, type: 'error', offset: 8 }) |
||||
|
} |
||||
|
this.handleClose() |
||||
|
}).catch(err => { |
||||
|
console.log(err) |
||||
|
}) |
||||
|
} else { |
||||
|
console.log('error submit!!') |
||||
|
return false |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
tableDoubleClick(row) { |
||||
|
this.lendDetail = true |
||||
|
}, |
||||
|
handleCloseDialog(done) { |
||||
|
this.lendFormVisible = false |
||||
|
// 关闭弹框 |
||||
|
// done() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.recordList-main{ |
||||
|
height: calc(100vh - 236px); |
||||
|
.start-date, |
||||
|
.end-date{ |
||||
|
display: flex; |
||||
|
justify-content: flex-start; |
||||
|
padding-left: 8px; |
||||
|
font-size: 14px; |
||||
|
line-height: 30px; |
||||
|
color: #0C0E1E; |
||||
|
span{ |
||||
|
display: block; |
||||
|
margin-right: 8px; |
||||
|
} |
||||
|
} |
||||
|
.iconfont{ |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
.icon-fou{ |
||||
|
color: #A6ADB6; |
||||
|
} |
||||
|
.icon-shi{ |
||||
|
color: #12C37A; |
||||
|
} |
||||
|
.icon-dengdai{ |
||||
|
color: #FF8329; |
||||
|
} |
||||
|
.icon-cuowu1{ |
||||
|
color: #ED4A41; |
||||
|
} |
||||
|
.row-state{ |
||||
|
width: 56px; |
||||
|
padding: 0; |
||||
|
text-align: center; |
||||
|
} |
||||
|
} |
||||
|
.title-style{ |
||||
|
span{ |
||||
|
display: inline-block; |
||||
|
width: 42px; |
||||
|
height: 22px; |
||||
|
line-height: 22px; |
||||
|
text-align: center; |
||||
|
font-size: 12px; |
||||
|
color: #0348F3; |
||||
|
background-color: #CAE1FF; |
||||
|
border-radius: 3px; |
||||
|
} |
||||
|
} |
||||
|
::v-deep .el-dialog{ |
||||
|
width: 860px !important; |
||||
|
.el-form-item .el-form-item__content{ |
||||
|
width: 280px; |
||||
|
} |
||||
|
.dialog-footer{ |
||||
|
margin-top: 15px !important; |
||||
|
} |
||||
|
} |
||||
|
::v-deep .el-checkbox-group{ |
||||
|
.el-checkbox{ |
||||
|
margin-right: 10px !important; |
||||
|
} |
||||
|
} |
||||
|
::v-deep .el-pagination{ |
||||
|
margin: 24px 0 10px 0 !important |
||||
|
} |
||||
|
|
||||
|
::v-deep .input-prepend .el-input__inner{ |
||||
|
padding-left: 100px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,149 @@ |
|||||
|
<template> |
||||
|
<div class="app-container tab-container" style="height: calc(100vh - 140px);"> |
||||
|
<div class="head-container" style="display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px;"> |
||||
|
<div class="head-search" style="margin-bottom: 0;"> |
||||
|
<el-input |
||||
|
v-model="keyWord" |
||||
|
size="small" |
||||
|
clearable |
||||
|
placeholder="输入关键字可模糊检索" |
||||
|
style="width: 245px;" |
||||
|
class="filter-item" |
||||
|
@clear="crud.toQuery" |
||||
|
@keyup.enter.native="crud.toQuery" |
||||
|
/> |
||||
|
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="crud.toQuery">搜索</el-button> |
||||
|
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery()">重置</el-button> |
||||
|
</div> |
||||
|
<crudOperation> |
||||
|
<template v-slot:right> |
||||
|
<el-button size="mini" :disabled="crud.selections.length === 0"> |
||||
|
<i class="iconfont icon-shengchengpandiandan" /> |
||||
|
利用 |
||||
|
</el-button> |
||||
|
<el-button size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)"> |
||||
|
<i class="iconfont icon-shanchu" /> |
||||
|
删除 |
||||
|
</el-button> |
||||
|
</template> |
||||
|
</crudOperation> |
||||
|
</div> |
||||
|
<el-table |
||||
|
ref="table" |
||||
|
v-loading="crud.loading" |
||||
|
:data="crud.data" |
||||
|
row-key="id" |
||||
|
style="width: 100%;" |
||||
|
height="calc(100vh - 266px)" |
||||
|
@row-click="clickRowHandler" |
||||
|
@cell-dblclick="tableDoubleClick" |
||||
|
@selection-change="crud.selectionChangeHandler" |
||||
|
> |
||||
|
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> |
||||
|
<el-table-column prop="title" label="题名" /> |
||||
|
<el-table-column prop="researchType" label="档号" align="center" /> |
||||
|
<el-table-column prop="editor1" label="门类" align="center" /> |
||||
|
<el-table-column prop="editor2" label="分类" align="center" /> |
||||
|
<el-table-column prop="editor2" label="层级" align="center" /> |
||||
|
<el-table-column prop="startTime" label="加入时间" width="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<div>{{ scope.row.startTime | parseTime }}</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<pagination v-if="crud.data.length !== 0" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import CRUD, { presenter, crud } from '@crud/crud' |
||||
|
import pagination from '@crud/Pagination' |
||||
|
import crudOperation from '@crud/CRUD.operation' |
||||
|
import { mapGetters } from 'vuex' |
||||
|
export default { |
||||
|
name: 'Cart', |
||||
|
components: { pagination, crudOperation }, |
||||
|
mixins: [presenter(), crud()], |
||||
|
cruds() { |
||||
|
return CRUD({ |
||||
|
url: 'api/archivesUtilize/initborrowCar', |
||||
|
title: '借阅车', |
||||
|
crudMethod: { }, |
||||
|
optShow: { |
||||
|
add: false, |
||||
|
edit: false, |
||||
|
del: false, |
||||
|
download: false, |
||||
|
reset: false, |
||||
|
group: false |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
keyWord: null |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'user', |
||||
|
'baseApi' |
||||
|
]) |
||||
|
}, |
||||
|
watch: { |
||||
|
}, |
||||
|
created() { |
||||
|
}, |
||||
|
methods: { |
||||
|
resetQuery() { |
||||
|
this.keyWord = null |
||||
|
this.crud.toQuery() |
||||
|
}, |
||||
|
[CRUD.HOOK.beforeRefresh]() { |
||||
|
this.crud.query.search = this.keyWord |
||||
|
}, |
||||
|
toDelete(data) { |
||||
|
this.$confirm('此操作将删除所选数据' + '<span>你是否还要继续?</span>', '提示', { |
||||
|
confirmButtonText: '继续', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning', |
||||
|
dangerouslyUseHTMLString: true |
||||
|
}).then(() => { |
||||
|
const ids = data.map(item => item.id) |
||||
|
const params = { |
||||
|
'ids': ids, |
||||
|
'operator': this.user.username |
||||
|
} |
||||
|
console.log(params) |
||||
|
// crudEditing.del(params).then((res) => { |
||||
|
// console.log(res) |
||||
|
// if (res.code !== 500) { |
||||
|
// this.$message({ message: '删除成功', type: 'success', offset: 8 }) |
||||
|
// } else { |
||||
|
// this.$message({ message: res.message, type: 'error', offset: 8 }) |
||||
|
// } |
||||
|
// this.initData() |
||||
|
// }).catch(err => { |
||||
|
// console.log(err) |
||||
|
// }) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
clickRowHandler(row) { |
||||
|
this.$refs.table.toggleRowSelection(row) |
||||
|
}, |
||||
|
tableDoubleClick(row) { |
||||
|
// this.currentResearch = row |
||||
|
// this.$refs.editingDetail.archivesTabIndex = 0 |
||||
|
// this.$refs.editingDetail.getDetail(row) |
||||
|
// this.$refs.editingDetail.editingDetailVisible = true |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.el-pagination{ |
||||
|
margin: 10px 0 !important; |
||||
|
} |
||||
|
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue