|
@@ -4,7 +4,7 @@
|
|
|
<div class="color-lane">
|
|
|
<div class="avatar-div">
|
|
|
<el-avatar :size="150" :src="userInfo.avatar" @error="errorHandler">
|
|
|
- <img :src="makeTextPortrait()" />
|
|
|
+ <img :src="makeTextPortrait()"/>
|
|
|
</el-avatar>
|
|
|
</div>
|
|
|
<div class="name-div">
|
|
@@ -20,7 +20,9 @@
|
|
|
<div class="clearfix">
|
|
|
<span>个人信息</span>
|
|
|
<el-button style="float: right; padding: 3px 0" text @click="quitLogin">退出账号</el-button>
|
|
|
- <el-button style="float: right; padding: 3px 0; margin-right: 10px" text @click="dialogVisible = true">修改密码</el-button>
|
|
|
+ <el-button style="float: right; padding: 3px 0; margin-right: 10px" text @click="dialogVisible = true">
|
|
|
+ 修改密码
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
<div class="card-info">
|
|
@@ -53,12 +55,18 @@
|
|
|
<div class="advice-status">
|
|
|
<div v-if="isAdmin">
|
|
|
<el-badge value="new" type="danger" :hidden="item.statusFlag !== 0">
|
|
|
- <el-tag :type="filterStatusType(item.statusFlag)">{{ filterStatusText(item.statusFlag) }}</el-tag>
|
|
|
+ <el-tag :type="filterStatusType(item.statusFlag)">{{
|
|
|
+ filterStatusText(item.statusFlag)
|
|
|
+ }}
|
|
|
+ </el-tag>
|
|
|
</el-badge>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<el-badge value="new" type="danger" :hidden="item.userBadge === 0">
|
|
|
- <el-tag :type="filterStatusType(item.statusFlag)">{{ filterStatusText(item.statusFlag) }}</el-tag>
|
|
|
+ <el-tag :type="filterStatusType(item.statusFlag)">{{
|
|
|
+ filterStatusText(item.statusFlag)
|
|
|
+ }}
|
|
|
+ </el-tag>
|
|
|
</el-badge>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -72,11 +80,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-dialog title="修改密码" v-model="dialogVisible" width="360px">
|
|
|
- <el-input v-model="changePwdParam.oldPassword" type="password" show-password placeholder="请输入旧密码"></el-input>
|
|
|
+ <el-input v-model="changePwdParam.oldPassword" type="password" show-password
|
|
|
+ placeholder="请输入旧密码"></el-input>
|
|
|
<div style="margin-top: 20px"></div>
|
|
|
- <el-input v-model="changePwdParam.newPassword" type="password" show-password placeholder="请输入新密码"></el-input>
|
|
|
+ <el-input v-model="changePwdParam.newPassword" type="password" show-password
|
|
|
+ placeholder="请输入新密码"></el-input>
|
|
|
<div style="margin-top: 20px"></div>
|
|
|
- <el-input v-model="changePwdParam.newPasswordCopy" type="password" show-password placeholder="请重复新密码"></el-input>
|
|
|
+ <el-input v-model="changePwdParam.newPasswordCopy" type="password" show-password
|
|
|
+ placeholder="请重复新密码"></el-input>
|
|
|
<template #footer>
|
|
|
<el-button type="info" icon="RefreshLeft" @click="closeDialog">取消</el-button>
|
|
|
<el-button type="primary" icon="Check" @click="confirmDialog">确定</el-button>
|
|
@@ -87,12 +98,15 @@
|
|
|
<div><span>当前状态:</span>{{ filterStatusText(currentAdvice.statusFlag) }}</div>
|
|
|
<div><span>提交时间:</span>{{ currentAdvice.submitDatetime }}</div>
|
|
|
<div><span>提交内容:</span>{{ currentAdvice.submitContent }}</div>
|
|
|
- <p><el-divider></el-divider></p>
|
|
|
+ <p>
|
|
|
+ <el-divider></el-divider>
|
|
|
+ </p>
|
|
|
<div><span>回复时间:</span>{{ currentAdvice.replyDatetime }}</div>
|
|
|
<div><span>回复内容:</span>{{ currentAdvice.reply }}</div>
|
|
|
<div v-if="isAdmin">
|
|
|
<el-divider></el-divider>
|
|
|
- <el-input type="textarea" v-model="currentAdvice.reply" placeholder="在此输入回复内容" maxlength="150" show-word-limit></el-input>
|
|
|
+ <el-input type="textarea" v-model="currentAdvice.reply" placeholder="在此输入回复内容" maxlength="150"
|
|
|
+ show-word-limit></el-input>
|
|
|
<div style="width: 100%; text-align: right; margin-top: 16px">
|
|
|
<el-button type="primary" icon="Check" @click="replyAdvice">提交回复</el-button>
|
|
|
</div>
|
|
@@ -103,14 +117,23 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { computed, onActivated, onDeactivated, reactive, ref } from 'vue'
|
|
|
-import { changePassword, checkAdvice, dismissUserBadge, getMyAdvices, getUserInfo, submitNewAdvice, updateReply } from '@/api/settings/user-settings'
|
|
|
-import { genTextPortrait } from '@/utils/portrait'
|
|
|
-import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+import {computed, onActivated, onDeactivated, reactive, ref} from 'vue'
|
|
|
+import {
|
|
|
+ changePassword,
|
|
|
+ checkAdvice,
|
|
|
+ dismissUserBadge,
|
|
|
+ getMyAdvices,
|
|
|
+ getUserInfo,
|
|
|
+ submitNewAdvice,
|
|
|
+ updateReply
|
|
|
+} from '@/api/settings/user-settings'
|
|
|
+import {genTextPortrait} from '@/utils/portrait'
|
|
|
+import {ElMessage, ElMessageBox} from 'element-plus'
|
|
|
import router from '@/router'
|
|
|
import Cookies from 'js-cookie'
|
|
|
import store from '@/store'
|
|
|
-import { setCallback } from '@/utils/websocket'
|
|
|
+import {setCallback} from '@/utils/websocket'
|
|
|
+
|
|
|
export default {
|
|
|
setup() {
|
|
|
const windowSize = store.state.app.windowSize
|
|
@@ -172,6 +195,8 @@ export default {
|
|
|
type: 'success',
|
|
|
}).then(() => {
|
|
|
quitLogin()
|
|
|
+ }).catch(() => {
|
|
|
+ quitLogin()
|
|
|
})
|
|
|
})
|
|
|
}
|
|
@@ -193,8 +218,8 @@ export default {
|
|
|
confirmButtonText: '提交',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'info',
|
|
|
- }).then(({ value }) => {
|
|
|
- submitNewAdvice({ submitContent: value }).then(() => {
|
|
|
+ }).then(({value}) => {
|
|
|
+ submitNewAdvice({submitContent: value}).then(() => {
|
|
|
getMyAdvices().then((res) => {
|
|
|
myAdvices.value = res
|
|
|
ElMessage({
|
|
@@ -309,12 +334,14 @@ export default {
|
|
|
width: calc(100% - 2px);
|
|
|
display: flex;
|
|
|
}
|
|
|
+
|
|
|
.avatar-div {
|
|
|
height: 150px;
|
|
|
width: 150px;
|
|
|
padding-top: 25px;
|
|
|
margin-left: 15px;
|
|
|
}
|
|
|
+
|
|
|
.name-div {
|
|
|
color: white;
|
|
|
font-size: 26px;
|
|
@@ -322,19 +349,23 @@ export default {
|
|
|
margin-top: 50px;
|
|
|
margin-left: 15px;
|
|
|
}
|
|
|
+
|
|
|
.info-div {
|
|
|
color: rgb(90, 90, 90);
|
|
|
margin-top: 15px;
|
|
|
margin-left: 180px;
|
|
|
}
|
|
|
+
|
|
|
.item {
|
|
|
margin-bottom: 18px;
|
|
|
}
|
|
|
+
|
|
|
.clearfix:before,
|
|
|
.clearfix:after {
|
|
|
display: table;
|
|
|
content: '';
|
|
|
}
|
|
|
+
|
|
|
.clearfix:after {
|
|
|
clear: both;
|
|
|
}
|
|
@@ -352,6 +383,7 @@ export default {
|
|
|
width: 400px;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
+
|
|
|
.advice-line {
|
|
|
width: 312px;
|
|
|
height: 30px;
|
|
@@ -363,10 +395,12 @@ export default {
|
|
|
padding: 0 8px;
|
|
|
border-radius: 4px;
|
|
|
}
|
|
|
+
|
|
|
.advice-line:hover {
|
|
|
background-color: #67c23a;
|
|
|
color: white;
|
|
|
}
|
|
|
+
|
|
|
.advice-content {
|
|
|
overflow: hidden;
|
|
|
width: 260px;
|
|
@@ -375,15 +409,19 @@ export default {
|
|
|
color: inherit;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
+
|
|
|
.advice-status {
|
|
|
margin-left: 16px;
|
|
|
}
|
|
|
+
|
|
|
.advice-detail {
|
|
|
padding: 16px;
|
|
|
}
|
|
|
+
|
|
|
.advice-detail > div {
|
|
|
margin: 10px 0;
|
|
|
}
|
|
|
+
|
|
|
.advice-detail > div > span {
|
|
|
font-weight: bold;
|
|
|
}
|