Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
zhutianqi
2022-01-06 17:23:09 +08:00
2 changed files with 67 additions and 11 deletions
@@ -23,6 +23,7 @@
style="width: 100%"
height="100%"
@selection-change="standSelectChange"
@sort-change="sortChange"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
>
<el-table-column type="selection" align="center" width="50">
@@ -97,13 +98,13 @@
</el-table-column>
<el-table-column
prop="spendTime"
:label="this.$t('m.timeConsuming')"
label="消耗时间(秒)"
align="center"
sortable
width="120"
sortable="custom"
width="140"
>
</el-table-column>
<el-table-column label="操作" align="center" width="150" fixed="right">
<el-table-column label="操作" align="center" width="150" >
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-button
@@ -795,6 +796,8 @@ export default {
isSubmit: false,
showUploadlist: true, // 导入过程中新增数据时,如果数据报错,不出现导入列表
collect: "收藏",
paixu: '',
shunxu: ''
};
},
props: {},
@@ -1052,6 +1055,26 @@ export default {
break;*/
}
},
// 表格排序
sortChange (sortObj) {
if (sortObj.column.order !== 'normal') {
this.shunxu = ''
this.paixu = ''
let order = sortObj.column.order
switch (sortObj.column.property) {
case 'spendTime' :
// 后台联调
this.paixu = 'spendTime'
if (order === 'ascending'){
this.shunxu = 'asc'
} else if (order === 'descending') {
this.shunxu = 'desc'
}
break
}
}
this.getTableData()
},
// 修改成表格样式后,选择项勾选改变
standSelectChange(data) {
this.selectTableData = [];
@@ -1336,6 +1359,8 @@ export default {
{
page: this.page,
pageSize: this.pageSize,
paixu: this.shunxu ? this.paixu : '',
shunxu: this.shunxu
},
{
_this: this,
@@ -1344,6 +1369,7 @@ export default {
(res) => {
if (res.ok) {
this.standRecoList = res.data.list;
console.log(this.standRecoList);
this.total = res.data.count
}
},
@@ -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)
},