eoss-ui 0.6.99 → 0.7.11
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/lib/button-group.js +1 -1
- package/lib/button.js +1 -1
- package/lib/calogin.js +234 -234
- package/lib/checkbox-group.js +1 -1
- package/lib/config/api.js +1 -1
- package/lib/data-table-form.js +1 -1
- package/lib/data-table.js +1 -1
- package/lib/date-picker.js +1 -1
- package/lib/dialog.js +1 -1
- package/lib/eoss-ui.common.js +1247 -1213
- package/lib/flow-group.js +1 -1
- package/lib/flow-list.js +82 -82
- package/lib/flow.js +757 -729
- package/lib/form.js +9 -5
- package/lib/handle-user.js +1 -1
- package/lib/handler.js +1 -1
- package/lib/icon.js +1 -1
- package/lib/index.js +1 -1
- package/lib/input-number.js +1 -1
- package/lib/input.js +1 -1
- package/lib/login.js +1 -1
- package/lib/main.js +142 -140
- package/lib/nav.js +1 -1
- package/lib/notify.js +1 -1
- package/lib/page.js +1 -1
- package/lib/pagination.js +1 -1
- package/lib/player.js +1 -1
- package/lib/qr-code.js +14 -14
- package/lib/radio-group.js +1 -1
- package/lib/retrial-auth.js +1 -1
- package/lib/select-ganged.js +1 -1
- package/lib/select.js +1 -1
- package/lib/selector-panel.js +1 -1
- package/lib/selector.js +1 -1
- package/lib/sizer.js +1 -1
- package/lib/steps.js +1 -1
- package/lib/switch.js +1 -1
- package/lib/table-form.js +1 -1
- package/lib/tabs.js +1 -1
- package/lib/tips.js +1 -1
- package/lib/tree-group.js +1 -1
- package/lib/tree.js +1 -1
- package/lib/upload.js +1 -1
- package/lib/wujie.js +1 -1
- package/lib/wxlogin.js +1 -1
- package/package.json +160 -160
- package/packages/button/index.js +5 -5
- package/packages/button/src/main.vue +418 -418
- package/packages/button-group/index.js +5 -5
- package/packages/button-group/src/main.vue +298 -298
- package/packages/calendar/index.js +5 -5
- package/packages/calogin/index.js +5 -5
- package/packages/calogin/src/main.vue +412 -412
- package/packages/calogin/src/plugin.js +915 -915
- package/packages/card/index.js +5 -5
- package/packages/card/src/main.vue +156 -156
- package/packages/cascader/index.js +5 -5
- package/packages/cascader/src/main.vue +168 -168
- package/packages/checkbox-group/index.js +5 -5
- package/packages/checkbox-group/src/main.vue +333 -333
- package/packages/clients/index.js +5 -5
- package/packages/clients/src/main.vue +151 -151
- package/packages/data-table/index.js +5 -5
- package/packages/data-table/src/children.vue +39 -39
- package/packages/data-table/src/column.vue +988 -988
- package/packages/data-table/src/main.vue +1831 -1831
- package/packages/data-table/src/sizer.vue +195 -195
- package/packages/data-table-form/index.js +5 -5
- package/packages/data-table-form/src/checkbox.vue +101 -101
- package/packages/data-table-form/src/colgroup.vue +17 -17
- package/packages/data-table-form/src/main.vue +181 -181
- package/packages/data-table-form/src/radio.vue +65 -65
- package/packages/data-table-form/src/table.vue +233 -233
- package/packages/data-table-form/src/tbody.vue +336 -336
- package/packages/data-table-form/src/thead.vue +68 -68
- package/packages/date-picker/index.js +5 -5
- package/packages/date-picker/src/main.vue +236 -236
- package/packages/dialog/index.js +5 -5
- package/packages/enable-drag/index.js +5 -5
- package/packages/enterprise/index.js +5 -5
- package/packages/enterprise/src/main.vue +66 -66
- package/packages/error-page/index.js +5 -5
- package/packages/error-page/src/main.vue +44 -44
- package/packages/flow/index.js +5 -5
- package/packages/flow/src/component/Circulate.vue +405 -403
- package/packages/flow/src/component/CommonOpinions.vue +364 -364
- package/packages/flow/src/component/CustomPreset.vue +322 -322
- package/packages/flow/src/component/FileList.vue +99 -99
- package/packages/flow/src/component/Preset.vue +255 -255
- package/packages/flow/src/component/SendMsg.vue +242 -242
- package/packages/flow/src/component/TimeLimit.vue +190 -190
- package/packages/flow/src/component/taskUnionExamine.vue +642 -641
- package/packages/flow/src/form.vue +121 -121
- package/packages/flow/src/freeStartFlow.vue +2844 -2844
- package/packages/flow/src/main.vue +3750 -3726
- package/packages/flow/src/processForm.vue +1287 -1287
- package/packages/flow/src/processReject.vue +308 -308
- package/packages/flow/src/reset.vue +941 -941
- package/packages/flow/src/selectUser.vue +5 -1
- package/packages/flow/src/startTaskRead.vue +691 -690
- package/packages/flow/src/supervise.vue +159 -159
- package/packages/flow/src/table.vue +58 -58
- package/packages/flow-group/index.js +5 -5
- package/packages/flow-group/src/main.vue +692 -692
- package/packages/flow-list/index.js +5 -5
- package/packages/flow-list/src/main.vue +1770 -1770
- package/packages/form/index.js +5 -5
- package/packages/form/src/main.vue +3850 -3846
- package/packages/form/src/table.vue +1508 -1508
- package/packages/handle-user/index.js +5 -5
- package/packages/handle-user/src/main.vue +137 -137
- package/packages/handler/index.js +5 -5
- package/packages/handler/src/main.vue +493 -493
- package/packages/icon/index.js +5 -5
- package/packages/icon/src/main.vue +101 -101
- package/packages/icons/index.js +5 -5
- package/packages/icons/src/main.vue +81 -81
- package/packages/input/index.js +5 -5
- package/packages/input/src/main.vue +356 -356
- package/packages/input-number/index.js +5 -5
- package/packages/input-number/src/main.vue +106 -106
- package/packages/label/index.js +5 -5
- package/packages/label/src/main.vue +457 -457
- package/packages/layout/index.js +5 -5
- package/packages/layout/src/item.vue +152 -152
- package/packages/layout/src/main.vue +31 -31
- package/packages/login/index.js +5 -5
- package/packages/login/src/main.vue +1993 -1993
- package/packages/login/src/resetPassword.vue +562 -562
- package/packages/main/index.js +5 -5
- package/packages/main/src/default/message.vue +249 -249
- package/packages/main/src/default/notice.vue +157 -157
- package/packages/main/src/default/userinfo.vue +502 -502
- package/packages/main/src/public/online.vue +89 -89
- package/packages/main/src/public/search.vue +464 -464
- package/packages/main/src/public/settings.vue +221 -221
- package/packages/main/src/simplicity/apps.vue +388 -388
- package/packages/main/src/simplicity/avatar.vue +82 -82
- package/packages/main/src/simplicity/handler.vue +259 -259
- package/packages/main/src/simplicity/index.vue +2125 -2125
- package/packages/main/src/simplicity/lists.vue +84 -84
- package/packages/main/src/simplicity/menu-list.vue +135 -135
- package/packages/main/src/simplicity/message.vue +259 -259
- package/packages/main/src/simplicity/notice.vue +190 -190
- package/packages/main/src/simplicity/router-page.vue +45 -45
- package/packages/main/src/simplicity/sub-menu.vue +264 -264
- package/packages/main/src/simplicity/user.vue +259 -259
- package/packages/main/src/simplicity/userinfo.vue +398 -397
- package/packages/menu/index.js +5 -5
- package/packages/menu/src/main.vue +584 -584
- package/packages/nav/index.js +5 -5
- package/packages/nav/src/main.vue +351 -351
- package/packages/notify/index.js +5 -5
- package/packages/notify/src/main.vue +538 -538
- package/packages/page/index.js +5 -5
- package/packages/page/src/main.vue +167 -167
- package/packages/pagination/index.js +5 -5
- package/packages/pagination/src/main.vue +96 -96
- package/packages/player/index.js +5 -5
- package/packages/player/src/main.vue +194 -194
- package/packages/qr-code/index.js +5 -5
- package/packages/qr-code/src/main.vue +170 -170
- package/packages/radio-group/index.js +6 -6
- package/packages/radio-group/src/main.vue +319 -319
- package/packages/retrial-auth/index.js +5 -5
- package/packages/retrial-auth/src/main.vue +280 -280
- package/packages/select/index.js +5 -5
- package/packages/select/src/main.vue +781 -781
- package/packages/select-ganged/index.js +5 -5
- package/packages/select-ganged/src/main.vue +724 -724
- package/packages/selector/index.js +5 -5
- package/packages/selector/src/main.vue +761 -761
- package/packages/selector-panel/index.js +5 -5
- package/packages/selector-panel/src/main.vue +1027 -1027
- package/packages/selector-panel/src/selection.vue +170 -170
- package/packages/selector-panel/src/tree.vue +129 -129
- package/packages/sizer/index.js +5 -5
- package/packages/sizer/src/main.vue +254 -254
- package/packages/steps/index.js +5 -5
- package/packages/steps/src/main.vue +181 -181
- package/packages/switch/index.js +5 -5
- package/packages/switch/src/main.vue +154 -154
- package/packages/table-form/index.js +5 -5
- package/packages/tabs/index.js +5 -5
- package/packages/tabs/src/main.vue +788 -788
- package/packages/tabs-panel/index.js +5 -5
- package/packages/tabs-panel/src/main.vue +29 -29
- package/packages/theme-chalk/src/base.scss +261 -261
- package/packages/theme-chalk/src/button-group.scss +176 -176
- package/packages/theme-chalk/src/button.scss +24 -24
- package/packages/theme-chalk/src/calendar.scss +113 -113
- package/packages/theme-chalk/src/card.scss +99 -99
- package/packages/theme-chalk/src/checkbox-group.scss +8 -8
- package/packages/theme-chalk/src/clients.scss +87 -87
- package/packages/theme-chalk/src/data-table-form.scss +67 -67
- package/packages/theme-chalk/src/data-table.scss +293 -293
- package/packages/theme-chalk/src/date-picker.scss +7 -7
- package/packages/theme-chalk/src/dialog.scss +77 -77
- package/packages/theme-chalk/src/enable-drag.scss +181 -181
- package/packages/theme-chalk/src/enterprise.scss +5 -5
- package/packages/theme-chalk/src/error-page.scss +18 -18
- package/packages/theme-chalk/src/flow-group.scss +110 -110
- package/packages/theme-chalk/src/flow-list.scss +39 -39
- package/packages/theme-chalk/src/flow.scss +348 -348
- package/packages/theme-chalk/src/form.scss +499 -499
- package/packages/theme-chalk/src/handle-user.scss +40 -40
- package/packages/theme-chalk/src/handler.scss +143 -143
- package/packages/theme-chalk/src/icon.scss +1817 -1817
- package/packages/theme-chalk/src/icons.scss +99 -99
- package/packages/theme-chalk/src/input.scss +9 -9
- package/packages/theme-chalk/src/label.scss +24 -24
- package/packages/theme-chalk/src/layout.scss +46 -46
- package/packages/theme-chalk/src/login.scss +984 -984
- package/packages/theme-chalk/src/main.scss +663 -663
- package/packages/theme-chalk/src/menu.scss +222 -222
- package/packages/theme-chalk/src/mixins/color.scss +117 -117
- package/packages/theme-chalk/src/nav.scss +111 -111
- package/packages/theme-chalk/src/page.scss +3 -3
- package/packages/theme-chalk/src/pagination.scss +29 -29
- package/packages/theme-chalk/src/player.scss +9 -9
- package/packages/theme-chalk/src/qr-code.scss +17 -17
- package/packages/theme-chalk/src/radio-group.scss +9 -9
- package/packages/theme-chalk/src/retrial-auth.scss +38 -38
- package/packages/theme-chalk/src/select-ganged.scss +8 -8
- package/packages/theme-chalk/src/select.scss +8 -8
- package/packages/theme-chalk/src/selector-panel.scss +204 -204
- package/packages/theme-chalk/src/selector.scss +92 -92
- package/packages/theme-chalk/src/simplicity.scss +1361 -1361
- package/packages/theme-chalk/src/sizer.scss +36 -36
- package/packages/theme-chalk/src/steps.scss +88 -88
- package/packages/theme-chalk/src/switch.scss +3 -3
- package/packages/theme-chalk/src/table-form.scss +1 -1
- package/packages/theme-chalk/src/tabs.scss +87 -87
- package/packages/theme-chalk/src/tips.scss +7 -7
- package/packages/theme-chalk/src/toolbar.scss +179 -179
- package/packages/theme-chalk/src/tree-group.scss +72 -72
- package/packages/theme-chalk/src/tree.scss +165 -165
- package/packages/theme-chalk/src/upload.scss +172 -172
- package/packages/theme-chalk/src/wxlogin.scss +3 -3
- package/packages/tips/index.js +5 -5
- package/packages/tips/src/main.vue +141 -141
- package/packages/toolbar/index.js +5 -5
- package/packages/toolbar/src/main.vue +430 -430
- package/packages/tree/index.js +5 -5
- package/packages/tree-group/index.js +5 -5
- package/packages/upload/index.js +5 -5
- package/packages/upload/src/main.vue +1343 -1343
- package/packages/upload/src/picture.js +15 -15
- package/packages/wujie/index.js +5 -5
- package/packages/wujie/src/main.vue +145 -145
- package/packages/wxlogin/index.js +5 -5
- package/packages/wxlogin/src/main.vue +128 -128
- package/src/config/api.js +308 -308
- package/src/config/image.js +2 -2
- package/src/index.js +163 -163
- package/src/utils/bus.js +3 -3
- package/src/utils/date-util.js +312 -312
- package/src/utils/http.js +50 -50
- package/src/utils/rules.js +18 -18
- package/src/utils/store.js +21 -21
- package/src/utils/webSocket.js +107 -107
- package/packages/.DS_Store +0 -0
- package/packages/autocomplete/.DS_Store +0 -0
- package/packages/calogin/.DS_Store +0 -0
- package/packages/date-picker/.DS_Store +0 -0
- package/packages/date-picker/src/.DS_Store +0 -0
- package/packages/flow/.DS_Store +0 -0
- package/packages/flow/src/.DS_Store +0 -0
- package/packages/flow-list/.DS_Store +0 -0
- package/packages/form/.DS_Store +0 -0
- package/packages/login/.DS_Store +0 -0
- package/packages/main/.DS_Store +0 -0
- package/packages/main/src/.DS_Store +0 -0
- package/packages/menu/.DS_Store +0 -0
- package/packages/scrollbar/.DS_Store +0 -0
- package/packages/select/.DS_Store +0 -0
- package/packages/selector/.DS_Store +0 -0
- package/packages/selector-panel/.DS_Store +0 -0
- package/packages/theme-chalk/src/.DS_Store +0 -0
- package/packages/upload/.DS_Store +0 -0
- package/src/.DS_Store +0 -0
- package/src/utils/.DS_Store +0 -0
|
@@ -1,692 +1,692 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="es-flow-group" :class="{ 'is-hide-flow': !isShow }">
|
|
3
|
-
<div class="es-flow-group-main">
|
|
4
|
-
<el-tabs
|
|
5
|
-
class="es-flow-tabs es-tabs"
|
|
6
|
-
type="border-card"
|
|
7
|
-
v-model="activeName"
|
|
8
|
-
ref="tabs"
|
|
9
|
-
:before-leave="handleBefore"
|
|
10
|
-
>
|
|
11
|
-
<template v-for="(items, indexs) in tabs">
|
|
12
|
-
<el-tab-pane
|
|
13
|
-
v-if="handleHide(items.hide)"
|
|
14
|
-
:key="items.id || indexs"
|
|
15
|
-
:immediate="items.label === '流程图' ? false : items.immediate"
|
|
16
|
-
:name="String(indexs)"
|
|
17
|
-
:class="{ 'es-flex-vertical': items.average }"
|
|
18
|
-
>
|
|
19
|
-
<span
|
|
20
|
-
slot="label"
|
|
21
|
-
:style="{
|
|
22
|
-
color:
|
|
23
|
-
activeName == String(indexs) ? items.activeColor : items.color
|
|
24
|
-
}"
|
|
25
|
-
>
|
|
26
|
-
<template v-if="items.title">
|
|
27
|
-
<template v-if="typeof items.title === 'object'">
|
|
28
|
-
<i v-if="items.title.icon" :class="items.title.icon"></i>
|
|
29
|
-
<el-badge
|
|
30
|
-
v-if="items.title.count"
|
|
31
|
-
type="primary"
|
|
32
|
-
:value="items.title.count"
|
|
33
|
-
:color="items.title.color"
|
|
34
|
-
:max="99"
|
|
35
|
-
>{{ items.title.text }}
|
|
36
|
-
</el-badge>
|
|
37
|
-
<template v-else>{{ items.title.text }}</template>
|
|
38
|
-
</template>
|
|
39
|
-
<template v-else>{{ items.title }}</template>
|
|
40
|
-
</template>
|
|
41
|
-
<template>{{ items.label }}</template>
|
|
42
|
-
</span>
|
|
43
|
-
<es-tabs-panel v-bind="items" :show="activeName === String(indexs)">
|
|
44
|
-
<template
|
|
45
|
-
slot-scope="{ contents, average, data, title, show, isShow }"
|
|
46
|
-
>
|
|
47
|
-
<template v-if="Array.isArray(contents)">
|
|
48
|
-
<template v-for="(item, index) in contents">
|
|
49
|
-
<div class="es-tab-pane-list" :key="index" v-if="average">
|
|
50
|
-
<div class="es-tab-pane-main">
|
|
51
|
-
<es-flow-list
|
|
52
|
-
v-if="
|
|
53
|
-
item.type === 'flow-list' ||
|
|
54
|
-
item.type === 'flowList'
|
|
55
|
-
"
|
|
56
|
-
:businessId="businessId"
|
|
57
|
-
v-bind="
|
|
58
|
-
handleExclAttribute({
|
|
59
|
-
data: item,
|
|
60
|
-
attrs: ['events', 'visible', 'type']
|
|
61
|
-
})
|
|
62
|
-
"
|
|
63
|
-
:display="activeName === String(indexs)"
|
|
64
|
-
:key="index"
|
|
65
|
-
></es-flow-list>
|
|
66
|
-
<es-data-table
|
|
67
|
-
v-if="
|
|
68
|
-
item.type === 'data-table' ||
|
|
69
|
-
item.type === 'dataTable'
|
|
70
|
-
"
|
|
71
|
-
:appId="taskExamineAppId"
|
|
72
|
-
v-bind="
|
|
73
|
-
handleExclAttribute({
|
|
74
|
-
data: item,
|
|
75
|
-
attrs: ['events', 'visible', 'type']
|
|
76
|
-
})
|
|
77
|
-
"
|
|
78
|
-
:class="{
|
|
79
|
-
'es-flow-group-data-table':
|
|
80
|
-
item.type === 'data-table' ||
|
|
81
|
-
item.type === 'dataTable'
|
|
82
|
-
}"
|
|
83
|
-
:display="activeName === String(indexs)"
|
|
84
|
-
v-on="item.events"
|
|
85
|
-
>
|
|
86
|
-
<template v-if="item.dialog" slot="dialog">
|
|
87
|
-
<template v-if="Array.isArray(item.dialog)">
|
|
88
|
-
<es-dialog
|
|
89
|
-
v-for="(ele, ids) in item.dialog"
|
|
90
|
-
:isReload="true"
|
|
91
|
-
v-bind="ele"
|
|
92
|
-
:key="ids"
|
|
93
|
-
:visible.sync="ele.visible"
|
|
94
|
-
v-on="{ ...ele.events }"
|
|
95
|
-
>
|
|
96
|
-
</es-dialog>
|
|
97
|
-
</template>
|
|
98
|
-
<es-dialog
|
|
99
|
-
v-else
|
|
100
|
-
:isReload="true"
|
|
101
|
-
v-bind="item.dialog"
|
|
102
|
-
:visible.sync="item.dialog.visible"
|
|
103
|
-
v-on="{ ...item.dialog.events }"
|
|
104
|
-
>
|
|
105
|
-
</es-dialog>
|
|
106
|
-
</template>
|
|
107
|
-
</es-data-table>
|
|
108
|
-
<es-tree-group
|
|
109
|
-
v-if="
|
|
110
|
-
item.type === 'tree-group' ||
|
|
111
|
-
item.type === 'treeGroup'
|
|
112
|
-
"
|
|
113
|
-
:appId="taskExamineAppId"
|
|
114
|
-
v-bind="
|
|
115
|
-
handleExclAttribute({
|
|
116
|
-
data: item,
|
|
117
|
-
attrs: ['events', 'visible', 'type']
|
|
118
|
-
})
|
|
119
|
-
"
|
|
120
|
-
:display="activeName === String(indexs)"
|
|
121
|
-
v-on="{ ...item.events }"
|
|
122
|
-
></es-tree-group>
|
|
123
|
-
<iframe
|
|
124
|
-
v-if="item.type === 'iframe' && !item.blank"
|
|
125
|
-
:id="item.id || item.name"
|
|
126
|
-
:name="item.name"
|
|
127
|
-
frameborder="0"
|
|
128
|
-
width="100%"
|
|
129
|
-
height="100%"
|
|
130
|
-
:src="handleUrlJoinParams(item)"
|
|
131
|
-
></iframe>
|
|
132
|
-
<es-upload
|
|
133
|
-
v-if="item.type === 'attachment'"
|
|
134
|
-
:file-count.sync="title.count"
|
|
135
|
-
height="auto"
|
|
136
|
-
class="es-attachment"
|
|
137
|
-
:ownId="businessId"
|
|
138
|
-
v-bind="
|
|
139
|
-
handleExclAttribute({
|
|
140
|
-
data: item,
|
|
141
|
-
attrs: ['events', 'type']
|
|
142
|
-
})
|
|
143
|
-
"
|
|
144
|
-
:display="activeName === String(indexs)"
|
|
145
|
-
v-on="{ ...item.events }"
|
|
146
|
-
></es-upload>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
<template v-else>
|
|
150
|
-
<es-form
|
|
151
|
-
v-if="item.type === 'form'"
|
|
152
|
-
ref="esFlowForm"
|
|
153
|
-
:showMsg="showMsg"
|
|
154
|
-
v-bind="
|
|
155
|
-
handleExclAttribute({
|
|
156
|
-
data: item,
|
|
157
|
-
attrs: ['events', 'visible', 'type', 'model', 'ref']
|
|
158
|
-
})
|
|
159
|
-
"
|
|
160
|
-
full
|
|
161
|
-
:key="index"
|
|
162
|
-
:autoId="true"
|
|
163
|
-
:show-button="false"
|
|
164
|
-
:closeDialog="false"
|
|
165
|
-
:display="activeName === String(indexs)"
|
|
166
|
-
:model="item.model"
|
|
167
|
-
:businessId.sync="businessId"
|
|
168
|
-
v-on="{ ...item.events }"
|
|
169
|
-
></es-form>
|
|
170
|
-
<es-flow-list
|
|
171
|
-
v-if="
|
|
172
|
-
item.type === 'flow-list' || item.type === 'flowList'
|
|
173
|
-
"
|
|
174
|
-
:businessId="businessId"
|
|
175
|
-
v-bind="
|
|
176
|
-
handleExclAttribute({
|
|
177
|
-
data: item,
|
|
178
|
-
attrs: ['events', 'visible', 'type']
|
|
179
|
-
})
|
|
180
|
-
"
|
|
181
|
-
:display="activeName === String(indexs)"
|
|
182
|
-
:key="index"
|
|
183
|
-
></es-flow-list>
|
|
184
|
-
<es-data-table
|
|
185
|
-
v-if="
|
|
186
|
-
item.type === 'data-table' ||
|
|
187
|
-
item.type === 'dataTable'
|
|
188
|
-
"
|
|
189
|
-
:appId="taskExamineAppId"
|
|
190
|
-
v-bind="
|
|
191
|
-
handleExclAttribute({
|
|
192
|
-
data: item,
|
|
193
|
-
attrs: ['events', 'visible', 'type']
|
|
194
|
-
})
|
|
195
|
-
"
|
|
196
|
-
:key="index"
|
|
197
|
-
:class="{
|
|
198
|
-
'es-flow-group-data-table':
|
|
199
|
-
item.type === 'data-table' ||
|
|
200
|
-
item.type === 'dataTable'
|
|
201
|
-
}"
|
|
202
|
-
:display="activeName === String(indexs)"
|
|
203
|
-
v-on="item.events"
|
|
204
|
-
>
|
|
205
|
-
<template v-if="item.dialog" slot="dialog">
|
|
206
|
-
<template v-if="Array.isArray(item.dialog)">
|
|
207
|
-
<es-dialog
|
|
208
|
-
v-for="(ele, ids) in item.dialog"
|
|
209
|
-
:isReload="true"
|
|
210
|
-
v-bind="ele"
|
|
211
|
-
:key="ids"
|
|
212
|
-
:visible.sync="ele.visible"
|
|
213
|
-
v-on="{ ...ele.events }"
|
|
214
|
-
>
|
|
215
|
-
</es-dialog>
|
|
216
|
-
</template>
|
|
217
|
-
<es-dialog
|
|
218
|
-
v-else
|
|
219
|
-
:isReload="true"
|
|
220
|
-
v-bind="item.dialog"
|
|
221
|
-
:visible.sync="item.dialog.visible"
|
|
222
|
-
v-on="{ ...item.dialog.events }"
|
|
223
|
-
>
|
|
224
|
-
</es-dialog>
|
|
225
|
-
</template>
|
|
226
|
-
</es-data-table>
|
|
227
|
-
<es-tree-group
|
|
228
|
-
v-if="
|
|
229
|
-
item.type === 'tree-group' ||
|
|
230
|
-
item.type === 'treeGroup'
|
|
231
|
-
"
|
|
232
|
-
:appId="taskExamineAppId"
|
|
233
|
-
v-bind="
|
|
234
|
-
handleExclAttribute({
|
|
235
|
-
data: item,
|
|
236
|
-
attrs: ['events', 'visible', 'type']
|
|
237
|
-
})
|
|
238
|
-
"
|
|
239
|
-
:key="index"
|
|
240
|
-
:display="activeName === String(indexs)"
|
|
241
|
-
v-on="{ ...item.events }"
|
|
242
|
-
></es-tree-group>
|
|
243
|
-
<iframe
|
|
244
|
-
v-if="item.type === 'iframe' && !item.blank"
|
|
245
|
-
frameborder="0"
|
|
246
|
-
width="100%"
|
|
247
|
-
height="100%"
|
|
248
|
-
:key="index"
|
|
249
|
-
:id="item.id || item.name"
|
|
250
|
-
:name="item.name"
|
|
251
|
-
:src="handleUrlJoinParams(item)"
|
|
252
|
-
></iframe>
|
|
253
|
-
<es-upload
|
|
254
|
-
v-if="item.type === 'attachment'"
|
|
255
|
-
height="auto"
|
|
256
|
-
class="es-attachment"
|
|
257
|
-
:ownId="businessId"
|
|
258
|
-
v-bind="
|
|
259
|
-
handleExclAttribute({
|
|
260
|
-
data: item,
|
|
261
|
-
attrs: ['events', 'type']
|
|
262
|
-
})
|
|
263
|
-
"
|
|
264
|
-
:key="index"
|
|
265
|
-
:file-count.sync="title.count"
|
|
266
|
-
:display="activeName === String(indexs)"
|
|
267
|
-
v-on="{ ...item.events }"
|
|
268
|
-
></es-upload>
|
|
269
|
-
<es-dialog
|
|
270
|
-
v-if="
|
|
271
|
-
item.type === 'dialog' &&
|
|
272
|
-
activeName === String(indexs)
|
|
273
|
-
"
|
|
274
|
-
:isReload="true"
|
|
275
|
-
v-bind="item"
|
|
276
|
-
:key="index"
|
|
277
|
-
:visible.sync="item.visible"
|
|
278
|
-
v-on="{ ...item.events }"
|
|
279
|
-
>
|
|
280
|
-
</es-dialog>
|
|
281
|
-
<component
|
|
282
|
-
v-if="item.component || item.type == 'component'"
|
|
283
|
-
:is="item.is || item.type"
|
|
284
|
-
show
|
|
285
|
-
isShow
|
|
286
|
-
v-bind="
|
|
287
|
-
handleExclAttribute({
|
|
288
|
-
data: item,
|
|
289
|
-
attrs: ['is', 'type']
|
|
290
|
-
})
|
|
291
|
-
"
|
|
292
|
-
></component>
|
|
293
|
-
</template>
|
|
294
|
-
</template>
|
|
295
|
-
</template>
|
|
296
|
-
<template v-else>
|
|
297
|
-
<component
|
|
298
|
-
v-if="contents.component || contents.type == 'component'"
|
|
299
|
-
:is="contents.is || contents.type"
|
|
300
|
-
show
|
|
301
|
-
isShow
|
|
302
|
-
v-bind="
|
|
303
|
-
handleExclAttribute({
|
|
304
|
-
data: contents,
|
|
305
|
-
attrs: ['is', 'type']
|
|
306
|
-
})
|
|
307
|
-
"
|
|
308
|
-
></component>
|
|
309
|
-
<es-form
|
|
310
|
-
v-if="contents.type === 'form'"
|
|
311
|
-
:show-button="false"
|
|
312
|
-
ref="esFlowForm"
|
|
313
|
-
:showMsg="showMsg"
|
|
314
|
-
v-bind="
|
|
315
|
-
handleExclAttribute({
|
|
316
|
-
data: contents,
|
|
317
|
-
attrs: ['events', 'visible', 'type', 'model', 'ref']
|
|
318
|
-
})
|
|
319
|
-
"
|
|
320
|
-
full
|
|
321
|
-
:autoId="true"
|
|
322
|
-
:businessId.sync="businessId"
|
|
323
|
-
:closeDialog="false"
|
|
324
|
-
:display="activeName === String(indexs)"
|
|
325
|
-
:model="contents.model"
|
|
326
|
-
v-on="{ ...contents.events }"
|
|
327
|
-
></es-form>
|
|
328
|
-
<es-flow-list
|
|
329
|
-
v-if="
|
|
330
|
-
contents.type === 'flow-list' ||
|
|
331
|
-
contents.type === 'flowList'
|
|
332
|
-
"
|
|
333
|
-
:businessId="businessId"
|
|
334
|
-
v-bind="
|
|
335
|
-
handleExclAttribute({
|
|
336
|
-
data: contents,
|
|
337
|
-
attrs: ['events', 'visible', 'type']
|
|
338
|
-
})
|
|
339
|
-
"
|
|
340
|
-
:display="activeName === String(indexs)"
|
|
341
|
-
></es-flow-list>
|
|
342
|
-
<es-data-table
|
|
343
|
-
v-if="
|
|
344
|
-
contents.type === 'data-table' ||
|
|
345
|
-
contents.type === 'dataTable'
|
|
346
|
-
"
|
|
347
|
-
:appId="taskExamineAppId"
|
|
348
|
-
v-bind="
|
|
349
|
-
handleExclAttribute({
|
|
350
|
-
data: contents,
|
|
351
|
-
attrs: ['events', 'visible', 'type']
|
|
352
|
-
})
|
|
353
|
-
"
|
|
354
|
-
:class="{
|
|
355
|
-
'es-flow-group-data-table':
|
|
356
|
-
contents.type === 'data-table' ||
|
|
357
|
-
contents.type === 'dataTable'
|
|
358
|
-
}"
|
|
359
|
-
:display="activeName === String(indexs)"
|
|
360
|
-
v-on="contents.events"
|
|
361
|
-
>
|
|
362
|
-
<template v-if="contents.dialog" slot="dialog">
|
|
363
|
-
<template v-if="Array.isArray(contents.dialog)">
|
|
364
|
-
<es-dialog
|
|
365
|
-
v-for="(ele, ids) in contents.dialog"
|
|
366
|
-
:isReload="true"
|
|
367
|
-
v-bind="ele"
|
|
368
|
-
:key="ids"
|
|
369
|
-
:visible.sync="ele.visible"
|
|
370
|
-
v-on="{ ...ele.events }"
|
|
371
|
-
>
|
|
372
|
-
</es-dialog>
|
|
373
|
-
</template>
|
|
374
|
-
<es-dialog
|
|
375
|
-
v-else
|
|
376
|
-
:isReload="true"
|
|
377
|
-
v-bind="contents.dialog"
|
|
378
|
-
:visible.sync="contents.dialog.visible"
|
|
379
|
-
v-on="{ ...contents.dialog.events }"
|
|
380
|
-
>
|
|
381
|
-
</es-dialog>
|
|
382
|
-
</template>
|
|
383
|
-
</es-data-table>
|
|
384
|
-
<es-tree-group
|
|
385
|
-
v-if="
|
|
386
|
-
contents.type === 'tree-group' ||
|
|
387
|
-
contents.type === 'treeGroup'
|
|
388
|
-
"
|
|
389
|
-
:appId="taskExamineAppId"
|
|
390
|
-
v-bind="
|
|
391
|
-
handleExclAttribute({
|
|
392
|
-
data: contents,
|
|
393
|
-
attrs: ['events', 'visible', 'type']
|
|
394
|
-
})
|
|
395
|
-
"
|
|
396
|
-
:display="activeName === String(indexs)"
|
|
397
|
-
v-on="{ ...contents.events }"
|
|
398
|
-
></es-tree-group>
|
|
399
|
-
<iframe
|
|
400
|
-
v-if="contents.type === 'iframe' && !contents.blank"
|
|
401
|
-
:id="contents.id || contents.name"
|
|
402
|
-
:name="contents.name"
|
|
403
|
-
frameborder="0"
|
|
404
|
-
width="100%"
|
|
405
|
-
height="100%"
|
|
406
|
-
:src="handleUrlJoinParams(contents)"
|
|
407
|
-
></iframe>
|
|
408
|
-
<es-upload
|
|
409
|
-
v-if="contents.type === 'attachment'"
|
|
410
|
-
:ownId="businessId"
|
|
411
|
-
v-bind="
|
|
412
|
-
handleExclAttribute({
|
|
413
|
-
data: contents,
|
|
414
|
-
attrs: ['events', 'type']
|
|
415
|
-
})
|
|
416
|
-
"
|
|
417
|
-
:file-count.sync="title.count"
|
|
418
|
-
:display="activeName === String(indexs)"
|
|
419
|
-
height="auto"
|
|
420
|
-
class="es-attachment"
|
|
421
|
-
v-on="{ ...contents.events }"
|
|
422
|
-
></es-upload>
|
|
423
|
-
</template>
|
|
424
|
-
</template>
|
|
425
|
-
</es-tabs-panel>
|
|
426
|
-
</el-tab-pane>
|
|
427
|
-
</template>
|
|
428
|
-
</el-tabs>
|
|
429
|
-
</div>
|
|
430
|
-
<es-flow
|
|
431
|
-
v-if="isShow"
|
|
432
|
-
class="es-group-flow"
|
|
433
|
-
v-bind="_flow"
|
|
434
|
-
:width="width"
|
|
435
|
-
:before-submit="isSubmit ? handleSubmit : undefined"
|
|
436
|
-
:businessId="businessId"
|
|
437
|
-
@startTaskRead="handleTaskRead"
|
|
438
|
-
@success="handleSuccess"
|
|
439
|
-
@save="handleSave"
|
|
440
|
-
@endMessageChange="handleEndMessageChange"
|
|
441
|
-
:closeParent="closeParent"
|
|
442
|
-
></es-flow>
|
|
443
|
-
<slot></slot>
|
|
444
|
-
</div>
|
|
445
|
-
</template>
|
|
446
|
-
<script>
|
|
447
|
-
import util from 'eoss-ui/src/utils/util';
|
|
448
|
-
export default {
|
|
449
|
-
name: 'EsFlowGroup',
|
|
450
|
-
inject: {
|
|
451
|
-
esDialog: {
|
|
452
|
-
default: ''
|
|
453
|
-
},
|
|
454
|
-
injector: {
|
|
455
|
-
default: ''
|
|
456
|
-
}
|
|
457
|
-
},
|
|
458
|
-
props: {
|
|
459
|
-
// autoId: {
|
|
460
|
-
// type: Boolean,
|
|
461
|
-
// default: true
|
|
462
|
-
// },
|
|
463
|
-
active: {
|
|
464
|
-
type: String,
|
|
465
|
-
default: '0'
|
|
466
|
-
},
|
|
467
|
-
contents: Array,
|
|
468
|
-
closeDialog: {
|
|
469
|
-
type: Boolean,
|
|
470
|
-
default: true
|
|
471
|
-
},
|
|
472
|
-
flow: Object,
|
|
473
|
-
events: Object,
|
|
474
|
-
recordid: String,
|
|
475
|
-
pendingId: String,
|
|
476
|
-
arcurl: String,
|
|
477
|
-
itemname: String,
|
|
478
|
-
show: {
|
|
479
|
-
type: Boolean,
|
|
480
|
-
default: true
|
|
481
|
-
},
|
|
482
|
-
closeParent: {
|
|
483
|
-
type: Boolean,
|
|
484
|
-
default: true
|
|
485
|
-
},
|
|
486
|
-
appId: String,
|
|
487
|
-
zoom: false,
|
|
488
|
-
width: {
|
|
489
|
-
type: String,
|
|
490
|
-
default: '360px'
|
|
491
|
-
},
|
|
492
|
-
refs: String,
|
|
493
|
-
isSubmit: {
|
|
494
|
-
type: Boolean,
|
|
495
|
-
default: true
|
|
496
|
-
}
|
|
497
|
-
},
|
|
498
|
-
data() {
|
|
499
|
-
return {
|
|
500
|
-
activeName: this.active,
|
|
501
|
-
businessId: undefined,
|
|
502
|
-
taskExamineAppId: this.appId,
|
|
503
|
-
showMsg: true,
|
|
504
|
-
formRefs: this.refs,
|
|
505
|
-
submits: null
|
|
506
|
-
};
|
|
507
|
-
},
|
|
508
|
-
computed: {
|
|
509
|
-
tabs() {
|
|
510
|
-
return this.contents ? this.contents : [];
|
|
511
|
-
},
|
|
512
|
-
isShow() {
|
|
513
|
-
if (
|
|
514
|
-
this.flow &&
|
|
515
|
-
Object.prototype.hasOwnProperty.call(this.flow, 'show')
|
|
516
|
-
) {
|
|
517
|
-
return this.flow.show;
|
|
518
|
-
}
|
|
519
|
-
let flow = util.getParams({ name: 'flow' });
|
|
520
|
-
if (flow == 0) {
|
|
521
|
-
return false;
|
|
522
|
-
}
|
|
523
|
-
return this.show;
|
|
524
|
-
},
|
|
525
|
-
_flow() {
|
|
526
|
-
return !this.flow.pendingId
|
|
527
|
-
? { ...this.flow, pendingId: this.pendingId }
|
|
528
|
-
: this.flow;
|
|
529
|
-
}
|
|
530
|
-
},
|
|
531
|
-
watch: {
|
|
532
|
-
activeName(val) {
|
|
533
|
-
this.$emit('update:active', val);
|
|
534
|
-
},
|
|
535
|
-
businessId(val) {
|
|
536
|
-
this.handleChangeData({ businessId: val });
|
|
537
|
-
}
|
|
538
|
-
},
|
|
539
|
-
created() {
|
|
540
|
-
if (this.flow.businessId || this.flow.pendingId) {
|
|
541
|
-
this.businessId = this.flow.businessId || this.flow.pendingId;
|
|
542
|
-
}
|
|
543
|
-
},
|
|
544
|
-
mounted() {},
|
|
545
|
-
methods: {
|
|
546
|
-
handleHide(res) {
|
|
547
|
-
return typeof res === 'boolean'
|
|
548
|
-
? !res
|
|
549
|
-
: typeof res === 'string'
|
|
550
|
-
? this[res]
|
|
551
|
-
: true;
|
|
552
|
-
},
|
|
553
|
-
handleExclAttribute({ data, attrs }) {
|
|
554
|
-
if (!attrs || !attrs.length) {
|
|
555
|
-
this.ref && (this.formRefs = this.ref);
|
|
556
|
-
return data;
|
|
557
|
-
}
|
|
558
|
-
return util.exclAttribute({
|
|
559
|
-
data: data,
|
|
560
|
-
attrs: attrs
|
|
561
|
-
});
|
|
562
|
-
},
|
|
563
|
-
handleUrlJoinParams(res, flag = true) {
|
|
564
|
-
let url = res.url;
|
|
565
|
-
if (flag) {
|
|
566
|
-
if (res.method) {
|
|
567
|
-
this.submit = {
|
|
568
|
-
id: res.id,
|
|
569
|
-
url: url,
|
|
570
|
-
method: typeof res.method === 'boolean' ? 'submit' : res.method
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
let param = util.extend(
|
|
575
|
-
{},
|
|
576
|
-
{ id: this.businessId, appId: this.taskExamineAppId },
|
|
577
|
-
res.param || {}
|
|
578
|
-
);
|
|
579
|
-
return util.urlJoinParams({ url, param });
|
|
580
|
-
},
|
|
581
|
-
handleBefore(active, old) {
|
|
582
|
-
return new Promise((resolve, reject) => {
|
|
583
|
-
let n = parseInt(active, 10);
|
|
584
|
-
let item = this.tabs[n];
|
|
585
|
-
let url = null;
|
|
586
|
-
let name = item.name;
|
|
587
|
-
let width = 0;
|
|
588
|
-
let height = 0;
|
|
589
|
-
let win = util.win.top;
|
|
590
|
-
width = win.screen.availWidth - 10;
|
|
591
|
-
height = win.screen.availHeight - 60;
|
|
592
|
-
if (item.url) {
|
|
593
|
-
url = this.handleUrlJoinParams(item);
|
|
594
|
-
}
|
|
595
|
-
if (
|
|
596
|
-
item.contents &&
|
|
597
|
-
item.contents.type === 'iframe' &&
|
|
598
|
-
item.contents.blank
|
|
599
|
-
) {
|
|
600
|
-
item.contents.name && (name = item.contents.name);
|
|
601
|
-
url = this.handleUrlJoinParams(item.contents);
|
|
602
|
-
}
|
|
603
|
-
if (url) {
|
|
604
|
-
reject();
|
|
605
|
-
util.win.open(
|
|
606
|
-
url,
|
|
607
|
-
name,
|
|
608
|
-
`width=${width}px,height=${height}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
|
|
609
|
-
);
|
|
610
|
-
} else {
|
|
611
|
-
resolve();
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
},
|
|
615
|
-
handleSubmit(res) {
|
|
616
|
-
if (this.submit) {
|
|
617
|
-
if (this.submit.id) {
|
|
618
|
-
let iframe = document.getElementById(this.submit.id); //先找到ifram
|
|
619
|
-
|
|
620
|
-
if (this.submit.url) {
|
|
621
|
-
let url = new URL(this.submit.url);
|
|
622
|
-
let origin = url.origin;
|
|
623
|
-
let _origin = util.win.location.origin;
|
|
624
|
-
if (origin != _origin) {
|
|
625
|
-
iframe.contentWindow.postMessage({ submit: res }, '*');
|
|
626
|
-
return new Promise((resolve, reject) => {
|
|
627
|
-
window.addEventListener('message', function (obj) {
|
|
628
|
-
if (obj.origin == origin) {
|
|
629
|
-
let results = obj.data;
|
|
630
|
-
if (results.code == 0) {
|
|
631
|
-
resolve();
|
|
632
|
-
} else {
|
|
633
|
-
reject();
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
});
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
return iframe.contentWindow[this.submit.method](res); //用dom对象调用子页面的方法
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
let esFlowForm = this.formRefs
|
|
644
|
-
? this.$refs[this.formRefs]
|
|
645
|
-
: this.$refs.esFlowForm;
|
|
646
|
-
if (Array.isArray(esFlowForm)) {
|
|
647
|
-
esFlowForm = esFlowForm[0];
|
|
648
|
-
}
|
|
649
|
-
esFlowForm;
|
|
650
|
-
this.showMsg = res == 1 ? false : true;
|
|
651
|
-
return esFlowForm.submitData(undefined, false, {}, res);
|
|
652
|
-
},
|
|
653
|
-
handleTaskRead(res) {
|
|
654
|
-
if (res.data.taskExamine && res.data.taskExamine.appId) {
|
|
655
|
-
this.taskExamineAppId = res.data.taskExamine.appId;
|
|
656
|
-
this.injector &&
|
|
657
|
-
this.injector.handleChangeData({ appId: this.taskExamineAppId });
|
|
658
|
-
}
|
|
659
|
-
},
|
|
660
|
-
handleEndMessageChange(val){
|
|
661
|
-
this.$emit('endMessageChange',val)
|
|
662
|
-
},
|
|
663
|
-
handleSuccess() {
|
|
664
|
-
if (this.closeDialog && this.esDialog) {
|
|
665
|
-
this.esDialog.handleClose();
|
|
666
|
-
} else if (util.win.top.COOS_SDK) {
|
|
667
|
-
util.win.top.COOS_SDK.closePopup && util.win.top.COOS_SDK.closePopup();
|
|
668
|
-
} else if (util.win.top.opener) {
|
|
669
|
-
util.win.top.close();
|
|
670
|
-
}
|
|
671
|
-
if (this.events && this.events.success) {
|
|
672
|
-
this.events.success();
|
|
673
|
-
}
|
|
674
|
-
this.$emit('success');
|
|
675
|
-
},
|
|
676
|
-
handleSave(id, event) {
|
|
677
|
-
if (this.closeDialog && this.esDialog) {
|
|
678
|
-
this.esDialog.handleClose();
|
|
679
|
-
}
|
|
680
|
-
this.events && this.events.save(id, event);
|
|
681
|
-
this.$emit('save', id, event);
|
|
682
|
-
},
|
|
683
|
-
handleChangeId(id) {
|
|
684
|
-
this.businessId = id;
|
|
685
|
-
},
|
|
686
|
-
handleChangeData(res) {
|
|
687
|
-
this.$emit('changeData', res);
|
|
688
|
-
this.$emit('change-data', res);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
};
|
|
692
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="es-flow-group" :class="{ 'is-hide-flow': !isShow }">
|
|
3
|
+
<div class="es-flow-group-main">
|
|
4
|
+
<el-tabs
|
|
5
|
+
class="es-flow-tabs es-tabs"
|
|
6
|
+
type="border-card"
|
|
7
|
+
v-model="activeName"
|
|
8
|
+
ref="tabs"
|
|
9
|
+
:before-leave="handleBefore"
|
|
10
|
+
>
|
|
11
|
+
<template v-for="(items, indexs) in tabs">
|
|
12
|
+
<el-tab-pane
|
|
13
|
+
v-if="handleHide(items.hide)"
|
|
14
|
+
:key="items.id || indexs"
|
|
15
|
+
:immediate="items.label === '流程图' ? false : items.immediate"
|
|
16
|
+
:name="String(indexs)"
|
|
17
|
+
:class="{ 'es-flex-vertical': items.average }"
|
|
18
|
+
>
|
|
19
|
+
<span
|
|
20
|
+
slot="label"
|
|
21
|
+
:style="{
|
|
22
|
+
color:
|
|
23
|
+
activeName == String(indexs) ? items.activeColor : items.color
|
|
24
|
+
}"
|
|
25
|
+
>
|
|
26
|
+
<template v-if="items.title">
|
|
27
|
+
<template v-if="typeof items.title === 'object'">
|
|
28
|
+
<i v-if="items.title.icon" :class="items.title.icon"></i>
|
|
29
|
+
<el-badge
|
|
30
|
+
v-if="items.title.count"
|
|
31
|
+
type="primary"
|
|
32
|
+
:value="items.title.count"
|
|
33
|
+
:color="items.title.color"
|
|
34
|
+
:max="99"
|
|
35
|
+
>{{ items.title.text }}
|
|
36
|
+
</el-badge>
|
|
37
|
+
<template v-else>{{ items.title.text }}</template>
|
|
38
|
+
</template>
|
|
39
|
+
<template v-else>{{ items.title }}</template>
|
|
40
|
+
</template>
|
|
41
|
+
<template>{{ items.label }}</template>
|
|
42
|
+
</span>
|
|
43
|
+
<es-tabs-panel v-bind="items" :show="activeName === String(indexs)">
|
|
44
|
+
<template
|
|
45
|
+
slot-scope="{ contents, average, data, title, show, isShow }"
|
|
46
|
+
>
|
|
47
|
+
<template v-if="Array.isArray(contents)">
|
|
48
|
+
<template v-for="(item, index) in contents">
|
|
49
|
+
<div class="es-tab-pane-list" :key="index" v-if="average">
|
|
50
|
+
<div class="es-tab-pane-main">
|
|
51
|
+
<es-flow-list
|
|
52
|
+
v-if="
|
|
53
|
+
item.type === 'flow-list' ||
|
|
54
|
+
item.type === 'flowList'
|
|
55
|
+
"
|
|
56
|
+
:businessId="businessId"
|
|
57
|
+
v-bind="
|
|
58
|
+
handleExclAttribute({
|
|
59
|
+
data: item,
|
|
60
|
+
attrs: ['events', 'visible', 'type']
|
|
61
|
+
})
|
|
62
|
+
"
|
|
63
|
+
:display="activeName === String(indexs)"
|
|
64
|
+
:key="index"
|
|
65
|
+
></es-flow-list>
|
|
66
|
+
<es-data-table
|
|
67
|
+
v-if="
|
|
68
|
+
item.type === 'data-table' ||
|
|
69
|
+
item.type === 'dataTable'
|
|
70
|
+
"
|
|
71
|
+
:appId="taskExamineAppId"
|
|
72
|
+
v-bind="
|
|
73
|
+
handleExclAttribute({
|
|
74
|
+
data: item,
|
|
75
|
+
attrs: ['events', 'visible', 'type']
|
|
76
|
+
})
|
|
77
|
+
"
|
|
78
|
+
:class="{
|
|
79
|
+
'es-flow-group-data-table':
|
|
80
|
+
item.type === 'data-table' ||
|
|
81
|
+
item.type === 'dataTable'
|
|
82
|
+
}"
|
|
83
|
+
:display="activeName === String(indexs)"
|
|
84
|
+
v-on="item.events"
|
|
85
|
+
>
|
|
86
|
+
<template v-if="item.dialog" slot="dialog">
|
|
87
|
+
<template v-if="Array.isArray(item.dialog)">
|
|
88
|
+
<es-dialog
|
|
89
|
+
v-for="(ele, ids) in item.dialog"
|
|
90
|
+
:isReload="true"
|
|
91
|
+
v-bind="ele"
|
|
92
|
+
:key="ids"
|
|
93
|
+
:visible.sync="ele.visible"
|
|
94
|
+
v-on="{ ...ele.events }"
|
|
95
|
+
>
|
|
96
|
+
</es-dialog>
|
|
97
|
+
</template>
|
|
98
|
+
<es-dialog
|
|
99
|
+
v-else
|
|
100
|
+
:isReload="true"
|
|
101
|
+
v-bind="item.dialog"
|
|
102
|
+
:visible.sync="item.dialog.visible"
|
|
103
|
+
v-on="{ ...item.dialog.events }"
|
|
104
|
+
>
|
|
105
|
+
</es-dialog>
|
|
106
|
+
</template>
|
|
107
|
+
</es-data-table>
|
|
108
|
+
<es-tree-group
|
|
109
|
+
v-if="
|
|
110
|
+
item.type === 'tree-group' ||
|
|
111
|
+
item.type === 'treeGroup'
|
|
112
|
+
"
|
|
113
|
+
:appId="taskExamineAppId"
|
|
114
|
+
v-bind="
|
|
115
|
+
handleExclAttribute({
|
|
116
|
+
data: item,
|
|
117
|
+
attrs: ['events', 'visible', 'type']
|
|
118
|
+
})
|
|
119
|
+
"
|
|
120
|
+
:display="activeName === String(indexs)"
|
|
121
|
+
v-on="{ ...item.events }"
|
|
122
|
+
></es-tree-group>
|
|
123
|
+
<iframe
|
|
124
|
+
v-if="item.type === 'iframe' && !item.blank"
|
|
125
|
+
:id="item.id || item.name"
|
|
126
|
+
:name="item.name"
|
|
127
|
+
frameborder="0"
|
|
128
|
+
width="100%"
|
|
129
|
+
height="100%"
|
|
130
|
+
:src="handleUrlJoinParams(item)"
|
|
131
|
+
></iframe>
|
|
132
|
+
<es-upload
|
|
133
|
+
v-if="item.type === 'attachment'"
|
|
134
|
+
:file-count.sync="title.count"
|
|
135
|
+
height="auto"
|
|
136
|
+
class="es-attachment"
|
|
137
|
+
:ownId="businessId"
|
|
138
|
+
v-bind="
|
|
139
|
+
handleExclAttribute({
|
|
140
|
+
data: item,
|
|
141
|
+
attrs: ['events', 'type']
|
|
142
|
+
})
|
|
143
|
+
"
|
|
144
|
+
:display="activeName === String(indexs)"
|
|
145
|
+
v-on="{ ...item.events }"
|
|
146
|
+
></es-upload>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
<template v-else>
|
|
150
|
+
<es-form
|
|
151
|
+
v-if="item.type === 'form'"
|
|
152
|
+
ref="esFlowForm"
|
|
153
|
+
:showMsg="showMsg"
|
|
154
|
+
v-bind="
|
|
155
|
+
handleExclAttribute({
|
|
156
|
+
data: item,
|
|
157
|
+
attrs: ['events', 'visible', 'type', 'model', 'ref']
|
|
158
|
+
})
|
|
159
|
+
"
|
|
160
|
+
full
|
|
161
|
+
:key="index"
|
|
162
|
+
:autoId="true"
|
|
163
|
+
:show-button="false"
|
|
164
|
+
:closeDialog="false"
|
|
165
|
+
:display="activeName === String(indexs)"
|
|
166
|
+
:model="item.model"
|
|
167
|
+
:businessId.sync="businessId"
|
|
168
|
+
v-on="{ ...item.events }"
|
|
169
|
+
></es-form>
|
|
170
|
+
<es-flow-list
|
|
171
|
+
v-if="
|
|
172
|
+
item.type === 'flow-list' || item.type === 'flowList'
|
|
173
|
+
"
|
|
174
|
+
:businessId="businessId"
|
|
175
|
+
v-bind="
|
|
176
|
+
handleExclAttribute({
|
|
177
|
+
data: item,
|
|
178
|
+
attrs: ['events', 'visible', 'type']
|
|
179
|
+
})
|
|
180
|
+
"
|
|
181
|
+
:display="activeName === String(indexs)"
|
|
182
|
+
:key="index"
|
|
183
|
+
></es-flow-list>
|
|
184
|
+
<es-data-table
|
|
185
|
+
v-if="
|
|
186
|
+
item.type === 'data-table' ||
|
|
187
|
+
item.type === 'dataTable'
|
|
188
|
+
"
|
|
189
|
+
:appId="taskExamineAppId"
|
|
190
|
+
v-bind="
|
|
191
|
+
handleExclAttribute({
|
|
192
|
+
data: item,
|
|
193
|
+
attrs: ['events', 'visible', 'type']
|
|
194
|
+
})
|
|
195
|
+
"
|
|
196
|
+
:key="index"
|
|
197
|
+
:class="{
|
|
198
|
+
'es-flow-group-data-table':
|
|
199
|
+
item.type === 'data-table' ||
|
|
200
|
+
item.type === 'dataTable'
|
|
201
|
+
}"
|
|
202
|
+
:display="activeName === String(indexs)"
|
|
203
|
+
v-on="item.events"
|
|
204
|
+
>
|
|
205
|
+
<template v-if="item.dialog" slot="dialog">
|
|
206
|
+
<template v-if="Array.isArray(item.dialog)">
|
|
207
|
+
<es-dialog
|
|
208
|
+
v-for="(ele, ids) in item.dialog"
|
|
209
|
+
:isReload="true"
|
|
210
|
+
v-bind="ele"
|
|
211
|
+
:key="ids"
|
|
212
|
+
:visible.sync="ele.visible"
|
|
213
|
+
v-on="{ ...ele.events }"
|
|
214
|
+
>
|
|
215
|
+
</es-dialog>
|
|
216
|
+
</template>
|
|
217
|
+
<es-dialog
|
|
218
|
+
v-else
|
|
219
|
+
:isReload="true"
|
|
220
|
+
v-bind="item.dialog"
|
|
221
|
+
:visible.sync="item.dialog.visible"
|
|
222
|
+
v-on="{ ...item.dialog.events }"
|
|
223
|
+
>
|
|
224
|
+
</es-dialog>
|
|
225
|
+
</template>
|
|
226
|
+
</es-data-table>
|
|
227
|
+
<es-tree-group
|
|
228
|
+
v-if="
|
|
229
|
+
item.type === 'tree-group' ||
|
|
230
|
+
item.type === 'treeGroup'
|
|
231
|
+
"
|
|
232
|
+
:appId="taskExamineAppId"
|
|
233
|
+
v-bind="
|
|
234
|
+
handleExclAttribute({
|
|
235
|
+
data: item,
|
|
236
|
+
attrs: ['events', 'visible', 'type']
|
|
237
|
+
})
|
|
238
|
+
"
|
|
239
|
+
:key="index"
|
|
240
|
+
:display="activeName === String(indexs)"
|
|
241
|
+
v-on="{ ...item.events }"
|
|
242
|
+
></es-tree-group>
|
|
243
|
+
<iframe
|
|
244
|
+
v-if="item.type === 'iframe' && !item.blank"
|
|
245
|
+
frameborder="0"
|
|
246
|
+
width="100%"
|
|
247
|
+
height="100%"
|
|
248
|
+
:key="index"
|
|
249
|
+
:id="item.id || item.name"
|
|
250
|
+
:name="item.name"
|
|
251
|
+
:src="handleUrlJoinParams(item)"
|
|
252
|
+
></iframe>
|
|
253
|
+
<es-upload
|
|
254
|
+
v-if="item.type === 'attachment'"
|
|
255
|
+
height="auto"
|
|
256
|
+
class="es-attachment"
|
|
257
|
+
:ownId="businessId"
|
|
258
|
+
v-bind="
|
|
259
|
+
handleExclAttribute({
|
|
260
|
+
data: item,
|
|
261
|
+
attrs: ['events', 'type']
|
|
262
|
+
})
|
|
263
|
+
"
|
|
264
|
+
:key="index"
|
|
265
|
+
:file-count.sync="title.count"
|
|
266
|
+
:display="activeName === String(indexs)"
|
|
267
|
+
v-on="{ ...item.events }"
|
|
268
|
+
></es-upload>
|
|
269
|
+
<es-dialog
|
|
270
|
+
v-if="
|
|
271
|
+
item.type === 'dialog' &&
|
|
272
|
+
activeName === String(indexs)
|
|
273
|
+
"
|
|
274
|
+
:isReload="true"
|
|
275
|
+
v-bind="item"
|
|
276
|
+
:key="index"
|
|
277
|
+
:visible.sync="item.visible"
|
|
278
|
+
v-on="{ ...item.events }"
|
|
279
|
+
>
|
|
280
|
+
</es-dialog>
|
|
281
|
+
<component
|
|
282
|
+
v-if="item.component || item.type == 'component'"
|
|
283
|
+
:is="item.is || item.type"
|
|
284
|
+
show
|
|
285
|
+
isShow
|
|
286
|
+
v-bind="
|
|
287
|
+
handleExclAttribute({
|
|
288
|
+
data: item,
|
|
289
|
+
attrs: ['is', 'type']
|
|
290
|
+
})
|
|
291
|
+
"
|
|
292
|
+
></component>
|
|
293
|
+
</template>
|
|
294
|
+
</template>
|
|
295
|
+
</template>
|
|
296
|
+
<template v-else>
|
|
297
|
+
<component
|
|
298
|
+
v-if="contents.component || contents.type == 'component'"
|
|
299
|
+
:is="contents.is || contents.type"
|
|
300
|
+
show
|
|
301
|
+
isShow
|
|
302
|
+
v-bind="
|
|
303
|
+
handleExclAttribute({
|
|
304
|
+
data: contents,
|
|
305
|
+
attrs: ['is', 'type']
|
|
306
|
+
})
|
|
307
|
+
"
|
|
308
|
+
></component>
|
|
309
|
+
<es-form
|
|
310
|
+
v-if="contents.type === 'form'"
|
|
311
|
+
:show-button="false"
|
|
312
|
+
ref="esFlowForm"
|
|
313
|
+
:showMsg="showMsg"
|
|
314
|
+
v-bind="
|
|
315
|
+
handleExclAttribute({
|
|
316
|
+
data: contents,
|
|
317
|
+
attrs: ['events', 'visible', 'type', 'model', 'ref']
|
|
318
|
+
})
|
|
319
|
+
"
|
|
320
|
+
full
|
|
321
|
+
:autoId="true"
|
|
322
|
+
:businessId.sync="businessId"
|
|
323
|
+
:closeDialog="false"
|
|
324
|
+
:display="activeName === String(indexs)"
|
|
325
|
+
:model="contents.model"
|
|
326
|
+
v-on="{ ...contents.events }"
|
|
327
|
+
></es-form>
|
|
328
|
+
<es-flow-list
|
|
329
|
+
v-if="
|
|
330
|
+
contents.type === 'flow-list' ||
|
|
331
|
+
contents.type === 'flowList'
|
|
332
|
+
"
|
|
333
|
+
:businessId="businessId"
|
|
334
|
+
v-bind="
|
|
335
|
+
handleExclAttribute({
|
|
336
|
+
data: contents,
|
|
337
|
+
attrs: ['events', 'visible', 'type']
|
|
338
|
+
})
|
|
339
|
+
"
|
|
340
|
+
:display="activeName === String(indexs)"
|
|
341
|
+
></es-flow-list>
|
|
342
|
+
<es-data-table
|
|
343
|
+
v-if="
|
|
344
|
+
contents.type === 'data-table' ||
|
|
345
|
+
contents.type === 'dataTable'
|
|
346
|
+
"
|
|
347
|
+
:appId="taskExamineAppId"
|
|
348
|
+
v-bind="
|
|
349
|
+
handleExclAttribute({
|
|
350
|
+
data: contents,
|
|
351
|
+
attrs: ['events', 'visible', 'type']
|
|
352
|
+
})
|
|
353
|
+
"
|
|
354
|
+
:class="{
|
|
355
|
+
'es-flow-group-data-table':
|
|
356
|
+
contents.type === 'data-table' ||
|
|
357
|
+
contents.type === 'dataTable'
|
|
358
|
+
}"
|
|
359
|
+
:display="activeName === String(indexs)"
|
|
360
|
+
v-on="contents.events"
|
|
361
|
+
>
|
|
362
|
+
<template v-if="contents.dialog" slot="dialog">
|
|
363
|
+
<template v-if="Array.isArray(contents.dialog)">
|
|
364
|
+
<es-dialog
|
|
365
|
+
v-for="(ele, ids) in contents.dialog"
|
|
366
|
+
:isReload="true"
|
|
367
|
+
v-bind="ele"
|
|
368
|
+
:key="ids"
|
|
369
|
+
:visible.sync="ele.visible"
|
|
370
|
+
v-on="{ ...ele.events }"
|
|
371
|
+
>
|
|
372
|
+
</es-dialog>
|
|
373
|
+
</template>
|
|
374
|
+
<es-dialog
|
|
375
|
+
v-else
|
|
376
|
+
:isReload="true"
|
|
377
|
+
v-bind="contents.dialog"
|
|
378
|
+
:visible.sync="contents.dialog.visible"
|
|
379
|
+
v-on="{ ...contents.dialog.events }"
|
|
380
|
+
>
|
|
381
|
+
</es-dialog>
|
|
382
|
+
</template>
|
|
383
|
+
</es-data-table>
|
|
384
|
+
<es-tree-group
|
|
385
|
+
v-if="
|
|
386
|
+
contents.type === 'tree-group' ||
|
|
387
|
+
contents.type === 'treeGroup'
|
|
388
|
+
"
|
|
389
|
+
:appId="taskExamineAppId"
|
|
390
|
+
v-bind="
|
|
391
|
+
handleExclAttribute({
|
|
392
|
+
data: contents,
|
|
393
|
+
attrs: ['events', 'visible', 'type']
|
|
394
|
+
})
|
|
395
|
+
"
|
|
396
|
+
:display="activeName === String(indexs)"
|
|
397
|
+
v-on="{ ...contents.events }"
|
|
398
|
+
></es-tree-group>
|
|
399
|
+
<iframe
|
|
400
|
+
v-if="contents.type === 'iframe' && !contents.blank"
|
|
401
|
+
:id="contents.id || contents.name"
|
|
402
|
+
:name="contents.name"
|
|
403
|
+
frameborder="0"
|
|
404
|
+
width="100%"
|
|
405
|
+
height="100%"
|
|
406
|
+
:src="handleUrlJoinParams(contents)"
|
|
407
|
+
></iframe>
|
|
408
|
+
<es-upload
|
|
409
|
+
v-if="contents.type === 'attachment'"
|
|
410
|
+
:ownId="businessId"
|
|
411
|
+
v-bind="
|
|
412
|
+
handleExclAttribute({
|
|
413
|
+
data: contents,
|
|
414
|
+
attrs: ['events', 'type']
|
|
415
|
+
})
|
|
416
|
+
"
|
|
417
|
+
:file-count.sync="title.count"
|
|
418
|
+
:display="activeName === String(indexs)"
|
|
419
|
+
height="auto"
|
|
420
|
+
class="es-attachment"
|
|
421
|
+
v-on="{ ...contents.events }"
|
|
422
|
+
></es-upload>
|
|
423
|
+
</template>
|
|
424
|
+
</template>
|
|
425
|
+
</es-tabs-panel>
|
|
426
|
+
</el-tab-pane>
|
|
427
|
+
</template>
|
|
428
|
+
</el-tabs>
|
|
429
|
+
</div>
|
|
430
|
+
<es-flow
|
|
431
|
+
v-if="isShow"
|
|
432
|
+
class="es-group-flow"
|
|
433
|
+
v-bind="_flow"
|
|
434
|
+
:width="width"
|
|
435
|
+
:before-submit="isSubmit ? handleSubmit : undefined"
|
|
436
|
+
:businessId="businessId"
|
|
437
|
+
@startTaskRead="handleTaskRead"
|
|
438
|
+
@success="handleSuccess"
|
|
439
|
+
@save="handleSave"
|
|
440
|
+
@endMessageChange="handleEndMessageChange"
|
|
441
|
+
:closeParent="closeParent"
|
|
442
|
+
></es-flow>
|
|
443
|
+
<slot></slot>
|
|
444
|
+
</div>
|
|
445
|
+
</template>
|
|
446
|
+
<script>
|
|
447
|
+
import util from 'eoss-ui/src/utils/util';
|
|
448
|
+
export default {
|
|
449
|
+
name: 'EsFlowGroup',
|
|
450
|
+
inject: {
|
|
451
|
+
esDialog: {
|
|
452
|
+
default: ''
|
|
453
|
+
},
|
|
454
|
+
injector: {
|
|
455
|
+
default: ''
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
props: {
|
|
459
|
+
// autoId: {
|
|
460
|
+
// type: Boolean,
|
|
461
|
+
// default: true
|
|
462
|
+
// },
|
|
463
|
+
active: {
|
|
464
|
+
type: String,
|
|
465
|
+
default: '0'
|
|
466
|
+
},
|
|
467
|
+
contents: Array,
|
|
468
|
+
closeDialog: {
|
|
469
|
+
type: Boolean,
|
|
470
|
+
default: true
|
|
471
|
+
},
|
|
472
|
+
flow: Object,
|
|
473
|
+
events: Object,
|
|
474
|
+
recordid: String,
|
|
475
|
+
pendingId: String,
|
|
476
|
+
arcurl: String,
|
|
477
|
+
itemname: String,
|
|
478
|
+
show: {
|
|
479
|
+
type: Boolean,
|
|
480
|
+
default: true
|
|
481
|
+
},
|
|
482
|
+
closeParent: {
|
|
483
|
+
type: Boolean,
|
|
484
|
+
default: true
|
|
485
|
+
},
|
|
486
|
+
appId: String,
|
|
487
|
+
zoom: false,
|
|
488
|
+
width: {
|
|
489
|
+
type: String,
|
|
490
|
+
default: '360px'
|
|
491
|
+
},
|
|
492
|
+
refs: String,
|
|
493
|
+
isSubmit: {
|
|
494
|
+
type: Boolean,
|
|
495
|
+
default: true
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
data() {
|
|
499
|
+
return {
|
|
500
|
+
activeName: this.active,
|
|
501
|
+
businessId: undefined,
|
|
502
|
+
taskExamineAppId: this.appId,
|
|
503
|
+
showMsg: true,
|
|
504
|
+
formRefs: this.refs,
|
|
505
|
+
submits: null
|
|
506
|
+
};
|
|
507
|
+
},
|
|
508
|
+
computed: {
|
|
509
|
+
tabs() {
|
|
510
|
+
return this.contents ? this.contents : [];
|
|
511
|
+
},
|
|
512
|
+
isShow() {
|
|
513
|
+
if (
|
|
514
|
+
this.flow &&
|
|
515
|
+
Object.prototype.hasOwnProperty.call(this.flow, 'show')
|
|
516
|
+
) {
|
|
517
|
+
return this.flow.show;
|
|
518
|
+
}
|
|
519
|
+
let flow = util.getParams({ name: 'flow' });
|
|
520
|
+
if (flow == 0) {
|
|
521
|
+
return false;
|
|
522
|
+
}
|
|
523
|
+
return this.show;
|
|
524
|
+
},
|
|
525
|
+
_flow() {
|
|
526
|
+
return !this.flow.pendingId
|
|
527
|
+
? { ...this.flow, pendingId: this.pendingId }
|
|
528
|
+
: this.flow;
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
watch: {
|
|
532
|
+
activeName(val) {
|
|
533
|
+
this.$emit('update:active', val);
|
|
534
|
+
},
|
|
535
|
+
businessId(val) {
|
|
536
|
+
this.handleChangeData({ businessId: val });
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
created() {
|
|
540
|
+
if (this.flow.businessId || this.flow.pendingId) {
|
|
541
|
+
this.businessId = this.flow.businessId || this.flow.pendingId;
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
mounted() {},
|
|
545
|
+
methods: {
|
|
546
|
+
handleHide(res) {
|
|
547
|
+
return typeof res === 'boolean'
|
|
548
|
+
? !res
|
|
549
|
+
: typeof res === 'string'
|
|
550
|
+
? this[res]
|
|
551
|
+
: true;
|
|
552
|
+
},
|
|
553
|
+
handleExclAttribute({ data, attrs }) {
|
|
554
|
+
if (!attrs || !attrs.length) {
|
|
555
|
+
this.ref && (this.formRefs = this.ref);
|
|
556
|
+
return data;
|
|
557
|
+
}
|
|
558
|
+
return util.exclAttribute({
|
|
559
|
+
data: data,
|
|
560
|
+
attrs: attrs
|
|
561
|
+
});
|
|
562
|
+
},
|
|
563
|
+
handleUrlJoinParams(res, flag = true) {
|
|
564
|
+
let url = res.url;
|
|
565
|
+
if (flag) {
|
|
566
|
+
if (res.method) {
|
|
567
|
+
this.submit = {
|
|
568
|
+
id: res.id,
|
|
569
|
+
url: url,
|
|
570
|
+
method: typeof res.method === 'boolean' ? 'submit' : res.method
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
let param = util.extend(
|
|
575
|
+
{},
|
|
576
|
+
{ id: this.businessId, appId: this.taskExamineAppId },
|
|
577
|
+
res.param || {}
|
|
578
|
+
);
|
|
579
|
+
return util.urlJoinParams({ url, param });
|
|
580
|
+
},
|
|
581
|
+
handleBefore(active, old) {
|
|
582
|
+
return new Promise((resolve, reject) => {
|
|
583
|
+
let n = parseInt(active, 10);
|
|
584
|
+
let item = this.tabs[n];
|
|
585
|
+
let url = null;
|
|
586
|
+
let name = item.name;
|
|
587
|
+
let width = 0;
|
|
588
|
+
let height = 0;
|
|
589
|
+
let win = util.win.top;
|
|
590
|
+
width = win.screen.availWidth - 10;
|
|
591
|
+
height = win.screen.availHeight - 60;
|
|
592
|
+
if (item.url) {
|
|
593
|
+
url = this.handleUrlJoinParams(item);
|
|
594
|
+
}
|
|
595
|
+
if (
|
|
596
|
+
item.contents &&
|
|
597
|
+
item.contents.type === 'iframe' &&
|
|
598
|
+
item.contents.blank
|
|
599
|
+
) {
|
|
600
|
+
item.contents.name && (name = item.contents.name);
|
|
601
|
+
url = this.handleUrlJoinParams(item.contents);
|
|
602
|
+
}
|
|
603
|
+
if (url) {
|
|
604
|
+
reject();
|
|
605
|
+
util.win.open(
|
|
606
|
+
url,
|
|
607
|
+
name,
|
|
608
|
+
`width=${width}px,height=${height}px,resizable=yes,status=yes,menubar=no,scrollbars=yes`
|
|
609
|
+
);
|
|
610
|
+
} else {
|
|
611
|
+
resolve();
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
},
|
|
615
|
+
handleSubmit(res) {
|
|
616
|
+
if (this.submit) {
|
|
617
|
+
if (this.submit.id) {
|
|
618
|
+
let iframe = document.getElementById(this.submit.id); //先找到ifram
|
|
619
|
+
|
|
620
|
+
if (this.submit.url) {
|
|
621
|
+
let url = new URL(this.submit.url);
|
|
622
|
+
let origin = url.origin;
|
|
623
|
+
let _origin = util.win.location.origin;
|
|
624
|
+
if (origin != _origin) {
|
|
625
|
+
iframe.contentWindow.postMessage({ submit: res }, '*');
|
|
626
|
+
return new Promise((resolve, reject) => {
|
|
627
|
+
window.addEventListener('message', function (obj) {
|
|
628
|
+
if (obj.origin == origin) {
|
|
629
|
+
let results = obj.data;
|
|
630
|
+
if (results.code == 0) {
|
|
631
|
+
resolve();
|
|
632
|
+
} else {
|
|
633
|
+
reject();
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
return iframe.contentWindow[this.submit.method](res); //用dom对象调用子页面的方法
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
let esFlowForm = this.formRefs
|
|
644
|
+
? this.$refs[this.formRefs]
|
|
645
|
+
: this.$refs.esFlowForm;
|
|
646
|
+
if (Array.isArray(esFlowForm)) {
|
|
647
|
+
esFlowForm = esFlowForm[0];
|
|
648
|
+
}
|
|
649
|
+
esFlowForm;
|
|
650
|
+
this.showMsg = res == 1 ? false : true;
|
|
651
|
+
return esFlowForm.submitData(undefined, false, {}, res);
|
|
652
|
+
},
|
|
653
|
+
handleTaskRead(res) {
|
|
654
|
+
if (res.data.taskExamine && res.data.taskExamine.appId) {
|
|
655
|
+
this.taskExamineAppId = res.data.taskExamine.appId;
|
|
656
|
+
this.injector &&
|
|
657
|
+
this.injector.handleChangeData({ appId: this.taskExamineAppId });
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
handleEndMessageChange(val){
|
|
661
|
+
this.$emit('endMessageChange',val)
|
|
662
|
+
},
|
|
663
|
+
handleSuccess() {
|
|
664
|
+
if (this.closeDialog && this.esDialog) {
|
|
665
|
+
this.esDialog.handleClose();
|
|
666
|
+
} else if (util.win.top.COOS_SDK) {
|
|
667
|
+
util.win.top.COOS_SDK.closePopup && util.win.top.COOS_SDK.closePopup();
|
|
668
|
+
} else if (util.win.top.opener) {
|
|
669
|
+
util.win.top.close();
|
|
670
|
+
}
|
|
671
|
+
if (this.events && this.events.success) {
|
|
672
|
+
this.events.success();
|
|
673
|
+
}
|
|
674
|
+
this.$emit('success');
|
|
675
|
+
},
|
|
676
|
+
handleSave(id, event) {
|
|
677
|
+
if (this.closeDialog && this.esDialog) {
|
|
678
|
+
this.esDialog.handleClose();
|
|
679
|
+
}
|
|
680
|
+
this.events && this.events.save(id, event);
|
|
681
|
+
this.$emit('save', id, event);
|
|
682
|
+
},
|
|
683
|
+
handleChangeId(id) {
|
|
684
|
+
this.businessId = id;
|
|
685
|
+
},
|
|
686
|
+
handleChangeData(res) {
|
|
687
|
+
this.$emit('changeData', res);
|
|
688
|
+
this.$emit('change-data', res);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
</script>
|