Merge branch 'dev-songyang'

This commit is contained in:
songyang 2023-12-12 09:23:53 +08:00
commit 164f4d64d3
8 changed files with 820 additions and 796 deletions

1
.gitignore vendored
View File

@ -29,3 +29,4 @@ coverage
*.sw? *.sw?
.prettierrc.js .prettierrc.js
auto-imports.d.ts auto-imports.d.ts
components.d.ts

4
components.d.ts vendored
View File

@ -12,11 +12,15 @@ declare module 'vue' {
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
ElCol: typeof import('element-plus/es')['ElCol'] ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
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']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage'] ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElRow: typeof import('element-plus/es')['ElRow'] ElRow: typeof import('element-plus/es')['ElRow']
ElTag: typeof import('element-plus/es')['ElTag']
EquipCard: typeof import('./src/components/equipCard.vue')['default'] EquipCard: typeof import('./src/components/equipCard.vue')['default']
EquipDetailTable: typeof import('./src/components/equipDetailTable.vue')['default'] EquipDetailTable: typeof import('./src/components/equipDetailTable.vue')['default']
FooterInfo: typeof import('./src/components/FooterInfo/index.vue')['default'] FooterInfo: typeof import('./src/components/FooterInfo/index.vue')['default']

View File

@ -4,11 +4,11 @@
const navMenuList = [ const navMenuList = [
{ name: '首页', routerName: 'home' }, { name: '首页', routerName: 'home' },
{ name: '自选直租', routerName: 'equipList' }, { name: '自选直租', routerName: 'equipList' },
{ name: '寻源比价', routerName: '/home' }, { name: '寻源比价', routerName: 'parity' },
{ name: '二手交易', routerName: '/home' }, { name: '二手交易', routerName: '/home' },
{ name: '保险业务', routerName: '/home' }, { name: '保险业务', routerName: '/home' },
{ name: '检验业务', routerName: '/home' }, { name: '检验业务', routerName: '/home' },
{ name: '企业专区', routerName: '/home' } { name: '企业专区', routerName: 'enterpriseZone' }
] ]
const navMenuClick = (name: any) => { const navMenuClick = (name: any) => {

View File

@ -87,7 +87,7 @@
<span v-if="!isShowLogout"> <span v-if="!isShowLogout">
<a class="a-border-none" @click="$router.push('/login')">登录</a> <a class="a-border-none" @click="$router.push('/login')">登录</a>
<span style="margin: 0 3px">/</span> <span style="margin: 0 3px">/</span>
<a>注册</a> <a @click="$router.push('/register')">注册</a>
</span> </span>
<span v-else> <span v-else>
<a @click="handlerLogout">退出登录</a> <a @click="handlerLogout">退出登录</a>

View File

@ -122,6 +122,28 @@ const routes: Array<RouteRecordRaw> = [
}, },
component: () => import('views/collect/index.vue') component: () => import('views/collect/index.vue')
}, },
// 寻源比价页面
{
path: '/parity',
name: 'parity',
meta: {
title: '寻源比较',
isLogin: true,
AuthFlag: false
},
component: () => import('views/parity/index.vue')
},
// 企业专区页面
{
path: '/enterpriseZone',
name: 'enterpriseZone',
meta: {
title: '企业专区',
isLogin: true,
AuthFlag: false
},
component: () => import('views/enterpriseZone/index.vue')
},
// 个人中心 // 个人中心
{ {
path: '/myuser', // 主路由地址 path: '/myuser', // 主路由地址

View File

@ -0,0 +1,7 @@
<script setup lang="ts"></script>
<template>
<div>企业专区---</div>
</template>
<style></style>

View File

@ -9,20 +9,26 @@
<div class="equipInfo"> <div class="equipInfo">
<div class="left"> <div class="left">
<div class="title"> <div class="title">
<div class="name">{{ pageData.modelName }}{{ pageData.deviceName }}</div> <div class="name">
{{ pageData.modelName }}{{ pageData.deviceName }}
</div>
<div class="tag"> <div class="tag">
<div class="item otherItem">{{ pageData.maStatusStr }}</div> <div class="item otherItem">{{ pageData.maStatusStr }}</div>
<div class="item ">已审核</div> <div class="item">已审核</div>
</div> </div>
</div> </div>
<div class="viewNnum">浏览{{ pageData.searchNum }}</div> <div class="viewNnum">浏览{{ pageData.searchNum }}</div>
<div class="infoBox"> <div class="infoBox">
<div class="item" v-for="(v, i) in equipBaseInfoList" :key="i"> <div class="item" v-for="(v, i) in equipBaseInfoList" :key="i">
<div class="label">{{ v.label }}</div> <div class="label">{{ v.label }}</div>
<div class="value">{{ <div class="value">
v.key.split(',').map(key => { {{
v.key
.split(',')
.map((key) => {
return pageData[key] return pageData[key]
}).join('') })
.join('')
}} }}
</div> </div>
</div> </div>
@ -35,29 +41,27 @@
<span>{{ pageData.monthLeasePrice }}</span> <span>{{ pageData.monthLeasePrice }}</span>
/ /
</div> </div>
<div class="collect" v-authBtn="()=>collectChange" > <div class="collect" v-authBtn="() => collectChange">
<el-icon class="no" v-show="!isCollect"> <el-icon class="no" v-show="!isCollect">
<Star/> <Star />
</el-icon> </el-icon>
<el-icon class="yes" v-show="isCollect"> <el-icon class="yes" v-show="isCollect">
<StarFilled/> <StarFilled />
</el-icon> </el-icon>
{{ isCollect ? '装备已收藏' : '收藏装备' }} {{ isCollect ? '装备已收藏' : '收藏装备' }}
</div> </div>
</div> </div>
<div class="options"> <div class="options">
<div class="item contact" @click="openPhone">联系商家</div> <div class="item contact" @click="openPhone">联系商家</div>
<div class="item applyFor" v-authBtn="()=>openLease">我要租</div> <div class="item applyFor" v-authBtn="() => openLease">我要租</div>
</div> </div>
</div> </div>
</div> </div>
<div class="businessInfo"> <div class="businessInfo">
<img class="bgCar" src="@/assets/img/equipDetail/gouwu.png"/> <img class="bgCar" src="@/assets/img/equipDetail/gouwu.png" />
<div class="business"> <div class="business">
<img <img src="@/assets/img/bns-logo.png" class="avatar" />
src="@/assets/img/bns-logo.png"
class="avatar"/>
<div class="fonts"> <div class="fonts">
<div class="name">{{ pageData.companyName }}</div> <div class="name">{{ pageData.companyName }}</div>
<div class="other"> <div class="other">
@ -78,9 +82,10 @@
<div class="list publicContent"> <div class="list publicContent">
<div class="item" v-for="(v, i) in equipDetailKeyList" :key="i"> <div class="item" v-for="(v, i) in equipDetailKeyList" :key="i">
<div class="label">{{ v.label }}</div> <div class="label">{{ v.label }}</div>
<div :class="v.fn ? 'fnValue' : 'value'" @click="handelDetailListClick(v.fn,pageData[v.arg])">{{ <div
pageData[v.key] :class="v.fn ? 'fnValue' : 'value'"
}} @click="handelDetailListClick(v.fn, pageData[v.arg])">
{{ pageData[v.key] }}
</div> </div>
</div> </div>
</div> </div>
@ -89,7 +94,7 @@
<div class="publicTitle">装备外观</div> <div class="publicTitle">装备外观</div>
<div class="publicLine"></div> <div class="publicLine"></div>
<div class="urlList publicContent"> <div class="urlList publicContent">
<img :src="v" v-for="(v, i) in (pageData.pictures || [])" :key="i"/> <img :src="v" v-for="(v, i) in pageData.pictures || []" :key="i" />
</div> </div>
</div> </div>
<div class="recommend"> <div class="recommend">
@ -99,13 +104,14 @@
<div class="change" @click="randomHotList">换一批</div> <div class="change" @click="randomHotList">换一批</div>
</div> </div>
<div class="content"> <div class="content">
<equip-card class="item" <equip-card
class="item"
@on-click="goDetail" @on-click="goDetail"
v-for="(v, i) in hotList" v-for="(v, i) in hotList"
:key="i" :key="i"
:url="v.picUrl" :url="v.picUrl"
:name="`${v.modelName}${v.deviceName}`" :name="`${v.modelName}${v.deviceName}`"
:tags="[v.maStatusStr,v.cityStr]" :tags="[v.maStatusStr, v.cityStr]"
:company="v.companyName" :company="v.companyName"
:price="v.monthLeasePrice" :price="v.monthLeasePrice"
timeUnit="月" timeUnit="月"
@ -118,8 +124,7 @@
title="填写租赁信息" title="填写租赁信息"
lock-scroll lock-scroll
class="dialoglease" class="dialoglease"
width="60%" width="60%">
>
<el-config-provider :locale="zhCn"> <el-config-provider :locale="zhCn">
<el-form <el-form
ref="ruleFormRef" ref="ruleFormRef"
@ -127,20 +132,20 @@
:rules="rules" :rules="rules"
label-width="120px" label-width="120px"
class="demo-ruleForm" class="demo-ruleForm"
status-icon status-icon>
>
<el-row> <el-row>
<el-col :span="15"> <el-col :span="15">
<el-form-item label="设备进场地址" prop="address"> <el-form-item label="设备进场地址" prop="address">
<el-cascader :props="addressCascader" v-model="ruleForm.address"/> <el-cascader :props="addressCascader" v-model="ruleForm.address" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="15"> <el-col :span="15">
<el-form-item label="详细地址" prop="detailAddress"> <el-form-item label="详细地址" prop="detailAddress">
<el-input placeholder="请输入地址" v-model="ruleForm.detailAddress"></el-input> <el-input
placeholder="请输入地址"
v-model="ruleForm.detailAddress"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -151,20 +156,25 @@
v-model="ruleForm.entryTime" v-model="ruleForm.entryTime"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
type="date" type="date"
placeholder="请选择" placeholder="请选择" />
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="15"> <el-col :span="15">
<el-form-item label="工期时长" prop="duration"> <el-form-item label="工期时长" prop="duration">
<el-input v-model.number="ruleForm.duration" type="number" placeholder="请输入工期时长"> <el-input
v-model.number="ruleForm.duration"
type="number"
placeholder="请输入工期时长">
<template #append> <template #append>
<el-select v-model="ruleForm.durationUnit" placeholder="Select" <el-select
style="width: 85px" @change="priceChange"> v-model="ruleForm.durationUnit"
<el-option label="天" value="0"/> placeholder="Select"
<el-option label="月" value="1"/> style="width: 85px"
@change="priceChange">
<el-option label="天" value="0" />
<el-option label="月" value="1" />
</el-select> </el-select>
</template> </template>
</el-input> </el-input>
@ -178,24 +188,16 @@
<el-radio-button :label="1" :disabled="!pageData.isOperator"> <el-radio-button :label="1" :disabled="!pageData.isOperator">
</el-radio-button> </el-radio-button>
<el-radio-button :label="0"> <el-radio-button :label="0"></el-radio-button>
</el-radio-button>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="发票类型" prop="invoiceType"> <el-form-item label="发票类型" prop="invoiceType">
<el-radio-group v-model="ruleForm.invoiceType"> <el-radio-group v-model="ruleForm.invoiceType">
<el-radio-button label=""> <el-radio-button label="">不需要</el-radio-button>
不需要 <el-radio-button :label="1">增值税普票</el-radio-button>
</el-radio-button> <el-radio-button :label="2">增值税专票</el-radio-button>
<el-radio-button :label="1">
增值税普票
</el-radio-button>
<el-radio-button :label="2">
增值税专票
</el-radio-button>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -203,7 +205,10 @@
<el-row> <el-row>
<el-col :span="15"> <el-col :span="15">
<el-form-item label="项目说明" prop="projectDescription"> <el-form-item label="项目说明" prop="projectDescription">
<el-input placeholder="请填写项目说明" rows="5" type="textarea" <el-input
placeholder="请填写项目说明"
rows="5"
type="textarea"
v-model="ruleForm.projectDescription"></el-input> v-model="ruleForm.projectDescription"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -211,71 +216,73 @@
</el-form> </el-form>
</el-config-provider> </el-config-provider>
<equipDetailTable <equipDetailTable
:price="`${ruleForm.durationUnit == '1' ? pageData.monthLeasePrice : pageData.dayLeasePrice }`" :price="`${
ruleForm.durationUnit == '1' ? pageData.monthLeasePrice : pageData.dayLeasePrice
}`"
:name="`${pageData.modelName}${pageData.deviceName}`" :name="`${pageData.modelName}${pageData.deviceName}`"
:company="pageData.companyName" :company="pageData.companyName"
:url="pageData.picUrl" :url="pageData.picUrl"
:brand="pageData.brand" :brand="pageData.brand"
:code="pageData.code" :code="pageData.code"
:group="pageData.groupName" :group="pageData.groupName"
:position="`${pageData.provinceStr}${pageData.cityStr || ''}${pageData.areaStr || ''}`" :position="`${pageData.provinceStr}${pageData.cityStr || ''}${
pageData.areaStr || ''
}`"
:specifications="pageData.specification" :specifications="pageData.specification"
:type="pageData.typeName" :type="pageData.typeName"
:unit="ruleForm.durationUnit == '1' ? '月' : '天'" :unit="ruleForm.durationUnit == '1' ? '月' : '天'"></equipDetailTable>
></equipDetailTable>
<div class="countPrice"> <div class="countPrice">
合计总价<span>{{ priceChange }}</span> 合计总价
<span>{{ priceChange }}</span>
</div> </div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="submit(ruleFormRef)"> <el-button type="primary" @click="submit(ruleFormRef)">提交</el-button>
提交
</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<el-dialog <el-dialog v-model="dialogPhone" title="服务电话" width="30%">
v-model="dialogPhone" <div style="font-size: 16px; font-weight: 600">
title="服务电话"
width="30%"
>
<div style="font-size: 16px;font-weight: 600;">
{{ pageData.authPhone }} {{ pageData.authPhone }}
</div> </div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="openPhone"> <el-button type="primary" @click="openPhone">确认</el-button>
确认
</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import ShowImg from './comoonents/showImg.vue' import ShowImg from './comoonents/showImg.vue'
import {computed, reactive, ref} from 'vue' import { computed, reactive, ref } from 'vue'
import EquipCard from 'components/equipCard.vue' import EquipCard from 'components/equipCard.vue'
import {getDetail, getHotList, equipCollect, apiSubmitLease, apiGetAddressList} from "@/http/api/equip" import {
import {useRoute, useRouter} from "vue-router"; getDetail,
import Navmenu from '@/components/Navmenu/index.vue' getHotList,
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' equipCollect,
import equipDetailTable from '@/components/equipDetailTable.vue' apiSubmitLease,
import {ElMessage} from "element-plus"; apiGetAddressList
} from '@/http/api/equip'
import { useRoute, useRouter } from 'vue-router'
import Navmenu from '@/components/Navmenu/index.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import equipDetailTable from '@/components/equipDetailTable.vue'
import { ElMessage } from 'element-plus'
import {mainStore} from '@/store/main' import { mainStore } from '@/store/main'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const ruleFormRef = ref() const ruleFormRef = ref()
const store = mainStore() const store = mainStore()
const pageParams = route.params const pageParams = route.params
// //
const equipBaseInfoList = reactive([ const equipBaseInfoList = reactive([
{ {
label: '设备规格', label: '设备规格',
key: 'specification' key: 'specification'
@ -296,9 +303,9 @@ const equipBaseInfoList = reactive([
label: '更新时间', label: '更新时间',
key: 'updateTime' key: 'updateTime'
} }
]) ])
// //
const businessList = reactive([ const businessList = reactive([
{ {
label: '入驻时间', label: '入驻时间',
key: 'companyCreateTime', key: 'companyCreateTime',
@ -309,10 +316,10 @@ const businessList = reactive([
key: 'companyUpNum', key: 'companyUpNum',
unit: '台' unit: '台'
} }
]) ])
//map //map
const equipDetailKeyList = reactive([ const equipDetailKeyList = reactive([
{ {
label: '装备编号', label: '装备编号',
key: 'code', key: 'code',
@ -385,27 +392,26 @@ const equipDetailKeyList = reactive([
fn: 'openPdf', fn: 'openPdf',
arg: 'insurancePdf' arg: 'insurancePdf'
} }
]) ])
// //
const dialogPhone = ref(false) const dialogPhone = ref(false)
//
const pageData = ref({})
// //
const pageData = ref({}) const dialoglease = ref(false)
// //
const dialoglease = ref(false) const isCollect = ref(false)
// //
const isCollect = ref(false) const hotList = ref([])
//
const showHotList = ref([])
// const checkDuration = (rule, value, callback) => {
const hotList = ref([])
//
const showHotList = ref([])
const checkDuration = (rule, value, callback) => {
if ((value == '' || value == null) && value !== 0) { if ((value == '' || value == null) && value !== 0) {
return callback(new Error('请输入工期时长')) return callback(new Error('请输入工期时长'))
} else if (value <= 0) { } else if (value <= 0) {
@ -413,51 +419,35 @@ const checkDuration = (rule, value, callback) => {
} else { } else {
return callback() return callback()
} }
} }
// //
const ruleForm = ref({ const ruleForm = ref({
address: [],// address: [], //
detailAddress: '',// detailAddress: '', //
entryTime: '',// entryTime: '', //
duration: null,// duration: null, //
durationUnit: '0',// 0 > 1 -> durationUnit: '0', // 0 > 1 ->
machinist: 0,// machinist: 0, //
invoiceType: '',// invoiceType: '', //
projectDescription: ''// projectDescription: '' //
}) })
const rules = reactive({ const rules = reactive({
address: [ address: [{ required: true, message: '请输入进场地址', trigger: 'blur' }],
{required: true, message: '请输入进场地址', trigger: 'blur'} detailAddress: [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
], entryTime: [{ required: true, message: '请选择进场时间', trigger: 'blur' }],
detailAddress: [ duration: [{ validator: checkDuration, trigger: 'blur' }],
{required: true, message: '请输入详细地址', trigger: 'blur'} machinist: [{ required: true, message: '请输入进场地址', trigger: 'blur' }],
], invoiceType: [],
entryTime: [ projectDescription: [{ required: true, message: '请输入项目说明', trigger: 'blur' }]
{required: true, message: '请选择进场时间', trigger: 'blur'}, })
],
duration: [
{validator: checkDuration, trigger: 'blur'}
], //
machinist: [ const openLease = () => {
{required: true, message: '请输入进场地址', trigger: 'blur'}
],
invoiceType: [
],
projectDescription: [
{required: true, message: '请输入项目说明', trigger: 'blur'}
],
})
//
const openLease = () => {
dialoglease.value = true dialoglease.value = true
} }
// //
const collectChange = async () => { const collectChange = async () => {
isCollect.value = !isCollect.value isCollect.value = !isCollect.value
const params = { const params = {
maId: pageData.value.maId, maId: pageData.value.maId,
@ -471,10 +461,10 @@ const collectChange = async () => {
message: `装备${isCollect.value ? '收藏' : '取消收藏'}成功` message: `装备${isCollect.value ? '收藏' : '取消收藏'}成功`
}) })
} }
} }
// //
const priceChange = computed(() => { const priceChange = computed(() => {
// //
let count = 0 let count = 0
// //
@ -500,31 +490,29 @@ const priceChange = computed(() => {
count = unitPrice * duration + jsPrice * duration count = unitPrice * duration + jsPrice * duration
return Math.round(count * 100) / 100 || 0 return Math.round(count * 100) / 100 || 0
}) })
// //
const openPhone = () => { const openPhone = () => {
dialogPhone.value = !dialogPhone.value dialogPhone.value = !dialogPhone.value
}
} // pdf
const openPdf = (name) => {
// pdf
const openPdf = (name) => {
if (name) { if (name) {
window.open(name) window.open(name)
} }
} }
const that = { const that = {
openPdf openPdf
} }
const addressCascader = {
const addressCascader = {
lazy: true, lazy: true,
label: 'name', label: 'name',
value: 'code', value: 'code',
lazyLoad: async (node, resolve) => { lazyLoad: async (node, resolve) => {
const {level, data} = node const { level, data } = node
let nodes = [] let nodes = []
if (level == 0) { if (level == 0) {
const arr = await getAddressData() const arr = await getAddressData()
@ -541,29 +529,28 @@ const addressCascader = {
} }
resolve(nodes) resolve(nodes)
} }
} }
//
// const getAddressData = async (code = '') => {
const getAddressData = async (code = '') => {
let params = {} let params = {}
if (code) { if (code) {
params = {code} params = { code }
} }
const res = await apiGetAddressList(params) const res = await apiGetAddressList(params)
return res.data || [] return res.data || []
} }
const handelDetailListClick = (fnName, arg) => { const handelDetailListClick = (fnName, arg) => {
if (fnName) { if (fnName) {
that[fnName](arg) that[fnName](arg)
} }
} }
// //
const getData = async () => { const getData = async () => {
const res = await getDetail(pageParams.id) const res = await getDetail(pageParams.id)
res.data.isOperatorCn = res.data.isOperator ? '是' : '否' res.data.isOperatorCn = res.data.isOperator ? '是' : '否'
res.data.isInsurancePdf = res.data.insurancePdf ? '点击查看' : '暂无' res.data.isInsurancePdf = res.data.insurancePdf ? '点击查看' : '暂无'
@ -571,10 +558,10 @@ const getData = async () => {
isCollect.value = res.data.collectId ? true : false isCollect.value = res.data.collectId ? true : false
pageData.value = res.data pageData.value = res.data
} }
// //
const gethotList = async () => { const gethotList = async () => {
const params = { const params = {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
@ -582,36 +569,36 @@ const gethotList = async () => {
const res = await getHotList(params) const res = await getHotList(params)
hotList.value = res.rows hotList.value = res.rows
randomHotList() randomHotList()
} }
const randomHotList = () => { const randomHotList = () => {
showHotList.value = random().map(key => { showHotList.value = random().map((key) => {
return hotList.value[key] return hotList.value[key]
}) })
}
const random = () => {
let numbers = new Set();
while (numbers.size < 3) {
numbers.add(Math.floor(Math.random() * 10));
} }
return Array.from(numbers);
}
// const random = () => {
const goDetail = (val) => { let numbers = new Set()
while (numbers.size < 3) {
numbers.add(Math.floor(Math.random() * 10))
}
return Array.from(numbers)
}
//
const goDetail = (val) => {
router.push({ router.push({
path: `/equipDetail/${val.id}` path: `/equipDetail/${val.id}`
}) })
} }
// //
const submit = async (Ref) => { const submit = async (Ref) => {
if(!Ref){ if (!Ref) {
return return
} }
await Ref.validate( async(valid, fields) => { await Ref.validate(async (valid, fields) => {
if(valid){ if (valid) {
const params = { const params = {
provinceId: ruleForm.value.address[0], provinceId: ruleForm.value.address[0],
cityId: ruleForm.value.address[1], cityId: ruleForm.value.address[1],
@ -625,7 +612,7 @@ const submit = async (Ref) => {
durationType: ruleForm.value.durationUnit, durationType: ruleForm.value.durationUnit,
cost: priceChange.value, cost: priceChange.value,
maId: pageData.value.maId, maId: pageData.value.maId,
orderCompany:store.userInfo.companyId orderCompany: store.userInfo.companyId
} }
const res = await apiSubmitLease(params) const res = await apiSubmitLease(params)
@ -638,36 +625,33 @@ const submit = async (Ref) => {
}) })
} }
dialoglease.value = false dialoglease.value = false
}else { } else {
} }
}) })
}
const init = async () => {
}
const init = async () => {
await gethotList() await gethotList()
await getData() await getData()
} }
init() init()
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
:deep(.dialoglease) { :deep(.dialoglease) {
margin: 10px auto 0 !important; margin: 10px auto 0 !important;
min-width: 855px !important; min-width: 855px !important;
} }
:deep(.el-form-item) { :deep(.el-form-item) {
display: flex; display: flex;
width: 100%; width: 100%;
.el-form-item__content { .el-form-item__content {
flex: 1; flex: 1;
} }
} }
.countPrice { .countPrice {
padding: 10px; padding: 10px;
text-align: right; text-align: right;
@ -675,9 +659,9 @@ init()
color: red; color: red;
font-weight: 600; font-weight: 600;
} }
} }
.equipDetail { .equipDetail {
user-select: none; user-select: none;
margin-top: 20px; margin-top: 20px;
@ -707,7 +691,6 @@ init()
width: 62%; width: 62%;
.title { .title {
.name { .name {
font-size: 24px; font-size: 24px;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
@ -1006,5 +989,5 @@ init()
} }
} }
} }
} }
</style> </style>

View File

@ -0,0 +1,7 @@
<script setup lang="ts"></script>
<template>
<div>寻源比价---</div>
</template>
<style></style>