feat: 完成聊天记录、修改密码页面样式改造

This commit is contained in:
zhuoqinglian
2026-06-25 17:26:52 +08:00
parent 2cf8f79482
commit eb2c09bbdc
3 changed files with 46 additions and 78 deletions
@@ -1,55 +1,42 @@
<template> <template>
<form> <form>
<el-dialog :visible.sync="dialogVisible" width="24%" center> <CustomDialog
<div :title="$t('changePassword.title')"
style="margin: 0 10px 10px;display: flex;align-items: center;gap: 10px;font-weight: 700;font-size: 20px;text-align: left;color: #3d4566;"> :visible.sync="dialogVisible"
<div width="600px"
style="width: 40px;height: 40px;border-radius: 50%;background: #5778ff;display: flex;align-items: center;justify-content: center;"> @cancel="cancel"
<img loading="lazy" src="@/assets/login/shield.png" alt="" @confirm="confirm">
style="width: 19px;height: 23px; filter: brightness(0) invert(1);" /> <div class="password-form">
</div> <div class="form-label">
{{ $t('changePassword.title') }} <span class="required">*</span>
</div>
<div style="height: 1px;background: #e8f0ff;" />
<div style="margin: 22px 15px;">
<div style="font-weight: 400;font-size: 14px;text-align: left;color: #3d4566;">
<div style="color: red;display: inline-block;">*</div>
{{ $t('changePassword.oldPasswordLabel') }} {{ $t('changePassword.oldPasswordLabel') }}
</div> </div>
<div class="input-46" style="margin-top: 12px;"> <div class="input-46" style="margin-top: 12px;">
<el-input :placeholder="$t('changePassword.oldPasswordPlaceholder')" v-model="oldPassword" type="password" show-password /> <el-input :placeholder="$t('changePassword.oldPasswordPlaceholder')" v-model="oldPassword" type="password" show-password />
</div> </div>
<div style="font-weight: 400;font-size: 14px;text-align: left;color: #3d4566;margin-top: 12px;"> <div class="form-label" style="margin-top: 12px;">
<div style="color: red;display: inline-block;">*</div> <span class="required">*</span>
{{ $t('changePassword.newPasswordLabel') }} {{ $t('changePassword.newPasswordLabel') }}
</div> </div>
<div class="input-46" style="margin-top: 12px;"> <div class="input-46" style="margin-top: 12px;">
<el-input :placeholder="$t('changePassword.newPasswordPlaceholder')" v-model="newPassword" type="password" show-password /> <el-input :placeholder="$t('changePassword.newPasswordPlaceholder')" v-model="newPassword" type="password" show-password />
</div> </div>
<div style="font-weight: 400;font-size: 14px;text-align: left;color: #3d4566;margin-top: 12px;"> <div class="form-label" style="margin-top: 12px;">
<div style="color: red;display: inline-block;">*</div> <span class="required">*</span>
{{ $t('changePassword.confirmPasswordLabel') }} {{ $t('changePassword.confirmPasswordLabel') }}
</div> </div>
<div class="input-46" style="margin-top: 12px;"> <div class="input-46" style="margin-top: 12px;">
<el-input :placeholder="$t('changePassword.confirmPasswordPlaceholder')" v-model="confirmNewPassword" type="password" show-password /> <el-input :placeholder="$t('changePassword.confirmPasswordPlaceholder')" v-model="confirmNewPassword" type="password" show-password />
</div> </div>
</div> </div>
<div style="display: flex;margin: 15px 15px;gap: 7px;"> </CustomDialog>
<div class="dialog-btn" @click="confirm">
{{ $t('changePassword.confirmButton') }}
</div>
<div class="dialog-btn" style="background: #e6ebff;border: 1px solid #adbdff;color: #5778ff;" @click="cancel">
{{ $t('changePassword.cancelButton') }}
</div>
</div>
</el-dialog>
</form> </form>
</template> </template>
<script> <script>
import userApi from '@/apis/module/user'; import userApi from '@/apis/module/user';
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { changeLanguage } from '@/i18n'; import CustomDialog from '@/components/CustomDialog.vue';
export default { export default {
name: 'ChangePasswordDialog', name: 'ChangePasswordDialog',
@@ -67,6 +54,9 @@ export default {
confirmNewPassword: "" confirmNewPassword: ""
} }
}, },
components: {
CustomDialog
},
watch: { watch: {
value(val) { value(val) {
this.dialogVisible = val; this.dialogVisible = val;
@@ -100,7 +90,6 @@ export default {
}); });
this.logout().then(() => { this.logout().then(() => {
this.$router.push('/login'); this.$router.push('/login');
this.$emit('update:visible', false);
}); });
} else { } else {
this.$message.error(res.data.msg || this.$t('changePassword.changeFailed')); this.$message.error(res.data.msg || this.$t('changePassword.changeFailed'));
@@ -108,10 +97,9 @@ export default {
}, (err) => { }, (err) => {
this.$message.error(err.msg || this.$t('changePassword.changeFailed')); this.$message.error(err.msg || this.$t('changePassword.changeFailed'));
}); });
this.$emit('input', false); this.dialogVisible = false;
}, },
cancel() { cancel() {
this.dialogVisible = false;
this.resetForm(); this.resetForm();
}, },
resetForm() { resetForm() {
@@ -124,38 +112,18 @@ export default {
</script> </script>
<style scoped> <style scoped>
.form-label {
text-align: left;
}
.required {
color: red;
display: inline-block;
}
.input-46 { .input-46 {
background: #f6f8fb; background: #f6f8fb;
border-radius: 15px; border-radius: 15px;
} }
.dialog-btn {
cursor: pointer;
flex: 1;
border-radius: 23px;
background: #5778ff;
height: 40px;
font-weight: 500;
font-size: 12px;
color: #fff;
line-height: 40px;
text-align: center;
}
::v-deep .el-dialog {
border-radius: 15px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
::v-deep .el-dialog__headerbtn {
display: none;
}
::v-deep .el-dialog__body {
padding: 4px 6px;
}
::v-deep .el-dialog__header {
padding: 10px;
}
</style> </style>
@@ -1,8 +1,12 @@
<template> <template>
<el-dialog <CustomDialog
:title="$t('chatHistory.with') + agentName + $t('chatHistory.dialogTitle') + (currentMacAddress ? '[' + currentMacAddress + ']' : '')" :title="$t('chatHistory.with') + agentName + $t('chatHistory.dialogTitle')"
:visible.sync="dialogVisible" width="80%" :before-close="handleClose" custom-class="chat-history-dialog"> :visible.sync="dialogVisible"
<template slot="title"> width="80%"
:footer="false"
:close-on-click-modal="false"
custom-class="chat-history-dialog">
<template v-slot:title>
<span style="font-size: 18px;"> <span style="font-size: 18px;">
{{ $t('chatHistory.with') + agentName + $t('chatHistory.dialogTitle') }} {{ $t('chatHistory.with') + agentName + $t('chatHistory.dialogTitle') }}
<template v-if="currentMacAddress"> <template v-if="currentMacAddress">
@@ -77,12 +81,13 @@
{{ $t('chatHistory.downloadCurrentSession') }} {{ $t('chatHistory.downloadCurrentSession') }}
</el-button> </el-button>
</div> </div>
</el-dialog> </CustomDialog>
</template> </template>
<script> <script>
import { debounce } from '@/utils' import { debounce } from '@/utils'
import Api from '@/apis/api'; import Api from '@/apis/api';
import CustomDialog from '@/components/CustomDialog.vue';
import MacAddressMask from '@/components/MacAddressMask.vue'; import MacAddressMask from '@/components/MacAddressMask.vue';
export default { export default {
@@ -120,6 +125,7 @@ export default {
}; };
}, },
components: { components: {
CustomDialog,
MacAddressMask, MacAddressMask,
}, },
watch: { watch: {
@@ -241,9 +247,6 @@ export default {
this.isFirstLoad = true; this.isFirstLoad = true;
this.expandedToolResults = {}; this.expandedToolResults = {};
}, },
handleClose() {
this.dialogVisible = false;
},
loadSessions() { loadSessions() {
if (this.loading || (!this.isFirstLoad && !this.hasMore)) { if (this.loading || (!this.isFirstLoad && !this.hasMore)) {
return; return;
@@ -635,11 +638,6 @@ export default {
overflow: hidden; overflow: hidden;
} }
.chat-history-dialog .el-dialog__header {
background-color: #e6f7ff;
padding: 15px 20px;
}
.chat-history-dialog .el-dialog__body { .chat-history-dialog .el-dialog__body {
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
@@ -13,10 +13,12 @@
@open="handleOpen" @open="handleOpen"
> >
<template slot="title"> <template slot="title">
<div class="dialog-title"> <slot name="title">
<img src="@/assets/knowledge-base/level.png" class="title-icon" /> <div class="dialog-title">
<span>{{ title }}</span> <img src="@/assets/knowledge-base/level.png" class="title-icon" />
</div> <span>{{ title }}</span>
</div>
</slot>
</template> </template>
<slot></slot> <slot></slot>
<template slot="footer"> <template slot="footer">