Browse Source

优化业务域组件:简化数据源选择逻辑,合并Excel组件,调整导入路径

Xiao_123 1 week ago
parent
commit
faa6ac1b90

+ 1 - 1
src/views/dataGovernance/businessDomain/components/SourceFilePreview.vue

@@ -41,7 +41,7 @@
 </template>
 
 <script>
-import ExcelPage from './excel/index.vue'
+import ExcelPage from './excel.vue'
 import hljs from 'highlight.js'
 import 'highlight.js/styles/monokai.css'
 import { renderAsync } from 'docx-preview'

+ 2 - 4
src/views/dataGovernance/businessDomain/components/edit.vue

@@ -230,7 +230,7 @@ export default {
         this.loadingUpload = false
       }
     },
-    // DDL使用该数据源
+    // 使用该数据源
     handleSelect (item, key) {
       this.select = key
       this.selectModel = item.meta
@@ -241,10 +241,8 @@ export default {
     },
 
     async handleSubmit () {
-      // DDL解析需要选择数据资源
-      if (this.fileType === 'sql' && (!this.selectModel || !this.selectModel.length)) {
+      if (!this.selectModel || !this.selectModel.length) {
         this.$snackbar.error('请先选择数据资源')
-        this.tab = 0
         return
       }
       try {

+ 1 - 1
src/views/dataGovernance/businessDomain/components/excel/index.vue → src/views/dataGovernance/businessDomain/components/excel.vue

@@ -21,7 +21,7 @@ import FileReview from '@/components/FileReview'
 import NonePage from '@/components/Common/empty.vue'
 
 export default {
-  name: 'ExcelPage',
+  name: 'ExcelIndex',
   components: {
     FileReview,
     NonePage