irc_web/.svn/pristine/34/34fbb773c162abef4b51c411fee...

146 lines
4.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="SubjectCode"
min-width="100"
label="受试者编号"
show-overflow-tooltip
/>
<!-- 剩余阅片量 -->
<el-table-column
prop="UnReadTaskCount"
min-width="100"
label="剩余阅片量"
show-overflow-tooltip
/>
<!-- 建议完成时间 -->
<el-table-column
prop="SuggesteFinishedTime"
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-edit-outline"
@click="handleReadImage(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 { getIRUnReadSubjectTaskList } from '@/api/trials'
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: 'SiteList',
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
getIRUnReadSubjectTaskList(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=${this.trialId}&TokenKey=${token}`
})
window.open(routeData.href, '_blank')
},
// 排序
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>