Compare commits

..

No commits in common. "dbf31c9cb17bf6697572a17a92d4d8e986ac1502" and "84f2b56ecee88788a525f8720838148024b72d3f" have entirely different histories.

8 changed files with 23 additions and 70 deletions

8
components.d.ts vendored
View File

@ -11,22 +11,30 @@ declare module 'vue' {
ElCarousel: typeof import('element-plus/es')['ElCarousel']
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
ElCascader: typeof import('element-plus/es')['ElCascader']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
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']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTag: typeof import('element-plus/es')['ElTag']
ElUpload: typeof import('element-plus/es')['ElUpload']
EquipCard: typeof import('./src/components/equipCard.vue')['default']
EquipDetailTable: typeof import('./src/components/equipDetailTable.vue')['default']
FooterInfo: typeof import('./src/components/FooterInfo/index.vue')['default']

4
env/.env.dev vendored
View File

@ -5,9 +5,9 @@ VITE_BUILD_MODE = 'dev'
VITE_API_URL = '/proxyApi'
# 开发环境接口地址
VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
# VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
# VITE_proxyTarget = 'http://10.40.92.186:8080' # 赵福海 (登录)
VITE_proxyTarget = 'http://10.40.92.186:8080' # 赵福海 (登录)
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
# VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证)

View File

@ -29,7 +29,7 @@
</el-table-column>
<el-table-column prop="name" label="租金" min-width="80" >
<template #default="scope">
{{ scope.row.price }}/{{ scope.row.unit }}
{{ scope.row.price }}{{ scope.row.unit }}
</template>
</el-table-column>
<el-table-column prop="company" label="供应商" min-width="120" />

View File

@ -10,7 +10,6 @@ import router from './router'
import 'element-plus/dist/index.css'
import './style/css/reset.css'
import registerDirectives from 'utils/directive'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component)
@ -20,6 +19,3 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.use(pinia)
app.use(router)
app.mount('#app')
registerDirectives(app)

View File

@ -1,27 +0,0 @@
import { ElMessage } from "element-plus"
import { useStore } from 'store/main'
import router from "@/router"
export default function (app: any) {
app.directive("authBtn", {
mounted(el: any, binding: any, vnode: any) {
console.log("binding", binding.value)
const store = useStore()
if (!store.token) {
el.addEventListener("click", () => {
ElMessage({
type: "warning",
message: '暂无访问权限'
})
setTimeout(() => {
router.push('/login')
}, 300);
})
}else{
el.addEventListener("click", binding.value())
}
}
})
}

View File

@ -1,5 +0,0 @@
import registerFocus from './authBtn'; // 获取焦点
export default function registerDirectives(app: any) {
registerFocus(app);
}

View File

@ -12,7 +12,7 @@
<div class="name">{{ pageData.modelName }}{{ pageData.deviceName }}</div>
<div class="tag">
<div class="item">{{ pageData.maStatusStr }}</div>
<div class="item otherItem">已审核</div>
<div class="item otherItem" v-if="pageData.isAudit == 1">已审核</div>
</div>
</div>
<div class="viewNnum">浏览{{ pageData.searchNum }}</div>
@ -35,7 +35,7 @@
<span>{{ pageData.monthLeasePrice }}</span>
/
</div>
<div class="collect" v-authBtn="()=>collectChange" >
<div class="collect" @click="collectChange">
<el-icon class="no" v-show="!isCollect">
<Star/>
</el-icon>
@ -47,7 +47,7 @@
</div>
<div class="options">
<div class="item contact" @click="openPhone">联系商家</div>
<div class="item applyFor" v-authBtn="()=>openLease">我要租</div>
<div class="item applyFor" @click="openLease">我要租</div>
</div>
</div>
</div>
@ -105,7 +105,7 @@
:key="i"
:url="v.picUrl"
:name="`${v.modelName}${v.deviceName}`"
:tags="[v.maStatusStr,v.cityStr]"
:tags="[v.maStatus,v.location]"
:company="v.companyName"
:price="v.monthLeasePrice"
timeUnit="月"
@ -211,7 +211,7 @@
</el-form>
</el-config-provider>
<equipDetailTable
:price="`${ruleForm.durationUnit == '1' ? pageData.monthLeasePrice : pageData.dayLeasePrice }`"
:price="`${priceChange}元`"
:name="`${pageData.modelName}${pageData.deviceName}`"
:company="pageData.companyName"
:url="pageData.picUrl"
@ -221,11 +221,8 @@
:position="pageData.location"
:specifications="pageData.specification"
:type="pageData.typeName"
:unit="ruleForm.durationUnit == '1' ? '月' : '天'"
unit=""
></equipDetailTable>
<div class="countPrice">
合计总价<span>{{ priceChange }}</span>
</div>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submit">
@ -333,7 +330,7 @@ const equipDetailKeyList = reactive([
arg: ''
},
{
label: '规格',
label: '规格/操作重量',
key: 'specification',
fn: '',
arg: ''
@ -611,8 +608,7 @@ const submit = async () => {
invoiceType: ruleForm.value.invoiceType,
description: ruleForm.value.projectDescription,
durationType: ruleForm.value.durationUnit,
cost: priceChange.value,
maId: pageData.value.maId
cost: priceChange.value
}
const res = await apiSubmitLease(params)
@ -648,16 +644,6 @@ init()
}
}
.countPrice {
padding: 10px;
text-align: right;
span {
color: red;
font-weight: 600;
}
}
.equipDetail {
user-select: none;
margin-top: 20px;
@ -936,19 +922,14 @@ init()
.label {
color: #8e8e8e;
width: 100px;
}
.value {
color: #333333;
flex: 1;
word-break: break-all;
font-family: 'fangsong';
}
.fnValue {
color: #0087cd;
font-family: 'fangsong';
}
}
}

View File

@ -329,13 +329,13 @@
}
.equip-pic {
height: 160px;
display: flex;
justify-content: space-between;
align-items: center;
li {
width: calc((100% - 30px) / 3);
&:nth-child(2n){
margin: 0 15px;
}
width: 340px;
}
}