中文:收口权限与中心/立项配置改造

This commit is contained in:
Cheng Zhou
2026-05-12 10:16:52 +08:00
parent 6e90370a5f
commit 77e842637d
67 changed files with 706 additions and 669 deletions
+16 -9
View File
@@ -3,7 +3,7 @@
<el-card class="unified-shell">
<h3 class="title">{{ TEXT.modules.profile.title }}</h3>
<p class="subtitle">{{ TEXT.modules.profile.subtitle }}</p>
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px" class="form">
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px" class="form" autocomplete="off">
<el-form-item :label="TEXT.common.fields.avatar">
<div class="avatar-row">
<el-avatar :size="64" :src="avatarPreview" :alt="form.full_name || form.email">
@@ -26,14 +26,21 @@
<el-input v-model="form.email" disabled />
</el-form-item>
<el-form-item :label="TEXT.common.fields.name" prop="full_name">
<el-input v-model="form.full_name" :placeholder="TEXT.common.placeholders.input + TEXT.common.fields.name" />
<el-input v-model="form.full_name" autocomplete="off" :placeholder="TEXT.common.placeholders.input + TEXT.common.fields.name" />
</el-form-item>
<el-form-item :label="TEXT.common.fields.department" prop="department">
<el-input v-model="form.department" :placeholder="TEXT.common.placeholders.input + TEXT.common.fields.department" />
<el-form-item :label="TEXT.common.fields.clinicalDepartment" prop="clinical_department">
<el-input v-model="form.clinical_department" autocomplete="off" :placeholder="TEXT.common.placeholders.input + TEXT.common.fields.clinicalDepartment" />
</el-form-item>
<el-divider />
<el-form-item :label="TEXT.modules.profile.currentPassword" prop="current_password">
<el-input v-model="form.current_password" type="password" show-password :placeholder="TEXT.modules.profile.currentPasswordHint" />
<el-input
v-model="form.current_password"
type="password"
show-password
autocomplete="new-password"
name="ctms-profile-current-password"
:placeholder="TEXT.modules.profile.currentPasswordHint"
/>
</el-form-item>
<el-form-item :label="TEXT.modules.profile.newPassword" prop="password">
<el-input v-model="form.password" type="password" show-password :placeholder="TEXT.modules.profile.newPasswordHint" />
@@ -64,7 +71,7 @@ const submitting = ref(false);
const form = reactive({
email: "",
full_name: "",
department: "",
clinical_department: "",
current_password: "",
password: "",
confirmPassword: "",
@@ -76,7 +83,7 @@ const uploadHeaders = computed<Record<string, string>>(() => ({
const rules: FormRules<typeof form> = {
full_name: [{ required: true, message: requiredMessage(TEXT.common.fields.name), trigger: "blur" }],
department: [{ required: true, message: requiredMessage(TEXT.common.fields.department), trigger: "blur" }],
clinical_department: [{ required: true, message: requiredMessage(TEXT.common.fields.clinicalDepartment), trigger: "blur" }],
current_password: [
{
validator: (_r, value, cb) => {
@@ -120,7 +127,7 @@ const loadProfile = async () => {
const { data } = await fetchMe();
form.email = data.email;
form.full_name = data.full_name;
form.department = data.department;
form.clinical_department = data.clinical_department;
avatarPreview.value = data.avatar_url || undefined;
};
@@ -132,7 +139,7 @@ const onSubmit = async () => {
try {
await updateProfile({
full_name: form.full_name,
department: form.department,
clinical_department: form.clinical_department,
current_password: form.password ? form.current_password : undefined,
password: form.password || undefined,
});