This commit is contained in:
2025-11-19 08:49:32 +08:00
parent 6d53b06592
commit 4dc7783c22
5 changed files with 524 additions and 759 deletions

View File

@@ -1,336 +1,150 @@
<template> <template>
<!-- 档案管理未入库档案著录已入库数据浏览OA数据管理已入库收藏夹点击原文数量弹框 --> <!-- 档案管理未入库档案著录已入库数据浏览OA数据管理已入库收藏夹点击原文数量弹框 -->
<div> <div>
<el-drawer <el-drawer title="原文详情" :visible.sync="drawer" :append-to-body="true" direction="ltr" :before-close="handleClose"
title="原文详情" size="100%" :wrapperClosable="false">
:visible.sync="drawer" <div class="tip-info" v-if="
:append-to-body="true" routerName === 'dataBrowsing' || routerName === 'notStoredArchives'
direction="ltr" ">
:before-close="handleClose"
size="100%"
:wrapperClosable="false"
>
<div
class="tip-info"
v-if="
routerName === 'dataBrowsing' || routerName === 'notStoredArchives'
"
>
{{ checkText }} {{ checkText }}
</div> </div>
<div class="btnClass"> <div class="btnClass">
<el-card :body-style="{ padding: '10px' }"> <el-card :body-style="{ padding: '10px' }">
<!-- {{drawer}}{{oriTable}} --> <!-- {{drawer}}{{oriTable}} -->
<el-button <el-button size="mini" v-if="catalogueType" type="danger" @click="deletec">
size="mini"
v-if="catalogueType"
type="danger"
@click="deletec"
>
删除 删除
</el-button> </el-button>
<el-button <el-button size="mini" v-if="catalogueType && treeRow.className != '电子档案'" type="primary"
size="mini" @click="btnClick(1)">
v-if="catalogueType && treeRow.className != '电子档案'"
type="primary"
@click="btnClick(1)"
>
批量下载 批量下载
</el-button> </el-button>
<el-button <el-button size="mini" v-if="catalogueType && treeRow.className != '电子档案'" type="primary"
size="mini" @click="btnClick(2)">
v-if="catalogueType && treeRow.className != '电子档案'"
type="primary"
@click="btnClick(2)"
>
归档章 归档章
</el-button> </el-button>
<!-- <el-button size="mini" v-if="catalogueType && treeRow.className!='录像' && treeRow.className!='录音'" <!-- <el-button size="mini" v-if="catalogueType && treeRow.className!='录像' && treeRow.className!='录音'"
type="primary" @click="btnClick(3)"> type="primary" @click="btnClick(3)">
合并文件 </el-button> --> 合并文件 </el-button> -->
<el-button <el-button size="mini" v-if="treeRow.className != '电子档案'" type="primary" @click="btnClick(4)">
size="mini"
v-if="treeRow.className != '电子档案'"
type="primary"
@click="btnClick(4)"
>
合并下载 合并下载
</el-button> </el-button>
<!-- <el-button size="mini" <!-- <el-button size="mini"
v-if="catalogueType && treeRow.className!='录像' && treeRow.className!='录音' && routerName==='notStoredArchives'" v-if="catalogueType && treeRow.className!='录像' && treeRow.className!='录音' && routerName==='notStoredArchives'"
type="primary" @click="btnClick(5)"> type="primary" @click="btnClick(5)">
扫描原文 </el-button> --> 扫描原文 </el-button> -->
<el-button <el-button size="mini" v-if="
size="mini" catalogueType &&
v-if=" treeRow.className != '电子档案' &&
catalogueType && routerName === 'notStoredArchives'
treeRow.className != '电子档案' && " type="primary" @click="btnClick(6)">
routerName === 'notStoredArchives'
"
type="primary"
@click="btnClick(6)"
>
撤销归档章 撤销归档章
</el-button> </el-button>
<el-button <el-button size="mini" v-if="treeRow.className != '电子档案'" type="primary" @click="btnClick(9)">
size="mini"
v-if="treeRow.className != '电子档案'"
type="primary"
@click="btnClick(9)"
>
电子签名 电子签名
</el-button> </el-button>
<el-button <el-button size="mini" type="primary" v-if="routerName === 'dataBrowsing'" @click="btnClick(7)">电子档案复制申请
size="mini"
type="primary"
v-if="routerName === 'dataBrowsing'"
@click="btnClick(7)"
>电子档案复制申请
</el-button> </el-button>
<el-button <el-button size="mini" type="primary" v-if="routerName === 'dataBrowsing'" @click="btnClick(8)">实体档案复制申请
size="mini"
type="primary"
v-if="routerName === 'dataBrowsing'"
@click="btnClick(8)"
>实体档案复制申请
</el-button> </el-button>
</el-card> </el-card>
</div> </div>
<div class="contentBox"> <div class="contentBox">
<el-card :body-style="{ padding: '10px' }" style="width: 26%"> <el-card :body-style="{ padding: '10px' }" style="width: 26%">
<el-button <el-button v-if="oriRowObj.useStyle === 'print' || typeStatus === 'ruku'" type="primary" size="small"
v-if="oriRowObj.useStyle === 'print' || typeStatus === 'ruku'" :disabled="!multipleSelection.length" @click="download">
type="primary"
size="small"
:disabled="!multipleSelection.length"
@click="download"
>
原文下载 原文下载
</el-button> </el-button>
<!-- @row-click="previewImg" --> <!-- @row-click="previewImg" -->
<el-table <el-table ref="tableForEach" highlight-current-row border size="mini" :data="tableDataOrigin"
ref="tableForEach" @row-click="previewImg" tooltip-effect="dark" max-height="800px" @selection-change="handleSelectionChange">
highlight-current-row
border
size="mini"
:data="tableDataOrigin"
@row-click="previewImg"
tooltip-effect="dark"
max-height="800px"
@selection-change="handleSelectionChange"
>
<!-- 原文下载的多选框 --> <!-- 原文下载的多选框 -->
<el-table-column <el-table-column v-if="
v-if=" catalogueType ||
catalogueType || (!catalogueType && oriRowObj.useStyle === 'print') ||
(!catalogueType && oriRowObj.useStyle === 'print') || typeStatus === 'ruku'
typeStatus === 'ruku' " type="selection" width="43">
"
type="selection"
width="43"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column type="index" width="55" label="序号" align="center">
type="index"
width="55"
label="序号"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column show-overflow-tooltip prop="file_name" label="文件名称" align="center">
show-overflow-tooltip
prop="file_name"
label="文件名称"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.isEditFlag"> <template v-if="scope.row.isEditFlag">
<el-input <el-input type="text" @change.native.stop="originClick('blur', scope.row)" size="mini"
type="text" :title="scope.row.file_name" v-model="scope.row.file_name" clearable />
@change.native.stop="originClick('blur', scope.row)"
size="mini"
:title="scope.row.file_name"
v-model="scope.row.file_name"
clearable
/>
</template> </template>
<template v-else>{{ scope.row.file_name }}</template> <template v-else>{{ scope.row.file_name }}</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="操作" align="center" width="100" v-if="$route.name === 'notStoredArchives'">
label="操作"
align="center"
width="100"
v-if="$route.name === 'notStoredArchives'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button @click.native.stop="originClick('down', scope.row)" type="text" icon="el-icon-bottom"
@click.native.stop="originClick('down', scope.row)" title="向下" size="mini"></el-button>
type="text" <el-button @click.native.stop="originClick('up', scope.row)" type="text" icon="el-icon-top" title="向上"
icon="el-icon-bottom" size="mini"></el-button>
title="向下" <el-button @click.native.stop="originClick('rename', scope.row)" type="text" icon="el-icon-edit"
size="mini" title="重命名" size="mini"></el-button>
></el-button>
<el-button
@click.native.stop="originClick('up', scope.row)"
type="text"
icon="el-icon-top"
title="向上"
size="mini"
></el-button>
<el-button
@click.native.stop="originClick('rename', scope.row)"
type="text"
icon="el-icon-edit"
title="重命名"
size="mini"
></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card <el-card :body-style="{ padding: '10px' }" style="width: 73%" class="box-card">
:body-style="{ padding: '10px' }"
style="width: 73%"
class="box-card"
>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane <el-tab-pane label="查看原文" name="1" v-loading.fullscreen.lock="imageLoad" :element-loading-text="loadingText"
label="查看原文" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.1)">
name="1"
v-loading.fullscreen.lock="imageLoad"
:element-loading-text="loadingText"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(255, 255, 255, 0.1)"
>
<!-- 查看原文 --> <!-- 查看原文 -->
<div class="demo-image__lazy"> <div class="demo-image__lazy">
<!-- 备注scrolling属性原来是'no'现在是'auto' --> <!-- 备注scrolling属性原来是'no'现在是'auto' -->
<!-- <el-image v-show="imgType &&imgType != 'pdf' " class="imgs" :src="picUrl" fit="cover"></el-image> --> <!-- <el-image v-show="imgType &&imgType != 'pdf' " class="imgs" :src="picUrl" fit="cover"></el-image> -->
<iframe <iframe ref="showIframeRef" v-if="
ref="showIframeRef" ![
v-if=" 'mp3',
![ 'mp4',
'mp3', 'tif',
'mp4', 'wav',
'tif', 'avi',
'wav', 'flv',
'avi', 'mxf',
'flv', 'ofd',
'mxf', ].includes(this.fileType)
'ofd', " style="text-align: center" noresize align="center" width="100%" height="750px" :src="picUrl"
].includes(this.fileType) frameborder="0" scrolling="auto"></iframe>
" <template v-if="rowTable.file_type === 'ofd' && isIframeFlag == true">
style="text-align: center" <iframe :key="ofdUrl" style="text-align: center" noresize align="center" width="100%" height="750px"
noresize :src="`./yhofd/yhofd.html?name=${rowTable.file_name_server}&url=${ofdUrl}`" frameborder="0"
align="center" scrolling="auto"></iframe>
width="100%"
height="750px"
:src="picUrl"
frameborder="0"
scrolling="auto"
></iframe>
<template
v-if="rowTable.file_type === 'ofd' && isIframeFlag == true"
>
<iframe
:key="ofdUrl"
style="text-align: center"
noresize
align="center"
width="100%"
height="750px"
:src="`./yhofd/yhofd.html?name=${rowTable.file_name_server}&url=${ofdUrl}`"
frameborder="0"
scrolling="auto"
></iframe>
</template> </template>
<div v-if="rowTable.file_type === 'svg'" v-html="picUrl"></div> <div v-if="rowTable.file_type === 'svg'" v-html="picUrl"></div>
<video <video v-if="
v-if=" (this.fileType === 'mp4' ||
(this.fileType === 'mp4' || this.fileType === 'avi' ||
this.fileType === 'avi' || this.fileType === 'mxf') &&
this.fileType === 'mxf') && videoSrc
videoSrc " ref="videoS" :src="videoSrc" controls="controls" height="600px" :muted="muteStatus" width="100%">
"
ref="videoS"
:src="videoSrc"
controls="controls"
height="600px"
:muted="muteStatus"
width="100%"
>
您的浏览器不支持视频播放 您的浏览器不支持视频播放
</video> </video>
<video <video v-if="this.fileType === 'flv'" id="videoElementByFlv" class="flvplayer-app" controls
v-if="this.fileType === 'flv'" :muted="muteStatus" height="600px" width="100%"></video>
id="videoElementByFlv" <audio v-if="
class="flvplayer-app" (this.fileType === 'mp3' || this.fileType === 'wav') &&
controls musicSrc
:muted="muteStatus" " ref="audioS" :src="musicSrc" controls autoloop></audio>
height="600px" <viewer v-if="this.fileType === 'tif'" id="printimg" :images="canvasList">
width="100%" <img v-for="item in canvasList" :src="item" :key="item" :class="tif_length > 1 ? '' : 'tif_img'"
></video> height="300" title="请点击查看" />
<audio
v-if="
(this.fileType === 'mp3' || this.fileType === 'wav') &&
musicSrc
"
ref="audioS"
:src="musicSrc"
controls
autoloop
></audio>
<viewer
v-if="this.fileType === 'tif'"
id="printimg"
:images="canvasList"
>
<img
v-for="item in canvasList"
:src="item"
:key="item"
:class="tif_length > 1 ? '' : 'tif_img'"
height="300"
title="请点击查看"
/>
<!-- <div style='padding: 0px 15px'>{{rowTable.file_name}}</div> --> <!-- <div style='padding: 0px 15px'>{{rowTable.file_name}}</div> -->
</viewer> </viewer>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane label="添加原文" name="2" v-loading.fullscreen.lock="loadingStatus"
label="添加原文" :element-loading-text="loadingText" element-loading-spinner="el-icon-loading"
name="2" element-loading-background="rgba(255, 255, 255, 0.1)" v-if="catalogueType">
v-loading.fullscreen.lock="loadingStatus"
:element-loading-text="loadingText"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(255, 255, 255, 0.1)"
v-if="catalogueType"
>
<!-- 添加原文 --> <!-- 添加原文 -->
<div class="uploadBox"> <div class="uploadBox">
<el-upload <el-upload accept="*" class="upload-demo" ref="upload" :file-list="fileList" action="#"
accept="*" :auto-upload="false" multiple :on-exceed="beforeAvatarUpload" :on-success="upSuccess"
class="upload-demo" :on-change="handleFileChange" :before-remove="handleFileRemove">
ref="upload" <el-button slot="trigger" size="small" type="primary">选择文件</el-button>
:file-list="fileList" <el-button style="margin-left: 10px" size="small" type="success" @click="submitUpload">开始上传
action="#"
:auto-upload="false"
multiple
:on-exceed="beforeAvatarUpload"
:on-success="upSuccess"
:on-change="handleFileChange"
:before-remove="handleFileRemove"
>
<el-button slot="trigger" size="small" type="primary"
>选择文件</el-button
>
<el-button
style="margin-left: 10px"
size="small"
type="success"
@click="submitUpload"
>开始上传
</el-button> </el-button>
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
上传文件支持jpg/png/pdf/tif/svg/flv/mp4/mp3/avi/wav 上传文件支持jpg/png/pdf/tif/svg/flv/mp4/mp3/avi/wav
@@ -377,122 +191,53 @@
</el-tab-pane> --> </el-tab-pane> -->
<el-tab-pane label="原文回收站" name="3" v-if="catalogueType"> <el-tab-pane label="原文回收站" name="3" v-if="catalogueType">
<!-- 原文回收站 --> <!-- 原文回收站 -->
<el-table <el-table :data="backData" style="width: 100%" max-height="350" ref="ytabs" border size="mini">
:data="backData" <el-table-column prop="file_name" label="文件名称" align="center">
style="width: 100%"
max-height="350"
ref="ytabs"
border
size="mini"
>
<el-table-column
prop="file_name"
label="文件名称"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="file_type" label="文件类型" width="150" align="center">
prop="file_type"
label="文件类型"
width="150"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="file_len" label="文件大小(KB)" align="center">
prop="file_len"
label="文件大小(KB)"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150" align="center"> <el-table-column label="操作" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="returnContRec(scope.row)" <el-button type="text" @click="returnContRec(scope.row)">恢复</el-button>
>恢复</el-button <el-button type="text" style="color: #ff0000" @click="delOriRecycle(scope.row)">删除</el-button>
>
<el-button
type="text"
style="color: #ff0000"
@click="delOriRecycle(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane label="元数据" name="4" v-if="treeRow.className != '电子档案'">
label="元数据" <el-form label-position="left" class="formDIa" :model="metadata" size="mini" style="padding: 10px 25px"
name="4" label-width="100px">
v-if="treeRow.className != '电子档案'" <el-form-item v-for="item in metadataList" :key="item.columnName" :label="item.columnChnName">
>
<el-form
label-position="left"
class="formDIa"
:model="metadata"
size="mini"
style="padding: 10px 25px"
label-width="100px"
>
<el-form-item
v-for="(item, index) in metadataList"
:key="item.columnName"
:label="item.columnChnName"
>
<span>{{ metadata[item.columnName] }}</span> <span>{{ metadata[item.columnName] }}</span>
</el-form-item> </el-form-item>
<template <template v-if="
v-if=" metadata.signature != '' &&
metadata.signature != '' && metadata.signature != null &&
metadata.signature != null && metadata.signature != undefined
metadata.signature != undefined ">
"
>
<el-form-item label="签名真实性:"> <el-form-item label="签名真实性:">
<el-tag <el-tag :type="metadata.certificateValidity ? 'success' : 'warning'
:type=" ">{{ metadata.certificateValidity ? "真" : "假" }}</el-tag>
metadata.certificateValidity ? 'success' : 'warning'
"
>{{ metadata.certificateValidity ? "真" : "假" }}</el-tag
>
</el-form-item> </el-form-item>
<el-form-item label="签名算法:"> <el-form-item label="签名算法:">
<span>{{ metadata.signature }}</span> <span>{{ metadata.signature }}</span>
</el-form-item> </el-form-item>
<el-form-item label="数据加密:"> <el-form-item label="数据加密:">
<el-button <el-button type="primary" plain size="mini"
type="primary" @click="copyCellContent(metadata.signatureData)">复制数据加密</el-button>
plain
size="mini"
@click="copyCellContent(metadata.signatureData)"
>复制数据加密</el-button
>
</el-form-item> </el-form-item>
</template> </template>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane label="OCR识别" name="5" v-if="treeRow.className != '电子档案'">
label="OCR识别"
name="5"
v-if="treeRow.className != '电子档案'"
>
<div> <div>
<el-input <el-input v-model="ocrText" type="textarea" :rows="12" readonly></el-input>
v-model="ocrText"
type="textarea"
:rows="12"
readonly
></el-input>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane label="原文查询" name="6" v-if="!catalogueType && treeRow.className != '电子档案'">
label="原文查询" <search-box :orirow="orirow" :drawer="drawer" :oriTable="oriTable" />
name="6"
v-if="!catalogueType && treeRow.className != '电子档案'"
>
<search-box
:orirow="orirow"
:drawer="drawer"
:oriTable="oriTable"
/>
<!-- {{oriTable}} --> <!-- {{oriTable}} -->
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@@ -540,7 +285,7 @@ export default {
}, },
treeRow: { treeRow: {
type: Object, type: Object,
default: () => {}, default: () => { },
}, },
actions: { actions: {
type: String, type: String,
@@ -556,7 +301,7 @@ export default {
}, },
curRow: { curRow: {
type: Object, type: Object,
default: () => {}, default: () => { },
}, },
archive_no: { archive_no: {
type: String, type: String,
@@ -716,7 +461,7 @@ export default {
} }
}, },
//规党章 //规党章
chapter() {}, chapter() { },
beforeAvatarUpload(files, fileList) { beforeAvatarUpload(files, fileList) {
const isJPG = file.type === "image/jpeg"; const isJPG = file.type === "image/jpeg";
if (!isJPG) { if (!isJPG) {
@@ -768,9 +513,9 @@ export default {
const prefix = const prefix =
process.env.NODE_ENV === "development" process.env.NODE_ENV === "development"
? "http://" + ? "http://" +
localStronge.getServiceip().ip + localStronge.getServiceip().ip +
":" + ":" +
localStronge.getServiceip().host localStronge.getServiceip().host
: "http://" + window.location.host; : "http://" + window.location.host;
if ( if (
(this.fileType === "mp3" || this.fileType === "wav") && (this.fileType === "mp3" || this.fileType === "wav") &&
@@ -817,9 +562,9 @@ export default {
const prefix = const prefix =
process.env.NODE_ENV === "development" process.env.NODE_ENV === "development"
? "http://" + ? "http://" +
localStronge.getServiceip().ip + localStronge.getServiceip().ip +
":" + ":" +
localStronge.getServiceip().host localStronge.getServiceip().host
: "http://" + window.location.host; : "http://" + window.location.host;
this.activeName = "1"; this.activeName = "1";
this.fileType = row.file_type.toLowerCase(); // 转换成小写; this.fileType = row.file_type.toLowerCase(); // 转换成小写;
@@ -950,27 +695,27 @@ export default {
this.picUrl = this.picUrl =
process.env.NODE_ENV === "development" process.env.NODE_ENV === "development"
? "http://" + ? "http://" +
localStronge.getServiceip().ip + localStronge.getServiceip().ip +
":" + ":" +
localStronge.getServiceip().host + localStronge.getServiceip().host +
"/point-strategy/v/archiveFile/showImg?fileName=" + "/point-strategy/v/archiveFile/showImg?fileName=" +
name + name +
"&path=" + "&path=" +
encodeURI(encodeURI(row.file_des)) + encodeURI(encodeURI(row.file_des)) +
"&data=" + "&data=" +
new Date() + new Date() +
"&userId=" + "&userId=" +
sessionStorage.getItem("userid") sessionStorage.getItem("userid")
: "http://" + : "http://" +
window.location.host + window.location.host +
"/point-strategy/v/archiveFile/showImg?fileName=" + "/point-strategy/v/archiveFile/showImg?fileName=" +
encodeURI(encodeURI(name)) + encodeURI(encodeURI(name)) +
"&path=" + "&path=" +
encodeURI(encodeURI(row.file_des)) + encodeURI(encodeURI(row.file_des)) +
"&data=" + "&data=" +
new Date() + new Date() +
"&userId=" + "&userId=" +
sessionStorage.getItem("userid"); sessionStorage.getItem("userid");
if (this.activeName != "4" && this.activeName != "5") { if (this.activeName != "4" && this.activeName != "5") {
this.activeName = "1"; this.activeName = "1";
} }
@@ -1138,9 +883,9 @@ export default {
const prefix = const prefix =
process.env.NODE_ENV === "development" process.env.NODE_ENV === "development"
? "http://" + ? "http://" +
localStronge.getServiceip().ip + localStronge.getServiceip().ip +
":" + ":" +
localStronge.getServiceip().host localStronge.getServiceip().host
: "http://" + window.location.host; : "http://" + window.location.host;
let str = let str =
prefix + prefix +
@@ -1353,7 +1098,7 @@ export default {
//console.log(this.oriRowObj); //console.log(this.oriRowObj);
//this.checkFileImgNum(); //this.checkFileImgNum();
}, },
beforeDestroy() {}, beforeDestroy() { },
created() { created() {
this.routerName = this.$route.name; this.routerName = this.$route.name;
}, },
@@ -1366,6 +1111,7 @@ export default {
letter-spacing: 2px; letter-spacing: 2px;
font-size: 17px; font-size: 17px;
} }
.tip-info { .tip-info {
position: absolute; position: absolute;
left: 110px; left: 110px;
@@ -1373,6 +1119,7 @@ export default {
font-size: 16px; font-size: 16px;
color: #ff4f46; color: #ff4f46;
} }
.btnClass { .btnClass {
padding: 5px; padding: 5px;
} }
@@ -1380,11 +1127,13 @@ export default {
.contentBox { .contentBox {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
iframe { iframe {
img { img {
width: 100%; width: 100%;
} }
} }
.box-card { .box-card {
.demo-image__lazy { .demo-image__lazy {
background: rgb(245, 245, 245); background: rgb(245, 245, 245);

View File

@@ -69,7 +69,7 @@ Vue.use(selectscroll);
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
const { const {
mockXHR mockXHR
} = require('../../mock') } = require('../mock')
mockXHR() mockXHR()
} }

View File

@@ -210,11 +210,13 @@
console.log('diaFlage', newVal, oldVal) console.log('diaFlage', newVal, oldVal)
if(newVal){ if(newVal){
console.log('add ruleForm', this.ruleForm) console.log('add ruleForm', this.ruleForm)
this.form.forEach(item=>{ // 只在新增模式下初始化空值,编辑模式下不覆盖已有数据
console.log('item',item) if(this.title === '新增'){
this.ruleForm[item.fieldName] = item.value this.form.forEach(item=>{
}) console.log('item',item)
this.ruleForm[item.fieldName] = item.value
})
}
} }
}, },
immediate: false immediate: false

View File

@@ -1716,18 +1716,24 @@ export default {
this.sumbitTableName = item.tableName; this.sumbitTableName = item.tableName;
this.selectId = item.selectTable[0].id; this.selectId = item.selectTable[0].id;
this.sumbitTablekey = key; this.sumbitTablekey = key;
// 清空ruleForm确保数据干净
this.ruleForm = {};
item.form.forEach((ele) => { item.form.forEach((ele) => {
for (let info in item.selectTable[0]) { for (let info in item.selectTable[0]) {
if (info === ele.fieldName) { if (info === ele.fieldName) {
this.$set(this.ruleForm, ele.fieldName, "");
if (ele.ctype === "datetimerange") { if (ele.ctype === "datetimerange") {
this.ruleForm[ele.fieldName] = []; // 处理日期范围类型
this.ruleForm[ele.fieldName][0] = this.$set(this.ruleForm, ele.fieldName, []);
item.selectTable[0][info].split("~")[0]; if (item.selectTable[0][info] && item.selectTable[0][info].includes("~")) {
this.ruleForm[ele.fieldName][1] = this.ruleForm[ele.fieldName][0] = item.selectTable[0][info].split("~")[0];
item.selectTable[0][info].split("~")[1]; this.ruleForm[ele.fieldName][1] = item.selectTable[0][info].split("~")[1];
}
} else if (ele.ctype === "datetime" && item.selectTable[0][info]) {
// 处理日期类型
this.$set(this.ruleForm, ele.fieldName, new Date(item.selectTable[0][info]));
} else { } else {
this.ruleForm[ele.fieldName] = item.selectTable[0][info]; // 处理普通字段
this.$set(this.ruleForm, ele.fieldName, item.selectTable[0][info]);
} }
} }
} }

View File

@@ -1,5 +1,5 @@
<template> <template>
<!-- 档案管理未入库档案著录 --> <!-- 档案管理未入库档案著录 -->
<div> <div>
<div class="box" v-if="pageType === 1"> <div class="box" v-if="pageType === 1">
<el-card class="tree-box" shadow="always" :body-style="{ padding: '5px' }" ref="cardTree"> <el-card class="tree-box" shadow="always" :body-style="{ padding: '5px' }" ref="cardTree">
@@ -17,33 +17,33 @@
<div> <div>
<el-scrollbar wrap-style="overflow-x:hidden;" style="height: calc(100vh - 160px)"> <el-scrollbar wrap-style="overflow-x:hidden;" style="height: calc(100vh - 160px)">
<el-tree key="1" v-show="!isDirSeqTree" highlight-current v-loading="treeLoading" :data="treeData" <el-tree key="1" v-show="!isDirSeqTree" highlight-current v-loading="treeLoading" :data="treeData"
:props="defaultProps" default-expand-all @node-click="handleNodeClick"> :props="defaultProps" default-expand-all @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node"> <span slot-scope="{ node, data }" class="custom-tree-node">
<!--可以根据情况以数据类型来显示不同的图标或图片--> <!--可以根据情况以数据类型来显示不同的图标或图片-->
<!--可以根据情况以数据类型来显示不同的图标或图片--> <!--可以根据情况以数据类型来显示不同的图标或图片-->
<svg-icon icon-class="wjj" style="margin-right: 5px; color: rgb(255, 207, 92)" <svg-icon icon-class="wjj" style="margin-right: 5px; color: rgb(255, 207, 92)"
v-if="data.childClass.length > 0" class="iconfont icon-folder-open-fill" /> v-if="data.childClass.length > 0" class="iconfont icon-folder-open-fill" />
<svg-icon icon-class="wj" style="margin-right: 5px; color: rgb(255, 207, 92)" v-else <svg-icon icon-class="wj" style="margin-right: 5px; color: rgb(255, 207, 92)" v-else
class="iconfont icon-wenjian" /> class="iconfont icon-wenjian" />
<!-- <i style="margin-right: 5px; color: rgb(255, 207, 92)" v-if="data.childClass.length > 0" <!-- <i style="margin-right: 5px; color: rgb(255, 207, 92)" v-if="data.childClass.length > 0"
class="iconfont icon-folder-open-fill" /> class="iconfont icon-folder-open-fill" />
<i style="margin-right: 5px; color: rgb(78, 140, 238)" v-else class="iconfont icon-wenjian" /> --> <i style="margin-right: 5px; color: rgb(78, 140, 238)" v-else class="iconfont icon-wenjian" /> -->
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
</span> </span>
</el-tree> </el-tree>
<el-tree key="2" v-show="isDirSeqTree" highlight-current :expand-on-click-node=false :data="dirTreeData" <el-tree key="2" v-show="isDirSeqTree" highlight-current :expand-on-click-node=false :data="dirTreeData"
v-loading="dirTreeLoading" :props="defaultDirProps" :load="loadDirNode" @node-click="handleDirNodeClick" v-loading="dirTreeLoading" :props="defaultDirProps" :load="loadDirNode" @node-click="handleDirNodeClick"
lazy> lazy>
<span slot-scope="{ node, data }" class="custom-tree-node"> <span slot-scope="{ node, data }" class="custom-tree-node">
<svg-icon icon-class="wjj" style="margin-right: 5px; color: rgb(255, 207, 92)" v-if="!data.isLeaf" <svg-icon icon-class="wjj" style="margin-right: 5px; color: rgb(255, 207, 92)" v-if="!data.isLeaf"
class="iconfont icon-folder-open-fill" /> class="iconfont icon-folder-open-fill" />
<svg-icon icon-class="wj" v-else style="margin-right: 5px; color: rgb(255, 207, 92)" <svg-icon icon-class="wj" v-else style="margin-right: 5px; color: rgb(255, 207, 92)"
class="iconfont icon-wenjian" /> class="iconfont icon-wenjian" />
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
</span> </span>
</el-tree> </el-tree>
</el-scrollbar> </el-scrollbar>
</div> </div>
</el-card> </el-card>
@@ -71,347 +71,355 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
getTree, getTree,
getDirTree, getDirTree,
findTreeChildren, findTreeChildren,
getTable getTable
} from "@/api/archives-management/fileManagement/notStoredArchives.js"; } from "@/api/archives-management/fileManagement/notStoredArchives.js";
import { import {
getButtonList getButtonList
} from "@/api/user" } from "@/api/user"
import { import {
getFondWithPageUser getFondWithPageUser
} from "@/api/system-management/allAdministration"; } from "@/api/system-management/allAdministration";
import { import {
getFindList getFindList
} from "@/api/system-management/templateSetting" } from "@/api/system-management/templateSetting"
import { import {
dragControllerDiv dragControllerDiv
} from "@/utils/common" } from "@/utils/common"
import rightTableBox from "./components/rightTableBox"; import rightTableBox from "./components/rightTableBox";
import qualityList from "./components/quality"; import qualityList from "./components/quality";
import qualityCheck from "./components/quality/check"; import qualityCheck from "./components/quality/check";
import qualityQuestion from "./components/quality/question"; import qualityQuestion from "./components/quality/question";
import { import {
mapState mapState
} from "vuex"; } from "vuex";
export default { export default {
data() { data() {
return { return {
treeType: "", treeType: "",
// 树形结构数据 // 树形结构数据
treeData: [], treeData: [],
defaultProps: { defaultProps: {
children: "childClass", children: "childClass",
label: "className" label: "className"
}, },
defaultDirProps: { defaultDirProps: {
children: "children", children: "children",
label: "title", label: "title",
isLeaf: 'isLeaf' isLeaf: 'isLeaf'
}, },
Alltable: [], Alltable: [],
status: false, status: false,
treeLoading: false, treeLoading: false,
treeRow: {}, treeRow: {},
isDirSeqTree: false, // 是否目录序列树 isDirSeqTree: false, // 是否目录序列树
dirTreeData: [], // 目录序列树 dirTreeData: [], // 目录序列树
dirTreeLoading: false, // 目录序列树loading dirTreeLoading: false, // 目录序列树loading
eleTable: {}, // 按钮对应的table eleTable: {}, // 按钮对应的table
eleKey: '', // 按钮对应的table key eleKey: '', // 按钮对应的table key
fondsList: [], fondsList: [],
showButtons: { showButtons: {
add: false, add: false,
edit: false, edit: false,
del: false, del: false,
setQuery: false, setQuery: false,
cataTree: false, cataTree: false,
export: false, export: false,
ware: false, ware: false,
quality: false, quality: false,
four: false, four: false,
ywBtn: false, ywBtn: false,
plxg: false, plxg: false,
}
};
},
computed: {
...mapState({
pageType: state => state.qualityCheck.pageType, // 页面切换类型
}),
},
components: {
rightTableBox,
qualityList,
qualityCheck,
qualityQuestion
},
watch: {
status: {
handler(val, oldVal) {
const cardTree = this.$refs.cardTree.$el.style;
const cardForm = this.$refs.cardForm.$el.style;
if (val) {
cardTree.width = "5%";
cardForm.width = "94%";
} else {
cardTree.width = "20%";
cardForm.width = "79%";
}
}
} }
}, };
mounted() { },
dragControllerDiv() computed: {
}, ...mapState({
created() { pageType: state => state.qualityCheck.pageType, // 页面切换类型
this.getFonds(); }),
// 获取初始化树形结构 },
this.initGetTree(); components: {
this.treeType = this.$getMenuId( rightTableBox,
sessionStorage.getItem("funcTypeCodeList"), qualityList,
this.$route.path qualityCheck,
); qualityQuestion
let btnData = { },
menuid: this.$getMenuId(sessionStorage.getItem("routerIdList"), this.$route.path), watch: {
roleid: sessionStorage.getItem("roleid") status: {
} handler(val, oldVal) {
this.getButtonListqx(btnData) const cardTree = this.$refs.cardTree.$el.style;
}, const cardForm = this.$refs.cardForm.$el.style;
beforeRouteLeave(to, from, next) { if (val) {
// 页面重置为未入库 cardTree.width = "5%";
this.$store.commit("qualityCheck/SET_PAGE_TYPE", 1) cardForm.width = "94%";
next()
},
methods: {
getButtonListqx(btnData) {
getButtonList(btnData).then(res => {
res.body.list.forEach(item => {
this.showButtons[item.key] = true
})
})
},
getFonds() {
getFondWithPageUser().then(res => {
this.fondsList = res.body.list;
});
},
// 获取初始化树形结构
async initGetTree() {
this.treeLoading = true;
let data = {
className: "档案"
};
getTree(data)
.then(res => {
this.treeLoading = false;
if (res.success) {
this.treeData = res.body.list;
} else {
this.$message.error(res.msg);
}
})
.catch(err => {
this.treeLoading = false;
});
},
// 点击树形结构
handleNodeClick(data) {
console.log('handle node click',data)
this.treeRow = data;
if (data.classType === "C") {
let params = {
classId: data.id
};
getTable(params)
.then(res => {
res.body.InterfaceSystem.forEach(item => {
let ruleForm = {};
let form = JSON.parse(item["interfaceShow"]);
let interfaceQuery = JSON.parse(item["interfaceQuery"]);
// 查询设置中增加全宗号
if(interfaceQuery.length==0){
interfaceQuery.push({ctype:"input",fieldName:"fonds_no",fieldNameZh:"全宗号",value:"",label:'全宗号'});
}else{
const index = interfaceQuery.findIndex(item=>item.fieldName === 'fonds_no');
if(index !== -1){
// 找到
const matchItem = interfaceQuery.splice(index, 1)[0];
interfaceQuery.unshift(matchItem);
}else{
// 没找到
interfaceQuery.unshift({ctype:"input",fieldName:"fonds_no",fieldNameZh:"全宗号",value:"",label:'全宗号'});
}
}
form.forEach(ele => {
if (ele.ctype === 'select') {
getFindList({
type: ele.note.type
}).then(res => {
ele.note.note = res.body.list
})
}
if (ele.label === '全宗号') {
ele.ctype = "select"
}
})
form.forEach(ele => {
this.$set(ruleForm, ele.fieldName, "");
if (ele.width === 8) {
ele.width = "33%";
}
if (ele.width === 12) {
ele.width = "50%";
}
if (ele.width === 24) {
ele.width = "100%";
}
});
interfaceQuery.forEach(ele => {
if (ele.ctype === 'select') {
getFindList({
type: ele.note.type
}).then(res => {
ele.note.note = res.body.list
})
}
})
this.$set(item, "search", interfaceQuery); //搜索
this.$set(item, "form", form); //添加
this.$set(item, "ruleForm", ruleForm); //表单
this.$set(item, "tableData", JSON.parse(item["tableShow"])); //表格
this.$set(item, "isShow", false);
this.$set(item, "selectTable", []);
this.$set(item, "tableLoading", false);
this.$set(item, "pagination", {
pageSize: 50,
pageNum: 1,
total: 0
});
this.$set(item, "tableData", []);
});
this.Alltable = res.body.InterfaceSystem;
})
.then(res => {
this.$nextTick(() => {
this.$refs.table.clickSearch(0, 1, 1);
})
});
}
},
triggerTree(key) {
this.eleKey = key;
this.eleTable = this.Alltable.filter((item, index) => key === index)[0]
this.isDirSeqTree = !this.isDirSeqTree; // 目录序列树
if (this.isDirSeqTree) {
this.getDirTree();
this.$refs.table.getQuerySet(this.eleTable)
} else { } else {
this.$nextTick(() => { cardTree.width = "20%";
this.$refs.table.clickSearch(0, 1, 1); cardForm.width = "79%";
})
} }
},
// 目录序列树
async getDirTree(ele) {
this.dirTreeLoading = true;
const params = {
entityId: this.eleTable.entityId,
tableName: this.eleTable.tableName,
userId: parseInt(sessionStorage.getItem("userid")),
mode: 1, // 未入库
type: 1
};
getDirTree(params)
.then(res => {
this.dirTreeLoading = false;
if (res.success) {
this.dirTreeData = res.body.list;
} else {
this.$message.error(res.msg);
}
})
.catch(err => {
this.dirTreeLoading = false;
});
},
loadDirNode(node, resolve) {
if (node.level === 0) {
return resolve(this.dirTreeData);
}
if (node.level === 1) {
return resolve(this.dirTreeData[0].children);
}
let data = [];
const params = {
entityId: this.eleTable.entityId,
tableName: this.eleTable.tableName,
userId: parseInt(sessionStorage.getItem("userid")),
mode: 1, // 未入库
type: 1,
key: node.data.key,
level: node.data.level
};
findTreeChildren(params).then(res => {
data = res.body.list;
setTimeout(() => {
resolve(data);
}, 500);
});
},
handleDirNodeClick(data) {
/* const params = {
entityId: this.eleTable.entityId,
tableName: this.eleTable.tableName,
userId: parseInt(sessionStorage.getItem("userid")),
mode: 1, // 未入库
type: 1,
keys: data.key,
page: 1,
limit: 10
}
// 根据目录序列树查询右侧表格
this.$refs.table.clickDirSearch(params, this.eleKey); */
this.$refs.table.dirNodeClick(data.key, this.eleKey)
},
btns() {
this.status = !this.status;
} }
} }
}; },
mounted() {
dragControllerDiv()
},
created() {
this.getFonds();
// 获取初始化树形结构
this.initGetTree();
this.treeType = this.$getMenuId(
sessionStorage.getItem("funcTypeCodeList"),
this.$route.path
);
let btnData = {
menuid: this.$getMenuId(sessionStorage.getItem("routerIdList"), this.$route.path),
roleid: sessionStorage.getItem("roleid")
}
this.getButtonListqx(btnData)
},
beforeRouteLeave(to, from, next) {
// 页面重置为未入库
this.$store.commit("qualityCheck/SET_PAGE_TYPE", 1)
next()
},
methods: {
getButtonListqx(btnData) {
getButtonList(btnData).then(res => {
res.body.list.forEach(item => {
this.showButtons[item.key] = true
})
})
},
getFonds() {
getFondWithPageUser().then(res => {
this.fondsList = res.body.list;
});
},
// 获取初始化树形结构
async initGetTree() {
this.treeLoading = true;
let data = {
className: "档案"
};
getTree(data)
.then(res => {
this.treeLoading = false;
if (res.success) {
this.treeData = res.body.list;
} else {
this.$message.error(res.msg);
}
})
.catch(err => {
this.treeLoading = false;
});
},
// 点击树形结构
async handleNodeClick(data) {
console.log('handle node click', data)
this.treeRow = data;
if (data.classType === "C") {
let params = {
classId: data.id
};
const res = await getTable(params);
const promises = [];
res.body.InterfaceSystem.forEach(item => {
let ruleForm = {};
let form = JSON.parse(item["interfaceShow"]);
let interfaceQuery = JSON.parse(item["interfaceQuery"]);
// 查询设置中增加全宗号
if (interfaceQuery.length == 0) {
interfaceQuery.push({
ctype: "input",
fieldName: "fonds_no",
fieldNameZh: "全宗号",
value: "",
label: '全宗号'
});
} else {
const index = interfaceQuery.findIndex(item => item.fieldName === 'fonds_no');
if (index !== -1) {
// 找到
const matchItem = interfaceQuery.splice(index, 1)[0];
interfaceQuery.unshift(matchItem);
} else {
// 没找到
interfaceQuery.unshift({
ctype: "input",
fieldName: "fonds_no",
fieldNameZh: "全宗号",
value: "",
label: '全宗号'
});
}
}
form.forEach(ele => {
if (ele.ctype === 'select') {
promises.push(getFindList({
type: ele.note.type
}).then(res => {
ele.note.note = res.body.list
}))
}
if (ele.label === '全宗号') {
ele.ctype = "select"
}
})
form.forEach(ele => {
this.$set(ruleForm, ele.fieldName, "");
if (ele.width === 8) {
ele.width = "33%";
}
if (ele.width === 12) {
ele.width = "50%";
}
if (ele.width === 24) {
ele.width = "100%";
}
});
interfaceQuery.forEach(ele => {
if (ele.ctype === 'select') {
promises.push(getFindList({
type: ele.note.type
}).then(res => {
ele.note.note = res.body.list
}))
}
})
this.$set(item, "search", interfaceQuery); //搜索
this.$set(item, "form", form); //添加
this.$set(item, "ruleForm", ruleForm); //表单
this.$set(item, "tableData", JSON.parse(item["tableShow"])); //表格
this.$set(item, "isShow", false);
this.$set(item, "selectTable", []);
this.$set(item, "tableLoading", false);
this.$set(item, "pagination", {
pageSize: 50,
pageNum: 1,
total: 0
});
this.$set(item, "tableData", []);
});
await Promise.all(promises);
this.Alltable = res.body.InterfaceSystem;
this.$nextTick(() => {
this.$refs.table.clickSearch(0, 1, 1);
})
}
},
triggerTree(key) {
this.eleKey = key;
this.eleTable = this.Alltable.filter((item, index) => key === index)[0]
this.isDirSeqTree = !this.isDirSeqTree; // 目录序列树
if (this.isDirSeqTree) {
this.getDirTree();
this.$refs.table.getQuerySet(this.eleTable)
} else {
this.$nextTick(() => {
this.$refs.table.clickSearch(0, 1, 1);
})
}
},
// 目录序列树
async getDirTree(ele) {
this.dirTreeLoading = true;
const params = {
entityId: this.eleTable.entityId,
tableName: this.eleTable.tableName,
userId: parseInt(sessionStorage.getItem("userid")),
mode: 1, // 未入库
type: 1
};
getDirTree(params)
.then(res => {
this.dirTreeLoading = false;
if (res.success) {
this.dirTreeData = res.body.list;
} else {
this.$message.error(res.msg);
}
})
.catch(err => {
this.dirTreeLoading = false;
});
},
loadDirNode(node, resolve) {
if (node.level === 0) {
return resolve(this.dirTreeData);
}
if (node.level === 1) {
return resolve(this.dirTreeData[0].children);
}
let data = [];
const params = {
entityId: this.eleTable.entityId,
tableName: this.eleTable.tableName,
userId: parseInt(sessionStorage.getItem("userid")),
mode: 1, // 未入库
type: 1,
key: node.data.key,
level: node.data.level
};
findTreeChildren(params).then(res => {
data = res.body.list;
setTimeout(() => {
resolve(data);
}, 500);
});
},
handleDirNodeClick(data) {
/* const params = {
entityId: this.eleTable.entityId,
tableName: this.eleTable.tableName,
userId: parseInt(sessionStorage.getItem("userid")),
mode: 1, // 未入库
type: 1,
keys: data.key,
page: 1,
limit: 10
}
// 根据目录序列树查询右侧表格
this.$refs.table.clickDirSearch(params, this.eleKey); */
this.$refs.table.dirNodeClick(data.key, this.eleKey)
},
btns() {
this.status = !this.status;
}
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box { .box {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
height: 100%; height: 100%;
.tree-box { .tree-box {
width: 20%; width: 20%;
// min-height: 720px; // min-height: 720px;
// overflow-y: auto; // overflow-y: auto;
.el-tree { .el-tree {
width: 100%; width: 100%;
margin-top: 10px; margin-top: 10px;
}
.clearfix {
font-weight: 600;
font-size: 17px;
letter-spacing: 3px;
}
} }
.form-box { .clearfix {
width: 79%; font-weight: 600;
height: calc(100vh - 90px); font-size: 17px;
overflow-y: auto; letter-spacing: 3px;
} }
} }
.form-box {
width: 79%;
height: calc(100vh - 90px);
overflow-y: auto;
}
}
</style> </style>