Files
foton-laws-system-front/src/pages/localTool/standAutoSplit/index.vue
T

1700 lines
61 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- 本地工具 - 标准拆分 -->
<template>
<div class="standAutoSplit v-class">
<!-- 顶部工具栏 -->
<table-tools-bar>
<div slot="left">
<div class="search-area">
<el-form :model="standCommonlySearch" inline class="label-input-form" @keyup.enter.native="searchStandList">
<el-form-item label="标准号/名称" class="search-item">
<el-input v-model="numOrName" class="s-c-input" :placeholder="$t('m.searchByStandardNumberAndName')" clearable :maxlength="100"></el-input>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
size="mini"
type="primary"
class="common-button-primary"
v-btn-permission="''"
@click="searchStandList">查询</el-button>
<el-button
size="mini"
class="common-button-default"
v-btn-permission="''"
@click="clearSearchStand">清空</el-button>
</el-form-item>
</el-form>
</div>
</div>
</table-tools-bar>
<div class="content">
<div class="action-bar">
<el-button size="small" type="primary" @click="spiltStandFile" v-btn-permission="''">拆分</el-button>
<el-button size="small" type="danger" @click="batchDelete" v-btn-permission="''">删除</el-button>
</div>
<div class="table-wrap">
<div style="position: absolute;height: 100%;width: 100%;">
<el-table
:data="standInfoList"
tooltip-effect="dark"
height="100%"
border
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@selection-change="standSelectChange"
ref="selection"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="showNumber"
label="标准号/政策号"
align="center">
<template slot-scope="scope">
<a class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.showNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称/政策名称"
show-overflow-tooltip
align="center">
<template slot-scope="scope">
<a class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column
prop="fileTypeShow"
label="文本状态"
align="center">
</el-table-column>
<el-table-column
prop="fileName"
label="文件名称"
show-overflow-tooltip
align="center">
</el-table-column>
<el-table-column
prop="creationTime"
label="拆分时间"
sortable
align="center">
<template slot-scope="scope">
<span>{{ scope.row.creationTime ? $moment(scope.row.creationTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="result"
label="拆分结果"
align="center"
width="100">
<template slot-scope="scope">
<el-tag type="success" size="small" v-if="scope.row.result === '1'">成功</el-tag>
<el-tag type="danger" size="small" v-else>失败</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="50">
<template slot-scope="scope">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[scope.row, '查看']" v-btn-permission="''">查看</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="''">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<loading :loading="loading">正在获取中……</loading>
<pagination :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
<!-- 拆分-->
<el-drawer
title="拆分"
:wrapperClosable="false"
:visible.sync="addFileConvertShowflag"
size="1200px"
@close="addFileConvertShowflag = false"
destroy-on-close
>
<div class="demo-drawer-content">
<div class="search-area">
<el-form :model="fileInfoEOSearch" inline class="label-input-form">
<el-form-item label="数据来源" prop="fileType" class="search-item">
<el-select v-model="fileInfoEOSearch.fileType" placeholder="请选择数据来源" clearable>
<el-option v-for="opt in fileTypeOptions" :key="opt.value" :value="opt.value" :label="opt.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="标准号/政策号" prop="standNumber" class="search-item">
<el-input v-model="fileInfoEOSearch.standNumber" :maxlength="100" placeholder="请选择标准号/政策号" clearable></el-input>
</el-form-item>
<el-form-item label="标准名称/政策名称" prop="standName" class="search-item">
<el-input v-model="fileInfoEOSearch.standName" :maxlength="100" placeholder="请选择标准名称/政策名称" clearable></el-input>
</el-form-item>
<el-form-item label="文本状态" prop="standFileClassify" class="search-item">
<el-select v-model="fileInfoEOSearch.standFileClassify" placeholder="请选择文本状态" clearable>
<el-option v-for="opt in standFileClassifyOptions" :key="opt.value" :value="opt.value" :label="opt.label"></el-option>
</el-select>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
type="primary"
size="mini"
class="common-button-primary"
@click="StandFileListByPage"
>搜索</el-button>
</el-form-item>
<el-form-item class="serch-form-item btn-box">
<el-button
size="mini"
class="common-button-default"
@click="clearGetStandFileListByPage"
>清空</el-button>
</el-form-item>
</el-form>
</div>
<el-table
ref="standSelectTable"
:data="addSpiltStandList"
tooltip-effect="dark"
style="width: 100%;"
height="100%"
border
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@selection-change="selectStandChange"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="sarType"
label="资料类型"
align="center">
<template slot-scope="scope">
<div v-if="scope.row.sarType === 'INLAND'">国内标准法规</div>
<div v-else-if="scope.row.sarType === 'FOREIGN'">海外标准法规</div>
</template>
</el-table-column>
<el-table-column
prop="standNumber"
label="标准号/政策号"
align="center">
<template slot-scope="scope">
<a class="table-jump"
@click="handlePreview1(scope.row)">{{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称/政策名称"
align="center"
>
<template slot-scope="scope">
<a class="table-jump"
@click="handlePreview1(scope.row)">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column
prop="standFileClassifyShow"
label="文本状态"
align="center">
</el-table-column>
<el-table-column
prop="fileName"
label="附件"
align="center">
</el-table-column>
</el-table>
<pagination
style="position: static;"
:total="addFileStandtotal"
:page="addFilePage"
@pageChange="addFileStandPageChange"
@pageSizeChange="addFileStandPageSizeChange"></pagination>
</div>
<div class="demo-drawer-footer">
<el-button size="mini" style="margin-right: 8px" @click="addFileConvertShowflag = false" icon="el-icon-close" >取消</el-button>
<el-button size="mini" type="primary" @click="saveSplitInfo" icon="el-icon-check" >拆分</el-button>
</div>
<loading :loading="loadData">正在获取数据</loading>
</el-drawer>
<!-- 分享 -->
<el-drawer
:title="$t('m.sharingStandards')"
:visible.sync="drawerModal"
size="300px"
@close="drawerModal = false"
>
<div class="demo-drawer-content">
<dept-tree treeDivId="drawerModalTree"
ref="drawerModalTree"
@treeClick="selcetTree"
allDept
showUser
:editable="false"
style="padding: 0 15px">
</dept-tree>
</div>
<div class="demo-drawer-footer">
<el-button size="mini" style="margin-right: 8px" @click="drawerModal = false" icon="el-icon-close" >{{$t('m.cancel')}}</el-button>
<el-button size="mini" type="primary" @click="shareStandardBt" icon="el-icon-check" >{{$t('m.push')}}</el-button>
</div>
</el-drawer>
<!--编辑抽屉-->
<el-drawer
title="编辑"
:visible.sync="editDrawerModal"
size="800px"
>
<div class="demo-drawer-content">
<el-form
ref="editForm"
:model="editForm"
:rules="editFormRules"
class="label-input-form"
>
<el-form-item
label="标准号/政策号"
class="add-form-item"
prop="standNumSplit"
label-width="140px"
>
<el-input v-model="editForm.standNumSplit" :maxlength="100" placeholder="请输入标准号/政策号" clearable></el-input>
</el-form-item>
<el-form-item
label="标准名称/政策名称"
class="add-form-item"
prop="standNameSplit"
label-width="140px"
>
<el-input v-model="editForm.standNameSplit" :maxlength="100" placeholder="请输入标准名称/政策名称" clearable></el-input>
</el-form-item>
<el-form-item
label="文本状态"
class="add-form-item"
prop="fileType"
label-width="140px"
>
<el-select v-model="editForm.fileType" placeholder="请选择文本状态" clearable>
<el-option v-for="opt in standFileClassifyOptions" :key="opt.value" :value="opt.value" :label="opt.label"></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button size="mini" style="margin-right: 8px" @click="editDrawerModal = false" icon="el-icon-close">取消</el-button>
<el-button size="mini" type="primary" @click="editFormSave" icon="el-icon-check" :loading="isSubmit">保存</el-button>
</div>
</el-drawer>
<el-dialog
:visible.sync="importModalshowflagtemp"
title="上传文件"
width="550px"
:close-on-click-modal="false"
@close="handleClose2"
>
<div class="search-area">
<el-form
:model="uploadFilesplitEo"
:rules="uploadFileSplitRules"
ref="uploadFileSplitEO2"
class="label-input-form upload-file-form"
label-position="left"
label-width="150px"
style="width: 100%;"
>
<el-form-item label="标准号/政策号" prop="standNumSplit" class="search-item btn-box widthLimit">
<el-input v-model="uploadFilesplitEo.standNumSplit" :maxlength="100" placeholder="请输入标准号/政策号"></el-input>
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="position:absolute;right: 0;"
@click="selectLaws"
>手动查找</el-button>
</el-form-item>
<el-form-item label="标准名称/政策名称" prop="standNameSplit" class="search-item btn-box">
<el-input v-model="uploadFilesplitEo.standNameSplit" :maxlength="100" placeholder="请输入标准名称/政策名称"></el-input>
</el-form-item>
<el-form-item label="拆分方式" prop="splitType" class="search-item btn-box">
<el-radio-group v-model="uploadFilesplitEo.splitType">
<el-radio label="全部章节" value="全部章节"></el-radio>
<el-radio label="部分章节" value="部分章节"></el-radio>
</el-radio-group>
<div class="wrap">
<span v-show="uploadFilesplitEo.splitType === '部分章节'" style="margin-right: 10px;vertical-align:top;">章节</span>
<el-input-number size="small" v-show="uploadFilesplitEo.splitType === '部分章节'" :max="100" :min="1" v-model="startNumber"></el-input-number>
<span v-show="uploadFilesplitEo.splitType === '部分章节'" style="margin: 0 10px;vertical-align:top;"></span>
<el-input-number size="small" v-show="uploadFilesplitEo.splitType === '部分章节'" :max="100" :min="startNumber" v-model="stopNumber"></el-input-number>
</div>
</el-form-item>
<el-form-item label="文本状态" prop="fileType" class="search-item btn-box">
<el-select v-model="uploadFilesplitEo.fileType">
<el-option
v-for="opt in standFileClassifyOptions"
:key="opt.value"
:value="opt.value"
:label="opt.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="拆分文件" prop="defaultFileList">
<el-select v-model="uploadFilesplitEo.defaultFileList" multiple v-show="false" v-if="importModalshowflagtemp"></el-select>
<el-upload
:multiple="multipletype"
show-file-list
:on-success="uploadSuccess"
:on-remove="removeOneFile"
:action="uploadPath"
:file-list="defaultFileList"
accept=".doc, .docx"
:before-upload="beforeUpload"
name="file"
:on-change="handleUploadChange2"
ref="importFileAboutStand">
<el-button size="mini" icon="el-icon-upload">{{$t('m.upload')}}</el-button>
</el-upload>
</el-form-item>
<div style="text-align: center">
<i class="el-icon-warning-outline" style="color: red"/>
上传拆分文档需遵循相关格式要求具体要求请
<a href="#" style="color: blue" @click="formatSpecification=true">点击查看</a>
</div>
</el-form>
</div>
<div slot="footer">
<el-button size="mini" @click="importModalshowflagtemp = false">取消</el-button>
<el-button type="primary" size="mini" @click="okSplitUploadFile">拆分</el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="formatSpecification"
title="格式要求"
width="550px"
:close-on-click-modal="false"
>
<div class="mofun-formatSpecification">
<div style="padding-bottom: 13px">标题要求如下不可省略且必须为正文格式内容无规定</div>
<h3>1 范围</h3>
<h3>2 规范性引用文件</h3>
<h3>3 术语和定义</h3>
<h3>456 ...</h3>
<div style="line-height: 20px; padding-top: 5px"><a style="color: red"></a></div>
<div style="line-height: 20px; padding-left: 20px">
1.Word版本必须是2007以上<br/>
2.文档开头中如果存在目录则需要删掉否则系统识别是只识别到目录内容后续正文内容无法识别<br/>
3.文档中的序号不能是自动生成必须是手动输入<br/>
4.文档序号从4开始拆分且序号必须为连续例如4.14.24.3 </div>
</div>
<div slot="footer">
<el-button type="primary" size="mini" @click="formatSpecification = false">知道了</el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="formatSpecificationTwo"
title="格式要求"
width="550px"
:close-on-click-modal="false"
>
<div class="mofun-formatSpecification">
<div style="line-height: 20px; padding-left: 20px">
1.导入的文档是zip格式<br/>
2.图片为jpgjpegpnggif格式 <br/>
3.文档中的图片在导出excel中以链接的形式展示点击链接跳转到本地指定的文件 <br/>
4.文档中的表格在导出excel中以链接的形式展示点击链接跳转到指定的sheet页面</div>
</div>
<div slot="footer">
<el-button type="primary" size="mini" @click="formatSpecificationTwo = false">知道了</el-button>
</div>
</el-dialog>
<!-- 导入拆分结果 -->
<el-dialog
:visible.sync="visibleImportSplitResultDialog"
title="导入拆分结果"
width="550px"
:close-on-click-modal="false"
@close="handleClose">
<div class="search-area">
<el-form
:model="uploadFilesplitEo"
:rules="uploadFileSplitRules"
ref="uploadFileSplitEO"
class="label-input-form upload-file-form"
label-position="left"
label-width="150px"
style="width: 100%;"
>
<el-form-item label="标准号/政策号" prop="standNumSplit" class="search-item btn-box widthLimit">
<el-input v-model="uploadFilesplitEo.standNumSplit" :maxlength="100" :disabled="importSplitResultLoading" placeholder="请输入标准号/政策号"></el-input>
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="position:absolute;right: 0;"
@click="selectLaws"
>手动查找</el-button>
</el-form-item>
<el-form-item label="标准名称/政策名称" prop="standNameSplit"class="search-item btn-box">
<el-input v-model="uploadFilesplitEo.standNameSplit" :maxlength="100" :disabled="importSplitResultLoading" placeholder="请输入标准名称/政策名称"></el-input>
</el-form-item>
<el-form-item label="文本状态" prop="fileType"class="search-item btn-box">
<el-select v-model="uploadFilesplitEo.fileType" :disabled="importSplitResultLoading">
<el-option v-for="opt in standFileClassifyOptions" :key="opt.value" :value="opt.value" :label="opt.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="拆分文件" prop="defaultFileList"class="search-item btn-box">
<el-select multiple v-model="uploadFilesplitEo.defaultFileList" v-show="false"></el-select>
<el-upload
show-file-list
:on-success="uploadSuccess"
:on-remove="removeOneFile"
:action="splitResultPath"
:file-list="defaultFileList"
:data="uploadFilesplitEo"
:auto-upload="false"
:limit="1"
:before-upload="beforeSplitResultImport"
:on-change="handleUploadChange"
name="file"
ref="importFileAboutStand"
:disabled="importSplitResultLoading"
>
<el-button size="mini" icon="el-icon-upload">{{$t('m.upload')}}</el-button>
<el-button size="mini" @click="uploadImportModal" icon="el-icon-download">模板下载</el-button>
</el-upload>
</el-form-item>
<div style="text-align: center">
<i class="el-icon-warning-outline" style="color: red"/>
上传拆分文档需遵循相关格式要求具体要求请
<a href="#" style="color: blue" @click="formatSpecificationTwo=true">点击查看</a>
</div>
</el-form>
</div>
<div slot="footer">
<el-button size="mini" @click="visibleImportSplitResultDialog = false">取消</el-button>
<el-button type="primary" :loading="importSplitResultLoading" size="mini" @click="handleImportSplitResult">确定</el-button>
</div>
</el-dialog>
<!--拆分进度条-->
<el-dialog
:visible.sync="speedModal"
title="拆分进度"
:close-on-click-modal="false"
:show-close="false"
>
<el-progress :percentage="percent" :stroke-width="10" text-inside />
<div slot="footer"></div>
</el-dialog>
<!--标准政策抽屉-->
<el-drawer
ref="standard"
title="选择标准号/政策号"
size="1100px"
:visible.sync="isDrawer"
custom-class="buss-retrieval"
>
<div class="demo-drawer-content-mini">
<div class="condition">
<el-form :model="conditionForm" inline label-width="150" class="search-area">
<el-form-item label="数据来源" prop="standType" class="search-item">
<el-select
v-model="conditionForm.standType"
placeholder="请选择"
>
<el-option value="INLAND" label="国内标准法规"></el-option>
<el-option value="FOREIGN" label="海外标准法规"></el-option>
<el-option value="FOREIGN2" label="国内外政策"></el-option>
</el-select>
</el-form-item>
<el-formItem label="编号/名称" prop="numberName" class="search-item">
<el-input
v-model="conditionForm.numberName"
clearable
placeholder="根据编号/名称查找"
:maxlength="100"
@keyup.enter.native="" />
</el-formItem>
<el-form-item class="search-item btn-box">
<el-button
size="mini"
type="primary"
class="common-button-primary"
@click="getSearchSarBussStandPage">
搜索
</el-button>
<el-button
class="common-button-default"
size="mini"
@click="handleResetCondition()"
>清空</el-button>
</el-form-item>
</el-form>
</div>
<!-- 国内外政策 -->
<el-table
ref="reviseDrawerTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%;"
height="100%"
border
class="drag-table"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@selection-change="standSelectChange2">
<el-table-column
type="selection"
width="55"
align="center"
>
</el-table-column>
<el-table-column
type="index"
label="序号"
width="60"
align="center"
></el-table-column>
<el-table-column
prop="lawsNumber"
align="center"
label="政策编号/标准编号">
<template slot-scope="scope">
<a @click="showLawsDetails(scope.row)">{{ scope.row.lawsNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="lawsName"
align="center"
label="政策名称/标准名称">
<template slot-scope="scope">
<a @click="showLawsDetails(scope.row)">{{ scope.row.lawsName }}</a>
</template>
</el-table-column>
<!-- <el-table-column
prop="fileType"
align="center"
label="文本状态">
</el-table-column>-->
<!-- <el-table-column-->
<!-- prop="putTime"-->
<!-- label="新车型实施日期"-->
<!-- align="center"-->
<!-- width="130">-->
<!-- </el-table-column>-->
<el-table-column
prop="issueTime"
label="发布日期"
align="center"
width="130">
<template slot-scope="scope">
<p v-for="item in scope.row.issueTime.split(',')">{{ item }}</p>
</template>
</el-table-column>
</el-table>
<pagination
:page="conditionForm.page"
:pageSize="conditionForm.pageSize"
:total="total2"
@pageChange="handlePageChange"
@pageSizeChange="handlePageSizeChange"
></pagination>
<loading :loading="loading">数据获取中</loading>
</div>
<div class="demo-drawer-footer">
<el-button
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="handleConfirm"
>确定</el-button>
<el-button
class="common-button-default"
icon="el-icon-close"
@click="handleCancel"
>取消</el-button>
</div>
</el-drawer>
<!-- 分享 全部选人 -->
<org-table
:visible.sync="visibleOrgTable"
title="分享人员"
dialog-model
:config="{
value: orgTableVal,
valueName: orgTableValName
}"
@confirm="isTreeOk"
></org-table>
</div>
</template>
<script>
import 'zTree/js/jquery.ztree.core.js'
import 'zTree/js/jquery.ztree.excheck.js'
import 'zTree/js/jquery.ztree.exedit.js'
export default {
name: 'StandAutoSplit',
data () {
return {
visibleOrgTable: false,
orgTableVal: '',
orgTableValName: '',
formatSpecification: false,
formatSpecificationTwo: false,
// 导入拆分结果dialog
visibleImportSplitResultDialog: false,
importSplitResultLoading: false,
speedModal: false,
percent: 0,
ifUp: true,
standCommonlySearch: {},
dataLoading: false,
loading: false,
loadData: false,
numOrName: '',
standInfoList: [],
standInfoListAll: [
{'id': '1', 'standNumber': 'GB/T 3765-2019', 'standName': '汽车用蜂鸣器', 'standFileClassify': '1'},
{'id': '2', 'standNumber': 'GB/T 1279-2019', 'standName': '汽车产品明细表编制规则', 'standFileClassify': '1'}
],
addAllFileConvertList: [
{'id': '3', 'fileType': '1', 'standNumber': 'GB/T 1001-2019', 'standName': '测试标准1', 'standFileClassify': '1', 'fileName': 'GB 4660-2016 机动车用前雾灯配光性能.doc'},
{'id': '4', 'fileType': '2', 'standNumber': 'GB/T 1002-2019', 'standName': '测试标准2', 'standFileClassify': '2', 'fileName': 'GB 4660-2016 机动车用前雾灯配光性能.docx'},
{'id': '5', 'fileType': '3', 'standNumber': 'GB/T 1003-2019', 'standName': '测试标准3', 'standFileClassify': '3', 'fileName': 'GB 4660-2016 机动车用前雾灯配光性能.doc'},
{'id': '6', 'fileType': '4', 'standNumber': 'GB/T 1004-2019', 'standName': '测试标准4', 'standFileClassify': '4', 'fileName': 'GB 4660-2016 机动车用前雾灯配光性能.doc'},
{'id': '7', 'fileType': '1', 'standNumber': 'GB/T 1005-2019', 'standName': '测试标准5', 'standFileClassify': '5', 'fileName': 'GB 4660-2016 机动车用前雾灯配光性能.docx'},
{'id': '8', 'fileType': '1', 'standNumber': 'GB/T 1006-2019', 'standName': '测试标准6', 'standFileClassify': '6', 'fileName': 'GB 4660-2016 机动车用前雾灯配光性能.docx'}
],
dropdownItems: [{'val': '收藏'}, {'val': '分享'}, {'val': '关联'}, {'val': '删除'}],
tableHeight: null,
total: 0,
fileInfoEO: {
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
fileType: '',
standNumber: '',
standName: '',
standFileClassify: '',
convertResult: '',
useTime: '',
fileName: ''
},
fileInfoEOSet: {
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
fileType: '1',
standNumber: 'GB/T 3765-2019',
standName: '汽车用蜂鸣器',
standFileClassify: '1',
convertResult: '成功',
useTime: '20s'
},
addFileConvertShowflag: false,
addFileConvertFormRules: {},
fileTypeOptions: [
{label: '国内标准法规', value: 'INLAND'},
{label: '海外标准法规', value: 'FOREIGN'}
],
standFileClassifyOptions: [],
drawerModal: false,
shareStandardSelect: [],
fileInfoEOSearch: {
fileType: '',
standNumber: '',
standName: '',
standFileClassify: '',
fileName: ''
},
addSpiltStandList: [],
addFileStandtotal: 0,
uploadPdfFile: '',
defaultFileList: [],
importModalshowflagtemp: false,
uploadPath: 'api/att/attFile/upload',
splitResultPath: 'api/lawss/sarFileSplitItems/importSplitItemsZip',
multipletype: false,
saveFileName: '',
selectedSplitStandList: [],
addFilePage: 1,
addFilePageSize: this.$store.getters.userInfo.configContent,
splitInfoPage: 1,
splitInfoPageSize: this.$store.getters.userInfo.configContent,
selectedList: [],
// 记录上传文件相关信息
uploadFilesplitEo: {
standId: '',
fileType: '',
attId: '',
fileName: '',
standNumSplit: '',
standNameSplit: '',
defaultFileList: [],
splitType: '全部章节'
},
uploadFileSplitRules: {
standNumSplit: [{required: true, message: '标准号/政策号不能为空', trigger: 'blur'}],
// standNameSplit: [{required: true, message: '标准名称/政策名称不能为空', trigger: 'blur'}],
fileType: [{ required: true, message: '文本状态不能为空', trigger: 'change' }],
defaultFileList: [{ required: true, message: '拆分文件不能为空', trigger: 'change' }],
splitType: [{ required: true, message: '拆分方式不能为空', trigger: 'change' }]
},
stopNumber: 1,
startNumber: 1,
spinShow: false,
resPk: '', // 分享,消息推送过程中记录要推送的标准
editDrawerModal: false, // 编辑modal状态
editForm: {
id: '',
standId: '',
standNumSplit: '', // 标准号/政策号
standNameSplit: '', // 标准名称/政策名称
fileType: '' // 文本状态
},
editFormRules: {
standNumSplit: [{required: true, message: '标准号/政策号不能为空', trigger: 'blur'}],
standNameSplit: [{required: true, message: '标准名称/政策名称不能为空', trigger: 'blur'}],
fileType: [{ required: true, message: '文本状态不能为空', trigger: 'change' }]
},
splitFileTypeOptions: [
{
label: '',
value: ''
}
],
isSubmit: false,
isDrawer: false, // 上传手动选择标准和政策抽屉状态
conditionForm: {
standType: 'INLAND',
numberName: '',
page: 1,
pageSize: this.$store.getters.userInfo.configContent
},
tableData: [],
total2: 0,
standSelected: []
}
},
methods: {
// 模板下载
uploadImportModal () {
window.open('/api/att/attFile/uploadModalFile?fileName=标准拆分导入拆分结果模板.zip')
},
// 点击手动查找标准/政策按钮,弹出抽屉事件
selectLaws () {
this.isDrawer = true
this.getSearchSarBussStandPage()
},
// 搜索事件
getSearchSarBussStandPage () {
this.conditionForm.page = 1
this.getSearch()
},
// 清空事件
handleResetCondition () {
this.conditionForm.page = 1
this.conditionForm.standType = 'INLAND'
this.conditionForm.numberName = ''
this.getSearch()
},
// 分页事件
handlePageChange (page) {
this.conditionForm.page = page
this.getSearch()
},
handlePageSizeChange (pageSize) {
this.conditionForm.pageSize = pageSize
this.getSearch()
},
//点击查看详情
handlePreview(item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standId,
pageType: 'INLAND_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
//拆分页点击查看详情
handlePreview1(item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standId,
pageType: item.sarType + '_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
// 查询政策和标准
getSearch () {
if (this.conditionForm.standType === 'FOREIGN2') {
this.$http.get('lawss/sarLawsInfo/page', {
page: this.conditionForm.page,
pageSize: this.conditionForm.pageSize,
numberName: this.conditionForm.numberName,
lawsType: 'FOREIGN'
}, {
_this: this,
loading: 'loading'
}, res => {
if (res.ok) {
res.data.list.map(item => {
item.resType = 'FOREIGN_LAWS'
})
this.tableData = res.data.list
this.total2 = res.data.count
}
})
} else {
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', {
page: this.conditionForm.page,
pageSize: this.conditionForm.pageSize,
standNumber: this.conditionForm.numberName,
standType: this.conditionForm.standType
}, {
_this: this, loading: 'loading'
}, res => {
if (res.ok) {
res.data.list.map(item => {
if (item.standYear) {
item.lawsNumber = item.standSortShow + ' ' + item.standNumber + '-' + item.standYear
} else {
item.lawsNumber = item.standSortShow + ' ' + item.standNumber
}
item.lawsName = item.standName
item.stateName = item.standStateShow
item.resType = this.conditionForm.standType === 'FOREIGN' ? 'FOREIGN_STAND' : 'INLAND_STAND'
})
this.tableData = res.data.list
this.total2 = res.data.count
}
})
}
},
// 标准政策选中事件
standSelectChange2 (selected) {
if (selected.length === 1) {
this.standSelected = selected
} else {
return this.$message.warning('请选择一条数据')
}
},
// 政策、标准确定带入数据事件
handleConfirm () {
this.uploadFilesplitEo.standNumSplit = this.standSelected[0].lawsNumber
this.uploadFilesplitEo.standNameSplit = this.standSelected[0].lawsName
this.isDrawer = false
},
// 政策、标准取消关闭抽屉事件
handleCancel () {
this.isDrawer = false
},
// 跳转政策、标准详情页面
showLawsDetails (item) {
if (item.resType === 'FOREIGN_LAWS') {
let routeUrl = this.$router.resolve({
name: 'OtherLawsDetails',
params: {
id: item.id,
pageType: 'FOREIGN_LAWS'
}
})
window.open(routeUrl.href, '_blank')
} else {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.id,
pageType: item.resType
}
})
window.open(routeUrl.href, '_blank')
}
},
getStandFileListByPage () {
// let searchEoPage = {}
// searchEoPage.page = this.addFilePage
this.loadData = true
this.$http.get('lawss/sarStandFile/getStandFileListByPage', {
page: this.addFilePage,
pageSize: this.addFilePageSize,
standNumber: this.fileInfoEOSearch.standNumber,
standName: this.fileInfoEOSearch.standName,
standFileClassify: this.fileInfoEOSearch.standFileClassify,
fileType: this.fileInfoEOSearch.fileType,
fileSuffix: 'doc,docx'
}, {
_this: this
}, res => {
this.addSpiltStandList = res.data.list
this.addFileStandtotal = res.data.list.length
this.loadData = false
}, e => {
this.loadData = false
})
},
//拆分查询事件
StandFileListByPage(){
this.addFilePage = 1
this.getStandFileListByPage()
},
// 拆分 抽屉 清空查询
clearGetStandFileListByPage () {
this.fileInfoEOSearch.standNumber = ''
this.fileInfoEOSearch.standName = ''
this.fileInfoEOSearch.standFileClassify = ''
this.fileInfoEOSearch.fileType = ''
this.addFilePage = 1
this.getStandFileListByPage()
},
getSarFileSplitInfoEOPage () {
this.$http.get('lawss/sarFileSplitInfo/getSarFileSplitInfoEOPage', {
page: this.splitInfoPage,
pageSize: this.splitInfoPageSize,
numOrName: this.numOrName
}, {
_this: this, loading: 'loading'
}, res => {
res.data.list.map((item, index) => {
if (item.collectId != null && item.collectId !== '') {
item.collectBtn = false
} else {
item.collectBtn = true
}
})
this.standInfoList = res.data.list
this.total = res.data.count
}, e => {
})
},
// 分页点击后方法
pageChange (page) {
this.splitInfoPage = page
this.getSarFileSplitInfoEOPage()
},
// 分页每页显示数改变后方法
pageSizeChange (pageSize) {
this.splitInfoPageSize = pageSize
this.getSarFileSplitInfoEOPage()
},
standSelectChange (data) {
this.selectedList = []
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id)
}
},
clearSearchStand () {
this.numOrName = ''
this.searchStandList()
},
spiltStandFile () {
this.fileInfoEOSearch.fileType = ''
this.fileInfoEOSearch.standNumber = ''
this.fileInfoEOSearch.standName = ''
this.fileInfoEOSearch.standFileClassify = ''
this.uploadPdfFile = ''
this.saveFileName = ''
this.addFileConvertShowflag = true
// this.$refs.standSelectTable.selectAll(false)
this.getStandFileListByPage()
},
batchDelete () {
if (this.selectedList.length === 0) {
this.$message.error('请选择要删除的数据')
} else {
this.$confirm('确认删除选择数据?', '确认删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
this.$http.post('lawss/sarFileSplitInfo/batchDelete', {
ids: this.selectedList.join(',')
}, {
_this: this
}, res => {
this.getSarFileSplitInfoEOPage()
}, e => {
})
}).catch(() => {})
}
},
selcetTree (treeId, treeNode) {
this.shareStandardSelect = treeNode.id
},
// 树点击
isTreeOk (checkedList) {
this.shareStandardSelect = []
checkedList.map((item, index) => {
if (!item.isParent) {
this.shareStandardSelect.push(item.userId)
}
})
if (this.shareStandardSelect.length === 0) {
this.$message({
message: '请选择要分享的人!',
type: 'warning'
})
} else {
let personShareEO = {}
personShareEO.resType = 'STAND_SPLIT'
// personShareEO.resTitle = this.resPk.standName + ' ( 编号:' + this.resPk.showNumber + ' )'
personShareEO.resTitle = this.resPk.standNameSplit + '( 编号:'+ this.resPk.standNumSplit + ')'
personShareEO.resId = this.resPk.id
personShareEO.recipientId = this.shareStandardSelect // 要分享的人
this.$http.post('/person/personShare/savePersonShare', personShareEO, {
_this: this
}, res => {
this.$message.success('分享成功!')
this.visibleOrgTable = false
// this.drawerModal = false
this.shareStandardSelect = []
// this.$refs.drawerModalTree.treeReload()
}, e => {
this.$message.error('分享失败!')
})
}
},
// 分享 推送 事件
shareStandardBt () {
if (this.shareStandardSelect.length === 0) {
this.$message.warning('请选择要分享的人!')
} else {
let personShareEO = {}
personShareEO.resType = 'STAND_SPLIT'
// personShareEO.resTitle = this.resPk.standName + ' ( 编号:' + this.resPk.showNumber + ' )'
personShareEO.resTitle = this.resPk.standNameSplit + '( 编号:'+ this.resPk.standNumSplit + ')'
personShareEO.resId = this.resPk.id
personShareEO.recipientId = this.shareStandardSelect // 要分享的人
this.$http.post('/person/personShare/savePersonShare', personShareEO, {
_this: this
}, res => {
this.$message.success('分享成功!')
this.drawerModal = false
this.shareStandardSelect = []
this.$refs.drawerModalTree.treeReload()
}, e => {
this.$message.error('分享失败!')
})
}
},
selectStandChange (data) {
this.selectedSplitStandList = []
for (let i = 0; i < data.length; i++) {
this.selectedSplitStandList.push(data[i])
}
},
searchStandList () {
this.splitInfoPage = 1
this.getSarFileSplitInfoEOPage()
},
addFileStandPageChange (page) {
this.addFilePage = page
this.getStandFileListByPage()
},
addFileStandPageSizeChange (pageSize) {
this.addFilePageSize = pageSize
this.getStandFileListByPage()
},
searchStandFile () {
this.addSpiltStandList = this.addAllFileConvertList
let resultList = []
if (this.fileInfoEOSearch.fileType != null && this.fileInfoEOSearch.fileType !== '') {
resultList = []
for (let i = 0; i < this.addSpiltStandList.length; i++) {
if (this.addSpiltStandList[i].fileType === this.fileInfoEOSearch.fileType) {
if (resultList == null || resultList.indexOf(this.addSpiltStandList[i]) === -1) {
resultList.push(this.addSpiltStandList[i])
}
}
}
this.addSpiltStandList = resultList
}
if (this.fileInfoEOSearch.standNumber != null && this.fileInfoEOSearch.standNumber !== '') {
resultList = []
for (let i = 0; i < this.addSpiltStandList.length; i++) {
if (this.addSpiltStandList[i].standNumber.indexOf(this.fileInfoEOSearch.standNumber) !== -1) {
if (resultList == null || resultList.indexOf(this.addSpiltStandList[i]) === -1) {
resultList.push(this.addSpiltStandList[i])
}
}
}
this.addSpiltStandList = resultList
}
if (this.fileInfoEOSearch.standName != null && this.fileInfoEOSearch.standName !== '') {
resultList = []
for (let i = 0; i < this.addSpiltStandList.length; i++) {
if (this.addSpiltStandList[i].standName.indexOf(this.fileInfoEOSearch.standName) !== -1) {
if (resultList == null || resultList.indexOf(this.addSpiltStandList[i]) === -1) {
resultList.push(this.addSpiltStandList[i])
}
}
}
this.addSpiltStandList = resultList
}
if (this.fileInfoEOSearch.standFileClassify != null && this.fileInfoEOSearch.standFileClassify !== '') {
resultList = []
for (let i = 0; i < this.addSpiltStandList.length; i++) {
if (this.addSpiltStandList[i].standFileClassify === this.fileInfoEOSearch.standFileClassify) {
if (resultList == null || resultList.indexOf(this.addSpiltStandList[i]) === -1) {
resultList.push(this.addSpiltStandList[i])
}
}
}
this.addSpiltStandList = resultList
}
},
saveSplitInfo () {
if (this.selectedSplitStandList != null && this.selectedSplitStandList.length > 0) {
if (this.selectedSplitStandList.length > 1) {
this.$message.warning('当前仅支持一次拆分一条数据')
} else {
this.percent = 0
this.speedModal = true
this.speedProgress()
let splitEo = {}
splitEo.standId = this.selectedSplitStandList[0].standId
splitEo.fileType = this.selectedSplitStandList[0].standFileClassify
splitEo.attId = this.selectedSplitStandList[0].attId
splitEo.fileName = this.selectedSplitStandList[0].fileName
this.$http.postData('lawss/sarFileSplitInfo/fileSplit', splitEo, {
_this: this
}, res => {
if (res.ok) {
this.speedModal = false
this.$message.success('拆分成功')
this.addFileConvertShowflag = false
this.getSarFileSplitInfoEOPage()
} else {
this.speedModal = false
this.$message.warning(res.message)
this.getSarFileSplitInfoEOPage()
}
}, e => {
})
}
} else {
this.$message.warning('请选择一条数据进行拆分')
}
// setTimeout(() => {
// this.speedModal = false
// }, 8500)
},
// 进度条
speedProgress () {
const timer = setInterval(() => {
if (this.ifUp) {
this.percent = this.percent + 10
this.percent === 100 ? this.ifUp = false : this.ifUp = true
}
}, 800)
if (this.percent === 100) {
clearInterval(timer)
this.percent = 0
this.ifUp = true
}
// this.$once('hook:beforeDestroy', () => clearInterval(timer))
},
clearSearch () {
this.fileInfoEOSearch.fileType = ''
this.fileInfoEOSearch.standNumber = ''
this.fileInfoEOSearch.standName = ''
this.fileInfoEOSearch.standFileClassify = ''
this.searchStandFile()
},
// 点击上传按钮
clickButtonToUpload () {
this.importModalshowflagtemp = true
this.uploadFilesplitEo.standNumSplit = ''
this.uploadFilesplitEo.standNameSplit = ''
this.uploadFilesplitEo.fileType = ''
this.uploadFilesplitEo.attId = ''
this.uploadFilesplitEo.splitType = '全部章节'
this.defaultFileList = []
this.$nextTick(() => {
this.$refs.importFileAboutStand.clearFiles()
})
},
clickButtonToImport() {
this.visibleImportSplitResultDialog = true
this.$nextTick(() => {
this.$refs.importFileAboutStand.clearFiles()
})
},
uploadSuccess (res, file, fileList) {
if (res.ok) {
this.uploadFilesplitEo.attId = res.data.attId
this.uploadFilesplitEo.fileName = res.data.name
if (res.data.standNum != null && res.data.standNum !== '') {
this.uploadFilesplitEo.standNumSplit = res.data.standNum
}
if (res.data.standName != null && res.data.standName !== '') {
this.uploadFilesplitEo.standNameSplit = res.data.standName
}
this.defaultFileList.push(file)
this.$message.success('文件上传成功')
} else {
this.defaultFileList = []
this.uploadFilesplitEo.attId = ''
this.$message.error(res.message)
}
},
// 上传按钮 文件上传之前的钩子
beforeUpload (file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名
if (this.defaultFileList.length > 0) {
this.$message.warning('一次仅能拆分一个文件')
return false
}
if (fileSuffix !== '.doc' && fileSuffix !== '.docx') {
this.$message.warning('文件' + file.name + '格式不正确,请上传doc、docx文件')
return false
}
if (file.size / 1024 / 1024 > 200) {
this.$message.warning('文件大小不能超过200M')
return false
}
return true
},
beforeSplitResultImport(file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名
if (this.defaultFileList.length > 1) {
this.$message.warning('只能导入一个文件')
return false
}
if (fileSuffix !== '.zip') {
this.$message.warning('文件' + file.name + '格式不正确,请上传zip文件')
return false
}
if (file.size / 1024 / 1024 > 200) {
this.$message.warning('文件大小不能超过200M')
return false
}
return true
},
removeOneFile (file, fileList) {
this.defaultFileList = fileList
this.uploadFilesplitEo.attId = fileList.length > 0 ? this.uploadFilesplitEo.attId : ''
this.uploadFilesplitEo.defaultFileList = fileList
},
// 确认拆分上传的文件
okSplitUploadFile () {
if (this.uploadFilesplitEo.attId == null || this.uploadFilesplitEo.attId === '') {
this.$message.warning('拆分文件不能为空')
} else {
this.$refs['uploadFileSplitEO2'].validate(valid => {
if (valid) {
// 确认拆分方式
if (this.uploadFilesplitEo.splitType === '全部章节') {
this.uploadFilesplitEo.startNumber = 0
this.uploadFilesplitEo.stopNumber = 0
} else {
this.uploadFilesplitEo.startNumber = this.startNumber
this.uploadFilesplitEo.stopNumber = this.stopNumber
}
this.percent = 0
this.speedModal = true
this.speedProgress()
this.$http.postData('lawss/sarFileSplitInfo/fileSplit', this.uploadFilesplitEo, {
_this: this
}, res => {
if (res.ok) {
this.speedModal = false
this.$message.success('拆分成功')
this.importModalshowflagtemp = false
this.getSarFileSplitInfoEOPage()
} else {
this.speedModal = false
this.$message.warning(res.message)
}
}, e => {
this.speedModal = false
})
}
})
}
},
// 关联
connectToStand (data) {
this.$confirm('确认关联至标准库?', '确认关联', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
this.spinShow = true
let nowstandItem = JSON.parse(JSON.stringify(data))
if (nowstandItem.showNumber == null || nowstandItem.showNumber === '') {
nowstandItem.showNumber = nowstandItem.standNumSplit
}
this.$http.postData('lawss/sarFileSplitInfo/connectToStandItems', nowstandItem, {
_this: this
}, res => {
this.spinShow = false
}, e => {
this.spinShow = false
})
}).catch(() => {})
},
// 点击查看 按钮事件
showUser (row) {
this.$store.commit('setDetailMap', this.$route.path)
this.$router.push({
name: 'ItemSplitInfo',
query: {
infoId: row.id,
result: row.result,
}
})
},
// 点击编辑 按钮事件
editLawsInfo (row) {
this.editForm.id = row.id
if (row.standId) {
this.editForm.standNumSplit = row.showNumber
this.editForm.standNameSplit = row.standName
} else {
this.editForm.standNumSplit = row.standNumSplit
this.editForm.standNameSplit = row.standNameSplit
}
this.editForm.fileType = row.fileType
this.editDrawerModal = true
},
// 点击更多 事件
handleCommand (command) {
switch (command[1]) {
case '查看':
this.showUser(command[0])
break
case '编辑':
this.editLawsInfo(command[0])
break
case '收藏':
let personCollect = {}
personCollect.collectResId = command[0].id // id
personCollect.collectType = 'STAND_SPLIT' // 类型
if (command[0].standId) {
personCollect.collectTitle = command[0].standName + ' ( 编号:' + command[0].showNumber + ' )'
} else {
personCollect.collectTitle = command[0].standNameSplit + ' ( 编号:' + command[0].standNumSplit + ' )'
}
this.$http.postData('person/personCollect', personCollect, {
_this: this
}, res => {
if (res.ok) {
command[0].collectBtn = !command[0].collectBtn
command[0].collectId = res.data.id
}
})
break
case '取消收藏':
this.$http.put('person/personCollect/updateByUserId', {
id: command[0].collectId
}, {
_this: this
}, res => {
if (res.ok) {
command[0].collectBtn = !command[0].collectBtn
command[0].collectId = ''
this.$message.success('取消成功')
}
})
break
case '分享':
// this.drawerModal = true
// this.$nextTick(() => {
// this.$refs.drawerModalTree.clearSearch()
// })
this.visibleOrgTable = true
this.resPk = JSON.parse(JSON.stringify(command[0]))
break
case '关联':
this.connectToStand(command[0])
break
case '删除':
this.removeLawsInfo(command[0].id)
break
}
},
// 删除事件
removeLawsInfo (id) {
this.$confirm('确认删除该条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
this.$http.post('lawss/sarFileSplitInfo/batchDelete', {
ids: id
}, {
_this: this
}, res => {
this.getSarFileSplitInfoEOPage()
}, e => {
})
}).catch(() => {})
},
// 编辑 保存事件
editFormSave () {
this.$refs['editForm'].validate(valid => {
if (valid) {
this.isSubmit = true
this.$http.postData('lawss/sarFileSplitInfo/updateSarFileSplitInfo', this.editForm, {
_this: this
}, res => {
if (res.ok) {
this.isSubmit = false
this.editDrawerModal = false
this.getSarFileSplitInfoEOPage()
}
})
} else {
this.isSubmit = false
this.$message.warning('请检查表单是否填写正确')
}
})
},
getFileSel () {
this.$http.get('lawss/sarStandAttrDetails/getFileFieldForSel1', {}, {
_this: this
}, res => {
if (res.ok) {
const standFileClassifyOptions = []
res.data.map(item => {
if (item.label !== '相关资料') {
standFileClassifyOptions.push(item)
}
})
this.standFileClassifyOptions = standFileClassifyOptions
}
}, e => {})
},
handleImportSplitResult() {
if (this.defaultFileList.length) {
this.$refs['uploadFileSplitEO'].validate(valid => {
if (valid) {
const file = this.defaultFileList[0]
const fileTypeResult = this.beforeSplitResultImport(file.raw)
const _formData = new FormData()
_formData.append('standNumSplit', this.uploadFilesplitEo.standNumSplit)
_formData.append('standNameSplit', this.uploadFilesplitEo.standNameSplit)
_formData.append('fileType', this.uploadFilesplitEo.fileType)
_formData.append('file', file.raw)
if (fileTypeResult) {
this.importSplitResultLoading = true
this.$http.postData('lawss/sarFileSplitItems/importSplitItemsZip', _formData, {
}, res => {
this.importSplitResultLoading = false
if (res.ok) {
this.visibleImportSplitResultDialog = false
this.$message({
dangerouslyUseHTMLString: true,
message: res.message,
type: 'success'
})
setTimeout(() => {
this.getSarFileSplitInfoEOPage()
}, 100)
} else {
this.$message({
dangerouslyUseHTMLString: true,
message: res.message,
type: 'warning'
})
}
})
}
}
})
} else {
this.$message.warning('请上传文件')
}
},
// 上传拆分结果弹窗关闭
handleClose() {
this.uploadFilesplitEo = {
fileType: '',
fileName: '',
standNumSplit: '',
standNameSplit: '',
defaultFileList: []
}
this.defaultFileList = []
this.$refs['uploadFileSplitEO'].clearValidate()
},
// 上传拆分文件弹窗关闭
handleClose2() {
this.uploadFilesplitEo = {
fileType: '',
fileName: '',
standNumSplit: '',
standNameSplit: '',
defaultFileList: [],
splitType: '全部章节'
}
this.defaultFileList = []
this.$refs['uploadFileSplitEO2'].resetFields()
},
// 导入拆分结果
handleUploadChange (file, fileList) {
this.defaultFileList = fileList
this.uploadFilesplitEo.defaultFileList = fileList
this.$refs['uploadFileSplitEO'].validateField('defaultFileList')
},
// 上传拆分文件
handleUploadChange2(file, fileList) {
this.uploadFilesplitEo.defaultFileList = fileList
this.$refs['uploadFileSplitEO2'].validateField('defaultFileList')
},
},
components: {
// deptTree
},
props: {},
watch: {
},
mounted () {
// this.standInfoList.push(this.fileInfoEOSet)
// this.standInfoList = this.standInfoListAll
this.getSarFileSplitInfoEOPage()
this.getFileSel()
this.$nextTick(() => {
this.tableHeight = $('.content').height() - 44
window.onresize = function () {
this.tableHeight = $('.content').height() - 44
}.bind(this)
})
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
.standAutoSplit {
height: 100%;
.flex();
flex-direction: column;
background: #fff;
.action-bar {
margin-bottom: 5px;
padding: 0;
}
.table-wrap {
flex: auto;
overflow: hidden;
position: relative;
margin-bottom: 10px;
}
.content {
flex: auto;
overflow: hidden;
display: flex;
flex-direction: column;
}
& > .pagination {
position: static;
/deep/.pagination-slot {
padding: 0;
}
}
.el-drawer__wrapper{
.table-wrapper{
margin-top: 10px;
padding: 0 10px;
}
.pagination{
bottom: 45px;
}
}
::v-deep .el-progress-bar__outer {
height: 10px !important;
}
.s-c-input {
/deep/ .el-input__inner {
width: 180px;
}
}
.mofun-formatSpecification {
h3 {
padding: 10px 0 10px 20px;
}
}
}
/deep/ .split-drawer {
.table-wrapper {
position: relative;
flex: 1;
overflow-y: hidden;
}
.pagination {
position: static;
}
}
/deep/ .search-area .search-item input.el-input__inner, .search-area .search-item .el-select {
width: 100%;
}
/deep/ .search-area .search-item .el-input-number {
overflow: hidden;
border: 1px solid #DCDFE6;
.el-input__inner {
border: none;
}
.el-input-number__increase, .el-input-number__decrease {
top: 0;
}
}
.search-area{
justify-content: initial;
}
::v-deep .el-drawer__header{
&>span:first-child{
outline: none!important;
}
}
::v-deep .el-drawer{
outline: none!important;
}
::v-deep .el-form-item__error{
margin-top: 1px!important;
}
::v-deep .el-form-item__content{
margin-bottom: 10px!important;
}
.upload-file-form .widthLimit {
/deep/.el-input {
width: 245px;
}
}
</style>