Browse Source

生产线调度:手动执行参数调整

Xiao_123 1 month ago
parent
commit
74b7962eb4
1 changed files with 7 additions and 6 deletions
  1. 7 6
      src/views/dataFactory/dispatch/index.vue

+ 7 - 6
src/views/dataFactory/dispatch/index.vue

@@ -88,6 +88,7 @@ export default {
       loading: false,
       headers: [
         { text: '名称', value: 'name' },
+        { text: '英文名', value: 'en_name' },
         { text: '状态', value: 'status' },
         { text: '更新时间', value: 'updateTime' },
         { text: '创建时间', value: 'createTime' },
@@ -143,8 +144,8 @@ export default {
     async getDict () {
       try {
         const { data } = await dataFactoryDictList({ type: 'production_line_run_status' })
-        this.taskStatus = data[0].itemList
-        this.filter.list.find(e => e.key === 'status').items = data[0].itemList
+        this.taskStatus = data[0]?.itemList ?? []
+        this.filter.list.find(e => e.key === 'status').items = data[0]?.itemList ?? []
       } catch (error) {
         this.$snackbar.error(error)
       }
@@ -192,10 +193,10 @@ export default {
       if (item.loading === true) {
         return
       }
-      const { id } = item
+      if (!item.en_name) return this.$snackbar.warning('目标表明不存在')
       // const { id, type } = Object.values(item.nodeProperty).pop()
       item.loading = true
-      await this.handleRunResource(id)
+      await this.handleRunResource({ dependency_level: 'resource', target_table: item.en_name })
       // if (type === 'data_resource') {
       //   await this.handleRunResource(id)
       // }
@@ -208,9 +209,9 @@ export default {
       item.loading = false
     },
     // 结构化 运行
-    async handleRunResource (id) {
+    async handleRunResource (query) {
       try {
-        await api.productionLineDispatch({ id })
+        await api.productionLineDispatch(query)
         this.$snackbar.success('执行成功')
       } catch (error) {
         this.$snackbar.error(error)