irc_web/.svn/pristine/06/06640cf7100e218c45f145ff47a...

467 lines
16 KiB
Plaintext

/* eslint-disable */
<template>
<BaseContainer>
<template slot="search-container">
<el-form :inline="true">
<el-form-item :label="$t('trials:consistencyCheck:table:siteId')">
<el-select v-model="searchData.SiteId" clearable filterable style="width:120px;">
<el-option
v-for="(item,index) of siteOptions"
:key="index"
:label="item.TrialSiteCode"
:value="item.SiteId"
/>
</el-select>
</el-form-item>
<!-- 受试者编号 -->
<el-form-item :label="$t('trials:consistencyCheck:table:subjectId')">
<el-input v-model="searchData.SubjectCode" style="width:100px;" />
</el-form-item>
<el-form-item style="margin-bottom:10px" label="访视/阅片期名称">
<el-input
v-model="searchData.TaskName"
style="width:100px;"
clearable
/>
</el-form-item>
<el-form-item style="margin-bottom:10px" label="阅片人">
<el-select v-model="searchData.DoctorUserId" clearable style="width:120px;">
<el-option v-for="item of DoctorUserList" :key="'DoctorUserId' + item.DoctorUserId" :value="item.DoctorUserId" :label="item.UserName" />
</el-select>
</el-form-item>
<el-form-item style="margin-bottom:10px" label="阅片标准">
<el-select v-model="searchData.TrialReadingCriterionId" clearable style="width:120px;">
<el-option v-for="item of trialCriterionList" :key="'TrialReadingCriterionId' + item.TrialReadingCriterionId" :value="item.TrialReadingCriterionId" :label="item.TrialReadingCriterionName" />
</el-select>
</el-form-item>
<el-form-item style="margin-bottom:10px" label="是否加急">
<el-select v-model="searchData.IsUrgent" clearable style="width:120px;">
<el-option v-for="item of $d.YesOrNo" :key="'IsUrgent' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item style="margin-bottom:10px" label="任务状态">
<el-select v-model="searchData.TaskState" clearable style="width:120px;">
<el-option v-for="item of $d.TaskState" :key="'TaskState' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item style="margin-bottom:10px" label="任务类型">
<el-select v-model="searchData.ReadingCategory" clearable style="width:120px;">
<el-option v-for="item of $d.ReadingCategory" :key="'ReadingCategory' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item style="margin-bottom:10px" label="是否产生裁判">
<el-select v-model="searchData.IsGeneratedJudge" clearable style="width:120px;">
<el-option v-for="item of $d.YesOrNo" :key="'IsGeneratedJudge' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item style="margin-bottom:10px" label="全局阅片是否有更新">
<el-select v-model="searchData.IsGeneratedJudge" clearable style="width:120px;">
<el-option v-for="item of $d.YesOrNo" :key="'ReadingCategory' + item.label" :value="item.value" :label="item.label" />
</el-select>
</el-form-item>
<el-form-item style="margin-bottom:10px">
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
{{ $t('common:button:reset') }}
</el-button>
<el-button type="primary" @click="openAssignMedicalReviewTask">
批量分配
</el-button>
</el-form-item>
</el-form>
</template>
<template slot="main-container">
<el-table
v-adaptive="{bottomOffset:60}"
v-loading="loading"
:data="list"
stripe
height="100"
@sort-change="handleSortChange"
@selection-change="handleSelectChange"
>
<el-table-column :selectable="selectable" type="selection" align="left" width="45" />
<el-table-column
prop="IsUrgent"
:label="$t('trials:consistencyCheck:table:isUrgent')"
show-overflow-tooltip
min-width="100"
sortable="custom"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsUrgent" type="danger">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsUrgent) }}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="TaskCode"
label="任务编号"
min-width="100"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="TrialSiteCode"
label="中心编号"
min-width="100"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="SubjectCode"
label="受试者编号"
min-width="120"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="SubjectCode"
label="第二编号"
min-width="120"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="VisitTaskNum"
label="访视/阅片期名称"
min-width="160"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
{{scope.row.TaskName}}
</template>
</el-table-column>
<el-table-column
prop="TaskBlindName"
label="盲态任务标识"
min-width="140"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="ReadingCategory"
label="任务类型"
min-width="100"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag v-if="scope.row.ReadingCategory === 1" type="primary">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 2" type="info">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 4" type="danger">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
<el-tag v-if="scope.row.ReadingCategory === 5" type="warning">{{ $fd('ReadingCategory', scope.row.ReadingCategory) }}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="ArmEnum"
label="角色"
min-width="80"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag v-if="scope.row.ArmEnum === 0" type="primary">{{ $fd('ArmEnum', scope.row.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.ArmEnum === 1" type="primary">{{ $fd('ArmEnum', scope.row.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.ArmEnum === 2" type="success">{{ $fd('ArmEnum', scope.row.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.ArmEnum === 3" type="info">{{ $fd('ArmEnum', scope.row.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.ArmEnum === 4" type="danger">{{ $fd('ArmEnum', scope.row.ArmEnum) }}</el-tag>
<el-tag v-if="scope.row.ArmEnum === 5" type="warning">{{ $fd('ArmEnum', scope.row.ArmEnum) }}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="UserName"
label="阅片人"
min-width="100"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ scope.row.DoctorUser.UserName }}({{ scope.row.DoctorUser.FullName }})
</template>
</el-table-column>
<el-table-column
prop="TrialReadingCriterionName"
label="阅片标准"
min-width="180"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="SignTime"
label="阅片完成时间"
min-width="180"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="ReadingDurationTimeSpan"
label="阅片时长"
min-width="140"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
{{scope.row.ReadingDuration}}
</template>
</el-table-column>
<el-table-column
prop="IsGeneratedJudge"
label="是否产生裁判"
min-width="140"
sortable="custom"
show-overflow-tooltip
>
<template slot-scope="scope">
<div>
<el-tag v-if="!scope.row.IsGeneratedJudge" type="danger">{{ $fd('YesOrNo', scope.row.IsGeneratedJudge) }}</el-tag>
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsGeneratedJudge) }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column
prop="RequestReReadingTime"
label="全局阅片是否有校正"
min-width="180"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
prop="GeneratedMedicalReviewCount"
label="审核次数"
min-width="130"
sortable="custom"
show-overflow-tooltip
/>
<el-table-column
fixed="right"
label="操作"
width="100"
>
<template slot-scope="scope">
<el-button
icon="el-icon-thumb"
circle
title="分配"
@click="assignMedicalReviewTask(scope.row)"
/>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
<el-dialog
v-if="AssignMedicalReviewTaskVisible"
title="分配医学经理"
:visible.sync="AssignMedicalReviewTaskVisible"
width="500px"
append-to-body
:close-on-click-modal="false"
>
<AssignMedicalReviewTask :data="rowData" :select-list="SelectList" :doctor-user-list="MIMOptions" @close="() => {AssignMedicalReviewTaskVisible = false}" @getList="getList" />
</el-dialog>
</template>
</BaseContainer>
</template>
<script>
import { getTrialSiteSelect } from '@/api/trials'
import { getMIMUserList, getGenerateMedicalReviewTaskList, getDoctorUserSelectList } from '@/api/trials/reading'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import AssignMedicalReviewTask from './AssignMedicalReviewTask'
const searchDataDefault = () => {
return {
PageIndex: 1,
PageSize: 20,
Asc: true,
SortField: '',
TrialId: null,
SiteId: null,
SubjectId: null,
SubjectCode: null,
IsUrgent: null,
TaskName: null,
TaskState: null,
DoctorUserId: null,
ReadingCategory: null,
TaskAllocationState: null,
BeginAllocateDate: null,
EndAllocateDate: null,
RootReReadingTaskId: null,
IsGeneratedJudge: null
}
}
export default {
name: 'TrialsNotice',
components: { BaseContainer, Pagination, AssignMedicalReviewTask },
data() {
return {
MIMOptions: [],
searchData: searchDataDefault(),
maxLength: 0,
list: [],
siteOptions: [],
total: 0,
SubjectAssignListTotal: 0,
loading: false,
AssignMedicalReviewTaskVisible: false,
AllocationConfigVisible: false,
ConfirmReReadingForm: {
RequestReReadingRejectReason: null
},
rules: {
RequestReReadingRejectReason: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }]
},
ConfirmReReadingVisible: false,
taskAllocationRuleVisible: false,
AutoAlloctionVisible: false,
manualAllocationVisible: false,
trialId: this.$route.query.trialId,
currentData: {},
param: {},
DoctorUserList: [],
TaskAllocationRuleList: [],
btnLoading: false,
value: true,
value1: true,
SelectList: [],
TrialTaskInfo: {
TrialId: null,
TaskAllocateObjEnum: 0,
FollowVisitAutoAssignDefaultState: 0,
FollowGlobalVisitAutoAssignDefaultState: 0,
TaskAllocateDefaultState: 1
},
title: '',
rowData: {},
timeList: [],
SubjectAssignList: [],
SubjectAssignSelectList: [],
TaskAllocationRuleSelectList: [],
readVisible: false,
TaskOptType: null,
OtherInfo: null,
ReadingType: null
}
},
mounted() {
this.getList()
this.getSite()
this.getDoctorUserSelectList()
this.getMIMUserList()
},
methods: {
getMIMUserList() {
getMIMUserList(this.trialId).then(res => {
this.MIMOptions = res.Result
})
},
openAssignMedicalReviewTask() {
this.rowData = {}
if (this.SelectList.length === 0) {
this.$message.error('请先选择需要分配的医学审核任务')
return
}
this.AssignMedicalReviewTaskVisible = true
},
handleSelectChange(e) {
this.SelectList = e
},
assignMedicalReviewTask(row, type) {
this.rowData = {...row}
this.AssignMedicalReviewTaskVisible = true
},
changeTimeList() {
if (this.timeList) {
this.searchData.BeginAllocateDate = this.timeList[0]
this.searchData.EndAllocateDate = this.timeList[1]
} else {
this.searchData.BeginAllocateDate = null
this.searchData.EndAllocateDate = null
}
},
// 申请重阅
selectable(row) {
var num
if (this.ReadingType === 2) {
num = 2
} else {
num = 1
}
if (this.TaskAllocationRuleSelectList.length === num && !this.TaskAllocationRuleSelectList.find(v => { return v.UserName === row.UserName })) {
return false
} else {
return true
}
},
getDoctorUserSelectList() {
getDoctorUserSelectList(this.$route.query.trialId).then(res => {
this.DoctorUserList = res.Result
if (this.DoctorUserList.length > 0) {
this.ReadingType = this.DoctorUserList[0].ReadingType
} else {
}
})
},
getList() {
this.searchData.TrialId = this.$route.query.trialId
this.loading = true
getGenerateMedicalReviewTaskList(this.searchData).then(res => {
this.loading = false
this.OtherInfo = res.OtherInfo
this.$emit('getList')
this.AssignMedicalReviewTaskVisible = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => { this.loading = false })
},
handleSearch() {
this.searchData.PageIndex = 1
this.getList()
},
handleReset() {
this.searchData = searchDataDefault()
this.getList()
},
getSite() {
getTrialSiteSelect(this.trialId).then(res => {
this.siteOptions = res.Result
})
},
// 排序
handleSortChange(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
}
}
}
</script>
<style lang="scss" scoped>
>>>.hidden-row{
display: none;
}
>>>.el-dialog__body {
padding: 15px 20px;
}
>>>.el-tag--danger.el-tag--dark {
// background-color: #f56c6c!important;
border-color: none!important;
// color: #fff!important;
}
>>>#TaskAllocationRuleList thead .el-checkbox__inner{
display: none;
}
>>>.el-descriptions-item__label.has-colon:after{
display: none;
}
</style>