Browse Source

收集库api1207

master
xuhuajiao 1 year ago
parent
commit
a281997919
  1. 45
      src/api/collect/collect.js
  2. 2
      src/api/system/category/category.js
  3. 13
      src/assets/styles/archives-manage.scss
  4. 9
      src/utils/upload.js
  5. 16
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  6. 34
      src/views/collectReorganizi/collectionLibrary/file/index.vue
  7. 15
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  8. 42
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  9. 126
      src/views/collectReorganizi/collectionLibrary/module/archivesInfo/data.json
  10. 96
      src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue
  11. 6
      src/views/collectReorganizi/collectionLibrary/module/archivesInfo/metadata.json
  12. 203
      src/views/collectReorganizi/collectionLibrary/module/blukEditing/index.vue
  13. 52
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  14. 62
      src/views/collectReorganizi/collectionLibrary/module/uploadFile/index.vue
  15. 114
      src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/index.vue
  16. 21
      src/views/collectReorganizi/collectionLibrary/project/index.vue

45
src/api/collect/collect.js

@ -27,7 +27,7 @@ export function collectAdd(data) {
}) })
} }
// 添加项目/卷内/文件
// 编辑项目/卷内/文件
export function collectEdit(data) { export function collectEdit(data) {
return request({ return request({
url: 'api/collect/editArchives', url: 'api/collect/editArchives',
@ -45,7 +45,7 @@ export function collectDel(data) {
}) })
} }
// 根据门类父id获取卷内列表
// 根据id获取详细信息
export function FetchDetailsById(params) { export function FetchDetailsById(params) {
return request({ return request({
url: 'api/collect/getDetailsById', url: 'api/collect/getDetailsById',
@ -54,6 +54,15 @@ export function FetchDetailsById(params) {
}) })
} }
// 根据门类父id获取电子原文列表
export function FetchInitFileCategoryView(params) {
return request({
url: 'api/collect/initFileCategoryView',
method: 'get',
params
})
}
// 移出卷内 // 移出卷内
export function FetchRemoveArchivesSingle(data) { export function FetchRemoveArchivesSingle(data) {
return request({ return request({
@ -72,4 +81,34 @@ export function FetchAddArchivesFile(data) {
}) })
} }
export default { collectAdd, collectEdit, collectDel, FetchInitCategoryViewTable, FetchInitCategoryView, FetchDetailsById, FetchRemoveArchivesSingle, FetchAddArchivesFile }
// 删除电子原文
export function FetchDeleteArchivesFile(data) {
return request({
url: 'api/collect/deleteArchivesFile',
method: 'post',
data
})
}
// 批量修改
export function FetchBatchUpdate(data) {
return request({
url: '/api/collect/batchUpdate',
method: 'post',
data
})
}
export default {
collectAdd,
collectEdit,
collectDel,
FetchInitCategoryViewTable,
FetchInitCategoryView,
FetchDetailsById,
FetchInitFileCategoryView,
FetchRemoveArchivesSingle,
FetchAddArchivesFile,
FetchDeleteArchivesFile,
FetchBatchUpdate
}

2
src/api/system/category/category.js

@ -113,7 +113,7 @@ export function FetchUpardicSort(data) {
}) })
} }
// 著录界面排序
// 根据父级门类id获取门类字段
export function FetchInitCategoryFieldByPid(params) { export function FetchInitCategoryFieldByPid(params) {
return request({ return request({
url: 'api/category/initCategoryFieldByPid', url: 'api/category/initCategoryFieldByPid',

13
src/assets/styles/archives-manage.scss

@ -260,10 +260,10 @@
display: block; display: block;
width: 66px; width: 66px;
height: 28px; height: 28px;
line-height: 28px;
line-height: 26px;
padding: 0; padding: 0;
color: #fff; color: #fff;
border-radius: 2px;
border-radius: 3px;
margin: 0 auto; margin: 0 auto;
&::before{ &::before{
margin-right: 5px; margin-right: 5px;
@ -271,8 +271,13 @@
} }
.file-down{ .file-down{
padding: 0 !important; padding: 0 !important;
background-color: $mainColor;
border-color: $mainColor;
@include btn_blue_style;
&:hover{
@include btn_blue_hover;
}
&:focus{
@include btn_blue_style;
}
} }
.packing-handle-btn{ .packing-handle-btn{
background-color: $arcPurple; background-color: $arcPurple;

9
src/utils/upload.js

@ -13,10 +13,15 @@ export function upload(api, file) {
// 档案上传附件 // 档案上传附件
export function archivesUpload(api, file, categoryId) { export function archivesUpload(api, file, categoryId) {
var data = new FormData() var data = new FormData()
data.append('file', file)
// data.append('files', file) // 之前
for (const item in file) { // 现在
data.append('files', file[item])
}
data.append('categoryId', categoryId) data.append('categoryId', categoryId)
const config = { const config = {
headers: { 'Authorization': getToken() }
headers: {
'Authorization': getToken()
}
} }
return axios.post(api, data, config) return axios.post(api, data, config)
} }

16
src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue

@ -49,7 +49,7 @@
/> />
</div> </div>
<!-- 档案详情 --> <!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" />
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" />
</div> </div>
</template> </template>
@ -182,24 +182,36 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.arcId = row.id this.arcId = row.id
this.$nextTick(() => {
if (this.selectedCategory.arrangeType !== 1) { if (this.selectedCategory.arrangeType !== 1) {
this.$refs.archivesInfo.isHasFile = false this.$refs.archivesInfo.isHasFile = false
if (this.activeIndex === 1) { if (this.activeIndex === 1) {
this.$refs.archivesInfo.detailTitle = '文件详情' this.$refs.archivesInfo.detailTitle = '文件详情'
this.$refs.archivesInfo.isHasFile = true this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.getDetial(3, row.id)
} else { } else {
this.$refs.archivesInfo.detailTitle = '案卷详情' this.$refs.archivesInfo.detailTitle = '案卷详情'
this.$refs.archivesInfo.getDetial(2, row.id)
} }
} else { } else {
this.$refs.archivesInfo.isHasFile = true this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.detailTitle = '文件详情' this.$refs.archivesInfo.detailTitle = '文件详情'
this.$refs.archivesInfo.getDetial(3, row.id)
} }
this.$refs.archivesInfo.archivesInfoVisible = true this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0 this.$refs.archivesInfo.archivesTabIndex = 0
// this.$refs.archivesInfo.getDetial(row.id)
})
}, },
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {
this.parentsData.smartQuery = {
'retention': null,
'security_class': null,
'doc_type': null,
'medium_type': null,
'archive_year': null,
'fonds_no': null
}
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }

34
src/views/collectReorganizi/collectionLibrary/file/index.vue

@ -1,4 +1,5 @@
<template> <template>
<div>
<el-drawer <el-drawer
:with-header="false" :with-header="false"
:visible.sync="fileDrawer" :visible.sync="fileDrawer"
@ -66,6 +67,16 @@
/> />
</div> </div>
</el-drawer> </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> </template>
<script> <script>
@ -107,7 +118,9 @@ export default {
fileDrawer: false, fileDrawer: false,
test: '', test: '',
isAjNo: 0, isAjNo: 0,
selections: []
selections: [],
showCoverVisible: false,
previewSrc: null
} }
}, },
computed: { computed: {
@ -160,12 +173,18 @@ export default {
}, },
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {
// console.log('clickRowHandler', row)
this.parentsData.smartQuery = {
'retention': null,
'security_class': null,
'doc_type': null,
'medium_type': null,
'archive_year': null,
'fonds_no': null
}
this.selections = this.crud.selections this.selections = this.crud.selections
}, },
// //
handleCurrentChange(selection, row) { handleCurrentChange(selection, row) {
// console.log('', row)
this.selections = selection this.selections = selection
}, },
handleSizeChange(size) { handleSizeChange(size) {
@ -184,6 +203,15 @@ export default {
} else { } else {
this.getViewTable(4, this.parentsData.parentsJuanneiId) this.getViewTable(4, this.parentsData.parentsJuanneiId)
} }
},
// dialog - close
handleClose(done) {
this.showCoverVisible = false
done()
},
showCoverPreview(row) {
this.showCoverVisible = true
this.previewSrc = this.baseApi + '/downloadFile' + row.file_path
} }
} }
} }

15
src/views/collectReorganizi/collectionLibrary/juannei/index.vue

@ -57,7 +57,7 @@
/> />
</div> </div>
<!-- 档案详情 --> <!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" />
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" />
<span class="closed-btn" @click="closeDrawer" /> <span class="closed-btn" @click="closeDrawer" />
</el-drawer> </el-drawer>
</template> </template>
@ -153,15 +153,24 @@ export default {
} }
console.log('tableDoubleClick', row) console.log('tableDoubleClick', row)
this.arcId = row.id this.arcId = row.id
this.$nextTick(() => {
this.$refs.archivesInfo.isHasFile = true this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.detailTitle = '卷内详情' this.$refs.archivesInfo.detailTitle = '卷内详情'
this.$refs.archivesInfo.archivesInfoVisible = true this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0 this.$refs.archivesInfo.archivesTabIndex = 0
// this.$refs.archivesInfo.getDetial(row.id)
this.$refs.archivesInfo.getDetial(3, row.id)
})
}, },
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {
console.log('clickRowHandler', row)
this.parentsData.smartQuery = {
'retention': null,
'security_class': null,
'doc_type': null,
'medium_type': null,
'archive_year': null,
'fonds_no': null
}
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }

42
src/views/collectReorganizi/collectionLibrary/mixins/index.js

@ -111,6 +111,7 @@ export const collectionLibraryCrud = {
if (res.code !== 500) { if (res.code !== 500) {
if (categoryLevel === 1) { if (categoryLevel === 1) {
// 项目 // 项目
const projectObj = this.parentsData.$refs.projectEle
this.projectData = res.list.content this.projectData = res.list.content
this.page.total = res.list.totalElements this.page.total = res.list.totalElements
this.yearData = res.yearGroup this.yearData = res.yearGroup
@ -118,9 +119,9 @@ export const collectionLibraryCrud = {
this.$emit('myYearEvent', this.yearData) this.$emit('myYearEvent', this.yearData)
} }
if (type === 'search') { if (type === 'search') {
this.$parent.projectData = res.list.content
this.$parent.page.total = res.list.totalElements
this.$parent.getTableDisplayFieldsLoading = false
projectObj.projectData = res.list.content
projectObj.page.total = res.list.totalElements
projectObj.getTableDisplayFieldsLoading = false
} }
} else if (categoryLevel === 2) { } else if (categoryLevel === 2) {
// 案卷 // 案卷
@ -176,10 +177,39 @@ export const collectionLibraryCrud = {
} }
} }
this.getTableDisplayFieldsLoading = false this.getTableDisplayFieldsLoading = false
if (!parentsId) {
this.selections = []
console.log(this.parentsData)
// this.crud.refresh()
this.crud.selections = [] this.crud.selections = []
this.$refs.table.clearSelection()
if (categoryLevel === 3) {
// 按件
if (this.isTitleType === 3) {
const wjObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList
wjObj.selections = []
wjObj.$refs.table.clearSelection() // 清空选中
wjObj.$refs.table.setCurrentRow(-1) // 清除高亮
} else {
const juanneiObj = this.parentsData.$refs.juanneiEle
juanneiObj.selections = []
juanneiObj.$refs.table.clearSelection()
juanneiObj.$refs.table.setCurrentRow(-1)
}
} else if (categoryLevel === 2) {
// 按卷
const anjuanObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList
anjuanObj.selections = []
anjuanObj.$refs.table.clearSelection()
anjuanObj.$refs.table.setCurrentRow(-1)
} else if (categoryLevel === 1) {
// 项目
const projectObj = this.parentsData.$refs.projectEle
projectObj.selections = []
projectObj.$refs.table.clearSelection()
projectObj.$refs.table.setCurrentRow(-1)
} else {
const fileObj = this.parentsData.$refs.fileEle
fileObj.selections = []
fileObj.$refs.table.clearSelection()
fileObj.$refs.table.setCurrentRow(-1)
} }
}) })
}, },

126
src/views/collectReorganizi/collectionLibrary/module/archivesInfo/data.json

@ -1,126 +0,0 @@
{
"code": 200,
"message": "操作成功",
"data": [
{
"fieldName": "item_no",
"fieldCnName": "项目号",
"editLength": 196,
"isLine": false,
"context": "JJ-2021-GZ-001"
},
{
"fieldName": "fonds_no",
"fieldCnName": "全宗号",
"editLength": 196,
"isLine": false,
"context": "档案室"
},
{
"fieldName": "archive_year",
"fieldCnName": "归档年度",
"editLength": 196,
"isLine": false,
"context": 2021
},
{
"fieldName": "retention",
"fieldCnName": "保管期限",
"editLength": 196,
"isLine": false,
"context": "永久"
},
{
"fieldName": "maintitle",
"fieldCnName": "项目名",
"editLength": 510,
"isLine": true,
"context": "档案室改造"
},
{
"fieldName": "security_class",
"fieldCnName": "密级",
"editLength": 196,
"isLine": false,
"context": "公开"
},
{
"fieldName": "responsibleby",
"fieldCnName": "责任者",
"editLength": 196,
"isLine": false,
"context": "许飞"
},
{
"fieldName": "organization_matter",
"fieldCnName": "机构(问题)",
"editLength": 196,
"isLine": false,
"context": "机关建设"
},
{
"fieldName": "department",
"fieldCnName": "部门名称",
"editLength": 196,
"isLine": false,
"context": "综合部"
},
{
"fieldName": "piece_qty",
"fieldCnName": "案卷数",
"editLength": 196,
"isLine": false,
"context": 3
},
{
"fieldName": "item_start_date",
"fieldCnName": "立项时间",
"editLength": 196,
"isLine": false,
"context": "2021-12-01 "
},
{
"fieldName": "item_end_date",
"fieldCnName": "结项时间",
"editLength": 196,
"isLine": false,
"context": "2022-08-25 "
},
{
"fieldName": "tid",
"fieldCnName": "TID",
"editLength": null,
"isLine": null,
"context": null
},
{
"fieldName": "case_name",
"fieldCnName": "盒名称",
"editLength": null,
"isLine": null,
"context": null
},
{
"fieldName": "folder_location",
"fieldCnName": "库房位置",
"editLength": null,
"isLine": null,
"context": null
},
{
"fieldName": "borrow_type",
"fieldCnName": "借阅状态",
"editLength": null,
"isLine": null,
"context": null
},
{
"fieldName": "barcode",
"fieldCnName": "条形码",
"editLength": null,
"isLine": null,
"context": null
}
],
"timestamp": 1689215199486
}

96
src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue

@ -13,37 +13,14 @@
<!-- 基本信息 --> <!-- 基本信息 -->
<div v-if="archivesTabIndex==0" class="base-info item-content"> <div v-if="archivesTabIndex==0" class="base-info item-content">
<el-row> <el-row>
<el-col v-for="(item,index) in archivesDetailsData" v-show="index<archivesDetailsData.length-5" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item">
<el-col v-for="(item,index) in archivesDetailsData" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item">
<span>{{ item.fieldCnName }}</span> <span>{{ item.fieldCnName }}</span>
<p :style="{ width: ( item.editLength ? item.editLength+'px' : '' ), flex: ( !item.editLength ? 1 : '' )}">{{ item.context }}</p> <p :style="{ width: ( item.editLength ? item.editLength+'px' : '' ), flex: ( !item.editLength ? 1 : '' )}">{{ item.context }}</p>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="isDetailsInfo">
<el-col v-for="(item,index) in archivesDetailsData.slice(archivesDetailsData.length-5,archivesDetailsData.length)" :key="'last'+index" :span=" 12" class="base-info-item">
<span>{{ item.fieldCnName }}</span>
<div v-if="item.fieldName === 'folder_location' && item.context" :style="{ width: item.editLength+'px', marginTop:'-6px'}">
<div v-if="item.context.indexOf(',')">
<el-tag
v-for="(val,key) in item.context.split(',')"
:key="key"
:type="val"
effect="dark"
>
{{ val }}
</el-tag>
</div>
<div v-else-if="!item.context.indexOf(',')">
<el-tag effect="dark">{{ item.context }}</el-tag>
</div>
</div>
<div v-else :style="{ width: item.editLength+'px'}" :class="[ (item.fieldName === 'borrow_type') ? 'row-state row-lending' : '' ]">
{{ item.context }}
</div>
</el-col>
</el-row>
</div> </div>
<!-- 附件 --> <!-- 附件 -->
<UploadFile v-if="archivesTabIndex==1" ref="uploadFile" class="item-content" :is-upload-detail="false" :category-id="categoryId" :arc-id="arcId" />
<UploadFile v-if="archivesTabIndex==1" ref="uploadFile" class="item-content" :is-upload-detail="false" :selected-category="selectedCategory" :arc-id="arcId" />
<!-- 元数据 --> <!-- 元数据 -->
<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"> <pre v-highlightjs="xml_show">
@ -59,22 +36,20 @@
<script> <script>
import { form } from '@crud/crud' import { form } from '@crud/crud'
import { FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import { FetchDetailsById } from '@/api/collect/collect'
// import { FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import UploadFile from '../uploadFile/index' import UploadFile from '../uploadFile/index'
import detailData from './data.json'
import metaData from './metadata.json'
export default { export default {
name: 'ArchivesInfo', name: 'ArchivesInfo',
components: { UploadFile }, components: { UploadFile },
mixins: [ mixins: [
form({}) form({})
], ],
// inject: ['recycleMain'],
props: { props: {
categoryId: {
type: String,
selectedCategory: {
type: Object,
default: function() { default: function() {
return ''
return {}
} }
}, },
arcId: { arcId: {
@ -89,7 +64,6 @@ export default {
detailTitle: '', detailTitle: '',
isHasFile: false, // / isHasFile: false, // /
isDetailsInfo: false, // 5 isDetailsInfo: false, // 5
isTidOrBorrow: true, // tid/
archivesInfoVisible: false, archivesInfoVisible: false,
archivesTabIndex: 0, archivesTabIndex: 0,
archivesDetailsData: [], archivesDetailsData: [],
@ -98,46 +72,32 @@ export default {
} }
}, },
created() { created() {
this.archivesDetailsData = detailData.data
this.archivesDetailsMetadata = metaData.data
}, },
mounted() { mounted() {
}, },
methods: { methods: {
getDetial(rowId) {
getDetial(collectLevel, rowId) {
console.log(this.arcId)
const params = { const params = {
categoryId: this.categoryId,
archivesId: rowId
}
FetchArchivesDetails(params).then(data => {
this.archivesDetailsData = data
// /
this.archivesDetailsData.forEach(item => {
if (item.fieldName === 'borrow_type') {
if (item.context === 1) {
item.context = '待登记'
} else if (item.context === 2) {
item.context = '待借阅'
} else if (item.context === 3) {
item.context = '待归还'
} else if (item.context === 4 || item.context === '' || item.context === null) {
item.context = '-'
} else if (item.context === -1) {
item.context = '在库'
}
}
})
// - tid/''
if (!this.isTidOrBorrow) {
const indexBorrow = this.archivesDetailsData.findIndex(item => item.fieldName === 'borrow_type')
const indexTid = this.archivesDetailsData.findIndex(item => item.fieldName === 'tid')
this.archivesDetailsData.splice(indexBorrow, 1)
this.archivesDetailsData.splice(indexTid, 1)
}
})
FetchArchivesMetadata(params).then(data => {
this.archivesDetailsMetadata = data
'categoryId': this.selectedCategory.id,
'categoryLevel': collectLevel,
'id': rowId
}
console.log(params)
FetchDetailsById(params).then(data => {
this.archivesDetailsData = data.showFiled
.filter(field => field.fieldName in data.echo)
.map(field => ({
editLength: field.editLength,
isLine: field.isLine,
fieldCnName: field.fieldCnName,
fieldName: field.fieldName,
context: data.echo[field.fieldName]
}))
}) })
// FetchArchivesMetadata(params).then(data => {
// this.archivesDetailsMetadata = data
// })
}, },
setXml() { setXml() {
const xmlstr = this.archivesDetailsMetadata const xmlstr = this.archivesDetailsMetadata
@ -250,6 +210,8 @@ export default {
.base-info, .base-info,
.metadata-cont{ .metadata-cont{
background-color: #F6F8FC; background-color: #F6F8FC;
overflow: hidden;
overflow-y: scroll;
} }
// //
.base-info{ .base-info{

6
src/views/collectReorganizi/collectionLibrary/module/archivesInfo/metadata.json

@ -1,6 +0,0 @@
{
"code": 200,
"message": "操作成功",
"data": "<? xml version=\"1.0\" encoding=\"UTF-8\"?><元数据信息><内容描述><项目号>JJ-2021-GZ-001</项目号><全宗号>档案室</全宗号><项目名>档案室改造</项目名><保管期限>永久</保管期限><归档年度>2021</归档年度><密级>公开</密级><责任者>许飞</责任者><机构(问题)>机关建设</机构(问题)><部门名称>综合部</部门名称><案卷数>3</案卷数><立项时间>2021-12-01 </立项时间><结项时间>2022-08-25 </结项时间><项目开始时间>2022-05-01 </项目开始时间><项目结束时间>2022-07-31 </项目结束时间><备注></备注></内容描述><系统数据><库房名>null</库房名><盒号>null</盒号><存放位置>null</存放位置><标签编号>null</标签编号><条码号>null</条码号><子条目数>1</子条目数></系统数据></元数据信息>",
"timestamp": 1689215199496
}

203
src/views/collectReorganizi/collectionLibrary/module/blukEditing/index.vue

@ -4,18 +4,18 @@
<div class="setting-dialog"> <div class="setting-dialog">
<div class="bulk-editing-container"> <div class="bulk-editing-container">
<el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px"> <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
<el-form-item label="修改字段" prop="fieldItem">
<el-select v-model="editForm.fieldItem" placeholder="请选择" style="width: 360px;">
<el-form-item label="修改字段" prop="updateField">
<el-select v-model="editForm.updateField" value-key="id" placeholder="请选择" style="width: 360px;" @change="selectField">
<el-option <el-option
v-for="item in fieldItemOptions" v-for="item in fieldItemOptions"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.fieldCnName"
:value="item"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="修改方式" prop="type">
<el-select v-model="editForm.type" placeholder="请选择" style="width: 360px;">
<el-form-item label="修改方式" prop="updateType">
<el-select v-model="editForm.updateType" placeholder="请选择" style="width: 360px;">
<el-option <el-option
v-for="item in editTypeOptions" v-for="item in editTypeOptions"
:key="item.value" :key="item.value"
@ -24,28 +24,28 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="editForm.type === '替换'" label="查询内容" prop="content">
<el-input v-model="editForm.queryContent" style="width: 360px;" />
<el-form-item v-if="editForm.updateType === 2" label="查询内容" prop="oldContext">
<el-input v-model="editForm.oldContext" style="width: 360px;" />
</el-form-item> </el-form-item>
<el-form-item label="更新内容" prop="content">
<el-input v-if="editForm.fieldItem !== '2' && editForm.fieldItem !== '3' && editForm.fieldItem !== '4'" v-model="editForm.content" style="width: 360px;" />
<el-select v-if="editForm.fieldItem === '2'" v-model="editForm.content" placeholder="请选择" style="width: 360px;">
<el-form-item label="更新内容" prop="updateContext">
<el-input v-if="editForm.updateField.mateData !== 3 && editForm.updateField.isInputClass !== 'date' && editForm.updateField.isInputClass !== 'number'" v-model="editForm.updateContext" style="width: 360px;" />
<el-select v-if="editForm.updateField.mateData === 3" v-model="editForm.updateContext" placeholder="请选择" style="width: 360px;">
<el-option <el-option
v-for="item in fieldOptions"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in dictionaryOptions"
:key="item.dictionaryId"
:label="item.dictionaryName"
:value="item.dictionaryCode"
/> />
</el-select> </el-select>
<el-date-picker <el-date-picker
v-if="editForm.fieldItem === '3'"
v-model="editForm.content"
v-if="editForm.updateField.isInputClass === 'date'"
v-model="editForm.updateContext"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
style="width: 360px;" style="width: 360px;"
/> />
<el-input-number <el-input-number
v-if="editForm.fieldItem === '4'"
v-if="editForm.updateField.isInputClass === 'number'"
v-model.number="editForm.initialValue" v-model.number="editForm.initialValue"
:min="0" :min="0"
:max="999" :max="999"
@ -64,73 +64,76 @@
</template> </template>
<script> <script>
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { FetchSonDictionaryList } from '@/api/system/dict'
import { FetchBatchUpdate } from '@/api/collect/collect'
export default { export default {
name: 'BlukEditing', name: 'BlukEditing',
components: { }, components: { },
mixins: [], mixins: [],
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
},
collectLevel: {
type: Number,
default: function() {
return null
}
},
selections: {
type: Array,
default: () => []
}
},
data() { data() {
return { return {
// //
bulkEditingVisible: false, bulkEditingVisible: false,
editForm: { editForm: {
fieldItem: '',
type: '填充',
queryContent: '',
content: ''
updateField: '',
updateType: 1,
oldContext: '',
updateContext: ''
}, },
fieldItemOptions: [
{
value: '1',
label: '非字典项&&文本'
},
{
value: '2',
label: '字典项'
},
{
value: '3',
label: '日期'
},
{
value: '4',
label: '数字'
}
],
editTypeOptions: [],
fieldOptions: [
{
value: '字典项1',
label: '字典项1'
}
]
fieldItemOptions: [],
editTypeOptions: [{
value: 1,
label: '填充'
}],
dictionaryOptions: []
} }
}, },
computed: { computed: {
editRules() { editRules() {
const validateRule = { const validateRule = {
fieldItem: [
updateField: [
{ required: true, message: '请选择修改字段', trigger: 'change' } { required: true, message: '请选择修改字段', trigger: 'change' }
], ],
type: [
updateType: [
{ required: true, message: '请选择修改方式', trigger: 'change' } { required: true, message: '请选择修改方式', trigger: 'change' }
], ],
queryContent: [
{ required: true, message: '请输入', trigger: 'blur' }
oldContext: [
{ required: true, message: '请输入查询的内容', trigger: 'blur' }
], ],
content: [
updateContext: [
{ required: true } { required: true }
] ]
} }
if (this.editForm.fieldItem === '2') {
this.$set(validateRule, 'content', [
if (this.editForm.updateField.mateData === 3) {
this.$set(validateRule, 'updateContext', [
{ required: true, message: '请选择需更新内容得字典项', trigger: 'change' } { required: true, message: '请选择需更新内容得字典项', trigger: 'change' }
]) ])
} else if (this.editForm.fieldItem === '3') {
this.$set(validateRule, 'content', [
} else if (this.editForm.updateField.isInputClass === 'date') {
this.$set(validateRule, 'updateContext', [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' } { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
]) ])
} else { } else {
this.$set(validateRule, 'content', [
this.$set(validateRule, 'updateContext', [
{ required: true, message: '请输入更新内容', trigger: 'blur' } { required: true, message: '请输入更新内容', trigger: 'blur' }
]) ])
} }
@ -138,50 +141,94 @@ export default {
} }
}, },
watch: { watch: {
'editForm.fieldItem'(newVal) {
'editForm.updateField'(newVal) {
console.log('item', newVal)
console.log('mateData', newVal.mateData)
console.log('isInputClass', newVal.isInputClass)
this.$refs.editForm.clearValidate() this.$refs.editForm.clearValidate()
this.editForm.content = ''
this.editForm.type = '填充'
if (newVal === '1') {
this.editTypeOptions = [{
value: '填充',
label: '填充'
},
{
value: '替换',
label: '替换'
}]
} else if (newVal === '2' || newVal === '3') {
this.editForm.updateContext = ''
this.editForm.updateType = 1
if (newVal.mateData === 3 || newVal.isInputClass === 'date') {
this.editTypeOptions = [{ this.editTypeOptions = [{
value: '填充',
value: 1,
label: '填充' label: '填充'
}] }]
} else if (newVal === '4') {
} else if (newVal.isInputClass === 'number') {
this.editTypeOptions = [{ this.editTypeOptions = [{
value: '填充',
value: 1,
label: '填充' label: '填充'
}, },
{ {
value: '替换',
value: 2,
label: '替换' label: '替换'
}, },
{ {
value: '增加',
value: 3,
label: '增加' label: '增加'
}, },
{ {
value: '减少',
value: 4,
label: '减少' label: '减少'
}] }]
} else {
this.editTypeOptions = [{
value: 1,
label: '填充'
},
{
value: 2,
label: '替换'
}]
} }
} }
}, },
mounted() {
this.$nextTick(() => {
this.getInitCategoryInputFieldByPid()
})
},
methods: { methods: {
getInitCategoryInputFieldByPid() {
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel
}
console.log(params)
FetchInitCategoryInputFieldByPid(params).then(data => {
this.fieldItemOptions = data
})
},
selectField(val) {
console.log(val)
if (val.mateData === 3) {
this.getSonDictionaryList(val.dictionaryId.id)
}
},
getSonDictionaryList(dictionaryId) {
FetchSonDictionaryList({ 'pid': dictionaryId }).then(res => {
console.log(res)
this.dictionaryOptions = res
})
},
onSubmitBlukEditing(formName) { onSubmitBlukEditing(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.$message('submit!')
const archivesIds = this.selections.map(item => item.id)
console.log(this.editForm)
const params = {
'archivesIds': archivesIds,
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'updateField': this.editForm.updateField.fieldName,
'oldContext': this.editForm.oldContext,
'updateContext': this.editForm.updateContext,
'updateType': this.editForm.updateType
}
console.log(params)
FetchBatchUpdate(params).then(res => {
this.bulkEditingVisible = false this.bulkEditingVisible = false
this.$emit('close-dialog')
})
} else { } else {
console.log('error submit!!') console.log('error submit!!')
return false return false

52
src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue

@ -172,9 +172,9 @@
<!-- 批量导入 --> <!-- 批量导入 -->
<BlukImport ref="blukImportRef" /> <BlukImport ref="blukImportRef" />
<!-- 批量修改 --> <!-- 批量修改 -->
<BlukEditing ref="blukEditingRef" />
<BlukEditing ref="blukEditingRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
<!-- 档案调整 --> <!-- 档案调整 -->
<FileNumberAdjustment ref="fileNumberAdjustmentRef" :selected-category="selectedCategory" />
<FileNumberAdjustment ref="fileNumberAdjustmentRef" :selected-category="selectedCategory" :collect-level="collectLevel" />
<!-- 档号更新 --> <!-- 档号更新 -->
<el-dialog class="tip-dialog" title="档号更新" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="updateVisible"> <el-dialog class="tip-dialog" title="档号更新" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="updateVisible">
@ -314,7 +314,7 @@
import CRUD, { crud } from '@crud/crud' import CRUD, { crud } from '@crud/crud'
import { collectionLibraryCrud } from '../mixins/index' import { collectionLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle } from '@/api/collect/collect'
import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile } from '@/api/collect/collect'
import { FetchArchivesClassTree } from '@/api/system/archivesClass' import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchDictionaryTree } from '@/api/system/dict' import { FetchDictionaryTree } from '@/api/system/dict'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
@ -651,6 +651,34 @@ export default {
// - // -
handleDelConfirm() { handleDelConfirm() {
this.delAllLoading = true this.delAllLoading = true
if (this.collectLevel === 4) {
console.log(this.parentsData)
console.log(this.selections)
const params = this.selections.map((item) => {
const json = {}
json.archivesId = item.archive_id
json.categoryId = this.selectedCategory.id
json.documentFileId = item.document_file_id
json.documentId = item.document_id
json.id = item.id
return json
})
console.log(params)
FetchDeleteArchivesFile(params).then((res) => {
console.log(res)
if (res === 'SUCCESS') {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.delAllLoading = false
this.deleteVisible = false
this.handleSearch(this.collectLevel)
} else {
this.crud.notify('删除所选电子原文失败', CRUD.NOTIFICATION_TYPE.ERROR)
}
}).catch(err => {
this.delAllLoading = false
console.log(err)
})
} else {
const archivesIds = [] const archivesIds = []
this.selections.forEach(val => { this.selections.forEach(val => {
archivesIds.push(val.id) archivesIds.push(val.id)
@ -661,17 +689,22 @@ export default {
'archivesIds': archivesIds 'archivesIds': archivesIds
} }
console.log(params) console.log(params)
collectDel(params).then(() => {
collectDel(params).then((res) => {
if (res.includes('成功')) {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.delAllLoading = false
this.deleteVisible = false this.deleteVisible = false
this.handleSearch(this.collectLevel) this.handleSearch(this.collectLevel)
this.delAllLoading = false
} else {
this.crud.notify('删除所选档案失败', CRUD.NOTIFICATION_TYPE.ERROR)
}
}).catch(err => { }).catch(err => {
this.delAllLoading = false this.delAllLoading = false
console.log(err) console.log(err)
}) })
}
}, },
// -
// -
handleMoveConfirm() { handleMoveConfirm() {
const archivesIds = [] const archivesIds = []
this.selections.forEach(val => { this.selections.forEach(val => {
@ -685,12 +718,11 @@ export default {
} }
console.log(params) console.log(params)
FetchRemoveArchivesSingle(params).then((res) => { FetchRemoveArchivesSingle(params).then((res) => {
console.log(res)
if (res.code !== 500) {
if (res === true) {
this.crud.notify('移出成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('移出成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.handleSearch(this.collectLevel) this.handleSearch(this.collectLevel)
} else { } else {
this.crud.notify('移出失败', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.notify('移出失败', CRUD.NOTIFICATION_TYPE.ERROR)
} }
this.moveVisible = false this.moveVisible = false
}).catch(err => { }).catch(err => {
@ -737,7 +769,9 @@ export default {
this.$message('您还未勾选需要操作的条目,请先确认!') this.$message('您还未勾选需要操作的条目,请先确认!')
return false return false
} }
this.$nextTick(() => {
this.$refs.blukEditingRef.bulkEditingVisible = true this.$refs.blukEditingRef.bulkEditingVisible = true
})
}, },
// / // /
handleAdjustment(type) { handleAdjustment(type) {

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

@ -40,7 +40,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="110" align="center" /> <el-table-column prop="create_time" label="创建时间" min-width="110" align="center" />
<el-table-column v-if="!isUploadDetail && !recycleMain.isRecycle" label="操作" min-width="100" align="center">
<!-- && !recycleMain.isRecycle -->
<el-table-column v-if="!isUploadDetail " label="操作" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button> <el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button>
</template> </template>
@ -89,7 +90,8 @@
</template> </template>
<script> <script>
import { FetchInitArchiveFilesView, FetchEditFile, FetchDeleteFile, FetchFileSort } from '@/api/archivesManage/archivesList'
// import { FetchInitArchiveFilesView, FetchEditFile, FetchDeleteFile, FetchFileSort } from '@/api/archivesManage/archivesList'
import { FetchInitFileCategoryView } from '@/api/collect/collect'
import { archivesUpload } from '@/utils/upload' import { archivesUpload } from '@/utils/upload'
import { downloadFile, getCurrentTime } from '@/utils/index' import { downloadFile, getCurrentTime } from '@/utils/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@ -101,16 +103,16 @@ export default {
mixins: [ mixins: [
form({}) form({})
], ],
inject: ['recycleMain'],
// inject: ['recycleMain'],
props: { props: {
isUploadDetail: { isUploadDetail: {
type: Boolean, type: Boolean,
default: true default: true
}, },
categoryId: {
type: String,
selectedCategory: {
type: Object,
default: function() { default: function() {
return ''
return {}
} }
}, },
arcId: { arcId: {
@ -197,11 +199,12 @@ export default {
'categoryId': this.categoryId, 'categoryId': this.categoryId,
'jsonString': JSON.stringify(arrayUpload) 'jsonString': JSON.stringify(arrayUpload)
} }
FetchEditFile(params).then(data => {
this.$message.success('上传附件成功!')
this.crud.refresh()
this.getFileList()
})
console.log(params)
// FetchEditFile(params).then(data => {
// this.$message.success('!')
// this.crud.refresh()
// this.getFileList()
// })
}, },
// base64 // base64
getBase64(file) { getBase64(file) {
@ -228,10 +231,14 @@ export default {
// list // list
getFileList() { getFileList() {
const params = { const params = {
'categoryId': this.categoryId,
'archiveId': this.arcId
'categoryId': this.selectedCategory.id,
'archivesId': this.arcId,
'page': 0,
'size': 10
} }
FetchInitArchiveFilesView(params).then(data => {
console.log(params)
FetchInitFileCategoryView(params).then(data => {
console.log('darta', data)
this.tableData = data.returnlist this.tableData = data.returnlist
}) })
}, },
@ -260,13 +267,14 @@ export default {
'ids': ids, 'ids': ids,
'categoryId': this.categoryId 'categoryId': this.categoryId
} }
console.log(params)
// fetch // fetch
FetchDeleteFile(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.crud.refresh()
this.getFileList()
})
// FetchDeleteFile(params).then(res => {
// this.crud.delAllLoading = false
// this.$message.success('!')
// this.crud.refresh()
// this.getFileList()
// })
}, },
// - // -
rowDrop(className, targetName) { rowDrop(className, targetName) {
@ -303,12 +311,13 @@ export default {
'ids': ids, 'ids': ids,
'sequences': sequences 'sequences': sequences
} }
FetchFileSort(params).then((res) => {
this.sortVisible = false
this.$message.success('附件排序成功!')
this.crud.refresh()
this.getFileList()
})
console.log(params)
// FetchFileSort(params).then((res) => {
// this.sortVisible = false
// this.$message.success('!')
// this.crud.refresh()
// this.getFileList()
// })
}, },
// table // table
clickRowHandler(row) { clickRowHandler(row) {
@ -337,4 +346,5 @@ export default {
width: 60px; width: 60px;
height: 32px; height: 32px;
} }
</style> </style>

114
src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/index.vue

@ -11,7 +11,7 @@
<i class="el-icon-close" @click="deleteFile(item)" /> <i class="el-icon-close" @click="deleteFile(item)" />
</div> </div>
<div class="upload-input"> <div class="upload-input">
<input ref="fileInput" :key="key" type="file" :accept="uploadType === 2 ? '.zip' :''" @change="handleFileChange">
<input ref="fileInput" :key="key" type="file" :multiple="isMultiple" :accept="uploadType === 2 ? '.zip' :''" @change="handleFileChange">
<div class="upload-zip"><i class="iconfont icon-shangchuan2" />点击上传</div> <div class="upload-zip"><i class="iconfont icon-shangchuan2" />点击上传</div>
</div> </div>
<div v-if="uploadType === 2" class="el-upload__tip">上传限制文件类型zip</div> <div v-if="uploadType === 2" class="el-upload__tip">上传限制文件类型zip</div>
@ -80,7 +80,6 @@ export default {
}, },
data() { data() {
return { return {
uploadVisible: false, uploadVisible: false,
uploadTitle: '普通上传', uploadTitle: '普通上传',
detailUploadTitle: '上传详情', detailUploadTitle: '上传详情',
@ -90,7 +89,7 @@ export default {
formatType: '', // - type formatType: '', // - type
postfix: '', // - postfix: '', // -
fileSize: '', // - fileSize: '', // -
filePath: '', // - path
filePath: [], // - path
px: '', // - px: '', // -
nowDate: '', // nowDate: '', //
fileList: [], fileList: [],
@ -108,15 +107,19 @@ export default {
computed: { computed: {
...mapGetters([ ...mapGetters([
'baseApi' 'baseApi'
])
]),
isMultiple() {
return this.uploadType === 0
}
}, },
created() { created() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
// input-upload change // input-upload change
async handleFileChange(e) {
handleFileChange(e) {
const files = e.target.files const files = e.target.files
this.file = files[0] this.file = files[0]
this.key++ this.key++
@ -146,68 +149,42 @@ export default {
// this.fileList = [] // this.fileList = []
this.fileList.push(files[i]) this.fileList.push(files[i])
} }
this.fileSize = this.file.size
this.formatType = this.file.type.substring(0, this.file.type.indexOf('/'))
this.fileNames = this.file.name
this.postfix = this.file.name.substring(
this.fileNames.lastIndexOf('.') + 1,
this.fileNames.length
)
if (this.formatType === 'image') {
const fileBase64 = await this.getBase64(this.file)
const res = await this.getImgPx(fileBase64)
this.px = res.width + 'px*' + res.height + 'px'
} else {
this.px = ''
}
console.log('this.fileList', this.fileList)
// //
archivesUpload(this.baseApi + '/api/collect/uploadFile', this.file, this.selectedCategory.id).then(res => {
archivesUpload(this.baseApi + '/api/collect/uploadFiles', this.fileList, this.selectedCategory.id).then(res => {
console.log(res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.filePath = res.data.data this.filePath = res.data.data
} }
}) })
}, },
// delt file
deleteFile(file) {
const index = this.fileList.indexOf(file)
this.fileList.splice(index, 1)
// this.$confirm(', ?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// const index = this.fileList.indexOf(file)
// this.fileList.splice(index, 1)
// this.file = null
// this.$message({
// type: 'success',
// message: '!'
// })
// }).catch(() => {
// this.$message({
// type: 'info',
// message: ''
// })
// })
},
handleUploadConfirm() { handleUploadConfirm() {
this.nowDate = getCurrentTime() this.nowDate = getCurrentTime()
const json = {
'file_name': this.fileNames,
'file_size': this.fileSize,
'file_type': this.postfix,
'file_path': this.filePath,
'sequence': null,
'archive_id': this.arcId,
'file_dpi': this.px,
'file_thumbnail': '',
'create_time': this.nowDate,
'id': null
const promiseArray = this.fileList.map(async(item, index) => {
const json = {}
if (item.type.substring(0, item.type.indexOf('/')) === 'image') {
const fileBase64 = await this.getBase64(item)
const imgRes = await this.getImgPx(fileBase64)
item.px = imgRes.width + 'px*' + imgRes.height + 'px'
} else {
item.px = ''
} }
const arrayUpload = []
arrayUpload.push(json)
json.file_name = item.name
json.file_size = item.size
json.file_type = item.name.substring(item.name.lastIndexOf('.') + 1, item.name.length)
json.file_path = this.filePath[index].path
json.sequence = null
json.archive_id = this.arcId
json.file_dpi = item.px
json.file_thumbnail = ''
json.create_time = this.nowDate
json.id = null
return json
})
Promise.all(promiseArray)
.then((arrayUpload) => {
console.log('this.arrayUpload', arrayUpload)
const params = { const params = {
'archivesId': this.arcId, 'archivesId': this.arcId,
'categoryId': this.selectedCategory.id, 'categoryId': this.selectedCategory.id,
@ -224,11 +201,30 @@ export default {
// } else { // } else {
// this.detailUploadTitle = '' // this.detailUploadTitle = ''
// } // }
this.$emit('close-dialog', this.arcId)
this.$emit('close-dialog')
} else { } else {
this.$message.error('上传附件失败!') this.$message.error('上传附件失败!')
} }
}) })
})
.catch((error) => {
console.error(error)
})
},
// X
deleteFile(file) {
const index = this.fileList.indexOf(file)
this.fileList.splice(index, 1)
if (this.fileList.length !== 0) {
archivesUpload(this.baseApi + '/api/collect/uploadFiles', this.fileList, this.selectedCategory.id).then(res => {
console.log(res)
if (res.data.code === 200) {
this.filePath = res.data.data
}
})
} else {
this.$message.info('已清空所有要上传的附件!')
}
}, },
// base64 // base64
getBase64(file) { getBase64(file) {

21
src/views/collectReorganizi/collectionLibrary/project/index.vue

@ -50,7 +50,7 @@
/> />
</div> </div>
<!-- 档案详情 --> <!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" />
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" />
</div> </div>
</template> </template>
@ -90,11 +90,12 @@ export default {
} }
} }
}, },
inject: ['parentsData'],
data() { data() {
return { return {
isTitleType: 2, isTitleType: 2,
categoryId: 'B073E8430B85B4821E7360',
arcId: '2946C34412182B73FBC287',
categoryId: '',
arcId: '',
activeIndex: '1', activeIndex: '1',
selections: [], selections: [],
yearData: [], yearData: [],
@ -146,16 +147,24 @@ export default {
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
// console.log('tableDoubleClick', row)
this.arcId = row.id this.arcId = row.id
this.$nextTick(() => {
this.$refs.archivesInfo.detailTitle = '项目详情' this.$refs.archivesInfo.detailTitle = '项目详情'
this.$refs.archivesInfo.archivesInfoVisible = true this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0 this.$refs.archivesInfo.archivesTabIndex = 0
// this.$refs.archivesInfo.getDetial(row.id)
this.$refs.archivesInfo.getDetial(1, row.id)
})
}, },
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {
// console.log('clickRowHandler', row)
this.parentsData.smartQuery = {
'retention': null,
'security_class': null,
'doc_type': null,
'medium_type': null,
'archive_year': null,
'fonds_no': null
}
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }

Loading…
Cancel
Save