Compare commits
7 Commits
84f2b56ece
...
dbf31c9cb1
| Author | SHA1 | Date |
|---|---|---|
|
|
dbf31c9cb1 | |
|
|
74d44e2965 | |
|
|
f5232f86b2 | |
|
|
bb6b47ba84 | |
|
|
ebdadba43e | |
|
|
91da4dae26 | |
|
|
0d31a3c58f |
|
|
@ -11,30 +11,22 @@ 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']
|
||||
|
|
|
|||
|
|
@ -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' # 牛 (个人中心 基础信息企业申请认证)
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ 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)
|
||||
|
|
@ -19,3 +20,6 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|||
app.use(pinia)
|
||||
app.use(router)
|
||||
app.mount('#app')
|
||||
|
||||
|
||||
registerDirectives(app)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
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())
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import registerFocus from './authBtn'; // 获取焦点
|
||||
|
||||
export default function registerDirectives(app: any) {
|
||||
registerFocus(app);
|
||||
}
|
||||
|
|
@ -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" v-if="pageData.isAudit == 1">已审核</div>
|
||||
<div class="item otherItem">已审核</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewNnum">浏览{{ pageData.searchNum }}</div>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<span>{{ pageData.monthLeasePrice }}</span>
|
||||
/月
|
||||
</div>
|
||||
<div class="collect" @click="collectChange">
|
||||
<div class="collect" v-authBtn="()=>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" @click="openLease">我要租</div>
|
||||
<div class="item applyFor" v-authBtn="()=>openLease">我要租</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
:key="i"
|
||||
:url="v.picUrl"
|
||||
:name="`${v.modelName}${v.deviceName}`"
|
||||
:tags="[v.maStatus,v.location]"
|
||||
:tags="[v.maStatusStr,v.cityStr]"
|
||||
:company="v.companyName"
|
||||
:price="v.monthLeasePrice"
|
||||
timeUnit="月"
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
</el-form>
|
||||
</el-config-provider>
|
||||
<equipDetailTable
|
||||
:price="`${priceChange}元`"
|
||||
:price="`${ruleForm.durationUnit == '1' ? pageData.monthLeasePrice : pageData.dayLeasePrice }`"
|
||||
:name="`${pageData.modelName}${pageData.deviceName}`"
|
||||
:company="pageData.companyName"
|
||||
:url="pageData.picUrl"
|
||||
|
|
@ -221,8 +221,11 @@
|
|||
:position="pageData.location"
|
||||
:specifications="pageData.specification"
|
||||
:type="pageData.typeName"
|
||||
unit=""
|
||||
:unit="ruleForm.durationUnit == '1' ? '月' : '天'"
|
||||
></equipDetailTable>
|
||||
<div class="countPrice">
|
||||
合计总价:<span>{{ priceChange }}元</span>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">
|
||||
|
|
@ -330,7 +333,7 @@ const equipDetailKeyList = reactive([
|
|||
arg: ''
|
||||
},
|
||||
{
|
||||
label: '规格/操作重量',
|
||||
label: '规格',
|
||||
key: 'specification',
|
||||
fn: '',
|
||||
arg: ''
|
||||
|
|
@ -608,7 +611,8 @@ const submit = async () => {
|
|||
invoiceType: ruleForm.value.invoiceType,
|
||||
description: ruleForm.value.projectDescription,
|
||||
durationType: ruleForm.value.durationUnit,
|
||||
cost: priceChange.value
|
||||
cost: priceChange.value,
|
||||
maId: pageData.value.maId
|
||||
}
|
||||
|
||||
const res = await apiSubmitLease(params)
|
||||
|
|
@ -644,6 +648,16 @@ init()
|
|||
}
|
||||
}
|
||||
|
||||
.countPrice {
|
||||
padding: 10px;
|
||||
text-align: right;
|
||||
|
||||
span {
|
||||
color: red;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.equipDetail {
|
||||
user-select: none;
|
||||
margin-top: 20px;
|
||||
|
|
@ -922,14 +936,19 @@ init()
|
|||
|
||||
.label {
|
||||
color: #8e8e8e;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
word-break: break-all;
|
||||
font-family: 'fangsong';
|
||||
}
|
||||
|
||||
.fnValue {
|
||||
color: #0087cd;
|
||||
font-family: 'fangsong';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -329,13 +329,13 @@
|
|||
}
|
||||
|
||||
.equip-pic {
|
||||
height: 160px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
li {
|
||||
width: 340px;
|
||||
width: calc((100% - 30px) / 3);
|
||||
&:nth-child(2n){
|
||||
margin: 0 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue