Browse Source

权限/利用

master
xuhuajiao 11 months ago
parent
commit
9eaf3f5e22
  1. 13
      src/api/archiveUtilize/cart.js
  2. 11
      src/api/archivesManage/library.js
  3. 5
      src/views/archiveUtilize/archiveSearch/module/resultList.vue
  4. 47
      src/views/archiveUtilize/utillizeRecord/module/utilizationProcess.vue
  5. 230
      src/views/archiveUtilize/utillizeRecord/recordList.vue
  6. 9
      src/views/archivesManage/managementLibrary/file/index.vue
  7. 25
      src/views/archivesManage/managementLibrary/index.vue
  8. 18
      src/views/archivesManage/managementLibrary/module/collectHeader.vue
  9. 27
      src/views/archivesManage/managementLibrary/module/uploadFile/index.vue
  10. 2
      src/views/collectReorganizi/collectionLibrary/index.vue
  11. 2
      src/views/collectReorganizi/collectionLibrary/module/uploadFile/index.vue
  12. 32
      src/views/components/archivesDetail/detail.vue
  13. 146
      src/views/components/archivesDetail/uploadFile/index.vue
  14. 4
      src/views/prearchiveLibrary/module/detail.vue
  15. 65
      src/views/system/user/cart.vue

13
src/api/archiveUtilize/cart.js

@ -15,9 +15,18 @@ export function FetchAddBorrowCar(data) {
export function FetchInitAddBorrowFlow(data) {
return request({
url: 'api/archivesUtilize/addBorrowFlow',
ethod: 'post',
method: 'post',
data
})
}
// 删除借阅车中的档案
export function FetchDelBorrowCar(data) {
return request({
url: 'api/archivesUtilize/delBorrowCar',
method: 'post',
data
})
}
export default { FetchAddBorrowCar, FetchInitAddBorrowFlow }
export default { FetchAddBorrowCar, FetchInitAddBorrowFlow, FetchDelBorrowCar }

11
src/api/archivesManage/library.js

@ -49,11 +49,20 @@ export function FetchMainData(params) {
})
}
// 根据利用方式查看是否有权限
export function FetchIsAuthByLookType(params) {
return request({
url: 'api/control/isAuthByLookType' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
})
}
export default {
FetchInitContorlView,
FetchPrintData,
FetchIntoFlowBusiness,
FetchBusinessFlowHistory,
FetchBusinessFlowDetails,
FetchMainData
FetchMainData,
FetchIsAuthByLookType
}

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

@ -148,7 +148,7 @@
</div>
</div>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" />
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" :is-title-type="isTitleType" />
<LendForm ref="lendFormRef" />
</div>
</template>
@ -170,6 +170,7 @@ export default {
},
data() {
return {
isTitleType: 3,
activeNames: ['1'],
filterFondsText: '',
fondsOptions: [],
@ -487,7 +488,7 @@ export default {
this.$emit('close-result')
},
handleDetail(row) {
this.categoryId = row.categoryId
this.categoryId = row.categoryPid
this.arcId = row.archivesId
this.$nextTick(() => {
// if (row.categoryLevel !== 1) {

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

@ -12,9 +12,9 @@
<el-date-picker
v-model="form.giveStartTime"
:picker-options="pickerStartTime"
type="datetime"
type="date"
align="right"
format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
style="width: 280px;"
@ -25,9 +25,9 @@
<el-date-picker
v-model="form.giveEndTime"
:picker-options="pickerEndTime"
type="datetime"
type="date"
align="right"
format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
style="width: 280px;"
@ -89,7 +89,6 @@ 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: { },
@ -108,24 +107,6 @@ export default {
checkedEquipments: [],
detailArcData: [],
responsive: true,
uselist: [
{
value: 1,
label: '电子查看'
},
{
value: 2,
label: '下载'
},
{
value: 3,
label: '打印'
},
{
value: 4,
label: '实体借阅'
}
],
rules: {
title: [
{ required: true, message: '标题不可为空', trigger: 'blur' }
@ -176,15 +157,20 @@ export default {
methods: {
opened() {
this.form.applicant = this.user.username
this.form.giveStartTime = getCurrentTime()
//
const currentDate = new Date()
const year = currentDate.getFullYear()
const month = currentDate.getMonth() + 1 // 0 1
const day = currentDate.getDate()
currentDate.setHours(0, 0, 0, 0)
const formattedDate = `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day} ${currentDate.getHours() < 10 ? '0' + currentDate.getHours() : currentDate.getHours()}:${currentDate.getMinutes() < 10 ? '0' + currentDate.getMinutes() : currentDate.getMinutes()}:${currentDate.getSeconds() < 10 ? '0' + currentDate.getSeconds() : currentDate.getSeconds()}`
this.form.giveStartTime = formattedDate
this.getFondsDetail()
// this.$refs.archivesListModule.getViewTable()
console.log(this.detailArcData)
},
// changeChecked(item) {
// console.log('item', item)
// this.responsive = !this.responsive
// },
changeChecked() {
this.responsive = !this.responsive
this.checkedArr = []
@ -246,11 +232,12 @@ export default {
'businessType': 5,
'borrowReason': this.form.borrowReason,
'giveStartTime': this.form.giveStartTime, //
'giveEndTime': this.form.giveEndTime, //
'giveEndTime': this.form.giveEndTime.split(' ')[0] + ' 23:59:59', //
'fondsNo': this.form.fondsNo, //
'archivesIds': archivesIds,
'utilizeDTO': utilizeDTO
}
console.log(params)
FetchIntoFlowBusiness(params).then((res) => {
if (res.code !== 5001 && res.code !== 500) {
this.$message({ message: '操作提交成功', type: 'success', offset: 8 })

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

@ -3,7 +3,7 @@
<div class="head-container">
<div class="head-search">
<el-input
v-model="keyWord"
v-model="typeValue"
size="small"
clearable
placeholder="请输入关键词"
@ -11,8 +11,9 @@
class="input-prepend filter-item"
@clear="crud.toQuery"
@keyup.enter.native="crud.toQuery"
@input="typeInput"
>
<el-select slot="prepend" v-model="optionVal" style="width: 92px">
<el-select slot="prepend" v-model="inputSelect" style="width: 92px" @change="clearInputValue">
<el-option
v-for="item in options"
:key="item.value"
@ -21,20 +22,14 @@
/>
</el-select>
</el-input>
<div class="start-date">
<span>开始时间</span>
<date-range-picker v-model="startTime" class="date-item" />
</div>
<div class="end-date">
<span>结束时间</span>
<date-range-picker v-model="endTime" class="date-item" />
</div>
<date-range-picker v-model="blurryTime" class="date-item" />
<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>
</div>
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
height="calc(100% - 100px)"
@ -53,32 +48,30 @@
</el-table-column>
<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>
<el-table-column prop="isEntityBorrow" label="包含实体借阅" align="center" width="110">
<template slot-scope="scope">
<div>
<span class="iconfont icon-fou" />
<span class="iconfont icon-shi" />
<span class="iconfont icon-dengdai" />
<span class="iconfont icon-cuowu1" />
<span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" />
<span v-else class="iconfont icon-shi" />
</div>
</template>
</el-table-column>
<el-table-column prop="browser" label="是否已归还" align="center" width="110">
<template>
<template slot-scope="scope">
<div>
<span class="iconfont icon-fou" />
<span class="iconfont icon-shi" />
<span class="iconfont icon-dengdai" />
<span class="iconfont icon-cuowu1" />
<span v-if="scope.row.isEntityBorrow === 0" class="iconfont icon-fou" />
<span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend === 0" class="iconfont icon-shi" />
<!-- <span class="iconfont icon-dengdai" /> -->
<span v-if="scope.row.isEntityBorrow > 0 && scope.row.isLend > 0" class="iconfont icon-cuowu1" />
</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="状态" align="center" width="110">
<template>
<el-table-column prop="borrowType" label="状态" align="center" width="110">
<template slot-scope="scope">
<div>
<span class="row-state soon-state">即将到期</span>
<!-- <span class="row-state end-state">利用中</span>
<span class="row-state cancel-state">已过期</span> -->
<span v-if="scope.row.borrowType==='即将到期'" class="row-state soon-state">{{ scope.row.borrowType }}</span>
<span v-if="scope.row.borrowType==='利用中'" class="row-state end-state">{{ scope.row.borrowType }}</span>
<span v-if="scope.row.borrowType==='已到期'" class="row-state cancel-state">{{ scope.row.borrowType }}</span>
</div>
</template>
</el-table-column>
@ -87,32 +80,22 @@
<el-dialog title="利用详情" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="lendDetail" :before-close="handleCloseDialog">
<div class="setting-dialog">
<el-form ref="form" :model="form" inline label-width="100px">
<el-form-item label="利用人" prop="user">
<el-input v-model="form.user" style="width: 280px;" disabled />
</el-form-item>
<el-form-item label="利用流程" prop="process">
<el-input v-model="form.process" style="width: 280px;" disabled />
</el-form-item>
<el-form-item label="开始时间" prop="startDate">
<el-input v-model="form.startDate" style="width: 280px;" disabled />
</el-form-item>
<el-form-item label="结束时间" prop="endDate">
<el-input v-model="form.endDate" style="width: 280px;" disabled />
</el-form-item>
<el-row>
<el-form-item label="利用事由" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="4" style="width: 703px;" disabled />
</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>
<ul class="hitch-info">
<li><span>标题</span>{{ rowCurrent && rowCurrent.title }}</li>
<li><span>申请时间</span>{{ rowCurrent && rowCurrent.createTime }}</li>
<li><span>利用人</span>{{ rowCurrent && rowCurrent.applicant }}</li>
<li><span>申请部门</span>{{ rowCurrent && rowCurrent.deptsName }}</li>
<li><span>申请理由</span>{{ rowCurrent && rowCurrent.reason }}</li>
<li><span>开始时间</span>{{ rowCurrent && rowCurrent.giveStartTime | parseTime }}</li>
<li><span>结束时间</span>{{ rowCurrent && rowCurrent.giveEndTime | parseTime }}</li>
<li><span>审批意见</span>{{ rowCurrent && rowCurrent.opinion }}</li>
<li class="state-list">
<span v-if="rowCurrent && rowCurrent.status === 1" class="row-state ing-state">进行中</span>
<span v-if="rowCurrent && rowCurrent.status === 2" class="row-state case-cancel">已取消</span>
<span v-if="rowCurrent && rowCurrent.status === 3" class="row-state end-state">已完成</span>
<span v-if="rowCurrent && rowCurrent.status === 4" class="row-state cancel-state">不通过</span>
</li>
</ul>
<el-table
ref="table"
:data="detailArcData"
@ -121,26 +104,26 @@
>
<el-table-column type="index" label="序号" align="center" width="55" />
<el-table-column prop="title" label="档案文件">
<template>
<div class="title-style"><span>文件</span>档号题名</div>
<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="description" label="利用方式" width="340">
<template>
<el-checkbox-group v-model="checkList" class="checkbox-style">
<el-checkbox label="电子查看" disabled />
<el-checkbox label="下载" disabled />
<el-checkbox label="打印" disabled />
<el-checkbox label="实体借阅" disabled />
<el-table-column prop="utilizeType" label="利用方式" width="340">
<template slot-scope="scope">
<el-checkbox-group v-model="scope.row.utilizeType" class="checkbox-style">
<el-checkbox v-for="item in uselist" :key="item.value" :label="item.value" disabled>{{ item.label }}</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
<el-table-column prop="createTime" label="实体借阅状态" align="center" width="110">
<template>
<el-table-column prop="utilizeState" label="实体借阅状态" align="center" width="110">
<template slot-scope="scope">
<div>
<span class="row-state soon-state">即将到期</span>
<!-- <span class="row-state end-state">利用中</span>
<span class="row-state cancel-state">已过期</span> -->
<!-- 实体利用状态 -1.未确认流程(未审批) 0.无需借阅 1.同意借阅 2.不允许借阅 3.已归还 -->
<span v-if="scope.row.utilizeState === -1" class="row-state soon-state">审批中</span>
<span v-if="scope.row.utilizeState === 0" class="row-state end-state">无需借阅</span>
<span v-if="scope.row.utilizeState === 1" class="row-state end-state">同意借阅</span>
<span v-if="scope.row.utilizeState === 2" class="row-state cancel-state">不允许借阅</span>
<span v-if="scope.row.utilizeState === 3" class="row-state end-state">已归还</span>
</div>
</template>
</el-table-column>
@ -157,6 +140,7 @@
import CRUD, { presenter, crud } from '@crud/crud'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker'
import { FetchBusinessFlowDetails } from '@/api/archivesManage/library'
export default {
name: 'RecordList',
@ -184,25 +168,34 @@ export default {
},
data() {
return {
selections: [],
keyWord: null,
typeValue: null,
options: [
{ value: 'createBy', label: '利用人' },
{ value: 'borrowReason', label: '利用事由' }
],
optionVal: '',
startTime: null,
endTime: null,
inputSelect: '',
blurryTime: null,
lendDetail: false,
form: {
user: '张三',
process: '档案借阅流程-张三-2023-01-01',
startDate: '2016-09-21 08:50:08',
endDate: '2016-10-21 08:50:08',
remark: '利用事由'
},
rowCurrent: null,
detailArcData: [],
checkList: ['电子查看', '实体借阅']
uselist: [
{
value: 1,
label: '电子查看'
},
{
value: 2,
label: '下载'
},
{
value: 3,
label: '打印'
},
{
value: 4,
label: '实体借阅'
}
]
}
},
watch: {
@ -215,32 +208,100 @@ export default {
this.crud.toQuery()
}
},
created() {
// select -
this.inputSelect = this.options[0].value
},
mounted() {
},
methods: {
typeInput(e) {
this.typeInputkey = this.getDescByValue(
this.inputSelect,
this.options,
'value',
'value'
)
this.crud.query[this.typeInputkey] = e
},
clearInputValue(val) {
this.inputSelect = val
this.typeValue = ''
// ,typeInputkeyform
if (this.typeInputkey) {
delete this.crud.query[this.typeInputkey]
}
},
getDescByValue(inputValue, data, inputKey = 'value', outputKey = 'value') {
let outputValue = ''
if (data && data.length > 0) {
for (let i = 0; i < data.length; i++) {
const item = data[i]
const itemValue = item[inputKey]
if (inputValue + '' === itemValue + '') {
outputValue = item[outputKey]
break
}
}
}
return outputValue
},
[CRUD.HOOK.beforeRefresh]() {
if (this.activeIndex === 0) {
this.crud.query.isExpire = 2
} else {
this.crud.query.isExpire = 1
}
if (this.blurryTime) {
this.crud.query.startTime = this.blurryTime[0]
this.crud.query.endTime = this.blurryTime[1]
} else {
this.crud.query.startTime = null
this.crud.query.endTime = null
}
},
resetQuery() {
this.clearInputValue()
this.inputSelect = this.options[0].value
this.blurryTime = []
this.crud.query.startTime = null
this.crud.query.endTime = null
this.crud.toQuery()
},
getBusinessFlowDetails(row) {
const params = {
'businessId': row.businessFlowId
}
FetchBusinessFlowDetails(params).then((res) => {
if (res.code !== 500) {
console.log(res)
this.rowCurrent = res.businessFlow
res.details.forEach(item => {
item.utilizeType = item.utilizeType.split(',').map(Number)
})
this.detailArcData = res.details
console.log(this.detailArcData)
} else {
this.$message({ message: '获取数据失败', type: 'error', offset: 8 })
}
}).catch(err => {
console.log(err)
})
},
tableDoubleClick(row) {
this.getBusinessFlowDetails(row)
this.lendDetail = true
},
handleCloseDialog(done) {
this.lendDetail = false
//
// done()
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/collect-reorganizi.scss";
.recordList-main{
height: calc(100vh - 236px);
.start-date,
@ -311,4 +372,9 @@ export default {
::v-deep .input-prepend .el-input__inner{
padding-left: 100px;
}
.row-state{
font-style: normal;
padding: 0 8px;
}
</style>

9
src/views/archivesManage/managementLibrary/file/index.vue

@ -87,15 +87,6 @@
/>
</div>
</el-drawer>
<!-- 点击缩略图看大图 -->
<el-dialog class="preview-dialog" :append-to-body="true" :close-on-click-modal="false" :before-close="handleClose" :visible="showCoverVisible" title="查看大图">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog" style="max-height:calc(100vh - 230px); overflow:auto;">
<img style="max-width:100%; object-fit: contain;" :src="previewSrc" :onerror="defaultImg">
</div>
</el-dialog>
</div>
</template>

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

@ -75,6 +75,7 @@ import crudRoles from '@/api/system/role'
import { manageLibraryCrud } from './mixins/index'
import { FetchInitSearchFonds } from '@/api/archiveUtilize/archiveUtilize'
import { FetchDictionaryTreeByCategoryId } from '@/api/system/dict'
import { FetchIsAuthByLookType } from '@/api/archivesManage/library'
import CRUD, { presenter, header } from '@crud/crud'
import Project from './project/index'
import Anjuan from './anjuan/index'
@ -147,7 +148,14 @@ export default {
'fonds_no': null //
},
fixedStatusBar: false,
listCategory: null
listCategory: null,
authUtilize: {
'look': false,
'download': false,
'print': false,
'endTime': null,
'startTime': null
}
}
},
computed: {
@ -164,6 +172,15 @@ export default {
mounted() {
},
methods: {
//
getIsAuthByLookType(id) {
const params = {
'archivesId': id
}
FetchIsAuthByLookType(params).then(res => {
this.authUtilize = res
})
},
handleYearData(data) {
this.yearChildData = data
this.classifyLoading = true
@ -281,7 +298,7 @@ export default {
this.getDictsList()
FetchInitSearchFonds().then(res => {
const allFondsIds = res.map(item => item.fondsId)
this.$refs.classifyTree.setCheckedKeys(allFondsIds)
// this.$refs.classifyTree.setCheckedKeys(allFondsIds)
this.smartQuery.fonds_no = allFondsIds.join(',')
})
this.handlePageList()
@ -544,13 +561,13 @@ export default {
},
handleOpenJuannei(data, parentId) {
this.parentsAnjuanId = parentId
console.log('this.parentsAnjuanId', this.parentsAnjuanId)
if (this.selectedCategory.arrangeType === 1 || (this.selectedCategory.arrangeType === 3 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1) || (this.selectedCategory.arrangeType === 2 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1)) {
this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => {
this.$refs.fileEle.getCommonData(4, this.parentsAnjuanId)
this.$refs.fileEle.test = data
this.$refs.fileEle.isAjNo = 1
this.getIsAuthByLookType(this.parentsAnjuanId)
})
} else {
this.$refs.juanneiEle.juanneiDrawer = true
@ -563,10 +580,10 @@ export default {
},
handleOpenFile(data, parentId) {
this.parentsJuanneiId = parentId
console.log('this.parentsJuanneiId', this.parentsJuanneiId)
this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => {
this.$refs.fileEle.getCommonData(4, this.parentsJuanneiId)
this.getIsAuthByLookType(this.parentsJuanneiId)
this.$refs.fileEle.test = data
})
}

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

@ -137,6 +137,12 @@
</el-menu>
</div>
<div v-if="!isRecycle && isTitleType === 6" class="collect-menu">
<el-button v-if="parentsData.authUtilize.look" class="filter-item" size="mini" type="success" @click="toPreview"><i class="iconfont icon-sulan" />预览</el-button>
<el-button v-if="parentsData.authUtilize.download" class="filter-item" size="mini" type="success" :disabled="selections.length !== 1" @click="handleOriginalDownload"><i class="iconfont icon-xiazai" :disabled="crud.selections.length !== 1" />下载</el-button>
<el-button v-if="parentsData.authUtilize.print" class="filter-item" size="mini" type="success" :disabled="selections.length !== 1"><i class="iconfont icon-dayin" />打印</el-button>
</div>
<div v-if="isRecycle && (isTitleType === 2 || isTitleType === 3)" class="collect-menu">
<el-button class="filter-item" size="mini" type="success" @click="toRecover"><i class="iconfont icon-huifu" />恢复</el-button>
<el-button class="filter-item" size="mini" type="success" @click="toCompletelyDelete"><i class="iconfont icon-shanchu" />彻底删除</el-button>
@ -185,6 +191,12 @@
</div>
<div style="display: flex; justify-content: space-between; height: 30px; line-height: 30px; padding: 0 10px; ">
<span v-if="(isTitleType !== 2 && selectedCategory.arrangeType === 3 ) || ((isTitleType === 4 || isTitleType === 6) && selectedCategory.arrangeType === 2) || (isTitleType === 6 && selectedCategory.arrangeType === 1)" style="font-size: 12px;">{{ test }}</span>
<div v-if="!isRecycle && isTitleType === 6 && parentsData.authUtilize.endTime" style="font-size: 12px;">
<!-- 利用开始时间{{ parentsData.authUtilize.startTime | parseTime }} -->
利用结束时间{{ parentsData.authUtilize.endTime | parseTime }}
</div>
<div v-if="isTitleType !== 2 && !isRecycle && isTitleType !== 6" class="mangement-fixed-top">
<el-checkbox v-model="parentsData.fixedStatusBar" @change="statusBarChecked">隐藏状态栏</el-checkbox>
</div>
@ -198,6 +210,7 @@ import { manageLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { FetchDetailsById, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect'
import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import PreviewForm from '@/views/components/category/PreviewForm'
@ -832,6 +845,11 @@ export default {
}
this.$refs.formModule.overDetialVisible = true
},
toPreview() {
const routeData = this.$router.resolve({ path: '/preview' })
window.open(routeData.href, '_blank')
},
closeDialog(data) {
this.formVisible = false
setTimeout(() => {

27
src/views/archivesManage/managementLibrary/module/uploadFile/index.vue

@ -63,11 +63,15 @@
</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="130" align="center" />
<!-- <el-table-column v-if="!isUploadDetail && !parentsData.isRecycle" label="操作" min-width="80" align="center">
<template slot-scope="scope">
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button>
<el-table-column label="操作" min-width="80" align="center">
<template>
<div class="handle-btn">
<el-button class="iconfont icon-sulan" @click="toPreview" />
<el-button class="iconfont icon-xiazai" />
<el-button class="iconfont icon-dayin" />
</div>
</template>
</el-table-column> -->
</el-table-column>
</el-table>
<!-- 点击缩略图看大图 -->
@ -114,6 +118,7 @@
<script>
// import { FetchInitArchiveFilesView, FetchEditFile, FetchDeleteFile, FetchFileSort } from '@/api/archivesManage/archivesList'
import { FetchInitFileCategoryView } from '@/api/collect/collect'
import { FetchIsAuthByLookType } from '@/api/archivesManage/library'
import { archivesUpload } from '@/utils/upload'
import { downloadFile, getCurrentTime } from '@/utils/index'
import { mapGetters } from 'vuex'
@ -175,6 +180,10 @@ export default {
}
},
methods: {
toPreview() {
const routeData = this.$router.resolve({ path: '/preview' })
window.open(routeData.href, '_blank')
},
getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB'
const fileSizeInB = fileSize + 'B'
@ -267,6 +276,16 @@ export default {
FetchInitFileCategoryView(params).then(data => {
console.log('darta', data)
this.tableData = data.returnlist
this.getIsAuthByLookType()
})
},
getIsAuthByLookType() {
const params = {
'archivesId': this.arcId
}
console.log(params)
FetchIsAuthByLookType(params).then(res => {
console.log('res', res)
})
},
//

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

@ -285,7 +285,7 @@ export default {
this.getDictsList()
FetchInitSearchFonds().then(res => {
const allFondsIds = res.map(item => item.fondsId)
this.$refs.classifyTree.setCheckedKeys(allFondsIds)
// this.$refs.classifyTree.setCheckedKeys(allFondsIds)
this.smartQuery.fonds_no = allFondsIds.join(',')
})
this.handlePageList()

2
src/views/collectReorganizi/collectionLibrary/module/uploadFile/index.vue

@ -69,7 +69,7 @@
<div class="handle-btn">
<el-button class="iconfont icon-sulan" @click="toPreview" />
<el-button class="iconfont icon-xiazai" @click="downloadFile(scope.row)" />
<el-button class="iconfont icon-dayin" />
<!-- <el-button class="iconfont icon-dayin" /> -->
</div>
</template>
</el-table-column>

32
src/views/components/archivesDetail/detail.vue

@ -7,28 +7,38 @@
<!-- tab -->
<ul class="tab-nav">
<li :class="{'active-tab-nav': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li>
<li v-if="isHasFile" :class="{'active-tab-nav': archivesTabIndex == 1}" @click="changeActiveTab(1)">附件</li>
<li v-if="isHasFile" :class="{'active-tab-nav': archivesTabIndex == 1}" @click="changeActiveTab(1)">电子原文</li>
<li :class="{'active-tab-nav': archivesTabIndex == 2}" @click="changeActiveTab(2)">元数据</li>
<li v-if="isFourTest" :class="{'active-tab-nav': archivesTabIndex == 3}" @click="changeActiveTab(3)">四性检测</li>
<li v-if="isFourTest && isHasFile" :class="{'active-tab-nav': archivesTabIndex == 4}" @click="changeActiveTab(4)">操作记录</li>
</ul>
<!-- 基本信息 -->
<div v-if="archivesTabIndex==0" class="base-info item-content">
<div v-if="archivesTabIndex===0" class="base-info item-content">
<el-row>
<el-col v-for="(item,index) in archivesDetailsData" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item">
<el-col v-for="(item,index) in filteredArray" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item">
<span>{{ item.fieldCnName }}</span>
<p :style="{ width: ( item.editLength ? item.editLength+'px' : '' ), flex: ( !item.editLength ? 1 : '' )}">{{ item.context }}</p>
</el-col>
</el-row>
<el-row v-for="(item,index) in archivesDetailsData" :key="index">
<el-col v-if="item.fieldName === 'is_entity'" :span="24" class="base-info-item">
<span>有无实体</span>
<p style="flex:1">{{ item.context === 1 ? '有' : '无' }}</p>
</el-col>
</el-row>
</div>
<!-- 附件 -->
<UploadFile v-if="archivesTabIndex==1" ref="uploadFile" class="item-content" :is-upload-detail="false" :selected-category="selectedCategory" :arc-id="arcId" />
<UploadFile v-if="archivesTabIndex===1" ref="uploadFile" class="item-content" :is-upload-detail="false" :selected-category="selectedCategory" :arc-id="arcId" :category-id="categoryId" />
<!-- 元数据 -->
<div v-if="archivesTabIndex==2" class="metadata-cont item-content">
<div v-if="archivesTabIndex===2" class="metadata-cont item-content">
<pre v-highlightjs="xml_show">
<code class="highlight_s">
{[xml_show]}
</code>
</pre>
</div>
<FourTestInfo v-if="archivesTabIndex===3" />
<HandleInfo v-if="archivesTabIndex===4" />
</div>
</div>
</el-dialog>
@ -37,9 +47,11 @@
<script>
import { FetchDetailsById, FetchArchivesMetadata } from '@/api/collect/collect'
import UploadFile from './uploadFile/index'
import FourTestInfo from './fourTestInfo/index'
import HandleInfo from './handleInfo/index'
export default {
name: 'ArchivesInfo',
components: { UploadFile },
components: { UploadFile, FourTestInfo, HandleInfo },
props: {
selectedCategory: {
type: Object,
@ -64,6 +76,7 @@ export default {
return {
detailTitle: '',
isHasFile: false, // /
isFourTest: false,
isDetailsInfo: false, // 5
archivesInfoVisible: false,
archivesTabIndex: 0,
@ -72,6 +85,13 @@ export default {
xml_show: null
}
},
computed: {
filteredArray() {
const lastIndex = this.archivesDetailsData.length - 1
return this.archivesDetailsData
.filter((item, index) => index !== lastIndex || item.fieldName !== 'is_entity')
}
},
created() {
},
mounted() {

146
src/views/components/archivesDetail/uploadFile/index.vue

@ -64,24 +64,28 @@
</el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="130" align="center" />
<!-- && !recycleMain.isRecycle -->
<el-table-column v-if="!isUploadDetail && !parentsData.isRecycle" label="操作" min-width="80" align="center">
<template slot-scope="scope">
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button>
<!-- <el-table-column label="操作" min-width="80" align="center">
<template>
<div class="handle-btn">
<el-button class="iconfont icon-sulan" @click="toPreview" />
<el-button class="iconfont icon-xiazai" />
<el-button class="iconfont icon-dayin" />
</div>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<!-- 点击缩略图看大图 -->
<el-dialog class="preview-dialog" :append-to-body="true" :close-on-click-modal="false" :before-close="handleClose" :visible="showCoverVisible" title="查看大图">
<!-- <el-dialog class="preview-dialog" :append-to-body="true" :close-on-click-modal="false" :before-close="handleClose" :visible="showCoverVisible" title="查看大图">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog" style="max-height:calc(100vh - 230px); overflow:auto;">
<img style="max-width:100%; object-fit: contain;" :src="previewSrc" :onerror="defaultImg">
</div>
</el-dialog>
</el-dialog> -->
<!-- 排序 -->
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="排序" :visible.sync="sortVisible" @opened="opened">
<!-- <el-dialog :close-on-click-modal="false" :append-to-body="true" title="排序" :visible.sync="sortVisible" @opened="opened">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
@ -94,10 +98,10 @@
<el-button type="primary" @click.native="handleSort">保存</el-button>
</div>
</div>
</el-dialog>
</el-dialog> -->
<!-- 删除附件 -->
<el-dialog title="删除附件" :append-to-body="true" :close-on-click-modal="false" :visible.sync="deleteVisible" :before-close="handleClose">
<!-- <el-dialog title="删除附件" :append-to-body="true" :close-on-click-modal="false" :visible.sync="deleteVisible" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
@ -108,7 +112,7 @@
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</el-dialog> -->
</div>
</template>
@ -118,15 +122,11 @@ import { FetchInitFileCategoryView } from '@/api/collect/collect'
import { archivesUpload } from '@/utils/upload'
import { downloadFile, getCurrentTime } from '@/utils/index'
import { mapGetters } from 'vuex'
import { form } from '@crud/crud'
import Sortable from 'sortablejs'
// import Sortable from 'sortablejs'
export default {
name: 'UploadFile',
components: {},
mixins: [
form({})
],
inject: ['parentsData'],
mixins: [],
props: {
isUploadDetail: {
type: Boolean,
@ -143,18 +143,24 @@ export default {
default: function() {
return ''
}
},
categoryId: {
type: String,
default: function() {
return ''
}
}
},
data() {
return {
defaultImg: 'this.src="' + require('@/assets/images/cover-bg.png') + '"',
// defaultImg: 'this.src="' + require('@/assets/images/cover-bg.png') + '"',
tableData: [], // list
selections: [], // table -
showCoverVisible: false, // dialog
sortTableData: [], // data
sortVisible: false, // dialog
deleteVisible: false, // dialog
deleteData: [], // data
// showCoverVisible: false, // dialog
// sortTableData: [], // data
// sortVisible: false, // dialog
// deleteVisible: false, // dialog
// deleteData: [], // data
file: null, // change
fileNames: '', // - name
formatType: '', // - type
@ -176,6 +182,10 @@ export default {
}
},
methods: {
toPreview() {
const routeData = this.$router.resolve({ path: '/preview' })
window.open(routeData.href, '_blank')
},
getFileSize(fileSize) {
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB'
const fileSizeInB = fileSize + 'B'
@ -259,7 +269,7 @@ export default {
// list
getFileList() {
const params = {
'categoryId': this.selectedCategory.id,
'categoryId': this.categoryId !== '' ? this.categoryId : this.selectedCategory.id,
'archivesId': this.arcId,
'page': 0,
'size': 10
@ -305,48 +315,48 @@ export default {
// })
},
// -
rowDrop(className, targetName) {
//
const tbody = document.querySelector('.' + className + ' .el-table__body-wrapper tbody')
const that = this
Sortable.create(tbody, {
//
draggable: '.el-table__row',
onEnd({ newIndex, oldIndex }) {
if (newIndex === oldIndex) return
that[targetName].splice(newIndex, 0, that[targetName].splice(oldIndex, 1)[0])
}
})
},
// rowDrop(className, targetName) {
// //
// const tbody = document.querySelector('.' + className + ' .el-table__body-wrapper tbody')
// const that = this
// Sortable.create(tbody, {
// //
// draggable: '.el-table__row',
// onEnd({ newIndex, oldIndex }) {
// if (newIndex === oldIndex) return
// that[targetName].splice(newIndex, 0, that[targetName].splice(oldIndex, 1)[0])
// }
// })
// },
//
opened() {
this.rowDrop('file-sort', 'sortTableData')
},
showSort() {
this.sortVisible = true
this.sortTableData = JSON.parse(JSON.stringify(this.tableData))
},
// -
handleSort() {
const ids = []
const sequences = []
this.sortTableData.map((value, index) => {
ids.push(value.id)
sequences.push(index + 1)
})
const params = {
'categoryId': this.categoryId,
'ids': ids,
'sequences': sequences
}
console.log(params)
// FetchFileSort(params).then((res) => {
// this.sortVisible = false
// this.$message.success('!')
// this.crud.refresh()
// this.getFileList()
// opened() {
// this.rowDrop('file-sort', 'sortTableData')
// },
// showSort() {
// this.sortVisible = true
// this.sortTableData = JSON.parse(JSON.stringify(this.tableData))
// },
// // -
// handleSort() {
// const ids = []
// const sequences = []
// this.sortTableData.map((value, index) => {
// ids.push(value.id)
// sequences.push(index + 1)
// })
},
// const params = {
// 'categoryId': this.categoryId,
// 'ids': ids,
// 'sequences': sequences
// }
// console.log(params)
// // FetchFileSort(params).then((res) => {
// // this.sortVisible = false
// // this.$message.success('!')
// // this.crud.refresh()
// // this.getFileList()
// // })
// },
// table
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row)
@ -359,12 +369,12 @@ export default {
handleClose(done) {
this.showCoverVisible = false
done()
},
//
showCoverPreview(row) {
this.showCoverVisible = true
this.previewSrc = this.baseApi + '/downloadFile' + row.file_path
}
//
// showCoverPreview(row) {
// this.showCoverVisible = true
// this.previewSrc = this.baseApi + '/downloadFile' + row.file_path
// }
}
}
</script>

4
src/views/prearchiveLibrary/module/detail.vue

@ -75,8 +75,8 @@
<template>
<div class="handle-btn">
<el-button class="iconfont icon-sulan" @click="toPreview" />
<el-button class="iconfont icon-xiazai" />
<el-button class="iconfont icon-dayin" />
<!-- <el-button class="iconfont icon-xiazai" />
<el-button class="iconfont icon-dayin" /> -->
</div>
</template>
</el-table-column>

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

@ -57,6 +57,8 @@
</el-table>
<pagination v-if="crud.data.length !== 0" />
<LendForm ref="lendFormRef" @close-dialog="closeDialog" />
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" :is-title-type="isTitleType" />
</div>
</template>
@ -65,10 +67,12 @@ 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 ArchivesInfo from '@/views/components/archivesDetail/detail'
import { FetchDelBorrowCar } from '@/api/archiveUtilize/cart'
import { mapGetters } from 'vuex'
export default {
name: 'Cart',
components: { pagination, crudOperation, LendForm },
components: { pagination, crudOperation, LendForm, ArchivesInfo },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
@ -87,7 +91,10 @@ export default {
},
data() {
return {
keyWord: null
isTitleType: 3,
keyWord: null,
categoryId: null,
arcId: ''
}
},
computed: {
@ -109,29 +116,30 @@ export default {
this.crud.query.search = this.keyWord
},
toDelete(data) {
console.log(data)
this.$confirm('此操作将删除所选数据' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const ids = data.map(item => item.id)
const ids = data.map(item => {
return item.archivesId
})
const params = {
'ids': ids,
'operator': this.user.username
'ids': ids
}
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)
// })
FetchDelBorrowCar(params).then((res) => {
if (res) {
this.$message({ message: '删除成功', type: 'success', offset: 8 })
this.crud.refresh()
} else {
this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
}
this.$refs.table.clearSelection()
}).catch(err => {
console.log(err)
})
}).catch(() => {
})
},
@ -158,7 +166,6 @@ export default {
label: '实体借阅'
}]
})
console.log(data)
this.$refs.lendFormRef.detailArcData = data
})
},
@ -166,10 +173,24 @@ export default {
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
this.categoryId = row.categoryPid
this.arcId = row.archivesId
this.$nextTick(() => {
// if (row.categoryLevel !== 1) {
// this.$refs.archivesInfo.detailTitle = ''
// this.$refs.archivesInfo.getDetial(2, row.archivesId)
// } else {
// this.$refs.archivesInfo.isHasFile = true
// this.$refs.archivesInfo.detailTitle = ''
// this.$refs.archivesInfo.getDetial(3, row.archivesId)
// }
this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.detailTitle = '文件详情'
this.$refs.archivesInfo.getDetial(3, row.archivesId)
this.$refs.archivesInfo.isFourTest = true
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0
})
},
closeDialog() {
this.keyWord = null

Loading…
Cancel
Save