From 3b06046c69c72a0977f6176f78d7af6e9fe75bec Mon Sep 17 00:00:00 2001
From: "DESKTOP-6C3NK6N\\WXS" <815034831@qq.com>
Date: Fri, 20 Sep 2024 17:02:02 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E8=A7=84=E5=88=99?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/email-recompose/index.vue | 39 +++++++++++++++++++++++++----
1 file changed, 34 insertions(+), 5 deletions(-)
diff --git a/src/views/email-recompose/index.vue b/src/views/email-recompose/index.vue
index af212d93..9a11ceb9 100644
--- a/src/views/email-recompose/index.vue
+++ b/src/views/email-recompose/index.vue
@@ -90,11 +90,25 @@ export default {
{
required: true,
validator: (rule, value, callback) => {
- !value
- ? callback(
- new Error(this.$t('trials:researchForm:formRule:specify'))
- )
- : callback()
+ var lang = zzSessionStorage.getItem('lang')
+ ? zzSessionStorage.getItem('lang')
+ : 'zh'
+ /* eslint-disable */
+ var reg1 = /^[a-zA-Z0-9_]{4,16}$/ //密码必须是8位以上、必须含有字母、数字、特殊符号
+ console.log(!reg1.test(value))
+ if (!reg1.test(value)) {
+ callback(
+ lang === 'zh'
+ ? new Error(
+ '1)新建账号,用户名字符长度最小为4个字符,最大为16个字符,只可使用字母、数字、下划线;'
+ )
+ : new Error(
+ 'For a new account, the username must have:1) At least 4 characters;2) At most 16 characters;3)Only letters, numbers, and underscores are allowed.'
+ )
+ )
+ } else {
+ callback()
+ }
},
trigger: 'blur',
},
@@ -129,6 +143,21 @@ export default {
},
trigger: 'blur',
},
+ {
+ required: true,
+ trigger: 'blur',
+ validator: (rule, value, callback) => {
+ value !== this.password.NewPassWord
+ ? callback(
+ new Error(
+ this.$t(
+ 'trials:researchForm:formRule:NewPassWordAndConfirmPassWord'
+ )
+ )
+ )
+ : callback()
+ },
+ },
],
},
userId: null,
From ca1b95201ca5d989e8c262059f6b97f02ce1f1f6 Mon Sep 17 00:00:00 2001
From: "DESKTOP-6C3NK6N\\WXS" <815034831@qq.com>
Date: Mon, 23 Sep 2024 10:03:23 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83?=
=?UTF-8?q?=E8=B4=A6=E5=8F=B7=E8=AE=BE=E7=BD=AE=E6=B7=BB=E5=8A=A0=E6=A0=A1?=
=?UTF-8?q?=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/forgetpassword/index.vue | 2 +-
src/views/trials/trials-myinfo/account.vue | 171 ++++++++++++---------
2 files changed, 103 insertions(+), 70 deletions(-)
diff --git a/src/views/forgetpassword/index.vue b/src/views/forgetpassword/index.vue
index 61488439..3e6cfd91 100644
--- a/src/views/forgetpassword/index.vue
+++ b/src/views/forgetpassword/index.vue
@@ -207,7 +207,7 @@ export default {
}
}
return {
- active: 1,
+ active: 0,
Img,
form: {
EmailOrPhone: '',
diff --git a/src/views/trials/trials-myinfo/account.vue b/src/views/trials/trials-myinfo/account.vue
index 82993883..09310390 100644
--- a/src/views/trials/trials-myinfo/account.vue
+++ b/src/views/trials/trials-myinfo/account.vue
@@ -3,9 +3,14 @@
- {{ $t("trials:trials-myinfo:title:accountInfo") }}
+ {{ $t('trials:trials-myinfo:title:accountInfo') }}
-
+
- {{ $t("trials:trials-myinfo:button:update") }}
+ {{ $t('trials:trials-myinfo:button:update') }}
{{ user.Phone }}
-
+
- {{ $t("trials:trials-myinfo:button:update") }}
+ {{ $t('trials:trials-myinfo:button:update') }}
{{ user.EMail }}
@@ -100,7 +105,7 @@
size="small"
@click="setNewEmail"
>
- {{ $t("trials:trials-myinfo:button:update") }}
+ {{ $t('trials:trials-myinfo:button:update') }}
@@ -114,19 +119,19 @@ import {
setNewEmail,
setNewPhone,
setNewUserName,
-} from "@/api/system/user.js";
-import { removeToken } from "@/utils/auth";
-import password from "./password.vue";
-var timer = "";
-var countdown = 60;
+} from '@/api/system/user.js'
+import { removeToken } from '@/utils/auth'
+import password from './password.vue'
+var timer = ''
+var countdown = 60
export default {
- name: "account",
+ name: 'account',
components: { password },
props: {
user: {
required: true,
default: () => {
- return {};
+ return {}
},
},
IsCanConnectInternet: {
@@ -138,108 +143,136 @@ export default {
return {
userForm: {},
sendDisabled: true,
- sendTitle: this.$t("trials:trials-myinfo:button:getVCode"),
- };
+ sendTitle: this.$t('trials:trials-myinfo:button:getVCode'),
+ rule: {
+ UserName: [
+ {
+ validator: (rule, value, callback) => {
+ if (!value) return callback()
+ var lang = zzSessionStorage.getItem('lang')
+ ? zzSessionStorage.getItem('lang')
+ : 'zh'
+ /* eslint-disable */
+ var reg1 = /^[a-zA-Z0-9_]{4,16}$/ //密码必须是8位以上、必须含有字母、数字、特殊符号
+ if (!reg1.test(value)) {
+ callback(
+ lang === 'zh'
+ ? new Error(
+ '1)用户名字符长度最小为4个字符,最大为16个字符,只可使用字母、数字、下划线;'
+ )
+ : new Error(
+ 'the username must have:1) At least 4 characters;2) At most 16 characters;3)Only letters, numbers, and underscores are allowed.'
+ )
+ )
+ } else {
+ callback()
+ }
+ },
+ trigger: 'blur',
+ },
+ ],
+ },
+ }
},
methods: {
setNewEmail() {
setNewEmail(this.userForm.EMail, this.userForm.VerificationCode).then(
() => {
- this.userForm.EMail = "";
- this.userForm.VerificationCode = "";
+ this.userForm.EMail = ''
+ this.userForm.VerificationCode = ''
this.$message.success(
- this.$t("trials:trials-myinfo:message:updateSuccessfully")
- );
- this.$emit("getUserInfo");
+ this.$t('trials:trials-myinfo:message:updateSuccessfully')
+ )
+ this.$emit('getUserInfo')
}
- );
+ )
},
async setNewUserName() {
try {
let confirm = await this.$confirm(
- this.$t("trials:trials-myInfo:confirmMessage:updateUserName"),
+ this.$t('trials:trials-myInfo:confirmMessage:updateUserName'),
{
- type: "warning",
+ type: 'warning',
distinguishCancelAndClose: true,
- confirmButtonText: this.$t("common:button:confirm"),
- cancelButtonText: this.$t("common:button:cancel"),
+ confirmButtonText: this.$t('common:button:confirm'),
+ cancelButtonText: this.$t('common:button:cancel'),
}
- );
- if (confirm !== "confirm") return;
- let res = await setNewUserName(this.userForm.UserName);
+ )
+ if (confirm !== 'confirm') return
+ let res = await setNewUserName(this.userForm.UserName)
if (res.IsSuccess) {
- this.userForm.UserName = "";
+ this.userForm.UserName = ''
this.$message.success(
- this.$t("trials:trials-myinfo:message:updateSuccessfully")
- );
- this.$emit("getUserInfo");
- removeToken();
- this.logout();
+ this.$t('trials:trials-myinfo:message:updateSuccessfully')
+ )
+ this.$emit('getUserInfo')
+ removeToken()
+ this.logout()
}
} catch (err) {
- console.log(err);
+ console.log(err)
}
},
setNewPhone() {
setNewPhone(this.userForm.Phone).then(() => {
- this.userForm.Phone = "";
+ this.userForm.Phone = ''
this.$message.success(
- this.$t("trials:trials-myinfo:message:updateSuccessfully")
- );
- this.$emit("getUserInfo");
- });
+ this.$t('trials:trials-myinfo:message:updateSuccessfully')
+ )
+ this.$emit('getUserInfo')
+ })
},
handleEmailChange() {
var reg =
- /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/;
+ /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
if (this.userForm.EMail && reg.test(this.userForm.EMail)) {
- this.sendDisabled = false;
+ this.sendDisabled = false
} else {
- this.sendDisabled = true;
+ this.sendDisabled = true
}
},
sendVerificationCode() {
sendVerificationCode(this.userForm.EMail).then(() => {
- this.settime(this);
+ this.settime(this)
// 发送成功
this.$message.success(
- this.$t("trials:trials-myinfo:message:sendSuccessfully")
- );
- });
+ this.$t('trials:trials-myinfo:message:sendSuccessfully')
+ )
+ })
},
settime(obj) {
if (countdown === 0) {
- obj.sendDisabled = false;
- obj.sendTitle = this.$t("trials:trials-myinfo:button:getVCode"); // '获取验证码'
- countdown = 60;
- clearTimeout(timer);
- return;
+ obj.sendDisabled = false
+ obj.sendTitle = this.$t('trials:trials-myinfo:button:getVCode') // '获取验证码'
+ countdown = 60
+ clearTimeout(timer)
+ return
} else {
- obj.sendDisabled = true;
+ obj.sendDisabled = true
obj.sendTitle = `${this.$t(
- "trials:trials-myinfo:button:wait"
- )}(${countdown}s)`;
- countdown--;
+ 'trials:trials-myinfo:button:wait'
+ )}(${countdown}s)`
+ countdown--
// eslint-disable-next-line no-self-assign
- countdown = countdown;
+ countdown = countdown
timer = setTimeout(function () {
- obj.settime(obj);
- }, 1000);
+ obj.settime(obj)
+ }, 1000)
}
},
async logout() {
/* eslint-disable */
- var loginType = zzSessionStorage.getItem("loginType");
- await this.$store.dispatch("user/logout");
+ var loginType = zzSessionStorage.getItem('loginType')
+ await this.$store.dispatch('user/logout')
if (loginType) {
- this.$router.push(`/login?loginType=${loginType}`);
+ this.$router.push(`/login?loginType=${loginType}`)
} else {
- this.$router.push(`/login`);
+ this.$router.push(`/login`)
}
- this.$i18n.locale = "zh";
- this.setLanguage("zh");
- this.$updateDictionary();
+ this.$i18n.locale = 'zh'
+ this.setLanguage('zh')
+ this.$updateDictionary()
},
},
-};
+}
\ No newline at end of file
From 966e90498dccb551c013034c3f758259b4594e7a Mon Sep 17 00:00:00 2001
From: "DESKTOP-6C3NK6N\\WXS" <815034831@qq.com>
Date: Mon, 23 Sep 2024 10:16:21 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=89=E9=92=AE=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/trials/trials-myinfo/account.vue | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/views/trials/trials-myinfo/account.vue b/src/views/trials/trials-myinfo/account.vue
index 09310390..bf5c9b35 100644
--- a/src/views/trials/trials-myinfo/account.vue
+++ b/src/views/trials/trials-myinfo/account.vue
@@ -10,12 +10,12 @@
label-width="100px"
:rules="rule"
:model="userForm"
+ ref="userFormRef"
>
{{ user.UserName }}
@@ -189,6 +189,8 @@ export default {
},
async setNewUserName() {
try {
+ let validate = await this.$refs.userFormRef.validate()
+ if (!validate) return false
let confirm = await this.$confirm(
this.$t('trials:trials-myInfo:confirmMessage:updateUserName'),
{
From 80aa18eff2a46974e777d823e4091b0c140ddad1 Mon Sep 17 00:00:00 2001
From: "DESKTOP-6C3NK6N\\WXS" <815034831@qq.com>
Date: Mon, 23 Sep 2024 11:18:13 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=AD=BE=E7=BD=B2?=
=?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=88=A0=E9=99=A4=E5=8F=82=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../attachments/self-attachment/components/SignForm.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/views/trials/trials-panel/attachments/self-attachment/components/SignForm.vue b/src/views/trials/trials-panel/attachments/self-attachment/components/SignForm.vue
index 1aff22d1..8e62aadb 100644
--- a/src/views/trials/trials-panel/attachments/self-attachment/components/SignForm.vue
+++ b/src/views/trials/trials-panel/attachments/self-attachment/components/SignForm.vue
@@ -102,14 +102,14 @@ export default {
this.btnLoading = true
var params = {
data: {
- trialId: this.trialId,
+ // trialId: this.trialId,
documentId: this.documentId,
isSystemDoc: this.isSystemDoc
},
signInfo: {
UserName: this.signForm.UserName,
PassWord: md5(this.signForm.Password),
- TrialId: this.trialId,
+ // TrialId: this.trialId,
SignCode: '',
SignText: this.signText,
SignCodeId: '',