数据同步更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
e30fb2a041
commit
6321bddfd3
|
|
@ -8,6 +8,14 @@ export function addOrUpdateFileUploadRecord(params) {
|
|||
})
|
||||
}
|
||||
|
||||
export function getSubjectUploadRecordList(params) {
|
||||
return request({
|
||||
url: `/FileUploadRecord/getSubjectUploadRecordList`,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
export function getFileUploadRecordList(params) {
|
||||
return request({
|
||||
url: `/FileUploadRecord/getFileUploadRecordList`,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,207 @@
|
|||
<template>
|
||||
<BaseContainer>
|
||||
<template slot="search-container">
|
||||
<el-form :inline="true">
|
||||
<!-- 文件名称 -->
|
||||
<el-form-item label="文件名称" prop="FileName">
|
||||
<el-input v-model="searchData.FileName" size="small" clearable style="width: 120px" />
|
||||
</el-form-item>
|
||||
<!-- 文件类型 -->
|
||||
<el-form-item label="文件类型" prop="FileType">
|
||||
<el-input v-model="searchData.FileType" size="small" clearable style="width: 120px" />
|
||||
</el-form-item>
|
||||
<!-- 源区域 -->
|
||||
<el-form-item label="源区域" prop="UploadRegion">
|
||||
<el-select v-model="searchData.UploadRegion" style="width: 120px">
|
||||
<el-option
|
||||
v-for="item in regionOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 目标区域 -->
|
||||
<el-form-item label="目标区域" prop="TargetRegion">
|
||||
<el-select v-model="searchData.TargetRegion" style="width: 120px">
|
||||
<el-option
|
||||
v-for="item in regionOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 是否同步完成 -->
|
||||
<el-form-item label="是否同步完成" prop="IsSync">
|
||||
<el-select v-model="searchData.IsSync" clearable style="width: 120px">
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
:key="'IsSync' + item.label"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</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-loading="loading" v-adaptive="{ bottomOffset: 70 }" height="100" :data="list"
|
||||
class="table" @sort-change="handleSortByColumn" :default-sort="{ prop: 'CreateTime', order: 'descending' }">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="文件名称" prop="FileName" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
</el-table-column>
|
||||
<el-table-column label="文件大小" prop="FileSize" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ fileSizeFormatter(scope.row.FileSize) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件类型" prop="FileType" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="源区域" prop="UploadRegion" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
|
||||
<el-table-column label="源可用时间" prop="CreateTime" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="路径" prop="Path" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="目标区域" prop="TargetRegion" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="目标可用时间" prop="TargetRegion" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="优先级" prop="Priority" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="是否同步完成" prop="IsSync" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('YesOrNo', scope.row.IsSync) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="UpdateTime" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="操作" min-width="80" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleOpenTaskTable(scope.row)">
|
||||
详情
|
||||
</el-button>
|
||||
</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 { getFileUploadRecordList } from '@/api/file'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import moment from 'moment'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
TrialId: '',
|
||||
DataFileType: 1,
|
||||
SubjectCode: '',
|
||||
VisitName: '',
|
||||
StudyCode: '',
|
||||
FileName: '',
|
||||
UploadRegion: null,
|
||||
TargetRegion: null,
|
||||
IsSync: null,
|
||||
Asc: false,
|
||||
SortField: 'UpdateTime',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'FileList',
|
||||
components: { BaseContainer, Pagination },
|
||||
props: {
|
||||
rowInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
searchData: searchDataDefault(),
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
datetimerange: [],
|
||||
regionOptions: [
|
||||
{
|
||||
value: 'CN',
|
||||
label: 'CN'
|
||||
}, {
|
||||
value: 'US',
|
||||
label: 'US'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true
|
||||
this.searchData.TrialId = this.$route.query.trialId
|
||||
this.searchData.SubjectCode = this.rowInfo.SubjectCode
|
||||
this.searchData.VisitName = this.rowInfo.VisitName
|
||||
this.searchData.StudyCode = this.rowInfo.StudyCode
|
||||
let res = await getFileUploadRecordList(this.searchData)
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
} catch(e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
handleOpenTaskTable(row) {
|
||||
this.$emit('openTaskTable', row)
|
||||
},
|
||||
fileSizeFormatter(size) {
|
||||
if (!size) return
|
||||
return (size / Math.pow(1024, 2)).toFixed(3) + 'MB'
|
||||
},
|
||||
handleDatetimeChange(val) {
|
||||
if (val) {
|
||||
this.searchData.BeginDate = val[0]
|
||||
this.searchData.EndDate = val[1]
|
||||
} else {
|
||||
this.searchData.BeginDate = ''
|
||||
this.searchData.EndDate = ''
|
||||
}
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.datetimerange = null
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(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>
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
<template>
|
||||
<BaseContainer>
|
||||
<template slot="search-container">
|
||||
<el-form :inline="true">
|
||||
|
||||
<el-form-item label="文件名称" prop="FileName">
|
||||
<el-input v-model="searchData.FileName" size="small" clearable style="width: 120px" />
|
||||
</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-loading="loading" v-adaptive="{ bottomOffset: 70 }" height="100" :data="list"
|
||||
class="table" @sort-change="handleSortByColumn" :default-sort="{ prop: 'CreateTime', order: 'descending' }">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="文件名称" prop="FileName" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
</el-table-column>
|
||||
<el-table-column label="路径" prop="Path" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="任务状态" prop="JobState" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.JobState === 1" type="infoinf0">
|
||||
{{ $fd('JobState', scope.row.JobState) }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.JobState === 1" type="warning">
|
||||
{{ $fd('JobState', scope.row.JobState) }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.JobState === 2" type="success">
|
||||
{{ $fd('JobState', scope.row.JobState) }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.JobState === 3" type="danger">
|
||||
{{ $fd('JobState', scope.row.JobState) }}
|
||||
</el-tag>
|
||||
<el-tag v-else>{{ $fd('JobState', scope.row.JobState) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间" prop="CreateTime" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
|
||||
<el-table-column label="更新时间" prop="UpdateTime" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="操作" min-width="80" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text">
|
||||
重启
|
||||
</el-button>
|
||||
</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 { getUploadFileSyncRecordList } from '@/api/file'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import moment from 'moment'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
TrialId: '',
|
||||
StudyCode: '',
|
||||
SubjectCode: '',
|
||||
VisitName: '',
|
||||
FileUploadRecordId: '',
|
||||
JobState: null,
|
||||
FileName: '',
|
||||
Asc: false,
|
||||
SortField: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'TaskList',
|
||||
components: { BaseContainer, Pagination },
|
||||
props: {
|
||||
fileUploadRecordId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
rowInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
searchData: searchDataDefault(),
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
datetimerange: [],
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
// fileUploadRecordId: {
|
||||
// deep: true,
|
||||
// immediate: true,
|
||||
// handler(v) {
|
||||
// if (v) {
|
||||
// this.searchData.FileUploadRecordId = v
|
||||
// }
|
||||
// this.getList()
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
mounted() {
|
||||
this.$nextTick(()=>{
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true
|
||||
this.searchData.TrialId = this.$route.query.trialId
|
||||
this.searchData.StudyCode = this.rowInfo.StudyCode
|
||||
this.searchData.SubjectCode = this.rowInfo.SubjectCode
|
||||
this.searchData.VisitName = this.rowInfo.VisitName
|
||||
this.searchData.FileUploadRecordId = this.fileUploadRecordId
|
||||
let res = await getUploadFileSyncRecordList(this.searchData)
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
} catch(e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
fileSizeFormatter(size) {
|
||||
if (!size) return
|
||||
return (size / Math.pow(1024, 2)).toFixed(3) + 'MB'
|
||||
},
|
||||
handleDatetimeChange(val) {
|
||||
if (val) {
|
||||
this.searchData.BeginDate = val[0]
|
||||
this.searchData.EndDate = val[1]
|
||||
} else {
|
||||
this.searchData.BeginDate = ''
|
||||
this.searchData.EndDate = ''
|
||||
}
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.datetimerange = null
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(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>
|
||||
|
|
@ -2,55 +2,57 @@
|
|||
<BaseContainer>
|
||||
<template slot="search-container">
|
||||
<el-form :inline="true">
|
||||
<!-- <el-form-item label="文件上传场景" prop="OptType">
|
||||
<el-select v-model="searchData.BatchDataType" clearable style="width: 200px">
|
||||
<!-- 受试者编号 -->
|
||||
<el-form-item label="受试者编号" prop="SubjectCode">
|
||||
<el-input v-model="searchData.SubjectCode" size="small" clearable style="width: 120px" />
|
||||
</el-form-item>
|
||||
<!-- 访视名称 -->
|
||||
<el-form-item label="访视名称">
|
||||
<el-select v-model="searchData.VisitName" style="width: 140px" clearable>
|
||||
<el-option v-for="(item, index) of visitPlanOptions" :key="index" :label="item.VisitName"
|
||||
:value="item.VisitNum">
|
||||
<span style="float: left">{{ item.VisitName }}</span>
|
||||
</el-option>
|
||||
<!-- <el-option key="Other" label="Out of Plan" value="1.11" /> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 检查编号 -->
|
||||
<el-form-item label="检查编号" prop="StudyCode">
|
||||
<el-input v-model="searchData.StudyCode" size="small" clearable style="width: 120px" />
|
||||
</el-form-item>
|
||||
<!-- 源区域 -->
|
||||
<el-form-item label="源区域" prop="UploadRegion">
|
||||
<el-select v-model="searchData.UploadRegion" style="width: 120px">
|
||||
<el-option
|
||||
v-for="item of $d.BatchDataType"
|
||||
:key="'BatchDataType' + item.label"
|
||||
v-for="item in regionOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 目标区域 -->
|
||||
<el-form-item label="目标区域" prop="TargetRegion">
|
||||
<el-select v-model="searchData.TargetRegion" style="width: 120px">
|
||||
<el-option
|
||||
v-for="item in regionOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 是否同步完成 -->
|
||||
<el-form-item label="是否同步完成" prop="IsSync">
|
||||
<el-select v-model="searchData.IsSync" clearable style="width: 120px">
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
:key="'IsSync' + item.label"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="文件名称" prop="FileName">
|
||||
<el-input v-model="searchData.FileName" size="small" clearable style="width: 120px" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
:label="$t('trials:loginLog:table:incorrectUserName')"
|
||||
prop="LoginFaildName"
|
||||
v-if="!isMine"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.LoginFaildName"
|
||||
size="small"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('trials:loginLog:table:userName')" prop="LoginUserName" v-if="!isMine">
|
||||
<el-select v-model="searchData.IdentityUserId" clearable style="width: 120px">
|
||||
<el-option v-for="item of trialUserList" :key="item.IdentityUserId" :value="item.IdentityUserId"
|
||||
:label="item.UserName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:loginLog:table:optUserName')" prop="TargetIdentityUserId" v-if="!isMine">
|
||||
<el-select v-model="searchData.TargetIdentityUserId" clearable style="width: 120px">
|
||||
<el-option v-for="item of trialUserList" :key="item.IdentityUserId" :value="item.IdentityUserId"
|
||||
:label="item.UserName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:loginLog:table:userType')" prop="OptType" v-if="!isMine">
|
||||
<el-select v-model="searchData.LoginUserType" clearable style="width: 120px">
|
||||
<el-option v-for="item of $d.UserType" v-show="item.value !== 7 && item.value !== 8"
|
||||
:key="'UserType' + item.label" :value="item.label" :label="item.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:loginLog:table:createTime')">
|
||||
<el-date-picker v-model="datetimerange" type="datetimerange" :default-time="['00:00:00', '23:59:59']"
|
||||
:start-placeholder="$t('trials:loginLog:table:beginTime')"
|
||||
:end-placeholder="$t('trials:loginLog:table:endTime')" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="handleDatetimeChange" />
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
|
|
@ -66,40 +68,26 @@
|
|||
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 60 }" height="100" :data="list"
|
||||
class="table" @sort-change="handleSortByColumn" :default-sort="{ prop: 'CreateTime', order: 'descending' }">
|
||||
<el-table-column type="index" width="50" />
|
||||
<!-- <el-table-column label="文件上传场景" prop="BatchDataType" min-width="100" show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('BatchDataType', scope.row.BatchDataType) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="文件名称" prop="FileName" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
</el-table-column>
|
||||
<el-table-column label="文件类型" prop="FileType" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
</el-table-column>
|
||||
<el-table-column label="文件大小" prop="FileSize" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ fileSizeFormatter(scope.row.FileSize) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="受试者编号" prop="SubjectCode" min-width="90" show-overflow-tooltip sortable="custom"/>
|
||||
<el-table-column label="访视名称" prop="VisitName" min-width="90" show-overflow-tooltip sortable="custom"/>
|
||||
<el-table-column label="检查编号" prop="StudyCode" min-width="90" show-overflow-tooltip sortable="custom"/>
|
||||
<el-table-column label="文件数" prop="FileCount" min-width="90" show-overflow-tooltip sortable="custom"/>
|
||||
<el-table-column label="源区域" prop="UploadRegion" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="源可用时间" prop="CreateTime" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="目标区域" prop="TargetRegion" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="目标可用时间" prop="TargetRegion" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="是否需要同步" prop="IsNeedSync" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('YesOrNo', scope.row.IsNeedSync) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="优先级" prop="Priority" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="是否同步完成" prop="IsSync" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('YesOrNo', scope.row.IsSync) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="UpdateTime" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="操作" min-width="80" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleOpenTaskTable(scope.row)">
|
||||
任务表
|
||||
<el-button type="text" @click="openDetailTable(scope.row)">
|
||||
详情
|
||||
</el-button>
|
||||
<el-button type="text">
|
||||
同步
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -108,64 +96,97 @@
|
|||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
</template>
|
||||
<!-- <detail :config="config" :JsonObj="JsonObj" /> -->
|
||||
<el-dialog
|
||||
:visible.sync="detailDialog.visible"
|
||||
fullscreen
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
class="detail-dialog"
|
||||
>
|
||||
<span slot="title">{{ detailDialog.title }}</span>
|
||||
<span v-if="detailDialog.currentRow">{{`${detailDialog.currentRow.SubjectCode} / ${detailDialog.currentRow.VisitName} ${detailDialog.currentRow.StudyCode ? ' / ' + detailDialog.currentRow.StudyCode : ''}`}}</span>
|
||||
<el-tabs class="detail-tabs" v-model="detailDialog.activeTab" @tab-click="handleDetailTabClick">
|
||||
<el-tab-pane label="文件级别" name="file">
|
||||
<FileList
|
||||
v-if="detailDialog.activeTab === 'file'"
|
||||
:rowInfo="detailDialog.currentRow"
|
||||
@openTaskTable="openTaskTable"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="任务级别" name="task">
|
||||
<TaskList
|
||||
v-if="detailDialog.activeTab === 'task'"
|
||||
:rowInfo="detailDialog.currentRow"
|
||||
:fileUploadRecordId="fileUploadRecordId"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import { getFileUploadRecordList, getUploadFileSyncRecordList } from '@/api/file'
|
||||
import { getSubjectUploadRecordList } from '@/api/file'
|
||||
import { getTrialVisitStageSelect } from '@/api/trials'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import FileList from './components/FileList'
|
||||
import TaskList from './components/TaskList'
|
||||
import moment from 'moment'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
TrialId: '',
|
||||
FileName: '',
|
||||
BatchDataType: null,
|
||||
Asc: false,
|
||||
SortField: '',
|
||||
SubjectCode: '',
|
||||
VisitName: null,
|
||||
StudyCode: '',
|
||||
UploadRegion: '',
|
||||
TargetRegion: '',
|
||||
IsSync: null,
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: true,
|
||||
SortField: 'StudyCode'
|
||||
}
|
||||
}
|
||||
export default {
|
||||
components: { BaseContainer, Pagination },
|
||||
props: {
|
||||
isMine: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: { BaseContainer, Pagination, FileList, TaskList },
|
||||
data() {
|
||||
return {
|
||||
trialId: '',
|
||||
moment,
|
||||
searchData: searchDataDefault(),
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
datetimerange: [],
|
||||
trialUserList: [],
|
||||
config: {
|
||||
visitPlanOptions: [],
|
||||
detailDialog: {
|
||||
visible: false,
|
||||
title: this.$t('trials:loginLog:dialog:title'),
|
||||
width: '500px',
|
||||
top: '10vh',
|
||||
title: '详情',
|
||||
activeTab: 'file',
|
||||
currentRow: null
|
||||
},
|
||||
JsonObj: null,
|
||||
regionOptions: [
|
||||
{
|
||||
value: 'CN',
|
||||
label: 'CN'
|
||||
}, {
|
||||
value: 'US',
|
||||
label: 'US'
|
||||
}
|
||||
],
|
||||
fileUploadRecordId: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.trialId = this.$route.query.trialId
|
||||
this.getList()
|
||||
this.getVisitPlanOptions()
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true
|
||||
this.searchData.TrialId = this.$route.query.trialId
|
||||
let res = await getFileUploadRecordList(this.searchData)
|
||||
this.searchData.TrialId = this.trialId
|
||||
let res = await getSubjectUploadRecordList(this.searchData)
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
|
|
@ -174,24 +195,32 @@ export default {
|
|||
console.log(e)
|
||||
}
|
||||
},
|
||||
handleOpenTaskTable(row) {
|
||||
// const { list, columns, title } = this.buildTaskDialogData(row)
|
||||
// this.taskDialog.title = title
|
||||
// this.taskDialog.list = list
|
||||
// this.taskDialog.columns = columns
|
||||
// this.taskDialog.visible = true
|
||||
openDetailTable(row) {
|
||||
this.detailDialog.currentRow = row || null
|
||||
this.detailDialog.activeTab = 'file'
|
||||
this.detailDialog.visible = true
|
||||
},
|
||||
fileSizeFormatter(size) {
|
||||
if (!size) return
|
||||
return (size / Math.pow(1024, 2)).toFixed(3) + 'MB'
|
||||
openTaskTable(row) {
|
||||
this.fileUploadRecordId = row.Id
|
||||
this.detailDialog.activeTab = 'task'
|
||||
|
||||
},
|
||||
handleDatetimeChange(val) {
|
||||
if (val) {
|
||||
this.searchData.BeginDate = val[0]
|
||||
this.searchData.EndDate = val[1]
|
||||
} else {
|
||||
this.searchData.BeginDate = ''
|
||||
this.searchData.EndDate = ''
|
||||
handleDetailTabClick(tab) {
|
||||
const name = tab.name
|
||||
if (name === 'file') {
|
||||
this.fileUploadRecordId = ''
|
||||
}
|
||||
// if (name !== 'upload' && name !== 'sync') return
|
||||
// if (this.detailDialog[name].list && this.detailDialog[name].list.length) return
|
||||
// this.fetchDetailList(name)
|
||||
},
|
||||
// 获取访视下拉框数据
|
||||
async getVisitPlanOptions() {
|
||||
try {
|
||||
let res = await getTrialVisitStageSelect(this.trialId)
|
||||
this.visitPlanOptions = res.Result
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
handleSearch() {
|
||||
|
|
@ -218,3 +247,48 @@ export default {
|
|||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.detail-dialog {
|
||||
margin: 0;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.el-dialog__header {
|
||||
flex: 0 0 auto;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding-top: 10px;
|
||||
flex: 1 1 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&.is-fullscreen {
|
||||
.el-dialog__body {
|
||||
margin-top: 10px;
|
||||
height: calc(100% - 80px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-tabs {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.el-tabs__header {
|
||||
flex: 0 0 auto;
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
.el-tabs__content {
|
||||
flex: 1 1 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -1645,7 +1645,7 @@ export default {
|
|||
fileName: `${v.seriesUid}.jpg`,
|
||||
fileSize: blob.size,
|
||||
fileType: 'image/jpeg',
|
||||
uploadBatchId: scope.$guid(),
|
||||
uploadBatchId: uploadBatchId,
|
||||
batchDataType: 2,
|
||||
trialId: params.trialId,
|
||||
subjectId: params.subjectId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue