pm简历采集
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-10-24 15:27:42 +08:00
parent fabd26536c
commit f7124d35b0
10 changed files with 466 additions and 175 deletions

View File

@ -309,3 +309,11 @@ export function rePublishEvent(params) {
params
})
}
// userId获取doctorId
export function useUserIDGetDoctorID(data) {
return request({
url: `/TrialSiteSurvey/useUserIDGetDoctorID`,
method: 'post',
data
})
}

View File

@ -321,4 +321,12 @@ export function addOrUpdateResearchPublicationInfo(param) {
method: 'post',
data: param
})
}
// 发送简历采集邮件
export function doctorSendEmail(param) {
return request({
url: `/Doctor/sendEmail`,
method: 'post',
data: param
})
}

View File

@ -149,6 +149,7 @@ body .el-table th.gutter {
}
.el-dialog__body {
margin-top: 15px;
height: calc(100% - 70px);
padding: 0 20px;
@ -347,6 +348,7 @@ body .el-table th.gutter {
background: #000;
z-index: 3999;
}
.el-message-box__wrapper{
.el-message-box__wrapper {
z-index: 9999 !important;
}

View File

@ -14,11 +14,17 @@
</el-form-item>
<!-- 中心名称 -->
<el-form-item :label="$t('trials:customSite:form:siteName')" prop="SiteName">
<el-form-item
:label="$t('trials:customSite:form:siteName')"
prop="SiteName"
>
<el-input v-model="form.SiteName" />
</el-form-item>
<!-- 中心名称CN -->
<el-form-item :label="$t('trials:customSite:form:siteName') + 'CN'" prop="SiteNameCN">
<el-form-item
:label="$t('trials:customSite:form:siteName') + 'CN'"
prop="SiteNameCN"
>
<el-input v-model="form.SiteNameCN" />
</el-form-item>
@ -46,7 +52,7 @@
v-model="form.HospitalId"
clearable
placeholder="Please select"
style="width:100%;"
style="width: 100%"
>
<el-option
v-for="item in hospitalList"
@ -73,10 +79,22 @@
<el-input v-model="form.ContactPhone" />
</el-form-item>
</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item>
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancel">Cancel</el-button>
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
<el-button
:disabled="btnLoading"
size="small"
type="primary"
@click="handleCancel"
>Cancel</el-button
>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>Save</el-button
>
</el-form-item>
</div>
</el-form>
@ -91,8 +109,8 @@ export default {
type: Object,
default() {
return {}
}
}
},
},
},
data() {
return {
@ -111,50 +129,42 @@ export default {
ContactName: '',
ContactPhone: '',
UniqueCode: '',
Address: ''
Address: '',
},
rules: {
SiteName: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }
// { max: 50, message: 'The maximum length is 50' }
],
SiteNameCN: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }
// { max: 50, message: 'The maximum length is 50' }
],
SiteCode: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }
{ max: 50, message: 'The maximum length is 50' },
],
Country: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }
{ max: 50, message: 'The maximum length is 50' },
],
City: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }
{ max: 50, message: 'The maximum length is 50' },
],
// HospitalId: [
// { required: true, message: 'Please specify', trigger: 'blur' }
// ],
Address: [
{ required: true, message: 'Please specify', trigger: 'blur' }
{ required: true, message: 'Please specify', trigger: 'blur' },
],
DirectorName: [
{ max: 50, message: 'The maximum length is 50' }
],
DirectorPhone: [
{ max: 50, message: 'The maximum length is 50' }
],
ContactName: [
{ max: 50, message: 'The maximum length is 50' }
],
ContactPhone: [
{ max: 50, message: 'The maximum length is 50' }
]
DirectorName: [{ max: 50, message: 'The maximum length is 50' }],
DirectorPhone: [{ max: 50, message: 'The maximum length is 50' }],
ContactName: [{ max: 50, message: 'The maximum length is 50' }],
ContactPhone: [{ max: 50, message: 'The maximum length is 50' }],
},
loading: false,
show: false
show: false,
}
},
mounted() {
@ -163,20 +173,22 @@ export default {
},
methods: {
handleSave() {
this.$refs.siteForm.validate(valid => {
this.$refs.siteForm.validate((valid) => {
if (!valid) return
this.btnLoading = true
addOrUpdateSite(this.form).then(res => {
this.btnLoading = false
if (res.IsSuccess) {
this.$message.success('Saved successfully')
this.$refs['siteForm'].resetFields()
this.$emit('getList')
this.$emit('close')
}
}).catch(() => {
this.btnLoading = false
})
addOrUpdateSite(this.form)
.then((res) => {
this.btnLoading = false
if (res.IsSuccess) {
this.$message.success('Saved successfully')
this.$refs['siteForm'].resetFields()
this.$emit('getList')
this.$emit('close')
}
})
.catch(() => {
this.btnLoading = false
})
})
},
handleCancel() {
@ -189,8 +201,7 @@ export default {
if (Object.keys(this.data).length && this.data.Id) {
this.form = { ...this.data }
}
}
}
},
},
}
</script>

View File

@ -166,7 +166,9 @@
</div>
</div>
<el-dialog :visible.sync="visible" fullscreen>
<preview :isEN="isEN" :reviewerId.sync="reviewerId" v-if="visible" />
<div style="height: 100%; overflow: auto">
<preview :isEN="isEN" :reviewerId.sync="reviewerId" v-if="visible" />
</div>
</el-dialog>
</div>
</template>
@ -241,6 +243,10 @@ export default {
if (sessionStorage.getItem('reviewerId')) {
this.reviewerId = sessionStorage.getItem('reviewerId')
this.getDetail()
} else if (this.$route.query.id) {
this.reviewerId = this.$route.query.id
sessionStorage.setItem('reviewerId', this.reviewerId)
this.getDetail()
}
},
mounted() {

View File

@ -224,7 +224,9 @@
</el-table>
</div>
<div class="message">
<div>{{ $t('curriculumVitae:continuingTraining:title') }}</div>
<div class="title">
{{ $t('curriculumVitae:continuingTraining:title') }}
</div>
<el-table
:data="reviewerData.PostgraduateList"
v-loading="loading"
@ -398,10 +400,21 @@
</el-table-column>
</el-table>
<!--其他相关经历-->
<div class="title">
<div
class="title"
v-if="
reviewerData.TrialExperienceView.OtherClinicalExperience ||
reviewerData.TrialExperienceView.OtherClinicalExperienceCN
"
>
{{ $t('curriculumVitae:clinicalTrials:otherTitle') }}
</div>
<template v-if="true">
<template
v-if="
reviewerData.TrialExperienceView.OtherClinicalExperience ||
reviewerData.TrialExperienceView.OtherClinicalExperienceCN
"
>
<div class="message">
{{
isEN
@ -411,7 +424,10 @@
</div>
</template>
</div>
<div class="message">
<div
class="message"
v-if="reviewerData.ResearchPublicationView.Publications"
>
<div class="title">{{ $t('curriculumVitae:treatise:title') }}</div>
<div
class="message"
@ -696,6 +712,7 @@ export default {
resumeListCN: [],
sowList: [],
ackSowList: [],
loading: false,
}
},
computed: {
@ -847,13 +864,15 @@ export default {
})
},
handlePreview(row) {
if (row.FullPath) {
window.open(this.OSSclientConfig.basePath + row.FullPath, '_blank')
if (row.FullPath || row.FilePath) {
let path = row.FullPath || row.FilePath
window.open(this.OSSclientConfig.basePath + path, '_blank')
}
},
preview(row) {
let path = row.FullPath || row.FilePath
this.$preview({
path: row.FullPath,
path: path,
type: 'pdf',
title: row.FileName,
})
@ -866,6 +885,8 @@ export default {
display: flex;
.title {
font-size: 18px;
border: none;
background-color: transparent;
}
.message {
padding: 20px 0;

View File

@ -7,7 +7,7 @@
<el-form-item :label="$t('reviewers-list:label:Name')">
<el-input
v-model="searchData.Name"
style="width:100px;"
style="width: 100px"
clearable
/>
</el-form-item>
@ -17,7 +17,7 @@
clearable
multiple
collapse-tags
style="width:150px;"
style="width: 150px"
>
<!-- <el-option
v-for="(key,value) of dictionaryList.ReadingType"
@ -39,7 +39,7 @@
multiple
collapse-tags
clearable
style="width:180px;"
style="width: 180px"
>
<el-option
v-for="item of dict.type.Subspeciality"
@ -50,39 +50,56 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">{{ $t('common:button:search') }}</el-button>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">{{ $t('common:button:reset') }}</el-button>
<el-button
type="primary"
icon="el-icon-search"
@click="handleSearch"
>{{ $t('common:button:search') }}</el-button
>
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>{{ $t('common:button:reset') }}</el-button
>
<el-button
icon="el-icon-download"
type="primary"
:disabled="!(selectArr.length>0)"
:disabled="!(selectArr.length > 0)"
@click="handleDownLoadOffical"
>{{$t('reviewers-list:label:DownloadCV')}}</el-button>
>{{ $t('reviewers-list:label:DownloadCV') }}</el-button
>
<el-button
type="primary"
icon="el-icon-link"
@click="showResearchLink"
>
{{$t('reviewers-list:label:showResearchLink')}}
{{ $t('reviewers-list:label:showResearchLink') }}
</el-button>
</el-form-item>
</el-form>
</div>
<span style="margin-left:auto;">
<!-- <el-switch-->
<!-- v-model="isEN"-->
<!-- active-text="EN"-->
<!-- inactive-text="中文"-->
<!-- style="margin-right:10px;"-->
<!-- @change="handleIsEnChange"-->
<!-- />-->
<el-button size="small" icon="el-icon-plus" type="primary" @click="handleNew">{{$t('common:button:new')}}</el-button>
<span style="margin-left: auto">
<!-- <el-switch-->
<!-- v-model="isEN"-->
<!-- active-text="EN"-->
<!-- inactive-text="中文"-->
<!-- style="margin-right:10px;"-->
<!-- @change="handleIsEnChange"-->
<!-- />-->
<el-button
size="small"
icon="el-icon-plus"
type="primary"
@click="handleNew"
>{{ $t('common:button:new') }}</el-button
>
</span>
</div>
<!-- 医生列表 -->
<el-table
v-adaptive="{bottomOffset:55}"
v-adaptive="{ bottomOffset: 55 }"
v-loading="listLoading"
stripe
height="100"
@ -90,7 +107,12 @@
@sort-change="sortByColumn"
@selection-change="handleSelectChange"
>
<el-table-column type="selection" align="left" width="45" :selectable="hasResume" />
<el-table-column
type="selection"
align="left"
width="45"
:selectable="hasResume"
/>
<el-table-column type="index" width="40" align="left" />
<el-table-column
align="left"
@ -111,8 +133,20 @@
width="90"
align="left"
/>
<el-table-column prop="ReviewerCode" :label="$t('reviewers-list:table:ID')" width="80" show-overflow-tooltip sortable="custom" />
<el-table-column prop="AccountUserName" :label="$t('reviewers-list:table:UserName')" width="140" show-overflow-tooltip sortable="custom" />
<el-table-column
prop="ReviewerCode"
:label="$t('reviewers-list:table:ID')"
width="80"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="AccountUserName"
:label="$t('reviewers-list:table:UserName')"
width="140"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
:label="$t('reviewers-list:table:Reading')"
width="100"
@ -122,14 +156,17 @@
prop="Reading"
>
<template slot-scope="scope">
<span v-if="scope.row.Reading" style="color:#428bca">
<span v-if="scope.row.Reading" style="color: #428bca">
<router-link
tag="a"
:to="{
path: `/trialStats?name=${scope.row.FirstName+' '+scope.row.LastName}&doctorId=${scope.row.Id}&status=10&TokenKey=${tokenKey}`
path: `/trialStats?name=${
scope.row.FirstName + ' ' + scope.row.LastName
}&doctorId=${scope.row.Id}&status=10&TokenKey=${tokenKey}`,
}"
target="_blank"
>{{ scope.row.Reading }}</router-link>
>{{ scope.row.Reading }}</router-link
>
</span>
<span v-else>{{ scope.row.Reading }}</span>
</template>
@ -143,14 +180,17 @@
prop="Finished"
>
<template slot-scope="scope">
<span v-if=" scope.row.Finished" style="color:#428bca">
<span v-if="scope.row.Finished" style="color: #428bca">
<router-link
tag="a"
:to="{
path: `/trialStats?name=${scope.row.FirstName+' '+scope.row.LastName}&doctorId=${scope.row.Id}&status=14&TokenKey=${tokenKey}`
path: `/trialStats?name=${
scope.row.FirstName + ' ' + scope.row.LastName
}&doctorId=${scope.row.Id}&status=14&TokenKey=${tokenKey}`,
}"
target="_blank"
>{{ scope.row.Finished }}</router-link>
>{{ scope.row.Finished }}</router-link
>
</span>
<span v-else>{{ scope.row.Finished }}</span>
</template>
@ -165,7 +205,13 @@
>
<template slot-scope="scope">
<span>
{{ scope.row.SpecialityId === otherId ? scope.row.SpecialityOther : isEnglish?scope.row.Speciality:scope.row.SpecialityCN }}
{{
scope.row.SpecialityId === otherId
? scope.row.SpecialityOther
: isEnglish
? scope.row.Speciality
: scope.row.SpecialityCN
}}
</span>
</template>
</el-table-column>
@ -178,10 +224,18 @@
>
<template slot-scope="scope">
<span v-if="isEnglish">
{{ scope.row.SubspecialityList.length>0?scope.row.SubspecialityList.join(', '):'' }}
{{
scope.row.SubspecialityList.length > 0
? scope.row.SubspecialityList.join(', ')
: ''
}}
</span>
<span v-else>
{{ scope.row.SubspecialityCNList.length>0?scope.row.SubspecialityCNList.join(', '):'' }}
{{
scope.row.SubspecialityCNList.length > 0
? scope.row.SubspecialityCNList.join(', ')
: ''
}}
</span>
</template>
</el-table-column>
@ -195,7 +249,7 @@
>
<template slot-scope="scope">
<span>
{{ isEnglish?scope.row.HospitalName:scope.row.HospitalNameCN }}
{{ isEnglish ? scope.row.HospitalName : scope.row.HospitalNameCN }}
</span>
</template>
</el-table-column>
@ -209,7 +263,7 @@
>
<template slot-scope="scope">
<span>
{{ isEnglish?scope.row.City:scope.row.CityCN }}
{{ isEnglish ? scope.row.City : scope.row.CityCN }}
</span>
</template>
</el-table-column>
@ -241,7 +295,12 @@
</span>
</template>
</el-table-column>
<el-table-column :label="$t('common:action:action')" min-width="200" align="left" fixed="right">
<el-table-column
:label="$t('common:action:action')"
min-width="200"
align="left"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@ -279,14 +338,40 @@
<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>
<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 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>
<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
:disabled="!email"
@click="sendEmail"
:loading="emailLoading"
style="margin-left: 10px"
>
{{ $t('reviewers-list:button:sendEmail') }}
</el-button>
</div>
</template>
</base-model>
@ -300,20 +385,48 @@
</el-radio-group>
</template>
<template slot="dialog-footer">
<el-button :disabled="btnLoading" size="small" type="primary" @click="model_cfg.visible = false">Cancel</el-button>
<el-button size="small" type="primary" :loading="btnLoading" @click="handleDownloadResumes">Ok</el-button>
<el-button
:disabled="btnLoading"
size="small"
type="primary"
@click="model_cfg.visible = false"
>Cancel</el-button
>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="handleDownloadResumes"
>Ok</el-button
>
</template>
</base-model>
<el-dialog :visible.sync="preview_visible" fullscreen>
<div style="height: 100%; overflow: auto">
<preview
:isEN="isEN"
:isAll="isAll"
:reviewerId.sync="reviewerId"
v-if="preview_visible"
/>
</div>
</el-dialog>
</box-content>
</template>
<script>
import { getDoctorSearchList, downloadOfficialCV, getOfficialResume } from '@/api/reviewers'
import {
getDoctorSearchList,
downloadOfficialCV,
getOfficialResume,
doctorSendEmail,
} from '@/api/reviewers'
import store from '@/store'
import { mapGetters, mapMutations } from 'vuex'
import Pagination from '@/components/Pagination'
import BoxContent from '@/components/BoxContent'
import BaseModel from '@/components/BaseModel'
import { getToken } from '@/utils/auth'
import preview from '@/views/reviewers/curriculumVitae/preview.vue'
import JSZip from 'jszip'
import axios from 'axios'
import { saveAs } from 'file-saver'
@ -338,13 +451,13 @@ const searchDataDefault = () => {
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: ''
SortField: '',
}
}
const otherId = 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5'
export default {
name: 'Reviewers',
components: { BoxContent, BaseModel, Pagination },
components: { BoxContent, BaseModel, Pagination, preview },
data() {
return {
otherId,
@ -363,20 +476,34 @@ export default {
visible: false,
title: '',
width: '500px',
showClose: true
showClose: true,
},
tokenKey: getToken(),
share_model: { visible: false, title: '', width: '500px' },
shareLink: null,
isEnglish: false
isEnglish: false,
preview_visible: false,
reviewerId: '',
isAll: true,
emailLoading: false,
email: null,
}
},
dicts: ['ReadingType', 'Subspeciality', 'Department', 'Rank', 'Position', 'ReadingStandard'],
dicts: [
'ReadingType',
'Subspeciality',
'Department',
'Rank',
'Position',
'ReadingStandard',
],
computed: {
...mapGetters(['hospitalList', 'reviewersQuery'])
...mapGetters(['hospitalList', 'reviewersQuery']),
},
created() {
this.reviewersQuery ? this.listQuery = this.reviewersQuery : ''
this.reviewersQuery ? (this.listQuery = this.reviewersQuery) : ''
this.initPage()
// this.isEnglish = !!((this.$route.query.isEnglish === true || this.$route.query.isEnglish === 'true'))
this.isEnglish = this.$i18n.locale === 'zh' ? false : true
@ -384,24 +511,51 @@ export default {
},
methods: {
copyCode() {
this.$copyText(`链接: ${this.shareLink}`).then(
res => {
this.$copyText(`链接: ${this.shareLink}`)
.then((res) => {
this.$message.success('复制成功')
}
).catch(() => { this.$alert('复制失败') })
})
.catch(() => {
this.$alert('复制失败')
})
},
//
async sendEmail() {
var pattern =
/^([A-Za-z0-9_\-\.\u4e00-\u9fa5])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,8})$/
if (!pattern.test(this.email))
return this.$message.warning(this.$t('rules:email'))
this.emailLoading = true
let res = await doctorSendEmail({
Email: this.email,
Url: `ReviewersResearch?lang=${this.$store.getters.language}`,
})
this.emailLoading = false
if (res.IsSuccess) {
this.$message.success(
this.$t('trials:researchStaff:message:sendEmalil')
)
this.share_model.visible = false
}
},
//
copyLink() {
//
this.$copyText(`${this.$t('trials:researchRecord:message:researchFormLink')}: ${this.shareLink}`).then(
res => {
this.$copyText(
`${this.$t('trials:researchRecord:message:researchFormLink')}: ${
this.shareLink
}`
)
.then((res) => {
//
this.$message.success(this.$t('trials:researchRecord:message:copySuccessfully'))
}
).catch(() => {
//
this.$alert(this.$t('trials:researchRecord:message:copyFailed'))
})
this.$message.success(
this.$t('trials:researchRecord:message:copySuccessfully')
)
})
.catch(() => {
//
this.$alert(this.$t('trials:researchRecord:message:copyFailed'))
})
},
showResearchLink() {
const trialId = this.trialId
@ -409,8 +563,11 @@ export default {
this.share_model.visible = true
},
lookResumeInfo(row) {
console.log(row)
window.open(`/blindResumeInfo?doctorId=${row.Id}&token=${this.token}`)
this.reviewerId = row.Id
this.isAll = false
this.preview_visible = true
// console.log(row)
// window.open(`/blindResumeInfo?doctorId=${row.Id}&token=${this.token}`)
},
initPage() {
store.dispatch('global/getHospital')
@ -424,10 +581,10 @@ export default {
// this.searchData.InformationConfirmed = 1
// this.searchData.ContractorStatus = 1
getDoctorSearchList(this.searchData)
.then(res => {
.then((res) => {
this.listLoading = false
this.list = res.Result.CurrentPageData
this.list.forEach(item => {
this.list.forEach((item) => {
if (item.SubspecialityOther) {
item.SubspecialityList.push(item.SubspecialityOther)
}
@ -443,7 +600,9 @@ export default {
},
//
handleNew() {
this.$router.push({ path: `/reviewers/reviewers-add?Id=&isEnglish=${this.isEnglish}&tabActive=BasicInfo` })
this.$router.push({
path: `/reviewers/reviewers-add?Id=&isEnglish=${this.isEnglish}&tabActive=BasicInfo`,
})
},
// More
handleMore() {
@ -460,55 +619,70 @@ export default {
this.getList()
},
handleDetail(row) {
this.$router.push({ path: `/reviewers/reviewers-detail?doctorId=${row.Id}&isEnglish=${this.isEnglish}` })
this.reviewerId = row.Id
this.isAll = true
this.preview_visible = true
// this.$router.push({
// path: `/reviewers/reviewers-detail?doctorId=${row.Id}&isEnglish=${this.isEnglish}`,
// })
},
handleEdit(row) {
this.$router.push({ path: `/reviewers/reviewers-edit?Id=${row.Id}&isEnglish=${this.isEnglish}&tabActive=BasicInfo` })
this.$router.push({
path: `/reviewers/reviewers-edit?Id=${row.Id}&isEnglish=${this.isEnglish}&tabActive=BasicInfo`,
})
},
getFileData(fileUrl) {
return new Promise((resolve, reject) => {
axios(fileUrl, {
method: 'GET',
responseType: 'blob' // blob arraybuffer
}).then((res) => {
console.log('res', res)
resolve(res)
}).catch(error => {
reject(error)
responseType: 'blob', // blob arraybuffer
})
.then((res) => {
console.log('res', res)
resolve(res)
})
.catch((error) => {
reject(error)
})
})
},
async handleBatchDown(dataSource) {
return new Promise(resolve => {
return new Promise((resolve) => {
console.log('开始压缩')
const zip = new JSZip() //
const promises = []
dataSource.FileList.forEach((item) => {
console.log(this.OSSclientConfig.basePath + item.Path)
const promise = this.getFileData(this.OSSclientConfig.basePath + item.Path).then((res) => {
const promise = this.getFileData(
this.OSSclientConfig.basePath + item.Path
).then((res) => {
const fileName = item.FileName + ''
// file() floder()
zip.file(fileName, res.data, {binary: true})
zip.file(fileName, res.data, { binary: true })
})
promises.push(promise)
})
console.log(promises)
// zip
Promise.all(promises).then(() => {
// zip
zip.generateAsync({
type: 'blob',
compression: 'DEFLATE', // STORE: DEFLATE
compressionOptions: {
level: 9 // 1~9 1 9
}
}).then((res) => {
saveAs(res, dataSource.ReviewerCode + '_CV.zip') // 使FileSaver.saveAs
Promise.all(promises)
.then(() => {
// zip
zip
.generateAsync({
type: 'blob',
compression: 'DEFLATE', // STORE: DEFLATE
compressionOptions: {
level: 9, // 1~9 1 9
},
})
.then((res) => {
saveAs(res, dataSource.ReviewerCode + '_CV.zip') // 使FileSaver.saveAs
resolve()
})
})
.catch((reason) => {
resolve()
})
}).catch(reason => {
resolve()
})
})
},
//
@ -517,26 +691,28 @@ export default {
this.model_cfg.showClose = false
getOfficialResume({
doctorIdList: this.selectArr,
language: this.language
}).then(async res => {
try {
this.btnLoading = false
this.model_cfg.visible = false
this.model_cfg.showClose = true
console.log(res.Result)
for (let i = 0; res.Result.length > i; i++) {
let item = res.Result[i]
console.log(item)
await this.handleBatchDown(item)
}
} catch (e) {
console.log(e)
}
// window.open(res.Result.FullFilePath)
}).catch(() => {
this.btnLoading = false
this.model_cfg.showClose = true
language: this.language,
})
.then(async (res) => {
try {
this.btnLoading = false
this.model_cfg.visible = false
this.model_cfg.showClose = true
console.log(res.Result)
for (let i = 0; res.Result.length > i; i++) {
let item = res.Result[i]
console.log(item)
await this.handleBatchDown(item)
}
} catch (e) {
console.log(e)
}
// window.open(res.Result.FullFilePath)
})
.catch(() => {
this.btnLoading = false
this.model_cfg.showClose = true
})
// downloadOfficialCV(this.selectArr, parseInt(this.language)).then(res => {
// this.btnLoading = false
// this.model_cfg.visible = false
@ -585,7 +761,7 @@ export default {
},
...mapMutations({
setQueryParam: 'reviewer/SET_QUERYPARAM',
setIsEnglish: 'reviewer/SET_ISENGLISH'
setIsEnglish: 'reviewer/SET_ISENGLISH',
}),
hasResume(row) {
if (row.HasResume) {
@ -593,8 +769,8 @@ export default {
} else {
return false
}
}
}
},
},
}
</script>
<style lang="scss" scoped>
@ -609,4 +785,10 @@ export default {
// margin-top: 5px;
// }
// }
.sendEmailBox {
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>

View File

@ -41,7 +41,7 @@
import mine from './mine.vue'
import account from './account.vue'
import loginLog from '@/views/trials/trials-panel/trial-summary/login-log'
import { getUserTypeList, getUser } from '@/api/admin.js'
import { getUserTypeList, getUser, useUserIDGetDoctorID } from '@/api/admin.js'
import store from '@/store'
import { mapGetters } from 'vuex'
@ -66,19 +66,34 @@ export default {
this.getUserTypeList()
},
methods: {
handleSelect(index) {
async handleSelect(index) {
if (index === '4') {
if (this.open) {
this.open.close()
}
let id = await this.useUserIDGetDoctorID()
const routeData = this.$router.resolve({
path: `/curriculumVitae?lang=${this.$i18n.locale}`,
path: `/curriculumVitae?id=${id}&&lang=${this.$i18n.locale}`,
})
this.open = window.open(routeData.href, '_blank')
} else {
this.activeIndex = index
}
},
async useUserIDGetDoctorID() {
try {
let res = await useUserIDGetDoctorID({
UserID: this.$store.state.user.userId,
})
if (res.IsSuccess) {
return res.Result.DoctorID
}
return false
} catch (err) {
return false
console.log(err)
}
},
getUserInfo() {
const loading = this.$loading({
fullscreen: false,

View File

@ -371,6 +371,7 @@
<el-button
type="primary"
round
:disabled="!email"
@click="sendEmail"
:loading="emailLoading"
style="margin-left: 10px"
@ -381,7 +382,13 @@
</template>
</base-model>
<!--新增或修改简历-->
<el-dialog title="" :visible.sync="visible" fullscreen v-if="visible">
<el-dialog
title=""
:visible.sync="visible"
fullscreen
v-if="visible"
:before-close="beforeClose"
>
<reviewerAdd :isSystem="false" v-if="resumeType === 'add'" />
<reviewerEdit
:isSystem="false"
@ -400,6 +407,7 @@ import { getSelectionReviewerList, selectReviewers } from '@/api/trials'
import BaseModel from '@/components/BaseModel'
import reviewerAdd from '@/views/reviewers/new'
import reviewerEdit from '@/views/reviewers/edit'
import { doctorSendEmail } from '@/api/reviewers'
const getListQueryDefault = () => {
return {
TrialId: '',
@ -467,6 +475,10 @@ export default {
this.$alert(this.$t('trials:researchRecord:message:copyFailed'))
})
},
beforeClose() {
this.getList()
this.visible = false
},
//
resumeCollection() {
this.shareLink = `${location.protocol}//${location.host}/ReviewersResearch?lang=${this.$store.getters.language}`
@ -474,8 +486,23 @@ export default {
this.share_model.visible = true
},
//
sendEmail() {
this.$message.success('123')
async sendEmail() {
var pattern =
/^([A-Za-z0-9_\-\.\u4e00-\u9fa5])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,8})$/
if (!pattern.test(this.email))
return this.$message.warning(this.$t('rules:email'))
this.emailLoading = true
let res = await doctorSendEmail({
Email: this.email,
Url: `ReviewersResearch?lang=${this.$store.getters.language}`,
})
this.emailLoading = false
if (res.IsSuccess) {
this.$message.success(
this.$t('trials:researchStaff:message:sendEmalil')
)
this.share_model.visible = false
}
},
//
openViewer(type, row) {

View File

@ -1,21 +1,33 @@
<template>
<div class="app-container">
<resume-info v-if="isInit" />
<!-- <resume-info v-if="isInit" /> -->
<preview :isEN="isEN" :reviewerId.sync="reviewerId" />
</div>
</template>
<script>
import ResumeInfo from '@/views/resumeInfo'
import { changeURLStatic, getQueryString } from '@/utils/history.js'
import preview from '@/views/reviewers/curriculumVitae/preview.vue'
import store from '@/store'
export default {
components: {
ResumeInfo
ResumeInfo,
preview,
},
data() {
return {
isInit: false
isInit: false,
reviewerId: '',
}
},
created() {
this.reviewerId = this.$route.query.doctorId
},
computed: {
isEN() {
return this.$i18n.locale !== 'zh'
},
},
mounted() {
const token = getQueryString('token')
if (token) {
@ -23,13 +35,12 @@ export default {
changeURLStatic('token', '')
}
this.isInit = true
}
},
}
</script>
<style lang="scss" scoped>
/deep/ .el-collapse-item__header{
/deep/ .el-collapse-item__header {
background-color: #e9eef1;
padding: 0 10px;
}
</style>