|
|
@ -3,24 +3,51 @@ |
|
|
|
<el-card> |
|
|
|
<div class="steps"> |
|
|
|
<el-steps :active="progress"> |
|
|
|
<!-- description="这是一段很长很长很长的描述性文字" --> |
|
|
|
<el-step :class="[this.operatorName == null?'showNum':'']" title="创建任务" :description="`${this.operatorName}(${this.createdTime})`" ></el-step> |
|
|
|
<el-step title="正在导入" :description="`导入进度${this.processStatus == 'processing'?this.progressNum:100 }%`"></el-step> |
|
|
|
<el-step |
|
|
|
:class="[this.operatorName == null ? 'showNum' : '']" |
|
|
|
title="创建任务" |
|
|
|
:description="`${this.operatorName}(${this.createdTime})`" |
|
|
|
></el-step> |
|
|
|
<el-step |
|
|
|
title="正在导入" |
|
|
|
:class="[this.progress == 2 || this.progress == 3 ? '' : 'showNum']" |
|
|
|
:description="`导入进度${ |
|
|
|
this.progressNum ? this.progressNum : 100 |
|
|
|
}%`" |
|
|
|
></el-step> |
|
|
|
<el-step title="导入完成"></el-step> |
|
|
|
</el-steps> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 37px;"> |
|
|
|
<created-task v-if="progress == 1" @handelClickUpload="handelClickUpload" @handelClickBack="handelClickBack"></created-task> |
|
|
|
<execute-task v-if="progress == 2" @successImport="successImport" @handelClickBack="handelClickBack" @updateProgress="updateProgress" :fileCode="fileCode" :fileCodeP="fileCodeP" @updateoperatorName="updateoperatorName"></execute-task> |
|
|
|
<complete-task v-if="progress == 3"@handelClickBack="handelClickBack" :fileCodeP="fileCodeP" @updateoperatorName="updateoperatorName" :fileCode="fileCode"></complete-task> |
|
|
|
<div style="margin-top: 37px"> |
|
|
|
<created-task |
|
|
|
v-if="progress == 1" |
|
|
|
@handelClickUpload="handelClickUpload" |
|
|
|
@handelClickBack="handelClickBack" |
|
|
|
></created-task> |
|
|
|
<execute-task |
|
|
|
v-if="progress == 2" |
|
|
|
@successImport="successImport" |
|
|
|
@handelClickBack="handelClickBack" |
|
|
|
@updateProgress="updateProgress" |
|
|
|
:fileCode="fileCode" |
|
|
|
:fileCodeP="fileCodeP" |
|
|
|
@updateoperatorName="updateoperatorName" |
|
|
|
></execute-task> |
|
|
|
<complete-task |
|
|
|
v-if="progress == 3" |
|
|
|
@handelClickBack="handelClickBack" |
|
|
|
:fileCodeP="fileCodeP" |
|
|
|
@updateoperatorName="updateoperatorName" |
|
|
|
:fileCode="fileCode" |
|
|
|
></complete-task> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import createdTask from './createdTask.vue' |
|
|
|
import executeTask from './executeTask.vue' |
|
|
|
import completeTask from './completeTask.vue' |
|
|
|
import createdTask from "./createdTask.vue"; |
|
|
|
import executeTask from "./executeTask.vue"; |
|
|
|
import completeTask from "./completeTask.vue"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -28,27 +55,27 @@ export default { |
|
|
|
fileCode: null, |
|
|
|
progressNum: null, |
|
|
|
createdTime: null, |
|
|
|
operatorName:null |
|
|
|
operatorName: null, |
|
|
|
}; |
|
|
|
}, |
|
|
|
props: { |
|
|
|
fileCodeP: { |
|
|
|
type: String, |
|
|
|
default:null |
|
|
|
default: null, |
|
|
|
}, |
|
|
|
taskId: { |
|
|
|
type: String, |
|
|
|
default:null |
|
|
|
default: null, |
|
|
|
}, |
|
|
|
processStatus: { |
|
|
|
type: String, |
|
|
|
default:null |
|
|
|
} |
|
|
|
default: null, |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
console.log(this.processStatus); |
|
|
|
if (this.processStatus) { |
|
|
|
this.progress = this.processStatus == 'processing'?2:3 |
|
|
|
this.progress = this.processStatus == "processing" ? 2 : 3; |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -57,10 +84,11 @@ export default { |
|
|
|
this.fileCode = fileCode; |
|
|
|
}, |
|
|
|
handelClickBack() { |
|
|
|
this.$emit('handleClose'); |
|
|
|
this.$emit("handleClose"); |
|
|
|
}, |
|
|
|
successImport() { |
|
|
|
this.progress = 3; |
|
|
|
this.progressNum = 100; |
|
|
|
}, |
|
|
|
updateProgress(num) { |
|
|
|
this.progressNum = num; |
|
|
|