Browse Source

数据流程:暂时去除来源表、目标表必填效验

Xiao_123 2 weeks ago
parent
commit
986252a94b
1 changed files with 29 additions and 27 deletions
  1. 29 27
      src/views/dataGovernance/dataProcess/components/edit.vue

+ 29 - 27
src/views/dataGovernance/dataProcess/components/edit.vue

@@ -33,20 +33,21 @@
               outlined
               dense
               hide-details
-              label="请输入来源表 *"
+              label="请输入来源表"
               v-model="changeObj.source_table"
               placeholder="请输入来源表"
-              :rules="[v => !!v || '请输入来源表']"
-            ></v-text-field>
-            <v-text-field
+              ></v-text-field>
+              <!-- :rules="[v => !!v || '请输入来源表']" -->
+              <v-text-field
               class="ml-3"
               outlined
               dense
               hide-details
-              label="请输入目标表 *"
+              label="请输入目标表"
               v-model="changeObj.target_table"
               placeholder="请输入目标表"
-              :rules="[v => !!v || '请输入目标表']">
+              >
+              <!-- :rules="[v => !!v || '请输入目标表']" -->
             </v-text-field>
           </div>
           <v-card outlined class="height-auto mt-3">
@@ -289,8 +290,8 @@ export default {
         this.changeObj = {
           script_content: data.script_content,
           script_requirement: data.script_requirement,
-          source_table: data.source_table,
-          target_table: data.target_table
+          source_table: data.source_table || '',
+          target_table: data.target_table || ''
         }
       } catch (error) {
         this.$snackbar.error(error)
@@ -334,21 +335,21 @@ export default {
         this.$snackbar.warning('请输入内容')
         return
       }
-      if (!this.changeObj.source_table) {
-        this.$snackbar.warning('请先填写来源表')
-        return
-      }
-      if (!this.changeObj.target_table) {
-        this.$snackbar.warning('请先填写目标表')
-        return
-      }
+      // if (!this.changeObj.source_table) {
+      //   this.$snackbar.warning('请先填写来源表')
+      //   return
+      // }
+      // if (!this.changeObj.target_table) {
+      //   this.$snackbar.warning('请先填写目标表')
+      //   return
+      // }
       // if
       this.loading = true
       try {
         const { data } = await api.getDataFlowScript({
           request_data: this.changeObj.script_requirement,
-          input: this.changeObj.source_table,
-          output: this.changeObj.target_table
+          input: this.changeObj.source_table || '',
+          output: this.changeObj.target_table || ''
         })
         // this.changeObj.script_requirement = text
         this.changeObj.script_content = data.script_content
@@ -363,19 +364,20 @@ export default {
       if (!params) {
         return
       }
-      const { script_content: scriptContent, source_table: sourceTable, target_table: targetTable } = this.changeObj
+      // const { script_content: scriptContent, source_table: sourceTable, target_table: targetTable } = this.changeObj
+      const { script_content: scriptContent } = this.changeObj
       if (!scriptContent) {
         this.$snackbar.warning('请先生成脚本')
         return
       }
-      if (!sourceTable) {
-        this.$snackbar.warning('请先填写来源表')
-        return
-      }
-      if (!targetTable) {
-        this.$snackbar.warning('请先填写目标表')
-        return
-      }
+      // if (!sourceTable) {
+      //   this.$snackbar.warning('请先填写来源表')
+      //   return
+      // }
+      // if (!targetTable) {
+      //   this.$snackbar.warning('请先填写目标表')
+      //   return
+      // }
       const query = {
         ...params,
         ...this.changeObj