Files
foton-laws-system-front/src/pages/localTool/standAutoSplit/pages/itemSplitInfo.vue
T
2021-08-03 18:01:11 +08:00

2509 lines
90 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 id="itemSplitInfo" class="v-class">
<div class="myheader">
<div class="back" title="返回" @click="back" >
<i class="el-icon-back"></i>
</div>
<div class="header-title">{{this.infoForm.standNumSplit}} -- {{this.infoForm.standNameSplit}}
<el-button type="text" @click="editInfo"><i class="el-icon-edit"></i></el-button>
</div>
</div>
<div class="item-contents">
<div class="tree-content" :class="{'tree-closed' : sideClose}">
<div class="tree">
<laws-tree
:zNodes="zNodes"
ref="domesticTree"
treeDivId="domesticTree"
:showRMenu="jurisdictionCheckForTree"
:isHideRNode="jurisdictionCheckForTree"
:editable="jurisdictionCheckForTree"
showCopyBtn
deptSelect
autoSelect
allowDrag
copyShow="true"
@treeAdd="(treeId, treeNode) => clickDropMenu('newMenu', treeNode)"
@treeEdit="(treeId, treeNode) => clickDropMenu('editMenu', treeNode)"
@treeClick="(treeId, treeNode) => treeClick(treeNode)"
@treeRightClick="(treeId, treeNode) => treeRightClick(treeNode)"
@treeRemove="(treeId, treeNode) => clickDropMenu('deleteMenu', treeNode)"
@afterDrop="(treeNode,nowNode,moveType)=>afterDrop(treeNode,nowNode,moveType)"
@treeCopy="(treeId, treeNode) => copyOneNode(treeNode)"
></laws-tree>
</div>
</div>
<div class="tree-right">
<div class="content">
<div class="action-bar">
<el-button v-btn-permission="'SRE2ZRX3MJSSH5YYLRGH'" size="mini" @click="importItemInfo" ><i class="iconfont">&#xe6de;</i>导入</el-button>
<el-button v-btn-permission="''" size="mini" @click="exportItemInfo"><i class="iconfont">&#xe6e9;</i>导出</el-button>
<el-button v-btn-permission="''" size="mini" @click="judgebatchDeleteItem"><i class="iconfont">&#xe61b;</i>删除</el-button>
<el-button v-btn-permission="'QULWGFSB3NMP84REU7BP'" size="mini" @click="uploadImportModal"><i class="iconfont">&#xe825;</i>模板下载</el-button>
<el-button v-btn-permission="''" size="mini" @click="batchCopy">批量复制</el-button>
<el-button v-btn-permission="'TE39XUT4KRTPZGQH5KLF'" size="mini" @click="combineItems">合并条款</el-button>
<el-button v-btn-permission="'P5NLYUS4XTP9P676XDEW'" size="mini" @click="openSubmitAndExamine" v-if="this.$route.query.result === '1'">提交</el-button>
<el-button v-if="auditFlag==='1'" size="mini" @click="splitCheckBtn">审核</el-button>
<!--<el-button size="mini" @click="$message.warning('需求暂不明确')" v-if="this.$route.query.result === '1'">提交</el-button>-->
</div>
<el-table
:data="itemInfoList"
style="width: 100%"
height="100%"
border
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@selection-change="standSelectChange"
ref="selection"
>
<el-table-column
type="selection"
width="55"
:resizable="false"
align="center">
</el-table-column>
<el-table-column
prop="itemsNum"
label="条款号"
width="150"
fixed="left"
:resizable="false"
align="center">
</el-table-column>
<el-table-column
prop="itemsName"
label="条款名称"
width="150"
fixed="left"
:resizable="false"
show-overflow-tooltip
align="center">
</el-table-column>
<el-table-column
prop="itermsConditions"
label="条款内容"
fixed="left"
show-overflow-tooltip
:resizable="false"
align="center">
<template slot-scope="scope">
<div class="itemsText" @click="itemsTextDialog(scope.row.itemsNum, scope.row.itermsConditions)">{{ scope.row.itermsConditions ? scope.row.itermsConditions.replace(/<.*?>/ig, ' ') : '' }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('m.operation')" align="center" width="50" :resizable="false" fixed="right">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<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, '编辑', scope.$index]" v-btn-permission="''">编辑</el-dropdown-item>
<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>
</div>
</template>
</el-table-column>
</el-table>
</div>
<loading :loading="loading">{{$t('m.getting')}}……</loading>
<pagination :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
</div>
</div>
<!-- 分享 -->
<el-drawer
:title="$t('m.sharingStandards')"
:visible.sync="drawerModal"
size="300px"
@close="drawerModal = false"
>
<dept-tree treeDivId="drawerModalTree"
ref="drawerModalTree"
@treeClick="selcetTree"
allDept
showUser
:editable="false"
style="padding: 0 15px">
</dept-tree>
<div class="demo-drawer-footer">
<el-button style="margin-right: 8px" @click="drawerModal = false">{{$t('m.cancel')}}</el-button>
<el-button type="primary" @click="shareStandardBt">{{$t('m.push')}}</el-button>
</div>
</el-drawer>
<!-- 内容简介-->
<el-drawer
title="内容简介"
:wrapperClosable="false"
:visible.sync="showItemRequestModel"
size="800px"
class="otherStandardDetails-drawer"
style="padding: 0 10px;"
@close="showItemRequestModel = false"
>
<div class="drawer-content-wrapper">
<div class="otherStandardDetails-drawer-content">
<!-- <div style="font-size:15px">{{$t('m.termsAndConditions')}}:</div>-->
<div class="item-content-style" id="itemContentHtml">
<div v-for="(item, index) in itemsContentListShow" :key="index">
<el-row>
<el-col :span="24" v-if="item.type === 'TEXT'">
<!-- <Input v-model.trim="item.id" v-if="false"></Input>-->
<p>{{item.itemContent}}</p>
</el-col>
<el-col :span="24" v-if="item.type === 'IMG'">
<div style="padding-top: 10px">
<div style="width: 30%;height: 30%;" v-html="item.itemContent" @click="previewImage(item.itemContent)"></div>
</div>
</el-col>
<el-col :span="24" v-if="item.type === 'TABLE'">
<div style="padding-top: 10px" class="wordTableStyle">
<div class="updateContentInput" v-html="item.itemContent">
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</div>
</div>
<div class="demo-drawer-footer">
<el-button icon="el-icon-close" size="mini" @click="cancleUpdateContent">{{$t('m.cancel')}}</el-button>
</div>
</el-drawer>
<!-- 编辑条目 -->
<el-drawer
title="编辑条款"
:wrapperClosable="false"
:visible.sync="modalItemaddShowflag"
size="800px"
>
<div class="demo-drawer-content">
<el-form
ref="sarStandardsItemForm"
:model="standItemEO"
class="label-input-form"
:rules="sarStandardItemRules"
label-width="150px"
>
<el-input v-model="standItemEO.id" v-if="false"></el-input>
<el-form-item label="条款号" prop="itemsNum" class="add-form-item">
<el-input v-model="standItemEO.itemsNum" placeholder="请输入内容"></el-input>
</el-form-item>
<el-form-item label="条款名称" prop="itemsName" class="add-form-item">
<el-input v-model="standItemEO.itemsName" placeholder="请输入内容"></el-input>
</el-form-item>
<!-- <custom-org
key="责任部门"
:config="{
attrName: '责任部门',
attrField: 'responsibleUnit',
selVal: 'ORGLIST',
valueName: standItemEO.responsibleUnitShow
}"
v-model="standItemEO.ZRBM"
@on-checked="onChecked"
></custom-org>
<custom-org
key="FO"
:config="{
attrName: 'FO',
attrField: 'FO',
selVal: 'ROLELIST',
valueName: standItemEO.foShow
}"
v-model="standItemEO.fo"
check-enable
:data-model="standItemEO"
@on-checked="checkedName => {standItemEO.foShow = checkedName}"
></custom-org>
<custom-role-tree
:key = "Math.random() + 'dutyEngineer'"
:config="{
attrName: '项目评估角色',
attrField: 'dutyEngineer',
valueName: standItemEO.dutyEngineerShow
}"
v-model="standItemEO.dutyEngineer"
:data-model="standItemEO"
@on-checked="checkedName => {standItemEO.dutyEngineerShow = checkedName}"
></custom-role-tree>
<custom-SVPPS
:key = "Math.random() + 'svpps'"
:config="{
attrName: 'SVPPS',
attrField: 'svpps',
valueName: standItemEO.svppsShow
}"
v-model="standItemEO.svpps"
:data-model="standItemEO"
@on-checked="checkedName => {standItemEO.svppsShow = checkedName}"
></custom-SVPPS>
<el-form-item label="适用车辆类型" prop="applyArctic" class="add-form-item">
<el-select v-model="standItemEO.applyArctic" multiple placeholder="请选择" :filterable="true">
<el-option
v-for="opt in applyArcticOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="要求类型" prop="claimType" class="add-form-item">
<el-select v-model="standItemEO.claimType" placeholder="请选择" :filterable="true">
<el-option
v-for="opt in requestOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="企标覆盖关系" prop="busStandCover" class="add-form-item">
<el-select v-model="standItemEO.busStandCover" placeholder="请选择">
<el-option
v-for="item in BZFGGXOUIUJ"
:key="item.value"
:value="item.value"
:label="item.label"></el-option>
</el-select>
</el-form-item>-->
<el-divider content-position="left">内容简介</el-divider>
<div style="border:1px dashed #999;margin-bottom:20px;padding:10px">
<el-row type="flex" class="row-bg" justify="space-between">
<el-col :span="6">
<el-button size="small" icon="el-icon-plus" @click="showAddContentInfo('noIndex')">{{$t('m.addTo')}}</el-button>
</el-col>
</el-row>
<div v-for="(item, index) in itemsContentList" :key="index">
<el-row>
<el-col :span="18" v-if="item.type === 'TEXT'">
<el-input v-model.trim="item.id" v-if="false"></el-input>
<el-input type="textarea" :autosize="true" class="updateContentInput" v-model.trim="item.itemContent" placeholder="请输入" clearable :maxlength="1000"></el-input>
</el-col>
<el-col :span="16" v-if="item.type === 'IMG'">
<div style="padding-top: 10px">
<el-input v-model.trim="item.id" v-if="false"></el-input>
<div style="width: 30%;height: 30%;" v-html="item.itemContent" @click="previewImage(item.itemContent)">{{item.itemContent}}</div>
</div>
</el-col>
<el-col :span="16" v-if="item.type === 'TABLE'">
<div style="padding-top: 10px" class="wordTableStyle">
<el-input v-model.trim="item.id" v-if="false"></el-input>
<div class="updateContentInput" v-html="item.itemContent">
</div>
</div>
</el-col>
<el-col :span="item.type === 'TABLE' ? 8 : 6" style="display:flex;justify-content: flex-end;">
<el-button size="mini" class="updateContentBtn" icon="el-icon-plus" @click="showAddContentInfo(index)">{{$t('m.addTo')}}</el-button>
<el-button size="mini" v-if="item.type === 'TABLE'" class="updateContentBtn" icon="el-icon-edit" @click="editContentInfo(item, index)">{{$t('m.update')}}</el-button>
<el-button size="mini" class="updateContentBtn" icon="el-icon-minus" @click="removeContentInfo(index, item.id)">{{$t('m.delete')}}</el-button>
</el-col>
</el-row>
</div>
</div>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button size="mini" icon="el-icon-close" style="margin-right: 8px" @click="modalItemaddShowflag = false">{{$t('m.cancel')}}</el-button>
<el-button size="mini" icon="el-icon-check" type="primary" @click="updateItemInfo" :loading="isSubmit">{{$t('m.submit')}}</el-button>
</div>
</el-drawer>
<!-- 查看属性 -->
<el-drawer
:wrapperClosable="false"
size="800px"
title="查看属性信息"
:visible.sync="showItemInfoModal"
@close="showItemInfoModal = false"
class="demo-drawer"
>
<div class="see-drawer-content">
<div class="see-drawer-div">
<label class="see-drawer-name" title="条款号">条款号</label>
<span class="see-drawer-val" :title="showItemInfoEO.itemsNum">{{ showItemInfoEO.itemsNum }}</span>
</div>
<div class="see-drawer-div">
<label class="see-drawer-name" title="条款名称">条款名称</label>
<span class="see-drawer-val" :title="showItemInfoEO.itemsName">{{ showItemInfoEO.itemsName }}</span>
</div>
<div class="see-drawer-div">
<label class="see-drawer-name" title="内容简介">内容简介</label>
<span class="see-drawer-val" :title="showItemInfoEO.itermsConditions ? showItemInfoEO.itermsConditions.replace(/<.*?>/ig, ' ') : ''">{{ showItemInfoEO.itermsConditions ? showItemInfoEO.itermsConditions.replace(/<.*?>/ig, ' ') : '' }}</span>
</div>
<!-- <div class="see-drawer-div">
<label class="see-drawer-name" title="责任部门">责任部门</label>
<span class="see-drawer-val" :title="showItemInfoEO.responsibleUnitShow">{{ showItemInfoEO.responsibleUnitShow }}</span>
</div>
<div class="see-drawer-div">
<label class="see-drawer-name" title="FO">FO</label>
<span class="see-drawer-val" :title="showItemInfoEO.foShow">{{ showItemInfoEO.foShow }}</span>
</div>
<div class="see-drawer-div">
<label class="see-drawer-name" title="项目评估角色">项目评估角色</label>
<span class="see-drawer-val" :title="showItemInfoEO.dutyEngineerShow">{{ showItemInfoEO.dutyEngineerShow }}</span>
</div>
<div class="see-drawer-div">
<label class="see-drawer-name" title="SVPPS">SVPPS</label>
<span class="see-drawer-val" :title="showItemInfoEO.svppsShow">{{ showItemInfoEO.svppsShow }}</span>
</div>
<div class="see-drawer-div">
<label class="see-drawer-name" title="适用车辆类型">适用车辆类型</label>
<span class="see-drawer-val" :title="getDicTypeName('applyArcticOptions', showItemInfoEO.applyArctic)">{{ getDicTypeName('applyArcticOptions', showItemInfoEO.applyArctic) }}</span>
</div>
<div class="see-drawer-div">
<label class="see-drawer-name" title="要求类型">要求类型</label>
<span class="see-drawer-val" :title="showItemInfoEO.claimTypeShow">{{ showItemInfoEO.claimTypeShow }}</span>
</div>
<div class="see-drawer-div">
<label class="see-drawer-name" title="企标覆盖关系">企标覆盖关系</label>
<span class="see-drawer-val" :title="getDicTypeName('BZFGGXOUIUJ', showItemInfoEO.busStandCover)">{{ getDicTypeName('BZFGGXOUIUJ', showItemInfoEO.busStandCover) }}</span>
</div>-->
</div>
</el-drawer>
<!--编辑条款内容-->
<el-drawer
:title="$t('m.editTerms')"
:wrapperClosable="false"
:visible.sync="editItemsContentModel"
size="800px"
class="otherStandardDetails-drawer"
@close="editItemsContentModel = false"
>
<div class="drawer-content-wrapper" style="height: 100%;overflow:auto;">
<div class="otherStandardDetails-drawer-content">
<el-row>
<el-col :span="6">
<el-button icon="md-add" @click="showAddContentInfo('noIndex')">{{$t('m.addTo')}}</el-button>
</el-col>
</el-row>
<div v-for="(item, index) in itemsContentList" :key="index">
<el-row>
<el-col :span="16" v-if="item.type === 'TEXT'">
<el-input v-model.trim="item.id" v-if="false"></el-input>
<el-input class="updateContentInput" v-model.trim="item.itemContent" placeholder="请输入" clearable :maxlength="1000"></el-input>
</el-col>
<el-col :span="16" v-if="item.type === 'IMG'">
<div style="padding-top: 10px">
<el-input v-model.trim="item.id" v-if="false"></el-input>
<a class="updateContentInput">{{item.imgName != null ? item.imgName : '未获取到图片'}}</a>
</div>
</el-col>
<el-col :span="16" v-if="item.type === 'TABLE'">
<div style="padding-top: 10px" class="wordTableStyle">
<el-input v-model.trim="item.id" v-if="false"></el-input>
<div class="updateContentInput">
<table>
<tr v-for="(itemRow, indexRow) in item.tableListShow" :key="indexRow">
<td v-for="(itemCol, indexCol) in itemRow" :key="indexCol">
<input v-model="itemCol.content">
</td>
</tr>
</table>
</div>
</div>
</el-col>
<el-col :span="8">
<el-button class="updateContentBtn" icon="md-add" @click="showAddContentInfo(index)">{{$t('m.addContent')}}</el-button>
<el-button class="updateContentBtn" icon="md-remove" @click="removeContentInfo(index, item.id)">{{$t('m.delete')}}</el-button>
</el-col>
</el-row>
</div>
</div>
</div>
<div class="demo-drawer-footer">
<el-button style="margin-right: 8px" @click="editItemsContentModel = false">{{$t('m.cancel')}}</el-button>
<el-button type="primary" @click="updateItemInfo('content')" :loading="isSubmit">{{$t('m.save')}}</el-button>
</div>
</el-drawer>
<!-- 选择添加内容类型-->
<el-dialog :visible.sync="chooseAddTypeModel" :title="$t('m.selectAddContentType')" width="700px" :show-close="false">
<el-row>
<el-col :span="8">
<el-button icon="el-icon-plus" @click="chooseType('TEXT')" class="chooseBtn">{{$t('m.addText')}}</el-button>
</el-col>
<el-col :span="8">
<el-button icon="el-icon-plus" @click="chooseType('IMG')" class="chooseBtn">{{$t('m.addPicture')}}</el-button>
</el-col>
<el-col :span="8">
<el-button icon="el-icon-plus" @click="chooseType('TABLE')">{{$t('m.addTable')}}</el-button>
</el-col>
</el-row>
<div slot="footer">
<el-button size="small" @click="chooseAddTypeModel = false">{{$t('m.cancel')}}</el-button>
<el-button size="small" type="primary" @click="addContentInfo">{{$t('m.sure')}}</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="showUploadModelFlag" :title="$t('m.uploadPictures')" width="700px">
<el-upload
:action="importImgUrl"
ref="importImg"
accept="image/*"
name="file"
:on-success="importFileSuccess"
:before-upload="imgBeforeUpload"
:show-file-list="showUploadlist"
:file-list="defaultFileList">
<el-button icon="el-icon-upload">{{$t('m.uploadPictures')}}</el-button>
</el-upload>
</el-dialog>
<el-dialog :visible.sync="showTableModelFlag" :title="$t('m.tableProperties')" width="700px">
<el-row>
<el-col :span="16">
<span>{{$t('m.numberOfRows')}}:</span>
<el-input class="updateContentInput" v-model.trim="rowCount" placeholder="$t('m.pleaseEnterAPositiveInteger')" clearable :maxlength="2"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<span>{{$t('m.numberOfColumns')}}</span>
<el-input class="updateContentInput" v-model.trim="colCount" :placeholder="$t('m.pleaseEnterAPositiveInteger')" clearable :maxlength="2"></el-input>
</el-col>
</el-row>
<div slot="footer">
<el-button size="mini" @click="showTableModelFlag = false">{{$t('m.cancel')}}</el-button>
<el-button size="mini" type="primary" @click="addTableInfo">{{$t('m.sure')}}</el-button>
</div>
</el-dialog>
<!-- 树结构添加树组织-->
<el-dialog
:visible.sync="menuModalFlag"
width="400px"
:title="menuModalTitle"
@close="menuModalFlag = false"
class="standards-tree-modal"
:close-on-click-modal="false"
>
<el-form ref="addMenuForm" :model="sarMenu" :rules="sarMenuRules" class="label-input-form" label-width="130px">
<el-form-item label="条款号" prop="name" class="add-form-item">
<el-input v-model.trim="sarMenu.name" placeholder="请输入名称" ></el-input>
</el-form-item>
<el-form-item label="条款名称" prop="itemName" class="add-form-item">
<el-input v-model="sarMenu.itemName" placeholder="请输入条款名称"></el-input>
</el-form-item>
<el-form-item label="序号" prop="displaySeq" class="add-form-item" v-if="menuAddOrUpdateFlag === 1">
<el-input v-model.number="sarMenu.displaySeq" placeholder="只允许输入正整数" maxlength="2"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" @click="newMenu">提交</el-button>
<el-button class="common-button-default" icon="el-icon-close" @click="menuModalFlag = false">取消</el-button>
</div>
</el-dialog>
<el-dialog :title="$t('m.confirmDeletion')" width="300px" :visible.sync="deleteMenuModal">
<p>该节点下有记录,是否删除?</p>
<div slot="footer">
<el-button size="mini" @click="deleteMenuModal = false">{{$t('m.cancel')}}</el-button>
<el-button type="primary" size="mini" @click="sureDeleteSarMenu">{{$t('m.sure')}}</el-button>
</div>
</el-dialog>
<el-dialog :title="$t('m.confirmDeletion')" width="300px" :visible.sync="deleteItemsModal">
<p>选择条款关联节点下包含子节点,是否全部删除?</p>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" @click="deleteItemsModal = false">{{$t('m.cancel')}}</el-button>
<el-button calss="common-button-primary" type="primary" @click="batchDeleteItem">{{$t('m.sure')}}</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="importModalshowflagtemp" :title="$t('m.importFile')" width="400px">
<el-upload
:multiple="false"
drag
show-file-list
:on-success="uploadSuccess"
:on-remove="removeOneFile"
:action="importImgUrl"
:file-list="defaultFilesList"
accept=".PDF, .doc, .docx, .ppt, .pptx"
:before-upload="editBeforeUpload"
name="file"
ref="importFileAboutLaws"
>
<div style="padding: 20px 0">
<i class="el-icon-upload" style="color: #3399ff; font-size: 52px;"></i>
<p>点击或拖拽上传文件</p>
</div>
</el-upload>
</el-dialog>
<el-dialog :title="$t('m.showPictures')" width="600px" style="height: 800px;" :visible.sync="showImg">
<div v-html="preImgContent" class="preImgStyle"></div>
</el-dialog>
<el-dialog :visible.sync="importModalshowflag" :title="$t('m.importFile')" width="400px">
<el-upload
multiple
:action="importExcelUrl"
ref="importfile"
name="file"
drag
:on-success="importItemsSuccess"
:before-upload="importItemsBeforeUpload"
:show-file-list="showUploadItemslist"
>
<div style="padding: 20px 0">
<i class="el-icon-upload" style="color: #3399ff; font-size: 52px;"></i>
<p>点击或拖拽上传文件</p>
</div>
</el-upload>
</el-dialog>
<el-dialog :visible.sync="importFailed" title="提示" :close-on-click-modal="false">
<div class="import-failed-content" style="max-height: 300px;overflow-y: auto;line-height: 30px;">
<span>{{ importForm.content }}</span>
</div>
<div slot="footer">
<el-button type="primary" size="large" @click="importFailed = false">{{$t('m.confirm')}}</el-button>
</div>
</el-dialog>
<!-- 修改模态框 -->
<el-drawer
:visible.sync="editInfoModal"
:title="$t('m.modifyInformation')"
size="700px">
<UEditor :content="ueContent" :config="config" ref="ueditor" @editor-onChange="uEditorChange"></UEditor>
<div class="demo-drawer-footer">
<el-button size="mini" @click="editInfoModal = false">{{$t('m.cancel')}}</el-button>
<el-button size="mini" type="primary" @click="editInfoModalSave">{{$t('m.save')}}</el-button>
</div>
</el-drawer>
<!--内容简介-->
<el-dialog :visible.sync="itemsTextDialogs" title="内容简介" :close-on-click-modal="false">
<div v-html="itemsText" class="itemsTextBox"></div>
<div slot="footer">
<el-button type="primary" size="large" @click="itemsTextDialogs = false">关闭</el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="openSubmitAndExamineVisible"
width="500px"
title="选择数据来源"
destroy-on-close
:close-on-click-modal="false"
>
<el-form ref="addMenuForm" class="label-input-form" label-width="80px">
<el-formItem label="数据来源" prop="menuName">
<!--<el-input v-model="sarMenu.menuName" placeholder="请输入名称"></el-input>-->
<el-select v-model="openSubmitAndExamineForm" placeholder="请选择">
<el-option label="国内标准法规FO" value="INLAND"></el-option>
<el-option label="海外标准法规FO" value="FOREIGN"></el-option>
<el-option label="政策法规FO" value="POLICY"></el-option>
</el-select>
</el-formItem>
</el-form>
<div slot="footer" class="demo-drawer-footer">
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" :loading="sumbitLoading" @click="submitAndExamine">提交</el-button>
<el-button class="common-button-default" icon="el-icon-close" @click="cancelSubmitAndExamineForm">取消</el-button>
</div>
</el-dialog>
<!--拆分条款审核提示-->
<el-dialog
title="审核提示"
:visible.sync="splitCheckDialog"
width="30%"
>
<span>是否审核?</span>
<span slot="footer" class="dialog-footer">
<el-button
type="danger"
size="mini"
@click="splitCheck(1)"
class="common-button-primary"
:loading="submitLoading"
>驳回</el-button>
<el-button
@click="splitCheck(0)"
type="primary"
class="common-button-primary"
size="mini"
:loading="submitLoading"
>通过</el-button>
</span>
</el-dialog>
<!--编辑抽屉-->
<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>
</div>
</template>
<script>
import 'zTree/js/jquery.ztree.core.js'
import 'zTree/js/jquery.ztree.excheck.js'
import 'zTree/js/jquery.ztree.exedit.js'
import CustomOrg from '@/components/CustomFormComponents/OrgTree'
import CustomSVPPS from '@/components/CustomFormComponents/SVPPS'
import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
import {mapGetters} from 'vuex'
// import deptTree from '../../../../processCenter/pages/components/deptTree'
export default {
name: 'ItemSplitInfo',
components: {
CustomSVPPS,
CustomRoleTree,
CustomOrg
},
data () {
return {
auditFlag: this.$route.query.auditFlag,
splitCheckDialog: false,
submitLoading: false,
jurisdiction: '',// 0 审核中 1 编辑中,且不是当前编辑人 2 有权限
editDrawerModal: false,
infoForm: {
id: '',
standId: '',
standNumSplit: '', // 标准号/政策号
standNameSplit: '', // 标准名称/政策名称
fileType: '' // 文本状态
},
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' }]
},
standFileClassifyOptions: [],
openSubmitAndExamineVisible: false,
openSubmitAndExamineForm: '',
itemsText: '',
itemsTextDialogs: false,
// ueFlag: false,
drawerModal: false,
shareStandardSelect: [],
zNodes: [],
sideClose: false,
treeList: [],
parentNode: '',
initZNode: '',
selectSarMenu: {},
total: 0,
tableHeight: null,
itemAllInfoList: [
{'id': 'item8', 'itemNum': '3.1', 'itemName': '护轮板安装要求', 'itemRequst': '在车轮中心向前30°和向后50°的两个辐射平面所形成的区域内,护轮板的宽度q应足以遮盖整个轮胎的宽度b(b为制造厂规定的轮胎或车轮组件的最大宽度),如属双胎,则轮胎宽度t应为两个轮胎的安装总宽度。轮胎的宽度:不包括胎壁上的牌号(记号)、装饰和保护带及筋条等。', 'treeId': 'id3.1'}
],
itemInfoList: [],
showItemRequestModel: false,
itemContent: '',
modalItemaddShowflag: false,
editInfoModal: false,
sarStandardItemRules: {},
applyArcticOptions: [], // 适用车型下拉框
requestOptions: [],
BZFGGXOUIUJ: [],
zNodesSItem: [],
zNodesSItemEngin: [],
standItemEO: {
id: '',
itemsNum: '',
itemsName: '',
menuId: '',
newcarPutTime: '',
productPutTime: '',
applyArctic: '', // 试用车型
remarks: '',
referenceStand: '',
specialRequest: '',
relevanceFile: '',
relevanceFileName: '',
FileNameList: [],
issForce: '',
responsibleUnit: '',
orgName: '',
quoteStand: '',
fo: '',
foShow: '',
dutyEngineer: '',
dutyEngineerShow: '',
svpps: '',
svppsShow:'',
claimType: '',
busStandCover: '',
fileType: '',
ZRBM: '',
},
standItemEOBlank: {
id: '',
itemsNum: '',
itemsName: '',
menuId: '',
svpps: '',
newcarPutTime: '',
productPutTime: '',
applyArctic: '', // 试用车型
remarks: '',
itermsConditions: '',
itemValEOList: [],
delItemIds: '' // 记录删除的VAL表条目ID
},
saveEditItemIndex: 0,
showItemInfoEO: {
id: '',
itemsNum: '',
itemsName: '',
menuId: '',
svpps: '',
newcarPutTime: '',
productPutTime: '',
applyArctic: '', // 试用车型
referenceStand: '', // 引用标准
relevanceFileName: '', // 关联文件
paramsList: [], // 特殊参数需求
remarks: '',
responsibleUnitShow: ''
},
showItemInfoModal: false,
selectedList: [], // 选中的table数据的ID
selectedAllList: [], // 选中的table数据
infoId: '',
itemsPage: 1,
itemsPageSize: this.$store.getters.userInfo.configContent,
itemsEo: {
menuId: '',
infoId: '',
page: 1,
pageSize: this.$store.getters.userInfo.configContent
},
editItemsContentModel: false,
itemsContentList: [],
saveItemId: '',
updateContentDiv: '',
buttonStrAdd: '<Button class="updateContentBtn" @click="addContentInfo">+</Button>',
buttonStrRem: '<Button class="updateContentBtn">-</Button>',
chooseAddTypeModel: false,
saveChooseAddType: '',
saveAddIndex: 0,
// 提交状态
isSubmit: false,
saveDeleteItemIds: '',
importImgUrl: 'api/att/attFile/upload',
showUploadlist: true, // 导入过程中新增数据时,如果数据错误,不出现导入列表
saveUploadImgIndex: 0,
uploadImgEO: {
id: '',
name: '',
filePath: ''
},
defaultFileList: [],
showUploadModelFlag: false,
showTableModelFlag: false,
rowCount: 1,
colCount: 1,
tableList: [
[1, 2, 3, 4],
[5, 6, 7, 8]
],
sarMenu: {
displaySeq: '',
itemName: '',
name: ''
},
menuModalTitle: '',
menuModalFlag: false,
menuAddOrUpdateFlag: '',
sarMenuRules: {
name: [
{required: true, message: '条款号不能为空', trigger: 'blur'},
{type: 'string', max: 100, message: '条款号不能超过100个字符', trigger: 'blur'}
],
itemName: [
{required: true, message: '条款名称不能为空', trigger: 'blur'},
{type: 'string', max: 100, message: '条款名称不能超过100个字符', trigger: 'blur'}
],
displaySeq: [
{type: 'number', required: true, message: '序号不能为空且为正整数', trigger: 'blur'},
{type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'}
]
},
deleteMenuModal: false,
itemTableBlank: {
id: '',
rowNum: '',
colNum: '',
content: ''
},
itemsContentListShow: [],
importModalshowflagtemp: false,
defaultFilesList: [],
preImgContent: '',
showImg: false,
loading: false,
deleteItemsModal: false,
ueContent: '',
// UE编辑器配置
config: {
// 可以在此处定义工具栏的内容
toolbars: [
[
'undo', // 撤销
'redo', // 重做
'bold', // 加粗
'italic', // 斜体
'underline', // 下划线
'strikethrough', // 删除线
'subscript', // 下标
'superscript', // 上标
'fontborder', // 字符边框
'fontfamily', // 字体
'fontsize', // 字号
'forecolor', // 字体颜色
// 'backcolor', // 背景色
'paragraph', // 段落格式
'customstyle', // 自定义标题
'indent', // 首行缩进
'justifyleft', // 居左对齐
'justifyright', // 居右对齐
'justifycenter', // 居中对齐
'justifyjustify', // 两端对齐
'lineheight', // 行间距,
'rowspacingtop', // 段前距
'rowspacingbottom', // 段后距
'directionalityltr', // 从左向右输入
'directionalityrtl', // 从右向左输入
'fullscreen' // 全屏
],
[
'cleardoc', // 清空文档
'formatmatch', // 格式刷
'removeformat', // 清除格式
'source', // 源代码
'blockquote', // 引用
'pasteplain', // 纯文本粘贴模式
'selectall', // 全选
'horizontal', // 分隔线
'time', // 时间
'date', // 日期
'link', // 超链接
'unlink', // 取消链接
// 'background', // 背景
// 'simpleupload', // 单图上传
'imagenone', // 默认
'imageleft', // 左浮动
'imageright', // 右浮动
'imagecenter', // 居中
'touppercase', // 字母大写
'tolowercase', // 字母小写
'emotion', // 表情
'spechars', // 特殊字符
'searchreplace', // 查询替换
'insertunorderedlist', // 无序列表
'insertorderedlist', // 有序列表
'pagebreak', // 分页
'insertframe', // 插入Iframe
'charts', // 图表
'edittip ', // 编辑提示
'autotypeset', // 自动排版
'drafts' // 从草稿箱加载
],
[
'inserttable', // 插入表格
'deletetable', // 删除表格,
'insertparagraphbeforetable', // ”表格前插入行”
'insertrow', // 前插入行
'insertcol', // 前插入列
'mergeright', // 右合并单元格
'mergedown', // 下合并单元格
'deleterow', // 删除行
'deletecol', // 删除列
'splittorows', // 拆分成行
'splittocols', // 拆分成列
'splittocells', // 完全拆分单元格
'inserttitle', // 插入标题
'deletecaption', // 删除表格标题,
'mergecells', // 合并多个单元格
'edittable', // 表格属性
'edittd' // 单元格属性
]
],
autoHeightEnabled: false,
autoFloatEnabled: false,
initialContent: '', // 初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
autoClearinitialContent: true, // 是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
initialFrameWidth: 650,
elementPathEnabled: false,
initialFrameHeight: 300,
maximumWords: 4000,
BaseUrl: '',
UEDITOR_HOME_URL: 'static/ueditor/',
editTableIndex: 1,
zIndex: 5000
},
importModalshowflag: false,
showUploadItemslist: true,
importExcelUrl: '',
importForm: {
content: ''
},
importFailed: false,
referanceStandList: [],
copyMessage: '', // 复制文本
sumbitLoading: false
}
},
methods: {
splitCheckBtn() {
this.splitCheckDialog = true
},
/**
* 拆分条款审核
* state:状态
* 0: 通过 1:驳回
* */
splitCheck (state) {
this.$confirm(state ? '是否驳回?':'是否通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
let listAgain = {}
listAgain.msgResult = state
listAgain.id = this.$route.query.auditId
this.$http.postData('lawss/sarFileSplitInfo/updateNew', listAgain, {
_this: this,
loading: 'submitLoading'
}, res => {
if (res.ok) {
this.splitCheckDialog = false
this.auditFlag = '0'
this.$message({
type: 'success',
message: '审核已完成'
})
} else {
this.$message.warning(res.message)
}
})
}).catch(() => {
this.splitCheckDialog = false
});
},
// 点击编辑 按钮事件 修改标准编号标准状态
editInfo () {
if (!this.jurisdictionCheck()) {
return
}
const query = this.infoForm
this.editForm.id = query.infoId
this.editForm.standNumSplit = query.standNumSplit
this.editForm.standNameSplit = query.standNameSplit
this.editForm.fileType = query.fileType
this.editDrawerModal = true
},
// 编辑 保存事件
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.infoForm.standNumSplit = this.editForm.standNumSplit
this.infoForm.standNameSplit = this.editForm.standNameSplit
this.infoForm.fileType = this.editForm.fileType
// this.$route.query.standNumSplit = this.editForm.standNumSplit
// this.$route.query.standNameSplit = this.editForm.standNameSplit
// this.$route.query.fileType = this.editForm.fileType
// this.$router.replace({
// query: {
// ...this.$route.query,
// standNumSplit: this.editForm.standNumSplit,
// standNameSplit: this.editForm.standNameSplit,
// fileType: this.editForm.fileType
// }
// })
// this.getSarFileSplitInfoEOPage()
}
})
} else {
this.isSubmit = false
this.$message.warning('请检查表单是否填写正确')
}
})
},
getFileSel () {
this.$http.get('lawss/sarStandAttrDetails/getFileFieldForSel', {}, {
_this: this
}, res => {
if (res.ok) {
const standFileClassifyOptions = []
res.data.map(item => {
if (item.label !== '相关资料') {
standFileClassifyOptions.push(item)
}
})
this.standFileClassifyOptions = standFileClassifyOptions
}
})
},
// 责任部门选择事件
onChecked (checkedName) {
this.standItemEO.responsibleUnit = this.standItemEO.ZRBM
this.standItemEO.responsibleUnitShow = checkedName
this.standItemEO.fo = ''
this.standItemEO.foShow = ''
this.dutyEngineer = ''
this.dutyEngineerShow = ''
},
cancelSubmitAndExamineForm() {
this.openSubmitAndExamineForm = ''
this.openSubmitAndExamineVisible = false
},
itemsTextDialog (itemsNum, text) {
this.itemsTextDialogs = true
this.itemsText = '<p>' + itemsNum + '</p>' + text.replace(/''/g, '\'')
},
getDate (date) {
return date !== undefined && date != null ? date.split(' ')[0] : ''
},
previewImage (content) {
this.preImgContent = content
this.showImg = true
},
uEditorChange () {
this.itemContent = this.$refs.ueditor.getUEContent()
},
// 返回
back () {
if (this.$store.state.detailMap !== '') {
this.$router.push({
path: this.$store.state.detailMap,
query: {
type: '1'
}
})
this.$store.commit('setDetailMap', '')
} else {
let lastPathList = this.$store.getters.getLastDetailMap
let lastPath = lastPathList[lastPathList.length - 1]
this.$router.push(lastPath)
lastPathList.pop(1)
this.$store.commit('setLastDetailMap', JSON.stringify(lastPathList))
}
},
standSelectChange (data) {
this.selectedList = []
this.selectedAllList = data
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id)
}
},
// 分页点击后方法
pageChange (page) {
this.selectedAllList = []
this.itemsPage = page
this.getSplitItemsByPage()
},
// 分页每页显示数改变后方法
pageSizeChange (pageSize) {
this.selectedAllList = []
this.itemsPageSize = pageSize
this.getSplitItemsByPage()
},
selcetTree (treeId, treeNode) {
this.shareStandardSelect = treeNode.id
},
shareStandardBt () {
if (this.shareStandardSelect.length === 0) {
this.$message.warning('请选择要分享的人!')
} else {
this.drawerModal = false
this.$message.success('分享成功')
}
},
clickDropMenu (name, treeNode) {
this.selectSarMenu = JSON.parse(JSON.stringify(treeNode))
if (undefined !== this.selectSarMenu.id) { // 当前有选中节点
if (name === 'newMenu') {
this.menuModalTitle = this.$t('m.newContents')
this.menuModalFlag = true
this.menuAddOrUpdateFlag = 1
this.sarMenu.infoId = this.infoId
this.$nextTick(() => {
this.$refs['addMenuForm'].resetFields()
this.sarMenu = {id: '', infoId: '', pId: '', name: '', itemName: '', displaySeq: '', remarks: ''}
})
} else if (name === 'editMenu') {
this.menuAddOrUpdateFlag = 2
this.menuModalTitle = this.$t('m.editDirectory')
this.menuModalFlag = true
this.$nextTick(() => {
this.$refs.addMenuForm.resetFields()
this.sarMenu = JSON.parse(JSON.stringify(this.selectSarMenu)) // 修改过程中直接将sarMenu对象置为当前选中的对象
this.sarMenu.name = this.selectSarMenu.number
for (let i in this.sarMenu) {
if (this.sarMenu[i] === null) {
this.sarMenu[i] = ''
}
}
})
// this.sarMenu.menuName = JSON.parse(JSON.stringify(this.selectSarMenu.oldname || this.selectSarMenu.name))
} else {
if (this.selectSarMenu.pId == null) { // 如果父id为null 说明是根目录
this.$Modal.info({
title: '提示',
content: '根目录不可删除!'
})
} else {
// deleteMenu 删除二级菜单,先判断是否选中,选中项目,然后调用删除方法
// 先判断目录下是否有菜单
this.sureDeleteSarMenu()
// this.$http.post('lawss/sarFileSplitMenu/judgequeryMenuByPid', this.selectSarMenu, {
// _this: this
// }, res => {
// if (res.data) {
// this.deleteMenuModal = true
// } else {
//
// }
// }, e => {
// })
}
}
} else {
this.$Modal.info({
title: '提示',
content: '请选择节点!'
})
}
},
sureDeleteSarMenu () {
this.$confirm('该节点下若有子节点将同步删除,确认删除该条数据?', '确认删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
this.$http.delete('lawss/sarFileSplitMenu/deleteMenu', {
id: this.selectSarMenu.id
}, {
_this: this
}, res => {
// this.selcetTree()
// 获取下一个节点
let currentNode = this.$refs.domesticTree.getNextNode()
let nodeId = ''
// 如果这个节点为null, 本次删除了最后一个节点
if (currentNode === null) {
// 选中根节点
this.$refs.domesticTree.selectRootNode()
} else {
nodeId = currentNode.id
}
this.selectSarMenu.id = nodeId
this.selectMenu()
this.getSplitItemsByPage()
}, e => {
})
}).catch(() => {})
},
newMenu () {
this.$refs['addMenuForm'].validate((valid) => {
if (valid) {
if (this.menuAddOrUpdateFlag === 1) {
this.sarMenu.pId = this.selectSarMenu.id
this.sarMenu.infoId = this.infoId
this.$http.post('lawss/sarFileSplitMenu/addMenu', this.sarMenu, {
_this: this, loading: 'loading'
}, res => {
this.selectMenu() // 新增成功后,更新二级菜单
this.menuModalFlag = false
}, e => {
})
} else {
this.$http.put('lawss/sarFileSplitMenu/updateMenu', this.sarMenu, {
_this: this, loading: 'loading'
}, res => {
this.selectMenu() // 修改成功后,更新二级菜单
this.selectSarMenu = res.data
this.menuModalFlag = false
}, e => {
})
}
} else {
}
})
},
treeClick (treeNode) {
this.selectSarMenu = treeNode
this.getSplitItemsByPage()
},
treeRightClick (treeNode) {
if (this.jurisdictionCheckForTree) {
return
}
this.$refs.domesticTree.hideRMenu()
},
selectMenu () {
this.$http.get('lawss/sarFileSplitMenu/getSplitMenusByInfoId', {
infoId: this.infoId
}, {
_this: this
}, res => {
let cur = res.data
let str = []
let option = {}
for (var i = 0; i < cur.length; i++) {
option = { id: cur[i].id,
pId: cur[i].pid,
name: cur[i].name + ' ' + (cur[i].itemName != null ? cur[i].itemName : ''),
number: cur[i].name,
itemName: cur[i].itemName != null ? cur[i].itemName : '',
displaySeq: cur[i].displaySeq,
remarks: cur[i].remarks}
str.push(option)
if (cur[i].pId == null || cur[i].pId === '') {
this.parentNode = cur[i]
}
console.log(str);
this.zNodes = str
}
// 查完左侧目录后,如果没有选中的,设置最外层选中
if (JSON.stringify(this.selectSarMenu) === '{}') {
this.selectSarMenu = JSON.parse(JSON.stringify(this.parentNode))
}
// console.log(this.selectSarMenu)
}, e => {
})
},
editItemInfo () {
this.itemInfoList.splice(this.saveEditItemIndex, 1)
if (this.standItemEO.tackTime1 != null && this.standItemEO.tackTime1 !== '') {
this.standItemEO.tackTime1 = this.$dateFormat(this.standItemEO.tackTime1, 'yyyy-MM-dd hh:mm:ss')
}
if (this.standItemEO.tackTime != null && this.standItemEO.tackTime !== '') {
this.standItemEO.tackTime = this.$dateFormat(this.standItemEO.tackTime, 'yyyy-MM-dd hh:mm:ss')
}
let nowlocalPro = JSON.parse(JSON.stringify(this.standItemEO))
this.itemInfoList.unshift(nowlocalPro)
this.modalItemaddShowflag = false
this.$message.success('编辑成功')
},
uploadImportModal () {
if (!this.jurisdictionCheck()) {
return
}
window.open('/api/att/attFile/uploadModalFile?fileName=标准拆分导入模板.zip')
},
// 导入事件
importItemInfo () {
if (!this.jurisdictionCheck()) {
return
}
this.importModalshowflag = true
this.showUploadItemslist = true
let menuId = this.selectSarMenu.id
this.importExcelUrl = '/api/lawss/sarFileSplitItems/importSplitItemsZip?menuId=' + menuId + '&infoId=' + this.infoId
this.$nextTick(() => {
this.$refs.importfile.clearFiles()
})
},
// 导出事件
exportItemInfo () {
if (!this.jurisdictionCheck()) {
return
}
let exportName = this.infoForm.standNumSplit + this.infoForm.standNameSplit
if (this.selectedList != null && this.selectedList.length > 0) {
let ids = this.selectedList.join(',')
window.open('/api/lawss/sarFileSplitItems/exportSplitInfoZip?idList=' + ids + '&infoId=' + this.infoId + '&exportName=' + exportName)
} else {
this.$confirm('当前未选择条款信息,是否导出全部内容?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
window.open('/api/lawss/sarFileSplitItems/exportSplitInfoZip?ids=null&infoId=' + this.infoId + '&exportName=' + exportName)
}).catch(() => {})
}
},
// 批量删除
judgebatchDeleteItem () {
if (!this.jurisdictionCheck()) {
return
}
if (this.selectedList != null && this.selectedList.length > 0) {
this.$http.get('lawss/sarFileSplitItems/judgeContaintChilds', {
ids: this.selectedList.join(',')
}, {
_this: this
}, res => {
if (res.data) {
this.batchDeleteItem()
} else {
this.deleteItemsModal = true
}
}, e => {
})
} else {
this.$message.warning('请选择要删除的数据')
}
},
batchDeleteItem () {
if (this.selectedList != null && this.selectedList.length > 0) {
this.$confirm('确认删除选择数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
this.deleteItemsModal = false
this.$http.post('lawss/sarFileSplitItems/batchDeleteItems', {
ids: this.selectedList.join(',')
}, {
_this: this
}, res => {
this.getSplitItemsByPage()
this.selectMenu()
// 获取下一个节点
let currentNode = this.$refs.domesticTree.getNextNode()
let nodeId = ''
// 如果这个节点为null, 本次删除了最后一个节点
if (currentNode === null) {
// 选中根节点
this.$refs.domesticTree.selectRootNode()
} else {
nodeId = currentNode.id
}
this.selectSarMenu.id = nodeId
}, e => {
})
}).catch(() => {})
} else {
this.$message.warning('请选择要删除的数据')
}
},
// 批量复制 事件
batchCopy (e) {
if (!this.jurisdictionCheck()) {
return
}
if (this.selectedAllList.length > 0) {
let ids = []
let menuids = []
let infoIds = []
this.selectedAllList.map((item, index) => {
this.copyMessage += index + 1 + '、 ' + item.itemsNum + ' ' + item.itemsName + ' ' + `${item.itermsConditions}` + `\n`
ids.push(item.id)
menuids.push(item.menuId)
infoIds.push(item.infoId)
})
this.$http.post('lawss/sarFileSplitMenu/copyMenuNotChildrenall', {
ids: ids.join(), // 选中的记录的id
menuids: menuids.join(), // 选中的记录的menuid
infoIds: infoIds.join() // 选中的记录的infoId
}, {
_this: this,
loading: 'loading'
},
res => {
if (res.ok) {
this.$copyText(this.copyMessage).then((e) => {
})
this.selectMenu()
this.getSplitItemsByPage()
}
})
} else {
this.$message.warning('请选择要复制的数据')
}
},
combineItems () {
if (!this.jurisdictionCheck()) {
return
}
if (this.selectedAllList.length > 1) {
this.$confirm('确认合并选中条款吗?', '合并条款', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
let ids = []
this.selectedAllList.map((item, index) => {
ids.push(item.id)
})
this.$http.post('lawss/sarFileSplitItems/combineItems', {
ids: ids.join()
}, {
_this: this, loading: 'loading'
},
res => {
if (res.ok) {
this.selectMenu()
this.getSplitItemsByPage()
}
})
}).catch(() => {})
} else {
this.$message.warning('请选择至少两条数据进行合并')
}
},
getSplitItemsByPage () {
let itemsEoPage = this.itemsEo
if (this.selectSarMenu.pId == null || this.selectSarMenu.pId === '') {
itemsEoPage.menuId = null
} else {
itemsEoPage.menuId = this.selectSarMenu.id
}
itemsEoPage.infoId = this.infoId
itemsEoPage.page = this.itemsPage
itemsEoPage.pageSize = this.itemsPageSize
this.$http.get('lawss/sarFileSplitItems/getSplitItemsByPage', itemsEoPage, {
_this: this,
loading: 'loading'
}, res => {
this.itemInfoList = res.data.list
this.total = res.data.count
}, e => {
})
},
updateItemInfo (type) {
this.isSubmit = true
let updateEO = JSON.parse(JSON.stringify(this.standItemEO))
if (this.standItemEO.applyArctic != null && this.standItemEO.applyArctic !== '') {
updateEO.applyArctic = JSON.parse(JSON.stringify(this.standItemEO.applyArctic)).join(',')
}
updateEO.id = this.standItemEO.id
updateEO.itemValEOList = JSON.parse(JSON.stringify(this.itemsContentList))
updateEO.delItemIds = this.saveDeleteItemIds
if (this.standItemEO.newcarPutTime != null && this.standItemEO.newcarPutTime !== '') {
updateEO.newcarPutTime = this.$dateFormat(this.standItemEO.newcarPutTime, 'yyyy-MM-dd hh:mm:ss')
}
if (this.standItemEO.productPutTime != null && this.standItemEO.productPutTime !== '') {
updateEO.productPutTime = this.$dateFormat(this.standItemEO.productPutTime, 'yyyy-MM-dd hh:mm:ss')
}
updateEO.itemValEOList.map(item => {
item.itemContent = item.itemContent.replace('\"','')
})
updateEO.itermsConditions = undefined
let submitEO = JSON.stringify(updateEO).replace('\\"','')
submitEO = submitEO.replace(/'/g, "''")
this.$http.putData('lawss/sarFileSplitItems/updateSplitItems', submitEO, {
_this: this
}, res => {
this.isSubmit = false
if (res.ok) {
this.modalItemaddShowflag = false
// this.showItemRequestDetails()
// let content = res.data.itermsConditions
// $('#itemContentHtml').html(content)
this.getSplitItemsByPage()
}
}, e => {
})
},
cancleUpdateContent () {
this.showItemRequestModel = false
},
showUpdateItemInfo () {
this.itemsContentList = []
this.saveChooseAddType = ''
this.saveAddIndex = 0
this.saveDeleteItemIds = ''
// this.editItemsContentModel = true
this.$http.get('lawss/sarFileSplitItemsVal/getItemsValList', {
itemId: this.saveItemId
}, {
_this: this
}, res => {
res.data.map(item => {
item.itemContent = item.itemContent.replace(/''/g, '\'')
})
this.itemsContentList = res.data
}, e => {
})
},
showAddContentInfo (index) {
this.chooseAddTypeModel = true
this.saveChooseAddType = ''
if (index === 'noIndex') {
if (this.itemsContentList != null && this.itemsContentList.length > 0) {
this.saveAddIndex = this.itemsContentList.length - 1
} else {
this.saveAddIndex = 0
}
} else {
this.saveAddIndex = index
}
},
chooseType (type) {
this.saveChooseAddType = type
},
addContentInfo () {
if (this.saveChooseAddType != null && this.saveChooseAddType !== '') {
this.chooseAddTypeModel = false
let obj = {'id': '', 'itemContent': '', 'type': this.saveChooseAddType, 'itemId': this.saveItemId, 'defaultFileList': [], index: this.saveAddIndex + 1}
this.itemsContentList.splice(this.saveAddIndex + 1, 0, obj)
if (this.saveChooseAddType === 'IMG') {
this.showUploadModelFlag = true
this.$nextTick(() => {
this.$refs.importImg.clearFiles()
})
} else if (this.saveChooseAddType === 'TABLE') {
this.rowCount = 1
this.colCount = 1
this.showTableModelFlag = true
}
} else {
this.$message.warning('请选择添加内容类型')
}
},
addTableInfo () {
if (this.rowCount > 0 && this.colCount > 0) {
let allTableList = []
let tableStr = '<table class=\'wordTable\'>'
for (let r = 0; r < this.rowCount; r++) {
let rowTableList = []
tableStr += '<tr>'
for (let c = 0; c < this.colCount; c++) {
tableStr += '<td></td>'
let tableEO = {}
tableEO.id = ''
tableEO.rowNum = r + 1
tableEO.colNum = c + 1
tableEO.content = ''
rowTableList.push(tableEO)
}
tableStr += '</tr>'
allTableList.push(rowTableList)
}
tableStr += '</table>'
this.itemsContentList[this.saveAddIndex + 1].itemContent = tableStr
this.showTableModelFlag = false
this.editContentInfo(this.itemsContentList[this.saveAddIndex + 1], this.saveAddIndex + 1)
} else {
this.$message.warning('请输入添加表格的行数及列数')
}
},
removeContentInfo (index, itemId) {
this.itemsContentList.splice(index, 1)
this.saveDeleteItemIds += itemId + ','
for (let i = index; i < this.itemsContentList.length; i++) {
this.itemsContentList[i].index = i
}
},
// 修改
editContentInfo (item, index) {
// this.ueFlag = true
this.editTableIndex = index
this.editInfoModal = true
this.$nextTick(() => {
this.$refs.ueditor.setContent(item.itemContent)
})
},
// 保存
editInfoModalSave () {
let newContent = this.$refs.ueditor.getUEContent()
if (newContent != null && newContent !== '') {
let regEd = /<\/table>/g
let regSt = /<table/g
let countSt = newContent.match(regSt)
let countEd = newContent.match(regEd)
if (countSt === null) {
this.$message.warning('内容必须包含一个表格')
} else if (countSt.length > 1 && countEd.length > 1) {
this.$message.warning('内容仅能包含一个表格')
} else {
let stIndex = newContent.indexOf('<table')
let edIndex = newContent.indexOf('</table>')
newContent = newContent.substring(stIndex, edIndex + 8)
this.editInfoModal = false
// this.ueFlag = false
newContent = newContent.replace(/"/g, '\'')
this.itemsContentList[this.editTableIndex].itemContent = newContent
}
} else {
this.$message.warning('内容不能为空')
}
},
// 上传图片之前的钩子函数
imgBeforeUpload (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 (fileSuffix !== '.jpg' && fileSuffix !== '.jpeg' && fileSuffix !== '.png' && fileSuffix !== '.gif') {
this.$message.warning('文件' + file.name + '格式不正确,请上传jpg、jpeg、png、gif文件')
return false
}
if (file.size / 1024 / 1024 > 300) {
this.$message.warning('文件大小不能超过300M')
return false
}
return true
},
// 上传图片事件
importFileSuccess (res, file) {
// this.itemsContentList[this.saveAddIndex + 1].defaultFileList = []
if (res.ok) {
let imgPath = res.data.filePath
let imgName = res.data.fileName
let imgSrc = 'uploadPath' + imgPath + imgName
// let imgSrc = imgPath + imgName
// this.itemsContentList[this.saveUploadImgIndex].itemContent = 'uploadPath' + imgPath + imgName
this.itemsContentList[this.saveAddIndex + 1].itemContent = '<img class=\'wordImg\' src=\'' + imgSrc + '\'>'
this.itemsContentList[this.saveAddIndex + 1].imgName = res.data.filePath + res.data.fileName
this.showUploadModelFlag = false
} else {
this.$message.error(res.message)
}
},
importItemsSuccess (response, file) {
if (response.ok) {
this.showUploadItemslist = true
this.importModalshowflag = false
this.spinShow = false
this.selectMenu()
this.getSplitItemsByPage()
this.$message.success(response.message)
} else {
this.showUploadItemslist = false
this.spinShow = false
this.importFailed = true
this.importForm.content = response.message
}
},
// 文件上传之前的钩子函数
importItemsBeforeUpload (file) {
// const fileSuffix = file.name.split('.')[1] // 后缀名
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
if (fileSuffix !== '.zip' && fileSuffix !== '.ZIP') {
this.$message.warning('文件' + file.name + '格式不正确,请上传zip文件')
return false
}
if (file.size / 1024 / 1024 > 300) {
this.$message.warning('文件大小不能超过300M')
return false
}
return true
},
showItemRequestDetails () {
this.itemsContentListShow = []
this.$http.get('lawss/sarFileSplitItemsVal/getItemsValList', {
itemId: this.saveItemId
}, {
_this: this
}, res => {
this.itemsContentListShow = res.data
}, e => {
})
},
// 拖拽完节点后,调用的方法,第一参数是要拖拽的节点,第二个参数是目标位置
afterDrop (treeNode, nowNode, moveType) {
let nowSplitMenuEO = {
menuId: treeNode[0].id,
menuParentId: treeNode[0].pId,
menuDisplay: treeNode[0].displaySeq,
targetMenuId: nowNode.id,
targetParentId: nowNode.pId,
targetMenuDisplay: nowNode.displaySeq,
infoId: this.infoId,
moveType: moveType
}
this.$http.postData('lawss/sarFileSplitMenu/dragMenu', nowSplitMenuEO, {
_this: this
}, res => {
this.selectMenu()
}, e => {
})
},
removeOneFile (file, fileList) {
let ids = this.standItemEO.relevanceFile.split(',')
let fileIds = file.response.data.id
let newIdList = this.removeArray(ids, fileIds)
let newStr = ''
if (newIdList != null && newIdList.length > 0) {
for (let i = 0; i < newIdList.length; i++) {
if (newIdList[i] !== '') {
newStr += newIdList[i] + ','
}
}
this.standItemEO.relevanceFile = newStr
} else {
this.standItemEO.relevanceFile = ''
}
},
// 删除数组中的某个对象
removeArray (_arr, _obj) {
var length = _arr.length
for (var i = 0; i < length; i++) {
if (_arr[i] === _obj) {
if (i === 0) {
_arr.shift() // 删除并返回数组的第一个元素
return _arr
} else if (i === length - 1) {
_arr.pop() // 删除并返回数组的最后一个元素
return _arr
} else {
_arr.splice(i, 1) // 删除下标为i的元素
return _arr
}
}
}
},
// 编辑 文件上传 之前的钩子函数
editBeforeUpload (file) {
// const fileSuffix = file.name.split('.')[1] // 后缀名
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
if (fileSuffix !== '.pdf' && fileSuffix !== '.PDF' && fileSuffix !== '.doc' && fileSuffix !== '.docx' && fileSuffix !== '.ppt' && fileSuffix !== '.pptx') {
this.$message.warning('文件' + file.name + '格式不正确,请上传pdf、PDF、doc、docx、ppt、pptx文件')
return false
}
if (file.size / 1024 / 1024 > 200) {
this.$message.warning('文件大小不能超过200M')
return false
}
return true
},
// 编辑 文件 上传事件
uploadSuccess (res, file, fileList) {
if (res.ok) {
this.standItemEO.relevanceFile += res.data.id + ','
this.$message.success('文件上传成功')
// this.importModalshowflagtemp = false
} else {
this.$message.error(res.message)
}
},
uploadFiles () {
this.importModalshowflagtemp = true
this.defaultFilesList = []
if (this.standItemEO.relevanceFile === 'null' || this.standItemEO.relevanceFile == null) {
this.standItemEO.relevanceFile = ''
}
this.$nextTick(() => {
this.$refs.importFileAboutLaws.clearFiles()
})
let fileList
if (this.standItemEO.relevanceFile != null && this.standItemEO.relevanceFile !== '') {
let paramefile = this.standItemEO.relevanceFile
if (paramefile.charAt(paramefile.length - 1) === ',') {
paramefile = paramefile.substring(0, paramefile.length - 1)
}
this.$http.get('att/attFile/getMultiFileInfos', {
fileIds: paramefile
}, {
_this: this
}, res => {
fileList = res.data
if (fileList != null && fileList.length > 0) {
for (let i = 0; i < fileList.length; i++) {
let obj = {name: '', response: {}}
obj.name = fileList[i].oldFileName
obj.response.data = fileList[i]
this.defaultFilesList.push(obj)
}
}
}, e => {
})
}
},
// 获取关联文件名称
getFileName (row) {
this.referanceStandList = []
if (row.referenceStand != null && row.referenceStand !== '') {
this.referanceStandList = row.referenceStand.split(',')
}
if (row.relevanceFile === null) {
this.standItemEO.FileNameList = []
this.showItemInfoModal = true
return false
} else {
this.$http.get('att/attFile/getMultiFileInfos', {
fileIds: row.relevanceFile
}, {
_this: this
}, res => {
// let fileNameList = []
// this.standItemEO.relevanceFileName = ''
// res.data.map((item) => {
// fileNameList.push(item.oldFileName)
// })
// this.standItemEO.relevanceFileName = fileNameList.join(';')
this.standItemEO.FileNameList = res.data
this.showItemInfoModal = true
}, e => {
this.showItemInfoModal = true
})
}
},
addSpecialRequest (item, index) {
let specialObj = {
description: '',
figure: ''
}
this.standItemEO.paramsList.push(specialObj)
},
delSpecialRequest (item, index) {
this.standItemEO.paramsList.splice(index, 1)
},
// 树结构右键点击节点复制
copyOneNode (treeNode) {
this.$confirm('确认复制选中节点?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
this.$http.postData('lawss/sarFileSplitMenu/copyMenu', treeNode, {
_this: this, loading: 'loading'
}, res => {
this.selectMenu()
}, e => {
})
}).catch(() => {})
},
openFileInPdf (attId, oldFileName) {
this.$http.get('lawss/sarFileSplitItemsFile/queryConvertAtt', {
attId: attId
}, {
_this: this
}, res => {
if (res.data) {
let fileObj = {}
fileObj.fileId = res.data.attId
fileObj.fileName = oldFileName
let fileList = []
let repeatData = 0
if (sessionStorage.getItem('fileInfo')) {
fileList = JSON.parse(sessionStorage.getItem('fileInfo'))
if (fileList != null && fileList.length > 0) {
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].fileId === res.data.attId) {
repeatData = 1
break
}
}
if (repeatData === 0) {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
}
} else {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId))
} else {
this.$message.error('文档未转换成功或本地读取不到该文档')
}
}, e => {
this.$message.error('文档未转换成功或本地读取不到该文档')
})
},
downloadFile (attId) {
if (attId != null && attId !== '') {
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
} else {
this.$message.error('请选择要下载的文件')
}
},
downloadFileByWater (attId, fileSuffix) {
if (fileSuffix !== 'pdf' && fileSuffix !== 'PDF') {
this.$message.error('水印下载仅支持PDF,pdf格式文件')
} else {
if (attId != null && attId !== '') {
window.location.href = '/api/att/attFile/downloadFileForSarWaterMark?fileId=' + attId
} else {
this.$message.error('请选择要下载的文件')
}
}
},
showReferStandDetials (standNum) {
// 验证标准号在系统中是否存在
this.$http.post('lawss/sarTestItem/validateStandNumber', {
standnumber: standNum
}, {
_this: this
}, res => {
if (res.ok) {
let getStandId = res.data.standid
let getStandType = res.data.standType
this.$http.get('lawss/sarMenu/judgeSarMenuByRole', {
sarId: getStandId,
sarType: getStandType
}, {
_this: this
}, res => {
if (res.ok) {
let pageTpe = ''
let id = ''
let routename = ''
if (getStandType === 'INLAND_STAND' || getStandType === 'FOREIGN_STAND') {
if (this.$hasPermission('SSA6WR4HV8')) {
pageTpe = getStandType
id = getStandId
routename = 'OtherStandardDetails'
} else {
this.$message.warning('无权访问')
}
} else if (getStandType === 'INLAND_LAWS' || getStandType === 'FOREIGN_LAWS') {
if (this.$hasPermission('A2HDHMEA6W')) {
pageTpe = getStandType
id = getStandId
routename = 'OtherLawsDetails'
} else {
this.$message.warning('无权访问')
}
} else if (getStandType === 'BUSSIONESS_STAND') {
if (this.$hasPermission('YJUHC32R7G')) {
pageTpe = 'BUSINESS_STAND'
id = getStandId
routename = 'OtherBussStandardDetails'
} else {
this.$message.warning('无权访问')
}
}
if (routename !== '') {
let routeUrl = this.$router.resolve({
name: routename,
params: {
id: id,
pageType: pageTpe
}
})
window.open(routeUrl.href, '_blank')
}
} else {
this.$message.error(res.message)
}
}, e => {
})
}
}, e => {
})
},
// 点击更多 事件
handleCommand (command) {
if (!this.jurisdictionCheck()) {
return
}
switch (command[1]) {
case '复制':
this.$confirm('确认复制该条款?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
this.$http.postData('lawss/sarFileSplitMenu/copyMenuNotChildren', command[0], {
_this: this, loading: 'loading'
}, res => {
this.selectMenu()
this.getSplitItemsByPage()
}, e => {
})
}).catch(() => {})
break
case '删除':
this.selectedList = []
this.selectedList.push(command[0].id)
this.judgebatchDeleteItem()
break
// case '内容简介':
// this.clause(command[0])
// break
case '属性':
this.attribute(command[0])
break
case '编辑':
this.editLawsInfo(command[2], command[0])
break
}
},
treeDblClickEngin (treeId, treeNode) {
this.standItemEO.dutyEngineer = treeNode.id
this.standItemEO.dutyEngineerShow = treeNode.name
$('#enginBtnS').click()
},
// 点击表格 编辑按钮事件
editLawsInfo (index, row) {
this.isSubmit = false
this.standItemEO.id = row.id
this.modalItemaddShowflag = true
this.saveEditItemIndex = index
this.standItemEO = JSON.parse(JSON.stringify(row))
if (this.standItemEO.applyArctic && !(this.standItemEO.applyArctic instanceof Array)) {
let a = this.standItemEO.applyArctic.split(',')
this.standItemEO.applyArctic = a // 适用车型
}
if (this.standItemEO.newcarPutTime != null && this.standItemEO.newcarPutTime !== '') {
this.standItemEO.newcarPutTime = this.standItemEO.newcarPutTime.replace(new RegExp(/-/gm), '/')
this.standItemEO.newcarPutTime = new Date(this.standItemEO.newcarPutTime)
}
if (this.standItemEO.productPutTime != null && this.standItemEO.productPutTime !== '') {
this.standItemEO.productPutTime = this.standItemEO.productPutTime.replace(new RegExp(/-/gm), '/')
this.standItemEO.productPutTime = new Date(this.standItemEO.productPutTime)
}
if (this.standItemEO.paramsList == null || this.standItemEO.paramsList.length < 1) {
let specialObj = {
description: '',
figure: ''
}
this.standItemEO.paramsList.push(specialObj)
}
this.standItemEO.ZRBM = this.standItemEO.responsibleUnit
this.saveItemId = row.id
this.showUpdateItemInfo()
},
getOrgTreeSource () {
this.$http.get('sys/org/getTree', {}, {_this: this},
res => {
if (res.ok) {
let treeNode = []
res.data.map((item, index) => {
let treeItem = {}
for (let key in item) {
if (key === 'orgName') {
treeItem.name = item[key]
} else {
treeItem[key] = item[key]
}
}
treeNode[index] = treeItem
})
this.zNodesSItem = treeNode
}
}, e => {})
},
// 点击表格 内容简介按钮事件
clause (row) {
this.saveItemId = row.id
this.standItemEO.id = row.id
this.showItemRequestModel = true
this.showItemRequestDetails()
},
// 点击表格 属性按钮事件
attribute (row) {
this.getFileName(row)
this.showItemInfoEO = JSON.parse(JSON.stringify(row))
},
getDicTypeName(opt, type) {
const _type = type ? type.split(',') : []
let typeNames = []
switch (opt) {
case 'applyArcticOptions':
this.applyArcticOptions.map(item => {
_type.map(typeItem => {
if (item.value === typeItem) {
typeNames.push(item.label)
}
})
})
break
case 'BZFGGXOUIUJ':
this.BZFGGXOUIUJ.map(item => {
_type.map(typeItem => {
if (item.value === typeItem) {
typeNames.push(item.label)
}
})
})
break
}
return typeNames.join(',')
},
openSubmitAndExamine() {
if (!this.jurisdictionCheck()) {
return
}
this.openSubmitAndExamineForm = ''
this.openSubmitAndExamineVisible = true
},
submitAndExamine() {
if (this.openSubmitAndExamineForm) {
const query = this.infoForm
const params = {
id: query.id,
standNum: query.standNumSplit,
standName: query.standNameSplit,
standType: this.openSubmitAndExamineForm
}
this.$http.get('lawss/sarFileSplitInfo/submitAndExamine', params, {
_this: this,
loading: 'sumbitLoading'
}, res => {
if (res.ok) {
this.$message.success(res.data)
this.openSubmitAndExamineVisible = false
this.jurisdiction = '0'
} else {
this.$message.warning(res.message)
}
})
} else {
this.$message.warning('请选择数据来源')
}
},
queryInfoByInfoId() {
// lawss/sarFileSplitInfo/getSarFileSplitInfoEOPage?id=DB9NNXCNEWQ2MWZ4ZHNP
this.$http.get('lawss/sarFileSplitInfo/getSarFileSplitInfoEOPage', {
id: this.infoId
}, {
_this: this,
}, res => {
if (res.ok) {
const info = res.data.list
if (info) {
const query = info[0]
this.infoForm = {
id: this.infoId,
standNumSplit: query.splitStatus!=='0' ? query.showNumber : query.standNumSplit,
standNameSplit: query.splitStatus!=='0' ? query.standName : query.standNameSplit,
fileType: query.fileType
}
if (query.splitStatus === '0') {
// 编辑钟
if (query.modifyUser === this.userInfo.userId) {
this.jurisdiction = '2'
} else {
this.jurisdiction = '1'
}
} else if (query.splitStatus === '1') {
// 审核中
this.jurisdiction = '0'
} else {
// 已完成
this.jurisdiction = '2'
}
}
} else {
this.$message.warning(res.message)
}
})
},
jurisdictionCheck() {
return true
}
},
props: {},
computed: {
...mapGetters(['userInfo']),
jurisdictionCheckForTree() {
if (this.jurisdiction === '0') {
// this.$message.warning('审核中,不可操作')
return false
} else if (this.jurisdiction === '1') {
// this.$message.warning('编辑中,不可操作')
return false
} else {
return true
}
}
},
watch: {
},
mounted () {
this.infoId = this.$route.query.infoId
this.selectMenu()
this.getSplitItemsByPage()
this.getFileSel()
// 从数据库中查询各下拉框数据
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
this.applyArcticOptions = res.data.ENERGYTYPES // 根据需求文档,产品类别对应标准属性中的“适用车型”
this.requestOptions = res.data.REQUESTTYPE
this.BZFGGXOUIUJ = res.data.BZFGGXOUIUJ
}, e => {
})
this.getOrgTreeSource()
this.queryInfoByInfoId()
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/style';
@import '~@/assets/styles/mixins';
.edit-item-drawer{
/deep/.el-form-item{
/deep/.el-form-item__content{
width: calc(~'100% - 100px');
}
}
}
#itemSplitInfo{
height: 100%;
background: #fff;
.itemsTextBox {
min-height: 300px;
max-height: 500px;
overflow: auto;
line-height: 20px;
/deep/ td {
border: 1px solid #606266;
text-align: center;
}
}
.itemsText {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #409EFF;
cursor: pointer;
}
.myheader {
height: 40px;
padding: 10px 0 0 10px;
.header-title {
font-weight: 600;
font-size: 16px;
line-height: 30px;
}
}
.standards-tree-modal{
.el-form-item {
width: 100%;
}
}
.item-header{
padding: 10px;
border-bottom: 1px solid #EDEDED;
button{
padding-top: 5px;
}
.stander-title-item{
padding: 5px 10px;
font-weight: 600;
font-size: 16px;
}
}
.item-contents{
margin-top: 10px;
padding: 0;
display: flex;
display: -ms-flex;
height: calc(~'100% - 50px');
.table-tools-bar{
.contentTitle {
.flex();
align-items: center;
.title{
flex: 1;
padding: 0 20px;
.ellipsis();
text-align: center;
}
}
}
.tree-content {
width: 16%;
position: relative;
.tree {
width: 100%;
position: absolute;
left: 0;
}
}
.standards-info-form {
min-height: 400px;
overflow: auto;
.save {
width: 4.24rem;
height: 0.72rem;
line-height: 0.72rem;
margin: 0.5rem 0 0 0.2rem;
}
}
.tree-right{
overflow-y: hidden;
padding: 0 10px;
position: relative;
display: flex;
flex-direction: column;
.content{
flex: auto;
display: flex;
flex-direction: column;
}
.pagination{
position: static;
}
}
.drawer-content-wrapper {
height: 100%;
overflow: auto;
}
.check-item-label{
min-width: 112px;
}
}
.item-content-style{
margin: 20px 20px;
padding: 10px;
border: 1px dashed #999;
height: 470px;
line-height: 20px;
overflow-y: auto;
}
}
.domestic-standard-database-config{
.table-wrapper{
height: calc(~'100% - 205px');
overflow-x: hidden;
position: relative;
}
.pagination{
bottom: 50px;
}
}
.domesticStandardDatabase-checkItem-drawer{
.check-item-label{
min-width: 100px !important;
}
}
.track-table-header{
width: 100%;
height: 30px;
background-color: #e8eaec;
text-align: center;
line-height: 30px;
border: 1px solid #999999;
}
.back{
float: left;
vertical-align: super;
display: inline-block;
}
.wordTable {
border: solid 1px #999;
tr {
border: solid 1px #999;
td {
border: solid 1px #999;
text-align: center;
padding: 10px;
}
}
}
.updateContentInput {
margin: 5px 0;
/deep/ td {
border: 1px solid #606266;
text-align: center;
}
}
.updateContentBtn {
margin-left: 5px;
margin-top: 5px;
}
.check-files{
color: #909bb3;
padding-top: 5px;
word-break:break-all;
word-wrap:break-word;
}
.spe-col{
padding: 5px;
border: 1px solid #e3e5e8;
line-height: 20px;
text-align: center;
}
.spe-col-input{
.ivu-input{
}
}
.chooseBtn:focus {
color: #5ca7d8;
}
.wordTableStyle {
table {
width: 100%;
table-layout: fixed;
border: solid 1px #999;
tr {
border: solid 1px #999;
td {
border: solid 1px #999;
text-align: center;
padding: 10px 0px;
input {
width: 100%;
}
}
}
}
}
/deep/.wordImg {
width:50%;
height: 50%;
}
.preImgStyle {
text-align: center;
/deep/.wordImg {
width: 100%;
height: 100%;
}
}
</style>