726 lines
24 KiB
Plaintext
726 lines
24 KiB
Plaintext
<template>
|
||
<BaseContainer>
|
||
<!-- <template slot="search-container">
|
||
<el-button
|
||
v-hasPermi="['trials:trials-panel:enrolled-reviewers:list:enroll']"
|
||
icon="el-icon-plus"
|
||
type="primary"
|
||
style="margin-left: auto"
|
||
@click="handleEnroll"
|
||
>Enroll</el-button>
|
||
</template> -->
|
||
|
||
<template slot="main-container">
|
||
<!-- 入组医生列表 -->
|
||
<el-table
|
||
v-loading="listLoading"
|
||
v-adaptive="{bottomOffset:55}"
|
||
:data="list"
|
||
stripe
|
||
show-summary
|
||
:summary-method="getSummaries"
|
||
height="100"
|
||
@sort-change="handleSortByColumn"
|
||
>
|
||
<el-table-column type="index" width="40" />
|
||
<!-- Name -->
|
||
<el-table-column
|
||
:label="$t('trials:enrolledReviews:table:name')"
|
||
show-overflow-tooltip
|
||
min-width="150"
|
||
prop="FirstName"
|
||
sortable="custom"
|
||
>
|
||
<template slot-scope="scope">
|
||
<router-link
|
||
style="color: #00d1b2;"
|
||
tag="a"
|
||
:to="{
|
||
path: `/trialsResume?doctorId=${scope.row.DoctorId}&token=${token}`,
|
||
|
||
}"
|
||
target="_blank"
|
||
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</router-link>
|
||
</template>
|
||
</el-table-column>
|
||
<!-- Name CN -->
|
||
<el-table-column
|
||
prop="ChineseName"
|
||
sortable="custom"
|
||
:label="$t('trials:enrolledReviews:table:nameCN')"
|
||
min-width="110"
|
||
show-overflow-tooltip
|
||
/>
|
||
<!-- ID -->
|
||
<el-table-column
|
||
prop="Code"
|
||
:label="$t('trials:enrolledReviews:table:id')"
|
||
min-width="80"
|
||
sortable="custom"
|
||
show-overflow-tooltip
|
||
/>
|
||
<!-- Status -->
|
||
<el-table-column
|
||
prop="EnrollTimeStr"
|
||
:label="$t('trials:enrolledReviews:table:status')"
|
||
width="300"
|
||
sortable="custom"
|
||
show-overflow-tooltip
|
||
>
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.EnrollTime">
|
||
{{ `${$t('trials:enrolledReviews:label:enrolled')}(${scope.row.EnrollTime})` }}
|
||
</span>
|
||
|
||
<span v-else-if="scope.row.OutEnrollTime">
|
||
{{ `${$t('trials:enrolledReviews:label:outOfEnrollment')}(${scope.row.OutEnrollTime})` }}
|
||
</span>
|
||
<el-button
|
||
v-if="scope.row.EnrollTime"
|
||
v-hasPermi="['trials:trials-panel:enrolled-reviewers:list:edit']"
|
||
type="text"
|
||
@click="changeStatus(scope.row)"
|
||
>
|
||
{{ $t('common:button:edit') }}
|
||
</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
<!-- Training -->
|
||
<el-table-column
|
||
prop="TrainingTimes"
|
||
:label="$t('trials:enrolledReviews:table:training')"
|
||
min-width="80"
|
||
show-overflow-tooltip
|
||
/>
|
||
<!-- Refresher Training -->
|
||
<el-table-column
|
||
prop="RefresherTraining"
|
||
:label="$t('trials:enrolledReviews:table:refresherTraining')"
|
||
min-width="150"
|
||
show-overflow-tooltip
|
||
/>
|
||
<!-- Timepoint -->
|
||
<el-table-column :label="$t('trials:enrolledReviews:table:tp')" align="center">
|
||
<el-table-column
|
||
prop="Timepoint"
|
||
:label="$t('trials:enrolledReviews:table:tpRegular')"
|
||
min-width="80"
|
||
show-overflow-tooltip
|
||
/>
|
||
<el-table-column
|
||
prop="TimepointIn48H"
|
||
:label="$t('trials:enrolledReviews:table:tp48H')"
|
||
min-width="90"
|
||
show-overflow-tooltip
|
||
/>
|
||
<el-table-column
|
||
prop="TimepointIn24H"
|
||
:label="$t('trials:enrolledReviews:table:tp24H')"
|
||
min-width="90"
|
||
show-overflow-tooltip
|
||
/>
|
||
</el-table-column>
|
||
<el-table-column :label="$t('trials:enrolledReviews:table:ad')" align="center">
|
||
<el-table-column
|
||
prop="Adjudication"
|
||
:label="$t('trials:enrolledReviews:table:adRegular')"
|
||
min-width="80"
|
||
show-overflow-tooltip
|
||
/>
|
||
<el-table-column
|
||
prop="AdjudicationIn48H"
|
||
:label="$t('trials:enrolledReviews:table:ad48H')"
|
||
min-width="90"
|
||
show-overflow-tooltip
|
||
/>
|
||
<el-table-column
|
||
prop="AdjudicationIn24H"
|
||
:label="$t('trials:enrolledReviews:table:ad24H')"
|
||
min-width="90"
|
||
show-overflow-tooltip
|
||
/>
|
||
</el-table-column>
|
||
<el-table-column
|
||
prop="Global"
|
||
:label="$t('trials:enrolledReviews:table:gl')"
|
||
min-width="100"
|
||
show-overflow-tooltip
|
||
/>
|
||
|
||
<el-table-column
|
||
prop="Downtime"
|
||
:label="$t('trials:enrolledReviews:table:downtime')"
|
||
min-width="90"
|
||
show-overflow-tooltip
|
||
/>
|
||
<el-table-column
|
||
prop="ReadingCategorys"
|
||
:label="$t('trials:enrolledReviews:table:readingType')"
|
||
width="360"
|
||
show-overflow-tooltip
|
||
>
|
||
<template slot-scope="scope">
|
||
<span v-for="item of scope.row.ReadingCategorys">
|
||
<el-tag v-if="item === 1" type="primary">{{ $fd('ReadingCategory', item) }}</el-tag>
|
||
<el-tag v-if="item === 2" type="info">{{ $fd('ReadingCategory', item) }}</el-tag>
|
||
<el-tag v-if="item === 4" type="danger">{{ $fd('ReadingCategory', item) }}</el-tag>
|
||
<el-tag v-if="item === 5" type="warning">{{ $fd('ReadingCategory', item) }}</el-tag>
|
||
</span>
|
||
<el-button
|
||
v-hasPermi="['trials:trials-panel:enrolled-reviewers:list:edit']"
|
||
type="text"
|
||
@click="openSetEnrollReadingCategory(scope.row)"
|
||
>
|
||
{{ $t('trials:enrolledReviews:button:config') }}
|
||
</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
<!-- <el-table-column-->
|
||
<!-- :label="$t('trials:enrolledReviews:table:readingType')"-->
|
||
<!-- width="200"-->
|
||
<!-- show-overflow-tooltip-->
|
||
<!-- >-->
|
||
<!-- <template slot-scope="scope">-->
|
||
<!-- <span>{{-->
|
||
<!-- scope.row.ReviewerReadingType == 0-->
|
||
<!-- ? 'TP&GL&AD'-->
|
||
<!-- : scope.row.ReviewerReadingType == 1-->
|
||
<!-- ? 'TP&GL'-->
|
||
<!-- : 'AD'-->
|
||
<!-- }}-->
|
||
<!-- </span>-->
|
||
<!-- <!– config –>-->
|
||
<!-- <el-button-->
|
||
<!-- v-hasPermi="['trials:trials-panel:enrolled-reviewers:list:edit']"-->
|
||
<!-- type="text"-->
|
||
<!-- @click="handleConfigReadingType(scope.row)"-->
|
||
<!-- >-->
|
||
<!-- {{ $t('trials:enrolledReviews:button:config') }}-->
|
||
<!-- </el-button>-->
|
||
<!-- </template>-->
|
||
<!-- </el-table-column>-->
|
||
|
||
<el-table-column
|
||
:label="$t('trials:enrolledReviews:table:ackOfSow')"
|
||
width="200"
|
||
show-overflow-tooltip
|
||
>
|
||
<template slot-scope="scope">
|
||
<div
|
||
v-if="
|
||
scope.row.AgreementId != '00000000-0000-0000-0000-000000000000'
|
||
"
|
||
>
|
||
<!-- 查看 -->
|
||
<el-button
|
||
type="text"
|
||
style="margin-right: 10px"
|
||
@click="handleViewAckSow(scope.row)"
|
||
>
|
||
{{ $t('trials:enrolledReviews:button:view') }}
|
||
</el-button>
|
||
<!-- 删除 -->
|
||
<el-button
|
||
v-hasPermi="['trials:trials-panel:enrolled-reviewers:list:edit']"
|
||
type="text"
|
||
@click="handleDeleteAckSOW(scope.row)"
|
||
>
|
||
{{ $t('trials:enrolledReviews:button:delete') }}
|
||
</el-button>
|
||
</div>
|
||
<div v-else>
|
||
<!-- Not uploaded -->
|
||
<span>{{ $t('trials:enrolledReviews:label:notUpload') }}</span>
|
||
<!-- 上传 -->
|
||
<el-button
|
||
v-hasPermi="['trials:trials-panel:enrolled-reviewers:list:edit']"
|
||
type="text"
|
||
style="margin-left: 10px"
|
||
@click="handleUploadAckSow(scope.row)"
|
||
>
|
||
{{ $t('trials:enrolledReviews:button:upload') }}
|
||
</el-button>
|
||
</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
v-if="hasPermi(['trials:trials-panel:enrolled-reviewers:list:stats'])"
|
||
fixed="right"
|
||
:label="$t('common:action:action')"
|
||
width="100"
|
||
>
|
||
<template slot-scope="scope">
|
||
<!-- stats -->
|
||
<el-button
|
||
v-hasPermi="['trials:trials-panel:enrolled-reviewers:list:stats']"
|
||
icon="el-icon-edit"
|
||
circle
|
||
:title="$t('trials:enrolledReviews:action:stats')"
|
||
@click="handleStats(scope.row)"
|
||
/>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
</template>
|
||
|
||
<!-- 上传SOW -->
|
||
<base-model :config="sow_model">
|
||
<template slot="dialog-body">
|
||
<upload-acksow
|
||
ref="uploadAckSow"
|
||
:trial-id="listQuery.TrialId"
|
||
:doctor-id="doctorId"
|
||
@getFileList="getFileList"
|
||
/>
|
||
</template>
|
||
</base-model>
|
||
|
||
<!-- 修改 Reading Type -->
|
||
<base-model :config="readingType_model">
|
||
<template slot="dialog-body">
|
||
<!-- Reading Type -->
|
||
<label>{{ $t('trials:enrolledReviews:table:readingType') }}: </label>
|
||
<el-select
|
||
v-model="readingType"
|
||
filterable
|
||
allow-create
|
||
default-first-option
|
||
style="width: 70%"
|
||
>
|
||
<el-option :value="0" label="TP&GL&AD" />
|
||
<el-option :value="1" label="TP&GL" />
|
||
<el-option :value="2" label="AD" />
|
||
</el-select>
|
||
</template>
|
||
<template slot="dialog-footer">
|
||
<el-button
|
||
:disabled="readingType_model.btnLoading"
|
||
type="primary"
|
||
@click="readingType_model.visible = false"
|
||
>
|
||
{{ $t('common:button:cancel') }}
|
||
</el-button>
|
||
<el-button
|
||
type="primary"
|
||
:loading="readingType_model.btnLoading"
|
||
@click="handleUpdateReadingType"
|
||
>
|
||
{{ $t('common:button:save') }}
|
||
</el-button>
|
||
</template>
|
||
</base-model>
|
||
<!-- 修改 readingCategory -->
|
||
<base-model :config="readingCategory_model">
|
||
<template slot="dialog-body">
|
||
<!-- Reading Type -->
|
||
<label>{{ $t('trials:enrolledReviews:table:readingType') }}: </label>
|
||
<el-select
|
||
v-model="ReadingCategorys"
|
||
filterable
|
||
allow-create
|
||
multiple
|
||
default-first-option
|
||
style="width: 70%"
|
||
>
|
||
<el-option v-for="item of $d.ReadingCategory" :key="item.id" :value="item.value" :label="item.label" />
|
||
</el-select>
|
||
</template>
|
||
<template slot="dialog-footer">
|
||
<el-button
|
||
:disabled="readingCategory_model.btnLoading"
|
||
type="primary"
|
||
@click="readingCategory_model.visible = false"
|
||
>
|
||
{{ $t('common:button:cancel') }}
|
||
</el-button>
|
||
<el-button
|
||
type="primary"
|
||
:loading="readingCategory_model.btnLoading"
|
||
@click="handleUpdateReadingCategory"
|
||
>
|
||
{{ $t('common:button:save') }}
|
||
</el-button>
|
||
</template>
|
||
</base-model>
|
||
<!-- 修改医生状态 -->
|
||
<base-model :config="reviewerStatus_model">
|
||
<template slot="dialog-body">
|
||
<el-form
|
||
ref="updateStatusForm"
|
||
:model="updateStatusForm"
|
||
:rules="updateStatusFormrules"
|
||
>
|
||
<el-form-item :label="$t('trials:enrolledReviews:label:enrollmentStatus')" prop="Status">
|
||
<el-select
|
||
v-model="updateStatusForm.Status"
|
||
style="width:60%;"
|
||
>
|
||
<!-- 0:回退;1:出组; -->
|
||
<el-option v-for="item of $d.OutOrInEnrollment" :value="item.value" :label="item.label" :disabled="item.value === 0 && currentWorkload>0" />
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item
|
||
v-if="updateStatusForm.Status== 1"
|
||
:label="$t('trials:enrolledReviews:label:outOfEnrollmentTime')"
|
||
prop="OutEnrollmentTime"
|
||
>
|
||
<el-date-picker
|
||
v-model="updateStatusForm.OutEnrollmentTime"
|
||
type="date"
|
||
value-format="yyyy-MM-dd"
|
||
format="yyyy-MM-dd"
|
||
/>
|
||
</el-form-item>
|
||
</el-form>
|
||
</template>
|
||
<template slot="dialog-footer">
|
||
<el-button
|
||
:disabled="reviewerStatus_model.btnLoading"
|
||
type="primary"
|
||
@click="reviewerStatus_model.visible = false"
|
||
>
|
||
{{ $t('common:button:cancel') }}
|
||
</el-button>
|
||
<el-button
|
||
type="primary"
|
||
:loading="reviewerStatus_model.btnLoading"
|
||
@click="handleUpdateReviewerStatus"
|
||
>
|
||
{{ $t('common:button:save') }}
|
||
</el-button>
|
||
</template>
|
||
</base-model>
|
||
</BaseContainer>
|
||
</template>
|
||
<script>
|
||
import {
|
||
getTrialEnrollmentWorkloadStats,
|
||
deleteReviewerAckSOW,
|
||
updateReviewerReadingType,
|
||
enrollBackOrOut,
|
||
setEnrollReadingCategory
|
||
} from '@/api/trials'
|
||
import UploadAcksow from './components/UploadAcksow'
|
||
import store from '@/store'
|
||
import BaseContainer from '@/components/BaseContainer'
|
||
import BaseModel from '@/components/BaseModel'
|
||
export default {
|
||
components: { UploadAcksow, BaseContainer, BaseModel },
|
||
data() {
|
||
return {
|
||
list: [],
|
||
listQuery: {
|
||
TrialId: '',
|
||
PageIndex: 1,
|
||
PageSize: 100,
|
||
Asc: false,
|
||
SortField: ''
|
||
},
|
||
doctorId: '',
|
||
currentRow: {},
|
||
listLoading: false,
|
||
total: 0,
|
||
trialId: '',
|
||
currentClickRowData: '',
|
||
readingType: '',
|
||
|
||
sow_model: {
|
||
visible: false,
|
||
title: this.$t('trials:enrolledReviews:dialogTitle:signedAckOfSow'),
|
||
showClose: true,
|
||
width: '500px'
|
||
},
|
||
readingType_model: {
|
||
visible: false,
|
||
title: this.$t('trials:enrolledReviews:dialogTitle:changeReadingType'),
|
||
showClose: true,
|
||
width: '500px',
|
||
btnLoading: false
|
||
},
|
||
readingCategory_model: {
|
||
visible: false,
|
||
title: this.$t('trials:enrolledReviews:dialogTitle:changeReadingType'),
|
||
showClose: true,
|
||
width: '500px',
|
||
btnLoading: false
|
||
},
|
||
reviewerStatus_model: {
|
||
visible: false,
|
||
title: this.$t('trials:enrolledReviews:dialogTitle:changeStatus'),
|
||
showClose: true,
|
||
width: '500px',
|
||
btnLoading: false
|
||
},
|
||
updateStatusForm: {
|
||
Status: '',
|
||
OutEnrollmentTime: ''
|
||
},
|
||
updateStatusFormrules: {
|
||
Status: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
|
||
OutEnrollmentTime: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }]
|
||
},
|
||
token: store.getters.token,
|
||
ReadingCategorys: []
|
||
}
|
||
},
|
||
computed: {
|
||
currentWorkload() {
|
||
if (Object.keys(this.currentRow).length === 0) return 0
|
||
var total = this.currentRow.Adjudication + this.currentRow.AdjudicationIn24H + this.currentRow.AdjudicationIn48H + this.currentRow.Timepoint + this.currentRow.TimepointIn24H + this.currentRow.TimepointIn48H + this.currentRow.TrainingTimes + this.currentRow.RefresherTraining + this.currentRow.Global + this.currentRow.Downtime
|
||
return total
|
||
}
|
||
},
|
||
mounted() {
|
||
this.trialId = this.$route.query.trialCode
|
||
this.listQuery.TrialId = this.$route.query.trialId
|
||
this.initPage()
|
||
},
|
||
methods: {
|
||
handleUpdateReadingCategory() {
|
||
this.readingCategory_model.btnLoading = true
|
||
this.readingCategory_model.showClose = false
|
||
setEnrollReadingCategory({
|
||
TrialId: this.$route.query.trialId,
|
||
EnrollId: this.currentRow.EnrollId,
|
||
ReadingCategorys: this.ReadingCategorys
|
||
})
|
||
.then(res => {
|
||
this.readingCategory_model.visible = false
|
||
this.readingCategory_model.btnLoading = false
|
||
this.readingCategory_model.showClose = true
|
||
this.initPage()
|
||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||
}).catch(_ => {
|
||
this.readingCategory_model.btnLoading = false
|
||
this.readingCategory_model.showClose = true
|
||
})
|
||
},
|
||
openSetEnrollReadingCategory(row) {
|
||
this.readingCategory_model.visible = true
|
||
this.ReadingCategorys = row.ReadingCategorys
|
||
this.currentRow = row
|
||
},
|
||
// 获取入组医生列表数据
|
||
initPage() {
|
||
this.listLoading = true
|
||
getTrialEnrollmentWorkloadStats(this.listQuery).then((res) => {
|
||
this.listLoading = false
|
||
this.list = res.Result.CurrentPageData
|
||
this.total = res.Result.TotalCount
|
||
}).catch(() => {
|
||
this.listLoading = false
|
||
})
|
||
},
|
||
|
||
// Enroll按钮回调
|
||
handleEnroll() {
|
||
this.$router.push({
|
||
path: `/trials/trials-panel/enrolled-reviewers/enroll?trialId=${this.listQuery.TrialId}&trialCode=${this.trialId}`
|
||
})
|
||
},
|
||
|
||
// 打开修改状态模态框
|
||
changeStatus(row) {
|
||
this.reviewerStatus_model.visible = true
|
||
this.currentRow = row
|
||
},
|
||
|
||
// 更新医生状态信息
|
||
handleUpdateReviewerStatus() {
|
||
this.$refs.updateStatusForm.validate(valid => {
|
||
if (!valid) return
|
||
this.reviewerStatus_model.btnLoading = true
|
||
this.reviewerStatus_model.showClose = false
|
||
enrollBackOrOut(this.listQuery.TrialId, this.currentRow.DoctorId, this.updateStatusForm.Status, this.updateStatusForm.OutEnrollmentTime)
|
||
.then(res => {
|
||
this.$nextTick(() => {
|
||
this.$refs['updateStatusForm'].resetFields()
|
||
})
|
||
this.reviewerStatus_model.btnLoading = false
|
||
this.reviewerStatus_model.visible = false
|
||
this.reviewerStatus_model.showClose = true
|
||
this.initPage()
|
||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||
})
|
||
.catch(() => {
|
||
this.reviewerStatus_model.btnLoading = false
|
||
this.reviewerStatus_model.showClose = true
|
||
})
|
||
})
|
||
},
|
||
|
||
// 打开修改reading type模态框
|
||
handleConfigReadingType(row) {
|
||
this.readingType_model.visible = true
|
||
const { ReviewerReadingType } = row
|
||
this.readingType = ReviewerReadingType
|
||
this.currentRow = row
|
||
},
|
||
|
||
// 更新 reading type
|
||
handleUpdateReadingType() {
|
||
this.readingType_model.btnLoading = true
|
||
this.readingType_model.showClose = false
|
||
updateReviewerReadingType(this.listQuery.TrialId, this.currentRow.DoctorId, this.readingType)
|
||
.then(res => {
|
||
this.readingType_model.visible = false
|
||
this.readingType_model.btnLoading = false
|
||
this.readingType_model.showClose = true
|
||
this.initPage()
|
||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||
}).catch(_ => {
|
||
this.readingType_model.btnLoading = false
|
||
this.readingType_model.showClose = true
|
||
})
|
||
},
|
||
// 排序
|
||
handleSortByColumn(column) {
|
||
if (column.order === 'ascending') {
|
||
this.listQuery.Asc = true
|
||
} else {
|
||
this.listQuery.Asc = false
|
||
}
|
||
column.prop === 'EnrollTimeStr'
|
||
? (this.listQuery.SortField = 'EnrollTime')
|
||
: (this.listQuery.SortField = column.prop)
|
||
this.listQuery.PageIndex = 1
|
||
this.initPage()
|
||
},
|
||
|
||
// 医生详情页跳转
|
||
handleReviewerDetail(row) {
|
||
const { href } = this.$router.resolve({ path: `/trials/trials-panel/enrolled-reviewers/resume?doctorId=${row.DoctorId}` })
|
||
window.open(href, '_blank')
|
||
},
|
||
|
||
// 上传SOW
|
||
handleUploadAckSow(row) {
|
||
this.doctorId = row.DoctorId
|
||
this.currentRow = row
|
||
this.sow_model.visible = true
|
||
let fileList = []
|
||
if (row.AgreementId !== '00000000-0000-0000-0000-000000000000') {
|
||
fileList = [
|
||
{
|
||
DoctorId: row.DoctorId,
|
||
name: row.AgreementFileName,
|
||
FileName: row.AgreementFileName,
|
||
Path: row.AgreementPath,
|
||
FullPath: row.AgreementFullPath,
|
||
Type: 'ACK of SOW'
|
||
}
|
||
]
|
||
}
|
||
this.$nextTick(function() {
|
||
this.$refs.uploadAckSow.initFileList(fileList)
|
||
})
|
||
},
|
||
|
||
// 获取上传控件种SOW文件列表
|
||
getFileList(fileList) {
|
||
this.currentRow.AgreementId =
|
||
fileList.length > 0
|
||
? fileList[0].Id
|
||
: '00000000-0000-0000-0000-000000000000'
|
||
this.currentRow.AgreementFileName =
|
||
fileList.length > 0 ? fileList[0].FileName : ''
|
||
this.currentRow.AgreementFullPath =
|
||
fileList.length > 0 ? fileList[0].FullPath : ''
|
||
this.currentRow.AgreementPath =
|
||
fileList.length > 0 ? fileList[0].Path : ''
|
||
},
|
||
|
||
// 预览SOW
|
||
handleViewAckSow(row) {
|
||
row.AgreementFullPath ? window.open(row.AgreementFullPath, '_blank') : ''
|
||
},
|
||
|
||
// 删除SOW文件
|
||
handleDeleteAckSOW(row) {
|
||
this.$confirm(this.$t('trials:enrolledReviews:message:deleteSOWWarning'), {
|
||
type: 'warning',
|
||
distinguishCancelAndClose: true
|
||
})
|
||
.then(() => {
|
||
deleteReviewerAckSOW(
|
||
this.listQuery.TrialId,
|
||
row.DoctorId,
|
||
row.AgreementId
|
||
).then((res) => {
|
||
row.AgreementId = '00000000-0000-0000-0000-000000000000'
|
||
row.AgreementFileName = ''
|
||
row.AgreementFullPath = ''
|
||
row.AgreementPath = ''
|
||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||
})
|
||
})
|
||
.catch((action) => {})
|
||
},
|
||
|
||
// 跳转工作量统计页
|
||
handleStats(row) {
|
||
this.currentClickRowData = row
|
||
if (row.AgreementId === '00000000-0000-0000-0000-000000000000') {
|
||
// 'Ack-Sow is not uploaded, continue?'
|
||
this.$confirm(this.$t('trials:enrolledReviews:message:statsWarning'), {
|
||
type: 'warning',
|
||
distinguishCancelAndClose: true
|
||
})
|
||
.then(() => {
|
||
this.handleTipCloseOK()
|
||
})
|
||
.catch(_ => {})
|
||
} else {
|
||
this.handleTipCloseOK()
|
||
}
|
||
},
|
||
|
||
handleTipCloseOK() {
|
||
zzSessionStorage.setItem(
|
||
'ReviewerName',
|
||
this.currentClickRowData.FirstName +
|
||
' ' +
|
||
this.currentClickRowData.LastName
|
||
)
|
||
this.$router.push({
|
||
path: `/trials/trials-panel/enrolled-reviewers/stats?doctorId=${this.currentClickRowData.DoctorId}&trialId=${this.listQuery.TrialId}&trialCode=${this.trialId}&doctorName=${this.currentClickRowData.LastName}/${this.currentClickRowData.FirstName}`
|
||
})
|
||
},
|
||
|
||
// 合计行
|
||
getSummaries(param) {
|
||
const { columns, data } = param
|
||
const sums = []
|
||
columns.forEach((column, index) => {
|
||
if (index === 1) {
|
||
sums[index] = 'Total (Current Page)'
|
||
return
|
||
}
|
||
const values = data.map((item) => Number(item[column.property]))
|
||
if (!values.every((value) => isNaN(value))) {
|
||
sums[index] = values.reduce((prev, curr) => {
|
||
const value = Number(curr)
|
||
if (!isNaN(value)) {
|
||
return prev + curr
|
||
} else {
|
||
return prev
|
||
}
|
||
}, 0)
|
||
}
|
||
})
|
||
return sums
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
<style lang="scss">
|
||
.enroll-list {
|
||
height: 100%;
|
||
.filter-box {
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 5px 0px;
|
||
}
|
||
}
|
||
</style>
|