eoss-ui 0.5.81-beta6 → 0.5.81-beta7
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/data-table.js +143 -124
- package/lib/eoss-ui.common.js +258 -194
- package/lib/index.js +1 -1
- package/lib/login.js +8 -6
- package/lib/main.js +98 -55
- package/lib/select.js +1 -1
- package/lib/theme-chalk/base.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/simplicity.css +1 -1
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/package.json +2 -2
- package/packages/data-table/src/main.vue +50 -26
- package/packages/login/src/main.vue +10 -4
- package/packages/main/src/simplicity/index.vue +15 -2
- package/packages/main/src/simplicity/menu-list.vue +31 -17
- package/packages/main/src/simplicity/user.vue +1 -0
- package/packages/select/src/main.vue +4 -1
- package/packages/theme-chalk/lib/base.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/simplicity.css +1 -1
- package/packages/theme-chalk/lib/sizer.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/base.scss +3 -0
- package/packages/theme-chalk/src/common/var.scss +4 -0
- package/packages/theme-chalk/src/login.scss +2 -2
- package/src/index.js +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
ref="component"
|
|
7
7
|
v-loading="tableLoading"
|
|
8
8
|
element-loading-background="rgba(0, 0, 0, 0.65)"
|
|
9
|
-
:model="tag === 'div' ? '' :
|
|
9
|
+
:model="tag === 'div' ? '' : list"
|
|
10
10
|
:element-loading-text="tableLoadingText"
|
|
11
11
|
>
|
|
12
12
|
<es-toolbar
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
dragSort: dragSort,
|
|
58
58
|
dragSortClass: dragSortIcon
|
|
59
59
|
}"
|
|
60
|
-
:data.sync="
|
|
60
|
+
:data.sync="list"
|
|
61
61
|
v-on="{
|
|
62
62
|
...$listeners,
|
|
63
63
|
'row-click': rowClick,
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
</el-table>
|
|
150
150
|
<div v-if="infiniteScroll" class="es-table-page es-loading-page">
|
|
151
151
|
<span>共{{ config.totalCount }}条,</span>
|
|
152
|
-
<span>已加载{{
|
|
152
|
+
<span>已加载{{ list.length }}条</span>
|
|
153
153
|
</div>
|
|
154
154
|
<es-pagination
|
|
155
155
|
v-else-if="page"
|
|
@@ -582,6 +582,12 @@ export default {
|
|
|
582
582
|
return this.data;
|
|
583
583
|
},
|
|
584
584
|
set(val) {
|
|
585
|
+
if (this.list && this.list.length) {
|
|
586
|
+
this.$nextTick(() => {
|
|
587
|
+
this.list = val;
|
|
588
|
+
});
|
|
589
|
+
console.log(val, 7777788);
|
|
590
|
+
}
|
|
585
591
|
this.$emit('update:data', val);
|
|
586
592
|
return val;
|
|
587
593
|
}
|
|
@@ -646,18 +652,12 @@ export default {
|
|
|
646
652
|
this.resetHeight();
|
|
647
653
|
this.doLayout();
|
|
648
654
|
},
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
// !Object.prototype.hasOwnProperty.call(this.page, 'totalCount')
|
|
656
|
-
// ) {
|
|
657
|
-
// this.config.totalCount = val.length - this.lose;
|
|
658
|
-
// }
|
|
659
|
-
// }
|
|
660
|
-
// },
|
|
655
|
+
data: {
|
|
656
|
+
deep: true,
|
|
657
|
+
handler() {
|
|
658
|
+
this.list = this.setData();
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
661
|
page() {
|
|
662
662
|
this.resetHeight();
|
|
663
663
|
this.doLayout();
|
|
@@ -688,7 +688,7 @@ export default {
|
|
|
688
688
|
}
|
|
689
689
|
},
|
|
690
690
|
checked(newVal) {
|
|
691
|
-
this.
|
|
691
|
+
this.list.length && this.checkSelect(newVal);
|
|
692
692
|
},
|
|
693
693
|
thead: {
|
|
694
694
|
deep: true,
|
|
@@ -732,6 +732,7 @@ export default {
|
|
|
732
732
|
this.$refs.oaTable &&
|
|
733
733
|
this.$refs.oaTable.resetScroll &&
|
|
734
734
|
this.$refs.oaTable.resetScroll(0, 0);
|
|
735
|
+
this.list = this.setData();
|
|
735
736
|
}
|
|
736
737
|
},
|
|
737
738
|
height: {
|
|
@@ -770,10 +771,33 @@ export default {
|
|
|
770
771
|
this.chekOpenTotalArea();
|
|
771
772
|
},
|
|
772
773
|
mounted() {
|
|
773
|
-
this.
|
|
774
|
+
if (this.data.length) {
|
|
775
|
+
this.list = this.setData();
|
|
776
|
+
}
|
|
777
|
+
this.list.length && this.checkSelect(this.checked);
|
|
774
778
|
this.resetHeight();
|
|
775
779
|
},
|
|
776
780
|
methods: {
|
|
781
|
+
setData() {
|
|
782
|
+
if (
|
|
783
|
+
this.page &&
|
|
784
|
+
((typeof this.page === 'object' &&
|
|
785
|
+
(!Object.prototype.hasOwnProperty.call(this.page, 'totalCount') ||
|
|
786
|
+
this.page.totalCount == 0)) ||
|
|
787
|
+
this.page === true)
|
|
788
|
+
) {
|
|
789
|
+
this.config.totalCount = this.data.length - this.lose;
|
|
790
|
+
}
|
|
791
|
+
if (this.page && this.data.length > this.config.pageSize) {
|
|
792
|
+
return this.data.filter((item, index) => {
|
|
793
|
+
return (
|
|
794
|
+
index > (this.config.pageNum - 1) * this.config.pageSize - 1 &&
|
|
795
|
+
index < this.config.pageNum * this.config.pageSize
|
|
796
|
+
);
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
return this.data;
|
|
800
|
+
},
|
|
777
801
|
getRequestKey(config) {
|
|
778
802
|
const { method, url, params, data } = config;
|
|
779
803
|
return [method, url, qs.stringify(params), qs.stringify(data)].join('&');
|
|
@@ -951,7 +975,7 @@ export default {
|
|
|
951
975
|
if (util.isObject(row)) {
|
|
952
976
|
this.$refs.oaTable.toggleRowSelection(row, true);
|
|
953
977
|
} else
|
|
954
|
-
this.
|
|
978
|
+
this.list.forEach((item) => {
|
|
955
979
|
if (item[this.checkedKey] === row) {
|
|
956
980
|
this.$refs.oaTable.toggleRowSelection(item, true);
|
|
957
981
|
return;
|
|
@@ -1129,14 +1153,14 @@ export default {
|
|
|
1129
1153
|
this.$refs.oaTable.sort(prop, order);
|
|
1130
1154
|
},
|
|
1131
1155
|
formBlur(data) {
|
|
1132
|
-
this.$emit('blur', data, this.
|
|
1156
|
+
this.$emit('blur', data, this.list);
|
|
1133
1157
|
},
|
|
1134
1158
|
formFocus(data) {
|
|
1135
|
-
this.$emit('focus', data, this.
|
|
1159
|
+
this.$emit('focus', data, this.list);
|
|
1136
1160
|
},
|
|
1137
1161
|
formChange(data) {
|
|
1138
|
-
this.$emit('edit', data, this.
|
|
1139
|
-
this.$emit('change', data, this.
|
|
1162
|
+
this.$emit('edit', data, this.list);
|
|
1163
|
+
this.$emit('change', data, this.list);
|
|
1140
1164
|
},
|
|
1141
1165
|
handleAjax(handle, row) {
|
|
1142
1166
|
this.changeLoading(true, `${handle.text}中...`);
|
|
@@ -1291,7 +1315,7 @@ export default {
|
|
|
1291
1315
|
handle.event({
|
|
1292
1316
|
ele: this,
|
|
1293
1317
|
thead: thead,
|
|
1294
|
-
data: this.
|
|
1318
|
+
data: this.list,
|
|
1295
1319
|
selected: rows,
|
|
1296
1320
|
...res
|
|
1297
1321
|
});
|
|
@@ -1394,13 +1418,13 @@ export default {
|
|
|
1394
1418
|
});
|
|
1395
1419
|
util.exportXls({
|
|
1396
1420
|
thead: thead,
|
|
1397
|
-
data: this.
|
|
1421
|
+
data: this.list,
|
|
1398
1422
|
name: this.fileName,
|
|
1399
1423
|
option: this.optionDatas
|
|
1400
1424
|
});
|
|
1401
1425
|
}
|
|
1402
|
-
this.$emit('btnClick', res, this.
|
|
1403
|
-
this.$emit('btn-click', res, this.
|
|
1426
|
+
this.$emit('btnClick', res, this.list, thead, rows);
|
|
1427
|
+
this.$emit('btn-click', res, this.list, thead, rows);
|
|
1404
1428
|
}
|
|
1405
1429
|
},
|
|
1406
1430
|
sizeChange(res) {
|
|
@@ -579,6 +579,7 @@ export default {
|
|
|
579
579
|
type: String,
|
|
580
580
|
default: 'center'
|
|
581
581
|
},
|
|
582
|
+
translate: String,
|
|
582
583
|
useResults: {
|
|
583
584
|
type: Boolean,
|
|
584
585
|
default: true
|
|
@@ -591,31 +592,36 @@ export default {
|
|
|
591
592
|
},
|
|
592
593
|
computed: {
|
|
593
594
|
transform() {
|
|
595
|
+
let translate = this.translate
|
|
596
|
+
? this.translate
|
|
597
|
+
: this.align === 'center'
|
|
598
|
+
? '-50%, -51%'
|
|
599
|
+
: '-51%';
|
|
594
600
|
if (this.align.indexOf('%') > -1) {
|
|
595
601
|
return {
|
|
596
602
|
left: this.align,
|
|
597
603
|
top: '50%',
|
|
598
|
-
transform:
|
|
604
|
+
transform: `translateY(${translate})`
|
|
599
605
|
};
|
|
600
606
|
}
|
|
601
607
|
if (this.align === 'left') {
|
|
602
608
|
return {
|
|
603
609
|
left: '30%',
|
|
604
610
|
top: '50%',
|
|
605
|
-
transform:
|
|
611
|
+
transform: `translateY(${translate})`
|
|
606
612
|
};
|
|
607
613
|
}
|
|
608
614
|
if (this.align === 'right') {
|
|
609
615
|
return {
|
|
610
616
|
left: '70%',
|
|
611
617
|
top: '50%',
|
|
612
|
-
transform:
|
|
618
|
+
transform: `translateY(${translate})`
|
|
613
619
|
};
|
|
614
620
|
}
|
|
615
621
|
return {
|
|
616
622
|
left: '50%',
|
|
617
623
|
top: '50%',
|
|
618
|
-
transform:
|
|
624
|
+
transform: `translate(${translate})`
|
|
619
625
|
};
|
|
620
626
|
},
|
|
621
627
|
redirectUri() {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<div class="es-main">
|
|
3
3
|
<div class="es-simplicity-side">
|
|
4
4
|
<img class="es-simplicity-logo" v-if="mainLogo" :src="mainLogo" />
|
|
5
|
-
<div class="es-simplicity-org-name">
|
|
5
|
+
<div class="es-simplicity-org-name">
|
|
6
|
+
{{ simpleUserInfo.orgShortName || simpleUserInfo.orgName }}
|
|
7
|
+
</div>
|
|
6
8
|
<el-popover
|
|
7
9
|
class="es-simplicity-user-popover"
|
|
8
10
|
placement="right-start"
|
|
@@ -15,6 +17,7 @@
|
|
|
15
17
|
:notifyList="notifyList"
|
|
16
18
|
:notify="notify"
|
|
17
19
|
:contents="userInfoContents"
|
|
20
|
+
@success="handleSuccess"
|
|
18
21
|
@change="handleChangeConfig"
|
|
19
22
|
@close="handlerClose"
|
|
20
23
|
></user>
|
|
@@ -183,6 +186,7 @@
|
|
|
183
186
|
v-model="activeName"
|
|
184
187
|
closable
|
|
185
188
|
hide-bar
|
|
189
|
+
opacity
|
|
186
190
|
@tab-remove="handleRemove"
|
|
187
191
|
@tab-contextmenu="handleContextmenu"
|
|
188
192
|
>
|
|
@@ -531,7 +535,7 @@ export default {
|
|
|
531
535
|
//选中菜单
|
|
532
536
|
active: '',
|
|
533
537
|
//单位名称
|
|
534
|
-
|
|
538
|
+
simpleUserInfo: {}
|
|
535
539
|
};
|
|
536
540
|
},
|
|
537
541
|
computed: {
|
|
@@ -1259,6 +1263,15 @@ export default {
|
|
|
1259
1263
|
this.tabs.push(tab);
|
|
1260
1264
|
}
|
|
1261
1265
|
},
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* @desc:用户详情请求成功
|
|
1269
|
+
* @author huangbo
|
|
1270
|
+
* @date 2024年9月7日
|
|
1271
|
+
**/
|
|
1272
|
+
handleSuccess(res) {
|
|
1273
|
+
this.simpleUserInfo = res.simpleUserInfo;
|
|
1274
|
+
},
|
|
1262
1275
|
/**
|
|
1263
1276
|
* @desc:修改用户配置
|
|
1264
1277
|
* @author huangbo
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-scrollbar :class="{ 'is-fold': fold }"
|
|
2
|
+
<el-scrollbar :class="{ 'is-fold': fold }">
|
|
3
3
|
<template v-for="(item, index) in data">
|
|
4
4
|
<el-popover
|
|
5
5
|
v-if="
|
|
@@ -10,21 +10,23 @@
|
|
|
10
10
|
trigger="hover"
|
|
11
11
|
popper-class="es-simplicity-menus-sub"
|
|
12
12
|
:width="width"
|
|
13
|
-
|
|
14
|
-
@
|
|
15
|
-
@hide="show = false"
|
|
13
|
+
@show="handleShow"
|
|
14
|
+
@hide="handleHide"
|
|
16
15
|
>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
<template slot-scope="{ parent }">
|
|
17
|
+
<menu-list
|
|
18
|
+
ref="menus"
|
|
19
|
+
:parent="parent"
|
|
20
|
+
:active="active"
|
|
21
|
+
:popover="show"
|
|
22
|
+
:data="[...(item.children || []), ...(item.fourthTabs || [])]"
|
|
23
|
+
:menuIcon="menuIcon"
|
|
24
|
+
:color="color"
|
|
25
|
+
:backgroundColor="backgroundColor"
|
|
26
|
+
:width="width"
|
|
27
|
+
@command="handleClick"
|
|
28
|
+
></menu-list>
|
|
29
|
+
</template>
|
|
28
30
|
<div
|
|
29
31
|
slot="reference"
|
|
30
32
|
class="es-simplicity-menus-item"
|
|
@@ -103,7 +105,8 @@ export default {
|
|
|
103
105
|
data: Array,
|
|
104
106
|
fold: Boolean,
|
|
105
107
|
width: Number,
|
|
106
|
-
popover: Boolean
|
|
108
|
+
popover: Boolean,
|
|
109
|
+
parent: Object
|
|
107
110
|
},
|
|
108
111
|
data() {
|
|
109
112
|
return {
|
|
@@ -117,7 +120,6 @@ export default {
|
|
|
117
120
|
popover() {
|
|
118
121
|
if (this.$el.offsetHeight > this.height) {
|
|
119
122
|
this.$el.style.height = this.height + 'px';
|
|
120
|
-
this.$refs.scrollbar.update();
|
|
121
123
|
} else {
|
|
122
124
|
this.$el.style.height = '';
|
|
123
125
|
}
|
|
@@ -158,6 +160,18 @@ export default {
|
|
|
158
160
|
}
|
|
159
161
|
}
|
|
160
162
|
this.$emit('command', res);
|
|
163
|
+
},
|
|
164
|
+
handleShow() {
|
|
165
|
+
this.show = true;
|
|
166
|
+
if (this.parent) {
|
|
167
|
+
this.parent.changeContinue(true);
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
handleHide() {
|
|
171
|
+
if (this.parent) {
|
|
172
|
+
this.parent.changeContinue(false);
|
|
173
|
+
//this.parent.hidePopper();
|
|
174
|
+
}
|
|
161
175
|
}
|
|
162
176
|
}
|
|
163
177
|
};
|
|
@@ -133,6 +133,7 @@ export default {
|
|
|
133
133
|
this.checkPassword = results.checkPassword;
|
|
134
134
|
this.checkPasswordMsg = results.checkPasswordMsg;
|
|
135
135
|
this.headImgCode = results.headImgCode || undefined;
|
|
136
|
+
this.$emit('success', results);
|
|
136
137
|
} else {
|
|
137
138
|
let msg = res.msg || '系统错误,请联系管理员!';
|
|
138
139
|
this.$message.error(msg);
|
|
@@ -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) {
|