| | |
| | | <template> |
| | | <div class="h100 overflow-y-auto p-[16px]"> |
| | | <div class="mb-[10px] flex items-center"> |
| | | <el-button style="margin-left: 8px; width: 40px" text @click="handleExitFlow"> |
| | | <el-button style="margin-left: 8px; width: 40px" link @click="handleExitFlow"> |
| | | <el-icon style="font-size: 24px !important"> |
| | | <ArrowLeft /> |
| | | </el-icon> |
| | |
| | | </template> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <el-form-item label="文档识别:"> |
| | | <div |
| | | class="bg-[#f6f5ff] border-[1px] border-solid border-[#0062be] py-[12px] w-[215px] px-[16px] rounded-lg cursor-pointer" |
| | | > |
| | | <el-radio-group v-model="state.categoryForm.DocumentRecognition"> |
| | | <el-radio value="1" size="large"> |
| | | <span class="font-[700] text[14px]">文档智能解析</span> |
| | | </el-radio> |
| | | </el-radio-group> |
| | | <el-tooltip :content="state.demoDesc" placement="top" effect="light" popper-class="set_tooltip_demo"> |
| | | <div class="text-[#878aab] text-[12px] mx-0 mt-[2px] mb-0 set-desc"> |
| | | {{ state.demoDesc }} |
| | | </div> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <div class="set-form-footer"> |
| | |
| | | <script setup lang="ts"> |
| | | import type { UploadUserFile } from 'element-plus'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { reactive, ref } from 'vue'; |
| | | import { onMounted, reactive, ref } from 'vue'; |
| | | import { useRoute, useRouter } from 'vue-router'; |
| | | import { add_knowledge_file } from '/@/api/knowledge/group'; |
| | | const uploadFileChange = (rule, value, callback) => { |
| | |
| | | const state = reactive({ |
| | | detailTitle: '导入数据', |
| | | categoryForm: { |
| | | ImportCategory: '默认类目', |
| | | ImportCategory: '', |
| | | CategoryType: '本地类目', |
| | | DocumentRecognition: '1', |
| | | }, |
| | |
| | | allowType: 'md', |
| | | limit: 5, |
| | | size: 5, |
| | | demoDesc: '使用阿里云文档智能解析服务据解析文档,抽取文档内容、层级结构等信息。', |
| | | categoryFormRules: { |
| | | importType: [{ required: true, validator: uploadFileChange, trigger: 'change' }], |
| | | }, |
| | |
| | | const handleExitFlow = () => { |
| | | //是否显示返回 |
| | | router.back(); |
| | | categoryFormRef.value.resetFields(); |
| | | fileList.value = []; |
| | | }; |
| | | const flag = ref(true); |
| | | const uploadFile = (file: UploadUserFile) => { |
| | |
| | | } |
| | | }); |
| | | }; |
| | | onMounted(() => { |
| | | const group_title = route.query.title; |
| | | state.categoryForm.ImportCategory = group_title; |
| | | }); |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .set-form-height { |