@yelon/bis 12.0.15 → 12.0.19
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/bundles/bis.umd.js +1 -1
- package/bundles/layout.umd.js +650 -36
- package/bundles/layout.umd.js.map +1 -1
- package/bundles/shared.umd.js +8 -12
- package/bundles/shared.umd.js.map +1 -1
- package/esm2015/layout/contact/contact.component.js +434 -0
- package/esm2015/layout/contact/contact.service.js +150 -0
- package/esm2015/layout/layout.js +4 -2
- package/esm2015/layout/layout.module.js +13 -3
- package/esm2015/layout/widgets/yz.notify.component.js +25 -22
- package/esm2015/layout/yz.basic.component.js +27 -5
- package/esm2015/layout/yz.startup.service.js +5 -5
- package/esm2015/shared/shared-yelon.module.js +3 -3
- package/esm2015/shared/shared.module.js +13 -7
- package/fesm2015/layout.js +638 -29
- package/fesm2015/layout.js.map +1 -1
- package/fesm2015/shared.js +14 -7
- package/fesm2015/shared.js.map +1 -1
- package/layout/contact/contact.component.d.ts +166 -0
- package/layout/contact/contact.service.d.ts +115 -0
- package/layout/layout.d.ts +3 -1
- package/layout/layout.metadata.json +1 -1
- package/layout/widgets/yz.notify.component.d.ts +5 -3
- package/layout/yz.basic.component.d.ts +8 -2
- package/layout/yz.startup.service.d.ts +1 -1
- package/package.json +10 -10
- package/shared/shared.metadata.json +1 -1
package/bundles/layout.umd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license ng-yunzai(devcui@outlook.com) v12.0.
|
|
2
|
+
* @license ng-yunzai(devcui@outlook.com) v12.0.19
|
|
3
3
|
* (c) 2020 devcui https://github.com/hbyunzai/yelon/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
7
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@yelon/cache'), require('@yelon/theme'), require('@yelon/util'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/common/locales/en'), require('@angular/common/locales/zh'), require('@angular/common/locales/zh-Hant'), require('date-fns/locale'), require('@yelon/util/config'), require('ng-zorro-antd/i18n'), require('@yelon/util/decorator'), require('rxjs'), require('rxjs/operators'), require('date-fns'), require('
|
|
8
|
-
typeof define === 'function' && define.amd ? define('@yelon/bis/layout', ['exports', '@angular/core', '@yelon/cache', '@yelon/theme', '@yelon/util', '@angular/cdk/platform', '@angular/common', '@angular/common/locales/en', '@angular/common/locales/zh', '@angular/common/locales/zh-Hant', 'date-fns/locale', '@yelon/util/config', 'ng-zorro-antd/i18n', '@yelon/util/decorator', 'rxjs', 'rxjs/operators', 'date-fns', 'ng-zorro-antd/message', '@
|
|
9
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.yelon = global.yelon || {}, global.yelon.bis = global.yelon.bis || {}, global.yelon.bis.layout = {}), global.ng.core, global.yelon.cache, global.yelon.theme, global.yelon.util, global.ng.cdk.platform, global.ng.common, global.ng.common.locales.en, global.ng.common.locales.zh, global.ng.common.locales.zhHant, global.locale, global.yelon.util.config, global["ng-zorro-antd/i18n"], global.decorator, global.rxjs, global.rxjs.operators, global.DateFns, global.
|
|
10
|
-
})(this, (function (exports, i0, i2$1, i1, util, i3, common, ngEn, ngZh, ngZhTw, locale, i1$1, i2, decorator, rxjs, operators, dateFns,
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@yelon/cache'), require('@yelon/theme'), require('@yelon/util'), require('@angular/cdk/platform'), require('@angular/common'), require('@angular/common/locales/en'), require('@angular/common/locales/zh'), require('@angular/common/locales/zh-Hant'), require('date-fns/locale'), require('@yelon/util/config'), require('ng-zorro-antd/i18n'), require('@yelon/util/decorator'), require('rxjs'), require('rxjs/operators'), require('date-fns'), require('@yelon/util/other'), require('ng-zorro-antd/message'), require('@angular/cdk/bidi'), require('@yelon/theme/theme-btn'), require('@yelon/auth'), require('ng-zorro-antd/modal'), require('screenfull'), require('@angular/common/http'), require('@angular/forms'), require('@angular/router'), require('@yelon/bis/shared'), require('@yelon/theme/layout-default'), require('@stomp/rx-stomp'), require('ng-zorro-antd/notification'), require('@yelon/acl'), require('ng-zorro-antd/icon')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define('@yelon/bis/layout', ['exports', '@angular/core', '@yelon/cache', '@yelon/theme', '@yelon/util', '@angular/cdk/platform', '@angular/common', '@angular/common/locales/en', '@angular/common/locales/zh', '@angular/common/locales/zh-Hant', 'date-fns/locale', '@yelon/util/config', 'ng-zorro-antd/i18n', '@yelon/util/decorator', 'rxjs', 'rxjs/operators', 'date-fns', '@yelon/util/other', 'ng-zorro-antd/message', '@angular/cdk/bidi', '@yelon/theme/theme-btn', '@yelon/auth', 'ng-zorro-antd/modal', 'screenfull', '@angular/common/http', '@angular/forms', '@angular/router', '@yelon/bis/shared', '@yelon/theme/layout-default', '@stomp/rx-stomp', 'ng-zorro-antd/notification', '@yelon/acl', 'ng-zorro-antd/icon'], factory) :
|
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.yelon = global.yelon || {}, global.yelon.bis = global.yelon.bis || {}, global.yelon.bis.layout = {}), global.ng.core, global.yelon.cache, global.yelon.theme, global.yelon.util, global.ng.cdk.platform, global.ng.common, global.ng.common.locales.en, global.ng.common.locales.zh, global.ng.common.locales.zhHant, global.locale, global.yelon.util.config, global["ng-zorro-antd/i18n"], global.decorator, global.rxjs, global.rxjs.operators, global.DateFns, global.yelon.util.other, global.message, global.ng.cdk.bidi, global.themeBtn, global.yelon.auth, global["ng-zorro-antd/modal"], global.screenfull, global.ng.common.http, global.ng.forms, global.ng.router, global.yelon.bis.shared, global.layoutDefault, global.rxStomp, global.i3$1, global.yelon.acl, global["ng-zorro-antd/icon"]));
|
|
10
|
+
})(this, (function (exports, i0, i2$1, i1, util, i3, common, ngEn, ngZh, ngZhTw, locale, i1$1, i2, decorator, rxjs, operators, dateFns, other, message, bidi, themeBtn, auth, modal, screenfull, http, forms, i4, shared, layoutDefault, rxStomp, i3$1, acl, icon) { 'use strict';
|
|
11
11
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
13
|
|
|
@@ -635,36 +635,37 @@
|
|
|
635
635
|
], YzHeaderI18NComponent.prototype, "showLangText", void 0);
|
|
636
636
|
|
|
637
637
|
var YzHeaderNotifyComponent = /** @class */ (function () {
|
|
638
|
-
function YzHeaderNotifyComponent(injector, msg, nzI18n, cdr, httpClient) {
|
|
638
|
+
function YzHeaderNotifyComponent(injector, msg, y18n, nzI18n, cdr, httpClient) {
|
|
639
639
|
this.injector = injector;
|
|
640
640
|
this.msg = msg;
|
|
641
|
+
this.y18n = y18n;
|
|
641
642
|
this.nzI18n = nzI18n;
|
|
642
643
|
this.cdr = cdr;
|
|
643
644
|
this.httpClient = httpClient;
|
|
644
645
|
this.data = [
|
|
645
646
|
{
|
|
646
647
|
key: 'msg',
|
|
647
|
-
title: '
|
|
648
|
+
title: this.y18n.fanyi('notify.message'),
|
|
648
649
|
list: [],
|
|
649
|
-
emptyText: '
|
|
650
|
+
emptyText: this.y18n.fanyi('notify.message.emptyText'),
|
|
650
651
|
emptyImage: './assets/tmp/img/message.svg',
|
|
651
|
-
clearText: '
|
|
652
|
+
clearText: this.y18n.fanyi('notify.message.clearText')
|
|
652
653
|
},
|
|
653
654
|
{
|
|
654
655
|
key: 'todo',
|
|
655
|
-
title: '
|
|
656
|
+
title: this.y18n.fanyi('notify.todo'),
|
|
656
657
|
list: [],
|
|
657
|
-
emptyText: '
|
|
658
|
+
emptyText: this.y18n.fanyi('notify.todo.emptyText'),
|
|
658
659
|
emptyImage: './assets/tmp/img/todo.svg',
|
|
659
|
-
clearText: '
|
|
660
|
+
clearText: this.y18n.fanyi('notify.todo.clearText')
|
|
660
661
|
},
|
|
661
662
|
{
|
|
662
663
|
key: 'notice',
|
|
663
|
-
title: '
|
|
664
|
+
title: this.y18n.fanyi('notify.notice'),
|
|
664
665
|
list: [],
|
|
665
|
-
emptyText: '
|
|
666
|
+
emptyText: this.y18n.fanyi('notify.notice.emptyText'),
|
|
666
667
|
emptyImage: './assets/tmp/img/notice.svg',
|
|
667
|
-
clearText: '
|
|
668
|
+
clearText: this.y18n.fanyi('notify.notice.clearText')
|
|
668
669
|
}
|
|
669
670
|
];
|
|
670
671
|
this.loading = false;
|
|
@@ -689,11 +690,11 @@
|
|
|
689
690
|
var formatMessageStatus = function (status) {
|
|
690
691
|
switch (status) {
|
|
691
692
|
case '0':
|
|
692
|
-
return { extra: '
|
|
693
|
+
return { extra: _this.y18n.fanyi('notify.unread'), color: 'red' };
|
|
693
694
|
case '1':
|
|
694
|
-
return { extra: '
|
|
695
|
+
return { extra: _this.y18n.fanyi('notify.readed'), color: 'green' };
|
|
695
696
|
default:
|
|
696
|
-
return { extra: '
|
|
697
|
+
return { extra: _this.y18n.fanyi('notify.nostatus'), color: 'primary' };
|
|
697
698
|
}
|
|
698
699
|
};
|
|
699
700
|
return this.httpClient
|
|
@@ -716,11 +717,11 @@
|
|
|
716
717
|
var formatTodoStatus = function (status) {
|
|
717
718
|
switch (status) {
|
|
718
719
|
case '0':
|
|
719
|
-
return { extra: '
|
|
720
|
+
return { extra: _this.y18n.fanyi('notify.unstart'), color: 'red' };
|
|
720
721
|
case '1':
|
|
721
|
-
return { extra: '
|
|
722
|
+
return { extra: _this.y18n.fanyi('notify.started'), color: 'green' };
|
|
722
723
|
default:
|
|
723
|
-
return { extra: '
|
|
724
|
+
return { extra: _this.y18n.fanyi('notify.nostatus'), color: 'primary' };
|
|
724
725
|
}
|
|
725
726
|
};
|
|
726
727
|
return this.httpClient
|
|
@@ -742,7 +743,7 @@
|
|
|
742
743
|
var t = this.data.filter(function (d) { return d.title === type; })[0];
|
|
743
744
|
if (t.key == 'msg' || t.key == 'notice') {
|
|
744
745
|
this.subs.push(this.httpClient.post("/message-center-3/my-msg-and-todo/msg-clear", {}).subscribe(function (_) {
|
|
745
|
-
_this.msg.success("
|
|
746
|
+
_this.msg.success(_this.y18n.fanyi('notify.clear') + " " + type);
|
|
746
747
|
_this.loadData();
|
|
747
748
|
}));
|
|
748
749
|
}
|
|
@@ -769,6 +770,7 @@
|
|
|
769
770
|
YzHeaderNotifyComponent.ctorParameters = function () { return [
|
|
770
771
|
{ type: i0.Injector },
|
|
771
772
|
{ type: message.NzMessageService },
|
|
773
|
+
{ type: YzI18NService, decorators: [{ type: i0.Inject, args: [i1.YUNZAI_I18N_TOKEN,] }] },
|
|
772
774
|
{ type: i2.NzI18nService },
|
|
773
775
|
{ type: i0.ChangeDetectorRef },
|
|
774
776
|
{ type: i1._HttpClient }
|
|
@@ -1010,6 +1012,593 @@
|
|
|
1010
1012
|
_click: [{ type: i0.HostListener, args: ['click',] }]
|
|
1011
1013
|
};
|
|
1012
1014
|
|
|
1015
|
+
var ContactService = /** @class */ (function () {
|
|
1016
|
+
function ContactService(http, cache) {
|
|
1017
|
+
this.http = http;
|
|
1018
|
+
this.cache = cache;
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* 部门树查询
|
|
1022
|
+
*
|
|
1023
|
+
* @param clas 包含班级
|
|
1024
|
+
* @param his 包含历史班级
|
|
1025
|
+
* @param grade 系部
|
|
1026
|
+
* @param gradeID 系部ID
|
|
1027
|
+
* @returns 可观察部门树
|
|
1028
|
+
*/
|
|
1029
|
+
ContactService.prototype.dept = function (clas, his, grade, gradeID) {
|
|
1030
|
+
var baseUrl = "/auth/baseDepartMent/tree?debug=false";
|
|
1031
|
+
if (clas) {
|
|
1032
|
+
baseUrl += "&includeClass=true";
|
|
1033
|
+
}
|
|
1034
|
+
else {
|
|
1035
|
+
baseUrl += "&includeClass=false";
|
|
1036
|
+
}
|
|
1037
|
+
if (his) {
|
|
1038
|
+
baseUrl += "&includeHisClass=true";
|
|
1039
|
+
}
|
|
1040
|
+
else {
|
|
1041
|
+
baseUrl += "&includeHisClass=false";
|
|
1042
|
+
}
|
|
1043
|
+
if (grade) {
|
|
1044
|
+
baseUrl += "&deptTypes=2,class";
|
|
1045
|
+
}
|
|
1046
|
+
if (gradeID) {
|
|
1047
|
+
baseUrl += "&gradeId=" + gradeID;
|
|
1048
|
+
}
|
|
1049
|
+
return this.http.get(baseUrl).pipe(operators.map(function (response) {
|
|
1050
|
+
return response.data || [];
|
|
1051
|
+
}));
|
|
1052
|
+
};
|
|
1053
|
+
ContactService.prototype.page = function (uri, page) {
|
|
1054
|
+
return this.http.post(uri + "/queryListForPage", page);
|
|
1055
|
+
};
|
|
1056
|
+
ContactService.prototype.pageBaseUser = function (page) {
|
|
1057
|
+
return this.page('/auth/baseUser', page);
|
|
1058
|
+
};
|
|
1059
|
+
ContactService.prototype.getUserByIds = function (ids) {
|
|
1060
|
+
return this.http
|
|
1061
|
+
.post('/auth/baseUser/users', {
|
|
1062
|
+
userIds: ids
|
|
1063
|
+
})
|
|
1064
|
+
.pipe(function (response) {
|
|
1065
|
+
return response.data || [];
|
|
1066
|
+
});
|
|
1067
|
+
};
|
|
1068
|
+
/**
|
|
1069
|
+
* 查询人员信息
|
|
1070
|
+
*
|
|
1071
|
+
* @param userIds[] 用户id数组,["aaa","bbb","ccc"]
|
|
1072
|
+
*/
|
|
1073
|
+
ContactService.prototype.getUserByUserIds = function (userIds) {
|
|
1074
|
+
return this.http
|
|
1075
|
+
.post("/auth/baseUser/users", {
|
|
1076
|
+
userIds: userIds
|
|
1077
|
+
})
|
|
1078
|
+
.pipe(operators.map(function (response) {
|
|
1079
|
+
return response.data ? response.data : [];
|
|
1080
|
+
}));
|
|
1081
|
+
};
|
|
1082
|
+
/**
|
|
1083
|
+
* 获取角色组角色
|
|
1084
|
+
*
|
|
1085
|
+
* @param roleGroupCode 角色组code
|
|
1086
|
+
*/
|
|
1087
|
+
ContactService.prototype.getGroupRole = function (roleGroupCode) {
|
|
1088
|
+
return this.http
|
|
1089
|
+
.post("/auth/baseRole/findGroupRole", {
|
|
1090
|
+
roleGroupCode: roleGroupCode
|
|
1091
|
+
})
|
|
1092
|
+
.pipe(operators.map(function (response) {
|
|
1093
|
+
return response.data ? response.data : [];
|
|
1094
|
+
}));
|
|
1095
|
+
};
|
|
1096
|
+
/**
|
|
1097
|
+
* 查询当前用户好友分组
|
|
1098
|
+
*/
|
|
1099
|
+
ContactService.prototype.getFriendGroup = function () {
|
|
1100
|
+
return this.http.post("/contact/appcontact/findGroup", {}).pipe(operators.map(function (response) {
|
|
1101
|
+
return response.data ? response.data : [];
|
|
1102
|
+
}));
|
|
1103
|
+
};
|
|
1104
|
+
/**
|
|
1105
|
+
* 查询年级
|
|
1106
|
+
*/
|
|
1107
|
+
ContactService.prototype.getGrade = function () {
|
|
1108
|
+
return this.http.get("/auth/gradeYear/queryListForPage").pipe(operators.map(function (response) {
|
|
1109
|
+
return response.data ? response.data : [];
|
|
1110
|
+
}));
|
|
1111
|
+
};
|
|
1112
|
+
/**
|
|
1113
|
+
* 查询人员类别列表
|
|
1114
|
+
*/
|
|
1115
|
+
ContactService.prototype.getRylbs = function () {
|
|
1116
|
+
return this.http.post("/auth/baseTeacher/queryRylbs", {}).pipe(operators.map(function (response) {
|
|
1117
|
+
return response.data ? response.data : [];
|
|
1118
|
+
}));
|
|
1119
|
+
};
|
|
1120
|
+
/**
|
|
1121
|
+
* 获取学生公寓树
|
|
1122
|
+
*
|
|
1123
|
+
* @param isPower 是否带有权限,默认false
|
|
1124
|
+
* @param treeType 树类型 0:宿舍楼 1:宿舍楼+层 2:宿舍楼+层+房间
|
|
1125
|
+
*/
|
|
1126
|
+
ContactService.prototype.getDormTree = function (isPower, treeType) {
|
|
1127
|
+
var user = this.cache.get('_yz_user', { mode: 'none' });
|
|
1128
|
+
var params = {};
|
|
1129
|
+
if (isPower) {
|
|
1130
|
+
params = {
|
|
1131
|
+
isPower: isPower,
|
|
1132
|
+
userId: user.userId,
|
|
1133
|
+
treeType: treeType
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
else {
|
|
1137
|
+
params = {
|
|
1138
|
+
isPower: isPower,
|
|
1139
|
+
treeType: treeType
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
return this.http.post("/auth/dorm/tree", params).pipe(operators.map(function (response) {
|
|
1143
|
+
return response.data ? response.data : [];
|
|
1144
|
+
}));
|
|
1145
|
+
};
|
|
1146
|
+
return ContactService;
|
|
1147
|
+
}());
|
|
1148
|
+
ContactService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ContactService_Factory() { return new ContactService(i0__namespace.ɵɵinject(i1__namespace._HttpClient), i0__namespace.ɵɵinject(i2__namespace$1.CacheService)); }, token: ContactService, providedIn: "root" });
|
|
1149
|
+
ContactService.decorators = [
|
|
1150
|
+
{ type: i0.Injectable, args: [{
|
|
1151
|
+
providedIn: 'root'
|
|
1152
|
+
},] }
|
|
1153
|
+
];
|
|
1154
|
+
ContactService.ctorParameters = function () { return [
|
|
1155
|
+
{ type: i1._HttpClient },
|
|
1156
|
+
{ type: i2$1.CacheService }
|
|
1157
|
+
]; };
|
|
1158
|
+
|
|
1159
|
+
var ContactComponent = /** @class */ (function () {
|
|
1160
|
+
function ContactComponent(contact, changeDetectorRef) {
|
|
1161
|
+
this.contact = contact;
|
|
1162
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
1163
|
+
this.subs = [];
|
|
1164
|
+
/**
|
|
1165
|
+
* tabset
|
|
1166
|
+
*/
|
|
1167
|
+
this.nzTabsetSearch = null;
|
|
1168
|
+
this.nzTabsetLoading = false;
|
|
1169
|
+
/**
|
|
1170
|
+
* 树展开状态
|
|
1171
|
+
*/
|
|
1172
|
+
this.nzExpandAll = true;
|
|
1173
|
+
/**
|
|
1174
|
+
* 部门树和部门查询的一些选项/可传可不传
|
|
1175
|
+
*/
|
|
1176
|
+
this.nzDepts = [];
|
|
1177
|
+
this._nzDeptsCopy = [];
|
|
1178
|
+
this.nzDeptTreeVirtualHeight = null;
|
|
1179
|
+
this.nzDeptClass = true;
|
|
1180
|
+
this.nzDeptClassHistory = true;
|
|
1181
|
+
this.nzDeptGrade = false;
|
|
1182
|
+
/**
|
|
1183
|
+
* 角色树
|
|
1184
|
+
*/
|
|
1185
|
+
this.nzRoles = [];
|
|
1186
|
+
this._nzRolesCopy = [];
|
|
1187
|
+
this.nzRoleTreeVirtualHeight = null;
|
|
1188
|
+
/**
|
|
1189
|
+
* 好友分组
|
|
1190
|
+
*/
|
|
1191
|
+
this.nzFriendGroups = [];
|
|
1192
|
+
this._nzFriendGroupsCopy = [];
|
|
1193
|
+
/**
|
|
1194
|
+
* 联系人
|
|
1195
|
+
*/
|
|
1196
|
+
this.defaultContacts = [];
|
|
1197
|
+
this.nzContacts = [];
|
|
1198
|
+
this.nzContactLoading = false;
|
|
1199
|
+
/**
|
|
1200
|
+
* 提交和提交按钮
|
|
1201
|
+
*/
|
|
1202
|
+
this.button = true;
|
|
1203
|
+
this.confirmed = new i0.EventEmitter();
|
|
1204
|
+
}
|
|
1205
|
+
/**
|
|
1206
|
+
* 初始化,首先加载部门树和默认选中的人的数据
|
|
1207
|
+
*/
|
|
1208
|
+
ContactComponent.prototype.ngOnInit = function () {
|
|
1209
|
+
this.onTabsetDept();
|
|
1210
|
+
this.onContactsInit();
|
|
1211
|
+
};
|
|
1212
|
+
/**
|
|
1213
|
+
* 视图初始化完毕后进行table初始化
|
|
1214
|
+
*/
|
|
1215
|
+
ContactComponent.prototype.ngAfterViewInit = function () {
|
|
1216
|
+
this.onTableInit();
|
|
1217
|
+
};
|
|
1218
|
+
/**
|
|
1219
|
+
* 初始化默认选中联系人
|
|
1220
|
+
*/
|
|
1221
|
+
ContactComponent.prototype.onContactsInit = function () {
|
|
1222
|
+
var _this = this;
|
|
1223
|
+
if (this.defaultContacts && this.defaultContacts.length > 0) {
|
|
1224
|
+
this.nzContactLoading = true;
|
|
1225
|
+
this.subs.push(this.contact.getUserByUserIds(this.defaultContacts).subscribe(function (contacts) {
|
|
1226
|
+
_this.nzContacts = contacts;
|
|
1227
|
+
_this.nzContactLoading = false;
|
|
1228
|
+
_this.refresh();
|
|
1229
|
+
}));
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
/**
|
|
1233
|
+
* table初始化
|
|
1234
|
+
*/
|
|
1235
|
+
ContactComponent.prototype.onTableInit = function () {
|
|
1236
|
+
var _this = this;
|
|
1237
|
+
// 设置表头
|
|
1238
|
+
this.st.resetColumns({
|
|
1239
|
+
columns: [
|
|
1240
|
+
{ title: '选择', type: 'checkbox' },
|
|
1241
|
+
{ title: '序号', type: 'no' },
|
|
1242
|
+
{ title: '姓名', index: 'realName' },
|
|
1243
|
+
{ title: '学号/工号', index: 'userCode' },
|
|
1244
|
+
{ title: '部门', index: 'dept.deptName' }
|
|
1245
|
+
]
|
|
1246
|
+
});
|
|
1247
|
+
// 订阅table点击checkbox事件变化
|
|
1248
|
+
this.subs.push(this.st.change.subscribe(function (e) {
|
|
1249
|
+
if (e.type === 'checkbox') {
|
|
1250
|
+
// 点击checkbox新增联系人
|
|
1251
|
+
var contactIds_1 = _this.nzContacts.map(function (c) { return c.userId; });
|
|
1252
|
+
_this.nzContacts = _this.nzContacts.concat(e.checkbox.filter(function (c) { return !contactIds_1.includes(c.userId); }));
|
|
1253
|
+
// 取消checkbox取消联系人
|
|
1254
|
+
var cancelIds_1 = _this.st.list.filter(function (d) { return !d.checked; }).map(function (d) { return d.userId; });
|
|
1255
|
+
_this.nzContacts = _this.nzContacts.filter(function (d) { return !cancelIds_1.includes(d.userId); });
|
|
1256
|
+
}
|
|
1257
|
+
}));
|
|
1258
|
+
};
|
|
1259
|
+
/**
|
|
1260
|
+
* tabset进入加载状态
|
|
1261
|
+
*/
|
|
1262
|
+
ContactComponent.prototype.onTabsetLoadStart = function () {
|
|
1263
|
+
this.nzTabsetLoading = true;
|
|
1264
|
+
};
|
|
1265
|
+
/**
|
|
1266
|
+
* tabset取消加载状态
|
|
1267
|
+
*/
|
|
1268
|
+
ContactComponent.prototype.onTabsetLoadEnd = function () {
|
|
1269
|
+
this.nzTabsetLoading = false;
|
|
1270
|
+
};
|
|
1271
|
+
/**
|
|
1272
|
+
* tabset搜索框清除
|
|
1273
|
+
*/
|
|
1274
|
+
ContactComponent.prototype.onTabsetSearchClean = function () {
|
|
1275
|
+
this.nzDepts = this._nzDeptsCopy;
|
|
1276
|
+
this.nzRoles = this._nzRolesCopy;
|
|
1277
|
+
this.nzFriendGroups = this._nzFriendGroupsCopy;
|
|
1278
|
+
this.nzTabsetSearch = null;
|
|
1279
|
+
};
|
|
1280
|
+
/**
|
|
1281
|
+
* tabset搜索框输入
|
|
1282
|
+
*
|
|
1283
|
+
* @param type 类型
|
|
1284
|
+
* @param value 值
|
|
1285
|
+
*/
|
|
1286
|
+
ContactComponent.prototype.onTabsetSearchChange = function (type, value) {
|
|
1287
|
+
this.onTabsetLoadStart();
|
|
1288
|
+
if (!value || value === '') {
|
|
1289
|
+
this.nzDepts = this._nzDeptsCopy;
|
|
1290
|
+
this.nzRoles = this._nzRolesCopy;
|
|
1291
|
+
this.nzFriendGroups = this._nzFriendGroupsCopy;
|
|
1292
|
+
}
|
|
1293
|
+
else {
|
|
1294
|
+
var trees = [];
|
|
1295
|
+
if (type === 'dept') {
|
|
1296
|
+
this.searchTree(value, this._nzDeptsCopy, trees);
|
|
1297
|
+
this.nzDepts = trees;
|
|
1298
|
+
}
|
|
1299
|
+
if (type === 'role') {
|
|
1300
|
+
this.searchTree(value, this._nzRolesCopy, trees);
|
|
1301
|
+
this.nzRoles = trees;
|
|
1302
|
+
}
|
|
1303
|
+
if (type === 'friendGroup') {
|
|
1304
|
+
this.nzFriendGroups = this._nzFriendGroupsCopy.filter(function (f) {
|
|
1305
|
+
return !f.name.indexOf(value);
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
this.onTabsetLoadEnd();
|
|
1310
|
+
this.refresh();
|
|
1311
|
+
};
|
|
1312
|
+
/**
|
|
1313
|
+
* tabset切换到部门
|
|
1314
|
+
*/
|
|
1315
|
+
ContactComponent.prototype.onTabsetDept = function () {
|
|
1316
|
+
this.onTabsetSearchClean();
|
|
1317
|
+
if (!this.nzDepts || this.nzDepts.length === 0) {
|
|
1318
|
+
this.onTabsetDeptFlush();
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
/**
|
|
1322
|
+
* tabset切换到角色
|
|
1323
|
+
*/
|
|
1324
|
+
ContactComponent.prototype.onTabsetRole = function () {
|
|
1325
|
+
this.onTabsetSearchClean();
|
|
1326
|
+
if (!this.nzRoles || this.nzRoles.length === 0) {
|
|
1327
|
+
this.onTabsetRoleFlush(null);
|
|
1328
|
+
}
|
|
1329
|
+
};
|
|
1330
|
+
/**
|
|
1331
|
+
* tabset切换到好友分组
|
|
1332
|
+
*/
|
|
1333
|
+
ContactComponent.prototype.onTabsetFriendGroup = function () {
|
|
1334
|
+
this.onTabsetSearchClean();
|
|
1335
|
+
if (!this.nzFriendGroups || this.nzFriendGroups.length === 0) {
|
|
1336
|
+
this.onTabsetFriendGroupFlush();
|
|
1337
|
+
}
|
|
1338
|
+
};
|
|
1339
|
+
/**
|
|
1340
|
+
* 获取部门树
|
|
1341
|
+
*/
|
|
1342
|
+
ContactComponent.prototype.onTabsetDeptFlush = function () {
|
|
1343
|
+
var _this = this;
|
|
1344
|
+
this.onTabsetLoadStart();
|
|
1345
|
+
this.subs.push(this.contact
|
|
1346
|
+
.dept(this.nzDeptClass, this.nzDeptClassHistory, this.nzDeptGrade, this.nzDeptGradeID)
|
|
1347
|
+
.subscribe(function (trees) {
|
|
1348
|
+
_this.expandTree(trees);
|
|
1349
|
+
_this.nzDepts = trees;
|
|
1350
|
+
_this._nzDeptsCopy = trees;
|
|
1351
|
+
_this.onTabsetLoadEnd();
|
|
1352
|
+
_this.refresh();
|
|
1353
|
+
}));
|
|
1354
|
+
};
|
|
1355
|
+
// 获取角色树
|
|
1356
|
+
ContactComponent.prototype.onTabsetRoleFlush = function (groupRoleCode) {
|
|
1357
|
+
var _this = this;
|
|
1358
|
+
this.onTabsetLoadStart();
|
|
1359
|
+
this.subs.push(this.contact.getGroupRole(groupRoleCode).subscribe(function (roles) {
|
|
1360
|
+
_this.expandTree(roles);
|
|
1361
|
+
_this.nzRoles = roles;
|
|
1362
|
+
_this._nzRolesCopy = roles;
|
|
1363
|
+
_this.onTabsetLoadEnd();
|
|
1364
|
+
_this.refresh();
|
|
1365
|
+
}));
|
|
1366
|
+
};
|
|
1367
|
+
// 获取好友分组列表
|
|
1368
|
+
ContactComponent.prototype.onTabsetFriendGroupFlush = function () {
|
|
1369
|
+
var _this = this;
|
|
1370
|
+
this.onTabsetLoadStart();
|
|
1371
|
+
this.subs.push(this.contact.getFriendGroup().subscribe(function (group) {
|
|
1372
|
+
_this.nzFriendGroups = group;
|
|
1373
|
+
_this._nzFriendGroupsCopy = group;
|
|
1374
|
+
_this.onTabsetLoadEnd();
|
|
1375
|
+
_this.refresh();
|
|
1376
|
+
}));
|
|
1377
|
+
};
|
|
1378
|
+
/**
|
|
1379
|
+
* 部门树点击
|
|
1380
|
+
*
|
|
1381
|
+
* @param e 节点
|
|
1382
|
+
*/
|
|
1383
|
+
ContactComponent.prototype.onDeptClick = function (e) {
|
|
1384
|
+
var _this = this;
|
|
1385
|
+
var _a;
|
|
1386
|
+
// 构造分页请求,直接传入stTable组件,剩下的所有交给组件自己完成
|
|
1387
|
+
this.st.data = '/auth/baseUser/queryListForPage';
|
|
1388
|
+
this.st.req = {
|
|
1389
|
+
allInBody: true,
|
|
1390
|
+
method: 'POST',
|
|
1391
|
+
type: 'page',
|
|
1392
|
+
reName: {
|
|
1393
|
+
pi: 'pageNum',
|
|
1394
|
+
ps: 'pageSize'
|
|
1395
|
+
},
|
|
1396
|
+
body: {
|
|
1397
|
+
pageParam: {
|
|
1398
|
+
deptId: (_a = e.keys) === null || _a === void 0 ? void 0 : _a.pop()
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1402
|
+
// table数据预处理
|
|
1403
|
+
this.st.res = {
|
|
1404
|
+
process: function (data) {
|
|
1405
|
+
_this.onTableCheck(data);
|
|
1406
|
+
return data;
|
|
1407
|
+
}
|
|
1408
|
+
};
|
|
1409
|
+
// 加载第一页
|
|
1410
|
+
this.st.load(1);
|
|
1411
|
+
};
|
|
1412
|
+
/**
|
|
1413
|
+
* 角色树点击
|
|
1414
|
+
*
|
|
1415
|
+
* @param e 节点
|
|
1416
|
+
*/
|
|
1417
|
+
ContactComponent.prototype.onRoleClick = function (e) {
|
|
1418
|
+
var _this = this;
|
|
1419
|
+
var _a;
|
|
1420
|
+
// 构造分页请求,直接传入stTable组件,剩下的所有交给组件自己完成
|
|
1421
|
+
this.st.data = '/auth/baseUser/queryListForPage';
|
|
1422
|
+
this.st.req = {
|
|
1423
|
+
allInBody: true,
|
|
1424
|
+
method: 'POST',
|
|
1425
|
+
type: 'page',
|
|
1426
|
+
reName: {
|
|
1427
|
+
pi: 'pageNum',
|
|
1428
|
+
ps: 'pageSize'
|
|
1429
|
+
},
|
|
1430
|
+
body: {
|
|
1431
|
+
pageParam: {
|
|
1432
|
+
roleId: (_a = e.keys) === null || _a === void 0 ? void 0 : _a.pop()
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
};
|
|
1436
|
+
// table数据预处理
|
|
1437
|
+
this.st.res = {
|
|
1438
|
+
process: function (data) {
|
|
1439
|
+
_this.onTableCheck(data);
|
|
1440
|
+
return data;
|
|
1441
|
+
}
|
|
1442
|
+
};
|
|
1443
|
+
// 加载第一页
|
|
1444
|
+
this.st.load(1);
|
|
1445
|
+
};
|
|
1446
|
+
/**
|
|
1447
|
+
* 好友分组点击
|
|
1448
|
+
*
|
|
1449
|
+
* @param e 分组
|
|
1450
|
+
*/
|
|
1451
|
+
ContactComponent.prototype.onFriendGroupClick = function (e) {
|
|
1452
|
+
var _this = this;
|
|
1453
|
+
// 构造分页请求,直接传入stTable组件,剩下的所有交给组件自己完成
|
|
1454
|
+
this.st.data = '/auth/baseUser/queryListForPage';
|
|
1455
|
+
this.st.req = {
|
|
1456
|
+
allInBody: true,
|
|
1457
|
+
method: 'POST',
|
|
1458
|
+
type: 'page',
|
|
1459
|
+
reName: {
|
|
1460
|
+
pi: 'pageNum',
|
|
1461
|
+
ps: 'pageSize'
|
|
1462
|
+
},
|
|
1463
|
+
body: {
|
|
1464
|
+
pageParam: {
|
|
1465
|
+
friendGroupId: e.id
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
};
|
|
1469
|
+
// table数据预处理
|
|
1470
|
+
this.st.res = {
|
|
1471
|
+
process: function (data) {
|
|
1472
|
+
_this.onTableCheck(data);
|
|
1473
|
+
return data;
|
|
1474
|
+
}
|
|
1475
|
+
};
|
|
1476
|
+
// 加载第一页
|
|
1477
|
+
this.st.load(1);
|
|
1478
|
+
};
|
|
1479
|
+
/**
|
|
1480
|
+
* 点击右侧联系人进行删除
|
|
1481
|
+
*
|
|
1482
|
+
* @param c 点击的联系人
|
|
1483
|
+
*/
|
|
1484
|
+
ContactComponent.prototype.onContactRemove = function (c) {
|
|
1485
|
+
this.nzContacts = this.nzContacts.filter(function (contact) {
|
|
1486
|
+
return contact.userId != c.userId;
|
|
1487
|
+
});
|
|
1488
|
+
this.st.reload();
|
|
1489
|
+
};
|
|
1490
|
+
/**
|
|
1491
|
+
* 预处理table当前页数据,和nzContat对比,确定checkbox状态
|
|
1492
|
+
*
|
|
1493
|
+
* @param data 预处理数据
|
|
1494
|
+
*/
|
|
1495
|
+
ContactComponent.prototype.onTableCheck = function (data) {
|
|
1496
|
+
var ids = this.nzContacts.map(function (u) { return u.userId; });
|
|
1497
|
+
data.forEach(function (d) {
|
|
1498
|
+
if (ids.includes(d.userId)) {
|
|
1499
|
+
d.checked = true;
|
|
1500
|
+
}
|
|
1501
|
+
else {
|
|
1502
|
+
d.checked = false;
|
|
1503
|
+
}
|
|
1504
|
+
});
|
|
1505
|
+
};
|
|
1506
|
+
/**
|
|
1507
|
+
* 递归树寻找name相同节点
|
|
1508
|
+
*
|
|
1509
|
+
* @param name 名称
|
|
1510
|
+
* @param trees 需要递归的树
|
|
1511
|
+
* @param list 搜索结果
|
|
1512
|
+
*/
|
|
1513
|
+
ContactComponent.prototype.searchTree = function (name, trees, list) {
|
|
1514
|
+
var _this = this;
|
|
1515
|
+
if (trees && trees.length && trees.length > 0) {
|
|
1516
|
+
trees.forEach(function (tree) {
|
|
1517
|
+
if (tree.title.indexOf(name) != -1) {
|
|
1518
|
+
list.push(tree);
|
|
1519
|
+
}
|
|
1520
|
+
if (tree.children) {
|
|
1521
|
+
_this.searchTree(name, tree.children, list);
|
|
1522
|
+
}
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
/**
|
|
1527
|
+
* 递归树展开所有有子节点的节点
|
|
1528
|
+
*
|
|
1529
|
+
* @param trees 需要展开的树
|
|
1530
|
+
*/
|
|
1531
|
+
ContactComponent.prototype.expandTree = function (trees) {
|
|
1532
|
+
var _this = this;
|
|
1533
|
+
if (trees && trees.length && trees.length > 0) {
|
|
1534
|
+
trees.forEach(function (tree) {
|
|
1535
|
+
if (!tree.children || tree.children.length === 0) {
|
|
1536
|
+
tree.expanded = false;
|
|
1537
|
+
tree.isLeaf = true;
|
|
1538
|
+
}
|
|
1539
|
+
if (tree.children) {
|
|
1540
|
+
tree.expanded = _this.nzExpandAll;
|
|
1541
|
+
tree.isLeaf = false;
|
|
1542
|
+
_this.expandTree(tree.children);
|
|
1543
|
+
}
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
};
|
|
1547
|
+
/**
|
|
1548
|
+
* 刷新当前页面
|
|
1549
|
+
*/
|
|
1550
|
+
ContactComponent.prototype.refresh = function () {
|
|
1551
|
+
this.changeDetectorRef.detectChanges();
|
|
1552
|
+
};
|
|
1553
|
+
/**
|
|
1554
|
+
* 确认按钮output数据
|
|
1555
|
+
*/
|
|
1556
|
+
ContactComponent.prototype.confirm = function () {
|
|
1557
|
+
this.confirmed.next(this.nzContacts);
|
|
1558
|
+
};
|
|
1559
|
+
/**
|
|
1560
|
+
* 销毁函数
|
|
1561
|
+
*/
|
|
1562
|
+
ContactComponent.prototype.ngOnDestroy = function () {
|
|
1563
|
+
this.nzDepts = [];
|
|
1564
|
+
this.nzRoles = [];
|
|
1565
|
+
this.nzContacts = [];
|
|
1566
|
+
this.subs.forEach(function (s) { return s.unsubscribe(); });
|
|
1567
|
+
};
|
|
1568
|
+
return ContactComponent;
|
|
1569
|
+
}());
|
|
1570
|
+
ContactComponent.decorators = [
|
|
1571
|
+
{ type: i0.Component, args: [{
|
|
1572
|
+
selector: 'contact',
|
|
1573
|
+
template: "<nz-row [nzGutter]=\"16\">\n <nz-col [nzXs]=\"24\" [nzSm]=\"24\" [nzMd]=\"24\" [nzLg]=\"8\" [nzXl]=\"6\" [nzXXl]=\"6\">\n <nz-tabset nzCentered>\n <nz-tab nzTitle=\"\u90E8\u95E8\" (nzSelect)=\"onTabsetDept()\">\n <div sg-container=\"2\">\n <sg col=\"1\" class=\"nz-tabset-sg\">\n <nz-input-group class=\"nz-tabset-input\" [nzSuffix]=\"searchInputTpl\">\n <input\n nz-input\n [(ngModel)]=\"nzTabsetSearch\"\n (ngModelChange)=\"onTabsetSearchChange('dept', $event)\"\n type=\"text\"\n placeholder=\"\u8BF7\u8F93\u5165\u90E8\u95E8\u540D\u79F0\"\n />\n </nz-input-group>\n </sg>\n <sg col=\"1\">\n <nz-spin [nzSpinning]=\"nzTabsetLoading\">\n <nz-tree\n class=\"nz-tabset-content\"\n (nzClick)=\"onDeptClick($event)\"\n [nzBlockNode]=\"true\"\n [nzShowLine]=\"true\"\n [nzHideUnMatched]=\"true\"\n [nzVirtualHeight]=\"nzDeptTreeVirtualHeight\"\n [nzData]=\"nzDepts\"\n ></nz-tree>\n </nz-spin>\n </sg>\n </div>\n </nz-tab>\n <nz-tab nzTitle=\"\u89D2\u8272\" (nzSelect)=\"onTabsetRole()\">\n <div sg-container=\"2\">\n <sg col=\"1\" class=\"nz-tabset-sg\">\n <nz-input-group class=\"nz-tabset-input\" [nzSuffix]=\"searchInputTpl\">\n <input\n nz-input\n [(ngModel)]=\"nzTabsetSearch\"\n (ngModelChange)=\"onTabsetSearchChange('role', $event)\"\n type=\"text\"\n placeholder=\"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0\"\n />\n </nz-input-group>\n </sg>\n <sg col=\"1\">\n <nz-spin [nzSpinning]=\"nzTabsetLoading\">\n <nz-tree\n class=\"nz-tabset-content\"\n (nzClick)=\"onRoleClick($event)\"\n [nzBlockNode]=\"true\"\n [nzShowLine]=\"true\"\n [nzHideUnMatched]=\"true\"\n [nzVirtualHeight]=\"nzRoleTreeVirtualHeight\"\n [nzData]=\"nzRoles\"\n ></nz-tree>\n </nz-spin>\n </sg>\n </div>\n </nz-tab>\n <nz-tab nzTitle=\"\u597D\u53CB\" (nzSelect)=\"onTabsetFriendGroup()\">\n <div sg-container=\"2\">\n <sg col=\"1\" class=\"nz-tabset-sg\">\n <nz-input-group class=\"nz-tabset-input\" [nzSuffix]=\"searchInputTpl\">\n <input\n nz-input\n [(ngModel)]=\"nzTabsetSearch\"\n (ngModelChange)=\"onTabsetSearchChange('friendGroup', $event)\"\n type=\"text\"\n placeholder=\"\u8BF7\u8F93\u5165\u597D\u53CB\u540D\u79F0\"\n />\n </nz-input-group>\n </sg>\n <sg col=\"1\">\n <nz-spin [nzSpinning]=\"nzTabsetLoading\">\n <nz-list class=\"nz-tabset-content\" nzItemLayout=\"horizontal\" [nzSplit]=\"false\" nzSize=\"small\">\n <nz-list-item\n class=\"nz-tabset-content-item\"\n *ngFor=\"let group of nzFriendGroups\"\n (click)=\"onFriendGroupClick(group)\"\n >\n <nz-list-item-meta>\n <nz-list-item-meta-title>\n {{ group.name }}\n </nz-list-item-meta-title>\n </nz-list-item-meta>\n </nz-list-item>\n </nz-list>\n </nz-spin>\n </sg>\n </div>\n </nz-tab>\n </nz-tabset>\n </nz-col>\n\n <nz-col [nzXs]=\"24\" [nzSm]=\"24\" [nzMd]=\"24\" [nzLg]=\"16\" [nzXl]=\"13\" [nzXXl]=\"13\">\n <st #st responsiveHideHeaderFooter></st>\n </nz-col>\n\n <nz-col [nzXs]=\"24\" [nzSm]=\"24\" [nzMd]=\"24\" [nzLg]=\"24\" [nzXl]=\"5\" [nzXXl]=\"5\">\n <nz-spin [nzSpinning]=\"nzContactLoading\">\n <nz-list nzItemLayout=\"horizontal\" [nzSplit]=\"false\" nzSize=\"small\">\n <nz-list-item\n class=\"nz-tabset-content-item\"\n *ngFor=\"let contact of nzContacts\"\n (click)=\"onContactRemove(contact)\"\n >\n <nz-list-item-meta>\n <nz-list-item-meta-title>\n {{ contact.realName }}\n </nz-list-item-meta-title>\n </nz-list-item-meta>\n </nz-list-item>\n </nz-list>\n </nz-spin>\n </nz-col>\n</nz-row>\n\n<nz-row *ngIf=\"button\">\n <nz-col [nzSpan]=\"4\" [nzOffset]=\"20\">\n <button nz-button nzType=\"primary\" (click)=\"confirm()\">\u786E\u5B9A</button>\n </nz-col>\n</nz-row>\n\n<ng-template #searchInputTpl>\n <i nz-icon nzType=\"close\" nzTheme=\"outline\" *ngIf=\"nzTabsetSearch\" (click)=\"onTabsetSearchClean()\"></i>\n <i nz-icon nzType=\"search\" nzTheme=\"outline\" *ngIf=\"!nzTabsetSearch\"></i>\n</ng-template>\n",
|
|
1574
|
+
styles: [".nz-tabset-input{width:100%}.nz-tabset-content{padding:20px}.nz-tabset-sg{padding-right:38px!important;padding-left:38px!important}.nz-tabset-content-item:hover{background-color:#f1f1f1;cursor:pointer}\n"]
|
|
1575
|
+
},] }
|
|
1576
|
+
];
|
|
1577
|
+
ContactComponent.ctorParameters = function () { return [
|
|
1578
|
+
{ type: ContactService },
|
|
1579
|
+
{ type: i0.ChangeDetectorRef }
|
|
1580
|
+
]; };
|
|
1581
|
+
ContactComponent.propDecorators = {
|
|
1582
|
+
nzTabsetSearch: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1583
|
+
nzTabsetLoading: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1584
|
+
nzExpandAll: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1585
|
+
nzDepts: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1586
|
+
nzDeptTreeVirtualHeight: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1587
|
+
nzDeptClass: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1588
|
+
nzDeptClassHistory: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1589
|
+
nzDeptGrade: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1590
|
+
nzDeptGradeID: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1591
|
+
nzRoles: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1592
|
+
nzRoleTreeVirtualHeight: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1593
|
+
nzFriendGroups: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1594
|
+
st: [{ type: i0.ViewChild, args: ['st', { static: false },] }],
|
|
1595
|
+
defaultContacts: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1596
|
+
nzContacts: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1597
|
+
nzContactLoading: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1598
|
+
button: [{ type: i0.Optional }, { type: i0.Input }],
|
|
1599
|
+
confirmed: [{ type: i0.Output }]
|
|
1600
|
+
};
|
|
1601
|
+
|
|
1013
1602
|
var ɵ0 = function (msg) {
|
|
1014
1603
|
util.log(msg);
|
|
1015
1604
|
};
|
|
@@ -1111,9 +1700,10 @@
|
|
|
1111
1700
|
]; };
|
|
1112
1701
|
|
|
1113
1702
|
var YzLayoutBasicComponent = /** @class */ (function () {
|
|
1114
|
-
function YzLayoutBasicComponent(cacheService, yzStompService) {
|
|
1703
|
+
function YzLayoutBasicComponent(cacheService, yzStompService, layoutService) {
|
|
1115
1704
|
this.cacheService = cacheService;
|
|
1116
1705
|
this.yzStompService = yzStompService;
|
|
1706
|
+
this.layoutService = layoutService;
|
|
1117
1707
|
this.options = {
|
|
1118
1708
|
logoExpanded: "./assets/logo-full.svg",
|
|
1119
1709
|
logoCollapsed: "./assets/logo.svg"
|
|
@@ -1121,8 +1711,26 @@
|
|
|
1121
1711
|
this.intro = '';
|
|
1122
1712
|
this.text = '';
|
|
1123
1713
|
this.icon = '';
|
|
1714
|
+
this.showReuseTab = true;
|
|
1715
|
+
this.showHeader = true;
|
|
1716
|
+
this.showSider = true;
|
|
1124
1717
|
}
|
|
1718
|
+
Object.defineProperty(YzLayoutBasicComponent.prototype, "reuseStyleSheet", {
|
|
1719
|
+
get: function () {
|
|
1720
|
+
var cascadingStyleSheet = {};
|
|
1721
|
+
if (!this.showHeader) {
|
|
1722
|
+
cascadingStyleSheet = Object.assign(Object.assign({}, cascadingStyleSheet), { top: 0 });
|
|
1723
|
+
}
|
|
1724
|
+
if (!this.showSider) {
|
|
1725
|
+
cascadingStyleSheet = Object.assign(Object.assign({}, cascadingStyleSheet), { left: '24px' });
|
|
1726
|
+
}
|
|
1727
|
+
return cascadingStyleSheet;
|
|
1728
|
+
},
|
|
1729
|
+
enumerable: false,
|
|
1730
|
+
configurable: true
|
|
1731
|
+
});
|
|
1125
1732
|
YzLayoutBasicComponent.prototype.ngOnInit = function () {
|
|
1733
|
+
var _this = this;
|
|
1126
1734
|
var current = this.cacheService.get('_yz_current', { mode: 'none' });
|
|
1127
1735
|
var project = this.cacheService.get('_yz_project_info', { mode: 'none' });
|
|
1128
1736
|
this.text = current.text ? current.text : '应用名称';
|
|
@@ -1131,6 +1739,9 @@
|
|
|
1131
1739
|
this.options.logoExpanded = project.maxLogoUrl ? project.maxLogoUrl : "./assets/logo-full.svg";
|
|
1132
1740
|
this.options.logoCollapsed = project.miniLogoUrl ? project.miniLogoUrl : "./assets/logo.svg";
|
|
1133
1741
|
this.yzStompService.listen();
|
|
1742
|
+
this.layoutService.reuseTab.asObservable().subscribe(function (show) { return (_this.showReuseTab = show); });
|
|
1743
|
+
this.layoutService.header.asObservable().subscribe(function (show) { return (_this.showHeader = show); });
|
|
1744
|
+
this.layoutService.sidebar.asObservable().subscribe(function (show) { return (_this.showSider = show); });
|
|
1134
1745
|
};
|
|
1135
1746
|
YzLayoutBasicComponent.prototype.ngOnDestroy = function () {
|
|
1136
1747
|
this.yzStompService.unListen();
|
|
@@ -1140,17 +1751,18 @@
|
|
|
1140
1751
|
YzLayoutBasicComponent.decorators = [
|
|
1141
1752
|
{ type: i0.Component, args: [{
|
|
1142
1753
|
selector: 'yz-layout-basic',
|
|
1143
|
-
template: "\n <layout-default [options]=\"options\" [asideUser]=\"asideUserTpl\" [content]=\"contentTpl\">\n <layout-default-header-item direction=\"left\">\n <yz-header-application></yz-header-application>\n </layout-default-header-item>\n\n <layout-default-header-item direction=\"right\" hidden=\"mobile\">\n <yz-header-notify></yz-header-notify>\n </layout-default-header-item>\n\n <layout-default-header-item direction=\"right\" hidden=\"mobile\">\n <yz-header-theme-btn></yz-header-theme-btn>\n </layout-default-header-item>\n\n <layout-default-header-item direction=\"right\" hidden=\"mobile\">\n <div\n layout-default-header-item-trigger\n nz-dropdown\n [nzDropdownMenu]=\"settingsMenu\"\n nzTrigger=\"click\"\n nzPlacement=\"bottomRight\"\n >\n <i nz-icon nzType=\"setting\"></i>\n </div>\n <nz-dropdown-menu #settingsMenu=\"nzDropdownMenu\">\n <div nz-menu style=\"width: 200px;\">\n <div nz-menu-item>\n <yz-header-fullscreen></yz-header-fullscreen>\n </div>\n <div nz-menu-item>\n <yz-header-clear-storage></yz-header-clear-storage>\n </div>\n <div nz-menu-item>\n <yz-header-i18n></yz-header-i18n>\n </div>\n </div>\n </nz-dropdown-menu>\n </layout-default-header-item>\n <layout-default-header-item direction=\"right\">\n <yz-header-user></yz-header-user>\n </layout-default-header-item>\n <ng-template #asideUserTpl>\n <div nz-dropdown nzTrigger=\"click\" [nzDropdownMenu]=\"userMenu\" class=\"yunzai-default__aside-user\">\n <nz-avatar class=\"yunzai-default__aside-user-avatar\" [nzSrc]=\"icon\"></nz-avatar>\n <div class=\"yunzai-default__aside-user-info\">\n <strong>{{ text }}</strong>\n <p class=\"mb0\">{{ intro }}</p>\n </div>\n </div>\n <nz-dropdown-menu #userMenu=\"nzDropdownMenu\">\n <ul nz-menu>\n <li nz-menu-item routerLink=\"/\">{{ 'menu.backtohome' | i18n }}</li>\n </ul>\n </nz-dropdown-menu>\n </ng-template>\n <ng-template #contentTpl>\n <reuse-tab #reuseTab></reuse-tab>\n <router-outlet (activate)=\"reuseTab.activate($event)\"></router-outlet>\n </ng-template>\n </layout-default>\n ",
|
|
1754
|
+
template: "\n <layout-default [options]=\"options\" [asideUser]=\"asideUserTpl\" [content]=\"showReuseTab ? contentTpl : noneTpl\">\n <layout-default-header-item direction=\"left\">\n <yz-header-application></yz-header-application>\n </layout-default-header-item>\n\n <layout-default-header-item direction=\"right\" hidden=\"mobile\">\n <yz-header-notify></yz-header-notify>\n </layout-default-header-item>\n\n <layout-default-header-item direction=\"right\" hidden=\"mobile\">\n <yz-header-theme-btn></yz-header-theme-btn>\n </layout-default-header-item>\n\n <layout-default-header-item direction=\"right\" hidden=\"mobile\">\n <div\n layout-default-header-item-trigger\n nz-dropdown\n [nzDropdownMenu]=\"settingsMenu\"\n nzTrigger=\"click\"\n nzPlacement=\"bottomRight\"\n >\n <i nz-icon nzType=\"setting\"></i>\n </div>\n <nz-dropdown-menu #settingsMenu=\"nzDropdownMenu\">\n <div nz-menu style=\"width: 200px;\">\n <div nz-menu-item>\n <yz-header-fullscreen></yz-header-fullscreen>\n </div>\n <div nz-menu-item>\n <yz-header-clear-storage></yz-header-clear-storage>\n </div>\n <div nz-menu-item>\n <yz-header-i18n></yz-header-i18n>\n </div>\n </div>\n </nz-dropdown-menu>\n </layout-default-header-item>\n <layout-default-header-item direction=\"right\">\n <yz-header-user></yz-header-user>\n </layout-default-header-item>\n <ng-template #asideUserTpl>\n <div nz-dropdown nzTrigger=\"click\" [nzDropdownMenu]=\"userMenu\" class=\"yunzai-default__aside-user\">\n <nz-avatar class=\"yunzai-default__aside-user-avatar\" [nzSrc]=\"icon\"></nz-avatar>\n <div class=\"yunzai-default__aside-user-info\">\n <strong>{{ text }}</strong>\n <p class=\"mb0\">{{ intro }}</p>\n </div>\n </div>\n <nz-dropdown-menu #userMenu=\"nzDropdownMenu\">\n <ul nz-menu>\n <li nz-menu-item routerLink=\"/\">{{ 'menu.backtohome' | i18n }}</li>\n </ul>\n </nz-dropdown-menu>\n </ng-template>\n <ng-template #contentTpl>\n <reuse-tab #reuseTab [ngStyle]=\"reuseStyleSheet\"></reuse-tab>\n <router-outlet (activate)=\"reuseTab.activate($event)\"></router-outlet>\n </ng-template>\n <ng-template #noneTpl>\n <router-outlet></router-outlet>\n </ng-template>\n </layout-default>\n ",
|
|
1144
1755
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1145
1756
|
},] }
|
|
1146
1757
|
];
|
|
1147
1758
|
YzLayoutBasicComponent.ctorParameters = function () { return [
|
|
1148
1759
|
{ type: i2$1.CacheService },
|
|
1149
|
-
{ type: YzStompService }
|
|
1760
|
+
{ type: YzStompService },
|
|
1761
|
+
{ type: layoutDefault.LayoutService }
|
|
1150
1762
|
]; };
|
|
1151
1763
|
|
|
1152
1764
|
var COMPONENTS = [
|
|
1153
|
-
|
|
1765
|
+
ContactComponent,
|
|
1154
1766
|
YzLayoutBasicComponent,
|
|
1155
1767
|
YzHeaderApplicationComponent,
|
|
1156
1768
|
YzHeaderNotifyComponent,
|
|
@@ -1633,7 +2245,7 @@
|
|
|
1633
2245
|
// menu
|
|
1634
2246
|
var ms = util.deepCopy(user.menu).filter(function (m) { return m.systemCode && m.systemCode === _this.bis.systemCode; });
|
|
1635
2247
|
mapYzSideToYelonMenu(ms);
|
|
1636
|
-
var currentMenu = ms.pop();
|
|
2248
|
+
var currentMenu = ms.pop() || [];
|
|
1637
2249
|
this.menuService.add([currentMenu]);
|
|
1638
2250
|
// logo app
|
|
1639
2251
|
this.settingService.setApp({ name: currentMenu.text, description: currentMenu.intro });
|
|
@@ -1643,8 +2255,8 @@
|
|
|
1643
2255
|
email: user.email || 'no email'
|
|
1644
2256
|
});
|
|
1645
2257
|
// title
|
|
1646
|
-
this.titleService.default = currentMenu.text
|
|
1647
|
-
this.titleService.setTitle(currentMenu.text
|
|
2258
|
+
this.titleService.default = currentMenu && currentMenu.text ? currentMenu.text : 'default application name';
|
|
2259
|
+
this.titleService.setTitle(currentMenu && currentMenu.text ? currentMenu.text : 'no title');
|
|
1648
2260
|
// acl
|
|
1649
2261
|
var abilities = [];
|
|
1650
2262
|
generateAbility([currentMenu], abilities, '');
|
|
@@ -2066,13 +2678,15 @@
|
|
|
2066
2678
|
exports.mergeBisConfig = mergeBisConfig;
|
|
2067
2679
|
exports.mergeStompConfig = mergeStompConfig;
|
|
2068
2680
|
exports["ɵ0"] = ɵ0;
|
|
2069
|
-
exports["ɵa"] =
|
|
2070
|
-
exports["ɵb"] =
|
|
2071
|
-
exports["ɵc"] =
|
|
2072
|
-
exports["ɵd"] =
|
|
2073
|
-
exports["ɵe"] =
|
|
2074
|
-
exports["ɵf"] =
|
|
2075
|
-
exports["ɵg"] =
|
|
2681
|
+
exports["ɵa"] = ContactComponent;
|
|
2682
|
+
exports["ɵb"] = ContactService;
|
|
2683
|
+
exports["ɵc"] = YzHeaderApplicationComponent;
|
|
2684
|
+
exports["ɵd"] = YzHeaderNotifyComponent;
|
|
2685
|
+
exports["ɵe"] = YzHeaderThemBtnComponent;
|
|
2686
|
+
exports["ɵf"] = YzHeaderUserComponent;
|
|
2687
|
+
exports["ɵg"] = YzHeaderFullScreenComponent;
|
|
2688
|
+
exports["ɵh"] = YzHeaderClearStorageComponent;
|
|
2689
|
+
exports["ɵi"] = YzHeaderI18NComponent;
|
|
2076
2690
|
|
|
2077
2691
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2078
2692
|
|