Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2024-10-22 10:12:43 +08:00
commit 5a1b4b181a
9 changed files with 1239 additions and 253 deletions

View File

@ -290,3 +290,11 @@ export function verifyEmialGetDoctorInfo(param) {
data: param
})
}
// 新增或编辑基本信息
export function addOrUpdateDoctorBasicInfoAndEmployment(param) {
return request({
url: `/Doctor/addOrUpdateDoctorBasicInfoAndEmployment`,
method: 'post',
data: param
})
}

View File

@ -25,7 +25,7 @@ router.beforeEach(async (to, from, next) => {
if (hasToken) {
if (to.path === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') {
if (to.path === '/ReviewersResearch') {
await this.$store.dispatch('user/logout')
await store.dispatch('user/logout')
await OSSclient()
}
if (to.path === '/ReviewersResearchForm') {

View File

@ -1,10 +1,10 @@
<template>
<div class="question-login-wrapper">
<div class="box-wrapper">
<h2 style="text-align:center;">
<h2 style="text-align: center">
<!-- 中心调研表 -->
<!-- 独立阅片人信息填写 -->
{{$t("trials:researchForm:form:title")}}
{{ $t('trials:researchForm:form:title') }}
</h2>
<el-card shadow="hover" style="padding-top: 40px">
<el-form
@ -12,30 +12,44 @@
v-loading="loading"
:model="form"
label-width="150px"
style="width:80%;margin:0 auto;"
style="width: 80%; margin: 0 auto"
:rules="rules"
class="demo-ruleForm"
size="small"
>
<!-- 联系邮箱 -->
<el-form-item :label="$t('trials:researchForm:form:contactorEmail')" prop="EmailOrPhone">
<el-input v-model="form.EmailOrPhone" autocomplete="new-password" @change="handleEmailChange" />
<el-form-item
:label="$t('trials:researchForm:form:contactorEmail')"
prop="EmailOrPhone"
>
<el-input
v-model="form.EmailOrPhone"
autocomplete="new-password"
@change="handleEmailChange"
/>
</el-form-item>
<!-- 验证码 -->
<el-form-item :label="$t('trials:researchForm:form:verifyCode')" required>
<el-form-item
:label="$t('trials:researchForm:form:verifyCode')"
required
>
<el-col :span="20">
<el-form-item prop="VerificationCode">
<el-input v-model="form.VerificationCode" autocomplete="new-password" />
<el-input
v-model="form.VerificationCode"
autocomplete="new-password"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button
size="small"
type="primary"
style="width:100%;"
style="width: 100%"
:disabled="sendDisabled"
@click="handleSendCode"
>{{ sendTitle }}</el-button>
>{{ sendTitle }}</el-button
>
</el-col>
</el-form-item>
<el-form-item>
@ -44,10 +58,14 @@
{{ $t('common:button:cancel') }}
</el-button>
<!-- 提交 -->
<el-button size="small" type="primary" :loading="btnLoading" @click="onSubmit">
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="onSubmit"
>
{{ $t('common:button:submit') }}
</el-button>
</el-form-item>
</el-form>
</el-card>
@ -55,7 +73,11 @@
</div>
</template>
<script>
import { sendVerifyCode, verifySendCode, getTrialSurveyInitInfo } from '@/api/research'
import {
sendVerifyCode,
verifySendCode,
getTrialSurveyInitInfo,
} from '@/api/research'
import { verifyEmialGetDoctorInfo, sendEmialVerifyCode } from '@/api/reviewers'
import { login, getUserMenuTree, getUserPermissions } from '@/api/user'
import store from '@/store'
@ -65,7 +87,9 @@ export default {
var checkPhone = (rule, value, callback) => {
const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/
if (!value) {
return callback(new Error(this.$t('trials:researchForm:formRule:specify')))
return callback(
new Error(this.$t('trials:researchForm:formRule:specify'))
)
}
setTimeout(() => {
if (!Number.isInteger(+value)) {
@ -83,7 +107,8 @@ export default {
if (value === '') {
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
} else {
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
var reg =
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
this.sendDisabled = false
callback()
@ -97,8 +122,12 @@ export default {
if (value === '') {
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
} else {
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
if (this.form.ReplaceUserEmailOrPhone && reg.test(this.form.ReplaceUserEmailOrPhone)) {
var reg =
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
if (
this.form.ReplaceUserEmailOrPhone &&
reg.test(this.form.ReplaceUserEmailOrPhone)
) {
callback()
} else {
callback(new Error(this.$t('trials:researchForm:formRule:email')))
@ -120,26 +149,51 @@ export default {
TrialSiteCode: '',
IsUpdate: false,
ReplaceUserEmailOrPhone: '',
VerificationCode: ''
VerificationCode: '',
},
rules: {
SiteId: [
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }
{
required: true,
message: this.$t('trials:researchForm:formRule:specify'),
trigger: ['blur'],
},
],
UserName: [
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] },
{ min: 0, max: 50, message: this.$t('trials:researchForm:formRule:maxLength'), trigger: 'blur' }
],
Phone: [
{ required: true, validator: checkPhone, trigger: ['blur'] }
{
required: true,
message: this.$t('trials:researchForm:formRule:specify'),
trigger: ['blur'],
},
{
min: 0,
max: 50,
message: this.$t('trials:researchForm:formRule:maxLength'),
trigger: 'blur',
},
],
Phone: [{ required: true, validator: checkPhone, trigger: ['blur'] }],
EmailOrPhone: [
{ required: true, validator: validateEmail, trigger: ['blur', 'change'] }
{
required: true,
validator: validateEmail,
trigger: ['blur', 'change'],
},
],
ReplaceUserEmailOrPhone: [
{ required: true, validator: validateReplaceEmail, trigger: ['blur'] }
{
required: true,
validator: validateReplaceEmail,
trigger: ['blur'],
},
],
VerificationCode: [
{
required: true,
message: this.$t('trials:researchForm:formRule:specify'),
trigger: ['blur'],
},
],
VerificationCode: [{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }]
},
siteOptions: [],
loading: false,
@ -148,20 +202,19 @@ export default {
sendTitle: this.$t('trials:researchForm:button:send'),
count: '',
timer: null,
isHaveSiteSurveyRecord: false
isHaveSiteSurveyRecord: false,
}
},
created() {
this.$i18n.locale = this.$route.query.lang
this.setLanguage(this.$route.query.lang)
},
mounted() {
},
mounted() {},
methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }),
//
onSubmit() {
this.$refs['resetForm'].validate(valid => {
this.$refs['resetForm'].validate((valid) => {
if (valid) {
//
this.btnLoading = true
@ -173,7 +226,8 @@ export default {
emailOrPhone: this.form.EmailOrPhone,
verificationCode: this.form.VerificationCode,
}
verifyEmialGetDoctorInfo(param).then(async res => {
verifyEmialGetDoctorInfo(param)
.then(async (res) => {
this.btnLoading = false
zzSessionStorage.clear()
store.dispatch('user/setToken', res.Result.Token)
@ -183,8 +237,15 @@ export default {
store.dispatch('user/setTree', menuTree.Result)
store.dispatch('user/setPermissions', permissions.Result)
// this.$router.push({ path: `/researchForm?trialId=${this.trialId}&trialSiteSurveyId=${res.Result.TrialSiteSurveyId}` })
this.$router.push({path: `/ReviewersResearchForm?Id=${res.Result.DoctorId ? res.Result.DoctorId : ''}&tabActive=BasicInfo&ReviewStatus=${res.Result.ReviewStatus}&lang=${this.$route.query.lang}`})
}).catch(() => {
this.$router.push({
path: `/ReviewersResearchForm?Id=${
res.Result.DoctorId ? res.Result.DoctorId : ''
}&tabActive=BasicInfo&ReviewStatus=${
res.Result.ReviewStatus
}&lang=${this.$route.query.lang}`,
})
})
.catch(() => {
this.btnLoading = false
this.sendDisabled = false
})
@ -197,21 +258,24 @@ export default {
handleSendCode() {
this.sendDisabled = true
const param = {
Email: this.form.EmailOrPhone
Email: this.form.EmailOrPhone,
}
sendEmialVerifyCode(param).then(res => {
sendEmialVerifyCode(param)
.then((res) => {
if (res.IsSuccess) {
this.getCode()
} else {
this.$alert(res.ErrorMessage)
}
}).catch(() => {
})
.catch(() => {
this.sendDisabled = false
})
},
// change
handleEmailChange() {
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
var reg =
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
this.sendDisabled = false
} else {
@ -226,7 +290,9 @@ export default {
this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) {
this.count--
this.sendTitle = `${this.$t('trials:researchForm:button:send')}(${this.count}s)`
this.sendTitle = `${this.$t('trials:researchForm:button:send')}(${
this.count
}s)`
this.sendDisabled = true
} else {
this.sendDisabled = false
@ -239,8 +305,8 @@ export default {
},
onCancel() {
this.$refs['resetForm'].resetFields()
}
}
},
},
}
</script>
<style lang="scss" scoped>

View File

@ -37,7 +37,10 @@
min-width="70"
show-overflow-tooltip
>
<template slot-scope="scope">
<template slot-scope="scope" v-if="$fd('Degree', scope.row.Degree)">
{{ $fd('Degree', scope.row.Degree) }}
</template>
<template slot-scope="scope" v-else>
{{
scope.row.DegreeCN
? `${scope.row.Degree} / ${scope.row.DegreeCN}`
@ -341,9 +344,9 @@
>
<el-select v-model="educationForm.Degree" size="small">
<el-option
v-for="item in degreeOptions"
:key="item.value"
:label="item.value"
v-for="item in $d.Degree"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>

View File

@ -2,12 +2,18 @@
<div class="EducationalExperience">
<div class="title">
<span>{{ $t('curriculumVitae:EducationalExperience:title') }}</span>
<el-button type="text" class="editBtn" @click.stop="openEdit">
<el-button
type="text"
class="editBtn"
@click.stop="openEdit"
:disabled="!reviewerId"
>
{{ $t('common:button:add') }}
</el-button>
</div>
<el-table
:data="tableData"
:data="DATA"
v-loading="loading"
style="width: 100%"
:header-cell-style="{ background: '#eee', color: '#606266' }"
>
@ -15,33 +21,64 @@
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:time')"
>
<template slot-scope="scope">
<span>{{ scope.row.BeginDateStr }}-{{ scope.row.EndDateStr }}</span>
</template>
</el-table-column>
<el-table-column
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:specialy')"
>
<template slot-scope="scope">
<span>
{{ isEN ? scope.row.Major : scope.row.MajorCN }}
</span>
</template>
</el-table-column>
<el-table-column
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:degree')"
>
<template slot-scope="scope">
<span>
{{ $fd('Degree', Number(scope.row.Degree)) }}
</span>
</template>
</el-table-column>
<el-table-column
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:school')"
>
<template slot-scope="scope">
<span>
{{ isEN ? scope.row.Organization : scope.row.OrganizationCN }}
</span>
</template>
</el-table-column>
<el-table-column
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:city')"
>
<template slot-scope="scope">
<span>
{{ isEN ? scope.row.City : scope.row.CityCN }}
</span>
</template>
</el-table-column>
<el-table-column prop="date" :label="$t('common:action:action')">
<template slot-scope="scope">
<el-button type="text" class="editBtn" @click.stop="openEdit(scope)">
<el-button
type="text"
class="editBtn"
@click.stop="openEdit(scope.row)"
>
{{ $t('common:button:edit') }}
</el-button>
<el-button type="text" class="editBtn" @click.stop="openEdit">
<el-button
type="text"
class="editBtn"
@click.stop="handleDel(scope.row)"
>
{{ $t('common:button:delete') }}
</el-button>
</template>
@ -59,35 +96,30 @@
>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:time')"
prop="InternationalizationType"
prop="BeginDate"
>
<el-date-picker
clearable
v-model="daterange"
type="daterange"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
:range-separator="$t('curriculumVitae:daterange:rangeSeparator')"
:start-placeholder="$t('curriculumVitae:daterange:startTime')"
:end-placeholder="$t('curriculumVitae:daterange:endTime')"
@change="changeTimeList"
>
</el-date-picker>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:specialy')"
prop="InternationalizationType"
>
<el-row>
<el-col :span="12" style="margin-right: 5px">
<el-input
clearable
:placeholder="
$t(
'curriculumVitae:EducationalExperience:placeholder:specialy'
)
<el-form-item
:label="
$t('curriculumVitae:EducationalExperience:form:specialy')
"
></el-input>
</el-col>
<el-col :span="11">
prop="Major"
>
<el-input
clearable
:placeholder="
@ -95,17 +127,33 @@
'curriculumVitae:EducationalExperience:placeholder:specialyEN'
)
"
v-model="form.Major"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="MajorCN" label-width="10px">
<el-input
clearable
:placeholder="
$t(
'curriculumVitae:EducationalExperience:placeholder:specialy'
)
"
v-model="form.MajorCN"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:degree')"
prop="InternationalizationType"
prop="Degree"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-select v-model="form.Degree" placeholder="">
<el-option
v-for="item in $d.sex"
v-for="item in $d.Degree"
:key="item.id"
:label="item.label"
:value="item.value"
@ -113,23 +161,14 @@
</el-select>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:school')"
prop="InternationalizationType"
>
<el-row>
<el-col :span="12" style="margin-right: 5px">
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:school')"
prop="Organization"
>
<el-input
clearable
:placeholder="
$t(
'curriculumVitae:EducationalExperience:placeholder:school'
)
"
></el-input>
</el-col>
<el-col :span="11">
<el-input
v-model="form.Organization"
clearable
:placeholder="
$t(
@ -137,29 +176,96 @@
)
"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label-width="10px" prop="OrganizationCN">
<el-input
v-model="form.OrganizationCN"
clearable
:placeholder="
$t(
'curriculumVitae:EducationalExperience:placeholder:school'
)
"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form-item>
<el-row>
<el-col :span="12" style="margin-right: 5px">
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:city')"
prop="InternationalizationType"
prop="City"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-input
v-model="form.City"
clearable
:placeholder="
$t('curriculumVitae:EducationalExperience:placeholder:City')
"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="CityCN" label-width="10px">
<el-input
v-model="form.CityCN"
clearable
:placeholder="
$t(
'curriculumVitae:EducationalExperience:placeholder:CityCN'
)
"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" style="margin-right: 5px">
<el-form-item
:label="
$t('curriculumVitae:EducationalExperience:form:Country')
"
prop="Country"
>
<el-input
v-model="form.Country"
clearable
:placeholder="
$t(
'curriculumVitae:EducationalExperience:placeholder:Country'
)
"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="CountryCN" label-width="10px">
<el-input
v-model="form.CountryCN"
clearable
:placeholder="
$t(
'curriculumVitae:EducationalExperience:placeholder:CountryCN'
)
"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle">
{{ $t('common:button:cancel') }}
</el-button>
<el-button size="small" type="primary" @click="handleSave">
<el-button
size="small"
type="primary"
@click="handleSave"
:loading="loading"
>
{{ $t('common:button:save') }}
</el-button>
</template>
@ -168,12 +274,40 @@
</template>
<script>
import BaseModel from '@/components/BaseModel'
import { addOrUpdateEducationInfo, deleteEducationInfo } from '@/api/reviewers'
const defaultForm = () => {
return {
BeginDate: '',
EndDate: '',
Degree: '',
Major: '',
MajorCN: '',
Organization: '',
OrganizationCN: '',
City: '',
CityCN: '',
Country: '',
CountryCN: '',
}
}
export default {
name: 'EducationalExperience',
components: { BaseModel },
props: {
DATA: {
type: Array,
required: true,
default: () => {
return []
},
},
reviewerId: {
type: String,
default: '',
},
},
data() {
return {
tableData: [],
model_cfg: {
visible: false,
showClose: true,
@ -181,21 +315,165 @@ export default {
title: this.$t('curriculumVitae:EducationalExperience:form:title'),
appendToBody: true,
},
form: {},
rules: {},
form: defaultForm(),
rules: {
BeginDate: [
{
required: true,
message: 'Please select a start date',
trigger: 'blur',
},
],
EndDate: [
{
required: true,
message: 'Please select a valid date',
trigger: 'blur',
},
],
Degree: [
{
required: true,
message: 'Please enter the degree',
trigger: 'blur',
},
],
Major: [
{
required: true,
message: 'Please enter the major',
trigger: 'blur',
},
{ max: 100, message: 'The maximum length is 100' },
],
MajorCN: [
{
required: true,
message: 'Please enter the major',
trigger: 'blur',
},
{ max: 100, message: 'The maximum length is 100' },
],
Organization: [
{
required: true,
message: 'Please enter the institution',
trigger: 'blur',
},
{ max: 100, message: 'The maximum length is 100' },
],
OrganizationCN: [
{
required: true,
message: 'Please enter the institution',
trigger: 'blur',
},
{ max: 100, message: 'The maximum length is 100' },
],
City: [
{ required: true, message: 'Please enter the city', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
CityCN: [
{ required: true, message: 'Please enter the city', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
Country: [
{
required: true,
message: 'Please enter the country',
trigger: 'blur',
},
{ max: 50, message: 'The maximum length is 50' },
],
CountryCN: [
{
required: true,
message: 'Please enter the country',
trigger: 'blur',
},
{ max: 50, message: 'The maximum length is 50' },
],
},
loading: false,
daterange: [],
}
},
computed: {
isEN() {
return this.$i18n.locale !== 'zh'
},
},
methods: {
openEdit() {
openEdit(row) {
this.form = defaultForm()
this.daterange = []
if (row) {
Object.keys(this.form).forEach((key) => {
if (row[key]) {
this.form[key] = row[key]
}
})
if (this.form.BeginDate && this.form.EndDate) {
this.daterange = [this.form.BeginDate, this.form.EndDate]
}
if (this.form.Degree) {
this.form.Degree = Number(this.form.Degree)
}
this.form.Id = row.Id
}
this.model_cfg.visible = true
},
handleCancle() {
this.form = defaultForm()
this.daterange = []
this.model_cfg.visible = false
},
handleSave() {
async handleSave() {
try {
let validate = await this.$refs.EducationalExperienceFrom.validate()
if (!validate) return false
if (this.reviewerId) {
this.form.DoctorId = this.reviewerId
}
this.loading = true
let res = await addOrUpdateEducationInfo(this.form)
this.loading = false
if (res.IsSuccess) {
this.$emit('getInfo')
this.model_cfg.visible = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
async handleDel(row) {
try {
let confirm = await this.$confirm(
this.$t('trials:trials-list:table:isDeleted')
)
if (!confirm) return false
this.loading = true
let res = await deleteEducationInfo(row.Id)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$emit('getInfo')
}
} catch (err) {
this.loading = false
console.log(err)
}
},
changeTimeList() {
if (this.daterange && this.daterange.length === 2) {
this.form.BeginDate = this.daterange[0]
this.form.EndDate = this.daterange[1]
} else {
this.form.BeginDate = null
this.form.EndDate = null
}
},
},
}

View File

@ -3,23 +3,59 @@
<el-button type="text" class="editBtn" @click.stop="openEdit">
{{ $t('common:button:edit') }}
</el-button>
<template v-if="true">
<template v-if="DATA.FirstName && DATA.LastName">
<div class="userInfo">
<span>张三</span>
<span>医学博士</span>
<span>广州医院</span>
<span>社会兼职中华医学会XXXXXX</span>
<span>{{ DATA.FirstName }}{{ DATA.LastName }}</span>
<span>
<span v-if="isEN">
{{
Array.isArray(DATA.TitleList) && DATA.TitleList.length > 0
? DATA.TitleList.join(', ')
: ''
}}
</span>
<span v-else>
{{
Array.isArray(DATA.TitleCNList) && DATA.TitleCNList.length > 0
? DATA.TitleCNList.join(', ')
: ''
}}
</span>
</span>
<span>
<span v-if="isEN">{{ DATA.HospitalName }}</span>
<span v-else>{{ DATA.HospitalNameCN }}</span>
</span>
<span> </span>
</div>
<div class="userTitle">
<span class="el-icon-first-aid-kit">放射科</span>
<span class="el-icon-user">主任</span>
<span class="el-icon-medal">副主任医师</span>
<span class="el-icon-trophy">副教授</span>
<span
class="el-icon-first-aid-kit"
v-if="DATA.Department || DATA.DepartmentCN"
>
<span v-if="isEN">{{ DATA.Department }}</span>
<span v-else>{{ DATA.DepartmentCN }}</span>
</span>
<span class="el-icon-user" v-if="DATA.Rank || DATA.RankCN">
<span v-if="isEN">{{ DATA.Rank }}</span>
<span v-else>{{ DATA.RankCN }}</span>
</span>
<span
class="el-icon-medal"
v-if="DATA.WorkPartTimeEn || DATA.WorkPartTime"
>
<span v-if="isEN">{{ DATA.WorkPartTimeEn }}</span>
<span v-else>{{ DATA.WorkPartTime }}</span>
</span>
</div>
<div class="userTel">
<span class="el-icon-phone-outline">18616815282</span>
<span class="el-icon-message">sicauzhangye@sina.com</span>
<span class="el-icon-chat-dot-round">wechat666</span>
<span class="el-icon-phone-outline">
{{ DATA.Phone }}
</span>
<span class="el-icon-message">{{ DATA.EMail }}</span>
<span class="el-icon-chat-dot-round" v-if="DATA.WeChat">{{
DATA.WeChat
}}</span>
</div>
</template>
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
@ -33,21 +69,24 @@
label-width="80px"
size="small"
>
<div class="form_title">
{{ $t('curriculumVitae:info:form:infoTitle') }}
</div>
<el-row>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:surname')"
prop="InternationalizationType"
prop="FirstName"
>
<el-input v-model="form.surname" clearable></el-input>
<el-input v-model="form.FirstName" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:name')"
prop="InternationalizationType"
prop="LastName"
>
<el-input clearable></el-input>
<el-input v-model="form.LastName" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
@ -55,19 +94,19 @@
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:userNameCN')"
prop="InternationalizationType"
prop="ChineseName"
>
<el-input clearable></el-input>
<el-input v-model="form.ChineseName" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:sex')"
prop="InternationalizationType"
prop="Sex"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-option
v-for="item in $d.sex"
v-for="item in $d.Sex"
:key="item.id"
:label="item.label"
:value="item.value"
@ -80,14 +119,14 @@
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:education')"
prop="InternationalizationType"
prop="TitleIds"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-select v-model="form.TitleIds[0]" clearable placeholder="">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
v-for="item of dictionaryList.Title"
:key="item.Id"
:label="item.Value"
:value="item.Id"
/>
</el-select>
</el-form-item>
@ -95,9 +134,9 @@
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:phone')"
prop="InternationalizationType"
prop="Phone"
>
<el-input clearable></el-input>
<el-input v-model="form.Phone" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
@ -105,120 +144,181 @@
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:email')"
prop="InternationalizationType"
prop="EMail"
>
<el-input clearable></el-input>
<el-input v-model="form.EMail" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:wechat')"
prop="InternationalizationType"
prop="WeChat"
>
<el-input clearable></el-input>
<el-input v-model="form.WeChat" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:payType')"
prop="InternationalizationType"
:label="$t('curriculumVitae:info:form:country')"
prop="Nation"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-select v-model="form.Nation" size="small" class="mr">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
v-for="item of $d.AttendedReviewerType"
:value="item.value"
:label="item.label"
:key="item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div class="form_title">
{{ $t('curriculumVitae:info:form:workTitle') }}
</div>
<el-form-item
:label="$t('curriculumVitae:info:form:hospital')"
prop="InternationalizationType"
prop="HospitalId"
>
<el-select
v-model="form.HospitalId"
filterable
placeholder=""
@change="handleHospitalChange"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
/>
v-for="(item, index) in hospitalList"
:key="index"
:label="item.HospitalName"
:value="item.Id"
>
<span>
{{ item.HospitalName }}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:AffiliatedUniversity')"
>
<el-input
disabled
v-model="form.UniversityAffiliated"
type="textarea"
autosize
size="small"
/>
</el-form-item>
<el-form-item :label="$t('curriculumVitae:info:form:City')">
<el-input disabled v-model="form.City" size="small" />
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:department')"
prop="InternationalizationType"
prop="DepartmentId"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-select v-model="form.DepartmentId" clearable placeholder="">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
v-for="item of dictionaryList.Department"
:key="item.Id"
:label="item.Value"
:value="item.Id"
/>
<el-option label="Other" :value="otherId" />
</el-select>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:rank')"
prop="InternationalizationType"
v-if="form.DepartmentId === otherId"
class="other-item"
prop="DepartmentOther"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
<el-input
v-model="form.DepartmentOther"
:placeholder="
$t('curriculumVitae:info:form:placeholder:DepartmentOther')
"
size="small"
/>
</el-form-item>
<el-form-item
v-if="form.DepartmentId === otherId"
class="other-item"
prop="DepartmentOtherCN"
>
<el-input
v-model="form.DepartmentOtherCN"
:placeholder="
$t('curriculumVitae:info:form:placeholder:DepartmentOtherCN')
"
size="small"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:physician')"
prop="InternationalizationType"
prop="RankId"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-select v-model="form.RankId" clearable placeholder="">
<el-option
v-for="item in $d.sex"
v-for="item in $d.Rank"
:key="item.id"
:label="item.label"
:value="item.value"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:position')"
prop="InternationalizationType"
v-if="
$fd('Rank', form.RankId, 'id') === '其它' ||
$fd('Rank', form.RankId, 'id') === 'Other'
"
class="other-item"
prop="RankOther"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
<el-input
v-model="form.RankOther"
:placeholder="
$t('curriculumVitae:info:form:placeholder:RankOther')
"
size="small"
/>
</el-form-item>
<el-form-item
v-if="
$fd('Rank', form.RankId, 'id') === '其它' ||
$fd('Rank', form.RankId, 'id') === 'Other'
"
class="other-item"
prop="RankOtherCN"
>
<el-input
v-model="form.RankOtherCN"
:placeholder="
$t('curriculumVitae:info:form:placeholder:RankOtherCN')
"
size="small"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:partTimeJob')"
prop="InternationalizationType"
prop="WorkPartTime"
>
<el-input
:placeholder="
$t('curriculumVitae:info:form:placeholder:partTimeJob')
"
v-model="form.WorkPartTime"
type="textarea"
:rows="2"
clearable
></el-input>
</el-form-item>
<el-form-item prop="InternationalizationType">
<el-form-item prop="WorkPartTimeEn">
<el-input
:placeholder="
$t('curriculumVitae:info:form:placeholder:partTimeJobEN')
"
v-model="form.WorkPartTimeEn"
type="textarea"
:rows="2"
clearable
@ -230,7 +330,12 @@
<el-button size="small" type="primary" @click="handleCancle">
{{ $t('common:button:cancel') }}
</el-button>
<el-button size="small" type="primary" @click="handleSave">
<el-button
size="small"
type="primary"
@click="handleSave"
:loading="loading"
>
{{ $t('common:button:save') }}
</el-button>
</template>
@ -239,32 +344,204 @@
</template>
<script>
import BaseModel from '@/components/BaseModel'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import { addOrUpdateDoctorBasicInfoAndEmployment } from '@/api/reviewers'
import store from '@/store'
import { mapGetters } from 'vuex'
const defaultForm = () => {
return {
FirstName: '',
LastName: '',
ChineseName: '',
Sex: '',
TitleIds: [],
Phone: '',
EMail: '',
WeChat: '',
Nation: 0,
DepartmentId: '',
DepartmentOther: '',
DepartmentOtherCN: '',
RankId: '',
RankOther: '',
RankOtherCN: '',
HospitalId: '',
WorkPartTime: null,
WorkPartTimeEn: null,
UniversityAffiliated: null,
City: null,
}
}
export default {
name: 'info',
components: { BaseModel },
props: {
DATA: {
type: Object,
required: true,
default: () => {
return {}
},
},
reviewerId: {
type: String,
default: '',
},
},
data() {
return {
model_cfg: {
visible: false,
showClose: true,
width: '600px',
width: '800px',
title: this.$t('curriculumVitae:info:form:title'),
appendToBody: true,
appendToBody: false,
},
form: defaultForm(),
rules: {
FirstName: [
{
required: true,
message: 'Please enter FirstName',
trigger: 'blur',
},
{ max: 50, message: 'The maximum length is 50' },
],
LastName: [
{ required: true, message: 'Please enter LastName', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
ChineseName: [{ max: 50, message: 'The maximum length is 50' }],
Sex: [
{ required: true, message: 'Please select gender', trigger: 'blur' },
],
TitleIds: [
{ required: true, message: 'Please select Title', trigger: 'blur' },
],
Phone: [
{
required: true,
message: 'Please enter phone number',
trigger: 'blur',
},
{ max: 20, min: 7, message: 'The length is 7 to 20' },
],
EMail: [
{
required: true,
message: 'Please input the email address',
trigger: 'blur',
},
{
type: 'email',
message: 'Please input the correct email address',
trigger: 'blur,change',
},
{ max: 50, message: 'The maximum length is 50' },
],
WeChat: [{ max: 50, message: 'The maximum length is 50' }],
Nation: [
{
required: true,
message: 'Please select the Nation',
trigger: 'blur',
},
],
DepartmentId: [
{
required: true,
message: 'Please select department',
trigger: 'blur',
},
],
DepartmentOther: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
DepartmentOtherCN: [{ max: 50, message: 'The maximum length is 50' }],
RankId: [
{ required: true, message: 'Please select rank', trigger: 'blur' },
],
RankOther: [
{ required: true, message: 'Please select rank', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
RankOtherCN: [
{ required: true, message: 'Please select rank', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
HospitalId: [
{
required: true,
message: 'Please select hospital',
trigger: 'blur',
},
],
},
form: {},
rules: {},
loading: false,
dictionaryList: {},
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
}
},
computed: {
...mapGetters(['hospitalList']),
isEN() {
return this.$i18n.locale !== 'zh'
},
},
mounted() {
this.getDicData()
store.dispatch('global/getHospital')
},
methods: {
openEdit() {
this.form = defaultForm()
Object.keys(this.form).forEach((key) => {
if (this.DATA[key]) {
this.form[key] = this.DATA[key]
}
})
this.model_cfg.visible = true
},
handleCancle() {
this.form = defaultForm()
this.model_cfg.visible = false
},
handleSave() {
async handleSave() {
try {
let validate = await this.$refs.infoFrom.validate()
if (!validate) return false
if (this.reviewerId) {
this.form.Id = this.reviewerId
}
this.loading = true
let res = await addOrUpdateDoctorBasicInfoAndEmployment(this.form)
this.loading = false
if (res.IsSuccess) {
this.$emit('update:reviewerId', res.Result.Id)
sessionStorage.setItem('reviewerId', res.Result.Id)
this.$emit('getInfo')
this.model_cfg.visible = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
getDicData() {
getBasicDataSelects(['Title', 'Department', 'Rank', 'Position'])
.then((res) => {
this.dictionaryList = { ...res.Result }
})
.catch(() => {})
},
handleHospitalChange(value) {
const item = this.hospitalList.filter((item) => item.Id === value)
if (item.length) {
this.form.UniversityAffiliated = item[0].UniversityAffiliated
this.form.City = item[0].City
}
},
},
}
@ -312,4 +589,22 @@ export default {
.el-select {
width: 100%;
}
::v-deep .el-dialog__body {
padding-top: 0 !important;
}
.form_title {
margin: 10px 0;
display: flex;
align-items: center;
&::after {
margin-left: 20px;
display: block;
content: '';
border-top: 1px solid #eee;
flex: 1;
}
}
.noData {
line-height: 100px;
}
</style>

View File

@ -1,22 +1,68 @@
<template>
<div class="specialty">
<el-button type="text" class="editBtn" @click.stop="openEdit">
<el-button
type="text"
class="editBtn"
@click.stop="openEdit"
:disabled="!reviewerId"
>
{{ $t('common:button:edit') }}
</el-button>
<template v-if="true">
<el-form class="demo-form-inline">
<el-form-item :label="$t('curriculumVitae:specialty:specialty')">
<span>放射科</span>
<span v-if="isEN">
{{ DATA.Speciality || DATA.SpecialityOther }}
</span>
<span v-else>{{ DATA.SpecialityCN || DATA.SpecialityOtherCN }}</span>
</el-form-item>
<el-form-item :label="$t('curriculumVitae:specialty:submajor')">
<el-tag type="info" v-for="item in ['1', '2', '3']" :key="item">
标签三
<template v-if="isEN">
<el-tag
type="info"
v-for="item in DATA.SubspecialityOther
? [...DATA.SubspecialityList, DATA.SubspecialityOther]
: DATA.SubspecialityList"
:key="item"
>
{{ item }}
</el-tag>
</template>
<template v-else>
<el-tag
type="info"
v-for="item in DATA.SubspecialityOtherCN
? [...DATA.SubspecialityCNList, DATA.SubspecialityOtherCN]
: DATA.SubspecialityCNList"
:key="item"
>
{{ item }}
</el-tag>
</template>
</el-form-item>
<el-form-item :label="$t('curriculumVitae:specialty:equipment')">
<el-tag type="info" v-for="item in ['1', '2', '3']" :key="item">
标签三
<template v-if="isEN">
<el-tag
type="info"
v-for="item in DATA.ReadingTypeOther
? [...DATA.ReadingTypeList, DATA.ReadingTypeOther]
: DATA.ReadingTypeList"
:key="item"
>
{{ item }}
</el-tag>
</template>
<template v-else>
<el-tag
type="info"
v-for="item in DATA.ReadingTypeOtherCN
? [...DATA.ReadingTypeCNList, DATA.ReadingTypeOtherCN]
: DATA.ReadingTypeCNList"
:key="item"
>
{{ item }}
</el-tag>
</template>
</el-form-item>
</el-form>
</template>
@ -33,50 +79,166 @@
>
<el-form-item
:label="$t('curriculumVitae:specialty:form:specialty')"
prop="InternationalizationType"
prop="SpecialityId"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-select v-model="form.SpecialityId" placeholder="">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
v-for="item of dictionaryList.Department"
:key="item.Id"
:label="item.Value"
:value="item.Id"
/>
<el-option label="Other" :value="otherId" />
</el-select>
</el-form-item>
<el-form-item
v-if="form.SpecialityId == otherId"
class="other-item"
prop="SpecialityOther"
>
<el-input
v-model="form.SpecialityOther"
:placeholder="
$t('curriculumVitae:specialty:placeholder:SpecialityOther')
"
size="small"
/>
</el-form-item>
<el-form-item
v-if="form.SpecialityId == otherId"
prop="SpecialityOtherCN"
class="other-item"
>
<el-input
v-model="form.SpecialityOtherCN"
:placeholder="
$t('curriculumVitae:specialty:placeholder:SpecialityOtherCN')
"
size="small"
/>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:specialty:form:submajor')"
prop="InternationalizationType"
prop="SubspecialityIds"
>
<el-select
v-model="form.SubspecialityIds"
multiple
placeholder=""
@change="(a) => selectOther(a, 'Subspeciality')"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
v-for="item of [
...dictionaryList.Subspeciality,
{
Id: otherId,
Value: 'Other',
},
]"
:key="item.Id"
:label="item.Value"
:value="item.Id"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:specialty:form:equipment')"
prop="InternationalizationType"
v-if="
form.SubspecialityIds &&
form.SubspecialityIds.indexOf(otherId) > -1
"
class="other-item"
prop="SubspecialityOther"
>
<el-input
v-model="form.SubspecialityOther"
:placeholder="
$t('curriculumVitae:specialty:placeholder:SubspecialityOther')
"
size="small"
/>
</el-form-item>
<el-form-item
v-if="
form.SubspecialityIds &&
form.SubspecialityIds.indexOf(otherId) > -1
"
class="other-item"
prop="SubspecialityOtherCN"
>
<el-input
v-model="form.SubspecialityOtherCN"
:placeholder="
$t('curriculumVitae:specialty:placeholder:SubspecialityOtherCN')
"
size="small"
/>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:specialty:form:equipment')"
prop="ReadingTypeIds"
>
<el-select
v-model="form.ReadingTypeIds"
multiple
placeholder=""
@change="(a) => selectOther(a, 'ReadingType')"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-option
v-for="item in $d.sex"
:key="item.id"
:label="item.label"
:value="item.value"
v-for="item of [
...dictionaryList.ReadingType,
{
Id: otherId,
Value: 'Other',
},
]"
:key="item.Id"
:label="item.Value"
:value="item.Id"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="
form.ReadingTypeIds && form.ReadingTypeIds.indexOf(otherId) > -1
"
prop="ReadingTypeOther"
class="other-item"
>
<el-input
v-model="form.ReadingTypeOther"
:placeholder="
$t('curriculumVitae:specialty:placeholder:ReadingTypeOther')
"
size="small"
/>
</el-form-item>
<el-form-item
v-if="
form.ReadingTypeIds && form.ReadingTypeIds.indexOf(otherId) > -1
"
prop="ReadingTypeOtherCN"
class="other-item"
>
<el-input
v-model="form.ReadingTypeOtherCN"
:placeholder="
$t('curriculumVitae:specialty:placeholder:ReadingTypeOtherCN')
"
size="small"
/>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle">
{{ $t('common:button:cancel') }}
</el-button>
<el-button size="small" type="primary" @click="handleSave">
<el-button
size="small"
type="primary"
@click="handleSave"
:loading="loading"
>
{{ $t('common:button:save') }}
</el-button>
</template>
@ -85,9 +247,37 @@
</template>
<script>
import BaseModel from '@/components/BaseModel'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import { updateSpecialtyInfo } from '@/api/reviewers'
const defaultForm = () => {
return {
ReadingTypeIds: [],
ReadingTypeOther: '',
ReadingTypeOtherCN: '',
SubspecialityIds: [],
SubspecialityOther: '',
SubspecialityOtherCN: '',
SpecialityId: '',
SpecialityOther: '',
SpecialityOtherCN: '',
}
}
export default {
name: 'specialty',
components: { BaseModel },
props: {
DATA: {
type: Object,
required: true,
default: () => {
return {}
},
},
reviewerId: {
type: String,
default: '',
},
},
data() {
return {
model_cfg: {
@ -97,20 +287,117 @@ export default {
title: this.$t('curriculumVitae:specialty:form:title'),
appendToBody: true,
},
form: {},
rules: {},
form: defaultForm(),
rules: {
SpecialityId: [
{
required: true,
message: 'Please select speciality',
trigger: 'blur',
},
],
SpecialityOther: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
SpecialityOtherCN: [{ max: 50, message: 'The maximum length is 50' }],
ReadingTypeIds: [
{
required: true,
message: 'Please select clinical reading type',
trigger: 'blur',
},
],
ReadingTypeOther: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
ReadingTypeOtherCN: [{ max: 50, message: 'The maximum length is 50' }],
SubspecialityIds: [
{
required: true,
message: 'Please select subspecialty',
trigger: 'blur',
},
],
SubspecialityOther: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
SubspecialityOtherCN: [
{ max: 50, message: 'The maximum length is 50' },
],
},
loading: false,
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
dictionaryList: {},
}
},
computed: {
isEN() {
return this.$i18n.locale !== 'zh'
},
},
mounted() {
this.getDicData()
},
methods: {
openEdit() {
this.form = defaultForm()
Object.keys(this.form).forEach((key) => {
if (this.DATA[key]) {
this.form[key] = this.DATA[key]
}
})
if (
(this.form.ReadingTypeOther || this.form.ReadingTypeOtherCN) &&
!this.form.ReadingTypeIds.includes(this.otherId)
) {
this.form.ReadingTypeIds.push(this.otherId)
}
if (
(this.form.SubspecialityOther || this.form.SubspecialityOtherCN) &&
!this.form.SubspecialityIds.includes(this.otherId)
) {
this.form.SubspecialityIds.push(this.otherId)
}
this.model_cfg.visible = true
},
handleCancle() {
this.form = defaultForm()
this.model_cfg.visible = false
},
handleSave() {
async handleSave() {
try {
let validate = await this.$refs.specialtyFrom.validate()
if (!validate) return false
if (this.reviewerId) {
this.form.Id = this.reviewerId
}
this.loading = true
let res = await updateSpecialtyInfo(this.form)
this.loading = false
if (res.IsSuccess) {
this.$emit('getInfo')
this.model_cfg.visible = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
getDicData() {
getBasicDataSelects(['Department', 'Subspeciality', 'ReadingType']).then(
(res) => {
this.dictionaryList = { ...res.Result }
}
)
},
selectOther(arr, key) {
if (arr.length <= 0 || !arr.includes(this.otherId)) {
this.form[`${key}Other`] = null
this.form[`${key}OtherCN`] = null
}
},
},
}

View File

@ -1,5 +1,5 @@
<template>
<div class="curriculumVitae">
<div class="curriculumVitae" v-loading="loading">
<div class="leftMenu">
<div class="title">{{ $t('curriculumVitae:menu:title') }}</div>
<el-menu
@ -59,16 +59,33 @@
</div>
</div>
<div class="box" id="info">
<info />
<info
:DATA="{
...reviewerData.BasicInfoView,
...reviewerData.EmploymentView,
}"
:reviewerId.sync="reviewerId"
@getInfo="getDetail"
/>
</div>
<div class="box" id="summarize">
<summarize />
</div>
<div class="box" id="specialty">
<specialty />
<specialty
:DATA="{
...reviewerData.SpecialtyView,
}"
:reviewerId.sync="reviewerId"
@getInfo="getDetail"
/>
</div>
<div class="box" id="educationalExperience">
<educationalExperience />
<educationalExperience
:DATA="reviewerData.EducationList"
:reviewerId.sync="reviewerId"
@getInfo="getDetail"
/>
</div>
<div class="box" id="continuingTraining">
<continuingTraining />
@ -118,6 +135,8 @@ import treatise from './components/info/treatise.vue'
import other from './components/info/other.vue'
import pay from './components/info/pay.vue'
import preview from './preview.vue'
import { getDetail } from '@/api/reviewers'
import { mapMutations } from 'vuex'
export default {
components: {
curriculum,
@ -140,17 +159,47 @@ export default {
activeIndex: 'info',
isScrollAuto: true,
visible: false,
loading: false,
reviewerId: null,
reviewerData: {
BasicInfoView: {},
EmploymentView: {},
},
}
},
async created() {
this.$i18n.locale = this.$route.query.lang
await this.setLanguage(this.$route.query.lang)
},
mounted() {
//
window.addEventListener('scroll', this.onScroll)
if (sessionStorage.getItem('reviewerId')) {
this.reviewerId = sessionStorage.getItem('reviewerId')
this.getDetail()
}
},
destroy() {
// vue
window.removeEventListener('scroll', this.onScroll)
},
methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }),
//
async getDetail() {
try {
let id = this.reviewerId
this.loading = true
let res = await getDetail(id)
this.loading = false
if (res.IsSuccess) {
this.reviewerData = res.Result
}
} catch (err) {
this.loading = false
console.log(err)
}
},
handleSelect(key, keyPath) {
const navContent = document.getElementById(key)
if (navContent) {

View File

@ -117,8 +117,8 @@ export default {
Resumes: false,
Agreements: false,
Setting: false,
reviewerId: null,
},
reviewerId: null,
}
},
mounted() {