代码优化

This commit is contained in:
BianLzhaoMin 2024-12-02 17:07:48 +08:00
parent 660353b1d7
commit 3a05dc4029
5 changed files with 23 additions and 7 deletions

3
components.d.ts vendored
View File

@ -20,6 +20,7 @@ declare module 'vue' {
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
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']
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']
ElHeader: typeof import('element-plus/es')['ElHeader'] ElHeader: typeof import('element-plus/es')['ElHeader']
@ -33,6 +34,8 @@ declare module 'vue' {
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElProgress: typeof import('element-plus/es')['ElProgress'] ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow'] ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElStep: typeof import('element-plus/es')['ElStep'] ElStep: typeof import('element-plus/es')['ElStep']

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://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' # 赵福海 ( 设备类型)

View File

@ -18,7 +18,13 @@
</li> </li>
<li> <li>
<span>{{ company }}</span> <span>{{ company }}</span>
<el-button class="lessee-btn" @click.stop="onHandelLessee">立即承租</el-button> <el-button
:style="isType == 1 ? 'opacity:0.5' : ''"
class="lessee-btn"
:disabled="isType == 1"
@click.stop="onHandelLessee"
>立即承租</el-button
>
</li> </li>
</ul> </ul>
</div> </div>
@ -29,6 +35,7 @@ import { useRoute, useRouter } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const isType = localStorage.getItem('rolesType')
const props: any = defineProps({ const props: any = defineProps({
url: { url: {
type: String, type: String,

View File

@ -9,6 +9,7 @@ import imgSrc from '@/assets/img/logo.png'
const store: any = mainStore() const store: any = mainStore()
const userStore = useStore() const userStore = useStore()
const cart = cartStore() const cart = cartStore()
const isType = localStorage.getItem('rolesType')
userStore.editMenuList(1) userStore.editMenuList(1)
@ -274,7 +275,7 @@ const onCarts = () => {
</a> </a>
</div> </div>
<div class="cart-icon" @click="onCarts"> <div class="cart-icon" @click="onCarts" v-if="isType == 2">
<el-badge :value="cartNum"> <el-badge :value="cartNum">
<svg class="icon" aria-hidden="true" style="width: 30px; height: 30px"> <svg class="icon" aria-hidden="true" style="width: 30px; height: 30px">
<use xlink:href="#icon-gouwuche2"></use> <use xlink:href="#icon-gouwuche2"></use>

View File

@ -71,7 +71,7 @@
<el-button <el-button
class="item_btn" class="item_btn"
type="primary" type="primary"
:disabled="pageData.isBookCar == 0" :disabled="pageData.isBookCar == 0 || isType == 1"
@click="onAddCart" @click="onAddCart"
>加入预约车</el-button >加入预约车</el-button
> >
@ -80,8 +80,12 @@
<div> <div>
<el-button <el-button
class="item_btn applyFor" class="item_btn applyFor"
:disabled="pageData.isBookCar == 0" :disabled="pageData.isBookCar == 0 || isType == 1"
:style="pageData.isBookCar == 0 ? 'opacity:0.5' : ''" :style="
pageData.isBookCar == 0 || isType == 1
? 'opacity:0.5'
: ''
"
style="background-color: #1abc9c" style="background-color: #1abc9c"
@click="onHandelLessee" @click="onHandelLessee"
> >
@ -380,6 +384,7 @@ const store = mainStore()
const ruleFormRef = ref() const ruleFormRef = ref()
const pageParams = route.params const pageParams = route.params
const cart = cartStore() const cart = cartStore()
const isType = localStorage.getItem('rolesType')
console.log(pageParams, 'pageParams') console.log(pageParams, 'pageParams')
const backPath = ref<any>('') const backPath = ref<any>('')