This commit is contained in:
parent
e402fd0d31
commit
9d52c12e04
|
|
@ -26,6 +26,9 @@ declare module 'vue' {
|
||||||
ElCountdown: typeof import('element-plus/es')['ElCountdown']
|
ElCountdown: typeof import('element-plus/es')['ElCountdown']
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
|
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||||
|
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||||
|
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@
|
||||||
<div style="margin: 10px 0; padding-right: 15px; text-align: right">
|
<div style="margin: 10px 0; padding-right: 15px; text-align: right">
|
||||||
<span style="text-align: right; color: #ff4800" v-if="isShowPrice">
|
<span style="text-align: right; color: #ff4800" v-if="isShowPrice">
|
||||||
<i style="font-size: 14px">¥</i>
|
<i style="font-size: 14px">¥</i>
|
||||||
<i style="margin: 0 6px; font-size: 18px; font-weight: bold">{{ price }}</i>
|
<i style="margin: 0 6px; font-size: 18px; font-weight: bold">{{ price == 0 ? '电话商议' : price }}</i>
|
||||||
<i style="font-size: 14px">/ 天</i>
|
<i v-if="price > 0" style="font-size: 14px">/ 天</i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ import { get, post } from '../../index'
|
||||||
|
|
||||||
// 登录接口 - 调试使用 - 产线环境需注释
|
// 登录接口 - 调试使用 - 产线环境需注释
|
||||||
export const loginApi = (data: any) => {
|
export const loginApi = (data: any) => {
|
||||||
return false
|
// return false
|
||||||
// return post('/auth/login', data)
|
return post('/auth/login', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
|
<div class="label">综合排序:</div>
|
||||||
<div
|
<div
|
||||||
class="item"
|
class="item"
|
||||||
@click="changeOption(v)"
|
@click="changeOption(v)"
|
||||||
|
|
@ -67,7 +68,19 @@
|
||||||
v-for="(v, i) in screenOptionList"
|
v-for="(v, i) in screenOptionList"
|
||||||
:key="i"
|
:key="i"
|
||||||
>
|
>
|
||||||
{{ v.name }}
|
<span>
|
||||||
|
<el-dropdown @command="(command) => changeDropdown(command, v)">
|
||||||
|
<span class="dropdown-trigger" :class="v.id == optionActive && 'active'">
|
||||||
|
{{ v.name }}
|
||||||
|
</span>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item command="ASC">正序</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="DESC">倒序</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
</span>
|
||||||
<template v-if="v.sort">
|
<template v-if="v.sort">
|
||||||
<el-icon class="icon" v-show="v.sort == 'DESC'">
|
<el-icon class="icon" v-show="v.sort == 'DESC'">
|
||||||
<CaretBottom />
|
<CaretBottom />
|
||||||
|
|
@ -157,7 +170,7 @@ import {
|
||||||
import { getCompanyListApi, getGoodsClassListApi } from 'http/api/home'
|
import { getCompanyListApi, getGoodsClassListApi } from 'http/api/home'
|
||||||
import $bus from '@/utils/bus'
|
import $bus from '@/utils/bus'
|
||||||
import NavMenu from '@/components/Navmenu/index.vue'
|
import NavMenu from '@/components/Navmenu/index.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage, ElDropdown, ElDropdownItem, ElDropdownMenu } from 'element-plus'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route: any = useRoute()
|
const route: any = useRoute()
|
||||||
|
|
@ -166,6 +179,7 @@ const endPrice: any = ref(0)
|
||||||
const levelList = ref<any>([{ title: '一级分类' }, { title: '二级分类' }])
|
const levelList = ref<any>([{ title: '一级分类' }, { title: '二级分类' }])
|
||||||
const levelList_2 = ref<any>([{ title: '一级分类' }, { title: '二级分类' }, { title: '三级分类' }])
|
const levelList_2 = ref<any>([{ title: '一级分类' }, { title: '二级分类' }, { title: '三级分类' }])
|
||||||
let currentIndex = route.query.level || null
|
let currentIndex = route.query.level || null
|
||||||
|
const dropdown = ref()
|
||||||
|
|
||||||
const onConfirmPrice = () => {
|
const onConfirmPrice = () => {
|
||||||
ElMessage.closeAll()
|
ElMessage.closeAll()
|
||||||
|
|
@ -286,7 +300,7 @@ const screenChooseList: any = reactive([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'companyId',
|
type: 'companyId',
|
||||||
name: '所属公司',
|
name: '所属公司:',
|
||||||
isShow: true,
|
isShow: true,
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
|
|
@ -321,19 +335,19 @@ const screenTags = computed(() => {
|
||||||
})
|
})
|
||||||
// 综合排序 更新时间 月租金 排序按钮
|
// 综合排序 更新时间 月租金 排序按钮
|
||||||
const screenOptionList: any = reactive([
|
const screenOptionList: any = reactive([
|
||||||
{
|
// {
|
||||||
name: '综合排序',
|
// name: '综合排序',
|
||||||
id: 0,
|
// id: 0,
|
||||||
sort: '',
|
// sort: '',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '共享剩余时间',
|
// name: '共享剩余时间',
|
||||||
id: 1,
|
// id: 1,
|
||||||
sort: 'DESC',
|
// sort: 'DESC',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: '上架时间',
|
name: '上架时间',
|
||||||
id: 2,
|
id: 0,
|
||||||
sort: 'DESC', //desc or desc
|
sort: 'DESC', //desc or desc
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
@ -426,9 +440,9 @@ const getDeviceListData = async (params: any = null, keyWord: any = null) => {
|
||||||
toolType: '',
|
toolType: '',
|
||||||
level: '',
|
level: '',
|
||||||
maStatus: 2,
|
maStatus: 2,
|
||||||
dayLeasePriceOrderBy:
|
// dayLeasePriceOrderBy:
|
||||||
optionActive.value == 1 ? screenOptionList[optionActive.value].sort : '',
|
// optionActive.value == 1 ? screenOptionList[optionActive.value].sort : '',
|
||||||
updateTimeOrderBy: optionActive.value == 2 ? screenOptionList[optionActive.value].sort : '',
|
updateTimeOrderBy: optionActive.value == 0 ? screenOptionList[0].sort : '',
|
||||||
}
|
}
|
||||||
|
|
||||||
screenChooseList.forEach((e: any, index: number) => {
|
screenChooseList.forEach((e: any, index: number) => {
|
||||||
|
|
@ -549,13 +563,19 @@ const handleClose = (tag: any) => {
|
||||||
|
|
||||||
// 排序操作
|
// 排序操作
|
||||||
const changeOption = (val: any) => {
|
const changeOption = (val: any) => {
|
||||||
if (val.sort && optionActive.value == val.id) {
|
console.log('🚀 ~ changeOption ~ val:', val)
|
||||||
val.sort = val.sort == 'ASC' ? 'DESC' : 'ASC'
|
// optionActive.value = val.id
|
||||||
}
|
// if (val.sort && optionActive.value == val.id && val.id == 0) {
|
||||||
|
// val.sort = val.sort == 'ASC' ? 'DESC' : 'ASC'
|
||||||
console.log(screenOptionList, 'screenOptionList')
|
// getDeviceListData()
|
||||||
optionActive.value = val.id
|
// }
|
||||||
getDeviceListData()
|
}
|
||||||
|
const changeDropdown = (sort: any, val: any) => {
|
||||||
|
optionActive.value = 0
|
||||||
|
val.sort = val.sort == 'ASC' ? 'DESC' : 'ASC'
|
||||||
|
setTimeout(() => {
|
||||||
|
getDeviceListData()
|
||||||
|
}, 200)
|
||||||
}
|
}
|
||||||
|
|
||||||
//选中后添加到 大类中的select字段
|
//选中后添加到 大类中的select字段
|
||||||
|
|
@ -750,11 +770,13 @@ const onHandleDetails = (row: any) => {
|
||||||
.line {
|
.line {
|
||||||
padding: 14px 0;
|
padding: 14px 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
// border-bottom: 1px solid #dddddd;
|
// border-bottom: 1px solid #dddddd;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
// width: 100px;
|
// width: 100px;
|
||||||
|
padding-top: 2px;
|
||||||
|
line-height: 25px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
// padding: 0 15px;
|
// padding: 0 15px;
|
||||||
|
|
@ -890,4 +912,14 @@ const onHandleDetails = (row: any) => {
|
||||||
background-color: #2fa18f !important;
|
background-color: #2fa18f !important;
|
||||||
border-color: #2fa18f !important;
|
border-color: #2fa18f !important;
|
||||||
}
|
}
|
||||||
|
.dropdown-trigger {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 去掉 hover / focus 边框 */
|
||||||
|
.dropdown-trigger:focus,
|
||||||
|
.dropdown-trigger:focus-visible {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue