feat: There is no way the, standardSearch

This commit is contained in:
super_liu
2022-01-06 15:52:14 +08:00
parent 420004d822
commit 5e76ce624d
@@ -51,7 +51,7 @@
<span>暂无查询结果</span>
</div>
<!-- 检索结果 -->
<div class="table-box">
<div class="table-box" style="width: 100%;">
<div class="search-result">
<div class="search-group">
<!-- <div style="position: absolute;right: 110px;" class="search-item fixed-clean">-->
@@ -72,6 +72,7 @@
:loading="resultLoading"
tooltip-effect="dark"
border
style="width:100% !important;"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
height="100%"
@@ -79,9 +80,10 @@
<el-table-column
align="center"
type="index"
width="50">
min-width="5%">
</el-table-column>
<el-table-column
min-width="15%"
show-overflow-tooltip
v-if="selectIndex !== 'msgdyinfo'"
align="center"
@@ -91,6 +93,7 @@
</template>
</el-table-column>
<el-table-column
min-width="45%"
show-overflow-tooltip
v-if="selectIndex !== 'msgdyinfo'"
align="center"
@@ -100,6 +103,7 @@
</template>
</el-table-column>
<el-table-column
min-width="12%"
align="center"
:label="$t('m.issueTime')">
<template slot-scope="scope">
@@ -112,11 +116,11 @@
<el-table-column
align="center"
:label="(selectIndex === 'stand'||'bussstand') && selectIndex !== 'laws' ? $t('m.putTime') : '新车实施日期'"
width="130">
min-width="12%">
<template slot-scope="scope">
<div v-if="selectIndex === 'stand' || selectIndex === 'bussstand' ? (scope.row.SSRQ !== null && scope.row.SSRQ !== undefined && scope.row.SSRQ !== '')
: (selectIndex === 'laws' ? scope.row.XCXSSRQLAWS : (scope.row.putTime !== null && scope.row.putTime !== undefined && scope.row.putTime !== ''))">
{{ $dateFormat(new Date((selectIndex === 'stand' || (selectIndex === 'bussstand' && scope.row.standType === 'FOREIGN')) ? scope.row.SSRQ : (selectIndex === 'laws' ? scope.row.XCXSSRQLAWS :scope.row.putTime)), "yyyy-MM-dd") }}
: (selectIndex === 'laws' ? scope.row.XCXSSRQLAWS : (scope.row.putTime !== null && scope.row.putTime !== undefined && scope.row.putTime !== ''))" :title="dateFormat2((selectIndex === 'stand' || (selectIndex === 'bussstand' && scope.row.standType === 'FOREIGN')) ? scope.row.SSRQ : (selectIndex === 'laws' ? scope.row.XCXSSRQLAWS :scope.row.putTime))">
{{ dateFormat2((selectIndex === 'stand' || (selectIndex === 'bussstand' && scope.row.standType === 'FOREIGN')) ? scope.row.SSRQ : (selectIndex === 'laws' ? scope.row.XCXSSRQLAWS :scope.row.putTime)) | ellipsis }}
</div>
<div v-else></div>
</template>
@@ -125,7 +129,7 @@
v-if="selectIndex !== 'msgdyinfo'"
align="center"
:label="selectIndex === 'stand'||'bussstand' ? $t('m.standStateShow') : (selectIndex === 'laws' ? $t('m.fileStatus') : $t('m.enterpriseStandardStatus'))"
width="200">
min-width="12%">
<template slot-scope="scope">
<!-- <span v-if="selectIndex === 'laws'">{{ getLawsState(scope.row.statecode) }}</span>-->
<div :class="selectIndex === 'enterprise' || selectIndex === 'laws' ? (scope.row.textStatusBussName === '参考' ? 'yellowClass' :
@@ -324,6 +328,15 @@
import {dateFormat} from '@/common/date'
export default {
name: 'StandardSearch',
filters: {
ellipsis (value) {
if (!value) return ''
if (value.length > 10) {
return value.slice(0,11) + '...'
}
return value
}
},
data () {
return {
itermsConditionsTitle1: '',
@@ -366,7 +379,7 @@
},
seniortypeAll: ['selectIndex'],
seniortypeStand: ['selectIndex', 'standSort', 'category', 'nature', 'standState', 'applyArctic', 'applyAuth', 'CLLX', 'CBCD', 'ZRLX', 'CYSD','NYLX','NYLXCLASS'],
seniortypeBuss: ['selectIndex', 'country', 'standSort', 'category', 'nature', 'standState', 'textStatus', 'applyArctic', 'applyAuth', 'CLLX', 'CBCD', 'ZRLX', 'CYSD','NYLX','NYLXCLASS'],
seniortypeBuss: ['selectIndex', 'country', 'standSort', 'category', 'nature', 'standState', 'textStatus', 'applyArctic', 'applyAuth', 'CLLX', 'CBCD', 'ZRLX', 'CYSD','NYLX','NYLXCLASS','SYCXCLASS'],
// seniortypeLaws: ['selectIndex', 'country', 'SYCLLX', 'ZRLX', 'WSSFCY'], // 政策的适用车辆类型、我司是否参与 和 国内的字段不一样
seniortypeLaws: ['selectIndex', 'lawsSyqy', 'lawsSycx', 'CYSDLAWS'], // 政策的适用车辆类型、我司是否参与 和 国内的字段不一样
seniortypeEnterprise : ['selectIndex','standSort','CLLX','BUSSSTATE','ORGLIST','NYLXCLASS','NYLX'],
@@ -942,8 +955,10 @@
renameType = seniortype[i]
}
let resultsubdata = resultdata[renameType] || {}
console.log(resultsubdata)
let countAll = 0
if (nowdata) {
console.log(nowdata)
for (let ji = 0; ji < nowdata.length; ji++) {
if (resultsubdata[nowdata[ji].value] === undefined) {
nowdata[ji].number = 0
@@ -1100,6 +1115,7 @@
case 'NYLXCLASS':
option.title = '能源类型'
option.index = 19
break
}
if(key === 'STANDCLASSIFY'){
const standVerify = ["GB","GB/T","QC/T","JT","JB","GA","GJB","HJ"];
@@ -1163,6 +1179,7 @@
return new Promise((resolve, reject) => {
let filterOptions = {}
let originOptions = this.searchOriginOptions
console.log(originOptions)
filterOptions.selectIndex = originOptions.selectIndex
switch (resType) {
case 'stand':
@@ -2533,6 +2550,19 @@
},
//时间处理
dateFormat2(str){
if(str === undefined || str === null || str === ''){
return ""
}else {
if(str.indexOf(",") !== -1){
const arr = str.split(",")
const arr1 = str.split(",")
arr.forEach( date =>{
arr1.push(dateFormat(date.trim()))
})
return arr1.toString()
}
}
return dateFormat(str)
},