国际化修改

uat_us
熊飞 2024-03-08 13:05:33 +08:00
parent 80b4f123f8
commit b574da9edf
54 changed files with 3147 additions and 2801 deletions

View File

@ -129,7 +129,7 @@ export default {
this.fileList = [] this.fileList = []
this.$emit('getFileList', '', '') this.$emit('getFileList', '', '')
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
} }

View File

@ -9,7 +9,7 @@
:file-list="fileList" :file-list="fileList"
:accept="accept" :accept="accept"
> >
<el-button size="small" type="primary" :disabled="isDisabled">Upload</el-button> <el-button size="small" type="primary" :disabled="isDisabled">{{ $t('common:button:upload') }}</el-button>
</el-upload> </el-upload>
</div> </div>
</template> </template>
@ -143,8 +143,7 @@ export default {
this.$confirm('Sure to remove?', { this.$confirm('Sure to remove?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}).then(() => { }).then(() => {
deleteAttachment(file.Id, file.Path) deleteAttachment(file.Id, file.Path)
.then(res => { .then(res => {
@ -152,7 +151,7 @@ export default {
this.fileList.splice(this.fileList.findIndex(item => item.Id === file.Id), 1) this.fileList.splice(this.fileList.findIndex(item => item.Id === file.Id), 1)
this.$emit('getFileList', this.fileList) this.$emit('getFileList', this.fileList)
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
} }

View File

@ -31,9 +31,6 @@
<el-dropdown-item v-if="!isReviewer"> <el-dropdown-item v-if="!isReviewer">
<span style="display:block;" @click="editInfo">Edit Info</span> <span style="display:block;" @click="editInfo">Edit Info</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item>
<span style="display:block;" @click="account">Account</span>
</el-dropdown-item>
<el-dropdown-item divided> <el-dropdown-item divided>
<span style="display:block;" @click="logout">Log Out</span> <span style="display:block;" @click="logout">Log Out</span>
</el-dropdown-item> </el-dropdown-item>
@ -93,9 +90,6 @@ export default {
editInfo() { editInfo() {
this.$router.push({ name: 'BaiscInfo' }) this.$router.push({ name: 'BaiscInfo' })
}, },
account() {
this.$router.push({ name: 'Account' })
}
} }
} }
</script> </script>

View File

@ -255,12 +255,7 @@ export const constantRoutes = [
children: [{ children: [{
path: 'baiscInfo', path: 'baiscInfo',
name: 'BaiscInfo', name: 'BaiscInfo',
component: () => import('@/views/user/editInfo') component: () => import('@/views/user/myInfo')
},
{
path: 'account',
name: 'Account',
component: () => import('@/views/user/account')
} }
] ]
} }

View File

@ -89,18 +89,17 @@ export default {
}, },
// //
remove(node) { remove(node) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteMenuFunction(node.Id) deleteMenuFunction(node.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getlist() this.getlist()
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -89,16 +89,15 @@ export default {
}) })
}, },
handleDeleteRole(row) { handleDeleteRole(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}).then(() => { }).then(() => {
deleteUserTypeRole(row.Id).then((res) => { deleteUserTypeRole(row.Id).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex((item) => item.Id === row.Id), 1) this.list.splice(this.list.findIndex((item) => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -20,8 +20,7 @@ export default {
this.$confirm('Sure to reset password?', { this.$confirm('Sure to reset password?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
resetPassword(this.userId).then(res => { resetPassword(this.userId).then(res => {

View File

@ -113,18 +113,17 @@ export default {
}, },
// //
handleDeleteUser(data) { handleDeleteUser(data) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteSysUser(data.Id) deleteSysUser(data.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1) this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -126,8 +126,7 @@ export default {
this.$confirm('Sure to sign out', { this.$confirm('Sure to sign out', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.$store.dispatch('user/logout').then(res => { this.$store.dispatch('user/logout').then(res => {

View File

@ -244,8 +244,7 @@ export default {
this.$confirm('是否确认废除此文件?', { this.$confirm('是否确认废除此文件?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true

View File

@ -125,18 +125,17 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteDictionary(row.Id) deleteDictionary(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$store.dispatch('global/setDictionary', {}) this.$store.dispatch('global/setDictionary', {})
} }
}) })

View File

@ -239,18 +239,17 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteEmailNoticeConfig(row.Id) deleteEmailNoticeConfig(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -139,11 +139,10 @@ export default {
}, },
// CRO // CRO
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -152,7 +151,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false

View File

@ -201,11 +201,10 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -213,7 +212,7 @@ export default {
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
this.loading = false this.loading = false
}).catch(() => { }).catch(() => {

View File

@ -213,11 +213,10 @@ export default {
}, },
// Site // Site
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -227,7 +226,7 @@ export default {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$store.dispatch('global/setSite', {}) this.$store.dispatch('global/setSite', {})
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false

View File

@ -139,11 +139,10 @@ export default {
}, },
// Sponsor // Sponsor
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -152,7 +151,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false

View File

@ -182,11 +182,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -195,7 +194,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -154,11 +154,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -167,7 +166,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -183,11 +183,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -196,7 +195,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -182,11 +182,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -195,7 +194,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -153,11 +153,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -166,7 +165,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -206,11 +206,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -219,7 +218,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -183,11 +183,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -196,7 +195,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -122,11 +122,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -135,7 +134,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -137,18 +137,17 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteSystemBasicData(row.Id) deleteSystemBasicData(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -178,18 +178,17 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteSystemBasicData(row.Id) deleteSystemBasicData(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -162,11 +162,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -175,7 +174,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -137,11 +137,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -150,7 +149,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -170,11 +170,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -183,7 +182,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -217,11 +217,10 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -230,7 +229,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -109,18 +109,17 @@ export default {
this.template_model.visible = true this.template_model.visible = true
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteQATemplate(row.Id) deleteQATemplate(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -107,18 +107,17 @@ export default {
this.setting_model.visible = true this.setting_model.visible = true
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteQATemplateItem(row.Id) deleteQATemplateItem(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -137,18 +137,17 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteSystemBasicData(row.Id) deleteSystemBasicData(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -178,18 +178,17 @@ export default {
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteSystemBasicData(row.Id) deleteSystemBasicData(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -177,8 +177,7 @@ export default {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deletePaymentAdjustment(row.Id) deletePaymentAdjustment(row.Id)

View File

@ -160,7 +160,7 @@ export default {
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -263,15 +263,14 @@ export default {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteRankPrice(row.Id) deleteRankPrice(row.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
.catch(err => { .catch(err => {

View File

@ -340,11 +340,10 @@ export default {
}, },
handleView(row) { row.SowFullPath ? window.open(row.SowFullPath, '_blank') : '' }, handleView(row) { row.SowFullPath ? window.open(row.SowFullPath, '_blank') : '' },
handleDeleteSOW(row) { handleDeleteSOW(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
const param = { SowPath: row.SowPath, TrialId: row.TrialId } const param = { SowPath: row.SowPath, TrialId: row.TrialId }

View File

@ -92,7 +92,7 @@ export default {
if (res.IsSuccess) { if (res.IsSuccess) {
this.fileList = [] this.fileList = []
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
this.$emit('getFileList', this.fileList) this.$emit('getFileList', this.fileList)

View File

@ -567,8 +567,7 @@ export default {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteEducationInfo(row.Id) deleteEducationInfo(row.Id)
@ -636,8 +635,7 @@ export default {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deletePostgraduateInfo(row.Id) deletePostgraduateInfo(row.Id)

View File

@ -181,7 +181,7 @@ export default {
this.fileList = [] this.fileList = []
this.GCPID = '' this.GCPID = ''
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
} }

View File

@ -266,11 +266,10 @@ export default {
} }
}, },
handleRemoveFile(row) { handleRemoveFile(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}).then(() => { }).then(() => {
deleteAttachment(row.Id, row.Path) deleteAttachment(row.Id, row.Path)
.then(res => { .then(res => {
@ -278,7 +277,7 @@ export default {
this.resumeList.splice(this.resumeList.findIndex(item => item.Id === row.Id), 1) this.resumeList.splice(this.resumeList.findIndex(item => item.Id === row.Id), 1)
this.filterByLanguage() this.filterByLanguage()
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
} }

View File

@ -78,7 +78,7 @@
</div> </div>
</el-form> </el-form>
<el-dialog <el-dialog
:label="$t('system:Setting:title:Vacation')" :title="$t('system:Setting:title:Vacation')"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="50%" width="50%"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -87,6 +87,7 @@
<div> <div>
<el-date-picker <el-date-picker
v-model="daterange" v-model="daterange"
style="width: 360px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
type="daterange" type="daterange"
@ -117,7 +118,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination" style="padding: 10px 0;text-align: right">
<el-pagination <el-pagination
background background
layout="total,sizes,prev, pager, next" layout="total,sizes,prev, pager, next"
@ -258,7 +259,7 @@ export default {
} }
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })
@ -272,7 +273,7 @@ export default {
this.gridData.splice(index, 1) this.gridData.splice(index, 1)
this.totalItems = this.totalItems - 1 this.totalItems = this.totalItems - 1
} }
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
this.loading2 = false this.loading2 = false
}) })

View File

@ -2,7 +2,7 @@
<div class="form-container"> <div class="form-container">
<div class="title-wrapper"> <div class="title-wrapper">
<p>{{$t('system:TrialExperience:title:Clinical Trial Experience')}}</p> <p>{{$t('system:TrialExperience:title:Clinical Trial Experience')}}</p>
<el-button :disabled="$route.query.ReviewStatus === '1'" class="add" size="small" @click="handleAddClinicalTrial">Add</el-button> <el-button :disabled="$route.query.ReviewStatus === '1'" class="add" size="small" @click="handleAddClinicalTrial">{{$t('common:button:add')}}</el-button>
</div> </div>
<div style="padding:0 40px;"> <div style="padding:0 40px;">
<el-table <el-table
@ -73,7 +73,7 @@
size="small" size="small"
> >
<el-form-item :label="$t('system:TrialExperience:label:Phase')" prop="PhaseId"> <el-form-item :label="$t('system:TrialExperience:label:Phase')" prop="PhaseId">
<el-select v-model="clinicalTrialForm.PhaseId" placeholder="Please select"> <el-select v-model="clinicalTrialForm.PhaseId">
<!-- <el-option <!-- <el-option
v-for="(key,value) of dictionaryList.Phase" v-for="(key,value) of dictionaryList.Phase"
:key="value" :key="value"
@ -91,7 +91,6 @@
<el-form-item :label="$t('system:TrialExperience:label:Review Criteria')" prop="EvaluationCriteriaIdList"> <el-form-item :label="$t('system:TrialExperience:label:Review Criteria')" prop="EvaluationCriteriaIdList">
<el-select <el-select
v-model="clinicalTrialForm.EvaluationCriteriaIdList" v-model="clinicalTrialForm.EvaluationCriteriaIdList"
placeholder="Please select"
multiple multiple
> >
<!-- <el-option v-for="(key,value) of dictionaryList.ReadingStandard" :key="value" :label="key" :value="value" /> --> <!-- <el-option v-for="(key,value) of dictionaryList.ReadingStandard" :key="value" :label="key" :value="value" /> -->
@ -267,8 +266,7 @@ export default {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteTrialExperience(row.Id) deleteTrialExperience(row.Id)

View File

@ -69,13 +69,13 @@
</el-form> </el-form>
</div> </div>
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-switch <!-- <el-switch-->
v-model="isEN" <!-- v-model="isEN"-->
active-text="EN" <!-- active-text="EN"-->
inactive-text="中文" <!-- inactive-text="中文"-->
style="margin-right:10px;" <!-- style="margin-right:10px;"-->
@change="handleIsEnChange" <!-- @change="handleIsEnChange"-->
/> <!-- />-->
<el-button size="small" icon="el-icon-plus" type="primary" @click="handleNew">{{$t('common:button:new')}}</el-button> <el-button size="small" icon="el-icon-plus" type="primary" @click="handleNew">{{$t('common:button:new')}}</el-button>
</span> </span>
</div> </div>
@ -367,17 +367,20 @@ export default {
}, },
tokenKey: getToken(), tokenKey: getToken(),
share_model: { visible: false, title: '', width: '500px' }, share_model: { visible: false, title: '', width: '500px' },
shareLink: null shareLink: null,
isEnglish: false
} }
}, },
dicts: ['ReadingType', 'Subspeciality', 'Department', 'Rank', 'Position', 'ReadingStandard'], dicts: ['ReadingType', 'Subspeciality', 'Department', 'Rank', 'Position', 'ReadingStandard'],
computed: { computed: {
...mapGetters(['hospitalList', 'reviewersQuery', 'isEnglish']) ...mapGetters(['hospitalList', 'reviewersQuery'])
}, },
created() { created() {
this.isEN = this.isEnglish
this.reviewersQuery ? this.listQuery = this.reviewersQuery : '' this.reviewersQuery ? this.listQuery = this.reviewersQuery : ''
this.initPage() this.initPage()
// this.isEnglish = !!((this.$route.query.isEnglish === true || this.$route.query.isEnglish === 'true'))
this.isEnglish = this.$i18n.locale === 'zh' ? false : true
this.isEN = this.isEnglish
}, },
methods: { methods: {
copyCode() { copyCode() {

View File

@ -43,9 +43,6 @@
<el-date-picker <el-date-picker
v-model="datetimerange" v-model="datetimerange"
type="datetimerange" type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
@change="handleDatetimeChange" @change="handleDatetimeChange"
@ -77,7 +74,7 @@
<el-table-column <el-table-column
:label="$t('system:loginLog:table:OptType')" :label="$t('system:loginLog:table:OptType')"
prop="OptType" prop="OptType"
min-width="90" min-width="150"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
> >
@ -88,28 +85,28 @@
<el-table-column <el-table-column
label="IP" label="IP"
prop="IP" prop="IP"
min-width="90" min-width="150"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
:label="$t('system:loginLog:table:LoginFaildName')" :label="$t('system:loginLog:table:LoginFaildName')"
prop="LoginFaildName" prop="LoginFaildName"
min-width="90" min-width="180"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
:label="$t('system:loginLog:table:LoginUserName')" :label="$t('system:loginLog:table:LoginUserName')"
prop="LoginUserName" prop="LoginUserName"
min-width="90" min-width="140"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
:label="$t('system:loginLog:table:LoginUserType')" :label="$t('system:loginLog:table:LoginUserType')"
prop="LoginUserTypeEnum" prop="LoginUserTypeEnum"
min-width="90" min-width="120"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
> >
@ -120,14 +117,14 @@
<el-table-column <el-table-column
:label="$t('system:loginLog:table:OptUserName')" :label="$t('system:loginLog:table:OptUserName')"
prop="OptUserName" prop="OptUserName"
min-width="90" min-width="200"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
:label="$t('system:loginLog:table:OptUserType')" :label="$t('system:loginLog:table:OptUserType')"
prop="OptUserTypeEnum" prop="OptUserTypeEnum"
min-width="90" min-width="200"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
> >
@ -138,7 +135,7 @@
<el-table-column <el-table-column
:label="$t('system:loginLog:table:CreateTime')" :label="$t('system:loginLog:table:CreateTime')"
prop="CreateTime" prop="CreateTime"
min-width="90" min-width="180"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />

View File

@ -136,16 +136,15 @@ export default {
// }) // })
}, },
handleDeleteRole(row) { handleDeleteRole(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}).then(() => { }).then(() => {
deleteUserTypeRole(row.Id).then((res) => { deleteUserTypeRole(row.Id).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex((item) => item.Id === row.Id), 1) this.list.splice(this.list.findIndex((item) => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -13,23 +13,20 @@ import { resetPassword } from '@/api/admin'
export default { export default {
name: 'Account', name: 'Account',
props: { props: {
userId: { type: String, default: '' } userId: { type: String, default: '' },
}, },
methods: { methods: {
handleReset() { handleReset() {
this.$confirm('Sure to reset password?', { this.$confirm(this.$t('system:userlist:message:ResetPassword'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
resetPassword(this.userId).then(res => { resetPassword(this.userId).then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message({ let msg = this.$t('system:userlist:message:ResetPassword2')
message: 'Reset password successfully', msg = msg.replace('xxx', this.$route.query.userName)
type: 'success' this.$alert(msg)
})
} }
}) })
}) })

View File

@ -9,13 +9,14 @@
:search-handle="searchHandle" :search-handle="searchHandle"
@search="handleSearch" @search="handleSearch"
@reset="handleReset" @reset="handleReset"
@new="handleAddUser"
/> />
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
size="mini" <!-- size="mini"-->
style="margin-left:auto;height: 28px;position: absolute;bottom: 0;right: 10px" <!-- style="margin-left:auto;height: 28px;position: absolute;bottom: 0;right: 10px"-->
@click="handleAddUser" <!-- @click="handleAddUser"-->
>{{$t('common:button:new')}}</el-button> <!-- >{{$t('common:button:new')}}</el-button>-->
</div> </div>
<base-table <base-table
v-loading="loading" v-loading="loading"
@ -166,8 +167,8 @@ export default {
label: this.$t('common:action:action'), label: this.$t('common:action:action'),
minWidth: 200, minWidth: 200,
operates: [ operates: [
{ name: 'Edit', type: 'primary', emitKey: 'editCb' }, { name: this.$t('common:button:edit'), type: 'primary', emitKey: 'editCb' },
{ name: 'Delete', type: 'danger', emitKey: 'deleteCb' } { name: this.$t('common:button:delete'), type: 'danger', emitKey: 'deleteCb' }
] } ] }
], ],
searchForm: [ searchForm: [
@ -205,8 +206,8 @@ export default {
prop: 'IsZhiZhun', prop: 'IsZhiZhun',
width: '100px', width: '100px',
options: [ options: [
{ label: 'Internal', value: true }, { label: this.$t('system:userlist:label:InternalOrExternal:Internal'), value: true },
{ label: 'External', value: false } { label: this.$t('system:userlist:label:InternalOrExternal:External'), value: false }
], ],
props: { label: 'label', value: 'value' }, props: { label: 'label', value: 'value' },
change: scope => '', change: scope => '',
@ -218,8 +219,8 @@ export default {
prop: 'IsTestUser', prop: 'IsTestUser',
width: '100px', width: '100px',
options: [ options: [
{ label: 'Yes', value: true }, { label: this.$t('system:userlist:label:IsTestUser:Yes'), value: true },
{ label: 'No', value: false } { label: this.$t('system:userlist:label:IsTestUser:No'), value: false }
], ],
props: { label: 'label', value: 'value' }, props: { label: 'label', value: 'value' },
change: scope => '', change: scope => '',
@ -231,8 +232,8 @@ export default {
prop: 'UserState', prop: 'UserState',
width: '100px', width: '100px',
options: [ options: [
{ label: 'Enable', value: 1 }, { label: this.$t('system:userlist:label:Status:Enable'), value: 1 },
{ label: 'Disable', value: 0 } { label: this.$t('system:userlist:label:Status:Disable'), value: 0 }
], ],
props: { label: 'label', value: 'value' }, props: { label: 'label', value: 'value' },
change: scope => '', change: scope => '',
@ -250,7 +251,8 @@ export default {
], ],
searchHandle: [ searchHandle: [
{ label: this.$t('common:button:reset'), type: 'primary', emitKey: 'reset' }, { label: this.$t('common:button:reset'), type: 'primary', emitKey: 'reset' },
{ label: this.$t('common:button:search'), type: 'primary', emitKey: 'search' } { label: this.$t('common:button:search'), type: 'primary', emitKey: 'search' },
{ label: this.$t('common:button:new'), type: 'primary', emitKey: 'new' }
], ],
userTypeOptions: [], userTypeOptions: [],
loading: false, loading: false,
@ -289,22 +291,21 @@ export default {
}, },
// //
handleEditUser(data) { handleEditUser(data) {
this.$router.push({ path: '/system/user/edit', query: { Id: data.Id }}) this.$router.push({ path: '/system/user/edit', query: { Id: data.Id, userName: data.UserName }})
}, },
// //
handleDeleteUser(data) { handleDeleteUser(data) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
deleteSysUser(data.Id) deleteSysUser(data.Id)
.then(res => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1) this.users.splice(this.users.findIndex(item => item.Id === data.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}) })
}) })

View File

@ -94,7 +94,7 @@ export default {
if (res.IsSuccess) { if (res.IsSuccess) {
this.fileList = [] this.fileList = []
this.$message({ this.$message({
message: 'Deleted successfully!', message: this.$t('common:message:deletedSuccessfully'),
type: 'success' type: 'success'
}) })
this.$emit('getFileList', this.fileList) this.$emit('getFileList', this.fileList)

View File

@ -137,11 +137,10 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('Sure to delete?', { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: 'Ok',
cancelButtonText: 'Cancel'
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
@ -150,7 +149,7 @@ export default {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1) this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully!') this.$message.success(this.$t('common:message:deletedSuccessfully'))
} }
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })

View File

@ -1,30 +1,30 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card class="Security" style="width:800px;"> <!-- <el-card class="Security" style="width:800px;">-->
<div slot="header" class="clearfix"> <!-- <div slot="header" class="clearfix">-->
<span>Security</span> <!-- <span>Security</span>-->
</div> <!-- </div>-->
<el-form <!-- <el-form-->
ref="userAccount" <!-- ref="userAccount"-->
:model="user" <!-- :model="user"-->
:rules="userFormRules" <!-- :rules="userFormRules"-->
label-width="150px" <!-- label-width="150px"-->
style="width:600px;" <!-- style="width:600px;"-->
> <!-- >-->
<el-form-item label="Current Password" prop="OldPassWord"> <!-- <el-form-item label="Current Password" prop="OldPassWord">-->
<el-input v-model="user.OldPassWord" type="password" /> <!-- <el-input v-model="user.OldPassWord" type="password" />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="New Password" prop="NewPassWord"> <!-- <el-form-item label="New Password" prop="NewPassWord">-->
<el-input v-model="user.NewPassWord" type="password" /> <!-- <el-input v-model="user.NewPassWord" type="password" />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="Confirm Password" prop="ConfirmPassWord"> <!-- <el-form-item label="Confirm Password" prop="ConfirmPassWord">-->
<el-input v-model="user.ConfirmPassWord" type="password" /> <!-- <el-input v-model="user.ConfirmPassWord" type="password" />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <!-- <el-form-item>-->
<el-button type="primary" size="small" @click="save">save</el-button> <!-- <el-button type="primary" size="small" @click="save">save</el-button>-->
</el-form-item> <!-- </el-form-item>-->
</el-form> <!-- </el-form>-->
</el-card> <!-- </el-card>-->
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,132 +1,150 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-card class="Security" style="width:800px;">
ref="userForm" <div slot="header" class="clearfix">
size="small" <span>Security</span>
:model="user" </div>
:rules="userFormRules" <el-form
label-width="150px" ref="userForm"
style="width:800px;" size="small"
> :model="user"
<el-card class="Basic" shadow="never" size="small"> :rules="userFormRules"
<div slot="header" class="clearfix"> label-width="210px"
<span>Basic Information</span> style="width:600px;"
</div> >
<el-form-item v-if="user.Code" label="ID: " prop="Code"> <el-form-item v-if="user.Code" label="ID: " prop="Code">
<el-input v-model="user.Code" disabled /> <el-input v-model="user.Code" disabled />
</el-form-item> </el-form-item>
<el-form-item label="User Name: " prop="UserName"> <el-form-item label="User Name: " prop="UserName">
<el-input v-model="user.UserName" disabled /> <el-input v-model="user.UserName" disabled />
</el-form-item> </el-form-item>
<el-form-item v-if="user.UserTypeEnum !== 8" label="Surname: " prop="LastName">
<el-input v-model="user.LastName" />
</el-form-item>
<el-form-item v-if="user.UserTypeEnum !== 8" label="Given Name: " prop="FirstName">
<el-input v-model="user.FirstName" />
</el-form-item>
<el-form-item label="Gender: " prop="Sex" style="margin-right:40px;">
<el-radio-group v-model="user.Sex">
<el-radio :label="1">Male</el-radio>
<el-radio :label="0">Female</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="Email: " prop="EMail">
<el-input v-model="user.EMail" />
</el-form-item>
<el-form-item label="Phone: ">
<el-input v-model="user.Phone" />
</el-form-item>
<el-form-item v-if="user.UserTypeEnum !== 8" label="Disable">
<el-switch v-model="user.Status" :active-value="0" :inactive-value="1" disabled />
</el-form-item>
<!-- <el-form-item label="User Type: " prop="UserTypeId">
<el-select v-model="user.UserTypeId" size="small" placeholder="Please select" disabled>
<el-option
v-for="(value,key) of dictionaryList.UserType"
:key="key"
:label="value"
:value="key"
/>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="User Type: " prop="UserTypeId">
<el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="Please select" style="width:100%;">
<el-option
v-for="(userType,key) of userTypeOptions"
:key="key"
:label="userType.UserType"
:value="userType.Id"
/>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="Real Name: " prop="RealName"> <el-form-item label="User Type: " prop="UserType">
<el-input v-model="user.RealName" /> <el-input v-model="user.UserType" disabled />
</el-form-item> --> </el-form-item>
<el-form-item v-if="user.UserTypeEnum !== 8" label="Surname: " prop="LastName">
<el-input v-model="user.LastName" />
</el-form-item>
<el-form-item v-if="user.UserTypeEnum !== 8" label="Given Name: " prop="FirstName">
<el-input v-model="user.FirstName" />
</el-form-item>
<el-form-item label="Gender: " prop="Sex" style="margin-right:40px;">
<el-radio-group v-model="user.Sex">
<el-radio :label="1">Male</el-radio>
<el-radio :label="0">Female</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="Email: " prop="EMail">
<el-input v-model="user.EMail" />
</el-form-item>
<el-form-item label="Phone: ">
<el-input v-model="user.Phone" />
</el-form-item>
<el-form-item v-if="user.UserTypeEnum !== 8" label="Disable">
<el-switch v-model="user.Status" :active-value="0" :inactive-value="1" disabled />
</el-form-item>
<!-- <el-form-item label="User Type: " prop="UserTypeId">
<el-select v-model="user.UserTypeId" size="small" placeholder="Please select" disabled>
<el-option
v-for="(value,key) of dictionaryList.UserType"
:key="key"
:label="value"
:value="key"
/>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="User Type: " prop="UserTypeId">
<el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="Please select" style="width:100%;">
<el-option
v-for="(userType,key) of userTypeOptions"
:key="key"
:label="userType.UserType"
:value="userType.Id"
/>
</el-select>
</el-form-item> -->
<el-form-item label="User Type: " prop="UserType"> <!-- <div slot="header" class="clearfix">-->
<el-input v-model="user.UserType" disabled /> <!-- <span>Affiliation</span>-->
</el-form-item> <!-- </div>-->
</el-card> <el-form-item prop="IsZhiZhun">
<el-radio-group v-model="user.IsZhiZhun">
<el-radio :label="true">Internal</el-radio>
<el-radio :label="false">External</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-show="user.IsZhiZhun === false" label="Organization Name: " prop="OrganizationName">
<el-input v-model="user.OrganizationName" />
</el-form-item>
<!-- <el-form-item label="Orgnization Type: " prop="OrganizationTypeId">
<el-select
v-model="user.OrganizationTypeId"
placeholder="Please select"
@change="handelOrgnizationTypeChange"
>
<el-option
v-for="(value,key) of dictionaryList.InstitutionalType"
:key="key"
:label="value"
:value="key"
/>
</el-select>
</el-form-item>
<el-card v-if="user.UserTypeEnum !== 8" class="Affiliation" shadow="never" style="margin-top:10px;" size="small"> <el-form-item v-show="user.OrganizationTypeId" label="Orgnization: " prop="OrganizationId">
<div slot="header" class="clearfix"> <el-select v-model="user.OrganizationId" placeholder="Please select">
<span>Affiliation</span> <el-option
</div> v-for="(item) of OrganizationOptions"
<el-form-item prop="IsZhiZhun"> :key="item.Id"
<el-radio-group v-model="user.IsZhiZhun"> :label="item.InstitutionName"
<el-radio :label="true">Internal</el-radio> :value="item.Id"
<el-radio :label="false">External</el-radio> />
</el-radio-group> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item v-show="user.IsZhiZhun === false" label="Organization Name: " prop="OrganizationName">
<el-input v-model="user.OrganizationName" />
</el-form-item>
<!-- <el-form-item label="Orgnization Type: " prop="OrganizationTypeId">
<el-select
v-model="user.OrganizationTypeId"
placeholder="Please select"
@change="handelOrgnizationTypeChange"
>
<el-option
v-for="(value,key) of dictionaryList.InstitutionalType"
:key="key"
:label="value"
:value="key"
/>
</el-select>
</el-form-item>
<el-form-item v-show="user.OrganizationTypeId" label="Orgnization: " prop="OrganizationId"> <el-form-item label="Department: " prop="DepartmentName">
<el-select v-model="user.OrganizationId" placeholder="Please select"> <el-input v-model="user.DepartmentName" />
<el-option </el-form-item>
v-for="(item) of OrganizationOptions" <el-form-item label="Position: " prop="PositionName">
:key="item.Id" <el-input v-model="user.PositionName" />
:label="item.InstitutionName" </el-form-item>
:value="item.Id" <el-form-item>
/> <el-button
</el-select> type="primary"
</el-form-item> --> size="small"
:disabled="isDisabled"
<el-form-item label="Department: " prop="DepartmentName"> style="margin:10px 15px"
<el-input v-model="user.DepartmentName" /> @click="handleSave"
>Save</el-button>
</el-form-item> </el-form-item>
<el-form-item label="Position: " prop="PositionName"> </el-form>
<el-input v-model="user.PositionName" /> </el-card>
<el-card class="Security" style="width:800px;">
<div slot="header" class="clearfix">
<span>Security</span>
</div>
<el-form
ref="userAccount"
:model="user"
:rules="userFormRules"
label-width="210px"
style="width:600px;"
>
<el-form-item label="Current Password" prop="OldPassWord">
<el-input v-model="user.OldPassWord" type="password" />
</el-form-item> </el-form-item>
</el-card> <el-form-item label="New Password" prop="NewPassWord">
<el-form-item> <el-input v-model="user.NewPassWord" type="password" />
<el-button </el-form-item>
type="primary" <el-form-item label="Confirm New Password" prop="ConfirmPassWord">
size="small" <el-input v-model="user.ConfirmPassWord" type="password" />
:disabled="isDisabled" </el-form-item>
style="margin:10px 15px" <el-form-item>
@click="handleSave" <el-button type="primary" size="small" @click="save">save</el-button>
>Save</el-button> </el-form-item>
</el-form-item> </el-form>
</el-card>
</el-form>
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,11 +1,392 @@
<template> <template>
<div /> <div class="trial-myinfo">
<div class="trial-myinfo-left">
<div class="trial-myinfo-left-top">
<div class="trial-myinfo-head">
<!-- 个人头像 -->
{{ $t('trials:trials-myinfo:title:avater') }}
</div>
<div class="trial-myinfo-body">
<div>
{{ user.LastName }}
</div>
</div>
</div>
<div class="trial-myinfo-left-bottom">
<div class="trial-myinfo-head">
<!-- 用户基本信息 -->
{{ $t('trials:trials-myinfo:title:basicInfo') }}
</div>
<el-form ref="userForm" label-position="right" :model="user" :rules="userFormRules" label-width="120px">
<el-form-item v-if="user.Code" label="ID: " prop="Code">
<el-input v-model="user.Code" disabled />
</el-form-item>
<!-- -->
<el-form-item :disabled="user.UserTypeEnum === 8" :label="$t('trials:trials-myinfo:form:surname')" prop="LastName">
<el-input v-model="user.LastName" :placeholder="$t('trials:trials-myinfo:form:surname')"/>
</el-form-item>
<!-- -->
<el-form-item :disabled="user.UserTypeEnum === 8" :label="$t('trials:trials-myinfo:form:givenname')" prop="FirstName">
<el-input v-model="user.FirstName" :placeholder="$t('trials:trials-myinfo:form:givenname')"/>
</el-form-item>
<!-- 性别 -->
<el-form-item :label="$t('trials:trials-myinfo:form:gender')" prop="Sex" style="margin-right:40px;">
<el-radio-group v-model="user.Sex">
<el-radio :label="1">Male</el-radio>
<el-radio :label="0">Female</el-radio>
</el-radio-group>
</el-form-item>
<!-- 单位 -->
<el-form-item :label="$t('trials:trials-myinfo:form:organization')" prop="OrganizationName">
<el-input v-model="user.OrganizationName" :placeholder="$t('trials:trials-myinfo:form:organization')"/>
</el-form-item>
<!-- 部门 -->
<el-form-item :label="$t('trials:trials-myinfo:form:department')" prop="DepartmentName">
<el-input v-model="user.DepartmentName" :placeholder="$t('trials:trials-myinfo:form:organization')"/>
</el-form-item>
<!-- 职位 -->
<el-form-item :label="$t('trials:trials-myinfo:form:position')" prop="PositionName">
<el-input v-model="user.PositionName" :placeholder="$t('trials:trials-myinfo:form:position')"/>
</el-form-item>
</el-form>
<!-- 保存 -->
<el-button
class="trial-info-btn"
type="primary"
size="small"
@click="handleSave"
>
{{ $t('trials:trials-myinfo:button:save') }}
</el-button>
</div>
</div>
<div class="trial-myinfo-right">
<div class="trial-myinfo-right-box">
<div class="trial-myinfo-head">
<!-- 账号信息 -->
{{ $t('trials:trials-myinfo:title:accountInfo') }}
</div>
<el-form label-position="right" label-width="180px">
<!-- 用户名 -->
<el-form-item :label="$t('trials:trials-myinfo:form:userName')" style="margin-bottom: 5px;" prop="UserName">
<span>{{ user.UserName }}</span>
</el-form-item>
<el-form-item label="" style="position: relative" prop="UserName">
<el-input v-model="userForm.UserName" :placeholder="$t('trials:trials-myinfo:form:userName')"/>
<!-- 修改 -->
<el-button :disabled="!userForm.UserName" class="saveBtn" type="primary" size="small" @click="setNewUserName">
{{ $t('trials:trials-myinfo:button:update') }}
</el-button>
</el-form-item>
<!-- 电话 -->
<el-form-item :label="$t('trials:trials-myinfo:form:phone')" style="margin-bottom: 5px;" prop="UserName">
<span>{{ user.Phone }}</span>
</el-form-item>
<el-form-item label="" style="position: relative" prop="UserName">
<el-input v-model="userForm.Phone" :placeholder="$t('trials:trials-myinfo:form:phone')"/>
<!-- 修改 -->
<el-button :disabled="!userForm.Phone" class="saveBtn" type="primary" size="small" @click="setNewPhone">
{{ $t('trials:trials-myinfo:button:update') }}
</el-button>
</el-form-item>
<!-- 邮箱 -->
<el-form-item :label="$t('trials:trials-myinfo:form:email')" style="margin-bottom: 5px;" prop="UserName">
<span>{{ user.EMail }}</span>
</el-form-item>
<el-form-item label="" style="margin-bottom: 10px;position: relative" prop="EMail">
<el-input v-model="userForm.EMail" @input="handleEmailChange" :placeholder="$t('trials:trials-myinfo:form:email')"/>
<el-button class="sendCode" :disabled="sendDisabled" type="primary" size="mini" @click="sendVerificationCode">{{ sendTitle }}</el-button>
</el-form-item>
<el-form-item label="" style="position: relative" prop="VerificationCode">
<el-input v-model="userForm.VerificationCode" :placeholder="$t('trials:researchForm:form:verifyCode')"/>
<!-- 修改 -->
<el-button :disabled="!userForm.EMail || !userForm.VerificationCode" class="saveBtn" type="primary" size="small" @click="setNewEmail">
{{ $t('trials:trials-myinfo:button:update') }}
</el-button>
</el-form-item>
</el-form>
</div>
<div class="trial-myinfo-right-box">
<div class="trial-myinfo-head">
<!-- 修改密码 -->
{{ $t('trials:trials-myinfo:title:updatePaasord') }}
</div>
<el-form ref="passwordForm" label-position="right" :model="password" :rules="passwordFormRules" label-width="180px">
<!-- 旧密码 -->
<el-form-item :label="$t('recompose:form:oldPassword')" prop="OldPassWord">
<el-input v-model="password.OldPassWord" type="password" show-password auto-complete="new-password" :placeholder="$t('recompose:form:oldPassword')"/>
</el-form-item>
<!-- 新密码 -->
<el-form-item class="my_new_pwd" :label="$t('recompose:form:newPassword')" prop="NewPassWord">
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" :placeholder="$t('recompose:form:newPassword')"/>
</el-form-item>
<!-- 确认密码 -->
<el-form-item :label="$t('recompose:form:confirmPassword')" prop="ConfirmPassWord">
<el-input v-model="password.ConfirmPassWord" type="password" show-password auto-complete="new-password" :placeholder="$t('recompose:form:confirmPassword')"/>
</el-form-item>
</el-form>
<el-button
type="primary"
size="small"
class="trial-info-btn"
@click="save"
>
{{ $t('trials:trials-myinfo:button:save') }}
</el-button>
</div>
</div>
</div>
</template> </template>
<script> <script>
export default {} import { getUserTypeList, getUser, updateUser, modifyPassword } from '@/api/admin.js'
import { sendVerificationCode, setNewEmail, setNewPhone, setNewUserName } from '@/api/system/user.js'
import md5 from 'js-md5'
var timer = ''
var countdown = 60
import store from '@/store'
import {mapGetters, mapMutations} from 'vuex'
export default {
name: 'TrialsMyinfo',
data() {
return {
userTypeOptions: [],
user: {},
password: {},
userForm: {},
sendDisabled: true,
sendTitle: this.$t('trials:trials-myinfo:button:getVCode'),
userFormRules: {
UserName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
UserTypeId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
IsZhiZhun: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
OrganizationName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
LastName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, { max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }],
FirstName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, { max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }],
Sex: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
Status: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }]
},
passwordFormRules: {
OldPassWord: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
NewPassWord: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{
required: true,
trigger: 'blur',
validator: this.$validatePassword
},
],
ConfirmPassWord: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{
required: true,
trigger: 'blur',
validator: this.$validatePassword
},
]
}
}
},
computed: {
...mapGetters(['userId', 'name'])
},
mounted() {
this.getUserInfo()
this.getUserTypeList()
},
methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }),
handleSave() {
this.$refs.userForm.validate(valid => {
console.log(valid)
if (valid) {
this.isDisabled = true
const selectedUserType = this.userTypeOptions.filter((item) => {
return item.Id === this.user.UserTypeId
})
if (selectedUserType.length > 0) {
this.user.userTypeEnum = selectedUserType[0].UserTypeEnum
}
// if (this.user.IsZhiZhun === true) {
// this.user.OrganizationName = 'ZhiZhun'
// }
if (this.user.Id) {
updateUser(this.user).then(res => {
this.isDisabled = false
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
}).catch(() => { this.isDisabled = false })
}
}
})
},
handleEmailChange() {
var reg = /^[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
} else {
this.sendDisabled = true
}
},
sendVerificationCode() {
sendVerificationCode(this.userForm.EMail).then(() => {
this.settime(this)
//
this.$message.success(this.$t('trials:trials-myinfo:message:sendSuccessfully'))
})
},
save() {
this.$refs.passwordForm.validate(valid => {
if (valid) {
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
this.$alert(this.$t('passwordReset:formRule:passwordsDiffer'))
return
}
const param = {
UserId: this.userId,
NewPassWord: md5(this.password.NewPassWord),
OldPassWord: md5(this.password.OldPassWord)
}
modifyPassword(param).then(res => {
if (res.IsSuccess) {
// ,
this.$message.success(this.$t('trials:trials-myinfo:message:modifyPWSuccessfully'))
setTimeout(() => {
this.logout()
}, 1000)
}
})
}
})
},
setNewEmail() {
setNewEmail(this.userForm.EMail, this.userForm.VerificationCode).then(() => {
this.userForm.EMail = ''
this.userForm.VerificationCode = ''
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
})
},
setNewUserName() {
setNewUserName(this.userForm.UserName).then(() => {
this.$store.dispatch('user/changeUserName', this.userForm.UserName).then((res) => {
this.userForm.UserName = ''
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
})
})
},
setNewPhone() {
setNewPhone(this.userForm.Phone).then(() => {
this.userForm.Phone = ''
this.$message.success(this.$t('trials:trials-myinfo:message:updateSuccessfully'))
this.getUserInfo()
})
},
getUserInfo() {
const loading = this.$loading({
fullscreen: false,
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.07)'
})
getUser(this.userId).then(async res => {
this.user = res.Result
/* eslint-disable */
zzSessionStorage.setItem('realName', this.user.RealName)
await store.dispatch('user/updateInfo')
loading.close()
}).catch(() => { loading.close() })
},
settime(obj) {
if (countdown === 0) {
obj.sendDisabled = false
obj.sendTitle = this.$t('trials:trials-myinfo:button:getVCode')// ''
countdown = 60
clearTimeout(timer)
return
} else {
obj.sendDisabled = true
obj.sendTitle = `${this.$t('trials:trials-myinfo:button:wait')}(${countdown}s)`
countdown--
// eslint-disable-next-line no-self-assign
countdown = countdown
timer = setTimeout(function() {
obj.settime(obj)
}, 1000)
}
},
getUserTypeList() {
getUserTypeList().then(res => {
if (res.IsSuccess) {
this.userTypeOptions = res.Result
}
})
},
async logout() {
/* eslint-disable */
var loginType = zzSessionStorage.getItem('loginType')
await this.$store.dispatch('user/logout')
if (loginType) {
this.$router.push(`/login?loginType=${loginType}`)
} else {
this.$router.push(`/login`)
}
this.$i18n.locale = 'zh'
this.setLanguage('zh')
this.$updateDictionary()
}
}
}
</script> </script>
<style scoped> <style lang="scss">
.trial-myinfo{
background: #f3f3f3;
flex: 1;overflow: auto;display: flex;flex-direction: row;justify-content: space-around;
.trial-myinfo-head{
position: absolute;top: 40px;left: -10%;font-size: 14px;
}
.trial-myinfo-left{
overflow: auto;
background: #fff;width: calc(50% - 9px);margin: 6px 0;
padding-bottom: 50px;
.trial-myinfo-left-top{
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;margin-bottom: 10px;
.trial-myinfo-body{
width:160px;height:160px;border-radius: 50%;background: #428bca;display: flex;justify-content: center;align-items: center;
div{
color:#fff;font-size: 30px;
}
}
}
}
.saveBtn{
position: absolute;right: -10px;top:2px;transform: translateX(100%)
}
.trial-info-btn{
position: absolute;bottom: -60px;left: calc(100% + 10px);min-width: 97px;
}
.trial-myinfo-left-bottom{
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;
}
.trial-myinfo-right{
overflow: auto;
background: #fff;width: calc(50% - 9px);margin: 6px 0;
padding-bottom: 50px;
.sendCode {
position: absolute;right: -10px;top: 50%;transform: translate(100%, -50%);
}
.trial-myinfo-right-box{
width: 70%;padding-top: 100px;position: relative;margin: 0 auto;
}
}
}
</style>
<style scoped>
/deep/ .is-error.my_new_pwd{
margin-bottom: 40px;
}
</style> </style>