"src/components/service-list/commodity-card-new.vue" did not exist on "c6ab7e4e74f45476ee3e2d087b4b57f187858115"
Commit 2f164111 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents 9a8367b5 378cf526
...@@ -75,6 +75,40 @@ ...@@ -75,6 +75,40 @@
</div> </div>
<div v-if="nodeParams(nodeItem.id).plugins && nodeParams(nodeItem.id).plugins.length > 0"> <div v-if="nodeParams(nodeItem.id).plugins && nodeParams(nodeItem.id).plugins.length > 0">
<div class="checked_line"></div> <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>
</div> </div>
<el-dialog <el-dialog
...@@ -264,7 +298,12 @@ ...@@ -264,7 +298,12 @@
<p class="process_title">我的服务:</p> <p class="process_title">我的服务:</p>
<p class="process_input"> <p class="process_input">
<el-select v-model="service" placeholder="请选择服务"> <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> </el-select>
</p> </p>
<div class="dia_footer"> <div class="dia_footer">
...@@ -492,7 +531,7 @@ export default { ...@@ -492,7 +531,7 @@ export default {
], ],
select: 1, select: 1,
serviceUrl: "", serviceUrl: "",
activeName: 0, activeName: "0",
sjfwQqt: "JSON", sjfwQqt: "JSON",
emptyText: "暂无数据", emptyText: "暂无数据",
sqfsVal: "", sqfsVal: "",
...@@ -578,6 +617,7 @@ export default { ...@@ -578,6 +617,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getProcessServiceList();
document.addEventListener("mousemove", this.docMousemove); document.addEventListener("mousemove", this.docMousemove);
document.addEventListener("mouseup", this.docMouseup); document.addEventListener("mouseup", this.docMouseup);
this.$once("hook:beforeDestroy", () => { this.$once("hook:beforeDestroy", () => {
...@@ -894,6 +934,21 @@ export default { ...@@ -894,6 +934,21 @@ export default {
}); });
}, },
interfaceCancel() { 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; this.dialog_interface = false;
}, },
interfaceSubmit() { interfaceSubmit() {
...@@ -912,22 +967,48 @@ export default { ...@@ -912,22 +967,48 @@ export default {
return item.id == self.nodeItem.id; return item.id == self.nodeItem.id;
}); });
console.log(self.nodeParamsList[index]); console.log(self.nodeParamsList[index]);
self.nodeParamsList[index].plugins.push({ let plugin_index = self.nodeParamsList[index].plugins.findIndex(
plugin_type: 1, (item) => {
url: self.serviceUrl, return item.plugin_type == 1;
req_type: Number(self.select), }
auth_method: self.sqfsVal, );
auth_token: self.tokenVal, if (plugin_index == -1) {
query_fields: JSON.stringify( self.nodeParamsList[index].plugins.push({
self.dataType == "body" ? self.request_fields : self.body_fields plugin_type: 1,
), url: self.serviceUrl,
body_fields: JSON.stringify( req_type: Number(self.select),
self.dataType == "param" ? self.request_fields : self.param_fields auth_method: self.sqfsVal,
), auth_token: self.tokenVal,
response_fields: JSON.stringify(self.response_fields), 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),
});
} 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); console.log(self.nodeParamsList);
self.dialog_interface = false; self.interfaceCancel();
} else if (this.requestRules != 0) { } else if (this.requestRules != 0) {
this.$message.error("请完善请求参数信息中的字段名称"); this.$message.error("请完善请求参数信息中的字段名称");
} else if (this.responseRules != 0) { } else if (this.responseRules != 0) {
...@@ -961,10 +1042,22 @@ export default { ...@@ -961,10 +1042,22 @@ export default {
} }
}, },
processCancel() { processCancel() {
this.service = "";
this.dialog_process = false; this.dialog_process = false;
}, },
processSubmit() { 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() { showTimeoutManagement() {
...@@ -973,13 +1066,51 @@ export default { ...@@ -973,13 +1066,51 @@ export default {
} }
}, },
timeoutCancel() { 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; 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() { setVal() {
this.nodeList = JSON.parse(JSON.stringify(this.node_list)); this.nodeList = [...this.node_list];
this.linkList = JSON.parse(JSON.stringify(this.link_list)); this.linkList = [...this.link_list];
this.nodeParamsList = JSON.parse(JSON.stringify(this.node_params_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 { ...@@ -1008,7 +1139,7 @@ export default {
} }
.flow_options { .flow_options {
width: 84px; width: 84px;
height: 244px; padding-bottom: 30px;
background-color: #f8f9fd; background-color: #f8f9fd;
border-radius: 42px; border-radius: 42px;
position: absolute; position: absolute;
...@@ -1017,7 +1148,7 @@ export default { ...@@ -1017,7 +1148,7 @@ export default {
text-align: center; text-align: center;
.options_head { .options_head {
color: #242c43; color: #242c43;
font-size: 12px; font-size: 14px;
font-weight: bold; font-weight: bold;
margin-top: 30px; margin-top: 30px;
} }
...@@ -1084,6 +1215,35 @@ export default { ...@@ -1084,6 +1215,35 @@ export default {
width: 64px; width: 64px;
height: 1px; height: 1px;
background-color: #e5e8f5; 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 @@ ...@@ -4,7 +4,7 @@
ref="superFlow" ref="superFlow"
:node-list="nodeList" :node-list="nodeList"
:link-list="linkList" :link-list="linkList"
:origin="[681, 465]" :origin="origin"
line-color="#c4d8f8" line-color="#c4d8f8"
on-line-color="#94a8c8" on-line-color="#94a8c8"
:draggable="false" :draggable="false"
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
<div class="plug-in-list"> <div class="plug-in-list">
<span v-for="(plugin, index) in meta.plugins" :key="index"> <span v-for="(plugin, index) in meta.plugins" :key="index">
{{ {{
["-", "接口插件", "流程插件", "超时插件"][ ["-", "接口插件", "流程插件", "超时插件"][
plugin.plugin_type || 0 plugin.plugin_type || 0
] ]
}} }}
</span> </span>
</div> </div>
...@@ -63,6 +63,7 @@ export default { ...@@ -63,6 +63,7 @@ export default {
}, },
data() { data() {
return { return {
origin: [0, 0],
nodeList: [], nodeList: [],
linkList: [], linkList: [],
}; };
...@@ -104,7 +105,7 @@ export default { ...@@ -104,7 +105,7 @@ export default {
this.nodeList = nodeList; this.nodeList = nodeList;
this.linkList = linkList; this.linkList = linkList;
}) })
.catch(function(error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
}, },
......
...@@ -141,7 +141,7 @@ export default { ...@@ -141,7 +141,7 @@ export default {
methods: { methods: {
verification() { verification() {
let self = this; let self = this;
let data = JSON.parse(JSON.stringify(self.$refs.workFlow.getData())); let data = {...self.$refs.workFlow.getData()};
console.log(JSON.stringify(data)); console.log(JSON.stringify(data));
let start_num = 0; let start_num = 0;
let end_num = 0; let end_num = 0;
......
...@@ -9,10 +9,7 @@ ...@@ -9,10 +9,7 @@
<BlockRadius class="block_item"> <BlockRadius class="block_item">
<steps <steps
:active-step="step" :active-step="step"
:done="done"
:show-done="true" :show-done="true"
done-title="保存成功"
done-sub-title="可返回流程管理列表查看该流程,并进行流程的部署和发布。"
class="apaas_steps" class="apaas_steps"
> >
<step <step
...@@ -81,11 +78,27 @@ ...@@ -81,11 +78,27 @@
:step="2" :step="2"
:active-icon="require('@/assets/imgs/progress_ic_wancheng.png')" :active-icon="require('@/assets/imgs/progress_ic_wancheng.png')"
class="apaas_step" class="apaas_step"
></step> >
<div class="steps_container steps_done">
<template slot="action"> <div class="steps_done_info">
<el-button type="primary" @click="backToList">返回列表</el-button> <div class="left_container">
</template> <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> </steps>
</BlockRadius> </BlockRadius>
</div> </div>
...@@ -107,7 +120,6 @@ export default { ...@@ -107,7 +120,6 @@ export default {
data: () => { data: () => {
return { return {
step: 0, step: 0,
done: false,
basic_form: { basic_form: {
name: "", name: "",
workplace: "", workplace: "",
...@@ -132,8 +144,7 @@ export default { ...@@ -132,8 +144,7 @@ export default {
methods: { methods: {
verification() { verification() {
let self = this; 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 start_num = 0;
let end_num = 0; let end_num = 0;
let start_id = ""; let start_id = "";
...@@ -143,7 +154,6 @@ export default { ...@@ -143,7 +154,6 @@ export default {
let in_edge = 0; let in_edge = 0;
let out_edge = 0; let out_edge = 0;
let datas = { ...data.obj }; let datas = { ...data.obj };
console.log(data);
datas.nodeList.forEach((item) => { datas.nodeList.forEach((item) => {
let da = data.params.find((nodep) => { let da = data.params.find((nodep) => {
return nodep.id == item.meta.id; return nodep.id == item.meta.id;
...@@ -210,7 +220,7 @@ export default { ...@@ -210,7 +220,7 @@ export default {
} }
}, },
backToList() { backToList() {
this.$router.push("/message/directed_push"); this.$router.push("/progress/designer");
}, },
changeWorkPlace() {}, changeWorkPlace() {},
cancel() { cancel() {
...@@ -239,6 +249,9 @@ export default { ...@@ -239,6 +249,9 @@ export default {
}; };
this.$api.workbench.addProcess(query).then((response) => { this.$api.workbench.addProcess(query).then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
this.step = 2;
} else {
this.$message.error(response.data.errMsg);
} }
}); });
} }
...@@ -291,6 +304,47 @@ export default { ...@@ -291,6 +304,47 @@ export default {
.work_flow { .work_flow {
height: calc(100% - 70px); 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>
<style> <style>
.block_item .el-textarea__inner { .block_item .el-textarea__inner {
......
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
<el-breadcrumb-item :to="{ path: '/intelligent_drawing' }">智能制图</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/intelligent_drawing' }">智能制图</el-breadcrumb-item>
<el-breadcrumb-item>发布信息填写</el-breadcrumb-item> <el-breadcrumb-item>发布信息填写</el-breadcrumb-item>
</el-breadcrumb> </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 v-else separator="/" class="bread_crumb">
<el-breadcrumb-item :to="{ path: '/fwzc' }">服务注册</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/fwzc' }">服务注册</el-breadcrumb-item>
<el-breadcrumb-item v-if="!jcxxtx">服务测试</el-breadcrumb-item> <el-breadcrumb-item v-if="!jcxxtx">服务测试</el-breadcrumb-item>
...@@ -541,6 +546,7 @@ export default { ...@@ -541,6 +546,7 @@ export default {
requestRules: 0, requestRules: 0,
responseRules: 0, responseRules: 0,
is_map: 0, is_map: 0,
process_id: "",
param_fields: [], param_fields: [],
body_fields: [], body_fields: [],
dialogInfo: { dialogInfo: {
...@@ -1003,6 +1009,11 @@ export default { ...@@ -1003,6 +1009,11 @@ export default {
self.is_portal = true; self.is_portal = true;
} }
this.getOrganization(); this.getOrganization();
} else if (self.$route.query.process) {
self.process_id = self.$route.query.process;
self.jcxxtx = true;
this.getProcessDetail
this.getOrganization();
} else { } else {
self.is_map = 0; self.is_map = 0;
self.getServiceType1(); self.getServiceType1();
...@@ -1045,7 +1056,6 @@ export default { ...@@ -1045,7 +1056,6 @@ export default {
); );
}, },
listeners(event) { listeners(event) {
console.log(event);
let self = this; let self = this;
if (event && event.origin == gisServiceUrl && event.data) { if (event && event.origin == gisServiceUrl && event.data) {
if (event.data.cmd == "getPortalItemInfo") { if (event.data.cmd == "getPortalItemInfo") {
......
...@@ -74,6 +74,10 @@ const workbench = { ...@@ -74,6 +74,10 @@ const workbench = {
getProcessNamespaceList() { getProcessNamespaceList() {
return axios.get(`/apaas/serviceapp/v3/workflows/searchConditions`) return axios.get(`/apaas/serviceapp/v3/workflows/searchConditions`)
}, },
// get process service list
getProcessServiceList() {
return axios.get(`/apaas/serviceapp/v3/workflows/wfServices`)
},
} }
export default workbench; 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