Commit 35957bef authored by 刘殿昕's avatar 刘殿昕

流程图中点,数据分析is_admin,编辑,blockradius阴影

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