eoss-ui 0.5.81-beta2 → 0.5.81-beta20
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 +76 -53
- package/lib/button.js +51 -46
- package/lib/checkbox-group.js +49 -45
- package/lib/clients.js +4 -3
- package/lib/config/api.js +3 -1
- package/lib/data-table-form.js +49 -45
- package/lib/data-table.js +443 -240
- package/lib/date-picker.js +49 -45
- package/lib/dialog.js +58 -53
- package/lib/eoss-ui.common.js +3698 -2064
- package/lib/flow-group.js +52 -48
- package/lib/flow-list.js +50 -46
- package/lib/flow.js +138 -75
- package/lib/form.js +96 -49
- package/lib/handle-user.js +66 -49
- package/lib/handler.js +61 -48
- package/lib/icon.js +49 -45
- package/lib/index.js +1 -1
- package/lib/input-number.js +49 -45
- package/lib/input.js +49 -45
- package/lib/login.js +64 -53
- package/lib/main.js +2632 -1466
- package/lib/menu.js +1 -1
- package/lib/nav.js +49 -45
- package/lib/notify.js +54 -50
- package/lib/page.js +49 -45
- package/lib/pagination.js +3719 -3
- package/lib/player.js +54 -50
- package/lib/qr-code.js +49 -45
- package/lib/radio-group.js +49 -45
- package/lib/retrial-auth.js +50 -46
- package/lib/select-ganged.js +49 -45
- package/lib/select.js +50 -46
- package/lib/selector-panel.js +115 -63
- package/lib/selector.js +491 -422
- package/lib/sizer.js +49 -45
- package/lib/steps.js +49 -45
- package/lib/switch.js +49 -45
- package/lib/table-form.js +49 -45
- package/lib/tabs.js +49 -45
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/button-group.css +1 -1
- package/lib/theme-chalk/data-table.css +1 -1
- package/lib/theme-chalk/handler.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/nav.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/selector-panel.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -1
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/toolbar.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +49 -45
- package/lib/tree-group.js +49 -45
- package/lib/tree.js +49 -45
- package/lib/upload.js +59 -55
- package/lib/wujie.js +49 -45
- package/lib/wxlogin.js +49 -45
- package/package.json +2 -2
- package/packages/button/src/main.vue +2 -1
- package/packages/button-group/src/main.vue +8 -6
- package/packages/clients/src/main.vue +2 -1
- package/packages/data-table/src/column.vue +113 -41
- package/packages/data-table/src/formItem.vue +430 -0
- package/packages/data-table/src/main.vue +85 -45
- package/packages/data-table/src/sizer.vue +2 -0
- package/packages/dialog/src/main.vue +4 -3
- package/packages/flow/src/main.vue +30 -17
- package/packages/flow-group/src/main.vue +1 -1
- package/packages/form/src/main.vue +45 -10
- package/packages/handle-user/src/main.vue +10 -3
- package/packages/handler/src/main.vue +5 -3
- package/packages/login/src/main.vue +13 -6
- package/packages/main/src/default/index.vue +102 -179
- package/packages/main/src/main.vue +243 -16
- package/packages/main/src/public/online.vue +90 -0
- package/packages/main/src/simplicity/apps.vue +176 -145
- package/packages/main/src/simplicity/avatar.vue +16 -6
- package/packages/main/src/simplicity/handler.vue +6 -2
- package/packages/main/src/simplicity/index.vue +477 -323
- package/packages/main/src/simplicity/menu-list.vue +75 -24
- package/packages/main/src/simplicity/message.vue +35 -25
- package/packages/main/src/simplicity/notice.vue +72 -39
- package/packages/main/src/simplicity/router-page.vue +53 -0
- package/packages/main/src/simplicity/settings.vue +1 -1
- package/packages/main/src/simplicity/sub-menu.vue +169 -54
- package/packages/main/src/simplicity/user.vue +10 -5
- package/packages/main/src/simplicity/userinfo.vue +1 -0
- package/packages/menu/src/main.vue +4 -3
- package/packages/pagination/src/main.vue +20 -1
- package/packages/select/src/main.vue +4 -1
- package/packages/selector/src/main.vue +151 -136
- package/packages/selector-panel/src/main.vue +23 -9
- package/packages/selector-panel/src/selection.vue +6 -0
- package/packages/theme-chalk/lib/base.css +1 -1
- package/packages/theme-chalk/lib/button-group.css +1 -1
- package/packages/theme-chalk/lib/data-table.css +1 -1
- package/packages/theme-chalk/lib/handler.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/menu.css +1 -1
- package/packages/theme-chalk/lib/nav.css +1 -1
- package/packages/theme-chalk/lib/pagination.css +1 -1
- package/packages/theme-chalk/lib/selector-panel.css +1 -1
- package/packages/theme-chalk/lib/simplicity.css +1 -1
- package/packages/theme-chalk/lib/sizer.css +1 -1
- package/packages/theme-chalk/lib/toolbar.css +1 -1
- package/packages/theme-chalk/lib/tree.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/base.scss +5 -0
- package/packages/theme-chalk/src/button-group.scss +18 -4
- package/packages/theme-chalk/src/common/var.scss +9 -2
- package/packages/theme-chalk/src/data-table.scss +60 -23
- package/packages/theme-chalk/src/handler.scss +5 -1
- package/packages/theme-chalk/src/login.scss +2 -2
- package/packages/theme-chalk/src/nav.scss +3 -2
- package/packages/theme-chalk/src/pagination.scss +7 -0
- package/packages/theme-chalk/src/selector-panel.scss +2 -1
- package/packages/theme-chalk/src/simplicity.scss +355 -58
- package/packages/theme-chalk/src/toolbar.scss +16 -4
- package/packages/theme-chalk/src/tree.scss +4 -2
- package/packages/upload/src/main.vue +3 -1
- package/src/config/api.js +3 -1
- package/src/index.js +1 -1
|
@@ -1,31 +1,97 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
<el-drawer
|
|
3
|
+
class="es-simplicity-subMenus"
|
|
4
|
+
direction="ltr"
|
|
5
|
+
modal-class="es-simplicity-apps-modal"
|
|
6
|
+
size="auto"
|
|
7
|
+
:modal-append-to-body="false"
|
|
8
|
+
:close-on-press-escape="false"
|
|
9
|
+
:modal="false"
|
|
10
|
+
:with-header="false"
|
|
11
|
+
:wrapperClosable="false"
|
|
12
|
+
:visible.sync="show"
|
|
13
|
+
>
|
|
14
14
|
<div
|
|
15
|
-
class="es-simplicity-menus
|
|
16
|
-
|
|
17
|
-
v-for="(item, index) in subMenus"
|
|
18
|
-
:key="item.id"
|
|
15
|
+
class="es-simplicity-menus"
|
|
16
|
+
:class="{ 'es-simplicity-menus-plus': mode == 'plus' }"
|
|
19
17
|
>
|
|
20
|
-
<div class="es-simplicity-menus-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
<div class="es-simplicity-menus-box" :style="{ width: width + 'px' }">
|
|
19
|
+
<div class="es-simplicity-menus-title">
|
|
20
|
+
<span class="es-simplicity-menus-title-text" v-if="!fold">{{
|
|
21
|
+
title || text
|
|
22
|
+
}}</span>
|
|
23
|
+
<i
|
|
24
|
+
class="es-icon-shouqicaidan es-simplicity-menus-title-icon"
|
|
25
|
+
v-show="!fold"
|
|
26
|
+
@click="handleFold(true)"
|
|
27
|
+
></i>
|
|
28
|
+
<i
|
|
29
|
+
class="es-icon-shouqicaidan-right es-simplicity-menus-title-icon"
|
|
30
|
+
v-show="fold"
|
|
31
|
+
@click="handleFold(false)"
|
|
32
|
+
></i>
|
|
33
|
+
</div>
|
|
34
|
+
<menu-list
|
|
35
|
+
:active="actives[0]"
|
|
36
|
+
:data="menus"
|
|
37
|
+
:menuIcon="menuIcon"
|
|
38
|
+
:color="color"
|
|
39
|
+
:backgroundColor="backgroundColor"
|
|
40
|
+
:fold="fold"
|
|
41
|
+
:width="size"
|
|
42
|
+
@menter="
|
|
43
|
+
(res) => {
|
|
44
|
+
this.getData(res, 0, true);
|
|
45
|
+
}
|
|
46
|
+
"
|
|
47
|
+
@mleave="
|
|
48
|
+
(res) => {
|
|
49
|
+
this.getData(res, 0, false);
|
|
50
|
+
}
|
|
51
|
+
"
|
|
52
|
+
@hover="handleHover"
|
|
53
|
+
@command="handleCommand"
|
|
54
|
+
></menu-list>
|
|
55
|
+
</div>
|
|
56
|
+
<div
|
|
57
|
+
class="es-simplicity-menus-view"
|
|
58
|
+
@mouseleave="handleLeave"
|
|
59
|
+
@mouseenter="handleEnter"
|
|
60
|
+
v-show="subMenus.length"
|
|
61
|
+
>
|
|
62
|
+
<div
|
|
63
|
+
class="es-simplicity-menus-box"
|
|
64
|
+
v-for="(item, index) in subMenus"
|
|
65
|
+
:key="item.id"
|
|
66
|
+
>
|
|
67
|
+
<div class="es-simplicity-menus-title">
|
|
68
|
+
<span class="es-simplicity-menus-title-text">{{
|
|
69
|
+
item.name || item.text || item.title
|
|
70
|
+
}}</span>
|
|
71
|
+
</div>
|
|
72
|
+
<menu-list
|
|
73
|
+
:active="actives[index + 1]"
|
|
74
|
+
:data="[...item.children, ...item.fourthTabs]"
|
|
75
|
+
:menuIcon="menuIcon"
|
|
76
|
+
:color="color"
|
|
77
|
+
:backgroundColor="backgroundColor"
|
|
78
|
+
:width="size"
|
|
79
|
+
@menter="
|
|
80
|
+
(res) => {
|
|
81
|
+
getData(res, index + 1, true);
|
|
82
|
+
}
|
|
83
|
+
"
|
|
84
|
+
@mleave="
|
|
85
|
+
(res) => {
|
|
86
|
+
getData(res, index + 1, false);
|
|
87
|
+
}
|
|
88
|
+
"
|
|
89
|
+
@command="handleCommand"
|
|
90
|
+
></menu-list>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
27
93
|
</div>
|
|
28
|
-
</
|
|
94
|
+
</el-drawer>
|
|
29
95
|
</template>
|
|
30
96
|
|
|
31
97
|
<script>
|
|
@@ -34,6 +100,10 @@ export default {
|
|
|
34
100
|
name: 'SubMenu',
|
|
35
101
|
components: { MenuList },
|
|
36
102
|
props: {
|
|
103
|
+
mode: String,
|
|
104
|
+
title: String,
|
|
105
|
+
active: String,
|
|
106
|
+
closed: Boolean,
|
|
37
107
|
color: {
|
|
38
108
|
type: [String, Array],
|
|
39
109
|
default: '#fff'
|
|
@@ -51,6 +121,11 @@ export default {
|
|
|
51
121
|
];
|
|
52
122
|
}
|
|
53
123
|
},
|
|
124
|
+
size: {
|
|
125
|
+
type: Number,
|
|
126
|
+
default: 220
|
|
127
|
+
},
|
|
128
|
+
visible: Boolean,
|
|
54
129
|
text: String,
|
|
55
130
|
menuIcon: String,
|
|
56
131
|
children: {
|
|
@@ -68,56 +143,96 @@ export default {
|
|
|
68
143
|
},
|
|
69
144
|
data() {
|
|
70
145
|
return {
|
|
71
|
-
|
|
72
|
-
|
|
146
|
+
fold: this.closed,
|
|
147
|
+
width: this.size,
|
|
148
|
+
subMenus: [],
|
|
149
|
+
isEnter: false,
|
|
150
|
+
timer: null,
|
|
151
|
+
actives: []
|
|
73
152
|
};
|
|
74
153
|
},
|
|
75
154
|
computed: {
|
|
76
155
|
menus() {
|
|
77
156
|
return [...this.children, ...this.fourthTabs];
|
|
157
|
+
},
|
|
158
|
+
show: {
|
|
159
|
+
get() {
|
|
160
|
+
return this.visible;
|
|
161
|
+
},
|
|
162
|
+
set(val) {
|
|
163
|
+
this.$emit('update:visible', val);
|
|
164
|
+
return val;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
watch: {
|
|
169
|
+
closed(val) {
|
|
170
|
+
this.fold = val;
|
|
171
|
+
if (val) {
|
|
172
|
+
this.width = 48;
|
|
173
|
+
} else {
|
|
174
|
+
this.width = this.size;
|
|
175
|
+
}
|
|
78
176
|
}
|
|
79
177
|
},
|
|
80
|
-
watch: {},
|
|
81
178
|
created() {},
|
|
82
179
|
mounted() {},
|
|
83
180
|
methods: {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
} else {
|
|
91
|
-
this.$emit('command', res);
|
|
92
|
-
}
|
|
93
|
-
} else if (this.active !== res.id) {
|
|
94
|
-
this.active = res.id;
|
|
95
|
-
this.subMenus = [];
|
|
181
|
+
handleFold(res) {
|
|
182
|
+
this.fold = res;
|
|
183
|
+
if (res) {
|
|
184
|
+
this.width = 48;
|
|
185
|
+
} else {
|
|
186
|
+
this.width = this.size;
|
|
96
187
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
188
|
+
this.$emit('update:closed', res);
|
|
189
|
+
},
|
|
190
|
+
handleCommand(res) {
|
|
191
|
+
this.$emit('command', res);
|
|
192
|
+
},
|
|
193
|
+
getData(res, n, is) {
|
|
194
|
+
this.isEnter = is;
|
|
195
|
+
if (is) {
|
|
196
|
+
this.actives.splice(n);
|
|
197
|
+
if (this.actives[n]) {
|
|
198
|
+
this.actives[n] = res.id;
|
|
101
199
|
} else {
|
|
102
|
-
this.
|
|
200
|
+
this.actives.push(res.id);
|
|
201
|
+
}
|
|
202
|
+
this.subMenus.splice(n);
|
|
203
|
+
let { children, fourthTabs } = res;
|
|
204
|
+
if (
|
|
205
|
+
(children && children.length) ||
|
|
206
|
+
(fourthTabs && fourthTabs.length)
|
|
207
|
+
) {
|
|
208
|
+
this.subMenus = this.subMenus.concat(res);
|
|
103
209
|
}
|
|
104
|
-
this.$emit(
|
|
105
|
-
'command',
|
|
106
|
-
num === undefined ? 2 : 2 + parseInt(num, 10) + 1
|
|
107
|
-
);
|
|
108
210
|
} else {
|
|
109
|
-
if (
|
|
110
|
-
this
|
|
111
|
-
this.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
211
|
+
if (n == 0) {
|
|
212
|
+
clearTimeout(this.timer);
|
|
213
|
+
this.timer = setTimeout(() => {
|
|
214
|
+
if (res && !this.isEnter) {
|
|
215
|
+
this.subMenus = [];
|
|
216
|
+
this.actives = [];
|
|
217
|
+
}
|
|
218
|
+
}, 300);
|
|
115
219
|
}
|
|
116
220
|
}
|
|
117
221
|
},
|
|
222
|
+
handleHover(res) {
|
|
223
|
+
this.isEnter = res;
|
|
224
|
+
//if(this)
|
|
225
|
+
},
|
|
118
226
|
clearSubmenu() {
|
|
119
227
|
this.$refs.menus.clearActive();
|
|
120
228
|
this.subMenus = [];
|
|
229
|
+
},
|
|
230
|
+
handleLeave() {
|
|
231
|
+
this.subMenus = [];
|
|
232
|
+
this.actives = [];
|
|
233
|
+
},
|
|
234
|
+
handleEnter() {
|
|
235
|
+
this.isEnter = true;
|
|
121
236
|
}
|
|
122
237
|
}
|
|
123
238
|
};
|
|
@@ -42,7 +42,11 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
<div class="es-simplicity-notice-type" v-if="userScanBindImgUrl">
|
|
44
44
|
<div class="es-simplicity-notice-title">微信公众号:</div>
|
|
45
|
-
<
|
|
45
|
+
<el-image
|
|
46
|
+
class="es-simplicity-qrcode"
|
|
47
|
+
@click="getQrcode"
|
|
48
|
+
:src="qrcode"
|
|
49
|
+
></el-image>
|
|
46
50
|
</div>
|
|
47
51
|
<div class="es-simplicity-notice-type">
|
|
48
52
|
<div class="es-simplicity-notice-title">接收消息类型:</div>
|
|
@@ -58,15 +62,15 @@
|
|
|
58
62
|
修改密码 <i class="es-icon-arrow-right"></i>
|
|
59
63
|
</div>
|
|
60
64
|
<es-dialog title="修改密码" :visible.sync="visible">
|
|
61
|
-
<
|
|
62
|
-
</
|
|
65
|
+
<user-info v-if="visible" :contents="contents" :value="userInfo">
|
|
66
|
+
</user-info>
|
|
63
67
|
</es-dialog>
|
|
64
68
|
</div>
|
|
65
69
|
</template>
|
|
66
70
|
|
|
67
71
|
<script>
|
|
68
72
|
import avatar from './avatar.vue';
|
|
69
|
-
import
|
|
73
|
+
import userInfo from './userinfo.vue';
|
|
70
74
|
import util from 'eoss-ui/src/utils/util';
|
|
71
75
|
import { debounce } from 'throttle-debounce';
|
|
72
76
|
import {
|
|
@@ -76,7 +80,7 @@ import {
|
|
|
76
80
|
} from 'eoss-ui/src/config/api.js';
|
|
77
81
|
export default {
|
|
78
82
|
name: 'User',
|
|
79
|
-
components: { avatar,
|
|
83
|
+
components: { avatar, userInfo },
|
|
80
84
|
props: {
|
|
81
85
|
notify: String,
|
|
82
86
|
notifyList: Array,
|
|
@@ -133,6 +137,7 @@ export default {
|
|
|
133
137
|
this.checkPassword = results.checkPassword;
|
|
134
138
|
this.checkPasswordMsg = results.checkPasswordMsg;
|
|
135
139
|
this.headImgCode = results.headImgCode || undefined;
|
|
140
|
+
this.$emit('success', results);
|
|
136
141
|
} else {
|
|
137
142
|
let msg = res.msg || '系统错误,请联系管理员!';
|
|
138
143
|
this.$message.error(msg);
|
|
@@ -109,9 +109,10 @@ export default {
|
|
|
109
109
|
} else {
|
|
110
110
|
this.$nextTick(() => {
|
|
111
111
|
let w = 0;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
this.$refs.menu &&
|
|
113
|
+
Array.from(this.$refs.menu.$el.children).forEach((item) => {
|
|
114
|
+
w += item.getBoundingClientRect().width;
|
|
115
|
+
});
|
|
115
116
|
const styles = window.getComputedStyle(this.$refs.menu.$el);
|
|
116
117
|
w += parseFloat(styles.paddingLeft) + parseFloat(styles.paddingRight);
|
|
117
118
|
if (w > this.$refs.esMenu.$el.getBoundingClientRect().width) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-pagination
|
|
3
3
|
class="es-pagination"
|
|
4
|
+
:class="{ 'es-pagination-complete': isComplete && position != 'center' }"
|
|
4
5
|
v-bind="$attrs"
|
|
5
6
|
:current-page="pageNum"
|
|
6
7
|
:page-size="pageSize"
|
|
@@ -18,10 +19,28 @@
|
|
|
18
19
|
</el-pagination>
|
|
19
20
|
</template>
|
|
20
21
|
<script>
|
|
22
|
+
import util from 'eoss-ui/src/utils/util';
|
|
23
|
+
const paginationLayout =
|
|
24
|
+
util.win.top.tableLayout ||
|
|
25
|
+
util.win.tableLayout ||
|
|
26
|
+
'prev, pager, next, sizes, total';
|
|
21
27
|
export default {
|
|
22
28
|
name: 'EsPagination',
|
|
23
29
|
inheritAttrs: false,
|
|
30
|
+
computed: {
|
|
31
|
+
isComplete() {
|
|
32
|
+
return (
|
|
33
|
+
this.layout.indexOf('total') > -1 &&
|
|
34
|
+
this.layout.indexOf('sizes') > -1 &&
|
|
35
|
+
this.layout.indexOf('prev') > -1 &&
|
|
36
|
+
this.layout.indexOf('pager') > -1 &&
|
|
37
|
+
this.layout.indexOf('next') > -1 &&
|
|
38
|
+
this.layout.indexOf('jumper') > -1
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
24
42
|
props: {
|
|
43
|
+
position: String,
|
|
25
44
|
// 当前页码
|
|
26
45
|
pageNum: {
|
|
27
46
|
type: Number,
|
|
@@ -46,7 +65,7 @@ export default {
|
|
|
46
65
|
// 自定义排版
|
|
47
66
|
layout: {
|
|
48
67
|
type: String,
|
|
49
|
-
default:
|
|
68
|
+
default: paginationLayout
|
|
50
69
|
},
|
|
51
70
|
// 只有一页时是否隐藏
|
|
52
71
|
hideOnSinglePage: {
|
|
@@ -498,7 +498,10 @@ export default {
|
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
} else {
|
|
501
|
-
if (
|
|
501
|
+
if (
|
|
502
|
+
typeof data === 'string' ||
|
|
503
|
+
(!data.length && !this.sysCode && !this.url)
|
|
504
|
+
) {
|
|
502
505
|
return value;
|
|
503
506
|
}
|
|
504
507
|
if (Array.isArray(data) && data.length) {
|