1250 lines
46 KiB
Vue
1250 lines
46 KiB
Vue
<!-- 标准法规库 - 动态&资料 -->
|
|
<template>
|
|
<div id="dynamicInformation" class="dynamic-information v-class">
|
|
<div class="dynamic-content">
|
|
<!-- 实施预警 -->
|
|
<div class="dynamic" style="overflow-y: auto;">
|
|
<div class="container" :style="containerStyle">
|
|
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">-->
|
|
<!-- <el-tab-pane label="标准预警" name="STANDARD">-->
|
|
<div class="dynamic-content">
|
|
<el-row>
|
|
<el-col>
|
|
<h5>实施预警</h5>
|
|
</el-col>
|
|
<el-col>
|
|
<div class="more">
|
|
<el-form :inline="true" :model="dynamic" class="demo-form-inline">
|
|
<el-form-item label="标准编号">
|
|
<el-input clearable size="small"
|
|
v-model="dynamic.standCode"
|
|
placeholder="根据标准编号查找">
|
|
</el-input>
|
|
</el-form-item>
|
|
<el-form-item label="标准名称">
|
|
<el-input clearable size="small"
|
|
v-model="dynamic.standName"
|
|
placeholder="根据标准名称查找">
|
|
</el-input>
|
|
</el-form-item>
|
|
<el-form-item label="实施日期" style="margin-right: -40px" class="choose-time-area">
|
|
<el-datePicker
|
|
clearable size="small"
|
|
v-model="dynamic.putTime"
|
|
value-format="yyyy-MM-dd"
|
|
placeholder="根据实施日期查找">
|
|
</el-datePicker>
|
|
</el-form-item>
|
|
<el-form-item label="适用车型">
|
|
<el-input clearable size="small"
|
|
v-model="dynamic.applyType"
|
|
placeholder="根据适用车型查找">
|
|
</el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button
|
|
type="primary"
|
|
size="small"
|
|
@click="searchBtnClick"
|
|
class="common-button-primary">
|
|
查询
|
|
</el-button>
|
|
<el-button
|
|
size="small"
|
|
@click="clearBtnClick"
|
|
class="common-button-primary">
|
|
清空
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-col>
|
|
</el-row>
|
|
<div class="content" style="height: 100%; padding-top: 5px; ">
|
|
<el-divider content-position="left" class="dynamic-child-title">新车型实施日期预警</el-divider>
|
|
<el-table
|
|
:data="newItems"
|
|
:height="height"
|
|
border
|
|
:resizable="false"
|
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
|
v-loading="loading.newItems"
|
|
>
|
|
<el-table-column prop="standType" label="类型" align="center">
|
|
<template slot-scope="scope">
|
|
<div v-if="scope.row.sortName === 'BUSINESS_STAND'">企业标准</div>
|
|
<div v-if="scope.row.standType === 'FOREIGN'">海外标准法规</div>
|
|
<div v-if="scope.row.standType === 'INLAND'">国内标准法规</div>
|
|
<div v-if="scope.row.sortName === 'INLAND_LAWS'">国内政策</div>
|
|
<div v-if="scope.row.sortName === 'FOREIGN_LAWS'">国外政策</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="standCode" label="标准编号" align="center">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standCode }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="standName" label="标准名称" align="center">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="putTime" label="新车型实施日期" align="center" sortable>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="applyType" label="适用车型" align="center">
|
|
</el-table-column>
|
|
<el-table-column label="标准类型" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.standCode.slice(0, 3) }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="dutyEngineer" label="标准责任工程师" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.dutyEngineer }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" align="center" v-if="isShowBtn">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="danger"
|
|
@click="cancelWarning(scope.$index, scope.row)">取消预警
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<pagination
|
|
style="position: static;"
|
|
:page="pageConfig.newItemsPage"
|
|
:pageSize="pageConfig.newItemsPageSize"
|
|
:total="pageConfig.count1"
|
|
autoSize
|
|
@pageChange="page => handlePageChange('newItems', page)"
|
|
@pageSizeChange="pageSize => handlePageSizeChange('newItems', pageSize)"></pagination>
|
|
<el-divider content-position="left" class="dynamic-child-title">在产车实施日期预警</el-divider>
|
|
<el-table
|
|
:data="oldItems"
|
|
:height="height"
|
|
border
|
|
:resizable="false"
|
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
|
v-loading="loading.oldItems"
|
|
>
|
|
<el-table-column prop="sortName" label="类型" align="center">
|
|
<template slot-scope="scope">
|
|
<div v-if="scope.row.sortName === 'BUSINESS_STAND'">企业标准</div>
|
|
<div v-if="scope.row.standType === 'FOREIGN'">海外标准法规</div>
|
|
<div v-if="scope.row.standType === 'INLAND'">国内标准法规</div>
|
|
<div v-if="scope.row.sortName === 'INLAND_LAWS'">国内政策</div>
|
|
<div v-if="scope.row.sortName === 'FOREIGN_LAWS'">国外政策</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="standCode" label="标准编号" align="center">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standCode }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="standName" label="标准名称" align="center">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="putTime" label="在产车实施日期" align="center" sortable>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="applyType" label="适用车型" align="center">
|
|
</el-table-column>
|
|
<el-table-column label="标准类型" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.standCode.slice(0, 3) }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="dutyEngineer" label="标准责任工程师" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.dutyEngineer }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" align="center" v-if="isShowBtn">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="danger"
|
|
@click="cancelWarning(scope.$index, scope.row)">取消预警
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<pagination
|
|
style="position: static;"
|
|
:page="pageConfig.oldItemsPage"
|
|
:pageSize="pageConfig.oldItemsPageSize"
|
|
:total="pageConfig.count2"
|
|
autoSize
|
|
@pageChange="page => handlePageChange('oldItems', page)"
|
|
@pageSizeChange="pageSize => handlePageSizeChange('oldItems', pageSize)"></pagination>
|
|
<el-divider content-position="left" class="dynamic-child-title">新车型条款预警</el-divider>
|
|
<el-table
|
|
:data="newStand"
|
|
:height="height"
|
|
border
|
|
:resizable="false"
|
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
|
v-loading="loading.newStand"
|
|
>
|
|
<el-table-column prop="standCode" label="标准编号" align="center">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standCode }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="standName" label="标准名称" align="center">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="itemsNum" label="条款号" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.itemsNum }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="itemsName" label="条款要求" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.itemsName }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="putTime" label="实施日期" align="center" sortable>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="applyType" label="适用车型" align="center">
|
|
</el-table-column>
|
|
<el-table-column prop="mark" label="标准分类" align="center">
|
|
<template slot-scope="scope">
|
|
<!-- <a @click="showStandDetails(scope.row)">{{ scope.row.mark }}</a>-->
|
|
<div>{{ scope.row.standCode.slice(0, 3) }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="dutyEngineer" label="标准责任工程师" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.dutyEngineer }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" align="center" v-if="isShowBtn">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="danger"
|
|
@click="cancelWarning(scope.$index, scope.row)">取消预警
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<pagination
|
|
style="position: static;"
|
|
:page="pageConfig.newStandPage"
|
|
:pageSize="pageConfig.newStandPageSize"
|
|
:total="pageConfig.count3"
|
|
autoSize
|
|
@pageChange="page => handlePageChange('newItems', page)"
|
|
@pageSizeChange="pageSize => handlePageSizeChange('newItems', pageSize)"></pagination>
|
|
<el-divider content-position="left" class="dynamic-child-title">在产车条款预警</el-divider>
|
|
<el-table
|
|
:data="oldStand"
|
|
:height="height"
|
|
border
|
|
:resizable="false"
|
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
|
v-loading="loading.oldStand"
|
|
>
|
|
<el-table-column prop="standCode" label="标准编号" align="center">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standCode }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="standName" label="标准名称" align="center">
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="itemsNum" label="条款号" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.itemsNum }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="itemsName" label="条款要求" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.itemsName }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="putTime" label="实施日期" align="center" sortable>
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.putTime ? $moment(scope.row.putTime).format('YYYY-MM-DD') : '' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="applyType" label="适用车型" align="center">
|
|
</el-table-column>
|
|
<el-table-column prop="mark" label="标准分类" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.standCode.slice(0, 3) }}</div>
|
|
<!-- <a @click="showStandDetails(scope.row)">{{ scope.row.mark }}</a>-->
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="dutyEngineer" label="标准责任工程师" align="center">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.dutyEngineer }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" align="center" v-if="isShowBtn">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="danger"
|
|
@click="cancelWarning(scope.$index, scope.row)">取消预警
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<pagination
|
|
style="position: static;"
|
|
:page="pageConfig.oldStandPage"
|
|
:pageSize="pageConfig.oldStandPageSize"
|
|
:total="pageConfig.count4"
|
|
autoSize
|
|
@pageChange="page => handlePageChange('oldItems', page)"
|
|
@pageSizeChange="pageSize => handlePageSizeChange('oldItems', pageSize)"></pagination>
|
|
</div>
|
|
</div>
|
|
<!-- </el-tab-pane>-->
|
|
<!-- <el-tab-pane label="政策预警" name="POLICY">-->
|
|
<!-- <div class="dynamic-content">-->
|
|
<!-- <h5>实施预警</h5>-->
|
|
<!-- <div class="content" style="height: 100%; padding-top: 5px; ">-->
|
|
<!-- <div class="content-group">-->
|
|
<!-- <el-divider content-position="left" class="dynamic-child-title">新车型实施日期预警</el-divider>-->
|
|
<!-- <div class="table-wrap">-->
|
|
<!-- <el-table-->
|
|
<!-- :data="newPolicy"-->
|
|
<!-- :height="tableHeight"-->
|
|
<!-- border-->
|
|
<!-- :resizable="false"-->
|
|
<!-- v-loading="loading.newPolicy"-->
|
|
<!-- :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"-->
|
|
<!-- >-->
|
|
<!-- <el-table-column prop="policyId" label="政策编号" align="center">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <a @click="showStandDetails(scope.row)">{{ scope.row.policyId }}</a>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- <el-table-column prop="policyName" label="政策名称" align="center">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <a @click="showStandDetails(scope.row)">{{ scope.row.policyName }}</a>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- <el-table-column prop="putTime" label="新车型实施日期" align="center" sortable>-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- {{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }}-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- <el-table-column label="操作" align="center" width="150" v-if="isShowBtn">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <el-button-->
|
|
<!-- size="mini"-->
|
|
<!-- type="danger"-->
|
|
<!-- @click="cancelWarning(scope.$index, scope.row)">取消预警</el-button>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- </el-table>-->
|
|
<!-- </div>-->
|
|
<!-- <pagination-->
|
|
<!-- style="position: static;"-->
|
|
<!-- :page="pageConfig.newPolicyPage"-->
|
|
<!-- :pageSize="pageConfig.newPolicyPageSize"-->
|
|
<!-- :total="pageConfig.count5"-->
|
|
<!-- autoSize-->
|
|
<!-- @pageChange="page => handlePageChange('newPolicy', page)"-->
|
|
<!-- @pageSizeChange="pageSize => handlePageSizeChange('newPolicy', pageSize)"></pagination>-->
|
|
<!-- </div>-->
|
|
<!-- <div class="content-group">-->
|
|
<!-- <el-divider content-position="left" class="dynamic-child-title">在产车实施日期预警</el-divider>-->
|
|
<!-- <div class="table-wrap">-->
|
|
<!-- <el-table-->
|
|
<!-- :data="oldPolicy"-->
|
|
<!-- :height="tableHeight"-->
|
|
<!-- border-->
|
|
<!-- :resizable="false"-->
|
|
<!-- v-loading="loading.oldPolicy"-->
|
|
<!-- :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"-->
|
|
<!-- >-->
|
|
<!-- <el-table-column prop="policyId" label="政策编号" align="center">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <a @click="showStandDetails(scope.row)">{{ scope.row.policyId }}</a>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- <el-table-column prop="policyName" label="政策名称" align="center">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <a @click="showStandDetails(scope.row)">{{ scope.row.policyName }}</a>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- <el-table-column prop="putTime" label="在产车实施日期" align="center" sortable>-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- {{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }}-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- <el-table-column label="操作" align="center" width="150" v-if="isShowBtn">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <el-button-->
|
|
<!-- size="mini"-->
|
|
<!-- type="danger"-->
|
|
<!-- @click="cancelWarning(scope.$index, scope.row)">取消预警</el-button>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- </el-table>-->
|
|
<!-- </div>-->
|
|
<!-- <pagination-->
|
|
<!-- style="position: static;"-->
|
|
<!-- :page="pageConfig.oldPolicyPage"-->
|
|
<!-- :pangSize="pageConfig.oldPolicyPageSize"-->
|
|
<!-- :total="pageConfig.count6"-->
|
|
<!-- autoSize-->
|
|
<!-- @pageChange="page => handlePageChange('oldPolicy', page)"-->
|
|
<!-- @pageSizeChange="pageSize => handlePageSizeChange('oldPolicy', pageSize)"></pagination>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<!-- </el-tab-pane>-->
|
|
<!-- </el-tabs>-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<adc-back-top scroll-bind="dynamicInformation"></adc-back-top>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {mapMutations} from "vuex";
|
|
|
|
export default {
|
|
name: "standardWarning",
|
|
data() {
|
|
return {
|
|
isShowBtn: true,
|
|
activeName: "STANDARD", //tab 默认选中值
|
|
// 头部搜索框
|
|
dynamic: {
|
|
//标准编号
|
|
standCode: "",
|
|
//标准名称
|
|
standName: "",
|
|
//实施日期
|
|
putTime: "",
|
|
//适用车型
|
|
applyType: "",
|
|
},
|
|
height: null,
|
|
energyKindOptions: [], //存放适用车型数据
|
|
zrgcs: [], //责任工程师
|
|
// 新车型实施日期预警
|
|
newItems: [],
|
|
//政策新车型实施日期预警
|
|
newPolicy: [],
|
|
// 新车型条款预警
|
|
newStand: [],
|
|
// 在产车实施日期预警
|
|
oldItems: [],
|
|
// 在产车条款预警
|
|
oldStand: [],
|
|
//政策在产车实施日期预警
|
|
oldPolicy: [],
|
|
tableHeight: 0,
|
|
pageConfig: {
|
|
newItemsPage: 1,
|
|
newItemsPageSize: 10,
|
|
count1: 0,
|
|
newStandPage: 1,
|
|
newStandPageSize: 10,
|
|
count2: 0,
|
|
oldItemsPage: 1,
|
|
oldItemsPageSize: 10,
|
|
count3: 0,
|
|
oldStandPage: 1,
|
|
oldStandPageSize: 10,
|
|
count4: 0,
|
|
newPolicyPage: 1,
|
|
newPolicyPageSize: 10,
|
|
count5: 0,
|
|
oldPolicyPage: 1,
|
|
oldPolicyPageSize: 10,
|
|
count6: 0,
|
|
},
|
|
loading: {
|
|
newItems: false,
|
|
oldItems: false,
|
|
newStand: false,
|
|
oldStand: false,
|
|
newPolicy: false,
|
|
oldPolicy: false,
|
|
},
|
|
// 记录当前分页器是哪个预警信息触发
|
|
field: ''
|
|
};
|
|
},
|
|
methods: {
|
|
// 获取标准预警数据 (type用于区别分页器切换)
|
|
getEarlyDate() {
|
|
this.loading[this.field] = true
|
|
this.$http.get('sys/EarlyWarning/StandWarning', {
|
|
applyType: '',
|
|
...this.pageConfig
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
const result = res.data[0]
|
|
for (const field in result) {
|
|
this[field] = result[field].records
|
|
this[field].forEach(item => {
|
|
// 适用车型转换
|
|
if (item.applyType !== null) {
|
|
let k = (item.applyType || "").split(",");
|
|
for (let i in this.energyKindOptions) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.energyKindOptions[i].value === k[m]) {
|
|
k[m] = this.energyKindOptions[i].label;
|
|
}
|
|
item.applyType = k.join(",");
|
|
}
|
|
}
|
|
}
|
|
// 责任工程师转换
|
|
if (item.dutyEngineer !== null) {
|
|
let k = (item.dutyEngineer || "").split(",");
|
|
for (let i in this.zrgcs) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.zrgcs[i].value === k[m]) {
|
|
k[m] = this.zrgcs[i].label;
|
|
}
|
|
item.dutyEngineer = k.join(",");
|
|
}
|
|
}
|
|
}
|
|
})
|
|
let arr = result.newItems.records
|
|
arr.forEach(item => {
|
|
// 适用车型转换
|
|
if (item.applyType !== null) {
|
|
let k = (item.applyType || "").split(",");
|
|
for (let i in this.energyKindOptions) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.energyKindOptions[i].value === k[m]) {
|
|
k[m] = this.energyKindOptions[i].label;
|
|
}
|
|
item.applyType = k.join(",");
|
|
}
|
|
}
|
|
}
|
|
// 责任工程师转换
|
|
if (item.dutyEngineer !== null) {
|
|
let k = (item.dutyEngineer || "").split(",");
|
|
for (let i in this.zrgcs) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.zrgcs[i].value === k[m]) {
|
|
k[m] = this.zrgcs[i].label;
|
|
}
|
|
item.dutyEngineer = k.join(",");
|
|
}
|
|
}
|
|
}
|
|
})
|
|
this.newItems = arr
|
|
//可能还需要调整一下条款或标准的顺序(zyh)
|
|
switch (field) {
|
|
case 'newItems':
|
|
this.pageConfig.count1 = result.newItems.total
|
|
break
|
|
case 'oldItems':
|
|
this.pageConfig.count2 = result.oldItems.total
|
|
break
|
|
case 'newStand':
|
|
this.pageConfig.count3 = result.newStand.total
|
|
break
|
|
case 'oldStand':
|
|
this.pageConfig.count4 = result.oldStand.total
|
|
break
|
|
}
|
|
}
|
|
for (const loading in this.loading) {
|
|
this.loading[loading] = false
|
|
}
|
|
}, e => {
|
|
});
|
|
},
|
|
//点击查看详情
|
|
handlePreview(item) {
|
|
let routeUrl = this.$router.resolve({
|
|
name: 'OtherStandardDetails',
|
|
params: {
|
|
id: item.standId,
|
|
pageType: item.standType + '_STAND'
|
|
}
|
|
})
|
|
window.open(routeUrl.href, '_blank')
|
|
},
|
|
//获取政策预警数据(type用于区别分页器切换)
|
|
getPolicyDate() {
|
|
this.loading[this.field] = true
|
|
this.$http.get('sys/EarlyWarning/PolicyWarning', {
|
|
applyType: '',
|
|
...this.pageConfig
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
const policys = res.data[0]
|
|
for (const field in policys) {
|
|
this[field] = policys[field].records
|
|
switch (field) {
|
|
case 'newPolicy':
|
|
this.pageConfig.count5 = policys.newPolicy.total
|
|
break
|
|
case 'oldPolicy':
|
|
this.pageConfig.count6 = policys.oldPolicy.total
|
|
break
|
|
}
|
|
}
|
|
for (const loading in this.loading) {
|
|
this.loading[loading] = false
|
|
}
|
|
}, e => {
|
|
});
|
|
},
|
|
// 切换tab
|
|
handleClick(tab, event) {
|
|
this.getPolicyDate();
|
|
switch (tab.name) {
|
|
case "POLICY":
|
|
const computedHeight = () => {
|
|
this.tableHeight = $(".content-group").find(".table-wrap").height();
|
|
}
|
|
this.$nextTick(() => {
|
|
computedHeight()
|
|
window.addEventListener('resize', computedHeight)
|
|
this.$once('hook:beforeDestroy', () => {
|
|
window.removeEventListener('resize', computedHeight)
|
|
})
|
|
});
|
|
}
|
|
},
|
|
//查找适用车型
|
|
searchBtnClick() {
|
|
this.$http.get('sys/EarlyWarning/StandWarning', {
|
|
...this.pageConfig,
|
|
//标准编号
|
|
standCode: this.dynamic.standCode,
|
|
//标准名称
|
|
standName: this.dynamic.standName,
|
|
//实施日期
|
|
putTime: this.dynamic.putTime,
|
|
//适用车型
|
|
applyType: this.dynamic.applyType
|
|
}, {
|
|
_this: this,
|
|
}, res => {
|
|
const result = res.data[0]
|
|
for (const type in result) {
|
|
this[type] = result[type].records
|
|
}
|
|
this.newItemsPage = 1
|
|
this.oldItemsPage = 1
|
|
this.newStandPage = 1
|
|
this.oldStandPage = 1
|
|
this.newPolicyPage = 1
|
|
this.oldPolicypage = 1
|
|
}, e => {
|
|
})
|
|
},
|
|
clearBtnClick() {
|
|
this.dynamic = {
|
|
//标准编号
|
|
standCode: "",
|
|
//标准名称
|
|
standName: "",
|
|
//实施日期
|
|
putTime: "",
|
|
//适用车型
|
|
applyType: "",
|
|
}
|
|
this.searchBtnClick()
|
|
},
|
|
//取消预警
|
|
cancelWarning(index, row) {
|
|
this.$confirm('确认取消预警?', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonClass: 'common-button-primary',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
roundButton: false
|
|
}).then(() => {
|
|
this.$http.get('sys/EarlyWarning/ChangePermissions', {
|
|
id: row.id,
|
|
}, {}, res => {
|
|
this.pageConfig.newItemsPage = 1
|
|
this.pageConfig.oldItemsPage = 1
|
|
this.pageConfig.newStandPage = 1
|
|
this.pageConfig.oldStandPage = 1
|
|
this.pageConfig.newPolicyPage = 1
|
|
this.pageConfig.oldPolicyPage = 1
|
|
this.getEarlyDate()
|
|
}
|
|
)
|
|
}).catch(() => {
|
|
this.$message.warning('取消事件')
|
|
})
|
|
},
|
|
showStandDetails(item) {
|
|
let getStandId = item.sarId;
|
|
let getStandType = item.sortName;
|
|
// this.$http.get("lawss/sarMenu/judgeSarMenuByRole", {
|
|
// sarId: getStandId,
|
|
// sarType: getStandType,
|
|
// isExit: "1"
|
|
// }, {
|
|
// _this: this
|
|
// }, res => {
|
|
// if (res.ok) {
|
|
// let pageTpe = "";
|
|
// let id = "";
|
|
// let routename = "";
|
|
// if (getStandType === "INLAND_STAND" || getStandType === "FOREIGN_STAND") {
|
|
// if (this.$hasPermission("SSA6WR4HV8")) {
|
|
// pageTpe = getStandType;
|
|
// id = getStandId;
|
|
// routename = "OtherStandardDetails";
|
|
// } else {
|
|
// this.$message.error("无权访问");
|
|
// }
|
|
// } else if (getStandType === "INLAND_LAWS" || getStandType === "FOREIGN_LAWS") {
|
|
// if (this.$hasPermission("A2HDHMEA6W")) {
|
|
// pageTpe = getStandType;
|
|
// id = getStandId;
|
|
// routename = "OtherLawsDetails";
|
|
// } else {
|
|
// this.$message.error("无权访问");
|
|
// }
|
|
// } else if (getStandType === "BUSSIONESS_STAND") {
|
|
// if (this.$hasPermission("YJUHC32R7G")) {
|
|
// pageTpe = "BUSINESS_STAND";
|
|
// id = getStandId;
|
|
// routename = "OtherBussStandardDetails";
|
|
// } else {
|
|
// this.$message.error("无权访问");
|
|
// }
|
|
// }
|
|
// if (routename !== "") {
|
|
// let routeUrl = this.$router.resolve({
|
|
// name: routename,
|
|
// params: {
|
|
// id: id,
|
|
// pageType: pageTpe
|
|
// }
|
|
// });
|
|
// window.open(routeUrl.href, "_blank");
|
|
// }
|
|
// } else {
|
|
// this.$message.error(res.message);
|
|
// }
|
|
// }, e => {
|
|
// });
|
|
},
|
|
/**
|
|
* @description: 日期转换
|
|
* @author: chenxiaoxi
|
|
* @date: 2018/11/01 10:20:12
|
|
*/
|
|
dateFormat(date) {
|
|
let year = new Date(date).getFullYear();
|
|
let month = new Date(date).getMonth() + 1;
|
|
let day = new Date(date).getDate();
|
|
return year + "-" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day);
|
|
},
|
|
getDate(date) {
|
|
return date !== undefined && date != null ? date.split(" ")[0] : "";
|
|
},
|
|
handlePageChange(field, page) {
|
|
switch (field) {
|
|
// 新车型实施日期预警
|
|
case 'newItems':
|
|
this.pageConfig.newItemsPage = page
|
|
break
|
|
// 新车型条款预警
|
|
case 'newStand':
|
|
this.pageConfig.newStandPage = page
|
|
break
|
|
// 在产车实施日期预警
|
|
case 'oldItems':
|
|
this.pageConfig.oldItemsPage = page
|
|
break
|
|
// 在产车条款预警
|
|
case 'oldStand':
|
|
this.pageConfig.oldStandPage = page
|
|
break
|
|
// 政策新车型实施日期预警
|
|
case 'newPolicy':
|
|
this.pageConfig.newPolicyPage = page
|
|
break
|
|
//政策 在产车实施日期预警
|
|
case 'oldPolicy':
|
|
this.pageConfig.oldPolicyPage = page
|
|
break
|
|
}
|
|
this.activeName === 'STANDARD' ? this.getEarlyDate() : this.getPolicyDate()
|
|
this.field = field
|
|
},
|
|
//分页每页显示数改变后方法
|
|
handlePageSizeChange(field, pageSize) {
|
|
const _pageSize = field + 'PageSize'
|
|
this.pageConfig[_pageSize] = pageSize
|
|
this.activeName === 'STANDARD' ? this.getEarlyDate() : this.getPolicyDate()
|
|
this.field = field
|
|
},
|
|
...mapMutations(["setDetailMap"])
|
|
},
|
|
props: {
|
|
reload: {
|
|
type: Boolean
|
|
}
|
|
},
|
|
computed: {
|
|
containerStyle() {
|
|
return this.activeName === 'POLICY' ? {
|
|
height: '100%'
|
|
} : {}
|
|
}
|
|
},
|
|
watch: {},
|
|
mounted() {
|
|
this.height = $(".content").height() * 0.4;
|
|
window.onresize = () => {
|
|
this.height = $(".content").height() * 0.4;
|
|
};
|
|
//从数据库中查询下拉框数据
|
|
this.$http.get("sys/dictype/getDicTypeListCode", {}, {
|
|
_this: this
|
|
}, res => {
|
|
this.energyKindOptions = res.data.ENERGYTYPES; // 文本状态
|
|
this.zrgcs = res.data.ZRGCSCLASS;
|
|
this.loading[this.field] = true
|
|
this.$http.get('sys/EarlyWarning/StandWarning', {
|
|
applyType: '',
|
|
...this.pageConfig
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
const result = res.data[0]
|
|
for (const field in result) {
|
|
this[field] = result[field].records
|
|
this[field].forEach(item => {
|
|
// 适用车型转换
|
|
if (item.applyType !== null) {
|
|
let k = (item.applyType || "").split(",");
|
|
for (let i in this.energyKindOptions) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.energyKindOptions[i].value === k[m]) {
|
|
k[m] = this.energyKindOptions[i].label;
|
|
}
|
|
item.applyType = k.join(",");
|
|
}
|
|
}
|
|
}
|
|
// 责任工程师转换
|
|
if (item.dutyEngineer !== null) {
|
|
let k = (item.dutyEngineer || "").split(",");
|
|
for (let i in this.zrgcs) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.zrgcs[i].value === k[m]) {
|
|
k[m] = this.zrgcs[i].label;
|
|
}
|
|
item.dutyEngineer = k.join(",");
|
|
}
|
|
}
|
|
}
|
|
})
|
|
let arr = result.newItems.records
|
|
arr.forEach(item => {
|
|
console.log(item.applyType)
|
|
// 适用车型转换
|
|
if (item.applyType !== null) {
|
|
let k = (item.applyType || "").split(",");
|
|
for (let i in this.energyKindOptions) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.energyKindOptions[i].value === k[m]) {
|
|
k[m] = this.energyKindOptions[i].label;
|
|
}
|
|
item.applyType = k.join(",");
|
|
}
|
|
}
|
|
}
|
|
// 责任工程师转换
|
|
if (item.dutyEngineer !== null) {
|
|
let k = (item.dutyEngineer || "").split(",");
|
|
for (let i in this.zrgcs) {
|
|
for (let m = 0; m < k.length; m++) {
|
|
if (this.zrgcs[i].value === k[m]) {
|
|
k[m] = this.zrgcs[i].label;
|
|
}
|
|
item.dutyEngineer = k.join(",");
|
|
}
|
|
}
|
|
}
|
|
})
|
|
this.newItems = arr
|
|
//可能还需要调整一下条款或标准的顺序(zyh)
|
|
switch (field) {
|
|
case 'newItems':
|
|
this.pageConfig.count1 = result.newItems.total
|
|
break
|
|
case 'oldItems':
|
|
this.pageConfig.count2 = result.oldItems.total
|
|
break
|
|
case 'newStand':
|
|
this.pageConfig.count3 = result.newStand.total
|
|
break
|
|
case 'oldStand':
|
|
this.pageConfig.count4 = result.oldStand.total
|
|
break
|
|
}
|
|
}
|
|
for (const loading in this.loading) {
|
|
this.loading[loading] = false
|
|
}
|
|
}, e => {
|
|
});
|
|
|
|
});
|
|
// this.queryNewTypeByPage();
|
|
// this.queryProductionVehicleByPage();
|
|
// 四个预警同时查询,loading全部打开
|
|
for (const loading in this.loading) {
|
|
this.loading[loading] = true
|
|
}
|
|
this.getEarlyDate();
|
|
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import "~@/assets/styles/style";
|
|
@import "~@/assets/styles/mixins";
|
|
|
|
#dynamicInformation {
|
|
background: #fff;
|
|
padding-top: 10px;
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
.dynamic-header {
|
|
height: 300px;
|
|
background: @homeSectionBgColor;
|
|
|
|
.dynamic-header-left {
|
|
width: 750px;
|
|
height: 100%;
|
|
border-right: 1px solid #ddd;
|
|
float: left;
|
|
background: #eee;
|
|
|
|
.wrapper {
|
|
overflow: hidden;
|
|
width: 100%;
|
|
max-width: 750px;
|
|
margin: 0 auto;
|
|
height: 100%;
|
|
background: #eee;
|
|
cursor: pointer;
|
|
border: 1px solid #eee;
|
|
border-right: none;
|
|
|
|
.swiper-pagination {
|
|
.swiper-pagination-bullet {
|
|
width: 10px;
|
|
height: 10px;
|
|
outline: none;
|
|
|
|
&:hover {
|
|
cursor: pointer;
|
|
}
|
|
|
|
&.swiper-pagination-bullet-active {
|
|
background: #fff;
|
|
}
|
|
}
|
|
}
|
|
|
|
.swiper-container {
|
|
height: 100%;
|
|
|
|
.swiper-img {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.dynamic-header-right {
|
|
padding: 10px;
|
|
float: left;
|
|
.flex();
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: calc(~"100% - 750px");
|
|
height: 100%;
|
|
|
|
.dynamic-search {
|
|
width: 300px;
|
|
|
|
.dynamic-search-line {
|
|
width: 100%;
|
|
height: 4px;
|
|
background: @boxBgColor;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.dynamic-search-center {
|
|
.search-btn {
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 32px;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
h5 {
|
|
font-size: 18px;
|
|
line-height: 30px;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.dynamic-label-input-form {
|
|
.el-form-item {
|
|
margin-bottom: 5px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (min-width: 1920px) {
|
|
.dynamic-header-left {
|
|
width: 1200px;
|
|
}
|
|
|
|
.dynamic-header-right {
|
|
width: calc(~"100% - 1200px");
|
|
}
|
|
}
|
|
}
|
|
|
|
.container {
|
|
/deep/ .el-tabs__header {
|
|
height: 50px;
|
|
}
|
|
}
|
|
|
|
.dynamic-content {
|
|
height: 100%;
|
|
overflow-y: hidden;
|
|
width: 100%;
|
|
position: relative;
|
|
|
|
.dynamic {
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
.dynamic-content {
|
|
h5 {
|
|
margin-left: 20px;
|
|
font-size: 18px;
|
|
line-height: 30px;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.dynamic-line {
|
|
width: 100%;
|
|
height: 4px;
|
|
background: @boxBgColor;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.more {
|
|
/deep/ .el-input__inner {
|
|
width: 155px;
|
|
}
|
|
|
|
.choose-time-area {
|
|
/deep/ .el-input__inner {
|
|
width: 170px;
|
|
}
|
|
}
|
|
|
|
cursor: pointer;
|
|
color: #12508e;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
z-index: 100;
|
|
padding: 5px 10px;
|
|
// &:hover {
|
|
// color: #fff;
|
|
// background: #12508e;
|
|
// transition: all 0.2s linear;
|
|
// }
|
|
}
|
|
|
|
.dynamic-loop-container {
|
|
position: relative;
|
|
min-height: 160px;
|
|
|
|
.dynamic-loop {
|
|
cursor: pointer;
|
|
width: 100%;
|
|
padding: 5px 18px;
|
|
|
|
&:hover {
|
|
.domestic-loop-header {
|
|
color: @baseColor;
|
|
}
|
|
|
|
.loop-content-left {
|
|
text-decoration: underline;
|
|
color: @baseColor;
|
|
}
|
|
}
|
|
|
|
.domestic-loop-header {
|
|
font-size: 15px;
|
|
height: 20px;
|
|
line-height: 20px;
|
|
.flex();
|
|
align-items: center;
|
|
|
|
.domestic-title {
|
|
max-width: 80%;
|
|
.ellipsis();
|
|
}
|
|
}
|
|
|
|
.newInformation {
|
|
color: #e4393c;
|
|
}
|
|
|
|
.time {
|
|
position: absolute;
|
|
right: 0.1rem;
|
|
//top: 0;
|
|
}
|
|
|
|
.newI {
|
|
font-style: italic;
|
|
color: #e4393c;
|
|
font-weight: bold;
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.domestic-loop-content {
|
|
width: 100%;
|
|
height: 20px;
|
|
line-height: 20px;
|
|
.flex();
|
|
|
|
.loop-content-left {
|
|
padding-left: 30px;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
|
|
.left-content {
|
|
width: 100%;
|
|
|
|
p {
|
|
.ellipsis();
|
|
}
|
|
}
|
|
}
|
|
|
|
.loop-content-right {
|
|
width: 150px;
|
|
.flex();
|
|
justify-content: flex-end;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.content {
|
|
padding-bottom: 10px;
|
|
height: calc(~'100% - 40px');
|
|
}
|
|
}
|
|
|
|
::v-deep {
|
|
.el-tabs {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
.el-tabs__content {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
|
|
.el-tab-pane {
|
|
&:last-child {
|
|
height: 100%;
|
|
|
|
.dynamic-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
.content {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
.content-group {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
.table-wrap {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.dynamic-child-title {
|
|
color: #515a6e;
|
|
margin: 24px 0;
|
|
}
|
|
}
|
|
}
|
|
</style>
|