mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-11 11:56:51 +08:00
feat(knowledge): 文件上传组件添加提示
- 重构文件上传成功后的显示界面,使用 el-result组件展示上传成功信息 - 添加重新上传按钮 - 优化上传文件的样式和交互
This commit is contained in:
@@ -14,13 +14,23 @@
|
||||
<!-- 文件上传-->
|
||||
<el-form-item label="" required prop="file">
|
||||
<div @click="createFiled" class="upload-demo">
|
||||
<el-empty v-if="!uploadLoading">
|
||||
<el-empty v-if="!filed">
|
||||
<template #description>
|
||||
<p>点击或将文件拖拽到这里上传</p>
|
||||
<p>支持扩展名:.xlsx .doc .docx .pdf .txt...</p>
|
||||
</template>
|
||||
</el-empty>
|
||||
<div v-else v-loading="uploadLoading" :element-loading-text="'文件上传中...'" style="height: 100%"></div>
|
||||
<el-result
|
||||
v-else
|
||||
icon="success"
|
||||
title="文件上传成功"
|
||||
:sub-title="`已上传文件:${filed.name}`"
|
||||
style="height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center;"
|
||||
>
|
||||
<template slot="extra">
|
||||
<el-button type="primary" size="medium" @click.stop="createFiled">重新上传</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
@@ -101,6 +111,7 @@ export default {
|
||||
input.onchange = e => {
|
||||
// this.$emit('getFile', e.target.files[0])
|
||||
this.filed = e.target.files[0]
|
||||
console.log(this.filed.name)
|
||||
}
|
||||
input.click()
|
||||
},
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
</el-steps>
|
||||
|
||||
<div class="components">
|
||||
<step-preprocessing v-show="active === 0" @getForm="getForm" @getDocumentId="getDocumentId" ref="stepPreProcessing"></step-preprocessing>
|
||||
<step-preprocessing ref="stepPreProcessing" v-show="active === 0" @getForm="getForm" @getDocumentId="getDocumentId"></step-preprocessing>
|
||||
<step-split-config ref="splitConfig" v-show="active === 1"></step-split-config>
|
||||
<step-words v-show="active === 2"></step-words>
|
||||
<step-words ref="words" v-show="active === 2"></step-words>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-bottom">
|
||||
@@ -23,7 +23,6 @@
|
||||
</el-button>
|
||||
<el-button type="primary" size="medium" @click="nextStep" v-if="active === 2">确定</el-button>
|
||||
<el-button size="medium" @click="active--" v-if="active >= 1">上一步</el-button>
|
||||
<!-- <el-button type="primary" size="medium" @click="active++" v-if="active < 2">下一步</el-button>-->
|
||||
<el-button type="primary" size="medium" @click="nextStep" v-if="active < 2">下一步</el-button>
|
||||
<el-button type="primary" size="medium" @click="$router.history.go(-1)">取消</el-button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user