diff --git a/components.d.ts b/components.d.ts
index 761092b..0bb549d 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -26,6 +26,9 @@ declare module 'vue' {
ElCountdown: typeof import('element-plus/es')['ElCountdown']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
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']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
diff --git a/src/components/equipCardHall/index.vue b/src/components/equipCardHall/index.vue
index aeddf8d..ee23cdd 100644
--- a/src/components/equipCardHall/index.vue
+++ b/src/components/equipCardHall/index.vue
@@ -20,8 +20,8 @@
¥
- {{ price }}
- / 天
+ {{ price == 0 ? '电话商议' : price }}
+ / 天
diff --git a/src/http/api/login/index.ts b/src/http/api/login/index.ts
index 739c7f6..7b748bd 100644
--- a/src/http/api/login/index.ts
+++ b/src/http/api/login/index.ts
@@ -2,8 +2,8 @@ import { get, post } from '../../index'
// 登录接口 - 调试使用 - 产线环境需注释
export const loginApi = (data: any) => {
- return false
- // return post('/auth/login', data)
+ // return false
+ return post('/auth/login', data)
}
// 获取用户信息
diff --git a/src/views/equip/list.vue b/src/views/equip/list.vue
index 17cf613..8b70f53 100644
--- a/src/views/equip/list.vue
+++ b/src/views/equip/list.vue
@@ -60,6 +60,7 @@
+
综合排序:
- {{ v.name }}
+
+ changeDropdown(command, v)">
+
+ {{ v.name }}
+
+
+
+ 正序
+ 倒序
+
+
+
+
@@ -157,7 +170,7 @@ import {
import { getCompanyListApi, getGoodsClassListApi } from 'http/api/home'
import $bus from '@/utils/bus'
import NavMenu from '@/components/Navmenu/index.vue'
-import { ElMessage } from 'element-plus'
+import { ElMessage, ElDropdown, ElDropdownItem, ElDropdownMenu } from 'element-plus'
const router = useRouter()
const route: any = useRoute()
@@ -166,6 +179,7 @@ const endPrice: any = ref(0)
const levelList = ref([{ title: '一级分类' }, { title: '二级分类' }])
const levelList_2 = ref([{ title: '一级分类' }, { title: '二级分类' }, { title: '三级分类' }])
let currentIndex = route.query.level || null
+const dropdown = ref()
const onConfirmPrice = () => {
ElMessage.closeAll()
@@ -286,7 +300,7 @@ const screenChooseList: any = reactive([
},
{
type: 'companyId',
- name: '所属公司',
+ name: '所属公司:',
isShow: true,
list: [
{
@@ -321,19 +335,19 @@ const screenTags = computed(() => {
})
// 综合排序 更新时间 月租金 排序按钮
const screenOptionList: any = reactive([
- {
- name: '综合排序',
- id: 0,
- sort: '',
- },
- {
- name: '共享剩余时间',
- id: 1,
- sort: 'DESC',
- },
+ // {
+ // name: '综合排序',
+ // id: 0,
+ // sort: '',
+ // },
+ // {
+ // name: '共享剩余时间',
+ // id: 1,
+ // sort: 'DESC',
+ // },
{
name: '上架时间',
- id: 2,
+ id: 0,
sort: 'DESC', //desc or desc
},
])
@@ -426,9 +440,9 @@ const getDeviceListData = async (params: any = null, keyWord: any = null) => {
toolType: '',
level: '',
maStatus: 2,
- dayLeasePriceOrderBy:
- optionActive.value == 1 ? screenOptionList[optionActive.value].sort : '',
- updateTimeOrderBy: optionActive.value == 2 ? screenOptionList[optionActive.value].sort : '',
+ // dayLeasePriceOrderBy:
+ // optionActive.value == 1 ? screenOptionList[optionActive.value].sort : '',
+ updateTimeOrderBy: optionActive.value == 0 ? screenOptionList[0].sort : '',
}
screenChooseList.forEach((e: any, index: number) => {
@@ -549,13 +563,19 @@ const handleClose = (tag: any) => {
// 排序操作
const changeOption = (val: any) => {
- if (val.sort && optionActive.value == val.id) {
- val.sort = val.sort == 'ASC' ? 'DESC' : 'ASC'
- }
-
- console.log(screenOptionList, 'screenOptionList')
- optionActive.value = val.id
- getDeviceListData()
+ console.log('🚀 ~ changeOption ~ val:', val)
+ // optionActive.value = val.id
+ // if (val.sort && optionActive.value == val.id && val.id == 0) {
+ // val.sort = val.sort == 'ASC' ? 'DESC' : 'ASC'
+ // getDeviceListData()
+ // }
+}
+const changeDropdown = (sort: any, val: any) => {
+ optionActive.value = 0
+ val.sort = val.sort == 'ASC' ? 'DESC' : 'ASC'
+ setTimeout(() => {
+ getDeviceListData()
+ }, 200)
}
//选中后添加到 大类中的select字段
@@ -750,11 +770,13 @@ const onHandleDetails = (row: any) => {
.line {
padding: 14px 0;
display: flex;
- align-items: center;
+ align-items: flex-start;
// border-bottom: 1px solid #dddddd;
.label {
// width: 100px;
+ padding-top: 2px;
+ line-height: 25px;
box-sizing: border-box;
// padding: 0 15px;
@@ -890,4 +912,14 @@ const onHandleDetails = (row: any) => {
background-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;
+}