Commit 4aadfa9f authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents 9be7d790 35957bef
......@@ -55,6 +55,7 @@ export default {
<style scoped>
.block_radius {
background-color: #fff;
box-shadow: 0px 3px 6px 0px rgba(15, 19, 65, 0.05);
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
......
......@@ -619,6 +619,8 @@ export default {
};
},
mounted() {
this.setOrigin();
this.setVal();
this.getProcessServiceList();
document.addEventListener("mousemove", this.docMousemove);
document.addEventListener("mouseup", this.docMouseup);
......@@ -628,6 +630,10 @@ export default {
});
},
methods: {
setOrigin() {
let width = this.$refs.flowContainer.clientWidth;
this.origin = [width / 2, 0];
},
linkStyle(link) {
return {};
},
......@@ -1147,16 +1153,18 @@ export default {
let index = this.nodeParamsList.findIndex((item) => {
return item.id == this.nodeItem.id;
});
this.nodeParamsList[index].plugins.split(plugin_index, 1);
this.nodeParamsList[index].plugins.splice(plugin_index, 1);
},
delNode(item) {
console.log(item);
let obj = this.$refs.superFlow.toJSON();
let nodes = obj.nodeList;
let links = obj.linkList;
let node_meta_id = "";
for (let i = 0; i < nodes.length; i++) {
console.log(nodes[i]);
if (nodes[i].id == item) {
node_meta_id = nodes[i].meta.id;
nodes.splice(i, 1);
}
}
......@@ -1167,9 +1175,17 @@ export default {
i--;
}
}
let index = this.nodeParamsList.findIndex((item) => {
return item.id == node_meta_id;
});
this.nodeParamsList.splice(index, 1);
this.nodeList = nodes;
this.linkList = links;
console.log(this.nodeList, this.linkList);
this.nodeItem = {
id: "",
name: "",
};
console.log(this.nodeList, this.linkList, this.nodeParamsList);
},
},
};
......
......@@ -89,7 +89,8 @@ export default {
},
methods: {
initNavList() {
this.is_admin = this.$store.state.userInfo.is_admin;
this.$api.user.getNowUser().then((response) => {
this.is_admin = response.data.data.is_admin;
if (this.is_admin == 3 || this.is_admin == 4) {
this.navList = this.userNav;
} else if (this.is_admin == 2) {
......@@ -97,6 +98,7 @@ export default {
} else if (this.is_admin == 1) {
this.navList = this.userNav2;
}
});
},
},
mounted() {
......
......@@ -57,8 +57,14 @@
:active-icon="require('@/assets/imgs/progress_ic_liucheng.png')"
class="apaas_step"
>
<div class="step_in">
<WorkFlow ref="workFlow" :node_list="node_list" :link_list="link_list" :node_params_list="node_params_list" class="work_flow" />
<div class="step_in" v-if="step == 1">
<WorkFlow
ref="workFlow"
:node_list="node_list"
:link_list="link_list"
:node_params_list="node_params_list"
class="work_flow"
/>
<div class="btn_footer">
<el-button class="cancel" @click="cancel">取消</el-button>
<div>
......@@ -249,8 +255,11 @@ export default {
describe: self.basic_form.desc,
...res,
};
this.$api.workbench.addProcess(query).then((response) => {
this.$api.workbench.editProcess(query).then((response) => {
if (response.data.success == 1) {
this.step = 2;
} else {
this.$message.error(response.data.errMsg);
}
});
}
......@@ -274,6 +283,7 @@ export default {
this.node_list = data.nodeList;
this.link_list = data.linkList;
this.node_params_list = [];
this.workflows_id = data.workflows_id;
this.node_list.forEach((item) => {
item.meta.id =
parseInt(Math.random() * 1000 * 1000) +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment