@ecip/auth
Version:
1,062 lines (1,052 loc) • 38.9 kB
JavaScript
import { SharedModule } from '@ecip/shared';
import { __spread, __values } from 'tslib';
import { ModalHelper } from '@delon/theme';
import '@delon/abc';
import { isNullOrUndefined } from 'util';
import { Component, Input, ViewChild, NgModule } from '@angular/core';
import { NzMessageService, NzModalRef } from 'ng-zorro-antd';
import '@delon/form';
import { map } from 'rxjs/operators';
import { DictService, DataSourceService, RuleService } from '@ecip/service';
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var AuthDataSourceEditComponent = /** @class */ (function () {
function AuthDataSourceEditComponent(modal, dataSourceService, messageService, dictService) {
var _this = this;
this.modal = modal;
this.dataSourceService = dataSourceService;
this.messageService = messageService;
this.dictService = dictService;
this.title = '编辑数据源';
this.schema = {
properties: {
dsName: {
type: 'string',
title: '数据源名称',
ui: {
//异步验证:判断是否已经存在相同数据源名称的记录,
//如果是修改数据源,和自己原本的数据源名称相同则忽略
validator: (/**
* @param {?} value
* @return {?}
*/
function (value) { return _this.dataSourceService.existsDsName(value)
.pipe(map((/**
* @param {?} res
* @return {?}
*/
function (res) { return (res && (_this.isNew || _this.record.dsName != value)) ? [{ keyword: 'required', message: '数据源名已存在' }] : []; }))); })
}
},
dbType: {
type: "string",
title: '数据库类型',
default: '',
ui: {
widget: 'select'
}
},
dbName: {
type: 'string',
title: '数据库名'
},
url: {
type: 'string',
title: '协议(URL前缀)'
},
ip: {
type: 'string',
title: '主机(IP或域名)'
},
port: {
type: 'number',
title: '端口号',
ui: {
widget: 'string',
}
},
username: {
type: 'string',
title: '用户名'
},
password: {
type: 'string',
title: '密码',
ui: {
widget: 'string',
type: 'password'
}
},
},
required: ['dsName', 'dbType', 'dbName', 'url', 'ip', 'port', 'username', 'password'],
};
this.ui = {
'*': {
grid: { span: 18, offset: 2 },
},
};
}
/**
* @return {?}
*/
AuthDataSourceEditComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
if (this.isNew === true) {
this.title = '新建数据源';
}
};
/**
* @return {?}
*/
AuthDataSourceEditComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
//异步渲染下拉框
this.dictService.getTypeList('dbType').subscribe((/**
* @param {?} res
* @return {?}
*/
function (res) {
_this.sf.schema.properties.dbType.enum = [{ value: '', label: '请选择' }].concat(res);
_this.sf.refreshSchema();
}));
};
/**
* @param {?} dataSource
* @return {?}
*/
AuthDataSourceEditComponent.prototype.submit = /**
* @param {?} dataSource
* @return {?}
*/
function (dataSource) {
if (this.isNew === true) {
this.create(dataSource);
}
else {
this.update(dataSource);
}
};
/**
* @param {?} dataSource
* @return {?}
*/
AuthDataSourceEditComponent.prototype.create = /**
* @param {?} dataSource
* @return {?}
*/
function (dataSource) {
var _this = this;
this.dataSourceService.post(dataSource).subscribe((/**
* @return {?}
*/
function () {
_this.modal.close(true);
}));
};
/**
* @param {?} dataSource
* @return {?}
*/
AuthDataSourceEditComponent.prototype.update = /**
* @param {?} dataSource
* @return {?}
*/
function (dataSource) {
var _this = this;
this.dataSourceService.put(this.record.id, dataSource).subscribe((/**
* @return {?}
*/
function () {
_this.modal.close(true);
}));
};
/**
* @param {?} dataSource
* @return {?}
*/
AuthDataSourceEditComponent.prototype.testConnection = /**
* @param {?} dataSource
* @return {?}
*/
function (dataSource) {
var _this = this;
this.dataSourceService.testConnection(dataSource).subscribe((/**
* @param {?} res
* @return {?}
*/
function (res) {
if (res.body === true) {
_this.messageService.success("连接成功");
}
else {
_this.messageService.error("连接失败");
}
}));
};
/**
* @return {?}
*/
AuthDataSourceEditComponent.prototype.close = /**
* @return {?}
*/
function () {
this.modal.destroy();
};
AuthDataSourceEditComponent.decorators = [
{ type: Component, args: [{
selector: 'app-auth-ds-edit',
template: "<div class=\"modal-header\">\r\n <div class=\"modal-title\">{{title}}</div>\r\n</div>\r\n<nz-spin *ngIf=\"!isNew&&!record\"></nz-spin>\r\n<sf #sf mode=\"default\" [schema]=\"schema\" [ui]=\"ui\" [formData]=\"record\" button=\"none\">\r\n <div class=\"modal-footer\">\r\n <button nz-button type=\"button\" nzType=\"primary\" (click)=\"testConnection(sf.value)\" [disabled]=\"!sf.valid\" [nzLoading]=\"dataSourceService.http.loading\">\u6D4B\u8BD5\u8FDE\u63A5</button>\r\n <button nz-button type=\"submit\" nzType=\"primary\" (click)=\"submit(sf.value)\" [disabled]=\"!sf.valid\" [nzLoading]=\"dataSourceService.http.loading\">\u4FDD\u5B58</button>\r\n <button nz-button type=\"button\" (click)=\"close()\">\u53D6\u6D88</button>\r\n </div>\r\n</sf>\r\n"
}] }
];
/** @nocollapse */
AuthDataSourceEditComponent.ctorParameters = function () { return [
{ type: NzModalRef },
{ type: DataSourceService },
{ type: NzMessageService },
{ type: DictService }
]; };
AuthDataSourceEditComponent.propDecorators = {
sf: [{ type: ViewChild, args: ['sf',] }],
record: [{ type: Input }],
isNew: [{ type: Input }]
};
return AuthDataSourceEditComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var AuthDataSourceComponent = /** @class */ (function () {
function AuthDataSourceComponent(modalHelper, messageService, dataSourceService, dictService) {
var _this = this;
this.modalHelper = modalHelper;
this.messageService = messageService;
this.dataSourceService = dataSourceService;
this.dictService = dictService;
this.url = 'api/v1/sysrDS';
this.selectedIds = [];
this.pageTitle = '数据源管理';
this.params = {};
this.schema = {
properties: {
dsName: {
type: 'string',
title: '数据源名称',
},
dbType: {
type: "string",
title: '数据库类型',
ui: {
widget: 'select',
width: 260,
notFoundContent: '没有数据',
dropdownMatchSelectWidth: false,
asyncData: (/**
* @return {?}
*/
function () { return _this.dictService.getTypeList("dbType"); })
}
},
ip: {
type: 'string',
title: '主机名',
},
dbName: {
type: 'string',
title: '数据库名',
},
},
};
this.columns = [
{
title: '编号',
type: 'checkbox',
index: 'id',
fixed: 'left',
width: '2%',
},
{
title: '数据源名称',
index: 'dsName',
fixed: 'left',
width: '10%'
},
{
title: '数据库类型',
index: 'dbType',
fixed: 'left',
width: '6%',
format: (/**
* @param {?} item
* @return {?}
*/
function (item) {
var e_1, _a;
try {
for (var _b = __values(_this.dbTypeList), _c = _b.next(); !_c.done; _c = _b.next()) {
var pair = _c.value;
if (item.dbType == pair.value) {
return pair.label;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return item.dbType;
})
},
{
title: '数据库名',
index: 'dbName',
fixed: 'left',
width: '8%'
},
{
title: 'URL',
index: 'url',
},
{
title: '主机名',
index: 'ip',
},
{
title: '端口号',
index: 'port',
},
{
title: '用户名',
index: 'username',
},
{
title: '操作',
fixed: 'right',
width: '9%',
buttons: [
{
text: '编辑',
icon: 'edit',
type: 'static',
component: AuthDataSourceEditComponent,
click: (/**
* @param {?} record
* @param {?} modal
* @return {?}
*/
function (record, modal) {
_this.messageService.success("编辑成功");
_this.st.load(-1, _this.params);
}),
acl: { ability: ['datasource:edit'] }
},
{
text: '删除',
icon: 'delete',
type: 'del',
click: (/**
* @param {?} record
* @param {?} modal
* @param {?} component
* @return {?}
*/
function (record, modal, component) {
_this.dataSourceService.deleteById(record.id).subscribe((/**
* @return {?}
*/
function () {
_this.messageService.success("删除成功");
component.load(-1, _this.params);
}));
}),
acl: { ability: ['datasource:remove'] }
}
],
}
];
}
/**
* @return {?}
*/
AuthDataSourceComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.dictService.getTypeList("dbType").subscribe((/**
* @param {?} res
* @return {?}
*/
function (res) {
_this.dbTypeList = res;
}));
};
//即时监控选中项的ID列表
//即时监控选中项的ID列表
/**
* @param {?} e
* @return {?}
*/
AuthDataSourceComponent.prototype.checkboxChange =
//即时监控选中项的ID列表
/**
* @param {?} e
* @return {?}
*/
function (e) {
var e_2, _a;
this.selectedIds = [];
try {
for (var e_3 = __values(e), e_3_1 = e_3.next(); !e_3_1.done; e_3_1 = e_3.next()) {
var item = e_3_1.value;
this.selectedIds.push(item.id);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (e_3_1 && !e_3_1.done && (_a = e_3.return)) _a.call(e_3);
}
finally { if (e_2) throw e_2.error; }
}
};
//因为[formData]和st的params似乎不能绑定,所以手写了一个绑定数据的方法
//因为[formData]和st的params似乎不能绑定,所以手写了一个绑定数据的方法
/**
* @return {?}
*/
AuthDataSourceComponent.prototype.formBind =
//因为[formData]和st的params似乎不能绑定,所以手写了一个绑定数据的方法
/**
* @return {?}
*/
function () {
this.params = this.sf.value;
};
/**
* @return {?}
*/
AuthDataSourceComponent.prototype.multiDelete = /**
* @return {?}
*/
function () {
var _this = this;
//未选定任何一条
if (this.selectedIds.length == 0) {
this.messageService.warning("未选择任何记录");
}
else {
this.dataSourceService.multiDelete(this.selectedIds).subscribe((/**
* @return {?}
*/
function () {
_this.messageService.success("删除成功");
_this.st.load(-1, _this.params);
}));
}
};
/**
* @return {?}
*/
AuthDataSourceComponent.prototype.create = /**
* @return {?}
*/
function () {
var _this = this;
this.modalHelper.createStatic(AuthDataSourceEditComponent, { isNew: true })
.subscribe((/**
* @return {?}
*/
function () {
_this.messageService.success("创建成功");
_this.st.load(-1, _this.params);
}));
};
AuthDataSourceComponent.decorators = [
{ type: Component, args: [{
selector: 'app-auth-ds',
template: "<page-header [action]=\"phPhAction\">\r\n <ng-template #phPhAction>\r\n <button acl [acl-ability]=\"'datasource:add'\" nz-button nzType=\"primary\" (click)=\"create()\">\u65B0\u5EFA</button>\r\n <!--<button nz-button (click)=\"multiDelete()\">\u5220\u9664</button>-->\r\n </ng-template>\r\n</page-header>\r\n<nz-card>\r\n <sf #sf mode=\"search\" [schema]=\"schema\" (formSubmit)=\"formBind();st.load(1, params);\" (formReset)=\"formBind();st.reset(params)\"></sf>\r\n <st #st [data]=\"url\" [columns]=\"columns\" [scroll]=\"{x:'150%'}\" (change)=\"checkboxChange($event)\" [req]=\"{params: params}\" [page]=\"{front: false}\"></st>\r\n</nz-card>\r\n"
}] }
];
/** @nocollapse */
AuthDataSourceComponent.ctorParameters = function () { return [
{ type: ModalHelper },
{ type: NzMessageService },
{ type: DataSourceService },
{ type: DictService }
]; };
AuthDataSourceComponent.propDecorators = {
st: [{ type: ViewChild, args: ['st',] }],
sf: [{ type: ViewChild, args: ['sf',] }]
};
return AuthDataSourceComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var AuthRuleComponent = /** @class */ (function () {
function AuthRuleComponent(modalHelper, messageService, ruleService, dataSourceService) {
var _this = this;
this.modalHelper = modalHelper;
this.messageService = messageService;
this.ruleService = ruleService;
this.dataSourceService = dataSourceService;
this.url = 'api/v1/sysrRule';
this.selectedIds = [];
this.params = {};
this.schema = {
properties: {
ruleName: {
type: 'string',
title: '规则名称',
},
srcDs: {
type: "string",
title: '源数据源',
ui: {
widget: 'select',
width: 260,
notFoundContent: '没有数据',
dropdownMatchSelectWidth: false,
asyncData: (/**
* @return {?}
*/
function () { return _this.dataSourceService.getVoList(); })
}
},
},
};
this.columns = [
{
title: '编号',
type: 'checkbox',
index: 'id'
},
{
title: '规则名称',
index: 'ruleName',
},
{
title: '源数据源',
index: 'srcDsName',
},
{
title: '同步类型',
index: 'syncType',
format: (/**
* @param {?} item
* @return {?}
*/
function (item) {
switch (item.syncType) {
case 'user': return '同步用户';
case 'dept': return '同步组织';
case 'other': return "\u81EA\u5B9A\u4E49\uFF08\u8868\u540D\uFF1A" + item.destTable + "\uFF09";
}
})
},
{
title: 'Cron表达式',
index: 'cron',
format: (/**
* @param {?} item
* @return {?}
*/
function (item) { return isNullOrUndefined(item.cron) || item.cron == '' ? '(无)' : item.cron; })
},
{
title: '操作',
buttons: [
{
text: '编辑',
icon: 'edit',
type: 'link',
click: (/**
* @param {?} record
* @return {?}
*/
function (record) {
return "/auth/rule/edit/" + record.id;
}),
acl: { ability: ['rule:edit'] }
},
// {
// text: '编辑',
// icon: 'edit',
// type: 'static',
// component: AuthRuleEditComponent,
// click: (record, modal) =>{
// this.messageService.success("编辑成功");
// this.st.load(-1, this.params);
// }
// },
{
text: '删除',
icon: 'delete',
type: 'del',
click: (/**
* @param {?} record
* @param {?} modal
* @param {?} component
* @return {?}
*/
function (record, modal, component) {
_this.ruleService.deleteById(record.id).subscribe((/**
* @return {?}
*/
function () {
_this.messageService.success("删除成功");
component.load(-1, _this.params);
}));
}),
acl: { ability: ['rule:remove'] }
}
],
}
];
}
//即时监控选中项的ID列表
//即时监控选中项的ID列表
/**
* @param {?} e
* @return {?}
*/
AuthRuleComponent.prototype.checkboxChange =
//即时监控选中项的ID列表
/**
* @param {?} e
* @return {?}
*/
function (e) {
var e_1, _a;
this.selectedIds = [];
try {
for (var e_2 = __values(e), e_2_1 = e_2.next(); !e_2_1.done; e_2_1 = e_2.next()) {
var item = e_2_1.value;
this.selectedIds.push(item.id);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (e_2_1 && !e_2_1.done && (_a = e_2.return)) _a.call(e_2);
}
finally { if (e_1) throw e_1.error; }
}
};
//因为[formData]和st的params似乎不能绑定,所以手写了一个绑定数据的方法
//因为[formData]和st的params似乎不能绑定,所以手写了一个绑定数据的方法
/**
* @return {?}
*/
AuthRuleComponent.prototype.formBind =
//因为[formData]和st的params似乎不能绑定,所以手写了一个绑定数据的方法
/**
* @return {?}
*/
function () {
this.params = this.sf.value;
};
/**
* @return {?}
*/
AuthRuleComponent.prototype.multiDelete = /**
* @return {?}
*/
function () {
var _this = this;
//未选定任何一条
if (this.selectedIds.length == 0) {
this.messageService.warning("未选择任何记录");
}
else {
this.ruleService.multiDelete(this.selectedIds).subscribe((/**
* @return {?}
*/
function () {
_this.messageService.success("删除成功");
_this.st.load(-1, _this.params);
}));
}
};
AuthRuleComponent.decorators = [
{ type: Component, args: [{
selector: 'app-auth-ds',
template: "<page-header [action]=\"phPhAction\">\r\n <ng-template #phPhAction>\r\n <button acl [acl-ability]=\"'rule:add'\" nz-button nzType=\"primary\" routerLink=\"/auth/rule/edit\">\u65B0\u5EFA</button>\r\n <!--<button nz-button (click)=\"multiDelete()\">\u5220\u9664</button>-->\r\n </ng-template>\r\n</page-header>\r\n<nz-card>\r\n <sf #sf mode=\"search\" [schema]=\"schema\" (formSubmit)=\"formBind();st.load(1, params);\" (formReset)=\"formBind();st.reset(params)\"></sf>\r\n <st #st [data]=\"url\" [columns]=\"columns\" (change)=\"checkboxChange($event)\" [req]=\"{params: params}\" [page]=\"{front: false}\"></st>\r\n</nz-card>\r\n"
}] }
];
/** @nocollapse */
AuthRuleComponent.ctorParameters = function () { return [
{ type: ModalHelper },
{ type: NzMessageService },
{ type: RuleService },
{ type: DataSourceService }
]; };
AuthRuleComponent.propDecorators = {
st: [{ type: ViewChild, args: ['st',] }],
sf: [{ type: ViewChild, args: ['sf',] }]
};
return AuthRuleComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var AuthRuleEditComponent = /** @class */ (function () {
function AuthRuleEditComponent(ruleService, messageService, dataSourceService, dictService, activeRoute, router) {
var _this = this;
this.ruleService = ruleService;
this.messageService = messageService;
this.dataSourceService = dataSourceService;
this.dictService = dictService;
this.activeRoute = activeRoute;
this.router = router;
this.schema = {
properties: {
ruleName: {
type: 'string',
title: '规则名称',
ui: {
//异步验证:判断是否已经存在相同数据源名称的记录,
//如果是修改数据源,和修改前的数据源名称相同则忽略
validator: (/**
* @param {?} value
* @return {?}
*/
function (value) { return _this.ruleService.existsRuleName(value)
.pipe(map((/**
* @param {?} res
* @return {?}
*/
function (res) { return (res && (_this.isNew || _this.record.ruleName != value)) ? [{ keyword: 'required', message: '规则名称已存在' }] : []; }))); })
}
},
appId: {
type: 'number',
title: '源应用',
ui: {
widget: 'select',
notFoundContent: '没有数据',
asyncData: (/**
* @return {?}
*/
function () { return _this.ruleService.appListVL(); }),
}
},
srcDs: {
type: "string",
title: '源数据源',
ui: {
widget: 'select',
notFoundContent: '没有数据',
asyncData: (/**
* @return {?}
*/
function () { return _this.dataSourceService.getVoList(); })
}
},
srcSql: {
type: 'string',
title: '源SQL',
ui: {
widget: 'textarea',
autosize: { minRows: 3 }
}
},
cron: {
type: "string",
title: 'Cron表达式',
ui: {
placeholder: 'Cron为空时将立即执行同步',
}
},
syncType: {
type: 'string',
title: '同步类型',
ui: {
widget: 'radio',
//todo:dirty
asyncData: (/**
* @return {?}
*/
function () { return _this.dictService.getTypeList("syncType"); })
}
},
destTable: {
type: "string",
title: '表名称',
ui: {
visibleIf: { syncType: ["other"] },
}
},
idType: {
type: "string",
title: '新增主键策略',
ui: {
widget: 'radio',
//todo:dirty
asyncData: (/**
* @return {?}
*/
function () { return _this.dictService.getTypeList("syncIdType"); }),
validator: (/**
* @param {?} value
* @return {?}
*/
function (value) {
return value === 'auto' && _this.sf.value.uniqConstraint.trim().toUpperCase() === 'ID' ? [{ keyword: 'format', message: "唯一约束字段为'ID'时新增主键策略不能为自动生成" }] : [];
}),
}
},
uniqConstraint: {
type: "string",
title: '唯一约束字段',
ui: {
placeholder: "唯一约束字段为'ID'时不可选择自动生成新主键",
validator: (/**
* @param {?} value
* @return {?}
*/
function (value) {
return value.trim().toUpperCase() === 'ID' && _this.sf.value.idType === 'auto' ? [{ keyword: 'format', message: "唯一约束字段为'ID'时新增主键策略不能为自动生成" }] : [];
}),
},
},
fieldMappings: {
type: 'array',
title: '字段映射',
minItems: 1,
uniqueItems: true,
items: {
type: 'object',
properties: {
srcField: {
type: 'string',
title: '源字段',
},
destField: {
type: 'string',
title: '目标字段',
},
},
required: ['srcField', 'destField'],
},
ui: {
grid: {
arraySpan: 12,
},
addTitle: '添加字段',
}
},
},
required: ['ruleName', 'srcDs', 'syncType', 'srcSql', 'uniqConstraint', 'appId', 'idType'],
};
}
/**
* @return {?}
*/
AuthRuleEditComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.isNew = this.activeRoute.snapshot.data.isNew;
//必须由路由传入title值,否则不能在页标上显示
this.title = this.activeRoute.snapshot.data.title;
if (this.isNew === false) {
/** @type {?} */
var id = this.activeRoute.snapshot.params["id"];
if (id != null) {
this.ruleService.getById(id).subscribe((/**
* @param {?} res
* @return {?}
*/
function (res) {
//未查询到记录
if (res == null) {
_this.router.navigateByUrl("404");
}
else {
_this.record = res;
}
}));
}
}
};
/**
* @param {?} value
* @return {?}
*/
AuthRuleEditComponent.prototype.submit = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (this.isNew === true) {
this.create(value);
//回到同步策略列表页面
this.router.navigateByUrl("/auth/rule");
}
else {
this.update(value);
}
};
/**
* @param {?} value
* @return {?}
*/
AuthRuleEditComponent.prototype.create = /**
* @param {?} value
* @return {?}
*/
function (value) {
var _this = this;
this.ruleService.post(value).subscribe((/**
* @return {?}
*/
function () {
_this.messageService.success("已保存");
}));
};
/**
* @param {?} value
* @return {?}
*/
AuthRuleEditComponent.prototype.update = /**
* @param {?} value
* @return {?}
*/
function (value) {
var _this = this;
this.ruleService.put(this.record.id, value).subscribe((/**
* @return {?}
*/
function () {
_this.messageService.success("已保存");
}));
};
/**
* @return {?}
*/
AuthRuleEditComponent.prototype.close = /**
* @return {?}
*/
function () {
};
/**
* @param {?} value
* @return {?}
*/
AuthRuleEditComponent.prototype.testSync = /**
* @param {?} value
* @return {?}
*/
function (value) {
var _this = this;
this.ruleService.testSync(value).subscribe((/**
* @param {?} res
* @return {?}
*/
function (res) {
if (res.body === true) {
_this.messageService.success("同步测试成功");
}
else {
_this.messageService.error("同步测试失败");
}
}));
};
AuthRuleEditComponent.decorators = [
{ type: Component, args: [{
selector: 'app-auth-rule-edit',
template: "<page-header [title]=\"title\"></page-header>\r\n<nz-card>\r\n <sf #sf mode=\"edit\" [schema]=\"schema\" [formData]=\"record\" button=\"none\">\r\n <div class=\"modal-footer\">\r\n <button nz-button type=\"button\" nzType=\"primary\" (click)=\"testSync(sf.value)\" [disabled]=\"!sf.valid\" [nzLoading]=\"ruleService.http.loading\">\u540C\u6B65\u6D4B\u8BD5</button>\r\n <button nz-button type=\"submit\" nzType=\"primary\" (click)=\"submit(sf.value)\" [disabled]=\"!sf.valid\" [nzLoading]=\"ruleService.http.loading\">\u4FDD\u5B58</button>\r\n <button nz-button type=\"button\" routerLink=\"/auth/rule\">\u5173\u95ED</button>\r\n </div>\r\n </sf>\r\n</nz-card>"
}] }
];
/** @nocollapse */
AuthRuleEditComponent.ctorParameters = function () { return [
{ type: RuleService },
{ type: NzMessageService },
{ type: DataSourceService },
{ type: DictService },
{ type: ActivatedRoute },
{ type: Router }
]; };
AuthRuleEditComponent.propDecorators = {
sf: [{ type: ViewChild, args: ['sf',] }]
};
return AuthRuleEditComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ɵ0 = { isNew: true, title: '新建同步策略' }, ɵ1 = { isNew: false, title: '编辑同步策略' };
/** @type {?} */
var routes = [
{ path: 'ds', component: AuthDataSourceComponent },
{ path: 'rule', component: AuthRuleComponent },
{ path: 'rule/edit', component: AuthRuleEditComponent, data: ɵ0 },
{ path: 'rule/edit/:id', component: AuthRuleEditComponent, data: ɵ1 },
];
var AuthRoutingModule = /** @class */ (function () {
function AuthRoutingModule() {
}
AuthRoutingModule.decorators = [
{ type: NgModule, args: [{
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
},] }
];
return AuthRoutingModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var COMPONENTS = [
AuthDataSourceComponent,
AuthRuleComponent,
AuthRuleEditComponent
];
/** @type {?} */
var COMPONENTS_NOROUNT = [
AuthDataSourceEditComponent,
];
var AuthModule = /** @class */ (function () {
function AuthModule() {
}
AuthModule.decorators = [
{ type: NgModule, args: [{
imports: [
SharedModule,
AuthRoutingModule
],
declarations: __spread(COMPONENTS, COMPONENTS_NOROUNT),
entryComponents: COMPONENTS_NOROUNT
},] }
];
return AuthModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { AuthModule, AuthRoutingModule, AuthDataSourceComponent, AuthDataSourceEditComponent, AuthRuleComponent, AuthRuleEditComponent };
//# sourceMappingURL=auth.js.map