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%" style="width: 100%"
height="100%" height="100%"
@selection-change="standSelectChange" @selection-change="standSelectChange"
@sort-change="sortChange"
:header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
> >
<el-table-column type="selection" align="center" width="50"> <el-table-column type="selection" align="center" width="50">
@@ -97,13 +98,13 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="spendTime" prop="spendTime"
:label="this.$t('m.timeConsuming')" label="消耗时间(秒)"
align="center" align="center"
sortable sortable="custom"
width="120" width="140"
> >
</el-table-column> </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"> <template slot-scope="scope">
<div @click.stop style="display: inline-block"> <div @click.stop style="display: inline-block">
<el-button <el-button
@@ -795,6 +796,8 @@ export default {
isSubmit: false, isSubmit: false,
showUploadlist: true, // 导入过程中新增数据时,如果数据报错,不出现导入列表 showUploadlist: true, // 导入过程中新增数据时,如果数据报错,不出现导入列表
collect: "收藏", collect: "收藏",
paixu: '',
shunxu: ''
}; };
}, },
props: {}, props: {},
@@ -1052,6 +1055,26 @@ export default {
break;*/ 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) { standSelectChange(data) {
this.selectTableData = []; this.selectTableData = [];
@@ -1336,6 +1359,8 @@ export default {
{ {
page: this.page, page: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
paixu: this.shunxu ? this.paixu : '',
shunxu: this.shunxu
}, },
{ {
_this: this, _this: this,
@@ -1344,6 +1369,7 @@ export default {
(res) => { (res) => {
if (res.ok) { if (res.ok) {
this.standRecoList = res.data.list; this.standRecoList = res.data.list;
console.log(this.standRecoList);
this.total = res.data.count this.total = res.data.count
} }
}, },
@@ -51,7 +51,7 @@
<span>暂无查询结果!</span> <span>暂无查询结果!</span>
</div> </div>
<!-- 检索结果 --> <!-- 检索结果 -->
<div class="table-box"> <div class="table-box" style="width: 100%;">
<div class="search-result"> <div class="search-result">
<div class="search-group"> <div class="search-group">
<!-- <div style="position: absolute;right: 110px;" class="search-item fixed-clean">--> <!-- <div style="position: absolute;right: 110px;" class="search-item fixed-clean">-->
@@ -72,6 +72,7 @@
:loading="resultLoading" :loading="resultLoading"
tooltip-effect="dark" tooltip-effect="dark"
border border
style="width:100% !important;"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px', :header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}" fontWeight: 'bold', height: '48px'}"
height="100%" height="100%"
@@ -79,9 +80,10 @@
<el-table-column <el-table-column
align="center" align="center"
type="index" type="index"
width="50"> min-width="5%">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
min-width="15%"
show-overflow-tooltip show-overflow-tooltip
v-if="selectIndex !== 'msgdyinfo'" v-if="selectIndex !== 'msgdyinfo'"
align="center" align="center"
@@ -91,6 +93,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
min-width="45%"
show-overflow-tooltip show-overflow-tooltip
v-if="selectIndex !== 'msgdyinfo'" v-if="selectIndex !== 'msgdyinfo'"
align="center" align="center"
@@ -100,6 +103,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
min-width="12%"
align="center" align="center"
:label="$t('m.issueTime')"> :label="$t('m.issueTime')">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -112,11 +116,11 @@
<el-table-column <el-table-column
align="center" align="center"
:label="(selectIndex === 'stand'||'bussstand') && selectIndex !== 'laws' ? $t('m.putTime') : '新车实施日期'" :label="(selectIndex === 'stand'||'bussstand') && selectIndex !== 'laws' ? $t('m.putTime') : '新车实施日期'"
width="130"> min-width="12%">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="selectIndex === 'stand' || selectIndex === 'bussstand' ? (scope.row.SSRQ !== null && scope.row.SSRQ !== undefined && scope.row.SSRQ !== '') <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 !== ''))"> : (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))">
{{ $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") }} {{ dateFormat2((selectIndex === 'stand' || (selectIndex === 'bussstand' && scope.row.standType === 'FOREIGN')) ? scope.row.SSRQ : (selectIndex === 'laws' ? scope.row.XCXSSRQLAWS :scope.row.putTime)) | ellipsis }}
</div> </div>
<div v-else></div> <div v-else></div>
</template> </template>
@@ -125,7 +129,7 @@
v-if="selectIndex !== 'msgdyinfo'" v-if="selectIndex !== 'msgdyinfo'"
align="center" align="center"
:label="selectIndex === 'stand'||'bussstand' ? $t('m.standStateShow') : (selectIndex === 'laws' ? $t('m.fileStatus') : $t('m.enterpriseStandardStatus'))" :label="selectIndex === 'stand'||'bussstand' ? $t('m.standStateShow') : (selectIndex === 'laws' ? $t('m.fileStatus') : $t('m.enterpriseStandardStatus'))"
width="200"> min-width="12%">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span v-if="selectIndex === 'laws'">{{ getLawsState(scope.row.statecode) }}</span>--> <!-- <span v-if="selectIndex === 'laws'">{{ getLawsState(scope.row.statecode) }}</span>-->
<div :class="selectIndex === 'enterprise' || selectIndex === 'laws' ? (scope.row.textStatusBussName === '参考' ? 'yellowClass' : <div :class="selectIndex === 'enterprise' || selectIndex === 'laws' ? (scope.row.textStatusBussName === '参考' ? 'yellowClass' :
@@ -324,6 +328,15 @@
import {dateFormat} from '@/common/date' import {dateFormat} from '@/common/date'
export default { export default {
name: 'StandardSearch', name: 'StandardSearch',
filters: {
ellipsis (value) {
if (!value) return ''
if (value.length > 10) {
return value.slice(0,11) + '...'
}
return value
}
},
data () { data () {
return { return {
itermsConditionsTitle1: '', itermsConditionsTitle1: '',
@@ -366,7 +379,7 @@
}, },
seniortypeAll: ['selectIndex'], seniortypeAll: ['selectIndex'],
seniortypeStand: ['selectIndex', 'standSort', 'category', 'nature', 'standState', 'applyArctic', 'applyAuth', 'CLLX', 'CBCD', 'ZRLX', 'CYSD','NYLX','NYLXCLASS'], 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', 'country', 'SYCLLX', 'ZRLX', 'WSSFCY'], // 政策的适用车辆类型、我司是否参与 和 国内的字段不一样
seniortypeLaws: ['selectIndex', 'lawsSyqy', 'lawsSycx', 'CYSDLAWS'], // 政策的适用车辆类型、我司是否参与 和 国内的字段不一样 seniortypeLaws: ['selectIndex', 'lawsSyqy', 'lawsSycx', 'CYSDLAWS'], // 政策的适用车辆类型、我司是否参与 和 国内的字段不一样
seniortypeEnterprise : ['selectIndex','standSort','CLLX','BUSSSTATE','ORGLIST','NYLXCLASS','NYLX'], seniortypeEnterprise : ['selectIndex','standSort','CLLX','BUSSSTATE','ORGLIST','NYLXCLASS','NYLX'],
@@ -942,8 +955,10 @@
renameType = seniortype[i] renameType = seniortype[i]
} }
let resultsubdata = resultdata[renameType] || {} let resultsubdata = resultdata[renameType] || {}
console.log(resultsubdata)
let countAll = 0 let countAll = 0
if (nowdata) { if (nowdata) {
console.log(nowdata)
for (let ji = 0; ji < nowdata.length; ji++) { for (let ji = 0; ji < nowdata.length; ji++) {
if (resultsubdata[nowdata[ji].value] === undefined) { if (resultsubdata[nowdata[ji].value] === undefined) {
nowdata[ji].number = 0 nowdata[ji].number = 0
@@ -1100,6 +1115,7 @@
case 'NYLXCLASS': case 'NYLXCLASS':
option.title = '能源类型' option.title = '能源类型'
option.index = 19 option.index = 19
break
} }
if(key === 'STANDCLASSIFY'){ if(key === 'STANDCLASSIFY'){
const standVerify = ["GB","GB/T","QC/T","JT","JB","GA","GJB","HJ"]; const standVerify = ["GB","GB/T","QC/T","JT","JB","GA","GJB","HJ"];
@@ -1163,6 +1179,7 @@
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let filterOptions = {} let filterOptions = {}
let originOptions = this.searchOriginOptions let originOptions = this.searchOriginOptions
console.log(originOptions)
filterOptions.selectIndex = originOptions.selectIndex filterOptions.selectIndex = originOptions.selectIndex
switch (resType) { switch (resType) {
case 'stand': case 'stand':
@@ -2533,6 +2550,19 @@
}, },
//时间处理 //时间处理
dateFormat2(str){ 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) return dateFormat(str)
}, },