问题完善

This commit is contained in:
BianLzhaoMin 2024-12-01 16:21:35 +08:00
parent ca19d7a4d8
commit 2140728271
24 changed files with 554 additions and 173 deletions

1
components.d.ts vendored
View File

@ -8,6 +8,7 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default']
ElBadge: typeof import('element-plus/es')['ElBadge']
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton']

4
env/.env.dev vendored
View File

@ -7,8 +7,8 @@ VITE_API_URL = '/proxyApi'
# 开发环境接口地址
# VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
# VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
VITE_proxyTarget = 'http://192.168.0.244:28580' # 马帅
VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
# VITE_proxyTarget = 'http://192.168.0.244:28580' # 马帅
# VITE_proxyTarget = 'http://192.168.2.129:18080' # 马帅
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)

View File

@ -54,6 +54,24 @@
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xf0f8;</span>
<div class="name">倒计时-copy</div>
<div class="code-name">&amp;#xf0f8;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe610;</span>
<div class="name">倒计时</div>
<div class="code-name">&amp;#xe610;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xf0f7;</span>
<div class="name">倒计时-copy</div>
<div class="code-name">&amp;#xf0f7;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe862;</span>
<div class="name">电话</div>
@ -504,9 +522,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1732599020939') format('woff2'),
url('iconfont.woff?t=1732599020939') format('woff'),
url('iconfont.ttf?t=1732599020939') format('truetype');
src: url('iconfont.woff2?t=1733033023530') format('woff2'),
url('iconfont.woff?t=1733033023530') format('woff'),
url('iconfont.ttf?t=1733033023530') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@ -532,6 +550,33 @@
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-daojishi-copy"></span>
<div class="name">
倒计时-copy
</div>
<div class="code-name">.icon-daojishi-copy
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-daojishi"></span>
<div class="name">
倒计时
</div>
<div class="code-name">.icon-daojishi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-daojishi-copy1"></span>
<div class="name">
倒计时-copy
</div>
<div class="code-name">.icon-daojishi-copy1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-dianhua"></span>
<div class="name">
@ -1207,6 +1252,30 @@
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-daojishi-copy"></use>
</svg>
<div class="name">倒计时-copy</div>
<div class="code-name">#icon-daojishi-copy</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-daojishi"></use>
</svg>
<div class="name">倒计时</div>
<div class="code-name">#icon-daojishi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-daojishi-copy1"></use>
</svg>
<div class="name">倒计时-copy</div>
<div class="code-name">#icon-daojishi-copy1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-dianhua"></use>

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3152246 */
src: url('iconfont.woff2?t=1732599020939') format('woff2'),
url('iconfont.woff?t=1732599020939') format('woff'),
url('iconfont.ttf?t=1732599020939') format('truetype');
src: url('iconfont.woff2?t=1733033023530') format('woff2'),
url('iconfont.woff?t=1733033023530') format('woff'),
url('iconfont.ttf?t=1733033023530') format('truetype');
}
.iconfont {
@ -13,6 +13,18 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-daojishi-copy:before {
content: "\f0f8";
}
.icon-daojishi:before {
content: "\e610";
}
.icon-daojishi-copy1:before {
content: "\f0f7";
}
.icon-dianhua:before {
content: "\e862";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,27 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "42659958",
"name": "倒计时-copy",
"font_class": "daojishi-copy",
"unicode": "f0f8",
"unicode_decimal": 61688
},
{
"icon_id": "31358461",
"name": "倒计时",
"font_class": "daojishi",
"unicode": "e610",
"unicode_decimal": 58896
},
{
"icon_id": "42659957",
"name": "倒计时-copy",
"font_class": "daojishi-copy1",
"unicode": "f0f7",
"unicode_decimal": 61687
},
{
"icon_id": "8288971",
"name": "电话",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -53,7 +53,7 @@
<style lang="scss">
.footer-container {
margin-top: 40px;
// height: 650px;
height: 650px;
border-top: 1px solid #979797;
background: url('../../assets/img/home/2023_12_01_beijing2/beijing2.png') no-repeat;
background-size: cover;

View File

@ -14,8 +14,26 @@ const route = useRoute()
// // { name: '', routerName: 'enterpriseZone' },
// ]
const isType: any = localStorage.getItem('rolesType')
const navMenuList = computed(() => {
return store.leaseAndLesseeList
// return store.leaseAndLesseeList
if (isType == 1)
return [
{ name: '首页', routerName: 'home' },
{ name: '装备共享大厅', routerName: 'equipList' },
{ name: '租赁需求大厅', routerName: 'parity' },
{ name: '装备管理', routerName: 'goodsManagement' },
{ name: '订单管理', routerName: 'orderManagementCz' },
{ name: '消息通知', routerName: 'enterpriseZone' },
]
if (isType == 2)
return [
{ name: '首页', routerName: 'home' },
{ name: '装备共享大厅', routerName: 'equipList' },
{ name: '租赁需求大厅', routerName: 'parity' },
{ name: '订单管理', routerName: 'orderManagement' },
{ name: '消息通知', routerName: 'enterpriseZone' },
]
})
const navMenuClick = (name: any) => {

View File

@ -174,11 +174,10 @@ const onCarts = () => {
>个人中心</a
>
</div>
<div class="header-item last-item">
<!-- <div class="header-item last-item">
<img src="../../assets/img/home/phone.png" alt="" />
<a class="a-border-none">手机版</a>
<!-- 二维码弹框 -->
<div class="qr-code">
<el-image
src="https://img.xjishu.com/img/zl/2017/10/212257159687020.gif"
@ -187,7 +186,7 @@ const onCarts = () => {
扫二维码查看xxx
</div>
</div>
</div> -->
</div>
</div>
</div>

View File

@ -1,8 +1,8 @@
import { post, get, put } from '../index'
// 获取装备分类/maType/getTypeList
export const getTypeListApi = () => {
return get(`/material-mall/maType/getTypeList`, {})
export const getTypeListApi = (data: any = {}) => {
return get(`/material-mall/maType/getTypeList`, data)
}
// 获取装备列表

View File

@ -12,9 +12,15 @@ export const getHotSearchListApi = () => {
export const getLeaseListApi = (data: any = {}) => {
return post('/material-mall/ma-lease/leaseList', data)
}
export const getBookCarDetailsApi = (data: any = {}) => {
return get('/material-mall/bookCar/getBookCarDetails', data)
}
export const getLeaseInfoByIdApi = (data: any = {}) => {
return get('/material-mall/ma-lease/getById', data)
}
export const getAreaApi = (data: any = {}) => {
return get('/material-mall/maType/getArea', data)
}
// 立即接单
export const setAcceptByIdApi = (data: any = {}) => {
return post('/material-mall/ma-lease/accept', data)

View File

@ -3,7 +3,7 @@ import $bus from '@/utils/bus'
import { mainStore } from 'store/main'
import { useStore } from 'store/user'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getHotSearchListApi } from '../http/api/home/index'
import { getHotSearchListApi, getBookCarDetailsApi } from 'http/api/home/index'
import imgSrc from '@/assets/img/logo.png'
const store: any = mainStore()
const userStore = useStore()
@ -79,7 +79,11 @@ const searchKeywordBtn = () => {
store.addHistoryRecord(keywordIptValue.value)
if (route.path == '/equipList') {
$bus.emit('search', keywordIptValue.value)
} else {
}
if (route.path == '/parity') {
$bus.emit('search', keywordIptValue.value)
}
if (route.path == '/home') {
router.push({
name: 'equipList',
query: { keyWord: keywordIptValue.value },
@ -111,15 +115,26 @@ const onSelectRoles = (type: number) => {
userStore.editMenuList(1)
userStore.editUserMenuList(1)
localStorage.setItem('rolesType', '1')
window.location.reload()
} else {
rolesName.value = '2'
userStore.editMenuList(2)
userStore.editUserMenuList(2)
localStorage.setItem('rolesType', '2')
window.location.reload()
}
isRolesSelect.value = false
}
const cartNum = ref(0)
const getBookCarDetailsData = async () => {
const res: any = await getBookCarDetailsApi()
console.log(res, '预约车数量')
cartNum.value = res.data.length
}
getBookCarDetailsData()
//
const onCarts = () => {
console.log('跳转预约车页面')
@ -137,6 +152,7 @@ const onCarts = () => {
<div class="header-item" v-if="isShowLogout">
<!-- <img src="../assets/img/home/star.png" alt="" /> -->
<a class="user-name">{{ store.userInfo.nickName }}</a>
<div class="line"></div>
</div>
<div class="header-item">
<a v-if="!isShowLogout" class="a-border-none" @click="$router.push('/login')"
@ -150,14 +166,28 @@ const onCarts = () => {
>注册</a
>
<a v-else @click="handlerLogout">退出登录</a>
<div class="line"></div>
</div>
<div class="header-item roles-check" @click="onRolesCheck" v-if="isShowLogout">
<!-- <img src="../assets/img/home/star.png" alt="" /> -->
<a style="display: flex; justify-content: center; padding-right: 10px">
{{ rolesName == 1 ? '出租方' : '承租方' }}
<el-icon style="margin-left: 10px"><ArrowDownBold /></el-icon>
<a style="display: flex; justify-content: center">
<i
style="
background-color: #c9e7e5;
color: #47c4ad;
padding: 4px 6px;
font-weight: bold;
font-size: 13px;
border-radius: 4px;
"
>
{{ rolesName == 1 ? '出租方' : '承租方' }}
</i>
<!-- <el-icon style="margin-left: 10px"><ArrowDownBold /></el-icon> -->
</a>
<div class="line"></div>
<div class="select-list" v-if="isRolesSelect">
<div
style="border-top-left-radius: 6px; border-top-right-radius: 6px"
@ -173,6 +203,7 @@ const onCarts = () => {
</div>
</div>
</div>
<div class="header-item">
<a
@click="
@ -184,12 +215,12 @@ const onCarts = () => {
"
>个人中心</a
>
<div class="line"></div>
</div>
<div class="header-item last-item">
<!-- <div class="header-item last-item">
<img src="../assets/img/home/phone.png" alt="" />
<a class="a-border-none">手机版</a>
<!-- 二维码弹框 -->
<div class="qr-code">
<el-image
src="https://img.xjishu.com/img/zl/2017/10/212257159687020.gif"
@ -198,7 +229,7 @@ const onCarts = () => {
扫二维码查看xxx
</div>
</div>
</div> -->
</div>
</div>
@ -216,6 +247,7 @@ const onCarts = () => {
style="width: 190px; cursor: pointer; margin-left: 60px"
:src="imgSrc"
fit="contain"
@click="$router.push('/home')"
/>
<input
:placeholder="placeholderText"
@ -240,10 +272,12 @@ const onCarts = () => {
</div>
<div class="cart-icon" @click="onCarts">
<svg class="icon" aria-hidden="true" style="width: 30px; height: 30px">
<use xlink:href="#icon-gouwuche2"></use>
</svg>
<span> 预约车 </span>
<el-badge :value="cartNum">
<svg class="icon" aria-hidden="true" style="width: 30px; height: 30px">
<use xlink:href="#icon-gouwuche2"></use>
</svg>
</el-badge>
<span style="margin-left: 15px"> 预约车 </span>
</div>
</div>
</div>
@ -275,6 +309,11 @@ const onCarts = () => {
color: #6d6d6d;
font-size: 14px;
cursor: pointer;
.line {
width: 1px;
height: 15px;
background-color: #666655;
}
.user-name:hover {
color: #6d6d6d;
@ -286,7 +325,7 @@ const onCarts = () => {
a {
padding: 0 20px;
border-right: 1px solid #666655;
// border-right: 1px solid #666655;
}
a:hover {
@ -372,7 +411,7 @@ const onCarts = () => {
display: flex;
align-items: center;
background-color: #eeeff6;
padding: 30px 0;
padding: 30px 0 60px 0;
img {
margin-left: 38px;
@ -415,7 +454,7 @@ const onCarts = () => {
.ipt-down {
position: absolute;
bottom: 5px;
bottom: 25px;
left: 22%;
overflow: hidden;

View File

@ -101,7 +101,7 @@ const routes: Array<RouteRecordRaw> = [
},
//装备详情
{
path: '/equipDetail/:id',
path: '/equipDetail',
name: 'equipDetail',
component: () => import('views/equip/detail.vue'),
meta: {
@ -229,17 +229,17 @@ const routes: Array<RouteRecordRaw> = [
},
},
/* 订单管理(出租方) */
{
path: 'orderManagementBuy',
name: 'orderManagementBuy',
component: () => import('@/views/user/orderManagementCz/index.vue'),
meta: {
title: '订单管理(求租)',
keepAlive: true,
AuthFlag: false,
isLogin: true
},
{
path: 'orderManagementBuy',
name: 'orderManagementBuy',
component: () => import('@/views/user/orderManagementCz/index.vue'),
meta: {
title: '订单管理(求租)',
keepAlive: true,
AuthFlag: false,
isLogin: true
},
},
/* 订单管理(订单详情出租) */
{
path: 'orderManagementInfoBuy',
@ -484,7 +484,7 @@ const routes: Array<RouteRecordRaw> = [
keepAlive: false,
AuthFlag: false
},
redirect: '/my-lease/orderManagementCz',
redirect: '/my-lease/goodsManagement',
children: [
{
path: 'orderManagementCz',
@ -502,7 +502,7 @@ const routes: Array<RouteRecordRaw> = [
name: 'goodsManagement',
component: () => import('views/user/goodsManagement/index.vue'),
meta: {
title: '装备管理',
title: '商品管理',
keepAlive: true,
AuthFlag: false,
isLogin: true

View File

@ -25,9 +25,9 @@ export const useStore = defineStore('myUser', {
deviceTypeSunList: [], // 设备类型小类
leaseAndLesseeList: [],
leaseAndLesseeUserList: [
{ title: '订单管理', name: 'orderManagementCz' },
{ title: '商品管理', name: 'goodsManagement' },
{ title: '商品上下架', name: 'goodsUpdown' },
{ title: '订单管理', name: 'orderManagementCz' },
// { title: '商品上下架', name: 'goodsUpdown' },
// { title: '机手管理', name: 'operatorManagement' },
// { title: '寻源竞价', name: 'sourcingBidding' },
// { title: '专区管理', name: 'zoneManag' },

View File

@ -127,7 +127,7 @@
v-model="goods.num"
style="width: 100px"
:min="1"
:max="goods.deviceCount"
:max="goods.deviceCount || 1"
size="small"
/>
</div>
@ -232,7 +232,7 @@ const getBookCarDetailsData = async () => {
const res: any = await getBookCarDetailsApi()
cardList.value = []
cardList.value = JSON.parse(JSON.stringify(res.data))
cardList.value = res.data
cardList.value.forEach((e: any) => {
e.isChecked = false
@ -245,9 +245,6 @@ const getBookCarDetailsData = async () => {
j.lease_date = null
})
})
console.log(cardList.value, '***********')
// console.log(res, '')
}
onMounted(() => {
@ -268,18 +265,32 @@ onMounted(() => {
// }
// }
const onLeaseDateChange = (value: any, companyIndex: number, goodsIndex: number) => {
if (!value) {
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = ''
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = ''
cardList.value[companyIndex].devInfoVoList[goodsIndex].days = 0
} else {
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = value[0]
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = value[1]
cardList.value[companyIndex].devInfoVoList[goodsIndex].days = moment(value[1]).diff(
value[0],
'day',
)
}
// if (!value) {
// cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = ''
// cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = ''
// cardList.value[companyIndex].devInfoVoList[goodsIndex].days = 0
// } else {
// cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = value[0]
// cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = value[1]
// cardList.value[companyIndex].devInfoVoList[goodsIndex].days = moment(value[1]).diff(
// value[0],
// 'day',
// )
// }
cardList.value.forEach((e: any) => {
e.devInfoVoList.forEach((j: any) => {
if (!value) {
j.rentBeginTime = ''
j.rentEndTime = ''
j.days = 0
} else {
j.rentBeginTime = value[0]
j.rentEndTime = value[1]
j.days = moment(value[1]).diff(value[0], 'day')
}
})
})
}
//

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import NavMenu from 'components/Navmenu/index.vue'
import NavMenu from 'components/Navmenu/index.vue'
</script>
<template>

View File

@ -373,7 +373,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { mainStore } from '@/store/main'
const router = useRouter()
const route = useRoute()
const route: any = useRoute()
const store = mainStore()
const ruleFormRef = ref()
const pageParams = route.params
@ -775,7 +775,7 @@ const handelDetailListClick = (fnName, arg) => {
//
const getData = async () => {
const res = await getDetail(pageParams.id, true)
const res = await getDetail(route.query.id, true)
res.data.isOperatorCn = res.data.isOperator ? '是' : '否'
res.data.isInsurancePdf = res.data.insurancePdf ? '点击查看' : '暂无'
res.data.isExaminationPdf = res.data.examinationPdf ? '点击查看' : '暂无'

View File

@ -2,6 +2,23 @@
<div class="equipList">
<NavMenu></NavMenu>
<div class="class-container" v-if="currentIndex !== null">
<a
v-for="(item, index) in currentIndex == 1 ? levelList : levelList_2"
:key="index"
:style="index + 1 == currentIndex ? 'color:#000' : ''"
>{{ item.title
}}{{
currentIndex == 1
? index == levelList.length - 1
? ''
: '>'
: index == levelList_2.length - 1
? ''
: '>'
}}
</a>
</div>
<div class="screen">
<div class="choose">
<template v-for="(v, i) in screenChooseList" :key="i">
@ -22,7 +39,7 @@
</div>
</template>
<div v-if="i == 2" style="display: flex; align-items: center">
<div v-if="i == 3" style="display: flex; align-items: center">
<el-input v-model="startPrice" style="width: 60px" size="small" />
<span style="margin: 0 5px">-</span>
<el-input v-model="endPrice" style="width: 60px" size="small" />
@ -155,6 +172,7 @@
import { computed, onMounted, onUnmounted, reactive, ref } from 'vue'
import EquipCard from '@/components/equipCard.vue'
import EquipCardHall from '@/components/equipCardHall/index.vue'
import { useRoute, useRouter } from 'vue-router'
import {
apiGetAddressList,
@ -162,7 +180,7 @@ import {
getTypeListApi,
getDeviceListApi,
} from '@/http/api/equip'
import { getCompanyListApi } from '@/http/api/home'
import { getCompanyListApi, getGoodsClassListApi } from 'http/api/home'
import $bus from '@/utils/bus'
import NavMenu from '@/components/Navmenu/index.vue'
import { ElMessage } from 'element-plus'
@ -171,6 +189,9 @@ const router = useRouter()
const route: any = useRoute()
const startPrice: any = ref(0)
const endPrice: any = ref(0)
const levelList = ref<any>([{ title: '一级分类' }, { title: '二级分类' }])
const levelList_2 = ref<any>([{ title: '一级分类' }, { title: '二级分类' }, { title: '三级分类' }])
let currentIndex = route.query.level || null
const onConfirmPrice = () => {
ElMessage.closeAll()
@ -200,8 +221,10 @@ const onConfirmPrice = () => {
isAdd: true,
}
screenChooseList[2].list[0].isChecked = false
screenChooseList[2].list.push(itemInfo)
screenChooseList[3].list[0].isChecked = false
screenChooseList[3].list.push(itemInfo)
getDeviceListData()
}
//
@ -262,6 +285,19 @@ const screenChooseList: any = reactive([
},
],
},
{
type: 'deviceClass',
name: '下级分类:',
isShow: currentIndex === null ? false : true,
list: [
{
name: '全部',
value: '',
isChecked: true,
index: 2,
},
],
},
{
type: 'leasePrice',
name: '租金(天/元)',
@ -271,49 +307,49 @@ const screenChooseList: any = reactive([
name: '全部',
value: '',
isChecked: true,
index: 2,
index: 3,
isShow: true,
},
{
name: '0-500',
value: [0, 500],
isChecked: false,
index: 2,
index: 3,
isShow: true,
},
{
name: '500-1000',
value: [500, 1000],
isChecked: false,
index: 2,
index: 3,
isShow: true,
},
{
name: '1000-1500',
value: [1000, 1500],
isChecked: false,
index: 2,
index: 3,
isShow: true,
},
{
name: '1500-2000',
value: [1500, 2000],
isChecked: false,
index: 2,
index: 3,
isShow: true,
},
{
name: '2000-2500',
value: [2000, 2500],
isChecked: false,
index: 2,
index: 3,
isShow: true,
},
{
name: '2500-3000',
value: [2500, 3000],
isChecked: false,
index: 2,
index: 3,
isShow: true,
},
],
@ -327,7 +363,7 @@ const screenChooseList: any = reactive([
isChecked: true,
name: '全部',
value: '',
index: 3,
index: 4,
},
],
},
@ -339,20 +375,6 @@ const screenChooseList: any = reactive([
},
])
if (route.query.level == 1) {
screenChooseList[1].list[0].isChecked = false
}
if (route.query.companyId) {
const item = {
isChecked: true,
name: route.query.name,
value: route.query.companyId,
index: 4,
}
screenChooseList[4].list = []
screenChooseList[4].list.push(item)
}
// tag
const screenTags = computed(() => {
const selectTagList: any = []
@ -402,21 +424,54 @@ const equipList: any = ref([])
//
const getTypeListData = async () => {
let params: any = {}
if (route.query.level > 1) {
params.id = route.query.typeId
}
const res = await getTypeListApi()
const typeList = res.data.map((e: any) => {
return { ...e, name: e.typeName, value: e.typeId, isChecked: false, index: 1 }
})
screenChooseList[1].list.push(...typeList)
}
//
const lowerClassData = async () => {
const res = await getTypeListApi({
typeId: route.query.typeId,
level: route.query.level,
})
const typeList_1 = res.data
.filter((e: any) => e.level == route.query.level)
.map((j: any) => {
return { ...j, name: j.typeName, value: j.typeId, isChecked: false, index: 1 }
})
const typeList_2 = res.data
.filter((e: any) => e.level == route.query.level * 1 + 1)
.map((j: any) => {
return { ...j, name: j.typeName, value: j.typeId, isChecked: false, index: 1 }
})
console.log(typeList_2, 'typeList_2')
screenChooseList[1].list.push(...typeList_1)
screenChooseList[2].list.push(...typeList_2)
// const typeList = res.data.map((e: any) => {
// return { ...e, name: e.typeName, value: e.typeId, isChecked: false, index: 1 }
// })
// screenChooseList[2].list.push(...typeList)
}
//
const getCompanyAddressListData = async () => {
const res = await getCompanyListApi()
const res: any = await getCompanyListApi()
const addressList = res.data.map((e: any) => {
return { ...e, name: e.operateAddress, value: e.companyId, isChecked: false, index: 3 }
})
screenChooseList[3].list.push(...addressList)
screenChooseList[4].list.push(...addressList)
}
//
//
const getDeviceListData = async (params: any = null, keyWord: any = null) => {
@ -444,13 +499,17 @@ const getDeviceListData = async (params: any = null, keyWord: any = null) => {
}
if (index === 1 && j.isChecked) {
searchParams.typeId = j.value
searchParams.level = j.value ? 1 : ''
searchParams.level = j.level
}
if (index === 2 && j.isChecked && j.value.length > 0) {
if (index === 2 && j.isChecked && currentIndex !== null && j.value != '') {
searchParams.typeId = j.value
searchParams.level = j.level
}
if (index === 3 && j.isChecked && j.value.length > 0) {
searchParams.dayLeasePriceMin = j.value[0]
searchParams.dayLeasePriceMax = j.value[1]
}
if (index === 3 && j.isChecked) {
if (index === 4 && j.isChecked) {
searchParams.companyId = j.value
}
})
@ -524,6 +583,10 @@ const selectScreen = (type: any, item: any, index: number) => {
screenChooseList[index].list.forEach((e: any) => {
e.isChecked = false
})
if (index == 2) {
currentIndex = route.query.level * 1 + 1
}
item.isChecked = !item.isChecked
getDeviceListData()
}
@ -544,6 +607,28 @@ onMounted(() => {
level: route.query.level,
typeId: route.query.typeId,
}
Promise.all([getCompanyAddressListData(), lowerClassData()]).then(() => {
if (route.query.level == 1) {
screenChooseList[1].list.forEach((e: any, index: number) => {
if (route.query.typeId == e.typeId) {
e.isChecked = true
}
})
}
if (route.query.level == 2 || route.query.level == 3) {
screenChooseList[1].list.forEach((e: any, index: number) => {
if (index == 0) {
e.isChecked = false
}
if (route.query.typeId == e.typeId) {
e.isChecked = true
}
})
}
getDeviceListData(routeParams, null)
})
}
if (route.query.companyId) {
routeParams = {
@ -556,29 +641,31 @@ onMounted(() => {
}
}
Promise.all([getCompanyAddressListData(), getTypeListData()]).then(() => {
if (route.query.level == 1) {
screenChooseList[1].list.forEach((e: any) => {
if (route.query.typeId == e.typeId) {
e.isChecked = true
}
})
}
if (route.query.level == 2 || route.query.level == 3) {
{
const item = {
isChecked: true,
name: route.query.name,
value: route.query.typeId,
index: 4,
}
screenChooseList[4].list = []
screenChooseList[4].list.push(item)
if (!route.query.level && !route.query.typeId) {
Promise.all([getCompanyAddressListData(), getTypeListData()]).then(() => {
if (route.query.level == 1) {
screenChooseList[1].list.forEach((e: any) => {
if (route.query.typeId == e.typeId) {
e.isChecked = true
}
})
}
}
getDeviceListData(routeParams, null)
})
if (route.query.level == 2 || route.query.level == 3) {
{
const item = {
isChecked: true,
name: route.query.name,
value: route.query.typeId,
index: 5,
}
screenChooseList[5].list = []
screenChooseList[5].list.push(item)
}
}
getDeviceListData(routeParams, null)
})
}
})
onUnmounted(() => {
@ -587,7 +674,12 @@ onUnmounted(() => {
//
const onHandleDetails = (id: number | string) => {
router.push(`/equipDetail/${id}`)
router.push({
name: 'equipDetail',
query: {
id,
},
})
}
</script>
<style lang="scss" scoped>
@ -611,7 +703,7 @@ const onHandleDetails = (id: number | string) => {
padding-bottom: 20px;
border-bottom: 1px solid #ccc;
.choose {
margin-top: 20px;
margin-top: 10px;
font-size: 14px;
.line {
@ -735,4 +827,14 @@ const onHandleDetails = (id: number | string) => {
:deep.el-pagination.is-background .el-pager li.is-active {
background-color: #3cb4a6;
}
.class-container {
margin-top: 20px;
font-size: 14px;
color: #ccc;
a {
margin-right: 6px;
}
}
</style>

View File

@ -112,7 +112,12 @@ getHotDeviceList()
/* 热搜卡片点击跳转至详情页 */
const onClick = (val: any) => {
router.push(`/equipDetail/${val.id}`)
router.push({
name: 'equipDetail',
query: {
id: val.id,
},
})
}
//
@ -266,7 +271,21 @@ const onSelectItem = (type: number) => {
<div class="hot-equip-container">
<div class="hot-equip">
<span>最新装备</span>
<a>查看更多</a>
<a
@click="
() => {
router.push({ name: 'equipList' })
}
"
style="
color: #4296b1;
font-weight: bold;
text-decoration: underline;
font-size: 16px;
letter-spacing: 1px;
"
>更多产品</a
>
</div>
<div v-for="item in hotDeviceList" :key="item.typeName" style="margin-top: 15px">

View File

@ -64,25 +64,31 @@
<div class="showList" v-if="leaseList.length > 0">
<div class="demand-card" v-for="item in leaseList" :key="item.id">
<div class="count-down">
<!-- <el-icon style="margin-right: 10px"><Warning /></el-icon> -->
<svg
class="icon"
aria-hidden="true"
style="width: 24px; height: 24px; margin-right: 10px"
>
<use xlink:href="#icon-daojishi-copy"></use>
</svg>
<!-- 剩余08天12小时24分 -->
<div>
<el-countdown
format="剩余: DD [天] HH [小时] mm [分]"
:value="moment(item.endTime, 'YYYY-MM-DD HH:mm:ss').valueOf()"
>
</el-countdown>
</div>
</div>
<el-row>
<el-col :span="18">
<div style="font-size: 20px; font-weight: bold; letter-spacing: 1px">
{{ item.leaseName }}
</div>
</el-col>
<el-col :span="6">
<div class="count-down">
<el-icon style="margin-right: 10px"><Warning /></el-icon>
<!-- 剩余08天12小时24分 -->
<div>
<el-countdown
format="剩余: DD [天] HH [小时] mm [分]"
:value="moment(item.endTime, 'YYYY-MM-DD HH:mm:ss').valueOf()"
>
</el-countdown>
</div>
</div>
</el-col>
<el-col :span="6"> </el-col>
</el-row>
<el-row>
@ -145,20 +151,47 @@
</el-row>
<div class="btn-items">
<el-button
style="background-color: #62c171; color: #fff; padding: 20px 24px"
<!-- <el-button
@click="router.push({ name: 'demand-details', query: { id: item.id } })"
>
需求详情
</el-button>
<el-button
type="primary"
style="padding: 20px 40px"
:disabled="userId == item.publishUser"
@click="onAcceptOrders(item.id)"
>
接单
</el-button>
</el-button> -->
<div
@click="router.push({ name: 'demand-details', query: { id: item.id } })"
style="margin-bottom: 26px; border: 1px solid #00ae9c; color: #00ae9c"
>
需求详情
</div>
<!-- <div
style="background-color: #00ae9c"
@click="onAcceptOrders(item.id, item.publishUser)"
>
接单
</div> -->
<div>
<el-button
style="
width: 100%;
height: 100%;
background-color: #00ae9c;
color: #fff;
border: none;
border-radius: 0;
"
:disabled="userId == item.publishUser"
:style="userId == item.publishUser ? 'opacity:0.5;color:#fff' : ''"
@click="onAcceptOrders(item.id)"
>
接单
</el-button>
</div>
</div>
</div>
</div>
@ -185,7 +218,7 @@ import { computed, onMounted, onUnmounted, reactive, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getTypeListApi, getDeviceListApi } from 'http/api/equip'
import { getCompanyListApi, getLeaseListApi, setAcceptByIdApi } from 'http/api/home'
import { getCompanyListApi, getLeaseListApi, setAcceptByIdApi, getAreaApi } from 'http/api/home'
import $bus from 'utils/bus'
import NavMenu from 'components/Navmenu/index.vue'
import moment from 'moment'
@ -213,7 +246,7 @@ const screenChooseList: any = reactive([
{
type: 'companyId',
name: '需求所在地:',
name: '项目所在地:',
list: [
{
isChecked: true,
@ -301,8 +334,9 @@ getTypeListData()
//
const getCompanyAddressListData = async () => {
const res: any = await getCompanyListApi()
const addressList = res.data.map((e: any) => {
return { ...e, name: e.operateAddress, value: e.companyId, isChecked: false, index: 1 }
const result: any = await getAreaApi()
const addressList = result.data.map((e: any) => {
return { ...e, name: e.areaName, value: e.areaId, isChecked: false, index: 1 }
})
const companyList = res.data.map((e: any) => {
return { ...e, name: e.companyName, value: e.companyId, isChecked: false, index: 2 }
@ -313,11 +347,13 @@ const getCompanyAddressListData = async () => {
}
getCompanyAddressListData()
const getLeaseListData = async () => {
const getLeaseListData = async (keyWord: any = '') => {
const searchParams: any = {
keyWord,
companyId: '',
typeId: '',
level: '',
areaId: '',
startTime: optionActive.value == 0 ? screenOptionList[optionActive.value].sort : '',
rentDay: optionActive.value == 1 ? screenOptionList[optionActive.value].sort : '',
endTime: optionActive.value == 2 ? screenOptionList[optionActive.value].sort : '',
@ -332,10 +368,10 @@ const getLeaseListData = async () => {
}
if (index == 1 && j.isChecked) {
searchParams.companyId = searchParams.companyId ? searchParams.companyId : j.value
searchParams.areaId = j.value
}
if (index == 2 && j.isChecked) {
searchParams.companyId = searchParams.companyId ? searchParams.companyId : j.value
searchParams.companyId = j.value
}
})
})
@ -400,26 +436,8 @@ const onCurrentChange = (val: number) => {
onMounted(() => {
getLeaseListData()
$bus.on('search', (val: any) => {
// getDeviceListData(null, val)
getLeaseListData(val)
})
let routeParams: any = null
if (route.query.level && route.query.typeId) {
routeParams = {
level: route.query.level,
typeId: route.query.typeId,
}
}
if (route.query.companyId) {
routeParams = {
companyId: route.query.companyId,
}
}
if (route.query.keyWord) {
routeParams = {
keyWord: route.query.keyWord,
}
}
// getDeviceListData(routeParams, null)
})
onUnmounted(() => {
@ -570,7 +588,9 @@ const onAcceptOrders = (id: any) => {
margin-bottom: 15px;
padding: 15px 25px;
border-radius: 14px;
background-color: #f1f1f1;
background-color: #fff;
position: relative;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
position: relative;
.el-row {
@ -581,16 +601,38 @@ const onAcceptOrders = (id: any) => {
.count-down {
display: flex;
align-items: center;
justify-content: flex-end;
justify-content: center;
font-size: 16px;
font-weight: bold;
color: #dd2323;
color: #fff;
position: absolute;
right: 0;
top: 0;
background-color: orange;
width: 30%;
padding: 12px 0;
background: linear-gradient(to right, #4dd1c7, #00af9f);
}
.btn-items {
position: absolute;
right: 80px;
bottom: 30px;
display: flex;
flex-direction: column;
align-items: center;
div {
cursor: pointer;
width: 180px;
text-align: center;
// padding: 10px 0;
color: #fff;
box-sizing: border-box;
height: 38px;
line-height: 38px;
}
}
}
}
@ -606,7 +648,7 @@ const onAcceptOrders = (id: any) => {
background-color: #3cb4a6;
}
:deep .el-statistic__content {
color: #dd2323;
color: #fff;
font-size: 16px;
}
</style>

View File

@ -202,7 +202,12 @@
:show-all-levels="false"
placeholder="请选择装备类目"
v-model="addOrEditForm.typeIds"
:props="{ value: 'id', label: 'name' }"
:props="{
value: 'id',
label: 'name',
checkStrictly: true,
}"
@change="onChangeClass"
/>
</el-form-item>
</el-col>
@ -284,6 +289,23 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="项目所在地" prop="areaId">
<el-select
clearable
style="width: 100%"
placeholder="请选择项目所在地"
v-model="addOrEditForm.areaId"
>
<el-option
v-for="item in areaList"
:key="item.areaId"
:label="item.areaName"
:value="item.areaId"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
@ -357,7 +379,7 @@
<script setup lang="ts">
import UploadComponentNew from 'components/uploadComponentNew/index.vue'
import { getCompanyListApi, getGoodsClassListApi } from 'http/api/home'
import { getCompanyListApi, getGoodsClassListApi, getAreaApi } from 'http/api/home'
import {
addLeaseInfoApi,
getLeaseListApi,
@ -378,9 +400,14 @@ const isRepublish = ref(true)
const isSave = ref(false)
const total = ref(0)
const endTime = ref([])
const areaList = ref<any>([])
const releaseTime = ref([])
const dialogTitle = ref('新增')
const fileListTemp = ref<any>([])
const props2 = {
multiple: true,
checkStrictly: true,
}
const searchParams = reactive({
leaseName: '',
@ -406,6 +433,7 @@ const addOrEditForm = ref<any>({
description: '',
isSubmit: '',
fileInfoList: [],
areaId: '',
})
const addOrEditFormTemp = ref<any>({
leaseName: '',
@ -420,6 +448,7 @@ const addOrEditFormTemp = ref<any>({
description: '',
isSubmit: '',
fileInfoList: fileListTemp ? fileListTemp : [],
areaId: '',
})
const addOrEditFormRules = reactive({
@ -439,6 +468,7 @@ const addOrEditFormRules = reactive({
leaseNum: [{ required: true, message: '请输入预估数量', trigger: 'blur' }],
endTime: [{ required: true, message: '请选择需求截止日期', trigger: 'change' }],
fileInfoList: [{ required: true, message: '请上传参考图片', trigger: 'blur' }],
areaId: [{ required: true, message: '请选择项目所在地', trigger: 'change' }],
})
const disabledDate = (date: any) => {
@ -470,6 +500,11 @@ const getLeaseListData = async () => {
total.value = res.total
}
const getAreaData = async () => {
const res: any = await getAreaApi()
areaList.value = res.data
}
//
const onReset = () => {
endTime.value = []
@ -512,6 +547,7 @@ const onRepublish = async (id: any, type: any) => {
description,
typeIds,
fileInfoList,
areaId,
} = res.data
Object.assign(addOrEditForm.value, {
@ -527,6 +563,7 @@ const onRepublish = async (id: any, type: any) => {
typeIds,
id,
fileInfoList: fileInfoList ? fileInfoList : [],
areaId,
})
addOrEditForm.value.typeIds = addOrEditForm.value.typeIds.map((e: any) => {
@ -590,9 +627,14 @@ const minLimit = computed(() => {
return addOrEditForm.value.fileInfoList.length
})
const onChangeClass = (val: any) => {
console.log(val, '***')
}
onMounted(() => {
getClassAndCompanyData()
getLeaseListData()
getAreaData()
})
</script>