数据同步
parent
ca2e9e0253
commit
55da1d9219
|
|
@ -59,7 +59,7 @@ async function ossGenerateSTS() {
|
|||
let params = Object.assign({path: objectName}, fileInfo)
|
||||
addOrUpdateFileUploadRecord(params)
|
||||
} else if (trialId) {
|
||||
let params = { trialId }
|
||||
let params = { trialId, path: objectName }
|
||||
addOrUpdateFileUploadRecord(params)
|
||||
}
|
||||
resolve({
|
||||
|
|
@ -111,7 +111,7 @@ async function ossGenerateSTS() {
|
|||
let params = Object.assign({path: data.path}, fileInfo)
|
||||
addOrUpdateFileUploadRecord(params)
|
||||
} else if (trialId) {
|
||||
let params = { trialId }
|
||||
let params = { trialId, path: data.path }
|
||||
addOrUpdateFileUploadRecord(params)
|
||||
}
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ function uploadAWS(aws, data, progress, fileInfo) {
|
|||
let params = Object.assign({path: decodeUtf8(curPath)}, fileInfo)
|
||||
addOrUpdateFileUploadRecord(params)
|
||||
} else if (trialId) {
|
||||
let params = { trialId }
|
||||
let params = { trialId, path: decodeUtf8(curPath) }
|
||||
addOrUpdateFileUploadRecord(params)
|
||||
}
|
||||
resolve({
|
||||
|
|
|
|||
|
|
@ -99,11 +99,11 @@
|
|||
<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="60" 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="CreateTime" min-width="120" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="路径" prop="Path" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="是否需要同步" prop="IsNeedSync" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
<el-table-column label="是否需要同步" prop="IsNeedSync" min-width="120" show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsNeedSync" type="success">
|
||||
{{ $fd('YesOrNo', scope.row.IsNeedSync) }}
|
||||
|
|
@ -113,10 +113,10 @@
|
|||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="目标区域" prop="TargetRegion" min-width="80" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="目标可用时间" prop="SyncFinishedTime" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="优先级" prop="Priority" min-width="60" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="是否同步完成" prop="IsSync" min-width="90" show-overflow-tooltip sortable="custom">
|
||||
<el-table-column label="目标区域" prop="TargetRegion" min-width="100" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="目标可用时间" prop="SyncFinishedTime" min-width="120" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="优先级" prop="Priority" min-width="80" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="是否同步完成" prop="IsSync" min-width="120" show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsSync" type="success">
|
||||
{{ $fd('YesOrNo', scope.row.IsSync) }}
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" prop="UpdateTime" min-width="90" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="更新时间" prop="UpdateTime" min-width="120" show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column label="操作" width="240" show-overflow-tooltip fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="handleOpenTaskTable(scope.row)">
|
||||
|
|
@ -244,7 +244,9 @@ export default {
|
|||
props: {
|
||||
rowInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
dataFileType: {
|
||||
type: Number,
|
||||
|
|
@ -298,9 +300,12 @@ export default {
|
|||
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
|
||||
if (Object.keys(this.rowInfo).length !== 0) {
|
||||
this.searchData.SubjectCode = this.rowInfo.SubjectCode
|
||||
this.searchData.VisitName = this.rowInfo.VisitName
|
||||
this.searchData.StudyCode = this.rowInfo.StudyCode
|
||||
}
|
||||
|
||||
this.searchData.DataFileType = this.dataFileType
|
||||
let res = await getFileUploadRecordList(this.searchData)
|
||||
this.loading = false
|
||||
|
|
|
|||
|
|
@ -180,12 +180,6 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
components: { BaseContainer, Pagination, FileList, TaskList },
|
||||
props: {
|
||||
dataFileType: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trialId: '',
|
||||
|
|
@ -226,7 +220,6 @@ export default {
|
|||
try {
|
||||
this.loading = true
|
||||
this.searchData.TrialId = this.trialId
|
||||
this.searchData.DataFileType = this.dataFileType
|
||||
let res = await getSubjectUploadRecordList(this.searchData)
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
|
|
|
|||
|
|
@ -1,23 +1,54 @@
|
|||
<template>
|
||||
<el-tabs class="data-sync-tabs" type="border-card" tab-position="left" v-model="activeTab" >
|
||||
<el-tab-pane label="检查列表" name="study">
|
||||
<StudyList v-if="activeTab === 'study'" :dataFileType="1"/>
|
||||
<StudyList v-if="activeTab === 'study'"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="其他" name="other">
|
||||
<StudyList v-if="activeTab === 'other'" :dataFileType="2"/>
|
||||
<FileList v-if="activeTab === 'other'" :dataFileType="2" @openTaskTable="openTaskTable"/>
|
||||
</el-tab-pane>
|
||||
<el-dialog
|
||||
v-if="detailDialog.visible"
|
||||
: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 : ''} (源:${detailDialog.currentRow.UploadRegion} -> 目标:${detailDialog.currentRow.TargetRegion})`}}</span>
|
||||
<TaskList
|
||||
:rowInfo="detailDialog.currentRow"
|
||||
:fileUploadRecordId="detailDialog.currentRow.Id"
|
||||
:path="detailDialog.currentRow.Path"
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-tabs>
|
||||
</template>
|
||||
<script>
|
||||
import StudyList from './components/StudyList'
|
||||
import FileList from './components/FileList'
|
||||
import TaskList from './components/TaskList'
|
||||
export default {
|
||||
name: 'DataSync',
|
||||
components: {
|
||||
StudyList
|
||||
StudyList,
|
||||
FileList,
|
||||
TaskList
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
activeTab: 'study'
|
||||
activeTab: 'study',
|
||||
detailDialog: {
|
||||
visible: false,
|
||||
title: '详情',
|
||||
currentRow: null
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openTaskTable(obj) {
|
||||
this.detailDialog.currentRow = obj || null
|
||||
this.detailDialog.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -37,4 +68,28 @@ export default {
|
|||
height: 100%;
|
||||
}
|
||||
}
|
||||
.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue