1457 lines
57 KiB
Vue
1457 lines
57 KiB
Vue
<!-- 企标备案 -->
|
||
<template>
|
||
<div id="enterpriseStandardFiling">
|
||
<div class="search-area" style="border-bottom: 3px solid #f4f4f4;">
|
||
<el-form ref="filingForm" :modal="filingForm" :inline="true" class="label-input-form" @keyup.enter.native="tableData(1)">
|
||
<el-form-item label="标准编号" class="search-item">
|
||
<el-input v-model="filingForm.standCode" placeholder="根据标准编号查找" clearable @keyup.enter="tableData(1)"></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="标准名称" class="search-item">
|
||
<el-input v-model="filingForm.standName" placeholder="根据标准名称查找" clearable @keyup.enter="tableData(1)"></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="项目名称" class="search-item">
|
||
<el-select filterable v-model="filingForm.productName"
|
||
placeholder="根据项目名称查找"
|
||
clearable>
|
||
<el-option v-for="opt in productNameOption" :key="opt.value" :value="opt.value === undefined ? '' :opt.value" :label="opt.label">{{ opt.label }}
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<!-- <el-form-item label="产品类型" class="search-item">-->
|
||
<!-- <el-input v-model="filingForm.productType" placeholder="根据产品类型查找"></el-input>-->
|
||
<!-- </el-form-item>-->
|
||
<!-- <el-form-item label="能源类型" class="search-item">
|
||
<!– <el-input v-model="filingForm.applyType" placeholder="根据适用车辆类型查找"></el-input>–>
|
||
<el-select v-model="filingForm.applyType" placeholder="根据能源类型查找" clearable @keyup.enter.native="tableData(filingForm)">
|
||
<el-option v-for="opt in applyCarType" :value="opt.value" :key="opt.value" :label="opt.label">{{ opt.label}}</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="标准状态" class="search-item">
|
||
<!– <el-input v-model="filingForm.standStatus" placeholder="根据标准状态查找"></el-input>–>
|
||
<el-select filterable v-model="filingForm.standStatus" placeholder="根据标准状态查找" clearable @keyup.enter.native="tableData(filingForm)">
|
||
<el-option v-for="opt in standStateOptions" :value="opt.value" :key="opt.value" :label="opt.label">{{ opt.label}}</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="公开状态" class="search-item">
|
||
<!– <el-input v-model="filingForm.publicStatus" placeholder="根据公开状态查找"></el-input>–>
|
||
<el-select v-model="filingForm.publicStatus" placeholder="根据公开状态查找" clearable @keyup.enter.native="tableData(filingForm)">
|
||
<el-option value="0" label="否" key="0"></el-option>
|
||
<el-option value="1" label="是" key="1"></el-option>
|
||
</el-select>
|
||
</el-form-item>-->
|
||
<!-- <el-form-item label="发布时间" class="search-item">-->
|
||
<!-- <el-date-picker-->
|
||
<!-- v-model="filingForm.issueTime"-->
|
||
<!-- type="date"-->
|
||
<!-- placeholder="根据发布时间查找">-->
|
||
<!-- </el-date-picker>-->
|
||
<!--<!– <el-input v-model="filingForm.issueTime" placeholder="根据发布时间查找"></el-input>–>-->
|
||
<!-- </el-form-item>-->
|
||
<!-- <el-form-item label="实施时间" class="search-item">-->
|
||
<!-- <el-date-picker-->
|
||
<!-- v-model="filingForm.putTime"-->
|
||
<!-- value-format="yyyy-MM-dd"-->
|
||
<!-- type="date"-->
|
||
<!-- placeholder="根据实施时间查找">-->
|
||
<!-- </el-date-picker>-->
|
||
<!--<!– <el-input v-model="filingForm.putTime" placeholder="根据实施时间查找"></el-input>–>-->
|
||
<!-- </el-form-item>-->
|
||
<!-- <el-form-item label="代替企标编号" class="search-item">-->
|
||
<!-- <el-input v-model="filingForm.replaceStandNum" placeholder="根据代替企标编号查找"></el-input>-->
|
||
<!-- </el-form-item>-->
|
||
<el-form-item class="search-item btn-box">
|
||
<el-button
|
||
:loading="searching"
|
||
icon="el-icon-search"
|
||
type="primary"
|
||
class="common-button-primary"
|
||
round
|
||
@click="tableData(1)">
|
||
</el-button>
|
||
<el-button
|
||
class="common-button-default"
|
||
icon="el-icon-refresh-left"
|
||
round
|
||
@click="clearAllSearch()"></el-button>
|
||
<el-button type="primary" class="common-button-primary" round @click="selectMoreBtn"><i class="iconfont"></i>高级查询</el-button>
|
||
</el-form-item>
|
||
</el-form>
|
||
</div>
|
||
<div class="action-bar">
|
||
<el-button type="primary"
|
||
class="common-button-primary add-button"
|
||
round
|
||
@click="addModal"
|
||
v-btn-permission="'KFW98JENT2N8VPVR8JM6'"><i class="el-icon-plus"></i>新增</el-button>
|
||
<el-button
|
||
class="common-button-default in-button"
|
||
round
|
||
:loading="searching"
|
||
@click="addImportModal()"
|
||
v-btn-permission="'6W2GNMFKFCP8EUXRZL4Q'"
|
||
><i class="iconfont"></i>导入</el-button>
|
||
<el-button
|
||
class="common-button-default export-button"
|
||
round
|
||
@click="exportStandard"
|
||
v-btn-permission="'FEYXJSMN8BSYG4MU82NV'"
|
||
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
|
||
><i class="iconfont"></i>导出</el-button>
|
||
<el-button
|
||
class="common-button-default"
|
||
round
|
||
:loading="searching"
|
||
@click="uploadImportModal(1)"
|
||
v-btn-permission="'JHMXP73B6XY3X6RAPN72'"
|
||
><i class="iconfont"></i>模板下载</el-button>
|
||
<el-button
|
||
class="common-button-default delete-button"
|
||
round
|
||
@click="deleteStand(2)"
|
||
v-btn-permission="'XCU5FS9TLPP8EY49Q9ZJ'"
|
||
><i class="iconfont"></i>批量删除</el-button>
|
||
</div>
|
||
<div class="container">
|
||
<el-table
|
||
:data="filingTable"
|
||
tooltip-effect="dark"
|
||
style="width: 100%;"
|
||
height="100%"
|
||
border
|
||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||
fontWeight: 'bold', height: '48px'}"
|
||
ref="selection"
|
||
@selection-change="standSelectChange"
|
||
>
|
||
<el-table-column
|
||
type="selection"
|
||
width="55"
|
||
align="center">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="standCode"
|
||
label="标准编号"
|
||
align="center"
|
||
width="220px"
|
||
>
|
||
<template slot-scope="scope">
|
||
<a @click="showStand(scope.row)" class="table-jump">{{ scope.row.standCode }}</a>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="standName"
|
||
label="标准名称"
|
||
align="center"
|
||
width="260px"
|
||
>
|
||
<template slot-scope="scope">
|
||
<a @click="showStand(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="productNameShow"
|
||
label="项目名称"
|
||
align="center"
|
||
width="190px"
|
||
>
|
||
<template slot-scope="scope">
|
||
<!-- <a @click="toDetails(scope.row)" style="cursor: pointer;color: #0c91e5;">-->
|
||
{{ scope.row.productName }}
|
||
<!-- </a>-->
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="productType"
|
||
label="产品类型"
|
||
align="center">
|
||
<template slot-scope="scope">
|
||
<div v-if="scope.row.productType === '0'">整车</div>
|
||
<div v-if="scope.row.productType === '1'">发动机</div>
|
||
<div v-if="scope.row.productType === '2'">变速箱</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="applyTypeShow"
|
||
label="能源类型"
|
||
align="center">
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="standStatusShow"
|
||
label="标准状态"
|
||
align="center"
|
||
width="120px"
|
||
>
|
||
<template slot="header" slot-scope="scope">
|
||
<el-tooltip class="item" effect="dark" content="制定状态为新编制发布标准;修订状态为在原标准上发布新版本标准;已替代状态为已有新标准代替了当前标准" placement="bottom">
|
||
<span>标准状态 <i class="el-icon-warning-outline"></i></span>
|
||
</el-tooltip>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="publicStatus"
|
||
label="公开状态"
|
||
align="center">
|
||
<template slot-scope="scope">
|
||
<div v-if="scope.row.publicStatus === '1'">是</div>
|
||
<div v-if="scope.row.publicStatus === '0'">否</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="issueTime"
|
||
label="发布时间"
|
||
sortable
|
||
align="center"
|
||
width="110"
|
||
>
|
||
<template slot-scope="scope">
|
||
<div>{{dateFormat2(scope.row.issueTime)}}</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="putTime"
|
||
label="实施时间"
|
||
align="center"
|
||
sortable
|
||
width="110"
|
||
>
|
||
<template slot-scope="scope">
|
||
<div>{{dateFormat2(scope.row.putTime)}}</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="replaceStandNum"
|
||
label="代替标准编号"
|
||
width="240"
|
||
align="center"
|
||
>
|
||
<template slot-scope="scope">
|
||
<div v-if="scope.row.replaceStandNum">
|
||
<span v-for="(item, index) in scope.row.replaceStandNum.split(',')" :key="index">
|
||
<a @click="clickReplaceStandNum(item)" style="cursor: pointer;color: #0c91e5;margin-right: 5px;" class="span-line">{{item}}</a>
|
||
</span>
|
||
</div>
|
||
<p style="color: #ccc;" v-else>--</p>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="操作" align="center" width="50" fixed="right">
|
||
<template slot-scope="scope">
|
||
<div @click.stop style="display: inline-block">
|
||
<el-dropdown trigger="click" @command="handleCommand">
|
||
<i class="iconfont"></i>
|
||
<el-dropdown-menu slot="dropdown">
|
||
<el-dropdown-item :command="[scope.row, '查看']" v-btn-permission="'G6RYPSGGBANSJD3S6HAQ'">查看</el-dropdown-item>
|
||
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'CCFX43HNCZW5Z7QU4R65'">编辑</el-dropdown-item>
|
||
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'4QZ854TUZV6FDL7A2BRW'">删除</el-dropdown-item>
|
||
</el-dropdown-menu>
|
||
</el-dropdown>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
<pagination :page="page" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
|
||
<loading :loading="loading">数据获取中</loading>
|
||
</div>
|
||
<!-- 新增 -->
|
||
<el-drawer
|
||
:title="modalshowtitle"
|
||
:visible.sync="modalshowflag"
|
||
:wrapperClosable="false"
|
||
size="800px"
|
||
@close="resetForm"
|
||
>
|
||
<!-- 新增样式 -->
|
||
<div class="demo-drawer-content">
|
||
<div class="el-drawer-form">
|
||
<el-form
|
||
ref="sarStandardsInfoForm"
|
||
:model="sarStandardsInfoEO"
|
||
:rules="sarStandardsInfoRules"
|
||
class="label-input-form"
|
||
>
|
||
<el-form-item label="标准编号" prop="standCode" label-width="150px" class="add-form-item">
|
||
<el-input v-model="sarStandardsInfoEO.standCode"
|
||
placeholder="请输入标准编号"
|
||
clearable></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="标准名称" prop="standName" label-width="150px" class="add-form-item">
|
||
<el-input v-model="sarStandardsInfoEO.standName"
|
||
placeholder="请输入标准名称"
|
||
clearable></el-input>
|
||
</el-form-item>
|
||
<el-form-item label="项目名称" prop="productName" label-width="150px" class="add-form-item">
|
||
<el-select v-model="sarStandardsInfoEO.productName"
|
||
allow-create
|
||
placeholder="请选择项目名称"
|
||
filterable
|
||
clearable>
|
||
<el-option v-for="opt in productNameOption" :key="opt.value" :value="opt.value === undefined ? '' :opt.value" :label="opt.label">{{ opt.label }}
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<!-- 默认值是 整车-->
|
||
<el-form-item label="产品类型" prop="productType" label-width="150px" class="add-form-item">
|
||
<!-- <el-input v-model="sarStandardsInfoEO.productType"-->
|
||
<!-- placeholder="请输入产品类型"-->
|
||
<!-- clearable disabled></el-input>-->
|
||
<el-select v-model="sarStandardsInfoEO.productType"
|
||
clearable>
|
||
<!-- <el-option v-for="opt in productTypeOptions" :key="opt.value" :value="opt.value === undefined ? '' :opt.value" :label="opt.label">{{ opt.label }}-->
|
||
<!-- </el-option>-->
|
||
<el-option value="0" label="整车" key="0"></el-option>
|
||
<el-option value="1" label="发动机" key="1"></el-option>
|
||
<el-option value="2" label="变速箱" key="2"></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
|
||
<el-form-item label="能源类型" prop="applyType" label-width="150px" class="add-form-item">
|
||
<el-select v-model="sarStandardsInfoEO.applyType"
|
||
placeholder="请选择能源类型"
|
||
filterable
|
||
clearable multiple>
|
||
<el-option v-for="opt in applyCarType" :key="opt.value" :value="opt.value === undefined ? '' :opt.value" :label="opt.label">{{ opt.label }}
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item title="“制定状态为新编制发布标准;修订状态为在原标准上发布新版本标准;已替代状态为已有新标准代替了当前标准"
|
||
prop="standStatus" label-width="150px" class="add-form-item">
|
||
<template slot="label">标准状态<i class="el-icon-warning-outline"></i></template>
|
||
<el-select v-model="sarStandardsInfoEO.standStatus"
|
||
placeholder="请选择标准状态"
|
||
filterable
|
||
clearable>
|
||
<el-option v-for="opt in standStateOptions" :key="opt.value" :value="opt.value === undefined ? '' :opt.value" :label="opt.label">{{ opt.label }}
|
||
</el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<!-- 是否-->
|
||
<el-form-item label="公开状态" prop="publicStatus" label-width="150px" class="add-form-item">
|
||
<el-select v-model="sarStandardsInfoEO.publicStatus">
|
||
<el-option value="0" label="否" key="0"></el-option>
|
||
<el-option value="1" label="是" key="1"></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="发布时间" prop="issueTime" label-width="150px" class="add-form-item">
|
||
<el-datePicker v-model="sarStandardsInfoEO.issueTime"
|
||
:editable="false"
|
||
placeholder="请选择发布时间"></el-datePicker>
|
||
</el-form-item>
|
||
<el-form-item label="实施时间" prop="putTime" label-width="150px" class="add-form-item">
|
||
<el-datePicker v-model="sarStandardsInfoEO.putTime"
|
||
:editable="false"
|
||
placeholder="请选择实施时间"></el-datePicker>
|
||
</el-form-item>
|
||
<custom-input-for-Record
|
||
:config="{
|
||
attrName: '代替企标编号',
|
||
attrField: 'replaceStandNum',
|
||
}"
|
||
@checkDetail="showStand"
|
||
v-model="sarStandardsInfoEO.replaceStandNum"
|
||
></custom-input-for-Record>
|
||
<custom-file
|
||
@recordsAttrTime="parentEvent"
|
||
:config="{
|
||
attrName: '企标备案文件',
|
||
attrField: 'recordsAttr',
|
||
}"
|
||
v-model="sarStandardsInfoEO.recordsAttr"
|
||
></custom-file>
|
||
<custom-date-pick
|
||
:config="{
|
||
attrName: '企标备案文件上传时间',
|
||
attrField: 'recordsAttrTime',
|
||
}"
|
||
v-model="sarStandardsInfoEO.recordsAttrTime"
|
||
></custom-date-pick>
|
||
<custom-file
|
||
@signAttrTime="parentEvent2"
|
||
:config="{
|
||
attrName: '发布版文件',
|
||
attrField: 'signAttr',
|
||
}"
|
||
v-model="sarStandardsInfoEO.signAttr"
|
||
></custom-file>
|
||
<custom-date-pick
|
||
:config="{
|
||
attrName: '发布版文件上传时间',
|
||
attrField: 'signAttrTime',
|
||
}"
|
||
v-model="sarStandardsInfoEO.signAttrTime"
|
||
></custom-date-pick>
|
||
|
||
<custom-file
|
||
@otherAttrTime="parentEvent3"
|
||
:config="{
|
||
attrName: '其他备案文件',
|
||
attrField: 'otherAttr',
|
||
}"
|
||
v-model="sarStandardsInfoEO.otherAttr"
|
||
></custom-file>
|
||
<custom-date-pick
|
||
:config="{
|
||
attrName: '其他备案文件上传时间',
|
||
attrField: 'otherAttrTime',
|
||
}"
|
||
v-model="sarStandardsInfoEO.otherAttrTime"
|
||
></custom-date-pick>
|
||
|
||
<el-form-item label="有效日期" prop="validDate" label-width="150px" class="add-form-item">
|
||
<el-datePicker v-model="sarStandardsInfoEO.validDate"
|
||
:editable="false"
|
||
placeholder="请选择有效日期"></el-datePicker>
|
||
</el-form-item>
|
||
</el-form>
|
||
</div>
|
||
</div>
|
||
<div class="demo-drawer-footer">
|
||
<el-button class="common-button-primary" icon="el-icon-check" type="primary" @click="saveOrUpdateStands" :loading="isSubmit">提交</el-button>
|
||
<el-button class="common-button-default" icon="el-icon-close" @click="resetForm">取消</el-button>
|
||
</div>
|
||
</el-drawer>
|
||
<!--导入模态窗-->
|
||
<el-dialog width='400px' :visible.sync="importModalshowflag" title="导入文件">
|
||
<el-upload
|
||
multiple
|
||
drag
|
||
:action="importExcelUrl"
|
||
ref="importfile"
|
||
name="file"
|
||
accept=".ZIP, .zip"
|
||
:before-upload="beginImportFile"
|
||
:on-success="importFileSuccess"
|
||
:show-file-list="showUploadlist"
|
||
>
|
||
<div style="padding: 20px 0">
|
||
<i class="el-icon-upload" style="color: #3399ff"></i>
|
||
<p>点击或拖拽上传文件</p>
|
||
</div>
|
||
</el-upload>
|
||
</el-dialog>
|
||
<!--导入失败-->
|
||
<el-dialog :visible.sync="importFailed" :close-on-click-modal="false" width="400px">
|
||
<p slot="title" style="color:#f60">
|
||
<span>导入失败</span>
|
||
</p>
|
||
<div style="max-height: 300px;overflow: auto;padding: 10px 0;">
|
||
<p v-html="importForm.content"></p>
|
||
</div>
|
||
<div slot="footer">
|
||
<el-button type="primary" size="mini" @click="importFailed = false">确认</el-button>
|
||
</div>
|
||
</el-dialog>
|
||
<!--导出模态框-->
|
||
<el-dialog :visible.sync="exportModelFlag" title="导出文件" width="30%">
|
||
<el-form :inline="true" class="label-input-form">
|
||
<el-form-item label="导出名称" class="serch-form-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" icon="el-icon-close" @click="cancal">取消</el-button>
|
||
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="exportTestItem">提交</el-button>
|
||
</span>
|
||
</el-dialog>
|
||
<!--查看抽屉-->
|
||
<el-drawer
|
||
title='查看'
|
||
:visible.sync="isSee"
|
||
destroy-on-close
|
||
:wrapperClosable="false"
|
||
size="800px"
|
||
>
|
||
<div class="demo-drawer-content">
|
||
<div class="el-drawer-form" style="height: auto">
|
||
<el-form
|
||
class="label-input-form"
|
||
label-width="150px"
|
||
ref="nonAddForm"
|
||
style="width: 100%;"
|
||
:model="clickRow"
|
||
>
|
||
<el-form-item class="add-form-item" label="标准编号:">
|
||
<div class="seeItem">{{clickRow.standCode}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="标准名称:">
|
||
<div class="seeItem">{{clickRow.standName}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="项目名称:">
|
||
<div class="seeItem">{{clickRow.productNameShow}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="产品类型:">
|
||
<div v-if="clickRow.productType">
|
||
<div class="seeItem" v-if="clickRow.productType === '0'">整车</div>
|
||
<div class="seeItem" v-if="clickRow.productType === '1'">发动机</div>
|
||
<div class="seeItem" v-if="clickRow.productType === '2'">变速箱</div>
|
||
</div>
|
||
<div class="seeItem" v-else>{{clickRow.nowState}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="能源类型:">
|
||
<div class="seeItem">{{clickRow.applyTypeShow}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="标准状态:">
|
||
<div class="seeItem">{{clickRow.standStatusShow}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="公共状态:">
|
||
<div v-if="clickRow.publicStatus">
|
||
<div class="seeItem" v-if="clickRow.publicStatus === '0'">否</div>
|
||
<div class="seeItem" v-if="clickRow.publicStatus === '1'">是</div>
|
||
</div>
|
||
<div class="seeItem" v-else>{{clickRow.publicStatus}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="发布时间:">
|
||
<div class="seeItem">{{ dateFormat2(clickRow.issueTime) }}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="实施时间:">
|
||
<div class="seeItem">{{ dateFormat2(clickRow.putTime) }}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="代替标准编号:">
|
||
<div class="seeItem">
|
||
<!-- {{clickRow.replaceStandNum}}-->
|
||
<span
|
||
style="margin-right: 10px"
|
||
v-for="(item,index) in replaceArr"
|
||
:key="index"
|
||
>
|
||
<a @click="handlePreview(item)" target="_blank">{{ item }}</a>
|
||
</span>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="企标备案文件:">
|
||
<div class="seeItem">
|
||
<p
|
||
class="files-title"
|
||
v-for="(file, fileIndex) in clickRow.recordsAttrShow"
|
||
:key="fileIndex"
|
||
>
|
||
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
|
||
<i title="下载" @click="downloadFile(file.id)" class="icon-download" v-btn-permission="'UA2J7TAUPFKCU45SU386'"/>
|
||
<i title="下载带水印" @click="downloadFileByWater(file.id, file.fileSuffix)" class="icon-download2" v-btn-permission="'P4HXQBNPFGGXC2657L73'"/>
|
||
</p>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="企标备案文件上传时间:" title="企标备案文件上传时间">
|
||
<div class="seeItem">{{clickRow.recordsAttrTime}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="发布版文件:">
|
||
<div class="seeItem">
|
||
<p
|
||
class="files-title"
|
||
v-for="(file, fileIndex) in clickRow.signAttrShow"
|
||
:key="fileIndex"
|
||
>
|
||
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
|
||
<i title="下载" @click="downloadFile(file.id)" class="icon-download" v-btn-permission="'UA2J7TAUPFKCU45SU386'"/>
|
||
<i title="下载带水印" @click="downloadFileByWater(file.id, file.fileSuffix)" class="icon-download2" v-btn-permission="'P4HXQBNPFGGXC2657L73'"/>
|
||
</p></div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="发布版文件上传时间:" title="发布版文件上传时间">
|
||
<div class="seeItem">{{clickRow.signAttrTime}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="其他备案文件:">
|
||
<div class="seeItem">
|
||
<p
|
||
class="files-title"
|
||
v-for="(file, fileIndex) in clickRow.otherAttrShow"
|
||
:key="fileIndex"
|
||
>
|
||
<a @click="openFileInPdf(file.id, file.oldFileName)" target="_blank">{{ file.oldFileName }}</a>
|
||
<i title="下载" @click="downloadFile(file.id)" class="icon-download" v-btn-permission="'UA2J7TAUPFKCU45SU386'"/>
|
||
<i title="下载带水印" @click="downloadFileByWater(file.id, file.fileSuffix)" class="icon-download2" v-btn-permission="'P4HXQBNPFGGXC2657L73'"/>
|
||
</p>
|
||
</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="其他备案文件上传时间:" title="其他备案文件上传时间">
|
||
<div class="seeItem">{{clickRow.otherAttrTime}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="有效日期:">
|
||
<div class="seeItem">{{clickRow.validDate}}</div>
|
||
</el-form-item>
|
||
<el-form-item class="add-form-item" label="相关流程:">
|
||
<!-- {{clickRow.activitiId}}-->
|
||
<div class="seeItem" v-if="clickRow.activitiId">
|
||
<span v-for="(item, index) in clickRow.activitiId.split(',')" :key="index">
|
||
<a @click="processCenterClick(item)" style="cursor: pointer;color: #0c91e5;margin-right: 5px;" class="span-line">{{item}}</a>
|
||
</span>
|
||
</div>
|
||
<div v-else>
|
||
{{clickRow.activitiId}}
|
||
</div>
|
||
</el-form-item>
|
||
</el-form>
|
||
</div>
|
||
</div>
|
||
</el-drawer>
|
||
<AdvancedQuery
|
||
:isAdvancedSearch.sync="isAdvancedSearch"
|
||
:twoOptions="twoOptions"
|
||
:threeOptions="threeOptions"
|
||
@twoSelectChange="twoSelectChange"
|
||
@getDomesticStandardTableBtn="getDomesticStandardTableBtn"
|
||
></AdvancedQuery>
|
||
</div>
|
||
</template>
|
||
<script>
|
||
// import CustomInputForStandards from '@/components/CustomFormComponents/InputForStandardsForEnterprise'
|
||
import CustomInputForRecord from '@/components/CustomFormComponents/InputForRecord'
|
||
import CustomFile from '@/components/CustomFormComponents/File'
|
||
import CustomDatePick from '@/components/CustomFormComponents/FillingDatePicker'
|
||
import {dateFormat} from "@/common/date";
|
||
export default {
|
||
name: 'enterpriseStandardFiling',
|
||
components: {
|
||
CustomInputForRecord,
|
||
CustomFile,
|
||
CustomDatePick
|
||
},
|
||
data () {
|
||
return {
|
||
twoOptions: [{
|
||
label: '标准编号',
|
||
value: 'STAND_CODE',
|
||
type: 'INPUT',
|
||
disabled: false
|
||
}, {
|
||
label: '标准名称',
|
||
value: 'STAND_NAME',
|
||
type: 'INPUT',
|
||
disabled: false
|
||
}, {
|
||
label: '项目名称',
|
||
value: 'PRODUCT_NAME',
|
||
type: 'SEL_OPTION',
|
||
disabled: false
|
||
}, {
|
||
label: '产品类型',
|
||
value: 'PRODUCT_TYPE',
|
||
type: 'SEL_OPTION',
|
||
disabled: false
|
||
}, {
|
||
label: '能源类型',
|
||
value: 'APPLY_TYPE',
|
||
type: 'SEL_OPTION',
|
||
disabled: false
|
||
}, {
|
||
label: '标准状态',
|
||
value: 'STAND_STATUS',
|
||
type: 'SEL_OPTION',
|
||
disabled: false
|
||
}, {
|
||
label: '公开状态',
|
||
value: 'PUBLIC_STATUS',
|
||
type: 'SEL_OPTION',
|
||
disabled: false
|
||
}/*, {
|
||
label: '发布时间',
|
||
value: 'FBSJ',
|
||
type: 'DATE_PIC_OPTS',
|
||
disabled: false
|
||
}, {
|
||
label: '实施时间',
|
||
value: 'SSSJ',
|
||
type: 'DATE_PIC_OPTS',
|
||
disabled: false
|
||
}, {
|
||
label: '代替标准编号',
|
||
value: 'DTBZBH',
|
||
type: 'INPUT',
|
||
disabled: false
|
||
}, {
|
||
label: '有效时间',
|
||
value: 'XXSJ',
|
||
type: 'DATE_PIC_OPTS',
|
||
disabled: false
|
||
}*/],
|
||
threeOptions: [],
|
||
isAdvancedSearch: false, // 高级检索窗口是否打开
|
||
showUploadlist: true, // 导入过程中新增数据时,如果数据错误,不出现导入列表
|
||
uploadPath: 'api/att/attFile/upload',
|
||
defaultFileList: [], // 默认显示
|
||
importModalshowflagtemp: false,
|
||
importModalshowflag: false,
|
||
importFailed: false,
|
||
importForm: {
|
||
content: ''
|
||
},
|
||
importExcelUrl: '', // 导入EXCEL文档
|
||
selectedList: [],
|
||
saveExportType: '',
|
||
SarExportSearchEo: {},
|
||
// 导出文件模态框控制,和文件名称
|
||
exportModelFlag: false,
|
||
exportName: '',
|
||
applyCarType: [], // 能源类型
|
||
standStateOptions: [], // 标准状态
|
||
productNameOption: [], // 项目名称
|
||
productTypeOptions: [
|
||
{label: '整车', value: '1'}, {label: '发动机', value: '2'}, {label: '变速器', value: '3'}
|
||
],
|
||
isSubmit: false,
|
||
sarStandardsInfoEO: {
|
||
standCode: '',
|
||
standName: '',
|
||
productName: '',
|
||
productType: '0',
|
||
applyType: '',
|
||
standStatus: '',
|
||
publicStatus: '',
|
||
issueTime: '', // 发布时间
|
||
putTime: '', // 实施时间
|
||
replaceStandNum: '',
|
||
recordsAttr: '',
|
||
recordsAttrTime: '',
|
||
signAttr: '',
|
||
signAttrTime: '',
|
||
otherAttr: '',
|
||
otherAttrTime: '',
|
||
validDate: ''
|
||
}, // 企标备案新增过程中用到的对象
|
||
// 新增规则
|
||
sarStandardsInfoRules: {
|
||
standCode: [
|
||
{required: true, message: '标准编号不能为空', trigger: 'blur'},
|
||
{type: 'string', max: 100, message: '最多输入100个字符', trigger: 'change'},
|
||
{type: 'string', validator: this.verify.validateStandardItem, trigger: 'change'}
|
||
],
|
||
standName: [
|
||
{required: true, message: '标准名称不能为空', trigger: 'blur'},
|
||
{type: 'string', max: 255, message: '最多输入255个字符', trigger: 'change'}
|
||
],
|
||
replaceStandNum: [
|
||
{required: true, message: '代替标准编号不能为空', trigger: 'blur'},
|
||
{type: 'string', max: 100, message: '最多输入100个字符', trigger: 'change'},
|
||
{type: 'string', validator: this.verify.validateStandardItem, trigger: 'change'}
|
||
],
|
||
productName: [
|
||
{type: 'string', max: 100, message: '最多输入100个字符', trigger: 'change'}
|
||
]
|
||
},
|
||
modalshowflag: false,
|
||
modalshowtitle: '',
|
||
addOrUPdateFlag: '',
|
||
page: 1,
|
||
pageSize: this.$store.getters.userInfo.configContent,
|
||
total: 0,
|
||
searching: false,
|
||
loading: false,
|
||
filingForm: {
|
||
standCode: '',
|
||
standName: '',
|
||
productName: '',
|
||
productType: '',
|
||
applyType: '',
|
||
standStatus: '',
|
||
publicStatus: '',
|
||
issueTime: '',
|
||
putTime: '',
|
||
replaceStandNum: '',
|
||
advanceSearchVOStr: ''
|
||
},
|
||
filingTable: [],
|
||
isSee: false,
|
||
clickRow: {},
|
||
replaceArr: []
|
||
}
|
||
},
|
||
methods: {
|
||
// 高级检索
|
||
selectMoreBtn () {
|
||
this.isAdvancedSearch = true
|
||
this.threeOptions = []
|
||
console.log(this.applyCarType,'1111111111')
|
||
},
|
||
twoSelectChange(val, obj){
|
||
if (val === 'PRODUCT_NAME') {
|
||
this.threeOptions = this.productNameOption
|
||
}else if (val === 'APPLY_TYPE'){
|
||
this.threeOptions = this.applyCarType
|
||
}else if (val === 'STAND_STATUS'){
|
||
this.threeOptions = this.standStateOptions
|
||
}else if (val === 'PUBLIC_STATUS'){
|
||
this.threeOptions = [{
|
||
label: '否', value: 0
|
||
},{
|
||
label: '是', value: 1
|
||
}]
|
||
}else if (val === 'PRODUCT_TYPE'){
|
||
this.threeOptions = [{
|
||
label: '整车', value: 0
|
||
},{
|
||
label: '发动机', value: 1
|
||
},{
|
||
label: '变速箱', value: 2
|
||
}]
|
||
}
|
||
},
|
||
getDomesticStandardTableBtn(advancedSearch){
|
||
let formData = {}
|
||
formData.page = 1
|
||
formData.advanceSearchStr = ''
|
||
formData.advanceSearchVOStr = JSON.stringify(advancedSearch) || ''
|
||
formData.pageSize = this.$store.getters.userInfo.configContent
|
||
// 重置页码
|
||
//this.clearSearch(false)
|
||
this.searchSarAccess(formData, 1)
|
||
},
|
||
searchSarAccess(formData, flag){
|
||
this.filingForm.advanceSearchVOStr = formData.advanceSearchVOStr
|
||
if (flag === 1) {
|
||
this.page = 1
|
||
}
|
||
formData.page = this.page
|
||
formData.pageSize = this.pageSize
|
||
this.$http.get('lawss/sarBussRecords/page', formData, {
|
||
_this: this,
|
||
loading: 'loading'
|
||
}, res => {
|
||
this.filingTable = res.data.list
|
||
this.total = res.data.count
|
||
this.SarExportSearchEo = formData
|
||
}, e => {
|
||
})
|
||
},
|
||
parentEvent(data){
|
||
this.sarStandardsInfoEO.recordsAttrTime = data
|
||
},
|
||
parentEvent2(data){
|
||
this.sarStandardsInfoEO.signAttrTime = data
|
||
},
|
||
parentEvent3(data){
|
||
this.sarStandardsInfoEO.otherAttrTime = data
|
||
},
|
||
toDetails (row) {
|
||
this.$http.get('lawss/sarProductInfo/getById', {
|
||
id: row.productName
|
||
}, {
|
||
_this: this
|
||
}, res => {
|
||
this.$store.commit('setDetailMap', this.$route.path)
|
||
this.$store.commit('setLocalProData', JSON.stringify(res.data))
|
||
this.$router.push({
|
||
name: 'LocalProductDetail'
|
||
})
|
||
}
|
||
)
|
||
},
|
||
/**
|
||
* @Description: 跳转流程
|
||
*/
|
||
processCenterClick (item) {
|
||
let routeUrl = this.$router.resolve({
|
||
name: 'ProcessDetail',
|
||
query: {
|
||
prcNum: item
|
||
}
|
||
})
|
||
window.open(routeUrl.href, '_blank')
|
||
},
|
||
openFileInPdf (attId, oldFileName) {
|
||
// 缺少文件
|
||
if (this.$hasPermission('X9DYHDUAVLEBLTUQGQMB')) {
|
||
this.$http.get('/lawss/sarBussRecordsFile/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('文档未转换成功或本地读取不到该文档')
|
||
})
|
||
} else {
|
||
this.$message.error('没有在线预览文档权限!')
|
||
}
|
||
},
|
||
downloadFile (attId) {
|
||
if (attId != null && attId !== '') {
|
||
window.location.href = '/api/att/attFile/downloadFileForSarNew?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/downloadFileForSarWaterMarkNew?fileId=' + attId
|
||
} else {
|
||
this.$message.error('请选择要下载的文件')
|
||
}
|
||
}
|
||
},
|
||
// 点击标准编号、标准名称(先根据标准号查询是否存在)
|
||
handlePreview (item) {
|
||
this.$http.get('lawss/sarBussionessStand/queryReplaceStandInfo', {
|
||
standNum: item
|
||
}, {
|
||
_this: this
|
||
}, res => {
|
||
if (res.data != null) {
|
||
let routeUrl = this.$router.resolve({
|
||
name: 'OtherBussStandardDetails',
|
||
params: {
|
||
id: res.data.id,
|
||
pageType: 'BUSINESS_STAND'
|
||
}
|
||
})
|
||
window.open(routeUrl.href, '_blank')
|
||
} else {
|
||
this.$message.error('标准号已不存在!')
|
||
}
|
||
}, e => {
|
||
})
|
||
},
|
||
// 点击代替标准编号
|
||
clickReplaceStandNum (item) {
|
||
this.$http.post('lawss/sarTestItem/validateStandNumber', {
|
||
standnumber: item
|
||
}, {
|
||
_this: this
|
||
}, res => {
|
||
let routeUrl = this.$router.resolve({
|
||
name: 'OtherBussStandardDetails',
|
||
params: {
|
||
id: res.data.standid,
|
||
pageType: 'BUSINESS_STAND'
|
||
}
|
||
})
|
||
window.open(routeUrl.href, '_blank')
|
||
}, e => {
|
||
})
|
||
},
|
||
// 修改成表格样式后,选择项勾选改变
|
||
standSelectChange (data) {
|
||
this.selectedList = []
|
||
for (let i = 0; i < data.length; i++) {
|
||
this.selectedList.push(data[i].id)
|
||
}
|
||
},
|
||
// 更多
|
||
handleCommand (command) {
|
||
switch (command[1]) {
|
||
case '编辑':
|
||
this.selectStandardPro(command[0], 'edit')
|
||
break
|
||
case '删除':
|
||
this.deleteStand(1, command[0].id)
|
||
break
|
||
case '查看':
|
||
this.showStand(command[0])
|
||
break
|
||
}
|
||
},
|
||
// 查看
|
||
showStand (item) {
|
||
this.isSee = true
|
||
this.clickRow = JSON.parse(JSON.stringify(item))
|
||
this.replaceArr = this.clickRow.replaceStandNum.split(',')
|
||
},
|
||
// 编辑企标备案
|
||
selectStandardPro (item, state) {
|
||
this.addOrUPdateFlag = 2
|
||
this.modalshowtitle = '编辑企标备案'
|
||
this.modalshowflag = true
|
||
console.log(item)
|
||
this.$nextTick(() => {
|
||
this.sarStandardsInfoEO = JSON.parse(JSON.stringify(item))
|
||
if (this.sarStandardsInfoEO.applyType != null && this.sarStandardsInfoEO.applyType !== '' && !(this.sarStandardsInfoEO.applyType instanceof Array)) {
|
||
let a = this.sarStandardsInfoEO.applyType.split(',')
|
||
this.sarStandardsInfoEO.applyType = a // 能源类型
|
||
}
|
||
if (this.sarStandardsInfoEO.issueTime != null && this.sarStandardsInfoEO.issueTime !== '') {
|
||
this.sarStandardsInfoEO.issueTime = this.sarStandardsInfoEO.issueTime.replace(new RegExp(/-/gm), '/')
|
||
this.sarStandardsInfoEO.issueTime = new Date(this.sarStandardsInfoEO.issueTime)
|
||
}
|
||
if (this.sarStandardsInfoEO.putTime != null && this.sarStandardsInfoEO.putTime !== '') {
|
||
this.sarStandardsInfoEO.putTime = this.sarStandardsInfoEO.putTime.replace(new RegExp(/-/gm), '/')
|
||
this.sarStandardsInfoEO.putTime = new Date(this.sarStandardsInfoEO.putTime)
|
||
}
|
||
if (this.sarStandardsInfoEO.otherAttrTime != null && this.sarStandardsInfoEO.otherAttrTime !== '') {
|
||
this.sarStandardsInfoEO.otherAttrTime = this.sarStandardsInfoEO.otherAttrTime.replace(new RegExp(/-/gm), '/')
|
||
this.sarStandardsInfoEO.otherAttrTime = new Date(this.sarStandardsInfoEO.otherAttrTime)
|
||
}
|
||
if (this.sarStandardsInfoEO.recordsAttrTime != null && this.sarStandardsInfoEO.recordsAttrTime !== '') {
|
||
this.sarStandardsInfoEO.recordsAttrTime = this.sarStandardsInfoEO.recordsAttrTime.replace(new RegExp(/-/gm), '/')
|
||
this.sarStandardsInfoEO.recordsAttrTime = new Date(this.sarStandardsInfoEO.recordsAttrTime)
|
||
}
|
||
if (this.sarStandardsInfoEO.signAttrTime != null && this.sarStandardsInfoEO.signAttrTime !== '') {
|
||
this.sarStandardsInfoEO.signAttrTime = this.sarStandardsInfoEO.signAttrTime.replace(new RegExp(/-/gm), '/')
|
||
this.sarStandardsInfoEO.signAttrTime = new Date(this.sarStandardsInfoEO.signAttrTime)
|
||
}
|
||
if (this.sarStandardsInfoEO.validDate != null && this.sarStandardsInfoEO.validDate !== '') {
|
||
this.sarStandardsInfoEO.validDate = this.sarStandardsInfoEO.validDate.replace(new RegExp(/-/gm), '/')
|
||
this.sarStandardsInfoEO.validDate = new Date(this.sarStandardsInfoEO.validDate)
|
||
}
|
||
this.sarStandardsInfoEO['id'] = item.id
|
||
})
|
||
},
|
||
// 点击导入标准
|
||
addImportModal () {
|
||
this.importModalshowflag = true
|
||
this.showUploadlist = false
|
||
this.importExcelUrl = '/api/lawss/sarBussRecords/importZipBussRecords'
|
||
},
|
||
// 导入按钮 上传之前的钩子
|
||
beginImportFile (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 === '.ZIP' || fileSuffix === '.zip') {
|
||
return true
|
||
} else {
|
||
this.spinShow = false
|
||
this.$message.error('文件' + file.name + '格式不正确,请上传ZIP压缩文件')
|
||
return false
|
||
}
|
||
// 判断文件上传大小
|
||
// eslint-disable-next-line no-unreachable
|
||
if (file.size / 1024 / 1024 <= 200) {
|
||
return true
|
||
} else {
|
||
this.$message.error('文件' + file.name + '大小不超过200M')
|
||
return false
|
||
}
|
||
return true
|
||
},
|
||
// 导入标准数据成功后执行
|
||
importFileSuccess (response, file) {
|
||
if (response.ok) {
|
||
this.showUploadlist = true
|
||
this.importModalshowflag = false
|
||
this.tableData()
|
||
this.$message({
|
||
showClose: true,
|
||
message: response.message,
|
||
type: 'success'
|
||
})
|
||
} else {
|
||
this.showUploadlist = false
|
||
this.importFailed = true
|
||
this.importForm.content = response.message
|
||
}
|
||
},
|
||
// 导出
|
||
exportStandard () {
|
||
// 区别是选择导出还是全部导出
|
||
if (this.selectedList.length > 0) {
|
||
this.saveExportType = 'apart'
|
||
} else {
|
||
this.saveExportType = 'all'
|
||
}
|
||
this.exportName = ''
|
||
this.exportModelFlag = true
|
||
},
|
||
// 导出取消按钮关闭模态、置空
|
||
cancal () {
|
||
this.exportModelFlag = false
|
||
},
|
||
// 导出确定功能
|
||
exportTestItem () {
|
||
if (this.saveExportType === 'apart') {
|
||
if (this.selectedList != null && this.selectedList !== '') {
|
||
// window.open('api/lawss/sarBussRecords/exportSarBussRecords?exportContent=' + this.selectedList.join(',') + '&exportType=' + this.saveExportType + '&exportName=' + this.exportName)
|
||
window.open('api/lawss/sarBussRecords/exportSarBussRecords?ids=' + this.selectedList.join(',') + '&exportType=' + this.saveExportType + '&exportNameGet=' + this.exportName)
|
||
// this.$refs.selection.selectAll(false)
|
||
this.$message({
|
||
message: '导出信息成功',
|
||
type: 'success'
|
||
})
|
||
}
|
||
} else if (this.saveExportType === 'all') {
|
||
let exportEOStr = JSON.stringify(this.SarExportSearchEo)
|
||
exportEOStr = exportEOStr.replace(/""/g, null)
|
||
window.open('api/lawss/sarBussRecords/exportSarBussRecords?exportNameGet=' + this.exportName + '&exportContent=' + exportEOStr)
|
||
this.$message({
|
||
message: '导出信息成功',
|
||
type: 'success'
|
||
})
|
||
}
|
||
this.exportModelFlag = false
|
||
},
|
||
// 模板下载
|
||
uploadImportModal (flag) {
|
||
// lawss/sarBussRecords/exportTemplate?exportName=
|
||
window.open('/api/lawss/sarBussRecords/exportTemplate')
|
||
},
|
||
// 删除
|
||
deleteStand (flag, itemid) {
|
||
if (flag === 1) {
|
||
(
|
||
this.$confirm('确认删除这些数据?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(() => {
|
||
this.$http.post('lawss/sarBussRecords/deleteSarBussRecords', {ids: itemid}, {
|
||
_this: this
|
||
}, res => {
|
||
this.tableData(1)
|
||
this.selectedList = []
|
||
this.$message({
|
||
showClose: true,
|
||
message: '删除成功',
|
||
type: 'success'
|
||
})
|
||
}, e => {
|
||
})
|
||
}).catch(() => {
|
||
// 取消删除,清空选择
|
||
// this.$refs.multipleTable.clearSelection()
|
||
})
|
||
)
|
||
} else {
|
||
if (this.selectedList.length === 0) {
|
||
this.$confirm('请选择一条数据进行删除', '提示', {
|
||
showCancelButton: false,
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
})
|
||
} else {
|
||
(
|
||
this.$confirm('确认删除这些数据?', '提示', {
|
||
confirmButtonText: '确定',
|
||
cancelButtonText: '取消',
|
||
type: 'warning'
|
||
}).then(() => {
|
||
this.$http.post('lawss/sarBussRecords/deleteSarBussRecords', {ids: this.selectedList.join(',')}, {
|
||
_this: this
|
||
}, res => {
|
||
this.tableData(1)
|
||
this.selectedList = []
|
||
this.$message({
|
||
showClose: true,
|
||
message: '删除成功',
|
||
type: 'success'
|
||
})
|
||
}, e => {
|
||
})
|
||
}).catch(() => {
|
||
// 取消删除,清空选择
|
||
this.$refs.multipleTable.clearSelection()
|
||
})
|
||
)
|
||
}
|
||
}
|
||
},
|
||
addModal () {
|
||
this.modalshowflag = true
|
||
this.modalshowtitle = '新增企标备案'
|
||
this.addOrUPdateFlag = 1
|
||
},
|
||
// 标准号验证
|
||
validateStandNumber (standinfo) {
|
||
return new Promise((resolve, reject) => {
|
||
let obj = JSON.parse(JSON.stringify(standinfo))
|
||
this.$http.post('lawss/sarBussionessStand/validateStandNumber', obj, {
|
||
_this: this
|
||
}, res => {
|
||
if (res.ok) {
|
||
resolve(true)
|
||
} else {
|
||
resolve(false)
|
||
}
|
||
}, e => {
|
||
reject(e)
|
||
})
|
||
})
|
||
},
|
||
// 保存或修改标准
|
||
saveOrUpdateStands () {
|
||
this.isSubmit = true
|
||
this.$refs['sarStandardsInfoForm'].validate((valid) => {
|
||
if (valid) {
|
||
// 验证标准号是否唯一
|
||
// this.validateStandNumber(this.sarStandardsInfoEO).then((flag) => {
|
||
// if (flag) {
|
||
// 时间格式修改 -- putTime creationTime
|
||
let nowstandinfo = JSON.parse(JSON.stringify(this.sarStandardsInfoEO))
|
||
if (nowstandinfo.applyType != null && nowstandinfo.applyType !== '' && (nowstandinfo.applyType instanceof Array)) {
|
||
nowstandinfo.applyType = nowstandinfo.applyType.join(',') // 能源类型
|
||
}
|
||
if (nowstandinfo.issueTime != null && nowstandinfo.issueTime !== '') {
|
||
nowstandinfo.issueTime = this.$dateFormat(this.sarStandardsInfoEO.issueTime, 'yyyy-MM-dd hh:mm:ss')
|
||
}
|
||
if (nowstandinfo.putTime != null && nowstandinfo.putTime !== '') {
|
||
nowstandinfo.putTime = this.$dateFormat(this.sarStandardsInfoEO.putTime, 'yyyy-MM-dd hh:mm:ss')
|
||
}
|
||
|
||
// if (nowstandinfo.otherAttrTime != null && nowstandinfo.otherAttrTime !== '') {
|
||
// nowstandinfo.otherAttrTime = this.$dateFormat(this.sarStandardsInfoEO.otherAttrTime, 'yyyy-MM-dd')
|
||
// }
|
||
if (nowstandinfo.validDate != null && nowstandinfo.validDate !== '') {
|
||
nowstandinfo.validDate = this.$dateFormat(this.sarStandardsInfoEO.validDate, 'yyyy-MM-dd')
|
||
}
|
||
// if (nowstandinfo.recordsAttrTime != null && nowstandinfo.recordsAttrTime !== '') {
|
||
// nowstandinfo.recordsAttrTime = this.$dateFormat(this.sarStandardsInfoEO.recordsAttrTime, 'yyyy-MM-dd')
|
||
// }
|
||
// if (nowstandinfo.signAttrTime != null && nowstandinfo.signAttrTime !== '') {
|
||
// nowstandinfo.signAttrTime = this.$dateFormat(this.sarStandardsInfoEO.signAttrTime, 'yyyy-MM-dd')
|
||
// }
|
||
// 代替标准号
|
||
if (nowstandinfo.replaceStandNum != null) {
|
||
nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum.replace(/,/ig, ',')
|
||
}
|
||
if (nowstandinfo.replaceStandNum != null && nowstandinfo.replaceStandNum !== '') {
|
||
nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum.replace(/\r\n/g, '<br />')
|
||
nowstandinfo.replaceStandNum = nowstandinfo.replaceStandNum === '' ? '' : nowstandinfo.replaceStandNum.replace(/\n/g, '<br />')
|
||
}
|
||
let sarRecordsAttrEOStr = {}
|
||
sarRecordsAttrEOStr.QBBAWJ = nowstandinfo.recordsAttr === null ? '' : nowstandinfo.recordsAttr,
|
||
sarRecordsAttrEOStr.FBBWJ = nowstandinfo.signAttr === null ? '' : nowstandinfo.signAttr,
|
||
sarRecordsAttrEOStr.QTBAWJ = nowstandinfo.otherAttr === null ? '' : nowstandinfo.otherAttr
|
||
/**
|
||
*@desc: 将sarRecordsAttrEOStr 对象转字符串;把字符串里的双引号替换为单引号
|
||
*@author: zhangRui
|
||
*@time: 2021/02/20 10:47:01
|
||
*/
|
||
nowstandinfo.sarRecordsAttrEOStr = JSON.stringify(sarRecordsAttrEOStr)
|
||
nowstandinfo.sarRecordsAttrEOStr = nowstandinfo.sarRecordsAttrEOStr.replace(/"/g,"'");
|
||
this.$http.postData(this.addOrUPdateFlag === 1 ? 'lawss/sarBussRecords/addSarBussRecords' : 'lawss/sarBussRecords/updateSarBussRecords', nowstandinfo, {
|
||
_this: this
|
||
}, res => {
|
||
this.isSubmit = false
|
||
if (res.ok) {
|
||
this.tableData()
|
||
this.resetForm()
|
||
if (this.addOrUPdateFlag === 1) {
|
||
// this.$message({
|
||
// showClose: true,
|
||
// message: '新增成功',
|
||
// type: 'success'
|
||
// })
|
||
} else if (this.addOrUPdateFlag === 2) {
|
||
this.$message({
|
||
showClose: true,
|
||
message: '编辑成功',
|
||
type: 'success'
|
||
})
|
||
}
|
||
}
|
||
}, e => {
|
||
this.isSubmit = false
|
||
})
|
||
} else {
|
||
this.isSubmit = false
|
||
}
|
||
// }, e => {})
|
||
// } else {
|
||
// this.isSubmit = false
|
||
// this.$message({
|
||
// message: '请检查表单是否填写正确',
|
||
// type: 'warning'
|
||
// })
|
||
// }
|
||
})
|
||
},
|
||
// 表单清空
|
||
resetForm () {
|
||
this.modalshowflag = false
|
||
this.$refs['sarStandardsInfoForm'].resetFields()
|
||
},
|
||
tableData (flag) {
|
||
if (flag === 1) {
|
||
this.page = 1
|
||
}
|
||
const data = this.filingForm
|
||
const formData = {...data}
|
||
formData.page = this.page
|
||
formData.pageSize = this.pageSize
|
||
// if (this.filingForm.putTime) {
|
||
// formData.putTime = this.$dateFormat(this.filingForm.putTime, 'yyyy-MM-dd hh:mm:ss').toString()
|
||
// }
|
||
// console.log('11111111', typeof this.filingForm.putTime)
|
||
// console.log('222222', typeof formData.putTime)
|
||
this.$http.get('lawss/sarBussRecords/page', formData, {
|
||
_this: this,
|
||
loading: 'loading'
|
||
}, res => {
|
||
console.log(res.data.list.issueTime)
|
||
this.filingTable = res.data.list
|
||
this.total = res.data.count
|
||
this.SarExportSearchEo = formData
|
||
}, e => {
|
||
})
|
||
},
|
||
clearAllSearch () {
|
||
this.$refs['filingForm'].resetFields()
|
||
this.filingForm.standCode = ''
|
||
this.filingForm.standName = ''
|
||
this.filingForm.productName = ''
|
||
this.filingForm.productType = ''
|
||
this.filingForm.applyType = ''
|
||
this.filingForm.standStatus = ''
|
||
this.filingForm.publicStatus = ''
|
||
this.filingForm.issueTime = ''
|
||
this.filingForm.putTime = ''
|
||
this.filingForm.replaceStandNum = ''
|
||
this.filingForm.advanceSearchVOStr = ''
|
||
this.tableData()
|
||
},
|
||
pageChange (page) {
|
||
this.page = page
|
||
this.tableData()
|
||
},
|
||
pageSizeChange (pageSize) {
|
||
this.pageSize = pageSize
|
||
this.tableData()
|
||
},
|
||
dateFormat2(str){
|
||
return dateFormat(str)
|
||
}
|
||
},
|
||
watch: {
|
||
// 'sarStandardsInfoEO.recordsAttr': {
|
||
// handler: function (val) {
|
||
// this.sarStandardsInfoEO.recordsAttrTime = new Date()
|
||
// },
|
||
// deep: true
|
||
// },
|
||
// 'sarStandardsInfoEO.signAttr': {
|
||
// handler: function (val) {
|
||
// this.sarStandardsInfoEO.signAttrTime = new Date()
|
||
// },
|
||
// deep: true
|
||
// },
|
||
// 'sarStandardsInfoEO.otherAttr': {
|
||
// handler: function (val) {
|
||
// this.sarStandardsInfoEO.otherAttrTime = new Date()
|
||
// },
|
||
// deep: true
|
||
// }
|
||
},
|
||
mounted () {
|
||
this.tableData()
|
||
// 查询各下拉框数据
|
||
this.$http.get('sys/dictype/getDicTypeListCode', '', {
|
||
_this: this
|
||
}, res => {
|
||
this.applyCarType = res.data.ENERGYTYPES // 能源类型
|
||
//this.standStateOptions = res.data.STANDSTATE // 标准状态
|
||
this.standStateOptions = res.data.QBBABZZT
|
||
}, e => {
|
||
})
|
||
// 查询项目名称
|
||
this.$http.get('lawss/sarProductInfo/getSelList', '', {
|
||
_this: this
|
||
}, res => {
|
||
this.productNameOption = res.data.projectName
|
||
}, e => {
|
||
})
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped lang="less">
|
||
@import '~@/assets/styles/mixins';
|
||
@import '~@/assets/styles/style';
|
||
#enterpriseStandardFiling {
|
||
height: 100%;
|
||
padding-bottom: 10px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
.container {
|
||
display: flex;
|
||
flex-direction: column;
|
||
position: relative;
|
||
flex: auto;
|
||
//height: calc(~'100% - 53px - 96px');
|
||
.pagination {
|
||
position: static;
|
||
/deep/ .pagination-slot {
|
||
padding: 0;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
.span-line:hover{
|
||
text-decoration: underline;
|
||
}
|
||
.seeItem {
|
||
width: 100%;
|
||
/*height: 50px;*/
|
||
line-height: 50px;
|
||
a{
|
||
cursor: pointer;
|
||
color: #409EFF;
|
||
}
|
||
a:hover{
|
||
text-decoration: underline;
|
||
color: #409EFF;
|
||
}
|
||
i{
|
||
display: inline-block;
|
||
margin-left: 3px;
|
||
width: 18px;
|
||
height: 16px;
|
||
background-repeat: no-repeat;
|
||
background-size: 100% 100%;
|
||
background-position: center center;
|
||
vertical-align: sub;
|
||
cursor: pointer;
|
||
}
|
||
.icon-download{
|
||
background-image: url("~assets/images/shangqi/img/download.png");
|
||
}
|
||
.icon-download2{
|
||
background-image: url("~assets/images/shangqi/img/download2.png");
|
||
}
|
||
}
|
||
.customer-upload {
|
||
&.disabled {
|
||
/deep/ .el-upload-dragger {
|
||
.el-upload__text {
|
||
color: #ccc;
|
||
}
|
||
&:hover {
|
||
cursor: not-allowed;
|
||
border-color: #d9d9d9;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
// 验证错误信息位置
|
||
/deep/.label-input-form .leftButton .el-form-item__content .el-form-item__error {
|
||
right: 100px;
|
||
}
|
||
::v-deep .el-drawer__header{
|
||
&>span:first-child{
|
||
outline: none!important;
|
||
}
|
||
}
|
||
::v-deep .el-drawer{
|
||
outline: none!important;
|
||
}
|
||
</style>
|