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