简历预览区分系统、项目

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

View File

@ -27,7 +27,7 @@
>
<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> -->
<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>
</el-table-column>
<!-- Name CN -->
@ -160,7 +160,7 @@ export default {
},
handleSelectTable(row) { return row.DoctorTrialState !== 8 },
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')
}
}

View File

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

View File

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

View File

@ -1,11 +1,11 @@
<template>
<BaseContainer>
<template slot="search-container">
<div style="margin-left:auto;">
<div style="margin-left: auto">
<!-- 提交 -->
<el-button
type="primary"
:disabled="submitIdArr.length==0"
:disabled="submitIdArr.length == 0"
icon="el-icon-check"
:loading="loading"
@click="handleSubmit"
@ -28,7 +28,7 @@
<template slot="main-container">
<el-table
v-loading="listLoading"
v-adaptive="{bottomOffset:65}"
v-adaptive="{ bottomOffset: 65 }"
height="100"
:data="list"
class="table"
@ -47,7 +47,15 @@
min-width="120"
>
<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> -->
</template>
</el-table-column>
@ -74,8 +82,12 @@
min-width="100"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.DoctorTrialState === 5" type="primary">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('DoctorTrialState', 16) }}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 5" type="primary">{{
$fd('DoctorTrialState', scope.row.DoctorTrialState)
}}</el-tag>
<el-tag v-else type="danger">{{
$fd('DoctorTrialState', 16)
}}</el-tag>
</template>
</el-table-column>
<!-- Submitter -->
@ -106,7 +118,13 @@
</template>
</el-table-column>
</el-table>
<pagination class="page" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
<pagination
class="page"
:total="total"
:page.sync="listQuery.PageIndex"
:limit.sync="listQuery.PageSize"
@pagination="getList"
/>
<el-dialog
:title="$t('trials:seletctedReviews:title:language')"
@ -120,8 +138,12 @@
<el-radio :label="1">中文</el-radio>
</el-radio-group>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{ $t('common:button:cancel') }}</el-button>
<el-button type="primary" @click="handleDownloadResumes">{{ $t('common:button:save') }}</el-button>
<el-button @click="dialogVisible = false">{{
$t('common:button:cancel')
}}</el-button>
<el-button type="primary" @click="handleDownloadResumes">{{
$t('common:button:save')
}}</el-button>
</span>
</el-dialog>
</template>
@ -130,11 +152,15 @@
<script>
import BaseContainer from '@/components/BaseContainer'
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 store from '@/store'
import axios from "axios";
import JSZip from "jszip";
import axios from 'axios'
import JSZip from 'jszip'
import { saveAs } from 'file-saver'
const enrollState = 1
export default {
@ -149,7 +175,7 @@ export default {
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: ''
SortField: '',
},
loading: false,
total: 0,
@ -158,10 +184,12 @@ export default {
dialogVisible: false,
language: 2,
token: store.getters.token,
selectTable: {}
selectTable: {},
}
},
created() { this.initPage() },
created() {
this.initPage()
},
methods: {
go(path) {
window.open(path)
@ -172,35 +200,41 @@ export default {
getList() {
this.listLoading = true
this.listQuery.TrialId = this.$route.query.trialId
getSubmissionOrApprovalReviewerList(this.listQuery).then(res => {
this.listLoading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
// eslint-disable-next-line handle-callback-err
}).catch(() => { this.listLoading = false })
getSubmissionOrApprovalReviewerList(this.listQuery)
.then((res) => {
this.listLoading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
// eslint-disable-next-line handle-callback-err
})
.catch(() => {
this.listLoading = false
})
},
handleSubmit() {
//
this.$confirm(this.$t('trials:seletctedReviews:message:msg2'), {
type: 'warning'
type: 'warning',
}).then(() => {
this.loading = true
const trialId = this.$route.query.trialId
submitReviewer(trialId, this.submitIdArr, 1).then(res => {
this.loading = false
if (res.IsSuccess) {
this.getList()
//
this.$message.success(this.$t('common:message:savedSuccessfully'))
if(res.Result.IsHaveSPMOrCPM){
this.$emit('nextStep', 'approval')
}else{
this.$emit('nextStep', 'confirmation')
submitReviewer(trialId, this.submitIdArr, 1)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.getList()
//
this.$message.success(this.$t('common:message:savedSuccessfully'))
if (res.Result.IsHaveSPMOrCPM) {
this.$emit('nextStep', 'approval')
} else {
this.$emit('nextStep', 'confirmation')
}
}
}
}).catch(() => {
this.loading = false
})
})
.catch(() => {
this.loading = false
})
})
},
handleSelectionChange(val) {
@ -225,9 +259,13 @@ export default {
return 'selected'
}
},
handleSelectTable(row) { return row.DoctorTrialState !== 5 },
handleSelectTable(row) {
return row.DoctorTrialState !== 5
},
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')
},
handleDownloadAll() {
@ -243,68 +281,81 @@ export default {
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 + '_Sub.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 + '_Sub.zip') // 使FileSaver.saveAs
resolve()
})
})
.catch((reason) => {
resolve()
})
}).catch(reason => {
resolve()
})
})
},
handleDownloadResumes() {
getTrialDoctorOfficialResume({
doctorIdList:this.selectTable.Id?[this.selectTable.Id]: this.list.map(v => {return v.Id}),
language: this.language
}).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= {};
doctorIdList: this.selectTable.Id
? [this.selectTable.Id]
: this.list.map((v) => {
return v.Id
}),
language: this.language,
})
.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
// const arr = []
// for (let index = 0; index < this.list.length; index++) {
@ -313,9 +364,13 @@ export default {
// this.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
//
if (process.env.NODE_ENV === 'usa') {
@ -324,8 +379,8 @@ export default {
} else {
this.dialogVisible = true
}
}
}
},
},
}
</script>

View File

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