eoss-ui 0.6.18 → 0.6.20
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/eoss-ui.common.js +761 -657
- package/lib/flow.js +619 -515
- package/lib/index.js +1 -1
- package/lib/main.js +132 -132
- package/lib/qr-code.js +13 -13
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/package.json +157 -157
- package/packages/button/src/main.vue +418 -418
- package/packages/button-group/src/main.vue +298 -298
- package/packages/checkbox-group/src/main.vue +333 -333
- package/packages/clients/src/main.vue +144 -144
- package/packages/data-table/src/children.vue +39 -39
- package/packages/data-table/src/column.vue +983 -983
- package/packages/data-table/src/main.vue +1812 -1812
- package/packages/data-table/src/sizer.vue +195 -195
- package/packages/date-picker/src/main.vue +236 -236
- package/packages/flow/src/component/CustomPreset.vue +1 -1
- package/packages/flow/src/component/Preset.vue +1 -1
- package/packages/flow/src/component/SendMsg.vue +3 -1
- package/packages/flow/src/component/taskUnionExamine.vue +38 -20
- package/packages/flow/src/main.vue +2731 -2711
- package/packages/flow/src/processForm.vue +13 -2
- package/packages/flow/src/processReject.vue +14 -3
- package/packages/flow/src/startTaskRead.vue +23 -5
- package/packages/flow-group/src/main.vue +684 -684
- package/packages/form/src/main.vue +3582 -3582
- package/packages/form/src/table.vue +1420 -1420
- package/packages/handle-user/src/main.vue +134 -134
- package/packages/handler/src/main.vue +374 -374
- package/packages/icon/src/main.vue +101 -101
- package/packages/input/src/main.vue +356 -356
- package/packages/login/src/main.vue +1851 -1851
- package/packages/login/src/resetPassword.vue +557 -557
- 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 +494 -494
- package/packages/main/src/public/online.vue +89 -89
- package/packages/main/src/public/search.vue +454 -454
- 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 +183 -183
- package/packages/main/src/simplicity/index.vue +1930 -1930
- package/packages/main/src/simplicity/lists.vue +84 -84
- package/packages/main/src/simplicity/menu-list.vue +128 -128
- 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 +241 -241
- package/packages/main/src/simplicity/user.vue +248 -248
- package/packages/main/src/simplicity/userinfo.vue +304 -304
- package/packages/menu/src/main.vue +536 -536
- package/packages/pagination/src/main.vue +96 -96
- package/packages/qr-code/src/main.vue +170 -170
- package/packages/radio-group/src/main.vue +319 -319
- package/packages/select/src/main.vue +761 -761
- package/packages/selector/src/main.vue +677 -677
- package/packages/selector-panel/src/main.vue +1020 -1020
- package/packages/selector-panel/src/selection.vue +160 -160
- package/packages/tabs/src/main.vue +788 -788
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/login.css +1 -1
- package/packages/theme-chalk/src/base.scss +260 -260
- package/packages/theme-chalk/src/button-group.scss +175 -175
- package/packages/theme-chalk/src/calendar.scss +113 -113
- package/packages/theme-chalk/src/clients.scss +87 -87
- package/packages/theme-chalk/src/common/var.scss +1 -4
- package/packages/theme-chalk/src/data-table.scss +276 -276
- package/packages/theme-chalk/src/dialog.scss +77 -77
- package/packages/theme-chalk/src/flow-group.scss +110 -110
- package/packages/theme-chalk/src/form.scss +496 -496
- package/packages/theme-chalk/src/handler.scss +133 -133
- package/packages/theme-chalk/src/icon.scss +1745 -1745
- package/packages/theme-chalk/src/icons.scss +99 -99
- package/packages/theme-chalk/src/login.scss +917 -926
- package/packages/theme-chalk/src/main.scss +632 -632
- package/packages/theme-chalk/src/menu.scss +222 -222
- package/packages/theme-chalk/src/nav.scss +125 -125
- package/packages/theme-chalk/src/pagination.scss +29 -29
- package/packages/theme-chalk/src/selector-panel.scss +204 -204
- package/packages/theme-chalk/src/simplicity.scss +1246 -1246
- package/packages/theme-chalk/src/tabs.scss +87 -87
- 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/upload/src/main.vue +1313 -1313
- package/packages/wujie/src/main.vue +145 -145
- package/src/config/api.js +236 -236
- package/src/config/image.js +2 -2
- package/src/index.js +157 -157
- package/packages/.DS_Store +0 -0
- package/packages/checkbox-group/.DS_Store +0 -0
- package/packages/data-table/.DS_Store +0 -0
- package/packages/dialog/.DS_Store +0 -0
- package/packages/handler/.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/theme-chalk/src/.DS_Store +0 -0
- package/src/.DS_Store +0 -0
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="es-table-sizer">
|
|
3
|
-
<div class="es-table-sizer-tips">
|
|
4
|
-
提示:锁定的列排序无效,列的内容是数字才能合计
|
|
5
|
-
</div>
|
|
6
|
-
<es-data-table
|
|
7
|
-
dragSort
|
|
8
|
-
numbers
|
|
9
|
-
form
|
|
10
|
-
row-key="id"
|
|
11
|
-
default-expand-all
|
|
12
|
-
height="480px"
|
|
13
|
-
:mode="mode"
|
|
14
|
-
:data="theads"
|
|
15
|
-
:thead="thead"
|
|
16
|
-
:tree-props="{ children: 'childHead' }"
|
|
17
|
-
@change="handleChange"
|
|
18
|
-
@update-drag-sort="handleDrag"
|
|
19
|
-
>
|
|
20
|
-
</es-data-table>
|
|
21
|
-
<div class="sizer-btn-box">
|
|
22
|
-
<el-button type="primary" size="medium" @click="handleConfirm"
|
|
23
|
-
>确定</el-button
|
|
24
|
-
>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script type="text/babel">
|
|
30
|
-
import util from 'eoss-ui/src/utils/util';
|
|
31
|
-
export default {
|
|
32
|
-
name: 'Sizer',
|
|
33
|
-
props: {
|
|
34
|
-
mode: String,
|
|
35
|
-
data: Array
|
|
36
|
-
},
|
|
37
|
-
computed: {
|
|
38
|
-
theads: {
|
|
39
|
-
get() {
|
|
40
|
-
if (this.data && this.data.length) {
|
|
41
|
-
let newData = [];
|
|
42
|
-
this.getThead(this.data, newData);
|
|
43
|
-
return newData;
|
|
44
|
-
}
|
|
45
|
-
return [];
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
data() {
|
|
50
|
-
return {
|
|
51
|
-
visible: false,
|
|
52
|
-
thead: [
|
|
53
|
-
{
|
|
54
|
-
title: '名称',
|
|
55
|
-
field: 'title'
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
title: '锁定列位置',
|
|
59
|
-
field: 'fixed',
|
|
60
|
-
type: 'select',
|
|
61
|
-
clearable: true,
|
|
62
|
-
width: 160,
|
|
63
|
-
data: [
|
|
64
|
-
{
|
|
65
|
-
value: 'left',
|
|
66
|
-
name: '左'
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
value: 'right',
|
|
70
|
-
name: '右'
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
title: '列是否显示',
|
|
76
|
-
field: 'hide',
|
|
77
|
-
type: 'switch',
|
|
78
|
-
width: 160,
|
|
79
|
-
align: 'center',
|
|
80
|
-
data: [
|
|
81
|
-
{
|
|
82
|
-
value: false,
|
|
83
|
-
name: '隐藏'
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
value: true,
|
|
87
|
-
name: '显示'
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
title: '是否开启合计',
|
|
93
|
-
field: 'total',
|
|
94
|
-
type: 'switch',
|
|
95
|
-
width: 160,
|
|
96
|
-
align: 'center',
|
|
97
|
-
data: [
|
|
98
|
-
{
|
|
99
|
-
value: false,
|
|
100
|
-
name: '关闭'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
value: true,
|
|
104
|
-
name: '开启'
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
newThead: [],
|
|
110
|
-
nid: 0
|
|
111
|
-
};
|
|
112
|
-
},
|
|
113
|
-
mounted() {
|
|
114
|
-
this.newThead = util.extend(true, [], this.data);
|
|
115
|
-
},
|
|
116
|
-
methods: {
|
|
117
|
-
show() {
|
|
118
|
-
this.visible = true;
|
|
119
|
-
},
|
|
120
|
-
getThead(res, data) {
|
|
121
|
-
res.forEach((item, index) => {
|
|
122
|
-
if (
|
|
123
|
-
item.type !== 'index' &&
|
|
124
|
-
item.type !== 'selection' &&
|
|
125
|
-
item.type !== 'handle'
|
|
126
|
-
) {
|
|
127
|
-
let { fixed, hide, childHead, children, title, ...other } = item;
|
|
128
|
-
let items = {
|
|
129
|
-
title: title ? title : item.label,
|
|
130
|
-
fixed:
|
|
131
|
-
fixed === true
|
|
132
|
-
? 'left'
|
|
133
|
-
: fixed === undefined || fixed === false
|
|
134
|
-
? ''
|
|
135
|
-
: fixed,
|
|
136
|
-
hide: hide ? false : true,
|
|
137
|
-
id: index,
|
|
138
|
-
...other
|
|
139
|
-
};
|
|
140
|
-
if (childHead && childHead.length) {
|
|
141
|
-
let childHeads = [];
|
|
142
|
-
this.getThead(childHead, childHeads);
|
|
143
|
-
items.childHead = childHeads;
|
|
144
|
-
}
|
|
145
|
-
if (children && children.length) {
|
|
146
|
-
let childHeads = [];
|
|
147
|
-
this.getThead(children, childHeads);
|
|
148
|
-
items.children = childHeads;
|
|
149
|
-
}
|
|
150
|
-
data.push(items);
|
|
151
|
-
} else {
|
|
152
|
-
this.nid++;
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
},
|
|
156
|
-
setThead(res, thead) {
|
|
157
|
-
let { name, value, data } = res;
|
|
158
|
-
for (let i in thead) {
|
|
159
|
-
let item = thead[i];
|
|
160
|
-
if (data.field === item.field) {
|
|
161
|
-
thead[i][name] = name === 'hide' ? !value : value;
|
|
162
|
-
thead[i].hide === false && delete thead[i].hide;
|
|
163
|
-
break;
|
|
164
|
-
} else {
|
|
165
|
-
if (item.childHead && item.childHead.length) {
|
|
166
|
-
this.setThead(res, item.childHead);
|
|
167
|
-
}
|
|
168
|
-
if (item.children && item.children.length) {
|
|
169
|
-
this.setThead(res, item.children);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
handleChange(res) {
|
|
175
|
-
this.setThead(res, this.newThead);
|
|
176
|
-
},
|
|
177
|
-
handleDrag(res, evt) {
|
|
178
|
-
let { oldIndex, newIndex } = evt;
|
|
179
|
-
oldIndex += this.nid;
|
|
180
|
-
newIndex += this.nid;
|
|
181
|
-
if (oldIndex > newIndex) {
|
|
182
|
-
this.newThead.splice(newIndex, 0, this.newThead[oldIndex]);
|
|
183
|
-
this.newThead.splice(oldIndex + 1, 1);
|
|
184
|
-
} else {
|
|
185
|
-
this.newThead.splice(newIndex + 1, 0, this.newThead[oldIndex]);
|
|
186
|
-
this.newThead.splice(oldIndex, 1);
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
handleConfirm() {
|
|
190
|
-
this.visible = false;
|
|
191
|
-
this.$emit('confirm', this.newThead);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="es-table-sizer">
|
|
3
|
+
<div class="es-table-sizer-tips">
|
|
4
|
+
提示:锁定的列排序无效,列的内容是数字才能合计
|
|
5
|
+
</div>
|
|
6
|
+
<es-data-table
|
|
7
|
+
dragSort
|
|
8
|
+
numbers
|
|
9
|
+
form
|
|
10
|
+
row-key="id"
|
|
11
|
+
default-expand-all
|
|
12
|
+
height="480px"
|
|
13
|
+
:mode="mode"
|
|
14
|
+
:data="theads"
|
|
15
|
+
:thead="thead"
|
|
16
|
+
:tree-props="{ children: 'childHead' }"
|
|
17
|
+
@change="handleChange"
|
|
18
|
+
@update-drag-sort="handleDrag"
|
|
19
|
+
>
|
|
20
|
+
</es-data-table>
|
|
21
|
+
<div class="sizer-btn-box">
|
|
22
|
+
<el-button type="primary" size="medium" @click="handleConfirm"
|
|
23
|
+
>确定</el-button
|
|
24
|
+
>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script type="text/babel">
|
|
30
|
+
import util from 'eoss-ui/src/utils/util';
|
|
31
|
+
export default {
|
|
32
|
+
name: 'Sizer',
|
|
33
|
+
props: {
|
|
34
|
+
mode: String,
|
|
35
|
+
data: Array
|
|
36
|
+
},
|
|
37
|
+
computed: {
|
|
38
|
+
theads: {
|
|
39
|
+
get() {
|
|
40
|
+
if (this.data && this.data.length) {
|
|
41
|
+
let newData = [];
|
|
42
|
+
this.getThead(this.data, newData);
|
|
43
|
+
return newData;
|
|
44
|
+
}
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
visible: false,
|
|
52
|
+
thead: [
|
|
53
|
+
{
|
|
54
|
+
title: '名称',
|
|
55
|
+
field: 'title'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
title: '锁定列位置',
|
|
59
|
+
field: 'fixed',
|
|
60
|
+
type: 'select',
|
|
61
|
+
clearable: true,
|
|
62
|
+
width: 160,
|
|
63
|
+
data: [
|
|
64
|
+
{
|
|
65
|
+
value: 'left',
|
|
66
|
+
name: '左'
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
value: 'right',
|
|
70
|
+
name: '右'
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: '列是否显示',
|
|
76
|
+
field: 'hide',
|
|
77
|
+
type: 'switch',
|
|
78
|
+
width: 160,
|
|
79
|
+
align: 'center',
|
|
80
|
+
data: [
|
|
81
|
+
{
|
|
82
|
+
value: false,
|
|
83
|
+
name: '隐藏'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
value: true,
|
|
87
|
+
name: '显示'
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
title: '是否开启合计',
|
|
93
|
+
field: 'total',
|
|
94
|
+
type: 'switch',
|
|
95
|
+
width: 160,
|
|
96
|
+
align: 'center',
|
|
97
|
+
data: [
|
|
98
|
+
{
|
|
99
|
+
value: false,
|
|
100
|
+
name: '关闭'
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
value: true,
|
|
104
|
+
name: '开启'
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
newThead: [],
|
|
110
|
+
nid: 0
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
mounted() {
|
|
114
|
+
this.newThead = util.extend(true, [], this.data);
|
|
115
|
+
},
|
|
116
|
+
methods: {
|
|
117
|
+
show() {
|
|
118
|
+
this.visible = true;
|
|
119
|
+
},
|
|
120
|
+
getThead(res, data) {
|
|
121
|
+
res.forEach((item, index) => {
|
|
122
|
+
if (
|
|
123
|
+
item.type !== 'index' &&
|
|
124
|
+
item.type !== 'selection' &&
|
|
125
|
+
item.type !== 'handle'
|
|
126
|
+
) {
|
|
127
|
+
let { fixed, hide, childHead, children, title, ...other } = item;
|
|
128
|
+
let items = {
|
|
129
|
+
title: title ? title : item.label,
|
|
130
|
+
fixed:
|
|
131
|
+
fixed === true
|
|
132
|
+
? 'left'
|
|
133
|
+
: fixed === undefined || fixed === false
|
|
134
|
+
? ''
|
|
135
|
+
: fixed,
|
|
136
|
+
hide: hide ? false : true,
|
|
137
|
+
id: index,
|
|
138
|
+
...other
|
|
139
|
+
};
|
|
140
|
+
if (childHead && childHead.length) {
|
|
141
|
+
let childHeads = [];
|
|
142
|
+
this.getThead(childHead, childHeads);
|
|
143
|
+
items.childHead = childHeads;
|
|
144
|
+
}
|
|
145
|
+
if (children && children.length) {
|
|
146
|
+
let childHeads = [];
|
|
147
|
+
this.getThead(children, childHeads);
|
|
148
|
+
items.children = childHeads;
|
|
149
|
+
}
|
|
150
|
+
data.push(items);
|
|
151
|
+
} else {
|
|
152
|
+
this.nid++;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
setThead(res, thead) {
|
|
157
|
+
let { name, value, data } = res;
|
|
158
|
+
for (let i in thead) {
|
|
159
|
+
let item = thead[i];
|
|
160
|
+
if (data.field === item.field) {
|
|
161
|
+
thead[i][name] = name === 'hide' ? !value : value;
|
|
162
|
+
thead[i].hide === false && delete thead[i].hide;
|
|
163
|
+
break;
|
|
164
|
+
} else {
|
|
165
|
+
if (item.childHead && item.childHead.length) {
|
|
166
|
+
this.setThead(res, item.childHead);
|
|
167
|
+
}
|
|
168
|
+
if (item.children && item.children.length) {
|
|
169
|
+
this.setThead(res, item.children);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
handleChange(res) {
|
|
175
|
+
this.setThead(res, this.newThead);
|
|
176
|
+
},
|
|
177
|
+
handleDrag(res, evt) {
|
|
178
|
+
let { oldIndex, newIndex } = evt;
|
|
179
|
+
oldIndex += this.nid;
|
|
180
|
+
newIndex += this.nid;
|
|
181
|
+
if (oldIndex > newIndex) {
|
|
182
|
+
this.newThead.splice(newIndex, 0, this.newThead[oldIndex]);
|
|
183
|
+
this.newThead.splice(oldIndex + 1, 1);
|
|
184
|
+
} else {
|
|
185
|
+
this.newThead.splice(newIndex + 1, 0, this.newThead[oldIndex]);
|
|
186
|
+
this.newThead.splice(oldIndex, 1);
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
handleConfirm() {
|
|
190
|
+
this.visible = false;
|
|
191
|
+
this.$emit('confirm', this.newThead);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
</script>
|