标准预警日期

This commit is contained in:
yanyizhou
2021-12-05 21:03:49 +08:00
parent 874e169a82
commit af41c9909b
+24 -3
View File
@@ -160,17 +160,17 @@
</el-table-column>
<el-table-column prop="ssrq" label="实施日期" width="120" align="center">
<template slot-scope="scope">
<span>{{ scope.row.ssrq ? scope.row.ssrq.substring(0,10) : '' }}</span>
<span>{{ scope.row.ssrq }}</span>
</template>
</el-table-column>
<el-table-column prop="xcxssrq" label="新车型实施日期" width="150" align="center">
<template slot-scope="scope">
<span>{{ scope.row.xcxssrq ? scope.row.xcxssrq.substring(0,10) : '' }}</span>
<span>{{ scope.row.xcxssrq }}</span>
</template>
</el-table-column>
<el-table-column prop="zccssrq" label="在产车实施日期" width="150" align="center">
<template slot-scope="scope">
<span>{{ scope.row.zccssrq ? scope.row.zccssrq.substring(0,10) : '' }}</span>
<span>{{ scope.row.zccssrq }}</span>
</template>
</el-table-column>
<el-table-column prop="applyType" label="适用车型" align="center">
@@ -440,6 +440,7 @@ export default {
_this: this,
}, res => {
console.log('608',res)
// console.log('608',res.data.records[0].zccssrq.replace(' 00:00:00',''))
// 适用车型转换
for (let a = 0; a < res.data.records.length; a++) {
if (res.data.records[a].applyType !== null) {
@@ -454,6 +455,26 @@ export default {
}
}
}
for (let i = 0; i < res.data.records.length; i++) {
let putTimeReplaceTimes = res.data.records[i].putTime.length/19
let ssrqReplaceTimes = res.data.records[i].ssrq.length/19
let xcxssrqReplaceTimes = res.data.records[i].xcxssrq.length/19
let zccssrqReplaceTimes = res.data.records[i].zccssrq.length/19
for (let j = 0; j < putTimeReplaceTimes; j++) {
res.data.records[i].putTime = res.data.records[i].putTime.replace(' 00:00:00','')
}
for (let j = 0; j < ssrqReplaceTimes; j++) {
res.data.records[i].ssrq = res.data.records[i].ssrq.replace(' 00:00:00','')
}
for (let j = 0; j < xcxssrqReplaceTimes; j++) {
res.data.records[i].xcxssrq = res.data.records[i].xcxssrq.replace(' 00:00:00','')
}
for (let j = 0; j < zccssrqReplaceTimes; j++) {
res.data.records[i].zccssrq = res.data.records[i].zccssrq.replace(' 00:00:00','')
}
}
this.warningTableDatas = res.data.records
this.pageConfig.page = res.data.current
if ((this.warningTableDatas.length === 0 || this.warningTableDatas === []) && this.pageConfig.page !== 1) {