2344 lines
85 KiB
Vue
2344 lines
85 KiB
Vue
<!--标准法规库 - 标准法规国家地区清单 - 新增、编辑页-->
|
|
<template>
|
|
<div class="list-of-standards-and-regulations-details v-class">
|
|
<!--基础信息-->
|
|
<div class="basic-information">
|
|
<el-divider content-position="left">基础信息</el-divider>
|
|
<div class="search-area">
|
|
<div class="left">
|
|
<el-form inline :model="sarAccessEO" ref="sarAccessForm" class="label-input-form" :rules="sarAccessEORules"
|
|
label-width="80px">
|
|
<el-form-item label="清单名称" prop="detailedListName" class="search-item">
|
|
<el-input v-model="sarAccessEO.detailedListName" :disabled="disabledFlag" placeholder="请输入"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="国家/地区" prop="countryArea" class="search-item">
|
|
<el-select
|
|
v-model="sarAccessEO.countryArea"
|
|
multiple
|
|
placeholder="请选择"
|
|
filterable
|
|
:disabled="disabledFlag"
|
|
class="wx-resolve"
|
|
>
|
|
<el-option
|
|
v-for="item in drawerCountryOptions"
|
|
:value="item.value"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<br/><br/>
|
|
<el-form-item label="清单说明" prop="remark" class="search-item max-search-item2">
|
|
<el-input
|
|
v-model="sarAccessEO.remark"
|
|
type="textarea"
|
|
:disabled="disabledFlag"
|
|
clearable
|
|
resize="none"
|
|
:autosize="{ minRows: 4, maxRows: 8}"
|
|
placeholder="请输入"
|
|
></el-input>
|
|
</el-form-item>
|
|
<br/><br/>
|
|
<el-form-item label="附件" prop="relateFile" class="search-item">
|
|
<el-upload
|
|
ref="relevantFile"
|
|
:action="uploadFileListPath"
|
|
show-file-list
|
|
:file-list="fileInfoList"
|
|
name="file"
|
|
accept=".PDF, .pdf, .doc, .DOC, .docx, .DOCX, .xls, .xlsx, .ppt, .pptx, .PPT, .PPTX, .JPG, .JPEG, .PNG, .jpg, .jpeg, .png"
|
|
:on-remove="delFileInfo"
|
|
:on-success="uploadBackSuccess"
|
|
:before-upload="beforeUpload"
|
|
:on-preview="handleOnPreview"
|
|
>
|
|
<el-button class="common-button-default" size="mini">
|
|
点击上传
|
|
</el-button>
|
|
</el-upload>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--数据搜索-->
|
|
<div class="data-search">
|
|
<el-divider content-position="left">数据搜索</el-divider>
|
|
<div class="search-area">
|
|
<div class="left">
|
|
<el-form :model="sarAccessInfoSearch" class="label-input-form" v-if="!disabledFlag" inline>
|
|
<el-form-item label="数据来源" class="search-item">
|
|
<el-select v-model="sarAccessInfoSearch.dataSource" filterable @change="dataSourceChange">
|
|
<el-option
|
|
v-for="item in dataSourceOptions"
|
|
:key="item.value"
|
|
:value="item.value"
|
|
:label="item.label"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="标准名称" class="search-item">
|
|
<el-input
|
|
v-model="sarAccessInfoSearch.standName"
|
|
placeholder="请输入"
|
|
:maxlength="100"
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item class="search-item btn-box">
|
|
<el-button
|
|
type="primary"
|
|
class="common-button-primary"
|
|
size="small"
|
|
@click="searchLawsStands">
|
|
查询
|
|
</el-button>
|
|
</el-form-item>
|
|
<el-form-item class="search-item btn-box">
|
|
<el-button
|
|
class="common-button-default"
|
|
size="small"
|
|
@click="clearSearchLaws">清空
|
|
</el-button>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" v-if="showSelectBox" class="common-button-primary" size="mini"
|
|
@click="selectMoreBtn">
|
|
<i class="iconfont"></i>
|
|
高级查询
|
|
</el-button>
|
|
<el-button type="primary" v-if="!showSelectBox" class="common-button-primary" size="mini"
|
|
@click="selectMoreBtn">
|
|
<i class="iconfont"></i>
|
|
高级查询
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<div class="showSelectBox" v-if="!showSelectBox">
|
|
<el-form :model="sarAccessInfo" class="label-input-form" v-if="!disabledFlag" inline>
|
|
<el-form-item label="标准号" class="labelBox">
|
|
<el-input
|
|
style="width: 165px"
|
|
v-model="sarAccessInfo.standNumber"
|
|
placeholder="请输入"
|
|
size="small"
|
|
clearable/>
|
|
</el-form-item>
|
|
<el-form-item label="标准名称" class="labelBox1">
|
|
<el-input
|
|
style="width: 165px"
|
|
v-model="sarAccessInfo.standName"
|
|
placeholder="请输入"
|
|
size="small"
|
|
clearable/>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button size="small" type="primary" @click="selectBtn">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
<div class="action-bar">
|
|
<el-button
|
|
class="common-button-default"
|
|
size="mini" @click="addSarAccess">添加
|
|
</el-button>
|
|
<el-button
|
|
class="common-button-default"
|
|
v-if="showTableFlag"
|
|
size="mini" @click="isShowTable"
|
|
>{{ $t('m.showAddDataList') }}
|
|
</el-button>
|
|
<el-button
|
|
class="common-button-default"
|
|
v-if="!showTableFlag"
|
|
size="mini"
|
|
@click="isShowTable"
|
|
>{{ $t('m.hideAddDataList') }}
|
|
</el-button>
|
|
</div>
|
|
<div class="standards-drawer-table standards-drawer-table-one" v-if="!showTableFlag">
|
|
<el-table
|
|
v-show="!isListType"
|
|
ref="searchTable"
|
|
@selection-change="sarAccessInfoSearchSelect"
|
|
:data="sarAccessInfoSearchList"
|
|
style="width: 100%"
|
|
border
|
|
height="300px"
|
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}"
|
|
>
|
|
<el-table-column
|
|
type="selection"
|
|
width="55"
|
|
align="center"
|
|
:selectable="selectable"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="code"
|
|
show-overflow-tooltip
|
|
fixed="left"
|
|
align="center"
|
|
width="180px"
|
|
label="标准号">
|
|
<template slot-scope="scope">
|
|
<span @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standNumber }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="standName"
|
|
align="center"
|
|
label="标准名称"
|
|
>
|
|
<template slot-scope="scope">
|
|
<span @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="issueTime"
|
|
sortable
|
|
align="center"
|
|
label="发布日期">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.issueTime ? $moment(scope.row.issueTime).format('YYYY-MM-DD') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="xcxssrqgj"
|
|
sortable
|
|
align="center"
|
|
label="新车型实施日期">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.xcxssrqgj ? $moment(scope.row.xcxssrqgj).format('YYYY-MM-DD') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="zccssrqgj"
|
|
sortable
|
|
align="center"
|
|
label="在产车实施日期">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.zccssrqgj ? $moment(scope.row.zccssrqgj).format('YYYY-MM-DD') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="textStatus"
|
|
width="120px"
|
|
align="center"
|
|
label="文本状态">
|
|
<template slot-scope="scope">
|
|
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<pagination :page="drawerPage" :total="drawerTotal" @pageChange="drawerPageChange"
|
|
@pageSizeChange="drawerPageSizeChange"></pagination>
|
|
<loading :loading="dataLoading">{{ $t('m.dataAcquisition') }}</loading>
|
|
</div>
|
|
</div>
|
|
<!--清单条目-->
|
|
<div class="list-entry">
|
|
<el-divider content-position="left">清单条目</el-divider>
|
|
<div class="action-bar">
|
|
<el-button
|
|
class="common-button-default export-button"
|
|
size="mini" @click="exportAccessInfo('apart')"
|
|
v-btn-permission="''"
|
|
><i class="iconfont"></i>导出
|
|
</el-button>
|
|
<el-button
|
|
class="common-button-default delete-button"
|
|
size="mini" @click="deleteSelectSarAccessInfo"
|
|
v-if="!disabledFlag"
|
|
v-btn-permission="''"
|
|
><i class="iconfont"></i>删除
|
|
</el-button>
|
|
</div>
|
|
<!-- 清单条目的列表页 -->
|
|
<el-table
|
|
ref="entryTable"
|
|
:data="sarAccessInfoList"
|
|
class="un-select"
|
|
style="width: 100%"
|
|
border
|
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}"
|
|
@selection-change="sarAccessInfoSelect"
|
|
>
|
|
<el-table-column
|
|
type="selection"
|
|
width="55"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="code"
|
|
show-overflow-tooltip
|
|
width="180px"
|
|
fixed="left"
|
|
align="center"
|
|
label="标准号">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standNumber }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="standName"
|
|
label="标准名称"
|
|
align="center"
|
|
width="260px"
|
|
>
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="standEnName"
|
|
align="center"
|
|
width="180px"
|
|
label="英文名称">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standEnName }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="typeApplicable"
|
|
align="center"
|
|
width="180px"
|
|
label="适用车型">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="nylx"
|
|
align="center"
|
|
width="180px"
|
|
label="能源类型">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="ssrq"
|
|
sortable
|
|
align="center"
|
|
width="210px"
|
|
label="标准实施日期">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.ssrq ? $moment(scope.row.ssrq).format('YYYY-MM-DD') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="zccssrqgj"
|
|
sortable
|
|
width="210px"
|
|
align="center"
|
|
label="在产车实施日期">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.zccssrqgj === null || scope.row.zccssrqgj === ''">
|
|
</span>
|
|
<span v-else>{{ scope.row.zccssrqgj.slice(0, 10) }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="xcxssrqgj"
|
|
sortable
|
|
align="center"
|
|
width="210px"
|
|
label="新车型实施日期">
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.xcxssrqgj === null || scope.row.xcxssrqgj === ''">
|
|
</span>
|
|
<span v-else>{{ scope.row.xcxssrqgj.slice(0, 10) }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="zrbm"
|
|
width="210px"
|
|
align="center"
|
|
label="责任部门">
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="sycpx"
|
|
width="180px"
|
|
align="center"
|
|
label="适用产品线">
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="cycvppsbm"
|
|
width="210px"
|
|
align="center"
|
|
label="乘用车VPPS编码">
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="cycvppscn"
|
|
width="210px"
|
|
align="center"
|
|
label="乘用车VPPS中文名称">
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="kccvppsbm"
|
|
align="center"
|
|
width="210px"
|
|
label="卡车VPPS编码">
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="kccvppscn"
|
|
align="center"
|
|
width="210px"
|
|
label="卡车VPPS中文名称">
|
|
</el-table-column>
|
|
<el-table-column width="240" align="center" fixed="right" label="操作">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
class="common-button-default"
|
|
type="primary"
|
|
size="small" @click="moveUp(scope.$index, scope.row)"
|
|
v-if="!disabledFlag"
|
|
>上移
|
|
</el-button>
|
|
<el-button
|
|
class="common-button-default"
|
|
type="danger"
|
|
size="small" @click="moveDown(scope.$index, scope.row)"
|
|
v-if="!disabledFlag"
|
|
>下移
|
|
</el-button>
|
|
<el-button
|
|
size="small"
|
|
@click="editTghisRow(scope.row)"
|
|
class="common-button-default"
|
|
type="warning"
|
|
>编辑
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div class="footer">
|
|
<el-button class="common-button-primary" icon="el-icon-check" size="mini" type="primary" @click="saveSarAccess"
|
|
v-if="!disabledFlag" :loading="loadData">{{ $t('m.submit') }}
|
|
</el-button>
|
|
<el-button class="common-button-default" icon="el-icon-close" size="mini" @click="backCancal"
|
|
v-if="!disabledFlag">{{ $t('m.cancel') }}
|
|
</el-button>
|
|
</div>
|
|
<el-dialog :visible.sync="exportTestItemNameFlag" title="导出文件" width="300px">
|
|
<el-form :inline="true" class="label-input-form search-area">
|
|
<el-form-item label="导出名称" class="search-item">
|
|
<el-input v-model="exportName" placeholder="请输入导出文件名称" :maxlength="30" clearable label="导出名称"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<span slot="footer" class="demo-drawer-footer">
|
|
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancal">取消</el-button>
|
|
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check"
|
|
@click="exportTestItem">提交</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
<!--导入模态框-->
|
|
<el-dialog title="导入信息" :visible.sync="importmodalFlag" width="400px">
|
|
<el-upload
|
|
drag
|
|
:action="importExcelUrl"
|
|
ref="importfile"
|
|
name="file"
|
|
accept=".xlsx"
|
|
:before-upload="handleFormatbeforeUpload"
|
|
:on-success="importFileSuccess"
|
|
>
|
|
<div style="padding: 20px 0">
|
|
<i class="el-icon-upload" style="color: #3399ff"></i>
|
|
<p>点击或拖拽上传文件</p>
|
|
</div>
|
|
</el-upload>
|
|
</el-dialog>
|
|
|
|
<el-drawer
|
|
title="编辑清单条目"
|
|
:visible.sync="drawerEdit"
|
|
:wrapperClosable="false"
|
|
size="800px"
|
|
>
|
|
<el-form :modal="editRowData" label-position="left" ref="editRowData" label-width="150px" style="margin: 20px">
|
|
<el-form-item label="标准号">
|
|
<el-input v-model.trim="editRowData.standNumber" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="标准名称" prop="standName">
|
|
<el-input v-model.trim="editRowData.standName" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="英文名称" prop="standEnName">
|
|
<el-input v-model.trim="editRowData.standEnName" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="适用车型" prop="typeApplicable">
|
|
<el-input v-model.trim="editRowData.typeApplicable" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="能源类型" prop="nylx">
|
|
<el-input v-model.trim="editRowData.nylx" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="标准实施日期" prop="putTime">
|
|
<el-date-picker
|
|
v-model.trim="editRowData.ssrq"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="在产车实施日期" prop="zccssrqgj">
|
|
<el-date-picker
|
|
v-model.trim="editRowData.zccssrqgj"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="新车型实施日期" prop="xcxssrqgj">
|
|
<el-date-picker
|
|
v-model.trim="editRowData.xcxssrqgj"
|
|
type="date"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="责任部门" prop="zrbm">
|
|
<el-input v-model.trim="editRowData.zrbm" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="适用产品线" prop="sycpx">
|
|
<el-input v-model.trim="editRowData.sycpx" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="乘用车VPPS编码" prop="cycvppsbm">
|
|
<el-input v-model.trim="editRowData.cycvppsbm" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="乘用车VPPS中文名称" prop="cycvppscn">
|
|
<el-input v-model.trim="editRowData.cycvppscn" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="卡车VPPS编码" prop="kccvppsbm">
|
|
<el-input v-model.trim="editRowData.kccvppsbm" :disabled="true"/>
|
|
</el-form-item>
|
|
<el-form-item label="卡车VPPS中文名称" prop="kccvppscn">
|
|
<el-input v-model.trim="editRowData.kccvppscn" :disabled="true"/>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div class="demo-drawer-footer">
|
|
<el-button
|
|
type="primary"
|
|
class="common-button-primary"
|
|
size="mini"
|
|
icon="el-icon-check"
|
|
@click="saveInfo"
|
|
>提交
|
|
</el-button
|
|
>
|
|
<el-button
|
|
size="mini"
|
|
icon="el-icon-close"
|
|
class="common-button-default"
|
|
@click="cancelInfo"
|
|
>取消
|
|
</el-button
|
|
>
|
|
</div>
|
|
</el-drawer>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import CustomInputForStandards from '@/components/CustomFormComponents/InputForStandards'
|
|
import CustomInputForStandardsForeign from '@/components/CustomFormComponents/InputForStandardsForForeign'
|
|
import CustomInput from '@/components/CustomFormComponents/Input'
|
|
import CustomTextarea from '@/components/CustomFormComponents/Textarea'
|
|
import CustomSearchSelect from '@/components/CustomFormComponents/SearchSelect'
|
|
import CustomSelect from '@/components/CustomFormComponents/Select'
|
|
import CustomDatePick from '@/components/CustomFormComponents/DatePicker'
|
|
import CustomFile from '@/components/CustomFormComponents/File'
|
|
import CustomInputNum from '@/components/CustomFormComponents/InputNum'
|
|
import CustomDatePickGroup from '@/components/CustomFormComponents/DatePickerGroup'
|
|
import CustomSelectArray from '@/components/CustomFormComponents/SelectArray'
|
|
import TreePopover from '@/components/CustomFormComponents/TreePopover'
|
|
import CustomOrg from '@/components/CustomFormComponents/OrgTree'
|
|
import CustomEopDatePick from '@/components/CustomFormComponents/DatePickerWithText'
|
|
import CustomDatePickWithText, {formatText} from '@/components/CustomFormComponents/DatePickerGroupWithText'
|
|
import CustomSVPPS from '@/components/CustomFormComponents/SVPPS'
|
|
import CustomInputForPolicy from '@/components/CustomFormComponents/InputForPolicy'
|
|
import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
|
|
import stand from "../../../config/pages/attributeCustom/components/stand";
|
|
import {mapGetters} from 'vuex'
|
|
import {dicTypeData, StandardsInfoPage} from '@/api/unqualProcess'
|
|
import {interfaceUrl} from "@/sysConfig";
|
|
|
|
export default {
|
|
name: 'ListOfStandardsAndRegulationsDetails',
|
|
components: {
|
|
CustomFile,
|
|
CustomInput,
|
|
CustomInputForStandards,
|
|
CustomInputForStandardsForeign,
|
|
CustomTextarea,
|
|
CustomSearchSelect,
|
|
CustomDatePick,
|
|
CustomSelect,
|
|
CustomInputNum,
|
|
CustomDatePickGroup,
|
|
CustomSelectArray,
|
|
TreePopover,
|
|
CustomOrg,
|
|
CustomEopDatePick,
|
|
CustomDatePickWithText,
|
|
CustomSVPPS,
|
|
CustomInputForPolicy,
|
|
CustomRoleTree
|
|
},
|
|
data() {
|
|
return {
|
|
textStatusMap: {},
|
|
countryAreaMap: {},
|
|
typeApplicableMap: {},
|
|
nylxMap: {},
|
|
zrbmMap: {},
|
|
sycpxMap: {},
|
|
// 编辑抽屉状态
|
|
drawerEdit: false,
|
|
// 编辑框数据
|
|
editRowData: {
|
|
id: '',
|
|
standName: '',
|
|
standSortShow: '',
|
|
standEnName: '',
|
|
typeApplicable: '',
|
|
nylx: '',
|
|
ssrq: '',
|
|
zccssrqgj: '',
|
|
xcxssrqgj: '',
|
|
zrbm: '',
|
|
sycpx: '',
|
|
cycvppsbm: '',
|
|
cycvppscn: '',
|
|
kccvppsbm: '',
|
|
kccvppscn: ''
|
|
},
|
|
selectSearch: [],
|
|
// 新增、编辑 基础信息字段
|
|
sarAccessEO: {
|
|
id: '',
|
|
sortKey: 1,
|
|
countryArea: '',
|
|
fileIds: '',
|
|
detailedListName: '',
|
|
energyKind: '',
|
|
type: '',
|
|
relateFile: '',
|
|
remark: '', // 清单说明
|
|
// applicationScope: '' //适用领域
|
|
},
|
|
fileInfoList: [], // 上传的附件
|
|
uploadFileListPath: 'api/att/attFile/upload', // 上传的地址
|
|
// 新增、编辑 基础信息验证条件
|
|
sarAccessEORules: {
|
|
type: [
|
|
{required: true, message: '国内/海外不能为空', trigger: 'change'}
|
|
],
|
|
countryArea: [
|
|
{required: true, message: '国家/地区不能为空', trigger: 'change'}
|
|
],
|
|
detailedListName: [
|
|
{required: true, message: '清单名称不能为空', trigger: 'blur'},
|
|
{type: 'string', max: 100, message: '清单名称不能超过100个字符', trigger: 'blur'}
|
|
]
|
|
},
|
|
disabledFlag: false,
|
|
regionOptions: [], // 基础信息 区域list
|
|
drawerCountryOptions: [], // 基础信息 国家list
|
|
textStatusOptions: [], // 文本状态
|
|
applyOptions: [], //基础信息适用领域list
|
|
/** ****************************/
|
|
zrbmOptions: [], // 责任部门
|
|
categoryOptions: [], // 能源类型
|
|
energyKindOptions: [], // 能源种类list
|
|
CycxOptions: [],
|
|
sycpxOptions: [], // 适用产品线
|
|
applyArcticOptions: [], // 基础车型 适用车型list
|
|
/** ******************************/
|
|
accessSarTypeOptions: [], // 要求类型list
|
|
standSortOptions: [], // 标准类别
|
|
standStateOptions: [], // 标准状态
|
|
GXHBQOptions: [], // 标签list
|
|
askNatureOptions: [], // 监管类型list
|
|
ROLELIST: [], // 项目评估角色
|
|
// 数据搜索 数据来源list
|
|
dataSourceOptions: [
|
|
{value: 'INLAND_STAND', label: '国内标准法规'},
|
|
{value: 'FOREIGN_STAND', label: '海外标准法规'},
|
|
//{value: 'FOREIGN_LAWS', label: '国内外政策'},
|
|
// {value: 'BUSINESS', label: '企业标准 '},
|
|
// {value: 'TEMP', label: '标准法规清单 '}
|
|
],
|
|
// 新增、编辑 数据搜索字段
|
|
sarAccessInfoSearch: {
|
|
id: '',
|
|
standName: '',
|
|
askType: '', // 监管类型
|
|
dataSource: 'INLAND_STAND', // 数据来源
|
|
page: 1,
|
|
pageSize: this.$store.getters.userInfo.configContent,
|
|
validFlag: 0,
|
|
advanceSearchVOStr: ''
|
|
},
|
|
sarAccessInfo: {
|
|
id: '',
|
|
standNumber: '',
|
|
standName: '',
|
|
askType: '', // 监管类型
|
|
dataSource: 'INLAND_STAND', // 数据来源
|
|
page: 1,
|
|
pageSize: this.$store.getters.userInfo.configContent,
|
|
validFlag: 0,
|
|
advanceSearchVOStr: ''
|
|
},
|
|
moreSearchBtn: true, // 多属性搜索按钮 状态
|
|
showTableFlag: true, // 显示添加列表 状态
|
|
showSelectBox: true, // 显示高级查询 状态
|
|
sarAccessInfoSearchList: [], // 数据搜索 table列表数据
|
|
importmodalFlag: false, // 导入model 状态
|
|
searching: false,
|
|
sarAccessInfoList: [], // 清单条目 技术要求table 数据
|
|
sarAccessInfoListArry: [], // 清单条目 table选中数据
|
|
moreSearchShow: false, // 多属性搜索 状态
|
|
loadData: false, // 提交按钮loading效果
|
|
drawerPage: 1, // 数据搜索table页码
|
|
drawerTotal: 0, // 数据搜索table总条数
|
|
dataLoading: false, // 数据搜索 table 查询loading
|
|
activeName: 'SKILL', // 清单要求 tab名称value 技术要求
|
|
exportTestItemNameFlag: false, // 导出模态框
|
|
exportName: '', // 导出名称
|
|
importExcelUrl: '/api/lawss/sarSarAccessInfo/importSarAccessInfo?accessId=', // 导入接口
|
|
defaultAddEntryForm: {
|
|
sarType: '', // 标准分类
|
|
code: '', // 标准编号
|
|
name: '', // 中文名称
|
|
enName: '', // 英文名称
|
|
authDelive: '', // 认证交付物
|
|
authObj: '', // 认证对象
|
|
authObjId: '', // 认证对象ID
|
|
authDepart: '', // 认证责任部门
|
|
authDepartId: '', // 认证责任部门Id
|
|
energyKind: '', // 能源类型
|
|
newPutTime: 'N/A', // 新车型实施日期
|
|
prodPutTime: 'N/A', // 在产车实施日期
|
|
eopPutTime: 'N/A', // eop实施日期
|
|
newPutTextTime: '', // 新车型实施日期(项目)
|
|
prodPutTextTime: '', // 在产车实施日期(项目)
|
|
eopPutTextTime: '', // eop实施日期(项目)
|
|
// putTime: '', // 标准实施日期
|
|
synopsis: '', // 清单说明
|
|
performInfo: '', // 实施说明
|
|
ZRBM: '', // 责任部门ID
|
|
ZRBMName: '', // 责任部门name
|
|
FOName: '', // FO Name
|
|
FO: '', // FO id
|
|
proEssessUser: '', // 项目评估角色name
|
|
proEssessUserId: '', // 项目评估角色ID
|
|
nature: '', // 标准性质
|
|
natureId: '', // 标准性质ID
|
|
askNature: '', // 监管类型
|
|
applyArctic: [], // 适用车辆类型
|
|
XGBMName: '',
|
|
XGBM: '',
|
|
askType: '',
|
|
GXHBQ: [], // 标签
|
|
accessType: '' // 入库模块
|
|
},
|
|
// 新增标准法规 验证
|
|
addEntryFormRules: {
|
|
code: [
|
|
{required: true, type: 'string', message: '标准编号不能为空', trigger: 'blur'},
|
|
// { validator: validatePass, trigger: 'blur' }
|
|
// {type: 'string', max: 100, message: '标准编号不能超过100个字符', trigger: 'change'},
|
|
// {type: 'string', validator: this.verify.validateStandardItem, trigger: 'change'},
|
|
{validator: this.validCode, trigger: 'blur'}
|
|
],
|
|
name: [
|
|
{required: true, type: 'string', message: '中文名称不能为空', trigger: 'blur'},
|
|
{type: 'string', max: 100, message: '中文名称不能超过100个字符', trigger: 'change'}
|
|
],
|
|
enName: [
|
|
{required: true, type: 'string', message: '英文名称不能为空', trigger: 'blur'},
|
|
{type: 'string', max: 1000, message: '英文名称不能超过1000个字符', trigger: 'change'}
|
|
],
|
|
},
|
|
// 认证对象下拉数据
|
|
authObjOptions: [
|
|
{
|
|
label: '整车',
|
|
value: '整车'
|
|
},
|
|
{
|
|
label: '零部件',
|
|
value: '零部件'
|
|
},
|
|
{
|
|
label: '整车+零部件',
|
|
value: '整车+零部件'
|
|
},
|
|
{
|
|
label: 'TBD',
|
|
value: 'TBD'
|
|
}
|
|
],
|
|
depNode: [], // 部门树
|
|
isNext: false,
|
|
depFONode: [],
|
|
depRoleNode: [],
|
|
standNatureOptions: [], // 新增 标准性质
|
|
// 提交状态
|
|
isSubmit: false,
|
|
number: 0,
|
|
selectedAccInfoSearchList: [],
|
|
accessSarTypeList: [], // 清单类型table选中数组
|
|
editAddType: 1, // 1 新增、 2、编辑
|
|
addEditTitle: '新增',
|
|
isDisabled: false,
|
|
isListType: false, // 清单类型
|
|
reloadAddForm: false,
|
|
formFieldList: [],
|
|
orgData: [],
|
|
orgData2: [],
|
|
sarStandardsInfoEODefault: {
|
|
accessType: '',
|
|
id: '',
|
|
standType: 'INLAND', // 标准分类
|
|
// country: 'CN', // 适用区域
|
|
standSort: '', // 标准类别
|
|
standNumber: '', // 标准编号
|
|
standSortShow: '',
|
|
standYear: '', // 标准年份
|
|
standName: '', // 中文名称
|
|
standEnName: '', // 英文名称
|
|
standState: '', // 标准状态
|
|
standNature: '', // 标准性质
|
|
issueTime: '', // 发布日期
|
|
synopsis: '', // 清单说明
|
|
lawsNumber: '', // 政策编号
|
|
lawsName: '', // 中文名称
|
|
lawsEnName: '', // 英文名称
|
|
lawsState: '', // 文本状态
|
|
replaceLawsNum: '' // 代替政策编号
|
|
},
|
|
sarStandardsInfoEO: {
|
|
accessType: '',
|
|
id: '',
|
|
standType: 'INLAND', // 标准分类
|
|
// country: 'CN', // 适用区域
|
|
standSort: '', // 标准类别
|
|
standNumber: '', // 标准编号
|
|
standSortShow: '',
|
|
standYear: '', // 标准年份
|
|
standName: '', // 中文名称
|
|
standEnName: '', // 英文名称
|
|
standState: '', // 标准状态
|
|
standNature: '', // 标准性质
|
|
issueTime: '', // 发布日期
|
|
synopsis: '', // 清单说明
|
|
lawsNumber: '', // 政策编号
|
|
lawsName: '', // 中文名称
|
|
lawsEnName: '', // 英文名称
|
|
lawsState: '', // 文本状态
|
|
replaceLawsNum: '' // 代替政策编号
|
|
}, // 入库标准过程中用到的对象
|
|
defaultAddFormFieldRules: {
|
|
standSort: [
|
|
{required: true, message: '标准类别不能为空', trigger: 'change'}
|
|
],
|
|
standNumber: [
|
|
{required: true, type: 'string', message: '标准编号不能为空', trigger: 'change'},
|
|
{type: 'string', max: 100, message: '标准编号不能超过100个字符', trigger: 'change'},
|
|
{type: 'string', validator: this.verify.validateStandardItem, trigger: 'change'}
|
|
],
|
|
standYear: [
|
|
{required: true, message: '标准年份不能为空', trigger: 'change'},
|
|
{validator: this.verify.testItemCode, trigger: 'change'},
|
|
{type: 'string', max: 20, message: '标准年份不能超过20个字符', trigger: 'change'}
|
|
],
|
|
standName: [
|
|
{required: true, message: '中文名称不能为空', trigger: 'blur'},
|
|
{type: 'string', max: 500, message: '中文名称不能超过500个字符', trigger: 'blur'}
|
|
],
|
|
standEnName: [
|
|
{type: 'string', max: 1000, message: '英文名称不能超过1000个字符', trigger: 'blur'}
|
|
],
|
|
standState: [
|
|
{required: true, message: '标准状态不能为空', trigger: 'change'}
|
|
],
|
|
standNature: [
|
|
{required: true, message: '标准性质不能为空', trigger: 'change'}
|
|
],
|
|
synopsis: [
|
|
{type: 'string', max: 500, message: '清单说明不能超过500个字符', trigger: 'blur'}
|
|
// {validator: this.verify.checkSpecialCharacter, trigger: 'blur'} gaoyan 2018-11-07 客户提到特殊符号校验问题
|
|
],
|
|
lawsNumber: [
|
|
{required: true, message: '政策编号不能为空', trigger: 'change'},
|
|
{type: 'string', max: 100, message: '政策编号不能超过100个字符', trigger: 'change'},
|
|
{type: 'string', validator: this.verify.validateStandardItem, trigger: 'change'}
|
|
],
|
|
lawsName: [
|
|
{required: true, message: '中文名称不能为空', trigger: 'blur'},
|
|
{type: 'string', max: 500, message: '中文名称不能超过500个字符', trigger: 'change'}
|
|
],
|
|
lawsEnName: [
|
|
{required: true, message: '英文名称不能为空', trigger: 'change'},
|
|
{type: 'string', max: 1000, message: '英文名称不能超过1000个字符', trigger: 'change'}
|
|
// { validator: this.verify.valiateEnName, trigger: 'blur' }
|
|
],
|
|
lawsState: [
|
|
{required: true, message: '文本状态不能为空', trigger: 'change'}
|
|
],
|
|
countryArea: [
|
|
{required: true, message: '适用区域不能为空', trigger: 'change'}
|
|
],
|
|
replaceLawsNum: [
|
|
{required: true, message: '代替政策编号不能为空', trigger: 'change'},
|
|
{type: 'string', validator: this.verify.validateStandardItem, trigger: 'blur'}
|
|
],
|
|
issueTime: [
|
|
{required: true, message: '发布日期不能为空', trigger: 'change'}
|
|
]
|
|
},
|
|
formFieldListData: [], // 存储从接口取过来的原始数据
|
|
allSelectOptions: {},
|
|
dynamicFormField: [], // 动态数据
|
|
uuid: '',
|
|
}
|
|
},
|
|
created() {
|
|
dicTypeData().then(res => {
|
|
// 责任部门数据字典
|
|
this.zrbmOptions = res.data.ZRBMCLASS
|
|
// 能源类型数据字典
|
|
this.CycxOptions = res.data.CLLX
|
|
// this.categoryOptions = res.data.NYLXCLASS // 能源类型
|
|
// 适用车型数据字典
|
|
this.applyArcticOptions = res.data.PRODUCTTYPE
|
|
// 适用产品线数据字典
|
|
this.sycpxOptions = res.data.SYCPXCLASS
|
|
})
|
|
},
|
|
methods: {
|
|
// 高级检索
|
|
selectMoreBtn() {
|
|
this.selectLawsStands()
|
|
this.showSelectBox = !this.showSelectBox
|
|
this.showTableFlag = false
|
|
if (!this.showSelectBox) {
|
|
this.sarAccessInfoSearch.standName = ''
|
|
this.sarAccessInfoSearch.issueTime = ''
|
|
this.sarAccessInfoSearch.textStatus = ''
|
|
this.sarAccessInfoSearch.modifyTime = ''
|
|
}
|
|
this.selectLawsStands()
|
|
},
|
|
// 法规维护人树
|
|
getDept() {
|
|
return new Promise((resolve, reject) => {
|
|
let url = 'sys/org/getTree'
|
|
this.$http.get(url, {}, {
|
|
_this: this
|
|
}, res => {
|
|
if (res.ok) {
|
|
let zNodesDept = []
|
|
res.data.map((item, i) => {
|
|
let zObj = {}
|
|
// 该节点为机构
|
|
zObj.name = item.orgName
|
|
zObj.icon = 'static/images/dept.png'
|
|
// zObj.isParent = true
|
|
zObj.shotName = item.shotName
|
|
zObj.remarks = item.remarks
|
|
zObj.id = item.id
|
|
zObj.pId = item.pId
|
|
zNodesDept[i] = zObj
|
|
})
|
|
this.orgData = zNodesDept
|
|
this.orgData2 = zNodesDept
|
|
resolve(res.data)
|
|
}
|
|
}, e => {
|
|
reject(e)
|
|
})
|
|
})
|
|
},
|
|
// 删除上传的文件
|
|
delFileInfo(file, fileList) {
|
|
this.fileInfoList = fileList
|
|
},
|
|
// 上传文件成功回调
|
|
uploadBackSuccess(res, file, fileList) {
|
|
if (res.ok) {
|
|
this.fileInfoList = fileList
|
|
this.fileInfoList[this.fileInfoList.length - 1].id = res.data.id
|
|
this.$message.success('上传成功')
|
|
} else {
|
|
this.$message.error(res.message)
|
|
fileList.pop()
|
|
}
|
|
},
|
|
|
|
// 点击上传的文件进行下载
|
|
handleOnPreview(file) {
|
|
let attId = file.id
|
|
if (attId != null && attId !== "") {
|
|
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
|
|
}
|
|
},
|
|
// 相关附件 上传之前钩子
|
|
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 (fileSuffix !== undefined && fileSuffix !== null) {
|
|
fileSuffix = fileSuffix.toUpperCase()
|
|
}
|
|
// 判断上传文件格式
|
|
if (fileSuffix === '.PDF' || fileSuffix === '.DOC' || fileSuffix === '.DOCX' || fileSuffix === '.PPT'
|
|
|| fileSuffix === '.PPTX' || fileSuffix === '.XLS' || fileSuffix === '.XLSX'
|
|
|| fileSuffix === '.PNG' || fileSuffix === '.JPG' || fileSuffix === '.JPEG') {
|
|
return true
|
|
} else {
|
|
this.$message.error('文件' + file.name + '格式不正确,请上传pdf、doc、docx、ppt、pptx、xls、xlsx、png、jpg、jpeg等文件')
|
|
return false
|
|
}
|
|
// 判断文件上传大小
|
|
if (file.size / 1024 / 1024 > 200) {
|
|
this.$message.warning('文件' + file.name + '大小不能超过200M')
|
|
return false
|
|
}
|
|
return true
|
|
},
|
|
moreSearch() {
|
|
this.moreSearchShow = !this.moreSearchShow
|
|
this.moreSearchBtn = !this.moreSearchBtn
|
|
},
|
|
// 点击显示隐藏数据列表 按钮事件
|
|
isShowTable() {
|
|
this.selectLawsStands()
|
|
this.showTableFlag = !this.showTableFlag
|
|
this.selectedAccInfoSearchList = [] // 清空
|
|
},
|
|
// 点数据搜索 查询按钮 事件
|
|
searchLawsStands() {
|
|
this.showTableFlag = false
|
|
this.selectLawsStands()
|
|
},
|
|
// 点击清空查询条件 按钮事件
|
|
clearSearchLaws() {
|
|
this.sarAccessInfoSearch.askType = '' // 监管类型
|
|
this.sarAccessInfoSearch.dataSource = 'INLAND_STAND' // 数据来源
|
|
this.sarAccessInfoSearch.standName = ''
|
|
this.sarAccessInfo.standName = ''
|
|
this.sarAccessInfo.standNumber = ''
|
|
this.isListType = false
|
|
this.selectLawsStands()
|
|
},
|
|
// 数据来源change事件
|
|
dataSourceChange(val) {
|
|
this.isListType = val === 'TEMP'
|
|
this.sarAccessInfoSearch.advanceSearchVOStr = ''
|
|
// 国内标准法规可查字段
|
|
if (val === 'INLAND_STAND') {
|
|
this.twoOptions = [
|
|
{
|
|
label: '适用车辆类型',
|
|
value: 'CLLX',
|
|
type: 'SEL_OPTION',
|
|
disabled: false
|
|
}, {
|
|
label: '标准编号',
|
|
value: 'STAND_NUMBER',
|
|
type: 'INPUT',
|
|
disabled: false
|
|
}, {
|
|
label: '中文名称',
|
|
value: 'STAND_NAME',
|
|
type: 'INPUT',
|
|
disabled: false
|
|
}, {
|
|
label: '标签',
|
|
value: 'GXHBQXX',
|
|
type: 'SEL_OPTION',
|
|
disabled: false
|
|
}, {
|
|
label: '新车型实施日期(文本)',
|
|
value: 'XCXSSRQ',
|
|
type: 'DATE_PIC_OPTS',
|
|
disabled: false
|
|
}, {
|
|
label: '在产车实施日期(文本)',
|
|
value: 'ZCCSSRQ',
|
|
type: 'DATE_PIC_OPTS',
|
|
disabled: false
|
|
}, {
|
|
label: '法规维护人',
|
|
value: 'FGWHR',
|
|
type: 'SEL_OPTION',
|
|
selVal: "USERLIST",
|
|
disabled: false
|
|
}
|
|
]
|
|
// 海外标准法规可查字段
|
|
} else if (val === 'FOREIGN_STAND') {
|
|
this.twoOptions = [
|
|
{
|
|
label: '适用车辆类型',
|
|
value: 'CLLX',
|
|
type: 'SEL_OPTION',
|
|
disabled: false
|
|
}, {
|
|
label: '标准编号',
|
|
value: 'STAND_NUMBER',
|
|
type: 'INPUT',
|
|
disabled: false
|
|
}, {
|
|
label: '中文名称',
|
|
value: 'STAND_NAME',
|
|
type: 'INPUT',
|
|
disabled: false
|
|
}, {
|
|
label: '英文名称',
|
|
value: 'STAND_EN_NAME',
|
|
type: 'INPUT',
|
|
disabled: false
|
|
}, {
|
|
label: '标签',
|
|
value: 'GXHBQXX',
|
|
type: 'SEL_OPTION',
|
|
disabled: false
|
|
}, {
|
|
label: '新车型实施日期(文本)',
|
|
value: 'XCXSSRQ',
|
|
type: 'DATE_PIC_OPTS',
|
|
disabled: false
|
|
}, {
|
|
label: '在产车实施日期(文本)',
|
|
value: 'ZCCSSRQ',
|
|
type: 'DATE_PIC_OPTS',
|
|
disabled: false
|
|
}, {
|
|
label: '法规维护人',
|
|
value: 'FGWHR',
|
|
type: 'SEL_OPTION',
|
|
selVal: "USERLIST",
|
|
disabled: false
|
|
}
|
|
]
|
|
// 国内外政策可查字段
|
|
}
|
|
},
|
|
/**
|
|
* 点击数据搜索 添加按钮事件
|
|
* 判断是否添加重复数据
|
|
*/
|
|
addSarAccess() {
|
|
//判断是否是清单类型
|
|
if (this.selectedAccInfoSearchList.length > 0) {
|
|
// 追加字段
|
|
this.selectedAccInfoSearchList.map(item => {
|
|
let addList;
|
|
addList = this.sarAccessInfoList.findIndex(items => {
|
|
return items.id === item.id
|
|
})
|
|
if (addList > -1) {
|
|
// this.$refs.accessTypeSelect.clearSelection()
|
|
this.$refs.entryTable.clearSelection()
|
|
this.$refs.searchTable.clearSelection()
|
|
this.$message.warning('请勿添加重复数据')
|
|
} else {
|
|
this.sarAccessInfoList.push(item)
|
|
// this.$refs.accessTypeSelect.clearSelection()
|
|
this.$refs.entryTable.clearSelection()
|
|
this.$refs.searchTable.clearSelection()
|
|
}
|
|
})
|
|
} else {
|
|
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
|
}
|
|
},
|
|
// 上移 事件
|
|
moveUp(index, row) {
|
|
if (index === 0) {
|
|
this.$message({
|
|
message: '已经是列表中第一个素材!',
|
|
type: 'warning'
|
|
})
|
|
} else {
|
|
let temp = this.sarAccessInfoList[index - 1]
|
|
this.$set(this.sarAccessInfoList, index - 1, this.sarAccessInfoList[index])
|
|
this.$set(this.sarAccessInfoList, index, temp)
|
|
}
|
|
},
|
|
moveDown(index) {
|
|
if (index === (this.sarAccessInfoList.length - 1)) {
|
|
this.$message({
|
|
message: '已经是列表中最后一个素材!',
|
|
type: 'warning'
|
|
})
|
|
} else {
|
|
let i = this.sarAccessInfoList[index + 1]
|
|
this.$set(this.sarAccessInfoList, index + 1, this.sarAccessInfoList[index])
|
|
this.$set(this.sarAccessInfoList, index, i)
|
|
}
|
|
},
|
|
// 编辑按钮
|
|
editTghisRow(row) {
|
|
this.rowList = row
|
|
this.editRowData = this.rowList
|
|
this.editRowData.standNumber = this.rowList.standNumber
|
|
this.drawerEdit = true
|
|
},
|
|
// 抽屉取消按钮
|
|
cancelInfo() {
|
|
this.drawerEdit = false
|
|
},
|
|
// 抽屉提交按钮
|
|
saveInfo() {
|
|
this.rowList = this.editRowData
|
|
this.drawerEdit = false
|
|
},
|
|
// 点击清单条目导入按钮事件
|
|
importmodalFlags() {
|
|
this.importmodalFlag = true
|
|
this.$nextTick(() => {
|
|
this.$refs['importfile'].clearFiles()
|
|
})
|
|
},
|
|
// 点击 模板下载 按钮事件
|
|
uploadImportModal() {
|
|
window.open('/api/lawss/sarSarAccess/exportTemplate?fileName=标准法规清单导入模板.xlsx')
|
|
},
|
|
/**
|
|
* 点击清单条目 删除按钮 事件
|
|
* 删除不想添加的AccessInfo信息
|
|
*/
|
|
deleteSelectSarAccessInfo() {
|
|
if (this.sarAccessInfoListArry.length > 0) {
|
|
this.$confirm('确认删除选中数据?', '确认删除', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
confirmButtonClass: 'common-button-primary',
|
|
roundButton: true,
|
|
type: 'warning'
|
|
}).then(() => {
|
|
let exits = []
|
|
this.sarAccessInfoListArry.map(item => {
|
|
let index
|
|
index = this.sarAccessInfoList.findIndex(items => {
|
|
return items.id === item
|
|
})
|
|
if (index > -1) {
|
|
this.sarAccessInfoList.splice(index, 1)
|
|
}
|
|
exits.push(item)
|
|
})
|
|
this.sarAccessInfoListArry = []
|
|
this.$refs.entryTable.clearSelection()
|
|
}).catch(() => {
|
|
})
|
|
} else {
|
|
this.$message.error('请选择需要删除的清单条目!')
|
|
}
|
|
},
|
|
// 清单条目 table select事件
|
|
sarAccessInfoSelect(selectData) {
|
|
this.sarAccessInfoListArry = []
|
|
for (let i = 0; i < selectData.length; i++) {
|
|
this.sarAccessInfoListArry.push(selectData[i].id);
|
|
}
|
|
},
|
|
// 点击取消按钮 返回事件
|
|
backCancal() {
|
|
this.$router.push({
|
|
name: 'AccessStandardsAndRegulations'
|
|
})
|
|
},
|
|
// 提交按钮 事件
|
|
saveSarAccess() {
|
|
this.$refs['sarAccessForm'].validate((valid) => {
|
|
if (valid) {
|
|
let rowlist = []
|
|
let rowlist1 = []
|
|
let rowlist2 = []
|
|
let rowlist3 = []
|
|
for (let i = 0; i < this.sarAccessInfoList.length; i++) {
|
|
rowlist.push(this.sarAccessInfoList[i].id)
|
|
if (this.sarAccessInfoList[i].ssrq === null) {
|
|
rowlist1.push(this.sarAccessInfoList[i].ssrq = '-')
|
|
} else {
|
|
rowlist1.push(this.sarAccessInfoList[i].ssrq.toString())
|
|
}
|
|
if (this.sarAccessInfoList[i].xcxssrqgj === null) {
|
|
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
|
|
} else {
|
|
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
|
|
}
|
|
if (this.sarAccessInfoList[i].zccssrqgj === null) {
|
|
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
|
|
} else {
|
|
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
|
|
}
|
|
}
|
|
rowlist = rowlist.join(',')
|
|
rowlist1 = rowlist1.join(',')
|
|
rowlist2 = rowlist2.join(',')
|
|
rowlist3 = rowlist3.join(',')
|
|
let sarAccessEO = JSON.parse(JSON.stringify(this.sarAccessEO))
|
|
sarAccessEO.inforlist = rowlist
|
|
sarAccessEO.inforlist1 = rowlist1
|
|
sarAccessEO.inforlist2 = rowlist2
|
|
sarAccessEO.inforlist3 = rowlist3
|
|
sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
|
|
// sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')
|
|
// 判断是否有附件
|
|
if (this.fileInfoList.length > 0) {
|
|
let relateFile = []
|
|
this.fileInfoList.map(item => {
|
|
relateFile.push(item.id)
|
|
})
|
|
sarAccessEO.fileIds = relateFile.join(',')
|
|
}
|
|
if (!sarAccessEO.id) {
|
|
// 新增
|
|
sarAccessEO.state = '1'
|
|
sarAccessEO.version = 0
|
|
if (this.sarAccessInfoList.length !== 0) {
|
|
this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
|
|
_this: this,
|
|
loading: 'loadData'
|
|
}, res => {
|
|
if (res.ok) {
|
|
if (res.data === "数据库为空,添加成功") {
|
|
this.$message.success('新增成功')
|
|
this.isNext = true
|
|
this.$router.push({
|
|
name: 'AccessStandardsAndRegulations'
|
|
})
|
|
} else if (res.data === "车型类别清单添加成功") {
|
|
this.$message.success('新增成功')
|
|
this.isNext = true
|
|
this.$router.push({
|
|
name: 'AccessStandardsAndRegulations'
|
|
})
|
|
} else if (res.data === "车型类别清单添加失败") {
|
|
this.$message.error('已存在此车型类别清单,新增失败')
|
|
} else if (res.data === "国家/地区清单添加成功") {
|
|
this.$message.success('新增成功')
|
|
this.isNext = true
|
|
this.$router.push({
|
|
name: 'AccessStandardsAndRegulations'
|
|
})
|
|
} else if (res.data === "国家/地区清单添加失败") {
|
|
this.$message.error('已存在此国家/地区清单,新增失败')
|
|
}
|
|
}
|
|
}, e => {
|
|
console.log(e)
|
|
})
|
|
} else {
|
|
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
|
}
|
|
} else {
|
|
// 编辑
|
|
this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
|
|
_this: this,
|
|
loading: 'loadData'
|
|
}, res => {
|
|
if (res.ok) {
|
|
this.$message.success('修改成功')
|
|
this.$router.push({
|
|
name: 'AccessStandardsAndRegulations'
|
|
})
|
|
} else {
|
|
this.$message.error('已存在此国家/地区清单,修改失败')
|
|
}
|
|
}, e => {
|
|
})
|
|
}
|
|
} else {
|
|
this.$message.error('请检查表单是否填写正确')
|
|
}
|
|
})
|
|
},
|
|
// saveSarAccess () {
|
|
// this.$refs['sarAccessForm'].validate((valid) => {
|
|
// if (valid) {
|
|
// let rowlist = []
|
|
// let rowlist1 = []
|
|
// let rowlist2 = []
|
|
// let rowlist3 = []
|
|
// for (let i = 0; i < this.sarAccessInfoList.length; i++) {
|
|
// rowlist.push(this.sarAccessInfoList[i].id)
|
|
// if (this.sarAccessInfoList[i].ssrq === null) {
|
|
// rowlist1.push(this.sarAccessInfoList[i].ssrq = '-')
|
|
// }else {
|
|
// rowlist1.push(this.sarAccessInfoList[i].ssrq.toString())
|
|
// }
|
|
// if (this.sarAccessInfoList[i].xcxssrqgj === null) {
|
|
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
|
|
// }else {
|
|
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
|
|
// }
|
|
// if (this.sarAccessInfoList[i].zccssrqgj === null) {
|
|
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
|
|
// }else {
|
|
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
|
|
// }
|
|
// }
|
|
// rowlist = rowlist.join(',')
|
|
// rowlist1 = rowlist1.join(',')
|
|
// rowlist2 = rowlist2.join(',')
|
|
// rowlist3 = rowlist3.join(',')
|
|
// let sarAccessEO = JSON.parse(JSON.stringify(this.sarAccessEO))
|
|
// sarAccessEO.inforlist = rowlist
|
|
// sarAccessEO.inforlist1 = rowlist1
|
|
// sarAccessEO.inforlist2 = rowlist2
|
|
// sarAccessEO.inforlist3 = rowlist3
|
|
// sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
|
|
// // sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')
|
|
// // 判断是否有附件
|
|
// if (this.fileInfoList.length > 0) {
|
|
// let relateFile = []
|
|
// this.fileInfoList.map(item => {
|
|
// relateFile.push(item.id)
|
|
// })
|
|
// sarAccessEO.fileIds = relateFile.join(',')
|
|
// }
|
|
// if (!sarAccessEO.id) {
|
|
// // 新增
|
|
// sarAccessEO.state = '1'
|
|
// sarAccessEO.version = 0
|
|
// this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
|
|
// _this: this,
|
|
// loading: 'loadData'
|
|
// }, res => {
|
|
// if (this.sarAccessInfoList.length !== 0) {
|
|
// if (res.ok) {
|
|
// if (res.data === "数据库为空,添加成功"){
|
|
// this.$message.success('新增成功')
|
|
// this.isNext = true
|
|
// this.$router.push({
|
|
// name: 'AccessStandardsAndRegulations'
|
|
// })
|
|
// }
|
|
// else if (res.data === "其他清单添加成功"){
|
|
// this.$message.success('新增成功')
|
|
// this.isNext = true
|
|
// this.$router.push({
|
|
// name: 'AccessStandardsAndRegulations'
|
|
// })
|
|
// }
|
|
// else if (res.data === "车型类别清单添加成功"){
|
|
// this.$message.success('新增成功')
|
|
// this.isNext = true
|
|
// this.$router.push({
|
|
// name: 'AccessStandardsAndRegulations'
|
|
// })
|
|
// }else if(res.data === "车型类别清单添加失败"){
|
|
// this.$message.error('已存在此车型类别清单,新增失败')
|
|
// }
|
|
// else if (res.data === "国家/地区清单添加成功"){
|
|
// this.$message.success('新增成功')
|
|
// this.isNext = true
|
|
// this.$router.push({
|
|
// name: 'AccessStandardsAndRegulations'
|
|
// })
|
|
// }else if(res.data === "国家/地区清单添加失败"){
|
|
// this.$message.error('已存在此国家/地区清单,新增失败')
|
|
// }
|
|
//
|
|
// }
|
|
// } else {
|
|
// this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
|
// }
|
|
// }, e => {
|
|
// })
|
|
// } else {
|
|
// // 编辑
|
|
// this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
|
|
// _this: this,
|
|
// loading: 'loadData'
|
|
// }, res => {
|
|
// if (res.ok) {
|
|
// //this.$message.success('编辑成功')
|
|
// this.isNext = true
|
|
// this.$router.push({
|
|
// name: 'AccessStandardsAndRegulations'
|
|
// })
|
|
// }
|
|
// }, e => {
|
|
// })
|
|
// }
|
|
// }else {
|
|
// this.$message.error('请检查表单是否填写正确')
|
|
// }
|
|
// })
|
|
// },
|
|
pageInfo() {
|
|
StandardsInfoPage(this.sarAccessInfoSearch).then(res => {
|
|
this.sarAccessInfoSearchList = res.data.list
|
|
this.sarAccessInfoSearchList.forEach(item => {
|
|
if (item.standYear === null) {
|
|
item.standNumber = item.standSortShow + ' ' + item.standNumber
|
|
} else {
|
|
item.standNumber = item.standSortShow + ' ' + item.standNumber + '-' + item.standYear
|
|
}
|
|
if (item.attrInfoMap === null) {
|
|
this.$set(item, 'zccssrqgj', '')
|
|
this.$set(item, 'xcxssrqgj', '')
|
|
this.$set(item, 'sycpx', '')
|
|
this.$set(item, 'ssrq', '')
|
|
this.$set(item, 'typeApplicable', '')
|
|
this.$set(item, 'nylx', '')
|
|
this.$set(item, 'zrbm', '')
|
|
this.$set(item, 'cycvppsbm', '')
|
|
this.$set(item, 'cycvppscn', '')
|
|
this.$set(item, 'kccvppsbm', '')
|
|
this.$set(item, 'kccvppscn', '')
|
|
} else {
|
|
this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQ)
|
|
this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQ)
|
|
this.$set(item, 'sycpx', item.attrInfoMap.SYCPX)
|
|
this.$set(item, 'ssrq', item.attrInfoMap.SSRQ)
|
|
this.$set(item, 'typeApplicable', item.attrInfoMap.CLLX)
|
|
this.$set(item, 'nylx', item.attrInfoMap.NYLX)
|
|
this.$set(item, 'zrbm', item.attrInfoMap.ZRBM)
|
|
this.$set(item, 'cycvppsbm', item.attrInfoMap.CYCVPPSBM)
|
|
this.$set(item, 'cycvppscn', item.attrInfoMap.CYCVPPSCN)
|
|
this.$set(item, 'kccvppsbm', item.attrInfoMap.KCCVPPSBM)
|
|
this.$set(item, 'kccvppscn', item.attrInfoMap.KCCVPPSCN)
|
|
}
|
|
})
|
|
this.drawerTotal = res.data.count
|
|
}, e => {
|
|
})
|
|
},
|
|
// 查询数据搜索 table 数据
|
|
selectLawsStands() {
|
|
if (this.sarAccessInfoSearch.dataSource === 'INLAND_STAND') {
|
|
this.sarAccessInfoSearch.standType = 'INLAND'
|
|
this.pageInfo()
|
|
} else {
|
|
this.sarAccessInfoSearch.standType = 'FOREIGN'
|
|
this.pageInfo()
|
|
}
|
|
|
|
},
|
|
selectPage() {
|
|
StandardsInfoPage(this.sarAccessInfo).then(res => {
|
|
this.sarAccessInfoSearchList = res.data.list
|
|
this.sarAccessInfoSearchList.forEach(item => {
|
|
if (item.standYear === null) {
|
|
item.standNumber = item.standSortShow + ' ' + item.standNumber
|
|
} else {
|
|
item.standNumber = item.standSortShow + ' ' + item.standNumber + '-' + item.standYear
|
|
}
|
|
if (item.attrInfoMap === null) {
|
|
this.$set(item, 'zccssrqgj', '')
|
|
this.$set(item, 'xcxssrqgj', '')
|
|
this.$set(item, 'ssrq', '')
|
|
this.$set(item, 'sycpx', '')
|
|
this.$set(item, 'typeApplicable', '')
|
|
this.$set(item, 'nylx', '')
|
|
this.$set(item, 'zrbm', '')
|
|
this.$set(item, 'cycvppsbm', '')
|
|
this.$set(item, 'cycvppscn', '')
|
|
this.$set(item, 'kccvppsbm', '')
|
|
this.$set(item, 'kccvppscn', '')
|
|
} else {
|
|
this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQ)
|
|
this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQ)
|
|
this.$set(item, 'ssrq', item.attrInfoMap.SSRQ)
|
|
this.$set(item, 'sycpx', item.attrInfoMap.SYCPX)
|
|
this.$set(item, 'typeApplicable', item.attrInfoMap.CLLX)
|
|
this.$set(item, 'nylx', item.attrInfoMap.NYLX)
|
|
this.$set(item, 'zrbm', item.attrInfoMap.ZRBM)
|
|
this.$set(item, 'cycvppsbm', item.attrInfoMap.CYCVPPSBM)
|
|
this.$set(item, 'cycvppscn', item.attrInfoMap.CYCVPPSCN)
|
|
this.$set(item, 'kccvppsbm', item.attrInfoMap.KCCVPPSBM)
|
|
this.$set(item, 'kccvppscn', item.attrInfoMap.KCCVPPSCN)
|
|
}
|
|
})
|
|
this.drawerTotal = res.data.list.length
|
|
}, e => {
|
|
})
|
|
},
|
|
selectBtn() {
|
|
if (this.sarAccessInfoSearch.dataSource === 'INLAND_STAND') {
|
|
this.sarAccessInfoSearch.standType = 'INLAND'
|
|
this.selectPage()
|
|
} else {
|
|
this.sarAccessInfoSearch.standType = 'FOREIGN'
|
|
this.selectPage()
|
|
}
|
|
},
|
|
// 数据搜索table判断checked状态
|
|
selectable(row) {
|
|
return row.isRelateAccess === '1'
|
|
},
|
|
// 数据搜索 table select事件
|
|
sarAccessInfoSearchSelect(val) {
|
|
this.selectedAccInfoSearchList = val
|
|
this.selectedAccInfoSearchList.forEach(item => {
|
|
if (item.attrInfoMap === null) {
|
|
this.$set(item, 'zccssrqgj', '')
|
|
this.$set(item, 'xcxssrqgj', '')
|
|
this.$set(item, 'ssrq', '')
|
|
this.$set(item, 'sycpx', '')
|
|
this.$set(item, 'typeApplicable', '')
|
|
this.$set(item, 'nylx', '')
|
|
this.$set(item, 'zrbm', '')
|
|
this.$set(item, 'cycvppsbm', '')
|
|
this.$set(item, 'cycvppscn', '')
|
|
this.$set(item, 'kccvppsbm', '')
|
|
this.$set(item, 'kccvppscn', '')
|
|
} else {
|
|
this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQ)
|
|
this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQ)
|
|
this.$set(item, 'ssrq', item.attrInfoMap.SSRQ)
|
|
this.$set(item, 'sycpx', item.attrInfoMap.SYCPX)
|
|
this.$set(item, 'typeApplicable', item.attrInfoMap.CLLX)
|
|
this.$set(item, 'nylx', item.attrInfoMap.NYLX)
|
|
this.$set(item, 'zrbm', item.attrInfoMap.ZRBM)
|
|
this.$set(item, 'cycvppsbm', item.attrInfoMap.CYCVPPSBM)
|
|
this.$set(item, 'cycvppscn', item.attrInfoMap.CYCVPPSCN)
|
|
this.$set(item, 'kccvppsbm', item.attrInfoMap.KCCVPPSBM)
|
|
this.$set(item, 'kccvppscn', item.attrInfoMap.KCCVPPSCN)
|
|
}
|
|
})
|
|
this.selectedAccInfoSearchList.forEach(item => {
|
|
// 责任部门转换
|
|
if (item.zrbm !== null || item.zrbm !== "") {
|
|
let k = (item.zrbm || "").split(',')
|
|
for (let i in this.zrbmOptions) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.zrbmOptions[i].value === k[m]) {
|
|
k[m] = this.zrbmOptions[i].label
|
|
}
|
|
item.zrbm = k.join(',')
|
|
}
|
|
}
|
|
}
|
|
// 能源类型转换
|
|
if (item.nylx !== null) {
|
|
let k = (item.nylx || "").split(',')
|
|
for (let i in this.categoryOptions) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.categoryOptions[i].value === k[m]) {
|
|
k[m] = this.categoryOptions[i].label
|
|
}
|
|
item.nylx = k.join(',')
|
|
}
|
|
}
|
|
}
|
|
// 适用车型转换
|
|
if (item.typeApplicable !== null) {
|
|
let k = (item.typeApplicable || "").split(',')
|
|
for (let i in this.CycxOptions) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.CycxOptions[i].value === k[m]) {
|
|
k[m] = this.CycxOptions[i].label
|
|
}
|
|
item.typeApplicable = k.join(',')
|
|
}
|
|
}
|
|
}
|
|
// s适用产品线转换
|
|
if (item.sycpx !== null) {
|
|
let k = (item.sycpx || "").split(',')
|
|
for (let i in this.sycpxOptions) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.sycpxOptions[i].value === k[m]) {
|
|
k[m] = this.sycpxOptions[i].label
|
|
}
|
|
item.sycpx = k.join(',')
|
|
}
|
|
}
|
|
}
|
|
})
|
|
},
|
|
// 数据搜索 清单类型 table select事件
|
|
accessSarTypeSelect(selectData) {
|
|
this.accessSarTypeList = selectData
|
|
},
|
|
// 数据搜索table分页页码改变回调
|
|
drawerPageChange(page) {
|
|
this.drawerPage = page
|
|
this.sarAccessInfoSearch.page = this.drawerPage
|
|
this.selectLawsStands()
|
|
},
|
|
// 数据搜索table分页条数改变回调
|
|
drawerPageSizeChange() {
|
|
this.sarAccessInfoSearch.pageSize = this.$store.getters.userInfo.configContent
|
|
this.selectLawsStands()
|
|
},
|
|
// 点击 导出、全部导出按钮事件
|
|
exportAccessInfo(type) {
|
|
if (this.sarAccessInfoListArry.length > 0) {
|
|
this.exportTestItemNameFlag = true
|
|
this.exportName = ''
|
|
} else {
|
|
this.$message.warning('请选择数据进行导出')
|
|
}
|
|
|
|
},
|
|
// 导出确定功能
|
|
exportTestItem() {
|
|
let exportList = []
|
|
if (this.sarAccessInfoListArry.length > 0) {
|
|
exportList = this.sarAccessInfoListArry
|
|
} else {
|
|
exportList = this.sarAccessInfoList
|
|
}
|
|
if (exportList != null && exportList.length > 0) {
|
|
let accIdAndrestype = []
|
|
for (var accessInfo in exportList) {
|
|
accIdAndrestype.push(exportList[accessInfo].id)
|
|
}
|
|
const exportURL = interfaceUrl + 'sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?' + '&exportType=apart' + '&ids=' + accIdAndrestype.join(',') + '&exportName=' + this.exportName
|
|
window.open(exportURL)
|
|
this.$message.success('导出信息成功')
|
|
}
|
|
this.exportTestItemNameFlag = false
|
|
},
|
|
// 导出取消按钮关闭模态、置空
|
|
cancal() {
|
|
this.exportTestItemNameFlag = false
|
|
},
|
|
// 导入 beforeUpload 事件
|
|
handleFormatbeforeUpload(file) {
|
|
let filename = file.name
|
|
let index1 = filename.lastIndexOf('.')
|
|
let index2 = filename.length
|
|
let fileSuffix = filename.substring(index1, index2)
|
|
// 判断上传文件格式
|
|
if (fileSuffix !== '.xlsx') {
|
|
this.$message.error('文件' + file.name + '格式不正确,请上传.xlsx结尾的Excel文件')
|
|
return false
|
|
}
|
|
// 判断文件上传大小
|
|
if (file.size / 1024 / 1024 > 200) {// eslint-disable-line
|
|
this.$message.error('文件' + file.name + '大小不超过200M')
|
|
return false
|
|
}
|
|
return true
|
|
},
|
|
// 导入成功事件
|
|
importFileSuccess(response, file, fileList) {
|
|
var a
|
|
var b = ''
|
|
if (response.data) {
|
|
for (var sADMIN in this.sarAccessInfoListADMIN) {
|
|
for (var iADMIN in response.data) {
|
|
if (this.sarAccessInfoListADMIN[sADMIN].code === response.data[iADMIN].code) {
|
|
// ('在全部对象中的位置' + i)
|
|
response.data.splice(i, 1)
|
|
b = '数据重复添加,现已自动清除! '
|
|
}
|
|
}
|
|
}
|
|
if (response.data.length > 0) {
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
this.sarAccessInfoList.push(response.data[i])
|
|
}
|
|
}
|
|
a = response.data.length
|
|
}
|
|
if (response.ok === false) {
|
|
this.$message.error(response.message)
|
|
this.importmodalFlag = false
|
|
} else {
|
|
this.$message.success(response.message + b + '导入' + a + '条数据!')
|
|
this.importmodalFlag = false
|
|
this.selectLawsStands()
|
|
}
|
|
},
|
|
beforeRouteLeave(to, from, next) {
|
|
if (to.name === 'Login' || this.isNext) {
|
|
next()
|
|
} else {
|
|
this.$confirm('是否放弃编辑', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
confirmButtonClass: 'common-button-primary',
|
|
roundButton: true,
|
|
type: 'warning'
|
|
}).then(() => {
|
|
next()
|
|
}).catch(() => {
|
|
// alert("router")
|
|
})
|
|
}
|
|
},
|
|
// 点击清单条目 新增按钮 事件
|
|
addEntry() {
|
|
this.editAddType = 1
|
|
this.addEditTitle = '新增'
|
|
this.isDisabled = false
|
|
this.addEntryForm = {...this.defaultAddEntryForm}
|
|
this.addEntryForm.ZRBM = ''
|
|
this.addEntryForm.ZRBMName = ''
|
|
this.addEntryForm.FO = ''
|
|
this.addEntryForm.FOName = ''
|
|
this.addEntryForm.authObj = ''
|
|
this.addEntryForm.authObjId = ''
|
|
this.addEntryForm.proEssessUserId = ''
|
|
this.addEntryForm.sarType = 'TEMP'
|
|
this.addEntryForm.attrField = ''
|
|
this.$nextTick(() => {
|
|
this.$refs['addEntryForm'].resetFields()
|
|
})
|
|
},
|
|
// 请求部门结构树
|
|
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.depNode = treeNode
|
|
this.depFONode = treeNode
|
|
this.depRoleNode = treeNode
|
|
}
|
|
})
|
|
},
|
|
// 新增提交事件
|
|
saveOrUpdateStands() {
|
|
this.isSubmit = true
|
|
this.$refs['addEntryForm'].validate((valid) => {
|
|
if (valid) {
|
|
// 验证标准号是否唯一
|
|
this.validateStandNumber(this.addEntryForm).then((flag) => {
|
|
if (flag) {
|
|
let nowstandinfo = JSON.parse(JSON.stringify(this.addEntryForm))
|
|
if (nowstandinfo.newPutTextTime != null && nowstandinfo.newPutTextTime !== '') {
|
|
nowstandinfo.newPutTextTime = this.$dateFormat(this.addEntryForm.newPutTextTime, 'yyyy-MM-dd')
|
|
}
|
|
if (nowstandinfo.prodPutTextTime != null && nowstandinfo.prodPutTextTime !== '') {
|
|
nowstandinfo.prodPutTextTime = this.$dateFormat(this.addEntryForm.prodPutTextTime, 'yyyy-MM-dd')
|
|
}
|
|
if (nowstandinfo.eopPutTextTime != null && nowstandinfo.eopPutTextTime !== '') {
|
|
nowstandinfo.eopPutTextTime = this.$dateFormat(this.addEntryForm.eopPutTextTime, 'yyyy-MM-dd')
|
|
}
|
|
// 匹配标准性质
|
|
// this.standNatureOptions.map(item => {
|
|
// if (item.value === nowstandinfo.natureId) {
|
|
// nowstandinfo.nature = item.label
|
|
// }
|
|
// })
|
|
// 判断三个实施日期不能全部未N/A和TBD
|
|
// if ((nowstandinfo.prodPutTime === 'N/A' || nowstandinfo.prodPutTime === 'TBD') &&
|
|
// (nowstandinfo.newPutTime === 'N/A' || nowstandinfo.newPutTime === 'TBD') &&
|
|
// (nowstandinfo.eopPutTime === 'N/A' || nowstandinfo.eopPutTime === 'TBD')) {
|
|
// this.isSubmit = false
|
|
// return this.$message.warning('实施日期必须有一项为日期格式')
|
|
// }
|
|
nowstandinfo.applyArctic = nowstandinfo.applyArctic.join(',')
|
|
nowstandinfo.GXHBQ = nowstandinfo.GXHBQ.join(',')
|
|
nowstandinfo.askNature = nowstandinfo.askNature.join(',')
|
|
// 判断新增还是编辑
|
|
if (this.editAddType === 1) {
|
|
this.sarAccessInfoList.push(nowstandinfo)
|
|
this.sarAccessInfoList[this.sarAccessInfoList.length - 1].uuid = this.number
|
|
this.number++
|
|
this.$message.success('添加成功')
|
|
this.isSubmit = false
|
|
} else {
|
|
this.sarAccessInfoList.map((item, index) => {
|
|
if (item.uuid === nowstandinfo.uuid) {
|
|
// this.sarAccessInfoList[index] = nowstandinfo
|
|
this.$set(this.sarAccessInfoList, index, nowstandinfo)
|
|
}
|
|
})
|
|
this.isSubmit = false
|
|
this.$message.success('编辑成功')
|
|
}
|
|
} else {
|
|
this.isSubmit = false
|
|
this.$message.warning('标准编号已存在')
|
|
}
|
|
}, e => {
|
|
})
|
|
} else {
|
|
this.isSubmit = false
|
|
this.$message({
|
|
message: '请检查表单是否填写正确',
|
|
type: 'warning'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
// 标准号验证
|
|
validateStandNumber(standinfo) {
|
|
return new Promise((resolve, reject) => {
|
|
let obj = JSON.parse(JSON.stringify(standinfo))
|
|
this.$http.post('lawss/sarStandardsInfo/validateStandNumber', obj, {
|
|
_this: this
|
|
}, res => {
|
|
if (res.ok) {
|
|
resolve(true)
|
|
} else {
|
|
resolve(false)
|
|
}
|
|
}, e => {
|
|
reject(e)
|
|
})
|
|
})
|
|
},
|
|
// 表单清空
|
|
resetForm() {
|
|
this.isSubmit = false
|
|
this.$refs['addEntryForm'].resetFields()
|
|
},
|
|
/**
|
|
* 赋值内容到入库标准抽屉内
|
|
* item 清单行数据
|
|
*/
|
|
copyStandDrawer(item) {
|
|
this.sarStandardsInfoEO.accessType = item.accessType
|
|
this.sarStandardsInfoEO.standNumber = item.code // 标准编号
|
|
this.sarStandardsInfoEO.standName = item.name // 中文名称
|
|
this.sarStandardsInfoEO.standEnName = item.enName // 英文名称
|
|
this.sarStandardsInfoEO.lawsNumber = item.code // 标准编号
|
|
this.sarStandardsInfoEO.lawsName = item.name // 中文名称
|
|
this.sarStandardsInfoEO.lawsEnName = item.enName // 英文名称
|
|
this.sarStandardsInfoEO.synopsis = item.synopsis
|
|
this.sarStandardsInfoEO.XCXSSRQ = item.newPutTime // 新车型实施日期(文本)
|
|
this.sarStandardsInfoEO.XCXSSRQXM = item.newPutTextTime // 新车型实施日期(项目)
|
|
this.sarStandardsInfoEO.ZCCSSRQ = item.prodPutTime // 在产车实施日期(文本)
|
|
this.sarStandardsInfoEO.ZCCSSRQXM = item.prodPutTextTime // 在产车实施日期(项目)
|
|
this.sarStandardsInfoEO.EOPSSRQ = item.eopPutTime // EOP实施日期(文本)
|
|
this.sarStandardsInfoEO.EOPSSRQXM = item.eopPutTextTime // EOP实施日期(项目)
|
|
this.sarStandardsInfoEO.ZRBMName = item.ZRBMName || item.zrbmname // 责任部门
|
|
this.sarStandardsInfoEO.ZRBM = item.ZRBM || item.zrbm // 责任部门
|
|
this.sarStandardsInfoEO.XGBMName = item.XGBMName || item.xgbmname // 相关部门
|
|
this.sarStandardsInfoEO.XGBM = item.XGBM || item.xgbm // 相关部门
|
|
this.sarStandardsInfoEO.FOName = item.FOName || item.foname // FO
|
|
this.sarStandardsInfoEO.FO = item.FO || item.fo // FO
|
|
this.sarStandardsInfoEO.XMPGJS = item.proEssessUserId // 项目评估人员
|
|
this.sarStandardsInfoEO.XMPGJSName = item.proEssessUser // 项目评估人员
|
|
this.sarStandardsInfoEO.standNature = item.natureId // 标准性质
|
|
this.sarStandardsInfoEO.NRDBZFGQD = this.sarAccessEO.countryArea // 国家地区
|
|
this.sarStandardsInfoEO.CLLX = item.applyArctic ? item.applyArctic.split(',') : []
|
|
this.sarStandardsInfoEO.YQLX = item.askType
|
|
this.sarStandardsInfoEO.GXHBQ = item.GXHBQ ? item.GXHBQ.split(',') : []
|
|
this.sarStandardsInfoEO.ZRLX = item.askNature ? item.askNature.split(',') : []
|
|
if (this.sarStandardsInfoEO.accessType === 'INLAND_STAND') {
|
|
this.sarStandardsInfoEO.countryArea = 'CN'
|
|
} else {
|
|
this.sarStandardsInfoEO.countryArea = ''
|
|
}
|
|
this.uuid = item.uuid
|
|
},
|
|
/**
|
|
* 获取新增弹框的表单
|
|
*/
|
|
getAddFormFieldList(ruKu) {
|
|
return new Promise((resolve, reject) => {
|
|
this.$http.get('lawss/sarStandAttrDetails/list', {}, {_this: this},
|
|
res => {
|
|
if (res.ok) {
|
|
// const { data: { STAND: data } } = res
|
|
const {data = {}} = res
|
|
this.formFieldListData = data[ruKu] || []
|
|
// this.resolveFormFieldList()
|
|
resolve()
|
|
}
|
|
}, e => {
|
|
reject(e)
|
|
})
|
|
})
|
|
},
|
|
resolveFormFieldList(isEdit) {
|
|
const data = this.formFieldListData
|
|
this.formFieldList = data.map((item) => {
|
|
// FO 法规
|
|
if (item.attrType === 'SEL_OPTION' || item.attrType === 'SEL_OPTS') {
|
|
return Object.assign({}, item, {
|
|
options: this.allSelectOptions[item.selVal]
|
|
})
|
|
} else {
|
|
return item
|
|
}
|
|
})
|
|
// 处理时间格式的数据
|
|
data.forEach(item => {
|
|
if (item.attrType === 'DATE_PICKER') {
|
|
const date = this.sarStandardsInfoEO[item.attrField] ? new Date(this.sarStandardsInfoEO[item.attrField]) : ''
|
|
// this.sarStandardsInfoEO[item.attrField] = new Date(this.sarStandardsInfoEO[item.attrField])
|
|
this.$set(this.sarStandardsInfoEO, item.attrField, date)
|
|
} else {
|
|
this.$set(this.sarStandardsInfoEO, item.attrField, this.sarStandardsInfoEO[item.attrField] || '')
|
|
}
|
|
})
|
|
this.resolveFormFieldListRules()
|
|
},
|
|
/**
|
|
* 展示位置
|
|
*/
|
|
queryDisplayLocation(accessType) {
|
|
return new Promise((resolve, reject) => {
|
|
let sarType = accessType === 'INLAND_STAND' ? 'STAND' : accessType === 'FOREIGN_STAND' ? 'INLAND_STAND' : 'FOREIGN_LAWS'
|
|
this.$http.get('lawssBase/utArea/getAreaList', {
|
|
sarType: sarType
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
this.showRegionOptions = res.data || []
|
|
resolve(res.data || [])
|
|
}, e => {
|
|
reject(e)
|
|
})
|
|
})
|
|
},
|
|
// 点击查看
|
|
handlePreview(data) {
|
|
let routerName = data.standType === 'FOREIGN_LAWS' ? 'OtherLawsDetails' : 'OtherStandardDetails'
|
|
let routeUrl = this.$router.resolve({
|
|
name: routerName,
|
|
params: {
|
|
id: data.id,
|
|
pageType: this.sarAccessInfoSearch.dataSource
|
|
}
|
|
})
|
|
window.open(routeUrl.href, '_blank')
|
|
},
|
|
// 请求上传的文件信息
|
|
getFileInfo() {
|
|
this.$http.get('att/attFile/getMultiFileInfos', {
|
|
fileIds: this.$route.query.fileIds
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
this.$nextTick(() => {
|
|
res.data.map(item => {
|
|
// 赋值要回显的上传文件内容
|
|
this.fileInfoList.push({
|
|
name: item.oldFileName,
|
|
uid: item.uid,
|
|
status: item.status,
|
|
id: item.id
|
|
})
|
|
})
|
|
})
|
|
}, e => {
|
|
})
|
|
},
|
|
// 获取工作组信息下拉框信息
|
|
getGzzOption() {
|
|
this.$http.get('lawss/sarGroupMenu/queryGroup', '', {
|
|
_this: this
|
|
}, res => {
|
|
if (res.ok) {
|
|
let gzzxxOptions = []
|
|
res.data.map(item => {
|
|
gzzxxOptions.push({
|
|
value: item.id,
|
|
label: item.menuName
|
|
})
|
|
})
|
|
this.allSelectOptions.GZZXX = gzzxxOptions
|
|
}
|
|
})
|
|
},
|
|
// 新增、编辑标准时验证标准编号是否重复
|
|
validCode(rule, value, callback) {
|
|
let find = 0
|
|
this.sarAccessInfoList.map(item => {
|
|
if (item.code === value) {
|
|
find++
|
|
}
|
|
})
|
|
if (find > 1 && this.editAddType === 2) {
|
|
return callback(new Error('标准编号已存在'))
|
|
} else if (find > 0 && this.editAddType === 1) {
|
|
return callback(new Error('标准编号已存在'))
|
|
}
|
|
callback()
|
|
},
|
|
// 新增、编辑项目评估角色change事件
|
|
roleListChange(val) {
|
|
this.ROLELIST.map(item => {
|
|
if (item.value === val) {
|
|
this.addEntryForm.proEssessUser = item.label
|
|
}
|
|
})
|
|
},
|
|
// 表格回显要求类型
|
|
getAskType(val) {
|
|
let askTypeName = ''
|
|
this.accessSarTypeOptions.map(item => {
|
|
if (item.value === val) {
|
|
askTypeName = item.label
|
|
}
|
|
})
|
|
return askTypeName
|
|
},
|
|
// 表格回显监管类型
|
|
getAskNature(val) {
|
|
if (!val) {
|
|
val = ''
|
|
}
|
|
let askTypeName = this.askNatureOptions.filter(item => {
|
|
return val.indexOf(item.value) > -1
|
|
}).map(item => item.label)
|
|
return askTypeName.join(',')
|
|
},
|
|
onChecked() {
|
|
this.sarStandardsInfoEO.FO = ''
|
|
this.sarStandardsInfoEO.XMPGJS = ''
|
|
},
|
|
formatText(str) {
|
|
return formatText(str)
|
|
},
|
|
getData() {
|
|
this.$http.get('sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById', {
|
|
id: this.zqaId,
|
|
page: this.page,
|
|
Size: this.Size
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
this.sarAccessInfoList = res.data.records
|
|
this.sarAccessInfoList.forEach(item => {
|
|
if (item.standYear === null) {
|
|
item.standNumber = item.standSortShow + ' ' + item.standNumber
|
|
} else {
|
|
item.standNumber = item.standSortShow + ' ' + item.standNumber + '-' + item.standYear
|
|
}
|
|
if (item.attrInfoMap === null) {
|
|
this.$set(item, 'zccssrqgj', '')
|
|
this.$set(item, 'xcxssrqgj', '')
|
|
this.$set(item, 'sycpx', '')
|
|
this.$set(item, 'typeApplicable', '')
|
|
this.$set(item, 'nylx', '')
|
|
this.$set(item, 'zrbm', '')
|
|
this.$set(item, 'cycvppsbm', '')
|
|
this.$set(item, 'cycvppscn', '')
|
|
this.$set(item, 'kccvppsbm', '')
|
|
this.$set(item, 'kccvppscn', '')
|
|
} else {
|
|
this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQ)
|
|
this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQ)
|
|
this.$set(item, 'sycpx', item.attrInfoMap.SYCPX)
|
|
this.$set(item, 'typeApplicable', item.attrInfoMap.CLLX)
|
|
this.$set(item, 'nylx', item.attrInfoMap.NYLX)
|
|
this.$set(item, 'zrbm', item.attrInfoMap.ZRBM)
|
|
this.$set(item, 'cycvppsbm', item.attrInfoMap.CYCVPPSBM)
|
|
this.$set(item, 'cycvppscn', item.attrInfoMap.CYCVPPSCN)
|
|
this.$set(item, 'kccvppsbm', item.attrInfoMap.KCCVPPSBM)
|
|
this.$set(item, 'kccvppscn', item.attrInfoMap.KCCVPPSCN)
|
|
}
|
|
})
|
|
}, e => {
|
|
})
|
|
},
|
|
// 将文本状态的id与name对应
|
|
setMap(data) {
|
|
data.forEach(item => {
|
|
this.$set(this.countryAreaMap, item.value, item.label)
|
|
this.$set(this.textStatusMap, item.value, item.label)
|
|
this.$set(this.typeApplicableMap, item.value, item.label)
|
|
this.$set(this.nylxMap, item.value, item.label)
|
|
this.$set(this.zrbmMap, item.value, item.label)
|
|
this.$set(this.sycpxMap, item.value, item.label)
|
|
})
|
|
}
|
|
},
|
|
watch: {
|
|
// 监听 清单类型
|
|
isListType(newVal, oldVal) {
|
|
this.sarAccessInfoSearchList = []
|
|
this.sarAccessInfoSearch.page = 1
|
|
this.selectedAccInfoSearchList = []
|
|
this.accessSarTypeList = []
|
|
}
|
|
},
|
|
computed: {
|
|
...mapGetters(['getAccessStandardRegRow']),
|
|
},
|
|
mounted() {
|
|
this.zqaId = this.$route.query.id;
|
|
this.page = this.$route.query.page
|
|
this.Size = this.$route.query.Size
|
|
// this.getData()
|
|
this.getDept()
|
|
// 从数据库中查询各下拉框数据
|
|
this.$http.get('sys/dictype/getDicTypeListCode', '', {
|
|
_this: this
|
|
}, res => {
|
|
this.allSelectOptions = res.data || {}
|
|
this.regionOptions = res.data.REGION // 基础信息 区域list
|
|
this.applyArcticOptions = res.data.PRODUCTTYPE // 基础车型 适用车型list
|
|
this.energyKindOptions = res.data.ENERGYTYPES // 能源种类list
|
|
this.CycxOptions = res.data.CLLX
|
|
this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list
|
|
this.applyOptions = res.data.COUNTRY //适用区域list
|
|
this.standNatureOptions = res.data.SARPROPERTY // 新增 标准性质
|
|
this.accessSarTypeOptions = res.data.REQUESTTYPE // 数据搜索 要求类型
|
|
this.standSortOptions = res.data.STANDCLASSIFY // 标准类别
|
|
this.standStateOptions = res.data.STANDSTATE // 标准状态
|
|
this.ROLELIST = res.data.ROLELIST
|
|
this.GXHBQOptions = res.data.GXHBQXX
|
|
this.askNatureOptions = res.data.ACCESSTYPE
|
|
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门
|
|
this.categoryOptions = res.data.NYLXCLASS // 能源类型
|
|
this.textStatusOptions = res.data.WBZTCLASS
|
|
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
|
|
this.setMap(this.textStatusOptions)
|
|
this.setMap(this.drawerCountryOptions)
|
|
this.getGzzOption()
|
|
}, e => {
|
|
})
|
|
this.getOrgTreeSource()
|
|
// 判断是否是编辑
|
|
if (this.$route.query.id) {
|
|
const accessRow = this.getAccessStandardRegRow
|
|
this.$nextTick(() => {
|
|
this.sarAccessEO.type = accessRow.type
|
|
this.sarAccessEO.countryArea = accessRow.countryArea.split(',')
|
|
// this.sarAccessEO.applicationScope = accessRow.applicationScope.split(',')
|
|
this.sarAccessEO.detailedListName = accessRow.detailedListName
|
|
this.sarAccessEO.id = accessRow.id
|
|
this.sarAccessEO.remark = accessRow.remark || ''
|
|
this.sarAccessEO.relateFile = accessRow.relateFile
|
|
this.sarAccessInfoSearch.validFlag = 0
|
|
this.getData()
|
|
this.getFileInfo()
|
|
this.selectLawsStands()
|
|
})
|
|
} else {
|
|
this.selectLawsStands()
|
|
this.$nextTick(() => {
|
|
this.$refs['sarAccessForm'].resetFields()
|
|
})
|
|
}
|
|
},
|
|
beforeRouteLeave(to, from, next) {
|
|
next()
|
|
setTimeout(() => {
|
|
// 清空详情
|
|
this.$store.commit('SET_ACCESS_STAND_REG_ROW')
|
|
}, 100)
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="less" scoped>
|
|
.list-of-standards-and-regulations-details {
|
|
height: calc(~'100% - 50px');
|
|
background: #ffffff;
|
|
overflow-y: auto;
|
|
|
|
.basic-information {
|
|
& > .search-area {
|
|
& > .left {
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
.basic-information, .data-search, .list-entry {
|
|
padding-top: 0.1px;
|
|
background: #ffffff;
|
|
|
|
.el-divider {
|
|
.el-divider__text {
|
|
color: #409EFF;
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.showSelectBox {
|
|
padding: 10px;
|
|
}
|
|
|
|
.data-search {
|
|
.standards-drawer-table-one {
|
|
position: relative;
|
|
padding: 0 10px;
|
|
height: 356px;
|
|
}
|
|
}
|
|
|
|
.list-entry {
|
|
.el-tabs {
|
|
padding: 0 10px;
|
|
}
|
|
}
|
|
|
|
.footer {
|
|
position: absolute;
|
|
bottom: 0;
|
|
padding: 0 10px;
|
|
width: calc(~'100% - 20px');
|
|
height: 50px;
|
|
line-height: 50px;
|
|
background: #ffffff;
|
|
text-align: right;
|
|
}
|
|
}
|
|
|
|
.labelBox {
|
|
/deep/ .el-form-item__label {
|
|
padding-right: 5px;
|
|
padding-left: 15px;
|
|
}
|
|
}
|
|
|
|
.labelBox1 {
|
|
/deep/ .el-form-item__label {
|
|
padding-right: 5px;
|
|
}
|
|
}
|
|
|
|
.un-select {
|
|
user-select: none;
|
|
}
|
|
|
|
::v-deep .el-drawer__header {
|
|
& > span:first-child {
|
|
outline: none !important;
|
|
}
|
|
}
|
|
|
|
::v-deep .el-drawer {
|
|
outline: none !important;
|
|
}
|
|
|
|
/deep/ .wx-resolve {
|
|
.el-select__tags {
|
|
padding: 4px;
|
|
}
|
|
|
|
.el-tag {
|
|
margin: 2px;
|
|
}
|
|
}
|
|
</style>
|