This commit is contained in:
jjLv 2024-12-01 13:18:08 +08:00
commit f1e1132cd1
21 changed files with 790 additions and 219 deletions

8
components.d.ts vendored
View File

@ -17,12 +17,12 @@ declare module 'vue' {
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElCountdown: typeof import('element-plus/es')['ElCountdown']
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']
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
@ -33,14 +33,12 @@ declare module 'vue' {
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
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']
ElStep: typeof import('element-plus/es')['ElStep']
ElSteps: typeof import('element-plus/es')['ElSteps']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElUpload: typeof import('element-plus/es')['ElUpload']
EquipCard: typeof import('./src/components/equipCard.vue')['default']

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://192.168.2.246:28080' # 马帅
# VITE_proxyTarget = 'http://192.168.0.244:28580' # 马帅
# VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
VITE_proxyTarget = 'http://192.168.0.244:28580' # 马帅
# VITE_proxyTarget = 'http://192.168.2.129:18080' # 马帅
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/assets/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -1,9 +1,6 @@
<template>
<div class="equipCard" @click="cardClick">
<img
src="https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1"
alt=""
/>
<img :src="url" alt="" />
<div class="title">{{ name }}</div>
@ -88,7 +85,7 @@ const onHandelLessee = () => {
const onAddCart = async () => {
const addParams = {
maId: props.id,
orderCompany: props.companyId
orderCompany: props.companyId,
}
const res = await addBookCarApi(addParams)
if (res.code === 200) {
@ -105,7 +102,6 @@ const onAddCart = async () => {
})
}
}
</script>
<style lang="scss" scoped>
.equipCard {

View File

@ -94,15 +94,17 @@ const onRolesCheck = () => {
//
const onSelectRoles = (type: number) => {
if (type === 1) {
rolesName.value = '出租方'
rolesName.value = '1'
userStore.editMenuList(1)
userStore.editUserMenuList(1)
localStorage.setItem('rolesType', '1')
router.replace({ name: 'my-lease' })
} else {
rolesName.value = '承租方'
rolesName.value = '2'
userStore.editMenuList(2)
userStore.editUserMenuList(2)
localStorage.setItem('rolesType', '2')
router.replace({ name: 'my-lessee' })
}
isRolesSelect.value = false
}
@ -161,7 +163,16 @@ const onCarts = () => {
</div>
</div>
<div class="header-item">
<a @click="$router.push({ name: 'my-user' })">个人中心</a>
<a
@click="
() => {
rolesName == 1
? router.push({ name: 'my-lease' })
: router.push({ name: 'my-lessee' })
}
"
>个人中心</a
>
</div>
<div class="header-item last-item">
<img src="../../assets/img/home/phone.png" alt="" />

View File

@ -10,10 +10,8 @@
:on-error="errorUpload"
:accept="props.acceptTypeList.join(',')"
:before-upload="beforeUpload"
:multiple="props.multiple"
:limit="props.maxLimit"
:on-exceed="handleExceed"
:file-list="props.fileList"
:multiple="false"
:file-list="fileListNew"
:disabled="props.disabledFlag"
:on-change="changeFileFn"
:on-remove="(file:any, fileList:any) => removeFile(file, fileList)"
@ -42,9 +40,19 @@ const headerInfo = reactive({
Authorization: store.token,
})
const fileListNew: any = ref([])
const emit = defineEmits(['onFileChange'])
// console.log('tmpUploadUrl', tmpUploadUrl)
// const actionUrl = ref(tmpUploadUrl)
const props = defineProps({
fileListN: {
type: Array,
default: () => {
return []
},
},
actionUrl: {
//
type: String,
@ -82,6 +90,11 @@ const props = defineProps({
type: Number || String,
default: 1,
},
minLimit: {
//
type: Number || String,
default: 1,
},
maxSize: {
// M
type: Number || String,
@ -161,11 +174,20 @@ let loadProcess = ref(0) //进度条的刻度值
const successUpload = (response: any, file: any) => {
console.log('successUpload', response, file)
if (response.code === 200) {
props.fileList.push({
url: response.data,
name: file.name,
})
props.successResultCallBack(response)
// props.fileList.push({
// url: response.data,
// name: file.name,
// })
// props.successResultCallBack(response)
const fileInfo = {
uid: file.uid,
}
Object.assign(fileInfo, response.data)
fileListNew.value.push(fileInfo)
emit('onFileChange', fileListNew.value)
// console.log(fileListNew.value, '-----------3333333333333')
} else {
ElMessage({
type: 'warning',
@ -181,6 +203,8 @@ const errorUpload = (res: any) => {
}
const beforeUpload = (file: any) => {
console.log('file', file)
console.log(props.minLimit, '个数---')
const { name = '', size } = file
if (size > props.maxSize * 1024 * 1000) {
ElMessage({
@ -189,6 +213,14 @@ const beforeUpload = (file: any) => {
})
return false
}
if (fileListNew.value.length + props.minLimit >= 4) {
ElMessage({
type: 'warning',
message: `最多只能上传${props.maxLimit}个文件`,
})
return false
}
let names = name.split('.')
let currentName = names[names.length - 1]
console.log('acceptTypeListacceptTypeList', props.acceptTypeList, currentName)
@ -209,8 +241,8 @@ const handleExceed = (files: any, fileList: any) => {
}
//
const removeFile = (file: any, data: any) => {
console.log(file, data)
// props.fileList = data
fileListNew.value = fileListNew.value.filter((e: any) => e.uid != file.uid)
emit('onFileChange', fileListNew.value)
}
//
const preview = (data: any) => {

View File

@ -11,8 +11,8 @@ export const getDeviceListApi = (data: any) => {
}
//获取装备详情
export const getDetail = (id = '') => {
return get(`/material-mall/dev/getInfo/${id}`)
export const getDetail = (id = '', isHome: any) => {
return get(`/material-mall/dev/getInfo/${id}?isHome=${isHome}`)
}
//加入预约车
export const addBookCarApi = (data: object) => {

View File

@ -4,6 +4,7 @@ import { mainStore } from 'store/main'
import { useStore } from 'store/user'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getHotSearchListApi } from '../http/api/home/index'
import imgSrc from '@/assets/img/logo.png'
const store: any = mainStore()
const userStore = useStore()
@ -14,7 +15,7 @@ const router = useRouter()
const isRolesSelect = ref<boolean>(false)
const rolesName = ref<any>('1')
rolesName.value = localStorage.getItem('rolesType') || 1
rolesName.value = localStorage.getItem('rolesType')
// 退
const isShowLogout = computed(() => {
@ -106,12 +107,12 @@ const onRolesCheck = () => {
//
const onSelectRoles = (type: number) => {
if (type === 1) {
rolesName.value = '出租方'
rolesName.value = '1'
userStore.editMenuList(1)
userStore.editUserMenuList(1)
localStorage.setItem('rolesType', '1')
} else {
rolesName.value = '承租方'
rolesName.value = '2'
userStore.editMenuList(2)
userStore.editUserMenuList(2)
localStorage.setItem('rolesType', '2')
@ -173,7 +174,16 @@ const onCarts = () => {
</div>
</div>
<div class="header-item">
<a @click="$router.push({ name: 'my-user' })">个人中心</a>
<a
@click="
() => {
rolesName == 1
? router.push({ name: 'my-lease' })
: router.push({ name: 'my-lessee' })
}
"
>个人中心</a
>
</div>
<div class="header-item last-item">
<img src="../assets/img/home/phone.png" alt="" />
@ -195,11 +205,17 @@ const onCarts = () => {
<!-- 中间logo 部分 -->
<div class="logo-ipt-container wapper">
<img
src="@/assets/img/home//机械化装备平台.png"
<!-- <img
src="@/assets/img/logo.png"
alt="首页"
title="首页"
@click="$router.push('/home')"
/> -->
<el-image
style="width: 190px; cursor: pointer; margin-left: 60px"
:src="imgSrc"
fit="contain"
/>
<input
:placeholder="placeholderText"
@ -359,8 +375,9 @@ const onCarts = () => {
padding: 30px 0;
img {
width: 210px;
height: 48px;
margin-left: 38px;
width: 160px;
height: 60px;
cursor: pointer;
}

View File

@ -469,9 +469,102 @@ const routes: Array<RouteRecordRaw> = [
keepAlive: false,
AuthFlag: false
},
},
// 个人中心改造路由
/**
* 1.
*/
{
path: '/my-lease', // 主路由地址
name: 'my-lease',
component: () => import('views/user/index.vue'), // 组件加载
meta: {
title: '个人中心',
keepAlive: false,
AuthFlag: false
},
redirect: '/my-lease/orderManagementCz',
children: [
{
path: 'orderManagementCz',
name: 'orderManagementCz',
component: () => import('views/user/orderManagementCz/index.vue'),
meta: {
title: '订单管理(出租方)',
keepAlive: true,
AuthFlag: false,
isLogin: true
},
},
{
path: 'goodsManagement',
name: 'goodsManagement',
component: () => import('views/user/goodsManagement/index.vue'),
meta: {
title: '装备管理',
keepAlive: true,
AuthFlag: false,
isLogin: true
},
},
{
path: 'goodsUpdown',
name: 'goodsUpdown',
component: () => import('views/user/goodsUpdown/index.vue'),
meta: {
title: '基础信息',
keepAlive: true,
AuthFlag: false,
isLogin: true
},
},
]
},
/**
* 2.
*/
{
path: '/my-lessee', // 主路由地址
name: 'my-lessee',
component: () => import('views/user/index.vue'), // 组件加载
meta: {
title: '个人中心',
keepAlive: false,
AuthFlag: false
},
redirect: '/my-lessee/sourcingNeed',
children: [
{
path: 'sourcingNeed',
name: 'sourcingNeed',
component: () => import('views/user/sourcingNeed/index.vue'),
meta: {
title: '需求管理',
keepAlive: true,
AuthFlag: false,
isLogin: true
},
},
{
path: 'orderManagement',
name: 'orderManagement',
component: () => import('views/user/orderManagement/index.vue'),
meta: {
title: '订单管理',
keepAlive: true,
AuthFlag: false,
isLogin: true
},
},
]
}
]
@ -483,6 +576,7 @@ const router = createRouter({
// 使页面跳转后滚动条恢复至顶部
router.beforeEach((to, from, next) => {
const store = mainStore()
if (to.meta.isLogin && !to.meta.AuthFlag) {
if (store.token) {

View File

@ -26,8 +26,8 @@ export const useStore = defineStore('myUser', {
leaseAndLesseeList: [],
leaseAndLesseeUserList: [
{ title: '订单管理', name: 'orderManagementCz' },
{ title: '装备管理', name: 'goodsManagement' },
// { title: '商品上下架', name: 'goodsUpdown' },
{ title: '商品管理', name: 'goodsManagement' },
{ title: '商品上下架', name: 'goodsUpdown' },
// { title: '机手管理', name: 'operatorManagement' },
// { title: '寻源竞价', name: 'sourcingBidding' },
// { title: '专区管理', name: 'zoneManag' },
@ -145,13 +145,13 @@ export const useStore = defineStore('myUser', {
const leaseList: any = [
{ title: '订单管理', name: 'orderManagementCz' },
{ title: '装备管理', name: 'goodsManagement' },
// { title: '商品上下架', name: 'goodsUpdown' },
{ title: '商品上下架', name: 'goodsUpdown' },
// { title: '机手管理', name: 'operatorManagement' },
// { title: '寻源竞价', name: 'sourcingBidding' },
// { title: '专区管理', name: 'zoneManag' },
]
const lesseeList: any = [
{ title: '寻源需求', name: 'sourcingNeed' },
{ title: '需求管理', name: 'sourcingNeed' },
{ title: '订单管理', name: 'orderManagement' },
]
this.leaseAndLesseeUserList = []

View File

@ -0,0 +1,120 @@
<template>
<div class="custom-date-picker">
<el-button @click="showPicker = !showPicker" :size="size" class="date-picker-button">
{{ displayDate }}
</el-button>
<el-date-picker
v-model="selectedDate"
:type="pickerType"
:placeholder="placeholder"
:format="format"
:value-format="valueFormat"
:style="{ visibility: 'hidden' }"
@change="handleDateChange"
style="margin-top: -100px"
ref="datePicker"
/>
</div>
</template>
<script setup>
import { ref, computed, watch, nextTick } from 'vue'
import { ElDatePicker, ElButton } from 'element-plus'
const props = defineProps({
modelValue: {
type: [Date, String, Array],
default: [],
},
type: {
type: String,
default: 'primary',
},
size: {
type: String,
default: 'small',
},
pickerType: {
type: String,
default: 'daterange',
},
placeholder: {
type: String,
default: '选择日期',
},
format: {
type: String,
default: 'YYYY-MM-DD',
},
valueFormat: {
type: String,
default: 'YYYY-MM-DD',
},
companyIndex: {
type: Number,
default: 0,
},
goodsIndex: {
type: Number,
default: 0,
},
})
const emit = defineEmits(['update:modelValue', 'onLeaseDateChange'])
const selectedDate = ref(props.modelValue)
const showPicker = ref(false)
const datePicker = ref(null)
const displayDate = computed(() => {
return selectedDate.value ? '修改租期' : '请选择租期'
})
const handleDateChange = (value) => {
emit('update:modelValue', value, props.companyIndex, props.goodsIndex)
emit('onLeaseDateChange', value, props.companyIndex, props.goodsIndex)
showPicker.value = false
}
// const onVisibleChange = () => {
// console.log('')
// showPicker.value = false
// }
watch(
showPicker,
(newValue) => {
if (newValue) {
nextTick(() => {
datePicker.value.handleOpen()
})
} else {
nextTick(() => {
datePicker.value.handleClose()
})
}
},
{ deep: true, immediate: true },
)
watch(
() => props.modelValue,
(newValue) => {
selectedDate.value = newValue
},
)
</script>
<style scoped>
.custom-date-picker {
display: inline-block;
}
.date-picker-button {
/* min-width: 120px; */
background-color: #1abc9c;
color: #fff;
height: 30px;
border: none;
}
</style>

View File

@ -74,28 +74,40 @@
</div>
</el-col>
<el-col :span="9" class="goods-info">
<img
src="https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1"
alt=""
/>
<img :src="goods.picUrl" alt="" />
<div class="goods-code">
<div style="font-size: 14px; font-weight: bold">{{ goods.deviceName }}</div>
<div>装备编号 {{ goods.code }}</div>
<div>装备型号 {{ goods.typeName }}</div>
<!-- <div>装备编号 {{ goods.code }}</div>
<div>装备型号 {{ goods.typeName }}</div> -->
</div>
</el-col>
<el-col :span="4">
<div class="lease-date">
<div v-if="goods.rentBeginTime && goods.rentEndTime">
{{ goods.rentBeginTime }}-{{ goods.rentEndTime }}
<div style="margin-bottom: 8px">
{{ goods.rentBeginTime }}
<span v-if="goods.rentBeginTime && goods.rentEndTime">-</span>
{{ goods.rentEndTime }}
</div>
<el-date-picker
<!-- <el-date-picker
style="width: 100px; margin-top: 10px"
v-model="goods.lease_date"
type="daterange"
size="small"
value-format="YYYY-MM-DD"
@change="onLeaseDateChange($event, goods)"
>
</el-date-picker> -->
<CustomDatePickerButton
:modelValue="goods.lease_date"
:companyIndex="index"
:goodsIndex="j"
type="primary"
size="large"
placeholder="选择日期"
@onLeaseDateChange="onLeaseDateChange"
/>
</div>
</el-col>
@ -211,12 +223,11 @@ import {
} from '../../http/api/cart/index'
import moment, { max } from 'moment'
import { InfoFilled } from '@element-plus/icons-vue'
import CustomDatePickerButton from './components/date-picker-button.vue'
const protocolChecked = ref<boolean>(false)
const allKey = ref(0)
const cardList = ref<any>([])
const getBookCarDetailsData = async () => {
const res: any = await getBookCarDetailsApi()
@ -231,6 +242,7 @@ const getBookCarDetailsData = async () => {
j.costs = 0
j.rentBeginTime = ''
j.rentEndTime = ''
j.lease_date = null
})
})
@ -243,23 +255,37 @@ onMounted(() => {
})
// change
const onLeaseDateChange = (e: any, item: any) => {
console.log(e, '*****')
if (!e) {
item.rentBeginTime = ''
item.rentEndTime = ''
item.days = 0
// const onLeaseDateChange = (e: any, item: any) => {
// console.log(e, '*****')
// if (!e) {
// item.rentBeginTime = ''
// item.rentEndTime = ''
// item.days = 0
// } else {
// item.rentBeginTime = e[0]
// item.rentEndTime = e[1]
// item.days = moment(e[1]).diff(e[0], 'day')
// }
// }
const onLeaseDateChange = (value: any, companyIndex: number, goodsIndex: number) => {
if (!value) {
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = ''
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = ''
cardList.value[companyIndex].devInfoVoList[goodsIndex].days = 0
} else {
item.rentBeginTime = e[0]
item.rentEndTime = e[1]
item.days = moment(e[1]).diff(e[0], 'day')
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = value[0]
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = value[1]
cardList.value[companyIndex].devInfoVoList[goodsIndex].days = moment(value[1]).diff(
value[0],
'day',
)
}
}
//
const onDeleteGoods = async (id: number | string) => {
const res: any = deleteCartByIdApi({ id })
if (res.code === 200) {
const res: any = await deleteCartByIdApi({ id })
if (res.code == 200) {
ElMessage({
showClose: false,
message: '删除成功',
@ -366,6 +392,23 @@ const onCartSubmit = async () => {
return
}
let isDays = false
try {
amountDeviceList.value.forEach((e: any) => {
if (e.days < 1) {
ElMessage({
showClose: false,
message: '有装备租期未选择或租期为0请重新选择后再提交',
type: 'error',
})
isDays = true
throw new Error()
}
})
} catch (error) {}
if (isDays) return
//
const detailsList = amountDeviceList.value.map((e: any) => {
return {

View File

@ -38,7 +38,11 @@
<div class="label">参考图片/样式</div>
</el-col>
<el-col :span="18">
<div>999</div>
<div class="img-list">
<div v-for="item in leaseDetails.fileInfoList" :key="item.id">
<img :src="item.fileUrl" alt="" />
</div>
</div>
</el-col>
</el-row>
</div>
@ -527,4 +531,23 @@ onMounted(() => {
color: #dd2323;
font-size: 16px;
}
.img-list {
display: flex;
flex-wrap: wrap;
div {
width: calc((100% - 15px) / 2);
height: 120px;
margin: 0 15px 15px 0;
&:nth-child(2n) {
margin: 0;
}
img {
width: 100%;
height: 100%;
}
}
}
</style>

View File

@ -365,11 +365,11 @@ import {
addBookCarApi,
apiSubmitLease,
apiGetAddressList,
} from '@/http/api/equip'
} from 'http/api/equip'
import { useRoute, useRouter } from 'vue-router'
// import Navmenu from '@/components/Navmenu/index.vue'
import equipDetailTable from '@/components/equipDetailTable.vue'
import { ElMessage } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import { mainStore } from '@/store/main'
const router = useRouter()
@ -775,7 +775,7 @@ const handelDetailListClick = (fnName, arg) => {
//
const getData = async () => {
const res = await getDetail(pageParams.id)
const res = await getDetail(pageParams.id, true)
res.data.isOperatorCn = res.data.isOperator ? '是' : '否'
res.data.isInsurancePdf = res.data.insurancePdf ? '点击查看' : '暂无'
res.data.isExaminationPdf = res.data.examinationPdf ? '点击查看' : '暂无'
@ -871,20 +871,29 @@ const onAddCart = async () => {
maId: pageData.value.maId,
orderCompany: pageData.value.companyId,
}
const res = await addBookCarApi(addParams)
if (res.code === 200) {
ElMessage({
type: 'success',
duration: 1000,
message: `预约车加入成功`,
ElMessageBox.confirm('是否确定加入预约车?', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success',
})
.then(async () => {
const res: any = await addBookCarApi(addParams)
if (res.code === 200) {
ElMessage({
type: 'success',
duration: 1000,
message: `预约车加入成功`,
})
getData()
} else {
ElMessage({
type: 'error',
duration: 1000,
message: res.msg,
})
}
})
} else {
ElMessage({
type: 'error',
duration: 1000,
message: res.msg,
})
}
.catch(() => {})
}
</script>
<style scoped lang="scss">

View File

@ -5,21 +5,34 @@
<div class="screen">
<div class="choose">
<template v-for="(v, i) in screenChooseList" :key="i">
<div class="line">
<div class="line" v-if="v.isShow">
<div class="label">
{{ v.name }}
</div>
<div class="select">
<div
class="item"
:class="{
active: val.isChecked,
}"
@click="selectScreen(v.type, val, i)"
v-for="(val, index) in v.list"
:key="index"
>
{{ val.name }}
<template v-for="(val, index) in v.list" :key="index">
<div
class="item"
@click="selectScreen(v.type, val, i)"
:class="{
active: val.isChecked,
}"
>
{{ val.name }}
</div>
</template>
<div v-if="i == 2" style="display: flex; align-items: center">
<el-input v-model="startPrice" style="width: 60px" size="small" />
<span style="margin: 0 5px">-</span>
<el-input v-model="endPrice" style="width: 60px" size="small" />
<el-button
@click.stop="onConfirmPrice"
size="small"
type="primary"
style="margin-left: 20px"
>确定</el-button
>
</div>
</div>
</div>
@ -152,15 +165,51 @@ import {
import { getCompanyListApi } from '@/http/api/home'
import $bus from '@/utils/bus'
import NavMenu from '@/components/Navmenu/index.vue'
import { ElMessage } from 'element-plus'
const router = useRouter()
const route: any = useRoute()
const startPrice: any = ref(0)
const endPrice: any = ref(0)
const onConfirmPrice = () => {
ElMessage.closeAll()
let rex = /^[1-9][0-9]*$/
if (!rex.test(startPrice.value) || !rex.test(endPrice.value)) {
ElMessage({
type: 'warning',
message: '请输入大于0且不能以0开头的正整数',
})
return
}
if (parseInt(endPrice.value) < parseInt(startPrice.value)) {
ElMessage({
type: 'warning',
message: '结束值不可小于起始值',
})
return
}
const itemInfo = {
name: `${parseInt(startPrice.value)}-${parseInt(endPrice.value)}`,
value: [parseInt(startPrice.value), parseInt(endPrice.value)],
isChecked: true,
index: 2,
isShow: false,
isAdd: true,
}
screenChooseList[2].list[0].isChecked = false
screenChooseList[2].list.push(itemInfo)
}
//
const screenChooseList: any = reactive([
{
name: '使用年限:',
type: 'userYear',
isShow: true,
list: [
{
isChecked: true,
@ -203,6 +252,7 @@ const screenChooseList: any = reactive([
{
type: 'deviceClass',
name: '装备分类:',
isShow: true,
list: [
{
name: '全部',
@ -215,54 +265,63 @@ const screenChooseList: any = reactive([
{
type: 'leasePrice',
name: '租金(天/元)',
isShow: true,
list: [
{
name: '全部',
value: '',
isChecked: true,
index: 2,
isShow: true,
},
{
name: '0-500',
value: [0, 500],
isChecked: false,
index: 2,
isShow: true,
},
{
name: '500-1000',
value: [500, 1000],
isChecked: false,
index: 2,
isShow: true,
},
{
name: '1000-1500',
value: [1000, 1500],
isChecked: false,
index: 2,
isShow: true,
},
{
name: '1500-2000',
value: [1500, 2000],
isChecked: false,
index: 2,
isShow: true,
},
{
name: '2000-2500',
value: [2000, 2500],
isChecked: false,
index: 2,
isShow: true,
},
{
name: '2500-3000',
value: [2500, 3000],
isChecked: false,
index: 2,
isShow: true,
},
],
},
{
type: 'companyId',
name: '设备所在地:',
isShow: true,
list: [
{
isChecked: true,
@ -272,14 +331,35 @@ const screenChooseList: any = reactive([
},
],
},
{
type: 'temp',
name: '',
isShow: false,
list: [],
},
])
if (route.query.level == 1) {
screenChooseList[1].list[0].isChecked = false
}
if (route.query.companyId) {
const item = {
isChecked: true,
name: route.query.name,
value: route.query.companyId,
index: 4,
}
screenChooseList[4].list = []
screenChooseList[4].list.push(item)
}
// tag
const screenTags = computed(() => {
const selectTagList: any = []
screenChooseList.forEach((e: any) => {
e.list.forEach((j: any) => {
if (j.isChecked && j.name !== '全部') {
console.log(j, '******')
selectTagList.push(j)
}
})
@ -328,7 +408,6 @@ const getTypeListData = async () => {
})
screenChooseList[1].list.push(...typeList)
}
getTypeListData()
//
const getCompanyAddressListData = async () => {
@ -338,7 +417,6 @@ const getCompanyAddressListData = async () => {
})
screenChooseList[3].list.push(...addressList)
}
getCompanyAddressListData()
//
const getDeviceListData = async (params: any = null, keyWord: any = null) => {
@ -366,6 +444,7 @@ const getDeviceListData = async (params: any = null, keyWord: any = null) => {
}
if (index === 1 && j.isChecked) {
searchParams.typeId = j.value
searchParams.level = j.value ? 1 : ''
}
if (index === 2 && j.isChecked && j.value.length > 0) {
searchParams.dayLeasePriceMin = j.value[0]
@ -373,7 +452,6 @@ const getDeviceListData = async (params: any = null, keyWord: any = null) => {
}
if (index === 3 && j.isChecked) {
searchParams.companyId = j.value
searchParams.level = j.value ? 1 : ''
}
})
})
@ -393,11 +471,20 @@ const getDeviceListData = async (params: any = null, keyWord: any = null) => {
//
const onClearTags = () => {
screenChooseList.forEach((e: any) => {
screenChooseList.forEach((e: any, i: any) => {
e.list.forEach((j: any, index: number) => {
j.isChecked = false
if (index === 0) {
j.isChecked = true
if (i != 4) {
if (index === 0) {
j.isChecked = true
}
}
if (j.isAdd) {
startPrice.value = 0
endPrice.value = 0
screenChooseList[2].list = screenChooseList[2].list.filter(
(e: any) => e.isAdd != true,
)
}
})
})
@ -407,7 +494,17 @@ const onClearTags = () => {
//
const handleClose = (tag: any) => {
tag.isChecked = false
screenChooseList[tag.index].list[0].isChecked = true
if (tag.index != 4) {
screenChooseList[tag.index].list[0].isChecked = true
}
if (tag.isAdd) {
startPrice.value = 0
endPrice.value = 0
}
screenChooseList[tag.index].list = screenChooseList[tag.index].list.filter(
(e: any) => e.isAdd != true,
)
getDeviceListData()
}
@ -458,7 +555,30 @@ onMounted(() => {
keyWord: route.query.keyWord,
}
}
getDeviceListData(routeParams, null)
Promise.all([getCompanyAddressListData(), getTypeListData()]).then(() => {
if (route.query.level == 1) {
screenChooseList[1].list.forEach((e: any) => {
if (route.query.typeId == e.typeId) {
e.isChecked = true
}
})
}
if (route.query.level == 2 || route.query.level == 3) {
{
const item = {
isChecked: true,
name: route.query.name,
value: route.query.typeId,
index: 4,
}
screenChooseList[4].list = []
screenChooseList[4].list.push(item)
}
}
getDeviceListData(routeParams, null)
})
})
onUnmounted(() => {

View File

@ -45,20 +45,22 @@ const getCompanyListData = async () => {
getCompanyListData()
//
const onSharedHall = (level: number, typeId: any) => {
const onSharedHall = (level: number, typeId: any, name: any) => {
router.push({
name: 'equipList',
query: {
level,
typeId,
name,
},
})
}
const onSharedHallByCompany = (companyId: any) => {
const onSharedHallByCompany = (companyId: any, name: any) => {
router.push({
name: 'equipList',
query: {
companyId,
name,
},
})
}
@ -103,8 +105,7 @@ const hotDeviceList: any = ref([])
/* 获取热搜装备 */
const getHotDeviceList = async () => {
const res: any = await getHotList({ pageSize: 3 })
hotDeviceList.value = res.rows
console.log(res, '热搜装备111')
hotDeviceList.value = res.data
}
getHotDeviceList()
@ -149,14 +150,14 @@ const onSelectItem = (type: number) => {
<template v-if="selectOptionsValue === '分类筛选'">
<div v-for="item in classList" :key="item.name" class="item-container">
<li class="item-nav" @click="onSharedHall(1, item.id)">
<li class="item-nav" @click="onSharedHall(1, item.id, item.name)">
{{ item.name }}
<ul class="sub-goods">
<!-- 级联框内 类别名称 -->
<li
v-for="child in item.children"
:key="child.id"
@click="onSharedHall(2, child.id)"
@click.stop="onSharedHall(2, child.id, child.name)"
>
<!-- 第二级 -->
<span class="second-name">
@ -168,7 +169,7 @@ const onSelectItem = (type: number) => {
v-for="son in child.children"
:key="son.id"
style="font-size: 14px; font-weight: normal"
@click="onSharedHall(3, son.id)"
@click.stop="onSharedHall(3, son.id, son.name)"
>
{{ son.name }}
</a>
@ -230,7 +231,10 @@ const onSelectItem = (type: number) => {
:key="item.companyId"
class="item-container"
>
<li class="item-nav" @click="onSharedHallByCompany(item.companyId)">
<li
class="item-nav"
@click="onSharedHallByCompany(item.companyId, item.companyName)"
>
{{ item.companyName }}
</li>
</div>
@ -265,32 +269,38 @@ const onSelectItem = (type: number) => {
<a>查看更多</a>
</div>
<ul class="equip-pic">
<li v-for="item in hotDeviceList" :key="item.maId" style="cursor: pointer">
<!-- <EquipCardNew
<div v-for="item in hotDeviceList" :key="item.typeName" style="margin-top: 15px">
<div class="hot-title">
{{ item.typeName }}
</div>
<ul class="equip-pic">
<li v-for="g in item.devInfoList" :key="g.maId" style="cursor: pointer">
<!-- <EquipCardNew
@onClick="onClick"
:company="item.companyName || '安徽博诺斯有限公司'"
:price="item.dayLeasePrice"
:tags="[item.maStatusStr || '待租', item.cityStr || '合肥']"
:name="item.modelName + item.deviceName"
:url="item.picUrl"
:id="item.maId"
/> -->
<EquipCardNew
@onClick="onClick"
:id="item.maId"
:companyId="item.companyId"
:company="item.companyName"
:name="item.deviceName"
:price="item.dayLeasePrice"
/>
</li>
</ul>
<EquipCardNew
@onClick="onClick"
:id="g.maId"
:companyId="g.companyId"
:company="g.companyName"
:name="g.deviceName"
:price="g.dayLeasePrice"
:url="g.picUrl"
/>
</li>
</ul>
</div>
</div>
<!-- 专题咨询 -->
<div class="hot-equip">
<!-- <div class="hot-equip">
<span>专题资讯</span>
<a></a>
</div>
@ -308,13 +318,13 @@ const onSelectItem = (type: number) => {
<li>
<a>保险</a>
</li>
</ul>
</ul> -->
<div class="consult-content">
<!-- 左侧背景图片 -->
<!-- <div class="consult-content">
<div class="left-bg"></div>
<!-- 右侧信息 -->
<div class="right-consult">
<div
class="consult-box"
@ -332,7 +342,7 @@ const onSelectItem = (type: number) => {
</div>
</div>
</div>
</div>
</div> -->
</div>
</div>
</template>
@ -525,6 +535,12 @@ const onSelectItem = (type: number) => {
}
}
.hot-title {
padding: 15px 0 10px 20px;
font-size: 16px;
font-weight: bold;
letter-spacing: 1px;
}
.equip-pic {
display: flex;
flex-wrap: wrap;

View File

@ -279,7 +279,7 @@ const optionActive = ref(0)
//
const pageData = reactive({
pageNum: 1,
pageSize: 20,
pageSize: 10,
})
//
@ -318,12 +318,10 @@ const getLeaseListData = async () => {
companyId: '',
typeId: '',
level: '',
startTime: '',
leaseDay: '',
endTime: '',
leaseNum: '',
pageNum: 1,
pageSize: 1,
startTime: optionActive.value == 0 ? screenOptionList[optionActive.value].sort : '',
rentDay: optionActive.value == 1 ? screenOptionList[optionActive.value].sort : '',
endTime: optionActive.value == 2 ? screenOptionList[optionActive.value].sort : '',
rentNum: optionActive.value == 3 ? screenOptionList[optionActive.value].sort : '',
}
screenChooseList.forEach((e: any, index: number) => {
@ -342,37 +340,10 @@ const getLeaseListData = async () => {
})
})
console.log(searchParams, 'searchParams')
Object.assign(searchParams, pageData)
const { data: res }: any = await getLeaseListApi(searchParams)
leaseList.value = res.rows
}
//
const getDeviceListData = async (params: any = null, keyWord: any = null) => {
//
const searchParams: any = {
companyId: '',
typeId: '',
level: '',
startTime: '',
leaseDay: '',
endTime: '',
leaseNum: '',
pageNum: 1,
pageSize: 1,
}
if (params) {
searchParams.level = params.level ? params.level : ''
searchParams.typeId = params.typeId ? params.typeId : ''
searchParams.companyId = params.companyId ? params.companyId : ''
searchParams.keyWord = params.keyWord ? params.keyWord : ''
}
Object.assign(searchParams, pageData)
const { data: res }: any = await getDeviceListApi(searchParams)
equipList.value = res.rows
total.value = res.total
}
@ -394,6 +365,7 @@ const handleClose = (tag: any) => {
tag.isChecked = false
screenChooseList[tag.index].list[0].isChecked = true
// getDeviceListData()
getLeaseListData()
}
//
@ -405,6 +377,7 @@ const changeOption = (val: any) => {
console.log(screenOptionList, 'screenOptionList')
optionActive.value = val.id
// getDeviceListData()
getLeaseListData()
}
// select
@ -421,6 +394,7 @@ const selectScreen = (type: any, item: any, index: number) => {
const onCurrentChange = (val: number) => {
pageData.pageNum = val
// getDeviceListData()
getLeaseListData()
}
onMounted(() => {

View File

@ -482,6 +482,10 @@
} else {
equipmentDeploymentParams.value.typeId = ""
}
if(equipmentDeploymentParams.value.deviceName==""||equipmentDeploymentParams.value.companyId==""){
ElMessage({type: 'error',message: '保存草稿请至少填写装备名称及所属公司!'})
return
}
// if(mainFileList.value.length==0||mainFileList.value.length>6){
// ElMessage({type: 'error',message: '16'})
// return
@ -676,7 +680,7 @@
<el-form-item label="装备名称:" prop="deviceName">
<el-input v-model.trim="queryParams.deviceName" style="width: 160px" clearable />
</el-form-item>
<el-form-item label="装备编" prop="code">
<el-form-item label="装备编" prop="code">
<el-input v-model.trim="queryParams.code" style="width: 160px" clearable />
</el-form-item>
<el-form-item label="装备状态:" prop="maStatus">
@ -726,7 +730,7 @@
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
<el-table-column label="序号" align="center" width="80" type="index"></el-table-column>
<el-table-column align="center" prop="deviceName" label="装备名称" />
<el-table-column align="center" prop="code" label="编码" />
<el-table-column align="center" prop="code" label="装备编号" />
<el-table-column align="center" prop="typeName" label="装备类目">
<template #default="{ row }">
<span>{{ row.firstName }} <span v-show="row.firstName">></span> {{ row.secondName }}<span v-show="row.secondName">></span>{{ row.thirdName }}</span>
@ -800,7 +804,7 @@
<el-input autocomplete="off" style="width: 850px" maxlength="30"
v-model="equipmentDeploymentParams.deviceName" clearable />
</el-form-item>
<el-row>
<el-row>
<el-form-item label="装备类目:" prop="deviceTypeList">
<el-cascader
v-model="equipmentDeploymentParams.deviceTypeList"
@ -815,40 +819,6 @@
@change="dialogTypeChange"
></el-cascader>
</el-form-item>
<el-form-item label="设备数量:" prop="deviceCount">
<el-input
@input="(v)=>(equipmentDeploymentParams.deviceCount=v.replace(/[^\d.]/g,''))"
v-model="equipmentDeploymentParams.deviceCount"
placeholder="请输入设备数量"
clearable maxlength="20"
style="width: 350px;" :disabled="countDisabled"
/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="装备单位:" prop="unitName">
<el-input
autocomplete="off"
style="width: 350px" maxlength="20"
v-model="equipmentDeploymentParams.unitName"
clearable />
</el-form-item>
<el-form-item label="装备品牌" prop="brand">
<el-input
v-model="equipmentDeploymentParams.brand"
autocomplete="off" maxlength="20"
style="width: 350px"
clearable />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="装备编号" prop="code">
<el-input
autocomplete="off"
style="width: 350px" maxlength="40"
v-model="equipmentDeploymentParams.code"
clearable />
</el-form-item>
<el-form-item label="所属公司:" prop="companyId">
<el-select
v-model="equipmentDeploymentParams.companyId"
@ -863,6 +833,41 @@
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="设备数量:" prop="deviceCount">
<el-input
@input="(v)=>(equipmentDeploymentParams.deviceCount=v.replace(/[^\d.]/g,''))"
v-model="equipmentDeploymentParams.deviceCount"
placeholder="请输入设备数量"
clearable maxlength="20"
style="width: 350px;" :disabled="countDisabled"
/>
</el-form-item>
<el-form-item label="装备单位:" prop="unitName">
<el-input
autocomplete="off"
style="width: 350px" maxlength="20"
v-model="equipmentDeploymentParams.unitName"
clearable />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="装备编号" prop="code">
<el-input
autocomplete="off"
style="width: 350px" maxlength="40"
v-model="equipmentDeploymentParams.code"
clearable />
</el-form-item>
<el-form-item label="装备品牌" prop="brand">
<el-input
v-model="equipmentDeploymentParams.brand"
autocomplete="off" maxlength="20"
style="width: 350px"
clearable />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="出厂日期:" prop="productionDate">
<el-date-picker

View File

@ -14,6 +14,8 @@ const userInfo: any = computed(() => {
return mainStore().userInfo
})
import imgSrc from '@/assets/img/logo.png'
//
// const seekingRentClick = () => {
// store.editcurrentMenuItem('baseInfo')
@ -46,9 +48,6 @@ const userInfo: any = computed(() => {
const handleSelect = (name: any, path: any) => {
store.editcurrentMenuItem(name)
}
const activeMenuItem = computed(() => {
return store.currentMenuItem
})
const activeseekingRent = computed(() => {
return store.currentMenuType
@ -58,6 +57,10 @@ const menuList: any = computed(() => {
return store.leaseAndLesseeUserList
})
const activeMenuItem = computed(() => {
return store.leaseAndLesseeUserList[0].name
})
// watch(route, (newVlaue) => {
// if (newVlaue.path.indexOf('myuser') === -1) {
// store.editcurrentMenuItem('baseInfo')
@ -84,7 +87,13 @@ const menuList: any = computed(() => {
<Header />
<div class="app-container" id="user-container">
<div class="left-menu">
<div class="logo-title" @click="$router.push({ name: 'home' })">机械化装备平台</div>
<div class="logo-title" @click="$router.push({ name: 'home' })">
<el-image
style="width: 100%; height: 60px; cursor: pointer"
:src="imgSrc"
fit="contain"
/>
</div>
<!-- <div class="pic-box">
<img v-if="userInfo.logoUrl" :src="userInfo.logoUrl" alt="" />
@ -136,7 +145,7 @@ const menuList: any = computed(() => {
// margin-right: 15px;
.logo-title {
background-color: #1ea193;
// background-color: #1ea193;
cursor: pointer;
text-align: center;
padding: 15px;

View File

@ -78,6 +78,7 @@
() => {
addOrEditDialogVisible = true
isRepublish = true
dialogTitle = '新增'
}
"
style="background-color: #17907f; color: #fff"
@ -130,6 +131,7 @@
icon-color="#626AEF"
title="确定删除该项需求吗?"
@confirm="onDelete(row.id)"
v-if="row.leaseStatus != 1"
>
<template #reference>
<el-button size="small" text type="danger"> 删除 </el-button>
@ -169,11 +171,12 @@
<!-- 新增修改对话框 -->
<el-dialog
title="新增"
:title="dialogTitle"
width="60%"
align-center
destroy-on-close
v-model="addOrEditDialogVisible"
@close="onClose"
>
<el-form
label-width="auto"
@ -292,17 +295,34 @@
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="参考图片/样式">
<div class="img-list" v-if="addOrEditForm.fileInfoList.length > 0">
<div
v-for="(item, index) in addOrEditForm.fileInfoList"
:key="item.id"
class="img-items"
>
<img :src="item.fileUrl" alt="" />
<div class="mask-img">
<el-icon class="delete-icon" @click="onDeleteImg(index)"
><DeleteFilled
/></el-icon>
</div>
</div>
</div>
<UploadComponentNew
:maxSize="2"
:maxLimit="4"
:minLimit="minLimit"
:max-limit="4"
width="120px"
height="120px"
:autoUpload="true"
:multiple="true"
:fileListN="addOrEditForm.fileInfoList"
listType="picture-card"
:acceptTypeList="['.jpg', '.png']"
:actionUrl="uploadUrl"
:successResultCallBack="successResultCallBackFnDevicePic"
@onFileChange="onFileChange"
>
<template v-slot:default>
<el-icon size="48" color="#aaa"><Plus /></el-icon>
@ -359,6 +379,9 @@ const isSave = ref(false)
const total = ref(0)
const endTime = ref([])
const releaseTime = ref([])
const dialogTitle = ref('新增')
const fileListTemp = ref<any>([])
const searchParams = reactive({
leaseName: '',
leaseCode: '',
@ -370,7 +393,7 @@ const searchParams = reactive({
pageSize: 10,
pageNum: 1,
})
const addOrEditForm = reactive<any>({
const addOrEditForm = ref<any>({
leaseName: '',
typeId: '',
typeIds: [],
@ -384,6 +407,20 @@ const addOrEditForm = reactive<any>({
isSubmit: '',
fileInfoList: [],
})
const addOrEditFormTemp = ref<any>({
leaseName: '',
typeId: '',
typeIds: [],
companyId: '',
person: '',
personPhone: '',
leaseDay: 1,
leaseNum: 1,
endTime: '',
description: '',
isSubmit: '',
fileInfoList: fileListTemp ? fileListTemp : [],
})
const addOrEditFormRules = reactive({
leaseName: [{ required: true, message: '请输入需求名称', trigger: 'blur' }],
@ -410,10 +447,6 @@ const disabledDate = (date: any) => {
return date.getTime() < today.getTime()
}
const successResultCallBackFnDevicePic = (list: any) => {
console.log(99999, list)
}
const getClassAndCompanyData = async () => {
const classResult: any = await getGoodsClassListApi()
const companyResult: any = await getCompanyListApi()
@ -463,6 +496,7 @@ const onDelete = async (id: any) => {
}
//
const onRepublish = async (id: any, type: any) => {
dialogTitle.value = '编辑'
isRepublish.value = false
isSave.value = type
const res: any = await getLeaseDetailsByIdApi({ id })
@ -477,9 +511,10 @@ const onRepublish = async (id: any, type: any) => {
endTime,
description,
typeIds,
fileInfoList,
} = res.data
Object.assign(addOrEditForm, {
Object.assign(addOrEditForm.value, {
leaseName,
typeId,
companyId,
@ -491,9 +526,10 @@ const onRepublish = async (id: any, type: any) => {
description,
typeIds,
id,
fileInfoList: fileInfoList ? fileInfoList : [],
})
addOrEditForm.typeIds = addOrEditForm.typeIds.map((e: any) => {
addOrEditForm.value.typeIds = addOrEditForm.value.typeIds.map((e: any) => {
return (e *= 1)
})
@ -504,16 +540,19 @@ const onRepublish = async (id: any, type: any) => {
const onSubmit = (type: boolean) => {
addOrEditFormRef.value.validate(async (valid: any) => {
if (valid) {
addOrEditForm.isSubmit = type
addOrEditForm.typeId = addOrEditForm.typeIds[addOrEditForm.typeIds.length - 1]
addOrEditForm.value.isSubmit = type
addOrEditForm.value.typeId =
addOrEditForm.value.typeIds[addOrEditForm.value.typeIds.length - 1]
addOrEditForm.value.fileInfoList.push(...fileListTemp.value)
const SUBMIT_API = isRepublish.value ? addLeaseInfoApi : editLeaseInfoApi
const res: any = await SUBMIT_API(addOrEditForm)
const res: any = await SUBMIT_API(addOrEditForm.value)
if (res.code === 200) {
ElMessage({
type: 'success',
message: '提交成功',
})
addOrEditFormRef.value.resetFields()
addOrEditDialogVisible.value = false
getLeaseListData()
}
@ -521,11 +560,35 @@ const onSubmit = (type: boolean) => {
})
}
//
const onFileChange = (fileList: any) => {
fileListTemp.value = []
fileListTemp.value = fileList.map((e: any) => {
return {
fileName: e.name,
fileUrl: e.url,
}
})
// addOrEditForm.value.fileInfoList.push(...fileListTemp.value)
}
//
const onCancel = () => {
addOrEditFormRef.value.resetFields()
addOrEditDialogVisible.value = false
}
const onClose = () => {
addOrEditFormRef.value.resetFields()
addOrEditForm.value = JSON.parse(JSON.stringify(addOrEditFormTemp.value))
fileListTemp.value = []
}
const onDeleteImg = (index: any) => {
addOrEditForm.value.fileInfoList.splice(index, 1)
}
const minLimit = computed(() => {
return addOrEditForm.value.fileInfoList.length
})
onMounted(() => {
getClassAndCompanyData()
@ -548,4 +611,45 @@ onMounted(() => {
margin-right: 6px;
width: 95%;
}
.img-list {
display: flex;
align-items: center;
.img-items {
width: 120px;
height: 120px;
margin-right: 8px;
position: relative;
img {
width: 100%;
height: 100%;
}
.mask-img {
visibility: hidden;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #000;
opacity: 0.5;
display: flex;
align-items: center;
justify-content: center;
.delete-icon {
font-size: 20px;
cursor: pointer;
z-index: 9;
color: #fff;
}
}
}
.img-items:hover .mask-img {
visibility: visible;
}
}
</style>