问题修复
This commit is contained in:
parent
20c447122a
commit
0238efb16f
|
|
@ -23,10 +23,11 @@ const props = defineProps({
|
|||
padding: 8px 0;
|
||||
}
|
||||
.title-tip view:first-child {
|
||||
width: 5px;
|
||||
height: 18px;
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background-color: $el-color-primary;
|
||||
margin-right: 6px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.title-tip view {
|
||||
|
|
|
|||
|
|
@ -167,6 +167,13 @@
|
|||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
// 分类管理
|
||||
{
|
||||
"path": "pages/class-page/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,210 @@
|
|||
<template>
|
||||
<!-- 分类 -->
|
||||
<view class="h5-container my-setting">
|
||||
<view style="padding: 15px">
|
||||
<van-icon name="arrow-left" @click="onClickLeft" />
|
||||
<text style="color: #000"> 分类 </text>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y>
|
||||
<van-tabs
|
||||
animated
|
||||
color="#22AB9B"
|
||||
v-model:active="activeClass"
|
||||
title-active-color="#22AB9B"
|
||||
>
|
||||
<van-tab title="装备分类">
|
||||
<van-sidebar v-model="activeLevel1">
|
||||
<van-sidebar-item
|
||||
:title="item.name"
|
||||
:key="item.id"
|
||||
v-for="item in classDeviceList"
|
||||
/>
|
||||
</van-sidebar>
|
||||
<van-sidebar v-model="activeLevel2">
|
||||
<van-sidebar-item
|
||||
:title="item.name"
|
||||
:key="item.id"
|
||||
v-for="item in classDeviceList[activeLevel1]?.children"
|
||||
/>
|
||||
</van-sidebar>
|
||||
<view style="flex: 1" class="deviceClass">
|
||||
<view
|
||||
class="van-ellipsis"
|
||||
:key="item.id"
|
||||
v-for="item in classDeviceList3"
|
||||
@click="onClickDevice(item)"
|
||||
>
|
||||
{{ item.name }} ({{ item.maCount ? item.maCount : 0 }})
|
||||
</view>
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="公司分类">
|
||||
<view style="flex: 1" class="companyClass">
|
||||
<view
|
||||
class="van-ellipsis"
|
||||
:key="item.companyId"
|
||||
v-for="item in memberStore.companyList"
|
||||
@click="onClickCompany(item)"
|
||||
>
|
||||
{{ item.companyName }}({{ item.maCount ? item.maCount : 0 }})
|
||||
</view>
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { useMemberStore } from '@/stores/index.js'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { getEquipmentTypeAPI } from '@/services/common/index.js'
|
||||
const activeClass = ref(0)
|
||||
const activeLevel1 = ref(0)
|
||||
const activeLevel2 = ref(0)
|
||||
const classDeviceList = ref([])
|
||||
const memberStore = useMemberStore()
|
||||
const onClickLeft = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
const classDeviceList3 = computed(() => {
|
||||
return classDeviceList.value[activeLevel1.value]?.children[activeLevel2.value].children
|
||||
})
|
||||
|
||||
const onClickDevice = (item) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods-list/index?typeId=${item.id}`,
|
||||
})
|
||||
}
|
||||
const onClickCompany = (item) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods-list/index?companyId=${item.companyId}`,
|
||||
})
|
||||
}
|
||||
|
||||
const getEquipmentTypeData = async () => {
|
||||
const { data: result } = await getEquipmentTypeAPI()
|
||||
classDeviceList.value = result
|
||||
// classDeviceList3.value =
|
||||
// classDeviceList.value[activeLevel1.value].children[activeLevel2.value].children
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
activeClass.value = options?.type * 1
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
getEquipmentTypeData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my-setting {
|
||||
padding: 10px 0;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(to bottom, #c0e9ce, #e4f2f2, #f9f9f9);
|
||||
}
|
||||
|
||||
:deep(.van-cell-group--inset) {
|
||||
padding: 15px 0;
|
||||
}
|
||||
.companyClass {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
view {
|
||||
width: calc((100% - 20px) / 3);
|
||||
margin-right: 10px;
|
||||
margin-top: 10px;
|
||||
padding: 0 6px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
border-radius: 16px;
|
||||
box-sizing: border-box;
|
||||
color: #999999;
|
||||
background-color: #e9e9e9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
& view:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
& view:hover {
|
||||
background-color: #22ab9b !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
.deviceClass {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-left: 10px;
|
||||
view {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
padding: 0 6px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
border-radius: 16px;
|
||||
box-sizing: border-box;
|
||||
color: #999999;
|
||||
background-color: #e9e9e9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
& view:nth-child(2n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
& view:hover {
|
||||
background-color: #22ab9b !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
:deep(.van-tabs__content--animated) {
|
||||
padding: 0 10px;
|
||||
}
|
||||
:deep(.van-tab__panel) {
|
||||
// max-height: 40vh;
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
:deep(.van-sidebar-item--select:before) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.van-sidebar-item__text) {
|
||||
white-space: nowrap; /* 防止换行 */
|
||||
overflow: hidden; /* 隐藏溢出的内容 */
|
||||
text-overflow: ellipsis; /* 显示省略号 */
|
||||
max-width: 100%; /* 最大宽度,根据需要设置 */
|
||||
display: block; /* 确保是块级元素 */
|
||||
}
|
||||
:deep(.van-tabs__nav) {
|
||||
background-color: #c5ead3;
|
||||
padding: 0 8px;
|
||||
}
|
||||
:deep(.van-sidebar-item) {
|
||||
padding: 0 8px;
|
||||
background-color: #daefe8;
|
||||
color: #333333;
|
||||
font-size: 14px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
:deep(.van-sidebar-item--select, .van-sidebar-item--select:active) {
|
||||
background-color: #22ab9b;
|
||||
color: #fff;
|
||||
border-radius: 16px;
|
||||
}
|
||||
:deep(.van-sidebar) {
|
||||
padding: 0 4px;
|
||||
}
|
||||
:deep(.van-tabs__line) {
|
||||
bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,9 +1,30 @@
|
|||
<template>
|
||||
<!-- 首页 -->
|
||||
<view class="index-container h5-container">
|
||||
<view class="index-container">
|
||||
<view class="index-header">
|
||||
<view class="flex-row-start">
|
||||
<van-icon name="manager" style="margin-right: 6px" />
|
||||
<view class="flex-row-start" style="margin-top: 10px">
|
||||
<!-- <van-icon name="manager" style="margin-right: 6px" /> -->
|
||||
<!-- <van-image
|
||||
round
|
||||
fit="cover"
|
||||
width="26px"
|
||||
height="26px"
|
||||
:src="memberStore.userInfo.avatar"
|
||||
/> -->
|
||||
|
||||
<view
|
||||
style="
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
text-align: center;
|
||||
line-height: 28px;
|
||||
border-radius: 14px;
|
||||
margin-right: 6px;
|
||||
background-color: #c5e3df;
|
||||
"
|
||||
>
|
||||
<van-icon name="manager" color="#7e8576" size="18" />
|
||||
</view>
|
||||
<van-popover
|
||||
size="small"
|
||||
:show-arrow="false"
|
||||
|
|
@ -52,52 +73,23 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<van-tabs
|
||||
animated
|
||||
color="#22AB9B"
|
||||
v-model:active="activeClass"
|
||||
title-active-color="#22AB9B"
|
||||
>
|
||||
<van-tab title="装备分类">
|
||||
<van-sidebar v-model="activeLevel1">
|
||||
<van-sidebar-item
|
||||
:title="item.name"
|
||||
:key="item.id"
|
||||
v-for="item in classDeviceList"
|
||||
/>
|
||||
</van-sidebar>
|
||||
<van-sidebar v-model="activeLevel2">
|
||||
<van-sidebar-item
|
||||
:title="item.name"
|
||||
:key="item.id"
|
||||
v-for="item in classDeviceList[activeLevel1]?.children"
|
||||
/>
|
||||
</van-sidebar>
|
||||
<view style="flex: 1" class="deviceClass">
|
||||
<view
|
||||
class="van-ellipsis"
|
||||
:key="item.id"
|
||||
v-for="item in classDeviceList3"
|
||||
@click="onClickDevice(item)"
|
||||
>
|
||||
{{ item.name }} ({{ item.maCount ? item.maCount : 0 }})
|
||||
<view class="order-data class-filter">
|
||||
<TitleTip :title="`分类筛选`" />
|
||||
<van-grid :column-num="2" :border="false">
|
||||
<van-grid-item @click="onJumpClassFilter(0)">
|
||||
<view class="class-box">
|
||||
<view class="left-img"> </view>
|
||||
装备分类
|
||||
</view>
|
||||
</view>
|
||||
</van-tab>
|
||||
<van-tab title="公司分类">
|
||||
<view style="flex: 1" class="companyClass">
|
||||
<view
|
||||
class="van-ellipsis"
|
||||
:key="item.companyId"
|
||||
v-for="item in memberStore.companyList"
|
||||
@click="onClickCompany(item)"
|
||||
>
|
||||
{{ item.companyName }}({{ item.maCount ? item.maCount : 0 }})
|
||||
</van-grid-item>
|
||||
<van-grid-item @click="onJumpClassFilter(1)">
|
||||
<view class="class-box">
|
||||
<view class="right-img"> </view>
|
||||
公司分类
|
||||
</view>
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</view>
|
||||
<view class="order-data">
|
||||
<TitleTip />
|
||||
<van-cell-group inset>
|
||||
|
|
@ -145,7 +137,7 @@ import {
|
|||
getNoticeLListAPI,
|
||||
getOrderStatusCountAPI,
|
||||
} from '@/services/index/index.js'
|
||||
import { getEquipmentTypeAPI } from '@/services/common/index.js'
|
||||
|
||||
const activeTypeName = ref('机具')
|
||||
const searchModelValue = ref('')
|
||||
const memberStore = useMemberStore()
|
||||
|
|
@ -155,10 +147,7 @@ const activeUser = ref(1)
|
|||
const finished = ref(false)
|
||||
const toDoListMessage = ref([])
|
||||
const noticeListMessage = ref([])
|
||||
const activeClass = ref(0)
|
||||
const activeLevel1 = ref(0)
|
||||
const activeLevel2 = ref(0)
|
||||
const classDeviceList = ref([])
|
||||
|
||||
const orderData = ref([
|
||||
{ order_title: '我的订单', order_count: 0, order_status: 0, order_icon: orderIcon_1 },
|
||||
{
|
||||
|
|
@ -242,25 +231,9 @@ const onViewMore = (item) => {
|
|||
})
|
||||
}
|
||||
|
||||
const getEquipmentTypeData = async () => {
|
||||
const { data: result } = await getEquipmentTypeAPI()
|
||||
classDeviceList.value = result
|
||||
// classDeviceList3.value =
|
||||
// classDeviceList.value[activeLevel1.value].children[activeLevel2.value].children
|
||||
}
|
||||
|
||||
const classDeviceList3 = computed(() => {
|
||||
return classDeviceList.value[activeLevel1.value]?.children[activeLevel2.value].children
|
||||
})
|
||||
|
||||
const onClickDevice = (item) => {
|
||||
const onJumpClassFilter = (type) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods-list/index?typeId=${item.id}`,
|
||||
})
|
||||
}
|
||||
const onClickCompany = (item) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods-list/index?companyId=${item.companyId}`,
|
||||
url: `/pages/class-page/index?type=${type}`,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -282,7 +255,7 @@ onShow(async () => {
|
|||
visible: false,
|
||||
})
|
||||
}
|
||||
getEquipmentTypeData()
|
||||
|
||||
getOrderStatusCountData()
|
||||
|
||||
const res = await getToDoListAPI()
|
||||
|
|
@ -297,21 +270,24 @@ onShow(async () => {
|
|||
.index-header {
|
||||
padding: 5px 20px 30px;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(to bottom, #6caf97, #78b0a9, #b8d0cf);
|
||||
background: linear-gradient(to bottom, #99dbc4, #aeded9, #daf4f3);
|
||||
border-bottom-left-radius: 40px;
|
||||
border-bottom-right-radius: 40px;
|
||||
|
||||
.user-name {
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
padding: 16px 0;
|
||||
font-size: 16px;
|
||||
padding: 10px 0;
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 3px;
|
||||
}
|
||||
|
||||
.notice-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 4px;
|
||||
background-color: #bcd7d4;
|
||||
background-color: #daf2f1;
|
||||
border-radius: 6px;
|
||||
|
||||
view {
|
||||
|
|
@ -324,7 +300,7 @@ onShow(async () => {
|
|||
}
|
||||
|
||||
.search-ipt {
|
||||
margin-top: 10px;
|
||||
margin-top: 20px;
|
||||
.van-field {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
|
|
@ -455,4 +431,33 @@ onShow(async () => {
|
|||
max-width: 100%; /* 最大宽度,根据需要设置 */
|
||||
display: block; /* 确保是块级元素 */
|
||||
}
|
||||
|
||||
.class-box {
|
||||
width: 95%;
|
||||
min-height: 100px;
|
||||
background-color: #e8f3f0;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #777777;
|
||||
font-size: 15px;
|
||||
|
||||
.left-img {
|
||||
background: url('@/static/index/class-left.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 60px;
|
||||
height: 70%;
|
||||
}
|
||||
.right-img {
|
||||
background: url('@/static/index/class-right.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 60px;
|
||||
height: 70%;
|
||||
}
|
||||
}
|
||||
.class-filter :deep(.van-grid-item__content) {
|
||||
padding: 0;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -30,22 +30,22 @@
|
|||
|
||||
<van-grid clickable :column-num="2" :gutter="10">
|
||||
<van-grid-item v-if="memberStore.userType === 1">
|
||||
<navigator url="/pages/order-list/index?type=1">
|
||||
<view @click="onJumpMyOrder(1)">
|
||||
<van-icon name="cart" />
|
||||
<text>出租订单</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="memberStore.userType === 1">
|
||||
<navigator url="/pages/my-demand/index">
|
||||
<view @click="onJumpMyDemand">
|
||||
<van-icon name="cart" />
|
||||
<text>我的需求</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</van-grid-item>
|
||||
<van-grid-item v-if="memberStore.userType === 2">
|
||||
<navigator url="/pages/order-list/index?type=2">
|
||||
<van-grid-item v-if="memberStore.userType === 2" @click="onJumpMyOrder(2)">
|
||||
<view>
|
||||
<van-icon name="cart" />
|
||||
<text>承租订单</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</van-grid-item>
|
||||
</van-grid>
|
||||
</van-cell-group>
|
||||
|
|
@ -68,6 +68,17 @@ const onJumpToMySetting = () => {
|
|||
uni.navigateTo({ url: '/pages/my-setting/index' })
|
||||
}
|
||||
|
||||
const onJumpMyOrder = (type) => {
|
||||
if (type === 1) {
|
||||
uni.navigateTo({ url: '/pages/order-list/index?type=1' })
|
||||
} else {
|
||||
uni.navigateTo({ url: '/pages/order-list/index?type=2' })
|
||||
}
|
||||
}
|
||||
const onJumpMyDemand = () => {
|
||||
uni.navigateTo({ url: '/pages/my-demand/index' })
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
userInfo.value = memberStore.userInfo
|
||||
userCompanyName.value = memberStore.userCompanyName
|
||||
|
|
@ -130,7 +141,7 @@ onLoad(() => {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
navigator {
|
||||
view {
|
||||
width: 100%;
|
||||
padding: 30px 0;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -247,9 +247,14 @@ const scrapRecordList = ref([])
|
|||
const lossRecordList = ref([])
|
||||
const fileListAll = ref([])
|
||||
const onClickLeft = () => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/order-list/index',
|
||||
})
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/order-list/index',
|
||||
// })
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/order-list/index',
|
||||
// })
|
||||
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
const getOverhaulData = async (orderId) => {
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 220 KiB |
|
|
@ -33,10 +33,10 @@ export default defineConfig({
|
|||
proxy: {
|
||||
// 在此处编写代理规则
|
||||
'/api': {
|
||||
// target: 'http://36.33.26.201:17788/proxyApi',
|
||||
target: 'http://36.33.26.201:17788/proxyApi',
|
||||
// target: 'http://192.168.2.123:28080',
|
||||
// target: 'http://192.168.2.122:28080',
|
||||
target: 'http://192.168.0.244:28580', // 测试服务
|
||||
// target: 'http://192.168.0.244:28580', // 测试服务
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => {
|
||||
return path.replace(/\/api/, '')
|
||||
|
|
|
|||
Loading…
Reference in New Issue