test
This commit is contained in:
@@ -1,336 +1,150 @@
|
||||
<template>
|
||||
<!-- 档案管理——未入库档案著录、已入库数据浏览、OA数据管理、已入库收藏夹,点击原文数量弹框 -->
|
||||
<div>
|
||||
<el-drawer
|
||||
title="原文详情"
|
||||
:visible.sync="drawer"
|
||||
:append-to-body="true"
|
||||
direction="ltr"
|
||||
:before-close="handleClose"
|
||||
size="100%"
|
||||
:wrapperClosable="false"
|
||||
>
|
||||
<div
|
||||
class="tip-info"
|
||||
v-if="
|
||||
routerName === 'dataBrowsing' || routerName === 'notStoredArchives'
|
||||
"
|
||||
>
|
||||
<el-drawer title="原文详情" :visible.sync="drawer" :append-to-body="true" direction="ltr" :before-close="handleClose"
|
||||
size="100%" :wrapperClosable="false">
|
||||
<div class="tip-info" v-if="
|
||||
routerName === 'dataBrowsing' || routerName === 'notStoredArchives'
|
||||
">
|
||||
{{ checkText }}
|
||||
</div>
|
||||
<div class="btnClass">
|
||||
<el-card :body-style="{ padding: '10px' }">
|
||||
<!-- {{drawer}}{{oriTable}} -->
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="catalogueType"
|
||||
type="danger"
|
||||
@click="deletec"
|
||||
>
|
||||
<el-button size="mini" v-if="catalogueType" type="danger" @click="deletec">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="catalogueType && treeRow.className != '电子档案'"
|
||||
type="primary"
|
||||
@click="btnClick(1)"
|
||||
>
|
||||
<el-button size="mini" v-if="catalogueType && treeRow.className != '电子档案'" type="primary"
|
||||
@click="btnClick(1)">
|
||||
批量下载
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="catalogueType && treeRow.className != '电子档案'"
|
||||
type="primary"
|
||||
@click="btnClick(2)"
|
||||
>
|
||||
<el-button size="mini" v-if="catalogueType && treeRow.className != '电子档案'" type="primary"
|
||||
@click="btnClick(2)">
|
||||
归档章
|
||||
</el-button>
|
||||
<!-- <el-button size="mini" v-if="catalogueType && treeRow.className!='录像' && treeRow.className!='录音'"
|
||||
type="primary" @click="btnClick(3)">
|
||||
合并文件 </el-button> -->
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="treeRow.className != '电子档案'"
|
||||
type="primary"
|
||||
@click="btnClick(4)"
|
||||
>
|
||||
<el-button size="mini" v-if="treeRow.className != '电子档案'" type="primary" @click="btnClick(4)">
|
||||
合并下载
|
||||
</el-button>
|
||||
<!-- <el-button size="mini"
|
||||
v-if="catalogueType && treeRow.className!='录像' && treeRow.className!='录音' && routerName==='notStoredArchives'"
|
||||
type="primary" @click="btnClick(5)">
|
||||
扫描原文 </el-button> -->
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="
|
||||
catalogueType &&
|
||||
treeRow.className != '电子档案' &&
|
||||
routerName === 'notStoredArchives'
|
||||
"
|
||||
type="primary"
|
||||
@click="btnClick(6)"
|
||||
>
|
||||
<el-button size="mini" v-if="
|
||||
catalogueType &&
|
||||
treeRow.className != '电子档案' &&
|
||||
routerName === 'notStoredArchives'
|
||||
" type="primary" @click="btnClick(6)">
|
||||
撤销归档章
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="treeRow.className != '电子档案'"
|
||||
type="primary"
|
||||
@click="btnClick(9)"
|
||||
>
|
||||
<el-button size="mini" v-if="treeRow.className != '电子档案'" type="primary" @click="btnClick(9)">
|
||||
电子签名
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="routerName === 'dataBrowsing'"
|
||||
@click="btnClick(7)"
|
||||
>电子档案复制申请
|
||||
<el-button size="mini" type="primary" v-if="routerName === 'dataBrowsing'" @click="btnClick(7)">电子档案复制申请
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="routerName === 'dataBrowsing'"
|
||||
@click="btnClick(8)"
|
||||
>实体档案复制申请
|
||||
<el-button size="mini" type="primary" v-if="routerName === 'dataBrowsing'" @click="btnClick(8)">实体档案复制申请
|
||||
</el-button>
|
||||
</el-card>
|
||||
</div>
|
||||
<div class="contentBox">
|
||||
<el-card :body-style="{ padding: '10px' }" style="width: 26%">
|
||||
<el-button
|
||||
v-if="oriRowObj.useStyle === 'print' || typeStatus === 'ruku'"
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="!multipleSelection.length"
|
||||
@click="download"
|
||||
>
|
||||
<el-button v-if="oriRowObj.useStyle === 'print' || typeStatus === 'ruku'" type="primary" size="small"
|
||||
:disabled="!multipleSelection.length" @click="download">
|
||||
原文下载
|
||||
</el-button>
|
||||
<!-- @row-click="previewImg" -->
|
||||
<el-table
|
||||
ref="tableForEach"
|
||||
highlight-current-row
|
||||
border
|
||||
size="mini"
|
||||
:data="tableDataOrigin"
|
||||
@row-click="previewImg"
|
||||
tooltip-effect="dark"
|
||||
max-height="800px"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table ref="tableForEach" highlight-current-row border size="mini" :data="tableDataOrigin"
|
||||
@row-click="previewImg" tooltip-effect="dark" max-height="800px" @selection-change="handleSelectionChange">
|
||||
<!-- 原文下载的多选框 -->
|
||||
<el-table-column
|
||||
v-if="
|
||||
catalogueType ||
|
||||
(!catalogueType && oriRowObj.useStyle === 'print') ||
|
||||
typeStatus === 'ruku'
|
||||
"
|
||||
type="selection"
|
||||
width="43"
|
||||
>
|
||||
<el-table-column v-if="
|
||||
catalogueType ||
|
||||
(!catalogueType && oriRowObj.useStyle === 'print') ||
|
||||
typeStatus === 'ruku'
|
||||
" type="selection" width="43">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="55"
|
||||
label="序号"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column type="index" width="55" label="序号" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="file_name"
|
||||
label="文件名称"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="file_name" label="文件名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.isEditFlag">
|
||||
<el-input
|
||||
type="text"
|
||||
@change.native.stop="originClick('blur', scope.row)"
|
||||
size="mini"
|
||||
:title="scope.row.file_name"
|
||||
v-model="scope.row.file_name"
|
||||
clearable
|
||||
/>
|
||||
<el-input type="text" @change.native.stop="originClick('blur', scope.row)" size="mini"
|
||||
:title="scope.row.file_name" v-model="scope.row.file_name" clearable />
|
||||
</template>
|
||||
<template v-else>{{ scope.row.file_name }}</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="100"
|
||||
v-if="$route.name === 'notStoredArchives'"
|
||||
>
|
||||
<el-table-column label="操作" align="center" width="100" v-if="$route.name === 'notStoredArchives'">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click.native.stop="originClick('down', scope.row)"
|
||||
type="text"
|
||||
icon="el-icon-bottom"
|
||||
title="向下"
|
||||
size="mini"
|
||||
></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>
|
||||
<el-button @click.native.stop="originClick('down', scope.row)" type="text" icon="el-icon-bottom"
|
||||
title="向下" size="mini"></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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card
|
||||
:body-style="{ padding: '10px' }"
|
||||
style="width: 73%"
|
||||
class="box-card"
|
||||
>
|
||||
<el-card :body-style="{ padding: '10px' }" style="width: 73%" class="box-card">
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane
|
||||
label="查看原文"
|
||||
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)"
|
||||
>
|
||||
<el-tab-pane label="查看原文" 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">
|
||||
<!-- 备注scrolling属性原来是'no'现在是'auto' -->
|
||||
<!-- <el-image v-show="imgType &&imgType != 'pdf' " class="imgs" :src="picUrl" fit="cover"></el-image> -->
|
||||
<iframe
|
||||
ref="showIframeRef"
|
||||
v-if="
|
||||
![
|
||||
'mp3',
|
||||
'mp4',
|
||||
'tif',
|
||||
'wav',
|
||||
'avi',
|
||||
'flv',
|
||||
'mxf',
|
||||
'ofd',
|
||||
].includes(this.fileType)
|
||||
"
|
||||
style="text-align: center"
|
||||
noresize
|
||||
align="center"
|
||||
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>
|
||||
<iframe ref="showIframeRef" v-if="
|
||||
![
|
||||
'mp3',
|
||||
'mp4',
|
||||
'tif',
|
||||
'wav',
|
||||
'avi',
|
||||
'flv',
|
||||
'mxf',
|
||||
'ofd',
|
||||
].includes(this.fileType)
|
||||
" style="text-align: center" noresize align="center" 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>
|
||||
<div v-if="rowTable.file_type === 'svg'" v-html="picUrl"></div>
|
||||
<video
|
||||
v-if="
|
||||
(this.fileType === 'mp4' ||
|
||||
this.fileType === 'avi' ||
|
||||
this.fileType === 'mxf') &&
|
||||
videoSrc
|
||||
"
|
||||
ref="videoS"
|
||||
:src="videoSrc"
|
||||
controls="controls"
|
||||
height="600px"
|
||||
:muted="muteStatus"
|
||||
width="100%"
|
||||
>
|
||||
<video v-if="
|
||||
(this.fileType === 'mp4' ||
|
||||
this.fileType === 'avi' ||
|
||||
this.fileType === 'mxf') &&
|
||||
videoSrc
|
||||
" ref="videoS" :src="videoSrc" controls="controls" height="600px" :muted="muteStatus" width="100%">
|
||||
您的浏览器不支持视频播放
|
||||
</video>
|
||||
<video
|
||||
v-if="this.fileType === 'flv'"
|
||||
id="videoElementByFlv"
|
||||
class="flvplayer-app"
|
||||
controls
|
||||
:muted="muteStatus"
|
||||
height="600px"
|
||||
width="100%"
|
||||
></video>
|
||||
<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="请点击查看"
|
||||
/>
|
||||
<video v-if="this.fileType === 'flv'" id="videoElementByFlv" class="flvplayer-app" controls
|
||||
:muted="muteStatus" height="600px" width="100%"></video>
|
||||
<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> -->
|
||||
</viewer>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="添加原文"
|
||||
name="2"
|
||||
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"
|
||||
>
|
||||
<el-tab-pane label="添加原文" name="2" 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">
|
||||
<el-upload
|
||||
accept="*"
|
||||
class="upload-demo"
|
||||
ref="upload"
|
||||
:file-list="fileList"
|
||||
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-upload accept="*" class="upload-demo" ref="upload" :file-list="fileList" 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>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
上传文件支持jpg/png/pdf/tif/svg/flv/mp4/mp3/avi/wav
|
||||
@@ -377,122 +191,53 @@
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="原文回收站" name="3" v-if="catalogueType">
|
||||
<!-- 原文回收站 -->
|
||||
<el-table
|
||||
:data="backData"
|
||||
style="width: 100%"
|
||||
max-height="350"
|
||||
ref="ytabs"
|
||||
border
|
||||
size="mini"
|
||||
>
|
||||
<el-table-column
|
||||
prop="file_name"
|
||||
label="文件名称"
|
||||
align="center"
|
||||
>
|
||||
<el-table :data="backData" 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
|
||||
prop="file_type"
|
||||
label="文件类型"
|
||||
width="150"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column prop="file_type" label="文件类型" width="150" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="file_len"
|
||||
label="文件大小(KB)"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column prop="file_len" label="文件大小(KB)" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="returnContRec(scope.row)"
|
||||
>恢复</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: #ff0000"
|
||||
@click="delOriRecycle(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button type="text" @click="returnContRec(scope.row)">恢复</el-button>
|
||||
<el-button type="text" style="color: #ff0000" @click="delOriRecycle(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="元数据"
|
||||
name="4"
|
||||
v-if="treeRow.className != '电子档案'"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<el-tab-pane label="元数据" name="4" v-if="treeRow.className != '电子档案'">
|
||||
<el-form label-position="left" class="formDIa" :model="metadata" size="mini" style="padding: 10px 25px"
|
||||
label-width="100px">
|
||||
<el-form-item v-for="item in metadataList" :key="item.columnName" :label="item.columnChnName">
|
||||
<span>{{ metadata[item.columnName] }}</span>
|
||||
</el-form-item>
|
||||
<template
|
||||
v-if="
|
||||
metadata.signature != '' &&
|
||||
metadata.signature != null &&
|
||||
metadata.signature != undefined
|
||||
"
|
||||
>
|
||||
<template v-if="
|
||||
metadata.signature != '' &&
|
||||
metadata.signature != null &&
|
||||
metadata.signature != undefined
|
||||
">
|
||||
<el-form-item label="签名真实性:">
|
||||
<el-tag
|
||||
:type="
|
||||
metadata.certificateValidity ? 'success' : 'warning'
|
||||
"
|
||||
>{{ metadata.certificateValidity ? "真" : "假" }}</el-tag
|
||||
>
|
||||
<el-tag :type="metadata.certificateValidity ? 'success' : 'warning'
|
||||
">{{ metadata.certificateValidity ? "真" : "假" }}</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item label="签名算法:">
|
||||
<span>{{ metadata.signature }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据加密:">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="copyCellContent(metadata.signatureData)"
|
||||
>复制数据加密</el-button
|
||||
>
|
||||
<el-button type="primary" plain size="mini"
|
||||
@click="copyCellContent(metadata.signatureData)">复制数据加密</el-button>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="OCR识别"
|
||||
name="5"
|
||||
v-if="treeRow.className != '电子档案'"
|
||||
>
|
||||
<el-tab-pane label="OCR识别" name="5" v-if="treeRow.className != '电子档案'">
|
||||
<div>
|
||||
<el-input
|
||||
v-model="ocrText"
|
||||
type="textarea"
|
||||
:rows="12"
|
||||
readonly
|
||||
></el-input>
|
||||
<el-input v-model="ocrText" type="textarea" :rows="12" readonly></el-input>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="原文查询"
|
||||
name="6"
|
||||
v-if="!catalogueType && treeRow.className != '电子档案'"
|
||||
>
|
||||
<search-box
|
||||
:orirow="orirow"
|
||||
:drawer="drawer"
|
||||
:oriTable="oriTable"
|
||||
/>
|
||||
<el-tab-pane label="原文查询" name="6" v-if="!catalogueType && treeRow.className != '电子档案'">
|
||||
<search-box :orirow="orirow" :drawer="drawer" :oriTable="oriTable" />
|
||||
<!-- {{oriTable}} -->
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -540,7 +285,7 @@ export default {
|
||||
},
|
||||
treeRow: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => { },
|
||||
},
|
||||
actions: {
|
||||
type: String,
|
||||
@@ -556,7 +301,7 @@ export default {
|
||||
},
|
||||
curRow: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => { },
|
||||
},
|
||||
archive_no: {
|
||||
type: String,
|
||||
@@ -716,7 +461,7 @@ export default {
|
||||
}
|
||||
},
|
||||
//规党章
|
||||
chapter() {},
|
||||
chapter() { },
|
||||
beforeAvatarUpload(files, fileList) {
|
||||
const isJPG = file.type === "image/jpeg";
|
||||
if (!isJPG) {
|
||||
@@ -768,9 +513,9 @@ export default {
|
||||
const prefix =
|
||||
process.env.NODE_ENV === "development"
|
||||
? "http://" +
|
||||
localStronge.getServiceip().ip +
|
||||
":" +
|
||||
localStronge.getServiceip().host
|
||||
localStronge.getServiceip().ip +
|
||||
":" +
|
||||
localStronge.getServiceip().host
|
||||
: "http://" + window.location.host;
|
||||
if (
|
||||
(this.fileType === "mp3" || this.fileType === "wav") &&
|
||||
@@ -817,9 +562,9 @@ export default {
|
||||
const prefix =
|
||||
process.env.NODE_ENV === "development"
|
||||
? "http://" +
|
||||
localStronge.getServiceip().ip +
|
||||
":" +
|
||||
localStronge.getServiceip().host
|
||||
localStronge.getServiceip().ip +
|
||||
":" +
|
||||
localStronge.getServiceip().host
|
||||
: "http://" + window.location.host;
|
||||
this.activeName = "1";
|
||||
this.fileType = row.file_type.toLowerCase(); // 转换成小写;
|
||||
@@ -950,27 +695,27 @@ export default {
|
||||
this.picUrl =
|
||||
process.env.NODE_ENV === "development"
|
||||
? "http://" +
|
||||
localStronge.getServiceip().ip +
|
||||
":" +
|
||||
localStronge.getServiceip().host +
|
||||
"/point-strategy/v/archiveFile/showImg?fileName=" +
|
||||
name +
|
||||
"&path=" +
|
||||
encodeURI(encodeURI(row.file_des)) +
|
||||
"&data=" +
|
||||
new Date() +
|
||||
"&userId=" +
|
||||
sessionStorage.getItem("userid")
|
||||
localStronge.getServiceip().ip +
|
||||
":" +
|
||||
localStronge.getServiceip().host +
|
||||
"/point-strategy/v/archiveFile/showImg?fileName=" +
|
||||
name +
|
||||
"&path=" +
|
||||
encodeURI(encodeURI(row.file_des)) +
|
||||
"&data=" +
|
||||
new Date() +
|
||||
"&userId=" +
|
||||
sessionStorage.getItem("userid")
|
||||
: "http://" +
|
||||
window.location.host +
|
||||
"/point-strategy/v/archiveFile/showImg?fileName=" +
|
||||
encodeURI(encodeURI(name)) +
|
||||
"&path=" +
|
||||
encodeURI(encodeURI(row.file_des)) +
|
||||
"&data=" +
|
||||
new Date() +
|
||||
"&userId=" +
|
||||
sessionStorage.getItem("userid");
|
||||
window.location.host +
|
||||
"/point-strategy/v/archiveFile/showImg?fileName=" +
|
||||
encodeURI(encodeURI(name)) +
|
||||
"&path=" +
|
||||
encodeURI(encodeURI(row.file_des)) +
|
||||
"&data=" +
|
||||
new Date() +
|
||||
"&userId=" +
|
||||
sessionStorage.getItem("userid");
|
||||
if (this.activeName != "4" && this.activeName != "5") {
|
||||
this.activeName = "1";
|
||||
}
|
||||
@@ -1138,9 +883,9 @@ export default {
|
||||
const prefix =
|
||||
process.env.NODE_ENV === "development"
|
||||
? "http://" +
|
||||
localStronge.getServiceip().ip +
|
||||
":" +
|
||||
localStronge.getServiceip().host
|
||||
localStronge.getServiceip().ip +
|
||||
":" +
|
||||
localStronge.getServiceip().host
|
||||
: "http://" + window.location.host;
|
||||
let str =
|
||||
prefix +
|
||||
@@ -1353,7 +1098,7 @@ export default {
|
||||
//console.log(this.oriRowObj);
|
||||
//this.checkFileImgNum();
|
||||
},
|
||||
beforeDestroy() {},
|
||||
beforeDestroy() { },
|
||||
created() {
|
||||
this.routerName = this.$route.name;
|
||||
},
|
||||
@@ -1366,6 +1111,7 @@ export default {
|
||||
letter-spacing: 2px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.tip-info {
|
||||
position: absolute;
|
||||
left: 110px;
|
||||
@@ -1373,6 +1119,7 @@ export default {
|
||||
font-size: 16px;
|
||||
color: #ff4f46;
|
||||
}
|
||||
|
||||
.btnClass {
|
||||
padding: 5px;
|
||||
}
|
||||
@@ -1380,11 +1127,13 @@ export default {
|
||||
.contentBox {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
iframe {
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.box-card {
|
||||
.demo-image__lazy {
|
||||
background: rgb(245, 245, 245);
|
||||
|
||||
@@ -69,7 +69,7 @@ Vue.use(selectscroll);
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
const {
|
||||
mockXHR
|
||||
} = require('../../mock')
|
||||
} = require('../mock')
|
||||
mockXHR()
|
||||
}
|
||||
|
||||
|
||||
@@ -210,11 +210,13 @@
|
||||
console.log('diaFlage', newVal, oldVal)
|
||||
if(newVal){
|
||||
console.log('add ruleForm', this.ruleForm)
|
||||
this.form.forEach(item=>{
|
||||
console.log('item',item)
|
||||
this.ruleForm[item.fieldName] = item.value
|
||||
})
|
||||
|
||||
// 只在新增模式下初始化空值,编辑模式下不覆盖已有数据
|
||||
if(this.title === '新增'){
|
||||
this.form.forEach(item=>{
|
||||
console.log('item',item)
|
||||
this.ruleForm[item.fieldName] = item.value
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: false
|
||||
|
||||
@@ -1716,18 +1716,24 @@ export default {
|
||||
this.sumbitTableName = item.tableName;
|
||||
this.selectId = item.selectTable[0].id;
|
||||
this.sumbitTablekey = key;
|
||||
// 清空ruleForm,确保数据干净
|
||||
this.ruleForm = {};
|
||||
item.form.forEach((ele) => {
|
||||
for (let info in item.selectTable[0]) {
|
||||
if (info === ele.fieldName) {
|
||||
this.$set(this.ruleForm, ele.fieldName, "");
|
||||
if (ele.ctype === "datetimerange") {
|
||||
this.ruleForm[ele.fieldName] = [];
|
||||
this.ruleForm[ele.fieldName][0] =
|
||||
item.selectTable[0][info].split("~")[0];
|
||||
this.ruleForm[ele.fieldName][1] =
|
||||
item.selectTable[0][info].split("~")[1];
|
||||
// 处理日期范围类型
|
||||
this.$set(this.ruleForm, ele.fieldName, []);
|
||||
if (item.selectTable[0][info] && item.selectTable[0][info].includes("~")) {
|
||||
this.ruleForm[ele.fieldName][0] = item.selectTable[0][info].split("~")[0];
|
||||
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 {
|
||||
this.ruleForm[ele.fieldName] = item.selectTable[0][info];
|
||||
// 处理普通字段
|
||||
this.$set(this.ruleForm, ele.fieldName, item.selectTable[0][info]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<!-- 档案管理——未入库档案著录 -->
|
||||
<!-- 档案管理——未入库档案著录 -->
|
||||
<div>
|
||||
<div class="box" v-if="pageType === 1">
|
||||
<el-card class="tree-box" shadow="always" :body-style="{ padding: '5px' }" ref="cardTree">
|
||||
@@ -17,33 +17,33 @@
|
||||
|
||||
<div>
|
||||
<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"
|
||||
:props="defaultProps" default-expand-all @node-click="handleNodeClick">
|
||||
<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.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
|
||||
class="iconfont icon-wenjian" />
|
||||
<el-tree key="1" v-show="!isDirSeqTree" highlight-current v-loading="treeLoading" :data="treeData"
|
||||
:props="defaultProps" default-expand-all @node-click="handleNodeClick">
|
||||
<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.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
|
||||
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" />
|
||||
<i style="margin-right: 5px; color: rgb(78, 140, 238)" v-else class="iconfont icon-wenjian" /> -->
|
||||
<span>{{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
<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"
|
||||
lazy>
|
||||
<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"
|
||||
class="iconfont icon-folder-open-fill" />
|
||||
<svg-icon icon-class="wj" v-else style="margin-right: 5px; color: rgb(255, 207, 92)"
|
||||
class="iconfont icon-wenjian" />
|
||||
<span>{{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
<span>{{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
<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"
|
||||
lazy>
|
||||
<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"
|
||||
class="iconfont icon-folder-open-fill" />
|
||||
<svg-icon icon-class="wj" v-else style="margin-right: 5px; color: rgb(255, 207, 92)"
|
||||
class="iconfont icon-wenjian" />
|
||||
<span>{{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -71,347 +71,355 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getTree,
|
||||
getDirTree,
|
||||
findTreeChildren,
|
||||
getTable
|
||||
} from "@/api/archives-management/fileManagement/notStoredArchives.js";
|
||||
import {
|
||||
getButtonList
|
||||
} from "@/api/user"
|
||||
import {
|
||||
getFondWithPageUser
|
||||
} from "@/api/system-management/allAdministration";
|
||||
import {
|
||||
getFindList
|
||||
} from "@/api/system-management/templateSetting"
|
||||
import {
|
||||
dragControllerDiv
|
||||
} from "@/utils/common"
|
||||
import rightTableBox from "./components/rightTableBox";
|
||||
import qualityList from "./components/quality";
|
||||
import qualityCheck from "./components/quality/check";
|
||||
import qualityQuestion from "./components/quality/question";
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
treeType: "",
|
||||
// 树形结构数据
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
children: "childClass",
|
||||
label: "className"
|
||||
},
|
||||
defaultDirProps: {
|
||||
children: "children",
|
||||
label: "title",
|
||||
isLeaf: 'isLeaf'
|
||||
},
|
||||
Alltable: [],
|
||||
status: false,
|
||||
treeLoading: false,
|
||||
treeRow: {},
|
||||
isDirSeqTree: false, // 是否目录序列树
|
||||
dirTreeData: [], // 目录序列树
|
||||
dirTreeLoading: false, // 目录序列树loading
|
||||
eleTable: {}, // 按钮对应的table
|
||||
eleKey: '', // 按钮对应的table key
|
||||
fondsList: [],
|
||||
showButtons: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
setQuery: false,
|
||||
cataTree: false,
|
||||
export: false,
|
||||
ware: false,
|
||||
quality: false,
|
||||
four: false,
|
||||
ywBtn: 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%";
|
||||
}
|
||||
}
|
||||
import {
|
||||
getTree,
|
||||
getDirTree,
|
||||
findTreeChildren,
|
||||
getTable
|
||||
} from "@/api/archives-management/fileManagement/notStoredArchives.js";
|
||||
import {
|
||||
getButtonList
|
||||
} from "@/api/user"
|
||||
import {
|
||||
getFondWithPageUser
|
||||
} from "@/api/system-management/allAdministration";
|
||||
import {
|
||||
getFindList
|
||||
} from "@/api/system-management/templateSetting"
|
||||
import {
|
||||
dragControllerDiv
|
||||
} from "@/utils/common"
|
||||
import rightTableBox from "./components/rightTableBox";
|
||||
import qualityList from "./components/quality";
|
||||
import qualityCheck from "./components/quality/check";
|
||||
import qualityQuestion from "./components/quality/question";
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
treeType: "",
|
||||
// 树形结构数据
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
children: "childClass",
|
||||
label: "className"
|
||||
},
|
||||
defaultDirProps: {
|
||||
children: "children",
|
||||
label: "title",
|
||||
isLeaf: 'isLeaf'
|
||||
},
|
||||
Alltable: [],
|
||||
status: false,
|
||||
treeLoading: false,
|
||||
treeRow: {},
|
||||
isDirSeqTree: false, // 是否目录序列树
|
||||
dirTreeData: [], // 目录序列树
|
||||
dirTreeLoading: false, // 目录序列树loading
|
||||
eleTable: {}, // 按钮对应的table
|
||||
eleKey: '', // 按钮对应的table key
|
||||
fondsList: [],
|
||||
showButtons: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
setQuery: false,
|
||||
cataTree: false,
|
||||
export: false,
|
||||
ware: false,
|
||||
quality: false,
|
||||
four: false,
|
||||
ywBtn: false,
|
||||
plxg: false,
|
||||
}
|
||||
},
|
||||
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;
|
||||
});
|
||||
},
|
||||
// 点击树形结构
|
||||
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)
|
||||
};
|
||||
},
|
||||
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 {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.table.clickSearch(0, 1, 1);
|
||||
})
|
||||
cardTree.width = "20%";
|
||||
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>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
height: 100%;
|
||||
.box {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
height: 100%;
|
||||
|
||||
.tree-box {
|
||||
width: 20%;
|
||||
// min-height: 720px;
|
||||
// overflow-y: auto;
|
||||
.tree-box {
|
||||
width: 20%;
|
||||
// min-height: 720px;
|
||||
// overflow-y: auto;
|
||||
|
||||
.el-tree {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
font-weight: 600;
|
||||
font-size: 17px;
|
||||
letter-spacing: 3px;
|
||||
}
|
||||
.el-tree {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.form-box {
|
||||
width: 79%;
|
||||
height: calc(100vh - 90px);
|
||||
overflow-y: auto;
|
||||
.clearfix {
|
||||
font-weight: 600;
|
||||
font-size: 17px;
|
||||
letter-spacing: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.form-box {
|
||||
width: 79%;
|
||||
height: calc(100vh - 90px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user