sohelp-eleplus 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/cache/DictCache.js +58 -0
- package/cache/ModuleCache.js +352 -0
- package/components.js +45 -0
- package/core-export.js +4 -0
- package/http/CrudHttp.js +115 -0
- package/http/DictHttp.js +12 -0
- package/http/ModuleHttp.js +68 -0
- package/http/SohelpHttp.js +125 -0
- package/index.js +6 -0
- package/installer.js +8 -0
- package/lang/en_US.js +4 -0
- package/lang/zh_CN.js +4 -0
- package/lang/zh_TW.js +4 -0
- package/package.json +9 -0
- package/sohelp-ace-editor/index.vue +198 -0
- package/sohelp-application-select/index.vue +15 -0
- package/sohelp-autocode/index.vue +53 -0
- package/sohelp-calendar-view/index.vue +11 -0
- package/sohelp-card-view/index.vue +11 -0
- package/sohelp-condition/index.vue +210 -0
- package/sohelp-cry-input/index.vue +64 -0
- package/sohelp-date/index.vue +27 -0
- package/sohelp-datetime/index.vue +44 -0
- package/sohelp-datetime-picker/index.vue +86 -0
- package/sohelp-datetime-range/index.vue +59 -0
- package/sohelp-dict/index.vue +207 -0
- package/sohelp-dict/props.js +68 -0
- package/sohelp-drawer/index.vue +31 -0
- package/sohelp-drop-card/index.vue +94 -0
- package/sohelp-drop-card/props.js +68 -0
- package/sohelp-dyn-select/index.vue +99 -0
- package/sohelp-dyn-select/props.js +67 -0
- package/sohelp-dyn-tree/index.vue +82 -0
- package/sohelp-dyn-tree-select/index.vue +114 -0
- package/sohelp-entity-form/index.vue +524 -0
- package/sohelp-entity-grid/index.vue +30 -0
- package/sohelp-file-upload/index.vue +218 -0
- package/sohelp-filter-scheme/components/condition.vue +102 -0
- package/sohelp-filter-scheme/components/filter.vue +45 -0
- package/sohelp-filter-scheme/components/keywords.vue +15 -0
- package/sohelp-filter-scheme/components/scheme.vue +49 -0
- package/sohelp-filter-scheme/index.vue +113 -0
- package/sohelp-grid/SohelpGridConfig.js~ +408 -0
- package/sohelp-grid/components/filter-condition-item.vue +298 -0
- package/sohelp-grid/index.vue +1886 -0
- package/sohelp-grid/js/ConditionType.js +101 -0
- package/sohelp-grid/js/DefaultGridOptions.js +141 -0
- package/sohelp-grid/js/DefaultProps.js +27 -0
- package/sohelp-grid/js/SohelpConfigFunction.js +0 -0
- package/sohelp-grid/js/SohelpGridConfig.js +101 -0
- package/sohelp-grid/js/useSohelpGridConfig.js +519 -0
- package/sohelp-grid-select/index.vue +245 -0
- package/sohelp-grid-view/filter/config/grid-filter-condition.vue +221 -0
- package/sohelp-grid-view/filter/config/grid-filter-config.vue +27 -0
- package/sohelp-grid-view/filter/config/grid-filter-field.vue +378 -0
- package/sohelp-grid-view/filter/config/grid-filter-keywords.vue +310 -0
- package/sohelp-grid-view/filter/config/grid-filter-list.vue +313 -0
- package/sohelp-grid-view/filter/config/grid-filter-scheme.vue +264 -0
- package/sohelp-grid-view/filter/config/grid-filter-sort.vue +310 -0
- package/sohelp-grid-view/filter/config/index.vue +206 -0
- package/sohelp-grid-view/filter/filter-form.vue +427 -0
- package/sohelp-grid-view/filter/filter-toolbar.vue +110 -0
- package/sohelp-grid-view/filter/index.vue +160 -0
- package/sohelp-grid-view/index.vue +379 -0
- package/sohelp-grid-view-select/index.vue +141 -0
- package/sohelp-group-view/index.vue +11 -0
- package/sohelp-icon-select/index.vue +96 -0
- package/sohelp-icon-select/vxeui-icon.js +90 -0
- package/sohelp-image-upload/index.vue +286 -0
- package/sohelp-input/index.vue +39 -0
- package/sohelp-modal/index.vue +49 -0
- package/sohelp-module/index.vue +54 -0
- package/sohelp-module/useModalManager.js +89 -0
- package/sohelp-module/useSohelpModule.js +66 -0
- package/sohelp-number-input/index.vue +32 -0
- package/sohelp-number-range/index.vue +135 -0
- package/sohelp-org-select/index.vue +30 -0
- package/sohelp-org-tree/index.vue +18 -0
- package/sohelp-org-tree-select/index.vue +93 -0
- package/sohelp-org-user-tree/index.vue +26 -0
- package/sohelp-org-user-tree-select/index.vue +11 -0
- package/sohelp-pagination/index.vue +11 -0
- package/sohelp-power/index.vue +105 -0
- package/sohelp-pro-form/components/pro-form-footer.vue +44 -0
- package/sohelp-pro-form/components/pro-form-item.vue +1133 -0
- package/sohelp-pro-form/index.vue +257 -0
- package/sohelp-pro-form/util.js +140 -0
- package/sohelp-pro-layout/index.vue +11 -0
- package/sohelp-pro-table/index.vue +14 -0
- package/sohelp-process/index.vue +216 -0
- package/sohelp-rate/index.vue +56 -0
- package/sohelp-rate/props.js +71 -0
- package/sohelp-relation/index.vue +11 -0
- package/sohelp-rich-text/index.vue +242 -0
- package/sohelp-rich-text/util.js +231 -0
- package/sohelp-richtext/index.vue +10 -0
- package/sohelp-role-select/index.vue +33 -0
- package/sohelp-search/components/search-config.vue +0 -0
- package/sohelp-search/index.vue +49 -0
- package/sohelp-search-pro-form/index.vue +11 -0
- package/sohelp-select/index.vue +120 -0
- package/sohelp-split-panel/index.vue +15 -0
- package/sohelp-switch/index.vue +56 -0
- package/sohelp-table/index.vue +151 -0
- package/sohelp-tenant-select/index.vue +128 -0
- package/sohelp-text/index.vue +14 -0
- package/sohelp-textarea-input/index.vue +36 -0
- package/sohelp-time/index.vue +10 -0
- package/sohelp-tree/index.vue +37 -0
- package/sohelp-tree-select/index.vue +18 -0
- package/sohelp-user-select/index.vue +44 -0
- package/sohelp-user-select/index.vue~ +53 -0
- package/sohelp-user-select/props.js +71 -0
- package/sohelp-user-tag/index.vue +12 -0
- package/sohelp-user-tree/index.vue +11 -0
- package/sohelp-vform-drawer/index.vue +40 -0
- package/sohelp-vform-eleplus/favicon.ico +0 -0
- package/sohelp-vform-eleplus/index.vue +297 -0
- package/sohelp-vform-eleplus/preview.html +91 -0
- package/sohelp-vform-eleplus/render.es.js +72433 -0
- package/sohelp-vform-eleplus/render.style.css +16 -0
- package/sohelp-vform-eleplus/render.umd.js +57 -0
- package/sohelp-vform-eleplus/tinymce/langs/zh_CN.js +462 -0
- package/sohelp-vform-eleplus/tinymce/langs/zh_TW.js +419 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.css +72 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/default/content.css +67 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/default/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/document/content.css +72 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/document/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.css +68 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.css +732 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.css +726 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.css +29 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.css +3047 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.css +714 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.css +3047 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
- package/sohelp-vform-modal/index.vue +41 -0
- package/sohelp-vform-select/index.vue +11 -0
- package/sohelp-vform-vant/favicon.ico +0 -0
- package/sohelp-vform-vant/render.es.js +14608 -0
- package/sohelp-vform-vant/render.style.css +1 -0
- package/sohelp-vform-vant/render.umd.js +22 -0
- package/sohelp-vxe-grid/DefaultGridOptions.js +102 -0
- package/sohelp-vxe-grid/DefaultProps.js +37 -0
- package/sohelp-vxe-grid/SohelpGridConfig.js +142 -0
- package/sohelp-vxe-grid/index.vue +518 -0
- package/sohelp-vxe-grid-select/index.vue +148 -0
- package/sohelp-vxe-table/index.vue +184 -0
- package/sohelp-workflow/index.vue +495 -0
- package/sohelp-workflow/nodeWrap.vue +53 -0
- package/sohelp-workflow/nodes/addNode.vue +27 -0
- package/sohelp-workflow/nodes/approver.vue +125 -0
- package/sohelp-workflow/nodes/branch.vue +434 -0
- package/sohelp-workflow/nodes/promoter.vue +80 -0
- package/sohelp-workflow/nodes/send.vue +95 -0
- package/sohelp-workflow-drawer/components/approval-modal.vue +182 -0
- package/sohelp-workflow-drawer/components/draw-box.vue +141 -0
- package/sohelp-workflow-drawer/components/form.vue +79 -0
- package/sohelp-workflow-drawer/components/table.vue +153 -0
- package/sohelp-workflow-drawer/components/timeline.vue +189 -0
- package/sohelp-workflow-drawer/components/workflow.vue +68 -0
- package/sohelp-workflow-drawer/index.vue +311 -0
- package/sohelp-workflow-drawer/js/index.js +119 -0
- package/style/index.scss +0 -0
- package/utils/ProFormConvertUtil.js +76 -0
- package/utils/core.js +310 -0
- package/utils/use-form-data.js +48 -0
- package/utils/use-mobile.js +43 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vxe-table
|
|
3
|
+
border
|
|
4
|
+
show-overflow
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
:edit-config="{ trigger: 'click', mode: 'cell' }"
|
|
7
|
+
:data="datasource.results"
|
|
8
|
+
ref="sohelpVxeTableRef"
|
|
9
|
+
>
|
|
10
|
+
<vxe-column type="drag" title="" width="50" align="center" v-if="drag">
|
|
11
|
+
<ele-text :icon="DragOutlined" class="drag-btn"></ele-text>
|
|
12
|
+
</vxe-column>
|
|
13
|
+
<vxe-column type="seq" width="70"></vxe-column>
|
|
14
|
+
<vxe-column
|
|
15
|
+
v-for="item in columns"
|
|
16
|
+
:field="item.name"
|
|
17
|
+
:title="item.header"
|
|
18
|
+
:edit-render="getEditor(item)"
|
|
19
|
+
:key="item.name"
|
|
20
|
+
></vxe-column>
|
|
21
|
+
<vxe-pager
|
|
22
|
+
v-model:currentPage="page"
|
|
23
|
+
v-model:pageSize="limit"
|
|
24
|
+
:total="datasource.total"
|
|
25
|
+
@page-change="reload"
|
|
26
|
+
>
|
|
27
|
+
</vxe-pager>
|
|
28
|
+
</vxe-table>
|
|
29
|
+
</template>
|
|
30
|
+
<script>
|
|
31
|
+
import { reactive, ref, nextTick } from 'vue';
|
|
32
|
+
import { EleMessage } from '@/components/ele-admin-plus/components';
|
|
33
|
+
import { DragOutlined } from '@/components/icons';
|
|
34
|
+
import Sortable from 'sortablejs';
|
|
35
|
+
import {moduleCache} from '../cache/ModuleCache';
|
|
36
|
+
|
|
37
|
+
export default {
|
|
38
|
+
name: 'SohelpVxeTable',
|
|
39
|
+
extends: [],
|
|
40
|
+
props: {
|
|
41
|
+
/**网格列表配置ID*/
|
|
42
|
+
refid: {
|
|
43
|
+
type: String,
|
|
44
|
+
defaultValue: '',
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
/**数据源URL**/
|
|
48
|
+
url: {
|
|
49
|
+
type: String,
|
|
50
|
+
defaultValue: ''
|
|
51
|
+
},
|
|
52
|
+
/**数据源URL**/
|
|
53
|
+
where: {
|
|
54
|
+
type: Object,
|
|
55
|
+
defaultValue: {}
|
|
56
|
+
},
|
|
57
|
+
drag: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
setup(props, { emits }) {
|
|
63
|
+
/**列表实例*/
|
|
64
|
+
const sohelpVxeTableRef = ref(null);
|
|
65
|
+
/**存储表格配置*/
|
|
66
|
+
const sohelpConfig = reactive({});
|
|
67
|
+
const page = ref(1);
|
|
68
|
+
const limit = ref(20);
|
|
69
|
+
const loadOnCreated = ref(false);
|
|
70
|
+
const sortable = ref(null);
|
|
71
|
+
|
|
72
|
+
/**定义数据源**/
|
|
73
|
+
const datasource = reactive({
|
|
74
|
+
total: 0,
|
|
75
|
+
results: []
|
|
76
|
+
});
|
|
77
|
+
const columns = reactive([]);
|
|
78
|
+
/**根据配置列转成ProTable格式的列*/
|
|
79
|
+
const switchProperty = (property) => {
|
|
80
|
+
return {
|
|
81
|
+
name: property.name,
|
|
82
|
+
header: property.label,
|
|
83
|
+
width: property.with || 100,
|
|
84
|
+
edit: property.edit,
|
|
85
|
+
editor:property.editor
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/***初始化网格列表配置**/
|
|
90
|
+
const initProTableConfiguration = () => {
|
|
91
|
+
props.drag && rowDrop()
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**获取列表配置*/
|
|
95
|
+
moduleCache.getGrid(props.refid).then((data) => {
|
|
96
|
+
if(!data){
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
Object.assign(sohelpConfig, { ...data });
|
|
100
|
+
//初始化属性列表配置
|
|
101
|
+
data.properties.map((property) => {
|
|
102
|
+
columns.push(switchProperty(property));
|
|
103
|
+
});
|
|
104
|
+
/**添加操作列**/
|
|
105
|
+
columns.push({
|
|
106
|
+
columnKey: 'action',
|
|
107
|
+
label: '操作',
|
|
108
|
+
width: 200,
|
|
109
|
+
align: 'center',
|
|
110
|
+
slot: 'action'
|
|
111
|
+
});
|
|
112
|
+
//初始化表格配置
|
|
113
|
+
initProTableConfiguration();
|
|
114
|
+
loadOnCreated.value = true;
|
|
115
|
+
reload();
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
const reload = async () => {
|
|
119
|
+
if (!loadOnCreated.value) {
|
|
120
|
+
Object.assign(datasource, { total: 0, results: [] });
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const res = await SohelpHttp.get(
|
|
124
|
+
props.url || sohelpConfig.requestValue,
|
|
125
|
+
{
|
|
126
|
+
page,
|
|
127
|
+
limit,
|
|
128
|
+
...props.where
|
|
129
|
+
}
|
|
130
|
+
).catch((e) => {
|
|
131
|
+
EleMessage.error(e.message);
|
|
132
|
+
});
|
|
133
|
+
Object.assign(datasource, { ...res.data });
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const getEditor = (item) =>{
|
|
137
|
+
if(item.edit){
|
|
138
|
+
return {'name':'input'}
|
|
139
|
+
}else{
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// 行拖拽
|
|
146
|
+
const rowDrop = () => {
|
|
147
|
+
nextTick(() => {
|
|
148
|
+
const xGTable = sohelpVxeTableRef.value;
|
|
149
|
+
sortable.value = Sortable.create(
|
|
150
|
+
xGTable.$el.querySelector('.body--wrapper>.vxe-table--body tbody'),
|
|
151
|
+
{
|
|
152
|
+
handle: '.drag-btn',
|
|
153
|
+
onEnd: ({ newIndex, oldIndex }) => {}
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
page,
|
|
161
|
+
limit,
|
|
162
|
+
reload,
|
|
163
|
+
getEditor,
|
|
164
|
+
loadOnCreated,
|
|
165
|
+
datasource,
|
|
166
|
+
sohelpVxeTableRef,
|
|
167
|
+
columns,
|
|
168
|
+
DragOutlined
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
</script>
|
|
173
|
+
|
|
174
|
+
<style scoped>
|
|
175
|
+
.drag-btn {
|
|
176
|
+
cursor: move;
|
|
177
|
+
font-size: 12px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:deep(.vxe-body--row.sortable-ghost),
|
|
181
|
+
:deep(.vxe-body--row.sortable-chosen) {
|
|
182
|
+
background-color: #dfecfb;
|
|
183
|
+
}
|
|
184
|
+
</style>
|
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sc-workflow-design">
|
|
3
|
+
<div class="box-scale">
|
|
4
|
+
<node-wrap v-if="nodeConfig" v-model="nodeConfig"></node-wrap>
|
|
5
|
+
<div class="end-node">
|
|
6
|
+
<div class="end-node-circle"></div>
|
|
7
|
+
<div class="end-node-text">流程结束</div>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import nodeWrap from './nodeWrap.vue';
|
|
15
|
+
export default {
|
|
16
|
+
name: 'SohelpWorkflow',
|
|
17
|
+
props: {
|
|
18
|
+
modelValue: { type: Object, default: () => {} }
|
|
19
|
+
},
|
|
20
|
+
components: {
|
|
21
|
+
nodeWrap
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
nodeConfig: this.modelValue,
|
|
26
|
+
selectVisible: false
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
watch: {
|
|
30
|
+
modelValue(val) {
|
|
31
|
+
this.nodeConfig = val;
|
|
32
|
+
},
|
|
33
|
+
nodeConfig(val) {
|
|
34
|
+
this.$emit('update:modelValue', val);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style lang="scss">
|
|
41
|
+
.sc-workflow-design {
|
|
42
|
+
width: 100%;
|
|
43
|
+
overflow-y: auto;
|
|
44
|
+
}
|
|
45
|
+
.sc-workflow-design .box-scale {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
position: relative;
|
|
48
|
+
width: 100%;
|
|
49
|
+
align-items: flex-start;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
min-width: min-content;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.sc-workflow-design {
|
|
56
|
+
.node-wrap {
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
width: 100%;
|
|
59
|
+
flex-flow: column wrap;
|
|
60
|
+
justify-content: flex-start;
|
|
61
|
+
align-items: center;
|
|
62
|
+
padding: 0px 0px;
|
|
63
|
+
position: relative;
|
|
64
|
+
z-index: 1;
|
|
65
|
+
}
|
|
66
|
+
.node-wrap-box {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
position: relative;
|
|
70
|
+
width: 220px;
|
|
71
|
+
min-height: 72px;
|
|
72
|
+
flex-shrink: 0;
|
|
73
|
+
background: rgb(255, 255, 255);
|
|
74
|
+
border-radius: 6px;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
|
|
77
|
+
}
|
|
78
|
+
.node-wrap-box::before {
|
|
79
|
+
content: '';
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: -12px;
|
|
82
|
+
left: 50%;
|
|
83
|
+
transform: translateX(-50%);
|
|
84
|
+
width: 0px;
|
|
85
|
+
border-style: solid;
|
|
86
|
+
border-width: 8px 6px 4px;
|
|
87
|
+
border-color: rgb(202, 202, 202) transparent transparent;
|
|
88
|
+
}
|
|
89
|
+
.node-state-label-pass .node-wrap-box {
|
|
90
|
+
border-color: #67c23a;
|
|
91
|
+
}
|
|
92
|
+
.node-wrap-box.done {
|
|
93
|
+
border: 3px solid #409eff;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.node-wrap-box.todo {
|
|
97
|
+
border: 3px dashed #ff943e;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.node-wrap-box.start-node {
|
|
101
|
+
border: 3px solid #409eff;
|
|
102
|
+
}
|
|
103
|
+
.node-wrap-box.start-node:before {
|
|
104
|
+
content: none;
|
|
105
|
+
}
|
|
106
|
+
.node-wrap-box .title {
|
|
107
|
+
height: 24px;
|
|
108
|
+
line-height: 24px;
|
|
109
|
+
color: #fff;
|
|
110
|
+
padding-left: 16px;
|
|
111
|
+
padding-right: 30px;
|
|
112
|
+
border-radius: 4px 4px 0 0;
|
|
113
|
+
position: relative;
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
}
|
|
117
|
+
.node-wrap-box .title .icon {
|
|
118
|
+
margin-right: 5px;
|
|
119
|
+
}
|
|
120
|
+
.node-wrap-box .title .close {
|
|
121
|
+
font-size: 15px;
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: 50%;
|
|
124
|
+
transform: translateY(-50%);
|
|
125
|
+
right: 10px;
|
|
126
|
+
display: none;
|
|
127
|
+
}
|
|
128
|
+
.node-wrap-box .content {
|
|
129
|
+
position: relative;
|
|
130
|
+
padding: 15px;
|
|
131
|
+
}
|
|
132
|
+
.node-wrap-box .content .placeholder {
|
|
133
|
+
color: #999;
|
|
134
|
+
}
|
|
135
|
+
.node-wrap-box:hover .close {
|
|
136
|
+
display: block;
|
|
137
|
+
}
|
|
138
|
+
.add-node-btn-box {
|
|
139
|
+
width: 240px;
|
|
140
|
+
display: inline-flex;
|
|
141
|
+
flex-shrink: 0;
|
|
142
|
+
position: relative;
|
|
143
|
+
z-index: 1;
|
|
144
|
+
}
|
|
145
|
+
.add-node-btn-box:before {
|
|
146
|
+
content: '';
|
|
147
|
+
position: absolute;
|
|
148
|
+
top: 0px;
|
|
149
|
+
left: 0px;
|
|
150
|
+
right: 0px;
|
|
151
|
+
bottom: 0px;
|
|
152
|
+
z-index: -1;
|
|
153
|
+
margin: auto;
|
|
154
|
+
width: 2px;
|
|
155
|
+
height: 100%;
|
|
156
|
+
background-color: rgb(202, 202, 202);
|
|
157
|
+
}
|
|
158
|
+
.add-node-btn {
|
|
159
|
+
user-select: none;
|
|
160
|
+
width: 240px;
|
|
161
|
+
padding: 20px 0px 32px;
|
|
162
|
+
display: flex;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
flex-shrink: 0;
|
|
165
|
+
flex-grow: 1;
|
|
166
|
+
}
|
|
167
|
+
.add-node-btn span {
|
|
168
|
+
}
|
|
169
|
+
.add-branch {
|
|
170
|
+
justify-content: center;
|
|
171
|
+
padding: 0px 10px;
|
|
172
|
+
position: absolute;
|
|
173
|
+
top: -16px;
|
|
174
|
+
left: 50%;
|
|
175
|
+
transform: translateX(-50%);
|
|
176
|
+
transform-origin: center center;
|
|
177
|
+
z-index: 1;
|
|
178
|
+
display: inline-flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
}
|
|
181
|
+
.branch-wrap {
|
|
182
|
+
display: inline-flex;
|
|
183
|
+
width: 100%;
|
|
184
|
+
}
|
|
185
|
+
.branch-box-wrap {
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-flow: column wrap;
|
|
188
|
+
align-items: center;
|
|
189
|
+
min-height: 270px;
|
|
190
|
+
width: 100%;
|
|
191
|
+
flex-shrink: 0;
|
|
192
|
+
}
|
|
193
|
+
.col-box {
|
|
194
|
+
display: inline-flex;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
align-items: center;
|
|
197
|
+
position: relative;
|
|
198
|
+
}
|
|
199
|
+
.branch-box {
|
|
200
|
+
display: flex;
|
|
201
|
+
overflow: visible;
|
|
202
|
+
min-height: 180px;
|
|
203
|
+
height: auto;
|
|
204
|
+
border-bottom: 2px solid #ccc;
|
|
205
|
+
border-top: 2px solid #ccc;
|
|
206
|
+
position: relative;
|
|
207
|
+
margin-top: 15px;
|
|
208
|
+
}
|
|
209
|
+
.branch-box .col-box::before {
|
|
210
|
+
content: '';
|
|
211
|
+
position: absolute;
|
|
212
|
+
top: 0px;
|
|
213
|
+
left: 0px;
|
|
214
|
+
right: 0px;
|
|
215
|
+
bottom: 0px;
|
|
216
|
+
z-index: 0;
|
|
217
|
+
margin: auto;
|
|
218
|
+
width: 2px;
|
|
219
|
+
height: 100%;
|
|
220
|
+
background-color: rgb(202, 202, 202);
|
|
221
|
+
}
|
|
222
|
+
.condition-node {
|
|
223
|
+
display: inline-flex;
|
|
224
|
+
flex-direction: column;
|
|
225
|
+
min-height: 220px;
|
|
226
|
+
}
|
|
227
|
+
.condition-node-box {
|
|
228
|
+
padding-top: 30px;
|
|
229
|
+
padding-right: 50px;
|
|
230
|
+
padding-left: 50px;
|
|
231
|
+
justify-content: center;
|
|
232
|
+
align-items: center;
|
|
233
|
+
flex-grow: 1;
|
|
234
|
+
position: relative;
|
|
235
|
+
display: inline-flex;
|
|
236
|
+
flex-direction: column;
|
|
237
|
+
}
|
|
238
|
+
.condition-node-box::before {
|
|
239
|
+
content: '';
|
|
240
|
+
position: absolute;
|
|
241
|
+
top: 0px;
|
|
242
|
+
left: 0px;
|
|
243
|
+
right: 0px;
|
|
244
|
+
bottom: 0px;
|
|
245
|
+
margin: auto;
|
|
246
|
+
width: 2px;
|
|
247
|
+
height: 100%;
|
|
248
|
+
background-color: rgb(202, 202, 202);
|
|
249
|
+
}
|
|
250
|
+
.auto-judge {
|
|
251
|
+
position: relative;
|
|
252
|
+
width: 220px;
|
|
253
|
+
min-height: 72px;
|
|
254
|
+
background: rgb(255, 255, 255);
|
|
255
|
+
border-radius: 4px;
|
|
256
|
+
padding: 15px 15px;
|
|
257
|
+
cursor: pointer;
|
|
258
|
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
|
|
259
|
+
}
|
|
260
|
+
.auto-judge::before {
|
|
261
|
+
content: '';
|
|
262
|
+
position: absolute;
|
|
263
|
+
top: -12px;
|
|
264
|
+
left: 50%;
|
|
265
|
+
transform: translateX(-50%);
|
|
266
|
+
width: 0px;
|
|
267
|
+
border-style: solid;
|
|
268
|
+
border-width: 8px 6px 4px;
|
|
269
|
+
border-color: rgb(202, 202, 202) transparent transparent;
|
|
270
|
+
background: rgb(239, 239, 239);
|
|
271
|
+
}
|
|
272
|
+
.auto-judge .title {
|
|
273
|
+
line-height: 16px;
|
|
274
|
+
}
|
|
275
|
+
.auto-judge .title .node-title {
|
|
276
|
+
color: #15bc83;
|
|
277
|
+
}
|
|
278
|
+
.auto-judge .title .close {
|
|
279
|
+
font-size: 15px;
|
|
280
|
+
position: absolute;
|
|
281
|
+
top: 15px;
|
|
282
|
+
right: 15px;
|
|
283
|
+
color: #999;
|
|
284
|
+
display: none;
|
|
285
|
+
}
|
|
286
|
+
.auto-judge .title .priority-title {
|
|
287
|
+
position: absolute;
|
|
288
|
+
top: 15px;
|
|
289
|
+
right: 15px;
|
|
290
|
+
color: #999;
|
|
291
|
+
}
|
|
292
|
+
.auto-judge .content {
|
|
293
|
+
position: relative;
|
|
294
|
+
padding-top: 15px;
|
|
295
|
+
}
|
|
296
|
+
.auto-judge .content .placeholder {
|
|
297
|
+
color: #999;
|
|
298
|
+
}
|
|
299
|
+
.auto-judge:hover {
|
|
300
|
+
.close {
|
|
301
|
+
display: block;
|
|
302
|
+
}
|
|
303
|
+
.priority-title {
|
|
304
|
+
display: none;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
.top-left-cover-line,
|
|
308
|
+
.top-right-cover-line {
|
|
309
|
+
position: absolute;
|
|
310
|
+
height: 3px;
|
|
311
|
+
width: 50%;
|
|
312
|
+
background-color: #ffffff;
|
|
313
|
+
top: -2px;
|
|
314
|
+
}
|
|
315
|
+
.bottom-left-cover-line,
|
|
316
|
+
.bottom-right-cover-line {
|
|
317
|
+
position: absolute;
|
|
318
|
+
height: 3px;
|
|
319
|
+
width: 50%;
|
|
320
|
+
background-color: #ffffff;
|
|
321
|
+
bottom: -2px;
|
|
322
|
+
}
|
|
323
|
+
.top-left-cover-line {
|
|
324
|
+
left: -1px;
|
|
325
|
+
}
|
|
326
|
+
.top-right-cover-line {
|
|
327
|
+
right: -1px;
|
|
328
|
+
}
|
|
329
|
+
.bottom-left-cover-line {
|
|
330
|
+
left: -1px;
|
|
331
|
+
}
|
|
332
|
+
.bottom-right-cover-line {
|
|
333
|
+
right: -1px;
|
|
334
|
+
}
|
|
335
|
+
.end-node {
|
|
336
|
+
border-radius: 50%;
|
|
337
|
+
font-size: 14px;
|
|
338
|
+
color: rgba(25, 31, 37, 0.4);
|
|
339
|
+
text-align: left;
|
|
340
|
+
}
|
|
341
|
+
.end-node-circle {
|
|
342
|
+
width: 10px;
|
|
343
|
+
height: 10px;
|
|
344
|
+
margin: auto;
|
|
345
|
+
border-radius: 50%;
|
|
346
|
+
background: #ccc;
|
|
347
|
+
}
|
|
348
|
+
.end-node-text {
|
|
349
|
+
margin-top: 5px;
|
|
350
|
+
text-align: center;
|
|
351
|
+
}
|
|
352
|
+
.auto-judge:hover {
|
|
353
|
+
.sort-left {
|
|
354
|
+
display: flex;
|
|
355
|
+
}
|
|
356
|
+
.sort-right {
|
|
357
|
+
display: flex;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
.auto-judge .sort-left {
|
|
361
|
+
position: absolute;
|
|
362
|
+
top: 0;
|
|
363
|
+
bottom: 0;
|
|
364
|
+
z-index: 1;
|
|
365
|
+
left: 0;
|
|
366
|
+
display: none;
|
|
367
|
+
justify-content: center;
|
|
368
|
+
align-items: center;
|
|
369
|
+
flex-direction: column;
|
|
370
|
+
}
|
|
371
|
+
.auto-judge .sort-right {
|
|
372
|
+
position: absolute;
|
|
373
|
+
top: 0;
|
|
374
|
+
bottom: 0;
|
|
375
|
+
z-index: 1;
|
|
376
|
+
right: 0;
|
|
377
|
+
display: none;
|
|
378
|
+
justify-content: center;
|
|
379
|
+
align-items: center;
|
|
380
|
+
flex-direction: column;
|
|
381
|
+
}
|
|
382
|
+
.auto-judge .sort-left:hover,
|
|
383
|
+
.auto-judge .sort-right:hover {
|
|
384
|
+
background: #eee;
|
|
385
|
+
}
|
|
386
|
+
.auto-judge:after {
|
|
387
|
+
pointer-events: none;
|
|
388
|
+
content: '';
|
|
389
|
+
position: absolute;
|
|
390
|
+
top: 0;
|
|
391
|
+
bottom: 0;
|
|
392
|
+
left: 0;
|
|
393
|
+
right: 0;
|
|
394
|
+
z-index: 2;
|
|
395
|
+
border-radius: 4px;
|
|
396
|
+
transition: all 0.1s;
|
|
397
|
+
}
|
|
398
|
+
.auto-judge:hover:after {
|
|
399
|
+
border: 1px solid #3296fa;
|
|
400
|
+
box-shadow: 0 0 6px 0 rgba(50, 150, 250, 0.3);
|
|
401
|
+
}
|
|
402
|
+
.node-wrap-box:after {
|
|
403
|
+
pointer-events: none;
|
|
404
|
+
content: '';
|
|
405
|
+
position: absolute;
|
|
406
|
+
top: 0;
|
|
407
|
+
bottom: 0;
|
|
408
|
+
left: 0;
|
|
409
|
+
right: 0;
|
|
410
|
+
z-index: 2;
|
|
411
|
+
border-radius: 4px;
|
|
412
|
+
transition: all 0.1s;
|
|
413
|
+
}
|
|
414
|
+
.node-wrap-box:hover:after {
|
|
415
|
+
border: 1px solid #3296fa;
|
|
416
|
+
box-shadow: 0 0 6px 0 rgba(50, 150, 250, 0.3);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.tags-list {
|
|
421
|
+
margin-top: 15px;
|
|
422
|
+
width: 100%;
|
|
423
|
+
}
|
|
424
|
+
.add-node-popover-body {
|
|
425
|
+
}
|
|
426
|
+
.add-node-popover-body li {
|
|
427
|
+
display: inline-block;
|
|
428
|
+
width: 80px;
|
|
429
|
+
text-align: center;
|
|
430
|
+
padding: 10px 0;
|
|
431
|
+
}
|
|
432
|
+
.add-node-popover-body li i {
|
|
433
|
+
border: 1px solid var(--el-border-color-light);
|
|
434
|
+
width: 40px;
|
|
435
|
+
height: 40px;
|
|
436
|
+
border-radius: 50%;
|
|
437
|
+
text-align: center;
|
|
438
|
+
line-height: 38px;
|
|
439
|
+
font-size: 18px;
|
|
440
|
+
cursor: pointer;
|
|
441
|
+
}
|
|
442
|
+
.add-node-popover-body li i:hover {
|
|
443
|
+
border: 1px solid #3296fa;
|
|
444
|
+
background: #3296fa;
|
|
445
|
+
color: #fff !important;
|
|
446
|
+
}
|
|
447
|
+
.add-node-popover-body li p {
|
|
448
|
+
font-size: 12px;
|
|
449
|
+
margin-top: 5px;
|
|
450
|
+
}
|
|
451
|
+
.node-wrap-drawer__title {
|
|
452
|
+
padding-right: 40px;
|
|
453
|
+
}
|
|
454
|
+
.node-wrap-drawer__title label {
|
|
455
|
+
cursor: pointer;
|
|
456
|
+
}
|
|
457
|
+
.node-wrap-drawer__title label:hover {
|
|
458
|
+
border-bottom: 1px dashed #409eff;
|
|
459
|
+
}
|
|
460
|
+
.node-wrap-drawer__title .node-wrap-drawer__title-edit {
|
|
461
|
+
color: #409eff;
|
|
462
|
+
margin-left: 10px;
|
|
463
|
+
vertical-align: middle;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.dark .sc-workflow-design {
|
|
467
|
+
.node-wrap-box,
|
|
468
|
+
.auto-judge {
|
|
469
|
+
background: #2b2b2b;
|
|
470
|
+
}
|
|
471
|
+
.col-box {
|
|
472
|
+
background: var(--el-bg-color);
|
|
473
|
+
}
|
|
474
|
+
.top-left-cover-line,
|
|
475
|
+
.top-right-cover-line,
|
|
476
|
+
.bottom-left-cover-line,
|
|
477
|
+
.bottom-right-cover-line {
|
|
478
|
+
background-color: #ffffff;
|
|
479
|
+
}
|
|
480
|
+
.node-wrap-box::before,
|
|
481
|
+
.auto-judge::before {
|
|
482
|
+
background-color: var(--el-bg-color);
|
|
483
|
+
}
|
|
484
|
+
.branch-box .add-branch {
|
|
485
|
+
background: var(--el-bg-color);
|
|
486
|
+
}
|
|
487
|
+
.end-node .end-node-text {
|
|
488
|
+
color: #ccc;
|
|
489
|
+
}
|
|
490
|
+
.auto-judge .sort-left:hover,
|
|
491
|
+
.auto-judge .sort-right:hover {
|
|
492
|
+
background: var(--el-bg-color);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<promoter v-if="nodeConfig.type == 0" v-model="nodeConfig"></promoter>
|
|
3
|
+
|
|
4
|
+
<approver v-if="nodeConfig.type == 1" v-model="nodeConfig"></approver>
|
|
5
|
+
|
|
6
|
+
<send v-if="nodeConfig.type == 2" v-model="nodeConfig"></send>
|
|
7
|
+
|
|
8
|
+
<branch v-if="nodeConfig.type == 4" v-model="nodeConfig">
|
|
9
|
+
<template v-slot="slot">
|
|
10
|
+
<node-wrap v-if="slot.node" v-model="slot.node.childNode"></node-wrap>
|
|
11
|
+
</template>
|
|
12
|
+
</branch>
|
|
13
|
+
|
|
14
|
+
<node-wrap v-if="nodeConfig.childNode" v-model="nodeConfig.childNode"></node-wrap>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import approver from './nodes/approver.vue';
|
|
19
|
+
import promoter from './nodes/promoter.vue';
|
|
20
|
+
import branch from './nodes/branch.vue';
|
|
21
|
+
import send from './nodes/send.vue';
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
props: {
|
|
25
|
+
modelValue: { type: Object, default: () => {} }
|
|
26
|
+
},
|
|
27
|
+
components: {
|
|
28
|
+
approver,
|
|
29
|
+
promoter,
|
|
30
|
+
branch,
|
|
31
|
+
send
|
|
32
|
+
},
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
nodeConfig: {}
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
watch: {
|
|
39
|
+
modelValue(val) {
|
|
40
|
+
this.nodeConfig = val;
|
|
41
|
+
},
|
|
42
|
+
nodeConfig(val) {
|
|
43
|
+
this.$emit('update:modelValue', val);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
mounted() {
|
|
47
|
+
this.nodeConfig = this.modelValue;
|
|
48
|
+
},
|
|
49
|
+
methods: {}
|
|
50
|
+
};
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<style></style>
|