-
302src/api/archivesManage/archivesList.js
-
BINsrc/assets/images/dot1.png
-
BINsrc/assets/images/dot2.png
-
BINsrc/assets/images/step01.png
-
BINsrc/assets/images/step01_1.png
-
BINsrc/assets/images/step02.png
-
BINsrc/assets/images/step02_2.png
-
BINsrc/assets/images/step03.png
-
BINsrc/assets/images/step03_3.png
-
2src/views/archivesManage/archivesList/index.vue
-
571src/views/archivesManage/archivesList/module/archivesInfo/index.vue
-
58src/views/archivesManage/archivesSearch/index.vue
-
444src/views/archivesManage/fileImport/dataImport/index.vue
-
29src/views/archivesManage/fileImport/dataImport/table.json
-
23src/views/archivesManage/fileImport/importLog/index.vue
-
58src/views/archivesManage/fileImport/index.vue
-
382src/views/archivesManage/lendManage/components/lendArchivesList.vue
-
10src/views/components/SecurityDoor.vue
-
30src/views/storeManage/warehouse3D/index.vue
@ -1,147 +1,155 @@ |
|||
import request from '@/utils/request' |
|||
import qs from 'qs' |
|||
// import { form } from '../../components/Crud/crud'
|
|||
|
|||
// 档案列表获取显示列
|
|||
export function FetchTableDisplayFields(params) { |
|||
return request({ |
|||
url: 'api/archives/initArchivesViewTable' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 档案预编辑
|
|||
export function FetchFormDisplayFields(params) { |
|||
return request({ |
|||
url: 'api/archives/doedit' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
export function add(form) { |
|||
return edit(form) |
|||
} |
|||
|
|||
// 档案编辑
|
|||
export function edit(parameter) { |
|||
return request({ |
|||
url: 'api/archives/edit', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案删除
|
|||
export function del(parameter) { |
|||
return request({ |
|||
url: 'api/archives/delete', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案回收站删除
|
|||
export function FetchCompletelyDelete(parameter) { |
|||
return request({ |
|||
url: 'api/archives/completelyDelete', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案列表
|
|||
export function FetchInitArchivesView(params) { |
|||
return request({ |
|||
url: 'api/archives/initArchivesView' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 档案判断值是否重复
|
|||
export function FetchDoeditIsRepeat(parameter) { |
|||
return request({ |
|||
url: 'api/archives/doeditIsRepeat', |
|||
method: 'get', |
|||
params: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案详情
|
|||
export function FetchArchivesDetails(params) { |
|||
return request({ |
|||
url: 'api/archives/archivesDetails' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 档案元数据
|
|||
export function FetchArchivesMetadata(params) { |
|||
return request({ |
|||
url: 'api/archives/archivesMetadata' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 初始化档案附件列表
|
|||
export function FetchInitArchiveFilesView(params) { |
|||
return request({ |
|||
url: 'api/archives/initArchiveFilesView' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 上传档案附件
|
|||
export function FetchUploadFile(parameter) { |
|||
return request({ |
|||
url: 'api/archives/uploadFile', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 编辑附件
|
|||
export function FetchEditFile(parameter) { |
|||
return request({ |
|||
url: 'api/archives/editFile', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 删除附件
|
|||
export function FetchDeleteFile(parameter) { |
|||
return request({ |
|||
url: 'api/archives/deleteFile', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 附件排序
|
|||
export function FetchFileSort(parameter) { |
|||
return request({ |
|||
url: 'api/archives/fileSort', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案还原
|
|||
export function FetchReduction(parameter) { |
|||
return request({ |
|||
url: 'api/archives/reduction', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 模糊查询
|
|||
export function queryVagueArchives(params) { |
|||
return request({ |
|||
url: 'api/archives/queryVagueArchives' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
export default { add, edit, del, FetchInitArchivesView, FetchTableDisplayFields, FetchFormDisplayFields, FetchDoeditIsRepeat, queryVagueArchives } |
|||
|
|||
import request from '@/utils/request' |
|||
import qs from 'qs' |
|||
// import { form } from '../../components/Crud/crud'
|
|||
|
|||
// 档案列表获取显示列
|
|||
export function FetchTableDisplayFields(params) { |
|||
return request({ |
|||
url: 'api/archives/initArchivesViewTable' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 档案预编辑
|
|||
export function FetchFormDisplayFields(params) { |
|||
return request({ |
|||
url: 'api/archives/doedit' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
export function add(form) { |
|||
return edit(form) |
|||
} |
|||
|
|||
// 档案编辑
|
|||
export function edit(parameter) { |
|||
return request({ |
|||
url: 'api/archives/edit', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案删除
|
|||
export function del(parameter) { |
|||
return request({ |
|||
url: 'api/archives/delete', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案回收站删除
|
|||
export function FetchCompletelyDelete(parameter) { |
|||
return request({ |
|||
url: 'api/archives/completelyDelete', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案列表
|
|||
export function FetchInitArchivesView(params) { |
|||
return request({ |
|||
url: 'api/archives/initArchivesView' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 档案判断值是否重复
|
|||
export function FetchDoeditIsRepeat(parameter) { |
|||
return request({ |
|||
url: 'api/archives/doeditIsRepeat', |
|||
method: 'get', |
|||
params: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案详情
|
|||
export function FetchArchivesDetails(params) { |
|||
return request({ |
|||
url: 'api/archives/archivesDetails' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 档案元数据
|
|||
export function FetchArchivesMetadata(params) { |
|||
return request({ |
|||
url: 'api/archives/archivesMetadata' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 初始化档案附件列表
|
|||
export function FetchInitArchiveFilesView(params) { |
|||
return request({ |
|||
url: 'api/archives/initArchiveFilesView' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 上传档案附件
|
|||
export function FetchUploadFile(parameter) { |
|||
return request({ |
|||
url: 'api/archives/uploadFile', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 编辑附件
|
|||
export function FetchEditFile(parameter) { |
|||
return request({ |
|||
url: 'api/archives/editFile', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 删除附件
|
|||
export function FetchDeleteFile(parameter) { |
|||
return request({ |
|||
url: 'api/archives/deleteFile', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 附件排序
|
|||
export function FetchFileSort(parameter) { |
|||
return request({ |
|||
url: 'api/archives/fileSort', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 档案还原
|
|||
export function FetchReduction(parameter) { |
|||
return request({ |
|||
url: 'api/archives/reduction', |
|||
method: 'post', |
|||
data: parameter |
|||
}) |
|||
} |
|||
|
|||
// 模糊查询
|
|||
export function queryVagueArchives(params) { |
|||
return request({ |
|||
url: 'api/archives/queryVagueArchives' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 模糊查询 - 2023-06-19
|
|||
export function querySeniorArchives(params) { |
|||
return request({ |
|||
url: 'api/archives/querySeniorArchives' + '?' + qs.stringify(params, { indices: false }), |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
export default { add, edit, del, FetchInitArchivesView, FetchTableDisplayFields, FetchFormDisplayFields, FetchDoeditIsRepeat, queryVagueArchives, querySeniorArchives } |
|||
|
After Width: 981 | Height: 128 | Size: 16 KiB |
After Width: 981 | Height: 128 | Size: 4.6 KiB |
After Width: 128 | Height: 128 | Size: 3.0 KiB |
After Width: 128 | Height: 128 | Size: 1.6 KiB |
After Width: 128 | Height: 128 | Size: 4.0 KiB |
After Width: 128 | Height: 128 | Size: 2.7 KiB |
After Width: 128 | Height: 128 | Size: 5.0 KiB |
After Width: 128 | Height: 128 | Size: 2.8 KiB |
@ -1,254 +1,317 @@ |
|||
<template> |
|||
<el-dialog class="upload-dialog" :title="detailTitle" :close-on-click-modal="false" :visible.sync="archivesInfoVisible" :before-close="handleClose"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<div class="archives-info-wrap"> |
|||
<!-- tab --> |
|||
<ul class="archives-tab"> |
|||
<li :class="{'active': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li> |
|||
<li v-if="isHasFile" :class="{'active': archivesTabIndex == 1}" @click="changeActiveTab(1)">附件</li> |
|||
<li :class="{'active': archivesTabIndex == 2}" @click="changeActiveTab(2)">元数据</li> |
|||
</ul> |
|||
<!-- 基本信息 --> |
|||
<div v-if="archivesTabIndex==0" class="base-info item-content"> |
|||
<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"> |
|||
<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-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> |
|||
<!-- 附件 --> |
|||
<UploadFile v-if="archivesTabIndex==1" ref="uploadFile" class="item-content" :is-upload-detail="false" :category-id="categoryId" :arc-id="arcId" /> |
|||
<!-- 元数据 --> |
|||
<div v-if="archivesTabIndex==2" class="item-content"> |
|||
<pre v-highlightjs="xml_show"> |
|||
<code class="highlight_s"> |
|||
{[xml_show]} |
|||
</code> |
|||
</pre> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
// import vkbeautify from 'vkbeautify' |
|||
import { form } from '@crud/crud' |
|||
import { FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList' |
|||
import UploadFile from '../uploadFile/index' |
|||
export default { |
|||
name: 'ArchivesInfo', |
|||
components: { UploadFile }, |
|||
mixins: [ |
|||
form({}) |
|||
], |
|||
inject: ['recycleMain'], |
|||
props: { |
|||
categoryId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
}, |
|||
arcId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
detailTitle: '', |
|||
isHasFile: false, // 卷内/文件才有附件 |
|||
isDetailsInfo: false, // 项目不显示最下面5行基本信息 |
|||
isTidOrBorrow: true, // 卷内不显示tid/借阅状态 |
|||
archivesInfoVisible: false, |
|||
archivesTabIndex: 0, |
|||
archivesDetailsData: [], |
|||
archivesDetailsMetadata: [], |
|||
xml_show: null |
|||
} |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
getDetial(rowId) { |
|||
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 |
|||
}) |
|||
}, |
|||
setXml() { |
|||
const xmlstr = this.archivesDetailsMetadata |
|||
// console.log('xmlstr:', xmlstr) |
|||
// console.log('xml转json:', this.$x2js.xml2js(xmlstr)) |
|||
// console.log('json转xml:', this.$x2js.js2xml(this.$x2js.xml2js(xmlstr))) |
|||
// this.xml_show = vkbeautify.xml(xmlstr) |
|||
this.xml_show = this.showXml(xmlstr) |
|||
}, |
|||
changeActiveTab(index) { |
|||
this.archivesTabIndex = index |
|||
if (this.archivesTabIndex === 2) { |
|||
this.setXml() |
|||
} |
|||
this.$nextTick(() => { |
|||
if (this.$refs.uploadFile) { |
|||
this.$refs.uploadFile.tableData = [] |
|||
this.$refs.uploadFile.getFileList() |
|||
} |
|||
}) |
|||
}, |
|||
// 删除 - 关闭 |
|||
handleClose(done) { |
|||
this.archivesInfoVisible = false |
|||
done() |
|||
}, |
|||
// xml格式化 |
|||
showXml(str) { |
|||
var that = this |
|||
var text = str |
|||
// 去掉多余的空格 |
|||
text = |
|||
'\n' + |
|||
text |
|||
.replace(/(<\w+)(\s.*?>)/g, function($0, name, props) { |
|||
return name + ' ' + props.replace(/\s+(\w+=)/g, ' $1') |
|||
}) |
|||
.replace(/>\s*?</g, '>\n<') |
|||
// 把注释编码 |
|||
text = text |
|||
.replace(/\n/g, '\r') |
|||
.replace(/<!--(.+?)-->/g, function($0, text) { |
|||
var ret = '<!--' + escape(text) + '-->' |
|||
return ret |
|||
}) |
|||
.replace(/\r/g, '\n') |
|||
|
|||
// 调整格式 |
|||
var rgx = /\n(<(([^\?]).+?)(?:\s|\s*?>|\s*?(\/)>)(?:.*?(?:(?:(\/)>)|(?:<(\/)\2>)))?)/gm |
|||
var nodeStack = [] |
|||
var output = text.replace(rgx, function( |
|||
$0, |
|||
all, |
|||
name, |
|||
isBegin, |
|||
isCloseFull1, |
|||
isCloseFull2, |
|||
isFull1, |
|||
isFull2 |
|||
) { |
|||
var isClosed = |
|||
isCloseFull1 === '/' || |
|||
isCloseFull2 === '/' || |
|||
isFull1 === '/' || |
|||
isFull2 === '/' |
|||
var prefix = '' |
|||
if (isBegin === '!') { |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
} else { |
|||
if (isBegin !== '/') { |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
if (!isClosed) { |
|||
nodeStack.push(name) |
|||
} |
|||
} else { |
|||
nodeStack.pop() |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
} |
|||
} |
|||
var ret = '\n' + prefix + all |
|||
return ret |
|||
}) |
|||
var outputText = output.substring(1) |
|||
// 把注释还原并解码,调格式 |
|||
outputText = outputText |
|||
.replace(/\n/g, '\r') |
|||
.replace(/(\s*)<!--(.+?)-->/g, function($0, prefix, text) { |
|||
if (prefix.charAt(0) === '\r') prefix = prefix.substring(1) |
|||
text = unescape(text).replace(/\r/g, '\n') |
|||
var ret = |
|||
'\n' + prefix + '<!--' + text.replace(/^\s*/gm, prefix) + '-->' |
|||
return ret |
|||
}) |
|||
outputText = outputText.replace(/\s+$/g, '').replace(/\r/g, '\r\n') |
|||
return outputText |
|||
}, |
|||
getPrefix(prefixIndex) { |
|||
var span = ' ' |
|||
var output = [] |
|||
for (var i = 0; i < prefixIndex; ++i) { |
|||
output.push(span) |
|||
} |
|||
return output.join('') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "~@/assets/styles/archives-manage.scss"; |
|||
.base-info .base-info-item span.el-tag{ |
|||
width: auto; |
|||
color: #fff; |
|||
} |
|||
::v-deep .el-dialog .el-dialog__header .el-dialog__headerbtn { |
|||
top: 12px; |
|||
right: -320px; |
|||
} |
|||
</style> |
|||
<template> |
|||
<el-dialog class="upload-dialog" :title="detailTitle" :close-on-click-modal="false" :visible.sync="archivesInfoVisible" :before-close="handleClose"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<div class="archives-info-wrap"> |
|||
<!-- tab --> |
|||
<ul class="archives-tab"> |
|||
<li :class="{'active': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li> |
|||
<li v-if="isHasFile" :class="{'active': archivesTabIndex == 1}" @click="changeActiveTab(1)">附件</li> |
|||
<li :class="{'active': archivesTabIndex == 2}" @click="changeActiveTab(2)">元数据</li> |
|||
</ul> |
|||
<el-button v-if="isShowOpen" style="position: absolute; right: 30px; top: 0; z-index: 9999;" @click="openCol">开架</el-button> |
|||
<!-- 基本信息 --> |
|||
<div v-if="archivesTabIndex==0" class="base-info item-content"> |
|||
<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"> |
|||
<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-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> |
|||
<!-- 附件 --> |
|||
<UploadFile v-if="archivesTabIndex==1" ref="uploadFile" class="item-content" :is-upload-detail="false" :category-id="categoryId" :arc-id="arcId" /> |
|||
<!-- 元数据 --> |
|||
<div v-if="archivesTabIndex==2" class="item-content"> |
|||
<pre v-highlightjs="xml_show"> |
|||
<code class="highlight_s"> |
|||
{[xml_show]} |
|||
</code> |
|||
</pre> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
// import vkbeautify from 'vkbeautify' |
|||
import { form } from '@crud/crud' |
|||
import { FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList' |
|||
import UploadFile from '../uploadFile/index' |
|||
import CallExternal from '@/api/storeManage/deviceManage/device' |
|||
export default { |
|||
name: 'ArchivesInfo', |
|||
components: { UploadFile }, |
|||
mixins: [ |
|||
form({}) |
|||
], |
|||
inject: ['recycleMain'], |
|||
props: { |
|||
categoryId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
}, |
|||
arcId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
detailTitle: '', |
|||
isHasFile: false, // 卷内/文件才有附件 |
|||
isDetailsInfo: false, // 项目不显示最下面5行基本信息 |
|||
isTidOrBorrow: true, // 卷内不显示tid/借阅状态 |
|||
archivesInfoVisible: false, |
|||
archivesTabIndex: 0, |
|||
archivesDetailsData: [], |
|||
archivesDetailsMetadata: [], |
|||
xml_show: null, |
|||
isShowOpen: false, |
|||
openLocation: null, |
|||
deviceData: null |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.getDeviceListAll() |
|||
}, |
|||
methods: { |
|||
getDetial(rowId) { |
|||
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 = '在库' |
|||
} |
|||
} |
|||
|
|||
// 是否显示开架按钮 |
|||
if (item.fieldName === 'folder_location') { |
|||
if (item.context !== null) { |
|||
this.openLocation = item.context |
|||
this.isShowOpen = true |
|||
} else { |
|||
this.openLocation = null |
|||
this.isShowOpen = false |
|||
} |
|||
} |
|||
}) |
|||
// 如果是卷内 - 不显示‘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 |
|||
}) |
|||
}, |
|||
// 获取密集架相关信息 |
|||
getDeviceListAll() { |
|||
const params = { |
|||
page: 0, |
|||
size: 10, |
|||
sort: 'sequence,asc', |
|||
storeroomId: 'D6490DA3D4261E8C26D0E3' |
|||
} |
|||
CallExternal.getDeviceList(params).then(data => { |
|||
data.content.map(item => { |
|||
if (item.deviceTypeId.name === '密集架') { // 写死状态 |
|||
this.deviceData = item |
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
// 开架 |
|||
openCol() { |
|||
const location = this.openLocation.split(' ')[2] |
|||
const pattern = /(\d+)区(\d+)列(\d+)节/ |
|||
const matches = location.match(pattern) |
|||
let areaNumber |
|||
let colNumber |
|||
if (matches !== null) { |
|||
areaNumber = matches[1] |
|||
colNumber = matches[2] |
|||
} |
|||
const params = { |
|||
deviceId: this.deviceData.id, |
|||
quNo: areaNumber, |
|||
colNo: colNumber, |
|||
leNo: '', |
|||
divNo: '', |
|||
zyNo: '' |
|||
} |
|||
CallExternal.FetchCallExternalOpenCol(params).then(res => { |
|||
if (res.success && res.success === '0') { |
|||
this.$message.success('开架执行成功') |
|||
} else { |
|||
this.$message.error(res.msg) |
|||
} |
|||
}).catch((error) => { |
|||
console.log(error) |
|||
this.$message.error('连接失败') |
|||
}) |
|||
}, |
|||
setXml() { |
|||
const xmlstr = this.archivesDetailsMetadata |
|||
// console.log('xmlstr:', xmlstr) |
|||
// console.log('xml转json:', this.$x2js.xml2js(xmlstr)) |
|||
// console.log('json转xml:', this.$x2js.js2xml(this.$x2js.xml2js(xmlstr))) |
|||
// this.xml_show = vkbeautify.xml(xmlstr) |
|||
this.xml_show = this.showXml(xmlstr) |
|||
}, |
|||
changeActiveTab(index) { |
|||
this.archivesTabIndex = index |
|||
if (this.archivesTabIndex === 2) { |
|||
this.setXml() |
|||
} |
|||
this.$nextTick(() => { |
|||
if (this.$refs.uploadFile) { |
|||
this.$refs.uploadFile.tableData = [] |
|||
this.$refs.uploadFile.getFileList() |
|||
} |
|||
}) |
|||
}, |
|||
// 删除 - 关闭 |
|||
handleClose(done) { |
|||
this.archivesInfoVisible = false |
|||
done() |
|||
}, |
|||
// xml格式化 |
|||
showXml(str) { |
|||
var that = this |
|||
var text = str |
|||
// 去掉多余的空格 |
|||
text = |
|||
'\n' + |
|||
text |
|||
.replace(/(<\w+)(\s.*?>)/g, function($0, name, props) { |
|||
return name + ' ' + props.replace(/\s+(\w+=)/g, ' $1') |
|||
}) |
|||
.replace(/>\s*?</g, '>\n<') |
|||
// 把注释编码 |
|||
text = text |
|||
.replace(/\n/g, '\r') |
|||
.replace(/<!--(.+?)-->/g, function($0, text) { |
|||
var ret = '<!--' + escape(text) + '-->' |
|||
return ret |
|||
}) |
|||
.replace(/\r/g, '\n') |
|||
|
|||
// 调整格式 |
|||
var rgx = /\n(<(([^\?]).+?)(?:\s|\s*?>|\s*?(\/)>)(?:.*?(?:(?:(\/)>)|(?:<(\/)\2>)))?)/gm |
|||
var nodeStack = [] |
|||
var output = text.replace(rgx, function( |
|||
$0, |
|||
all, |
|||
name, |
|||
isBegin, |
|||
isCloseFull1, |
|||
isCloseFull2, |
|||
isFull1, |
|||
isFull2 |
|||
) { |
|||
var isClosed = |
|||
isCloseFull1 === '/' || |
|||
isCloseFull2 === '/' || |
|||
isFull1 === '/' || |
|||
isFull2 === '/' |
|||
var prefix = '' |
|||
if (isBegin === '!') { |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
} else { |
|||
if (isBegin !== '/') { |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
if (!isClosed) { |
|||
nodeStack.push(name) |
|||
} |
|||
} else { |
|||
nodeStack.pop() |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
} |
|||
} |
|||
var ret = '\n' + prefix + all |
|||
return ret |
|||
}) |
|||
var outputText = output.substring(1) |
|||
// 把注释还原并解码,调格式 |
|||
outputText = outputText |
|||
.replace(/\n/g, '\r') |
|||
.replace(/(\s*)<!--(.+?)-->/g, function($0, prefix, text) { |
|||
if (prefix.charAt(0) === '\r') prefix = prefix.substring(1) |
|||
text = unescape(text).replace(/\r/g, '\n') |
|||
var ret = |
|||
'\n' + prefix + '<!--' + text.replace(/^\s*/gm, prefix) + '-->' |
|||
return ret |
|||
}) |
|||
outputText = outputText.replace(/\s+$/g, '').replace(/\r/g, '\r\n') |
|||
return outputText |
|||
}, |
|||
getPrefix(prefixIndex) { |
|||
var span = ' ' |
|||
var output = [] |
|||
for (var i = 0; i < prefixIndex; ++i) { |
|||
output.push(span) |
|||
} |
|||
return output.join('') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "~@/assets/styles/archives-manage.scss"; |
|||
.base-info .base-info-item span.el-tag{ |
|||
width: auto; |
|||
color: #fff; |
|||
} |
|||
::v-deep .el-dialog .el-dialog__header .el-dialog__headerbtn { |
|||
top: 12px; |
|||
right: -320px; |
|||
} |
|||
</style> |
@ -0,0 +1,444 @@ |
|||
<template> |
|||
<div class="import-container"> |
|||
<ul class="import-header"> |
|||
<li><i class="step-img01" /><span>上传数据包</span></li> |
|||
<li :class="['dot-img', {'dot-img-active':isShow02 || isShow03}]" /> |
|||
<li><i :class="['step-img02', {'step-img02-active':isShow02 || isShow03}]" /><span>读取数据</span></li> |
|||
<li :class="['dot-img', {'dot-img-active':isShow03}]" /> |
|||
<li><i :class="['step-img03', {'step-img03-active':isShow03}]" /><span>导入数据</span></li> |
|||
</ul> |
|||
<!-- <div class="import-title step01">上传数据包</div> --> |
|||
<div v-if="isShow01" class="step-content step-upload"> |
|||
<el-upload |
|||
ref="upload" |
|||
:limit="1" |
|||
:on-exceed="handleExceed" |
|||
:before-upload="beforeUpload" |
|||
:before-remove="beforeRemove" |
|||
:auto-upload="false" |
|||
:on-success="handleSuccess" |
|||
:on-error="handleError" |
|||
:on-remove="handleRemove" |
|||
accept=".zip" |
|||
:action="fileUploadApi + '?name=' + name" |
|||
> |
|||
<div class="upload-zip"><i class="el-icon-upload2" />选择文件</div> |
|||
<div slot="tip" class="el-upload__tip">上传限制文件类型:zip</div> |
|||
</el-upload> |
|||
</div> |
|||
<div v-if="isShow01" class="step-bottom-btn"> |
|||
<el-button type="primary" @click="handleStep01">下一步</el-button> |
|||
</div> |
|||
<!-- <div class="import-title step02">读取数据</div> --> |
|||
<div v-if="isShow02" class="step-content"> |
|||
<div class="import-data-number">案卷:<span>5000</span> 条 / 卷内:<span>10000</span> 条 / 资料:<span>8000</span> 条</div> |
|||
<ul class="import-tab"> |
|||
<li :class="{'active': archivesTabIndex == 0}" @click="changeActiveTab(0)">案卷</li> |
|||
<li :class="{'active': archivesTabIndex == 1}" @click="changeActiveTab(1)">文件</li> |
|||
<li :class="{'active': archivesTabIndex == 2}" @click="changeActiveTab(2)">资料</li> |
|||
</ul> |
|||
<el-table |
|||
ref="table" |
|||
:data="tableData" |
|||
style="width: 100%" |
|||
height="calc(100vh - 504px)" |
|||
@row-click="clickRowHandler" |
|||
@selection-change="selectionChangeHandler" |
|||
> |
|||
<el-table-column prop="security_class" label="密级" align="center" width="80px" /> |
|||
<el-table-column prop="medium_type" label="载体类型" align="center" width="100px" /> |
|||
<el-table-column prop="micro_number" label="缩微号" align="center" width="80px" /> |
|||
<el-table-column prop="archive_no" label="档号" align="center" width="200px" /> |
|||
<el-table-column prop="page_qty" label="文件件数" align="center" width="100px" /> |
|||
<el-table-column prop="maintitle" label="案卷题名" align="center" show-overflow-tooltip width="240px" /> |
|||
<el-table-column prop="begin_date" label="起始时间" align="center" width="140px" /> |
|||
<el-table-column prop="end_date" label="终止时间" align="center" width="140px" /> |
|||
<el-table-column prop="archive_ctg_no" label="分类号" align="center" width="140px" /> |
|||
<el-table-column prop="subject_term" label="主题词" align="center" width="140px" /> |
|||
<el-table-column prop="remarks" label="附注" align="center" width="120px" /> |
|||
<el-table-column prop="retention" label="保管期限" align="center" width="120px" /> |
|||
<el-table-column prop="archive_year" label="年度" align="center" width="100px" /> |
|||
<el-table-column prop="fonds_no" label="全宗" align="center" width="100px" /> |
|||
<el-table-column prop="piece_no" label="卷号" align="center" width="100px" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
:current-page="page.page" |
|||
:total="page.total" |
|||
:page-size="page.size" |
|||
:pager-count="5" |
|||
layout="total, prev, pager, next, sizes" |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentPage" |
|||
/> |
|||
</div> |
|||
<div v-if="isShow02" class="step-bottom-btn"> |
|||
<el-button @click="handleReturn02">上一步</el-button> |
|||
<el-button type="primary" @click="handleStep02">下一步</el-button> |
|||
</div> |
|||
<!-- <div class="import-title step03">导入数据</div> --> |
|||
<div v-if="isShow03" class="step-content step-content03"> |
|||
<el-form ref="form" :model="form" label-width="160px"> |
|||
<el-row> |
|||
<el-form-item label="案卷及文件数据"> |
|||
<el-checkbox v-model="form.file">导入</el-checkbox> |
|||
</el-form-item> |
|||
<el-form-item label="遇到重复数据导入方式"> |
|||
<el-radio-group v-model="form.fileType"> |
|||
<el-radio label="跳过" /> |
|||
<el-radio label="覆盖" /> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-row> |
|||
<el-row> |
|||
<el-form-item label="资料数据"> |
|||
<el-checkbox v-model="form.data">导入</el-checkbox> |
|||
</el-form-item> |
|||
<el-form-item label="遇到重复数据导入方式"> |
|||
<el-radio-group v-model="form.dataType"> |
|||
<el-radio label="跳过" /> |
|||
<el-radio label="覆盖" /> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
</el-row> |
|||
<el-form-item> |
|||
<el-button type="primary" class="submit-btn" @click="submitForm('form')">导入</el-button> |
|||
<el-button @click="handleReturn03">取消</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<el-dialog title="确认删除" :visible.sync="deleteVisible"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<p><span style="color:#fff;">此操作将清空所选数据</span></p> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click.native="handleDelConfirm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from 'vuex' |
|||
import tableJson from './table.json' |
|||
export default { |
|||
name: 'DataImport', |
|||
components: { }, |
|||
data() { |
|||
return { |
|||
name: '', |
|||
archivesTabIndex: 0, |
|||
deleteVisible: false, |
|||
tableData: [], |
|||
page: { |
|||
page: 1, |
|||
size: 10, |
|||
total: 0 |
|||
}, |
|||
form: { |
|||
file: true, |
|||
data: true, |
|||
fileType: '跳过', |
|||
dataType: '跳过' |
|||
}, |
|||
isShow01: true, |
|||
isShow02: false, |
|||
isShow03: false |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi', |
|||
'fileUploadApi' |
|||
]) |
|||
}, |
|||
created() { |
|||
this.tableData = tableJson |
|||
}, |
|||
methods: { |
|||
handleStep01() { |
|||
this.isShow01 = false |
|||
this.isShow02 = true |
|||
}, |
|||
handleReturn02() { |
|||
this.isShow01 = true |
|||
this.isShow02 = false |
|||
this.isShow03 = false |
|||
}, |
|||
handleStep02() { |
|||
this.isShow01 = false |
|||
this.isShow02 = false |
|||
this.isShow03 = true |
|||
}, |
|||
handleReturn03() { |
|||
this.isShow01 = false |
|||
this.isShow02 = true |
|||
this.isShow03 = false |
|||
}, |
|||
changeActiveTab(index) { |
|||
this.archivesTabIndex = index |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
}, |
|||
submitForm(formName) { |
|||
this.$refs[formName].validate((valid) => { |
|||
if (valid) { |
|||
alert('submit!') |
|||
} else { |
|||
console.log('error submit!!') |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
// 上传文件 |
|||
upload() { |
|||
}, |
|||
beforeUpload(file) { |
|||
}, |
|||
handleRemove(file, fileList) { |
|||
console.log(file, fileList) |
|||
}, |
|||
handleExceed(files, fileList) { |
|||
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`) |
|||
}, |
|||
beforeRemove(file, fileList) { |
|||
return this.$confirm('此操作将清空所选数据, 是否继续?', '提示') |
|||
}, |
|||
handleSuccess(response, file, fileList) { |
|||
// this.crud.notify('上传成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|||
// this.$refs.upload.clearFiles() |
|||
// this.crud.status.add = CRUD.STATUS.NORMAL |
|||
// this.crud.resetForm() |
|||
// this.crud.toQuery() |
|||
}, |
|||
// 监听上传失败 |
|||
handleError(e, file, fileList) { |
|||
const msg = JSON.parse(e.message) |
|||
this.$message({ |
|||
message: msg.message, |
|||
type: 'error', |
|||
duration: 2500 |
|||
}) |
|||
this.loading = false |
|||
}, |
|||
// table |
|||
clickRowHandler(row) { |
|||
this.$refs.table.toggleRowSelection(row) |
|||
}, |
|||
// table |
|||
selectionChangeHandler(val) { |
|||
this.selections = val |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.import-container{ |
|||
padding: 30px; |
|||
height: calc(100vh - 234px); |
|||
} |
|||
.import-header{ |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
li{ |
|||
display: flex; |
|||
flex-direction: column; |
|||
text-align: center; |
|||
align-items: center; |
|||
width: 140px; |
|||
font-size: 14px; |
|||
color: #fff; |
|||
i{ |
|||
width: 45px; |
|||
height: 45px; |
|||
margin-bottom: 20px; |
|||
&.step-img01{ |
|||
background: url('~@/assets/images/step01.png') no-repeat; |
|||
background-size: contain; |
|||
} |
|||
&.step-img02{ |
|||
background: url('~@/assets/images/step02_2.png') no-repeat; |
|||
background-size: contain; |
|||
&.step-img02-active{ |
|||
background: url('~@/assets/images/step02.png') no-repeat; |
|||
background-size: contain; |
|||
} |
|||
} |
|||
&.step-img03{ |
|||
background: url('~@/assets/images/step03_3.png') no-repeat; |
|||
background-size: contain; |
|||
&.step-img03-active{ |
|||
background: url('~@/assets/images/step03.png') no-repeat; |
|||
background-size: contain; |
|||
} |
|||
} |
|||
} |
|||
|
|||
&.dot-img{ |
|||
width: 55px; |
|||
height: 30px; |
|||
background: url('~@/assets/images/dot1.png') no-repeat; |
|||
background-size: contain; |
|||
&.dot-img-active{ |
|||
background: url('~@/assets/images/dot2.png') no-repeat; |
|||
background-size: contain; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.step-content{ |
|||
position: relative; |
|||
} |
|||
.step-content03{ |
|||
margin-top: 50px; |
|||
} |
|||
.step-upload{ |
|||
width: 40%; |
|||
padding: 30px 0; |
|||
margin: 40px auto; |
|||
background-color: #02255f; |
|||
border-radius: 3px; |
|||
div:first-child{ |
|||
display: flex; |
|||
justify-content: center; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
} |
|||
} |
|||
.import-title{ |
|||
font-size: 14px; |
|||
color: #fff; |
|||
padding-left: 50px; |
|||
margin-bottom: 6px; |
|||
height: 50px; |
|||
line-height: 50px; |
|||
&.step01{ |
|||
background: url('~@/assets/images/step01.png') no-repeat; |
|||
background-size: 30px 30px; |
|||
} |
|||
&.step02{ |
|||
background: url('~@/assets/images/step02.png') no-repeat; |
|||
background-size: 30px 30px; |
|||
} |
|||
&.step03{ |
|||
background: url('~@/assets/images/step03.png') no-repeat; |
|||
background-size: 30px 30px; |
|||
} |
|||
} |
|||
.upload-zip{ |
|||
// margin-left: 50px; |
|||
flex-direction: row !important; |
|||
width: 100px; |
|||
padding: 6px 10px; |
|||
margin-bottom: 10px; |
|||
font-size: 14px; |
|||
color: #fff; |
|||
border: 1px solid #339cff; |
|||
background-color: transparent; |
|||
border-radius: 3px; |
|||
& i{ |
|||
margin-right: 4px; |
|||
} |
|||
} |
|||
::v-deep .el-upload{ |
|||
display: block; |
|||
} |
|||
::v-deep .el-upload-list{ |
|||
margin-top: 20px; |
|||
.el-upload-list__item{ |
|||
font-size: 16px; |
|||
line-height: 30px; |
|||
&:hover{ |
|||
background-color: transparent; |
|||
} |
|||
&:first-child{ |
|||
margin-top: 0; |
|||
} |
|||
} |
|||
.el-upload-list__item-name [class^=el-icon]{ |
|||
color: #fff; |
|||
} |
|||
.el-upload-list__item-name{ |
|||
color: #fff; |
|||
} |
|||
.el-icon-close{ |
|||
display: block; |
|||
color: #fff; |
|||
top: 8px; |
|||
} |
|||
} |
|||
|
|||
.step-bottom-btn{ |
|||
text-align: center; |
|||
.el-button.el-button--primary{ |
|||
color: #fff; |
|||
background-color: #1890ff; |
|||
border-color: #1890ff; |
|||
} |
|||
} |
|||
|
|||
.import-data-number{ |
|||
position: absolute; |
|||
right: 10px; |
|||
top: 20px; |
|||
font-size: 12px; |
|||
color: #fff; |
|||
& span{ |
|||
font-weight: bold; |
|||
color: rgb(246,81,99); |
|||
} |
|||
} |
|||
.import-tab{ |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
margin-bottom: 10px; |
|||
li{ |
|||
padding: 10px 20px 14px 20px; |
|||
color: #339CFF; |
|||
cursor: pointer; |
|||
&.active{ |
|||
position: relative; |
|||
color: #fff; |
|||
&::after{ |
|||
content: ""; |
|||
position: absolute; |
|||
left: 0; |
|||
bottom: -1px; |
|||
width: 100%; |
|||
height: 3px; |
|||
border-radius: 3px; |
|||
background-color: #fff; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
::v-deep .el-form{ |
|||
.el-row{ |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
} |
|||
.el-form-item{ |
|||
margin-right: 50px; |
|||
.el-form-item__label, |
|||
.el-checkbox__label, |
|||
.el-radio__label{ |
|||
color: #fff; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.submit-btn{ |
|||
background-color: #3a99fd; |
|||
border-color: #3a99fd; |
|||
margin-top: 20px; |
|||
} |
|||
</style> |
@ -0,0 +1,29 @@ |
|||
[ |
|||
{ |
|||
"security_class": "机密", |
|||
"medium_type": "纸张", |
|||
"micro_number":"-", |
|||
"subject_term": "主题词123", |
|||
"remarks": "附注123", |
|||
"case_no": "A8806117A7B9058F1AA90A", |
|||
"responsibleby": "许由", |
|||
"begin_date": "2016-09-21", |
|||
"end_date": "2016-09-21", |
|||
"children_num": 1, |
|||
"tid": "", |
|||
"organization_matter": "", |
|||
"maintitle": "行政事务文件级文书档案2021002", |
|||
"archive_ctg_no": "行政事务", |
|||
"archive_year": 2021, |
|||
"page_qty": 50, |
|||
"archive_no": "AA001-D-WS.W-2023-0011", |
|||
"fonds_no": "档案室", |
|||
"created_date": "2021-10-10 ", |
|||
"id": "2102D839B14ABAC03F8FEB", |
|||
"is_storage": 2, |
|||
"department": "办公室", |
|||
"retention": "定期10年", |
|||
"piece_no": "001", |
|||
"is_borrow": "" |
|||
} |
|||
] |
@ -0,0 +1,23 @@ |
|||
<template> |
|||
<div> |
|||
导入日志 |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'ImportLog', |
|||
components: { }, |
|||
data() { |
|||
return { |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
methods: { |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
</style> |
@ -0,0 +1,58 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-content"> |
|||
<span class="right-top-line" /> |
|||
<span class="left-bottom-line" /> |
|||
<span class="right-bottom-line" /> |
|||
<ul class="tab-nav"> |
|||
<li :class="{ 'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">数据导入<i /></li> |
|||
<li :class="{ 'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">导入日志<i /></li> |
|||
<!-- 最右侧装饰img --> |
|||
<span class="tab-right-img" /> |
|||
</ul> |
|||
<component :is="comName" :ref="comName" /> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import dataImport from './dataImport/index.vue' |
|||
import importLog from './importLog/index.vue' |
|||
export default { |
|||
name: 'FileImport', |
|||
components: { dataImport, importLog }, |
|||
data() { |
|||
return { |
|||
activeIndex: 0 |
|||
} |
|||
}, |
|||
computed: { |
|||
comName: function() { |
|||
if (this.activeIndex === 0) { |
|||
return 'dataImport' |
|||
} else if (this.activeIndex === 1) { |
|||
return 'importLog' |
|||
} |
|||
return 'dataImport' |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
methods: { |
|||
changeActiveTab(data) { |
|||
this.activeIndex = data |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.tab-content{ |
|||
position: relative; |
|||
margin-top: 61px; |
|||
border: 1px solid #113d72; |
|||
} |
|||
.tab-content .tab-nav{ |
|||
margin-bottom: 0; |
|||
} |
|||
</style> |
@ -1,164 +1,218 @@ |
|||
<template> |
|||
<div class="lendComfirm-arcList"> |
|||
<el-button class="exception-btn" size="mini" :disabled="!selections.length" @click="handleBorrowException"><svg-icon icon-class="exception" class-name="lend-handle" />异常处理</el-button> |
|||
<div class="container-wrap"> |
|||
<span class="right-top-line" /> |
|||
<span class="left-bottom-line" /> |
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="tableLoading" |
|||
:data="tableData" |
|||
style="min-width: 100%" |
|||
@selection-change="selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
> |
|||
<el-table-column type="selection" align="center" width="55" /> |
|||
<el-table-column type="index" label="序号" align="center" width="55" /> |
|||
<el-table-column prop="categoryName" align="center" label="门类名称" min-width="120" show-overflow-tooltip /> |
|||
<el-table-column prop="archiveNo" align="center" label="档号" min-width="160" show-overflow-tooltip /> |
|||
<el-table-column prop="maintitle" align="center" label="题名" min-width="180" show-overflow-tooltip /> |
|||
<el-table-column prop="caseName" align="center" label="盒名称" min-width="120" show-overflow-tooltip /> |
|||
<el-table-column prop="folderLocationDetails" align="center" label="存放位置" min-width="300"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="scope.row.folderLocationDetails.includes(',')"> |
|||
<el-tag |
|||
v-for="(item,index) in scope.row.folderLocationDetails.split(',')" |
|||
:key="index" |
|||
:type="item" |
|||
effect="dark" |
|||
> |
|||
{{ item }} |
|||
</el-tag> |
|||
</div> |
|||
<div v-else> |
|||
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="borrowType" align="center" label="借阅状态" min-width="100"> |
|||
<template slot-scope="scope"> |
|||
<!-- 待借阅 --> |
|||
<span :class="borrowStyle(scope.row.borrowType)" style="width:76px">{{ scope.row.borrowType | borrowStatus }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="createTime" align="center" label="操作时间" min-width="120"> |
|||
<template slot-scope="scope"> |
|||
<div>{{ scope.row.createTime | parseTime }}</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!-- 异常处理 --> |
|||
<el-dialog title="异常处理" :visible.sync="exceptionVisible" :close-on-click-modal="false" :before-close="handleClose"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<div class="dialog-delt"> |
|||
<p><span>确定当前档案存在异常情况?</span></p> |
|||
</div> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click.native="handleExceptionConfirm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchInitArchivesByOrderNo, FetchBorrowException } from '@/api/archivesManage/lendManage' |
|||
import { lendingCrud } from '../mixins/lending' |
|||
export default { |
|||
name: 'LendArchivesList', |
|||
mixins: [lendingCrud], |
|||
props: { |
|||
archivesOrderNum: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
selections: [], |
|||
tableData: [], |
|||
tableLoading: false, |
|||
exceptionVisible: false |
|||
} |
|||
}, |
|||
watch: { |
|||
archivesOrderNum: function(newValue, oldValue) { |
|||
if (newValue) { |
|||
this.getArchivesTable() |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
this.getArchivesTable() |
|||
}, |
|||
methods: { |
|||
// 档案异常处理 |
|||
handleBorrowException() { |
|||
const index = this.selections.findIndex(item => item.borrowType === -1) |
|||
if (index === -1) { |
|||
this.exceptionVisible = true |
|||
} else { |
|||
this.$message.error('当前档案为异常状态,请勿重复操作!') |
|||
return |
|||
} |
|||
}, |
|||
// 确认加入异常 |
|||
handleExceptionConfirm() { |
|||
const params = this.selections.map(item => item.id) |
|||
FetchBorrowException(params).then(data => { |
|||
if (data === this.selections.length) { |
|||
this.$message.success('已成功加入异常!') |
|||
this.exceptionVisible = false |
|||
this.getArchivesTable() |
|||
} |
|||
}) |
|||
}, |
|||
// 获取借阅确认下的档案list |
|||
getArchivesTable() { |
|||
this.tableLoading = true |
|||
const params = { |
|||
'orderNo': this.archivesOrderNum |
|||
} |
|||
FetchInitArchivesByOrderNo(params).then(data => { |
|||
if (data) { |
|||
this.tableData = data |
|||
this.tableLoading = false |
|||
} |
|||
}) |
|||
}, |
|||
selectionChangeHandler(val) { |
|||
this.selections = val |
|||
}, |
|||
clickRowHandler(row) { |
|||
this.$refs.table.toggleRowSelection(row) |
|||
}, |
|||
handleClose(done) { |
|||
this.exceptionVisible = false |
|||
done() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import '~@/assets/styles/lend-manage.scss'; |
|||
.lendComfirm-arcList{ |
|||
.exception-btn{ |
|||
margin: 20px 0; |
|||
.lend-handle{ |
|||
margin-right: 6px; |
|||
} |
|||
} |
|||
.container-wrap{ |
|||
min-height: auto; |
|||
} |
|||
} |
|||
</style> |
|||
<template> |
|||
<div class="lendComfirm-arcList"> |
|||
<el-button class="exception-btn" size="mini" :disabled="!selections.length" @click="handleBorrowException"><svg-icon icon-class="exception" class-name="lend-handle" />异常处理</el-button> |
|||
<div class="container-wrap"> |
|||
<span class="right-top-line" /> |
|||
<span class="left-bottom-line" /> |
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="tableLoading" |
|||
:data="tableData" |
|||
style="min-width: 100%" |
|||
@selection-change="selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
> |
|||
<el-table-column type="selection" align="center" width="55" /> |
|||
<el-table-column type="index" label="序号" align="center" width="55" /> |
|||
<el-table-column prop="categoryName" align="center" label="门类名称" min-width="120" show-overflow-tooltip /> |
|||
<el-table-column prop="archiveNo" align="center" label="档号" min-width="160" show-overflow-tooltip /> |
|||
<el-table-column prop="maintitle" align="center" label="题名" min-width="180" show-overflow-tooltip /> |
|||
<el-table-column prop="caseName" align="center" label="盒名称" min-width="100" show-overflow-tooltip /> |
|||
<el-table-column prop="folderLocationDetails" align="center" label="存放位置" min-width="300"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="scope.row.folderLocationDetails.includes(',')"> |
|||
<el-tag |
|||
v-for="(item,index) in scope.row.folderLocationDetails.split(',')" |
|||
:key="index" |
|||
:type="item" |
|||
effect="dark" |
|||
> |
|||
{{ item }} |
|||
</el-tag> |
|||
</div> |
|||
<div v-else> |
|||
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="borrowType" align="center" label="借阅状态" min-width="100"> |
|||
<template slot-scope="scope"> |
|||
<!-- 待借阅 --> |
|||
<span :class="borrowStyle(scope.row.borrowType)" style="width:76px">{{ scope.row.borrowType | borrowStatus }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="borrowType" align="center" label="开架操作" min-width="80"> |
|||
<template slot-scope="scope"> |
|||
<el-button v-if="scope.row.folderLocationDetails" size="mini" type="primary" @click="openCol(scope.row.folderLocationDetails)">开架</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="createTime" align="center" label="操作时间" min-width="130"> |
|||
<template slot-scope="scope"> |
|||
<div>{{ scope.row.createTime | parseTime }}</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!-- 异常处理 --> |
|||
<el-dialog title="异常处理" :visible.sync="exceptionVisible" :close-on-click-modal="false" :before-close="handleClose"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<div class="dialog-delt"> |
|||
<p><span>确定当前档案存在异常情况?</span></p> |
|||
</div> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click.native="handleExceptionConfirm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchInitArchivesByOrderNo, FetchBorrowException } from '@/api/archivesManage/lendManage' |
|||
import { lendingCrud } from '../mixins/lending' |
|||
import CallExternal from '@/api/storeManage/deviceManage/device' |
|||
export default { |
|||
name: 'LendArchivesList', |
|||
mixins: [lendingCrud], |
|||
props: { |
|||
archivesOrderNum: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
selections: [], |
|||
tableData: [], |
|||
tableLoading: false, |
|||
exceptionVisible: false, |
|||
deviceData: null |
|||
} |
|||
}, |
|||
watch: { |
|||
archivesOrderNum: function(newValue, oldValue) { |
|||
if (newValue) { |
|||
this.getArchivesTable() |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
this.getArchivesTable() |
|||
}, |
|||
methods: { |
|||
// 档案异常处理 |
|||
handleBorrowException() { |
|||
const index = this.selections.findIndex(item => item.borrowType === -1) |
|||
if (index === -1) { |
|||
this.exceptionVisible = true |
|||
} else { |
|||
this.$message.error('当前档案为异常状态,请勿重复操作!') |
|||
return |
|||
} |
|||
}, |
|||
// 确认加入异常 |
|||
handleExceptionConfirm() { |
|||
const params = this.selections.map(item => item.id) |
|||
FetchBorrowException(params).then(data => { |
|||
if (data === this.selections.length) { |
|||
this.$message.success('已成功加入异常!') |
|||
this.exceptionVisible = false |
|||
this.getArchivesTable() |
|||
} |
|||
}) |
|||
}, |
|||
// 获取借阅确认下的档案list |
|||
getArchivesTable() { |
|||
this.tableLoading = true |
|||
const params = { |
|||
'orderNo': this.archivesOrderNum |
|||
} |
|||
FetchInitArchivesByOrderNo(params).then(data => { |
|||
if (data) { |
|||
this.tableData = data |
|||
this.tableLoading = false |
|||
this.getDeviceListAll() |
|||
} |
|||
}) |
|||
}, |
|||
selectionChangeHandler(val) { |
|||
this.selections = val |
|||
}, |
|||
clickRowHandler(row) { |
|||
this.$refs.table.toggleRowSelection(row) |
|||
}, |
|||
handleClose(done) { |
|||
this.exceptionVisible = false |
|||
done() |
|||
}, |
|||
// 获取密集架相关信息 |
|||
getDeviceListAll() { |
|||
const params = { |
|||
page: 0, |
|||
size: 10, |
|||
sort: 'sequence,asc', |
|||
storeroomId: 'D6490DA3D4261E8C26D0E3' |
|||
} |
|||
CallExternal.getDeviceList(params).then(data => { |
|||
data.content.map(item => { |
|||
if (item.deviceTypeId.name === '密集架') { // 写死状态 |
|||
this.deviceData = item |
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
// 开架 |
|||
openCol(data) { |
|||
const location = data.split(' ')[2] |
|||
const pattern = /(\d+)区(\d+)列(\d+)节/ |
|||
const matches = location.match(pattern) |
|||
let areaNumber |
|||
let colNumber |
|||
if (matches !== null) { |
|||
areaNumber = matches[1] |
|||
colNumber = matches[2] |
|||
} |
|||
const params = { |
|||
deviceId: this.deviceData.id, |
|||
quNo: areaNumber, |
|||
colNo: colNumber, |
|||
leNo: '', |
|||
divNo: '', |
|||
zyNo: '' |
|||
} |
|||
CallExternal.FetchCallExternalOpenCol(params).then(res => { |
|||
if (res.success && res.success === '0') { |
|||
this.$message.success('开架执行成功') |
|||
} else { |
|||
this.$message.error(res.msg) |
|||
} |
|||
}).catch((error) => { |
|||
console.log(error) |
|||
this.$message.error('连接失败') |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import '~@/assets/styles/lend-manage.scss'; |
|||
.lendComfirm-arcList{ |
|||
.exception-btn{ |
|||
margin: 20px 0; |
|||
.lend-handle{ |
|||
margin-right: 6px; |
|||
} |
|||
} |
|||
.container-wrap{ |
|||
min-height: auto; |
|||
} |
|||
} |
|||
</style> |