标准预警 国内法规详情

This commit is contained in:
宋伟佳
2021-06-09 13:57:40 +08:00
parent a1bf499605
commit afd7d90ec2
3 changed files with 262 additions and 118 deletions
+14 -4
View File
@@ -7,8 +7,8 @@
<el-pagination <el-pagination
:total="total" :total="total"
:current-page="page" :current-page="page"
:page-sizes="[1, 10, 20, 30, 50]" :page-sizes="[10, 20, 30, 50]"
:page-size="pageSize" :page-size="_pageSize"
@current-change="pageChange" @current-change="pageChange"
@size-change="pageSizeChange" @size-change="pageSizeChange"
layout="total, prev, pager, next, sizes, jumper" layout="total, prev, pager, next, sizes, jumper"
@@ -81,12 +81,22 @@ export default {
isDivider: { isDivider: {
type: Boolean, type: Boolean,
default: true default: true
},
pageSize: {
type: Number,
default: 10
},
// 不随全局页码改变
autoSize: {
type: Boolean,
default: false
} }
}, },
computed: { computed: {
...mapGetters(['userInfo', 'getTypeFlag']), ...mapGetters(['userInfo', 'getTypeFlag']),
pageSize () { _pageSize () {
return this.userInfo.configContent === '' || this.userInfo.configContent === undefined || this.userInfo.configContent === null ? 20 : parseInt(this.userInfo.configContent) return this.autoSize ? this.pageSize
: this.userInfo.configContent === '' || this.userInfo.configContent === undefined || this.userInfo.configContent === null ? 20 : parseInt(this.userInfo.configContent)
} }
}, },
mounted () { mounted () {
@@ -23,13 +23,13 @@
</div> </div>
</div> </div>
<div class="basic-information-content"> <div class="basic-information-content">
<p><label>中文名称</label><span>{{ sarStandardsInfoEO.standName || '-' }}</span></p>
<p><label>英文名称</label><span>{{ sarStandardsInfoEO.standEnName || '-' }}</span></p>
<p style="color: #C42626;"> <p style="color: #C42626;">
<label>标准号</label> <label>标准号</label>
<span v-if="sarStandardsInfoEO.standYear">{{ sarStandardsInfoEO.standSortShow + ' ' + sarStandardsInfoEO.standNumber + '-' + sarStandardsInfoEO.standYear }}</span> <span v-if="sarStandardsInfoEO.standYear">{{ sarStandardsInfoEO.standSortShow + ' ' + sarStandardsInfoEO.standNumber + '-' + sarStandardsInfoEO.standYear }}</span>
<span v-else>{{ sarStandardsInfoEO.standSort + ' ' + sarStandardsInfoEO.standNumber }}</span> <span v-else>{{ sarStandardsInfoEO.standSort + ' ' + sarStandardsInfoEO.standNumber }}</span>
</p> </p>
<p><label>中文名称</label><span>{{ sarStandardsInfoEO.standName || '-' }}</span></p>
<p><label>英文名称</label><span>{{ sarStandardsInfoEO.standEnName || '-' }}</span></p>
<p> <p>
<label <label
title="“计划修订”、“修订中”均为现行有效版本;“已修订”标准的有效性根据实际实施情况判定。" title="“计划修订”、“修订中”均为现行有效版本;“已修订”标准的有效性根据实际实施情况判定。"
@@ -1013,7 +1013,7 @@ export default {
relateDialog: false, relateDialog: false,
relateList: [], relateList: [],
relateNowList: [], relateNowList: [],
loading: true, loading: false,
showItemInfoModal: false, showItemInfoModal: false,
standShowItemEO: {}, standShowItemEO: {},
// 提交状态 // 提交状态
@@ -1892,7 +1892,7 @@ export default {
}, },
selectStandMessage () { selectStandMessage () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$http.get('lawss/sarStandardsInfo/getStandInfoById', {id: this.sarStandardsInfoEO.id}, { this.$http.get('sarStandardsInfo/sar-standards-info/getStandInfoById', {id: this.sarStandardsInfoEO.id}, {
_this: this _this: this
}, res => { }, res => {
this.sarStandardsInfoEO = res.data || {} this.sarStandardsInfoEO = res.data || {}
@@ -2387,7 +2387,7 @@ export default {
*/ */
getAddFormFieldList (isEdit) { getAddFormFieldList (isEdit) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$http.get('lawss/sarStandAttrDetails/list', {}, {_this: this}, this.$http.get('sarStandAttrDetails/sar-stand-attr-details/list', {}, {_this: this},
res => { res => {
if (res.ok) { if (res.ok) {
// const { data: { STAND: data } } = res // const { data: { STAND: data } } = res
@@ -2674,7 +2674,7 @@ export default {
location.half = half location.half = half
location.showAll = false location.showAll = false
}) })
this.$http.get('lawss/sarSarAccessInfo/selectProTimeInfoByStandId', { this.$http.get('sarSarAccessInfo/sar-sar-access-info/selectProTimeInfoByStandId', {
standId: this.$route.params.id standId: this.$route.params.id
}, { }, {
_this: this _this: this
+242 -108
View File
@@ -36,6 +36,7 @@
border border
:resizable="false" :resizable="false"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}" :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
v-loading="loading.newItems"
> >
<el-table-column prop="standType" label="类型" align="center"> <el-table-column prop="standType" label="类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -48,7 +49,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="standCode" label="编号" align="center"> <el-table-column prop="standCode" label="编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.standCode }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准名称" align="center"> <el-table-column prop="standName" label="标准名称" align="center">
@@ -63,24 +64,34 @@
</el-table-column> </el-table-column>
<el-table-column prop="applyType" label="适用车型" align="center"> <el-table-column prop="applyType" label="适用车型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.applyType }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准类型" align="center"> <el-table-column prop="standType" label="标准类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.standType }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="dutyEngineer" label="标准责任工程师" align="center"> <el-table-column prop="dutyEngineer" label="标准责任工程师" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.dutyEngineer }}</a>
</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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
style="position: static;" style="position: static;"
:page="pageConfig.current1" :page="pageConfig.newItemsPage"
:pageSize="pageConfig.newItemsPageSize"
:total="pageConfig.count1" :total="pageConfig.count1"
autoSize
@pageChange="page => handlePageChange('newItems', page)" @pageChange="page => handlePageChange('newItems', page)"
@pageSizeChange="pageSize => handlePageSizeChange('newItems', pageSize)"></pagination> @pageSizeChange="pageSize => handlePageSizeChange('newItems', pageSize)"></pagination>
<el-divider content-position="left" class="dynamic-child-title">在产车实施日期预警</el-divider> <el-divider content-position="left" class="dynamic-child-title">在产车实施日期预警</el-divider>
@@ -90,6 +101,7 @@
border border
:resizable="false" :resizable="false"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}" :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
v-loading="loading.oldItems"
> >
<el-table-column prop="sortName" label="类型" align="center"> <el-table-column prop="sortName" label="类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -100,9 +112,9 @@
<div v-if="scope.row.sortName === 'FOREIGN_LAWS'">国外政策</div> <div v-if="scope.row.sortName === 'FOREIGN_LAWS'">国外政策</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standNum" label="编号" align="center"> <el-table-column prop="standCode" label="编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.standCode }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准名称" align="center"> <el-table-column prop="standName" label="标准名称" align="center">
@@ -115,28 +127,38 @@
{{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }} {{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="适用车型" align="center"> <el-table-column prop="applyType" label="适用车型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准类型" align="center"> <el-table-column prop="standType" label="标准类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.standType }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准责任工程师" align="center"> <el-table-column prop="dutyEngineer" label="标准责任工程师" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.dutyEngineer }}</a>
</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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
style="position: static;" style="position: static;"
:page="pageConfig.current2" :page="pageConfig.oldItemsPage"
:pageSize="pageConfig.oldItemsPageSize"
:total="pageConfig.count2" :total="pageConfig.count2"
@pageChange="page => handlePageChange('newStand', page)" autoSize
@pageSizeChange="pageSize => handlePageSizeChange('newStand', pageSize)"></pagination> @pageChange="page => handlePageChange('oldItems', page)"
@pageSizeChange="pageSize => handlePageSizeChange('oldItems', pageSize)"></pagination>
<el-divider content-position="left" class="dynamic-child-title">新车型条款预警</el-divider> <el-divider content-position="left" class="dynamic-child-title">新车型条款预警</el-divider>
<el-table <el-table
:data="newStand" :data="newStand"
@@ -144,10 +166,11 @@
border border
:resizable="false" :resizable="false"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}" :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
v-loading="loading.newStand"
> >
<el-table-column prop="standNum" label="标准编号" align="center"> <el-table-column prop="standCode" label="标准编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.standCode }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准名称" align="center"> <el-table-column prop="standName" label="标准名称" align="center">
@@ -155,14 +178,14 @@
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standNum" label="条款号" align="center"> <el-table-column prop="itemsId" label="条款号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.itemsId }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standNum" label="条款要求" align="center"> <el-table-column prop="itemsName" label="条款要求" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.itemsName }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="putTime" label="实施日期" align="center" sortable> <el-table-column prop="putTime" label="实施日期" align="center" sortable>
@@ -170,33 +193,38 @@
{{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }} {{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="putTime" label="预警日期" align="center" sortable> <el-table-column prop="applyType" label="适用车型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }} <a @click="showStandDetails(scope.row)">{{ scope.row.applyType }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="适用车型" align="center"> <el-table-column prop="mark" label="标准分类" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.mark }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准分类" align="center"> <el-table-column prop="dutyEngineer" label="标准责任工程师" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.dutyEngineer }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准责任工程师" align="center"> <el-table-column label="操作" align="center" v-if="isShowBtn">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <el-button
size="mini"
type="danger"
@click="cancelWarning(scope.$index, scope.row)">取消预警</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
style="position: static;" style="position: static;"
:page="pageConfig.current3" :page="pageConfig.newStandPage"
:pageSize="pageConfig.newStandPageSize"
:total="pageConfig.count3" :total="pageConfig.count3"
@pageChange="page => handlePageChange('oldItems', page)" autoSize
@pageSizeChange="pageSize => handlePageSizeChange('oldItems', pageSize)"></pagination> @pageChange="page => handlePageChange('newStand', page)"
@pageSizeChange="pageSize => handlePageSizeChange('newStand', pageSize)"></pagination>
<el-divider content-position="left" class="dynamic-child-title">在产车条款预警</el-divider> <el-divider content-position="left" class="dynamic-child-title">在产车条款预警</el-divider>
<el-table <el-table
:data="oldStand" :data="oldStand"
@@ -204,10 +232,11 @@
border border
:resizable="false" :resizable="false"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}" :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
v-loading="loading.oldStand"
> >
<el-table-column prop="standNum" label="标准编号" align="center"> <el-table-column prop="standCode" label="标准编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.standCode }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准名称" align="center"> <el-table-column prop="standName" label="标准名称" align="center">
@@ -215,14 +244,14 @@
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standNum" label="条款号" align="center"> <el-table-column prop="itemsId" label="条款号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.itemsId }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standNum" label="条款要求" align="center"> <el-table-column prop="itemsName" label="条款要求" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.itemsName }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="putTime" label="实施日期" align="center" sortable> <el-table-column prop="putTime" label="实施日期" align="center" sortable>
@@ -230,31 +259,36 @@
{{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }} {{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="putTime" label="预警日期" align="center" sortable> <el-table-column prop="applyType" label="适用车型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }} <a @click="showStandDetails(scope.row)">{{ scope.row.applyType }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="适用车型" align="center"> <el-table-column prop="mark" label="标准分类" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.mark }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准分类" align="center"> <el-table-column prop="dutyEngineer" label="标准责任工程师" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.dutyEngineer }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="标准责任工程师" align="center"> <el-table-column label="操作" align="center" v-if="isShowBtn">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <el-button
size="mini"
type="danger"
@click="cancelWarning(scope.$index, scope.row)">取消预警</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
style="position: static;" style="position: static;"
:page="pageConfig.current4" :page="pageConfig.oldStandPage"
:pageSize="pageConfig.oldStandPageSize"
:total="pageConfig.count4" :total="pageConfig.count4"
autoSize
@pageChange="page => handlePageChange('oldStand', page)" @pageChange="page => handlePageChange('oldStand', page)"
@pageSizeChange="pageSize => handlePageSizeChange('oldStand', pageSize)"></pagination> @pageSizeChange="pageSize => handlePageSizeChange('oldStand', pageSize)"></pagination>
</div> </div>
@@ -268,20 +302,21 @@
<el-divider content-position="left" class="dynamic-child-title">新车型实施日期预警</el-divider> <el-divider content-position="left" class="dynamic-child-title">新车型实施日期预警</el-divider>
<div class="table-wrap"> <div class="table-wrap">
<el-table <el-table
:data="newItems" :data="newPolicy"
:height="tableHeight" :height="tableHeight"
border border
:resizable="false" :resizable="false"
v-loading="loading.newPolicy"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}" :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
> >
<el-table-column prop="standNum" label="政策编号" align="center"> <el-table-column prop="policyId" label="政策编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.policyId }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="政策名称" align="center"> <el-table-column prop="policyName" label="政策名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.policyName }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="putTime" label="新车型实施日期" align="center" sortable> <el-table-column prop="putTime" label="新车型实施日期" align="center" sortable>
@@ -289,33 +324,44 @@
{{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }} {{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }}
</template> </template>
</el-table-column> </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> </el-table>
</div> </div>
<pagination <pagination
style="position: static;" style="position: static;"
:page="pageConfig.current1" :page="pageConfig.newPolicyPage"
:total="pageConfig.count1" :pageSize="pageConfig.newPolicyPageSize"
@pageChange="page => handlePageChange('newModel', page)" :total="pageConfig.count5"
@pageSizeChange="pageSize => handlePageSizeChange('newModel', pageSize)"></pagination> autoSize
@pageChange="page => handlePageChange('newPolicy', page)"
@pageSizeChange="pageSize => handlePageSizeChange('newPolicy', pageSize)"></pagination>
</div> </div>
<div class="content-group"> <div class="content-group">
<el-divider content-position="left" class="dynamic-child-title">在产车实施日期预警</el-divider> <el-divider content-position="left" class="dynamic-child-title">在产车实施日期预警</el-divider>
<div class="table-wrap"> <div class="table-wrap">
<el-table <el-table
:data="newItems" :data="oldPolicy"
:height="tableHeight" :height="tableHeight"
border border
:resizable="false" :resizable="false"
v-loading="loading.oldPolicy"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}" :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
> >
<el-table-column prop="standNum" label="政策编号" align="center"> <el-table-column prop="policyId" label="政策编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standNum }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.policyId }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="standName" label="政策名称" align="center"> <el-table-column prop="policyName" label="政策名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a @click="showStandDetails(scope.row)">{{ scope.row.standName }}</a> <a @click="showStandDetails(scope.row)">{{ scope.row.policyName }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="putTime" label="在产车实施日期" align="center" sortable> <el-table-column prop="putTime" label="在产车实施日期" align="center" sortable>
@@ -323,14 +369,24 @@
{{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }} {{ (scope.row.putTime ? scope.row.putTime.substring(0, 11) : "") }}
</template> </template>
</el-table-column> </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> </el-table>
</div> </div>
<pagination <pagination
style="position: static;" style="position: static;"
:page="pageConfig.current1" :page="pageConfig.oldPolicyPage"
:total="pageConfig.count1" :pangSize="pageConfig.oldPolicyPageSize"
@pageChange="page => handlePageChange('newModel', page)" :total="pageConfig.count6"
@pageSizeChange="pageSize => handlePageSizeChange('newModel', pageSize)"></pagination> autoSize
@pageChange="page => handlePageChange('oldPolicy', page)"
@pageSizeChange="pageSize => handlePageSizeChange('oldPolicy', pageSize)"></pagination>
</div> </div>
</div> </div>
</div> </div>
@@ -350,6 +406,7 @@ export default {
name: "standardWarning", name: "standardWarning",
data() { data() {
return { return {
isShowBtn: true,
activeName: "STANDARD", //tab 默认选中值 activeName: "STANDARD", //tab 默认选中值
// 头部搜索框 // 头部搜索框
dynamic: { dynamic: {
@@ -358,32 +415,53 @@ export default {
height: null, height: null,
// 新车型实施日期预警 // 新车型实施日期预警
newItems: [], newItems: [],
//政策新车型实施日期预警
newPolicy: [],
// 新车型条款预警 // 新车型条款预警
newStand: [], newStand: [],
// 在产车实施日期预警 // 在产车实施日期预警
oldItems: [], oldItems: [],
// 在产车条款预警 // 在产车条款预警
oldStand: [], oldStand: [],
//政策在产车实施日期预警
oldPolicy: [],
tableHeight: 0, tableHeight: 0,
pageConfig: { pageConfig: {
current1: 1, newItemsPage: 1,
pageSize1: 10, newItemsPageSize: 10,
count1: 0, count1: 0,
current2: 1, newStandPage: 1,
pageSize2: 10, newStandPageSize: 10,
count2: 0, count2: 0,
current3: 1, oldItemsPage: 1,
pageSize3: 10, oldItemsPageSize: 10,
count3: 0, count3: 0,
current4: 1, oldStandPage: 1,
pageSize4: 10, oldStandPageSize: 10,
count4: 0 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: { methods: {
// 获取数据 (type用于区别分页器切换) // 获取标准预警数据 (type用于区别分页器切换)
getEarlyDate() { getEarlyDate() {
this.loading[this.field] = true
this.$http.get('sys/EarlyWarning/StandWarning', { this.$http.get('sys/EarlyWarning/StandWarning', {
applyType: '', applyType: '',
...this.pageConfig ...this.pageConfig
@@ -391,17 +469,56 @@ export default {
_this: this _this: this
},res => { },res => {
const result = res.data[0] const result = res.data[0]
Object.keys(result).forEach((tableName, index) => { for (const field in result) {
const tableRes = result[tableName] this[field] = result[field].records
const count = `count${index + 1}` // this.newItems = result.newItems.records
this.pageConfig[count] = tableRes.total switch (field) {
this[tableName] = tableRes.records 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 => { }, e => {
}); });
}, },
//获取政策预警数据(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 // 切换tab
handleClick(tab, event) { handleClick(tab, event) {
this.getPolicyDate();
switch (tab.name) { switch (tab.name) {
case "POLICY": case "POLICY":
const computedHeight = () => { const computedHeight = () => {
@@ -418,7 +535,27 @@ export default {
}, },
//查找适用车型 //查找适用车型
searchBtnClick() { searchBtnClick() {
console.log("查找适用车型"); this.$http.get('sys/EarlyWarning/StandWarning', {
...this.pageConfig,
applyType: this.dynamic.keyword
},{
_this: this,
}, res=> {
const result = res.data[0]
// Object.keys(result).forEach((tableName,index) => {
// const tableRes = result[tableName]
// const count = `count${index + 1}`
// this.pageConfig[count] = tableRes.total
// this[tableName] = tableRes.records
// console.log(tableRes)
// })
}, e => {
console.log(e)
})
},
//取消预警
cancelWarning (index, row) {
console.log(index, row)
}, },
showStandDetails(item) { showStandDetails(item) {
let getStandId = item.sarId; let getStandId = item.sarId;
@@ -515,44 +652,38 @@ export default {
switch (field) { switch (field) {
// 新车型实施日期预警 // 新车型实施日期预警
case 'newItems': case 'newItems':
this.pageConfig.current1 = page this.pageConfig.newItemsPage = page
break break
// 新车型条款预警 // 新车型条款预警
case 'newStand': case 'newStand':
this.pageConfig.current2 = page this.pageConfig.newStandPage = page
break break
// 在产车实施日期预警 // 在产车实施日期预警
case 'oldItems': case 'oldItems':
this.pageConfig.current3 = page this.pageConfig.oldItemsPage = page
break break
// 在产车条款预警 // 在产车条款预警
case 'oldStand': case 'oldStand':
this.pageConfig.current4 = page this.pageConfig.oldStandPage = page
break
// 政策新车型实施日期预警
case 'newPolicy':
this.pageConfig.newPolicyPage = page
break
//政策 在产车实施日期预警
case 'oldPolicy':
this.pageConfig.oldPolicyPage = page
break break
} }
this.getEarlyDate() this.activeName === 'STANDARD' ? this.getEarlyDate() : this.getPolicyDate()
this.field = field
}, },
//分页每页显示数改变后方法 //分页每页显示数改变后方法
handlePageSizeChange(field, pageSize) { handlePageSizeChange(field, pageSize) {
switch (field) { const _pageSize = field + 'PageSize'
// 新车型实施日期预警 this.pageConfig[_pageSize] = pageSize
case 'newItems': this.activeName === 'STANDARD' ? this.getEarlyDate() : this.getPolicyDate()
this.pageConfig.pageSize1 = pageSize this.field = field
break
// 新车型条款预警
case 'newStand':
this.pageConfig.pageSize2 = pageSize
break
// 在产车实施日期预警
case 'oldItems':
this.pageConfig.pageSize3 = pageSize
break
// 在产车条款预警
case 'oldStand':
this.pageConfig.pageSize4 = pageSize
break
}
this.getEarlyDate()
}, },
...mapMutations(["setDetailMap"]) ...mapMutations(["setDetailMap"])
}, },
@@ -576,7 +707,10 @@ export default {
}; };
this.queryNewTypeByPage(); this.queryNewTypeByPage();
this.queryProductionVehicleByPage(); this.queryProductionVehicleByPage();
// 四个预警同时查询,loading全部打开
for (const loading in this.loading) { this.loading[loading] = true }
this.getEarlyDate(); this.getEarlyDate();
} }
}; };
</script> </script>