232 lines
7.0 KiB
Plaintext
232 lines
7.0 KiB
Plaintext
<template>
|
|
<BaseContainer>
|
|
<template slot="search-container">
|
|
<el-form :inline="true">
|
|
<!-- 受试者编号 -->
|
|
<el-form-item label="受试者编号">
|
|
<el-input
|
|
v-model="searchData.SubjectCode"
|
|
style="width:130px;"
|
|
clearable
|
|
/>
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
<!-- 查询 -->
|
|
<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-form-item>
|
|
</el-form>
|
|
</template>
|
|
<template slot="main-container">
|
|
<el-table
|
|
v-adaptive="{bottomOffset:60}"
|
|
v-loading="loading"
|
|
:data="list"
|
|
stripe
|
|
height="100"
|
|
>
|
|
<el-table-column type="index" width="40" align="left" />
|
|
<!-- 是否加急 -->
|
|
<el-table-column
|
|
prop="IsUrgent"
|
|
min-width="100"
|
|
label="是否加急"
|
|
show-overflow-tooltip
|
|
>
|
|
<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="SubjectCode"
|
|
min-width="100"
|
|
label="受试者编号"
|
|
show-overflow-tooltip
|
|
/>
|
|
|
|
<!-- 盲态访视名称 -->
|
|
<el-table-column
|
|
prop="TaskBlindName"
|
|
min-width="100"
|
|
label="盲态访视名称"
|
|
show-overflow-tooltip
|
|
/>
|
|
<el-table-column
|
|
prop="TaskState"
|
|
label="任务状态"
|
|
min-width="100"
|
|
sortable="custom"
|
|
show-overflow-tooltip
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-tag v-if="scope.row.TaskState === 0" type="primary">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
|
<el-tag v-if="scope.row.TaskState === 1" type="info">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
|
<el-tag v-if="scope.row.TaskState === 3" type="danger">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
|
<el-tag v-if="scope.row.TaskState === 4" type="warning">{{ $fd('TaskState', scope.row.TaskState) }}</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- 阅片类别 -->
|
|
<el-table-column
|
|
prop="ReadingCategory"
|
|
min-width="100"
|
|
label="阅片类别"
|
|
show-overflow-tooltip
|
|
>
|
|
<template slot-scope="scope">
|
|
{{ $fd('ReadingCategory',scope.row.ReadingCategory) }}
|
|
</template>
|
|
</el-table-column>
|
|
<!-- 阅片状态 -->
|
|
<el-table-column
|
|
prop="ReadingTaskState"
|
|
min-width="100"
|
|
label="阅片状态"
|
|
show-overflow-tooltip
|
|
>
|
|
<template slot-scope="scope">
|
|
{{ $fd('ReadingTaskState',scope.row.ReadingTaskState) }}
|
|
</template>
|
|
</el-table-column>
|
|
<!-- 分配时间 -->
|
|
<el-table-column
|
|
prop="AllocateTime"
|
|
min-width="100"
|
|
label="分配时间"
|
|
show-overflow-tooltip
|
|
/>
|
|
<!-- 签名时间 -->
|
|
<el-table-column
|
|
prop="SignTime"
|
|
min-width="100"
|
|
label="签名时间"
|
|
show-overflow-tooltip
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
:label="$t('common:action:action')"
|
|
width="250"
|
|
fixed="right"
|
|
>
|
|
<template slot-scope="scope">
|
|
<!-- 查看 -->
|
|
<el-button
|
|
circle
|
|
title="查看"
|
|
icon="el-icon-view"
|
|
@click="handleReadImage(scope.row)"
|
|
/>
|
|
<!-- 申请重阅 -->
|
|
<el-button
|
|
:disabled="scope.row.ReadingTaskState !== 2"
|
|
circle
|
|
title="申请重阅"
|
|
icon="el-icon-collection"
|
|
@click="handleApplyReread(scope.row)"
|
|
/>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!-- 分页组件 -->
|
|
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
|
</template>
|
|
</BaseContainer>
|
|
</template>
|
|
<script>
|
|
import { getIRHaveReadTaskList } from '@/api/trials'
|
|
import { applyReReading } from '@/api/trials/reading'
|
|
import BaseContainer from '@/components/BaseContainer'
|
|
import Pagination from '@/components/Pagination'
|
|
import { getToken } from '@/utils/auth'
|
|
const searchDataDefault = () => {
|
|
return {
|
|
SubjectCode: '',
|
|
PageIndex: 1,
|
|
PageSize: 20
|
|
}
|
|
}
|
|
export default {
|
|
name: 'ReadTask',
|
|
components: { BaseContainer, Pagination },
|
|
data() {
|
|
return {
|
|
searchData: searchDataDefault(),
|
|
list: [],
|
|
total: 0,
|
|
loading: false,
|
|
trialId: ''
|
|
}
|
|
},
|
|
mounted() {
|
|
this.trialId = this.$route.query.trialId
|
|
|
|
this.getList()
|
|
},
|
|
methods: {
|
|
getList() {
|
|
this.loading = true
|
|
this.searchData.TrialId = this.trialId
|
|
getIRHaveReadTaskList(this.searchData).then(res => {
|
|
this.list = res.Result.CurrentPageData
|
|
this.total = res.Result.TotalCount
|
|
this.loading = false
|
|
}).catch(() => { this.loading = false })
|
|
},
|
|
handleSearch() {
|
|
this.searchData.PageIndex = 1
|
|
this.getList()
|
|
},
|
|
handleReset() {
|
|
this.searchData = searchDataDefault()
|
|
this.getList()
|
|
},
|
|
handleReadImage(row) {
|
|
var token = getToken()
|
|
const routeData = this.$router.resolve({
|
|
path: `/noneDicomReading?subjectId=${row.SubjectId}&trialId=${row.TrialId}&visitTaskId=${row.Id}&TokenKey=${token}`
|
|
})
|
|
window.open(routeData.href, '_blank')
|
|
},
|
|
handleApplyReread(row) {
|
|
this.$confirm('是否确认申请重阅?').then(() => {
|
|
this.loading = true
|
|
var params = {
|
|
TaskIdList: [
|
|
row.Id
|
|
],
|
|
TrialId: this.$route.query.trialId,
|
|
RequestReReadingType: 1,
|
|
RequestReReadingReason: ''
|
|
}
|
|
applyReReading(params).then(res => {
|
|
this.loading = false
|
|
this.$message.success('申请重阅成功')
|
|
this.getList()
|
|
}).catch(() => {
|
|
this.loading = false
|
|
})
|
|
}).catch(() => {})
|
|
},
|
|
// 排序
|
|
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>
|