代码优化
This commit is contained in:
parent
4be105707b
commit
356912fd37
|
|
@ -7,8 +7,8 @@ VITE_API_URL = '/proxyApi'
|
||||||
# 开发环境接口地址
|
# 开发环境接口地址
|
||||||
# VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
|
# VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
|
||||||
|
|
||||||
# VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
|
VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
|
||||||
VITE_proxyTarget = 'http://192.168.0.244:28580' # 马帅
|
# VITE_proxyTarget = 'http://192.168.0.244:28580' # 马帅
|
||||||
# VITE_proxyTarget = 'http://192.168.2.129:18080' # 马帅
|
# VITE_proxyTarget = 'http://192.168.2.129:18080' # 马帅
|
||||||
|
|
||||||
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,16 @@ const navMenuList = computed(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const navMenuClick = (name: any) => {
|
const navMenuClick = (name: any) => {
|
||||||
|
if (name == 'goodsManagement' || name == 'orderManagementCz' || name == 'orderManagement') {
|
||||||
|
store.editcurrentMenuItem(name)
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push({
|
||||||
|
name: 'my-user',
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
} else {
|
||||||
router.push({ name })
|
router.push({ name })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,13 +96,18 @@ const onSelectRoles = (type: number) => {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
rolesName.value = '1'
|
rolesName.value = '1'
|
||||||
userStore.editMenuList(1)
|
userStore.editMenuList(1)
|
||||||
|
userStore.editcurrentMenuItem('goodsManagement')
|
||||||
// userStore.editUserMenuList(1)
|
// userStore.editUserMenuList(1)
|
||||||
localStorage.setItem('rolesType', '1')
|
localStorage.setItem('rolesType', '1')
|
||||||
|
|
||||||
|
// window.location.reload()
|
||||||
} else {
|
} else {
|
||||||
rolesName.value = '2'
|
rolesName.value = '2'
|
||||||
userStore.editMenuList(2)
|
userStore.editMenuList(2)
|
||||||
// userStore.editUserMenuList(2)
|
// userStore.editUserMenuList(2)
|
||||||
localStorage.setItem('rolesType', '2')
|
localStorage.setItem('rolesType', '2')
|
||||||
|
userStore.editcurrentMenuItem('sourcingNeed')
|
||||||
|
// window.location.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
|
|
@ -163,7 +168,15 @@ const onCarts = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-item">
|
<div class="header-item">
|
||||||
<a>个人中心</a>
|
<a
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
router.push({ name: 'my-user' })
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
个人中心</a
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="header-item last-item">
|
<!-- <div class="header-item last-item">
|
||||||
<img src="../../assets/img/home/phone.png" alt="" />
|
<img src="../../assets/img/home/phone.png" alt="" />
|
||||||
|
|
|
||||||
|
|
@ -117,12 +117,14 @@ const onSelectRoles = (type: number) => {
|
||||||
userStore.editMenuList(1)
|
userStore.editMenuList(1)
|
||||||
userStore.editUserMenuList(1)
|
userStore.editUserMenuList(1)
|
||||||
localStorage.setItem('rolesType', '1')
|
localStorage.setItem('rolesType', '1')
|
||||||
|
userStore.editcurrentMenuItem('goodsManagement')
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
} else {
|
} else {
|
||||||
rolesName.value = '2'
|
rolesName.value = '2'
|
||||||
userStore.editMenuList(2)
|
userStore.editMenuList(2)
|
||||||
userStore.editUserMenuList(2)
|
userStore.editUserMenuList(2)
|
||||||
localStorage.setItem('rolesType', '2')
|
localStorage.setItem('rolesType', '2')
|
||||||
|
userStore.editcurrentMenuItem('sourcingNeed')
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
isRolesSelect.value = false
|
isRolesSelect.value = false
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
{
|
{
|
||||||
path: 'orderManagementCz',
|
path: '/orderManagementCz',
|
||||||
name: 'orderManagementCz',
|
name: 'orderManagementCz',
|
||||||
component: () => import('views/user/orderManagementCz/index.vue'),
|
component: () => import('views/user/orderManagementCz/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
|
@ -214,7 +214,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'goodsManagement',
|
path: '/goodsManagement',
|
||||||
name: 'goodsManagement',
|
name: 'goodsManagement',
|
||||||
component: () => import('views/user/goodsManagement/index.vue'),
|
component: () => import('views/user/goodsManagement/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
|
@ -225,7 +225,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'accept-orders',
|
path: '/accept-orders',
|
||||||
name: 'accept-orders',
|
name: 'accept-orders',
|
||||||
component: () => import('views/user/accept-orders/index.vue'),
|
component: () => import('views/user/accept-orders/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
|
@ -236,7 +236,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'sourcingNeed',
|
path: '/sourcingNeed',
|
||||||
name: 'sourcingNeed',
|
name: 'sourcingNeed',
|
||||||
component: () => import('views/user/sourcingNeed/index.vue'),
|
component: () => import('views/user/sourcingNeed/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
|
@ -247,7 +247,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'orderManagement',
|
path: '/orderManagement',
|
||||||
name: 'orderManagement',
|
name: 'orderManagement',
|
||||||
component: () => import('views/user/orderManagement/index.vue'),
|
component: () => import('views/user/orderManagement/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ export const useStore = defineStore('myUser', {
|
||||||
state: () => {
|
state: () => {
|
||||||
return {
|
return {
|
||||||
currentMenuType: true,
|
currentMenuType: true,
|
||||||
currentMenuItem: 'baseInfo',
|
currentMenuItem: 'goodsManagement',
|
||||||
menuList: [
|
menuList: [
|
||||||
{ title: '基础信息', name: 'baseInfo' },
|
{ title: '基础信息', name: 'baseInfo' },
|
||||||
{ title: '订单管理', name: 'orderManagement' },
|
{ title: '订单管理', name: 'orderManagement' },
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,8 @@ import {
|
||||||
import moment, { max } from 'moment'
|
import moment, { max } from 'moment'
|
||||||
import { InfoFilled } from '@element-plus/icons-vue'
|
import { InfoFilled } from '@element-plus/icons-vue'
|
||||||
import CustomDatePickerButton from './components/date-picker-button.vue'
|
import CustomDatePickerButton from './components/date-picker-button.vue'
|
||||||
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const protocolChecked = ref<boolean>(false)
|
const protocolChecked = ref<boolean>(false)
|
||||||
const allKey = ref(0)
|
const allKey = ref(0)
|
||||||
|
|
@ -445,9 +447,15 @@ const onCartSubmit = async () => {
|
||||||
message: '提交成功',
|
message: '提交成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
allKey.value++
|
|
||||||
|
|
||||||
getBookCarDetailsData()
|
userStore.editcurrentMenuItem('goodsManagement')
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push({
|
||||||
|
name: 'my-user',
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
// allKey.value++
|
||||||
|
// getBookCarDetailsData()
|
||||||
}
|
}
|
||||||
// console.log(res, '预约车提交结果')
|
// console.log(res, '预约车提交结果')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
:disabled="pageData.isBookCar == 0"
|
:disabled="pageData.isBookCar == 0"
|
||||||
:style="pageData.isBookCar == 0 ? 'opacity:0.5' : ''"
|
:style="pageData.isBookCar == 0 ? 'opacity:0.5' : ''"
|
||||||
style="background-color: #1abc9c"
|
style="background-color: #1abc9c"
|
||||||
v-authBtn="() => openLease"
|
@click="onHandelLessee"
|
||||||
>
|
>
|
||||||
立即承租
|
立即承租
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -667,11 +667,11 @@ const rules = reactive({
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const openLease = () => {
|
const openLease = () => {
|
||||||
console.log(pageData.value)
|
// console.log(pageData.value)
|
||||||
onAddCart()
|
// onAddCart()
|
||||||
router.push({
|
// router.push({
|
||||||
path: `/orderConfirm/${pageData.value.maId}`,
|
// path: `/orderConfirm/${pageData.value.maId}`,
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
//切换收藏状态
|
//切换收藏状态
|
||||||
const collectChange = async () => {
|
const collectChange = async () => {
|
||||||
|
|
@ -758,6 +758,30 @@ const addressCascader = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onHandelLessee = () => {
|
||||||
|
// onAddCart()
|
||||||
|
// router.push({
|
||||||
|
// path: `/orderConfirm/${props.id}`,
|
||||||
|
// })
|
||||||
|
// console.log('立即租赁')
|
||||||
|
|
||||||
|
ElMessageBox.confirm('是否确定立即承租该装备?', '温馨提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
router.push({
|
||||||
|
// path: `/orderConfirm/${props.id}`,
|
||||||
|
name: 'order-confirm',
|
||||||
|
query: {
|
||||||
|
id: route.query.id,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
}
|
||||||
|
|
||||||
//获取地址列表
|
//获取地址列表
|
||||||
const getAddressData = async (code = '') => {
|
const getAddressData = async (code = '') => {
|
||||||
let params = {}
|
let params = {}
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,11 @@
|
||||||
<el-row style="border-bottom: 1px solid #ccc">
|
<el-row style="border-bottom: 1px solid #ccc">
|
||||||
<el-col :span="1">
|
<el-col :span="1">
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<el-checkbox
|
<!-- <el-checkbox
|
||||||
v-model="item.isChecked"
|
v-model="item.isChecked"
|
||||||
@change="onChangeCompany($event, index, item)"
|
@change="onChangeCompany($event, index, item)"
|
||||||
>
|
>
|
||||||
</el-checkbox>
|
</el-checkbox> -->
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="22" class="cart-user-info">
|
<el-col :span="22" class="cart-user-info">
|
||||||
|
|
@ -78,14 +78,28 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<div class="lease-date">
|
<div class="lease-date">
|
||||||
<div>{{ item.lease_date_string }}</div>
|
<!-- <div>{{ item.lease_date_string }}</div> -->
|
||||||
<el-date-picker
|
<div style="margin-bottom: 8px">
|
||||||
|
{{ item.rentBeginTime }}
|
||||||
|
<span v-if="item.rentBeginTime && item.rentEndTime">-</span>
|
||||||
|
{{ item.rentEndTime }}
|
||||||
|
</div>
|
||||||
|
<!-- <el-date-picker
|
||||||
style="width: 100px; margin-top: 10px"
|
style="width: 100px; margin-top: 10px"
|
||||||
v-model="item.lease_date"
|
v-model="item.lease_date"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
size="small"
|
size="small"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
@change="onLeaseDateChange($event, item)"
|
@change="onLeaseDateChange($event, item)"
|
||||||
|
/> -->
|
||||||
|
<CustomDatePickerButton
|
||||||
|
:modelValue="item.lease_date"
|
||||||
|
:companyIndex="index"
|
||||||
|
:goodsIndex="index"
|
||||||
|
type="primary"
|
||||||
|
size="large"
|
||||||
|
placeholder="选择日期"
|
||||||
|
@onLeaseDateChange="onLeaseDateChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -119,7 +133,7 @@
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button
|
||||||
@click="onDeleteGoods(index)"
|
@click="onDeleteGoods(index)"
|
||||||
type="text"
|
link
|
||||||
style="color: #ff4800; font-weight: bold"
|
style="color: #ff4800; font-weight: bold"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
|
|
@ -175,6 +189,7 @@ import Header from '../../components/header/index.vue'
|
||||||
import FooterInfo from '../../components/FooterInfo/index.vue'
|
import FooterInfo from '../../components/FooterInfo/index.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { getBookCarDetailByMaId, submitBookCarApi } from '../../http/api/order/index'
|
import { getBookCarDetailByMaId, submitBookCarApi } from '../../http/api/order/index'
|
||||||
|
import CustomDatePickerButton from '../cart/components/date-picker-button.vue'
|
||||||
import { getDetail } from 'http/api/equip'
|
import { getDetail } from 'http/api/equip'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
|
@ -196,24 +211,14 @@ const getOrderListData = async () => {
|
||||||
orderList.value = []
|
orderList.value = []
|
||||||
// orderList.value = res.data
|
// orderList.value = res.data
|
||||||
|
|
||||||
const { companyName, person, picUrl, personPhone, deviceName, code, typeName, dayLeasePrice } =
|
|
||||||
res.data
|
|
||||||
|
|
||||||
// 组装参数
|
// 组装参数
|
||||||
const orderInfo = {
|
const orderInfo = {
|
||||||
companyName,
|
|
||||||
person,
|
|
||||||
personPhone,
|
|
||||||
deviceName,
|
|
||||||
code,
|
|
||||||
typeName,
|
|
||||||
picUrl,
|
|
||||||
rentBeginTime: '',
|
rentBeginTime: '',
|
||||||
rentEndTime: '',
|
rentEndTime: '',
|
||||||
lease_date: '',
|
lease_date: '',
|
||||||
dayLeasePrice,
|
|
||||||
days: 0,
|
days: 0,
|
||||||
num: 1,
|
num: 1,
|
||||||
|
...res.data,
|
||||||
}
|
}
|
||||||
|
|
||||||
orderList.value.push(orderInfo)
|
orderList.value.push(orderInfo)
|
||||||
|
|
@ -237,9 +242,22 @@ onMounted(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 日期change事件
|
// 日期change事件
|
||||||
const onLeaseDateChange = (e: any, item: any) => {
|
// const onLeaseDateChange = (e: any, item: any) => {
|
||||||
item.lease_date_string = `${e[0]}至${e[1]}`
|
// item.lease_date_string = `${e[0]}至${e[1]}`
|
||||||
item.lease_day = moment(e[1]).diff(e[0], 'day')
|
// item.lease_day = moment(e[1]).diff(e[0], 'day')
|
||||||
|
// }
|
||||||
|
const onLeaseDateChange = (value: any, companyIndex: number, goodsIndex: number) => {
|
||||||
|
orderList.value.forEach((e: any) => {
|
||||||
|
if (!value) {
|
||||||
|
e.rentBeginTime = ''
|
||||||
|
e.rentEndTime = ''
|
||||||
|
e.days = 0
|
||||||
|
} else {
|
||||||
|
e.rentBeginTime = value[0]
|
||||||
|
e.rentEndTime = value[1]
|
||||||
|
e.days = moment(value[1]).diff(value[0], 'day')
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除按钮
|
// 删除按钮
|
||||||
|
|
@ -283,13 +301,13 @@ const allChecked = computed(() => {
|
||||||
|
|
||||||
// 已勾选的装备数量
|
// 已勾选的装备数量
|
||||||
const amountDevice = computed(() => {
|
const amountDevice = computed(() => {
|
||||||
let amountNum = 0
|
// let amountNum = 0
|
||||||
orderList.value.forEach((e) => {
|
// orderList.value.forEach((e) => {
|
||||||
if (e.isChecked) {
|
// if (e.isChecked) {
|
||||||
amountNum++
|
// amountNum++
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
return amountNum
|
return 1
|
||||||
})
|
})
|
||||||
// 已勾选的装备数量
|
// 已勾选的装备数量
|
||||||
const amountDeviceList = computed(() => {
|
const amountDeviceList = computed(() => {
|
||||||
|
|
@ -306,26 +324,27 @@ const amountDeviceList = computed(() => {
|
||||||
const orderAmountPice = computed(() => {
|
const orderAmountPice = computed(() => {
|
||||||
let orderAmountPice = 0
|
let orderAmountPice = 0
|
||||||
orderList.value.forEach((e) => {
|
orderList.value.forEach((e) => {
|
||||||
if (e.isChecked) {
|
// if (e.isChecked) {
|
||||||
orderAmountPice = e.goods_num * e.dayLeasePrice * e.lease_day + orderAmountPice
|
|
||||||
}
|
// }
|
||||||
|
orderAmountPice = e.num * e.dayLeasePrice * e.days
|
||||||
})
|
})
|
||||||
return orderAmountPice
|
return orderAmountPice
|
||||||
})
|
})
|
||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const onCartSubmit = async () => {
|
const onCartSubmit = async () => {
|
||||||
ElMessage.closeAll()
|
// ElMessage.closeAll()
|
||||||
if (amountDevice.value < 1) {
|
// if (amountDevice.value < 1) {
|
||||||
ElMessage({
|
// ElMessage({
|
||||||
showClose: false,
|
// showClose: false,
|
||||||
message: '请选择装备',
|
// message: '请选择装备',
|
||||||
type: 'error',
|
// type: 'error',
|
||||||
})
|
// })
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
console.log(amountDeviceList.value[0].lease_date == undefined)
|
// console.log(amountDeviceList.value[0].lease_date == undefined)
|
||||||
if (amountDeviceList.value[0].lease_date == undefined) {
|
if (orderList.value[0].days < 1) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
showClose: false,
|
showClose: false,
|
||||||
message: '请选择租期',
|
message: '请选择租期',
|
||||||
|
|
@ -342,25 +361,21 @@ const onCartSubmit = async () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('提交订单')
|
const orderInfo = orderList.value[0]
|
||||||
// 组装参数
|
const submitInfo = {
|
||||||
const detailsList = amountDeviceList.value.map((e: any) => {
|
maId: orderInfo.maId,
|
||||||
console.log(e)
|
id: orderInfo.id,
|
||||||
return {
|
rentBeginTime: orderInfo.rentBeginTime + ' ' + '00:00:00',
|
||||||
maId: e.maId,
|
rentEndTime: orderInfo.rentEndTime + ' ' + '00:00:00',
|
||||||
id: e.id,
|
manageType: orderInfo.manageType,
|
||||||
rentBeginTime: e.lease_date[0] + ' ' + '00:00:00',
|
days: orderInfo.days,
|
||||||
rentEndTime: e.lease_date[1] + ' ' + '00:00:00',
|
num: orderInfo.num,
|
||||||
manageType: e.manageType,
|
costs: orderInfo.num * orderInfo.days * orderInfo.dayLeasePrice,
|
||||||
days: e.lease_day,
|
|
||||||
num: e.goods_num,
|
|
||||||
costs: e.goods_num * e.dayLeasePrice * e.lease_day,
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
const submitParams = {
|
const submitParams = {
|
||||||
cost: orderAmountPice.value,
|
cost: orderAmountPice.value,
|
||||||
detailsList,
|
detailsList: [submitInfo],
|
||||||
}
|
}
|
||||||
console.log('submitParams', submitParams)
|
console.log('submitParams', submitParams)
|
||||||
const res: any = await submitBookCarApi(submitParams)
|
const res: any = await submitBookCarApi(submitParams)
|
||||||
|
|
@ -370,10 +385,16 @@ const onCartSubmit = async () => {
|
||||||
message: '提交成功',
|
message: '提交成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
allKey.value++
|
userStore.editcurrentMenuItem('goodsManagement')
|
||||||
|
setTimeout(() => {
|
||||||
router.push({
|
router.push({
|
||||||
path: `/equipDetail/${pageParams.maId}`,
|
name: 'my-user',
|
||||||
})
|
})
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
// router.push({
|
||||||
|
// path: `/equipDetail/${pageParams.maId}`,
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,11 @@ const menuList: any = computed(() => {
|
||||||
return allList.filter((e) => e.permission.includes(isType.value))
|
return allList.filter((e) => e.permission.includes(isType.value))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const activeItem = computed(() => {
|
||||||
|
return store.currentMenuItem
|
||||||
|
})
|
||||||
router.push({
|
router.push({
|
||||||
name: menuList.value[0].name,
|
name: activeItem.value,
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue