fix
This commit is contained in:
@@ -45,11 +45,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal_title_text">
|
||||
<div>{{ title }} User</div>
|
||||
<div>{{ title.label }} User</div>
|
||||
</div>
|
||||
<div class="allUserPoeration_center admin_page">
|
||||
<div class="admin_state_item">
|
||||
<span>User Name: <span>*</span></span>
|
||||
<span>{{ $t('adminSeAllUser.UserName') }}: <span>*</span></span>
|
||||
<input
|
||||
v-model="userName"
|
||||
placeholder="Please enter user name"
|
||||
@@ -58,7 +58,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>User Email: <span>*</span></span>
|
||||
<span>{{ $t('adminSeAllUser.UserEmail') }}: <span>*</span></span>
|
||||
<input
|
||||
v-model="userEmail"
|
||||
placeholder="Please enter email"
|
||||
@@ -67,7 +67,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Password: <span>*</span></span>
|
||||
<span>{{ $t('adminSeAllUser.Password') }}: <span>*</span></span>
|
||||
<input
|
||||
@focus="focus"
|
||||
@blur="blur"
|
||||
@@ -78,7 +78,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Maximum Credits:</span>
|
||||
<span>{{ $t('adminSeAllUser.MaximumCredits') }}:</span>
|
||||
<input
|
||||
v-model="credits"
|
||||
placeholder="Please enter credits"
|
||||
@@ -88,8 +88,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="allUserPoeration_btn admin_page">
|
||||
<div class="admin_search_item" @click="cancelDsign">Close</div>
|
||||
<div class="admin_search_item" @click="setOk">OK</div>
|
||||
<div class="admin_search_item" @click="cancelDsign">{{ $t('adminSeAllUser.Close') }}</div>
|
||||
<div class="admin_search_item" @click="setOk">{{ $t('adminSeAllUser.OK') }}</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
@@ -119,7 +119,7 @@ export default defineComponent({
|
||||
operationsModal: false,
|
||||
operationsEdit: false,
|
||||
loadingShow: false,
|
||||
title: "",
|
||||
title: null,
|
||||
});
|
||||
let operationsData = reactive({
|
||||
accountId: -1,
|
||||
@@ -151,8 +151,8 @@ export default defineComponent({
|
||||
operations.operationsModal = true;
|
||||
operations.operationsEdit = true;
|
||||
operations.title = funStr;
|
||||
if (funStr == "Add") operations.operationsEdit = false;
|
||||
if (funStr == "Edit") {
|
||||
if (funStr.value == "Add") operations.operationsEdit = false;
|
||||
if (funStr.value == "Edit") {
|
||||
operationsData.accountId = data.id;
|
||||
operationsData.userName = data.userName;
|
||||
operationsData.userEmail = data.userEmail;
|
||||
@@ -195,7 +195,7 @@ export default defineComponent({
|
||||
userEmail: operationsData.userEmail,
|
||||
userPassword:
|
||||
operationsData.password == operationsData.oldPassword
|
||||
? ""
|
||||
? null
|
||||
: md5(operationsData.password + "abc"),
|
||||
};
|
||||
};
|
||||
@@ -209,19 +209,18 @@ export default defineComponent({
|
||||
};
|
||||
let setOk = () => {
|
||||
let data;
|
||||
if (operations.title == "Add") {
|
||||
if (operations.title?.value == "Add") {
|
||||
data = setAddData();
|
||||
if (!isEmail(data.userEmail)) {
|
||||
message.info("The email format is incorrect");
|
||||
message.info(t('adminSeAllUser.jsContent1'));
|
||||
return;
|
||||
}
|
||||
if (
|
||||
!data.userName ||
|
||||
!data.userEmail ||
|
||||
!data.userPassword ||
|
||||
!data.creditsUsageLimit
|
||||
!data.userPassword
|
||||
)
|
||||
return message.warning("Please check the input box marked with *");
|
||||
return message.warning(t('adminSeAllUser.jsContent2'));
|
||||
Https.axiosPost(Https.httpUrls.addOrUpdateSubAccount, data).then(
|
||||
(rv) => {
|
||||
if (rv) {
|
||||
@@ -236,7 +235,7 @@ export default defineComponent({
|
||||
message.info("The email format is incorrect");
|
||||
return;
|
||||
}
|
||||
if (!data.userName || !data.userEmail || !data.creditsUsageLimit)
|
||||
if (!data.userName || !data.userEmail)
|
||||
return message.warning("Please check the input box marked with *");
|
||||
Https.axiosPost(Https.httpUrls.addOrUpdateSubAccount, data).then(
|
||||
(rv) => {
|
||||
|
||||
Reference in New Issue
Block a user