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,
default: '',
},
trialId: {
type: String,
default: '',
},
isEN: {
type: Boolean,
default: false,
@ -834,7 +830,7 @@ export default {
try {
let id = this.reviewerId
this.loading = true
let res = await getDetail(id, this.trialId)
let res = await getDetail(id)
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}&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>
</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}&trialId=${this.$route.query.trialId}` })
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
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,15 +38,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}&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>
</el-table-column>
<!-- Name CN -->
@ -72,15 +64,9 @@
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 -->
@ -101,13 +87,7 @@
</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>
@ -128,17 +108,15 @@ 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)
@ -149,27 +127,23 @@ 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)
// }
@ -183,17 +157,15 @@ 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 = []
@ -217,23 +189,19 @@ 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}&trialId=${this.$route.query.trialId}`,
})
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
window.open(href, '_blank')
},
cellColor({ row, column, rowIndex, columnIndex }) {
if (row.DoctorTrialState === 10 && columnIndex === 5) {
return {
color: '#428bca',
color: '#428bca'
}
}
},
},
}
}
}
</script>

View File

@ -168,9 +168,7 @@
<span
style="color: #428bca; cursor: pointer"
@click="
go(
`/trialsResume?doctorId=${scope.row.Id}&trialId=${$route.query.trialId}&token=${token}`
)
go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)
"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span
>
@ -583,7 +581,7 @@ export default {
},
handleDetail(row) {
const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}`,
path: `/trialsResume?doctorId=${row.Id}`,
})
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,15 +47,7 @@
min-width="120"
>
<template slot-scope="scope">
<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>
<!-- <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>
@ -82,12 +74,8 @@
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 -->
@ -118,13 +106,7 @@
</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')"
@ -138,12 +120,8 @@
<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>
@ -152,15 +130,11 @@
<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 {
@ -175,7 +149,7 @@ export default {
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: '',
SortField: ''
},
loading: false,
total: 0,
@ -184,12 +158,10 @@ export default {
dialogVisible: false,
language: 2,
token: store.getters.token,
selectTable: {},
selectTable: {}
}
},
created() {
this.initPage()
},
created() { this.initPage() },
methods: {
go(path) {
window.open(path)
@ -200,41 +172,35 @@ 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) {
@ -259,13 +225,9 @@ 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}&trialId=${this.$route.query.trialId}`,
})
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
window.open(href, '_blank')
},
handleDownloadAll() {
@ -281,81 +243,68 @@ export default {
return new Promise((resolve, reject) => {
axios(fileUrl, {
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) {
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
resolve()
})
})
.catch((reason) => {
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()
})
})
},
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)
}
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 = {}
})
}
}).catch(err=>{
this.dialogVisible = false;
this.selectTable= {};
})
// this.dialogVisible = false
// const arr = []
// for (let index = 0; index < this.list.length; index++) {
@ -364,11 +313,7 @@ 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) {
this.selectTable = row
@ -379,8 +324,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" :trialId.sync="trialId" />
<preview :isEN="isEN" :reviewerId.sync="reviewerId" />
</div>
</template>
<script>
@ -18,12 +18,10 @@ export default {
return {
isInit: false,
reviewerId: '',
trialId: null,
}
},
created() {
this.reviewerId = this.$route.query.doctorId
this.trialId = this.$route.query.trialId
},
computed: {
isEN() {