简历国际化添加
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-11-28 18:03:19 +08:00
parent 33f920e7bc
commit 5b90b2d155
6 changed files with 85 additions and 41 deletions

View File

@ -107,12 +107,13 @@ export default {
(item) => item.FileName === param.file.name (item) => item.FileName === param.file.name
) )
if (isRepeat) { if (isRepeat) {
this.$confirm('Override the existing resume?', { this.$confirm(
type: 'warning', this.$t('curriculumVitae:resume:message:existingResume'),
distinguishCancelAndClose: true, {
confirmButtonText: 'OK', type: 'warning',
cancelButtonText: 'Cancel', distinguishCancelAndClose: true,
}) }
)
.then(() => { .then(() => {
// //
this.repeat = true this.repeat = true
@ -166,7 +167,7 @@ export default {
}) })
}, },
handleDeleteFile(file) { handleDeleteFile(file) {
this.$confirm('Sure to remove?', { this.$confirm(this.$t('system:reviewer:confirm:delete'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })

View File

@ -240,15 +240,25 @@ export default {
store.dispatch('user/setTree', menuTree.Result) store.dispatch('user/setTree', menuTree.Result)
store.dispatch('user/setPermissions', permissions.Result) store.dispatch('user/setPermissions', permissions.Result)
// this.$router.push({ path: `/researchForm?trialId=${this.trialId}&trialSiteSurveyId=${res.Result.TrialSiteSurveyId}` }) // this.$router.push({ path: `/researchForm?trialId=${this.trialId}&trialSiteSurveyId=${res.Result.TrialSiteSurveyId}` })
this.$router.push({ if (this.$route.query.trialId) {
path: `/curriculumVitae?Id=${ this.$router.push({
res.Result.DoctorId ? res.Result.DoctorId : '' path: `/curriculumVitae?Id=${
}&tabActive=BasicInfo&ReviewStatus=${ res.Result.DoctorId ? res.Result.DoctorId : ''
res.Result.ReviewStatus }&tabActive=BasicInfo&ReviewStatus=${
}&trialId=${this.$route.query.trialId}&lang=${ res.Result.ReviewStatus
this.$route.query.lang }&trialId=${this.$route.query.trialId}&lang=${
}`, this.$route.query.lang
}) }`,
})
} else {
this.$router.push({
path: `/curriculumVitae?Id=${
res.Result.DoctorId ? res.Result.DoctorId : ''
}&tabActive=BasicInfo&ReviewStatus=${
res.Result.ReviewStatus
}&lang=${this.$route.query.lang}`,
})
}
}) })
.catch(() => { .catch(() => {
this.btnLoading = false this.btnLoading = false

View File

@ -27,11 +27,11 @@
<el-option <el-option
v-for="(item, index) in hospitalList" v-for="(item, index) in hospitalList"
:key="index" :key="index"
:label="item.HospitalName" :label="isEN ? item.HospitalName : item.HospitalNameCN"
:value="item.Id" :value="item.Id"
> >
<span> <span>
{{ item.HospitalName }} {{ isEN ? item.HospitalName : item.HospitalNameCN }}
</span> </span>
</el-option> </el-option>
</el-select> </el-select>
@ -45,7 +45,7 @@
:label="$t('system:reviewer:label:AffiliatedUniversity')" :label="$t('system:reviewer:label:AffiliatedUniversity')"
> >
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" disabled
v-model="UniversityAffiliated" v-model="UniversityAffiliated"
type="textarea" type="textarea"
autosize autosize
@ -59,7 +59,7 @@
<el-col :span="14"> <el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:City')"> <el-form-item :label="$t('system:reviewer:label:City')">
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" disabled
v-model="City" v-model="City"
size="small" size="small"
:maxlength="400" :maxlength="400"
@ -71,7 +71,7 @@
<el-col :span="14"> <el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:State/Province')"> <el-form-item :label="$t('system:reviewer:label:State/Province')">
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" disabled
v-model="Province" v-model="Province"
size="small" size="small"
:maxlength="400" :maxlength="400"
@ -83,7 +83,7 @@
<el-col :span="14"> <el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:Country')"> <el-form-item :label="$t('system:reviewer:label:Country')">
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" disabled
v-model="Country" v-model="Country"
size="small" size="small"
:maxlength="400" :maxlength="400"
@ -436,6 +436,9 @@ export default {
}, },
computed: { computed: {
...mapGetters(['hospitalList']), ...mapGetters(['hospitalList']),
isEN() {
return this.$i18n.locale !== 'zh'
},
}, },
mounted() { mounted() {
this.initEmployment() this.initEmployment()
@ -578,10 +581,12 @@ export default {
handleHospitalChange(value) { handleHospitalChange(value) {
const item = this.hospitalList.filter((item) => item.Id === value) const item = this.hospitalList.filter((item) => item.Id === value)
if (item.length) { if (item.length) {
this.UniversityAffiliated = item[0].UniversityAffiliated this.UniversityAffiliated = this.isEN
this.City = item[0].City ? item[0].UniversityAffiliated
this.Province = item[0].Province : item[0].UniversityAffiliatedCN
this.Country = item[0].Country this.City = this.isEN ? item[0].City : item[0].CityCN
this.Province = this.isEN ? item[0].Province : item[0].ProvinceCN
this.Country = this.isEN ? item[0].Country : item[0].CountryCN
} }
}, },
async initEmployment() { async initEmployment() {

View File

@ -379,7 +379,7 @@ export default {
return return
} }
if (!this.checkFileSuffix(row.name)) { if (!this.checkFileSuffix(row.name)) {
this.$message.warning(`Must be in .pdf format`) this.$message.warning(this.$t('upload:rule:MUSTPDF'))
return false return false
} }
}, },
@ -445,7 +445,7 @@ export default {
this.form.IsIRUpload = true this.form.IsIRUpload = true
} }
addDoctorCriterionFile(this.form).then((res) => { addDoctorCriterionFile(this.form).then((res) => {
this.$message.success('添加成功') this.$message.success(this.$t('common:message:addedSuccessfully'))
this.initSowList() this.initSowList()
this.handleCancle() this.handleCancle()
}) })

View File

@ -173,12 +173,13 @@ export default {
(item) => item.FileName === param.file.name (item) => item.FileName === param.file.name
) )
if (isRepeat) { if (isRepeat) {
this.$confirm('Override the existing resume?', { this.$confirm(
type: 'warning', this.$t('curriculumVitae:resume:message:existingResume'),
distinguishCancelAndClose: true, {
confirmButtonText: 'OK', type: 'warning',
cancelButtonText: 'Cancel', distinguishCancelAndClose: true,
}) }
)
.then(() => { .then(() => {
// //
this.repeat = true this.repeat = true
@ -189,7 +190,7 @@ export default {
this.uploadFile(param.file, param.data.language) this.uploadFile(param.file, param.data.language)
} }
} else { } else {
this.$alert(`Must be in ${this.accept} format`) this.$alert(this.$t('upload:rule:MUSTPDF'))
} }
}, },
async uploadFile(file, language) { async uploadFile(file, language) {
@ -228,7 +229,9 @@ export default {
this.resumeList = res.Result this.resumeList = res.Result
this.filterByLanguage() this.filterByLanguage()
this.isDisabled = false this.isDisabled = false
this.$message.success('Uploaded successfully') this.$message.success(
this.$t('trials:uploadDicomList:table:Uploaded')
)
}) })
.catch(() => { .catch(() => {
this.isDisabled = false this.isDisabled = false
@ -286,7 +289,7 @@ export default {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getResumeList() this.getResumeList()
this.$message({ this.$message({
message: 'Saved successfully!', message: this.$t('common:message:savedSuccessfully'),
type: 'success', type: 'success',
}) })
} }
@ -307,7 +310,7 @@ export default {
this.dialogVisible = false this.dialogVisible = false
this.getResumeList() this.getResumeList()
this.$message({ this.$message({
message: 'Saved successfully!', message: this.$t('common:message:savedSuccessfully'),
type: 'success', type: 'success',
}) })
} }

View File

@ -216,11 +216,11 @@
<el-option <el-option
v-for="(item, index) in hospitalList" v-for="(item, index) in hospitalList"
:key="index" :key="index"
:label="item.HospitalName" :label="isEN ? item.HospitalName : item.HospitalNameCN"
:value="item.Id" :value="item.Id"
> >
<span> <span>
{{ item.HospitalName }} {{ isEN ? item.HospitalName : item.HospitalNameCN }}
</span> </span>
</el-option> </el-option>
</el-select> </el-select>
@ -228,6 +228,7 @@
<el-form-item <el-form-item
:label="$t('curriculumVitae:info:form:AffiliatedUniversity')" :label="$t('curriculumVitae:info:form:AffiliatedUniversity')"
prop="UniversityAffiliated" prop="UniversityAffiliated"
v-if="isEN"
> >
<el-input <el-input
disabled disabled
@ -238,9 +239,29 @@
:maxlength="4000" :maxlength="4000"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('curriculumVitae:info:form:City')"> <el-form-item
:label="$t('curriculumVitae:info:form:AffiliatedUniversity')"
prop="UniversityAffiliated"
v-else
>
<el-input
disabled
v-model="form.UniversityAffiliatedCN"
type="textarea"
autosize
size="small"
:maxlength="4000"
/>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:City')"
v-if="isEN"
>
<el-input disabled v-model="form.City" size="small" /> <el-input disabled v-model="form.City" size="small" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('curriculumVitae:info:form:City')" v-else>
<el-input disabled v-model="form.CityCN" size="small" />
</el-form-item>
<el-form-item <el-form-item
:label="$t('curriculumVitae:info:form:department')" :label="$t('curriculumVitae:info:form:department')"
prop="DepartmentId" prop="DepartmentId"
@ -408,7 +429,9 @@ const defaultForm = () => {
WorkPartTime: null, WorkPartTime: null,
WorkPartTimeEn: null, WorkPartTimeEn: null,
UniversityAffiliated: null, UniversityAffiliated: null,
UniversityAffiliatedCN: null,
City: null, City: null,
CityCN: null,
} }
} }
export default { export default {
@ -676,6 +699,8 @@ export default {
if (item.length) { if (item.length) {
this.form.UniversityAffiliated = item[0].UniversityAffiliated this.form.UniversityAffiliated = item[0].UniversityAffiliated
this.form.City = item[0].City this.form.City = item[0].City
this.form.UniversityAffiliatedCN = item[0].UniversityAffiliatedCN
this.form.CityCN = item[0].CityCN
} }
}, },
}, },