pm新增简历采集功能
continuous-integration/drone/push Build is passing Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-10-17 16:08:51 +08:00
parent b0195b8d21
commit df638f5a73
13 changed files with 2657 additions and 993 deletions

View File

@ -1,45 +1,92 @@
<template>
<div v-loading="loading" class="resumes-container">
<div class="resume-content" v-if="!$route.query.ReviewStatus">
<p>{{$t('system:Agreements:title:Consultant Agreement')}}</p>
<p>{{ $t('system:Agreements:title:Consultant Agreement') }}</p>
<div class="upload-content">
<upload-files ref="uploadAgreement" :disabled="$route.query.ReviewStatus === '1'" :doctor-id="doctorId" type="Consultant Agreement" accept=".pdf" @getFileList="getFileList" />
<upload-files
ref="uploadAgreement"
:disabled="$route.query.ReviewStatus === '1'"
:doctor-id="doctorId"
type="Consultant Agreement"
accept=".pdf"
@getFileList="getFileList"
/>
</div>
<p>{{ $t('system:tip:file:pdf') }}</p>
</div>
<div v-if="!$route.query.ReviewStatus">
<el-table :data="agreementList" size="small">
<el-table-column type="index" width="40" />
<el-table-column prop="FileName" :label="$t('system:Agreements:table:Consultant Agreement')" width="300" />
<el-table-column prop="CreateTime" :label="$t('system:Agreements:table:Upload Time')" width="150" />
<el-table-column
prop="FileName"
:label="$t('system:Agreements:table:Consultant Agreement')"
width="300"
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Agreements:table:Upload Time')"
width="150"
/>
<el-table-column :label="$t('common:action:action')" width="400">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handlePreview(scope.row)">{{$t('trials:enrolledReviews:button:view')}}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile(scope.row)">{{$t('common:button:delete')}}</el-button>
<el-button
type="text"
size="small"
@click="handlePreview(scope.row)"
>{{ $t('trials:enrolledReviews:button:view') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<div style="margin-top:20px">
<div style="margin-top: 20px">
<span style="margin-right: 20px">
{{$t('trials:enrolledReviews:message:SOW')}}
{{ $t('trials:enrolledReviews:message:SOW') }}
</span>
<el-button size="small" type="primary" :disabled="$route.query.ReviewStatus === '1'" @click="addCol(0, $t('trials:enrolledReviews:message:SOW'))">
{{ $t('common:button:upload') }}</el-button>
<el-button size="small" type="primary" @click="handleDownload('Reviewer_SOW_Template')">
<el-button
size="small"
type="primary"
:disabled="$route.query.ReviewStatus === '1'"
@click="addCol(0, $t('trials:enrolledReviews:message:SOW'))"
>
{{ $t('common:button:upload') }}</el-button
>
<el-button
size="small"
type="primary"
@click="handleDownload('Reviewer_SOW_Template')"
>
<i class="el-icon-view el-icon-download"></i>
{{ $t('common:button:template') }}
</el-button>
</div>
<el-table :data="sowList" size="small">
<el-table-column type="index" width="40" />
<el-table-column :label="$t('system:Agreements:table:Criterion Type')" width="120">
<el-table-column
:label="$t('system:Agreements:table:Criterion Type')"
width="120"
>
<template slot-scope="scope">
{{ scope.row.CriterionName }}
</template>
</el-table-column>
<el-table-column prop="FileName" :label="$t('system:Agreements:table:Statement of Work')" width="400" />
<el-table-column prop="IsEnable" :label="$t('system:Agreements:table:Is Enable')" width="100">
<el-table-column
prop="FileName"
:label="$t('system:Agreements:table:Statement of Work')"
width="400"
/>
<el-table-column
prop="IsEnable"
:label="$t('system:Agreements:table:Is Enable')"
width="100"
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.IsEnable"
@ -49,32 +96,81 @@
/>
</template>
</el-table-column>
<el-table-column prop="Remark" :label="$t('system:Agreements:Remark')" width="200" />
<el-table-column prop="CreateTime" :label="$t('system:Agreements:Upload Time')" width="150" />
<el-table-column
prop="Remark"
:label="$t('system:Agreements:Remark')"
width="200"
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Agreements:Upload Time')"
width="150"
/>
<el-table-column :label="$t('common:action:action')" width="400">
<template slot-scope="scope">
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handlePreview3(scope.row)">{{$t('trials:enrolledReviews:button:view')}}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleEditCol(scope.row, 0, $t('trials:enrolledReviews:message:SOW'))">
{{ $t('common:button:edit') }}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile3(scope.row)">{{ $t('common:button:delete') }}</el-button>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handlePreview3(scope.row)"
>{{ $t('trials:enrolledReviews:button:view') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="
handleEditCol(
scope.row,
0,
$t('trials:enrolledReviews:message:SOW')
)
"
>
{{ $t('common:button:edit') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile3(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
</template>
</el-table-column>
</el-table>
<div style="margin-top:20px" v-if="!$route.query.ReviewStatus">
<div style="margin-top: 20px" v-if="!$route.query.ReviewStatus">
<span style="margin-right: 20px">
{{$t('trials:enrolledReviews:message:EQC')}}
{{ $t('trials:enrolledReviews:message:EQC') }}
</span>
<el-button size="small" type="primary" :disabled="$route.query.ReviewStatus === '1'" @click="addCol(1, $t('trials:enrolledReviews:message:EQC'))">{{$t('common:button:upload')}}</el-button>
<el-button
size="small"
type="primary"
:disabled="$route.query.ReviewStatus === '1'"
@click="addCol(1, $t('trials:enrolledReviews:message:EQC'))"
>{{ $t('common:button:upload') }}</el-button
>
</div>
<el-table :data="ackSowList" size="small" v-if="!$route.query.ReviewStatus">
<el-table-column type="index" width="40" />
<el-table-column :label="$t('system:Agreements:table:Criterion Type')" width="120">
<el-table-column
:label="$t('system:Agreements:table:Criterion Type')"
width="120"
>
<template slot-scope="scope">
{{ scope.row.CriterionName }}
</template>
</el-table-column>
<el-table-column prop="FileName" :label="$t('system:Agreements:table:Acknowledgement of SOW')" width="400" />
<el-table-column prop="IsEnable" :label="$t('system:Agreements:table:Is Enable')" width="100">
<el-table-column
prop="FileName"
:label="$t('system:Agreements:table:Acknowledgement of SOW')"
width="400"
/>
<el-table-column
prop="IsEnable"
:label="$t('system:Agreements:table:Is Enable')"
width="100"
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.IsEnable"
@ -84,13 +180,45 @@
/>
</template>
</el-table-column>
<el-table-column prop="Remark" :label="$t('system:Agreements:table:Remark')" width="200" />
<el-table-column prop="CreateTime" :label="$t('system:Agreements:table:Upload Time')" width="150" />
<el-table-column
prop="Remark"
:label="$t('system:Agreements:table:Remark')"
width="200"
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Agreements:table:Upload Time')"
width="150"
/>
<el-table-column label="Action" width="400">
<template slot-scope="scope">
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handlePreview3(scope.row)">{{$t('common:button:view')}}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleEditCol(scope.row, 1, $t('trials:enrolledReviews:message:EQC'))">{{$t('common:button:edit')}}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile3(scope.row)">{{$t('common:button:delete')}}</el-button>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handlePreview3(scope.row)"
>{{ $t('common:button:view') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="
handleEditCol(
scope.row,
1,
$t('trials:enrolledReviews:message:EQC')
)
"
>{{ $t('common:button:edit') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile3(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
</template>
</el-table-column>
</el-table>
@ -103,7 +231,10 @@
label-width="120px"
size="small"
>
<el-form-item :label="$t('system:Agreements:label:Criterion Type')" prop="CriterionType">
<el-form-item
:label="$t('system:Agreements:label:Criterion Type')"
prop="CriterionType"
>
<el-select v-model="form.CriterionType">
<el-option
v-for="item of $d.CriterionType"
@ -113,7 +244,10 @@
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('system:Agreements:label:File')" prop="FilePath">
<el-form-item
:label="$t('system:Agreements:label:File')"
prop="FilePath"
>
<el-upload
class="upload-demo"
action
@ -125,12 +259,20 @@
:limit="1"
:file-list="fileList"
>
<el-button size="small" type="primary" :disabled="fileList.length > 0">{{$t('common:button:upload')}}</el-button>
<el-button
size="small"
type="primary"
:disabled="fileList.length > 0"
>{{ $t('common:button:upload') }}</el-button
>
</el-upload>
</el-form-item>
<el-form-item :label="$t('system:Agreements:label:Remark')">
<el-input v-model="form.Remark" type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"></el-input>
<el-input
v-model="form.Remark"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
></el-input>
</el-form-item>
<el-form-item :label="$t('system:Agreements:label:Is Enable')">
<el-switch
@ -142,8 +284,20 @@
</el-form>
</template>
<template slot="dialog-footer">
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">{{ $t('common:button:cancel') }}</el-button>
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">{{ $t('common:button:save') }}</el-button>
<el-button
:disabled="btnLoading"
size="small"
type="primary"
@click="handleCancle"
>{{ $t('common:button:cancel') }}</el-button
>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>{{ $t('common:button:save') }}</el-button
>
</template>
</BaseModel>
</div>
@ -151,25 +305,43 @@
<script>
import { uploadFile } from '@/api/attachment'
import UploadFiles from '@/components/UploadFiles'
import { getDoctorSowList, getDoctorAckSowList, addDoctorCriterionFile, deleteDoctorCriterionFile, getDoctorCriterionFile } from '@/api/reviewers'
import {
getDoctorSowList,
getDoctorAckSowList,
addDoctorCriterionFile,
deleteDoctorCriterionFile,
getDoctorCriterionFile,
} from '@/api/reviewers'
import BaseModel from '@/components/BaseModel'
import { DownloadCommonDoc } from '@/api/dictionary'
export default {
name: 'Agreements',
components: {
UploadFiles, BaseModel
UploadFiles,
BaseModel,
},
props: {
reviewerId: {
type: String,
},
},
data() {
return {
doctorId: this.$route.query.Id,
doctorId: this.$route.query.Id || this.reviewerId,
agreementList: [],
sowList: [],
ackSowList: [],
loading: false,
isOpen: false,
btnLoading: false,
model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true },
model_cfg: {
visible: false,
showClose: true,
width: '600px',
title: '',
appendToBody: true,
},
form: {
Remark: null,
FileType: null,
@ -177,24 +349,47 @@ export default {
FilePath: null,
DoctorId: null,
CriterionType: null,
IsEnable: false
IsEnable: false,
},
rules: {
CriterionType: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
FilePath: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
CriterionType: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur'],
},
],
FilePath: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur'],
},
],
},
fileList: []
fileList: [],
}
},
watch: {
reviewerId() {
if (this.reviewerId) {
this.doctorId = this.reviewerId
}
},
},
mounted() {
this.initSowList()
},
methods: {
handleDownload(code) {
this.loading = true
DownloadCommonDoc(code).then(data => {
this.loading = false
}).catch(() => { this.loading = false })
DownloadCommonDoc(code)
.then((data) => {
this.loading = false
})
.catch(() => {
this.loading = false
})
},
handleEditCol(row, fileType, title) {
this.model_cfg.visible = true
@ -206,7 +401,7 @@ export default {
handleRemoveFile3(row) {
this.$confirm('确定删除?').then(() => {
deleteDoctorCriterionFile({
Id: row.Id
Id: row.Id,
}).then(() => {
this.initSowList()
this.$message.success('删除成功')
@ -238,21 +433,34 @@ export default {
this.btnLoading = true
var fileName = param.file.name
let file = await this.fileToBlob(param.file)
let res = await this.OSSclient.put(`/SystemData/reviewer/${this.form.FileType === 0 ? '既往阅片情况声明' : '入项资格确认书'}/${this.doctorId}/${fileName}`, file)
let res = await this.OSSclient.put(
`/SystemData/reviewer/${
this.form.FileType === 0 ? '既往阅片情况声明' : '入项资格确认书'
}/${this.doctorId}/${fileName}`,
file
)
this.form.FileName = param.file.name
this.form.FilePath = this.$getObjectName(res.url)
this.fileList[0] = { name: this.$getObjectName(res.url), path: this.$getObjectName(res.url), fullPath: this.$getObjectName(res.url), url: res.url }
this.fileList[0] = {
name: this.$getObjectName(res.url),
path: this.$getObjectName(res.url),
fullPath: this.$getObjectName(res.url),
url: res.url,
}
this.btnLoading = false
},
handleCancle() {
this.model_cfg.visible = false
},
handleSave() {
this.$refs['DictionaryTypeConfigForm'].validate(valid => {
this.$refs['DictionaryTypeConfigForm'].validate((valid) => {
if (!valid) return
this.form.DoctorId = this.doctorId
this.form.CriterionName = this.$fd('CriterionType', this.form.CriterionType)
addDoctorCriterionFile(this.form).then(res => {
this.form.CriterionName = this.$fd(
'CriterionType',
this.form.CriterionType
)
addDoctorCriterionFile(this.form).then((res) => {
this.$message.success('添加成功')
this.initSowList()
this.handleCancle()
@ -267,7 +475,7 @@ export default {
FileName: null,
FilePath: null,
DoctorId: null,
CriterionType: null
CriterionType: null,
}
this.handleRemoveFile2()
this.form.FileType = fileType
@ -277,14 +485,14 @@ export default {
if (!this.doctorId) return
getDoctorCriterionFile({
fileType: 0,
DoctorId: this.doctorId
}).then(res => {
DoctorId: this.doctorId,
}).then((res) => {
this.sowList = res.Result
})
getDoctorCriterionFile({
fileType: 1,
DoctorId: this.doctorId
}).then(res => {
DoctorId: this.doctorId,
}).then((res) => {
this.ackSowList = res.Result
})
},
@ -298,12 +506,12 @@ export default {
},
getFileList(fileList) {
this.agreementList = fileList
}
}
},
},
}
</script>
<style lang="scss" scoped>
.resumes-container{
.resumes-container {
p {
float: left;
font-size: 13px;
@ -314,5 +522,4 @@ export default {
float: left;
}
}
</style>

View File

@ -15,31 +15,62 @@
>
<el-row>
<el-col :span="12">
<el-form-item v-if="basicInfo.ReviewerCode" :label="$t('system:reviewer:label:Id')">
<el-input v-model="basicInfo.ReviewerCode" disabled size="small" />
<el-form-item
v-if="basicInfo.ReviewerCode"
:label="$t('system:reviewer:label:Id')"
>
<el-input
v-model="basicInfo.ReviewerCode"
disabled
size="small"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:LastName')" prop="LastName">
<el-input v-model="basicInfo.LastName" :disabled="$route.query.ReviewStatus === '1'" size="small" />
<el-form-item
:label="$t('system:reviewer:label:LastName')"
prop="LastName"
>
<el-input
v-model="basicInfo.LastName"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:FirstName')" prop="FirstName">
<el-input v-model="basicInfo.FirstName" :disabled="$route.query.ReviewStatus === '1'" size="small" />
<el-form-item
:label="$t('system:reviewer:label:FirstName')"
prop="FirstName"
>
<el-input
v-model="basicInfo.FirstName"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:NameCN')" prop="ChineseName">
<el-input v-model="basicInfo.ChineseName" :disabled="$route.query.ReviewStatus === '1'" size="small" />
<el-form-item
:label="$t('system:reviewer:label:NameCN')"
prop="ChineseName"
>
<el-input
v-model="basicInfo.ChineseName"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:Gender')" prop="Sex">
<el-form-item
:label="$t('system:reviewer:label:Gender')"
prop="Sex"
>
<el-select
v-model="basicInfo.Sex"
prop="Sex"
@ -59,12 +90,22 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:Phone')" prop="Phone">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="basicInfo.Phone" size="small" />
<el-form-item
:label="$t('system:reviewer:label:Phone')"
prop="Phone"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="basicInfo.Phone"
size="small"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:Title')" prop="TitleIds">
<el-form-item
:label="$t('system:reviewer:label:Title')"
prop="TitleIds"
>
<el-select
:disabled="$route.query.ReviewStatus === '1'"
v-model="basicInfo.TitleIds[0]"
@ -89,15 +130,22 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:Email')" prop="EMail">
<el-input v-model="basicInfo.EMail" :disabled="$route.query.ReviewStatus === '1'" size="small" />
<el-form-item
:label="$t('system:reviewer:label:Email')"
prop="EMail"
>
<el-input
v-model="basicInfo.EMail"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="WeChat: " prop="WeChat">-->
<!-- <el-input v-model="basicInfo.WeChat" :disabled="$route.query.ReviewStatus === '1'" size="small" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="WeChat: " prop="WeChat">-->
<!-- <el-input v-model="basicInfo.WeChat" :disabled="$route.query.ReviewStatus === '1'" size="small" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<!-- <el-form-item label="Payment Type: " prop="Nation">
<el-radio-group v-model="basicInfo.Nation">
@ -106,7 +154,10 @@
</el-radio-group>
</el-form-item> -->
<el-form-item :label="$t('system:reviewer:label:Country')" prop="Nation">
<el-form-item
:label="$t('system:reviewer:label:Country')"
prop="Nation"
>
<el-select
:disabled="$route.query.ReviewStatus === '1'"
v-model="basicInfo.Nation"
@ -114,13 +165,18 @@
clearable
class="mr"
>
<el-option v-for="item of $d.AttendedReviewerType" :value="item.value" :label="item.label" :key="item.id"/>
<el-option
v-for="item of $d.AttendedReviewerType"
:value="item.value"
:label="item.label"
:key="item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- </el-row>-->
<el-row>
<el-form-item style="margin-left: 120px">
<el-button
@ -129,7 +185,9 @@
:loading="isDisabled"
size="small"
@click="handleSave"
> {{ $t('common:button:save') }}</el-button>
>
{{ $t('common:button:save') }}</el-button
>
</el-form-item>
</el-row>
</el-form>
@ -142,6 +200,15 @@ import { getBasicInfo, addOrUpdateDoctorBasicInfo } from '@/api/reviewers'
import { changeURLStatic } from '@/utils/history.js'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
export default {
props: {
reviewerId: {
type: String,
},
isSystem: {
type: Boolean,
default: true,
},
},
data() {
return {
basicInfo: {
@ -156,58 +223,58 @@ export default {
EMail: '',
WeChat: '',
Introduction: '',
Nation: 0
Nation: 0,
},
rules: {
FirstName: [
{
required: true,
message: 'Please enter FirstName',
trigger: 'blur'
trigger: 'blur',
},
{ max: 50, message: 'The maximum length is 50' }
{ 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' }
{ 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' }
{ required: true, message: 'Please select gender', trigger: 'blur' },
],
TitleIds: [
{ required: true, message: 'Please select Title', trigger: 'blur' }
{ required: true, message: 'Please select Title', trigger: 'blur' },
],
Phone: [
{
required: true,
message: 'Please enter phone number',
trigger: 'blur'
trigger: 'blur',
},
{ max: 20, min: 7, message: 'The length is 7 to 20' }
{ max: 20, min: 7, message: 'The length is 7 to 20' },
],
EMail: [
{
required: true,
message: 'Please input the email address',
trigger: 'blur'
trigger: 'blur',
},
{
type: 'email',
message: 'Please input the correct email address',
trigger: 'blur,change'
trigger: 'blur,change',
},
{ max: 50, message: 'The maximum length is 50' }
{ max: 50, message: 'The maximum length is 50' },
],
WeChat: [{ max: 50, message: 'The maximum length is 50' }]
WeChat: [{ max: 50, message: 'The maximum length is 50' }],
},
isDisabled: false,
loading: false,
genderOptions: [
{ label: 'Male', value: 0 },
{ label: 'Female', value: 1 }
{ label: 'Female', value: 1 },
],
dictionaryList: {}
dictionaryList: {},
}
},
mounted() {
@ -227,7 +294,12 @@ export default {
this.$message.success('Saved successfully')
if (!this.id) {
this.basicInfo.Id = res.Result.Id
changeURLStatic('Id', res.Result.Id)
if (this.isSystem) {
changeURLStatic('Id', res.Result.Id)
}
if (!this.reviewerId) {
this.$emit('update:reviewerId', res.Result.Id)
}
this.basicInfo.ReviewerCode = res.Result.ReviewerCode
}
})
@ -241,27 +313,29 @@ export default {
async initForm() {
await this.getDicData()
const id = this.$route.query.Id
const id = this.$route.query.Id || this.reviewerId
if (id) {
this.loading = true
getBasicInfo(id).then((res) => {
// eslint-disable-next-line no-unused-vars
const { TitleList, ...param } = res.Result
this.basicInfo = param
this.loading = false
}).catch(() => {
this.loading = false
})
getBasicInfo(id)
.then((res) => {
// eslint-disable-next-line no-unused-vars
const { TitleList, ...param } = res.Result
this.basicInfo = param
this.loading = false
})
.catch(() => {
this.loading = false
})
}
},
getDicData() {
getBasicDataSelects(['Title']).then(res => {
this.dictionaryList = { ...res.Result }
}).catch(() => {
})
}
}
getBasicDataSelects(['Title'])
.then((res) => {
this.dictionaryList = { ...res.Result }
})
.catch(() => {})
},
},
}
</script>
<style lang="scss" scoped>

View File

@ -2,73 +2,90 @@
<div class="credentials-container">
<div class="clearfix">
<el-card class="e-card">
<p class="title">{{$t('system:Credentials:title:Diploma of the highest medical degree')}}
<p class="title">
{{
$t('system:Credentials:title:Diploma of the highest medical degree')
}}
</p>
<upload-file :doctor-id="doctorId" type="Diploma of the highest medical degree" />
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_DiplomaOfTheHighestMedicalDegree_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
<upload-file
:doctor-id="doctorId"
type="Diploma of the highest medical degree"
/>
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_DiplomaOfTheHighestMedicalDegree_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
</el-card>
<el-card class="e-card">
<p class="title">{{$t('system:Credentials:title:Medical Qualification Certificate')}}
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MedicalQualificationCertificate_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
<p class="title">
{{ $t('system:Credentials:title:Medical Qualification Certificate') }}
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MedicalQualificationCertificate_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
</p>
<upload-file :doctor-id="doctorId" type="Medical Qualification Certificate" />
<upload-file
:doctor-id="doctorId"
type="Medical Qualification Certificate"
/>
</el-card>
<el-card class="e-card">
<p class="title">{{$t('system:Credentials:title:Practice License')}}
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_PracticeLicense_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
<p class="title">
{{ $t('system:Credentials:title:Practice License') }}
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_PracticeLicense_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
</p>
<upload-file :doctor-id="doctorId" type="Practice License" />
</el-card>
</div>
<h6 style="line-height:30px;font-size:13px;">{{$t('system:Credentials:title:Modality Certificate')}}</h6>
<h6 style="line-height: 30px; font-size: 13px">
{{ $t('system:Credentials:title:Modality Certificate') }}
</h6>
<div class="clearfix">
<el-card class="e-card">
<p class="title">CT
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_CT_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
<p class="title">
CT
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_CT_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
</p>
<upload-file :doctor-id="doctorId" type="Modality Certificate(CT)" />
</el-card>
<el-card class="e-card">
<p class="title">MRI
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MRI_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
<p class="title">
MRI
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MRI_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
</p>
<upload-file :doctor-id="doctorId" type="Modality Certificate(MRI)" />
</el-card>
<el-card class="e-card">
<p class="title">NM
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_NM_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
<p class="title">
NM
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_NM_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
</p>
<upload-file :doctor-id="doctorId" type="Modality Certificate(NM)" />
</el-card>
<el-card class="e-card">
<p class="title">US
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_US_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
<p class="title">
US
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_US_Template')">-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
</p>
<upload-file :doctor-id="doctorId" type="Modality Certificate(US)" />
</el-card>
@ -80,41 +97,56 @@ import UploadFile from '@/components/UploadFile'
import { DownloadCommonDoc } from '@/api/dictionary'
export default {
components: {
UploadFile
UploadFile,
},
props: {
reviewerId: {
type: String,
},
},
data() {
return {
doctorId: this.$route.query.Id
doctorId: this.$route.query.Id || this.reviewerId,
}
},
watch: {
reviewerId() {
if (this.reviewerId) {
this.doctorId = this.reviewerId
}
},
},
methods: {
handleDownload(code) {
this.loading = true
DownloadCommonDoc(code).then(data => {
this.loading = false
}).catch(() => { this.loading = false })
}
}
DownloadCommonDoc(code)
.then((data) => {
this.loading = false
})
.catch(() => {
this.loading = false
})
},
},
}
</script>
<style lang="scss">
.credentials-container{
.credentials-container {
.e-card {
width: 32.5%;
height: 180px;
font-size: 12px;
position: relative;
float: left;
margin: 0px 10px 5px 0px;
.title{
font-size: 13px;
margin-bottom: 15px;
font-weight: bold;
width: 32.5%;
height: 180px;
font-size: 12px;
position: relative;
float: left;
margin: 0px 10px 5px 0px;
.title {
font-size: 13px;
margin-bottom: 15px;
font-weight: bold;
}
}
h6{
margin:0;
h6 {
margin: 0;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<template>
<div class="form-container">
<el-card class="box-card">
<div style="width:80%;">
<div style="width: 80%">
<el-form
ref="employmentForm"
v-loading="loading"
@ -10,20 +10,22 @@
class="demo-ruleForm"
label-width="150px"
>
<el-row>
<el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:Hospital')" prop="HospitalId">
<el-form-item
:label="$t('system:reviewer:label:Hospital')"
prop="HospitalId"
>
<el-select
v-model="employmentForm.HospitalId"
placeholder="select"
:disabled="$route.query.ReviewStatus === '1'"
style="width:100%;"
style="width: 100%"
size="small"
@change="handleHospitalChange"
>
<el-option
v-for="(item,index) in hospitalList"
v-for="(item, index) in hospitalList"
:key="index"
:label="item.HospitalName"
:value="item.Id"
@ -39,7 +41,9 @@
<el-row>
<el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:AffiliatedUniversity')">
<el-form-item
:label="$t('system:reviewer:label:AffiliatedUniversity')"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="UniversityAffiliated"
@ -53,33 +57,48 @@
<el-row>
<el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:City')">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="City" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="City"
size="small"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:State/Province')">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="Province" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="Province"
size="small"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:Country')">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="Country" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="Country"
size="small"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:Department')" prop="DepartmentId">
<el-form-item
:label="$t('system:reviewer:label:Department')"
prop="DepartmentId"
>
<el-select
v-model="employmentForm.DepartmentId"
placeholder="select"
:disabled="$route.query.ReviewStatus === '1'"
style="width:100%;"
style="width: 100%"
size="small"
>
<!-- <el-option
@ -99,7 +118,11 @@
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item v-if="employmentForm.DepartmentId===otherId" class="other-item" prop="DepartmentOther">
<el-form-item
v-if="employmentForm.DepartmentId === otherId"
class="other-item"
prop="DepartmentOther"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.DepartmentOther"
@ -109,7 +132,11 @@
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item v-if="employmentForm.DepartmentId===otherId" class="other-item" prop="DepartmentOtherCN">
<el-form-item
v-if="employmentForm.DepartmentId === otherId"
class="other-item"
prop="DepartmentOtherCN"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.DepartmentOtherCN"
@ -122,13 +149,16 @@
<el-row>
<el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:Rank')" prop="RankId">
<el-form-item
:label="$t('system:reviewer:label:Rank')"
prop="RankId"
>
<el-select
:disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.RankId"
placeholder="select"
@change="RankChange"
style="width:100%;"
style="width: 100%"
size="small"
>
<!-- <el-option
@ -143,12 +173,19 @@
:label="item.label"
:value="item.id"
/>
<!-- <el-option label="Other" :value="otherId" />-->
<!-- <el-option label="Other" :value="otherId" />-->
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item v-if="$fd('Rank', employmentForm.RankId, 'id') === '其它' || $fd('Rank', employmentForm.RankId, 'id') === 'Other'" class="other-item" prop="RankOther">
<el-form-item
v-if="
$fd('Rank', employmentForm.RankId, 'id') === '其它' ||
$fd('Rank', employmentForm.RankId, 'id') === 'Other'
"
class="other-item"
prop="RankOther"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.RankOther"
@ -158,7 +195,14 @@
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item v-if="$fd('Rank', employmentForm.RankId, 'id') === '其它' || $fd('Rank', employmentForm.RankId, 'id') === 'Other'" class="other-item" prop="RankOtherCN">
<el-form-item
v-if="
$fd('Rank', employmentForm.RankId, 'id') === '其它' ||
$fd('Rank', employmentForm.RankId, 'id') === 'Other'
"
class="other-item"
prop="RankOtherCN"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.RankOtherCN"
@ -169,98 +213,104 @@
</el-col>
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="14">-->
<!-- <el-form-item label="Physician: " prop="PhysicianId" >-->
<!-- <el-select-->
<!-- v-model="employmentForm.PhysicianId"-->
<!-- placeholder="select"-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- @change="PhysicianChange"-->
<!-- style="width:100%;"-->
<!-- size="small"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item of $d.PhysicianOriginal"-->
<!-- :key="item.id"-->
<!-- :label="item.raw.Value"-->
<!-- :value="item.id"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="$fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === '其它' || $fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === 'Other'" class="other-item" prop="Physician">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.Physician"-->
<!-- placeholder="Please specify"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="$fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === '其它' || $fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === 'Other'" class="other-item" prop="PhysicianCN">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PhysicianCN"-->
<!-- placeholder="请用中文注明"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="14">-->
<!-- <el-form-item label="Position: " prop="PositionId">-->
<!-- <el-select-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PositionId"-->
<!-- placeholder="select"-->
<!-- style="width:100%;"-->
<!-- size="small"-->
<!-- >-->
<!-- &lt;!&ndash; <el-option-->
<!-- v-for="(key,value) of dictionaryList.Position"-->
<!-- :key="key"-->
<!-- :label="key"-->
<!-- :value="value"-->
<!-- /> &ndash;&gt;-->
<!-- <el-option-->
<!-- v-for="item of dictionaryList.Position"-->
<!-- :key="item.Id"-->
<!-- :label="item.Value"-->
<!-- :value="item.Id"-->
<!-- />-->
<!-- <el-option label="Other" :value="otherId" />-->
<!-- <el-option label="None" value="f30a074b-2b47-4a92-97ec-e15086d37883" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="employmentForm.PositionId===otherId" class="other-item" prop="PositionOther">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PositionOther"-->
<!-- placeholder="Please specify"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="employmentForm.PositionId===otherId" class="other-item" prop="PositionOtherCN">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PositionOtherCN"-->
<!-- placeholder="请用中文注明"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="14">-->
<!-- <el-form-item label="Physician: " prop="PhysicianId" >-->
<!-- <el-select-->
<!-- v-model="employmentForm.PhysicianId"-->
<!-- placeholder="select"-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- @change="PhysicianChange"-->
<!-- style="width:100%;"-->
<!-- size="small"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item of $d.PhysicianOriginal"-->
<!-- :key="item.id"-->
<!-- :label="item.raw.Value"-->
<!-- :value="item.id"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="$fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === '其它' || $fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === 'Other'" class="other-item" prop="Physician">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.Physician"-->
<!-- placeholder="Please specify"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="$fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === '其它' || $fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === 'Other'" class="other-item" prop="PhysicianCN">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PhysicianCN"-->
<!-- placeholder="请用中文注明"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="14">-->
<!-- <el-form-item label="Position: " prop="PositionId">-->
<!-- <el-select-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PositionId"-->
<!-- placeholder="select"-->
<!-- style="width:100%;"-->
<!-- size="small"-->
<!-- >-->
<!-- &lt;!&ndash; <el-option-->
<!-- v-for="(key,value) of dictionaryList.Position"-->
<!-- :key="key"-->
<!-- :label="key"-->
<!-- :value="value"-->
<!-- /> &ndash;&gt;-->
<!-- <el-option-->
<!-- v-for="item of dictionaryList.Position"-->
<!-- :key="item.Id"-->
<!-- :label="item.Value"-->
<!-- :value="item.Id"-->
<!-- />-->
<!-- <el-option label="Other" :value="otherId" />-->
<!-- <el-option label="None" value="f30a074b-2b47-4a92-97ec-e15086d37883" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="employmentForm.PositionId===otherId" class="other-item" prop="PositionOther">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PositionOther"-->
<!-- placeholder="Please specify"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="employmentForm.PositionId===otherId" class="other-item" prop="PositionOtherCN">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PositionOtherCN"-->
<!-- placeholder="请用中文注明"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-form-item>
<el-button type="primary" :disabled="isDisabled || $route.query.ReviewStatus === '1'" size="small" @click="handleSave">{{ $t('common:button:save') }}</el-button>
<el-button
type="primary"
:disabled="isDisabled || $route.query.ReviewStatus === '1'"
size="small"
@click="handleSave"
>{{ $t('common:button:save') }}</el-button
>
</el-form-item>
</el-form>
</div>
@ -274,6 +324,11 @@ import store from '@/store'
import { mapGetters } from 'vuex'
export default {
name: 'Employment',
props: {
reviewerId: {
type: String,
},
},
data() {
const RankIndication = (rule, value, callback) => {
if (value === '其它' || value === 'Other') {
@ -293,7 +348,7 @@ export default {
}
return {
employmentForm: {
Id: this.$route.query.Id,
Id: this.$route.query.Id || this.reviewerId,
DepartmentId: '',
DepartmentOther: '',
DepartmentOtherCN: '',
@ -307,46 +362,92 @@ export default {
PhysicianId: '',
Physician: '',
PhysicianCN: '',
PhysicianOriginal: null
PhysicianOriginal: null,
},
UniversityAffiliated: '',
City: '',
Province: '',
Country: '',
employmentRules: {
DepartmentId: [{ required: true, message: 'Please select department', 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' }
{ 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' }],
PhysicianId: [{ required: true, message: 'Please select Physician', trigger: 'blur' }],
Physician: [{ required: true, message: 'Please select Physician', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
PhysicianCN: [{ required: true, message: 'Please select Physician', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
PositionId: [{ required: true, message: 'Please select position', trigger: 'blur' }],
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' },
],
PhysicianId: [
{
required: true,
message: 'Please select Physician',
trigger: 'blur',
},
],
Physician: [
{
required: true,
message: 'Please select Physician',
trigger: 'blur',
},
{ max: 50, message: 'The maximum length is 50' },
],
PhysicianCN: [
{
required: true,
message: 'Please select Physician',
trigger: 'blur',
},
{ max: 50, message: 'The maximum length is 50' },
],
PositionId: [
{
required: true,
message: 'Please select position',
trigger: 'blur',
},
],
PositionOther: [{ max: 50, message: 'The maximum length is 50' }],
PositionOtherCN: [{ max: 50, message: 'The maximum length is 50' }],
HospitalId: [{ required: true, message: 'Please select hospital', trigger: 'blur' }]
HospitalId: [
{
required: true,
message: 'Please select hospital',
trigger: 'blur',
},
],
},
isDisabled: false,
selectId: '00000000-0000-0000-0000-000000000000',
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
loading: false,
dictionaryList: {}
dictionaryList: {},
}
},
computed: {
...mapGetters(['hospitalList'])
...mapGetters(['hospitalList']),
},
mounted() {
this.initEmployment()
},
methods: {
RankChange(val) {
var o = this.$d.Rank.find(v => {
var o = this.$d.Rank.find((v) => {
return v.id === val
})
if (o.label === '其它' || o.label === 'Other') {
@ -358,7 +459,7 @@ export default {
}
},
PhysicianChange(val) {
var o = this.$d.PhysicianOriginal.find(v => {
var o = this.$d.PhysicianOriginal.find((v) => {
return v.id === val
})
if (o.label === '其它' || o.label === 'Other') {
@ -370,7 +471,7 @@ export default {
}
},
handleSave() {
this.$refs.employmentForm.validate(valid => {
this.$refs.employmentForm.validate((valid) => {
if (valid) {
this.loading = true
this.isDisabled = true
@ -378,62 +479,103 @@ export default {
// var o = this.$d.PhysicianOriginal.find(v => {
// return v.id === this.employmentForm.PhysicianId
// })
param.Id = this.$route.query.Id
param.Id = this.$route.query.Id || this.reviewerId
param.DepartmentId = this.employmentForm.DepartmentId
param.DepartmentOther = this.employmentForm.DepartmentId === this.otherId ? this.employmentForm.DepartmentOther : ''
param.DepartmentOtherCN = this.employmentForm.DepartmentId === this.otherId ? this.employmentForm.DepartmentOtherCN : ''
param.DepartmentOther =
this.employmentForm.DepartmentId === this.otherId
? this.employmentForm.DepartmentOther
: ''
param.DepartmentOtherCN =
this.employmentForm.DepartmentId === this.otherId
? this.employmentForm.DepartmentOtherCN
: ''
param.RankId = this.employmentForm.RankId
param.RankOther = this.employmentForm.RankId === this.otherId ? this.employmentForm.RankOther : ''
param.RankOtherCN = this.employmentForm.RankId === this.otherId ? this.employmentForm.RankOtherCN : ''
param.RankOther =
this.employmentForm.RankId === this.otherId
? this.employmentForm.RankOther
: ''
param.RankOtherCN =
this.employmentForm.RankId === this.otherId
? this.employmentForm.RankOtherCN
: ''
// param.PhysicianId = this.employmentForm.PhysicianId
// param.Physician = o.label !== '' && o.label !== 'Other' ? o.raw.Value : this.employmentForm.Physician
// param.PhysicianCN = o.label !== '' && o.label !== 'Other' ? o.raw.ValueCN : this.employmentForm.PhysicianCN
param.PositionId = this.employmentForm.PositionId
param.PositionOther = this.employmentForm.PositionId === this.otherId ? this.employmentForm.PositionOther : ''
param.PositionOtherCN = this.employmentForm.PositionId === this.otherId ? this.employmentForm.PositionOtherCN : ''
param.PositionOther =
this.employmentForm.PositionId === this.otherId
? this.employmentForm.PositionOther
: ''
param.PositionOtherCN =
this.employmentForm.PositionId === this.otherId
? this.employmentForm.PositionOtherCN
: ''
param.HospitalId = this.employmentForm.HospitalId
updateEmploymentInfo(param).then(res => {
this.isDisabled = false
this.loading = false
this.$message.success('Saved successfully')
if (!this.id) {
this.employmentForm.Id = res.Result
}
}).catch(() => {
this.isDisabled = false
this.loading = false
})
updateEmploymentInfo(param)
.then((res) => {
this.isDisabled = false
this.loading = false
this.$message.success('Saved successfully')
if (!this.id) {
this.employmentForm.Id = res.Result
}
})
.catch(() => {
this.isDisabled = false
this.loading = false
})
}
})
},
initForm() {
const id = this.$route.query.Id
const id = this.$route.query.Id || this.reviewerId
if (id) {
this.loading = true
getEmploymentInfo(id).then(res => {
const { PhysicianId, Physician, PhysicianCN, DepartmentId, DepartmentOther, DepartmentOtherCN, RankId, RankOther, RankOtherCN, PositionId, PositionOther, PositionOtherCN, HospitalId } = res.Result
this.employmentForm.Id = id
this.employmentForm.DepartmentId = DepartmentId === this.selectId ? '' : DepartmentId
this.employmentForm.DepartmentOther = DepartmentOther
this.employmentForm.DepartmentOtherCN = DepartmentOtherCN
this.employmentForm.RankId = RankId === this.selectId ? '' : RankId
this.employmentForm.RankOther = RankOther
this.employmentForm.RankOtherCN = RankOtherCN
this.employmentForm.PositionId = PositionId === this.selectId ? '' : PositionId
this.employmentForm.PositionOther = PositionOther
this.employmentForm.PhysicianId = PhysicianId
this.employmentForm.Physician = Physician
this.employmentForm.PhysicianCN = PhysicianCN
this.employmentForm.PositionOtherCN = PositionOtherCN
this.employmentForm.HospitalId = HospitalId === this.selectId ? '' : HospitalId
this.handleHospitalChange(this.employmentForm.HospitalId)
this.loading = false
}).catch(() => { this.loading = false })
getEmploymentInfo(id)
.then((res) => {
const {
PhysicianId,
Physician,
PhysicianCN,
DepartmentId,
DepartmentOther,
DepartmentOtherCN,
RankId,
RankOther,
RankOtherCN,
PositionId,
PositionOther,
PositionOtherCN,
HospitalId,
} = res.Result
this.employmentForm.Id = id
this.employmentForm.DepartmentId =
DepartmentId === this.selectId ? '' : DepartmentId
this.employmentForm.DepartmentOther = DepartmentOther
this.employmentForm.DepartmentOtherCN = DepartmentOtherCN
this.employmentForm.RankId = RankId === this.selectId ? '' : RankId
this.employmentForm.RankOther = RankOther
this.employmentForm.RankOtherCN = RankOtherCN
this.employmentForm.PositionId =
PositionId === this.selectId ? '' : PositionId
this.employmentForm.PositionOther = PositionOther
this.employmentForm.PhysicianId = PhysicianId
this.employmentForm.Physician = Physician
this.employmentForm.PhysicianCN = PhysicianCN
this.employmentForm.PositionOtherCN = PositionOtherCN
this.employmentForm.HospitalId =
HospitalId === this.selectId ? '' : HospitalId
this.handleHospitalChange(this.employmentForm.HospitalId)
this.loading = false
})
.catch(() => {
this.loading = false
})
}
},
handleHospitalChange(value) {
const item = this.hospitalList.filter(item => item.Id === value)
const item = this.hospitalList.filter((item) => item.Id === value)
if (item.length) {
this.UniversityAffiliated = item[0].UniversityAffiliated
this.City = item[0].City
@ -447,15 +589,15 @@ export default {
this.initForm()
},
getDicData() {
getBasicDataSelects(['Department', 'Rank', 'Position']).then(res => {
getBasicDataSelects(['Department', 'Rank', 'Position']).then((res) => {
this.dictionaryList = { ...res.Result }
})
}
}
},
},
}
</script>
<style lang="scss">
.other-item .el-form-item__content{
.other-item .el-form-item__content {
margin-left: 80px !important;
}
</style>

View File

@ -1,30 +1,71 @@
<template>
<div class="form-container" style="width:80%;">
<el-form ref="researchForm" v-loading="loading" label-width="140px" :model="researchForm" size="small">
<div class="form-container" style="width: 80%">
<el-form
ref="researchForm"
v-loading="loading"
label-width="140px"
:model="researchForm"
size="small"
>
<el-form-item :label="$t('system:reviewer:label:Field of Research')">
<el-row type="flex" justify="space-between">
<el-col :span="11">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.Research" type="textarea" rows="5" placeholder="Please specify in English" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.Research"
type="textarea"
rows="5"
placeholder="Please specify in English"
size="small"
/>
</el-col>
<el-col :span="11">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.ResearchCN" type="textarea" rows="5" placeholder="请用中文注明" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.ResearchCN"
type="textarea"
rows="5"
placeholder="请用中文注明"
size="small"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('system:reviewer:label:Grants')">
<el-row type="flex" justify="space-between">
<el-col :span="11">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.Grants" type="textarea" rows="5" placeholder="Please specify in English" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.Grants"
type="textarea"
rows="5"
placeholder="Please specify in English"
size="small"
/>
</el-col>
<el-col :span="11">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.GrantsCN" type="textarea" rows="5" placeholder="请用中文注明" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.GrantsCN"
type="textarea"
rows="5"
placeholder="请用中文注明"
size="small"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('system:reviewer:label:Publications')">
<el-row type="flex" justify="space-between">
<el-col :span="11">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.Publications" type="textarea" rows="5" placeholder="Please specify in English" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.Publications"
type="textarea"
rows="5"
placeholder="Please specify in English"
size="small"
/>
</el-col>
<el-col :span="11">
<!-- <el-input v-model="researchForm.PublicationsCN" type="textarea" rows="5" placeholder="请用中文注明" size="small" /> -->
@ -34,22 +75,45 @@
<el-form-item :label="$t('system:reviewer:label:Awards & Honors')">
<el-row type="flex" justify="space-between">
<el-col :span="11">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.AwardsHonors" type="textarea" rows="5" placeholder="Please specify in English" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.AwardsHonors"
type="textarea"
rows="5"
placeholder="Please specify in English"
size="small"
/>
</el-col>
<el-col :span="11">
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.AwardsHonorsCN" type="textarea" rows="5" placeholder="请用中文注明" size="small" />
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.AwardsHonorsCN"
type="textarea"
rows="5"
placeholder="请用中文注明"
size="small"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item>
<el-button :disabled="$route.query.ReviewStatus === '1'" type="primary" :loading="isDisabled" @click="handleSave">
{{ $t('common:button:save') }}</el-button>
<el-button
:disabled="$route.query.ReviewStatus === '1'"
type="primary"
:loading="isDisabled"
@click="handleSave"
>
{{ $t('common:button:save') }}</el-button
>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { getResearchPublication, addOrUpdateResearchPublication } from '@/api/reviewers'
import {
getResearchPublication,
addOrUpdateResearchPublication,
} from '@/api/reviewers'
export default {
name: 'ResearchPublication',
props: {
@ -57,8 +121,11 @@ export default {
type: String,
default() {
return ''
}
}
},
},
reviewerId: {
type: String,
},
},
data() {
return {
@ -69,10 +136,10 @@ export default {
GrantsCN: '',
Publications: '',
AwardsHonors: '',
AwardsHonorsCN: ''
AwardsHonorsCN: '',
},
loading: false,
isDisabled: false
isDisabled: false,
}
},
mounted() {
@ -80,9 +147,9 @@ export default {
},
methods: {
initForm() {
const id = this.$route.query.Id
const id = this.$route.query.Id || this.reviewerId
if (id) {
getResearchPublication(id).then(res => {
getResearchPublication(id).then((res) => {
if (res.Result) {
this.researchForm.Research = res.Result.Research
this.researchForm.ResearchCN = res.Result.ResearchCN
@ -99,19 +166,21 @@ export default {
handleSave() {
this.loading = true
this.isDisabled = true
this.researchForm.DoctorId = this.$route.query.Id
addOrUpdateResearchPublication(this.researchForm).then(res => {
this.loading = false
this.isDisabled = false
this.$message.success('Saved successfully')
if (!this.researchForm.Id) {
this.researchForm.Id = res.Result
}
}).catch(() => {
this.loading = false
this.isDisabled = false
})
}
}
this.researchForm.DoctorId = this.$route.query.Id || this.reviewerId
addOrUpdateResearchPublication(this.researchForm)
.then((res) => {
this.loading = false
this.isDisabled = false
this.$message.success('Saved successfully')
if (!this.researchForm.Id) {
this.researchForm.Id = res.Result
}
})
.catch(() => {
this.loading = false
this.isDisabled = false
})
},
},
}
</script>

View File

@ -7,14 +7,19 @@
<div class="uploadFile-container">
<el-upload
class="upload-demo"
:data="{language:2}"
:data="{ language: 2 }"
action
:show-file-list="false"
:http-request="handleUploadFile"
:file-list="resumeList"
accept=".doc,.docx"
>
<el-button size="small" type="primary" :disabled="isDisabled || $route.query.ReviewStatus === '1'">{{ $t('system:GcpCertificate:upload:Upload') }}</el-button>
<el-button
size="small"
type="primary"
:disabled="isDisabled || $route.query.ReviewStatus === '1'"
>{{ $t('system:GcpCertificate:upload:Upload') }}</el-button
>
</el-upload>
</div>
</div>
@ -24,15 +29,25 @@
<div class="resumeTbl">
<el-table :data="resumeListEN" size="small">
<el-table-column type="index" width="40" />
<el-table-column prop="FileName" :label="$t('system:Resumes:table:Resume')" width="180" show-overflow-tooltip />
<el-table-column prop="CreateTime" :label="$t('system:Resumes:table:Upload Time')" width="150" show-overflow-tooltip />
<el-table-column
prop="FileName"
:label="$t('system:Resumes:table:Resume')"
width="180"
show-overflow-tooltip
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Resumes:table:Upload Time')"
width="150"
show-overflow-tooltip
/>
<el-table-column
prop="IsOfficial"
:label="$t('system:Resumes:table:Official')"
width="100"
>
<template slot-scope="scope">
{{ scope.row.IsOfficial === true?'Yes':'No' }}
{{ scope.row.IsOfficial === true ? 'Yes' : 'No' }}
</template>
</el-table-column>
<el-table-column
@ -42,31 +57,44 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ scope.row.Language===1?'中文':'English' }}
{{ scope.row.Language === 1 ? '中文' : 'English' }}
<!-- <el-button size="small" type="text" @click="handleLanguageClick(scope.row)">{{ scope.row.Language===1?'CH':scope.row.Language===2?'EN':'Setting' }}</el-button> -->
</template>
</el-table-column>
<el-table-column :label="$t('common:action:action')" width="400">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handlePreview(scope.row)">{{ $t('common:button:download') }}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile(scope.row)">{{ $t('common:button:delete') }}</el-button>
<el-button
type="text"
size="small"
:disabled="scope.row.IsOfficial || $route.query.ReviewStatus === '1'"
@click="handlePreview(scope.row)"
>{{ $t('common:button:download') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="
scope.row.IsOfficial || $route.query.ReviewStatus === '1'
"
@click="handleSetOfiical(scope.row)"
>{{ $t('system:Resumes:button:Set as Official') }}</el-button>
>{{ $t('system:Resumes:button:Set as Official') }}</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<div class="resume-content" style="margin-top:10px;">
<div class="resume-content" style="margin-top: 10px">
<p>{{ $t('system:Resumes:title:ResumeCN') }}</p>
<div class="upload-content">
<div class="uploadFile-container">
<el-upload
:data="{language:1}"
:data="{ language: 1 }"
class="upload-demo"
action
:show-file-list="false"
@ -74,7 +102,12 @@
:file-list="resumeList"
accept=".doc, .docx"
>
<el-button size="small" type="primary" :disabled="isDisabled || $route.query.ReviewStatus === '1'">{{ $t('system:GcpCertificate:upload:Upload') }}</el-button>
<el-button
size="small"
type="primary"
:disabled="isDisabled || $route.query.ReviewStatus === '1'"
>{{ $t('system:GcpCertificate:upload:Upload') }}</el-button
>
</el-upload>
</div>
</div>
@ -83,15 +116,25 @@
<div class="resumeTbl">
<el-table :data="resumeListCN" size="small">
<el-table-column type="index" width="40" />
<el-table-column prop="FileName" :label="$t('system:Resumes:table:Resume')" width="180" show-overflow-tooltip />
<el-table-column prop="CreateTime" :label="$t('system:Resumes:table:Upload Time')" width="150" show-overflow-tooltip />
<el-table-column
prop="FileName"
:label="$t('system:Resumes:table:Resume')"
width="180"
show-overflow-tooltip
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Resumes:table:Upload Time')"
width="150"
show-overflow-tooltip
/>
<el-table-column
prop="IsOfficial"
:label="$t('system:Resumes:table:Official')"
width="100"
>
<template slot-scope="scope">
{{ scope.row.IsOfficial === true?'Yes':'No' }}
{{ scope.row.IsOfficial === true ? 'Yes' : 'No' }}
</template>
</el-table-column>
<el-table-column
@ -101,20 +144,34 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ scope.row.Language===1?'中文':'English' }}
{{ scope.row.Language === 1 ? '中文' : 'English' }}
<!-- <el-button size="small" type="text" @click="handleLanguageClick(scope.row)">{{ scope.row.Language===1?'CH':scope.row.Language===2?'EN':'Setting' }}</el-button> -->
</template>
</el-table-column>
<el-table-column :label="$t('common:action:action')" width="400">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handlePreview(scope.row)">{{ $t('common:button:download') }}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile(scope.row)">{{ $t('common:button:delete') }}</el-button>
<el-button
type="text"
size="small"
:disabled="scope.row.IsOfficial || $route.query.ReviewStatus === '1'"
@click="handlePreview(scope.row)"
>{{ $t('common:button:download') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="
scope.row.IsOfficial || $route.query.ReviewStatus === '1'
"
@click="handleSetOfiical(scope.row)"
>{{ $t('system:Resumes:button:Set as Official') }}</el-button>
>{{ $t('system:Resumes:button:Set as Official') }}</el-button
>
</template>
</el-table-column>
</el-table>
@ -126,31 +183,49 @@
size="small"
>
<span>Language: </span>
<el-radio-group :disabled="$route.query.ReviewStatus === '1'" v-model="language">
<el-radio-group
:disabled="$route.query.ReviewStatus === '1'"
v-model="language"
>
<el-radio :label="2">English</el-radio>
<el-radio :label="1">中文</el-radio>
</el-radio-group>
<span slot="footer" class="dialog-footer">
<el-button size="small" :disabled="$route.query.ReviewStatus === '1'" @click="dialogVisible = false">Cancel</el-button>
<el-button type="primary" :disabled="$route.query.ReviewStatus === '1'" size="small" @click="setResumeLanguage">Ok</el-button>
<el-button
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="dialogVisible = false"
>Cancel</el-button
>
<el-button
type="primary"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
@click="setResumeLanguage"
>Ok</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import { getAttachmentByType, uploadFile, saveAttachments, deleteAttachment, setOfficial, setLanguageForResume } from '@/api/attachment'
import {
getAttachmentByType,
uploadFile,
saveAttachments,
deleteAttachment,
setOfficial,
setLanguageForResume,
} from '@/api/attachment'
export default {
props: {
id: {
reviewerId: {
type: String,
default() {
return ''
}
}
},
},
data() {
return {
doctorId: this.$route.query.Id,
doctorId: this.$route.query.Id || this.reviewerId,
resumeList: [],
resumeListEN: [],
resumeListCN: [],
@ -159,25 +234,36 @@ export default {
currentRow: {},
repeat: false,
isDisabled: false,
loading: false
loading: false,
}
},
watch: {
reviewerId() {
if (this.reviewerId) {
this.doctorId = this.reviewerId
}
},
},
created() {
if(!this.doctorId) return
if (!this.doctorId) return
this.getResumeList()
},
methods: {
getResumeList() {
this.loading = true
getAttachmentByType(this.doctorId, 'Resume').then(res => {
if (res.IsSuccess) {
if (res.Result.length > 0) {
this.resumeList = res.Result
this.filterByLanguage()
getAttachmentByType(this.doctorId, 'Resume')
.then((res) => {
if (res.IsSuccess) {
if (res.Result.length > 0) {
this.resumeList = res.Result
this.filterByLanguage()
}
}
}
this.loading = false
}).catch(() => { this.loading = false })
this.loading = false
})
.catch(() => {
this.loading = false
})
},
handleUploadFile(param) {
this.repeat = false
@ -186,20 +272,22 @@ export default {
//
if (this.checkFileSuffix(param.file.name) > -1) {
//
const isRepeat = this.resumeList.some(item => item.FileName === param.file.name)
const isRepeat = this.resumeList.some(
(item) => item.FileName === param.file.name
)
if (isRepeat) {
this.$confirm('Override the existing resume?', {
type: 'warning',
distinguishCancelAndClose: true,
confirmButtonText: 'OK',
cancelButtonText: 'Cancel'
cancelButtonText: 'Cancel',
})
.then(() => {
//
this.repeat = true
this.uploadFile(param.file, param.data.language)
})
.catch(action => {})
.catch((action) => {})
} else {
this.uploadFile(param.file, param.data.language)
}
@ -212,7 +300,10 @@ export default {
var fileName = file.name
var files = this.resumeList
file = await this.fileToBlob(file)
let res = await this.OSSclient.put(`/SystemData/reviewer/Resume/${this.doctorId}/${fileName}`, file)
let res = await this.OSSclient.put(
`/SystemData/reviewer/Resume/${this.doctorId}/${fileName}`,
file
)
if (this.repeat) {
const index = files.findIndex((item, index) => {
return item.FileName === fileName
@ -228,26 +319,28 @@ export default {
Path: this.$getObjectName(res.url),
FullPath: this.$getObjectName(res.url),
FileName: fileName,
Language: language
Language: language,
}
files.push(fileData)
}
this.saveUploadFiles(files)
},
saveUploadFiles(files) {
saveAttachments(files).then(res => {
this.resumeList = res.Result
this.filterByLanguage()
this.isDisabled = false
this.$message.success('Uploaded successfully')
}).catch(() => {
this.isDisabled = false
})
saveAttachments(files)
.then((res) => {
this.resumeList = res.Result
this.filterByLanguage()
this.isDisabled = false
this.$message.success('Uploaded successfully')
})
.catch(() => {
this.isDisabled = false
})
},
filterByLanguage() {
this.resumeListEN = []
this.resumeListCN = []
this.resumeList.map(resume => {
this.resumeList.map((resume) => {
if (resume.Language === 2) {
this.resumeListEN.push(resume)
} else if (resume.Language === 1) {
@ -258,7 +351,9 @@ export default {
checkFileSuffix(fileName) {
const accept = '.doc, .docx'
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length).toLocaleLowerCase()
var suffix = fileName
.substring(index + 1, fileName.length)
.toLocaleLowerCase()
return accept.search(suffix)
},
handlePreview(row) {
@ -270,29 +365,31 @@ export default {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
distinguishCancelAndClose: true,
}).then(() => {
deleteAttachment(row.Id, row.Path)
.then(res => {
})
.then(() => {
deleteAttachment(row.Id, row.Path).then((res) => {
if (res.IsSuccess) {
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.$message({
message: this.$t('common:message:deletedSuccessfully'),
type: 'success'
type: 'success',
})
}
})
})
.catch(action => {})
})
.catch((action) => {})
},
handleSetOfiical(row) {
setOfficial(this.doctorId, row.Id, row.Language).then(res => {
setOfficial(this.doctorId, row.Id, row.Language).then((res) => {
if (res.IsSuccess) {
this.getResumeList()
this.$message({
message: 'Saved successfully!',
type: 'success'
type: 'success',
})
}
})
@ -303,23 +400,27 @@ export default {
this.currentRow = row
},
setResumeLanguage() {
setLanguageForResume(this.doctorId, this.currentRow.Id, this.language).then(res => {
setLanguageForResume(
this.doctorId,
this.currentRow.Id,
this.language
).then((res) => {
if (res.IsSuccess) {
this.dialogVisible = false
this.getResumeList()
this.$message({
message: 'Saved successfully!',
type: 'success'
type: 'success',
})
}
})
}
}
},
},
}
</script>
<style lang="scss">
.resumes-container{
.resume-content{
.resumes-container {
.resume-content {
p {
float: left;
font-size: 13px;
@ -341,11 +442,9 @@ export default {
.upload-content {
float: left;
}
}
.el-dialog__body{
.el-dialog__body {
padding: 10px 20px;
}
}
</style>

View File

@ -1,80 +1,144 @@
<template>
<div v-loading="loading" class="check-container form-container">
<el-form ref="checkForm" :model="checkForm" label-width="200px" size="small" :rules="rules">
<el-form
ref="checkForm"
:model="checkForm"
label-width="200px"
size="small"
:rules="rules"
>
<div class="title-wrapper">
<p>{{$t('system:Setting:title:Blinded information') }}</p>
<p>{{ $t('system:Setting:title:Blinded information') }}</p>
</div>
<div class="check-content">
<el-form-item :label="$t('system:Setting:label:Blind Name')" prop="BlindName">
<el-input
v-model="checkForm.BlindName"
style="width:300px"
/>
<el-form-item
:label="$t('system:Setting:label:Blind Name')"
prop="BlindName"
>
<el-input v-model="checkForm.BlindName" style="width: 300px" />
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Blind NameCN')" prop="BlindNameCN">
<el-input
v-model="checkForm.BlindNameCN"
style="width:300px"
/>
<el-form-item
:label="$t('system:Setting:label:Blind NameCN')"
prop="BlindNameCN"
>
<el-input v-model="checkForm.BlindNameCN" style="width: 300px" />
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Blind Publications')" prop="BlindPublications">
<el-input v-model="checkForm.BlindPublications" type="textarea" rows="8" style="width:60%;" size="small" />
<el-form-item
:label="$t('system:Setting:label:Blind Publications')"
prop="BlindPublications"
>
<el-input
v-model="checkForm.BlindPublications"
type="textarea"
rows="8"
style="width: 60%"
size="small"
/>
</el-form-item>
</div>
<div class="title-wrapper">
<p>{{$t('system:Setting:title:Blinded Setting') }}</p>
<p>{{ $t('system:Setting:title:Blinded Setting') }}</p>
</div>
<div class="check-content">
<el-form-item :label="$t('system:Setting:label:Information Confirmed?')">
<el-radio-group v-model="checkForm.ReviewStatus" @change="handleChange">
<el-radio :label="1">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
<el-radio :label="2">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Contractor Status?')">
<el-radio-group v-model="checkForm.CooperateStatus" @change="handleChange">
<el-radio :label="1">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
<el-radio :label="2">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label="$t('system:Setting:label:Information Confirmed?')"
>
<el-radio-group
v-model="checkForm.ReviewStatus"
@change="handleChange"
>
<el-radio :label="1">{{
$t('system:Setting:label:Information Confirmed?:Yes')
}}</el-radio>
<el-radio :label="2">{{
$t('system:Setting:label:Information Confirmed?:No')
}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Contractor Status?')">
<el-radio-group
v-model="checkForm.CooperateStatus"
@change="handleChange"
>
<el-radio :label="1">{{
$t('system:Setting:label:Information Confirmed?:Yes')
}}</el-radio>
<el-radio :label="2">{{
$t('system:Setting:label:Information Confirmed?:No')
}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Accepting New Trials?')">
<el-radio-group v-model="checkForm.AcceptingNewTrial" :disabled="radioDisabled">
<el-radio :label="true">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
<el-radio :label="false">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Accepting New Trials?')">
<el-radio-group
v-model="checkForm.AcceptingNewTrial"
:disabled="radioDisabled"
>
<el-radio :label="true">{{
$t('system:Setting:label:Information Confirmed?:Yes')
}}</el-radio>
<el-radio :label="false">{{
$t('system:Setting:label:Information Confirmed?:No')
}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Actively Reading?')">
<el-radio-group v-model="checkForm.ActivelyReading" :disabled="radioDisabled">
<el-radio :label="true">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
<el-radio :label="false">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Actively Reading?')">
<el-radio-group
v-model="checkForm.ActivelyReading"
:disabled="radioDisabled"
>
<el-radio :label="true">{{
$t('system:Setting:label:Information Confirmed?:Yes')
}}</el-radio>
<el-radio :label="false">{{
$t('system:Setting:label:Information Confirmed?:No')
}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Is Virtual?')">
<el-radio-group v-model="checkForm.IsVirtual" :disabled="radioDisabled">
<el-radio :label="true">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
<el-radio :label="false">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Is Virtual?')">
<el-radio-group
v-model="checkForm.IsVirtual"
:disabled="radioDisabled"
>
<el-radio :label="true">{{
$t('system:Setting:label:Information Confirmed?:Yes')
}}</el-radio>
<el-radio :label="false">{{
$t('system:Setting:label:Information Confirmed?:No')
}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:On Vacation:')">
<span style="font-size:12px;margin-right:20px;">{{ checkForm.InHoliday }}</span>
<el-button type="text" @click="handleView">{{ $t('system:Setting:Planned Vacation') }}</el-button>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:Comment:')" prop="AdminComment">
<el-input
v-model="checkForm.AdminComment"
type="textarea"
style="width:60%;"
rows="8"
/>
</el-form-item>
<el-form-item :label="$t('system:Setting:label:On Vacation:')">
<span style="font-size: 12px; margin-right: 20px">{{
checkForm.InHoliday
}}</span>
<el-button type="text" @click="handleView">{{
$t('system:Setting:Planned Vacation')
}}</el-button>
</el-form-item>
<el-form-item
:label="$t('system:Setting:label:Comment:')"
prop="AdminComment"
>
<el-input
v-model="checkForm.AdminComment"
type="textarea"
style="width: 60%"
rows="8"
/>
</el-form-item>
<el-form-item style="margin-top:20px">
<el-button type="primary" :disabled="isDisabled" @click="handleSave">{{ $t('common:button:save') }}</el-button>
</el-form-item>
<el-form-item style="margin-top: 20px">
<el-button
type="primary"
:disabled="isDisabled"
@click="handleSave"
>{{ $t('common:button:save') }}</el-button
>
</el-form-item>
</div>
</el-form>
<el-dialog
@ -96,7 +160,13 @@
:end-placeholder="$t('system:Setting:label:End Date')"
size="small"
/>
<el-button style="margin-left:10px;" type="primary" size="small" @click="handleAddHoliday">{{ $t('common:button:add') }}</el-button>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleAddHoliday"
>{{ $t('common:button:add') }}</el-button
>
</div>
<el-table v-loading="loading2" :data="gridData" size="small">
<el-table-column type="index" />
@ -112,13 +182,19 @@
min-width="120"
:formatter="endTimeFormatter"
/>
<el-table-column :label="$t('common:action:action')" fixed="right" min-width="200">
<el-table-column
:label="$t('common:action:action')"
fixed="right"
min-width="200"
>
<template slot-scope="scope">
<el-button type="text" @click="handleDelete(scope.row)">{{ $t('common:button:delete') }}</el-button>
<el-button type="text" @click="handleDelete(scope.row)">{{
$t('common:button:delete')
}}</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination" style="padding: 10px 0;text-align: right">
<div class="pagination" style="padding: 10px 0; text-align: right">
<el-pagination
background
layout="total,sizes,prev, pager, next"
@ -134,17 +210,20 @@
</div>
</template>
<script>
import { getAuditState, updateAuditResume, getVacationList, addOrUpdateVacation, deleteVacation } from '@/api/reviewers'
import {
getAuditState,
updateAuditResume,
getVacationList,
addOrUpdateVacation,
deleteVacation,
} from '@/api/reviewers'
import { fmtDate } from '@/utils/formatter'
export default {
name: 'Setting',
props: {
id: {
reviewerId: {
type: String,
default() {
return ''
}
}
},
},
data() {
return {
@ -165,9 +244,11 @@ export default {
},
rules: {
AdminComment: [{ max: 500, message: 'The maximum length is 500' }],
BlindName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
BlindName: [
{ required: true, message: 'Please specify', trigger: 'blur' },
],
},
doctorId: this.$route.query.Id,
doctorId: this.$route.query.Id || this.reviewerId,
isDisabled: false,
radioDisabled: false,
dialogVisible: false,
@ -176,16 +257,23 @@ export default {
pageIndex: 1,
pageSize: 5,
totalItems: 0,
loading2: false
loading2: false,
}
},
watch: {
reviewerId() {
if (this.reviewerId) {
this.doctorId = this.reviewerId
}
},
},
mounted() {
this.initForm()
},
methods: {
initForm() {
if (!this.doctorId) return
getAuditState(this.doctorId).then(res => {
getAuditState(this.doctorId).then((res) => {
if (res.Result) {
this.checkForm = res.Result
this.checkForm.InHoliday = res.Result.InHoliday ? 'Yes' : 'No'
@ -193,7 +281,7 @@ export default {
})
},
handleSave() {
this.$refs.checkForm.validate(valid => {
this.$refs.checkForm.validate((valid) => {
if (valid) {
this.isDisabled = true
const param = {}
@ -201,11 +289,15 @@ export default {
param.InHoliday = this.checkForm.InHoliday === 'Yes'
param.ResumeStatus = param.ReviewStatus
updateAuditResume(param)
.then(res => {
.then((res) => {
if (res.IsSuccess) {
if (res.Result) { this.checkForm.Id = res.Result }
if (res.Result) {
this.checkForm.Id = res.Result
}
this.isDisabled = false
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$message.success(
this.$t('common:message:savedSuccessfully')
)
}
})
.catch(() => {
@ -221,7 +313,7 @@ export default {
initHolidayList() {
this.loading2 = true
getVacationList(this.doctorId, this.pageIndex, this.pageSize)
.then(res => {
.then((res) => {
if (res.IsSuccess) {
this.gridData = res.Result.CurrentPageData
this.totalItems = res.Result.TotalCount
@ -237,11 +329,11 @@ export default {
const param = {
DoctorId: this.doctorId,
StartDate: this.daterange[0],
EndDate: this.daterange[1]
EndDate: this.daterange[1],
}
this.loading2 = true
addOrUpdateVacation(param)
.then(res => {
.then((res) => {
if (res.IsSuccess) {
param.Id = res.Result
this.gridData.push(param)
@ -266,14 +358,18 @@ export default {
.then(() => {
this.loading2 = true
deleteVacation(row.Id)
.then(res => {
.then((res) => {
if (res.IsSuccess) {
var index = this.gridData.findIndex((item) => item.Id === row.Id)
var index = this.gridData.findIndex(
(item) => item.Id === row.Id
)
if (index !== -1) {
this.gridData.splice(index, 1)
this.totalItems = this.totalItems - 1
}
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$message.success(
this.$t('common:message:deletedSuccessfully')
)
}
this.loading2 = false
})
@ -281,13 +377,16 @@ export default {
this.loading2 = false
})
})
.catch(action => {})
.catch((action) => {})
},
closeDialog() {
this.initForm()
},
handleChange() {
if (this.checkForm.ReviewStatus === 2 || this.checkForm.cooperateStatus === 2) {
if (
this.checkForm.ReviewStatus === 2 ||
this.checkForm.cooperateStatus === 2
) {
this.checkForm.ActivelyReading = false
this.checkForm.AcceptingNewTrial = false
this.radioDisabled = true
@ -319,8 +418,7 @@ export default {
handleSizeChange(val) {
this.pageSize = val
this.initHolidayList()
}
}
},
},
}
</script>

View File

@ -1,7 +1,7 @@
<template>
<div class="form-container">
<el-card class="box-card">
<div style="width:80%;">
<div style="width: 80%">
<el-form
ref="specialtyForm"
v-loading="loading"
@ -12,12 +12,15 @@
>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:Specialty')" prop="SpecialityId">
<el-form-item
:label="$t('system:reviewer:label:Specialty')"
prop="SpecialityId"
>
<el-select
v-model="specialtyForm.SpecialityId"
:disabled="$route.query.ReviewStatus === '1'"
placeholder="Please select"
style="width:100%;"
style="width: 100%"
size="small"
>
<!-- <el-option
@ -37,7 +40,11 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item v-if="specialtyForm.SpecialityId==otherId" class="other-item" prop="SpecialityOther">
<el-form-item
v-if="specialtyForm.SpecialityId == otherId"
class="other-item"
prop="SpecialityOther"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="specialtyForm.SpecialityOther"
@ -47,7 +54,11 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item v-if="specialtyForm.SpecialityId==otherId" prop="SpecialityOtherCN" class="other-item">
<el-form-item
v-if="specialtyForm.SpecialityId == otherId"
prop="SpecialityOtherCN"
class="other-item"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="specialtyForm.SpecialityOtherCN"
@ -59,13 +70,16 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:Subspeciality')" prop="SubspecialityIds">
<el-form-item
:label="$t('system:reviewer:label:Subspeciality')"
prop="SubspecialityIds"
>
<el-select
v-model="specialtyForm.SubspecialityIds"
:disabled="$route.query.ReviewStatus === '1'"
placeholder="select"
multiple
style="width:100%;"
style="width: 100%"
size="small"
>
<!-- <el-option
@ -86,7 +100,10 @@
</el-col>
<el-col :span="6">
<el-form-item
v-if="specialtyForm.SubspecialityIds && specialtyForm.SubspecialityIds.indexOf(otherId)>-1"
v-if="
specialtyForm.SubspecialityIds &&
specialtyForm.SubspecialityIds.indexOf(otherId) > -1
"
class="other-item"
prop="SubspecialityOther"
>
@ -100,7 +117,10 @@
</el-col>
<el-col :span="6">
<el-form-item
v-if="specialtyForm.SubspecialityIds && specialtyForm.SubspecialityIds.indexOf(otherId)>-1"
v-if="
specialtyForm.SubspecialityIds &&
specialtyForm.SubspecialityIds.indexOf(otherId) > -1
"
class="other-item"
prop="SubspecialityOtherCN"
>
@ -116,12 +136,15 @@
<el-row>
<el-col :span="12">
<el-form-item :label="$t('system:reviewer:label:Modality')" prop="ReadingTypeIds">
<el-form-item
:label="$t('system:reviewer:label:Modality')"
prop="ReadingTypeIds"
>
<el-select
:disabled="$route.query.ReviewStatus === '1'"
v-model="specialtyForm.ReadingTypeIds"
placeholder="Please select"
style="width:100%;"
style="width: 100%"
multiple
size="small"
>
@ -143,7 +166,10 @@
</el-col>
<el-col :span="6">
<el-form-item
v-if="specialtyForm.ReadingTypeIds && specialtyForm.ReadingTypeIds.indexOf(otherId)>-1"
v-if="
specialtyForm.ReadingTypeIds &&
specialtyForm.ReadingTypeIds.indexOf(otherId) > -1
"
prop="ReadingTypeOther"
class="other-item"
>
@ -157,7 +183,10 @@
</el-col>
<el-col :span="6">
<el-form-item
v-if="specialtyForm.ReadingTypeIds && specialtyForm.ReadingTypeIds.indexOf(otherId)>-1"
v-if="
specialtyForm.ReadingTypeIds &&
specialtyForm.ReadingTypeIds.indexOf(otherId) > -1
"
prop="ReadingTypeOtherCN"
class="other-item"
>
@ -171,8 +200,14 @@
</el-col>
</el-row>
<el-form-item>
<el-button type="primary" :disabled="isDisabled || $route.query.ReviewStatus === '1'" size="small" @click="handleSave">
{{ $t('common:button:save') }}</el-button>
<el-button
type="primary"
:disabled="isDisabled || $route.query.ReviewStatus === '1'"
size="small"
@click="handleSave"
>
{{ $t('common:button:save') }}</el-button
>
</el-form-item>
</el-form>
</div>
@ -184,6 +219,11 @@ import { getSpecialtyInfo, updateSpecialtyInfo } from '@/api/reviewers'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
export default {
name: 'Specialty',
props: {
reviewerId: {
type: String,
},
},
data() {
return {
specialtyForm: {
@ -195,37 +235,53 @@ export default {
SubspecialityOtherCN: '',
SpecialityId: '',
SpecialityOther: '',
SpecialityOtherCN: ''
SpecialityOtherCN: '',
},
specialtyRules: {
SpecialityId: [{ required: true, message: 'Please select speciality', trigger: 'blur' }],
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' }
{ 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' }],
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' }
{ max: 50, message: 'The maximum length is 50' },
],
ReadingTypeOtherCN: [
{ 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',
},
],
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' }
{ max: 50, message: 'The maximum length is 50' },
],
SubspecialityOtherCN: [
{ max: 50, message: 'The maximum length is 50' }
]
{ max: 50, message: 'The maximum length is 50' },
],
},
selectId: '00000000-0000-0000-0000-000000000000',
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
isDisabled: false,
loading: false,
dictionaryList: {}
dictionaryList: {},
}
},
mounted() {
@ -233,25 +289,44 @@ export default {
},
methods: {
handleSave() {
this.$refs.specialtyForm.validate(valid => {
this.$refs.specialtyForm.validate((valid) => {
if (valid) {
this.isDisabled = true
const params = {}
params.ReadingTypeIds = this.specialtyForm.ReadingTypeIds
params.ReadingTypeOther = params.ReadingTypeIds.indexOf(this.otherId) > -1 ? this.specialtyForm.ReadingTypeOther : ''
params.ReadingTypeOtherCN = params.ReadingTypeIds.indexOf(this.otherId) > -1 ? this.specialtyForm.ReadingTypeOtherCN : ''
params.ReadingTypeOther =
params.ReadingTypeIds.indexOf(this.otherId) > -1
? this.specialtyForm.ReadingTypeOther
: ''
params.ReadingTypeOtherCN =
params.ReadingTypeIds.indexOf(this.otherId) > -1
? this.specialtyForm.ReadingTypeOtherCN
: ''
params.SubspecialityIds = this.specialtyForm.SubspecialityIds
params.SubspecialityOther = params.SubspecialityIds.indexOf(this.otherId) > -1 ? this.specialtyForm.SubspecialityOther : ''
params.SubspecialityOtherCN = params.SubspecialityIds.indexOf(this.otherId) > -1 ? this.specialtyForm.SubspecialityOtherCN : ''
params.SubspecialityOther =
params.SubspecialityIds.indexOf(this.otherId) > -1
? this.specialtyForm.SubspecialityOther
: ''
params.SubspecialityOtherCN =
params.SubspecialityIds.indexOf(this.otherId) > -1
? this.specialtyForm.SubspecialityOtherCN
: ''
params.SpecialityId = this.specialtyForm.SpecialityId
params.SpecialityOther = params.SpecialityId === this.otherId ? this.specialtyForm.SpecialityOther : ''
params.SpecialityOtherCN = params.SpecialityId === this.otherId ? this.specialtyForm.SpecialityOtherCN : ''
params.Id = this.$route.query.Id
updateSpecialtyInfo(params).then(res => {
this.isDisabled = false
this.$message.success('Saved successfully')
this.specialtyForm.Id = res.Result
})
params.SpecialityOther =
params.SpecialityId === this.otherId
? this.specialtyForm.SpecialityOther
: ''
params.SpecialityOtherCN =
params.SpecialityId === this.otherId
? this.specialtyForm.SpecialityOtherCN
: ''
params.Id = this.$route.query.Id || this.reviewerId
updateSpecialtyInfo(params)
.then((res) => {
this.isDisabled = false
this.$message.success('Saved successfully')
this.specialtyForm.Id = res.Result
})
.catch(() => {
this.isDisabled = false
})
@ -260,20 +335,33 @@ export default {
},
initForm() {
this.loading = true
const id = this.$route.query.Id
const id = this.$route.query.Id || this.reviewerId
if (id) {
getSpecialtyInfo(id).then(res => {
this.specialtyForm.ReadingTypeIds = res.Result.ReadingTypeIds.length > 0 ? res.Result.ReadingTypeIds : []
this.specialtyForm.ReadingTypeOther = res.Result.ReadingTypeOther
this.specialtyForm.ReadingTypeOtherCN = res.Result.ReadingTypeOtherCN
this.specialtyForm.SubspecialityIds = res.Result.SubspecialityIds
this.specialtyForm.SubspecialityOther = res.Result.SubspecialityOther
this.specialtyForm.SubspecialityOtherCN = res.Result.SubspecialityOtherCN
this.specialtyForm.SpecialityId = res.Result.SpecialityId === this.selectId ? '' : res.Result.SpecialityId
this.specialtyForm.SpecialityOther = res.Result.SpecialityOther
this.specialtyForm.SpecialityOtherCN = res.Result.SpecialityOtherCN
this.loading = false
}).catch(() => { this.loading = false })
getSpecialtyInfo(id)
.then((res) => {
this.specialtyForm.ReadingTypeIds =
res.Result.ReadingTypeIds.length > 0
? res.Result.ReadingTypeIds
: []
this.specialtyForm.ReadingTypeOther = res.Result.ReadingTypeOther
this.specialtyForm.ReadingTypeOtherCN =
res.Result.ReadingTypeOtherCN
this.specialtyForm.SubspecialityIds = res.Result.SubspecialityIds
this.specialtyForm.SubspecialityOther =
res.Result.SubspecialityOther
this.specialtyForm.SubspecialityOtherCN =
res.Result.SubspecialityOtherCN
this.specialtyForm.SpecialityId =
res.Result.SpecialityId === this.selectId
? ''
: res.Result.SpecialityId
this.specialtyForm.SpecialityOther = res.Result.SpecialityOther
this.specialtyForm.SpecialityOtherCN = res.Result.SpecialityOtherCN
this.loading = false
})
.catch(() => {
this.loading = false
})
}
},
async initSpecialty() {
@ -281,15 +369,17 @@ export default {
this.initForm()
},
getDicData() {
getBasicDataSelects(['Department', 'Subspeciality', 'ReadingType']).then(res => {
this.dictionaryList = { ...res.Result }
})
}
}
getBasicDataSelects(['Department', 'Subspeciality', 'ReadingType']).then(
(res) => {
this.dictionaryList = { ...res.Result }
}
)
},
},
}
</script>
<style lang="scss">
.other-item .el-form-item__content{
.other-item .el-form-item__content {
margin-left: 80px !important;
}
</style>

View File

@ -1,10 +1,16 @@
<template>
<div class="form-container">
<div class="title-wrapper">
<p>{{$t('system:TrialExperience:title:Clinical Trial Experience')}}</p>
<el-button :disabled="$route.query.ReviewStatus === '1'" class="add" size="small" @click="handleAddClinicalTrial">{{$t('common:button:add')}}</el-button>
<p>{{ $t('system:TrialExperience:title:Clinical Trial Experience') }}</p>
<el-button
:disabled="$route.query.ReviewStatus === '1'"
class="add"
size="small"
@click="handleAddClinicalTrial"
>{{ $t('common:button:add') }}</el-button
>
</div>
<div style="padding:0 40px;">
<div style="padding: 0 40px">
<el-table
ref="clinicalTrialTbl"
v-loading="loading"
@ -13,39 +19,82 @@
size="small"
>
<el-table-column type="index" width="40" />
<el-table-column prop="Phase" :label="$t('system:TrialExperience:title:Phase')" min-width="50" />
<el-table-column prop="EvaluationCriteriaList" :label="$t('system:TrialExperience:title:Review Criteria')" min-width="100">
<el-table-column
prop="Phase"
:label="$t('system:TrialExperience:title:Phase')"
min-width="50"
/>
<el-table-column
prop="EvaluationCriteriaList"
:label="$t('system:TrialExperience:title:Review Criteria')"
min-width="100"
>
<template slot-scope="scope">
{{ scope.row.EvaluationCriteriaList.length>0? scope.row.EvaluationCriteriaList.join(', '):'' }}
{{
scope.row.EvaluationCriteriaList.length > 0
? scope.row.EvaluationCriteriaList.join(', ')
: ''
}}
</template>
</el-table-column>
<el-table-column prop="EvaluationCriteriaList" :label="$t('system:TrialExperience:title:Starting And Ending Date')" min-width="100">
<el-table-column
prop="EvaluationCriteriaList"
:label="$t('system:TrialExperience:title:Starting And Ending Date')"
min-width="100"
>
<template slot-scope="scope">
<span v-if="scope.row.StartTime">{{ scope.row.StartTime.split('-')[0] }}-{{scope.row.EndTime ? scope.row.EndTime.split('-')[0] : ''}}</span>
<span v-if="scope.row.StartTime"
>{{ scope.row.StartTime.split('-')[0] }}-{{
scope.row.EndTime ? scope.row.EndTime.split('-')[0] : '至今'
}}</span
>
</template>
</el-table-column>
<el-table-column prop="VisitReadingCount" :label="$t('system:TrialExperience:title:Visit Reading Count')" min-width="70" />
<el-table-column prop="EvaluationContent" :label="$t('system:TrialExperience:Indication')" min-width="70" />
<el-table-column :label="$t('system:TrialExperience:Operation')" min-width="200">
<el-table-column
prop="VisitReadingCount"
:label="$t('system:TrialExperience:title:Visit Reading Count')"
min-width="70"
/>
<el-table-column
prop="EvaluationContent"
:label="$t('system:TrialExperience:Indication')"
min-width="70"
/>
<el-table-column
:label="$t('system:TrialExperience:Operation')"
min-width="200"
>
<template slot-scope="scope">
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleEdit(scope.row)">
{{ $t('common:button:edit') }}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleDel(scope.row)">{{ $t('common:button:delete') }}</el-button>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleEdit(scope.row)"
>
{{ $t('common:button:edit') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleDel(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<div class="title-wrapper" style="margin-top:10px;">
<p>{{$t('system:TrialExperience:title:GCP Certificate')}}</p>
<div class="title-wrapper" style="margin-top: 10px">
<p>{{ $t('system:TrialExperience:title:GCP Certificate') }}</p>
</div>
<div style="margin-left:40px;width:40%">
<div style="margin-left: 40px; width: 40%">
<gcp-certificate :doctor-id="doctorId" :gcp="GCP" :gcp-id="GCPID" />
</div>
<div class="title-wrapper" style="margin-top:10px;">
<p>{{$t('system:TrialExperience:title:Other Relevant Experience')}}</p>
<div class="title-wrapper" style="margin-top: 10px">
<p>{{ $t('system:TrialExperience:title:Other Relevant Experience') }}</p>
</div>
<div style="padding:0 40px;">
<div style="padding: 0 40px">
<el-row type="flex" justify="space-between">
<el-col :span="11">
<el-input
@ -57,13 +106,33 @@
/>
</el-col>
<el-col :span="11">
<el-input v-model="OtherClinicalExperienceCN" :disabled="$route.query.ReviewStatus === '1'" type="textarea" rows="5" placeholder="请用中文注明" size="small" />
<el-input
v-model="OtherClinicalExperienceCN"
:disabled="$route.query.ReviewStatus === '1'"
type="textarea"
rows="5"
placeholder="请用中文注明"
size="small"
/>
</el-col>
</el-row>
<el-button type="primary" size="small" style="margin-top:20px" :disabled="isBtnDisabled || $route.query.ReviewStatus === '1'" @click="handleSaveOtherClinical">
{{ $t('common:button:save') }}</el-button>
<el-button
type="primary"
size="small"
style="margin-top: 20px"
:disabled="isBtnDisabled || $route.query.ReviewStatus === '1'"
@click="handleSaveOtherClinical"
>
{{ $t('common:button:save') }}</el-button
>
</div>
<el-dialog v-if="clinicalTrialDialogVisible" :title="clinicalTrialDialogTitle" :visible.sync="clinicalTrialDialogVisible" width="480px" :close-on-click-modal="false">
<el-dialog
v-if="clinicalTrialDialogVisible"
:title="clinicalTrialDialogTitle"
:visible.sync="clinicalTrialDialogVisible"
width="480px"
:close-on-click-modal="false"
>
<el-form
ref="clinicalTrialForm"
label-width="150px"
@ -72,7 +141,10 @@
:model="clinicalTrialForm"
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">
<!-- <el-option
v-for="(key,value) of dictionaryList.Phase"
@ -88,7 +160,10 @@
/>
</el-select>
</el-form-item>
<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
v-model="clinicalTrialForm.EvaluationCriteriaIdList"
multiple
@ -102,38 +177,67 @@
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('system:TrialExperience:label:Start Time')" prop="StartTime">
<el-form-item
:label="$t('system:TrialExperience:label:Start Time')"
prop="StartTime"
>
<el-date-picker
v-model="clinicalTrialForm.StartTime"
type="year"
value-format="yyyy"
>
>
</el-date-picker>
</el-form-item>
<el-form-item :label="$t('system:TrialExperience:label:End Time')" prop="EndTime">
<el-form-item
:label="$t('system:TrialExperience:label:End Time')"
prop="EndTime"
>
<el-date-picker
v-model="clinicalTrialForm.EndTime"
type="year"
value-format="yyyy"
>
>
</el-date-picker>
</el-form-item>
<el-form-item :label="$t('system:TrialExperience:Visit Reading Count')" prop="VisitReadingCount">
<el-input style="width: 100%" oninput="value=value.replace(/[^\d]/g,'')" v-model="clinicalTrialForm.VisitReadingCount" controls-position="right" :min="0" />
<el-form-item
:label="$t('system:TrialExperience:Visit Reading Count')"
prop="VisitReadingCount"
>
<el-input
style="width: 100%"
oninput="value=value.replace(/[^\d]/g,'')"
v-model="clinicalTrialForm.VisitReadingCount"
controls-position="right"
:min="0"
/>
</el-form-item>
<el-form-item :label="$t('system:TrialExperience:Indication')" prop="EvaluationContent">
<el-form-item
:label="$t('system:TrialExperience:Indication')"
prop="EvaluationContent"
>
<el-input v-model="clinicalTrialForm.EvaluationContent" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" :loading="isDisabled" @click="handleSave">{{ $t('common:button:save') }}</el-button>
<el-button
type="primary"
size="small"
:loading="isDisabled"
@click="handleSave"
>{{ $t('common:button:save') }}</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
// import UploadFile from '@/components/UploadFile'
import { getTrialExperience, addOrUpdateTrialExperience, deleteTrialExperience, updateOtherExperience } from '@/api/reviewers'
import {
getTrialExperience,
addOrUpdateTrialExperience,
deleteTrialExperience,
updateOtherExperience,
} from '@/api/reviewers'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import GcpCertificate from './GcpCertificate.vue'
import moment from 'moment'
@ -150,6 +254,11 @@ const getClinicalTrialDefault = () => {
export default {
name: 'TrialExperience',
components: { GcpCertificate },
props: {
reviewerId: {
type: String,
},
},
data() {
return {
loading: false,
@ -159,17 +268,25 @@ export default {
clinicalTrialForm: getClinicalTrialDefault(),
clinicalTrialRules: {
PhaseId: [
{ required: true, message: 'Please select', trigger: ['blur', 'change'] }
{
required: true,
message: 'Please select',
trigger: ['blur', 'change'],
},
],
EvaluationCriteriaIdList: [
{ required: true, message: 'Please select', trigger: ['blur', 'change'] }
{
required: true,
message: 'Please select',
trigger: ['blur', 'change'],
},
],
VisitReadingCount: [
{ required: true, message: 'Please specify', trigger: 'blur' },
],
EvaluationContent: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 300, message: 'The maximum length is 300' }
{ max: 300, message: 'The maximum length is 300' },
],
StartTime: [
{ required: true, message: 'Please specify', trigger: 'blur' },
@ -180,12 +297,19 @@ export default {
OtherClinicalExperience: '',
OtherClinicalExperienceCN: '',
isDisabled: false,
doctorId: this.$route.query.Id,
doctorId: this.$route.query.Id || this.reviewerId,
isBtnDisabled: false,
selectId: '00000000-0000-0000-0000-000000000000',
dictionaryList: {}
dictionaryList: {},
}
},
watch: {
reviewerId() {
if (this.reviewerId) {
this.doctorId = this.reviewerId
}
},
},
created() {
this.initForm()
},
@ -195,18 +319,23 @@ export default {
const id = this.$route.query.Id
if (id) {
this.loading = true
getTrialExperience(id).then(res => {
this.clinicalTrialList = res.Result.ClinicalTrialExperienceList
this.GCP = res.Result.GCP
this.GCPID = res.Result.GCPId
this.OtherClinicalExperience = res.Result.OtherClinicalExperience
this.OtherClinicalExperienceCN = res.Result.OtherClinicalExperienceCN
this.loading = false
}).catch(() => { this.loading = false })
getTrialExperience(id)
.then((res) => {
this.clinicalTrialList = res.Result.ClinicalTrialExperienceList
this.GCP = res.Result.GCP
this.GCPID = res.Result.GCPId
this.OtherClinicalExperience = res.Result.OtherClinicalExperience
this.OtherClinicalExperienceCN =
res.Result.OtherClinicalExperienceCN
this.loading = false
})
.catch(() => {
this.loading = false
})
}
},
getDicData() {
getBasicDataSelects(['Trial_Phase', 'ReadingStandard']).then(res => {
getBasicDataSelects(['Trial_Phase', 'ReadingStandard']).then((res) => {
this.dictionaryList = { ...res.Result }
})
},
@ -217,7 +346,15 @@ export default {
this.clinicalTrialForm = Object.assign({}, getClinicalTrialDefault())
},
handleEdit(row) {
const { Id, PhaseId, EvaluationCriteriaIdList, EvaluationContent, StartTime, EndTime, VisitReadingCount } = row
const {
Id,
PhaseId,
EvaluationCriteriaIdList,
EvaluationContent,
StartTime,
EndTime,
VisitReadingCount,
} = row
this.clinicalTrialForm = Object.assign({}, getClinicalTrialDefault())
this.clinicalTrialDialogTitle = 'Edit'
this.clinicalTrialDialogVisible = true
@ -230,35 +367,42 @@ export default {
this.clinicalTrialForm.EvaluationContent = EvaluationContent
},
handleSave() {
this.$refs.clinicalTrialForm.validate(valid => {
this.$refs.clinicalTrialForm.validate((valid) => {
if (valid) {
this.isDisabled = true
this.clinicalTrialForm.DoctorId = this.$route.query.Id
var dateTime
if (this.clinicalTrialForm.StartTime) {
dateTime = new Date(this.clinicalTrialForm.StartTime)
this.clinicalTrialForm.StartTime = moment(new Date(dateTime.setDate(dateTime.getDate()+1))).format('YYYY') + "-01"
this.clinicalTrialForm.StartTime =
moment(new Date(dateTime.setDate(dateTime.getDate() + 1))).format(
'YYYY'
) + '-01'
}
if (this.clinicalTrialForm.EndTime) {
dateTime = new Date(this.clinicalTrialForm.EndTime)
this.clinicalTrialForm.EndTime = moment(new Date(dateTime.setDate(dateTime.getDate()+1))).format("YYYY") + "-01"
this.clinicalTrialForm.EndTime =
moment(new Date(dateTime.setDate(dateTime.getDate() + 1))).format(
'YYYY'
) + '-01'
}
addOrUpdateTrialExperience(this.clinicalTrialForm).then(res => {
this.isDisabled = false
this.initForm()
if (this.clinicalTrialForm.Id) {
this.$message({
message: 'Updated successfully',
type: 'success'
})
} else {
this.$message({
message: 'Addedd successfully',
type: 'success'
})
}
this.clinicalTrialDialogVisible = false
})
addOrUpdateTrialExperience(this.clinicalTrialForm)
.then((res) => {
this.isDisabled = false
this.initForm()
if (this.clinicalTrialForm.Id) {
this.$message({
message: 'Updated successfully',
type: 'success',
})
} else {
this.$message({
message: 'Addedd successfully',
type: 'success',
})
}
this.clinicalTrialDialogVisible = false
})
.catch(() => {
this.isDisabled = false
})
@ -269,20 +413,25 @@ export default {
this.$confirm('Confirm to delete?', {
type: 'warning',
distinguishCancelAndClose: true,
})
.then(() => {
deleteTrialExperience(row.Id)
.then(res => {
this.clinicalTrialList.splice(this.clinicalTrialList.findIndex(item => item.Id === row.Id), 1)
this.$message.success('Deleted successfully !')
})
deleteTrialExperience(row.Id).then((res) => {
this.clinicalTrialList.splice(
this.clinicalTrialList.findIndex((item) => item.Id === row.Id),
1
)
this.$message.success('Deleted successfully !')
})
})
.catch(action => {})
.catch((action) => {})
},
handleSaveOtherClinical() {
const param = { DoctorId: this.doctorId, OtherClinicalExperience: this.OtherClinicalExperience, OtherClinicalExperienceCN: this.OtherClinicalExperienceCN }
updateOtherExperience(param).then(res => {
const param = {
DoctorId: this.doctorId,
OtherClinicalExperience: this.OtherClinicalExperience,
OtherClinicalExperienceCN: this.OtherClinicalExperienceCN,
}
updateOtherExperience(param).then((res) => {
if (res.IsSuccess) {
if (this.id) {
this.$message.success('Updated successfully')
@ -291,7 +440,7 @@ export default {
}
}
})
}
}
},
},
}
</script>

View File

@ -1,41 +1,73 @@
<template>
<div class="app-container">
<el-tabs v-model="active" @tab-click="clickTab">
<el-tab-pane :label="$t('system:reviewer:tab:BasicInfo')" name="BasicInfo">
<basic-info v-if="load.BasicInfo" />
<el-tab-pane
:label="$t('system:reviewer:tab:BasicInfo')"
name="BasicInfo"
>
<basic-info v-if="load.BasicInfo" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane :label="$t('system:reviewer:tab:Employment')" name="Employment">
<Employment v-if="load.Employment" />
<el-tab-pane
:label="$t('system:reviewer:tab:Employment')"
name="Employment"
>
<Employment v-if="load.Employment" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane :label="$t('system:reviewer:tab:Specialty')" name="Specialty">
<specialty v-if="load.Specialty" />
<el-tab-pane
:label="$t('system:reviewer:tab:Specialty')"
name="Specialty"
>
<specialty v-if="load.Specialty" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane :label="$t('system:reviewer:tab:Education&Training')" name="EducationTraining">
<education-training v-if="load.EducationTraining" />
<el-tab-pane
:label="$t('system:reviewer:tab:Education&Training')"
name="EducationTraining"
>
<education-training
v-if="load.EducationTraining"
:reviewerId.sync="reviewerId"
/>
</el-tab-pane>
<el-tab-pane :label="$t('system:reviewer:tab:Research&Publication')" name="ResearchPublication">
<research-publication v-if="load.ResearchPublication" />
<el-tab-pane
:label="$t('system:reviewer:tab:Research&Publication')"
name="ResearchPublication"
>
<research-publication
v-if="load.ResearchPublication"
:reviewerId.sync="reviewerId"
/>
</el-tab-pane>
<el-tab-pane :label="$t('system:reviewer:tab:TrialExperience')" name="TrialExperience">
<trial-experience v-if="load.TrialExperience" />
<el-tab-pane
:label="$t('system:reviewer:tab:TrialExperience')"
name="TrialExperience"
>
<trial-experience
v-if="load.TrialExperience"
:reviewerId.sync="reviewerId"
/>
</el-tab-pane>
<el-tab-pane :label="$t('system:reviewer:tab:Credentials')" name="Credentials">
<Credentials v-if="load.Credentials" />
<el-tab-pane
:label="$t('system:reviewer:tab:Credentials')"
name="Credentials"
>
<Credentials v-if="load.Credentials" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane :label="$t('system:reviewer:tab:Resumes')" name="Resumes">
<Resumes v-if="load.Resumes" />
<Resumes v-if="load.Resumes" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane :label="$t('system:reviewer:tab:Agreements')" name="Agreements">
<Agreements v-if="load.Agreements" />
<el-tab-pane
:label="$t('system:reviewer:tab:Agreements')"
name="Agreements"
>
<Agreements v-if="load.Agreements" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane :label="$t('system:reviewer:tab:Setting')" name="Setting">
<Setting v-if="load.Setting" />
<Setting v-if="load.Setting" :reviewerId.sync="reviewerId" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import BasicInfo from './components/BasicInfo'
import Employment from './components/Employment'
import Specialty from './components/Specialty'
@ -58,12 +90,21 @@ export default {
Credentials,
Resumes,
Agreements,
Setting
Setting,
},
props: {
reviewerId: {
type: String,
},
isSystem: {
type: Boolean,
default: true,
},
},
data() {
return {
id: this.$route.query.Id,
active: '',
active: 'BasicInfo',
load: {
BasicInfo: true,
Employment: false,
@ -74,34 +115,39 @@ export default {
Credentials: false,
Resumes: false,
Agreements: false,
Setting: false
}
Setting: false,
},
}
},
created() {
if (this.$route.query.Id === '') {
this.$router.push({ path: '/reviewers/reviewers-list' })
if (this.isSystem) {
if (this.$route.query.Id === '') {
this.$router.push({ path: '/reviewers/reviewers-list' })
}
this.active = this.$route.query.tabActive
this.load[this.active] = true
}
this.active = this.$route.query.tabActive
this.load[this.active] = true
},
methods: {
clickTab(tab, event) {
if (this.load[tab.name] === false) {
this.load[tab.name] = true
}
if (!this.isSystem) return false
changeURLStatic('tabActive', tab.name)
const id = getQueryString('Id')
const isEnglish = getQueryString('isEnglish')
this.$router.push({ path: `/reviewers/reviewers-edit?Id=${id}&isEnglish=${isEnglish}&tabActive=${tab.name}` })
}
}
this.$router.push({
path: `/reviewers/reviewers-edit?Id=${id}&isEnglish=${isEnglish}&tabActive=${tab.name}`,
})
},
},
}
</script>
<style lang="scss" scoped>
.el-tabs{
.el-tabs {
height: 100%;
.el-tabs__content{
.el-tabs__content {
height: calc(100%-50px);
overflow-y: auto;
}

View File

@ -1,36 +1,73 @@
<template>
<div class="app-container">
<el-tabs v-model="active" :before-leave="checkLeave" @tab-click="clickTab">
<el-tab-pane label="Basic Info" name="BasicInfo">
<basic-info v-if="load.BasicInfo" />
<el-tab-pane
:label="$t('system:reviewer:tab:BasicInfo')"
name="BasicInfo"
>
<basic-info
v-if="load.BasicInfo"
:reviewerId.sync="reviewerId"
:isSystem="isSystem"
/>
</el-tab-pane>
<el-tab-pane label="Employment" name="Employment">
<Employment v-if="load.Employment" />
<el-tab-pane
:label="$t('system:reviewer:tab:Employment')"
name="Employment"
>
<Employment v-if="load.Employment" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane label="Specialty" name="Specialty">
<specialty v-if="load.Specialty" />
<el-tab-pane
:label="$t('system:reviewer:tab:Specialty')"
name="Specialty"
>
<specialty v-if="load.Specialty" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane label="Education & Training" name="EducationTraining">
<education-training v-if="load.EducationTraining" />
<el-tab-pane
:label="$t('system:reviewer:tab:Education&Training')"
name="EducationTraining"
>
<education-training
v-if="load.EducationTraining"
:reviewerId.sync="reviewerId"
/>
</el-tab-pane>
<el-tab-pane label="Research & Publication" name="ResearchPublication">
<research-publication v-if="load.ResearchPublication" />
<el-tab-pane
:label="$t('system:reviewer:tab:Research&Publication')"
name="ResearchPublication"
>
<research-publication
v-if="load.ResearchPublication"
:reviewerId.sync="reviewerId"
/>
</el-tab-pane>
<el-tab-pane label="Trial Experience" name="TrialExperience">
<trial-experience v-if="load.TrialExperience" />
<el-tab-pane
:label="$t('system:reviewer:tab:TrialExperience')"
name="TrialExperience"
>
<trial-experience
v-if="load.TrialExperience"
:reviewerId.sync="reviewerId"
/>
</el-tab-pane>
<el-tab-pane label="Credentials" name="Credentials">
<Credentials v-if="load.Credentials" />
<el-tab-pane
:label="$t('system:reviewer:tab:Credentials')"
name="Credentials"
>
<Credentials v-if="load.Credentials" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane label="Resumes" name="Resumes">
<Resumes v-if="load.Resumes" />
<el-tab-pane :label="$t('system:reviewer:tab:Resumes')" name="Resumes">
<Resumes v-if="load.Resumes" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane label="Agreements" name="Agreements">
<Agreements v-if="load.Agreements" />
<el-tab-pane
:label="$t('system:reviewer:tab:Agreements')"
name="Agreements"
>
<Agreements v-if="load.Agreements" :reviewerId.sync="reviewerId" />
</el-tab-pane>
<el-tab-pane label="Setting" name="Setting">
<Setting v-if="load.Setting" />
<el-tab-pane :label="$t('system:reviewer:tab:Setting')" name="Setting">
<Setting v-if="load.Setting" :reviewerId.sync="reviewerId" />
</el-tab-pane>
</el-tabs>
</div>
@ -58,7 +95,13 @@ export default {
Credentials,
Resumes,
Agreements,
Setting
Setting,
},
props: {
isSystem: {
type: Boolean,
default: true,
},
},
data() {
return {
@ -73,36 +116,44 @@ export default {
Credentials: false,
Resumes: false,
Agreements: false,
Setting: false
}
Setting: false,
reviewerId: null,
},
}
},
mounted() {
this.active = this.$route.query.tabActive
if (this.$route.query.Id === '' && this.active !== 'BasicInfo') {
this.$router.push({ path: '/reviewers/reviewers-list' })
if (this.isSystem) {
this.active = this.$route.query.tabActive
if (this.$route.query.Id === '' && this.active !== 'BasicInfo') {
this.$router.push({ path: '/reviewers/reviewers-list' })
}
this.load[this.active] = true
}
this.load[this.active] = true
},
methods: {
clickTab(tab, event) {
if (this.load[tab.name] === false) {
this.load[tab.name] = true
}
if (!this.isSystem) return false
changeURLStatic('tabActive', tab.name)
const id = getQueryString('Id')
const isEnglish = getQueryString('isEnglish')
this.$router.push({ path: `/reviewers/reviewers-add?Id=${id}&isEnglish=${isEnglish}&tabActive=${tab.name}` })
this.$router.push({
path: `/reviewers/reviewers-add?Id=${id}&isEnglish=${isEnglish}&tabActive=${tab.name}`,
})
},
checkLeave() {
const id = getQueryString('Id')
if (!id) {
this.$message({
message: 'Please fill in the basic information first',
type: 'warning'
type: 'warning',
})
return false
} else { return true }
} else {
return true
}
},
getQueryString(name) {
console.log(window.location.href)
@ -113,14 +164,14 @@ export default {
} else {
return null
}
}
}
},
},
}
</script>
<style lang="scss" scoped>
.el-tabs{
.el-tabs {
height: 100%;
.el-tabs__content{
.el-tabs__content {
height: calc(100%-50px);
overflow-y: auto;
}

View File

@ -65,7 +65,12 @@
</el-form-item>
<!-- Rank -->
<el-form-item :label="$t('trials:seletctedReviews:form:rank')">
<el-select v-model="listQuery.RankId" class="handle-select" style="width: 160px" clearable>
<el-select
v-model="listQuery.RankId"
class="handle-select"
style="width: 160px"
clearable
>
<el-option
v-for="item of $d.Rank"
:key="item.id"
@ -83,7 +88,7 @@
style="width: 160px"
>
<el-option
v-for="(item,index) in hospitalList"
v-for="(item, index) in hospitalList"
:key="index"
:label="item.HospitalName"
:value="item.Id"
@ -91,30 +96,57 @@
</el-select>
</el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" :loading="loading" @click="handleSearch">
<el-button
type="primary"
icon="el-icon-search"
:loading="loading"
@click="handleSearch"
>
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button type="primary" icon="el-icon-refresh-left" :loading="loading" @click="handleReset">
<el-button
type="primary"
icon="el-icon-refresh-left"
:loading="loading"
@click="handleReset"
>
{{ $t('common:button:reset') }}
</el-button>
<el-button
v-if="hasPermi(['role:pm'])"
type="primary"
:disabled="selectIdArr.length==0"
:disabled="selectIdArr.length == 0"
icon="el-icon-check"
:loading="loading"
@click="handleApply"
>
{{ $t('trials:seletctedReviews:button:select') }}
</el-button>
<!---简历采集-->
<el-button
type="primary"
@click="resumeCollection"
v-hasPermi="['trials:trials-panel:attachments:enrollment:viewer']"
>
{{ $t('trials:seletctedReviews:button:resumeCollection') }}
</el-button>
<!---添加阅片人-->
<el-button
icon="el-icon-plus"
type="primary"
@click="openViewer('add')"
v-hasPermi="['trials:trials-panel:attachments:enrollment:viewer']"
>
{{ $t('trials:seletctedReviews:button:addViewer') }}
</el-button>
</el-form>
</template>
<template slot="main-container">
<el-table
ref="selectionList"
v-loading="listLoading"
v-adaptive="{bottomOffset:65}"
v-adaptive="{ bottomOffset: 65 }"
height="100"
:data="list"
class="table"
@ -133,16 +165,22 @@
sortable="custom"
>
<template slot-scope="scope">
<span style="color: #428bca;cursor: pointer;" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span>
<span
style="color: #428bca; cursor: pointer"
@click="
go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)
"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span
>
<!-- <el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button> -->
<!-- <router-link-->
<!-- style="color: #428bca;"-->
<!-- tag="a"-->
<!-- :to="{-->
<!-- path: `/trialsResume?doctorId=${scope.row.Id}&token=${token}`,-->
<!-- }"-->
<!-- target="_blank"-->
<!-- >{{ scope.row.LastName }} / {{ scope.row.FirstName }}</router-link>-->
<!-- <router-link-->
<!-- style="color: #428bca;"-->
<!-- tag="a"-->
<!-- :to="{-->
<!-- path: `/trialsResume?doctorId=${scope.row.Id}&token=${token}`,-->
<!-- }"-->
<!-- target="_blank"-->
<!-- >{{ scope.row.LastName }} / {{ scope.row.FirstName }}</router-link>-->
</template>
</el-table-column>
<!-- Name CN -->
@ -168,7 +206,9 @@
width="120"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.DoctorTrialState === 1" type="primary">{{ $fd('DoctorTrialState', 16) }}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 1" type="primary">{{
$fd('DoctorTrialState', 16)
}}</el-tag>
</template>
</el-table-column>
<!-- Submitted -->
@ -202,7 +242,11 @@
min-width="120"
>
<template slot-scope="scope">
{{ scope.row.ReadingTypeIds.map(v => {return $fd('ReadingType', v, 'id')}).toString() }}
{{
scope.row.ReadingTypeIds.map((v) => {
return $fd('ReadingType', v, 'id')
}).toString()
}}
</template>
</el-table-column>
<!-- Specialty -->
@ -213,7 +257,13 @@
min-width="120"
>
<template slot-scope="scope">
{{ scope.row.SpecialityId === otherId?(scope.row.SpecialityOther?scope.row.SpecialityOther:'Other'): scope.row.Speciality }}
{{
scope.row.SpecialityId === otherId
? scope.row.SpecialityOther
? scope.row.SpecialityOther
: 'Other'
: scope.row.Speciality
}}
</template>
</el-table-column>
<!-- Subspecialty -->
@ -224,7 +274,11 @@
min-width="150"
>
<template slot-scope="scope">
{{ scope.row.SubspecialityIds.map(v => {return $fd('Subspeciality', v, 'id')}).join(', ') }}
{{
scope.row.SubspecialityIds.map((v) => {
return $fd('Subspeciality', v, 'id')
}).join(', ')
}}
<!-- {{ scope.row.SubspecialityList.length > 0 ? scope.row.SubspecialityList.join(', ') : '' }}-->
</template>
</el-table-column>
@ -261,9 +315,80 @@
:label="$t('trials:seletctedReviews:table:selectionTime')"
width="150"
/>
<el-table-column
prop="OptTimeStr"
:label="$t('common:action:action')"
width="150"
v-if="hasPermi(['trials:trials-panel:attachments:enrollment:viewer'])"
>
<template slot-scope="scope">
<el-button
icon="el-icon-edit-outline"
:title="$t('common:button:edit')"
@click.stop="openViewer('edit', scope.row)"
v-hasPermi="['trials:trials-panel:attachments:enrollment:viewer']"
circle
/>
</template>
</el-table-column>
</el-table>
<pagination class="page" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
<pagination
class="page"
:total="total"
:page.sync="listQuery.PageIndex"
:limit.sync="listQuery.PageSize"
@pagination="getList"
/>
</template>
<!--简历采集-->
<base-model :config="share_model">
<template slot="dialog-body">
<div>
<i style="color: #428bca" class="el-icon-success" />
<span>{{ $t('reviewers-list:message:msg1') }}</span>
</div>
<div style="margin: 10px 0">
<span style="">{{ $t('reviewers-list:message:msg2') }}</span
><el-input
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
v-model="shareLink"
readonly
style="width: 100%; margin-top: 10px"
/>
</div>
<div>
<el-button type="primary" round @click="copyCode">{{
$t('reviewers-list:button:copyCode')
}}</el-button>
</div>
<div class="sendEmailBox">
<el-input
v-model="email"
clearable
:placeholder="$t('reviewers-list:placeholder:sendEmail')"
></el-input>
<el-button
type="primary"
round
@click="sendEmail"
:loading="emailLoading"
style="margin-left: 10px"
>
{{ $t('reviewers-list:button:sendEmail') }}
</el-button>
</div>
</template>
</base-model>
<!--新增或修改简历-->
<el-dialog title="" :visible.sync="visible" fullscreen v-if="visible">
<reviewerAdd :isSystem="false" v-if="resumeType === 'add'" />
<reviewerEdit
:isSystem="false"
:reviewerId="reviewerId"
v-if="resumeType === 'edit'"
/>
</el-dialog>
</BaseContainer>
</template>
<script>
@ -272,10 +397,13 @@ import Pagination from '@/components/Pagination'
import store from '@/store'
import { mapGetters } from 'vuex'
import { getSelectionReviewerList, selectReviewers } from '@/api/trials'
import BaseModel from '@/components/BaseModel'
import reviewerAdd from '@/views/reviewers/new'
import reviewerEdit from '@/views/reviewers/edit'
const getListQueryDefault = () => {
return {
TrialId: '',
Name:'',
Name: '',
ReadingTypeIds: [],
SubspecialityIds: [],
PageIndex: 1,
@ -287,12 +415,18 @@ const getListQueryDefault = () => {
SortField: '',
AcceptingNewTrial: true,
InformationConfirmed: true,
ContractorStatus: 1
ContractorStatus: 1,
}
}
export default {
name: 'Selection',
components: { BaseContainer, Pagination },
components: {
BaseContainer,
Pagination,
BaseModel,
reviewerAdd,
reviewerEdit,
},
dicts: ['ReadingType', 'Subspeciality', 'Position', 'Rank'],
data() {
return {
@ -303,14 +437,54 @@ export default {
listLoading: false,
selectIdArr: [],
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
token: store.getters.token
token: store.getters.token,
share_model: { visible: false, title: '', width: '500px' },
shareLink: null,
email: null,
emailLoading: false,
visible: false,
resumeType: 'add',
reviewerId: null,
}
},
computed: {
...mapGetters(['hospitalList'])
...mapGetters(['hospitalList']),
},
created() {
this.initPage()
},
created() { this.initPage() },
methods: {
copyCode() {
this.$copyText(
`${this.$t('reviewers-list:button:copyCode')}: ${this.shareLink}`
)
.then((res) => {
this.$message.success(
this.$t('trials:researchRecord:message:copySuccessfully')
)
})
.catch(() => {
this.$alert(this.$t('trials:researchRecord:message:copyFailed'))
})
},
//
resumeCollection() {
this.shareLink = `${location.protocol}//${location.host}/ReviewersResearch?lang=${this.$store.getters.language}`
this.email = null
this.share_model.visible = true
},
//
sendEmail() {
this.$message.success('123')
},
//
openViewer(type, row) {
this.resumeType = type
if (row) {
this.reviewerId = row.Id
}
this.visible = true
},
go(path) {
window.open(path)
},
@ -321,29 +495,35 @@ export default {
getList() {
this.listLoading = true
this.listQuery.TrialId = this.$route.query.trialId
getSelectionReviewerList(this.listQuery).then(res => {
this.listLoading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
// eslint-disable-next-line handle-callback-err
}).catch(() => { this.listLoading = false })
getSelectionReviewerList(this.listQuery)
.then((res) => {
this.listLoading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
// eslint-disable-next-line handle-callback-err
})
.catch(() => {
this.listLoading = false
})
},
handleApply() {
this.$confirm(this.$t('trials:seletctedReviews:message:msg1'), {
type: 'warning'
type: 'warning',
}).then(() => {
this.loading = true
const trialId = this.$route.query.trialId
selectReviewers(trialId, this.selectIdArr).then(res => {
this.loading = false
if (res.IsSuccess) {
this.getList()
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$emit('nextStep', 'submission')
}
}).catch(() => {
this.loading = false
})
selectReviewers(trialId, this.selectIdArr)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.getList()
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$emit('nextStep', 'submission')
}
})
.catch(() => {
this.loading = false
})
})
},
handleSelectionChange(val) {
@ -368,9 +548,13 @@ export default {
return 'selected'
}
},
handleSelectTable(row) { return row.DoctorTrialState !== 1 },
handleSelectTable(row) {
return row.DoctorTrialState !== 1
},
handleDetail(row) {
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}`,
})
window.open(href, '_blank')
},
handleSearch() {
@ -380,8 +564,16 @@ export default {
handleReset() {
this.listQuery = getListQueryDefault()
this.getList()
}
}
},
},
}
</script>
<style lang="scss" scoped>
.sendEmailBox {
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>