@farris/app-navigation-be
Advanced tools
Comparing version 0.0.12 to 0.0.13
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash-es'), require('@farris/ui-notify'), require('@angular/core'), require('@angular/common'), require('@farris/ui-input-group'), require('@angular/common/http'), require('@farris/ui-pagination')) : | ||
typeof define === 'function' && define.amd ? define('@farris/app-navigation-be', ['exports', 'lodash-es', '@farris/ui-notify', '@angular/core', '@angular/common', '@farris/ui-input-group', '@angular/common/http', '@farris/ui-pagination'], factory) : | ||
(factory((global.farris = global.farris || {}, global.farris['app-navigation-be'] = {}),global.lodashEs,global.uiNotify,global.ng.core,global.ng.common,global.uiInputGroup,global.ng.common.http,global.uiPagination)); | ||
}(this, (function (exports,lodashEs,uiNotify,core,common,uiInputGroup,http,uiPagination) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash-es'), require('@farris/ui-notify'), require('rxjs/operators'), require('@farris/ui-loading'), require('@farris/ui-messager'), require('rxjs'), require('@angular/core'), require('@angular/common'), require('@farris/ui-input-group'), require('@angular/common/http'), require('@farris/ui-pagination')) : | ||
typeof define === 'function' && define.amd ? define('@farris/app-navigation-be', ['exports', 'lodash-es', '@farris/ui-notify', 'rxjs/operators', '@farris/ui-loading', '@farris/ui-messager', 'rxjs', '@angular/core', '@angular/common', '@farris/ui-input-group', '@angular/common/http', '@farris/ui-pagination'], factory) : | ||
(factory((global.farris = global.farris || {}, global.farris['app-navigation-be'] = {}),global.lodashEs,global.uiNotify,global.rxjs.operators,global.uiLoading,global.uiMessager,global.rxjs,global.ng.core,global.ng.common,global.uiInputGroup,global.ng.common.http,global.uiPagination)); | ||
}(this, (function (exports,lodashEs,uiNotify,operators,uiLoading,uiMessager,rxjs,core,common,uiInputGroup,http,uiPagination) { 'use strict'; | ||
@@ -12,6 +12,9 @@ /** | ||
*/ | ||
// import { timer } from 'rxjs'; | ||
var AppNavigationBeComponent = /** @class */ (function () { | ||
function AppNavigationBeComponent(injector, notifyService) { | ||
function AppNavigationBeComponent(injector, notifyService, loadingService, messageService) { | ||
this.injector = injector; | ||
this.notifyService = notifyService; | ||
this.loadingService = loadingService; | ||
this.messageService = messageService; | ||
// 模态框关闭 | ||
@@ -119,2 +122,3 @@ this.closeModal = new core.EventEmitter(); | ||
this.noAllData = false; | ||
// public loading: boolean = false; | ||
this.paginationOptions = { | ||
@@ -173,2 +177,7 @@ id: 'Farris-beMetadata-Pagination_', | ||
/** @type {?} */ | ||
var loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var http$$1 = this.injector.get(http.HttpClient); | ||
@@ -184,10 +193,26 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe(( /** | ||
* @param {?} data | ||
* @return {?} | ||
*/function (data) { | ||
}) | ||
.pipe(operators.tap(( /** | ||
* @param {?} data | ||
* @return {?} | ||
*/function (data) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
_this.reinvokeInterface(data); | ||
_this.beAllData = lodashEs.cloneDeep(_this.getFormData(data, 'all')); | ||
_this.beAllDataCopy = lodashEs.cloneDeep(_this.beAllData); | ||
})); | ||
})), operators.catchError(( /** | ||
* @param {?} err | ||
* @return {?} | ||
*/function (err) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && _this.messageService) { | ||
_this.messageService.exception(( /** @type {?} */(err))); | ||
} | ||
return rxjs.EMPTY; | ||
}))).subscribe(); | ||
// return timer(5000).pipe(switchMap(() => httpRequest)).subscribe(); | ||
}; | ||
@@ -206,2 +231,7 @@ /** 获取最近数据 */ | ||
/** @type {?} */ | ||
var loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var http$$1 = this.injector.get(http.HttpClient); | ||
@@ -224,6 +254,9 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe(( /** | ||
}).pipe(operators.tap(( /** | ||
* @param {?} data | ||
* @return {?} | ||
*/function (data) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
_this.beRecentData = lodashEs.cloneDeep(_this.getFormData(data, 'recent')); | ||
@@ -236,3 +269,15 @@ if (_this.beRecentData) { | ||
} | ||
})); | ||
})), operators.catchError(( /** | ||
* @param {?} err | ||
* @return {?} | ||
*/function (err) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && _this.messageService) { | ||
_this.messageService.exception(( /** @type {?} */(err))); | ||
} | ||
return rxjs.EMPTY; | ||
}))).subscribe(); | ||
// return timer(5000).pipe(switchMap(() => httpRequest)).subscribe(); | ||
}; | ||
@@ -251,2 +296,7 @@ /** 获取推荐数据 */ | ||
/** @type {?} */ | ||
var loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var range = this.editorParams.range || 'Bo'; | ||
@@ -263,6 +313,9 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe(( /** | ||
}).pipe(operators.tap(( /** | ||
* @param {?} data | ||
* @return {?} | ||
*/function (data) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
_this.beRecommandData = lodashEs.cloneDeep(_this.getFormData(data, 'local')); | ||
@@ -275,3 +328,15 @@ if (_this.beRecommandData) { | ||
} | ||
})); | ||
})), operators.catchError(( /** | ||
* @param {?} err | ||
* @return {?} | ||
*/function (err) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && _this.messageService) { | ||
_this.messageService.exception(( /** @type {?} */(err))); | ||
} | ||
return rxjs.EMPTY; | ||
}))).subscribe(); | ||
// return timer(5000).pipe(switchMap(() => httpRequest)).subscribe(); | ||
}; | ||
@@ -408,3 +473,3 @@ /** 获取数据 */ | ||
/** @type {?} */ | ||
var value = searchValue.replaceAll(' ', '').replaceAll('>', ''); | ||
var value = searchValue.replace(/ /g, '').replace(/>/g, ''); | ||
value = value == '' ? ' ' : value; | ||
@@ -415,5 +480,5 @@ value = value.toLowerCase(); | ||
/** | ||
* 检测推荐中是否有值:包括本地元数据及最近 | ||
* @param searchedData | ||
*/ | ||
* 检测推荐中是否有值:包括本地元数据及最近 | ||
* @param searchedData | ||
*/ | ||
/** | ||
@@ -518,3 +583,3 @@ * 检测推荐中是否有值:包括本地元数据及最近 | ||
*/function (beDataItem) { | ||
if (selectedBeDataItem.data.code == beDataItem.data.code) { | ||
if (selectedBeDataItem.data.code == beDataItem.data.code && selectedBeDataItem.data.nameSpace == beDataItem.data.nameSpace) { | ||
beDataItem.active = !beDataItem.active; | ||
@@ -541,2 +606,7 @@ _this.selectedCommand = lodashEs.cloneDeep(selectedBeDataItem); | ||
/** @type {?} */ | ||
var loading_1; | ||
if (this.loadingService) { | ||
loading_1 = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var http$$1 = this.injector.get(http.HttpClient); | ||
@@ -553,9 +623,24 @@ /** @type {?} */ | ||
}; | ||
return http$$1.post(path, body, headerOption).subscribe(( /** | ||
* @param {?} data | ||
* @return {?} | ||
*/function (data) { | ||
return http$$1.post(path, body, headerOption) | ||
.pipe(operators.tap(( /** | ||
* @param {?} data | ||
* @return {?} | ||
*/function (data) { | ||
if (_this.loadingService) { | ||
loading_1.close(); | ||
} | ||
data['metadata']['processMode'] = _this.selectedCommand.data['processMode'] === 'interpretation' ? 'interpretation' : 'general'; | ||
_this.submitModal.emit(data); | ||
})); | ||
})), operators.catchError(( /** | ||
* @param {?} err | ||
* @return {?} | ||
*/function (err) { | ||
if (_this.loadingService) { | ||
loading_1.close(); | ||
} | ||
if (err && err.error && _this.messageService) { | ||
_this.messageService.exception(( /** @type {?} */(err.error))); | ||
} | ||
return rxjs.EMPTY; | ||
}))).subscribe(); | ||
} | ||
@@ -565,17 +650,20 @@ else { | ||
var source = this.editorParams.source; | ||
switch (source) { | ||
case 'be': | ||
this.notifyService['info']('未选择业务实体'); | ||
break; | ||
case 'vo': | ||
this.notifyService['info']('未选择视图对象'); | ||
break; | ||
case 'qo': | ||
this.notifyService['info']('未选择查询对象'); | ||
break; | ||
case 'webcmp': | ||
this.notifyService['info']('未选择Web构件'); | ||
default: | ||
this.notifyService['info']('未选择元数据'); | ||
break; | ||
if (this.notifyService) { | ||
switch (source) { | ||
case 'be': | ||
this.notifyService['info']('未选择业务实体'); | ||
break; | ||
case 'vo': | ||
this.notifyService['info']('未选择视图对象'); | ||
break; | ||
case 'qo': | ||
this.notifyService['info']('未选择查询对象'); | ||
break; | ||
case 'webcmp': | ||
this.notifyService['info']('未选择Web构件'); | ||
break; | ||
default: | ||
this.notifyService['info']('未选择元数据'); | ||
break; | ||
} | ||
} | ||
@@ -614,15 +702,23 @@ return null; | ||
function () { | ||
this.foldRecent = !this.foldRecent; | ||
/** @type {?} */ | ||
var beData = lodashEs.cloneDeep(this.beData); | ||
if (beData) { | ||
beData.forEach(( /** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/function (beDataItem) { | ||
if (beDataItem.category == 'recent') { | ||
beDataItem.hide = !beDataItem.hide; | ||
} | ||
})); | ||
this.beData = lodashEs.cloneDeep(beData); | ||
if (this.beData) { | ||
this.foldRecent = !this.foldRecent; | ||
/** @type {?} */ | ||
var searchedData = this.chooseRecommand ? this.beData : this.beAllDataCopy; | ||
if (searchedData) { | ||
/** @type {?} */ | ||
var value_2 = this.handleSearchedValue(this.searchValue); | ||
searchedData.forEach(( /** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/function (beDataItem) { | ||
if (beDataItem.category == 'recent') { | ||
/** @type {?} */ | ||
var combinedString = beDataItem.name + " " + beDataItem.label + " " + beDataItem.source; | ||
/** @type {?} */ | ||
var selectedItem = combinedString.toLowerCase(); | ||
beDataItem.hide = selectedItem.includes(value_2) == true ? !beDataItem.hide : beDataItem.hide; | ||
} | ||
})); | ||
this.beData = lodashEs.cloneDeep(searchedData); | ||
} | ||
} | ||
@@ -637,15 +733,24 @@ }; | ||
function () { | ||
this.foldLocal = !this.foldLocal; | ||
/** @type {?} */ | ||
var beData = lodashEs.cloneDeep(this.beData); | ||
if (beData) { | ||
beData.forEach(( /** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/function (beDataItem) { | ||
if (beDataItem.category == 'local') { | ||
beDataItem.hide = !beDataItem.hide; | ||
} | ||
})); | ||
this.beData = lodashEs.cloneDeep(beData); | ||
if (this.beData) { | ||
this.foldLocal = !this.foldLocal; | ||
/** @type {?} */ | ||
var searchedData = this.chooseRecommand ? this.beData : this.beAllDataCopy; | ||
if (searchedData) { | ||
/** @type {?} */ | ||
var value_3 = this.handleSearchedValue(this.searchValue); | ||
// 某一个分类下的搜索项为空的情况下,则不显示该项; | ||
searchedData.forEach(( /** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/function (beDataItem) { | ||
if (beDataItem.category == 'local') { | ||
/** @type {?} */ | ||
var combinedString = beDataItem.name + " " + beDataItem.label + " " + beDataItem.source; | ||
/** @type {?} */ | ||
var selectedItem = combinedString.toLowerCase(); | ||
beDataItem.hide = selectedItem.includes(value_3) == true ? !beDataItem.hide : beDataItem.hide; | ||
} | ||
})); | ||
this.beData = lodashEs.cloneDeep(searchedData); | ||
} | ||
} | ||
@@ -698,2 +803,7 @@ }; | ||
/** @type {?} */ | ||
var loading_2; | ||
if (this.loadingService) { | ||
loading_2 = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var http$$1 = this.injector.get(http.HttpClient); | ||
@@ -707,9 +817,23 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe(( /** | ||
}).pipe(operators.tap(( /** | ||
* @param {?} data | ||
* @return {?} | ||
*/function (data) { | ||
if (_this.loadingService) { | ||
loading_2.close(); | ||
} | ||
_this.beAllData = lodashEs.cloneDeep(_this.getFormData(data, 'all')); | ||
_this.beAllDataCopy = lodashEs.cloneDeep(_this.beAllData); | ||
})); | ||
})), operators.catchError(( /** | ||
* @param {?} err | ||
* @return {?} | ||
*/function (err) { | ||
if (_this.loadingService) { | ||
loading_2.close(); | ||
} | ||
if (err && err.error && _this.messageService) { | ||
_this.messageService.exception(( /** @type {?} */(err.error))); | ||
} | ||
return rxjs.EMPTY; | ||
}))).subscribe(); | ||
} | ||
@@ -729,3 +853,5 @@ } | ||
{ type: core.Injector }, | ||
{ type: uiNotify.NotifyService } | ||
{ type: uiNotify.NotifyService }, | ||
{ type: uiLoading.LoadingService }, | ||
{ type: uiMessager.MessagerService } | ||
]; | ||
@@ -732,0 +858,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash-es"),require("@farris/ui-notify"),require("@angular/core"),require("@angular/common"),require("@farris/ui-input-group"),require("@angular/common/http"),require("@farris/ui-pagination")):"function"==typeof define&&define.amd?define("@farris/app-navigation-be",["exports","lodash-es","@farris/ui-notify","@angular/core","@angular/common","@farris/ui-input-group","@angular/common/http","@farris/ui-pagination"],t):t((e.farris=e.farris||{},e.farris["app-navigation-be"]={}),e.lodashEs,e.uiNotify,e.ng.core,e.ng.common,e.uiInputGroup,e.ng.common.http,e.uiPagination)}(this,function(e,o,t,a,n,i,s,r){"use strict";l.prototype.ngOnInit=function(){this.beData=[],this.modalConfig=this.editorParams.modalConfig||this.modalConfig,this.envType=this.editorParams.envType||"designer",this.getAllDataInfo(),this.getRecentDataInfo(),this.getRecommandDataInfo(),this.chooseRecommand=!0,this.onSearchValueChanged("")},l.prototype.onPageChange=function(e){this.pageIndex!==e.pageIndex&&(this.pageIndex=e.pageIndex,this.paginationOptions.currentPage=e.pageIndex)},l.prototype.getAllDataInfo=function(){var t=this,e=this.injector.get(s.HttpClient),a=this.editorParams.relativePath||"",n=this.editorParams.source||"be";return e.get("/api/dev/main/v1.0/mdservice/unionmdlist?path="+a+"&pageIndex=1&pageSize=1000&metadataTypeList=."+n,{headers:new s.HttpHeaders({"Content-Type":"application/json"}),responseType:"json"}).subscribe(function(e){t.reinvokeInterface(e),t.beAllData=o.cloneDeep(t.getFormData(e,"all")),t.beAllDataCopy=o.cloneDeep(t.beAllData)})},l.prototype.getRecentDataInfo=function(){var t=this,e=this.injector.get(s.HttpClient),a=this.editorParams.relativePath||"",n="path="+a,a="/"==a[0]?a.split("/")[1]:a.split("/")[0],i=this.editorParams.source||"be",a="noCode"==this.envType?"appId="+a:n;return e.get("/api/dev/main/v1.0/mdservice/getmdrecentuse?"+a+"&metadataTypeList=."+i,{headers:new s.HttpHeaders({"Content-Type":"application/json"}),responseType:"json"}).subscribe(function(e){t.beRecentData=o.cloneDeep(t.getFormData(e,"recent")),t.beRecentData&&t.beRecentData.length&&(t.showRecommandData(),t.getUniqueData(t.beData))})},l.prototype.getRecommandDataInfo=function(){var t=this,e=this.editorParams.range||"Bo",a=this.injector.get(s.HttpClient),n=this.editorParams.relativePath||"",i=this.editorParams.source||"be";return a.get("/api/dev/main/v1.0/mdservice/metadataListIn"+e+"?path="+n+"&metadataTypeList=."+i,{headers:new s.HttpHeaders({"Content-Type":"application/json"}),responseType:"json"}).subscribe(function(e){t.beRecommandData=o.cloneDeep(t.getFormData(e,"local")),t.beRecommandData&&t.beRecommandData.length&&(t.showRecommandData(),t.getUniqueData(t.beData))})},l.prototype.getFormData=function(e,a){var n=[],e=e.metadataIndexItems||e;return e&&e.forEach(function(e,t){t={id:t,name:e.name,label:e.code,source:e.nameSpace,hide:!1,active:!1,data:e,category:a};n.push(t)}),n},l.prototype.showRecommandData=function(){var t=this;this.selectedCommand=undefined,this.unfoldData(),this.chooseRecommand=!0,this.beData=[],this.foldRecent=!1,this.beRecommandData&&this.beRecommandData.length&&this.beRecommandData.forEach(function(e){t.beData.push(o.cloneDeep(e))}),this.beRecentData&&this.beRecentData.length&&this.beRecentData.forEach(function(e){t.beData.push(o.cloneDeep(e))}),this.getUniqueData(this.beData),this.beData=this.onSearchValueChanged(this.searchValue)},l.prototype.showAllData=function(){this.selectedCommand=undefined,this.unfoldData(),this.beData=o.cloneDeep(this.beAllData),this.chooseRecommand=!1,this.foldRecent=!1,this.beData=this.onSearchValueChanged(this.searchValue)},l.prototype.unfoldData=function(){this.foldLocal=!1,this.foldRecent=!1},l.prototype.handleSearchedValue=function(e){e=(e=e==undefined?"":e).originalEvent!=undefined?e.value||"":e,this.searchValue=e,this.supportPaging=""==this.searchValue;e=e.replaceAll(" ","").replaceAll(">","");return e=(e=""==e?" ":e).toLowerCase()},l.prototype.checkValueExists=function(e,t){var a=e.find(function(e){return"local"==e.category&&(e.name+" "+e.label+" "+e.source).toLowerCase().includes(t)}),n=e.find(function(e){return"recent"==e.category&&(e.name+" "+e.label+" "+e.source).toLowerCase().includes(t)}),e=e.find(function(e){return(e.name+" "+e.label+" "+e.source).toLowerCase().includes(t)});this.showLocal=!!a,this.showRecent=!!n,this.noRecommandData=!this.showLocal&&!this.showRecent,this.noAllData=!e},l.prototype.onSearchValueChanged=function(e){this.unfoldData();var a,t=this.chooseRecommand?this.beData:this.beAllDataCopy;return t&&(a=this.handleSearchedValue(e),this.checkValueExists(t,a),t.forEach(function(e){var t=(e.name+" "+e.label+" "+e.source).toLowerCase();e.hide=0==t.includes(a)})),this.beData=o.cloneDeep(t),this.beData},l.prototype.getBeDataItem=function(t){var a=this;this.beData.forEach(function(e){t.data.code==e.data.code?(e.active=!e.active,a.selectedCommand=o.cloneDeep(t)):e.active=!1})},l.prototype.clickConfirm=function(){var e,t,a,n,i=this;if(this.selectedCommand&&this.selectedCommand.active)return e=this.injector.get(s.HttpClient),t="/api/dev/main/v1.0/mdservice/pickMetadata?currentPath="+(this.editorParams.relativePath||""),a=this.selectedCommand.data,n={headers:new s.HttpHeaders({"Content-Type":"application/json"})},e.post(t,a,n).subscribe(function(e){e.metadata.processMode="interpretation"===i.selectedCommand.data.processMode?"interpretation":"general",i.submitModal.emit(e)});switch(this.editorParams.source){case"be":this.notifyService.info("未选择业务实体");break;case"vo":this.notifyService.info("未选择视图对象");break;case"qo":this.notifyService.info("未选择查询对象");break;case"webcmp":this.notifyService.info("未选择Web构件");default:this.notifyService.info("未选择元数据")}return null},l.prototype.onClear=function(){this.unfoldData(),this.beData=this.onSearchValueChanged("")},l.prototype.clickCancel=function(){this.closeModal.emit()},l.prototype.foldInRecent=function(){this.foldRecent=!this.foldRecent;var e=o.cloneDeep(this.beData);e&&(e.forEach(function(e){"recent"==e.category&&(e.hide=!e.hide)}),this.beData=o.cloneDeep(e))},l.prototype.foldInLocal=function(){this.foldLocal=!this.foldLocal;var e=o.cloneDeep(this.beData);e&&(e.forEach(function(e){"local"==e.category&&(e.hide=!e.hide)}),this.beData=o.cloneDeep(e))},l.prototype.getUniqueData=function(e){if(e){for(var t=o.cloneDeep(e),a=0;a<t.length;a++)for(var n=a+1;n<t.length;n++)t[a].id==t[n].id&&(t.splice(n,1),n--);e=o.cloneDeep(t)}return e},l.prototype.reinvokeInterface=function(e){var t=this;if(e.page){var a,n,i,e=e.page.total||0;if(1e3<e)return a=this.injector.get(s.HttpClient),n=this.editorParams.relativePath||"",i=this.editorParams.source||"be",a.get("/api/dev/main/v1.0/mdservice/unionmdlist?path="+n+"&pageIndex=1&pageSize="+e+"&metadataTypeList=."+i,{headers:new s.HttpHeaders({"Content-Type":"application/json"}),responseType:"json"}).subscribe(function(e){t.beAllData=o.cloneDeep(t.getFormData(e,"all")),t.beAllDataCopy=o.cloneDeep(t.beAllData)})}},l.decorators=[{type:a.Component,args:[{selector:"farris-appNavigationBe",template:'<div class="f-navBe">\n <div class="f-navBe-header">\n <div class="f-navBe-recent" (click)="showRecommandData()">\n <div [ngClass]="{\'f-navBe-recent-text-focus\':chooseRecommand,\'f-navBe-recent-text\':!chooseRecommand}">\n 推荐</div>\n </div>\n <div class="f-navBe-allData" (click)="showAllData()">\n <div [ngClass]="{\'f-navBe-allData-text-focus\':!chooseRecommand,\'f-navBe-allData-text\':chooseRecommand}">\n 全部</div>\n </div>\n <div class="f-navBe-remainder">\n <div class="f-navBe-search">\n <input-group [groupText]="groupIcon" [(value)]="searchValue"\n (clickHandle)="onSearchValueChanged($event)" (valueChange)="onSearchValueChanged($event)"\n (clear)="onClear()" placeholder="请输入名称/编号搜索" style="font-size:2px;"></input-group>\n </div>\n </div>\n </div>\n <div class="f-navBe-content" *ngIf="chooseRecommand && !noRecommandData">\n <div class="f-navBe-content-recent" *ngIf="chooseRecommand && !recentFoldIn">\n <div class="f-navBe-recentHeader" *ngIf="showRecent" (click)="foldInRecent()">\n <div *ngIf="foldRecent" class="f-icon f-icon-arrow-60-right"\n style="color:#6E7088;font-size:12px;margin:0px 7px 0 0;"></div>\n <div *ngIf="!foldRecent" class="f-icon f-icon-arrow-60-down"\n style="color:#6E7088;font-size:12px;margin:0px 7px 0 0;"></div>\n <div class="f-navBe-recommandLabel">最近使用</div>\n </div>\n <ng-container *ngFor="let beDataItem of beData">\n <ng-container *ngIf="!beDataItem.hide && beDataItem.category == \'recent\'">\n <div [ngClass]="{\'f-navBe-item\':!beDataItem.active,\'f-navBe-item-active\':beDataItem.active}"\n (click)="getBeDataItem(beDataItem)">\n <div class="f-navBe-itemIcon">\n <div class="f-icon f-icon-window"\n style="color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 1px;">\n </div>\n </div>\n <div class="f-navBe-name">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class="f-navBe-source">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n <div class="f-navBe-content-local" *ngIf="chooseRecommand && !localFoldIn">\n <div class="f-navBe-localHeader" *ngIf="showLocal" (click)="foldInLocal()">\n <div *ngIf="foldLocal" class="f-icon f-icon-arrow-60-right"\n style="color:#6E7088;font-size:12px;margin:0px 7px 0 0;"></div>\n <div *ngIf="!foldLocal" class="f-icon f-icon-arrow-60-down"\n style="color:#6E7088;font-size:12px;margin:0px 7px 0 0;"></div>\n <div class="f-navBe-recommandLabel">本地元数据</div>\n </div>\n <ng-container *ngFor="let beDataItem of beData">\n <ng-container *ngIf="!beDataItem.hide && beDataItem.category == \'local\'">\n <div [ngClass]="{\'f-navBe-item\':!beDataItem.active,\'f-navBe-item-active\':beDataItem.active}"\n (click)="getBeDataItem(beDataItem)">\n <div class="f-navBe-itemIcon">\n <div class="f-icon f-icon-window"\n style="color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 1px;">\n </div>\n </div>\n <div class="f-navBe-name">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class="f-navBe-source">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n \x3c!-- 推荐没有数据时的显示内容--\x3e\n <div class="f-navBe-content1"\n style="width: 100%; min-width: 400px; height: 50%; display: flex;justify-content: center;align-items: center;"\n *ngIf="chooseRecommand && noRecommandData">\n <div> 未查询到符合条件的数据 </div>\n </div>\n <div class="f-navBe-content2" *ngIf="!chooseRecommand && !noAllData">\n <div *ngFor="let beDataItem of (supportPaging ? (beData | paginate: paginationOptions) : beData)">\n <ng-container *ngIf="!beDataItem.hide">\n <div [ngClass]="{\'f-navBe-item\':!beDataItem.active,\'f-navBe-item-active\':beDataItem.active}"\n (click)="getBeDataItem(beDataItem)">\n <div class="f-navBe-itemIcon">\n <div class="f-icon f-icon-window"\n style="color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 0px;">\n </div>\n </div>\n <div class="f-navBe-name">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class="f-navBe-source">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </div>\n <div *ngIf="supportPaging" class="f-navBe-content2-paging">\n <pagination-controls #pager [id]="paginationOptions?.id" [maxSize]="pagerLabelSize" [directionLinks]="true"\n [autoHide]="false" [responsive]="true" [previousLabel]="\' \'" [nextLabel]="\' \'"\n [showPageInfo]="showPageInfo" [showPageNumber]="showPageNumber" [showPageList]="showPageList"\n (pageChange)="onPageChange($event)">\n </pagination-controls>\n </div>\n </div>\n \x3c!-- 全部没有数据时的显示内容--\x3e\n <div class="f-navBe-content3"\n style="width: 100%; min-width: 400px; height: 50%; display: flex; justify-content:center; align-items:center; "\n *ngIf="!chooseRecommand && noAllData">\n <div> 未查询到符合条件的数据 </div>\n </div>\n</div>\n\x3c!-- 底部区域 --\x3e\n<div class="f-page-bottom">\n <div class="f-page-button">\n <div class="f-page-cancel-btn" (click)="clickCancel()">\n <span class="textCancel">取消</span>\n </div>\n <div class="f-page-sure-btn" (click)="clickConfirm()">\n <span class="textSure">确定</span>\n </div>\n </div>\n</div>',styles:[":host{overflow:hidden;position:absolute;top:0;left:0;right:0;bottom:0}.f-page-bottom{margin-top:0;height:60px;width:100%;border:1px solid #dee1ea;background-color:#fff;z-index:2000;bottom:0;left:0;position:absolute;display:flex;justify-content:flex-end;align-items:center}.f-page-button{float:right;width:175px;display:flex}.f-page-cancel-btn{width:72px;height:32px;background:#fff;border:1px solid #d8dce6;box-shadow:0 1px 0 0 rgb(0 0 0 / 4%);border-radius:3px;margin-right:14px;text-align:center;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.f-page-sure-btn{width:72px;height:32px;display:flex;background:#2a87ff;border-radius:3px;text-align:center;cursor:pointer;align-items:center;justify-content:center;flex-wrap:wrap}.textCancel{font-family:PingFangSC-Regular;font-size:13px;color:#2d2f33}.textSure{font-family:PingFangSC-Regular;font-size:13px;color:#fff}.f-navBe{background-color:#fff;height:100%}.f-navBe-header{display:flex;min-width:400px;width:100%;height:44px;align-items:center;border:1px solid #e5e9ef;background:#f9f9fc;position:absolute;top:0;z-index:2}.f-navBe-allData{flex:2;text-align:center;display:flex;justify-content:center;align-items:center}.f-navBe-allData-text{width:32px;height:44px;font-family:PingFangSC-Medium;font-size:16px;color:#2d2f33;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-allData-text-focus{width:32px;height:44px;color:#2a87ff;border-bottom:3px solid #00f;font-family:PingFangSC-Medium;font-size:16px;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-recent{flex:2;text-align:center;display:flex;justify-content:center;align-items:center}.f-navBe-recent-text{width:32px;height:44px;font-family:PingFangSC-Medium;font-size:16px;color:#2d2f33;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-recent-text-focus{width:32px;height:44px;color:#2a87ff;border-bottom:3px solid #00f;font-family:PingFangSC-Medium;font-size:16px;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-remainder{flex:12}.f-navBe-search{width:220px;height:26.6px;background:#fff;border-radius:6px;float:right;margin-right:40px}.f-navBe-content{width:100%;min-width:400px;overflow:scroll;height:calc(100% - 50px)}.f-navBe-content2{width:100%;min-width:400px;margin-top:44px;height:calc(100% - 130px);overflow:scroll}.f-navBe-content2-paging{position:absolute;bottom:55px;right:50px}.f-navBe-content-recent{width:100%;min-width:400px;margin-top:44px}.f-navBe-content-local{width:100%;min-width:400px}.f-navBe-recommandLabel{height:18px;font-family:PingFangSC-Regular;font-size:13px;color:#3d4c6b;font-weight:400;cursor:pointer}.f-navBe-localHeader,.f-navBe-recentHeader{height:32px;background:#fafaff;width:100%;display:flex;align-items:center;padding-left:10px;cursor:pointer;border:1px solid rgba(233,236,243,1)}.f-navBe-item{height:62px;padding:15px 0 8px 18px;border:1px solid #e5e9ef}.f-navBe-item:hover{background-color:#edf5fc!important;cursor:pointer}.f-navBe-item-active{height:62px;padding:15px 0 8px 18px;border:1px solid #e5e9ef;background-color:#edf5fc!important;cursor:pointer}.f-navBe-itemIcon{width:16px;height:16px;padding:1px;margin-right:6px;background-color:#dcf4e8;display:inline-block}.f-navBe-name{width:80%;height:18px;font-family:PingFangSC-Regular;font-size:13px;color:#2d2f33;font-weight:400;overflow:hidden;display:inline-block;vertical-align:top}.f-navBe-source{width:100%;height:17px;font-family:PingFangSC-Regular;font-size:12px;color:#949ba7;font-weight:400}"]}]}],l.ctorParameters=function(){return[{type:a.Injector},{type:t.NotifyService}]},l.propDecorators={editorParams:[{type:a.Input}],closeModal:[{type:a.Output}],submitModal:[{type:a.Output}],modalFooter:[{type:a.ViewChild,args:["footer"]}]};var c=l;function l(e,t){this.injector=e,this.notifyService=t,this.closeModal=new a.EventEmitter,this.submitModal=new a.EventEmitter,this.groupIcon='<span class="k-icon k-i-search"></span>',this.chooseRecommand=!0,this.recentFoldIn=!1,this.localFoldIn=!1,this.relativePath="",this.isDeisgnerEnv=!0,this.foldLocal=!1,this.foldRecent=!1,this.pagerOnServer=!1,this.pageList=[20,50,100],this.pageIndex=1,this.pageSize=20,this.pagerHeight=56,this.showPageList=!1,this.showPageInfo=!0,this.showPageNumber=!0,this.pagerLabelSize=7,this.total=0,this.supportPaging=!0,this.modalConfig={title:"选择业务实体",width:900,height:500,resizable:!0,showButtons:!1,showMaxButton:!1,minWidth:650,minHeight:300},this.showLocal=!0,this.showRecent=!0,this.noRecommandData=!1,this.noAllData=!1,this.paginationOptions={id:"Farris-beMetadata-Pagination_",itemsPerPage:this.pageSize,currentPage:this.pageIndex,pageList:this.pageList,totalItems:this.total,remote:this.pagerOnServer}}d.decorators=[{type:a.NgModule,args:[{declarations:[c],imports:[n.CommonModule,i.InputGroupModule,s.HttpClientModule,r.PaginationModule],exports:[c]}]}];n=d;function d(){}e.AppNavigationBeComponent=c,e.AppNavigationBeModule=n,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash-es"),require("@farris/ui-notify"),require("rxjs/operators"),require("@farris/ui-loading"),require("@farris/ui-messager"),require("rxjs"),require("@angular/core"),require("@angular/common"),require("@farris/ui-input-group"),require("@angular/common/http"),require("@farris/ui-pagination")):"function"==typeof define&&define.amd?define("@farris/app-navigation-be",["exports","lodash-es","@farris/ui-notify","rxjs/operators","@farris/ui-loading","@farris/ui-messager","rxjs","@angular/core","@angular/common","@farris/ui-input-group","@angular/common/http","@farris/ui-pagination"],t):t((e.farris=e.farris||{},e.farris["app-navigation-be"]={}),e.lodashEs,e.uiNotify,e.rxjs.operators,e.uiLoading,e.uiMessager,e.rxjs,e.ng.core,e.ng.common,e.uiInputGroup,e.ng.common.http,e.uiPagination)}(this,function(e,s,t,r,a,n,c,i,o,l,d,p){"use strict";f.prototype.ngOnInit=function(){this.beData=[],this.modalConfig=this.editorParams.modalConfig||this.modalConfig,this.envType=this.editorParams.envType||"designer",this.getAllDataInfo(),this.getRecentDataInfo(),this.getRecommandDataInfo(),this.chooseRecommand=!0,this.onSearchValueChanged("")},f.prototype.onPageChange=function(e){this.pageIndex!==e.pageIndex&&(this.pageIndex=e.pageIndex,this.paginationOptions.currentPage=e.pageIndex)},f.prototype.getAllDataInfo=function(){var t,a=this,e=(this.loadingService&&(t=this.loadingService.show({container:"body",message:"加载中,请稍候..."})),this.injector.get(d.HttpClient)),n=this.editorParams.relativePath||"",i=this.editorParams.source||"be";return e.get("/api/dev/main/v1.0/mdservice/unionmdlist?path="+n+"&pageIndex=1&pageSize=1000&metadataTypeList=."+i,{headers:new d.HttpHeaders({"Content-Type":"application/json"}),responseType:"json"}).pipe(r.tap(function(e){a.loadingService&&t.close(),a.reinvokeInterface(e),a.beAllData=s.cloneDeep(a.getFormData(e,"all")),a.beAllDataCopy=s.cloneDeep(a.beAllData)}),r.catchError(function(e){return a.loadingService&&t.close(),e&&a.messageService&&a.messageService.exception(e),c.EMPTY})).subscribe()},f.prototype.getRecentDataInfo=function(){var t,a=this,e=(this.loadingService&&(t=this.loadingService.show({container:"body",message:"加载中,请稍候..."})),this.injector.get(d.HttpClient)),n=this.editorParams.relativePath||"",i="path="+n,n="/"==n[0]?n.split("/")[1]:n.split("/")[0],o=this.editorParams.source||"be",n="noCode"==this.envType?"appId="+n:i;return e.get("/api/dev/main/v1.0/mdservice/getmdrecentuse?"+n+"&metadataTypeList=."+o,{headers:new d.HttpHeaders({"Content-Type":"application/json"}),responseType:"json"}).pipe(r.tap(function(e){a.loadingService&&t.close(),a.beRecentData=s.cloneDeep(a.getFormData(e,"recent")),a.beRecentData&&a.beRecentData.length&&(a.showRecommandData(),a.getUniqueData(a.beData))}),r.catchError(function(e){return a.loadingService&&t.close(),e&&a.messageService&&a.messageService.exception(e),c.EMPTY})).subscribe()},f.prototype.getRecommandDataInfo=function(){var t,a=this,e=(this.loadingService&&(t=this.loadingService.show({container:"body",message:"加载中,请稍候..."})),this.editorParams.range||"Bo"),n=this.injector.get(d.HttpClient),i=this.editorParams.relativePath||"",o=this.editorParams.source||"be";return n.get("/api/dev/main/v1.0/mdservice/metadataListIn"+e+"?path="+i+"&metadataTypeList=."+o,{headers:new d.HttpHeaders({"Content-Type":"application/json"}),responseType:"json"}).pipe(r.tap(function(e){a.loadingService&&t.close(),a.beRecommandData=s.cloneDeep(a.getFormData(e,"local")),a.beRecommandData&&a.beRecommandData.length&&(a.showRecommandData(),a.getUniqueData(a.beData))}),r.catchError(function(e){return a.loadingService&&t.close(),e&&a.messageService&&a.messageService.exception(e),c.EMPTY})).subscribe()},f.prototype.getFormData=function(e,a){var n=[],e=e.metadataIndexItems||e;return e&&e.forEach(function(e,t){t={id:t,name:e.name,label:e.code,source:e.nameSpace,hide:!1,active:!1,data:e,category:a};n.push(t)}),n},f.prototype.showRecommandData=function(){var t=this;this.selectedCommand=undefined,this.unfoldData(),this.chooseRecommand=!0,this.beData=[],this.foldRecent=!1,this.beRecommandData&&this.beRecommandData.length&&this.beRecommandData.forEach(function(e){t.beData.push(s.cloneDeep(e))}),this.beRecentData&&this.beRecentData.length&&this.beRecentData.forEach(function(e){t.beData.push(s.cloneDeep(e))}),this.getUniqueData(this.beData),this.beData=this.onSearchValueChanged(this.searchValue)},f.prototype.showAllData=function(){this.selectedCommand=undefined,this.unfoldData(),this.beData=s.cloneDeep(this.beAllData),this.chooseRecommand=!1,this.foldRecent=!1,this.beData=this.onSearchValueChanged(this.searchValue)},f.prototype.unfoldData=function(){this.foldLocal=!1,this.foldRecent=!1},f.prototype.handleSearchedValue=function(e){e=(e=e==undefined?"":e).originalEvent!=undefined?e.value||"":e,this.searchValue=e,this.supportPaging=""==this.searchValue;e=e.replace(/ /g,"").replace(/>/g,"");return e=(e=""==e?" ":e).toLowerCase()},f.prototype.checkValueExists=function(e,t){var a=e.find(function(e){return"local"==e.category&&(e.name+" "+e.label+" "+e.source).toLowerCase().includes(t)}),n=e.find(function(e){return"recent"==e.category&&(e.name+" "+e.label+" "+e.source).toLowerCase().includes(t)}),e=e.find(function(e){return(e.name+" "+e.label+" "+e.source).toLowerCase().includes(t)});this.showLocal=!!a,this.showRecent=!!n,this.noRecommandData=!this.showLocal&&!this.showRecent,this.noAllData=!e},f.prototype.onSearchValueChanged=function(e){this.unfoldData();var a,t=this.chooseRecommand?this.beData:this.beAllDataCopy;return t&&(a=this.handleSearchedValue(e),this.checkValueExists(t,a),t.forEach(function(e){var t=(e.name+" "+e.label+" "+e.source).toLowerCase();e.hide=0==t.includes(a)})),this.beData=s.cloneDeep(t),this.beData},f.prototype.getBeDataItem=function(t){var a=this;this.beData.forEach(function(e){t.data.code==e.data.code&&t.data.nameSpace==e.data.nameSpace?(e.active=!e.active,a.selectedCommand=s.cloneDeep(t)):e.active=!1})},f.prototype.clickConfirm=function(){var t,e,a,n,i=this;if(this.selectedCommand&&this.selectedCommand.active)return this.loadingService&&(t=this.loadingService.show({container:"body",message:"加载中,请稍候..."})),e=this.injector.get(d.HttpClient),o="/api/dev/main/v1.0/mdservice/pickMetadata?currentPath="+(this.editorParams.relativePath||""),a=this.selectedCommand.data,n={headers:new d.HttpHeaders({"Content-Type":"application/json"})},e.post(o,a,n).pipe(r.tap(function(e){i.loadingService&&t.close(),e.metadata.processMode="interpretation"===i.selectedCommand.data.processMode?"interpretation":"general",i.submitModal.emit(e)}),r.catchError(function(e){return i.loadingService&&t.close(),e&&e.error&&i.messageService&&i.messageService.exception(e.error),c.EMPTY})).subscribe();var o=this.editorParams.source;if(this.notifyService)switch(o){case"be":this.notifyService.info("未选择业务实体");break;case"vo":this.notifyService.info("未选择视图对象");break;case"qo":this.notifyService.info("未选择查询对象");break;case"webcmp":this.notifyService.info("未选择Web构件");break;default:this.notifyService.info("未选择元数据")}return null},f.prototype.onClear=function(){this.unfoldData(),this.beData=this.onSearchValueChanged("")},f.prototype.clickCancel=function(){this.closeModal.emit()},f.prototype.foldInRecent=function(){var e,a;this.beData&&(this.foldRecent=!this.foldRecent,(e=this.chooseRecommand?this.beData:this.beAllDataCopy)&&(a=this.handleSearchedValue(this.searchValue),e.forEach(function(e){var t;"recent"==e.category&&(t=(e.name+" "+e.label+" "+e.source).toLowerCase(),e.hide=1==t.includes(a)?!e.hide:e.hide)}),this.beData=s.cloneDeep(e)))},f.prototype.foldInLocal=function(){var e,a;this.beData&&(this.foldLocal=!this.foldLocal,(e=this.chooseRecommand?this.beData:this.beAllDataCopy)&&(a=this.handleSearchedValue(this.searchValue),e.forEach(function(e){var t;"local"==e.category&&(t=(e.name+" "+e.label+" "+e.source).toLowerCase(),e.hide=1==t.includes(a)?!e.hide:e.hide)}),this.beData=s.cloneDeep(e)))},f.prototype.getUniqueData=function(e){if(e){for(var t=s.cloneDeep(e),a=0;a<t.length;a++)for(var n=a+1;n<t.length;n++)t[a].id==t[n].id&&(t.splice(n,1),n--);e=s.cloneDeep(t)}return e},f.prototype.reinvokeInterface=function(e){var t=this;if(e.page){var a,n,i,o,e=e.page.total||0;if(1e3<e)return this.loadingService&&(a=this.loadingService.show({container:"body",message:"加载中,请稍候..."})),n=this.injector.get(d.HttpClient),i=this.editorParams.relativePath||"",o=this.editorParams.source||"be",n.get("/api/dev/main/v1.0/mdservice/unionmdlist?path="+i+"&pageIndex=1&pageSize="+e+"&metadataTypeList=."+o,{headers:new d.HttpHeaders({"Content-Type":"application/json"}),responseType:"json"}).pipe(r.tap(function(e){t.loadingService&&a.close(),t.beAllData=s.cloneDeep(t.getFormData(e,"all")),t.beAllDataCopy=s.cloneDeep(t.beAllData)}),r.catchError(function(e){return t.loadingService&&a.close(),e&&e.error&&t.messageService&&t.messageService.exception(e.error),c.EMPTY})).subscribe()}},f.decorators=[{type:i.Component,args:[{selector:"farris-appNavigationBe",template:'<div class="f-navBe">\n <div class="f-navBe-header">\n <div class="f-navBe-recent" (click)="showRecommandData()">\n <div [ngClass]="{\'f-navBe-recent-text-focus\':chooseRecommand,\'f-navBe-recent-text\':!chooseRecommand}">\n 推荐</div>\n </div>\n <div class="f-navBe-allData" (click)="showAllData()">\n <div [ngClass]="{\'f-navBe-allData-text-focus\':!chooseRecommand,\'f-navBe-allData-text\':chooseRecommand}">\n 全部</div>\n </div>\n <div class="f-navBe-remainder">\n <div class="f-navBe-search">\n <input-group [groupText]="groupIcon" [(value)]="searchValue"\n (clickHandle)="onSearchValueChanged($event)" (valueChange)="onSearchValueChanged($event)"\n (clear)="onClear()" placeholder="请输入名称/编号搜索" style="font-size:2px;"></input-group>\n </div>\n </div>\n </div>\n <div class="f-navBe-content" *ngIf="chooseRecommand && !noRecommandData">\n <div class="f-navBe-content-recent" *ngIf="chooseRecommand && !recentFoldIn">\n <div class="f-navBe-recentHeader" *ngIf="showRecent" (click)="foldInRecent()">\n <div *ngIf="foldRecent" class="f-icon f-icon-arrow-60-right"\n style="color:#6E7088;font-size:12px;margin:0px 7px 0 0;"></div>\n <div *ngIf="!foldRecent" class="f-icon f-icon-arrow-60-down"\n style="color:#6E7088;font-size:12px;margin:0px 7px 0 0;"></div>\n <div class="f-navBe-recommandLabel">最近使用</div>\n </div>\n <ng-container *ngFor="let beDataItem of beData">\n <ng-container *ngIf="!beDataItem.hide && beDataItem.category == \'recent\'">\n <div [ngClass]="{\'f-navBe-item\':!beDataItem.active,\'f-navBe-item-active\':beDataItem.active}"\n (click)="getBeDataItem(beDataItem)">\n <div class="f-navBe-itemIcon">\n <div class="f-icon f-icon-window"\n style="color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 1px;">\n </div>\n </div>\n <div class="f-navBe-name">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class="f-navBe-source">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n <div class="f-navBe-content-local" *ngIf="chooseRecommand && !localFoldIn">\n <div class="f-navBe-localHeader" *ngIf="showLocal" (click)="foldInLocal()">\n <div *ngIf="foldLocal" class="f-icon f-icon-arrow-60-right"\n style="color:#6E7088;font-size:12px;margin:0px 7px 0 0;"></div>\n <div *ngIf="!foldLocal" class="f-icon f-icon-arrow-60-down"\n style="color:#6E7088;font-size:12px;margin:0px 7px 0 0;"></div>\n <div class="f-navBe-recommandLabel">本地元数据</div>\n </div>\n <ng-container *ngFor="let beDataItem of beData">\n <ng-container *ngIf="!beDataItem.hide && beDataItem.category == \'local\'">\n <div [ngClass]="{\'f-navBe-item\':!beDataItem.active,\'f-navBe-item-active\':beDataItem.active}"\n (click)="getBeDataItem(beDataItem)">\n <div class="f-navBe-itemIcon">\n <div class="f-icon f-icon-window"\n style="color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 1px;">\n </div>\n </div>\n <div class="f-navBe-name">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class="f-navBe-source">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n \x3c!-- 推荐没有数据时的显示内容--\x3e\n <div class="f-navBe-content1"\n style="width: 100%; min-width: 400px; height: 50%; display: flex;justify-content: center;align-items: center;"\n *ngIf="chooseRecommand && noRecommandData">\n <div> 未查询到符合条件的数据 </div>\n </div>\n <div class="f-navBe-content2" *ngIf="!chooseRecommand && !noAllData">\n <div *ngFor="let beDataItem of (supportPaging ? (beData | paginate: paginationOptions) : beData)">\n <ng-container *ngIf="!beDataItem.hide">\n <div [ngClass]="{\'f-navBe-item\':!beDataItem.active,\'f-navBe-item-active\':beDataItem.active}"\n (click)="getBeDataItem(beDataItem)">\n <div class="f-navBe-itemIcon">\n <div class="f-icon f-icon-window"\n style="color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 0px;">\n </div>\n </div>\n <div class="f-navBe-name">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class="f-navBe-source">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </div>\n <div *ngIf="supportPaging" class="f-navBe-content2-paging">\n <pagination-controls #pager [id]="paginationOptions?.id" [maxSize]="pagerLabelSize" [directionLinks]="true"\n [autoHide]="false" [responsive]="true" [previousLabel]="\' \'" [nextLabel]="\' \'"\n [showPageInfo]="showPageInfo" [showPageNumber]="showPageNumber" [showPageList]="showPageList"\n (pageChange)="onPageChange($event)">\n </pagination-controls>\n </div>\n </div>\n \x3c!-- 全部没有数据时的显示内容--\x3e\n <div class="f-navBe-content3"\n style="width: 100%; min-width: 400px; height: 50%; display: flex; justify-content:center; align-items:center; "\n *ngIf="!chooseRecommand && noAllData">\n <div> 未查询到符合条件的数据 </div>\n </div>\n</div>\n\x3c!-- 底部区域 --\x3e\n<div class="f-page-bottom">\n <div class="f-page-button">\n <div class="f-page-cancel-btn" (click)="clickCancel()">\n <span class="textCancel">取消</span>\n </div>\n <div class="f-page-sure-btn" (click)="clickConfirm()">\n <span class="textSure">确定</span>\n </div>\n </div>\n</div>',styles:[":host{overflow:hidden;position:absolute;top:0;left:0;right:0;bottom:0}.f-page-bottom{margin-top:0;height:60px;width:100%;border:1px solid #dee1ea;background-color:#fff;z-index:2000;bottom:0;left:0;position:absolute;display:flex;justify-content:flex-end;align-items:center}.f-page-button{float:right;width:175px;display:flex}.f-page-cancel-btn{width:72px;height:32px;background:#fff;border:1px solid #d8dce6;box-shadow:0 1px 0 0 rgb(0 0 0 / 4%);border-radius:3px;margin-right:14px;text-align:center;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.f-page-sure-btn{width:72px;height:32px;display:flex;background:#2a87ff;border-radius:3px;text-align:center;cursor:pointer;align-items:center;justify-content:center;flex-wrap:wrap}.textCancel{font-family:PingFangSC-Regular;font-size:13px;color:#2d2f33}.textSure{font-family:PingFangSC-Regular;font-size:13px;color:#fff}.f-navBe{background-color:#fff;height:100%}.f-navBe-header{display:flex;min-width:400px;width:100%;height:44px;align-items:center;border:1px solid #e5e9ef;background:#f9f9fc;position:absolute;top:0;z-index:2}.f-navBe-allData{flex:2;text-align:center;display:flex;justify-content:center;align-items:center}.f-navBe-allData-text{width:32px;height:44px;font-family:PingFangSC-Medium;font-size:16px;color:#2d2f33;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-allData-text-focus{width:32px;height:44px;color:#2a87ff;border-bottom:3px solid #00f;font-family:PingFangSC-Medium;font-size:16px;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-recent{flex:2;text-align:center;display:flex;justify-content:center;align-items:center}.f-navBe-recent-text{width:32px;height:44px;font-family:PingFangSC-Medium;font-size:16px;color:#2d2f33;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-recent-text-focus{width:32px;height:44px;color:#2a87ff;border-bottom:3px solid #00f;font-family:PingFangSC-Medium;font-size:16px;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-remainder{flex:12}.f-navBe-search{width:220px;height:26.6px;background:#fff;border-radius:6px;float:right;margin-right:40px}.f-navBe-content{width:100%;min-width:400px;overflow:scroll;height:calc(100% - 50px)}.f-navBe-content2{width:100%;min-width:400px;margin-top:44px;height:calc(100% - 130px);overflow:scroll}.f-navBe-content2-paging{position:absolute;bottom:55px;right:50px}.f-navBe-content-recent{width:100%;min-width:400px;margin-top:44px}.f-navBe-content-local{width:100%;min-width:400px}.f-navBe-recommandLabel{height:18px;font-family:PingFangSC-Regular;font-size:13px;color:#3d4c6b;font-weight:400;cursor:pointer}.f-navBe-localHeader,.f-navBe-recentHeader{height:32px;background:#fafaff;width:100%;display:flex;align-items:center;padding-left:10px;cursor:pointer;border:1px solid rgba(233,236,243,1)}.f-navBe-item{height:62px;padding:15px 0 8px 18px;border:1px solid #e5e9ef}.f-navBe-item:hover{background-color:#edf5fc!important;cursor:pointer}.f-navBe-item-active{height:62px;padding:15px 0 8px 18px;border:1px solid #e5e9ef;background-color:#edf5fc!important;cursor:pointer}.f-navBe-itemIcon{width:16px;height:16px;padding:1px;margin-right:6px;background-color:#dcf4e8;display:inline-block}.f-navBe-name{width:80%;height:18px;font-family:PingFangSC-Regular;font-size:13px;color:#2d2f33;font-weight:400;overflow:hidden;display:inline-block;vertical-align:top}.f-navBe-source{width:100%;height:17px;font-family:PingFangSC-Regular;font-size:12px;color:#949ba7;font-weight:400}"]}]}],f.ctorParameters=function(){return[{type:i.Injector},{type:t.NotifyService},{type:a.LoadingService},{type:n.MessagerService}]},f.propDecorators={editorParams:[{type:i.Input}],closeModal:[{type:i.Output}],submitModal:[{type:i.Output}],modalFooter:[{type:i.ViewChild,args:["footer"]}]};var h=f;function f(e,t,a,n){this.injector=e,this.notifyService=t,this.loadingService=a,this.messageService=n,this.closeModal=new i.EventEmitter,this.submitModal=new i.EventEmitter,this.groupIcon='<span class="k-icon k-i-search"></span>',this.chooseRecommand=!0,this.recentFoldIn=!1,this.localFoldIn=!1,this.relativePath="",this.isDeisgnerEnv=!0,this.foldLocal=!1,this.foldRecent=!1,this.pagerOnServer=!1,this.pageList=[20,50,100],this.pageIndex=1,this.pageSize=20,this.pagerHeight=56,this.showPageList=!1,this.showPageInfo=!0,this.showPageNumber=!0,this.pagerLabelSize=7,this.total=0,this.supportPaging=!0,this.modalConfig={title:"选择业务实体",width:900,height:500,resizable:!0,showButtons:!1,showMaxButton:!1,minWidth:650,minHeight:300},this.showLocal=!0,this.showRecent=!0,this.noRecommandData=!1,this.noAllData=!1,this.paginationOptions={id:"Farris-beMetadata-Pagination_",itemsPerPage:this.pageSize,currentPage:this.pageIndex,pageList:this.pageList,totalItems:this.total,remote:this.pagerOnServer}}g.decorators=[{type:i.NgModule,args:[{declarations:[h],imports:[o.CommonModule,l.InputGroupModule,d.HttpClientModule,p.PaginationModule],exports:[h]}]}];o=g;function g(){}e.AppNavigationBeComponent=h,e.AppNavigationBeModule=o,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=farris-app-navigation-be.umd.min.js.map |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"AppNavigationBeComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"farris-appNavigationBe","template":"<div class=\"f-navBe\">\n <div class=\"f-navBe-header\">\n <div class=\"f-navBe-recent\" (click)=\"showRecommandData()\">\n <div [ngClass]=\"{'f-navBe-recent-text-focus':chooseRecommand,'f-navBe-recent-text':!chooseRecommand}\">\n 推荐</div>\n </div>\n <div class=\"f-navBe-allData\" (click)=\"showAllData()\">\n <div [ngClass]=\"{'f-navBe-allData-text-focus':!chooseRecommand,'f-navBe-allData-text':chooseRecommand}\">\n 全部</div>\n </div>\n <div class=\"f-navBe-remainder\">\n <div class=\"f-navBe-search\">\n <input-group [groupText]=\"groupIcon\" [(value)]=\"searchValue\"\n (clickHandle)=\"onSearchValueChanged($event)\" (valueChange)=\"onSearchValueChanged($event)\"\n (clear)=\"onClear()\" placeholder=\"请输入名称/编号搜索\" style=\"font-size:2px;\"></input-group>\n </div>\n </div>\n </div>\n <div class=\"f-navBe-content\" *ngIf=\"chooseRecommand && !noRecommandData\">\n <div class=\"f-navBe-content-recent\" *ngIf=\"chooseRecommand && !recentFoldIn\">\n <div class=\"f-navBe-recentHeader\" *ngIf=\"showRecent\" (click)=\"foldInRecent()\">\n <div *ngIf=\"foldRecent\" class=\"f-icon f-icon-arrow-60-right\"\n style=\"color:#6E7088;font-size:12px;margin:0px 7px 0 0;\"></div>\n <div *ngIf=\"!foldRecent\" class=\"f-icon f-icon-arrow-60-down\"\n style=\"color:#6E7088;font-size:12px;margin:0px 7px 0 0;\"></div>\n <div class=\"f-navBe-recommandLabel\">最近使用</div>\n </div>\n <ng-container *ngFor=\"let beDataItem of beData\">\n <ng-container *ngIf=\"!beDataItem.hide && beDataItem.category == 'recent'\">\n <div [ngClass]=\"{'f-navBe-item':!beDataItem.active,'f-navBe-item-active':beDataItem.active}\"\n (click)=\"getBeDataItem(beDataItem)\">\n <div class=\"f-navBe-itemIcon\">\n <div class=\"f-icon f-icon-window\"\n style=\"color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 1px;\">\n </div>\n </div>\n <div class=\"f-navBe-name\">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class=\"f-navBe-source\">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n <div class=\"f-navBe-content-local\" *ngIf=\"chooseRecommand && !localFoldIn\">\n <div class=\"f-navBe-localHeader\" *ngIf=\"showLocal\" (click)=\"foldInLocal()\">\n <div *ngIf=\"foldLocal\" class=\"f-icon f-icon-arrow-60-right\"\n style=\"color:#6E7088;font-size:12px;margin:0px 7px 0 0;\"></div>\n <div *ngIf=\"!foldLocal\" class=\"f-icon f-icon-arrow-60-down\"\n style=\"color:#6E7088;font-size:12px;margin:0px 7px 0 0;\"></div>\n <div class=\"f-navBe-recommandLabel\">本地元数据</div>\n </div>\n <ng-container *ngFor=\"let beDataItem of beData\">\n <ng-container *ngIf=\"!beDataItem.hide && beDataItem.category == 'local'\">\n <div [ngClass]=\"{'f-navBe-item':!beDataItem.active,'f-navBe-item-active':beDataItem.active}\"\n (click)=\"getBeDataItem(beDataItem)\">\n <div class=\"f-navBe-itemIcon\">\n <div class=\"f-icon f-icon-window\"\n style=\"color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 1px;\">\n </div>\n </div>\n <div class=\"f-navBe-name\">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class=\"f-navBe-source\">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <!-- 推荐没有数据时的显示内容-->\n <div class=\"f-navBe-content1\"\n style=\"width: 100%; min-width: 400px; height: 50%; display: flex;justify-content: center;align-items: center;\"\n *ngIf=\"chooseRecommand && noRecommandData\">\n <div> 未查询到符合条件的数据 </div>\n </div>\n <div class=\"f-navBe-content2\" *ngIf=\"!chooseRecommand && !noAllData\">\n <div *ngFor=\"let beDataItem of (supportPaging ? (beData | paginate: paginationOptions) : beData)\">\n <ng-container *ngIf=\"!beDataItem.hide\">\n <div [ngClass]=\"{'f-navBe-item':!beDataItem.active,'f-navBe-item-active':beDataItem.active}\"\n (click)=\"getBeDataItem(beDataItem)\">\n <div class=\"f-navBe-itemIcon\">\n <div class=\"f-icon f-icon-window\"\n style=\"color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 0px;\">\n </div>\n </div>\n <div class=\"f-navBe-name\">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class=\"f-navBe-source\">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </div>\n <div *ngIf=\"supportPaging\" class=\"f-navBe-content2-paging\">\n <pagination-controls #pager [id]=\"paginationOptions?.id\" [maxSize]=\"pagerLabelSize\" [directionLinks]=\"true\"\n [autoHide]=\"false\" [responsive]=\"true\" [previousLabel]=\"' '\" [nextLabel]=\"' '\"\n [showPageInfo]=\"showPageInfo\" [showPageNumber]=\"showPageNumber\" [showPageList]=\"showPageList\"\n (pageChange)=\"onPageChange($event)\">\n </pagination-controls>\n </div>\n </div>\n <!-- 全部没有数据时的显示内容-->\n <div class=\"f-navBe-content3\"\n style=\"width: 100%; min-width: 400px; height: 50%; display: flex; justify-content:center; align-items:center; \"\n *ngIf=\"!chooseRecommand && noAllData\">\n <div> 未查询到符合条件的数据 </div>\n </div>\n</div>\n<!-- 底部区域 -->\n<div class=\"f-page-bottom\">\n <div class=\"f-page-button\">\n <div class=\"f-page-cancel-btn\" (click)=\"clickCancel()\">\n <span class=\"textCancel\">取消</span>\n </div>\n <div class=\"f-page-sure-btn\" (click)=\"clickConfirm()\">\n <span class=\"textSure\">确定</span>\n </div>\n </div>\n</div>","styles":[":host{overflow:hidden;position:absolute;top:0;left:0;right:0;bottom:0}.f-page-bottom{margin-top:0;height:60px;width:100%;border:1px solid #dee1ea;background-color:#fff;z-index:2000;bottom:0;left:0;position:absolute;display:flex;justify-content:flex-end;align-items:center}.f-page-button{float:right;width:175px;display:flex}.f-page-cancel-btn{width:72px;height:32px;background:#fff;border:1px solid #d8dce6;box-shadow:0 1px 0 0 rgb(0 0 0 / 4%);border-radius:3px;margin-right:14px;text-align:center;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.f-page-sure-btn{width:72px;height:32px;display:flex;background:#2a87ff;border-radius:3px;text-align:center;cursor:pointer;align-items:center;justify-content:center;flex-wrap:wrap}.textCancel{font-family:PingFangSC-Regular;font-size:13px;color:#2d2f33}.textSure{font-family:PingFangSC-Regular;font-size:13px;color:#fff}.f-navBe{background-color:#fff;height:100%}.f-navBe-header{display:flex;min-width:400px;width:100%;height:44px;align-items:center;border:1px solid #e5e9ef;background:#f9f9fc;position:absolute;top:0;z-index:2}.f-navBe-allData{flex:2;text-align:center;display:flex;justify-content:center;align-items:center}.f-navBe-allData-text{width:32px;height:44px;font-family:PingFangSC-Medium;font-size:16px;color:#2d2f33;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-allData-text-focus{width:32px;height:44px;color:#2a87ff;border-bottom:3px solid #00f;font-family:PingFangSC-Medium;font-size:16px;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-recent{flex:2;text-align:center;display:flex;justify-content:center;align-items:center}.f-navBe-recent-text{width:32px;height:44px;font-family:PingFangSC-Medium;font-size:16px;color:#2d2f33;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-recent-text-focus{width:32px;height:44px;color:#2a87ff;border-bottom:3px solid #00f;font-family:PingFangSC-Medium;font-size:16px;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-remainder{flex:12}.f-navBe-search{width:220px;height:26.6px;background:#fff;border-radius:6px;float:right;margin-right:40px}.f-navBe-content{width:100%;min-width:400px;overflow:scroll;height:calc(100% - 50px)}.f-navBe-content2{width:100%;min-width:400px;margin-top:44px;height:calc(100% - 130px);overflow:scroll}.f-navBe-content2-paging{position:absolute;bottom:55px;right:50px}.f-navBe-content-recent{width:100%;min-width:400px;margin-top:44px}.f-navBe-content-local{width:100%;min-width:400px}.f-navBe-recommandLabel{height:18px;font-family:PingFangSC-Regular;font-size:13px;color:#3d4c6b;font-weight:400;cursor:pointer}.f-navBe-localHeader,.f-navBe-recentHeader{height:32px;background:#fafaff;width:100%;display:flex;align-items:center;padding-left:10px;cursor:pointer;border:1px solid rgba(233,236,243,1)}.f-navBe-item{height:62px;padding:15px 0 8px 18px;border:1px solid #e5e9ef}.f-navBe-item:hover{background-color:#edf5fc!important;cursor:pointer}.f-navBe-item-active{height:62px;padding:15px 0 8px 18px;border:1px solid #e5e9ef;background-color:#edf5fc!important;cursor:pointer}.f-navBe-itemIcon{width:16px;height:16px;padding:1px;margin-right:6px;background-color:#dcf4e8;display:inline-block}.f-navBe-name{width:80%;height:18px;font-family:PingFangSC-Regular;font-size:13px;color:#2d2f33;font-weight:400;overflow:hidden;display:inline-block;vertical-align:top}.f-navBe-source{width:100%;height:17px;font-family:PingFangSC-Regular;font-size:12px;color:#949ba7;font-weight:400}"]}]}],"members":{"editorParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"closeModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":15,"character":3}}]}],"submitModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":17,"character":3}}]}],"modalFooter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":18,"character":3},"arguments":["footer"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":103,"character":21},{"__symbolic":"reference","module":"@farris/ui-notify","name":"NotifyService","line":104,"character":27}]}],"ngOnInit":[{"__symbolic":"method"}],"onPageChange":[{"__symbolic":"method"}],"getAllDataInfo":[{"__symbolic":"method"}],"getRecentDataInfo":[{"__symbolic":"method"}],"getRecommandDataInfo":[{"__symbolic":"method"}],"getFormData":[{"__symbolic":"method"}],"showRecommandData":[{"__symbolic":"method"}],"showAllData":[{"__symbolic":"method"}],"unfoldData":[{"__symbolic":"method"}],"handleSearchedValue":[{"__symbolic":"method"}],"checkValueExists":[{"__symbolic":"method"}],"onSearchValueChanged":[{"__symbolic":"method"}],"getBeDataItem":[{"__symbolic":"method"}],"clickConfirm":[{"__symbolic":"method"}],"onClear":[{"__symbolic":"method"}],"clickCancel":[{"__symbolic":"method"}],"foldInRecent":[{"__symbolic":"method"}],"foldInLocal":[{"__symbolic":"method"}],"getUniqueData":[{"__symbolic":"method"}],"reinvokeInterface":[{"__symbolic":"method"}]}},"AppNavigationBeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"AppNavigationBeComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":10,"character":4},{"__symbolic":"reference","module":"@farris/ui-input-group","name":"InputGroupModule","line":11,"character":4},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":12,"character":4},{"__symbolic":"reference","module":"@farris/ui-pagination","name":"PaginationModule","line":13,"character":4}],"exports":[{"__symbolic":"reference","name":"AppNavigationBeComponent"}]}]}],"members":{}}},"origins":{"AppNavigationBeComponent":"./lib/app-navigation-be.component","AppNavigationBeModule":"./lib/app-navigation-be.module"},"importAs":"@farris/app-navigation-be"} | ||
{"__symbolic":"module","version":4,"metadata":{"AppNavigationBeComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"farris-appNavigationBe","template":"<div class=\"f-navBe\">\n <div class=\"f-navBe-header\">\n <div class=\"f-navBe-recent\" (click)=\"showRecommandData()\">\n <div [ngClass]=\"{'f-navBe-recent-text-focus':chooseRecommand,'f-navBe-recent-text':!chooseRecommand}\">\n 推荐</div>\n </div>\n <div class=\"f-navBe-allData\" (click)=\"showAllData()\">\n <div [ngClass]=\"{'f-navBe-allData-text-focus':!chooseRecommand,'f-navBe-allData-text':chooseRecommand}\">\n 全部</div>\n </div>\n <div class=\"f-navBe-remainder\">\n <div class=\"f-navBe-search\">\n <input-group [groupText]=\"groupIcon\" [(value)]=\"searchValue\"\n (clickHandle)=\"onSearchValueChanged($event)\" (valueChange)=\"onSearchValueChanged($event)\"\n (clear)=\"onClear()\" placeholder=\"请输入名称/编号搜索\" style=\"font-size:2px;\"></input-group>\n </div>\n </div>\n </div>\n <div class=\"f-navBe-content\" *ngIf=\"chooseRecommand && !noRecommandData\">\n <div class=\"f-navBe-content-recent\" *ngIf=\"chooseRecommand && !recentFoldIn\">\n <div class=\"f-navBe-recentHeader\" *ngIf=\"showRecent\" (click)=\"foldInRecent()\">\n <div *ngIf=\"foldRecent\" class=\"f-icon f-icon-arrow-60-right\"\n style=\"color:#6E7088;font-size:12px;margin:0px 7px 0 0;\"></div>\n <div *ngIf=\"!foldRecent\" class=\"f-icon f-icon-arrow-60-down\"\n style=\"color:#6E7088;font-size:12px;margin:0px 7px 0 0;\"></div>\n <div class=\"f-navBe-recommandLabel\">最近使用</div>\n </div>\n <ng-container *ngFor=\"let beDataItem of beData\">\n <ng-container *ngIf=\"!beDataItem.hide && beDataItem.category == 'recent'\">\n <div [ngClass]=\"{'f-navBe-item':!beDataItem.active,'f-navBe-item-active':beDataItem.active}\"\n (click)=\"getBeDataItem(beDataItem)\">\n <div class=\"f-navBe-itemIcon\">\n <div class=\"f-icon f-icon-window\"\n style=\"color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 1px;\">\n </div>\n </div>\n <div class=\"f-navBe-name\">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class=\"f-navBe-source\">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n <div class=\"f-navBe-content-local\" *ngIf=\"chooseRecommand && !localFoldIn\">\n <div class=\"f-navBe-localHeader\" *ngIf=\"showLocal\" (click)=\"foldInLocal()\">\n <div *ngIf=\"foldLocal\" class=\"f-icon f-icon-arrow-60-right\"\n style=\"color:#6E7088;font-size:12px;margin:0px 7px 0 0;\"></div>\n <div *ngIf=\"!foldLocal\" class=\"f-icon f-icon-arrow-60-down\"\n style=\"color:#6E7088;font-size:12px;margin:0px 7px 0 0;\"></div>\n <div class=\"f-navBe-recommandLabel\">本地元数据</div>\n </div>\n <ng-container *ngFor=\"let beDataItem of beData\">\n <ng-container *ngIf=\"!beDataItem.hide && beDataItem.category == 'local'\">\n <div [ngClass]=\"{'f-navBe-item':!beDataItem.active,'f-navBe-item-active':beDataItem.active}\"\n (click)=\"getBeDataItem(beDataItem)\">\n <div class=\"f-navBe-itemIcon\">\n <div class=\"f-icon f-icon-window\"\n style=\"color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 1px;\">\n </div>\n </div>\n <div class=\"f-navBe-name\">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class=\"f-navBe-source\">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <!-- 推荐没有数据时的显示内容-->\n <div class=\"f-navBe-content1\"\n style=\"width: 100%; min-width: 400px; height: 50%; display: flex;justify-content: center;align-items: center;\"\n *ngIf=\"chooseRecommand && noRecommandData\">\n <div> 未查询到符合条件的数据 </div>\n </div>\n <div class=\"f-navBe-content2\" *ngIf=\"!chooseRecommand && !noAllData\">\n <div *ngFor=\"let beDataItem of (supportPaging ? (beData | paginate: paginationOptions) : beData)\">\n <ng-container *ngIf=\"!beDataItem.hide\">\n <div [ngClass]=\"{'f-navBe-item':!beDataItem.active,'f-navBe-item-active':beDataItem.active}\"\n (click)=\"getBeDataItem(beDataItem)\">\n <div class=\"f-navBe-itemIcon\">\n <div class=\"f-icon f-icon-window\"\n style=\"color:#2BA85E;font-size:13px; width: 12px;height: 12px;padding: 0px 0px 2px 0px;\">\n </div>\n </div>\n <div class=\"f-navBe-name\">{{beDataItem.name}} ({{beDataItem.label}})</div>\n <div class=\"f-navBe-source\">{{beDataItem.source}}</div>\n </div>\n </ng-container>\n </div>\n <div *ngIf=\"supportPaging\" class=\"f-navBe-content2-paging\">\n <pagination-controls #pager [id]=\"paginationOptions?.id\" [maxSize]=\"pagerLabelSize\" [directionLinks]=\"true\"\n [autoHide]=\"false\" [responsive]=\"true\" [previousLabel]=\"' '\" [nextLabel]=\"' '\"\n [showPageInfo]=\"showPageInfo\" [showPageNumber]=\"showPageNumber\" [showPageList]=\"showPageList\"\n (pageChange)=\"onPageChange($event)\">\n </pagination-controls>\n </div>\n </div>\n <!-- 全部没有数据时的显示内容-->\n <div class=\"f-navBe-content3\"\n style=\"width: 100%; min-width: 400px; height: 50%; display: flex; justify-content:center; align-items:center; \"\n *ngIf=\"!chooseRecommand && noAllData\">\n <div> 未查询到符合条件的数据 </div>\n </div>\n</div>\n<!-- 底部区域 -->\n<div class=\"f-page-bottom\">\n <div class=\"f-page-button\">\n <div class=\"f-page-cancel-btn\" (click)=\"clickCancel()\">\n <span class=\"textCancel\">取消</span>\n </div>\n <div class=\"f-page-sure-btn\" (click)=\"clickConfirm()\">\n <span class=\"textSure\">确定</span>\n </div>\n </div>\n</div>","styles":[":host{overflow:hidden;position:absolute;top:0;left:0;right:0;bottom:0}.f-page-bottom{margin-top:0;height:60px;width:100%;border:1px solid #dee1ea;background-color:#fff;z-index:2000;bottom:0;left:0;position:absolute;display:flex;justify-content:flex-end;align-items:center}.f-page-button{float:right;width:175px;display:flex}.f-page-cancel-btn{width:72px;height:32px;background:#fff;border:1px solid #d8dce6;box-shadow:0 1px 0 0 rgb(0 0 0 / 4%);border-radius:3px;margin-right:14px;text-align:center;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.f-page-sure-btn{width:72px;height:32px;display:flex;background:#2a87ff;border-radius:3px;text-align:center;cursor:pointer;align-items:center;justify-content:center;flex-wrap:wrap}.textCancel{font-family:PingFangSC-Regular;font-size:13px;color:#2d2f33}.textSure{font-family:PingFangSC-Regular;font-size:13px;color:#fff}.f-navBe{background-color:#fff;height:100%}.f-navBe-header{display:flex;min-width:400px;width:100%;height:44px;align-items:center;border:1px solid #e5e9ef;background:#f9f9fc;position:absolute;top:0;z-index:2}.f-navBe-allData{flex:2;text-align:center;display:flex;justify-content:center;align-items:center}.f-navBe-allData-text{width:32px;height:44px;font-family:PingFangSC-Medium;font-size:16px;color:#2d2f33;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-allData-text-focus{width:32px;height:44px;color:#2a87ff;border-bottom:3px solid #00f;font-family:PingFangSC-Medium;font-size:16px;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-recent{flex:2;text-align:center;display:flex;justify-content:center;align-items:center}.f-navBe-recent-text{width:32px;height:44px;font-family:PingFangSC-Medium;font-size:16px;color:#2d2f33;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-recent-text-focus{width:32px;height:44px;color:#2a87ff;border-bottom:3px solid #00f;font-family:PingFangSC-Medium;font-size:16px;font-weight:500;padding-top:12px;cursor:pointer}.f-navBe-remainder{flex:12}.f-navBe-search{width:220px;height:26.6px;background:#fff;border-radius:6px;float:right;margin-right:40px}.f-navBe-content{width:100%;min-width:400px;overflow:scroll;height:calc(100% - 50px)}.f-navBe-content2{width:100%;min-width:400px;margin-top:44px;height:calc(100% - 130px);overflow:scroll}.f-navBe-content2-paging{position:absolute;bottom:55px;right:50px}.f-navBe-content-recent{width:100%;min-width:400px;margin-top:44px}.f-navBe-content-local{width:100%;min-width:400px}.f-navBe-recommandLabel{height:18px;font-family:PingFangSC-Regular;font-size:13px;color:#3d4c6b;font-weight:400;cursor:pointer}.f-navBe-localHeader,.f-navBe-recentHeader{height:32px;background:#fafaff;width:100%;display:flex;align-items:center;padding-left:10px;cursor:pointer;border:1px solid rgba(233,236,243,1)}.f-navBe-item{height:62px;padding:15px 0 8px 18px;border:1px solid #e5e9ef}.f-navBe-item:hover{background-color:#edf5fc!important;cursor:pointer}.f-navBe-item-active{height:62px;padding:15px 0 8px 18px;border:1px solid #e5e9ef;background-color:#edf5fc!important;cursor:pointer}.f-navBe-itemIcon{width:16px;height:16px;padding:1px;margin-right:6px;background-color:#dcf4e8;display:inline-block}.f-navBe-name{width:80%;height:18px;font-family:PingFangSC-Regular;font-size:13px;color:#2d2f33;font-weight:400;overflow:hidden;display:inline-block;vertical-align:top}.f-navBe-source{width:100%;height:17px;font-family:PingFangSC-Regular;font-size:12px;color:#949ba7;font-weight:400}"]}]}],"members":{"editorParams":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"closeModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":20,"character":3}}]}],"submitModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":3}}]}],"modalFooter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":23,"character":3},"arguments":["footer"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":110,"character":21},{"__symbolic":"reference","module":"@farris/ui-notify","name":"NotifyService","line":111,"character":27},{"__symbolic":"reference","module":"@farris/ui-loading","name":"LoadingService","line":112,"character":28},{"__symbolic":"reference","module":"@farris/ui-messager","name":"MessagerService","line":113,"character":28}]}],"ngOnInit":[{"__symbolic":"method"}],"onPageChange":[{"__symbolic":"method"}],"getAllDataInfo":[{"__symbolic":"method"}],"getRecentDataInfo":[{"__symbolic":"method"}],"getRecommandDataInfo":[{"__symbolic":"method"}],"getFormData":[{"__symbolic":"method"}],"showRecommandData":[{"__symbolic":"method"}],"showAllData":[{"__symbolic":"method"}],"unfoldData":[{"__symbolic":"method"}],"handleSearchedValue":[{"__symbolic":"method"}],"checkValueExists":[{"__symbolic":"method"}],"onSearchValueChanged":[{"__symbolic":"method"}],"getBeDataItem":[{"__symbolic":"method"}],"clickConfirm":[{"__symbolic":"method"}],"onClear":[{"__symbolic":"method"}],"clickCancel":[{"__symbolic":"method"}],"foldInRecent":[{"__symbolic":"method"}],"foldInLocal":[{"__symbolic":"method"}],"getUniqueData":[{"__symbolic":"method"}],"reinvokeInterface":[{"__symbolic":"method"}]}},"AppNavigationBeModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"AppNavigationBeComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":10,"character":4},{"__symbolic":"reference","module":"@farris/ui-input-group","name":"InputGroupModule","line":11,"character":4},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":12,"character":4},{"__symbolic":"reference","module":"@farris/ui-pagination","name":"PaginationModule","line":13,"character":4}],"exports":[{"__symbolic":"reference","name":"AppNavigationBeComponent"}]}]}],"members":{}}},"origins":{"AppNavigationBeComponent":"./lib/app-navigation-be.component","AppNavigationBeModule":"./lib/app-navigation-be.module"},"importAs":"@farris/app-navigation-be"} |
import { cloneDeep } from 'lodash-es'; | ||
import { NotifyService } from '@farris/ui-notify'; | ||
import { tap, catchError } from 'rxjs/operators'; | ||
import { LoadingService } from '@farris/ui-loading'; | ||
import { MessagerService } from '@farris/ui-messager'; | ||
import { EMPTY } from 'rxjs'; | ||
import { Component, Output, EventEmitter, Input, Injector, ViewChild, NgModule } from '@angular/core'; | ||
@@ -14,2 +18,3 @@ import { CommonModule } from '@angular/common'; | ||
*/ | ||
// import { timer } from 'rxjs'; | ||
class AppNavigationBeComponent { | ||
@@ -19,6 +24,10 @@ /** | ||
* @param {?} notifyService | ||
* @param {?} loadingService | ||
* @param {?} messageService | ||
*/ | ||
constructor(injector, notifyService) { | ||
constructor(injector, notifyService, loadingService, messageService) { | ||
this.injector = injector; | ||
this.notifyService = notifyService; | ||
this.loadingService = loadingService; | ||
this.messageService = messageService; | ||
// 模态框关闭 | ||
@@ -126,2 +135,3 @@ this.closeModal = new EventEmitter(); | ||
this.noAllData = false; | ||
// public loading: boolean = false; | ||
this.paginationOptions = { | ||
@@ -165,2 +175,7 @@ id: 'Farris-beMetadata-Pagination_', | ||
/** @type {?} */ | ||
let loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
const http = this.injector.get(HttpClient); | ||
@@ -176,3 +191,4 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe((/** | ||
}) | ||
.pipe(tap((/** | ||
* @param {?} data | ||
@@ -182,6 +198,22 @@ * @return {?} | ||
data => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
this.reinvokeInterface(data); | ||
this.beAllData = cloneDeep(this.getFormData(data, 'all')); | ||
this.beAllDataCopy = cloneDeep(this.beAllData); | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
err => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && this.messageService) { | ||
this.messageService.exception((/** @type {?} */ (err))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
// return timer(5000).pipe(switchMap(() => httpRequest)).subscribe(); | ||
} | ||
@@ -194,2 +226,7 @@ /** | ||
/** @type {?} */ | ||
let loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
const http = this.injector.get(HttpClient); | ||
@@ -212,3 +249,3 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe((/** | ||
}).pipe(tap((/** | ||
* @param {?} data | ||
@@ -218,2 +255,5 @@ * @return {?} | ||
data => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
this.beRecentData = cloneDeep(this.getFormData(data, 'recent')); | ||
@@ -226,3 +266,16 @@ if (this.beRecentData) { | ||
} | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
err => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && this.messageService) { | ||
this.messageService.exception((/** @type {?} */ (err))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
// return timer(5000).pipe(switchMap(() => httpRequest)).subscribe(); | ||
} | ||
@@ -235,2 +288,7 @@ /** | ||
/** @type {?} */ | ||
let loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
const range = this.editorParams.range || 'Bo'; | ||
@@ -247,3 +305,3 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe((/** | ||
}).pipe(tap((/** | ||
* @param {?} data | ||
@@ -253,2 +311,5 @@ * @return {?} | ||
data => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
this.beRecommandData = cloneDeep(this.getFormData(data, 'local')); | ||
@@ -261,3 +322,16 @@ if (this.beRecommandData) { | ||
} | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
err => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && this.messageService) { | ||
this.messageService.exception((/** @type {?} */ (err))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
// return timer(5000).pipe(switchMap(() => httpRequest)).subscribe(); | ||
} | ||
@@ -364,3 +438,3 @@ /** | ||
/** @type {?} */ | ||
let value = searchValue.replaceAll(' ', '').replaceAll('>', ''); | ||
let value = searchValue.replace(/ /g, '').replace(/>/g, ''); | ||
value = value == '' ? ' ' : value; | ||
@@ -445,3 +519,3 @@ value = value.toLowerCase(); | ||
beDataItem => { | ||
if (selectedBeDataItem.data.code == beDataItem.data.code) { | ||
if (selectedBeDataItem.data.code == beDataItem.data.code && selectedBeDataItem.data.nameSpace == beDataItem.data.nameSpace) { | ||
beDataItem.active = !beDataItem.active; | ||
@@ -462,2 +536,7 @@ this.selectedCommand = cloneDeep(selectedBeDataItem); | ||
/** @type {?} */ | ||
let loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
const http = this.injector.get(HttpClient); | ||
@@ -474,3 +553,4 @@ /** @type {?} */ | ||
}; | ||
return http.post(path, body, headerOption).subscribe((/** | ||
return http.post(path, body, headerOption) | ||
.pipe(tap((/** | ||
* @param {?} data | ||
@@ -480,5 +560,20 @@ * @return {?} | ||
data => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
data['metadata']['processMode'] = this.selectedCommand.data['processMode'] === 'interpretation' ? 'interpretation' : 'general'; | ||
this.submitModal.emit(data); | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
err => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && err.error && this.messageService) { | ||
this.messageService.exception((/** @type {?} */ (err.error))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
} | ||
@@ -488,17 +583,20 @@ else { | ||
const source = this.editorParams.source; | ||
switch (source) { | ||
case 'be': | ||
this.notifyService['info']('未选择业务实体'); | ||
break; | ||
case 'vo': | ||
this.notifyService['info']('未选择视图对象'); | ||
break; | ||
case 'qo': | ||
this.notifyService['info']('未选择查询对象'); | ||
break; | ||
case 'webcmp': | ||
this.notifyService['info']('未选择Web构件'); | ||
default: | ||
this.notifyService['info']('未选择元数据'); | ||
break; | ||
if (this.notifyService) { | ||
switch (source) { | ||
case 'be': | ||
this.notifyService['info']('未选择业务实体'); | ||
break; | ||
case 'vo': | ||
this.notifyService['info']('未选择视图对象'); | ||
break; | ||
case 'qo': | ||
this.notifyService['info']('未选择查询对象'); | ||
break; | ||
case 'webcmp': | ||
this.notifyService['info']('未选择Web构件'); | ||
break; | ||
default: | ||
this.notifyService['info']('未选择元数据'); | ||
break; | ||
} | ||
} | ||
@@ -526,16 +624,24 @@ return null; | ||
foldInRecent() { | ||
this.foldRecent = !this.foldRecent; | ||
/** @type {?} */ | ||
const beData = cloneDeep(this.beData); | ||
if (beData) { | ||
beData.forEach((/** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/ | ||
beDataItem => { | ||
if (beDataItem.category == 'recent') { | ||
beDataItem.hide = !beDataItem.hide; | ||
} | ||
})); | ||
this.beData = cloneDeep(beData); | ||
if (this.beData) { | ||
this.foldRecent = !this.foldRecent; | ||
/** @type {?} */ | ||
const searchedData = this.chooseRecommand ? this.beData : this.beAllDataCopy; | ||
if (searchedData) { | ||
/** @type {?} */ | ||
const value = this.handleSearchedValue(this.searchValue); | ||
searchedData.forEach((/** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/ | ||
beDataItem => { | ||
if (beDataItem.category == 'recent') { | ||
/** @type {?} */ | ||
let combinedString = `${beDataItem.name} ${beDataItem.label} ${beDataItem.source}`; | ||
/** @type {?} */ | ||
const selectedItem = combinedString.toLowerCase(); | ||
beDataItem.hide = selectedItem.includes(value) == true ? !beDataItem.hide : beDataItem.hide; | ||
} | ||
})); | ||
this.beData = cloneDeep(searchedData); | ||
} | ||
} | ||
@@ -547,16 +653,25 @@ } | ||
foldInLocal() { | ||
this.foldLocal = !this.foldLocal; | ||
/** @type {?} */ | ||
const beData = cloneDeep(this.beData); | ||
if (beData) { | ||
beData.forEach((/** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/ | ||
beDataItem => { | ||
if (beDataItem.category == 'local') { | ||
beDataItem.hide = !beDataItem.hide; | ||
} | ||
})); | ||
this.beData = cloneDeep(beData); | ||
if (this.beData) { | ||
this.foldLocal = !this.foldLocal; | ||
/** @type {?} */ | ||
const searchedData = this.chooseRecommand ? this.beData : this.beAllDataCopy; | ||
if (searchedData) { | ||
/** @type {?} */ | ||
const value = this.handleSearchedValue(this.searchValue); | ||
// 某一个分类下的搜索项为空的情况下,则不显示该项; | ||
searchedData.forEach((/** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/ | ||
beDataItem => { | ||
if (beDataItem.category == 'local') { | ||
/** @type {?} */ | ||
let combinedString = `${beDataItem.name} ${beDataItem.label} ${beDataItem.source}`; | ||
/** @type {?} */ | ||
const selectedItem = combinedString.toLowerCase(); | ||
beDataItem.hide = selectedItem.includes(value) == true ? !beDataItem.hide : beDataItem.hide; | ||
} | ||
})); | ||
this.beData = cloneDeep(searchedData); | ||
} | ||
} | ||
@@ -596,2 +711,7 @@ } | ||
/** @type {?} */ | ||
let loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
const http = this.injector.get(HttpClient); | ||
@@ -605,3 +725,3 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe((/** | ||
}).pipe(tap((/** | ||
* @param {?} data | ||
@@ -611,5 +731,20 @@ * @return {?} | ||
data => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
this.beAllData = cloneDeep(this.getFormData(data, 'all')); | ||
this.beAllDataCopy = cloneDeep(this.beAllData); | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
err => { | ||
if (this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && err.error && this.messageService) { | ||
this.messageService.exception((/** @type {?} */ (err.error))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
} | ||
@@ -629,3 +764,5 @@ } | ||
{ type: Injector }, | ||
{ type: NotifyService } | ||
{ type: NotifyService }, | ||
{ type: LoadingService }, | ||
{ type: MessagerService } | ||
]; | ||
@@ -632,0 +769,0 @@ AppNavigationBeComponent.propDecorators = { |
import { cloneDeep } from 'lodash-es'; | ||
import { NotifyService } from '@farris/ui-notify'; | ||
import { tap, catchError } from 'rxjs/operators'; | ||
import { LoadingService } from '@farris/ui-loading'; | ||
import { MessagerService } from '@farris/ui-messager'; | ||
import { EMPTY } from 'rxjs'; | ||
import { Component, Output, EventEmitter, Input, Injector, ViewChild, NgModule } from '@angular/core'; | ||
@@ -14,6 +18,9 @@ import { CommonModule } from '@angular/common'; | ||
*/ | ||
// import { timer } from 'rxjs'; | ||
var AppNavigationBeComponent = /** @class */ (function () { | ||
function AppNavigationBeComponent(injector, notifyService) { | ||
function AppNavigationBeComponent(injector, notifyService, loadingService, messageService) { | ||
this.injector = injector; | ||
this.notifyService = notifyService; | ||
this.loadingService = loadingService; | ||
this.messageService = messageService; | ||
// 模态框关闭 | ||
@@ -121,2 +128,3 @@ this.closeModal = new EventEmitter(); | ||
this.noAllData = false; | ||
// public loading: boolean = false; | ||
this.paginationOptions = { | ||
@@ -175,2 +183,7 @@ id: 'Farris-beMetadata-Pagination_', | ||
/** @type {?} */ | ||
var loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var http = this.injector.get(HttpClient); | ||
@@ -186,3 +199,4 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe((/** | ||
}) | ||
.pipe(tap((/** | ||
* @param {?} data | ||
@@ -192,6 +206,22 @@ * @return {?} | ||
function (data) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
_this.reinvokeInterface(data); | ||
_this.beAllData = cloneDeep(_this.getFormData(data, 'all')); | ||
_this.beAllDataCopy = cloneDeep(_this.beAllData); | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
function (err) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && _this.messageService) { | ||
_this.messageService.exception((/** @type {?} */ (err))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
// return timer(5000).pipe(switchMap(() => httpRequest)).subscribe(); | ||
}; | ||
@@ -210,2 +240,7 @@ /** 获取最近数据 */ | ||
/** @type {?} */ | ||
var loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var http = this.injector.get(HttpClient); | ||
@@ -228,3 +263,3 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe((/** | ||
}).pipe(tap((/** | ||
* @param {?} data | ||
@@ -234,2 +269,5 @@ * @return {?} | ||
function (data) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
_this.beRecentData = cloneDeep(_this.getFormData(data, 'recent')); | ||
@@ -242,3 +280,16 @@ if (_this.beRecentData) { | ||
} | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
function (err) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && _this.messageService) { | ||
_this.messageService.exception((/** @type {?} */ (err))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
// return timer(5000).pipe(switchMap(() => httpRequest)).subscribe(); | ||
}; | ||
@@ -257,2 +308,7 @@ /** 获取推荐数据 */ | ||
/** @type {?} */ | ||
var loading; | ||
if (this.loadingService) { | ||
loading = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var range = this.editorParams.range || 'Bo'; | ||
@@ -269,3 +325,3 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe((/** | ||
}).pipe(tap((/** | ||
* @param {?} data | ||
@@ -275,2 +331,5 @@ * @return {?} | ||
function (data) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
_this.beRecommandData = cloneDeep(_this.getFormData(data, 'local')); | ||
@@ -283,3 +342,16 @@ if (_this.beRecommandData) { | ||
} | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
function (err) { | ||
if (_this.loadingService) { | ||
loading.close(); | ||
} | ||
if (err && _this.messageService) { | ||
_this.messageService.exception((/** @type {?} */ (err))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
// return timer(5000).pipe(switchMap(() => httpRequest)).subscribe(); | ||
}; | ||
@@ -419,3 +491,3 @@ /** 获取数据 */ | ||
/** @type {?} */ | ||
var value = searchValue.replaceAll(' ', '').replaceAll('>', ''); | ||
var value = searchValue.replace(/ /g, '').replace(/>/g, ''); | ||
value = value == '' ? ' ' : value; | ||
@@ -426,5 +498,5 @@ value = value.toLowerCase(); | ||
/** | ||
* 检测推荐中是否有值:包括本地元数据及最近 | ||
* @param searchedData | ||
*/ | ||
* 检测推荐中是否有值:包括本地元数据及最近 | ||
* @param searchedData | ||
*/ | ||
/** | ||
@@ -534,3 +606,3 @@ * 检测推荐中是否有值:包括本地元数据及最近 | ||
function (beDataItem) { | ||
if (selectedBeDataItem.data.code == beDataItem.data.code) { | ||
if (selectedBeDataItem.data.code == beDataItem.data.code && selectedBeDataItem.data.nameSpace == beDataItem.data.nameSpace) { | ||
beDataItem.active = !beDataItem.active; | ||
@@ -557,2 +629,7 @@ _this.selectedCommand = cloneDeep(selectedBeDataItem); | ||
/** @type {?} */ | ||
var loading_1; | ||
if (this.loadingService) { | ||
loading_1 = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var http = this.injector.get(HttpClient); | ||
@@ -569,3 +646,4 @@ /** @type {?} */ | ||
}; | ||
return http.post(path, body, headerOption).subscribe((/** | ||
return http.post(path, body, headerOption) | ||
.pipe(tap((/** | ||
* @param {?} data | ||
@@ -575,5 +653,20 @@ * @return {?} | ||
function (data) { | ||
if (_this.loadingService) { | ||
loading_1.close(); | ||
} | ||
data['metadata']['processMode'] = _this.selectedCommand.data['processMode'] === 'interpretation' ? 'interpretation' : 'general'; | ||
_this.submitModal.emit(data); | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
function (err) { | ||
if (_this.loadingService) { | ||
loading_1.close(); | ||
} | ||
if (err && err.error && _this.messageService) { | ||
_this.messageService.exception((/** @type {?} */ (err.error))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
} | ||
@@ -583,17 +676,20 @@ else { | ||
var source = this.editorParams.source; | ||
switch (source) { | ||
case 'be': | ||
this.notifyService['info']('未选择业务实体'); | ||
break; | ||
case 'vo': | ||
this.notifyService['info']('未选择视图对象'); | ||
break; | ||
case 'qo': | ||
this.notifyService['info']('未选择查询对象'); | ||
break; | ||
case 'webcmp': | ||
this.notifyService['info']('未选择Web构件'); | ||
default: | ||
this.notifyService['info']('未选择元数据'); | ||
break; | ||
if (this.notifyService) { | ||
switch (source) { | ||
case 'be': | ||
this.notifyService['info']('未选择业务实体'); | ||
break; | ||
case 'vo': | ||
this.notifyService['info']('未选择视图对象'); | ||
break; | ||
case 'qo': | ||
this.notifyService['info']('未选择查询对象'); | ||
break; | ||
case 'webcmp': | ||
this.notifyService['info']('未选择Web构件'); | ||
break; | ||
default: | ||
this.notifyService['info']('未选择元数据'); | ||
break; | ||
} | ||
} | ||
@@ -632,16 +728,24 @@ return null; | ||
function () { | ||
this.foldRecent = !this.foldRecent; | ||
/** @type {?} */ | ||
var beData = cloneDeep(this.beData); | ||
if (beData) { | ||
beData.forEach((/** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/ | ||
function (beDataItem) { | ||
if (beDataItem.category == 'recent') { | ||
beDataItem.hide = !beDataItem.hide; | ||
} | ||
})); | ||
this.beData = cloneDeep(beData); | ||
if (this.beData) { | ||
this.foldRecent = !this.foldRecent; | ||
/** @type {?} */ | ||
var searchedData = this.chooseRecommand ? this.beData : this.beAllDataCopy; | ||
if (searchedData) { | ||
/** @type {?} */ | ||
var value_2 = this.handleSearchedValue(this.searchValue); | ||
searchedData.forEach((/** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/ | ||
function (beDataItem) { | ||
if (beDataItem.category == 'recent') { | ||
/** @type {?} */ | ||
var combinedString = beDataItem.name + " " + beDataItem.label + " " + beDataItem.source; | ||
/** @type {?} */ | ||
var selectedItem = combinedString.toLowerCase(); | ||
beDataItem.hide = selectedItem.includes(value_2) == true ? !beDataItem.hide : beDataItem.hide; | ||
} | ||
})); | ||
this.beData = cloneDeep(searchedData); | ||
} | ||
} | ||
@@ -656,16 +760,25 @@ }; | ||
function () { | ||
this.foldLocal = !this.foldLocal; | ||
/** @type {?} */ | ||
var beData = cloneDeep(this.beData); | ||
if (beData) { | ||
beData.forEach((/** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/ | ||
function (beDataItem) { | ||
if (beDataItem.category == 'local') { | ||
beDataItem.hide = !beDataItem.hide; | ||
} | ||
})); | ||
this.beData = cloneDeep(beData); | ||
if (this.beData) { | ||
this.foldLocal = !this.foldLocal; | ||
/** @type {?} */ | ||
var searchedData = this.chooseRecommand ? this.beData : this.beAllDataCopy; | ||
if (searchedData) { | ||
/** @type {?} */ | ||
var value_3 = this.handleSearchedValue(this.searchValue); | ||
// 某一个分类下的搜索项为空的情况下,则不显示该项; | ||
searchedData.forEach((/** | ||
* @param {?} beDataItem | ||
* @return {?} | ||
*/ | ||
function (beDataItem) { | ||
if (beDataItem.category == 'local') { | ||
/** @type {?} */ | ||
var combinedString = beDataItem.name + " " + beDataItem.label + " " + beDataItem.source; | ||
/** @type {?} */ | ||
var selectedItem = combinedString.toLowerCase(); | ||
beDataItem.hide = selectedItem.includes(value_3) == true ? !beDataItem.hide : beDataItem.hide; | ||
} | ||
})); | ||
this.beData = cloneDeep(searchedData); | ||
} | ||
} | ||
@@ -718,2 +831,7 @@ }; | ||
/** @type {?} */ | ||
var loading_2; | ||
if (this.loadingService) { | ||
loading_2 = this.loadingService.show({ container: 'body', message: '加载中,请稍候...' }); | ||
} | ||
/** @type {?} */ | ||
var http = this.injector.get(HttpClient); | ||
@@ -727,3 +845,3 @@ /** @type {?} */ | ||
responseType: 'json' | ||
}).subscribe((/** | ||
}).pipe(tap((/** | ||
* @param {?} data | ||
@@ -733,5 +851,20 @@ * @return {?} | ||
function (data) { | ||
if (_this.loadingService) { | ||
loading_2.close(); | ||
} | ||
_this.beAllData = cloneDeep(_this.getFormData(data, 'all')); | ||
_this.beAllDataCopy = cloneDeep(_this.beAllData); | ||
})); | ||
})), catchError((/** | ||
* @param {?} err | ||
* @return {?} | ||
*/ | ||
function (err) { | ||
if (_this.loadingService) { | ||
loading_2.close(); | ||
} | ||
if (err && err.error && _this.messageService) { | ||
_this.messageService.exception((/** @type {?} */ (err.error))); | ||
} | ||
return EMPTY; | ||
}))).subscribe(); | ||
} | ||
@@ -750,3 +883,5 @@ } | ||
{ type: Injector }, | ||
{ type: NotifyService } | ||
{ type: NotifyService }, | ||
{ type: LoadingService }, | ||
{ type: MessagerService } | ||
]; }; | ||
@@ -753,0 +888,0 @@ AppNavigationBeComponent.propDecorators = { |
import { OnInit, EventEmitter, Injector, TemplateRef } from '@angular/core'; | ||
import { NotifyService } from '@farris/ui-notify'; | ||
import { LoadingService } from '@farris/ui-loading'; | ||
import { MessagerService } from '@farris/ui-messager'; | ||
export declare class AppNavigationBeComponent implements OnInit { | ||
injector: Injector; | ||
private notifyService; | ||
private loadingService; | ||
private messageService; | ||
/** 入参 */ | ||
@@ -89,3 +93,3 @@ editorParams: any; | ||
}; | ||
constructor(injector: Injector, notifyService: NotifyService); | ||
constructor(injector: Injector, notifyService: NotifyService, loadingService: LoadingService, messageService: MessagerService); | ||
ngOnInit(): void; | ||
@@ -118,5 +122,5 @@ onPageChange(page: { | ||
/** | ||
* 检测推荐中是否有值:包括本地元数据及最近 | ||
* @param searchedData | ||
*/ | ||
* 检测推荐中是否有值:包括本地元数据及最近 | ||
* @param searchedData | ||
*/ | ||
checkValueExists(searchedData: any, value: any): void; | ||
@@ -123,0 +127,0 @@ /** |
{ | ||
"name": "@farris/app-navigation-be", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public", |
@@ -23,3 +23,4 @@ ## 0.0.2 | ||
## 0.0.12 | ||
1. 修改按钮名称 | ||
## 0.0.12 & 0.0.13 | ||
1. 修改按钮名称 | ||
2. 增加 loading service/message service/notify service 验证条件 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
495264
5026
26