Browse Source

新增CSV文件转换节点以输入验证

Zhangvinjo 3 years ago
parent
commit
485fe7f4d2

+ 1 - 0
config/index.js

@@ -11,6 +11,7 @@ module.exports = {
     // Paths
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
+    // assetsPublicPath: './',
     // 代理列表, 是否开启代理通过[./dev.env.js]配置
     proxyTable: devEnv.OPEN_PROXY === false ? {
       '/snoopapi':{

+ 568 - 0
src/views/modules/visi/design-csvselect-config.vue

@@ -0,0 +1,568 @@
+<template>
+  <div class="ant-tabs-tabpane">
+    <el-tabs default-active-key="1" @change="callback" visible.sync="visible">
+      <el-tab-pane key="1" label="节点设置">
+        <el-form :layout="formLayout">
+          <el-form-item name="nodeName" label=" 节点名称">
+            <el-input placeholder="请输入节点名称" v-model="nodeName" />
+          </el-form-item>
+          <!-- <el-form-item name="userstyle" label="使用方法">
+            <el-descriptions >
+              选择输入文件数据集预览数据,获取表头信息,通过设置新的行列范围创建新数据集
+            </el-descriptions>
+    
+          </el-form-item> -->
+          <el-form-item name="userstyle" label=" 使用方法">
+            <el-input
+              placeholder="选择输入文件数据集预览数据,获取表头信息,通过设置新的行列范围创建新数据集"
+              :disabled="true"
+              type="textarea"
+              :autosize="{ minRows: 3 }"
+            />
+          </el-form-item>
+
+          <!-- <el-form-item :wrapper-col="buttonItemLayout.wrapperCol">
+            <el-button type="primary" @click="primary"> 保存 </el-button>
+          </el-form-item> -->
+        </el-form>
+      </el-tab-pane>
+      <el-tab-pane key="2" label="参数设置">
+        <el-form :layout="formLayout">
+          <el-form-item label="获取数据集">
+            <el-select
+              v-model="inputnodefilevalue"
+              placeholder="请选择"
+              @change="changeslect"
+            >
+              <el-option
+                v-for="item in inputnodefilemap"
+                :key="item.name"
+                :label="item.name"
+                :value="item"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item
+            :wrapper-col="buttonItemLayout.wrapperCol"
+            label-width="50%"
+          >
+            <el-button type="primary" @click="getCSVHeader">
+              获取表头
+            </el-button>
+            <el-button type="primary" @click="previewfile"> 预览 </el-button>
+          </el-form-item>
+        </el-form>
+        <!-- csv文件头信息 -->
+        <el-table
+          :data="allStringinfo"
+          style="width: 100%"
+          stripe empty-text=" "
+          max-height="300"
+        >
+          <el-table-column type="index"></el-table-column>
+          <el-table-column
+            v-for="(item, index) in headerinfo"
+            :key="index"
+            :label="item"
+          >
+            <template slot-scope="scope">{{ scope.row[index] }}</template>
+          </el-table-column>
+        </el-table>
+        <span
+          >当前文件共有 {{ rownum == 0 ? 0 : rownum + 1 }} 行
+          {{ colnum == 0 ? colnum : colnum + 1 }} 列数据</span
+        >
+        <el-divider></el-divider>
+        <el-form>
+          <el-form-item label="行">
+            <el-input-number
+              v-model="rowminnum"
+              controls-position="right"
+              :min="0"
+              :max="rownum"
+            ></el-input-number>
+            <el-input-number
+              v-model="rowmaxnum"
+              controls-position="right"
+              :min="0"
+              :max="rownum"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item label="列">
+            <el-input-number
+              v-model="colminnum"
+              controls-position="right"
+              :min="0"
+              :max="colnum"
+            ></el-input-number>
+            <el-input-number
+              v-model="colmaxnum"
+              controls-position="right"
+              :min="0"
+              :max="colnum"
+            ></el-input-number>
+          </el-form-item>
+          <el-button type="primary" @click="getnewfile">创建</el-button>
+        </el-form>
+      </el-tab-pane>
+      <el-tab-pane key="3" label="新文件">
+        <el-form :layout="formLayout">
+          <el-form-item label="文件名">
+            <el-input placeholder="请输入节点名称" v-model="newfilename" />
+          </el-form-item>
+          <el-form-item
+            :wrapper-col="buttonItemLayout.wrapperCol"
+            label-width="50%"
+          >
+            <el-button type="primary" @click="getnewCSVHeader">
+              获取表头
+            </el-button>
+            <el-button type="primary" @click="previewnewfile"> 预览 </el-button>
+          </el-form-item>
+        </el-form>
+        <!-- csv文件头信息 -->
+        <el-table
+          :data="newallStringinfo"
+          style="width: 100%"
+          stripe empty-text=" "
+          max-height="300"
+        >
+        <el-table-column type="index"></el-table-column>
+          <el-table-column
+            v-for="(item, index) in newheaderinfo"
+            :key="index"
+            :label="item"
+          >
+            <template slot-scope="scope">{{ scope.row[index] }}</template>
+          </el-table-column>
+        </el-table>
+        <span
+          >当前文件共有 {{ newrownum == 0 ? 0 : newrownum + 1 }} 行
+          {{ newcolnum == 0 ? 0 : newcolnum + 1 }} 列数据</span
+        >
+        <el-divider></el-divider>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+<script>
+// import { Tabs } from "antd";
+// import classNames from "classnames";
+import { MessageBox } from "element-ui";
+import { Message } from "element-ui";
+import templs from "../alg/templs.vue";
+export default {
+  components: { templs },
+  data() {
+    return {
+      visible: false,
+      isMakenewfile: false,
+      inputnodefilemap: [], //输入节点输入的文件
+      inputnodefilevalue: [], //选中的文件信息
+      // inputnodefilevalue 每一个值包含以下三个部分
+      // bucketname: "visiarguartifact"
+      // fileurl: "http://150.158.138.99:9006/visiarguartifact/argoworkflow/DY_1019.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20220724%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220724T102526Z&X-Amz-Expires=1000&X-Amz-SignedHeaders=host&X-Amz-Signature=e7d18bcc2b3e0352194cbeddf3b3c5e2696b09916d9cbb326f56ccd01c181718"
+      // name: "DY_1019.csv"
+      filename: null,
+      cell: null,
+      nodeName: "1",
+
+      formLayout: "horizontal", //:layout="formLayout"
+      form: this.$form.createForm(this, { name: "coordinated" }),
+      rownum: 0,
+      colnum: 0,
+      headerinfo: null,
+      allStringinfo: null,
+      rowminnum: null,
+      rowmaxnum: null,
+      colminnum: null,
+      colmaxnum: null,
+
+      //包含所有文件
+      allfilemap: [{}],
+
+      //新文件
+      tab3visi: false,
+      newrownum: 0,
+      newcolnum: 0,
+      newheaderinfo: null,
+      newallStringinfo: null,
+      newfilename: null,
+      newbucketname: null,
+      newfileurl: null,
+    };
+  },
+  created() {},
+  mounted() {
+    // this.init();
+  },
+  methods: {
+    handleFormLayoutChange(e) {
+      this.formLayout = e.target.value;
+    },
+    indexMethod(index) {
+        return index ;
+      },
+    callback(key) {
+      console.log(key);
+    },
+    init() {
+      this.visible = true;
+    },
+    init1(celldata, cell) {
+      this.visible = true;
+      this.inputnodefilemap = celldata.inputnodefilemap;
+      this.inputnodefilevalue = celldata.inputnodefilevalue;
+      this.allfilemap = celldata.allfilemap;
+      this.cell = cell;
+
+      //新创建的文件初始化
+      if (celldata.isMakenewfile) {
+        //已经创建过
+        this.tab3visi = true;
+        this.newfilename =
+          celldata.allfilemap[celldata.allfilemap.length - 1].name;
+        this.newfileurl =
+          celldata.allfilemap[celldata.allfilemap.length - 1].fileurl;
+      }
+    },
+    primary() {
+      // console.log("design-csvselectnode-config   primary");
+      // this.cell.setData({ nodeName: this.nodeName });
+      this.cell.setData({ allfilemap: this.allfilemap });
+
+      this.cell.setData({ inputnodefilemap: this.inputnodefilemap });
+      this.cell.setData({ inputnodefilevalue: this.inputnodefilevalue });
+
+      // this.cell.setData({ outputsparameters: this.outputsparameters });
+      //20210922   zhang    是否需要保存 获取到的源数据
+
+      this.$emit("primaryCSVselectNodeclick", this.conditionForm,this.cell);
+    },
+
+    //新建边时,源节点为输入节点,节点内部获取输入节点对应的文件 name及url
+    changeinputnodemap(celldata, cell, sallfilemap) {
+      celldata.inputnodefilemap = sallfilemap;
+      cell.setData({ inputnodefilemap: sallfilemap });
+      this.inputnodefilemap = sallfilemap;
+    },
+
+    // 实现select选择框可下拉单选,也可输入赋值
+    handleSearch(value) {
+      this.handleChange(value);
+    },
+    handleChange(value) {
+      this.value = value != null && value != "" ? value : [];
+    },
+    handleBlur(value) {
+      this.value = value;
+      if (this.list.indexOf(value) == -1) {
+        this.list.push(value);
+      }
+    },
+
+    // selectBlur(e) {
+    //   // 意见类型
+    //   if (e.target.value !== "") {
+    //     this.value = e.target.value + "(其他)";
+    //     this.$forceUpdate(); // 强制更新
+    //   }
+    // },
+
+    selectBlur(e, row) {
+      // this.inputContent = e.target.value ;
+      // row.value = e.target.value;
+    },
+    selectClear() {
+      this.value = "";
+      this.$forceUpdate();
+    },
+    selectChange(val) {
+      this.value = val;
+      this.$forceUpdate();
+    },
+    cascadehandleChange(value) {},
+    cascadeparahandleChange(value) {
+      // console.log("多选参数");
+      // console.log(value);
+
+      // console.log(quotevalue)
+      // 是否与上次的类型相同
+      // let changeFlag = false;
+      // let changeItem = null;
+      // if (this.shareScopeEnd.length == 0) {
+      //   this.quotevalue = val
+      // } else {
+      //   // 与原数组比对
+      //   this.value.forEach((item) => {
+      //     if (item[0] !== this.shareScopeEnd[0][0]) { // 一级标签不同
+      //       changeFlag = true
+      //       changeItem = item
+      //     } else if (item[1] != this.shareScopeEnd[0][1]) { // 一级标签相同但是二级标签不同
+      //       changeFlag = true
+      //       changeItem = item
+      //     } else if ((!item[2] && this.shareScopeEnd[0][2]) || (item[2] && !this.shareScopeEnd[0][2])) {
+      //       changeFlag = true
+      //       changeItem = item
+      //     }
+      //   })
+      // }
+      // if (changeFlag) {
+      //   this.value = []
+      //   this.value.push(changeItem)
+      // }
+      // this.shareScopeEnd = this.value
+    },
+
+    // 以下4个函数是文件上传功能的
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+    handlePreview(file) {
+      console.log(file);
+    },
+    handleExceed(files, fileList) {
+      Message.warning(
+        `当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
+          files.length + fileList.length
+        } 个文件`
+      );
+    },
+    beforeRemove(file, fileList) {
+      return MessageBox.confirm(`确定移除 ${file.name}?`);
+    },
+
+    //
+    changeslect(item) {
+      // console.log("输入文件数据集名称")
+      // console.log(item)
+      // concole.log(item.target)
+    },
+    //获取CSV文件表头信息
+    getCSVHeader() {
+      if (
+        this.inputnodefilevalue == null ||
+        this.inputnodefilevalue.name == null
+      ) {
+        Message.error("未选择文件");
+      } else {
+        // this.getWorkflowStatus();
+        // console.log("获取CSV文件表头信息");
+        this.$http({
+          url: this.$http.adornUrl("/visi/visiworkflow/getCSVHeader"),
+          method: "get",
+          params: this.$http.adornParams({
+            bucketname: this.inputnodefilevalue.bucketname,
+            filename: this.inputnodefilevalue.name,
+          }),
+        })
+          .then(({ data }) => {
+            if (data && data.code === 0) {
+              this.$nextTick(() => {
+                this.rownum = Number(data.index) - 1;
+                this.colnum = Number(data.col) - 1;
+                this.headerinfo = data.headerinfo;
+                this.allStringinfo = data.allstring;
+              });
+            }
+          })
+          .then(() => {
+            // console.log("获取的表头信息");
+            // console.log(this.headerinfo);
+            // console.log(this.allStringinfo);
+            // console.log(this.rownum);
+            // console.log(this.colnum);
+          });
+      }
+    },
+
+    //预览  输入文件
+    previewfile(paraname, valuefrom) {
+      if (
+        this.inputnodefilevalue == null ||
+        this.inputnodefilevalue.name == null
+      ) {
+        Message.error("未选择文件");
+      } else {
+        // if (artifiletype == "csv") {
+        // console.log("csv类型");
+        let routeData = this.$router.resolve({
+          path: "/visi-previewcsv",
+          query: {
+            csvurl: this.inputnodefilevalue.fileurl,
+          },
+        });
+        window.open(routeData.href, "_blank");
+        // } else {
+        //   console.log("其他");
+        //   window.open(this.inputnodefilevalue);
+        // }
+      }
+    },
+    //创建新文件
+    getnewfile() {
+      if (
+        this.inputnodefilevalue == null ||
+        this.inputnodefilevalue.name == null ||
+        this.rowminnum == null ||
+        this.rowmaxnum == null ||
+        this.colminnum == null ||
+        this.colmaxnum == null
+      ) {
+        Message.error("输入有误");
+      } else {
+        // this.getWorkflowStatus();
+        // console.log("获取CSV文件表头信息");
+        this.$http({
+          url: this.$http.adornUrl("/visi/visiworkflow/getnewfile"),
+          method: "get",
+          params: this.$http.adornParams({
+            bucketname: this.inputnodefilevalue.bucketname,
+            filename: this.inputnodefilevalue.name,
+            rowminnum: this.rowminnum,
+            rowmaxnum: this.rowmaxnum,
+            colminnum: this.colminnum,
+            colmaxnum: this.colmaxnum,
+          }),
+        })
+          .then(({ data }) => {
+            if (data && data.code === 0) {
+              this.$nextTick(() => {
+                this.newfilename = data.newfilename;
+                this.newfileurl = data.newfileurl;
+                this.newbucketname = "visiarguartifact";
+
+                var fileitem = {};
+                fileitem["name"] = data.newfilename;
+                fileitem["bucketname"] = "visiarguartifact";
+                fileitem["fileurl"] = data.newfileurl;
+                this.allfilemap.push(fileitem);
+                // this.allfilemap.pop(0);
+              });
+            }
+          })
+          .then(() => {
+            // console.log("获取的表头信息");
+            // console.log(this.headerinfo);
+            // console.log(this.allStringinfo);
+            // console.log(this.rownum)
+            // console.log(this.colnum)
+            Message.success("创建新文件成功")
+            this.primary();
+          });
+          
+      }
+    },
+
+    //获取新创建的文件的CSV文件表头信息
+    getnewCSVHeader() {
+      if (this.newfilename == null) {
+        Message.error("未创建新文件");
+      } else {
+        // this.getWorkflowStatus();
+        console.log("获取CSV文件表头信息");
+        this.$http({
+          url: this.$http.adornUrl("/visi/visiworkflow/getCSVHeader"),
+          method: "get",
+          params: this.$http.adornParams({
+            bucketname: this.newbucketname,
+            filename: this.newfilename,
+          }),
+        })
+          .then(({ data }) => {
+            if (data && data.code === 0) {
+              this.$nextTick(() => {
+                this.newrownum = Number(data.index);
+                this.newcolnum = Number(data.col);
+                this.newheaderinfo = data.headerinfo;
+                this.newallStringinfo = data.allstring;
+              });
+            }
+          })
+          .then(() => {});
+      }
+    },
+
+    //预览  新创建的文件
+    previewnewfile(paraname, valuefrom) {
+      if (this.newfilename == null) {
+        Message.error("未创建新文件");
+      } else {
+        // if (artifiletype == "csv") {
+        // console.log("csv类型");
+        let routeData = this.$router.resolve({
+          path: "/visi-previewcsv",
+          query: {
+            csvurl: this.newfileurl,
+          },
+        });
+        window.open(routeData.href, "_blank");
+        // } else {
+        //   console.log("其他");
+        //   window.open(this.inputnodefilevalue);
+        // }
+      }
+    },
+  },
+  computed: {
+    formItemLayout() {
+      const { formLayout } = this;
+      return formLayout === "horizontal"
+        ? {
+            labelCol: { span: 4 },
+            wrapperCol: { span: 14 },
+          }
+        : {};
+    },
+    buttonItemLayout() {
+      const { formLayout } = this;
+      return formLayout === "horizontal"
+        ? {
+            wrapperCol: { span: 14, offset: 4 },
+          }
+        : {};
+    },
+  },
+};
+</script>
+<style>
+.ant-tabs-tabpane {
+  background: #fff;
+  padding: 5px;
+  width: 100%;
+  height: 100%;
+}
+.ant-tabs-tab {
+  flex: 1 1 50px;
+  padding: 7px 16px;
+  display: flex;
+  justify-content: center;
+  width: 100%;
+  height: 100%;
+}
+.el-select .el-input {
+  /* width: 130px; */
+  width: 100%;
+  /* width: 0px; */
+}
+.input-with-select .el-input-group__prepend {
+  background-color: #fff;
+}
+.el-form-item.el-input {
+  width: 150px;
+}
+.logList-item {
+  padding: 8px 0;
+  margin: 0;
+  font: normal 13px/1.2 "Courier", sans-serif;
+}
+.log-box {
+  /* min-height: 500px; */
+  /* max-height: 800px; */
+  height: 100%;
+  padding: 10px;
+  margin: 10px;
+  background-color: #fff;
+}
+</style>

+ 284 - 28
src/views/modules/visi/design-graph1.vue

@@ -93,7 +93,7 @@
                       >
                       </i>
                     </el-tooltip>
-                    <el-tooltip content="<" effect="dark">
+                    <el-tooltip content="Undo" effect="dark">
                       <i
                         @click="onUndo"
                         style="
@@ -106,7 +106,7 @@
                       >
                       </i>
                     </el-tooltip>
-                    <el-tooltip content=">" effect="dark">
+                    <el-tooltip content="Redo" effect="dark">
                       <i
                         @click="onRedo"
                         style="
@@ -233,6 +233,7 @@
                 ref="newConNodeConfig"
                 @primaryclick="primaryConNodeConfig(arguments)"
               ></ConNodeConfig>
+              <CSVSelectNodeConfig v-show="csvselectNodeConVisible" ref="csvselectNodeConfig" @primaryCSVselectNodeclick="primaryCSVselectNodeconfig(arguments)"></CSVSelectNodeConfig>
               <!-- <a-layout-sider
               breakpoint="lg"
               theme="light"
@@ -300,6 +301,7 @@ import NodeParaTemp from "./design-para-temp.vue";
 import InputNodeConfig from "./design-inputnode-config1.vue";
 import OutputNodeConfig from "./design-outputnode-config.vue";
 import Workflowlog from "./design-workflowlog.vue";
+import CSVSelectNodeConfig from "./design-csvselect-config.vue";
 import "@/ant-design-vue";
 import { Message } from "element-ui";
 import { MessageBox } from "element-ui";
@@ -315,6 +317,7 @@ export default {
       paraTempVisible: false, //20211111    算法节点输入输出参数代码模板
       inputNodeConVisible: false, //输入节点配置
       outputNodeConVisible: false, //输出节点配置
+      csvselectNodeConVisible: false, //csv文件转换节点配置
       //右侧参数设置组件栏
       formLayout: "horizontal",
       form: this.$form.createForm(this, { name: "coordinated" }),
@@ -377,6 +380,11 @@ export default {
               key: "dataOutputnode",
               scopedSlots: { icon: "custom" },
             },
+            {
+              title: "CSV文件转换节点",
+              key: "CSVSelectnode",
+              scopedSlots: { icon: "custom" },
+            },
           ],
         },
         {
@@ -438,6 +446,7 @@ export default {
     InputNodeConfig: InputNodeConfig,
     OutputNodeConfig: OutputNodeConfig,
     Workflowlog: Workflowlog,
+    CSVSelectNodeConfig: CSVSelectNodeConfig,
     // X6Splitbox: X6Splitbox,
     // SplitBox: splitbox,
   },
@@ -987,6 +996,132 @@ export default {
         sourcealgocell: null,
       },
     });
+    //定义输出节点
+    Graph.registerNode("template-csvselect", {
+      inherit: "rect",
+      width: 90,
+      height: 80,
+      attrs: {
+        body: {
+          strokeWidth: 1,
+          stroke: "#d3e3ee",
+          fill: "#e2c3a0",
+          rx: 8,
+          ry: 8,
+        },
+        //设置内部添加图片
+        image: {
+          width: 36,
+          height: 36,
+          refX: 30,
+          refY: 16,
+          "xlink:href":
+            "https://gw.alipayobjects.com/zos/bmw-prod/c55d7ae1-8d20-4585-bd8f-ca23653a4489.svg",
+        },
+        label: {
+          refX: 0.5,
+          refY: 0.85,
+          fill: "#333",
+          fontSize: 11,
+          // fontWeight: "bold",
+          fontVariant: "small-caps",
+        },
+      },
+      ports: {
+        groups: {
+          // 输入链接桩群组定义
+          in: {
+            position: "left",
+            attrs: {
+              circle: {
+                r: 2.5,
+                magnet: true,
+                stroke: "black",
+                strokeWidth: 1,
+                fill: "#fff",
+                style: {
+                  visibility: true, //默认隐藏,不显示。定位到节点, 才展示
+                },
+              },
+            },
+          },
+          // 输出链接桩群组定义
+          out: {
+            position: "right",
+            attrs: {
+              circle: {
+                r: 2.5,
+                magnet: true,
+                stroke: "black",
+                // stroke: "#fff",
+                strokeWidth: 1,
+                fill: "#fff",
+                // style: {
+                //   visibility: "hidden", //默认隐藏,不显示。定位到节点, 才展示
+                // },
+              },
+            },
+          },
+        },
+        items: [
+          {
+            id: "inport1",
+            group: "in",
+          },
+          {
+            id: "inport2",
+            group: "in",
+          },
+          {
+            id: "outport1",
+            group: "out",
+          },
+          {
+            id: "outport2",
+            group: "out",
+          },
+        ],
+      },
+
+      markup: [
+        {
+          tagName: "rect",
+          selector: "body",
+          attrs: {
+            fill: "#fff",
+            stroke: "#000",
+            strokeWidth: 2,
+          },
+        },
+        {
+          tagName: "image",
+          selector: "image",
+        },
+        {
+          tagName: "text",
+          selector: "label",
+          attrs: {
+            fill: "#333",
+            textAnchor: "middle",
+            textVerticalAnchor: "middle",
+          },
+        },
+      ],
+      data: {
+        nodeName: "",
+        algonodeId: null,
+
+        st_dataListvalue: [], //静态数据集选中 文件对应value
+        dy_dataListvalue: [], //动态数据集选中  文件对应value
+        fileList: [], //外部上传  文件
+        inputnodefilemap: [], //引用输入节点的   文件列表,包含文件名和url
+        inputnodefilevalue: [], //用户选择的输入节点的文件,存储文件url,后端调用    ---与算法节点的不同,存储文件名,桶名称,url
+        allfilemap: [{}], //选中的文件对应的名称及url
+        isMakenewfile: false,
+      },
+    });
+
+
     // 初始化画布
     const graph = new Graph({
       grid: true,
@@ -998,8 +1133,9 @@ export default {
       panning: {
         enabled: true,
       },
+      //调节节点大小
       resizing: {
-        enabled: true,
+        enabled: false,
       },
       // model: {},
       history: true, //uodo和redo
@@ -1287,6 +1423,7 @@ export default {
           this.conNodeConfigVisi = true;
           this.experimentVisi = false;
           this.nodeConfigVisi = false;
+          this.csvselectNodeConVisible = false;
           this.$refs.newConNodeConfig.init(
             cell.getData().sourcedatalist,
             cell.getData().sourceartilist,
@@ -1306,6 +1443,7 @@ export default {
           this.nodeConfigVisi = true;
           this.conNodeConfigVisi = false;
           this.experimentVisi = false;
+          this.csvselectNodeConVisible = false;
           this.$refs.newNodeConfig.init1(
             cell.getData(),
             cell,
@@ -1360,6 +1498,24 @@ export default {
             );
           });
         }
+      }else if (cell.shape == "template-csvselect") {
+        // console.log(cell.getData());
+        // console.log(this.workflowName);
+        // console.log(cell.id);
+        this.$nextTick(() => {
+          this.csvselectNodeConVisible = true;
+          this.nodeConfigVisi = false;
+          this.conNodeConfigVisi = false;
+          this.experimentVisi = false;
+          this.$refs.csvselectNodeConfig.init1(
+            cell.getData(),cell
+          );
+      
+          // if (this.$refs.newNodeConfig) {
+          //   // console.log("出现了");
+          //   this.$refs.newNodeConfig.init1(cell.getData(), cell);
+          // }
+        });
       }
     });
 
@@ -1372,7 +1528,7 @@ export default {
         this.conNodeConfigVisi = false;
         this.experimentVisi = true;
         this.nodeConfigVisi = false;
-
+        this.csvselectNodeConVisible = false;
         this.$refs.experConfig.init();
         // this.visible = true;
         // this.$refs.experConfig.init();
@@ -1405,10 +1561,10 @@ export default {
           // 对新创建的边进行插入数据库等持久化操作
           console.log("新建边:" + edge.id);
           const source = edge.getSourceCell();
-          console.log(edge);
-          console.log(edge.getSourceCell());
-          console.log(edge.getTargetCell());
-          console.log(currentCell);
+          // console.log(edge);
+          // console.log(edge.getSourceCell());
+          // console.log(edge.getTargetCell());
+          // console.log(currentCell);
           //添加任意一条边后,都需要获取源节点的输出参数列表,并将其写入到目标节点中
           //源节点为 rect,目标节点为rect
           if (
@@ -1623,6 +1779,56 @@ export default {
               );
             });
           }
+
+          //如果源节点为输入节点,目的节点为CSV转换节点
+          if (
+            source.shape == "template-input" &&
+            currentCell.shape == "template-csvselect"
+          ) {
+            console.log("源节点为 template-input,目标节点为template-csvselect");
+            console.log(edge.shape);
+            //仅为传递到  节点参数设置栏便于展示
+            //20210819   是否可以根据    nodeConfigVisi  来选择是否刷新
+            console.log(source);
+            console.log(source.allfilemap);
+            // currentCell.setData({inputnodefilemap:source.getData().allfilemap});
+            this.$nextTick(() => {
+              // this.nodeConfigVisi = true;
+              // this.conNodeConfigVisi = false;
+              // this.experimentVisi = false;
+              this.$refs.csvselectNodeConfig.changeinputnodemap(
+                currentCell.getData(),
+                currentCell,
+                source.getData().allfilemap
+
+              );
+              //待更改0722
+            });
+          }
+
+          //如果源节点为输入节点,目的节点为 算法节点
+          if (
+            source.shape == "template-csvselect" &&
+            currentCell.shape == "template-node"
+          ) {
+            console.log("源节点为 template-csvselect,目标节点为template-node");
+            console.log(edge.shape);
+            //仅为传递到  节点参数设置栏便于展示
+            //20210819   是否可以根据    nodeConfigVisi  来选择是否刷新
+            console.log(source);
+            console.log(source.allfilemap);
+            // currentCell.setData({inputnodefilemap:source.getData().allfilemap});
+            this.$nextTick(() => {
+              // this.nodeConfigVisi = true;
+              // this.conNodeConfigVisi = false;
+              // this.experimentVisi = false;
+              this.$refs.newNodeConfig.changeinputnodemap(
+                currentCell.getData(),
+                currentCell,
+                source.getData().allfilemap
+              );
+            });
+          }
         }
       }
     );
@@ -3058,7 +3264,7 @@ export default {
         image: {
           "xlink:href":
             "https://gw.alipayobjects.com/zos/bmw-prod/687b6cb9-4b97-42a6-96d0-34b3099133ac.svg",
-          // "xlink:href":  "https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logo-with-text-73b8a.svg",
+          // "xlink:href":  "https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logogetworkflowlog-with-text-73b8a.svg",
           //可放图标
         },
       },
@@ -3225,6 +3431,40 @@ export default {
         sourcealgocell: null, //输出节点的前一个节点的结果
       },
     });
+    //创建CSV文件转换节点
+    const CSVConversionnode = this.graph.createNode({
+      // width: 170,
+      // height: 30,
+      shape: "template-csvselect",
+      // label: "consume_artifact",
+
+      attrs: {
+        label: {
+          text: "CSVConversionnode",
+        },
+        body: {
+          // stroke: "#2CB9FF",
+          // fill: "#2CB9FF",
+          fill: "#e2c3a0",
+        },
+        // body: {
+        //   stroke: "#DA2625",
+        //   fill: "#DA2625",
+        // },
+        image: {
+          "xlink:href":
+            "https://gw.alipayobjects.com/zos/bmw-prod/687b6cb9-4b97-42a6-96d0-34b3099133ac.svg",
+          // "xlink:href":  "https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logo-with-text-73b8a.svg",
+          //可放图标
+        },
+      },
+      data: {
+        nodeName: "CSVConversionnode",
+        templateName: "CSVConversionnode",
+        inputnodefilemap: [], //引用输入节点的   文件列表,包含文件名和url
+        inputnodefilevalue: [], //用户选择的输入节点的文件,存储文件url,后端调用
+      },
+    });
     //20211012  zhang
     console.log("nodedata");
     // console.log(this.nodedata)
@@ -3241,6 +3481,7 @@ export default {
     //数据输入 和 结果输出节点
     this.nodedata.push(dataInputnode);
     this.nodedata.push(dataOutputnode);
+    this.nodedata.push(CSVConversionnode);
     console.log(this.nodedata);
 
     //设置布局左右可拖动
@@ -5723,6 +5964,11 @@ export default {
               key: "dataOutputnode",
               scopedSlots: { icon: "custom" },
             },
+             {
+              title: "CSV文件转换节点",
+              key: "CSVConversionnode",
+              scopedSlots: { icon: "custom" },
+            },
           ],
         },
         {
@@ -6169,9 +6415,9 @@ export default {
                   primarydata.argumentsartifacts[i].paraname
                 )
               ) {
-                console.log(
-                  jsonfileurl[primarydata.argumentsartifacts[i].paraname]
-                );
+                // console.log(
+                //   jsonfileurl[primarydata.argumentsartifacts[i].paraname]
+                // );
                 primarydata.argumentsartifacts[i].fileurls.push(
                   jsonfileurl[primarydata.argumentsartifacts[i].paraname]
                 );
@@ -6209,17 +6455,17 @@ export default {
         .getCellById(args[1].id)
         .setData({ argumentsartifacts: primarydata.argumentsartifacts }); //对应input   保存相应输入的值
 
-      console.log("当前节点值");
-      console.log(this.graph.getCellById(args[1].id).getData());
-      console.log(
-        this.graph.getCellById(args[1].id).getData().argumentsartifacts
-      );
+      // console.log("当前节点值");
+      // console.log(this.graph.getCellById(args[1].id).getData());
+      // console.log(
+      //   this.graph.getCellById(args[1].id).getData().argumentsartifacts
+      // );
       this.graph
         .getCellById(args[1].id)
         .setData({ nodeName: primarydata.nodeName }); //对应input   保存相应输入的值
-      console.log("cell:" + args[1].id);
-      console.log("对应id的node:" + this.graph.getCellById(args[1]).toString());
-      console.log(this.graph.getCellById(args[1].id));
+      // console.log("cell:" + args[1].id);
+      // console.log("对应id的node:" + this.graph.getCellById(args[1]).toString());
+      // console.log(this.graph.getCellById(args[1].id));
 
       //20211119
       this.graph
@@ -6285,7 +6531,15 @@ export default {
       //   }
       // });
     },
-
+    primaryCSVselectNodeconfig(args){
+     
+     
+      var primarydata = args[1].getData();
+      this.graph.getCellById(args[1].id).setData(primarydata); 
+      // console.log("转换节点新数据")
+      // console.log(args[1].getData())
+      // console.log(this.graph.getCellById(args[1].id).getData())
+    },
     //20210812   左侧树形组件
     handleDragStart(node, ev) {
       console.log("drag start", node);
@@ -6321,7 +6575,7 @@ export default {
     },
     //20210813   dnd
     startDrag(e) {
-      console.log("拖拽前");
+      // console.log("拖拽前");
       // const target = this.currentTarget
       const target = e.currentTarget;
       const type = target.getAttribute("data-type");
@@ -6339,7 +6593,7 @@ export default {
           },
         },
       });
-      console.log("拖拽");
+      // console.log("拖拽");
 
       this.dnd.start(node, e);
       //删除.nativeEvent  前会出错
@@ -6448,7 +6702,7 @@ export default {
       //先将所有的节点创建成功后保存在this.nodedata中,点击对应节点后   匹配正确后将节点加入到画布中
       // console.log(this.nodedata[0].attrs.label.text)
       // this.graph.addNode(this.nodedata[0])
-      console.log(this.nodedata);
+      // console.log(this.nodedata);
       var nodenamenum = Math.floor(Math.random() * 1000); //1000以内随机整数
       for (var i = 0; i < this.nodedata.length; i++) {
         //遍历数组
@@ -6567,16 +6821,18 @@ export default {
 
     //保存输入节点内容
     primaryInputnodeConfig(args) {
-      console.log("保存输入节点");
-      console.log(args[0].id);
+      // console.log("保存输入节点");
+      // console.log(args[0].id);
+
       // // this.$emit("refreshDataList",this.cell,this.st_dataListvalue,this.dy_dataListvalue,this.fileList,this.allfilemap);//各个参数
       // this.graph.getCellById(args[0].id).setData({ st_dataListvalue: args[1] });
       // this.graph.getCellById(args[0].id).setData({ dy_dataListvalue: args[2] });
       // this.graph.getCellById(args[0].id).setData({ fileList: args[3] });
       // this.graph.getCellById(args[0].id).setData({ allfilemap: args[4] });
-
       // this.$emit("refreshinputnode",this.cell,celldata);
-      console.log(args[1].allfilemap);
+
+      // console.log(args[1].allfilemap);
+
       // this.graph.getCellById(args[0].id).setData(args[1]);
       //以该方式  福赋值字符串型可以,数组类型不可以
       // this.graph.getCellById(args[0].id).setData({allfilemap: this.graph.getCellById(args[0].id).getData().allfilemap.concat(args[1].allfilemap)})

+ 4 - 2
src/views/modules/visi/design-inputnode-config1.vue

@@ -40,8 +40,7 @@
           action="#"
           :on-preview="handlePreview"
           :on-remove="handleRemove"
-          :before-remove="beforeRemove"
-          multiple
+          :before-remove="beforeRemove" multiple
           :limit="10"
           :on-exceed="handleExceed"
           :on-change="fileChange"
@@ -222,6 +221,7 @@ export default {
                 // window.location.href = data.downloadUrl;
                 var fileitem = {};
                 fileitem["name"] = stdatasetname;
+                fileitem["bucketname"] = "dataset";
                 fileitem["fileurl"] = data.downloadUrl;
 
                 this.st_dataListmap.push(fileitem);
@@ -246,6 +246,7 @@ export default {
                 // window.location.href = data.downloadUrl;
                 var fileitem = {};
                 fileitem["name"] = dydatasetname;
+                fileitem["bucketname"] = "dydataset";
                 fileitem["fileurl"] = data.downloadUrl;
 
                 this.dy_dataListmap.push(fileitem);
@@ -276,6 +277,7 @@ export default {
                   // alert(val + " " + myJson[val]); //输出如:name
                   var fileitem = {};
                   fileitem["name"] = val;
+                  fileitem["bucketname"] = "visiarguartifact";
                   fileitem["fileurl"] = jsonfileurl[val];
                   this.externalfilemap.push(fileitem);
                   this.allfilemap.push(fileitem);

+ 181 - 105
src/views/modules/visi/design-node-config.vue

@@ -126,6 +126,7 @@
                   <input
                     v-model="scope.row.paravalue"
                     placeholder="请输入内容"
+                    @change="inpurparachange(value, scope.row)"
                   />
                 </template>
               </el-table-column>
@@ -145,7 +146,7 @@
                     @blur="selectBlur($event, scope1.row)"
                     v-model="scope1.row.quotevalue"
                     :options="cascadeoptionpara"
-                    @change="cascadeparahandleChange"
+                    @change="cascadeparahandleChange(value, scope1.row)"
                   ></el-cascader>
                 </template>
               </el-table-column>
@@ -187,6 +188,7 @@
                     v-model="scope0.row.inputnodefilevalue"
                     multiple
                     placeholder="请选择"
+                    @change="inputnodefilechange(value, scope0.row)"
                   >
                     <el-option
                       v-for="item in inputnodefilemap"
@@ -213,7 +215,7 @@
                     @blur="selectBlur($event, scope1.row)"
                     v-model="scope1.row.quotevalue"
                     :options="cascadeoption"
-                    @change="cascadehandleChange"
+                    @change="cascadehandleChange(value, scope1.row)"
                   ></el-cascader>
                 </template>
               </el-table-column>
@@ -669,26 +671,58 @@ export default {
         this.cascadeoptionpara.push(parachildrenOption); //[中添加{}]    第一级
       }
     },
+    //验证
+    primaryvalidate() {
+      for (var i = 0; i < this.argumentsparameters.length; i++) {
+        //输入值与引用均为空
+        if (
+          (this.argumentsparameters[i].paravalue == null ||
+            this.argumentsparameters[i].paravalue == "") &
+          (this.argumentsparameters[i].quotevalue == null ||
+            this.argumentsparameters[i].quotevalue.length == 0)
+        ) {
+          return false;
+        }
+      }
+      for (var i = 0; i < this.argumentsartifacts.length; i++) {
+        if (
+          (this.argumentsartifacts[i].inputnodefilevalue == null ||
+            this.argumentsartifacts[i].inputnodefilevalue.length == 0) &
+          (this.argumentsartifacts[i].quotevalue == null ||
+            this.argumentsartifacts[i].quotevalue.length == 0) &
+          (this.argumentsartifacts[i].filelist == null ||
+            this.argumentsartifacts[i].filelist.length == 0)
+        ) {
+          return false;
+        }
+      }
+
+      return true;
+    },
     primary() {
-      //20211119
-      this.algoparaInput.userInput = this.algoparaUserInput;
-      this.algoparaInput.getInput = this.algoparaGetInput;
-      // this.algonodeSource = this.algonodeSource;
-      this.cell.setData({ algoparaInput: this.algoparaInput });
-      this.cell.setData({ algonodeSource: this.algonodeSource });
-      console.log("design-node-config   primary");
-      console.log(this.argumentsartifacts);
+      if (!this.primaryvalidate()) {
+        Message.error("保存失败,请检查参数是否输入完整");
+      } else {
+        //20211119
+        this.algoparaInput.userInput = this.algoparaUserInput;
+        this.algoparaInput.getInput = this.algoparaGetInput;
+        // this.algonodeSource = this.algonodeSource;
+        this.cell.setData({ algoparaInput: this.algoparaInput });
+        this.cell.setData({ algonodeSource: this.algonodeSource });
+        console.log("design-node-config   primary");
+        console.log(this.argumentsartifacts);
 
-      this.cell.setData({ nodeName: this.nodeName });
-      this.cell.setData({ argumentsparameters: this.argumentsparameters });
-      this.cell.setData({ argumentsartifacts: this.argumentsartifacts });
+        this.cell.setData({ nodeName: this.nodeName });
+        this.cell.setData({ argumentsparameters: this.argumentsparameters });
+        this.cell.setData({ argumentsartifacts: this.argumentsartifacts });
 
-      this.cell.setData({ inputnodefilemap: this.inputnodefilemap });
+        this.cell.setData({ inputnodefilemap: this.inputnodefilemap });
 
-      // this.cell.setData({ outputsparameters: this.outputsparameters });
-      //20210922   zhang    是否需要保存 获取到的源数据
+        // this.cell.setData({ outputsparameters: this.outputsparameters });
+        //20210922   zhang    是否需要保存 获取到的源数据
 
-      this.$emit("primaryNodeclick", this.conditionForm, this.cell);
+        this.$emit("primaryNodeclick", this.conditionForm, this.cell);
+      }
     },
     //新建边时,边源节点及目的节点均为 算法节点,目的节点获取源节点  相关输出参数
     changeSourcedata(celldata, cell) {
@@ -704,11 +738,11 @@ export default {
       // this.cell.setData({ sourceartilist: this.sourceartilist });
 
       this.algonodeSource = celldata.algonodeSource;
-      console.log("design-node-config  sourcedatalist ");
-      console.log("this.cell");
-      console.log(this.cell);
-      // this.cell.setData({ algonodeSource: this.algonodeSource });
-      console.log(this.algonodeSource);
+      // console.log("design-node-config  sourcedatalist ");
+      // console.log("this.cell");
+      // console.log(this.cell);
+      // // this.cell.setData({ algonodeSource: this.algonodeSource });
+      // console.log(this.algonodeSource);
 
       //更新文件及参数类型  级联选择器选项
       this.cascadeoption = [];
@@ -721,10 +755,10 @@ export default {
         //20211124   ----   参数选择部分,设置参数选择器 ---设置para   和artifact
         // const curnodeoutput = curnode.getData().algoparaOutput;
         const curnodeoutputartifact = curnode.getData().outputsartifacts;
-        console.log("第二级参数");
+        // console.log("第二级参数");
         const childoutput = []; //第一级的children
         for (var j = 0; j < curnodeoutputartifact.length; j++) {
-          console.log(curnodeoutputartifact[j]);
+          // console.log(curnodeoutputartifact[j]);
           const secchildOption = {}; //第一级children[]  中的{}---------第二级
           secchildOption.value = curnodeoutputartifact[j].paraname; //第二级
           secchildOption.label = curnodeoutputartifact[j].paraname; //第二级
@@ -751,10 +785,10 @@ export default {
         //20211124   ----   参数选择部分,设置参数选择器 ---设置para
         // const curnodeoutput = curnode.getData().algoparaOutput;
         const curnodeoutputparameter = paracurnode.getData().outputsparameters;
-        console.log("第二级参数");
+        // console.log("第二级参数");
         const parachildoutput = []; //第一级的children
         for (var j = 0; j < curnodeoutputparameter.length; j++) {
-          console.log(curnodeoutputparameter[j]);
+          // console.log(curnodeoutputparameter[j]);
           const parasecchildOption = {}; //第一级children[]  中的{}---------第二级
           parasecchildOption.value = curnodeoutputparameter[j].paraname; //第二级
           parasecchildOption.label = curnodeoutputparameter[j].paraname; //第二级
@@ -806,38 +840,68 @@ export default {
       this.value = val;
       this.$forceUpdate();
     },
-    cascadehandleChange(value) {},
-    cascadeparahandleChange(value) {
-      console.log("多选参数");
-      console.log(value);
-      // console.log(quotevalue)
-      // 是否与上次的类型相同
-      // let changeFlag = false;
-      // let changeItem = null;
-      // if (this.shareScopeEnd.length == 0) {
-      //   this.quotevalue = val
-      // } else {
-      //   // 与原数组比对
-      //   this.value.forEach((item) => {
-      //     if (item[0] !== this.shareScopeEnd[0][0]) { // 一级标签不同
-      //       changeFlag = true
-      //       changeItem = item
-      //     } else if (item[1] != this.shareScopeEnd[0][1]) { // 一级标签相同但是二级标签不同
-      //       changeFlag = true
-      //       changeItem = item
-      //     } else if ((!item[2] && this.shareScopeEnd[0][2]) || (item[2] && !this.shareScopeEnd[0][2])) {
-      //       changeFlag = true
-      //       changeItem = item
-      //     }
-      //   })
-      // }
-      // if (changeFlag) {
-      //   this.value = []
-      //   this.value.push(changeItem)
-      // }
-      // this.shareScopeEnd = this.value
-    },
 
+    cascadeparahandleChange(value, currow) {
+      // console.log("多选参数");
+      // console.log(currow);
+      if ((currow.paravalue != null) & (currow.paravalue != "")) {
+        currow.quotevalue = [];
+
+        Message.error("已自定义设置参数,不能重复设置,如需选择,请先删除输入");
+      }
+    },
+    inpurparachange(value, currow) {
+      // console.log("输入参数");
+      // console.log(currow);
+      if ((currow.quotevalue != null) & (currow.quotevalue.length > 0)) {
+        currow.paravalue = null;
+        Message.error(
+          "已选择其他节点参数作为输入,不能重复设置,如需输入,请先删除已选择的数据"
+        );
+      }
+    },
+    inputnodefilechange(value, currow) {
+      // console.log("输入节点文件");
+      // console.log(currow);
+      if (
+        (currow.quotevalue != null) & (currow.quotevalue.length > 0) ||
+        (currow.filelist != null) & (currow.filelist.length > 0)
+      ) {
+        currow.inputnodefilevalue = [];
+        Message.error(
+          "已通过其他方式这只输入文件,不能重复设置,如需输入,请先删除已选择的数据"
+        );
+      }
+    },
+    cascadehandleChange(value, currow) {
+      // console.log("输入节点文件");
+      // console.log(currow);
+      if (
+        (currow.inputnodefilevalue != null) &
+          (currow.inputnodefilevalue.length > 0) ||
+        (currow.filelist != null) & (currow.filelist.length > 0)
+      ) {
+        currow.quotevalue = [];
+        Message.error(
+          "已通过其他方式这只输入文件,不能重复设置,如需输入,请先删除已选择的数据"
+        );
+      }
+    },
+    //未应用
+    selefilechange(value, currow) {
+      // console.log("输入节点文件");
+      // console.log(currow);
+      if (
+        (currow.quotevalue != null) & (currow.quotevalue.length > 0) ||
+        (currow.inputnodefilevalue != null) &
+          (currow.inputnodefilevalue.length > 0)
+      ) {
+        currow.inputnodefilevalue = [];
+        Message.error(
+          "已通过其他方式这只输入文件,不能重复设置,如需输入,请先删除已选择的数据"
+        );
+      }
+    },
     // 以下4个函数是文件上传功能的
     handleRemove(file, fileList) {
       console.log(file, fileList);
@@ -860,15 +924,28 @@ export default {
       // this.fileList=fileList;
       // this.fileList.append(file);
       //20211125    该函数遍历了两边
-      console.log("fileChange");
-      console.log(index);
-      console.log(file);
-      console.log(fileList);
-      this.argumentsartifacts[index].filelist = fileList;
-      console.log(this.argumentsartifacts[index].filelist);
+      // console.log("fileChange");
+      // console.log(index);
+      // console.log(file);
+      // console.log(fileList);
 
-      this.argumentsartifacts[index].filelist.push(file);
-      console.log(this.argumentsartifacts[index].filelist);
+      if (
+        (this.argumentsartifacts[index].quotevalue != null) &
+          (this.argumentsartifacts[index].quotevalue.length > 0) ||
+        (this.argumentsartifacts[index].inputnodefilevalue != null) &
+          (this.argumentsartifacts[index].inputnodefilevalue.length > 0)
+      ) {
+        this.argumentsartifacts[index].filelist = [];
+        Message.error(
+          "已通过其他方式这只输入文件,不能重复设置,如需输入,请先删除已选择的数据"
+        );
+      } else {
+        this.argumentsartifacts[index].filelist = fileList;
+        console.log(this.argumentsartifacts[index].filelist);
+
+        this.argumentsartifacts[index].filelist.push(file);
+        console.log(this.argumentsartifacts[index].filelist);
+      }
     },
 
     // handleRemove(file, fileList) {
@@ -903,40 +980,39 @@ export default {
           .then(({ data }) => {
             if (data && data.code === 0) {
               this.$nextTick(() => {
-              this.workflowContentlog = data.workflowContent;
-              this.podcontent = data.podcontent;
-              if (this.containertype == "main") {
-                this.podcontentlog = this.podcontent.main;
-                this.podcontentlogsplit =
-                  this.podcontent.main.split(/[(\r\n)\r\n]+/);
-              }
-              if (this.containertype == "init") {
-                this.podcontentlog = this.podcontent.init;
-                this.podcontentlogsplit =
-                  this.podcontent.init.split(/[(\r\n)\r\n]+/);
-              }
-              if (this.containertype == "wait") {
-                this.podcontentlog = this.podcontent.wait;
-                this.podcontentlogsplit =
-                  this.podcontent.wait.split(/[(\r\n)\r\n]+/);
-              }
-              this.podphase = data.podphase;
-              // this.handleLog();
-              // console.log("podcontent");
-              // console.log(this.podcontent);
-              // console.log(this.podcontent.main);
-              // console.log(this.podcontent.init);
-              // console.log(this.podcontent.wait);
-              // console.log(this.podphase);
+                this.workflowContentlog = data.workflowContent;
+                this.podcontent = data.podcontent;
+                if (this.containertype == "main") {
+                  this.podcontentlog = this.podcontent.main;
+                  this.podcontentlogsplit =
+                    this.podcontent.main.split(/[(\r\n)\r\n]+/);
+                }
+                if (this.containertype == "init") {
+                  this.podcontentlog = this.podcontent.init;
+                  this.podcontentlogsplit =
+                    this.podcontent.init.split(/[(\r\n)\r\n]+/);
+                }
+                if (this.containertype == "wait") {
+                  this.podcontentlog = this.podcontent.wait;
+                  this.podcontentlogsplit =
+                    this.podcontent.wait.split(/[(\r\n)\r\n]+/);
+                }
+                this.podphase = data.podphase;
+                // this.handleLog();
+                // console.log("podcontent");
+                // console.log(this.podcontent);
+                // console.log(this.podcontent.main);
+                // console.log(this.podcontent.init);
+                // console.log(this.podcontent.wait);
+                // console.log(this.podphase);
 
-              // this.podlogs = data.podlogs;
-              // console.log("workflowcontent")
-              // console.log(this.workflowContentlog);
-              // console.log("podlogs")
-              // console.log(this.podlogs);
-            });
+                // this.podlogs = data.podlogs;
+                // console.log("workflowcontent")
+                // console.log(this.workflowContentlog);
+                // console.log("podlogs")
+                // console.log(this.podlogs);
+              });
             }
-            
           })
           .then(() => {
             // this.visible = true
@@ -959,7 +1035,7 @@ export default {
               //   this.workflowstatustag.name = "Failed";
               //   this.workflowstatustag.type = "danger";
               // }
-              console.log("关闭定时器-podlog");
+              // console.log("关闭定时器-podlog");
               window.clearInterval(intervalID);
             }
           });
@@ -1002,8 +1078,8 @@ export default {
         }),
       }).then(({ data }) => {
         if (data && data.code === 0) {
-          console.log("输出节点  下载数据集");
-          console.log(data.outputfileUrl);
+          // console.log("输出节点  下载数据集");
+          // console.log(data.outputfileUrl);
           window.open(data.outputfileUrl);
         } else {
           Message.error("下载失败");
@@ -1024,13 +1100,13 @@ export default {
         }),
       }).then(({ data }) => {
         if (data && data.code === 0) {
-          console.log("输出节点  下载数据集");
-          console.log(data.outputfileUrl);
+          // console.log("输出节点  下载数据集");
+          // console.log(data.outputfileUrl);
           const artifiletype = data.artifiletype;
           const artifileurl = data.outputfileUrl;
-          console.log("文件类型");
-          console.log(artifileurl);
-          console.log(artifileurl);
+          // console.log("文件类型");
+          // console.log(artifileurl);
+          // console.log(artifileurl);
           // window.location.href=data.outputfileUrl;
           // window.location.href=data.downloadUrl;
           if (artifiletype == "csv") {