Merge branch 'dev-wangyiming'
# Conflicts: # src/views/equip/detail.vue
This commit is contained in:
commit
4f927df3f4
|
|
@ -3,7 +3,7 @@
|
||||||
border
|
border
|
||||||
:header-cell-class-name="headerClassName"
|
:header-cell-class-name="headerClassName"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column label="装备" min-width="200" >
|
<el-table-column label="装备" min-width="210" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="equipData">
|
<div class="equipData">
|
||||||
<div class="name">
|
<div class="name">
|
||||||
|
|
@ -27,12 +27,12 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="租金" min-width="120" >
|
<el-table-column prop="name" label="租金" min-width="80" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.price }}/{{ scope.row.unit }}
|
{{ scope.row.price }}{{ scope.row.unit }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="company" label="供应商" min-width="180" />
|
<el-table-column prop="company" label="供应商" min-width="120" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
:key="i"
|
:key="i"
|
||||||
:url="v.picUrl"
|
:url="v.picUrl"
|
||||||
:company="v.companyName"
|
:company="v.companyName"
|
||||||
:tags="[v.maStatus,v.city || '合肥市']"
|
:tags="[v.maStatusStr,v.city || '合肥市']"
|
||||||
:name="`${v.modelName}${v.deviceName}`"
|
:name="`${v.modelName}${v.deviceName}`"
|
||||||
:price="v.monthLeasePrice"
|
:price="v.monthLeasePrice"
|
||||||
:id="v.maId"
|
:id="v.maId"
|
||||||
|
|
@ -292,6 +292,9 @@ const handleClose = (tag, index) => {
|
||||||
screenChooseList[tag.parentIndex].select.splice(tag.index)
|
screenChooseList[tag.parentIndex].select.splice(tag.index)
|
||||||
screenChooseList[tag.parentIndex].index = tag.index
|
screenChooseList[tag.parentIndex].index = tag.index
|
||||||
|
|
||||||
|
const data = JSON.parse(JSON.stringify(screenChooseList[tag.parentIndex].select))
|
||||||
|
|
||||||
|
getTypeData( data.pop()?.typeId || '' )
|
||||||
getData()
|
getData()
|
||||||
}
|
}
|
||||||
//清除所有标签
|
//清除所有标签
|
||||||
|
|
@ -323,7 +326,6 @@ const selectScreen = (parentIndex, val, index) => {
|
||||||
)
|
)
|
||||||
screenChooseList[parentIndex].index++
|
screenChooseList[parentIndex].index++
|
||||||
|
|
||||||
|
|
||||||
getData()
|
getData()
|
||||||
|
|
||||||
if (screenChooseList[parentIndex].index == screenChooseList[parentIndex].list.length) {
|
if (screenChooseList[parentIndex].index == screenChooseList[parentIndex].list.length) {
|
||||||
|
|
@ -374,6 +376,8 @@ const getTypeData = async (typeId = null) => {
|
||||||
if (typeId) {
|
if (typeId) {
|
||||||
params = {typeId}
|
params = {typeId}
|
||||||
}
|
}
|
||||||
|
const index = screenChooseList.findIndex(key => key.name == 'type')
|
||||||
|
screenChooseList[index].list[screenChooseList[index].index].select = []
|
||||||
const res = await apiGetEquipTypeList(params)
|
const res = await apiGetEquipTypeList(params)
|
||||||
const list = res.rows.map(
|
const list = res.rows.map(
|
||||||
item => {
|
item => {
|
||||||
|
|
@ -384,9 +388,10 @@ const getTypeData = async (typeId = null) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const index = screenChooseList.findIndex(key => key.name == 'type')
|
|
||||||
|
|
||||||
|
|
||||||
screenChooseList[index].list[screenChooseList[index].index].select = list
|
screenChooseList[index].list[screenChooseList[index].index].select = list
|
||||||
console.log('getTypeData ===============', list)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取列表
|
//获取列表
|
||||||
|
|
@ -446,7 +451,7 @@ const getData = async (text = '') => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getParams = () => {
|
const getParams = () => {
|
||||||
const paramsKey = ['keyWord']
|
const paramsKey = ['keyWord','typeTag']
|
||||||
let params = {}
|
let params = {}
|
||||||
paramsKey.forEach(key => {
|
paramsKey.forEach(key => {
|
||||||
if (history.state[key]) {
|
if (history.state[key]) {
|
||||||
|
|
@ -458,13 +463,33 @@ const getParams = () => {
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
const params = getParams()
|
const params = getParams()
|
||||||
if (params && params.keyWord) {
|
if (params) {
|
||||||
$bus.emit('callBackText', params.keyWord)
|
if(params.keyWord){
|
||||||
$bus.off('callBackText')
|
$bus.emit('callBackText', params.keyWord)
|
||||||
|
$bus.off('callBackText')
|
||||||
|
}
|
||||||
|
if(params.typeTag){
|
||||||
|
const index = screenChooseList.findIndex(key => key.name == 'type')
|
||||||
|
const data = params.typeTag.map((key,i) => {
|
||||||
|
return{
|
||||||
|
...key,
|
||||||
|
name:key.typeName,
|
||||||
|
index:i,
|
||||||
|
parentIndex:index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
screenChooseList[index].select = data
|
||||||
|
screenChooseList[index].index = data.length
|
||||||
|
}else {
|
||||||
|
getTypeData()
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
getTypeData()
|
||||||
}
|
}
|
||||||
getTypeData()
|
|
||||||
|
|
||||||
getAddressData()
|
getAddressData()
|
||||||
getData()
|
getData(params.keyWord || '')
|
||||||
}
|
}
|
||||||
init()
|
init()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,172 +18,19 @@
|
||||||
|
|
||||||
getGoodsClassList()
|
getGoodsClassList()
|
||||||
|
|
||||||
|
const handlerGoodsDetails = (...arg) => {
|
||||||
|
const arr = arg.map((key,index) => {
|
||||||
|
return {
|
||||||
|
level: index + 1 + '',
|
||||||
|
typeId:key.id,
|
||||||
|
typeName:key.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// [
|
router.push({
|
||||||
// {
|
name:'equipList',
|
||||||
// name: '全部商品',
|
state:{ typeTag:arr }
|
||||||
// children: [
|
})
|
||||||
// {
|
|
||||||
// title: '挖掘机',
|
|
||||||
// children: [
|
|
||||||
// { goodsName: '履带挖掘机' },
|
|
||||||
// { goodsName: '履带挖掘机' },
|
|
||||||
// { goodsName: '履带挖掘机' },
|
|
||||||
// { goodsName: '履带挖掘机' },
|
|
||||||
// { goodsName: '履带挖掘机' },
|
|
||||||
// { goodsName: '履带挖掘机' }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '开沟机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '斗轮挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '挖掘机',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// title: '挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '开沟机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '斗轮挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '土方机械',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// title: '挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '开沟机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '斗轮挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '工程起重机械',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// title: '挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '开沟机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '斗轮挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '动力设备',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// title: '挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '开沟机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '斗轮挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '压实机械',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// title: '挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '开沟机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '斗轮挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '路桥机械',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// title: '挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '开沟机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '斗轮挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '混凝土机械',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// title: '挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '开沟机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '斗轮挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: '桩工机械',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// title: '挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '开沟机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '斗轮挖掘机',
|
|
||||||
// children: [{ goodsName: '履带挖掘机' }]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
const handlerGoodsDetails = () => {
|
|
||||||
console.log('去往商品详情页')
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const detailsList = ref([
|
const detailsList = ref([
|
||||||
|
|
@ -243,7 +90,7 @@
|
||||||
<a
|
<a
|
||||||
v-for="son in child.children"
|
v-for="son in child.children"
|
||||||
:key="son.id"
|
:key="son.id"
|
||||||
@click="handlerGoodsDetails">
|
@click="handlerGoodsDetails(item,child,son)">
|
||||||
{{ son.name }}
|
{{ son.name }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue