简历预览区分系统、项目

uat_us
wangxiaoshuang 2024-11-04 17:47:10 +08:00
parent 0c90ffb514
commit b65b93a5ab
6 changed files with 214 additions and 119 deletions

View File

@ -701,6 +701,10 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
trialId: {
type: String,
default: '',
},
isEN: { isEN: {
type: Boolean, type: Boolean,
default: false, default: false,
@ -830,7 +834,7 @@ export default {
try { try {
let id = this.reviewerId let id = this.reviewerId
this.loading = true this.loading = true
let res = await getDetail(id) let res = await getDetail(id, this.trialId)
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.reviewerData = res.Result this.reviewerData = res.Result

View File

@ -27,7 +27,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button> --> <!-- <el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button> -->
<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}&trialId=${$route.query.trialId}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- Name CN --> <!-- Name CN -->
@ -160,7 +160,7 @@ export default {
}, },
handleSelectTable(row) { return row.DoctorTrialState !== 8 }, handleSelectTable(row) { return row.DoctorTrialState !== 8 },
handleDetail(row) { handleDetail(row) {
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` }) const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}` })
window.open(href, '_blank') window.open(href, '_blank')
} }
} }

View File

@ -1,13 +1,13 @@
<template> <template>
<BaseContainer> <BaseContainer>
<template slot="search-container"> <template slot="search-container">
<div style="margin-left:auto;"> <div style="margin-left: auto">
<!-- Confirm --> <!-- Confirm -->
<el-button <el-button
v-if="hasPermi(['role:pm'])" v-if="hasPermi(['role:pm'])"
icon="el-icon-check" icon="el-icon-check"
type="primary" type="primary"
:disabled="confirmIdArr.length==0" :disabled="confirmIdArr.length == 0"
:loading="loading" :loading="loading"
@click="handleConfirm" @click="handleConfirm"
> >
@ -18,7 +18,7 @@
<template slot="main-container"> <template slot="main-container">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
v-adaptive="{bottomOffset:65}" v-adaptive="{ bottomOffset: 65 }"
height="100" height="100"
:data="list" :data="list"
class="table" class="table"
@ -38,7 +38,15 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button> --> <!-- <el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button> -->
<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}&trialId=${$route.query.trialId}&token=${token}`
)
"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<!-- Name CN --> <!-- Name CN -->
@ -64,9 +72,15 @@
min-width="120" min-width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.DoctorTrialState === 10" type="primary">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag> <el-tag v-if="scope.row.DoctorTrialState === 10" type="primary">{{
<el-tag v-if="scope.row.DoctorTrialState === 9" type="warning">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag> $fd('DoctorTrialState', scope.row.DoctorTrialState)
<el-tag v-if="scope.row.DoctorTrialState === 8" type="danger">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag> }}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 9" type="warning">{{
$fd('DoctorTrialState', scope.row.DoctorTrialState)
}}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 8" type="danger">{{
$fd('DoctorTrialState', scope.row.DoctorTrialState)
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- Confirmor --> <!-- Confirmor -->
@ -87,7 +101,13 @@
</template> </template>
</el-table-column> --> </el-table-column> -->
</el-table> </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> </template>
</BaseContainer> </BaseContainer>
</template> </template>
@ -108,15 +128,17 @@ export default {
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: false, Asc: false,
SortField: '' SortField: '',
}, },
total: 0, total: 0,
listLoading: false, listLoading: false,
confirmIdArr: [], confirmIdArr: [],
token: store.getters.token token: store.getters.token,
} }
}, },
created() { this.initPage() }, created() {
this.initPage()
},
methods: { methods: {
go(path) { go(path) {
window.open(path) window.open(path)
@ -127,23 +149,27 @@ export default {
getList() { getList() {
this.listLoading = true this.listLoading = true
this.listQuery.TrialId = this.$route.query.trialId this.listQuery.TrialId = this.$route.query.trialId
getConfirmationReviewerList(this.listQuery).then(res => { getConfirmationReviewerList(this.listQuery)
this.listLoading = false .then((res) => {
this.list = res.Result.CurrentPageData this.listLoading = false
this.total = res.Result.TotalCount this.list = res.Result.CurrentPageData
// eslint-disable-next-line handle-callback-err this.total = res.Result.TotalCount
}).catch(() => { this.listLoading = false }) // eslint-disable-next-line handle-callback-err
})
.catch(() => {
this.listLoading = false
})
}, },
handleConfirm() { handleConfirm() {
// Reviewer(s) Confirmed? // Reviewer(s) Confirmed?
this.$confirm(this.$t('trials:seletctedReviews:message:msg2'), { this.$confirm(this.$t('trials:seletctedReviews:message:msg2'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
this.doctorConfirm(1) this.doctorConfirm(1)
}) })
.catch(action => { .catch((action) => {
// if (action === 'cancel') { // if (action === 'cancel') {
// this.doctorConfirm(0) // this.doctorConfirm(0)
// } // }
@ -157,15 +183,17 @@ export default {
DoctorIdArray: this.confirmIdArr, DoctorIdArray: this.confirmIdArr,
ConfirmState: state, ConfirmState: state,
BaseUrl: `${location.protocol}//${location.host}/login`, BaseUrl: `${location.protocol}//${location.host}/login`,
RouteUrl: `${location.protocol}//${location.host}/email-recompose` RouteUrl: `${location.protocol}//${location.host}/email-recompose`,
} }
confirmReviewer(params).then(res => { confirmReviewer(params)
this.loading = false .then((res) => {
this.getList() this.loading = false
this.$message.success(this.$t('common:message:savedSuccessfully')) this.getList()
}).catch(() => { this.$message.success(this.$t('common:message:savedSuccessfully'))
this.loading = false })
}) .catch(() => {
this.loading = false
})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const arr = [] const arr = []
@ -189,19 +217,23 @@ export default {
return 'selected' return 'selected'
} }
}, },
handleSelectTable(row) { return row.DoctorTrialState !== 10 }, handleSelectTable(row) {
return row.DoctorTrialState !== 10
},
handleDetail(row) { handleDetail(row) {
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` }) const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}`,
})
window.open(href, '_blank') window.open(href, '_blank')
}, },
cellColor({ row, column, rowIndex, columnIndex }) { cellColor({ row, column, rowIndex, columnIndex }) {
if (row.DoctorTrialState === 10 && columnIndex === 5) { if (row.DoctorTrialState === 10 && columnIndex === 5) {
return { return {
color: '#428bca' color: '#428bca',
} }
} }
} },
} },
} }
</script> </script>

View File

@ -168,7 +168,9 @@
<span <span
style="color: #428bca; cursor: pointer" style="color: #428bca; cursor: pointer"
@click=" @click="
go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`) go(
`/trialsResume?doctorId=${scope.row.Id}&trialId=${$route.query.trialId}&token=${token}`
)
" "
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span >{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span
> >
@ -581,7 +583,7 @@ export default {
}, },
handleDetail(row) { handleDetail(row) {
const { href } = this.$router.resolve({ const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}`, path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}`,
}) })
window.open(href, '_blank') window.open(href, '_blank')
}, },

View File

@ -1,11 +1,11 @@
<template> <template>
<BaseContainer> <BaseContainer>
<template slot="search-container"> <template slot="search-container">
<div style="margin-left:auto;"> <div style="margin-left: auto">
<!-- 提交 --> <!-- 提交 -->
<el-button <el-button
type="primary" type="primary"
:disabled="submitIdArr.length==0" :disabled="submitIdArr.length == 0"
icon="el-icon-check" icon="el-icon-check"
:loading="loading" :loading="loading"
@click="handleSubmit" @click="handleSubmit"
@ -28,7 +28,7 @@
<template slot="main-container"> <template slot="main-container">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
v-adaptive="{bottomOffset:65}" v-adaptive="{ bottomOffset: 65 }"
height="100" height="100"
:data="list" :data="list"
class="table" class="table"
@ -47,7 +47,15 @@
min-width="120" min-width="120"
> >
<template slot-scope="scope"> <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}&trialId=${$route.query.trialId}&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> --> <!-- <el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
@ -74,8 +82,12 @@
min-width="100" min-width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.DoctorTrialState === 5" type="primary">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag> <el-tag v-if="scope.row.DoctorTrialState === 5" type="primary">{{
<el-tag v-else type="danger">{{ $fd('DoctorTrialState', 16) }}</el-tag> $fd('DoctorTrialState', scope.row.DoctorTrialState)
}}</el-tag>
<el-tag v-else type="danger">{{
$fd('DoctorTrialState', 16)
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- Submitter --> <!-- Submitter -->
@ -106,7 +118,13 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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"
/>
<el-dialog <el-dialog
:title="$t('trials:seletctedReviews:title:language')" :title="$t('trials:seletctedReviews:title:language')"
@ -120,8 +138,12 @@
<el-radio :label="1">中文</el-radio> <el-radio :label="1">中文</el-radio>
</el-radio-group> </el-radio-group>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{ $t('common:button:cancel') }}</el-button> <el-button @click="dialogVisible = false">{{
<el-button type="primary" @click="handleDownloadResumes">{{ $t('common:button:save') }}</el-button> $t('common:button:cancel')
}}</el-button>
<el-button type="primary" @click="handleDownloadResumes">{{
$t('common:button:save')
}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -130,11 +152,15 @@
<script> <script>
import BaseContainer from '@/components/BaseContainer' import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { getSubmissionOrApprovalReviewerList, submitReviewer, downloadResume } from '@/api/trials' import {
getSubmissionOrApprovalReviewerList,
submitReviewer,
downloadResume,
} from '@/api/trials'
import { getTrialDoctorOfficialResume } from '@/api/reviewers' import { getTrialDoctorOfficialResume } from '@/api/reviewers'
import store from '@/store' import store from '@/store'
import axios from "axios"; import axios from 'axios'
import JSZip from "jszip"; import JSZip from 'jszip'
import { saveAs } from 'file-saver' import { saveAs } from 'file-saver'
const enrollState = 1 const enrollState = 1
export default { export default {
@ -149,7 +175,7 @@ export default {
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: false, Asc: false,
SortField: '' SortField: '',
}, },
loading: false, loading: false,
total: 0, total: 0,
@ -158,10 +184,12 @@ export default {
dialogVisible: false, dialogVisible: false,
language: 2, language: 2,
token: store.getters.token, token: store.getters.token,
selectTable: {} selectTable: {},
} }
}, },
created() { this.initPage() }, created() {
this.initPage()
},
methods: { methods: {
go(path) { go(path) {
window.open(path) window.open(path)
@ -172,35 +200,41 @@ export default {
getList() { getList() {
this.listLoading = true this.listLoading = true
this.listQuery.TrialId = this.$route.query.trialId this.listQuery.TrialId = this.$route.query.trialId
getSubmissionOrApprovalReviewerList(this.listQuery).then(res => { getSubmissionOrApprovalReviewerList(this.listQuery)
this.listLoading = false .then((res) => {
this.list = res.Result.CurrentPageData this.listLoading = false
this.total = res.Result.TotalCount this.list = res.Result.CurrentPageData
// eslint-disable-next-line handle-callback-err this.total = res.Result.TotalCount
}).catch(() => { this.listLoading = false }) // eslint-disable-next-line handle-callback-err
})
.catch(() => {
this.listLoading = false
})
}, },
handleSubmit() { handleSubmit() {
// //
this.$confirm(this.$t('trials:seletctedReviews:message:msg2'), { this.$confirm(this.$t('trials:seletctedReviews:message:msg2'), {
type: 'warning' type: 'warning',
}).then(() => { }).then(() => {
this.loading = true this.loading = true
const trialId = this.$route.query.trialId const trialId = this.$route.query.trialId
submitReviewer(trialId, this.submitIdArr, 1).then(res => { submitReviewer(trialId, this.submitIdArr, 1)
this.loading = false .then((res) => {
if (res.IsSuccess) { this.loading = false
this.getList() if (res.IsSuccess) {
// this.getList()
this.$message.success(this.$t('common:message:savedSuccessfully')) //
if(res.Result.IsHaveSPMOrCPM){ this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$emit('nextStep', 'approval') if (res.Result.IsHaveSPMOrCPM) {
}else{ this.$emit('nextStep', 'approval')
this.$emit('nextStep', 'confirmation') } else {
this.$emit('nextStep', 'confirmation')
}
} }
} })
}).catch(() => { .catch(() => {
this.loading = false this.loading = false
}) })
}) })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
@ -225,9 +259,13 @@ export default {
return 'selected' return 'selected'
} }
}, },
handleSelectTable(row) { return row.DoctorTrialState !== 5 }, handleSelectTable(row) {
return row.DoctorTrialState !== 5
},
handleDetail(row) { handleDetail(row) {
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` }) const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}`,
})
window.open(href, '_blank') window.open(href, '_blank')
}, },
handleDownloadAll() { handleDownloadAll() {
@ -243,68 +281,81 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axios(fileUrl, { axios(fileUrl, {
method: 'GET', method: 'GET',
responseType: 'blob' // blob arraybuffer responseType: 'blob', // blob arraybuffer
}).then((res) => {
console.log('res', res)
resolve(res)
}).catch(error => {
reject(error)
}) })
.then((res) => {
console.log('res', res)
resolve(res)
})
.catch((error) => {
reject(error)
})
}) })
}, },
async handleBatchDown(dataSource) { async handleBatchDown(dataSource) {
return new Promise(resolve => { return new Promise((resolve) => {
console.log('开始压缩') console.log('开始压缩')
const zip = new JSZip() // const zip = new JSZip() //
const promises = [] const promises = []
dataSource.FileList.forEach((item) => { dataSource.FileList.forEach((item) => {
console.log(this.OSSclientConfig.basePath + item.Path) 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 + '' const fileName = item.FileName + ''
// file() floder() // file() floder()
zip.file(fileName, res.data, {binary: true}) zip.file(fileName, res.data, { binary: true })
}) })
promises.push(promise) promises.push(promise)
}) })
console.log(promises) console.log(promises)
// zip // zip
Promise.all(promises).then(() => { Promise.all(promises)
// zip .then(() => {
zip.generateAsync({ // zip
type: 'blob', zip
compression: 'DEFLATE', // STORE: DEFLATE .generateAsync({
compressionOptions: { type: 'blob',
level: 9 // 1~9 1 9 compression: 'DEFLATE', // STORE: DEFLATE
} compressionOptions: {
}).then((res) => { level: 9, // 1~9 1 9
saveAs(res, dataSource.ReviewerCode + '_Sub.zip') // 使FileSaver.saveAs },
})
.then((res) => {
saveAs(res, dataSource.ReviewerCode + '_Sub.zip') // 使FileSaver.saveAs
resolve()
})
})
.catch((reason) => {
resolve() resolve()
}) })
}).catch(reason => {
resolve()
})
}) })
}, },
handleDownloadResumes() { handleDownloadResumes() {
getTrialDoctorOfficialResume({ getTrialDoctorOfficialResume({
doctorIdList:this.selectTable.Id?[this.selectTable.Id]: this.list.map(v => {return v.Id}), doctorIdList: this.selectTable.Id
language: this.language ? [this.selectTable.Id]
}).then(async res => { : this.list.map((v) => {
this.selectTable = {}; return v.Id
this.dialogVisible = false }),
if (!res.Result || res.Result.length === 0) { language: this.language,
this.$alert(this.$t('trials:seletctedReviews:table:noResume'))
}else{
for (let i = 0; res.Result.length > i; i++) {
let item = res.Result[i]
await this.handleBatchDown(item)
}
}
}).catch(err=>{
this.dialogVisible = false;
this.selectTable= {};
}) })
.then(async (res) => {
this.selectTable = {}
this.dialogVisible = false
if (!res.Result || res.Result.length === 0) {
this.$alert(this.$t('trials:seletctedReviews:table:noResume'))
} else {
for (let i = 0; res.Result.length > i; i++) {
let item = res.Result[i]
await this.handleBatchDown(item)
}
}
})
.catch((err) => {
this.dialogVisible = false
this.selectTable = {}
})
// this.dialogVisible = false // this.dialogVisible = false
// const arr = [] // const arr = []
// for (let index = 0; index < this.list.length; index++) { // for (let index = 0; index < this.list.length; index++) {
@ -313,9 +364,13 @@ export default {
// this.downloadResume(arr) // this.downloadResume(arr)
}, },
downloadResume(arr) { downloadResume(arr) {
downloadResume(this.$route.query.trialId, this.language, arr).then(res => { window.open(res.Result) }) downloadResume(this.$route.query.trialId, this.language, arr).then(
(res) => {
window.open(res.Result)
}
)
}, },
handleDownload(row) { handleDownload(row) {
this.selectTable = row this.selectTable = row
// //
if (process.env.NODE_ENV === 'usa') { if (process.env.NODE_ENV === 'usa') {
@ -324,8 +379,8 @@ export default {
} else { } else {
this.dialogVisible = true this.dialogVisible = true
} }
} },
} },
} }
</script> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- <resume-info v-if="isInit" /> --> <!-- <resume-info v-if="isInit" /> -->
<preview :isEN="isEN" :reviewerId.sync="reviewerId" /> <preview :isEN="isEN" :reviewerId.sync="reviewerId" :trialId.sync="trialId" />
</div> </div>
</template> </template>
<script> <script>
@ -18,10 +18,12 @@ export default {
return { return {
isInit: false, isInit: false,
reviewerId: '', reviewerId: '',
trialId: null,
} }
}, },
created() { created() {
this.reviewerId = this.$route.query.doctorId this.reviewerId = this.$route.query.doctorId
this.trialId = this.$route.query.trialId
}, },
computed: { computed: {
isEN() { isEN() {