问题修复
This commit is contained in:
parent
73584e5a72
commit
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
@ -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"
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog
|
||||
v-model="dialogUserInfoVisible"
|
||||
title="账户管理"
|
||||
width="50%"
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
:before-close="
|
||||
() => {
|
||||
dialogUserInfoVisible = false
|
||||
}
|
||||
"
|
||||
>
|
||||
{{ 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> -->
|
||||
<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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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,7 +33,7 @@ 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'] },
|
||||
|
|
|
|||
Loading…
Reference in New Issue