Commit 2f164111 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents 9a8367b5 378cf526
......@@ -75,6 +75,40 @@
</div>
<div v-if="nodeParams(nodeItem.id).plugins && nodeParams(nodeItem.id).plugins.length > 0">
<div class="checked_line"></div>
<p class="options_head_1">已选插件</p>
<div
class="checked_item"
v-for="(item, index) in nodeParams(nodeItem.id).plugins"
:key="'checked' + index"
>
<div v-if="item.plugin_type == 1">
<img :src="require('@/assets/imgs/lcsj_ic_jiekou.png')" class="checked_item_img" />
<img
:src="require('@/assets/imgs/lcsj_btn_delete.png')"
@click="delItem(1)"
class="checked_item_del"
/>
<p class="checked_item_text">接口插件</p>
</div>
<div v-else-if="item.plugin_type == 2">
<img :src="require('@/assets/imgs/lcsj_ic_liucheng.png')" class="checked_item_img" />
<img
:src="require('@/assets/imgs/lcsj_btn_delete.png')"
@click="delItem(2)"
class="checked_item_del"
/>
<p class="checked_item_text">流程服务</p>
</div>
<div v-else-if="item.plugin_type == 3">
<img :src="require('@/assets/imgs/lcsj_ic_chaoshi.png')" class="checked_item_img" />
<img
:src="require('@/assets/imgs/lcsj_btn_delete.png')"
@click="delItem(3)"
class="checked_item_del"
/>
<p class="checked_item_text">超时管理</p>
</div>
</div>
</div>
</div>
<el-dialog
......@@ -264,7 +298,12 @@
<p class="process_title">我的服务:</p>
<p class="process_input">
<el-select v-model="service" placeholder="请选择服务">
<el-option v-for="item in my_service_list" :label="item" :value="item" :key="item"></el-option>
<el-option
v-for="item in my_service_list"
:label="item.name"
:value="item.workflows_id"
:key="item.workflows_id"
></el-option>
</el-select>
</p>
<div class="dia_footer">
......@@ -492,7 +531,7 @@ export default {
],
select: 1,
serviceUrl: "",
activeName: 0,
activeName: "0",
sjfwQqt: "JSON",
emptyText: "暂无数据",
sqfsVal: "",
......@@ -578,6 +617,7 @@ export default {
};
},
mounted() {
this.getProcessServiceList();
document.addEventListener("mousemove", this.docMousemove);
document.addEventListener("mouseup", this.docMouseup);
this.$once("hook:beforeDestroy", () => {
......@@ -894,6 +934,21 @@ export default {
});
},
interfaceCancel() {
this.serviceUrl = "";
this.activeName = "0";
this.sqfsVal = "";
this.datasSj = [];
this.tokenVal = "";
this.noSearchUrl = "";
this.datasQqcs = [];
this.datasFhcs = [];
this.resSuccess = false;
this.resultShow = false;
this.dataType = "";
this.body_fields = [];
this.param_fields = [];
this.request_fields = [];
this.response_fields = [];
this.dialog_interface = false;
},
interfaceSubmit() {
......@@ -912,6 +967,12 @@ export default {
return item.id == self.nodeItem.id;
});
console.log(self.nodeParamsList[index]);
let plugin_index = self.nodeParamsList[index].plugins.findIndex(
(item) => {
return item.plugin_type == 1;
}
);
if (plugin_index == -1) {
self.nodeParamsList[index].plugins.push({
plugin_type: 1,
url: self.serviceUrl,
......@@ -922,12 +983,32 @@ export default {
self.dataType == "body" ? self.request_fields : self.body_fields
),
body_fields: JSON.stringify(
self.dataType == "param" ? self.request_fields : self.param_fields
self.dataType == "param"
? self.request_fields
: self.param_fields
),
response_fields: JSON.stringify(self.response_fields),
});
} else {
self.nodeParamsList[index].plugins[plugin_index] = {
plugin_type: 1,
url: self.serviceUrl,
req_type: Number(self.select),
auth_method: self.sqfsVal,
auth_token: self.tokenVal,
query_fields: JSON.stringify(
self.dataType == "body" ? self.request_fields : self.body_fields
),
body_fields: JSON.stringify(
self.dataType == "param"
? self.request_fields
: self.param_fields
),
response_fields: JSON.stringify(self.response_fields),
};
}
console.log(self.nodeParamsList);
self.dialog_interface = false;
self.interfaceCancel();
} else if (this.requestRules != 0) {
this.$message.error("请完善请求参数信息中的字段名称");
} else if (this.responseRules != 0) {
......@@ -961,10 +1042,22 @@ export default {
}
},
processCancel() {
this.service = "";
this.dialog_process = false;
},
processSubmit() {
if (this.service != "") {
let self = this;
if (self.service != "") {
let index = self.nodeParamsList.findIndex((item) => {
return item.id == self.nodeItem.id;
});
self.nodeParamsList[index].plugins.push({
plugin_type: 2,
ref_workflows_id: self.service,
});
this.processCancel();
} else {
this.$message.error("请选择流程服务");
}
},
showTimeoutManagement() {
......@@ -973,13 +1066,51 @@ export default {
}
},
timeoutCancel() {
this.max_time_0 = undefined;
this.max_time_1 = undefined;
this.max_time_type_0 = 1;
this.max_time_type_1 = 1;
this.max_time_check_0 = false;
this.max_time_check_1 = false;
this.dialog_timeout = false;
},
timeoutSubmit() {},
timeoutSubmit() {
let self = this;
let index = self.nodeParamsList.findIndex((item) => {
return item.id == self.nodeItem.id;
});
self.nodeParamsList[index].plugins.push({
plugin_type: 3,
timeout_notify: self.max_time_check_0, //超时提醒
timeout_stop: self.max_time_check_1, //超时终止
notice_max_time: self.max_time_0, // 超时最大时间
notice_time_unit: self.max_time_type_0, // 超时最大时间
stop_max_time: self.max_time_1, //停止最大时间单位,1:分钟,2:小时,3:天
stop_time_unit: self.max_time_type_1,
});
this.timeoutCancel();
},
setVal() {
this.nodeList = JSON.parse(JSON.stringify(this.node_list));
this.linkList = JSON.parse(JSON.stringify(this.link_list));
this.nodeParamsList = JSON.parse(JSON.stringify(this.node_params_list));
this.nodeList = [...this.node_list];
this.linkList = [...this.link_list];
this.nodeParamsList = [...this.node_params_list];
},
getProcessServiceList() {
this.$api.workbench.getProcessServiceList().then((response) => {
if (response.data.success == 1) {
this.my_service_list = response.data.data;
}
});
},
delItem(type) {
let arr = this.nodeParams(this.nodeItem.id).plugins;
let plugin_index = arr.findIndex((item) => {
return item.plugin_type == type;
});
let index = this.nodeParamsList.findIndex((item) => {
return item.id == this.nodeItem.id;
});
this.nodeParamsList[index].plugins.split(plugin_index, 1);
},
},
};
......@@ -1008,7 +1139,7 @@ export default {
}
.flow_options {
width: 84px;
height: 244px;
padding-bottom: 30px;
background-color: #f8f9fd;
border-radius: 42px;
position: absolute;
......@@ -1017,7 +1148,7 @@ export default {
text-align: center;
.options_head {
color: #242c43;
font-size: 12px;
font-size: 14px;
font-weight: bold;
margin-top: 30px;
}
......@@ -1084,6 +1215,35 @@ export default {
width: 64px;
height: 1px;
background-color: #e5e8f5;
margin: 20px auto;
}
.options_head_1 {
color: #242c43;
font-size: 14px;
font-weight: bold;
margin-top: 20px;
}
.checked_item {
margin-top: 20px;
cursor: pointer;
position: relative;
&:hover {
color: #515fe7;
}
.checked_item_img {
width: 40px;
height: 40px;
}
.checked_item_del {
position: absolute;
width: 12px;
height: 12px;
top: -4px;
right: 16px;
}
.checked_item_text {
white-space: nowrap;
}
}
}
}
......
......@@ -4,7 +4,7 @@
ref="superFlow"
:node-list="nodeList"
:link-list="linkList"
:origin="[681, 465]"
:origin="origin"
line-color="#c4d8f8"
on-line-color="#94a8c8"
:draggable="false"
......@@ -63,6 +63,7 @@ export default {
},
data() {
return {
origin: [0, 0],
nodeList: [],
linkList: [],
};
......@@ -104,7 +105,7 @@ export default {
this.nodeList = nodeList;
this.linkList = linkList;
})
.catch(function(error) {
.catch(function (error) {
console.log(error);
});
},
......
......@@ -141,7 +141,7 @@ export default {
methods: {
verification() {
let self = this;
let data = JSON.parse(JSON.stringify(self.$refs.workFlow.getData()));
let data = {...self.$refs.workFlow.getData()};
console.log(JSON.stringify(data));
let start_num = 0;
let end_num = 0;
......
......@@ -9,10 +9,7 @@
<BlockRadius class="block_item">
<steps
:active-step="step"
:done="done"
:show-done="true"
done-title="保存成功"
done-sub-title="可返回流程管理列表查看该流程,并进行流程的部署和发布。"
class="apaas_steps"
>
<step
......@@ -81,11 +78,27 @@
:step="2"
:active-icon="require('@/assets/imgs/progress_ic_wancheng.png')"
class="apaas_step"
></step>
<template slot="action">
<el-button type="primary" @click="backToList">返回列表</el-button>
</template>
>
<div class="steps_container steps_done">
<div class="steps_done_info">
<div class="left_container">
<img :src="require('@/assets/imgs/steps_done.png')" width="100%" />
</div>
<div class="right_container">
<p>保存成功</p>
<p>可返回流程管理列表查看该流程,并进行流程的部署和发布。</p>
</div>
</div>
<div class="done_action apaas_button">
<slot name="action"></slot>
</div>
<div class="btn_footer_1">
<div>
<el-button class="next" @click="backToList">返回列表</el-button>
</div>
</div>
</div>
</step>
</steps>
</BlockRadius>
</div>
......@@ -107,7 +120,6 @@ export default {
data: () => {
return {
step: 0,
done: false,
basic_form: {
name: "",
workplace: "",
......@@ -132,8 +144,7 @@ export default {
methods: {
verification() {
let self = this;
let data = JSON.parse(JSON.stringify(self.$refs.workFlow.getData()));
console.log(JSON.stringify(data));
let data = { ...self.$refs.workFlow.getData() };
let start_num = 0;
let end_num = 0;
let start_id = "";
......@@ -143,7 +154,6 @@ export default {
let in_edge = 0;
let out_edge = 0;
let datas = { ...data.obj };
console.log(data);
datas.nodeList.forEach((item) => {
let da = data.params.find((nodep) => {
return nodep.id == item.meta.id;
......@@ -210,7 +220,7 @@ export default {
}
},
backToList() {
this.$router.push("/message/directed_push");
this.$router.push("/progress/designer");
},
changeWorkPlace() {},
cancel() {
......@@ -239,6 +249,9 @@ export default {
};
this.$api.workbench.addProcess(query).then((response) => {
if (response.data.success == 1) {
this.step = 2;
} else {
this.$message.error(response.data.errMsg);
}
});
}
......@@ -291,6 +304,47 @@ export default {
.work_flow {
height: calc(100% - 70px);
}
.steps_container {
flex-grow: 1;
}
.steps_done {
position: relative;
height: 100%;
}
.steps_done_info {
position: absolute;
top: calc(50% - 40px);
left: 50%;
transform: translate(-50%, -50%);
}
.steps_done_info > * {
display: inline-block;
vertical-align: middle;
}
.steps_done_info > .left_container {
width: 70px;
font-size: 0;
margin-right: 10px;
}
.steps_done_info > .right_container > p:nth-child(1) {
font-size: 18px;
font-weight: 700;
line-height: 24px;
color: #242c43;
}
.steps_done_info > .right_container > p:nth-child(2) {
font-size: 14px;
line-height: 20px;
color: #8890a7;
margin-top: 5px;
}
.btn_footer_1 {
position: absolute;
bottom: 0;
padding: 15px;
width: 100%;
text-align: right;
}
</style>
<style>
.block_item .el-textarea__inner {
......
......@@ -5,6 +5,11 @@
<el-breadcrumb-item :to="{ path: '/intelligent_drawing' }">智能制图</el-breadcrumb-item>
<el-breadcrumb-item>发布信息填写</el-breadcrumb-item>
</el-breadcrumb>
<el-breadcrumb v-else-if="process_id != ''" separator="/" class="bread_crumb">
<el-breadcrumb-item :to="{ path: '/workplace' }">在线组件工具</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/progress/designer' }">流程设计</el-breadcrumb-item>
<el-breadcrumb-item>发布信息填写</el-breadcrumb-item>
</el-breadcrumb>
<el-breadcrumb v-else separator="/" class="bread_crumb">
<el-breadcrumb-item :to="{ path: '/fwzc' }">服务注册</el-breadcrumb-item>
<el-breadcrumb-item v-if="!jcxxtx">服务测试</el-breadcrumb-item>
......@@ -541,6 +546,7 @@ export default {
requestRules: 0,
responseRules: 0,
is_map: 0,
process_id: "",
param_fields: [],
body_fields: [],
dialogInfo: {
......@@ -1003,6 +1009,11 @@ export default {
self.is_portal = true;
}
this.getOrganization();
} else if (self.$route.query.process) {
self.process_id = self.$route.query.process;
self.jcxxtx = true;
this.getProcessDetail
this.getOrganization();
} else {
self.is_map = 0;
self.getServiceType1();
......@@ -1045,7 +1056,6 @@ export default {
);
},
listeners(event) {
console.log(event);
let self = this;
if (event && event.origin == gisServiceUrl && event.data) {
if (event.data.cmd == "getPortalItemInfo") {
......
......@@ -74,6 +74,10 @@ const workbench = {
getProcessNamespaceList() {
return axios.get(`/apaas/serviceapp/v3/workflows/searchConditions`)
},
// get process service list
getProcessServiceList() {
return axios.get(`/apaas/serviceapp/v3/workflows/wfServices`)
},
}
export default workbench;
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