Commit a9858889 authored by 董国亮's avatar 董国亮

应用开发管理页面更新

parent 3c03bc4c
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1594193323699" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1615" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M494.762667 457.784889A56.888889 56.888889 0 0 1 566.613333 527.928889l191.829334 187.335111a28.444444 28.444444 0 1 1-39.765334 40.732444L525.482667 567.296a57.002667 57.002667 0 0 1-69.063111-67.470222L279.267556 326.826667a28.444444 28.444444 0 0 1 39.765333-40.732445l175.786667 171.690667z m-171.235556-47.957333l77.767111 75.889777a113.777778 113.777778 0 0 0 139.605334 136.362667l50.346666 49.208889c-25.770667 7.566222-52.167111 11.377778-79.246222 11.377778-104.675556 0-199.509333-58.709333-284.330667-176.128 30.947556-39.253333 62.919111-71.452444 95.857778-96.711111z m105.528889-55.978667C456.078222 345.486222 483.726222 341.333333 512 341.333333c104.675556 0 199.566222 56.888889 284.444444 170.666667-31.687111 42.496-64.853333 77.027556-99.271111 103.651556L621.795556 542.037333a113.891556 113.891556 0 0 0-142.449778-139.093333l-50.289778-49.095111z" fill="#c0c4cc" p-id="1616"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1594193313007" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M446.464 471.04c0 10.24 2.048 22.528 6.144 30.72 4.096 10.24 10.24 18.432 18.432 26.624 8.192 8.192 16.384 14.336 26.624 18.432 10.24 4.096 20.48 6.144 30.72 6.144 10.24 0 22.528-2.048 30.72-6.144 10.24-4.096 18.432-10.24 26.624-18.432 8.192-8.192 14.336-16.384 18.432-26.624 4.096-10.24 6.144-20.48 6.144-30.72 0-10.24-2.048-22.528-6.144-30.72-4.096-10.24-10.24-18.432-18.432-26.624-8.192-8.192-16.384-14.336-26.624-18.432-10.24-4.096-20.48-6.144-30.72-6.144-10.24 0-22.528 2.048-30.72 6.144-10.24 4.096-18.432 10.24-26.624 18.432-8.192 8.192-14.336 16.384-18.432 26.624C448.512 448.512 446.464 460.8 446.464 471.04L446.464 471.04zM446.464 471.04" p-id="1419" fill="#c0c4cc"></path><path d="M524.288 270.336C327.68 270.336 223.232 471.04 223.232 471.04s137.216 202.752 309.248 202.752c172.032 0 305.152-202.752 305.152-202.752S718.848 270.336 524.288 270.336L524.288 270.336zM530.432 618.496c-81.92 0-147.456-65.536-147.456-147.456 0-81.92 65.536-147.456 147.456-147.456 81.92 0 147.456 65.536 147.456 147.456C677.888 552.96 610.304 618.496 530.432 618.496L530.432 618.496zM530.432 618.496" p-id="1420" fill="#c0c4cc"></path></svg>
\ No newline at end of file
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
*{box-sizing: border-box;}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:0;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}HTML,body,div,h1,h2,h3,h4,h5,h6,ul,ol,dl,li,dt,dd,p,blockquote,pre,form,fieldset,table,th,td{border:0;font-family:"微软雅黑","黑体","宋体";font-size:14px;margin:0;padding:0}html,body{height:100%;width:100%}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}a{text-decoration:none}a:link{color:#fff}a:visited{color:#fff}a:hover{color:#fff}a:active{color:#fff}input::-ms-clear{display:none}input::-ms-reveal{display:none}input{-webkit-appearance:none;margin:0;outline:0;padding:0}input::-webkit-input-placeholder{color:#ccc}input::-ms-input-placeholder{color:#ccc}input::-moz-placeholder{color:#ccc}input[type=submit],input[type=button]{cursor:pointer}button[disabled],input[disabled]{cursor:default}img{border:0}ul,ol,li{list-style-type:none}.clear{clear:both}.clearleft{clear:left}.clearright{clear:right}.floatleft{float:left}.floatright{float:right}.cursor{cursor:pointer}.bg000{background:#000}.color000{color:#000}
\ No newline at end of file
<template>
<div>
<el-tree
:check-strictly="checkStrictly"
:show-checkbox="showCheckbox"
empty-text="暂无数据"
:highlight-current = "highlightCurrent"
:default-expand-all = "defaultExpandAll"
:expand-on-click-node="expandOnClickNode"
:data="treeList"
:node-key="nodeKey"
:filter-node-method="filterNode"
@node-click="handleNodeClick"
@check="handleCheck"
:props="defaultProps"
:current-node-key="currentNodeKey"
:render-content="renderContent"
ref="tree">
<slot name="slotTree">
</slot>
</el-tree>
</div>
</template>
<script>
export default {
name: "index.vue",
props: {
//tree数据
treeList: {
type: Array
},
//自定义节点内容相关配置
defaultProps: {
type: Object,
default() {
return {
children: "children",
label: "label"
};
}
},
//唯一标识的属性
nodeKey: {
type: String,
default() {
return "id";
}
},
//选中节点
currentNodeKey:{
type:String
},
//是否默认展开所有节点
defaultExpandAll:{
type: Boolean,
default() {
return false
}
},
//树节点的内容区的渲染
renderContent :{
type:Object,
},
//节点是否高亮
highlightCurrent:{
type: Boolean,
default() {
return true
}
},
//是否显示复选框
showCheckbox:{
type: Boolean,
default() {
return false
}
},
//是否在点击节点的时候展开或者收缩节点(设置为false后,点击箭头才能展开收缩)
expandOnClickNode:{
type: Boolean,
default() {
return true
}
},
//在显示复选框的情况下,是否严格的遵循父子不互相关联的做法
checkStrictly: {
type: Boolean,
default() {
return false
}
},
},
data() {
return {
filterText:""
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
}
},
methods:{
//监听筛选
filterTree(data) {
this.filterText = data
},
//点击树节点
handleNodeClick(data,node) {
this.$emit("handleNodeClick", data,node);
},
//通过 node 获取节点
getCheckedNodes() {
this.$emit("getCheckedNodes", this.$refs.tree.getCheckedNodes())
},
//通过 key 获取节点
getCheckedKeys() {
this.$emit("getCheckedKeys", this.$refs.tree.getCheckedKeys())
},
//通过 node 设置节点 入参类型array
setCheckedNodes(arr) {
this.$refs.tree.setCheckedNodes(arr);
},
//通过 key 设置节点 入参类型array
setCheckedKeys(arr) {
this.$refs.tree.setCheckedKeys(arr);
},
//清空
resetChecked() {
this.$refs.tree.setCheckedKeys([]);
},
//点击复选框
handleCheck(checkedKeys,checkedNodes,halfCheckedKeys,halfCheckedNodes){
let params= {
checkedKeys,
checkedNodes,
halfCheckedKeys,
halfCheckedNodes
}
this.$emit("handleCheck", params);
},
// 触发页面显示配置的筛选
filterNode(value, data, node) {
// 如果什么都没填就直接返回
if (!value) return true;
// 如果传入的value和data中的label相同说明是匹配到了
if (data[this.defaultProps.label].indexOf(value) !== -1) {
return true;
}
// 否则要去判断它是不是选中节点的子节点
return this.checkBelongToChooseNode(value, data, node);
},
// 判断传入的节点是不是选中节点的子节点
checkBelongToChooseNode(value, data, node) {
const level = node.level;
// 如果传入的节点本身就是一级节点就不用校验了
if (level === 1) {
return false;
}
// 先取当前节点的父节点
let parentData = node.parent;
// 遍历当前节点的父节点
let index = 0;
while (index < level - 1) {
// 如果匹配到直接返回
if (parentData.data[this.defaultProps.label].indexOf(value) !== -1) {
return true;
}
// 否则的话再往上一层做匹配
parentData = parentData.parent;
index ++;
}
// 没匹配到返回false
return false;
},
}
}
</script>
<style scoped>
</style>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
v-if="pageSize" v-if="pageSize"
@size-change="sizeChange" @size-change="sizeChange"
@current-change="pageChange" @current-change="pageChange"
:current-page="currentPage" :current-page="pageNum"
:page-size="pageSize" :page-size="pageSize"
layout="sizes,total, prev, pager, next, jumper" layout="sizes,total, prev, pager, next, jumper"
:total="total" :total="total"
......
...@@ -7,9 +7,24 @@ ...@@ -7,9 +7,24 @@
<div class="tapContainer"> <div class="tapContainer">
<div class="tap" @click="collapsed = !collapsed"></div> <div class="tap" @click="collapsed = !collapsed"></div>
</div> </div>
<stms-list
v-if="treeStyle === 'list'"
:title="treeTitle"
:value="treeValue"
:data="computedTreeData"
@node-click="treeClick"
ref="tree"
>
<template slot="extra">
<slot name="extra"> </slot>
</template>
<template slot="tool">
<slot name="tool"> </slot>
</template>
</stms-list>
<stms-tree <stms-tree
v-else
:title="treeTitle" :title="treeTitle"
:mode="treeStyle"
:value="treeValue" :value="treeValue"
:data="computedTreeData" :data="computedTreeData"
@node-click="treeClick" @node-click="treeClick"
...@@ -39,9 +54,7 @@ export default { ...@@ -39,9 +54,7 @@ export default {
treeValue: { treeValue: {
type: Object, type: Object,
required: false, required: false,
default: function() { default: null
return {};
}
}, },
treeTitle: { treeTitle: {
type: String, type: String,
...@@ -245,6 +258,7 @@ export default { ...@@ -245,6 +258,7 @@ export default {
.iov-table { .iov-table {
flex: auto; flex: auto;
position: relative; position: relative;
padding: 10px 20px;
.stms-scrollbar { .stms-scrollbar {
position: absolute; position: absolute;
top: 0; top: 0;
......
This diff is collapsed.
<template>
<!-- body内容 -->
<el-form :model="value" ref="form" class="bodys">
<el-radio-group :value="value.type" @input="changeRow(...arguments, value)" class="tool">
<el-radio label="0">json</el-radio>
<el-radio label="1">form</el-radio>
<el-radio label="2">file</el-radio>
<el-radio label="3">raw</el-radio>
</el-radio-group>
<div v-if="value.type == '3'">
<stms-ace-editor :value="raw" @input="changeRaw" mode="json" width="100%" height="335px" />
</div>
<div class="treeScroll" v-else>
<el-tree
class="postData"
:data="value.param"
node-key="treeId"
:default-expand-all="true"
:expand-on-click-node="false"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>
<el-input
show-word-limit
type="text"
maxlength="50"
:value="data.name"
@input="changeName(...arguments, data)"
class="width"
:disabled="data.treeId == '-1'"
></el-input>
<el-select
class="selectWidth"
:value="data.dataType"
@input="changeType(...arguments, data)"
:disabled="data.treeId == '-1'"
>
<el-option
v-for="item in typeList"
:key="item"
:label="item"
:value="item"
></el-option>
</el-select>
<el-select
filterable
placeholder="必填"
class="selectWidth"
:value="data.required"
@input="changeRequired(...arguments, data)"
:disabled="data.treeId == '-1'"
>
<el-option value="1" label="是"></el-option>
<el-option value="0" label="否"></el-option>
</el-select>
<el-input
show-word-limit
type="text"
placeholder="说明"
maxlength="100"
class="width"
:value="data.des"
@input="changeDes(...arguments, data)"
:disabled="data.treeId == '-1'"
></el-input>
<!-- 默认input -->
<el-input
show-word-limit
type="text"
maxlength="50"
placeholder="值"
v-if="
['timestamp', 'time', 'date'].indexOf(data.dataType) == -1 && data.des != 'between'
"
:value="data.defaultValue"
@input="changeDefaultValue(...arguments, data)"
:disabled="data.treeId == '-1'"
class="width"
>
</el-input>
<!-- 默认日历插件 -->
<el-date-picker
type="date"
value-format="yyyy-MM-dd"
class="el-date width"
v-else
:disabled="data.treeId == '-1'"
:value="data.defaultValue"
@input="changeDefaultValue(...arguments, data)"
></el-date-picker>
</span>
<span class="tools">
<i class="el-icon-plus" v-show="data.dataType == 'object'" @click="add(data)"></i>
<i
class="el-icon-close"
@click="() => deleting(node, data)"
v-if="data.treeId != '-1'"
></i>
</span>
</span>
</el-tree>
</div>
</el-form>
</template>
<script>
export default {
props: {
value: {
type: Object,
required: true,
default: function() {
return {
type: "",
param: []
};
}
}
},
data() {
return {
raw: "",
// 数据类型
typeList: [
"string",
"int",
"object",
"char",
"short",
"long",
"float",
"double",
"boolean",
"byte",
"json",
"array",
"file",
"timestamp",
"time",
"date"
]
};
},
mounted() {
this.init();
if (this.value.type === "3") {
this.raw = this.value.param;
}
},
methods: {
init() {
console.log(!this.value.param.length);
if (!this.value.param.length && this.value.type !== "3") {
this.value.param.push({
name: "root",
dataType: "object",
des: "",
children: [],
treeId: "-1",
required: "1",
defaultValue: ""
});
// this.value.type = "0";
this.$emit("input", this.value);
}
},
add(data) {
if (!data.children) {
this.$set(data, "children", []);
}
this.$refs.form.validate(valid => {
if (valid) {
data.children.push({
name: "",
dataType: "object",
required: "",
des: "",
defaultValue: "",
treeId: "tree_node" + Date.now(),
treeParentId: data.treeId,
children: []
});
this.$emit("input", this.value);
}
});
},
deleting(node, data) {
const parent = node.parent;
const children = parent.data.children || parent.data;
const index = children.findIndex(d => d.treeId === data.treeId);
children.splice(index, 1);
},
changeRow(value, item) {
item.type = value;
this.value.param = [];
this.init();
this.$emit("input", this.value);
},
changeRaw(value) {
this.raw = value;
this.value.param = value;
this.$emit("input", this.value);
},
changeName(value, item) {
item.name = value;
this.$emit("input", this.value);
},
changeType(value, item) {
item.dataType = value;
this.$emit("input", this.value);
},
changeRequired(value, item) {
item.required = value;
this.$emit("input", this.value);
},
changeDes(value, item) {
item.des = value;
this.$emit("input", this.value);
},
changeDefaultValue(value, item) {
item.defaultValue = value;
this.$emit("input", this.value);
}
}
};
</script>
<style lang="less">
.bodys {
.el-select {
width: auto !important;
}
.tool {
margin-left: 1%;
}
.treeScroll {
overflow-y: auto;
height: 370px;
background: #fff;
.postData {
padding-top: 3px;
display: inline-block;
.selectWidth {
width: 100px !important;
margin-left: 10px;
}
.width {
width: 160px;
margin-left: 10px;
}
.tools {
margin-left: 10px;
width: 40px;
display: inline-flex;
justify-content: space-between;
}
.el-tree-node__content {
height: 32px;
margin: 8px 0;
background: #fff;
}
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
padding-right: 8px;
}
}
}
}
</style>
<template>
<!-- 自定义变量 -->
<el-form :model="{ value }" ref="form" class="customVarible">
<div>
<el-button type="primary" icon="plus" class="btn" @click="add">添加</el-button>
<el-table :data="value" height="370">
<el-table-column type="index" label="序号" width="70"></el-table-column>
<el-table-column label="名称">
<template slot-scope="scope">
<el-form-item
:prop="'value.' + scope.$index + '.fieldNameEn'"
:rules="[
{ required: true, message: '请输入名称' },
{ pattern: /^[\u4E00-\u9FA50-9a-zA-Z_\-.]+$/, message: '请勿输入特殊字符' }
]"
>
<el-input
show-word-limit
type="text"
placeholder="请输入名称"
:value="scope.row.fieldNameEn"
@input="changeName(...arguments, scope.row)"
maxlength="50"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="数据类型" width="150">
<template slot-scope="scope">
<el-select
:value="scope.row.type"
@input="changeType(...arguments, scope.row)"
placeholder="数据类型"
filterable
>
<el-option v-for="item in typeList" :key="item" :value="item"> </el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="说明">
<template slot-scope="scope">
<el-input
show-word-limit
type="text"
placeholder="说明"
:value="scope.row.des"
@input="changeDes(...arguments, scope.row)"
maxlength="100"
>
</el-input>
</template>
</el-table-column>
<el-table-column label="值">
<template slot-scope="scope">
<!-- 默认input -->
<el-input
show-word-limit
type="text"
maxlength="50"
placeholder="值"
v-if="scope.row.type != 'DATE'"
:value="scope.row.value"
@input="changeDefaultValue(...arguments, scope.row)"
>
</el-input>
<!-- 默认日历插件 -->
<el-date-picker
type="date"
value-format="yyyy-MM-dd"
class="el-date"
v-else
:value="scope.row.value"
@input="changeDefaultValue(...arguments, scope.row)"
></el-date-picker>
</template>
</el-table-column>
<el-table-column label="删除" width="90">
<template slot-scope="scope">
<el-button @click.native.prevent="deleting(scope.$index)" type="text" size="small">
<i class="el-icon-delete"></i>&nbsp;&nbsp;删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</template>
<script>
export default {
props: {
value: {
type: Array,
required: true,
default: function() {
return [];
}
}
},
data() {
return {
// 数据类型
typeList: ["VARCHAR", "DATE", "INT", "ARRAY"]
};
},
methods: {
add() {
this.$refs.form.validate(valid => {
if (valid) {
this.value.push({
fieldNameEn: "",
type: "",
des: "",
value: ""
});
this.$emit("input", this.value);
}
});
},
deleting(index) {
this.value.splice(index, 1);
},
changeName(value, item) {
item.fieldNameEn = value;
this.$emit("input", this.value);
},
changeType(value, item) {
item.type = value;
this.$emit("input", this.value);
},
changeDes(value, item) {
item.des = value;
this.$emit("input", this.value);
},
changeDefaultValue(value, item) {
item.value = value;
this.$emit("input", this.value);
}
}
};
</script>
<style lang="less">
.customVarible .btn {
margin-bottom: 6px;
margin-left: 10px;
}
.customVarible .el-form-item--small.el-form-item {
margin-bottom: 15px !important;
padding-top: 16px !important;
}
.customVarible .el-table__row td {
padding: 0 !important;
}
</style>
<template>
<!-- headers内容 -->
<el-form :model="{ value }" ref="form" class="headers">
<div>
<el-button type="primary" icon="plus" class="btn" @click="add">添加</el-button>
<el-table :data="value" height="370">
<el-table-column type="index" label="序号" width="70"></el-table-column>
<el-table-column label="名称">
<template slot-scope="scope">
<el-form-item
:prop="'value.' + scope.$index + '.name'"
:rules="[
{ required: true, message: '请输入名称' },
{ pattern: /^[\u4E00-\u9FA50-9a-zA-Z_\-.]+$/, message: '请勿输入特殊字符' }
]"
>
<el-input
show-word-limit
type="text"
placeholder="请输入名称"
:value="scope.row.name"
@input="changeName(...arguments, scope.row)"
maxlength="50"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="数据类型" width="150">
<template slot-scope="scope">
<el-select
:value="scope.row.dataType"
@input="changeType(...arguments, scope.row)"
placeholder="数据类型"
filterable
>
<el-option v-for="item in typeList" :key="item" :value="item"> </el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="必填" width="100">
<template slot-scope="scope">
<el-select
:value="scope.row.required"
@input="changeRequired(...arguments, scope.row)"
filterable
placeholder="必填"
>
<el-option value="1" label="是"></el-option>
<el-option value="0" label="否"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="说明">
<template slot-scope="scope">
<el-input
show-word-limit
type="text"
placeholder="说明"
:value="scope.row.des"
@input="changeDes(...arguments, scope.row)"
maxlength="100"
>
</el-input>
</template>
</el-table-column>
<el-table-column label="值">
<template slot-scope="scope">
<!-- 默认input -->
<el-input
show-word-limit
type="text"
maxlength="50"
placeholder="值"
v-if="['timestamp', 'time', 'date'].indexOf(scope.row.dataType) == -1"
:value="scope.row.defaultValue"
@input="changeDefaultValue(...arguments, scope.row)"
>
</el-input>
<!-- 默认日历插件 -->
<el-date-picker
type="date"
value-format="yyyy-MM-dd"
class="el-date"
v-else
:value="scope.row.defaultValue"
@input="changeDefaultValue(...arguments, scope.row)"
></el-date-picker>
</template>
</el-table-column>
<el-table-column label="删除" width="90">
<template slot-scope="scope">
<el-button @click.native.prevent="deleting(scope.$index)" type="text" size="small">
<i class="el-icon-delete"></i>&nbsp;&nbsp;删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</template>
<script>
export default {
props: {
value: {
type: Array,
required: true,
default: function() {
return [];
}
}
},
data() {
return {
// 数据类型
typeList: [
"string",
"int",
"object",
"char",
"short",
"long",
"float",
"double",
"boolean",
"byte",
"json",
"array",
"file",
"timestamp",
"time",
"date"
]
};
},
methods: {
add() {
this.$refs.form.validate(valid => {
if (valid) {
this.value.push({
name: "",
dataType: "",
required: "",
des: "",
defaultValue: ""
});
this.$emit("input", this.value);
}
});
},
deleting(index) {
this.value.splice(index, 1);
},
changeName(value, item) {
item.name = value;
this.$emit("input", this.value);
},
changeType(value, item) {
item.dataType = value;
this.$emit("input", this.value);
},
changeRequired(value, item) {
item.required = value;
this.$emit("input", this.value);
},
changeDes(value, item) {
item.des = value;
this.$emit("input", this.value);
},
changeDefaultValue(value, item) {
item.defaultValue = value;
this.$emit("input", this.value);
}
}
};
</script>
<style lang="less">
.headers .btn {
margin-bottom: 6px;
margin-left: 10px;
}
.headers .el-form-item--small.el-form-item {
margin-bottom: 15px !important;
padding-top: 16px !important;
}
.headers .el-table__row td {
padding: 0 !important;
}
</style>
<template>
<!-- query内容 -->
<el-form :model="{ value }" ref="form" class="query">
<div>
<el-button type="primary" icon="plus" class="btn" @click="add">添加</el-button>
<el-table :data="value" height="370">
<el-table-column type="index" label="序号" width="70"></el-table-column>
<el-table-column label="名称">
<template slot-scope="scope">
<el-form-item
:prop="'value.' + scope.$index + '.name'"
:rules="[
{ required: true, message: '请输入名称' },
{ pattern: /^[\u4E00-\u9FA50-9a-zA-Z_\-.]+$/, message: '请勿输入特殊字符' }
]"
>
<el-input
show-word-limit
type="text"
placeholder="请输入名称"
:value="scope.row.name"
@input="changeName(...arguments, scope.row)"
maxlength="50"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="数据类型" width="150">
<template slot-scope="scope">
<el-select
:value="scope.row.dataType"
@input="changeType(...arguments, scope.row)"
placeholder="数据类型"
filterable
>
<el-option v-for="item in typeList" :key="item" :value="item"> </el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="必填" width="100">
<template slot-scope="scope">
<el-select
:value="scope.row.required"
@input="changeRequired(...arguments, scope.row)"
filterable
placeholder="必填"
>
<el-option value="1" label="是"></el-option>
<el-option value="0" label="否"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="说明">
<template slot-scope="scope">
<el-input
show-word-limit
type="text"
placeholder="说明"
:value="scope.row.des"
@input="changeDes(...arguments, scope.row)"
maxlength="100"
>
</el-input>
</template>
</el-table-column>
<el-table-column label="值">
<template slot-scope="scope">
<!-- 默认input -->
<el-input
show-word-limit
type="text"
maxlength="50"
placeholder="值"
v-if="['timestamp', 'time', 'date'].indexOf(scope.row.dataType) == -1"
:value="scope.row.defaultValue"
@input="changeDefaultValue(...arguments, scope.row)"
>
</el-input>
<!-- 默认日历插件 -->
<el-date-picker
type="date"
value-format="yyyy-MM-dd"
class="el-date"
v-else
:value="scope.row.defaultValue"
@input="changeDefaultValue(...arguments, scope.row)"
></el-date-picker>
</template>
</el-table-column>
<el-table-column label="删除" width="90">
<template slot-scope="scope">
<el-button @click.native.prevent="deleting(scope.$index)" type="text" size="small">
<i class="el-icon-delete"></i>&nbsp;&nbsp;删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</template>
<script>
export default {
props: {
value: {
type: Array,
required: true,
default: function() {
return [];
}
}
},
data() {
return {
// 数据类型
typeList: [
"string",
"int",
"object",
"char",
"short",
"long",
"float",
"double",
"boolean",
"byte",
"json",
"array",
"file",
"timestamp",
"time",
"date"
]
};
},
methods: {
add() {
this.$refs.form.validate(valid => {
if (valid) {
this.value.push({
name: "",
dataType: "",
required: "",
des: "",
defaultValue: ""
});
this.$emit("input", this.value);
}
});
},
deleting(index) {
this.value.splice(index, 1);
},
changeName(value, item) {
item.name = value;
this.$emit("input", this.value);
},
changeType(value, item) {
item.dataType = value;
this.$emit("input", this.value);
},
changeRequired(value, item) {
item.required = value;
this.$emit("input", this.value);
},
changeDes(value, item) {
item.des = value;
this.$emit("input", this.value);
},
changeDefaultValue(value, item) {
item.defaultValue = value;
this.$emit("input", this.value);
}
}
};
</script>
<style lang="less">
.query .btn {
margin-bottom: 6px;
margin-left: 10px;
}
.query .el-form-item--small.el-form-item {
margin-bottom: 15px !important;
padding-top: 16px !important;
}
.query .el-table__row td {
padding: 0 !important;
}
</style>
<template>
<div class="reqBody">
<edit v-model="value" v-if="value.type == 'update'"></edit>
<unedit v-model="value" v-else></unedit>
</div>
</template>
<script>
import unedit from "./requestbodySet/unedit";
import edit from "./requestbodySet/edit";
export default {
components: {
unedit,
edit
},
props: {
value: {
type: Object,
required: true,
default: function() {
return {
set: [],
condition: [],
reqData: "",
type: ""
};
}
}
},
data() {
return {};
},
methods: {}
};
</script>
<style lang="less">
.reqBody .requestBody {
resize: none;
border: 1px solid #dde0e7;
border-radius: 5px;
outline: none;
}
</style>
<template>
<div>
<!--非编辑的配置 -->
<el-table :data="value.set" class="unedit" max-height="370">
<el-table-column label="选择" width="50" v-if="show">
<template slot="header" slot-scope="scope">
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
></el-checkbox>
</template>
<template slot-scope="scope">
<el-checkbox
:value="scope.row.flag"
@input="checkSet(...arguments, scope.row)"
:disabled="
scope.row.fieldNameEn == 'pageNum' ||
scope.row.fieldNameEn == 'pageSize' ||
scope.row.disabled
"
></el-checkbox>
</template>
</el-table-column>
<el-table-column type="index" label="序号" width="70"> </el-table-column>
<el-table-column label="中文名">
<template slot-scope="scope">
<el-input
show-word-limit
type="text"
placeholder="请输入中文名"
:value="scope.row.fieldNameCn || scope.row.fieldNameEn"
disabled
></el-input>
</template>
</el-table-column>
<el-table-column label="英文名">
<template slot-scope="scope">
<el-input
show-word-limit
type="text"
placeholder="请输入英文名"
:value="scope.row.fieldNameEn"
disabled
>
</el-input>
</template>
</el-table-column>
<el-table-column label="类型">
<template slot-scope="scope">
<el-input
show-word-limit
type="text"
placeholder="请输入类型"
:value="scope.row.type"
disabled
>
</el-input>
</template>
</el-table-column>
<el-table-column
label="条件"
v-if="
interfaceCode == 'findByPage' ||
interfaceCode == 'findByWhere' ||
interfaceCode == 'delete'
"
>
<template slot-scope="scope">
<el-select
:value="scope.row.operation"
placeholder="选择条件"
@input="changeOperation(...arguments, scope.row)"
filterable
:disabled="
!scope.row.flag ||
scope.row.fieldNameEn == 'pageNum' ||
scope.row.fieldNameEn == 'pageSize'
"
>
<el-option v-for="item in dbTypeList" :key="item" :value="item" :label="item">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="defaultValue" label="值" v-if="show">
<template slot-scope="scope">
<el-select
:value="scope.row.value"
filterable
placeholder="选择值"
:disabled="
!scope.row.flag ||
scope.row.fieldNameEn == 'pageNum' ||
scope.row.fieldNameEn == 'pageSize'
"
@input="changeValueSet(...arguments, scope.row)"
>
<el-option
v-for="item in valueList"
:key="item"
:value="'${' + item + '}'"
:label="'${' + item + '}'"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="值" v-else>
<template slot-scope="scope">
<!-- 默认input -->
<el-input
show-word-limit
type="text"
placeholder="默认值"
v-if="
['timestamp', 'time', 'date'].indexOf(scope.row.type.toLowerCase()) == -1 &&
scope.row.operation != 'between'
"
:value="scope.row.value"
@input="changeValue(...arguments, scope.row)"
>
</el-input>
<!-- 两个input -->
<el-input
show-word-limit
type="text"
placeholder="默认值"
v-if="
['timestamp', 'time', 'date'].indexOf(scope.row.type.toLowerCase()) == -1 &&
scope.row.operation == 'between'
"
:value="scope.row.value"
@input="changeValue(...arguments, scope.row)"
></el-input>
<el-input
show-word-limit
type="text"
placeholder="默认值"
v-if="
['timestamp', 'time', 'date'].indexOf(scope.row.type.toLowerCase()) == -1 &&
scope.row.operation == 'between'
"
:value="scope.row.values"
@input="changeValues(...arguments, scope.row)"
></el-input>
<!-- 默认日历插件 -->
<el-date-picker
type="date"
value-format="yyyy-MM-dd"
class="el-date"
v-if="
['timestamp', 'time', 'date'].indexOf(scope.row.type.toLowerCase()) != -1 &&
scope.row.operation != 'between'
"
:value="scope.row.value"
@input="changeValue(...arguments, scope.row)"
></el-date-picker>
<!-- 两个日历框 -->
<el-date-picker
type="date"
value-format="yyyy-MM-dd"
class="el-date"
v-if="
['timestamp', 'time', 'date'].indexOf(scope.row.type.toLowerCase()) != -1 &&
scope.row.operation == 'between'
"
:value="scope.row.value"
@input="changeValue(...arguments, scope.row)"
></el-date-picker>
<el-date-picker
type="date"
value-format="yyyy-MM-dd"
class="el-date"
v-if="
['timestamp', 'time', 'date'].indexOf(scope.row.type.toLowerCase()) != -1 &&
scope.row.operation == 'between'
"
:value="scope.row.values"
@input="changeValues(...arguments, scope.row)"
></el-date-picker>
</template>
</el-table-column>
</el-table>
<stms-ace-editor
v-model="reqData"
mode="json"
@input="changeReqData"
width="100%"
height="300px"
v-if="!show"
/>
</div>
</template>
<script>
export default {
props: {
value: {
type: Object,
required: true,
default: function() {
return {
set: [],
condition: [],
reqData: "",
type: ""
};
}
},
show: {
type: Boolean,
required: true,
default: function() {
return false;
}
},
interfaceCode: {
type: String,
required: true,
default: function() {
return "";
}
}
},
watch: {
value: {
handler(value) {
this.reqData = JSON.stringify(this.getReqBody(value.type, value.set), null, 4);
this.valueList = value.set.map(val => val.fieldNameEn);
},
immediate: true,
deep: true
}
},
mounted() {
this.reqData = JSON.stringify(this.getReqBody(this.value.type, this.value.set), null, 4);
},
data() {
return {
checkAll: false,
isIndeterminate: false,
reqData: "",
dbTypeList: [">", "=", "<", "like", "between"], // 条件
valueList: []
};
},
methods: {
handleCheckAllChange(val) {
this.isIndeterminate = false;
this.value.set.forEach(item => {
item.flag = val;
});
},
checkSet(value, item) {
item.flag = value;
let totalCount = this.value.set.length;
const someStatusCount = this.value.set.filter(v => v.flag === value).length;
this.checkAll = totalCount === someStatusCount ? value : !value;
this.isIndeterminate = someStatusCount > 0 && someStatusCount < totalCount;
this.$emit("input", this.value);
},
changeValueSet(value, item) {
item.value = value;
this.$emit("input", this.value);
},
changeOperation(value, item) {
item.operation = value;
this.$emit("input", this.value);
},
changeValue(value, item) {
item.value = value;
setTimeout(() => {
this.value.reqData = this.reqData;
});
this.$emit("input", this.value);
},
changeValues(value, item) {
item.values = value;
setTimeout(() => {
this.value.reqData = this.reqData;
});
this.$emit("input", this.value);
},
changeReqData() {
try {
const value = this.reqData;
this.value.reqData = value;
// this.$emit("input", value);
} catch (error) {}
},
//处理单表请求体
getReqBody(type, set) {
let reqResult = {};
const result = {};
if (set) {
set.forEach(node => {
if (node.operation == "between" && node.value && node.values) {
result[node.fieldNameEn || node.fieldNameCn] = `${node.value}~${node.values}`;
} else {
result[node.fieldNameEn || node.fieldNameCn] = node.value;
}
});
}
if (type == "findByPage") {
reqResult.pageNum = result.pageNum;
reqResult.pageSize = result.pageSize;
reqResult.condition = Object.keys(result).reduce((obj, key) => {
if (key != "pageNum" && key != "pageSize") {
obj[key] = result[key];
}
return obj;
}, {});
} else if (type == "insert") {
reqResult = result;
} else {
reqResult = result;
}
return reqResult;
}
}
};
</script>
<style lang="less"></style>
<template>
<!-- sql内容 -->
<el-form :model="{ value }" ref="form" class="query">
<stms-ace-editor :value="value" mode="mysql" @input="changeSql" width="100%" height="335px" />
</el-form>
</template>
<script>
export default {
name: "stms-api-design-sql",
props: {
value: {
type: String,
required: true,
default: function() {
return "";
}
}
},
data() {
return {};
},
methods: {
changeSql(value) {
this.value = value;
this.$emit("input", this.value);
}
}
};
</script>
<style lang="less"></style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="panelTitle">流程调用</div> <div class="panelTitle">流程调用</div>
<div class="panelBody"> <div class="panelBody">
<el-tabs v-model="tableName" class="tabsPadding"> <el-tabs v-model="tableName" class="tabsPadding">
<el-tab-pane label="调用流程" name="01"> </el-tab-pane> <el-tab-pane label="调用流程" name="01"></el-tab-pane>
</el-tabs> </el-tabs>
<div class="contentBody"> <div class="contentBody">
<div v-show="tableName == '01'"> <div v-show="tableName == '01'">
...@@ -23,40 +23,50 @@ ...@@ -23,40 +23,50 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="调用流程" prop="subProcessId"> <el-form-item label="调用流程" prop="subProcessId">
<el-select v-model="form.subProcessId" placeholder="选择调用流程" filterable> <!--<el-select-->
<el-option-group <!--v-model="form.subProcessId"-->
v-for="group in processList" <!--placeholder="选择调用流程"-->
:key="group.id" <!--filterable-->
:value="group.id" <!--@input="changesubProcess"-->
:label="group.name" <!--&gt;-->
> <!--<el-option-->
<el-option <!--v-for="group in processList"-->
v-for="item in group.children" <!--:key="group.id"-->
:key="item.id" <!--:value="group.id"-->
:value="item.id" <!--:label="group.name"-->
:label="item.status ? item.name : item.name + '(未部署)'" <!--&gt;-->
:disabled="item.status == false" <stms-dropdown-tree :data="processList" v-model="form.subProcessId" @input="changesubProcess" singleCheckbox>
> </stms-dropdown-tree>
</el-option> <!--</el-option>-->
</el-option-group> <!--</el-select>-->
</el-select>
</el-form-item>
<el-form-item>
<el-form-item label="输入" prop="inVariable">
<el-input type="text" placeholder="请输入" v-model="form.inVariable"></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item label="输出" prop="outVariable">
<el-input type="text" placeholder="请输入" v-model="form.outVariable"></el-input>
</el-form-item>
</el-form-item> </el-form-item>
<!--<el-form-item>-->
<!--<el-form-item label="输入" prop="inVariable">-->
<!--<el-input-->
<!--type="text"-->
<!--placeholder="请输入"-->
<!--v-model="form.inVariable"-->
<!--&gt;</el-input>-->
<!--</el-form-item>-->
<!--</el-form-item>-->
<!--<el-form-item>-->
<!--<el-form-item label="输出" prop="outVariable">-->
<!--<el-input-->
<!--type="text"-->
<!--placeholder="请输入"-->
<!--v-model="form.outVariable"-->
<!--&gt;</el-input>-->
<!--</el-form-item>-->
<!--</el-form-item>-->
</el-form> </el-form>
</div> </div>
<div class="bottom"> <div class="bottom">
<el-button type="primary" @click="submit" :disabled="deployStatus == 'deploy'" <el-button
>确定</el-button type="primary"
> @click="submit"
:disabled="deployStatus == 'deploy'"
>确定
</el-button>
<el-button type="info" @click="close">关闭</el-button> <el-button type="info" @click="close">关闭</el-button>
</div> </div>
</div> </div>
...@@ -65,9 +75,7 @@ ...@@ -65,9 +75,7 @@
</template> </template>
<script> <script>
import { import { queryAppWorkflow } from "../service";
getProcess // 获取调用数据
} from "../service";
export default { export default {
props: ["model", "deployStatus", "backList"], props: ["model", "deployStatus", "backList"],
...@@ -79,36 +87,35 @@ export default { ...@@ -79,36 +87,35 @@ export default {
form: { form: {
subProcessId: "", // 调用流程 subProcessId: "", // 调用流程
inVariable: "", // 输入 inVariable: "", // 输入
outVariable: "" // 输出 outVariable: "", // 输出
}, },
rules: { rules: {
subProcessId: [ subProcessId: [
{ {
required: true, required: true,
message: "请选择调用流程" message: "请选择调用流程",
} },
], ],
inVariable: [ inVariable: [
{ {
required: true, required: true,
message: "请输入" message: "请输入",
} },
], ],
outVariable: [ outVariable: [
{ {
required: true, required: true,
message: "请输入" message: "请输入",
} },
] ],
}, },
// 调用流程List // 调用流程List
processList: [] processList: [],
}; };
}, },
mounted() { mounted() {
// this.getProcess();
// 数据回填 // 数据回填
// this.queryBack(); this.queryWorkflow();
}, },
watch: { watch: {
backList(val) { backList(val) {
...@@ -116,27 +123,40 @@ export default { ...@@ -116,27 +123,40 @@ export default {
this.form.subProcessId = val.subProcessId; this.form.subProcessId = val.subProcessId;
this.form.inVariable = val.inVariable; this.form.inVariable = val.inVariable;
this.form.outVariable = val.outVariable; this.form.outVariable = val.outVariable;
} },
}, },
methods: { methods: {
// 传递节点名称给父组件 // 传递节点名称给父组件
changeNodeName(value) { changeNodeName(value) {
this.$emit("changeNodeName", "label", value); this.$emit("changeNodeName", "label", value);
}, },
// 获取所有调用流程 changesubProcess(value) {
async getProcess() { this.$emit("changesubProcess", "calledElement", value[0]);
const res = await getProcess();
this.processList = res.content;
}, },
async queryWorkflow() {
let res = await queryAppWorkflow({"deployStatus":"deploy"});
if (res.status == "success") {
this.processList = res.content
this.processList.forEach(value => {
value.disabled=true;
value.children.forEach(val =>{
val.disabled=true;
})
})
} else {
this.processList = [];
}
},
async submit() { async submit() {
const data = { const data = {
structure: JSON.stringify({ structure: JSON.stringify({
subProcessId: this.form.subProcessId, subProcessId: this.form.subProcessId,
inVariable: this.form.inVariable, inVariable: this.form.inVariable,
outVariable: this.form.outVariable outVariable: this.form.outVariable,
}) }),
}; };
this.$refs.form.validate(valid => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.$parent.save(data); this.$parent.save(data);
this.close(); this.close();
...@@ -147,8 +167,8 @@ export default { ...@@ -147,8 +167,8 @@ export default {
}, },
close() { close() {
this.model.clazz = ""; this.model.clazz = "";
} },
} },
}; };
</script> </script>
......
...@@ -39,17 +39,26 @@ ...@@ -39,17 +39,26 @@
:backList="backList" :backList="backList"
:deployStatus="deployStatus" :deployStatus="deployStatus"
@changeNodeName="onChangeName" @changeNodeName="onChangeName"
@changesubProcess="changesubProcess"
v-if="model.clazz == 'receiveTask'" v-if="model.clazz == 'receiveTask'"
/> />
<line_detail :model="model" @changeNodeName="onChangeName" v-if="model.clazz == 'flow'" /> <line_detail
<pool :model="model" @changeNodeName="onChangeName" v-if="model.clazz == 'pool'" /> :model="model"
@changeNodeName="onChangeName"
v-if="model.clazz == 'flow'"
/>
<pool
:model="model"
@changeNodeName="onChangeName"
v-if="model.clazz == 'pool'"
/>
</div> </div>
</template> </template>
<script> <script>
import { import {
save, // 保存 save, // 保存
queryBack // 回填 queryBack, // 回填
} from "./service"; } from "./service";
import start from "./start"; import start from "./start";
import end from "./end"; import end from "./end";
...@@ -67,12 +76,12 @@ export default { ...@@ -67,12 +76,12 @@ export default {
autoNode, autoNode,
callActivityNode, callActivityNode,
pool, pool,
line_detail line_detail,
}, },
props: ["model", "flowId", "deployStatus"], props: ["model", "flowId", "deployStatus"],
data() { data() {
return { return {
backList: {} backList: {},
}; };
}, },
watch: { watch: {
...@@ -80,18 +89,21 @@ export default { ...@@ -80,18 +89,21 @@ export default {
if (val.clazz) { if (val.clazz) {
this.queryBack(); this.queryBack();
} }
} },
}, },
methods: { methods: {
// 传递节点名称给父组件 // 传递节点名称给父组件
onChangeName(key, value) { onChangeName(key, value) {
this.$emit("onChangeName", key, value); this.$emit("onChangeName", key, value);
}, },
changesubProcess(key, value) {
this.$emit("onChangeName", key, value);
},
// 页面回填 // 页面回填
async queryBack() { async queryBack() {
const data = { const data = {
workflowId: this.flowId, workflowId: this.flowId,
nodeId: this.model.id nodeId: this.model.id,
}; };
const res = await queryBack(data); const res = await queryBack(data);
if (res.status == "success" && res.content.length > 0) { if (res.status == "success" && res.content.length > 0) {
...@@ -104,12 +116,12 @@ export default { ...@@ -104,12 +116,12 @@ export default {
const obj = { const obj = {
workflowId: this.flowId, workflowId: this.flowId,
nodeId: this.model.id, nodeId: this.model.id,
nodeName: this.model.label nodeName: this.model.label,
}; };
Object.assign(param, obj, data); Object.assign(param, obj, data);
const res = await save(param); const res = await save(param);
} },
} },
}; };
</script> </script>
......
import fetch from "@/utils/fetch"; import fetch from "@/utils/fetch";
// 插件节点保存 // 插件节点保存
export const save = data => fetch("/rest/bpm/processNodeDefinition/creating", data, "POST", true); export const save = (data) =>
fetch("/design/bpm/processNodeDefinition/creating", data, "POST", true);
// 插件配置回填 // 插件配置回填
export const queryBack = data => fetch("/rest/bpm/processNodeDefinition/byCondition", data, "POST"); export const queryBack = (data) =>
fetch("/design/bpm/processNodeDefinition/byCondition", data, "POST");
// 获取部门
export const getDepartment = data =>
fetch("/rest/bpm/workflowDefinition/findDepartmentInfoByAppId", data, "GET");
// 获取岗位
export const getstation = data =>
fetch("/rest/bpm/workflowDefinition/findPositionInfoByAppId", data, "GET");
// 获取业务账号 // 获取业务账号
export const getUsers = data => export const getUsers = (data) =>
fetch("/rest/bpm/workflowDefinition/findBussinessAccountInfoByAppId", data, "GET"); fetch(
"/design/bpm/workflowDefinition/findBussinessAccountInfoByAppId",
data,
"GET"
);
// 获取所有调用流程
export const getProcess = () => fetch("/rest/processmanager/processDefinition/getDetailAll", {},
"GET");
//获取参数 //获取参数
export const queryVariables = data => fetch("/rest/bpm/bpmVar/byCondition", data, "POST"); export const queryVariables = (data) =>
fetch("/design/bpm/bpmVar/byCondition", data, "POST");
//获取账号组 //获取账号组
export const queryUserGroupList = () => fetch("/sso/identity/businessAccountGroup/byAll", {}, "GET"); export const queryUserGroupList = (data) =>
fetch("/design/bpm/workflowDefinition/queryGroup", data, "GET");
//查询流程
export const queryWorkflow = (data) =>
fetch("/design/bpm/workflowDefinition/byCondition", data, "POST");
export const queryAppWorkflow = data=> fetch("/design/bpm/workflowDefinition/queryAppWorkflow", data, "POST");
//获取公司
export const getCompany = (data) => fetch("/sso/identity/appBusinessAccount/listOrganizationsByAppId", data, "GET");
// 获取部门
export const getDepartment = (data) => fetch("/sso/identity/appBusinessAccount/listDepartmentsByAppId", data, "GET");
// 获取岗位
export const getStation = data => fetch("/sso/identity/appBusinessAccount/listStationsByAppId", data, "GET");
// 获取用户
export const getUser = data =>
fetch("/sso/identity/appBusinessAccount/listBusinessAccountsByAppIdAndStationId", data, "GET");
// 获取用户
export const lazyNode = data =>
fetch("/sso/identity/appBusinessAccount/lazyNode", data, "GET");
export const getDepartmentCon = data => fetch("/sso/identity/department/byCondition", data, "POST");
\ No newline at end of file
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
.el-form-item { .el-form-item {
margin-bottom: 18px; margin-bottom: 18px;
} }
.el-input-number--small {
margin-top: 10px;
}
} }
.autoNode, .autoNode,
.callActivityNode { .callActivityNode {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
import {} from "../service"; import {} from "../service";
export default { export default {
props: ["model", "flowId"], props: ["model"],
data() { data() {
return { return {
form: {}, form: {},
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
model.clazz == 'db_findById' || model.clazz == 'db_findById' ||
model.clazz == 'db_findByPage' || model.clazz == 'db_findByPage' ||
model.clazz == 'db_findByWhere' || model.clazz == 'db_findByWhere' ||
model.clazz == 'db_bySql' model.clazz == 'db_bySql' ||
model.clazz == 'db_findPageBySql',
}" }"
> >
<startAndEnd <startAndEnd
...@@ -40,7 +41,8 @@ ...@@ -40,7 +41,8 @@
model.clazz == 'db_findById' || model.clazz == 'db_findById' ||
model.clazz == 'db_findByPage' || model.clazz == 'db_findByPage' ||
model.clazz == 'db_findByWhere' || model.clazz == 'db_findByWhere' ||
model.clazz == 'db_bySql' model.clazz == 'db_bySql' ||
model.clazz == 'db_findPageBySql'
" "
/> />
<restful <restful
...@@ -75,6 +77,14 @@ ...@@ -75,6 +77,14 @@
@changeNodeName="onChangeName" @changeNodeName="onChangeName"
v-if="model.clazz == 'rule_mq'" v-if="model.clazz == 'rule_mq'"
/> />
<rule_email
:vars="vars"
:model="model"
:backList="backList"
:inAndOutvar="inAndOutvar"
@changeNodeName="onChangeName"
v-if="model.clazz == 'rule_email'"
/>
<rule_drools <rule_drools
:vars="vars" :vars="vars"
:model="model" :model="model"
...@@ -107,7 +117,6 @@ ...@@ -107,7 +117,6 @@
:model="model" :model="model"
:backList="backList" :backList="backList"
:inAndOutvar="inAndOutvar" :inAndOutvar="inAndOutvar"
:flowId="flowId"
@changeNodeName="onChangeName" @changeNodeName="onChangeName"
v-if="model.clazz == 'flow'" v-if="model.clazz == 'flow'"
/> />
...@@ -121,9 +130,10 @@ ...@@ -121,9 +130,10 @@
/> />
<common_name <common_name
:model="model" :model="model"
:flowId="flowId"
@changeNodeName="onChangeName" @changeNodeName="onChangeName"
v-if="model.clazz == 'exclusiveGateway' || model.clazz == 'inclusiveGateway'" v-if="
model.clazz == 'exclusiveGateway' || model.clazz == 'inclusiveGateway'
"
/> />
</div> </div>
</template> </template>
...@@ -131,7 +141,7 @@ ...@@ -131,7 +141,7 @@
<script> <script>
import { import {
save, // 保存 save, // 保存
queryBack // 回填 queryBack, // 回填
} from "./service"; } from "./service";
import startAndEnd from "./startAndEnd"; import startAndEnd from "./startAndEnd";
import db_common from "./db_common"; import db_common from "./db_common";
...@@ -139,6 +149,7 @@ import restful from "./restful"; ...@@ -139,6 +149,7 @@ import restful from "./restful";
import rule_java from "./rule_java"; import rule_java from "./rule_java";
import rule_module from "./rule_module"; import rule_module from "./rule_module";
import rule_mq from "./rule_mq"; import rule_mq from "./rule_mq";
import rule_email from "./rule_email";
import rule_drools from "./rule_drools"; import rule_drools from "./rule_drools";
import bpm_detail from "./bpm_detail"; import bpm_detail from "./bpm_detail";
import line_detail from "./line_detail"; import line_detail from "./line_detail";
...@@ -152,17 +163,18 @@ export default { ...@@ -152,17 +163,18 @@ export default {
rule_java, rule_java,
rule_module, rule_module,
rule_mq, rule_mq,
rule_email,
rule_drools, rule_drools,
bpm_detail, bpm_detail,
line_detail, line_detail,
subProcess, subProcess,
common_name common_name,
}, },
props: ["model", "flowId", "vars"], props: ["model", "flowId", "vars"],
data() { data() {
return { return {
backList: {}, backList: {},
inAndOutvar: {} inAndOutvar: {},
}; };
}, },
watch: { watch: {
...@@ -170,7 +182,7 @@ export default { ...@@ -170,7 +182,7 @@ export default {
if (val.clazz) { if (val.clazz) {
this.queryBack(); this.queryBack();
} }
} },
}, },
created() {}, created() {},
methods: { methods: {
...@@ -180,9 +192,11 @@ export default { ...@@ -180,9 +192,11 @@ export default {
}, },
// 页面回填 // 页面回填
async queryBack() { async queryBack() {
console.log("queryBack");
const data = { const data = {
restfulId: this.flowId, restfulId: this.flowId,
pluginId: this.model.id pluginId: this.model.id,
}; };
const res = await queryBack(data); const res = await queryBack(data);
if (res.status == "success") { if (res.status == "success") {
...@@ -199,12 +213,12 @@ export default { ...@@ -199,12 +213,12 @@ export default {
restfulId: this.flowId, restfulId: this.flowId,
pluginId: this.model.id, pluginId: this.model.id,
pluginName: this.model.label, pluginName: this.model.label,
type: this.model.clazz type: this.model.clazz,
}; };
Object.assign(param, obj, data); Object.assign(param, obj, data);
const res = await save(param); const res = await save(param);
} },
} },
}; };
</script> </script>
......
...@@ -63,13 +63,21 @@ ...@@ -63,13 +63,21 @@
export default { export default {
props: ["model", "backList", "inAndOutvar", "vars"], props: ["model", "backList", "inAndOutvar", "vars"],
watch: { watch: {
model() {
this.form = {
dataInVar: "", //输入变量
conditionType: "", //表达式类型
condition: "", //表达式
type: "condition" //线类型
};
},
backList(val) { backList(val) {
this.form.conditionType = val.conditionType; this.form.conditionType = val.conditionType;
this.form.condition = val.condition; this.form.condition = val.condition;
this.form.type = val.type; this.form.type = val.type;
}, },
inAndOutvar(val) { inAndOutvar(val) {
this.form.dataInVar = val.dataInVar; this.form.dataInVar = val && val.dataInVar;
} }
}, },
data() { data() {
......
import fetch from "@/utils/fetch"; import fetch from "@/utils/fetch";
// 插件节点保存 // 插件节点保存
export const save = data => fetch("/rest/develop/pluginParam/creating", data, "POST", true); export const save = data => fetch("/design/develop/pluginParam/creating", data, "POST", true);
// 插件配置回填 // 插件配置回填
export const queryBack = data => fetch("/rest/develop/pluginParam/byCondition", data, "POST"); export const queryBack = data => fetch("/design/develop/pluginParam/byCondition", data, "POST");
// 获取本系统下所有bpm流程 // 获取本系统下所有bpm流程
export const getBpmWorkflow = data => fetch("/rest/bpm/workflowType/getWorkflowTree", data, "GET"); export const getBpmWorkflow = data => fetch("/design/bpm/workflowType/getWorkflowTree", data, "GET");
// 获取所有服务 // 获取所有服务
export const getAllRestful = data => fetch("/rest/develop/apiRestful/getRestfulTree", data, "GET"); export const getAllRestful = data => fetch("/design/develop/apiRestful/getRestfulTree", data, "GET");
//获取可导入表 //获取可导入表
export const getTable = data => fetch("/rest/sgw/d2aTable/byCondition", data, "POST"); export const getTable = data => fetch("/design/sgw/d2aTable/byCondition", data, "POST");
//业务表选择查询对应表下字段 //业务表选择查询对应表下字段
export const checkField = data => fetch("/rest/sgw/d2aFields/byCondition", data, "POST"); export const checkField = data => fetch("/design/sgw/d2aFields/byCondition", data, "POST");
//获取业务KEY
export const getSubscribe = data => fetch("/design/messagecenter/messageSubscribe/byCondition", data, "POST");
//获取主题
export const getTopic = data => fetch("/design/messagecenter/messageTopic/byCondition", data, "POST");
// 获取javaModule方法 // 获取javaModule方法
export const getJarTree = data => export const getJarTree = data =>
fetch("/rest/console/repomoduletyperestserver/jarTree", data, "GET"); fetch("/design/console/repomoduletyperestserver/jarTree", data, "GET");
//获取数据库下拉 //获取数据库下拉
export const getDb = data => fetch("/rest/sgw/d2aDataBase/byCondition", data, "POST"); export const getDb = data => fetch("/design/sgw/d2aDataBase/byCondition", data, "POST");
//获取dbId //获取dbId
export const getDbId = data => fetch(`/rest/sgw/d2aTableRestful/${data.id}`, data, "GET"); export const getDbId = data => fetch(`/design/sgw/d2aTableRestful/${data.id}`, data, "GET");
//获取规则分类 //获取规则分类
export const findRuleType = data => export const findRuleType = data =>
fetch("/rest/console/repomoduletyperestserver/byCondition", data, "POST"); fetch("/design/console/repomoduletyperestserver/byCondition", data, "POST");
export const findRule = data => fetch("/rest/develop/ruleScript/byCondition", data, "POST"); export const findRule = data => fetch("/design/rule/ruleScript/byCondition", data, "POST");
...@@ -26,6 +26,13 @@ export default function(G6) { ...@@ -26,6 +26,13 @@ export default function(G6) {
cursor: "default", cursor: "default",
opacity: 0.0 opacity: 0.0
}, },
labelCfg: {
style: {
fontSize: 18,
},
offset: -38,
position: 'left',
},
stateStyles: { stateStyles: {
selected: { selected: {
fill: "#E7F7FE" fill: "#E7F7FE"
......
...@@ -39,13 +39,8 @@ ...@@ -39,13 +39,8 @@
"type": "userTask", "type": "userTask",
"icon": "user-task", "icon": "user-task",
"size": "80*44" "size": "80*44"
}, { },
"name": "自动节点", {
"id": "2-2",
"type": "mailTask",
"icon": "mail-task",
"size": "80*44"
}, {
"name": "流程调用", "name": "流程调用",
"id": "2-3", "id": "2-3",
"type": "receiveTask", "type": "receiveTask",
......
...@@ -54,6 +54,8 @@ export function getShapeName(clazz) { ...@@ -54,6 +54,8 @@ export function getShapeName(clazz) {
return "db-findByWhere-node"; return "db-findByWhere-node";
case "db_bySql": case "db_bySql":
return "db-bySql-node"; return "db-bySql-node";
case "db_findPageBySql":
return "db-findPageBySql-node";
case "restful": case "restful":
return "restful-node"; return "restful-node";
case "rule_java": case "rule_java":
...@@ -62,6 +64,8 @@ export function getShapeName(clazz) { ...@@ -62,6 +64,8 @@ export function getShapeName(clazz) {
return "rule-moudule-node"; return "rule-moudule-node";
case "rule_mq": case "rule_mq":
return "rule-mq-node"; return "rule-mq-node";
case "rule_email":
return "rule-email-node";
case "rule_drools": case "rule_drools":
return "rule-drools-node"; return "rule-drools-node";
case "bpm_start": case "bpm_start":
......
This diff is collapsed.
This diff is collapsed.
import fetch from "@/utils/fetch"; import fetch from "@/utils/fetch";
// 流程过程图保存 // 流程过程图保存
export const save = data => fetch("/rest/develop/restful/saveProcess", data, "POST"); export const save = data => fetch("/design/develop/restful/saveProcess", data, "POST");
// 插件配置回填 // 插件配置回填
export const deletePlugin = data => fetch("/rest/develop/pluginParam/deletePlugin", data, "GET"); export const deletePlugin = data => fetch("/design/develop/pluginParam/deletePlugin", data, "GET");
// 调试接口回填 // 调试接口回填
export const queryBack = data => fetch("/rest/develop/pluginParam/byCondition", data, "POST"); export const queryBack = data => fetch("/design/develop/pluginParam/byCondition", data, "POST");
//基础接口测试接口 //基础接口测试接口
export const baseInterfaceTest = data => fetch(`/rest${data.url}`, data, 'POST'); export const baseInterfaceTest = data => fetch(`/develop${data.url}`, data, 'POST');
//根据表格当前数据查询nodes(调试功能数据不退出有bug导致) //根据表格当前数据查询nodes(调试功能数据不退出有bug导致)
export const queryNodes = data => fetch(`/rest/develop/apiRestful/${data.id}`); export const queryNodes = data => fetch(`/design/develop/apiRestful/${data.id}`);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
//工具类
import util from '@/utils/common'
Vue.prototype.$ = util
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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