eoss 0.1.0-alpha.21 → 0.1.0-alpha.22
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/account-login.js +129 -129
- package/lib/alert.js +2 -2
- package/lib/aside.js +2 -2
- package/lib/autocomplete.js +216 -216
- package/lib/avatar.js +2 -2
- package/lib/backtop.js +2 -2
- package/lib/badge.js +2 -2
- package/lib/breadcrumb.js +2 -2
- package/lib/ca-login.js +6 -6
- package/lib/calendar.js +2 -2
- package/lib/card.js +2 -2
- package/lib/carousel-item.js +21 -21
- package/lib/carousel.js +16 -16
- package/lib/cascader-panel.js +6 -6
- package/lib/cascader.js +230 -230
- package/lib/checkbox-group.js +138 -138
- package/lib/col.js +2 -2
- package/lib/collapse-item.js +423 -410
- package/lib/collapse.js +426 -412
- package/lib/color-picker.js +23 -23
- package/lib/container.js +2 -2
- package/lib/cron.js +2 -2
- package/lib/data-table.js +123 -123
- package/lib/date-picker.js +233 -233
- package/lib/dialog.js +8 -8
- package/lib/divider.js +2 -2
- package/lib/drawer.js +4 -4
- package/lib/dropdown-item.js +2 -2
- package/lib/dropdown-menu.js +6 -6
- package/lib/dropdown.js +13 -13
- package/lib/email-login.js +124 -124
- package/lib/empty.js +2 -2
- package/lib/eoss.common.js +21948 -21788
- package/lib/flip.js +2 -2
- package/lib/flow-group.js +251 -251
- package/lib/flow.js +15934 -18947
- package/lib/flows.js +9195 -0
- package/lib/footer.js +2 -2
- package/lib/form-item.js +28 -17
- package/lib/form.js +426 -412
- package/lib/header.js +2 -2
- package/lib/icon.js +128 -128
- package/lib/icons.js +2 -2
- package/lib/image-viewer.js +6 -6
- package/lib/image.js +2 -2
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +2 -2
- package/lib/input.js +4 -4
- package/lib/link.js +2 -2
- package/lib/loading.js +4 -4
- package/lib/login.js +190 -156
- package/lib/lowcode.js +562 -272
- package/lib/main.js +348 -282
- package/lib/marquee.js +6 -6
- package/lib/menu.js +209 -209
- package/lib/message-box.js +8 -8
- package/lib/message.js +8 -8
- package/lib/notification.js +8 -8
- package/lib/option-group.js +2 -2
- package/lib/option.js +4 -4
- package/lib/page-header.js +2 -2
- package/lib/pagination.js +6 -6
- package/lib/phone-login.js +124 -124
- package/lib/popconfirm.js +2 -2
- package/lib/popover.js +209 -209
- package/lib/progress.js +2 -2
- package/lib/qr-code.js +2 -2
- package/lib/qrcode-login.js +123 -123
- package/lib/radio-group.js +121 -121
- package/lib/rate.js +4 -4
- package/lib/row.js +2 -2
- package/lib/scrollbar.js +6 -6
- package/lib/select.js +470 -457
- package/lib/selector-panel.js +141 -141
- package/lib/selector.js +130 -130
- package/lib/step.js +426 -412
- package/lib/steps.js +6 -6
- package/lib/submenu.js +4 -4
- package/lib/switch.js +4 -4
- package/lib/tab-pane.js +2 -2
- package/lib/table-column.js +6 -6
- package/lib/table.js +460 -460
- package/lib/tabs.js +6 -6
- package/lib/tag.js +2 -2
- package/lib/theme-chalk/autocomplete.css +1 -1
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/cascader-panel.css +1 -1
- package/lib/theme-chalk/cascader.css +1 -1
- package/lib/theme-chalk/checkbox-group.css +1 -1
- package/lib/theme-chalk/date-picker.css +1 -1
- package/lib/theme-chalk/descriptions-item.css +1 -1
- package/lib/theme-chalk/descriptions.css +1 -1
- package/lib/theme-chalk/empty.css +1 -1
- package/lib/theme-chalk/flow.css +1 -1
- package/lib/theme-chalk/flows.css +1 -0
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/input-number.css +1 -1
- package/lib/theme-chalk/input.css +1 -1
- package/lib/theme-chalk/lowcode.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/message-box.css +1 -1
- package/lib/theme-chalk/message.css +1 -1
- package/lib/theme-chalk/notification.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/scrollbar.css +1 -1
- package/lib/theme-chalk/select.css +1 -1
- package/lib/theme-chalk/selector-panel.css +1 -1
- package/lib/theme-chalk/selector.css +1 -1
- package/lib/theme-chalk/slider.css +1 -1
- package/lib/theme-chalk/table.css +1 -1
- package/lib/theme-chalk/tabs.css +1 -1
- package/lib/theme-chalk/time-picker.css +1 -1
- package/lib/theme-chalk/time-select.css +1 -1
- package/lib/theme-chalk/timeline-item.css +1 -1
- package/lib/theme-chalk/transfer.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/time-picker.js +8 -8
- package/lib/time-select.js +6 -6
- package/lib/timeline-item.js +2 -2
- package/lib/timeline.js +2 -2
- package/lib/tips.js +124 -124
- package/lib/toolbar.js +4 -4
- package/lib/tooltip.js +209 -209
- package/lib/transfer.js +4 -4
- package/lib/tree-group.js +122 -122
- package/lib/tree.js +121 -121
- package/lib/upload.js +131 -131
- package/package.json +1 -1
- package/packages/carousel/src/carousel.vue +2 -2
- package/packages/flow/index.js +4 -4
- package/packages/flow/src/component/FreeCirculation.vue +4 -3
- package/packages/flow/src/component/SendMsg.vue +2 -4
- package/packages/flow/src/component/opinions.vue +203 -226
- package/packages/flow/src/component/taskUnionExamine.vue +2 -4
- package/packages/flow/src/freeStartFlow.vue +2 -2
- package/packages/flow/src/selectUser.vue +36 -1
- package/packages/flow/src/supervise.vue +4 -2
- package/packages/flows/index.js +7 -0
- package/packages/flows/readme.md +600 -0
- package/packages/flows/src/components/basis.vue +108 -0
- package/packages/flows/src/components/distribute.vue +42 -0
- package/packages/flows/src/components/opinions-file.vue +123 -0
- package/packages/{flow-copy/src/component → flows/src/components}/opinions.vue +227 -204
- package/packages/flows/src/components/quick-actions.vue +64 -0
- package/packages/flows/src/components/reject.vue +83 -0
- package/packages/flows/src/components/start-flow.vue +210 -0
- package/packages/flows/src/flow.vue +510 -0
- package/packages/{flow/src/flow.vue → flows/src/flows.vue} +40 -1327
- package/packages/form/src/form-item.vue +9 -2
- package/packages/form/src/label-wrap.vue +4 -1
- package/packages/login/src/login.vue +61 -32
- package/packages/lowcode/src/lowcode.vue +141 -40
- package/packages/lowcode/src/pages.vue +27 -7
- package/packages/lowcode/src/toolbar.vue +3 -18
- package/packages/main/src/components/pages.vue +97 -65
- package/packages/main/src/components/router-page.vue +0 -2
- package/packages/main/src/gzw.vue +3 -2
- package/packages/main/src/minxs.js +71 -51
- package/packages/select/src/select.vue +5 -0
- package/packages/theme-chalk/src/base.scss +6 -0
- package/packages/theme-chalk/src/checkbox-group.scss +1 -0
- package/packages/theme-chalk/src/common/var.scss +1 -1
- package/packages/theme-chalk/src/flow.scss +7 -4
- package/packages/theme-chalk/src/flows.scss +141 -0
- package/packages/theme-chalk/src/form.scss +1 -1
- package/packages/theme-chalk/src/index.scss +1 -0
- package/packages/theme-chalk/src/input.scss +1 -0
- package/packages/theme-chalk/src/select.scss +3 -1
- package/packages/theme-chalk/src/selector.scss +1 -1
- package/src/index.js +4 -1
- package/packages/flow/src/component/quick-actions.vue +0 -1168
- package/packages/flow-copy/index.js +0 -7
- package/packages/flow-copy/src/component/Circulate.vue +0 -452
- package/packages/flow-copy/src/component/CustomPreset.vue +0 -333
- package/packages/flow-copy/src/component/FreeCirculation.vue +0 -275
- package/packages/flow-copy/src/component/Preset.vue +0 -273
- package/packages/flow-copy/src/component/SendMsg.vue +0 -290
- package/packages/flow-copy/src/component/TimeLimit.vue +0 -205
- package/packages/flow-copy/src/component/taskUnionExamine.vue +0 -818
- package/packages/flow-copy/src/freeStartFlow.vue +0 -2912
- package/packages/flow-copy/src/processForm.vue +0 -1411
- package/packages/flow-copy/src/processReject.vue +0 -319
- package/packages/flow-copy/src/reset.vue +0 -944
- package/packages/flow-copy/src/selectUser.vue +0 -513
- package/packages/flow-copy/src/startTaskRead.vue +0 -723
- package/packages/flow-copy/src/supervise.vue +0 -182
- package/packages/flow-copy/src/table.vue +0 -65
- /package/packages/{flow-copy → flow}/src/component/FileList.vue +0 -0
- /package/packages/{flow-copy → flow}/src/main.vue +0 -0
- /package/packages/{flow-copy/src → flows/src/components}/form.vue +0 -0
- /package/packages/{flow/src/component → flows/src/components}/message.vue +0 -0
- /package/packages/{flow/src/component → flows/src/components}/opinions-list.vue +0 -0
|
@@ -1,513 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="select-users">
|
|
3
|
-
<es-radio
|
|
4
|
-
v-model="newNextUser"
|
|
5
|
-
v-for="(item, index) of newRadioList"
|
|
6
|
-
v-show="newRadioList.length > 0 && !newMultiple && newPresetEdit != 0"
|
|
7
|
-
:disabled="isCurrentNodeForbiddenChangeCandidate == 1"
|
|
8
|
-
@change="cancelSelectUser(true)"
|
|
9
|
-
:key="index"
|
|
10
|
-
:label="item.id || item.showid"
|
|
11
|
-
>{{ item.name ? item.name : item.showname }}</es-radio
|
|
12
|
-
>
|
|
13
|
-
<es-checkbox-group
|
|
14
|
-
:disabled="isCurrentNodeForbiddenChangeCandidate == 1"
|
|
15
|
-
v-model="newNextUser"
|
|
16
|
-
v-show="newRadioList.length > 0 && newMultiple && newPresetEdit != 0"
|
|
17
|
-
@change="cancelSelectUser(true)"
|
|
18
|
-
>
|
|
19
|
-
<es-checkbox
|
|
20
|
-
v-for="(item, index) of newRadioList"
|
|
21
|
-
:key="index"
|
|
22
|
-
:label="item.id || item.showid"
|
|
23
|
-
>{{ item.name ? item.name : item.showname }}</es-checkbox
|
|
24
|
-
>
|
|
25
|
-
</es-checkbox-group>
|
|
26
|
-
<!-- <es-select
|
|
27
|
-
v-model="newNextUser"
|
|
28
|
-
:multiple="newMultiple"
|
|
29
|
-
:class="isCustomUser ? 'es-select-user' : ''"
|
|
30
|
-
filterable
|
|
31
|
-
remote
|
|
32
|
-
reserve-keyword
|
|
33
|
-
placeholder="请输入办理人"
|
|
34
|
-
:remote-method="remoteMethod"
|
|
35
|
-
:loading="searchLoading"
|
|
36
|
-
@change="changeSelectUser"
|
|
37
|
-
>
|
|
38
|
-
<es-option
|
|
39
|
-
v-for="(item,index) in newOptions"
|
|
40
|
-
:key="index"
|
|
41
|
-
:label="item.name"
|
|
42
|
-
:value="item.id"
|
|
43
|
-
>
|
|
44
|
-
</es-option>
|
|
45
|
-
</es-select> -->
|
|
46
|
-
<!-- class="select-user-icon es-button--primary" -->
|
|
47
|
-
<div style="position: relative">
|
|
48
|
-
<!-- <es-selector
|
|
49
|
-
v-if="isChange"
|
|
50
|
-
v-model="newSelectUserList"
|
|
51
|
-
value-type="string"
|
|
52
|
-
:types="types"
|
|
53
|
-
:tabs="tabs"
|
|
54
|
-
:title="title"
|
|
55
|
-
:mix="mix"
|
|
56
|
-
:multiple="newMultiple"
|
|
57
|
-
@confirm="getSelectUser"
|
|
58
|
-
@cancel="cancelSelectUser"
|
|
59
|
-
:param="newParams"
|
|
60
|
-
></es-selector> -->
|
|
61
|
-
<es-input v-if="disabled" :readonly="disabled" v-model="onlyName" />
|
|
62
|
-
<es-selector
|
|
63
|
-
v-else-if="!disabled && isChange"
|
|
64
|
-
v-model="newSelectUserList"
|
|
65
|
-
value-type="string"
|
|
66
|
-
:types="types"
|
|
67
|
-
:tabs="tabs"
|
|
68
|
-
:title="title"
|
|
69
|
-
:classify="classify"
|
|
70
|
-
:collapse-tags="selectorTags"
|
|
71
|
-
:mix="mix"
|
|
72
|
-
:min="isUnionSeal ? 1 : 0"
|
|
73
|
-
:disabled="!isCustomUser || isCurrentNodeForbiddenChangeCandidate == 1"
|
|
74
|
-
:filterable="Boolean(isCustomUser && !isUnionSeal)"
|
|
75
|
-
:class="
|
|
76
|
-
isCustomUser &&
|
|
77
|
-
isCurrentNodeForbiddenChangeCandidate == 0 &&
|
|
78
|
-
!isUnionSeal
|
|
79
|
-
? ''
|
|
80
|
-
: 'no-icon'
|
|
81
|
-
"
|
|
82
|
-
:select="isUnionSeal == false"
|
|
83
|
-
:where="{ ...newWhere, info: classify ? '' : 'no' }"
|
|
84
|
-
:multiple="newMultiple"
|
|
85
|
-
@cancel="cancelSelectUser"
|
|
86
|
-
@change="getSelectUser"
|
|
87
|
-
:param="{ ...newParams, info: classify ? '' : 'no' }"
|
|
88
|
-
:disableds="disableds"
|
|
89
|
-
><i class="es-icon-yonghu"></i
|
|
90
|
-
></es-selector>
|
|
91
|
-
<!-- :action="url" -->
|
|
92
|
-
<!-- :where="{type:'user',a:'1'}" -->
|
|
93
|
-
<!-- @confirm="getSelectUser" -->
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
</template>
|
|
97
|
-
|
|
98
|
-
<script>
|
|
99
|
-
import { getTypePrefix } from 'eoss/src/utils/util';
|
|
100
|
-
import { ajax } from 'eoss/src/utils/ajax';
|
|
101
|
-
import { getStorage } from 'eoss/src/utils/storage';
|
|
102
|
-
import { handleInfo } from 'eoss/src/config/api';
|
|
103
|
-
export default {
|
|
104
|
-
name: 'SelectUser',
|
|
105
|
-
props: {
|
|
106
|
-
/**
|
|
107
|
-
* 是否混选
|
|
108
|
-
*/
|
|
109
|
-
mix: {
|
|
110
|
-
type: Boolean,
|
|
111
|
-
default: false
|
|
112
|
-
},
|
|
113
|
-
/**
|
|
114
|
-
* 人员选择器类型
|
|
115
|
-
*/
|
|
116
|
-
tabs: {
|
|
117
|
-
type: Object
|
|
118
|
-
},
|
|
119
|
-
/**
|
|
120
|
-
* 是否联合审核流程
|
|
121
|
-
*/
|
|
122
|
-
isUnionSeal: {
|
|
123
|
-
type: Boolean,
|
|
124
|
-
default: false
|
|
125
|
-
},
|
|
126
|
-
/**
|
|
127
|
-
* 默认选中的下部办理人
|
|
128
|
-
*/
|
|
129
|
-
nextUser: {
|
|
130
|
-
default: () => []
|
|
131
|
-
},
|
|
132
|
-
/**
|
|
133
|
-
* 禁止选择的用户数组
|
|
134
|
-
*/
|
|
135
|
-
disableds: {
|
|
136
|
-
type: Array,
|
|
137
|
-
default: () => []
|
|
138
|
-
},
|
|
139
|
-
/**
|
|
140
|
-
* 单选列表
|
|
141
|
-
*/
|
|
142
|
-
radioList: {
|
|
143
|
-
type: Array,
|
|
144
|
-
default: () => []
|
|
145
|
-
},
|
|
146
|
-
/**
|
|
147
|
-
* 是否多选
|
|
148
|
-
*/
|
|
149
|
-
multiple: {
|
|
150
|
-
type: Boolean,
|
|
151
|
-
default: false
|
|
152
|
-
},
|
|
153
|
-
/**
|
|
154
|
-
* 选择器tag展示个数
|
|
155
|
-
*/
|
|
156
|
-
selectorTags: {
|
|
157
|
-
type: [Number, undefined],
|
|
158
|
-
default: 2
|
|
159
|
-
},
|
|
160
|
-
/**
|
|
161
|
-
* 是否可以自定义选择
|
|
162
|
-
*/
|
|
163
|
-
isCustomUser: { type: Number, default: 1 },
|
|
164
|
-
/**
|
|
165
|
-
*
|
|
166
|
-
*/
|
|
167
|
-
isCurrentNodeForbiddenChangeCandidate: { type: Number, default: 0 },
|
|
168
|
-
options: {
|
|
169
|
-
type: Array,
|
|
170
|
-
default: () => []
|
|
171
|
-
},
|
|
172
|
-
/**
|
|
173
|
-
* 选中的用户列表
|
|
174
|
-
*/
|
|
175
|
-
selectUserList: {
|
|
176
|
-
type: Array,
|
|
177
|
-
default: () => []
|
|
178
|
-
},
|
|
179
|
-
/**
|
|
180
|
-
* 人员选择器类型
|
|
181
|
-
*/
|
|
182
|
-
types: {
|
|
183
|
-
type: Array,
|
|
184
|
-
default: () => ['employee']
|
|
185
|
-
},
|
|
186
|
-
/**
|
|
187
|
-
* 选择器参数
|
|
188
|
-
*/
|
|
189
|
-
params: {
|
|
190
|
-
type: Object,
|
|
191
|
-
default: () => {}
|
|
192
|
-
},
|
|
193
|
-
showUser: {
|
|
194
|
-
type: Boolean,
|
|
195
|
-
default: false
|
|
196
|
-
},
|
|
197
|
-
/**
|
|
198
|
-
* 是否预设编辑
|
|
199
|
-
*/
|
|
200
|
-
presetEdit: {
|
|
201
|
-
type: Number,
|
|
202
|
-
default: 0
|
|
203
|
-
},
|
|
204
|
-
/**
|
|
205
|
-
* 标题
|
|
206
|
-
*/
|
|
207
|
-
title: {
|
|
208
|
-
type: String,
|
|
209
|
-
default: '下步处理对象'
|
|
210
|
-
},
|
|
211
|
-
/**
|
|
212
|
-
* 只读名称
|
|
213
|
-
*/
|
|
214
|
-
onlyName: {
|
|
215
|
-
type: String,
|
|
216
|
-
default: ''
|
|
217
|
-
},
|
|
218
|
-
/**
|
|
219
|
-
* 是否默认选中对象
|
|
220
|
-
*/
|
|
221
|
-
isDefSelectedObj: {
|
|
222
|
-
type: Number,
|
|
223
|
-
default: 0
|
|
224
|
-
},
|
|
225
|
-
/**
|
|
226
|
-
* 模糊查询参数
|
|
227
|
-
*/
|
|
228
|
-
where: {
|
|
229
|
-
type: Object,
|
|
230
|
-
default: () => {}
|
|
231
|
-
},
|
|
232
|
-
/**
|
|
233
|
-
* 是否禁止选中
|
|
234
|
-
*/
|
|
235
|
-
disabled: {
|
|
236
|
-
type: Boolean,
|
|
237
|
-
default: false
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
data() {
|
|
241
|
-
return {
|
|
242
|
-
searchLoading: false,
|
|
243
|
-
newNextUser: [],
|
|
244
|
-
classify: true,
|
|
245
|
-
newOptions: [],
|
|
246
|
-
newSelectUserList: [],
|
|
247
|
-
url: handleInfo,
|
|
248
|
-
newCheckboxList: [],
|
|
249
|
-
newPresetEdit: 0,
|
|
250
|
-
newMultiple: false,
|
|
251
|
-
newIsDefSelectedObj: 0,
|
|
252
|
-
isChange: true,
|
|
253
|
-
newParams: {
|
|
254
|
-
// filid: 'all', //选择范围(my:本单位/ "" or all:全部)
|
|
255
|
-
// selectmix: 'true1',
|
|
256
|
-
// deptid: '' //指定部门(my:本部门)
|
|
257
|
-
},
|
|
258
|
-
newRadioList: []
|
|
259
|
-
};
|
|
260
|
-
},
|
|
261
|
-
computed: {
|
|
262
|
-
newWhere() {
|
|
263
|
-
return {
|
|
264
|
-
mid: `${JSON.parse(getStorage('mainConfig')).userModel.orgId}-org-1`,
|
|
265
|
-
filid: JSON.parse(getStorage('mainConfig')).userModel.orgId,
|
|
266
|
-
...this.where
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
watch: {
|
|
271
|
-
newPresetEdit(val) {
|
|
272
|
-
this.isChange = false;
|
|
273
|
-
setTimeout(() => (this.isChange = true), 0);
|
|
274
|
-
},
|
|
275
|
-
isDefSelectedObj: {
|
|
276
|
-
handler(val) {
|
|
277
|
-
this.newIsDefSelectedObj = val;
|
|
278
|
-
},
|
|
279
|
-
deep: true,
|
|
280
|
-
immediate: true
|
|
281
|
-
},
|
|
282
|
-
params: {
|
|
283
|
-
handler(val) {
|
|
284
|
-
this.newParams = val;
|
|
285
|
-
},
|
|
286
|
-
deep: true,
|
|
287
|
-
immediate: true
|
|
288
|
-
},
|
|
289
|
-
selectUserList: {
|
|
290
|
-
handler(val) {
|
|
291
|
-
this.newSelectUserList = val;
|
|
292
|
-
},
|
|
293
|
-
deep: true,
|
|
294
|
-
immediate: true
|
|
295
|
-
},
|
|
296
|
-
nextUser: {
|
|
297
|
-
handler(val) {
|
|
298
|
-
this.newNextUser = val;
|
|
299
|
-
},
|
|
300
|
-
deep: true,
|
|
301
|
-
immediate: true
|
|
302
|
-
},
|
|
303
|
-
radioList: {
|
|
304
|
-
handler(val) {
|
|
305
|
-
this.newRadioList = val;
|
|
306
|
-
},
|
|
307
|
-
deep: true,
|
|
308
|
-
immediate: true
|
|
309
|
-
},
|
|
310
|
-
options: {
|
|
311
|
-
handler(val) {
|
|
312
|
-
this.newOptions = val;
|
|
313
|
-
},
|
|
314
|
-
deep: true,
|
|
315
|
-
immediate: true
|
|
316
|
-
},
|
|
317
|
-
presetEdit: {
|
|
318
|
-
handler(val) {
|
|
319
|
-
this.newPresetEdit = val;
|
|
320
|
-
},
|
|
321
|
-
deep: true,
|
|
322
|
-
immediate: true
|
|
323
|
-
},
|
|
324
|
-
multiple: {
|
|
325
|
-
handler(val) {
|
|
326
|
-
this.newMultiple = val;
|
|
327
|
-
},
|
|
328
|
-
deep: true,
|
|
329
|
-
immediate: true
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
mounted() {
|
|
333
|
-
this.classify =
|
|
334
|
-
getStorage('classify') != undefined ? getStorage('classify') : true;
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
methods: {
|
|
338
|
-
changeInfo(data) {
|
|
339
|
-
const {
|
|
340
|
-
selectUserList,
|
|
341
|
-
nextUser,
|
|
342
|
-
radioList,
|
|
343
|
-
options,
|
|
344
|
-
multiple,
|
|
345
|
-
presetEdit,
|
|
346
|
-
isDefSelectedObj,
|
|
347
|
-
params
|
|
348
|
-
} = data;
|
|
349
|
-
this.newSelectUserList = selectUserList;
|
|
350
|
-
this.newNextUser = nextUser;
|
|
351
|
-
this.newRadioList = radioList;
|
|
352
|
-
this.newOptions = options;
|
|
353
|
-
this.newMultiple = multiple;
|
|
354
|
-
this.newParams = params;
|
|
355
|
-
this.newPresetEdit = presetEdit;
|
|
356
|
-
this.newIsDefSelectedObj = isDefSelectedObj;
|
|
357
|
-
},
|
|
358
|
-
remoteMethod(query) {
|
|
359
|
-
if (query !== '') {
|
|
360
|
-
this.searchLoading = true;
|
|
361
|
-
ajax({
|
|
362
|
-
url: handleInfo,
|
|
363
|
-
params: { searchKey: query, query, type: 'user' }
|
|
364
|
-
})
|
|
365
|
-
.then((res) => {
|
|
366
|
-
const { status, data } = res;
|
|
367
|
-
this.searchLoading = false;
|
|
368
|
-
if (status === 'success') {
|
|
369
|
-
this.newOptions = data;
|
|
370
|
-
}
|
|
371
|
-
})
|
|
372
|
-
.catch((err) => {
|
|
373
|
-
this.searchLoading = false;
|
|
374
|
-
});
|
|
375
|
-
} else {
|
|
376
|
-
this.newOptions = [];
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
changeSelectUser(val) {
|
|
380
|
-
this.newSelectUserList = [];
|
|
381
|
-
if (this.newMultiple) {
|
|
382
|
-
val.map((item) => {
|
|
383
|
-
this.newOptions.map((items) => {
|
|
384
|
-
if (item === items.id) {
|
|
385
|
-
this.newSelectUserList.push({
|
|
386
|
-
showname: items.name,
|
|
387
|
-
showid: items.id
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
});
|
|
391
|
-
});
|
|
392
|
-
} else {
|
|
393
|
-
this.newOptions.map((item) => {
|
|
394
|
-
if (item.id === val) {
|
|
395
|
-
this.newSelectUserList.push({
|
|
396
|
-
showname: item.name,
|
|
397
|
-
showid: item.id
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
this.$emit('change', {
|
|
403
|
-
nextUser: this.newNextUser,
|
|
404
|
-
options: this.newOptions
|
|
405
|
-
});
|
|
406
|
-
},
|
|
407
|
-
getMixList() {
|
|
408
|
-
let mixObj = this.newSelectUserList.reduce((obj, name) => {
|
|
409
|
-
if (name.stype in obj) {
|
|
410
|
-
obj[name.stype] += `,${name.showid}`;
|
|
411
|
-
} else {
|
|
412
|
-
obj[name.stype] = name.showid;
|
|
413
|
-
}
|
|
414
|
-
return obj;
|
|
415
|
-
}, {});
|
|
416
|
-
let mixArr = [];
|
|
417
|
-
for (let key in mixObj) {
|
|
418
|
-
mixArr.push(`${key}-${mixObj[key]}`);
|
|
419
|
-
}
|
|
420
|
-
return mixArr;
|
|
421
|
-
},
|
|
422
|
-
getSelectUser(val) {
|
|
423
|
-
this.newOptions = [];
|
|
424
|
-
let data = {};
|
|
425
|
-
if (this.mix) data = this.getMixList();
|
|
426
|
-
if (this.newMultiple) {
|
|
427
|
-
this.newNextUser = [];
|
|
428
|
-
|
|
429
|
-
this.newSelectUserList.map((item) => {
|
|
430
|
-
if (this.mix) {
|
|
431
|
-
this.newOptions.push({
|
|
432
|
-
...item,
|
|
433
|
-
id: item.showid,
|
|
434
|
-
name: getTypePrefix(item.stype) + item.showname
|
|
435
|
-
});
|
|
436
|
-
} else {
|
|
437
|
-
this.newOptions.push({
|
|
438
|
-
...item,
|
|
439
|
-
id: item.showid,
|
|
440
|
-
name: item.showname
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
this.newNextUser.push(item.showid);
|
|
444
|
-
});
|
|
445
|
-
} else {
|
|
446
|
-
if (this.newSelectUserList.length > 0) {
|
|
447
|
-
const { showid, showname } = this.newSelectUserList[0];
|
|
448
|
-
this.newOptions.push({
|
|
449
|
-
...this.newSelectUserList[0],
|
|
450
|
-
id: showid,
|
|
451
|
-
name: showname
|
|
452
|
-
});
|
|
453
|
-
this.newNextUser = showid;
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
this.$emit('change', {
|
|
457
|
-
nextUser: this.newNextUser,
|
|
458
|
-
mixList: data,
|
|
459
|
-
options: this.newOptions
|
|
460
|
-
});
|
|
461
|
-
},
|
|
462
|
-
cancelSelectUser(type) {
|
|
463
|
-
if (type) this.newOptions = this.newRadioList;
|
|
464
|
-
let copy = JSON.stringify(this.newSelectUserList);
|
|
465
|
-
let oldUserList = JSON.parse(copy);
|
|
466
|
-
copy = [];
|
|
467
|
-
this.newSelectUserList = [];
|
|
468
|
-
let data = {};
|
|
469
|
-
if (this.mix) data = this.getMixList();
|
|
470
|
-
if (this.newMultiple) {
|
|
471
|
-
this.newNextUser.map((item) => {
|
|
472
|
-
this.newOptions.map((items) => {
|
|
473
|
-
oldUserList.map((val) => {
|
|
474
|
-
if (items.showid != val.showid && val.showid == item) {
|
|
475
|
-
this.newSelectUserList.push({
|
|
476
|
-
...val
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
});
|
|
480
|
-
if (item === items.showid) {
|
|
481
|
-
this.newSelectUserList.push({
|
|
482
|
-
...items
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
});
|
|
487
|
-
var obj = {};
|
|
488
|
-
this.newSelectUserList = this.newSelectUserList.reduce(function (
|
|
489
|
-
item,
|
|
490
|
-
next
|
|
491
|
-
) {
|
|
492
|
-
obj[next.showid] ? '' : (obj[next.showid] = true && item.push(next));
|
|
493
|
-
return item;
|
|
494
|
-
},
|
|
495
|
-
[]);
|
|
496
|
-
} else {
|
|
497
|
-
this.newOptions.map((item) => {
|
|
498
|
-
if (item.showid === this.newNextUser) {
|
|
499
|
-
this.newSelectUserList.push({
|
|
500
|
-
...item
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
this.$emit('change', {
|
|
506
|
-
nextUser: this.newNextUser,
|
|
507
|
-
mixList: data,
|
|
508
|
-
options: this.newOptions
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
};
|
|
513
|
-
</script>
|