Browse Source

档案利用/收集管理/权限问题

master
xuhuajiao 1 year ago
parent
commit
7eb605af8f
  1. 5
      src/api/archiveUtilize/cart.js
  2. 3
      src/router/index.js
  3. 27
      src/views/archiveUtilize/archiveSearch/module/resultList.vue
  4. 93
      src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue
  5. 31
      src/views/archiveUtilize/utillizeRecord/recordList.vue
  6. 6
      src/views/archivesManage/managementLibrary/index.vue
  7. 13
      src/views/archivesManage/managementLibrary/module/collectHeader.vue
  8. 6
      src/views/collectReorganizi/collectionLibrary/index.vue
  9. 6
      src/views/components/category/PreviewForm.vue
  10. 55
      src/views/system/user/cart.vue

5
src/api/archiveUtilize/cart.js

@ -3,10 +3,11 @@ import request from '@/utils/request'
// 添加档案至借阅车
export function FetchAddBorrowCar(data) {
console.log('data', data)
return request({
url: 'api/archivesUtilize/addBorrowCar',
method: 'post',
data: data
data
})
}
@ -15,7 +16,7 @@ export function FetchInitAddBorrowFlow(data) {
return request({
url: 'api/archivesUtilize/addBorrowFlow',
ethod: 'post',
data: data
data
})
}

3
src/router/index.js

@ -57,7 +57,8 @@ export const loadMenus = (next, to) => {
const rdata = JSON.parse(JSON.stringify(res))
const sidebarRoutes = filterAsyncRouter(sdata)
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
// 当前用户角色登录后,无上次缓存页面权限,即跳转到首页而不是404
rewriteRoutes.push({ path: '*', redirect: '/', hidden: true })
store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
router.addRoutes(rewriteRoutes) // 动态添加可访问路由表

27
src/views/archiveUtilize/archiveSearch/module/resultList.vue

@ -517,7 +517,23 @@ export default {
this.$nextTick(() => {
this.$refs.lendFormRef.detailArcData = []
this.$refs.lendFormRef.lendFormVisible = true
item.checkedId = []
item.checkedId = [1]
item.childMenu = [{
value: 1,
label: '电子查看'
},
{
value: 2,
label: '下载'
},
{
value: 3,
label: '打印'
},
{
value: 4,
label: '实体借阅'
}]
this.$refs.lendFormRef.detailArcData.push(item)
})
}).catch(() => {
@ -536,8 +552,12 @@ export default {
console.log(params)
FetchAddBorrowCar(params).then(res => {
console.log(res)
if (res) {
this.$message({ message: '加入借阅车成功', type: 'success', offset: 8 })
} else {
this.$message({ message: '加入借阅车失败', type: 'error', offset: 8 })
}
})
// this.$message({ message: '', type: 'success', offset: 8 })
}).catch(() => {
})
},
@ -549,6 +569,9 @@ export default {
handleCurrentPage(val) {
this.page.page = val
this.handledResultSearch()
},
closeDialog() {
}
}
}

93
src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue

@ -12,11 +12,11 @@
<el-date-picker
v-model="form.giveStartTime"
:picker-options="pickerStartTime"
type="date"
type="datetime"
align="right"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
style="width: 280px;"
disabled
/>
@ -25,17 +25,17 @@
<el-date-picker
v-model="form.giveEndTime"
:picker-options="pickerEndTime"
type="date"
type="datetime"
align="right"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
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 label="利用事由" prop="borrowReason">
<el-input v-model="form.borrowReason" type="textarea" :rows="3" style="width: 703px;" />
</el-form-item>
</el-row>
<!-- <el-row>
@ -60,8 +60,9 @@
</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 v-for="item in scope.row.childMenu" :key="item.value" v-model="item.checked" :label="item.value" :data-a="responsive" @change="changeChecked(item)">{{ item.label }}</el-checkbox> -->
<el-checkbox-group v-model="scope.row.checkedId" :min="1" class="checkbox-style" @change="changeChecked">
<el-checkbox v-for="item in scope.row.childMenu" :key="item.value" :label="item.value" :data-a="responsive">{{ item.label }}</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
@ -101,11 +102,13 @@ export default {
title: null,
giveStartTime: null,
giveEndTime: null,
reason: null,
borrowReason: null,
fondsNo: null
},
checkedEquipments: [],
detailArcData: [],
List: [
responsive: true,
uselist: [
{
value: 1,
label: '电子查看'
@ -133,10 +136,11 @@ export default {
giveEndTime: [
{ required: true, message: '结束时间不可为空', trigger: 'blur' }
],
reason: [
borrowReason: [
{ required: true, message: '利用事由不可为空', trigger: 'blur' }
]
}
},
checkedArr: []
}
},
computed: {
@ -175,9 +179,25 @@ export default {
this.form.giveStartTime = getCurrentTime()
this.getFondsDetail()
// this.$refs.archivesListModule.getViewTable()
console.log(this.detailArcData)
},
handleChecked(item) {
console.log('item', item)
// changeChecked(item) {
// console.log('item', item)
// this.responsive = !this.responsive
// },
changeChecked() {
this.responsive = !this.responsive
this.checkedArr = []
this.detailArcData.forEach((item) => {
for (let i = 0; i < item.checkedId.length; i++) {
for (let j = 0; j < item.childMenu.length; j++) {
if (item.checkedId[i] === item.childMenu[j].value) {
this.checkedArr.push(item.childMenu[j].value)
}
}
}
console.log(this.checkedArr) // checkboxvalue
})
},
getFondsDetail() {
FetchFondsDetail({ id: this.user.fonds.id }).then((res) => {
@ -207,30 +227,32 @@ export default {
})
},
submitForm() {
console.log(this.form.checkedId)
this.$refs['form'].validate((valid) => {
if (valid) {
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
const archivesIds = this.detailArcData.map(val => val.archivesId)
const utilizeDTO = this.detailArcData.map(item => {
const json = {
'archivesId': item.archivesId,
'categoryId': item.categoryPid,
'categoryLevel': item.categoryLevel,
'utilizeType': item.checkedId.join(',')
}
return json
})
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,
'borrowReason': this.form.borrowReason,
'giveStartTime': this.form.giveStartTime, //
'giveEndTime': this.form.giveEndTime, //
'fondsNo': this.form.fondsNo, //
'targetFondsNo': this.targetFondsNo ? this.targetFondsNo.fondsId : null//
// 'targetPosition': 'string', //
// 'startPosition': 'string', //
// 'givegiveStartTime': null, //
// 'giveEndTime': null //
'archivesIds': archivesIds,
'utilizeDTO': utilizeDTO
}
console.log(params)
FetchIntoFlowBusiness(params).then((res) => {
if (res.code !== 5001) {
if (res.code !== 5001 && res.code !== 500) {
this.$message({ message: '操作提交成功', type: 'success', offset: 8 })
this.$emit('close-dialog')
} else {
@ -238,7 +260,7 @@ export default {
// this.$message.error(message.fail.join(',') + '')
this.$message({ message: res.message, type: 'error', offset: 8 })
}
this.handleClose()
this.handleCloseDialog()
}).catch(err => {
console.log(err)
})
@ -252,6 +274,11 @@ export default {
this.lendDetail = true
},
handleCloseDialog(done) {
this.form.title = ''
this.form.reason = ''
this.form.giveStartTime = null
this.form.giveEndTime = null
this.$refs['form'].resetFields()
this.lendFormVisible = false
//
// done()

31
src/views/archiveUtilize/utillizeRecord/recordList.vue

@ -41,18 +41,18 @@
@cell-dblclick="tableDoubleClick"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column prop="createTime" label="利用开始时间" width="200">
<el-table-column prop="giveStartTime" label="利用开始时间" width="200">
<template slot-scope="scope">
<div>{{ scope.row.createTime | parseTime }}</div>
<div>{{ scope.row.giveStartTime | parseTime }}</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="利用结束时间" width="200">
<el-table-column prop="giveEndTime" label="利用结束时间" width="200">
<template slot-scope="scope">
<div>{{ scope.row.createTime | parseTime }}</div>
<div>{{ scope.row.giveEndTime | parseTime }}</div>
</template>
</el-table-column>
<el-table-column prop="username" label="利用人" align="center" width="120" />
<el-table-column prop="description" label="利用事由" />
<el-table-column prop="nickName" label="利用人" align="center" width="120" />
<el-table-column prop="borrowReason" label="利用事由" />
<el-table-column prop="browser" label="包含实体借阅" align="center" width="110">
<template>
<div>
@ -164,7 +164,7 @@ export default {
mixins: [presenter(), crud()],
cruds() {
return CRUD({
url: 'api/log/initLog',
url: 'api/archivesUtilize/initborrowLog',
title: '借阅记录',
optShow: {
add: false,
@ -187,8 +187,8 @@ export default {
selections: [],
keyWord: null,
options: [
{ value: 'username', label: '利用人' },
{ value: 'account', label: '利用事由' }
{ value: 'createBy', label: '利用人' },
{ value: 'borrowReason', label: '利用事由' }
],
optionVal: '',
startTime: null,
@ -207,8 +207,11 @@ export default {
},
watch: {
activeIndex: function(newValue, oldValue) {
console.log('newValue', newValue)
this.crud.query.isType = newValue
if (newValue === 0) {
this.crud.query.isExpire = 2
} else {
this.crud.query.isExpire = 1
}
this.crud.toQuery()
}
},
@ -216,7 +219,11 @@ export default {
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.isType = this.activeIndex
if (this.activeIndex === 0) {
this.crud.query.isExpire = 2
} else {
this.crud.query.isExpire = 1
}
},
resetQuery() {

6
src/views/archivesManage/managementLibrary/index.vue

@ -282,7 +282,7 @@ export default {
FetchInitSearchFonds().then(res => {
const allFondsIds = res.map(item => item.fondsId)
this.$refs.classifyTree.setCheckedKeys(allFondsIds)
this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
this.smartQuery.fonds_no = allFondsIds.join(',')
})
this.handlePageList()
// Promise.all(this.user.roles.map(item => this.getRole(item.id)))
@ -408,10 +408,10 @@ export default {
// const isFondsTop = res.some(obj => obj.fondsName === '')
// if (isFondsTop) {
// this.smartQuery.fonds_no = null
const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsNo)
const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsId)
if (fondsGroup.length === 0) {
FetchInitSearchFonds().then(res => {
this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
this.smartQuery.fonds_no = res.map(item => item.fondsId).join(',')
this.$nextTick(() => {
this.handlePageList('quickFilter')
})

13
src/views/archivesManage/managementLibrary/module/collectHeader.vue

@ -82,7 +82,7 @@
mode="horizontal"
@select="handleSelect"
>
<el-submenu v-if="isTitleType !== 6" index="1">
<el-submenu v-if="isTitleType !== 6" v-permission="permission.convention" index="1">
<template slot="title">
<i class="iconfont icon-changgui" />
<span>常规</span>
@ -91,7 +91,7 @@
<el-menu-item v-if="isTitleType !== 6" index="1-1" @click="handleForm('edit')">编辑</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu v-if="isTitleType === 3" index="2">
<el-submenu v-if="isTitleType === 3" v-permission="permission.arrange" index="2">
<template slot="title">
<i class="iconfont icon-zhengli" />
<span>整理</span>
@ -114,7 +114,7 @@
<el-menu-item index="2-9" @click="handleJD(1)">销毁鉴定</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu v-if="isTitleType === 4" index="2">
<el-submenu v-if="isTitleType === 4" v-permission="permission.arrange" index="2">
<template slot="title">
<i class="iconfont icon-zhengli" />
<span>整理</span>
@ -123,7 +123,7 @@
<el-menu-item index="2-1" @click="bindingTag(selections)">标签绑定</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu v-if="isTitleType !== 6" index="3">
<el-submenu v-if="isTitleType !== 6" v-permission="permission.more" index="3">
<template slot="title">
<i class="iconfont icon-gengduo" />
<span>更多</span>
@ -247,6 +247,11 @@ export default {
inject: ['parentsData'],
data() {
return {
permission: {
convention: ['admin', 'archives:convention'],
arrange: ['admin', 'archives:arrange'],
more: ['admin', 'archives:more']
},
value: null,
statusOptions: [
{

6
src/views/collectReorganizi/collectionLibrary/index.vue

@ -286,7 +286,7 @@ export default {
FetchInitSearchFonds().then(res => {
const allFondsIds = res.map(item => item.fondsId)
this.$refs.classifyTree.setCheckedKeys(allFondsIds)
this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
this.smartQuery.fonds_no = allFondsIds.join(',')
})
this.handlePageList()
// Promise.all(this.user.roles.map(item => this.getRole(item.id)))
@ -417,10 +417,10 @@ export default {
// const isFondsTop = res.some(obj => obj.fondsName === '')
// if (isFondsTop) {
// this.smartQuery.fonds_no = null
const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsNo)
const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsId)
if (fondsGroup.length === 0) {
FetchInitSearchFonds().then(res => {
this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
this.smartQuery.fonds_no = res.map(item => item.fondsId).join(',')
this.$nextTick(() => {
this.handlePageList('quickFilter')
})

6
src/views/components/category/PreviewForm.vue

@ -133,7 +133,7 @@ import draggable from 'vuedraggable'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { FetchSonDictionaryList, FetchDictionaryTree } from '@/api/system/dict'
import { FetchFondsAll } from '@/api/system/fonds'
import { FetchInitSearchFonds } from '@/api/archiveUtilize/archiveUtilize'
import { FetchArchivesClassTree, FetchSonArchivesClass } from '@/api/system/archivesClass'
import { parseTime, getCurrentTime } from '@/utils/index'
import { reDocumentUpload } from '@/utils/upload'
@ -363,7 +363,7 @@ export default {
})
}
if (fieldInfo.mateData === 1) {
await FetchFondsAll().then(res => {
await FetchInitSearchFonds().then(res => {
const option = this.getFondsNode(res, this.addOrUpdateForm[val.fieldName])
if (option) {
const obj = {}
@ -460,7 +460,7 @@ export default {
parent.fondsName = '全宗选择'
this.isTableType = 1
this.tableTitle = '全宗列表'
FetchFondsAll().then(res => {
FetchInitSearchFonds().then(res => {
if (item.isInputClass === 'select') {
this.$set(item, 'options', res)
} else if (item.isInputClass === 'popover') {

55
src/views/system/user/cart.vue

@ -17,7 +17,7 @@
</div>
<crudOperation>
<template v-slot:right>
<el-button size="mini" :disabled="crud.selections.length === 0">
<el-button size="mini" :disabled="crud.selections.length === 0" @click="handleLend(crud.selections)">
<i class="iconfont icon-shengchengpandiandan" />
利用
</el-button>
@ -40,18 +40,23 @@
@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">
<el-table-column prop="maintitle" label="题名" />
<el-table-column prop="archiveNo" label="档号" align="center" />
<el-table-column prop="categoryName" label="门类" align="center" />
<el-table-column prop="archivesClassName" label="分类" align="center" />
<el-table-column prop="categoryLevel" label="层级" align="center">
<template slot-scope="scope">
<div>{{ scope.row.startTime | parseTime }}</div>
<div>{{ scope.row.categoryLevel === 3 ? '文件' : '其他' }}</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="加入时间" width="200">
<template slot-scope="scope">
<div>{{ scope.row.createTime | parseTime }}</div>
</template>
</el-table-column>
</el-table>
<pagination v-if="crud.data.length !== 0" />
<LendForm ref="lendFormRef" @close-dialog="closeDialog" />
</div>
</template>
@ -59,10 +64,11 @@
import CRUD, { presenter, crud } from '@crud/crud'
import pagination from '@crud/Pagination'
import crudOperation from '@crud/CRUD.operation'
import LendForm from '@/views/archiveUtilize/utillizeRecord/module/utilizationProcess'
import { mapGetters } from 'vuex'
export default {
name: 'Cart',
components: { pagination, crudOperation },
components: { pagination, crudOperation, LendForm },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
@ -129,6 +135,33 @@ export default {
}).catch(() => {
})
},
handleLend(data) {
this.$refs.lendFormRef.lendFormVisible = true
this.$nextTick(() => {
this.$refs.lendFormRef.detailArcData = []
data.forEach(item => {
item.checkedId = [1]
item.childMenu = [{
value: 1,
label: '电子查看'
},
{
value: 2,
label: '下载'
},
{
value: 3,
label: '打印'
},
{
value: 4,
label: '实体借阅'
}]
})
console.log(data)
this.$refs.lendFormRef.detailArcData = data
})
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row)
},
@ -137,6 +170,10 @@ export default {
// this.$refs.editingDetail.archivesTabIndex = 0
// this.$refs.editingDetail.getDetail(row)
// this.$refs.editingDetail.editingDetailVisible = true
},
closeDialog() {
this.keyWord = null
this.crud.toQuery()
}
}
}

Loading…
Cancel
Save