Compare commits
10 Commits
73584e5a72
...
2c6b187983
| Author | SHA1 | Date |
|---|---|---|
|
|
2c6b187983 | |
|
|
c2e96f8deb | |
|
|
84cc080530 | |
|
|
7897692898 | |
|
|
1a7375cb61 | |
|
|
cf92711e6e | |
|
|
9c6201537d | |
|
|
243943add2 | |
|
|
b6e61753b4 | |
|
|
b3481a1cd2 |
|
|
@ -5,6 +5,12 @@ import { useStore } from 'store/user'
|
|||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import headerLogo from 'assets/img/zulinlogo.png'
|
||||
import userClass from '../../hooks/userClass'
|
||||
import {
|
||||
getUserInfo, //用户信息
|
||||
editMessageApi, //修改
|
||||
resetPwd, // 重置密码
|
||||
editPhone, // 修改手机号
|
||||
} from 'http/api/personalCenter'
|
||||
const { getCompanyList } = userClass()
|
||||
const store: any = mainStore()
|
||||
const userStore = useStore()
|
||||
|
|
@ -170,6 +176,64 @@ const onJumpMessage = () => {
|
|||
name: 'message',
|
||||
})
|
||||
}
|
||||
|
||||
const form: any = ref({
|
||||
userId: '',
|
||||
name: '',
|
||||
nickName: '',
|
||||
userName: '',
|
||||
password: '',
|
||||
phoneNumber: '',
|
||||
deptId: '',
|
||||
})
|
||||
const dialogUserInfoVisible = ref(false)
|
||||
const circleUrl = ref('https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg')
|
||||
const onAccountManage = () => {
|
||||
dialogUserInfoVisible.value = true
|
||||
}
|
||||
const getUserListData = async () => {
|
||||
let res = await getUserInfo()
|
||||
form.value = res.data
|
||||
}
|
||||
|
||||
const resetPassword = async () => {
|
||||
ElMessageBox.confirm('确定要重置密码吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(async () => {
|
||||
const params = {
|
||||
password: form.value.password,
|
||||
userId: form.value.userId,
|
||||
}
|
||||
let res: any = await resetPwd(params)
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('重置成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const resetPhone = async () => {
|
||||
ElMessageBox.confirm('确定要修改手机号吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(async () => {
|
||||
const params = {
|
||||
userId: form.value.userId,
|
||||
phoneNumber: form.value.phoneNumber,
|
||||
}
|
||||
let res: any = await editPhone(params)
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('修改成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getUserListData()
|
||||
circleUrl.value = store.userInfo.avatar
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -187,9 +251,29 @@ const onJumpMessage = () => {
|
|||
<div class="header-right">
|
||||
<div class="header-item" v-if="isShowLogout">
|
||||
<!-- <img src="../assets/img/home/star.png" alt="" /> -->
|
||||
<a class="user-name"
|
||||
>{{ activeLoginCompanyName }} / {{ store.userInfo.nickName }}</a
|
||||
>
|
||||
<a class="user-name">
|
||||
<span class="name">
|
||||
{{ activeLoginCompanyName }} / {{ store.userInfo.nickName }}
|
||||
</span>
|
||||
<el-icon style="margin-left: 4px">
|
||||
<ArrowDown />
|
||||
</el-icon>
|
||||
|
||||
<div class="user-center">
|
||||
<div style="text-align: right">
|
||||
<el-button size="small" @click="onAccountManage"
|
||||
>账号管理</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="user-container">
|
||||
<el-avatar :size="50" :src="circleUrl" />
|
||||
<div class="info">
|
||||
<div>姓名:{{ form.nickName }}</div>
|
||||
<div>登录账号:{{ form.userName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
|
|
@ -198,10 +282,10 @@ const onJumpMessage = () => {
|
|||
<a @click="onJumpMessage"> 消息 </a>
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
<div class="header-item">
|
||||
<!-- <div class="header-item">
|
||||
<a @click="onClickMyUser"> 个人中心 </a>
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="header-item">
|
||||
<a
|
||||
v-if="!isShowLogout"
|
||||
|
|
@ -222,6 +306,48 @@ const onJumpMessage = () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
v-model="dialogUserInfoVisible"
|
||||
title="账户管理"
|
||||
width="50%"
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
:before-close="
|
||||
() => {
|
||||
dialogUserInfoVisible = false
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-form :model="form" label-width="120px">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.nickName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="登录账号">
|
||||
<el-input v-model="form.userName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码">
|
||||
<div style="display: flex; width: 100%">
|
||||
<el-input v-model="form.password" show-password></el-input>
|
||||
<el-button type="text" icon="EditPen" @click="resetPassword">
|
||||
修改密码
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<div style="display: flex; width: 100%">
|
||||
<el-input v-model="form.phoneNumber" style="flex: 1"></el-input>
|
||||
<el-button type="text" icon="EditPen" @click="resetPhone">重新绑定</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="关联公司" prop="deptId"> </el-form-item> -->
|
||||
<!-- <el-form-item>
|
||||
<div style="margin-left: 25%">
|
||||
<el-button type="primary" @click="submitForm">修改</el-button>
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -259,8 +385,47 @@ const onJumpMessage = () => {
|
|||
background-color: #666655;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
transition: all 1.2s;
|
||||
|
||||
.user-center {
|
||||
display: none;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: -106px;
|
||||
left: 0;
|
||||
padding: 10px 20px;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 4px #ccc;
|
||||
|
||||
.user-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.info {
|
||||
margin-left: 26px;
|
||||
font-size: 18px;
|
||||
letter-spacing: 2px;
|
||||
div {
|
||||
padding: 4px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-name:hover {
|
||||
color: #6d6d6d;
|
||||
|
||||
& .user-center {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
|
|
@ -269,6 +434,7 @@ const onJumpMessage = () => {
|
|||
|
||||
a {
|
||||
padding: 0 20px;
|
||||
box-sizing: border-box;
|
||||
// border-right: 1px solid #666655;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ export const getLeaseInfoByIdApi = (data: any = {}) => {
|
|||
export const getAreaApi = (areaCode: any) => {
|
||||
return get(`/material-mall/maType/getArea?areaCode=${areaCode}`,)
|
||||
}
|
||||
export const getSwiperListApi = () => {
|
||||
return get(`/material-mall/bm_slide_show/list`, {})
|
||||
}
|
||||
// 立即接单
|
||||
export const setAcceptByIdApi = (data: any = {}) => {
|
||||
return post('/material-mall/ma-lease/accept', data)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ import { get, post } from '../../index'
|
|||
export const getMessageListApi = () => {
|
||||
return get('/material-mall/bm_message/list', {})
|
||||
}
|
||||
// 消息 获取消息列表历史记录
|
||||
export const getMessageListAllApi = () => {
|
||||
return get('/material-mall/bm_message/listFromDB', {})
|
||||
}
|
||||
// 消息 获取消息详情
|
||||
export const getMessageInfoApi = (data: any) => {
|
||||
return get('/material-mall/bm_message/listOneToOne', data)
|
||||
|
|
@ -12,8 +16,16 @@ export const getMessageInfoApi = (data: any) => {
|
|||
export const sendMessageApi = (data: any) => {
|
||||
return post('/material-mall/bm_message', data)
|
||||
}
|
||||
// 消息 已读
|
||||
export const isReadMessageAPI = (data: any) => {
|
||||
return post('/material-mall/bm_message/edit', data)
|
||||
}
|
||||
// 消息 发送消息
|
||||
export const messageIsReadApi = (data: any) => {
|
||||
return post('/material-mall/bm_message/edit', data)
|
||||
}
|
||||
// 消息 历史记录
|
||||
export const messageHistoryApi = (data: any) => {
|
||||
return get('/material-mall/bm_message/listOneToOneFromDB', data)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ import { cartStore } from 'store/cart'
|
|||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getHotSearchListApi, getBookCarDetailsApi } from 'http/api/home/index'
|
||||
import userClass from '../hooks/userClass'
|
||||
import {
|
||||
getUserInfo, //用户信息
|
||||
editMessageApi, //修改
|
||||
resetPwd, // 重置密码
|
||||
editPhone, // 修改手机号
|
||||
} from 'http/api/personalCenter'
|
||||
const { getCompanyList } = userClass()
|
||||
import imgSrc from '@/assets/img/logo.png'
|
||||
const store: any = mainStore()
|
||||
|
|
@ -241,7 +247,7 @@ const onCarts = () => {
|
|||
const onJumpUser = () => {
|
||||
const isType: any = localStorage.getItem('rolesType')
|
||||
if (isType == 3) {
|
||||
window.open(`http://36.33.26.201:17788/glweb/login?token=${store.token}`)
|
||||
window.open(`http://36.33.26.201:17788/iws/glweb/login?token=${store.token}`)
|
||||
} else {
|
||||
router.push({ name: 'my-user' })
|
||||
}
|
||||
|
|
@ -263,6 +269,64 @@ const onJumpMessage = () => {
|
|||
name: 'message',
|
||||
})
|
||||
}
|
||||
|
||||
const form: any = ref({
|
||||
userId: '',
|
||||
name: '',
|
||||
nickName: '',
|
||||
userName: '',
|
||||
password: '',
|
||||
phoneNumber: '',
|
||||
deptId: '',
|
||||
})
|
||||
const dialogUserInfoVisible = ref(false)
|
||||
const circleUrl = ref('https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg')
|
||||
const onAccountManage = () => {
|
||||
dialogUserInfoVisible.value = true
|
||||
}
|
||||
const getUserListData = async () => {
|
||||
let res = await getUserInfo()
|
||||
form.value = res.data
|
||||
}
|
||||
|
||||
const resetPassword = async () => {
|
||||
ElMessageBox.confirm('确定要重置密码吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(async () => {
|
||||
const params = {
|
||||
password: form.value.password,
|
||||
userId: form.value.userId,
|
||||
}
|
||||
let res: any = await resetPwd(params)
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('重置成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const resetPhone = async () => {
|
||||
ElMessageBox.confirm('确定要修改手机号吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(async () => {
|
||||
const params = {
|
||||
userId: form.value.userId,
|
||||
phoneNumber: form.value.phoneNumber,
|
||||
}
|
||||
let res: any = await editPhone(params)
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('修改成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getUserListData()
|
||||
circleUrl.value = store.userInfo.avatar
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -271,9 +335,29 @@ const onJumpMessage = () => {
|
|||
<div class="header-user-info">
|
||||
<div class="header-box">
|
||||
<div class="header-item" v-if="isShowLogout">
|
||||
<a class="user-name"
|
||||
>{{ activeLoginCompanyName }} / {{ store.userInfo.nickName }}</a
|
||||
>
|
||||
<a class="user-name">
|
||||
<span class="name">
|
||||
{{ activeLoginCompanyName }} / {{ store.userInfo.nickName }}
|
||||
</span>
|
||||
<el-icon style="margin-left: 4px">
|
||||
<ArrowDown />
|
||||
</el-icon>
|
||||
|
||||
<div class="user-center">
|
||||
<div style="text-align: right">
|
||||
<el-button size="small" @click="onAccountManage"
|
||||
>账号管理</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="user-container">
|
||||
<el-avatar :size="50" :src="circleUrl" />
|
||||
<div class="info">
|
||||
<div>姓名:{{ form.nickName }}</div>
|
||||
<div>登录账号:{{ form.userName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
|
||||
|
|
@ -303,14 +387,7 @@ const onJumpMessage = () => {
|
|||
|
||||
<!-- 中间logo 部分 -->
|
||||
<div class="logo-ipt-container">
|
||||
<div class="home-logo" @click="$router.push('/home')">
|
||||
<!-- <el-image
|
||||
style="width: 70%; cursor: pointer"
|
||||
:src="imgSrc"
|
||||
fit="cover"
|
||||
@click="$router.push('/mall-view')"
|
||||
/> -->
|
||||
</div>
|
||||
<div class="home-logo" @click="$router.push('/home')"></div>
|
||||
<div class="home-search">
|
||||
<input
|
||||
:placeholder="searchTypeName === '装备' ? '搜索装备关键词' : '搜索需求关键词'"
|
||||
|
|
@ -372,51 +449,43 @@ const onJumpMessage = () => {
|
|||
<span style="margin-left: 15px"> 预约车 </span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <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="cover"
|
||||
@click="$router.push('/home')"
|
||||
/>
|
||||
<input
|
||||
:placeholder="placeholderText"
|
||||
type="text"
|
||||
v-model.trim="keywordIptValue"
|
||||
@keydown.enter="searchKeywordBtn"
|
||||
ref="inputRef"
|
||||
@focus="placeholderText = ''"
|
||||
@blur="placeholderText = '搜索设备关键词'"
|
||||
/>
|
||||
<button class="search-btn" @click="searchKeywordBtn">搜索</button>
|
||||
|
||||
<div class="ipt-down">
|
||||
<a
|
||||
v-for="item in searchHistoryList"
|
||||
:key="item.maId"
|
||||
@click="handleHistory(item.deviceName)"
|
||||
class="history-box"
|
||||
>
|
||||
{{ item.deviceName }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="cart-icon" @click="onCarts" v-if="isType == 2">
|
||||
<el-badge :value="cartNum">
|
||||
<svg class="icon" aria-hidden="true" style="width: 30px; height: 30px">
|
||||
<use xlink:href="#icon-gouwuche2"></use>
|
||||
</svg>
|
||||
</el-badge>
|
||||
<span style="margin-left: 15px"> 预约车 </span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog
|
||||
v-model="dialogUserInfoVisible"
|
||||
title="账户管理"
|
||||
width="50%"
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
:before-close="
|
||||
() => {
|
||||
dialogUserInfoVisible = false
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-form :model="form" label-width="120px">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.nickName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="登录账号">
|
||||
<el-input v-model="form.userName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码">
|
||||
<div style="display: flex; width: 100%">
|
||||
<el-input v-model="form.password" show-password></el-input>
|
||||
<el-button type="text" icon="EditPen" @click="resetPassword">
|
||||
修改密码
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<div style="display: flex; width: 100%">
|
||||
<el-input v-model="form.phoneNumber" style="flex: 1"></el-input>
|
||||
<el-button type="text" icon="EditPen" @click="resetPhone">重新绑定</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -460,8 +529,46 @@ const onJumpMessage = () => {
|
|||
background-color: #666655;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.user-center {
|
||||
display: none;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: -106px;
|
||||
left: 0;
|
||||
padding: 10px 20px;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 4px #ccc;
|
||||
|
||||
.user-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.info {
|
||||
margin-left: 26px;
|
||||
font-size: 18px;
|
||||
letter-spacing: 2px;
|
||||
div {
|
||||
padding: 4px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-name:hover {
|
||||
color: #6d6d6d;
|
||||
|
||||
& .user-center {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
|
|
|
|||
|
|
@ -775,7 +775,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
|
||||
const router = createRouter({
|
||||
// 路由模式
|
||||
history: createWebHistory('/mall-view/'),
|
||||
history: createWebHistory('/iws/mall-view/'),
|
||||
routes
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,10 @@ const handlerLogin = async () => {
|
|||
if (route.query && route.query.redirect) {
|
||||
router.push(decodeURIComponent(route.query.redirect))
|
||||
} else {
|
||||
router.push('/home')
|
||||
// router.push('/home')
|
||||
router.push({
|
||||
name: 'home',
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ const getCompanyAddressListData = async () => {
|
|||
const getDeviceListData = async (params: any = null, keyWord: any = null) => {
|
||||
// 组装查询参数
|
||||
const searchParams: any = {
|
||||
keyWord: keyWord ? keyWord : '',
|
||||
keyWord: keyWord ? keyWord : keyWordsSearch.value ? keyWordsSearch.value : '',
|
||||
ageMin: '',
|
||||
ageMax: '',
|
||||
companyId: '',
|
||||
|
|
@ -650,9 +650,10 @@ const onCurrentChange = (val: number) => {
|
|||
pageData.pageNum = val
|
||||
getDeviceListData()
|
||||
}
|
||||
|
||||
const keyWordsSearch = ref('')
|
||||
onMounted(() => {
|
||||
$bus.on('search', (val: any) => {
|
||||
keyWordsSearch.value = val
|
||||
getDeviceListData(null, val)
|
||||
})
|
||||
let routeParams: any = null
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import EquipCard from 'components/equipCard.vue'
|
||||
import EquipCardNew from 'components/equipCardNew/index.vue'
|
||||
import NavMenu from 'components/Navmenu/index.vue'
|
||||
import { getGoodsClassListApi, getCompanyListApi } from 'http/api/home'
|
||||
import { getGoodsClassListApi, getCompanyListApi, getSwiperListApi } from 'http/api/home'
|
||||
import { useStore } from 'store/user'
|
||||
import { mainStore } from 'store/main'
|
||||
import { getHotList } from 'http/api/equip'
|
||||
|
|
@ -14,6 +14,7 @@ import swiper_2 from '../../assets/img/home/swiper02.png'
|
|||
import swiper_3 from '../../assets/img/home/swiper03.png'
|
||||
import swiper_4 from '../../assets/img/home/swiper04.png'
|
||||
import swiper_5 from '../../assets/img/home/swiper05.png'
|
||||
import { el } from 'element-plus/es/locale'
|
||||
|
||||
const { getCompanyList, getGoodsClassList } = userClass()
|
||||
const router: any = useRouter()
|
||||
|
|
@ -140,6 +141,24 @@ const onSelectItem = (type: number) => {
|
|||
}
|
||||
selectOptions.value = false
|
||||
}
|
||||
|
||||
const swiperList = ref([])
|
||||
// 获取轮播图
|
||||
const getSwiperListData = async () => {
|
||||
const res: any = await getSwiperListApi()
|
||||
swiperList.value = res.rows
|
||||
// console.log(res, '轮播图信息')
|
||||
}
|
||||
|
||||
const onClickSwiper = (item: any) => {
|
||||
if (item.slideLink) {
|
||||
window.open(item.slideLink, '_blank')
|
||||
} else {
|
||||
router.push({ name: 'equipList' })
|
||||
}
|
||||
}
|
||||
|
||||
getSwiperListData()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -255,27 +274,20 @@ const onSelectItem = (type: number) => {
|
|||
</template>
|
||||
</ul>
|
||||
<div class="right-content">
|
||||
<!-- 轮播图上方导航按钮 -->
|
||||
<NavMenu />
|
||||
<!-- 轮播图 -->
|
||||
<div class="swiper-img">
|
||||
<el-carousel :interval="5000" arrow="always" style="height: 100%">
|
||||
<el-carousel-item
|
||||
v-for="(item, index) in loopList"
|
||||
:key="index"
|
||||
style="height: 100%"
|
||||
>
|
||||
<el-image
|
||||
style="width: 100%; height: 100%"
|
||||
:src="item"
|
||||
fit="cover"
|
||||
@click="
|
||||
() => {
|
||||
router.push({ name: 'equipList' })
|
||||
}
|
||||
"
|
||||
/>
|
||||
</el-carousel-item>
|
||||
<template v-for="(item, index) in swiperList" :key="index">
|
||||
<el-carousel-item style="height: 100%" v-if="item.delFlag == 0">
|
||||
<el-image
|
||||
style="width: 100%; height: 100%; cursor: pointer"
|
||||
:src="item.slidePicture"
|
||||
fit="cover"
|
||||
@click="onClickSwiper(item)"
|
||||
/>
|
||||
</el-carousel-item>
|
||||
</template>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -107,6 +107,9 @@ import {
|
|||
getMessageInfoApi,
|
||||
sendMessageApi,
|
||||
messageIsReadApi,
|
||||
messageHistoryApi,
|
||||
getMessageListAllApi,
|
||||
isReadMessageAPI,
|
||||
} from 'http/api/message/index'
|
||||
import { mainStore } from 'store/main'
|
||||
import { debounce } from 'lodash-es'
|
||||
|
|
@ -118,6 +121,7 @@ const rightCompanyName = ref('')
|
|||
const store: any = mainStore()
|
||||
const route = useRoute()
|
||||
const messageList = ref<any>([])
|
||||
const messageListAll = ref<any>([])
|
||||
const messageDetails = ref<any>([])
|
||||
const messageInterval = ref<any>(null)
|
||||
const messageListInterval = ref<any>(null)
|
||||
|
|
@ -132,7 +136,13 @@ const sendParams = ref<any>({
|
|||
// 消息列表
|
||||
const getMessageListData = async () => {
|
||||
const { data: res }: any = await getMessageListApi()
|
||||
messageList.value = res
|
||||
messageList.value = [...new Set([...messageListAll.value, ...res])]
|
||||
}
|
||||
|
||||
const getMessageListAllData = async () => {
|
||||
const { data: res }: any = await getMessageListAllApi()
|
||||
messageListAll.value = res
|
||||
// console.log(res, '历史记录')
|
||||
}
|
||||
|
||||
// 消息详情
|
||||
|
|
@ -141,6 +151,22 @@ const getMessageInfoData = async (toCompany: any) => {
|
|||
messageDetails.value = res
|
||||
}
|
||||
|
||||
// 历史消息
|
||||
const getMessageHistoryData = async (fromCompany: any) => {
|
||||
const { data: res }: any = await messageHistoryApi({ fromCompany })
|
||||
console.log(res, '历史记录---')
|
||||
// messageDetails.value = res
|
||||
}
|
||||
|
||||
// 消息已读
|
||||
const isReadMessageData = async (toCompany: any, fromCompany: any) => {
|
||||
const isReadParams = {
|
||||
toCompany,
|
||||
fromCompany,
|
||||
}
|
||||
const res = await isReadMessageAPI(isReadParams)
|
||||
}
|
||||
|
||||
// 消息点击
|
||||
const onClickMessage = async (item: any) => {
|
||||
const { toCompany, fromCompany, toCompanyName, fromCompanyName, toUser, fromUser } = item
|
||||
|
|
@ -153,13 +179,18 @@ const onClickMessage = async (item: any) => {
|
|||
|
||||
const res: any = await messageIsReadApi({
|
||||
toCompany: myCompanyId.value,
|
||||
fromCompany: sendParams.value.toCompany,
|
||||
fromCompany: queryDetailsCompanyId.value,
|
||||
})
|
||||
|
||||
console.log(res, '消息已读')
|
||||
console.log(res, '已读结果--')
|
||||
|
||||
getMessageInfoData(queryDetailsCompanyId.value)
|
||||
|
||||
// console.log(res, '消息已读')
|
||||
if (!messageInterval.value) {
|
||||
messageInterval.value = setInterval(() => {
|
||||
getMessageInfoData(queryDetailsCompanyId.value)
|
||||
// getMessageHistoryData(queryDetailsCompanyId.value)
|
||||
}, 5000)
|
||||
}
|
||||
}
|
||||
|
|
@ -173,7 +204,10 @@ const onSendMessage = debounce(async () => {
|
|||
}, 500)
|
||||
const errorHandler = () => true
|
||||
onMounted(() => {
|
||||
getMessageListData()
|
||||
Promise.all([getMessageListAllData()]).then(() => {
|
||||
getMessageListData()
|
||||
})
|
||||
|
||||
if (route.query && route.query.companyId) {
|
||||
const { companyId, companyName, ownId }: any = route.query
|
||||
rightCompanyName.value = companyName
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ getCompanyAddressListData()
|
|||
|
||||
const getLeaseListData = async (keyWord: any = '') => {
|
||||
const searchParams: any = {
|
||||
keyWord,
|
||||
keyWord: keyWordsSearch.value ? keyWordsSearch.value : '',
|
||||
companyId: '',
|
||||
typeId: '',
|
||||
level: '',
|
||||
|
|
@ -443,9 +443,11 @@ const onCurrentChange = (val: number) => {
|
|||
getLeaseListData()
|
||||
}
|
||||
|
||||
const keyWordsSearch = ref('')
|
||||
onMounted(() => {
|
||||
getLeaseListData()
|
||||
$bus.on('search', (val: any) => {
|
||||
keyWordsSearch.value = val
|
||||
getLeaseListData(val)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ const onEditorReady = (editor) => {
|
|||
onMounted(() => {
|
||||
getContractListData()
|
||||
|
||||
uploadUrlTemp.value = window.location.origin + '/mall-view/contract-template.docx'
|
||||
uploadUrlTemp.value = window.location.origin + '/iws/mall-view/contract-template.docx'
|
||||
// getEquipmentTypeApi().then((res: any) => {
|
||||
// deviceTypeTree.value = res.data
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1627,7 +1627,8 @@ const changeDate = (row: any, index: number) => {
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<!-- 1.13 需求变动要求隐藏 -->
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="校验日期:" prop="checkDate">
|
||||
<el-date-picker
|
||||
|
|
@ -1653,7 +1654,7 @@ const changeDate = (row: any, index: number) => {
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整机重量(KG):">
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const isType: any = computed(() => {
|
|||
|
||||
const allList = [
|
||||
{ title: '装备管理', name: 'goodsManagement', permission: ['1'] },
|
||||
{ title: '订单管理', name: 'orderManagementCz', permission: ['1'] },
|
||||
{ title: '出租订单', name: 'orderManagementCz', permission: ['1'] },
|
||||
{ title: '接单管理', name: 'accept-orders', permission: ['1'] },
|
||||
// { title: '退租管理', name: 'rent-termination', permission: ['1'] },
|
||||
// { title: '结算管理', name: 'settlement-manage', permission: ['1'] },
|
||||
|
|
@ -33,12 +33,12 @@ const allList = [
|
|||
// { title: '标签管理', name: 'tag-manage', permission: ['1'] },
|
||||
// { title: '维修保养管理', name: 'repair-manage', permission: ['1'] },
|
||||
{ title: '需求管理', name: 'sourcingNeed', permission: ['2'] },
|
||||
{ title: '订单管理', name: 'orderManagement', permission: ['2'] },
|
||||
{ title: '租赁订单', name: 'orderManagement', permission: ['2'] },
|
||||
{ title: '收货地址管理', name: 'address-manage', permission: ['2'] },
|
||||
{ title: '合同管理', name: 'contract-manage', permission: ['1'] },
|
||||
{ title: '快捷消息设置', name: 'quickMessage', permission: ['1'] },
|
||||
{ title: '个人中心', name: 'personalCenter', permission: ['1'] },
|
||||
{ title: '个人中心', name: 'personalCenter', permission: ['2'] },
|
||||
// { title: '个人中心', name: 'personalCenter', permission: ['1'] },
|
||||
// { title: '个人中心', name: 'personalCenter', permission: ['2'] },
|
||||
]
|
||||
|
||||
const rolesType = ref('承租方')
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ const statusList: any = [
|
|||
{ id: '2', name: '待出库' },
|
||||
{ id: '3', name: '待收货' },
|
||||
{ id: '4', name: '租赁中' },
|
||||
{ id: '5', name: '已退租' },
|
||||
{ id: '15', name: '结算待确认' },
|
||||
{ id: '8', name: '已驳回' },
|
||||
{ id: '10', name: '已检修待结算' },
|
||||
// { id: '5', name: '已退租' },
|
||||
// { id: '15', name: '结算待确认' },
|
||||
// { id: '8', name: '已驳回' },
|
||||
// { id: '10', name: '已检修待结算' },
|
||||
{ id: '20', name: '已完成' },
|
||||
{ id: '99', name: '已取消' },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@ const statusList: any = [
|
|||
{ id: '2', name: '待出库' },
|
||||
{ id: '3', name: '待收货' },
|
||||
{ id: '4', name: '租赁中' },
|
||||
{ id: '5', name: '已退租' },
|
||||
{ id: '15', name: '结算待确认' },
|
||||
{ id: '8', name: '已驳回' },
|
||||
{ id: '10', name: '已检修待结算' },
|
||||
// { id: '5', name: '已退租' },
|
||||
// { id: '15', name: '结算待确认' },
|
||||
// { id: '8', name: '已驳回' },
|
||||
// { id: '10', name: '已检修待结算' },
|
||||
{ id: '20', name: '已完成' },
|
||||
{ id: '99', name: '已取消' },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default ({ mode }: any) => {
|
|||
}
|
||||
|
||||
return defineConfig({
|
||||
base: '/mall-view/',
|
||||
base: '/iws/mall-view/',
|
||||
plugins: [
|
||||
vue(),
|
||||
vueJsx(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue