|
@@ -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") {
|