Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
f1f27f405b
|
@ -14,8 +14,7 @@ service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
|
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
|
||||||
var language = zzSessionStorage.getItem('lang')
|
var language = zzSessionStorage.getItem('lang')
|
||||||
config.headers['Accept-Language'] = language === 'en'?'en-US,en;q=0.5':'zh-CN,zh;q=0.9'
|
config.headers['Accept-Language'] = language === 'en'?'en-US,en;q=0.5':'zh-CN,zh;q=0.9'
|
||||||
console.log(config.headers)
|
|
||||||
if (store.getters.token) {
|
if (store.getters.token) {
|
||||||
config.headers.Authorization = `Bearer ${store.getters.token}`
|
config.headers.Authorization = `Bearer ${store.getters.token}`
|
||||||
}
|
}
|
||||||
|
|
|
@ -374,6 +374,7 @@ export default {
|
||||||
reviewerId() {
|
reviewerId() {
|
||||||
if (this.reviewerId) {
|
if (this.reviewerId) {
|
||||||
this.doctorId = this.reviewerId
|
this.doctorId = this.reviewerId
|
||||||
|
this.initSowList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -476,6 +477,7 @@ export default {
|
||||||
FilePath: null,
|
FilePath: null,
|
||||||
DoctorId: null,
|
DoctorId: null,
|
||||||
CriterionType: null,
|
CriterionType: null,
|
||||||
|
IsEnable: false,
|
||||||
}
|
}
|
||||||
this.handleRemoveFile2()
|
this.handleRemoveFile2()
|
||||||
this.form.FileType = fileType
|
this.form.FileType = fileType
|
||||||
|
|
|
@ -241,10 +241,11 @@ export default {
|
||||||
reviewerId() {
|
reviewerId() {
|
||||||
if (this.reviewerId) {
|
if (this.reviewerId) {
|
||||||
this.doctorId = this.reviewerId
|
this.doctorId = this.reviewerId
|
||||||
|
this.getResumeList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
if (!this.doctorId) return
|
if (!this.doctorId) return
|
||||||
this.getResumeList()
|
this.getResumeList()
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,115 +5,371 @@
|
||||||
<div class="file_title">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:agreement:fileTitle') }}
|
{{ $t('curriculumVitae:agreement:fileTitle') }}
|
||||||
</div>
|
</div>
|
||||||
<template v-if="true">
|
<template v-if="sowList && sowList.length > 0">
|
||||||
<div class="file" v-for="item in [1, 2]" :key="item">
|
<div class="file" v-for="item in sowList" :key="item.Id">
|
||||||
<div class="name">简历1</div>
|
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||||
<i
|
<i
|
||||||
class="el-icon-view"
|
class="el-icon-view"
|
||||||
:title="$t('common:button:preview')"
|
:title="$t('common:button:preview')"
|
||||||
@click.stop="preview"
|
@click.stop="handlePreview3(item)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-edit"
|
||||||
|
:title="$t('common:button:edit')"
|
||||||
|
v-if="item.IsIRUpload"
|
||||||
|
@click="
|
||||||
|
handleEditCol(item, 0, $t('trials:enrolledReviews:message:SOW'))
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-delete"
|
||||||
|
v-if="item.IsIRUpload"
|
||||||
|
:title="$t('common:button:delete')"
|
||||||
|
@click="handleRemoveFile3(item)"
|
||||||
/>
|
/>
|
||||||
<i class="el-icon-delete" :title="$t('common:button:delete')" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
||||||
<div class="btnBox">
|
<div class="btnBox" style="margin-top: 10px">
|
||||||
<div style="position: relative">
|
<el-button
|
||||||
<el-button
|
type="primary"
|
||||||
type="primary"
|
size="small"
|
||||||
size="small"
|
@click.stop="addCol(0, $t('trials:enrolledReviews:message:SOW'))"
|
||||||
:disabled="loading"
|
>
|
||||||
:loading="loading"
|
{{ $t('curriculumVitae:agreement:btn:upload') }}
|
||||||
>
|
</el-button>
|
||||||
{{ $t('curriculumVitae:agreement:btn:upload') }}
|
<el-button
|
||||||
</el-button>
|
type="text"
|
||||||
<input
|
@click.stop="handleDownload('Reviewer_SOW_Template')"
|
||||||
type="file"
|
>
|
||||||
name="file"
|
{{ $t('common:button:downloadTpl') }}
|
||||||
multiple
|
</el-button>
|
||||||
ref="upload"
|
|
||||||
:title="$t('curriculumVitae:agreement:btn:upload')"
|
|
||||||
style="
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
opacity: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
"
|
|
||||||
:accept="faccept.join(',')"
|
|
||||||
@change="($event) => beginScanFiles($event)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<el-button type="text">{{ $t('common:button:downloadTpl') }}</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<template v-if="true">
|
<template v-if="CounselorFiles">
|
||||||
<div class="file_title">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:agreement:Counselor') }}
|
{{ $t('curriculumVitae:agreement:Counselor') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="file" v-for="item in [1, 2]" :key="item">
|
<div class="file" v-for="item in CounselorFiles" :key="item.Id">
|
||||||
<div class="name">简历1</div>
|
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||||
<i
|
<i
|
||||||
class="el-icon-view"
|
class="el-icon-view"
|
||||||
:title="$t('common:button:preview')"
|
:title="$t('common:button:preview')"
|
||||||
@click.stop="preview"
|
@click.stop="preview(item)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="true">
|
<template v-if="ackSowList && ackSowList.length > 0">
|
||||||
<div class="file_title">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:agreement:confirmation') }}
|
{{ $t('curriculumVitae:agreement:confirmation') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="file" v-for="item in [1, 2]" :key="item">
|
<div class="file" v-for="item in ackSowList" :key="item.Id">
|
||||||
<div class="name">简历1</div>
|
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||||
<i
|
<i
|
||||||
class="el-icon-view"
|
class="el-icon-view"
|
||||||
:title="$t('common:button:preview')"
|
:title="$t('common:button:preview')"
|
||||||
@click.stop="preview"
|
@click.stop="handlePreview3(item)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
<BaseModel :config="model_cfg">
|
||||||
|
<template slot="dialog-body">
|
||||||
|
<el-form
|
||||||
|
ref="DictionaryTypeConfigForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="120px"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
<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"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('system:Agreements:label:File')"
|
||||||
|
prop="FilePath"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
class="upload-demo"
|
||||||
|
action
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:http-request="handleUploadFile"
|
||||||
|
:on-preview="handlePreview2"
|
||||||
|
:on-remove="handleRemoveFile2"
|
||||||
|
:show-file-list="true"
|
||||||
|
:limit="1"
|
||||||
|
:file-list="fileList"
|
||||||
|
>
|
||||||
|
<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-form-item>
|
||||||
|
<el-form-item :label="$t('system:Agreements:label:Is Enable')">
|
||||||
|
<el-switch
|
||||||
|
v-model="form.IsEnable"
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</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>
|
||||||
|
</template>
|
||||||
|
</BaseModel>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { DownloadCommonDoc } from '@/api/dictionary'
|
||||||
|
import {
|
||||||
|
addDoctorCriterionFile,
|
||||||
|
deleteDoctorCriterionFile,
|
||||||
|
getDoctorCriterionFile,
|
||||||
|
} from '@/api/reviewers'
|
||||||
|
import BaseModel from '@/components/BaseModel'
|
||||||
export default {
|
export default {
|
||||||
name: 'agreement',
|
name: 'agreement',
|
||||||
data() {
|
components: {
|
||||||
return {
|
BaseModel,
|
||||||
faccept: ['.pdf'],
|
|
||||||
loading: false,
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
props: {
|
||||||
preview() {
|
DATA: {
|
||||||
this.$preview({
|
type: Array,
|
||||||
path: '',
|
default: () => {
|
||||||
type: '',
|
return []
|
||||||
title: '',
|
},
|
||||||
})
|
|
||||||
},
|
},
|
||||||
beginScanFiles(e) {
|
reviewerId: {
|
||||||
let files = e.target.files
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
isEN: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
faccept: ['.pdf'],
|
faccept: ['.pdf'],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
agreementList: [],
|
||||||
|
sowList: [],
|
||||||
|
ackSowList: [],
|
||||||
|
loading: false,
|
||||||
|
isOpen: false,
|
||||||
|
btnLoading: false,
|
||||||
|
model_cfg: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '600px',
|
||||||
|
title: '',
|
||||||
|
appendToBody: true,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
Remark: null,
|
||||||
|
FileType: null,
|
||||||
|
FileName: null,
|
||||||
|
FilePath: null,
|
||||||
|
DoctorId: null,
|
||||||
|
CriterionType: null,
|
||||||
|
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'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
fileList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
reviewerId() {
|
||||||
|
if (this.reviewerId) {
|
||||||
|
this.initSowList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
CounselorFiles() {
|
||||||
|
if (!this.DATA || this.DATA.length <= 0) return false
|
||||||
|
return this.DATA.filter(
|
||||||
|
(item) => item.Type && item.Type.indexOf('Consultant Agreement') >= 0
|
||||||
|
)
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
preview() {
|
preview(row) {
|
||||||
this.$preview({
|
this.$preview({
|
||||||
path: '',
|
path: row.FullPath,
|
||||||
type: '',
|
type: 'pdf',
|
||||||
title: '',
|
title: row.FileName,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
beginScanFiles(e) {
|
handleDownload(code) {
|
||||||
let files = e.target.files
|
this.loading = true
|
||||||
|
DownloadCommonDoc(code)
|
||||||
|
.then((data) => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleEditCol(row, fileType, title) {
|
||||||
|
this.model_cfg.visible = true
|
||||||
|
this.form = Object.assign({}, row)
|
||||||
|
this.fileList[0] = { name: row.FileName, path: row.FilePath }
|
||||||
|
this.form.FileType = fileType
|
||||||
|
this.model_cfg.title = title
|
||||||
|
},
|
||||||
|
handleRemoveFile3(row) {
|
||||||
|
this.$confirm(
|
||||||
|
this.$t('dictionary:attachment:export:confirm:delete')
|
||||||
|
).then(() => {
|
||||||
|
deleteDoctorCriterionFile({
|
||||||
|
Id: row.Id,
|
||||||
|
}).then(() => {
|
||||||
|
this.initSowList()
|
||||||
|
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleRemoveFile2() {
|
||||||
|
this.form.FileName = null
|
||||||
|
this.form.FilePath = null
|
||||||
|
this.fileList = []
|
||||||
|
},
|
||||||
|
beforeUpload() {
|
||||||
|
if (this.fileList.length > 0) {
|
||||||
|
// this.$alert('最多只能传一个附件')
|
||||||
|
this.$alert(this.$t('upload:rule:maxFile1'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handlePreview3(row) {
|
||||||
|
if (row.FilePath) {
|
||||||
|
window.open(this.OSSclientConfig.basePath + row.FilePath, '_blank')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handlePreview2(row, r2) {
|
||||||
|
if (row.fullPath) {
|
||||||
|
window.open(this.OSSclientConfig.basePath + row.fullPath, '_blank')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleUploadFile(param) {
|
||||||
|
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.reviewerId}/${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.btnLoading = false
|
||||||
|
},
|
||||||
|
handleCancle() {
|
||||||
|
this.model_cfg.visible = false
|
||||||
|
},
|
||||||
|
handleSave() {
|
||||||
|
this.$refs['DictionaryTypeConfigForm'].validate((valid) => {
|
||||||
|
if (!valid) return
|
||||||
|
this.form.DoctorId = this.reviewerId
|
||||||
|
this.form.CriterionName = this.$fd(
|
||||||
|
'CriterionType',
|
||||||
|
this.form.CriterionType
|
||||||
|
)
|
||||||
|
this.form.IsIRUpload = true
|
||||||
|
addDoctorCriterionFile(this.form).then((res) => {
|
||||||
|
this.$message.success('添加成功')
|
||||||
|
this.initSowList()
|
||||||
|
this.handleCancle()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addCol(fileType, title) {
|
||||||
|
this.model_cfg.visible = true
|
||||||
|
this.form = {
|
||||||
|
Remark: null,
|
||||||
|
FileType: null,
|
||||||
|
FileName: null,
|
||||||
|
FilePath: null,
|
||||||
|
DoctorId: null,
|
||||||
|
CriterionType: null,
|
||||||
|
IsEnable: false,
|
||||||
|
}
|
||||||
|
this.handleRemoveFile2()
|
||||||
|
this.form.FileType = fileType
|
||||||
|
this.model_cfg.title = title
|
||||||
|
},
|
||||||
|
initSowList() {
|
||||||
|
if (!this.reviewerId) return
|
||||||
|
getDoctorCriterionFile({
|
||||||
|
fileType: 0,
|
||||||
|
DoctorId: this.reviewerId,
|
||||||
|
}).then((res) => {
|
||||||
|
this.sowList = res.Result
|
||||||
|
})
|
||||||
|
getDoctorCriterionFile({
|
||||||
|
fileType: 1,
|
||||||
|
DoctorId: this.reviewerId,
|
||||||
|
}).then((res) => {
|
||||||
|
this.ackSowList = res.Result
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,117 +6,293 @@
|
||||||
<div class="file_title">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:certificate:fileTitle:diploma') }}
|
{{ $t('curriculumVitae:certificate:fileTitle:diploma') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="file" v-if="true">
|
<div class="file" v-if="diplomaFile">
|
||||||
<div class="name">简历1</div>
|
<div class="name" :title="diplomaFile.FileName">
|
||||||
|
{{ diplomaFile.FileName }}
|
||||||
|
</div>
|
||||||
<i
|
<i
|
||||||
class="el-icon-view"
|
class="el-icon-view"
|
||||||
:title="$t('common:button:preview')"
|
:title="$t('common:button:preview')"
|
||||||
@click.stop="preview"
|
@click.stop="preview(diplomaFile)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-delete"
|
||||||
|
:title="$t('common:button:delete')"
|
||||||
|
@click.stop="handleRemoveFile(diplomaFile)"
|
||||||
/>
|
/>
|
||||||
<i class="el-icon-delete" :title="$t('common:button:delete')" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
||||||
<!--医师资格证-->
|
<!--医师资格证-->
|
||||||
<div class="file_title" v-if="true">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:certificate:fileTitle:certificate') }}
|
{{ $t('curriculumVitae:certificate:fileTitle:certificate') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
<div class="file" v-if="certificateFile">
|
||||||
<div class="file">
|
<div class="name" :title="certificateFile.FileName">
|
||||||
<div class="name">简历1</div>
|
{{ certificateFile.FileName }}
|
||||||
|
</div>
|
||||||
<i
|
<i
|
||||||
class="el-icon-view"
|
class="el-icon-view"
|
||||||
:title="$t('common:button:preview')"
|
:title="$t('common:button:preview')"
|
||||||
@click.stop="preview"
|
@click.stop="preview(certificateFile)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-delete"
|
||||||
|
:title="$t('common:button:delete')"
|
||||||
|
@click.stop="handleRemoveFile(certificateFile)"
|
||||||
/>
|
/>
|
||||||
<i class="el-icon-delete" :title="$t('common:button:delete')" />
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
||||||
<!--医师执业证-->
|
<!--医师执业证-->
|
||||||
<div class="file_title" v-if="true">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:certificate:fileTitle:license') }}
|
{{ $t('curriculumVitae:certificate:fileTitle:license') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
<div class="file" v-if="licenseFile">
|
||||||
<div class="file">
|
<div class="name" :title="licenseFile.FileName">
|
||||||
<div class="name">简历1</div>
|
{{ licenseFile.FileName }}
|
||||||
|
</div>
|
||||||
<i
|
<i
|
||||||
class="el-icon-view"
|
class="el-icon-view"
|
||||||
:title="$t('common:button:preview')"
|
:title="$t('common:button:preview')"
|
||||||
@click.stop="preview"
|
@click.stop="preview(licenseFile)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-delete"
|
||||||
|
:title="$t('common:button:delete')"
|
||||||
|
@click.stop="handleRemoveFile(licenseFile)"
|
||||||
/>
|
/>
|
||||||
<i class="el-icon-delete" :title="$t('common:button:delete')" />
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
||||||
<!--大型医用设备上岗证-->
|
<!--大型医用设备上岗证-->
|
||||||
<div class="file_title">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:certificate:fileTitle:workPermit') }}
|
{{ $t('curriculumVitae:certificate:fileTitle:workPermit') }}
|
||||||
</div>
|
</div>
|
||||||
<template v-if="true">
|
<template v-if="workPermitFiles && workPermitFiles.length > 0">
|
||||||
<div class="file_title">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:certificate:fileTitle:CT') }}
|
{{ $t('curriculumVitae:certificate:fileTitle:CT') }}
|
||||||
</div>
|
</div>
|
||||||
<div v-for="item in [1, 2]" :key="item">
|
<div v-for="item in workPermitFiles" :key="item.Id">
|
||||||
<div class="file">
|
<div class="file">
|
||||||
<div class="name">简历1</div>
|
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||||
<i
|
<i
|
||||||
class="el-icon-view"
|
class="el-icon-view"
|
||||||
:title="$t('common:button:preview')"
|
:title="$t('common:button:preview')"
|
||||||
@click.stop="preview"
|
@click.stop="preview(item)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-delete"
|
||||||
|
:title="$t('common:button:delete')"
|
||||||
|
@click.stop="handleRemoveFile(item)"
|
||||||
/>
|
/>
|
||||||
<i class="el-icon-delete" :title="$t('common:button:delete')" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
||||||
<div class="btnBox">
|
<div class="btnBox" style="margin-top: 10px">
|
||||||
<div style="position: relative">
|
<el-button
|
||||||
<el-button
|
type="primary"
|
||||||
type="primary"
|
size="small"
|
||||||
size="small"
|
:disabled="loading"
|
||||||
:disabled="loading"
|
:loading="loading"
|
||||||
:loading="loading"
|
@click.stop="openBox"
|
||||||
>
|
>
|
||||||
{{ $t('curriculumVitae:certificate:btn:upload') }}
|
{{ $t('curriculumVitae:certificate:btn:upload') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<input
|
|
||||||
type="file"
|
|
||||||
name="file"
|
|
||||||
multiple
|
|
||||||
ref="upload"
|
|
||||||
:title="$t('curriculumVitae:certificate:btn:upload')"
|
|
||||||
style="
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
opacity: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
"
|
|
||||||
:accept="faccept.join(',')"
|
|
||||||
@change="($event) => beginScanFiles($event)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<base-model :config="model_cfg">
|
||||||
|
<template slot="dialog-body">
|
||||||
|
<div class="box">
|
||||||
|
<div class="clearfix">
|
||||||
|
<p style="line-height: 30px; font-size: 13px">
|
||||||
|
{{ $t('system:Credentials:title:Default Certificate') }}
|
||||||
|
</p>
|
||||||
|
<el-card class="e-card">
|
||||||
|
<p class="title">
|
||||||
|
{{
|
||||||
|
$t(
|
||||||
|
'system:Credentials:title:Diploma of the highest medical degree'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</p>
|
||||||
|
<upload-file
|
||||||
|
:doctor-id="reviewerId"
|
||||||
|
type="Diploma of the highest medical degree"
|
||||||
|
@getFileList="$emit('getInfo')"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="e-card">
|
||||||
|
<p class="title">
|
||||||
|
{{
|
||||||
|
$t(
|
||||||
|
'system:Credentials:title:Medical Qualification Certificate'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</p>
|
||||||
|
<upload-file
|
||||||
|
:doctor-id="reviewerId"
|
||||||
|
type="Medical Qualification Certificate"
|
||||||
|
@getFileList="$emit('getInfo')"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="e-card">
|
||||||
|
<p class="title">
|
||||||
|
{{ $t('system:Credentials:title:Practice License') }}
|
||||||
|
</p>
|
||||||
|
<upload-file
|
||||||
|
:doctor-id="reviewerId"
|
||||||
|
type="Practice License"
|
||||||
|
@getFileList="$emit('getInfo')"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix">
|
||||||
|
<p style="line-height: 30px; font-size: 13px">
|
||||||
|
{{ $t('system:Credentials:title:Modality Certificate') }}
|
||||||
|
</p>
|
||||||
|
<el-card class="e-card">
|
||||||
|
<p class="title">CT</p>
|
||||||
|
<upload-file
|
||||||
|
:doctor-id="reviewerId"
|
||||||
|
type="Modality Certificate(CT)"
|
||||||
|
@getFileList="$emit('getInfo')"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="e-card">
|
||||||
|
<p class="title">MRI</p>
|
||||||
|
<upload-file
|
||||||
|
:doctor-id="reviewerId"
|
||||||
|
type="Modality Certificate(MRI)"
|
||||||
|
@getFileList="$emit('getInfo')"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="e-card">
|
||||||
|
<p class="title">NM</p>
|
||||||
|
<upload-file
|
||||||
|
:doctor-id="reviewerId"
|
||||||
|
type="Modality Certificate(NM)"
|
||||||
|
@getFileList="$emit('getInfo')"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="e-card">
|
||||||
|
<p class="title">US</p>
|
||||||
|
<upload-file
|
||||||
|
:doctor-id="reviewerId"
|
||||||
|
type="Modality Certificate(US)"
|
||||||
|
@getFileList="$emit('getInfo')"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template slot="dialog-footer">
|
||||||
|
<el-button size="small" type="primary" @click="handleCancle">
|
||||||
|
{{ $t('common:button:confirm') }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</base-model>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import PreviewFile from '@/components/PreviewFile/index'
|
import PreviewFile from '@/components/PreviewFile/index'
|
||||||
|
import BaseModel from '@/components/BaseModel'
|
||||||
|
import UploadFile from '@/components/UploadFile'
|
||||||
|
import { deleteAttachment } from '@/api/attachment'
|
||||||
export default {
|
export default {
|
||||||
name: 'certificate',
|
name: 'certificate',
|
||||||
components: {
|
components: {
|
||||||
PreviewFile,
|
PreviewFile,
|
||||||
|
BaseModel,
|
||||||
|
UploadFile,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
DATA: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
},
|
||||||
|
},
|
||||||
|
reviewerId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
isEN: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
faccept: ['.pdf'],
|
faccept: ['.pdf'],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
model_cfg: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '800px',
|
||||||
|
title: this.$t('curriculumVitae:certificate:form:title'),
|
||||||
|
appendToBody: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
//最高医学学位毕业证书
|
||||||
|
diplomaFile() {
|
||||||
|
if (!this.DATA || this.DATA.length <= 0) return false
|
||||||
|
return this.DATA.find(
|
||||||
|
(item) => item.Type === 'Diploma of the highest medical degree'
|
||||||
|
)
|
||||||
|
},
|
||||||
|
//医师资格证
|
||||||
|
certificateFile() {
|
||||||
|
if (!this.DATA || this.DATA.length <= 0) return false
|
||||||
|
return this.DATA.find(
|
||||||
|
(item) => item.Type === 'Medical Qualification Certificate'
|
||||||
|
)
|
||||||
|
},
|
||||||
|
//医师执业证
|
||||||
|
licenseFile() {
|
||||||
|
if (!this.DATA || this.DATA.length <= 0) return false
|
||||||
|
return this.DATA.find((item) => item.Type === 'Practice License')
|
||||||
|
},
|
||||||
|
//大型医用设备上岗证
|
||||||
|
workPermitFiles() {
|
||||||
|
if (!this.DATA || this.DATA.length <= 0) return false
|
||||||
|
return this.DATA.filter(
|
||||||
|
(item) => item.Type && item.Type.indexOf('Modality Certificate') >= 0
|
||||||
|
)
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
preview() {
|
openBox() {
|
||||||
|
this.model_cfg.visible = true
|
||||||
|
},
|
||||||
|
handleCancle() {},
|
||||||
|
handleRemoveFile(row) {
|
||||||
|
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
deleteAttachment(row.Id, row.Path).then((res) => {
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$emit('getInfo')
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('common:message:deletedSuccessfully'),
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch((action) => {})
|
||||||
|
},
|
||||||
|
preview(row) {
|
||||||
this.$preview({
|
this.$preview({
|
||||||
path: '',
|
path: row.FullPath,
|
||||||
type: '',
|
type: 'pdf',
|
||||||
title: '',
|
title: row.FileName,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
beginScanFiles(e) {
|
beginScanFiles(e) {
|
||||||
|
@ -126,4 +302,20 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
// ::v-deep .el-dialog__body {
|
||||||
|
// padding-top: 0;
|
||||||
|
// }
|
||||||
|
.box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.clearfix {
|
||||||
|
width: 48%;
|
||||||
|
.e-card {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -5,14 +5,23 @@
|
||||||
<div class="file_title">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:curriculum:fileTitle:CN') }}
|
{{ $t('curriculumVitae:curriculum:fileTitle:CN') }}
|
||||||
</div>
|
</div>
|
||||||
<template v-if="true">
|
<template v-if="resumeListCN.length > 0">
|
||||||
<div class="file" v-for="item in [1, 2]" :key="item">
|
<div class="file" v-for="item in resumeListCN" :key="item.Id">
|
||||||
<div class="name">简历1</div>
|
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||||
<i class="el-icon-download" :title="$t('common:button:download')" />
|
|
||||||
<i class="el-icon-delete" :title="$t('common:button:delete')" />
|
|
||||||
<i
|
<i
|
||||||
class="el-icon-circle-check"
|
class="el-icon-download"
|
||||||
|
:title="$t('common:button:download')"
|
||||||
|
@click.stop="handlePreview(item)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-delete"
|
||||||
|
:title="$t('common:button:delete')"
|
||||||
|
@click.stop="handleRemoveFile(item)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
:class="{ 'el-icon-circle-check': true, disable: item.IsOfficial }"
|
||||||
:title="$t('common:button:default')"
|
:title="$t('common:button:default')"
|
||||||
|
@click.stop="handleSetOfiical(item)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -20,95 +29,289 @@
|
||||||
<div class="file_title">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:curriculum:fileTitle:EN') }}
|
{{ $t('curriculumVitae:curriculum:fileTitle:EN') }}
|
||||||
</div>
|
</div>
|
||||||
<template v-if="true">
|
<template v-if="resumeListEN.length > 0">
|
||||||
<div class="file" v-for="item in [1, 2]" :key="item">
|
<div class="file" v-for="item in resumeListEN" :key="item">
|
||||||
<div class="name">Resume</div>
|
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||||
<i class="el-icon-download" :title="$t('common:button:download')" />
|
|
||||||
<i class="el-icon-delete" :title="$t('common:button:delete')" />
|
|
||||||
<i
|
<i
|
||||||
class="el-icon-circle-check"
|
class="el-icon-download"
|
||||||
:title="$t('common:button:default')"
|
:title="$t('common:button:download')"
|
||||||
|
@click.stop="handlePreview(item)"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-delete"
|
||||||
|
:title="$t('common:button:delete')"
|
||||||
|
@click.stop="handleRemoveFile(item)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
||||||
<div class="btnBox">
|
<div class="btnBox" style="margin-top: 20px">
|
||||||
<div style="position: relative">
|
<div class="uploadFile-container" style="margin-right: 10px">
|
||||||
<el-button
|
<el-upload
|
||||||
type="primary"
|
class="upload-demo"
|
||||||
size="small"
|
:data="{ language: 1 }"
|
||||||
:disabled="loading"
|
action
|
||||||
:loading="loading"
|
:show-file-list="false"
|
||||||
|
:http-request="handleUploadFile"
|
||||||
|
:file-list="resumeList"
|
||||||
|
accept=".doc,.docx"
|
||||||
>
|
>
|
||||||
{{ $t('curriculumVitae:curriculum:btn:uploadCN') }}
|
<el-button size="small" type="primary">
|
||||||
</el-button>
|
{{ $t('curriculumVitae:curriculum:btn:uploadCN') }}
|
||||||
<input
|
</el-button>
|
||||||
type="file"
|
</el-upload>
|
||||||
name="file"
|
|
||||||
multiple
|
|
||||||
ref="uploadCN"
|
|
||||||
:title="$t('curriculumVitae:curriculum:btn:uploadCN')"
|
|
||||||
style="
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
opacity: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
"
|
|
||||||
:accept="faccept.join(',')"
|
|
||||||
@change="($event) => beginScanFiles($event)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<el-button type="text">{{ $t('common:button:downloadTpl') }}</el-button>
|
<!-- <el-button
|
||||||
|
type="text"
|
||||||
|
@click.stop="handleDownload('Reviewer_resume_Template')"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:downloadTpl') }}
|
||||||
|
</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="btnBox">
|
<div class="btnBox">
|
||||||
<div style="position: relative">
|
<div class="uploadFile-container" style="margin-right: 10px">
|
||||||
<el-button
|
<el-upload
|
||||||
type="primary"
|
class="upload-demo"
|
||||||
size="small"
|
:data="{ language: 2 }"
|
||||||
:disabled="loading"
|
action
|
||||||
:loading="loading"
|
:show-file-list="false"
|
||||||
|
:http-request="handleUploadFile"
|
||||||
|
:file-list="resumeList"
|
||||||
|
accept=".doc,.docx"
|
||||||
>
|
>
|
||||||
{{ $t('curriculumVitae:curriculum:btn:uploadEN') }}
|
<el-button size="small" type="primary">
|
||||||
</el-button>
|
{{ $t('curriculumVitae:curriculum:btn:uploadEN') }}
|
||||||
<input
|
</el-button>
|
||||||
type="file"
|
</el-upload>
|
||||||
name="file"
|
|
||||||
multiple
|
|
||||||
ref="uploadEN"
|
|
||||||
:title="$t('curriculumVitae:curriculum:btn:uploadEN')"
|
|
||||||
style="
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
opacity: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
"
|
|
||||||
:accept="faccept.join(',')"
|
|
||||||
@change="($event) => beginScanFiles($event)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<el-button type="text">{{ $t('common:button:downloadTpl') }}</el-button>
|
<!-- <el-button
|
||||||
|
type="text"
|
||||||
|
@click.stop="handleDownload('Reviewer_resume_Template')"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:downloadTpl') }}
|
||||||
|
</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
getAttachmentByType,
|
||||||
|
saveAttachments,
|
||||||
|
deleteAttachment,
|
||||||
|
setOfficial,
|
||||||
|
setLanguageForResume,
|
||||||
|
} from '@/api/attachment'
|
||||||
|
import { DownloadCommonDoc } from '@/api/dictionary'
|
||||||
export default {
|
export default {
|
||||||
name: 'curriculum',
|
name: 'curriculum',
|
||||||
|
props: {
|
||||||
|
reviewerId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
isEN: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
faccept: ['.pdf'],
|
|
||||||
loading: false,
|
loading: false,
|
||||||
|
resumeList: [],
|
||||||
|
resumeListEN: [],
|
||||||
|
resumeListCN: [],
|
||||||
|
language: 0,
|
||||||
|
dialogVisible: false,
|
||||||
|
currentRow: {},
|
||||||
|
repeat: false,
|
||||||
|
isDisabled: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
reviewerId() {
|
||||||
|
if (this.reviewerId) {
|
||||||
|
this.getResumeList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
beginScanFiles(e) {
|
handleDownload(code) {
|
||||||
let files = e.target.files
|
this.loading = true
|
||||||
|
DownloadCommonDoc(code)
|
||||||
|
.then((data) => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getResumeList() {
|
||||||
|
this.loading = true
|
||||||
|
getAttachmentByType(this.reviewerId, 'Resume')
|
||||||
|
.then((res) => {
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
if (res.Result.length > 0) {
|
||||||
|
this.resumeList = res.Result
|
||||||
|
this.filterByLanguage()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleUploadFile(param) {
|
||||||
|
this.repeat = false
|
||||||
|
// const fileName = param.file.name.substring(0, param.file.name.lastIndexOf('.'))
|
||||||
|
// const extension = param.file.name.substring(param.file.name.lastIndexOf('.'))
|
||||||
|
// 检测文件后缀名
|
||||||
|
if (this.checkFileSuffix(param.file.name) > -1) {
|
||||||
|
// 检测是否有重名文件
|
||||||
|
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',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
// 重名覆盖
|
||||||
|
this.repeat = true
|
||||||
|
this.uploadFile(param.file, param.data.language)
|
||||||
|
})
|
||||||
|
.catch((action) => {})
|
||||||
|
} else {
|
||||||
|
this.uploadFile(param.file, param.data.language)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$alert(`Must be in ${this.accept} format`)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async uploadFile(file, language) {
|
||||||
|
this.isDisabled = true
|
||||||
|
var fileName = file.name
|
||||||
|
var files = this.resumeList
|
||||||
|
file = await this.fileToBlob(file)
|
||||||
|
let res = await this.OSSclient.put(
|
||||||
|
`/SystemData/reviewer/Resume/${this.reviewerId}/${fileName}`,
|
||||||
|
file
|
||||||
|
)
|
||||||
|
if (this.repeat) {
|
||||||
|
const index = files.findIndex((item, index) => {
|
||||||
|
return item.FileName === fileName
|
||||||
|
})
|
||||||
|
files[index].Path = this.$getObjectName(res.url)
|
||||||
|
files[index].FullPath = this.$getObjectName(res.url)
|
||||||
|
files[index].ReUpload = true
|
||||||
|
files[index].Language = language
|
||||||
|
} else {
|
||||||
|
const fileData = {
|
||||||
|
DoctorId: this.reviewerId,
|
||||||
|
Type: 'Resume',
|
||||||
|
Path: this.$getObjectName(res.url),
|
||||||
|
FullPath: this.$getObjectName(res.url),
|
||||||
|
FileName: fileName,
|
||||||
|
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
|
||||||
|
})
|
||||||
|
},
|
||||||
|
filterByLanguage() {
|
||||||
|
this.resumeListEN = []
|
||||||
|
this.resumeListCN = []
|
||||||
|
this.resumeList.map((resume) => {
|
||||||
|
if (resume.Language === 2) {
|
||||||
|
this.resumeListEN.push(resume)
|
||||||
|
} else if (resume.Language === 1) {
|
||||||
|
this.resumeListCN.push(resume)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
checkFileSuffix(fileName) {
|
||||||
|
const accept = '.doc, .docx'
|
||||||
|
var index = fileName.lastIndexOf('.')
|
||||||
|
var suffix = fileName
|
||||||
|
.substring(index + 1, fileName.length)
|
||||||
|
.toLocaleLowerCase()
|
||||||
|
return accept.search(suffix)
|
||||||
|
},
|
||||||
|
handlePreview(row) {
|
||||||
|
if (row.FullPath) {
|
||||||
|
window.open(this.OSSclientConfig.basePath + row.FullPath, '_blank')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleRemoveFile(row) {
|
||||||
|
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
deleteAttachment(row.Id, row.Path).then((res) => {
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.resumeList.splice(
|
||||||
|
this.resumeList.findIndex((item) => item.Id === row.Id),
|
||||||
|
1
|
||||||
|
)
|
||||||
|
this.filterByLanguage()
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('common:message:deletedSuccessfully'),
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch((action) => {})
|
||||||
|
},
|
||||||
|
handleSetOfiical(row) {
|
||||||
|
if (row.IsOfficial) return false
|
||||||
|
setOfficial(this.reviewerId, row.Id, row.Language).then((res) => {
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getResumeList()
|
||||||
|
this.$message({
|
||||||
|
message: 'Saved successfully!',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleLanguageClick(row) {
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.language = row.Language
|
||||||
|
this.currentRow = row
|
||||||
|
},
|
||||||
|
setResumeLanguage() {
|
||||||
|
setLanguageForResume(
|
||||||
|
this.reviewerId,
|
||||||
|
this.currentRow.Id,
|
||||||
|
this.language
|
||||||
|
).then((res) => {
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.getResumeList()
|
||||||
|
this.$message({
|
||||||
|
message: 'Saved successfully!',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,11 +148,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="rightFile">
|
<div class="rightFile">
|
||||||
<!--简历附件-->
|
<!--简历附件-->
|
||||||
<curriculum />
|
<curriculum :isEN="isEN" :reviewerId.sync="reviewerId" />
|
||||||
<!--资历证书-->
|
<!--资历证书-->
|
||||||
<certificate />
|
<certificate
|
||||||
|
:DATA="reviewerData.AttachmentList"
|
||||||
|
:isEN="isEN"
|
||||||
|
:reviewerId.sync="reviewerId"
|
||||||
|
@getInfo="getDetail"
|
||||||
|
/>
|
||||||
<!--协议-->
|
<!--协议-->
|
||||||
<agreement />
|
<agreement
|
||||||
|
:DATA="reviewerData.AttachmentList"
|
||||||
|
:isEN="isEN"
|
||||||
|
:reviewerId.sync="reviewerId"
|
||||||
|
@getInfo="getDetail"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :visible.sync="visible" fullscreen>
|
<el-dialog :visible.sync="visible" fullscreen>
|
||||||
|
@ -227,15 +237,15 @@ export default {
|
||||||
async created() {
|
async created() {
|
||||||
this.$i18n.locale = this.$route.query.lang
|
this.$i18n.locale = this.$route.query.lang
|
||||||
await this.setLanguage(this.$route.query.lang)
|
await this.setLanguage(this.$route.query.lang)
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// 监听滚动事件
|
|
||||||
window.addEventListener('scroll', this.onScroll)
|
|
||||||
if (sessionStorage.getItem('reviewerId')) {
|
if (sessionStorage.getItem('reviewerId')) {
|
||||||
this.reviewerId = sessionStorage.getItem('reviewerId')
|
this.reviewerId = sessionStorage.getItem('reviewerId')
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
// 监听滚动事件
|
||||||
|
window.addEventListener('scroll', this.onScroll)
|
||||||
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
// 必须移除监听器,不然当该vue组件被销毁了,监听器还在就会出错
|
// 必须移除监听器,不然当该vue组件被销毁了,监听器还在就会出错
|
||||||
window.removeEventListener('scroll', this.onScroll)
|
window.removeEventListener('scroll', this.onScroll)
|
||||||
|
@ -396,6 +406,10 @@ export default {
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
}
|
}
|
||||||
|
.disable {
|
||||||
|
cursor: not-allowed;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue