Compare commits

..

No commits in common. "03e390013e79ec8308d606f0732f06b8f61ee0dd" and "94d626a453e68188310336a1427f903aa71872ae" have entirely different histories.

6 changed files with 119 additions and 214 deletions

View File

@ -701,10 +701,6 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
trialId: {
type: String,
default: '',
},
isEN: { isEN: {
type: Boolean, type: Boolean,
default: false, default: false,
@ -834,7 +830,7 @@ export default {
try { try {
let id = this.reviewerId let id = this.reviewerId
this.loading = true this.loading = true
let res = await getDetail(id, this.trialId) let res = await getDetail(id)
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}&trialId=${$route.query.trialId}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span> <span style="color: #428bca;cursor: pointer;" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span>
</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}&trialId=${this.$route.query.trialId}` }) const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
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,15 +38,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 <span style="color: #428bca;cursor: pointer;" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</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 -->
@ -72,15 +64,9 @@
min-width="120" min-width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.DoctorTrialState === 10" type="primary">{{ <el-tag v-if="scope.row.DoctorTrialState === 10" type="primary">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag>
$fd('DoctorTrialState', scope.row.DoctorTrialState) <el-tag v-if="scope.row.DoctorTrialState === 9" type="warning">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag>
}}</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 === 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 -->
@ -101,13 +87,7 @@
</template> </template>
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
<pagination <pagination class="page" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
class="page"
:total="total"
:page.sync="listQuery.PageIndex"
:limit.sync="listQuery.PageSize"
@pagination="getList"
/>
</template> </template>
</BaseContainer> </BaseContainer>
</template> </template>
@ -128,17 +108,15 @@ 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() { created() { this.initPage() },
this.initPage()
},
methods: { methods: {
go(path) { go(path) {
window.open(path) window.open(path)
@ -149,27 +127,23 @@ 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) getConfirmationReviewerList(this.listQuery).then(res => {
.then((res) => { this.listLoading = false
this.listLoading = false this.list = res.Result.CurrentPageData
this.list = res.Result.CurrentPageData this.total = res.Result.TotalCount
this.total = res.Result.TotalCount // eslint-disable-next-line handle-callback-err
// eslint-disable-next-line handle-callback-err }).catch(() => { this.listLoading = false })
})
.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)
// } // }
@ -183,17 +157,15 @@ 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) confirmReviewer(params).then(res => {
.then((res) => { this.loading = false
this.loading = false this.getList()
this.getList() this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$message.success(this.$t('common:message:savedSuccessfully')) }).catch(() => {
}) this.loading = false
.catch(() => { })
this.loading = false
})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const arr = [] const arr = []
@ -217,23 +189,19 @@ export default {
return 'selected' return 'selected'
} }
}, },
handleSelectTable(row) { handleSelectTable(row) { return row.DoctorTrialState !== 10 },
return row.DoctorTrialState !== 10
},
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')
}, },
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,9 +168,7 @@
<span <span
style="color: #428bca; cursor: pointer" style="color: #428bca; cursor: pointer"
@click=" @click="
go( go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)
`/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
> >
@ -583,7 +581,7 @@ export default {
}, },
handleDetail(row) { handleDetail(row) {
const { href } = this.$router.resolve({ const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}`, path: `/trialsResume?doctorId=${row.Id}`,
}) })
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,15 +47,7 @@
min-width="120" min-width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span <span style="color: #428bca;cursor: pointer;" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</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>
@ -82,12 +74,8 @@
min-width="100" min-width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.DoctorTrialState === 5" type="primary">{{ <el-tag v-if="scope.row.DoctorTrialState === 5" type="primary">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag>
$fd('DoctorTrialState', scope.row.DoctorTrialState) <el-tag v-else type="danger">{{ $fd('DoctorTrialState', 16) }}</el-tag>
}}</el-tag>
<el-tag v-else type="danger">{{
$fd('DoctorTrialState', 16)
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- Submitter --> <!-- Submitter -->
@ -118,13 +106,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination class="page" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
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')"
@ -138,12 +120,8 @@
<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">{{ <el-button @click="dialogVisible = false">{{ $t('common:button:cancel') }}</el-button>
$t('common:button:cancel') <el-button type="primary" @click="handleDownloadResumes">{{ $t('common:button:save') }}</el-button>
}}</el-button>
<el-button type="primary" @click="handleDownloadResumes">{{
$t('common:button:save')
}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -152,15 +130,11 @@
<script> <script>
import BaseContainer from '@/components/BaseContainer' import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { import { getSubmissionOrApprovalReviewerList, submitReviewer, downloadResume } from '@/api/trials'
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 {
@ -175,7 +149,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,
@ -184,12 +158,10 @@ export default {
dialogVisible: false, dialogVisible: false,
language: 2, language: 2,
token: store.getters.token, token: store.getters.token,
selectTable: {}, selectTable: {}
} }
}, },
created() { created() { this.initPage() },
this.initPage()
},
methods: { methods: {
go(path) { go(path) {
window.open(path) window.open(path)
@ -200,41 +172,35 @@ 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) getSubmissionOrApprovalReviewerList(this.listQuery).then(res => {
.then((res) => { this.listLoading = false
this.listLoading = false this.list = res.Result.CurrentPageData
this.list = res.Result.CurrentPageData this.total = res.Result.TotalCount
this.total = res.Result.TotalCount // eslint-disable-next-line handle-callback-err
// eslint-disable-next-line handle-callback-err }).catch(() => { this.listLoading = false })
})
.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) submitReviewer(trialId, this.submitIdArr, 1).then(res => {
.then((res) => { this.loading = false
this.loading = false if (res.IsSuccess) {
if (res.IsSuccess) { this.getList()
this.getList() //
// this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$message.success(this.$t('common:message:savedSuccessfully')) if(res.Result.IsHaveSPMOrCPM){
if (res.Result.IsHaveSPMOrCPM) { this.$emit('nextStep', 'approval')
this.$emit('nextStep', 'approval') }else{
} else { this.$emit('nextStep', 'confirmation')
this.$emit('nextStep', 'confirmation')
}
} }
}) }
.catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
}) })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
@ -259,13 +225,9 @@ export default {
return 'selected' return 'selected'
} }
}, },
handleSelectTable(row) { handleSelectTable(row) { return row.DoctorTrialState !== 5 },
return row.DoctorTrialState !== 5
},
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')
}, },
handleDownloadAll() { handleDownloadAll() {
@ -281,81 +243,68 @@ 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( const promise = this.getFileData(this.OSSclientConfig.basePath + item.Path).then((res) => {
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) Promise.all(promises).then(() => {
.then(() => { // zip
// zip zip.generateAsync({
zip type: 'blob',
.generateAsync({ compression: 'DEFLATE', // STORE: DEFLATE
type: 'blob', compressionOptions: {
compression: 'DEFLATE', // STORE: DEFLATE level: 9 // 1~9 1 9
compressionOptions: { }
level: 9, // 1~9 1 9 }).then((res) => {
}, 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 doctorIdList:this.selectTable.Id?[this.selectTable.Id]: this.list.map(v => {return v.Id}),
? [this.selectTable.Id] language: this.language
: this.list.map((v) => { }).then(async res => {
return v.Id this.selectTable = {};
}), this.dialogVisible = false
language: this.language, if (!res.Result || res.Result.length === 0) {
}) this.$alert(this.$t('trials:seletctedReviews:table:noResume'))
.then(async (res) => { }else{
this.selectTable = {} for (let i = 0; res.Result.length > i; i++) {
this.dialogVisible = false let item = res.Result[i]
if (!res.Result || res.Result.length === 0) { await this.handleBatchDown(item)
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 }).catch(err=>{
this.selectTable = {} 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++) {
@ -364,13 +313,9 @@ export default {
// this.downloadResume(arr) // this.downloadResume(arr)
}, },
downloadResume(arr) { downloadResume(arr) {
downloadResume(this.$route.query.trialId, this.language, arr).then( downloadResume(this.$route.query.trialId, this.language, arr).then(res => { window.open(res.Result) })
(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') {
@ -379,8 +324,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" :trialId.sync="trialId" /> <preview :isEN="isEN" :reviewerId.sync="reviewerId" />
</div> </div>
</template> </template>
<script> <script>
@ -18,12 +18,10 @@ 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() {