2023-10-26 11:02:16 +00:00
|
|
|
<template>
|
2023-10-27 09:49:06 +00:00
|
|
|
<LayoutContent header="创建数据集" back-to="-1">
|
|
|
|
|
<div class="create-dataset flex main-calc-height">
|
|
|
|
|
<div class="p-15">
|
|
|
|
|
<el-steps :active="active" finish-status="success" align-center>
|
|
|
|
|
<el-step v-for="(item, index) in steps" :key="index" :title="item.name" />
|
|
|
|
|
</el-steps>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="create-dataset__component p-15">
|
|
|
|
|
<el-scrollbar>
|
2023-11-02 01:56:14 +00:00
|
|
|
<component :is="steps[active].component" :ref="steps[active]?.ref" />
|
2023-10-27 09:49:06 +00:00
|
|
|
</el-scrollbar>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="create-dataset__footer text-right p-15 border-t">
|
|
|
|
|
<el-button @click="next">取 消</el-button>
|
2023-11-02 01:56:14 +00:00
|
|
|
<el-button @click="prev">上一步</el-button>
|
2023-10-27 09:49:06 +00:00
|
|
|
<el-button @click="next" type="primary">下一步</el-button>
|
|
|
|
|
<el-button @click="next" type="primary">开始导入</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-10-26 11:02:16 +00:00
|
|
|
</LayoutContent>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref } from 'vue'
|
2023-11-02 01:56:14 +00:00
|
|
|
import UploadDocument from './step/UploadDocument.vue'
|
|
|
|
|
import SetRules from './step/SetRules.vue'
|
2023-10-26 11:02:16 +00:00
|
|
|
|
2023-10-27 09:49:06 +00:00
|
|
|
const steps = [
|
|
|
|
|
{
|
2023-11-02 01:56:14 +00:00
|
|
|
ref: 'UploadDocumentRef',
|
2023-10-27 09:49:06 +00:00
|
|
|
name: '上传文档',
|
2023-11-02 01:56:14 +00:00
|
|
|
component: UploadDocument
|
2023-10-27 09:49:06 +00:00
|
|
|
},
|
|
|
|
|
{
|
2023-11-02 01:56:14 +00:00
|
|
|
ref: 'SetRulesRef',
|
2023-10-27 09:49:06 +00:00
|
|
|
name: '设置分段规则',
|
2023-11-02 01:56:14 +00:00
|
|
|
component: SetRules
|
2023-10-27 09:49:06 +00:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
2023-11-02 01:56:14 +00:00
|
|
|
const UploadDocumentRef = ref()
|
|
|
|
|
|
|
|
|
|
const active = ref(0)
|
|
|
|
|
|
|
|
|
|
async function next() {
|
|
|
|
|
if (await UploadDocumentRef.value.onSubmit()) {
|
|
|
|
|
if (active.value++ > 2) active.value = 0
|
|
|
|
|
}
|
2023-10-26 11:02:16 +00:00
|
|
|
}
|
2023-11-02 01:56:14 +00:00
|
|
|
const prev = () => {}
|
2023-10-26 11:02:16 +00:00
|
|
|
</script>
|
2023-10-27 09:49:06 +00:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.create-dataset {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
// height: 100%;
|
|
|
|
|
&__component {
|
|
|
|
|
flex: 1;
|
|
|
|
|
flex-basis: auto;
|
|
|
|
|
min-width: 70%;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
&__footer {
|
|
|
|
|
flex: 0 0 auto;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|