eoss-ui 0.3.97
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/CHANGELOG.md +929 -0
- package/README.md +30 -0
- package/lib/button-group.js +2857 -0
- package/lib/button.js +2884 -0
- package/lib/card.js +603 -0
- package/lib/cascader.js +373 -0
- package/lib/checkbox-group.js +3099 -0
- package/lib/clients.js +375 -0
- package/lib/config/api.js +205 -0
- package/lib/data-table-form.js +3848 -0
- package/lib/data-table.js +6315 -0
- package/lib/date-picker.js +2821 -0
- package/lib/dialog.js +3730 -0
- package/lib/enterprise.js +372 -0
- package/lib/eoss-ui.common.js +65365 -0
- package/lib/error-page.js +293 -0
- package/lib/flow-group.js +4200 -0
- package/lib/flow-list.js +4350 -0
- package/lib/flow.js +12893 -0
- package/lib/form.js +15635 -0
- package/lib/handle-user.js +2900 -0
- package/lib/handler.js +3118 -0
- package/lib/index.js +1 -0
- package/lib/input-number.js +2743 -0
- package/lib/input.js +2935 -0
- package/lib/label.js +411 -0
- package/lib/login.js +5048 -0
- package/lib/main.js +5816 -0
- package/lib/mainComp.js +6530 -0
- package/lib/menu.js +529 -0
- package/lib/nav.js +3048 -0
- package/lib/notify.js +1079 -0
- package/lib/page.js +3036 -0
- package/lib/pagination.js +354 -0
- package/lib/player.js +2904 -0
- package/lib/qr-code.js +2860 -0
- package/lib/radio-group.js +3091 -0
- package/lib/select-ganged.js +3242 -0
- package/lib/select.js +3295 -0
- package/lib/selector-panel.js +4425 -0
- package/lib/selector.js +3722 -0
- package/lib/sizer.js +3067 -0
- package/lib/steps.js +2943 -0
- package/lib/switch.js +2784 -0
- package/lib/table-form.js +6211 -0
- package/lib/tabs-panel.js +274 -0
- package/lib/tabs.js +4988 -0
- package/lib/theme-chalk/base.css +1 -0
- package/lib/theme-chalk/button-group.css +1 -0
- package/lib/theme-chalk/button.css +0 -0
- package/lib/theme-chalk/card.css +1 -0
- package/lib/theme-chalk/cascader.css +0 -0
- package/lib/theme-chalk/checkbox-group.css +1 -0
- package/lib/theme-chalk/clients.css +1 -0
- package/lib/theme-chalk/data-table-form.css +1 -0
- package/lib/theme-chalk/data-table.css +1 -0
- package/lib/theme-chalk/date-picker.css +1 -0
- package/lib/theme-chalk/dialog.css +1 -0
- package/lib/theme-chalk/enterprise.css +1 -0
- package/lib/theme-chalk/error-page.css +1 -0
- package/lib/theme-chalk/flow-chart.css +0 -0
- package/lib/theme-chalk/flow-group.css +1 -0
- package/lib/theme-chalk/flow-list.css +1 -0
- package/lib/theme-chalk/flow.css +1 -0
- package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
- package/lib/theme-chalk/fonts/iconfont.woff +0 -0
- package/lib/theme-chalk/form.css +1 -0
- package/lib/theme-chalk/handle-user.css +1 -0
- package/lib/theme-chalk/handler.css +1 -0
- package/lib/theme-chalk/icon.css +1 -0
- package/lib/theme-chalk/index.css +1 -0
- package/lib/theme-chalk/input-number.css +0 -0
- package/lib/theme-chalk/input.css +1 -0
- package/lib/theme-chalk/label.css +1 -0
- package/lib/theme-chalk/login.css +1 -0
- package/lib/theme-chalk/main.css +1 -0
- package/lib/theme-chalk/mainComp.css +0 -0
- package/lib/theme-chalk/menu.css +1 -0
- package/lib/theme-chalk/nav.css +1 -0
- package/lib/theme-chalk/notify.css +0 -0
- package/lib/theme-chalk/page.css +1 -0
- package/lib/theme-chalk/pagination.css +1 -0
- package/lib/theme-chalk/player.css +1 -0
- package/lib/theme-chalk/qr-code.css +1 -0
- package/lib/theme-chalk/radio-group.css +1 -0
- package/lib/theme-chalk/radio.css +1 -0
- package/lib/theme-chalk/select-ganged.css +1 -0
- package/lib/theme-chalk/select.css +0 -0
- package/lib/theme-chalk/selector-panel.css +1 -0
- package/lib/theme-chalk/selector.css +1 -0
- package/lib/theme-chalk/sizer.css +1 -0
- package/lib/theme-chalk/steps.css +1 -0
- package/lib/theme-chalk/switch.css +1 -0
- package/lib/theme-chalk/table-form.css +0 -0
- package/lib/theme-chalk/tabs-panel.css +0 -0
- package/lib/theme-chalk/tabs.css +1 -0
- package/lib/theme-chalk/tips.css +1 -0
- package/lib/theme-chalk/toolbar.css +1 -0
- package/lib/theme-chalk/tree-group.css +1 -0
- package/lib/theme-chalk/tree.css +1 -0
- package/lib/theme-chalk/upload.css +1 -0
- package/lib/theme-chalk/wujie.css +0 -0
- package/lib/theme-chalk/wxlogin.css +1 -0
- package/lib/tips.js +2830 -0
- package/lib/toolbar.js +531 -0
- package/lib/tree-group.js +3373 -0
- package/lib/tree.js +3482 -0
- package/lib/upload.js +3913 -0
- package/lib/utils/bus.js +9 -0
- package/lib/utils/date-util.js +318 -0
- package/lib/utils/http.js +58 -0
- package/lib/utils/rules.js +19 -0
- package/lib/utils/store.js +22 -0
- package/lib/utils/util.js +2056 -0
- package/lib/wujie.js +2845 -0
- package/lib/wxlogin.js +2799 -0
- package/package.json +151 -0
- package/packages/button/index.js +5 -0
- package/packages/button/src/main.vue +264 -0
- package/packages/button-group/index.js +5 -0
- package/packages/button-group/src/main.vue +130 -0
- package/packages/card/index.js +5 -0
- package/packages/card/src/main.vue +144 -0
- package/packages/cascader/index.js +5 -0
- package/packages/cascader/src/main.vue +144 -0
- package/packages/checkbox-group/index.js +5 -0
- package/packages/checkbox-group/src/main.vue +285 -0
- package/packages/clients/index.js +5 -0
- package/packages/clients/src/main.vue +50 -0
- package/packages/data-table/index.js +5 -0
- package/packages/data-table/src/children.vue +40 -0
- package/packages/data-table/src/column.vue +796 -0
- package/packages/data-table/src/main copy.vue +1383 -0
- package/packages/data-table/src/main.vue +1229 -0
- package/packages/data-table/src/mixins/table.js +12 -0
- package/packages/data-table/src/sizer.vue +160 -0
- package/packages/data-table-form/index.js +5 -0
- package/packages/data-table-form/src/colgroup.vue +17 -0
- package/packages/data-table-form/src/main.vue +167 -0
- package/packages/data-table-form/src/table.vue +192 -0
- package/packages/data-table-form/src/tbody.vue +219 -0
- package/packages/data-table-form/src/thead.vue +68 -0
- package/packages/date-picker/index.js +5 -0
- package/packages/date-picker/src/main.vue +185 -0
- package/packages/dialog/index.js +5 -0
- package/packages/dialog/src/main.vue +442 -0
- package/packages/enterprise/index.js +5 -0
- package/packages/enterprise/src/main.vue +66 -0
- package/packages/error-page/index.js +5 -0
- package/packages/error-page/src/main.vue +44 -0
- package/packages/flow/index.js +5 -0
- package/packages/flow/src/component/CommonOpinions.vue +290 -0
- package/packages/flow/src/component/CustomPreset.vue +311 -0
- package/packages/flow/src/component/FileList.vue +97 -0
- package/packages/flow/src/component/Preset.vue +253 -0
- package/packages/flow/src/component/SendMsg.vue +221 -0
- package/packages/flow/src/component/TimeLimit.vue +190 -0
- package/packages/flow/src/component/taskUnionExamine.vue +507 -0
- package/packages/flow/src/form.vue +120 -0
- package/packages/flow/src/main.vue +2107 -0
- package/packages/flow/src/processForm.vue +866 -0
- package/packages/flow/src/processReject.vue +262 -0
- package/packages/flow/src/selectUser.vue +425 -0
- package/packages/flow/src/startTaskRead.vue +556 -0
- package/packages/flow/src/table.vue +51 -0
- package/packages/flow-group/index.js +5 -0
- package/packages/flow-group/src/main.vue +540 -0
- package/packages/flow-list/index.js +5 -0
- package/packages/flow-list/src/flow-table.vue +445 -0
- package/packages/flow-list/src/main.vue +456 -0
- package/packages/form/index.js +5 -0
- package/packages/form/src/main.vue +4429 -0
- package/packages/form/src/table.vue +1196 -0
- package/packages/handle-user/index.js +5 -0
- package/packages/handle-user/src/main.vue +122 -0
- package/packages/handler/index.js +5 -0
- package/packages/handler/src/main.vue +306 -0
- package/packages/input/index.js +5 -0
- package/packages/input/src/main.vue +307 -0
- package/packages/input-number/index.js +5 -0
- package/packages/input-number/src/main.vue +106 -0
- package/packages/label/index.js +5 -0
- package/packages/label/src/main.vue +208 -0
- package/packages/login/index.js +5 -0
- package/packages/login/src/main.vue +1193 -0
- package/packages/login/src/resetPassword.vue +332 -0
- package/packages/main/index.js +5 -0
- package/packages/main/src/main.vue +1496 -0
- package/packages/main/src/message.vue +239 -0
- package/packages/main/src/notice.vue +145 -0
- package/packages/main/src/settings.vue +105 -0
- package/packages/main/src/userinfo.vue +430 -0
- package/packages/mainComp/index.js +5 -0
- package/packages/mainComp/src/async-component/index.vue +85 -0
- package/packages/mainComp/src/main.vue +1934 -0
- package/packages/mainComp/src/message.vue +239 -0
- package/packages/mainComp/src/notice.vue +152 -0
- package/packages/mainComp/src/settings.vue +105 -0
- package/packages/mainComp/src/userinfo.vue +423 -0
- package/packages/menu/index.js +5 -0
- package/packages/menu/src/main.vue +401 -0
- package/packages/nav/index.js +5 -0
- package/packages/nav/src/main.vue +250 -0
- package/packages/notify/index.js +5 -0
- package/packages/notify/src/main.vue +538 -0
- package/packages/page/index.js +5 -0
- package/packages/page/src/main.vue +167 -0
- package/packages/pagination/index.js +5 -0
- package/packages/pagination/src/main.vue +77 -0
- package/packages/player/index.js +5 -0
- package/packages/player/src/main.vue +194 -0
- package/packages/qr-code/index.js +5 -0
- package/packages/qr-code/src/main.vue +154 -0
- package/packages/radio/index.js +5 -0
- package/packages/radio/src/main.vue +259 -0
- package/packages/radio-group/index.js +6 -0
- package/packages/radio-group/src/main.vue +267 -0
- package/packages/select/index.js +5 -0
- package/packages/select/src/main.vue +683 -0
- package/packages/select-ganged/index.js +5 -0
- package/packages/select-ganged/src/main.vue +686 -0
- package/packages/selector/index.js +5 -0
- package/packages/selector/src/main.vue +588 -0
- package/packages/selector-panel/index.js +5 -0
- package/packages/selector-panel/src/main.vue +968 -0
- package/packages/selector-panel/src/selection.vue +142 -0
- package/packages/selector-panel/src/tree.vue +129 -0
- package/packages/sizer/index.js +5 -0
- package/packages/sizer/src/main.vue +254 -0
- package/packages/steps/index.js +5 -0
- package/packages/steps/src/main.vue +175 -0
- package/packages/switch/index.js +5 -0
- package/packages/switch/src/main.vue +154 -0
- package/packages/table-form/index.js +5 -0
- package/packages/tabs/index.js +5 -0
- package/packages/tabs/src/main.vue +749 -0
- package/packages/tabs-panel/index.js +5 -0
- package/packages/tabs-panel/src/main.vue +18 -0
- package/packages/theme-chalk/README.md +33 -0
- package/packages/theme-chalk/lib/base.css +1 -0
- package/packages/theme-chalk/lib/button-group.css +1 -0
- package/packages/theme-chalk/lib/button.css +0 -0
- package/packages/theme-chalk/lib/card.css +1 -0
- package/packages/theme-chalk/lib/cascader.css +0 -0
- package/packages/theme-chalk/lib/checkbox-group.css +1 -0
- package/packages/theme-chalk/lib/clients.css +1 -0
- package/packages/theme-chalk/lib/data-table-form.css +1 -0
- package/packages/theme-chalk/lib/data-table.css +1 -0
- package/packages/theme-chalk/lib/date-picker.css +1 -0
- package/packages/theme-chalk/lib/dialog.css +1 -0
- package/packages/theme-chalk/lib/enterprise.css +1 -0
- package/packages/theme-chalk/lib/error-page.css +1 -0
- package/packages/theme-chalk/lib/flow-chart.css +0 -0
- package/packages/theme-chalk/lib/flow-group.css +1 -0
- package/packages/theme-chalk/lib/flow-list.css +1 -0
- package/packages/theme-chalk/lib/flow.css +1 -0
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/form.css +1 -0
- package/packages/theme-chalk/lib/handle-user.css +1 -0
- package/packages/theme-chalk/lib/handler.css +1 -0
- package/packages/theme-chalk/lib/icon.css +1 -0
- package/packages/theme-chalk/lib/index.css +1 -0
- package/packages/theme-chalk/lib/input-number.css +0 -0
- package/packages/theme-chalk/lib/input.css +1 -0
- package/packages/theme-chalk/lib/label.css +1 -0
- package/packages/theme-chalk/lib/login.css +1 -0
- package/packages/theme-chalk/lib/main.css +1 -0
- package/packages/theme-chalk/lib/mainComp.css +0 -0
- package/packages/theme-chalk/lib/menu.css +1 -0
- package/packages/theme-chalk/lib/nav.css +1 -0
- package/packages/theme-chalk/lib/notify.css +0 -0
- package/packages/theme-chalk/lib/page.css +1 -0
- package/packages/theme-chalk/lib/pagination.css +1 -0
- package/packages/theme-chalk/lib/player.css +1 -0
- package/packages/theme-chalk/lib/qr-code.css +1 -0
- package/packages/theme-chalk/lib/radio-group.css +1 -0
- package/packages/theme-chalk/lib/radio.css +1 -0
- package/packages/theme-chalk/lib/select-ganged.css +1 -0
- package/packages/theme-chalk/lib/select.css +0 -0
- package/packages/theme-chalk/lib/selector-panel.css +1 -0
- package/packages/theme-chalk/lib/selector.css +1 -0
- package/packages/theme-chalk/lib/sizer.css +1 -0
- package/packages/theme-chalk/lib/steps.css +1 -0
- package/packages/theme-chalk/lib/switch.css +1 -0
- package/packages/theme-chalk/lib/table-form.css +0 -0
- package/packages/theme-chalk/lib/tabs-panel.css +0 -0
- package/packages/theme-chalk/lib/tabs.css +1 -0
- package/packages/theme-chalk/lib/tips.css +1 -0
- package/packages/theme-chalk/lib/toolbar.css +1 -0
- package/packages/theme-chalk/lib/tree-group.css +1 -0
- package/packages/theme-chalk/lib/tree.css +1 -0
- package/packages/theme-chalk/lib/upload.css +1 -0
- package/packages/theme-chalk/lib/wujie.css +0 -0
- package/packages/theme-chalk/lib/wxlogin.css +1 -0
- package/packages/theme-chalk/package.json +35 -0
- package/packages/theme-chalk/src/base.scss +165 -0
- package/packages/theme-chalk/src/button-group.scss +9 -0
- package/packages/theme-chalk/src/button.scss +0 -0
- package/packages/theme-chalk/src/card.scss +55 -0
- package/packages/theme-chalk/src/cascader.scss +0 -0
- package/packages/theme-chalk/src/checkbox-group.scss +8 -0
- package/packages/theme-chalk/src/clients.scss +72 -0
- package/packages/theme-chalk/src/common/var.scss +1516 -0
- package/packages/theme-chalk/src/data-table-form.scss +55 -0
- package/packages/theme-chalk/src/data-table.scss +202 -0
- package/packages/theme-chalk/src/date-picker.scss +8 -0
- package/packages/theme-chalk/src/dialog.scss +52 -0
- package/packages/theme-chalk/src/enterprise.scss +5 -0
- package/packages/theme-chalk/src/error-page.scss +18 -0
- package/packages/theme-chalk/src/flow-chart.scss +0 -0
- package/packages/theme-chalk/src/flow-group.scss +101 -0
- package/packages/theme-chalk/src/flow-list.scss +41 -0
- package/packages/theme-chalk/src/flow.scss +285 -0
- package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/src/form.scss +451 -0
- package/packages/theme-chalk/src/handle-user.scss +40 -0
- package/packages/theme-chalk/src/handler.scss +131 -0
- package/packages/theme-chalk/src/icon.scss +1714 -0
- package/packages/theme-chalk/src/index.scss +50 -0
- package/packages/theme-chalk/src/input-number.scss +0 -0
- package/packages/theme-chalk/src/input.scss +3 -0
- package/packages/theme-chalk/src/label.scss +24 -0
- package/packages/theme-chalk/src/login.scss +490 -0
- package/packages/theme-chalk/src/main.scss +483 -0
- package/packages/theme-chalk/src/mainComp.scss +0 -0
- package/packages/theme-chalk/src/menu.scss +201 -0
- package/packages/theme-chalk/src/mixins/color.scss +117 -0
- package/packages/theme-chalk/src/mixins/mixins.scss +25 -0
- package/packages/theme-chalk/src/nav.scss +73 -0
- package/packages/theme-chalk/src/notify.scss +0 -0
- package/packages/theme-chalk/src/page.scss +3 -0
- package/packages/theme-chalk/src/pagination.scss +14 -0
- package/packages/theme-chalk/src/player.scss +9 -0
- package/packages/theme-chalk/src/qr-code.scss +17 -0
- package/packages/theme-chalk/src/radio-group.scss +9 -0
- package/packages/theme-chalk/src/radio.scss +3 -0
- package/packages/theme-chalk/src/select-ganged.scss +9 -0
- package/packages/theme-chalk/src/select.scss +0 -0
- package/packages/theme-chalk/src/selector-panel.scss +203 -0
- package/packages/theme-chalk/src/selector.scss +85 -0
- package/packages/theme-chalk/src/sizer.scss +36 -0
- package/packages/theme-chalk/src/steps.scss +88 -0
- package/packages/theme-chalk/src/switch.scss +3 -0
- package/packages/theme-chalk/src/table-form.scss +1 -0
- package/packages/theme-chalk/src/tabs-panel.scss +0 -0
- package/packages/theme-chalk/src/tabs.scss +91 -0
- package/packages/theme-chalk/src/tips.scss +7 -0
- package/packages/theme-chalk/src/toolbar.scss +121 -0
- package/packages/theme-chalk/src/tree-group.scss +64 -0
- package/packages/theme-chalk/src/tree.scss +140 -0
- package/packages/theme-chalk/src/upload.scss +131 -0
- package/packages/theme-chalk/src/wujie.scss +0 -0
- package/packages/theme-chalk/src/wxlogin.scss +3 -0
- package/packages/tips/index.js +5 -0
- package/packages/tips/src/main.vue +126 -0
- package/packages/toolbar/index.js +5 -0
- package/packages/toolbar/src/main.vue +377 -0
- package/packages/tree/index.js +5 -0
- package/packages/tree/src/main.vue +636 -0
- package/packages/tree-group/index.js +5 -0
- package/packages/tree-group/src/main.vue +435 -0
- package/packages/upload/index.js +5 -0
- package/packages/upload/src/main.vue +1033 -0
- package/packages/upload/src/picture.js +15 -0
- package/packages/wujie/index.js +5 -0
- package/packages/wujie/src/main.vue +137 -0
- package/packages/wxlogin/index.js +5 -0
- package/packages/wxlogin/src/main.vue +110 -0
- package/src/config/api.js +211 -0
- package/src/index.js +167 -0
- package/src/utils/bus.js +3 -0
- package/src/utils/date-util.js +312 -0
- package/src/utils/http.js +50 -0
- package/src/utils/rules.js +18 -0
- package/src/utils/store.js +21 -0
- package/src/utils/util.js +2105 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="es-selection">
|
|
3
|
+
<el-scrollbar class="es-scrollbar">
|
|
4
|
+
<el-radio-group
|
|
5
|
+
v-if="!multiple"
|
|
6
|
+
v-bind="$attrs"
|
|
7
|
+
size="small"
|
|
8
|
+
v-on="$listeners"
|
|
9
|
+
v-model="selectes"
|
|
10
|
+
>
|
|
11
|
+
<el-radio
|
|
12
|
+
v-for="(item, index) in data"
|
|
13
|
+
:key="index"
|
|
14
|
+
v-bind="getprops($attrs, item)"
|
|
15
|
+
:label="isObject || typeof item == 'string' ? item : item[valKey]"
|
|
16
|
+
:disabled="typeof item == 'string' ? false : item.disabled"
|
|
17
|
+
:class="{ 'es-radio-delete': genre === 'delete' }"
|
|
18
|
+
:value-key="valueKey"
|
|
19
|
+
>
|
|
20
|
+
{{ typeof item == 'string' ? item : getLabel(item) }}</el-radio
|
|
21
|
+
>
|
|
22
|
+
</el-radio-group>
|
|
23
|
+
<el-checkbox-group
|
|
24
|
+
v-else
|
|
25
|
+
v-bind="$attrs"
|
|
26
|
+
:max="max"
|
|
27
|
+
size="small"
|
|
28
|
+
v-on="$listeners"
|
|
29
|
+
v-model="selectes"
|
|
30
|
+
ref="sortable"
|
|
31
|
+
>
|
|
32
|
+
<el-checkbox
|
|
33
|
+
v-for="(item, index) in data"
|
|
34
|
+
:key="index"
|
|
35
|
+
v-bind="getprops($attrs, item)"
|
|
36
|
+
:label="isObject || typeof item == 'string' ? item : item[valKey]"
|
|
37
|
+
:disabled="typeof item == 'string' ? false : item.disabled"
|
|
38
|
+
:class="{ 'es-checkbox-delete': genre === 'delete' }"
|
|
39
|
+
:value-key="valueKey"
|
|
40
|
+
>
|
|
41
|
+
{{ typeof item == 'string' ? item : getLabel(item) }}
|
|
42
|
+
<i v-show="genre === 'delete'" class="el-icon-circle-close"></i>
|
|
43
|
+
</el-checkbox>
|
|
44
|
+
</el-checkbox-group>
|
|
45
|
+
</el-scrollbar>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
<script>
|
|
49
|
+
import Sortable from 'sortablejs';
|
|
50
|
+
import util from 'eoss-ui/src/utils/util.js';
|
|
51
|
+
export default {
|
|
52
|
+
name: 'Selection',
|
|
53
|
+
props: {
|
|
54
|
+
value: [String, Array, Object],
|
|
55
|
+
genre: String,
|
|
56
|
+
valueKey: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: 'showid'
|
|
59
|
+
},
|
|
60
|
+
labelKey: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: 'showname'
|
|
63
|
+
},
|
|
64
|
+
valueType: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: 'object'
|
|
67
|
+
},
|
|
68
|
+
data: {
|
|
69
|
+
type: Array,
|
|
70
|
+
default() {
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
multiple: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: true
|
|
77
|
+
},
|
|
78
|
+
max: Number,
|
|
79
|
+
mix: Boolean
|
|
80
|
+
},
|
|
81
|
+
data() {
|
|
82
|
+
return {};
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
isObject() {
|
|
86
|
+
if (
|
|
87
|
+
this.selectes &&
|
|
88
|
+
Array.isArray(this.selectes) &&
|
|
89
|
+
this.selectes.length > 0 &&
|
|
90
|
+
util.isObject(this.selectes[0])
|
|
91
|
+
) {
|
|
92
|
+
return true;
|
|
93
|
+
} else {
|
|
94
|
+
if (this.valueType === 'object') {
|
|
95
|
+
return true;
|
|
96
|
+
} else {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
selectes: {
|
|
102
|
+
get() {
|
|
103
|
+
return this.value;
|
|
104
|
+
},
|
|
105
|
+
set(val) {
|
|
106
|
+
return val;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
mounted() {
|
|
111
|
+
if (this.multiple && this.genre === 'delete') {
|
|
112
|
+
this._sortable = new Sortable(this.$refs.sortable.$el, {
|
|
113
|
+
animation: 150,
|
|
114
|
+
onUpdate: this.handleSort
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
getLabel(res) {
|
|
120
|
+
let tag = '';
|
|
121
|
+
if (this.mix) {
|
|
122
|
+
tag = util.getTypeName(res.stype);
|
|
123
|
+
}
|
|
124
|
+
return (
|
|
125
|
+
tag +
|
|
126
|
+
(res[this.labelKey]
|
|
127
|
+
? res[this.labelKey]
|
|
128
|
+
: res.label || res[this.valueKey])
|
|
129
|
+
);
|
|
130
|
+
},
|
|
131
|
+
handleSort(res) {
|
|
132
|
+
this.$emit('sort', res);
|
|
133
|
+
},
|
|
134
|
+
getprops(attrs, res) {
|
|
135
|
+
return util.isObject(res) ? { ...attrs, ...res } : attrs;
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
beforeDestroy() {
|
|
139
|
+
if (this._sortable !== undefined) this._sortable.destroy();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
</script>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="es-selector-tree">
|
|
3
|
+
<el-input
|
|
4
|
+
v-model="seachkey"
|
|
5
|
+
placeholder="请输入搜索关键字"
|
|
6
|
+
class="es-selector-tree-search"
|
|
7
|
+
@change="handleChangeSearch"
|
|
8
|
+
>
|
|
9
|
+
<template slot="append">
|
|
10
|
+
<el-button
|
|
11
|
+
icon="el-icon-search"
|
|
12
|
+
type="primary"
|
|
13
|
+
@click="handleSearch"
|
|
14
|
+
></el-button>
|
|
15
|
+
</template>
|
|
16
|
+
</el-input>
|
|
17
|
+
<div
|
|
18
|
+
v-loading="loading"
|
|
19
|
+
element-loading-text="加载中..."
|
|
20
|
+
element-loading-spinner="el-icon-loading"
|
|
21
|
+
element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
22
|
+
class="es-tree-content"
|
|
23
|
+
>
|
|
24
|
+
<el-scrollbar class="es-scrollbar">
|
|
25
|
+
<el-tree
|
|
26
|
+
ref="tree"
|
|
27
|
+
class="es-filter-tree"
|
|
28
|
+
empty-text="暂无数据"
|
|
29
|
+
node-key="id"
|
|
30
|
+
:indent="12"
|
|
31
|
+
:data="contents"
|
|
32
|
+
:props="props"
|
|
33
|
+
:filter-node-method="filterNode"
|
|
34
|
+
:expand-on-click-node="false"
|
|
35
|
+
:highlight-current="true"
|
|
36
|
+
@node-expand="handleExpand"
|
|
37
|
+
@node-click="handleClick"
|
|
38
|
+
>
|
|
39
|
+
<el-tooltip
|
|
40
|
+
:content="node.label"
|
|
41
|
+
placement="right"
|
|
42
|
+
:auto="true"
|
|
43
|
+
slot-scope="{ node, data }"
|
|
44
|
+
>
|
|
45
|
+
<div
|
|
46
|
+
:class="[
|
|
47
|
+
{
|
|
48
|
+
'es-icon-node': icon,
|
|
49
|
+
'es-icon-group':
|
|
50
|
+
data.attributes && data.attributes.isentity === '0',
|
|
51
|
+
'es-icon-open': node.expanded
|
|
52
|
+
},
|
|
53
|
+
data.attributes && data.attributes.orgType
|
|
54
|
+
? 'es-icon-' + data.attributes.orgType
|
|
55
|
+
: ''
|
|
56
|
+
]"
|
|
57
|
+
>
|
|
58
|
+
{{ node.label }}
|
|
59
|
+
</div>
|
|
60
|
+
</el-tooltip>
|
|
61
|
+
</el-tree>
|
|
62
|
+
</el-scrollbar>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
<script>
|
|
67
|
+
export default {
|
|
68
|
+
name: 'Tree',
|
|
69
|
+
props: {
|
|
70
|
+
data: {
|
|
71
|
+
type: [Array, Object],
|
|
72
|
+
default() {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
icon: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: true
|
|
79
|
+
},
|
|
80
|
+
loading: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
data() {
|
|
86
|
+
return {
|
|
87
|
+
props: {
|
|
88
|
+
label: 'name',
|
|
89
|
+
children: 'children'
|
|
90
|
+
},
|
|
91
|
+
seachkey: '',
|
|
92
|
+
chooseNode: ''
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
computed: {
|
|
96
|
+
contents() {
|
|
97
|
+
return this.data;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
watch: {},
|
|
101
|
+
mounted() {},
|
|
102
|
+
methods: {
|
|
103
|
+
// 树节点展开
|
|
104
|
+
handleExpand(data, node) {
|
|
105
|
+
this.$emit('loadsub', data, node);
|
|
106
|
+
},
|
|
107
|
+
handleClick(data, node) {
|
|
108
|
+
this.$emit('loadsub', data, node, true);
|
|
109
|
+
},
|
|
110
|
+
filterNode(value, data) {
|
|
111
|
+
if (!value) return true;
|
|
112
|
+
return data.label.indexOf(value) !== -1;
|
|
113
|
+
},
|
|
114
|
+
loadNode(node, resolve) {
|
|
115
|
+
this.$emit('load', node, resolve);
|
|
116
|
+
},
|
|
117
|
+
handleChangeSearch() {
|
|
118
|
+
if (this.seachkey === '') {
|
|
119
|
+
this.$emit('search', '');
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
handleSearch() {
|
|
123
|
+
if (this.seachkey !== '') {
|
|
124
|
+
this.$emit('search', this.seachkey);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
</script>
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="es-sizer"
|
|
4
|
+
:style="style"
|
|
5
|
+
v-loading="loading"
|
|
6
|
+
element-loading-text="处理中..."
|
|
7
|
+
element-loading-spinner="el-icon-loading"
|
|
8
|
+
element-loading-background="rgba(0, 0, 0, 0.65)"
|
|
9
|
+
>
|
|
10
|
+
<es-tree
|
|
11
|
+
:param="params"
|
|
12
|
+
:parseParams="handleParams"
|
|
13
|
+
ref="sizerTree"
|
|
14
|
+
show-search
|
|
15
|
+
show-checkbox
|
|
16
|
+
check-strictly
|
|
17
|
+
@check-change="handleChange"
|
|
18
|
+
></es-tree>
|
|
19
|
+
<div class="es-sizer-handle">
|
|
20
|
+
<es-button size="medium" @click="handleCheckedAll">全选</es-button>
|
|
21
|
+
<es-button size="medium" @click="handleResetChecked">全清</es-button>
|
|
22
|
+
<es-button
|
|
23
|
+
size="medium"
|
|
24
|
+
@click="handleAllSub"
|
|
25
|
+
:type="checkType === 'checksubAllTrue' ? 'primary' : ''"
|
|
26
|
+
>所有下级</es-button
|
|
27
|
+
>
|
|
28
|
+
<es-button
|
|
29
|
+
size="medium"
|
|
30
|
+
@click="handleSub"
|
|
31
|
+
:type="checkType === 'checksubTrue' ? 'primary' : ''"
|
|
32
|
+
>直接下级</es-button
|
|
33
|
+
>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="handleBox">
|
|
36
|
+
<es-button size="medium" type="primary" @click="handleConfirm"
|
|
37
|
+
>确认</es-button
|
|
38
|
+
>
|
|
39
|
+
<es-button size="medium" @click="handleCancel">取消</es-button>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
<script>
|
|
44
|
+
import { getOrgMainTree, getSelectOrgsubids } from 'eoss-ui/src/config/api.js';
|
|
45
|
+
import util from 'eoss-ui/src/utils/util';
|
|
46
|
+
export default {
|
|
47
|
+
name: 'EsSizer',
|
|
48
|
+
inject: {
|
|
49
|
+
esDialog: {
|
|
50
|
+
default: ''
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
props: {
|
|
54
|
+
method: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: 'get'
|
|
57
|
+
},
|
|
58
|
+
width: {
|
|
59
|
+
type: [String, Number],
|
|
60
|
+
default: '500px'
|
|
61
|
+
},
|
|
62
|
+
height: {
|
|
63
|
+
type: [String, Number],
|
|
64
|
+
default: '600px'
|
|
65
|
+
},
|
|
66
|
+
url: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: getOrgMainTree
|
|
69
|
+
},
|
|
70
|
+
orgUrl: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: getSelectOrgsubids
|
|
73
|
+
},
|
|
74
|
+
selectField: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: 'creditCode'
|
|
77
|
+
},
|
|
78
|
+
businessSubCentercode: String,
|
|
79
|
+
param: {
|
|
80
|
+
type: Object,
|
|
81
|
+
default() {
|
|
82
|
+
return {
|
|
83
|
+
showarea: 0,
|
|
84
|
+
orgType: 'org',
|
|
85
|
+
nocheck: false,
|
|
86
|
+
id: 'all',
|
|
87
|
+
isroot: true,
|
|
88
|
+
businessSubCentercode: 'business_property',
|
|
89
|
+
synchro: true,
|
|
90
|
+
pvd: 'true',
|
|
91
|
+
levels: 2,
|
|
92
|
+
showlevelsub: true,
|
|
93
|
+
selectType: 'orglist'
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
computed: {
|
|
99
|
+
style() {
|
|
100
|
+
if (this.esDialog) {
|
|
101
|
+
return { height: '100%' };
|
|
102
|
+
}
|
|
103
|
+
let width = this.width;
|
|
104
|
+
let height = this.height;
|
|
105
|
+
if (typeof this.width === 'number' || this.width.indexOf('px') === -1) {
|
|
106
|
+
width = this.width + 'px';
|
|
107
|
+
}
|
|
108
|
+
if (typeof this.height === 'number' || this.height.indexOf('px') === -1) {
|
|
109
|
+
height = this.height + 'px';
|
|
110
|
+
}
|
|
111
|
+
return { width: width, height: height };
|
|
112
|
+
},
|
|
113
|
+
params() {
|
|
114
|
+
if (this.businessSubCentercode) {
|
|
115
|
+
return {
|
|
116
|
+
...this.param,
|
|
117
|
+
businessSubCentercode: this.businessSubCentercode
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return this.param;
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
watch: {
|
|
124
|
+
checkeds: {
|
|
125
|
+
deep: true,
|
|
126
|
+
handler(val) {
|
|
127
|
+
this.$emit('change', val);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
data() {
|
|
132
|
+
return {
|
|
133
|
+
loading: false,
|
|
134
|
+
checkeds: null,
|
|
135
|
+
checkType: null
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
created() {
|
|
139
|
+
//this.loadsub(this.param);
|
|
140
|
+
},
|
|
141
|
+
methods: {
|
|
142
|
+
handleParams({ data, params }) {
|
|
143
|
+
let param = JSON.parse(JSON.stringify(params));
|
|
144
|
+
param.isroot = data.pId === 'root';
|
|
145
|
+
return param;
|
|
146
|
+
},
|
|
147
|
+
handleCheckedAll() {
|
|
148
|
+
this.$refs.sizerTree.handleCheck();
|
|
149
|
+
this.checkType = 'checkAllTrue';
|
|
150
|
+
},
|
|
151
|
+
handleResetChecked() {
|
|
152
|
+
this.$refs.sizerTree.setCheckedKeys([]);
|
|
153
|
+
this.checkType = null;
|
|
154
|
+
},
|
|
155
|
+
getCheckedNodes() {
|
|
156
|
+
this.checkeds = this.$refs.sizerTree.getCheckedNodes();
|
|
157
|
+
return this.checkeds;
|
|
158
|
+
},
|
|
159
|
+
handleChange() {
|
|
160
|
+
this.getCheckedNodes();
|
|
161
|
+
},
|
|
162
|
+
handleAllSub() {
|
|
163
|
+
if (!this.checkeds || !this.checkeds.length) {
|
|
164
|
+
this.$alert('请选择组织!', '提示', {
|
|
165
|
+
type: 'warning'
|
|
166
|
+
});
|
|
167
|
+
} else {
|
|
168
|
+
this.checkType = 'checksubAllTrue';
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
handleSub() {
|
|
172
|
+
if (!this.checkeds || !this.checkeds.length) {
|
|
173
|
+
this.$alert('请选择组织!', '提示', {
|
|
174
|
+
type: 'warning'
|
|
175
|
+
});
|
|
176
|
+
} else {
|
|
177
|
+
this.checkType = 'checksubTrue';
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
async handleConfirm() {
|
|
181
|
+
if (!this.checkeds || !this.checkeds.length) {
|
|
182
|
+
this.$alert('请选择组织!', '提示', {
|
|
183
|
+
type: 'warning'
|
|
184
|
+
});
|
|
185
|
+
} else {
|
|
186
|
+
let ids = [];
|
|
187
|
+
let creditCodes = [];
|
|
188
|
+
let carry = true;
|
|
189
|
+
if (this.checkType === 'checkAllTrue') {
|
|
190
|
+
ids = ['all'];
|
|
191
|
+
} else {
|
|
192
|
+
this.checkeds.forEach(item => {
|
|
193
|
+
let data = JSON.parse(item.data.objdata);
|
|
194
|
+
if (data.creditCode && data.creditCode !== 'undefined') {
|
|
195
|
+
creditCodes.push(data.creditCode);
|
|
196
|
+
}
|
|
197
|
+
if (item.isParent && item.children) {
|
|
198
|
+
ids.push(item.id);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
if (this.checkType) {
|
|
203
|
+
let params = {
|
|
204
|
+
businessSubCentercode:
|
|
205
|
+
this.params.businessSubCentercode ||
|
|
206
|
+
this.params.requestbusinessSubCentercode,
|
|
207
|
+
selectIds: ids.join(','),
|
|
208
|
+
selectField: this.selectField,
|
|
209
|
+
checkType: this.checkType
|
|
210
|
+
};
|
|
211
|
+
this.loading = true;
|
|
212
|
+
await util
|
|
213
|
+
.ajax({
|
|
214
|
+
url: this.orgUrl,
|
|
215
|
+
method: this.method,
|
|
216
|
+
data: params,
|
|
217
|
+
params: params
|
|
218
|
+
})
|
|
219
|
+
.then(res => {
|
|
220
|
+
this.loading = false;
|
|
221
|
+
if (res.rCode === 0) {
|
|
222
|
+
creditCodes = creditCodes.concat(res.results.split(','));
|
|
223
|
+
} else {
|
|
224
|
+
carry = false;
|
|
225
|
+
this.$alert('查询出错,请联系系统管理员', '提示', {
|
|
226
|
+
type: 'error'
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
})
|
|
230
|
+
.catch(err => {
|
|
231
|
+
this.loading = false;
|
|
232
|
+
if (err.message && err.message !== 'canceled') {
|
|
233
|
+
this.$message.error(err.message);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
if (carry) {
|
|
238
|
+
this.$emit('confirm', {
|
|
239
|
+
checkeds: this.checkeds,
|
|
240
|
+
creditCode: creditCodes.join(','),
|
|
241
|
+
selectIds: ids,
|
|
242
|
+
count: creditCodes.length
|
|
243
|
+
});
|
|
244
|
+
this.esDialog && this.esDialog.handleClose();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
handleCancel() {
|
|
249
|
+
this.$emit('cancel');
|
|
250
|
+
this.esDialog && this.esDialog.handleClose();
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
</script>
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-steps
|
|
3
|
+
v-bind="$attrs"
|
|
4
|
+
:active="defaultActive"
|
|
5
|
+
class="es-steps"
|
|
6
|
+
:finishStatus="finishStatus"
|
|
7
|
+
>
|
|
8
|
+
<el-step
|
|
9
|
+
v-for="(item, indexs) in content"
|
|
10
|
+
v-bind="handleExclAttribute({ data: item, attr: ['title'] })"
|
|
11
|
+
:key="indexs"
|
|
12
|
+
:title="
|
|
13
|
+
typeof item.title === 'string' && (!showNumber || !item.showNumber)
|
|
14
|
+
? item.title
|
|
15
|
+
: undefined
|
|
16
|
+
"
|
|
17
|
+
:showNumber="false"
|
|
18
|
+
:position="position"
|
|
19
|
+
:class="{
|
|
20
|
+
'es-line-dotted': indexs === active - 1,
|
|
21
|
+
'es-is-click': isClick
|
|
22
|
+
}"
|
|
23
|
+
@click="
|
|
24
|
+
() => {
|
|
25
|
+
handleClick(item, indexs);
|
|
26
|
+
}
|
|
27
|
+
"
|
|
28
|
+
>
|
|
29
|
+
<template
|
|
30
|
+
slot="title"
|
|
31
|
+
v-if="(showNumber || item.showNumber) && typeof item.title === 'string'"
|
|
32
|
+
>
|
|
33
|
+
<span class="es-step-title_number">{{
|
|
34
|
+
(prepose ? prepose : '') + (indexs + 1)
|
|
35
|
+
}}</span>
|
|
36
|
+
<span class="es-step-title_text">{{ item.title }}</span>
|
|
37
|
+
</template>
|
|
38
|
+
<template v-else-if="typeof item.title === 'object'" slot="title">
|
|
39
|
+
<template v-if="Array.isArray(item.title)">
|
|
40
|
+
<span
|
|
41
|
+
v-for="(ele, index) in item.title"
|
|
42
|
+
:class="'es-step-title_' + index"
|
|
43
|
+
>{{ ele }}</span
|
|
44
|
+
>
|
|
45
|
+
</template>
|
|
46
|
+
<template v-else>
|
|
47
|
+
<span
|
|
48
|
+
class="es-step-title_number"
|
|
49
|
+
v-if="Object.prototype.hasOwnProperty.call(item.title, 'number')"
|
|
50
|
+
>{{ item.title.number }}</span
|
|
51
|
+
>
|
|
52
|
+
<span
|
|
53
|
+
class="es-step-title_text"
|
|
54
|
+
v-if="Object.prototype.hasOwnProperty.call(item.title, 'text')"
|
|
55
|
+
>{{ item.title.text }}</span
|
|
56
|
+
>
|
|
57
|
+
<span
|
|
58
|
+
class="es-step-title_icon"
|
|
59
|
+
v-if="Object.prototype.hasOwnProperty.call(item.title, 'icon')"
|
|
60
|
+
>{{ item.title.icon }}</span
|
|
61
|
+
>
|
|
62
|
+
</template>
|
|
63
|
+
</template>
|
|
64
|
+
</el-step>
|
|
65
|
+
</el-steps>
|
|
66
|
+
</template>
|
|
67
|
+
<script>
|
|
68
|
+
import util from 'eoss-ui/src/utils/util.js';
|
|
69
|
+
export default {
|
|
70
|
+
name: 'EsSteps',
|
|
71
|
+
inheritAttrs: false,
|
|
72
|
+
inject: {
|
|
73
|
+
esForm: {
|
|
74
|
+
default: ''
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
props: {
|
|
78
|
+
method: String,
|
|
79
|
+
prepose: String,
|
|
80
|
+
active: {
|
|
81
|
+
type: Number,
|
|
82
|
+
default: 0
|
|
83
|
+
},
|
|
84
|
+
finishStatus: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: 'success'
|
|
87
|
+
},
|
|
88
|
+
url: String,
|
|
89
|
+
param: Object,
|
|
90
|
+
contents: Array,
|
|
91
|
+
showNumber: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false
|
|
94
|
+
},
|
|
95
|
+
position: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: 'top'
|
|
98
|
+
},
|
|
99
|
+
finish: Boolean,
|
|
100
|
+
isClick: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: true
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
data() {
|
|
106
|
+
return {
|
|
107
|
+
list: null
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
computed: {
|
|
111
|
+
content() {
|
|
112
|
+
return this.list ? this.list : this.contents;
|
|
113
|
+
},
|
|
114
|
+
defaultActive() {
|
|
115
|
+
return this.finish ? this.content.length : this.active;
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
watch: {
|
|
119
|
+
url() {
|
|
120
|
+
this.getData();
|
|
121
|
+
},
|
|
122
|
+
param: {
|
|
123
|
+
deep: true,
|
|
124
|
+
handler() {
|
|
125
|
+
if (this.url) {
|
|
126
|
+
this.getData();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
created() {
|
|
132
|
+
this.getData();
|
|
133
|
+
},
|
|
134
|
+
mounted() {},
|
|
135
|
+
methods: {
|
|
136
|
+
getData() {
|
|
137
|
+
if (this.url) {
|
|
138
|
+
let param = this.param ? this.param : {};
|
|
139
|
+
util
|
|
140
|
+
.ajax({
|
|
141
|
+
method: this.method,
|
|
142
|
+
url: this.url,
|
|
143
|
+
data: param,
|
|
144
|
+
params: param
|
|
145
|
+
})
|
|
146
|
+
.then(res => {
|
|
147
|
+
if (res.rCode === 0) {
|
|
148
|
+
if (this.esForm) {
|
|
149
|
+
this.esForm.stepContent = JSON.parse(
|
|
150
|
+
JSON.stringify(res.results)
|
|
151
|
+
);
|
|
152
|
+
} else {
|
|
153
|
+
this.list = JSON.parse(JSON.stringify(res.results));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
})
|
|
157
|
+
.catch(err => {
|
|
158
|
+
if (err.message && err.message !== 'canceled') {
|
|
159
|
+
this.$message.error(err.message);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
handleClick(item, index) {
|
|
165
|
+
this.$emit('click', { type: 'step', ...item }, index);
|
|
166
|
+
},
|
|
167
|
+
handleExclAttribute({ data, attrs }) {
|
|
168
|
+
return util.exclAttribute({
|
|
169
|
+
data: data,
|
|
170
|
+
attrs: attrs
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
</script>
|