|
|
@ -3,11 +3,10 @@ |
|
|
|
<!--Start 列表页面--> |
|
|
|
<div v-show="viewState == 5"> |
|
|
|
<div class="tab-header webtop"> |
|
|
|
<div>常用配置管理</div> |
|
|
|
<div>常用配置关联车型</div> |
|
|
|
<div> |
|
|
|
<el-button type="danger" size="small" @click="handleDelete()">解除关系</el-button> |
|
|
|
<el-button type="danger" size="small" @click="handleOpen()">进入车型详情</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleDelete()">解除关联</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="searchcon"> |
|
|
@ -15,179 +14,65 @@ |
|
|
|
<div v-show="isSearchShow" class="search"> |
|
|
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|
|
|
<el-form-item label="品牌"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.carBrand" |
|
|
|
placeholder="请选择" |
|
|
|
filterable |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in carBrand_list" |
|
|
|
:key="item.sid" |
|
|
|
:label="item.brandName" |
|
|
|
:value="item.brandName" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.carBrand" placeholder="请选择" filterable clearable class="addinputw"> |
|
|
|
<el-option v-for="item in carBrand_list" :key="item.sid" :label="item.brandName" :value="item.sid"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="功能"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.vehicleFunctionKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in vehicleFunction_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.vehicleType" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in vehicleFunction_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="系列"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.seriesKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in series_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.productLine" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in series_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="驱动"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.driveFormKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in driveForm_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.driveForm" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in driveForm_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="马力"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.powerKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in power_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.power" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in power_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="版本"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.vehicleVersionKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in vehicleVersion_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.vehicleVersion" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in vehicleVersion_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="燃料"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.fuelTypeKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in fuelType_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.fuelType" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in fuelType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="变速箱"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.gearboxTypeKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in gearboxType_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.gearboxType" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in gearboxType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="排放标准"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.emissionStandardKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in emissionStandard_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.emissionStandard" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in emissionStandard_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="发动机型号"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.engineTypeKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in engineType_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.engineType" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in engineType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="细分市场"> |
|
|
|
<el-select |
|
|
|
v-model="listQuery.params.marketSegmentsKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="addinputw" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in marketSegments_list" |
|
|
|
:key="item.dictKey" |
|
|
|
:label="item.dictValue" |
|
|
|
:value="item.dictKey" |
|
|
|
/> |
|
|
|
<el-select v-model="listQuery.params.marketSegments" placeholder="请选择" clearable class="addinputw"> |
|
|
|
<el-option v-for="item in marketSegments_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="车型编码"> |
|
|
|
<el-input v-model="listQuery.params.otherConfig" maxlength="125" placeholder="请输入车型编码" class="addinputw" |
|
|
|
clearable/> |
|
|
|
<el-input v-model="listQuery.params.vehicleTypeCode" maxlength="125" placeholder="请输入车型编码" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="规格型号"> |
|
|
|
<el-input v-model="listQuery.params.specifications" maxlength="125" placeholder="请输入规格型号" |
|
|
|
class="addinputw" |
|
|
|
clearable/> |
|
|
|
<el-input v-model="listQuery.params.specifications" maxlength="125" placeholder="请输入规格型号" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
<el-divider/> |
|
|
|
<div class="btn" style="text-align: center;"> |
|
|
@ -198,46 +83,43 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="listtop"> |
|
|
|
<div class="tit">常用配置列表</div> |
|
|
|
<pageye v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
|
|
class="pagination" @pagination="getList"/> |
|
|
|
<div class="tit">关联车型信息列表</div> |
|
|
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
|
</div> |
|
|
|
<div class=""> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column width="50px" type="selection" align="center"/> |
|
|
|
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/> |
|
|
|
<el-table-column label="品牌" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.state }}</span> |
|
|
|
<span>{{ scope.row.brandName }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="车型" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.state }}</span> |
|
|
|
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.modelName }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="版本" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.carColor }}</span> |
|
|
|
<span>{{ scope.row.vehicleVersion }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="发动机型号" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.slowMachine }}</span> |
|
|
|
<span>{{ scope.row.engineTypeValue }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="车型编码" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.rearViewMirror }}</span> |
|
|
|
<span>{{ scope.row.vehicleTypeCode }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="pages"> |
|
|
|
<!-- 翻页 --> |
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
|
|
class="pagination" @pagination="getList"/> |
|
|
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!--End 列表页面--> |
|
|
@ -246,333 +128,337 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { pullDown, brandDown } from '@/api/cheliang/basemodelrelationconfigure' |
|
|
|
import changyongpeizhiInfo from './changyongpeizhiInfo' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import { namesDown } from '../../../../api/cheliang/basevehicle' |
|
|
|
import { pullDown, brandDown, selectVehModelByConfigSid } from '@/api/cheliang/basevehiclemodel' |
|
|
|
import { deleteRel } from '@/api/cheliang/basemodelconfig' |
|
|
|
import changyongpeizhiInfo from './changyongpeizhiInfo' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'changyongpeizhiRel', |
|
|
|
components: { |
|
|
|
changyongpeizhiInfo, |
|
|
|
Pagination, |
|
|
|
pageye |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
viewState: 5, |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
|
index: 0, |
|
|
|
// 查询 ----------- |
|
|
|
tableKey: 0, |
|
|
|
list: [], |
|
|
|
namesArr: '', |
|
|
|
vehicleSid: '', |
|
|
|
total: 1, |
|
|
|
// list ------ |
|
|
|
carBrand_list: [], // 品牌 |
|
|
|
vehicleFunction_list: [], // 功能 vehicleFunction |
|
|
|
series_list: [], // 系列 series |
|
|
|
driveForm_list: [], // 驱动 driver |
|
|
|
power_list: [], // 马力 horsepower |
|
|
|
vehicleVersion_list: [], // 版本 vehicleVersion |
|
|
|
fuelType_list: [], // 燃料 fuelType |
|
|
|
gearboxType_list: [], // 变速箱 gearbox |
|
|
|
emissionStandard_list: [],// 排放标准 emissionStandard |
|
|
|
engineType_list: [], // 发动机型号 engineType |
|
|
|
marketSegments_list: [], // 细分市场 marketSegments |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
|
params: {}, |
|
|
|
current: 1, |
|
|
|
size: 20 |
|
|
|
}, |
|
|
|
temp: {}, // 添加和修改 |
|
|
|
textMap: { |
|
|
|
update: '编辑', |
|
|
|
create: '创建' |
|
|
|
}, |
|
|
|
sids: [], |
|
|
|
names: '', // [ {{names}} ] |
|
|
|
chesid: '', |
|
|
|
dialogFormVisible: false, // 添加修改对话框状态 |
|
|
|
dialogFormShowVisible: false, // 查看对话框默认关闭状态 |
|
|
|
dialogStatus: '', // 对话框状态 |
|
|
|
tureArrys: [{ |
|
|
|
value: 1, |
|
|
|
label: '是' |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: 0, |
|
|
|
label: '否' |
|
|
|
} |
|
|
|
], |
|
|
|
fenzuOptions: [{ |
|
|
|
value: '1', |
|
|
|
label: '单位' |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: '2', |
|
|
|
label: '个人' |
|
|
|
} |
|
|
|
] |
|
|
|
// ------------------------------------ |
|
|
|
export default { |
|
|
|
name: 'changyongpeizhiRel', |
|
|
|
components: { |
|
|
|
changyongpeizhiInfo, |
|
|
|
Pagination, |
|
|
|
pageye |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
viewState: 5, |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
|
index: 0, |
|
|
|
// 查询 ----------- |
|
|
|
tableKey: 0, |
|
|
|
list: [], |
|
|
|
// list ------ |
|
|
|
carBrand_list: [], // 品牌 |
|
|
|
vehicleFunction_list: [], // 功能 vehicleFunction |
|
|
|
series_list: [], // 系列 series |
|
|
|
driveForm_list: [], // 驱动 driver |
|
|
|
power_list: [], // 马力 horsepower |
|
|
|
vehicleVersion_list: [], // 版本 vehicleVersion |
|
|
|
fuelType_list: [], // 燃料 fuelType |
|
|
|
gearboxType_list: [], // 变速箱 gearbox |
|
|
|
emissionStandard_list: [], // 排放标准 emissionStandard |
|
|
|
engineType_list: [], // 发动机型号 engineType |
|
|
|
marketSegments_list: [], // 细分市场 marketSegments |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
configSid: '', |
|
|
|
carBrand: '', |
|
|
|
vehicleType: '', |
|
|
|
productLine: '', |
|
|
|
driveForm: '', |
|
|
|
power: '', |
|
|
|
vehicleVersion: '', |
|
|
|
fuelType: '', |
|
|
|
vehicleTypeCode: '', |
|
|
|
gearboxType: '', |
|
|
|
emissionStandard: '', |
|
|
|
engineType: '', |
|
|
|
marketSegments: '', |
|
|
|
specifications: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
sids: [], |
|
|
|
sid: '', |
|
|
|
configSid_list: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getList() // 加载列表 |
|
|
|
this.getType() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters([ |
|
|
|
'id', |
|
|
|
'roles', |
|
|
|
'rolesIds', |
|
|
|
'departmentId', |
|
|
|
'departmentCode' |
|
|
|
]) |
|
|
|
init(sid) { |
|
|
|
this.sid = sid |
|
|
|
this.listQuery.params.configSid = sid |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
getType() { |
|
|
|
// 下拉框-品牌 |
|
|
|
brandDown(this.listQuery.params.carBrand).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.carBrand_list = res.data |
|
|
|
console.log('下拉框请求品牌', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-功能 |
|
|
|
pullDown({ |
|
|
|
type: 'vehicleFunction' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.vehicleFunction_list = res.data |
|
|
|
console.log('下拉框请求功能', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-系列 |
|
|
|
pullDown({ |
|
|
|
type: 'series' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.series_list = res.data |
|
|
|
console.log('下拉框请求系列', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-驱动 |
|
|
|
pullDown({ |
|
|
|
type: 'driver' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.driveForm_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-马力 |
|
|
|
pullDown({ |
|
|
|
type: 'horsepower' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.power_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-版本 |
|
|
|
pullDown({ |
|
|
|
type: 'vehicleVersion' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.vehicleVersion_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-燃料 |
|
|
|
pullDown({ |
|
|
|
type: 'fuelType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.fuelType_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-变速箱 |
|
|
|
pullDown({ |
|
|
|
type: 'gearbox' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.gearboxType_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-排放标准 |
|
|
|
pullDown({ |
|
|
|
type: 'emissionStandard' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.emissionStandard_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-发动机型号 |
|
|
|
pullDown({ |
|
|
|
type: 'engineType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.engineType_list = res.data |
|
|
|
console.log('下拉框请求发动机型号', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-细分市场 |
|
|
|
pullDown({ |
|
|
|
type: 'marketSegments' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.marketSegments_list = res.data |
|
|
|
console.log('下拉框请求发动机型号', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleReturn() { |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getList() // 加载列表 |
|
|
|
this.getType() |
|
|
|
resetState() { |
|
|
|
this.viewState = 5 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
let bb = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
bb.push({ |
|
|
|
modelSid: element.sid, |
|
|
|
configurationItemsSid: element.configSid |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
this.configSid_list = bb |
|
|
|
console.log('选择的数据', this.sids) |
|
|
|
}, |
|
|
|
// 查询列表信息 |
|
|
|
getList() { |
|
|
|
this.listLoading = true |
|
|
|
selectVehModelByConfigSid(this.listQuery).then((response) => { |
|
|
|
this.listLoading = false |
|
|
|
if ( |
|
|
|
response.code === '200' && |
|
|
|
response.data && |
|
|
|
response.data.total > 0 |
|
|
|
) { |
|
|
|
this.list = response.data.records |
|
|
|
this.total = response.data.total |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
this.list = [] |
|
|
|
this.total = 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
init() { |
|
|
|
var name = this.$store.state.modelName |
|
|
|
console.log('789988888', name) |
|
|
|
this.names = name |
|
|
|
console.log('9639636', this.names) |
|
|
|
}, |
|
|
|
getType() { |
|
|
|
// 下拉框-品牌 |
|
|
|
brandDown(this.listQuery.params.carBrand).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.carBrand_list = res.data |
|
|
|
console.log('下拉框请求品牌', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-功能 |
|
|
|
pullDown({ |
|
|
|
type: 'vehicleFunction' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.vehicleFunction_list = res.data |
|
|
|
console.log('下拉框请求功能', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-系列 |
|
|
|
pullDown({ |
|
|
|
type: 'series' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.series_list = res.data |
|
|
|
console.log('下拉框请求系列', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-驱动 |
|
|
|
pullDown({ |
|
|
|
type: 'driver' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.driveForm_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-马力 |
|
|
|
pullDown({ |
|
|
|
type: 'horsepower' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.power_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-版本 |
|
|
|
pullDown({ |
|
|
|
type: 'vehicleVersion' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.vehicleVersion_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-燃料 |
|
|
|
pullDown({ |
|
|
|
type: 'fuelType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.fuelType_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-变速箱 |
|
|
|
pullDown({ |
|
|
|
type: 'gearbox' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.gearboxType_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-排放标准 |
|
|
|
pullDown({ |
|
|
|
type: 'emissionStandard' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.emissionStandard_list = res.data |
|
|
|
console.log('下拉框请求驱动', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-发动机型号 |
|
|
|
pullDown({ |
|
|
|
type: 'engineType' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.engineType_list = res.data |
|
|
|
console.log('下拉框请求发动机型号', res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
// 下拉框-细分市场 |
|
|
|
pullDown({ |
|
|
|
type: 'marketSegments' |
|
|
|
}).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.marketSegments_list = res.data |
|
|
|
console.log('下拉框请求发动机型号', res.data) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询按钮 |
|
|
|
handleFilter() { |
|
|
|
this.listQuery.current = 1 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 重置 |
|
|
|
resetQuery() { |
|
|
|
this.listQuery = { |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
configSid: this.sid, |
|
|
|
carBrand: '', |
|
|
|
vehicleType: '', |
|
|
|
productLine: '', |
|
|
|
driveForm: '', |
|
|
|
power: '', |
|
|
|
vehicleVersion: '', |
|
|
|
fuelType: '', |
|
|
|
vehicleTypeCode: '', |
|
|
|
gearboxType: '', |
|
|
|
emissionStandard: '', |
|
|
|
engineType: '', |
|
|
|
marketSegments: '', |
|
|
|
specifications: '' |
|
|
|
} |
|
|
|
} |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 打开查看 |
|
|
|
handleCheck(row) { |
|
|
|
console.log('111', row) |
|
|
|
this.viewState = 6 |
|
|
|
const sid = row.sid |
|
|
|
this.$refs['divinfo'].showInfo(sid, row) |
|
|
|
}, |
|
|
|
// 进入车型详情 |
|
|
|
handleOpen() { |
|
|
|
this.viewState = 6 |
|
|
|
}, |
|
|
|
// 根据本行ID删除数据 |
|
|
|
handleDelete() { |
|
|
|
console.log('删除', this.sids) |
|
|
|
if (this.configSid_list.length > 0) { |
|
|
|
deleteRel(this.configSid_list).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '解除关联成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '失败', |
|
|
|
message: response.msg, |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleReturn() { |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
resetState() { |
|
|
|
this.viewState = 5 |
|
|
|
}, |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择车型配置!!', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
console.log('选择的数据', this.sids) |
|
|
|
}, |
|
|
|
// 查询列表信息 |
|
|
|
getList() { |
|
|
|
this.listLoading = true |
|
|
|
// pagerList(this.listQuery).then((response) => { |
|
|
|
// this.listLoading = false |
|
|
|
// if ( |
|
|
|
// response.code === '200' && |
|
|
|
// response.data && |
|
|
|
// response.data.total > 0 |
|
|
|
// ) { |
|
|
|
// this.list = response.data.records |
|
|
|
// this.total = response.data.total |
|
|
|
// } else { |
|
|
|
// this.list = [] |
|
|
|
// this.total = 0 |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 查询按钮 |
|
|
|
handleFilter() { |
|
|
|
this.listQuery.current = 1 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 重置 |
|
|
|
resetQuery() { |
|
|
|
this.listQuery.params = {} |
|
|
|
}, |
|
|
|
|
|
|
|
// ----------------------------------方法-------------------- |
|
|
|
// 添加前数据初始化 |
|
|
|
resetTemp() { |
|
|
|
this.temp = {} |
|
|
|
}, |
|
|
|
// 打开查看 |
|
|
|
handleCheck(row) { |
|
|
|
console.log('111', row) |
|
|
|
this.viewState = 6 |
|
|
|
const sid = row.sid |
|
|
|
this.$refs['divinfo'].showInfo(sid, row) |
|
|
|
}, |
|
|
|
// 进入车型详情 |
|
|
|
handleOpen() { |
|
|
|
this.viewState = 6 |
|
|
|
}, |
|
|
|
// 根据本行ID删除数据 |
|
|
|
handleDelete() { |
|
|
|
console.log('删除', this.sids) |
|
|
|
if (this.sids.length > 0) { |
|
|
|
// deleteBySids(this.sids).then((response) => { |
|
|
|
// if (response.code === '200') { |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '删除成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// this.getList() |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '失败', |
|
|
|
// message: response.msg, |
|
|
|
// type: 'error' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择车型配置!!', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
/deep/ .el-collapse { |
|
|
|
border-top: 0px solid #e6ebf5; |
|
|
|
border-bottom: 0px solid #e6ebf5; |
|
|
|
} |
|
|
|
/deep/ .el-collapse { |
|
|
|
border-top: 0px solid #e6ebf5; |
|
|
|
border-bottom: 0px solid #e6ebf5; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-collapse-item__content { |
|
|
|
margin: 0; |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
/deep/ .el-collapse-item__content { |
|
|
|
margin: 0; |
|
|
|
padding: 0; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-collapse-item__wrap { |
|
|
|
border-bottom: 0px solid #ebeef5; |
|
|
|
} |
|
|
|
/deep/ .el-collapse-item__wrap { |
|
|
|
border-bottom: 0px solid #ebeef5; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-collapse-item__header { |
|
|
|
border-bottom: 0px solid #e6ebf5; |
|
|
|
} |
|
|
|
/deep/ .el-collapse-item__header { |
|
|
|
border-bottom: 0px solid #e6ebf5; |
|
|
|
} |
|
|
|
.listtop { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
border: 1px solid #dfe4ed; |
|
|
|
height: 40px; |
|
|
|
} |
|
|
|
.tit { |
|
|
|
margin-bottom: -10px; |
|
|
|
} |
|
|
|
|
|
|
|
.searchli { |
|
|
|
padding: 5px 100px; |
|
|
|
} |
|
|
|
.pagination { |
|
|
|
margin-bottom: -10px; |
|
|
|
} |
|
|
|
</style> |
|
|
|