!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("ng-zorro-antd"),require("@angular/router"),require("@angular/forms"),require("rxjs"),require("@angular/common/http"),require("rxjs/operators"),require("ng-zorro-antd/drawer"),require("ng-zorro-antd/message"),require("ng-zorro-antd/modal"),require("lodash"),require("jquery"),require("date-fns/differenceInCalendarDays"),require("@angular/platform-browser"),require("viewerjs")):"function"==typeof define&&define.amd?define("@iboom/sailing-front",["exports","@angular/core","@angular/common","ng-zorro-antd","@angular/router","@angular/forms","rxjs","@angular/common/http","rxjs/operators","ng-zorro-antd/drawer","ng-zorro-antd/message","ng-zorro-antd/modal","lodash","jquery","date-fns/differenceInCalendarDays","@angular/platform-browser","viewerjs"],t):t(((e=e||self).iboom=e.iboom||{},e.iboom["sailing-front"]={}),e.ng.core,e.ng.common,e.ngZorroAntd,e.ng.router,e.ng.forms,e.rxjs,e.ng.common.http,e.rxjs.operators,e.drawer,e.message,e.modal,e.lodash,e.$,e.differenceInCalendarDays,e.ng.platformBrowser,e.Viewer)}(this,(function(e,t,n,i,o,a,r,s,l,p,c,h,f,u,d,m,g){"use strict";u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,d=d&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d,g=g&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g;
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0

    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.

    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */
var y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function b(e,t){function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var v=function(){return(v=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function C(e,t,n,i){var o,a=arguments.length,r=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a<3?o(r):a>3?o(t,n,r):o(t,n))||r);return a>3&&r&&Object.defineProperty(t,n,r),r}function z(e,t){return function(n,i){t(n,i,e)}}function w(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function x(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function O(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function D(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(O(arguments[t]));return e}var S=function(){function e(e){this.http=e,this.headers=new s.HttpHeaders({"Content-Type":"application/json"})}return e.prototype.httpGet=function(e,t){return this.http.get(e,{params:t})},e.prototype.httpPost=function(e,t,n){return this.http.post(e,t,{params:n})},e.prototype.httpDelete=function(e,t){return this.http.delete(e,{params:t})},e.prototype.httpUpdate=function(e,t,n){return this.http.put(e,t,{params:n,headers:this.headers})},e.prototype.httpGetText=function(e,t){return this.http.get(e,{responseType:"text",params:t}).pipe(l.map((function(e){return e.replace(/\:([\-]?\d+(\.\d+)?)([\}\,])/g,':"$1"$3')})),l.map((function(e){return JSON.parse(e)})),l.map((function(e){return e.code=Number(e.code),e.httpCode=Number(e.httpCode),e})))},e.prototype.httpPostText=function(e,t,n){return this.http.post(e,t,{responseType:"text",params:n}).pipe(l.map((function(e){return e.replace(/\:([\-]?\d+(\.\d+)?)([\}\,])/g,':"$1"$3')})),l.map((function(e){return JSON.parse(e)})),l.map((function(e){return e.code=Number(e.code),e.httpCode=Number(e.httpCode),e})))},e.prototype.httpPutText=function(e,t,n){return this.http.put(e,t,{responseType:"text",params:n}).pipe(l.map((function(e){return e.replace(/\:([\-]?\d+(\.\d+)?)([\}\,])/g,':"$1"$3')})),l.map((function(e){return JSON.parse(e)})),l.map((function(e){return e.code=Number(e.code),e.httpCode=Number(e.httpCode),e})))},e.ctorParameters=function(){return[{type:s.HttpClient}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(s.HttpClient))},token:e,providedIn:"root"}),e=C([t.Injectable({providedIn:"root"})],e)}(),I=function(){function e(e,n,i,o){this.messageService=e,this.modalService=n,this.httpService=i,this.drawerService=o,this.deleteCallback=new t.EventEmitter,this.afterCloseCallback=new t.EventEmitter,this.loading=!1,this.childrenOptions=[]}return e.prototype.refreshTabl=function(e,t){var n=JSON.parse(JSON.stringify(e));return t?(n.data=[],n.params={}):n.data=e.data,n.defaultLoad=!t,e=n},e.prototype.formatTableData=function(e){var t=[],n={string:function(e){return e},float:function(e){return parseFloat(e)},date:function(e){return e},checkBox:function(e){return e}};if(e.length&&e.forEach((function(e){var i={},o={};e.forEach((function(e){"propertyName"===e.name||"showName"===e.name?Object.defineProperty(i,e.name,{value:n[e.type](e.value),enumerable:!0}):(e.others?("checkBox"===e.others.type&&Object.defineProperty(o,e.name,{value:e.others.value,enumerable:!0}),"select"===e.others.type&&e.others.value&&Object.defineProperty(o,e.name,{value:e.others.selectedValue.value,enumerable:!0})):("float"===e.type&&Object.defineProperty(o,e.name,{value:n[e.type](e.value)||0,enumerable:!0}),"checkBox"===e.type&&Object.defineProperty(o,e.name,{value:n[e.type](e.value)||!1,enumerable:!0}),Object.defineProperty(o,e.name,{value:n[e.type](e.value),enumerable:!0})),Object.defineProperty(i,"showFormatter",{value:o,enumerable:!0}))})),t.push(i)})),t.length){var i=[];if(t.forEach((function(e){i.push(e.showFormatter.num)})),this.isRepeat(i))return void this.messageService.error("序号不能相同")}return t},e.prototype.isRepeat=function(e){var t={};for(var n in e){if(t[e[n]])return!0;t[e[n]]=!0}return!1},e.prototype.isNull=function(e){return null!=e&&""!==e},e.prototype.setChildrenOptionParams=function(e,t){var n=e.children.split(",");t.forEach((function(t){n.forEach((function(n,i){t.id===n&&(t.params[e.key]=e.value)}))}))},e.prototype.createModal=function(e){var t,n=.8*document.body.clientWidth,i=.9*document.body.clientHeight,o=55;e.footer&&(o=110),e.style&&e.style.width&&(n=e.style.width),e.style&&e.style.height&&(i=e.style.height);var a={position:"absolute",top:"50%",left:"50%",bottom:0,right:0,height:i+"px",width:n+"px","min-height":i+"px","max-height":i+"px","margin-top":-i/2+"px","margin-left":-n/2+"px"};return"drawer"===e.type?t=this.drawerService.create({nzTitle:e.title,nzContent:e.content,nzContentParams:e.params||null,nzMaskClosable:!1,nzWidth:n+"px",nzBodyStyle:{height:i-500+"px",width:"100%","overflow-y":"auto"}}):"modal"===e.type&&(t=this.modalService.create({nzTitle:e.title,nzContent:e.content,nzFooter:e.footer||null,nzMaskClosable:!1,nzStyle:a,nzGetContainer:e.node,nzBodyStyle:{height:i-o+"px",width:"100%","overflow-y":"auto"}})),t},e.prototype.destory=function(e){e.destory()},e.prototype.downLoad=function(e,t,n){var i=this,o={method:t,headers:new Headers({"Content-Type":"application/json;charset=UTF-8"})};"POST"===t&&(o.body=JSON.stringify(n)),fetch(e,o).then((function(e){var t=new Response(e.body);e.headers.get("Content-Type").includes("application/json")?t.json().then((function(e){if(e.code&&2===e.code)return i.messageService.error(e.message)})):e.blob().then((function(t){var n=e.headers.get("Content-Disposition");if(n){var i=n.split(";")[1].split("=")[1],o=window.URL.createObjectURL(t),a=document.createElement("a");a.download=decodeURI(i),document.body.appendChild(a),a.style.display="none",a.href=o,a.click(),document.body.removeChild(a)}}))}))},e.ctorParameters=function(){return[{type:i.NzMessageService},{type:i.NzModalService},{type:S},{type:p.NzDrawerService}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(c.NzMessageService),t.ɵɵinject(h.NzModalService),t.ɵɵinject(S),t.ɵɵinject(p.NzDrawerService))},token:e,providedIn:"root"}),C([t.Output()],e.prototype,"deleteCallback",void 0),C([t.Output()],e.prototype,"afterCloseCallback",void 0),e=C([t.Injectable({providedIn:"root"})],e)}(),T=function(){function e(e,t){this.httpService=e,this.message=t}return e.prototype.refreshTabl=function(e,t){var n=f.cloneDeep(e);return t?(n.tableData=[],n.params={}):n.tableData=e.tableData,n.defaultLoad=!t,n.reLoad=!0,e=n},e.prototype.resetSearchBar=function(e,t){var n=Object.values(e),i=Object.keys(e);n.forEach((function(e){var t=e.ui.type;"date"===t||"input"===t?e.value=null:"select"===t&&(e.selectedValue=null)})),i.forEach((function(e){t.tableParams[e]=""}))},e.prototype.subEditTableData=function(e){var t=this,n=[];return e&&e.length&&e.forEach((function(e){var i={};for(var o in e)if(e.hasOwnProperty(o)&&(e[o].others&&"select"===e[o].others.type&&(e[o].value=e[o].others.selectedValue.label+","+e[o].others.selectedValue.value),"operation"!==o)){if(null===e[o].value)return void t.message.error("请将数据填写完整后再提交");i[o]=e[o].value}n.push(i)})),n},e.ctorParameters=function(){return[{type:S},{type:i.NzMessageService}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(S),t.ɵɵinject(c.NzMessageService))},token:e,providedIn:"root"}),e=C([t.Injectable({providedIn:"root"})],e)}(),k=[{id:"1",code:"51024685956",name:"濑溪河大闸水文站",area:"濑溪河大闸水文站",unit:"福集镇",type:"濑溪河1",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-5-6",szArea:"2000",qx:"区县1"},{id:"2",code:"51024685957",name:"泸县水务局",area:"泸县水务局",unit:"泸县",type:"濑溪河2",elevation:"水库水位站",year:"2020",riverArea:"300",updateDate:"2020-5-5",szArea:"2030",qx:"区县23"},{id:"3",code:"51024685958",name:"艾大桥水库管理站",area:"濑溪河测站2",unit:"福集镇",type:"濑溪河3",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-5-4",szArea:"20200",qx:"区县3"},{id:"4",code:"51024685959",name:"泸县水务局",area:"艾大桥水库堰闸站",unit:"福集镇",type:"濑溪河4",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-3-5",szArea:"2100",qx:"区县4"},{id:"5",code:"51024685960",name:"濑溪河大闸水文站",area:"九曲河中测站",unit:"泸县",type:"濑溪河5",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-5-15",szArea:"500",qx:"区县1"},{id:"6",code:"51024685960",name:"泸县水务局",area:"濑溪河大闸水文站",unit:"泸县",type:"濑溪河2",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-3-5",szArea:"8584",qx:"区县5"},{id:"7",code:"51024685962",name:"濑溪河大闸水文站",area:"渠首测站",unit:"福集镇",type:"濑溪河2",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-4-12",szArea:"123.32",qx:"区县2"},{id:"8",code:"51024685963",name:"泸县水务局",area:"渠首测站",unit:"福集镇",type:"濑溪河3",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-8-3",szArea:"4323.3",qx:"区县123"},{id:"9",code:"51024685964",name:"艾大桥水库管理站",area:"渠首测站",unit:"泸县",type:"濑溪河4",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-3-4",szArea:"4002",qx:"区县7"},{id:"10",code:"51024685965",name:"濑溪河大闸水文站",area:"渠首测站",unit:"泸县",type:"濑溪河5",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-12-1",szArea:"25423",qx:"区县9"},{id:"11",code:"51024685966",name:"艾大桥水库管理站",area:"渠首测站",unit:"福集镇",type:"濑溪河2",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-7-26",szArea:"1233",qx:"区县34"},{id:"12",code:"51024685967",name:"艾大桥水库管理站",area:"渠首测站",unit:"泸县",type:"濑溪河1",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-8-5",szArea:"343",qx:"区县56"},{id:"1",code:"51024685956",name:"濑溪河大闸水文站",area:"渠首测站",unit:"福集镇",type:"濑溪河1",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-5-6",szArea:"2000",qx:"区县1"},{id:"2",code:"51024685957",name:"泸县水务局",area:"渠首测站",unit:"泸县",type:"濑溪河2",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-5-5",szArea:"2030",qx:"区县23"},{id:"3",code:"51024685958",name:"艾大桥水库管理站",area:"渠首测站",unit:"福集镇",type:"濑溪河3",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-5-4",szArea:"20200",qx:"区县3"},{id:"4",code:"51024685959",name:"泸县水务局",area:"渠首测站",unit:"福集镇",type:"濑溪河4",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-3-5",szArea:"2100",qx:"区县4"},{id:"5",code:"51024685960",name:"濑溪河大闸水文站",area:"渠首测站",unit:"泸县",type:"濑溪河5",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-5-15",szArea:"500",qx:"区县1"},{id:"6",code:"51024685960",name:"泸县水务局",area:"渠首测站",unit:"泸县",type:"濑溪河2",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-3-5",szArea:"8584",qx:"区县5"},{id:"7",code:"51024685962",name:"濑溪河大闸水文站",area:"渠首测站",unit:"福集镇",type:"濑溪河2",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-4-12",szArea:"123.32",qx:"区县2"},{id:"8",code:"51024685963",name:"泸县水务局",area:"渠首测站",unit:"福集镇",type:"濑溪河3",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-8-3",szArea:"4323.3",qx:"区县123"},{id:"9",code:"51024685964",name:"艾大桥水库管理站",area:"九曲河中测站",unit:"泸县",type:"濑溪河4",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-3-4",szArea:"4002",qx:"区县7"},{id:"10",code:"51024685965",name:"濑溪河大闸水文站",area:"九曲河中测站",unit:"泸县",type:"濑溪河5",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-12-1",szArea:"25423",qx:"区县9"},{id:"11",code:"51024685966",name:"艾大桥水库管理站",area:"九曲河中测站",unit:"福集镇",type:"濑溪河2",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-7-26",szArea:"1233",qx:"区县34"},{id:"12",code:"51024685967",name:"艾大桥水库管理站",area:"九曲河中测站",unit:"泸县",type:"濑溪河1",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-8-5",szArea:"343",qx:"区县56"},{id:"1",code:"51024685956",name:"濑溪河大闸水文站",area:"九曲河中测站",unit:"福集镇",type:"濑溪河1",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-5-6",szArea:"2000",qx:"区县1"},{id:"2",code:"51024685957",name:"泸县水务局",area:"艾大桥水库堰闸站",unit:"泸县",type:"濑溪河2",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-5-5",szArea:"2030",qx:"区县23"},{id:"3",code:"51024685958",name:"艾大桥水库管理站",area:"艾大桥水库堰闸站",unit:"福集镇",type:"濑溪河3",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-5-4",szArea:"20200",qx:"区县3"},{id:"4",code:"51024685959",name:"泸县水务局",area:"艾大桥水库堰闸站",unit:"福集镇",type:"濑溪河4",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-3-5",szArea:"2100",qx:"区县4"},{id:"5",code:"51024685960",name:"濑溪河大闸水文站",area:"艾大桥水库堰闸站",unit:"泸县",type:"濑溪河5",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-5-15",szArea:"500",qx:"区县1"},{id:"6",code:"51024685960",name:"泸县水务局",area:"濑溪河大闸水文站",unit:"泸县",type:"濑溪河2",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-3-5",szArea:"8584",qx:"区县5"},{id:"7",code:"51024685962",name:"濑溪河大闸水文站",area:"濑溪河大闸水文站",unit:"福集镇",type:"濑溪河2",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-4-12",szArea:"123.32",qx:"区县2"},{id:"8",code:"51024685963",name:"泸县水务局",area:"濑溪河大闸水文站",unit:"福集镇",type:"濑溪河3",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-8-3",szArea:"4323.3",qx:"区县123"},{id:"9",code:"51024685964",name:"艾大桥水库管理站",area:"濑溪河大闸水文站",unit:"泸县",type:"濑溪河4",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-3-4",szArea:"4002",qx:"区县7"},{id:"10",code:"51024685965",name:"濑溪河大闸水文站",area:"濑溪河大闸水文站",unit:"泸县",type:"濑溪河5",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-12-1",szArea:"25423",qx:"区县9"},{id:"11",code:"51024685966",name:"艾大桥水库管理站",area:"濑溪河大闸水文站",unit:"福集镇",type:"濑溪河2",elevation:"河道水位站",riverArea:"300",year:"2020",updateDate:"2020-7-26",szArea:"1233",qx:"区县34"},{id:"12",code:"51024685967",name:"艾大桥水库管理站",area:"濑溪河大闸水文站",unit:"泸县",type:"濑溪河1",elevation:"水库水位站",riverArea:"300",year:"2020",updateDate:"2020-8-5",szArea:"343",qx:"区县56"}],j=function(){function e(e,t,n){this.httpService=e,this.message=t,this.commonService=n,this.dataList=[],this.checked=!1,this.loading=!1}return e.prototype.ngOnInit=function(){this.config.url&&this.getData()},e.prototype.getData=function(){var e=this;this.loading=!0;var t=this.config.url,n=this.config.params||{};this.httpService.httpGet(t,n).subscribe((function(t){e.loading=!1,1===t.code&&e.initCheckOptionsData(t.data.mapperList)}))},e.prototype.initCheckOptionsData=function(e){this.dataList=[],e.length&&(e.forEach((function(e){if(e.label=e.showFormatter.showName,e.value=e.showFormatter.propertyName,e.checked=!1,e.showFormatter.fiexToExport){var t=e.showFormatter.fiexToExport.toLowerCase();JSON.parse(t)&&(e.checked=!0,e.disabled=!0,e.fixed=!0)}})),this.dataList=e)},e.prototype.isCheckedAll=function(e){this.setOptionsCheckedOrNot(e)},e.prototype.setOptionsCheckedOrNot=function(e){this.dataList.forEach((function(t){t.fixed||(t.checked=e)}))},e.prototype.geCustomHeaders=function(){var e=[];return this.dataList.forEach((function(t){if(t.checked){var n={code:t.value,displayName:t.label};e.push(n)}})),e},e.prototype.cancel=function(){this.config.modal.close()},e.prototype.export=function(){var e=this.config.tagData,t={projectIds:""},n=[];if(Object.keys(e).length>0){for(var i in e)e[i]&&n.push(i);t.projectIds=n.join(",")}"excel"===this.config.type&&Object.defineProperty(t,"customHeaders",{value:this.geCustomHeaders(),enumerable:!0}),this.commonService.downLoad(this.config.exportUrl,"POST",t)},e.prototype.exportAfter=function(){},e.prototype.checkedChange=function(e,t){e.checked=t},e.ctorParameters=function(){return[{type:S},{type:i.NzMessageService},{type:I}]},C([t.Input()],e.prototype,"config",void 0),e=C([t.Component({selector:"app-s-checkbox-group",template:'<nz-spin nzSimple class="_spin" *ngIf="loading" [nzDelay]="10"></nz-spin>\n<div class="_exportCon">\n    <div nz-row class="_exportTitle">\n        <div nz-col [nzSpan]="10">\n            <label nz-checkbox [(ngModel)]="checked" (ngModelChange)="isCheckedAll($event)">全选/取消全选</label>\n        </div>\n    </div>\n    <div nz-row>\n        <div nz-col [nzSpan]="8" *ngFor="let item of dataList" class="_checkList">\n            <label nz-checkbox [nzValue]="item.value" [ngModel]="item.checked" [disabled]="item.disabled" (ngModelChange)="checkedChange(item, $event)">{{item.label}}</label>\n        </div>\n    </div>\n    <div class="drawerFooter">\n        <button nz-button nzType="default" (click)="cancel()">取消</button>\n        <button nz-button nzType="primary" (click)="export()">导出</button>\n    </div>\n</div>',styles:["._exportCon{padding:11px 20px 50px}._exportCon ._exportTitle p{height:32px;background:rgba(145,213,255,.12);border:1px solid #91d5ff;border-radius:4px;margin-bottom:0;display:flex;align-items:center}._exportCon ._exportTitle p ._circle{display:inline-block;width:16px;height:16px;background:#1890ff;border-radius:50%;margin:0 10px 0 20px;display:flex;align-items:center}._exportCon ._exportTitle p ._circle i{color:#fff}._exportCon ._exportTitle .ant-col:last-of-type{display:flex;align-items:center;padding-left:60px}._exportCon ._checkList{margin-top:25px}._exportCon ._checkList label{padding-left:12%}._exportCon .drawerFooter{position:absolute;bottom:0;right:0;height:80px;background:#fafafa;border-radius:4px 0 0 4px;width:100%;display:flex;align-items:center;border-top:1px solid #e5e5e5;justify-content:flex-end}._exportCon .drawerFooter button{padding:4px 28px;margin-right:20px}"]})],e)}(),E=new t.InjectionToken("url-config"),L=new t.InjectionToken("table-config"),P=function(){function e(e,n,i,o,a,r,s){var l=this;this.httpService=e,this.commonService=n,this.tableService=i,this.modal=o,this.message=a,this.changeDetectorRef=r,this.TABLE_CONFIG=s,this.radioCheckd=new t.EventEmitter,this.comChecked=new t.EventEmitter,this.rowData=new t.EventEmitter,this.editRowTable=new t.EventEmitter,this.getRowData=new t.EventEmitter,this.checkObj={},this.checkKey="id",this.checkedArrData=[],this.allChecked=!1,this.allUnChecked=!0,this.indeterminate=!1,this.pageRecords=[],this.loadingCount=0,this.scroll={x:"100%",y:"100%"},this.fixedItem="80px",this.pageData={page:1,pageSize:10,total:0},this.params={},this.right=!1,this.columns=[],this.searchItemsInited=!1,this.tableHeight="",this.tabStyle={height:""},this.collapseOptions={mode:"multiple",label:"请选择要显示的列",data:[],width:"300px",modelChange:function(e){l.showCols(e)}},this.mapperList=[],this.listOfData=[],this.totalHistoryList=[],this.httpMethodType="httpGetText",this.visible=!1,this.collapseCheckedMap={}}return Object.defineProperty(e.prototype,"loading",{get:function(){return this.loadingCount>0},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.collapseOptions.data=[],this.pageRecords=[],this.columns=[],this.checkObj={},this.listOfData=[]},e.prototype.ngAfterViewInit=function(){this.setScrollY()},e.prototype.ngOnInit=function(){},e.prototype.changeStatus=function(e){this.tableConfig[e]=!0},e.prototype.ngOnChanges=function(e){e.tableConfig&&this.changesLoadTable(e),e.checkObj&&this.refreshStatus()},e.prototype.change=function(){this.visible=!this.visible},e.prototype.collapseChange=function(e){this.collapseCheckedMap=e.reduce((function(e,t){return e[t.value]=!0,e}),{}),this.showCols(e)},e.prototype.changesLoadTable=function(e){e.tableConfig.currentValue&&(this.tableConfig=e.tableConfig.currentValue,this.tableConfig.reLoad?this.reload():(this.pageData.page=this.tableConfig.page,this.pageData.pageSize=this.tableConfig.pageSize,this.setScrollY(),this.columns=[],this.pageRecords=[],this.listOfData=[],this.tableConfig.columns?(this.columns=D(this.tableConfig.columns),this.addOperationItem(),this.initTableWidth(),this.initSearchItems(),this.listOfData.length||this.setEditData(),this.getTableData()):this.getDynamicHeaders(),this.tableConfig.isEditCol&&this.tableConfig.tableData&&(this.listOfData=this.tableConfig.tableData||[]),this.windResize()))},e.prototype.getDynamicHeaders=function(){return w(this,void 0,void 0,(function(){var e,t=this;return x(this,(function(n){switch(n.label){case 0:return this.tableConfig.queryTitle&&this.tableConfig.titleParams?(this.loadingCount++,this.columns=[],[4,this.httpService.httpGet(this.tableConfig.queryTitle,this.tableConfig.titleParams).pipe(l.finalize((function(){return t.loadingCount--}))).toPromise()]):[3,2];case 1:1===(e=n.sent()).code&&e.data.mapperList&&e.data.mapperList.length&&this.initDynamicHeaders(e.data.mapperList),n.label=2;case 2:return[2]}}))}))},e.prototype.initDynamicHeaders=function(e){this.setColumnsFormat(e),this.initTableWidth(),this.initSearchItems(),this.setEditData(),this.getTableData(),this.changeDetectorRef.detectChanges()},e.prototype.getTableData=function(){this.tableConfig.tableData?(this.pageRecords=this.tableConfig.tableData,this.tableConfig.isPage&&(this.pageData.total=this.pageRecords.length),this.initTableWidth()):this.getDynamicTableData()},e.prototype.setEditData=function(){this.tableConfig.isEditCol&&(this.tableConfig.tableData||this.initEditData(k))},e.prototype.initEditData=function(e){for(var t=0;t<e.length;t++)this.listOfData=D(this.listOfData,[this.initRow(e[t])]),this.tableConfig.tableData=this.listOfData},e.prototype.getDynamicTableData=function(){return w(this,void 0,void 0,(function(){var e,t,n,i,o,a,r,s=this;return x(this,(function(p){switch(p.label){case 0:return this.loadingCount++,this.pageRecords=[],this.tableConfig.queryTable?this.tableConfig.defaultLoad?(this.initHttpTableParams(),[4,this.httpService[this.httpMethodType](this.tableConfig.queryTable,this.params).pipe(l.finalize((function(){return s.loadingCount--}))).toPromise()]):[3,2]:[3,2];case 1:1===(e=p.sent()).code&&(t=e.data,n=t.data,i=t.totalCount,o=t.page,a=t.pageSize,this.pageData={total:i,page:o,pageSize:a},this.setAttributes(),this.pageRecords=n,(r=this.totalHistoryList).push.apply(r,D(this.pageRecords.filter((function(e){return s.totalHistoryList.every((function(t){return t[s.checkKey]!==e[s.checkKey]}))})))),this.refreshStatus(),this.changeDetectorRef.detectChanges()),p.label=2;case 2:return[2]}}))}))},e.prototype.getEditTableData=function(){return w(this,void 0,void 0,(function(){var e,t=this;return x(this,(function(n){switch(n.label){case 0:return this.tableConfig.queryTable&&this.tableConfig.defaultLoad?(setTimeout((function(){t.loadingCount++})),[4,this.httpService.httpGet(this.tableConfig.queryTable,this.tableConfig.tableParams).pipe(l.finalize((function(){return t.loadingCount--}))).toPromise()]):[3,2];case 1:1===(e=n.sent()).code&&e.data.mapperList&&e.data.mapperList.length&&this.initEditTableData(e.data.mapperList),n.label=2;case 2:return[2]}}))}))},e.prototype.initEditTableData=function(e){this.listOfData=[];for(var t=function(t){n.listOfData.push(n.initRow());var i=function(i){e[t].hasOwnProperty(i)&&n.listOfData[t].forEach((function(n){if(n.others){if(n.name===i&&(n.others.value=e[t][i]),"showFormatter"===i)for(var o in e[t][i])n.name===o&&(n.others.value=e[t][i][o])}else if(n.name===i&&(n.value=e[t][i]),"showFormatter"===i)for(var o in e[t][i])n.name===o&&(n.value=e[t][i][o])}))};for(var o in e[t])i(o)},n=this,i=0;i<e.length;i++)t(i)},e.prototype.setColumnsFormat=function(e){var t=this;if(0===this.collapseOptions.data.length)e.forEach((function(e,n){if(e.showFormatter){var i={header:e.showFormatter.showName,name:e.propertyName,attrs:{description:e.showFormatter.description,width:e.showFormatter.colSpanWidth,type:e.showFormatter.colUiType.split(",")[1],colSerach:e.showFormatter.colSerach}},o=function(t){"true"!==e.showFormatter[t]&&"false"!==e.showFormatter[t]||setTimeout((function(){i.attrs[t]=JSON.parse(e.showFormatter[t])}))};for(var a in e.showFormatter)o(a);if("date"===i.attrs.type){Object.defineProperty(i,"others",{value:{ui:{type:"date"},type:"date",placeHolder:"请选择日期",showTime:!1},enumerable:!0})}if("year"===i.attrs.type){Object.defineProperty(i,"others",{value:{ui:{type:"year"},type:"year",placeHolder:"请选择年份"},enumerable:!0})}if(JSON.parse(e.showFormatter.collapse))t.columns.push(i);else{var r={label:e.showFormatter.showName,value:e.propertyName,notSearch:!0,name:e.propertyName,header:e.showFormatter.showName,attrs:{}};for(var a in e)e.hasOwnProperty(a)&&"showFormatter"===a&&(r.attrs=i.attrs);t.collapseOptions.data.push(r)}}})),this.addOperationItem(),this.baseColumns=D(this.columns);else{var n=JSON.parse(JSON.stringify(this.baseColumns)),i=n.pop();this.collapseOptions.data.forEach((function(e){e.active&&n.push(e)})),n.push(i),this.columns=n,this.initTableWidth()}},e.prototype.initSearchItems=function(){var e=this;this.columns.length&&(this.columns.forEach((function(t){if(t.attrs.colSerach&&(t.attrs.colSerach=JSON.parse(t.attrs.colSerach)),t.attrs.colSerach){var n=f.cloneDeep(t),i={name:n.name,type:n.attrs.type,config:{placeHolder:"请输入"+n.header,value:"",type:n.attrs.type}};e.tableConfig.colSearchConfig.forEach((function(e){e.colName===n.name&&("treeSelect"!==n.attrs.type&&"select"!==n.attrs.type||(i.config.width=parseInt(n.attrs.width,0)-30+"px",i.config.url=e.config.url,i.config.placeHolder="请选择"+n.header,i.name=e.name,"select"===n.attrs.type&&(i.config.defaultLoad=!0)),i.config=v(v({},i.config),{keys:e.config.keys}))})),t.searchItem=i}})),this.searchItemsInited=!0)},e.prototype.showCols=function(e){this.collapseOptions.data.forEach((function(e){e.active=!1})),e.length>0&&e.forEach((function(e){e.active=!0}));var t=JSON.parse(JSON.stringify(this.baseColumns)),n=[],i=t[t.length-1];i.attrs.isOperation&&t.pop(),n=t.concat(e),i.attrs.isOperation&&n.push(i),this.columns=n,this.initTableWidth()},e.prototype.setScrollY=function(){if(this.scroll.y="100%",this.TABLE_CONFIG&&this.TABLE_CONFIG.scrollY||this.tableConfig.scrollY)this.scroll.y=(this.tableConfig.scrollY||this.TABLE_CONFIG.scrollY)+"px";else{var e=0,t=document.body.clientHeight,n=0;document.getElementById("stOperationBar")&&(n=document.getElementById("stOperationBar").clientHeight);this.tableConfig.isPage&&(e=60);var i=t-(103+n+e);this.scroll.y=i-230+"px",this.tableHeight=i+"px",this.tabStyle.height=this.tableHeight,u("ant-table-content>.ant-table-scroll>.ant-table-body").height(this.scroll.y+"!important"),u(".ant-table-content>.ant-table-scroll>.ant-table-body").css({overflow:"auto"}),u(".ant-table-body.ng-star-inserted").height(i-20+"px !important"),u(".ant-table-body.ng-star-inserted").css("height",i-20+"px !important")}},e.prototype.initItemData=function(){var e={};return this.columns.forEach((function(t){var n={name:t.name,type:"",value:null,edit:!0,error:!1,others:null,isSort:!1,isLeft:!1,isRight:!1};if(t.attrs){var i=JSON.parse(JSON.stringify(t.attrs));setTimeout((function(){n.isSort=i.isSort,n.isLeft=i.isLeft,n.isRight=i.isRight})),n.type=i.type,i.type&&"string"!==i.type||(n.type="string",n.value=i.value||""),"checkBox"===i.type&&(n.type="checkBox",n.value=!1),"float"===i.type&&(n.type="float",n.value=0)}if(t.others){var o=JSON.parse(JSON.stringify(t.others));"date"===o.type||"select"===o.type&&(o.defaultLoad=!0,Object.defineProperty(o,"width",{value:"100%",enumerable:!0})),n.others=o}setTimeout((function(){e[n.name]=n}))})),e},e.prototype.getParams=function(e){var t=e.pageIndex,n=e.pageSize,i=this.pageData,o=i.page,a=i.pageSize;o==t&&n==a||(this.pageData.page=e.pageIndex,this.pageData.pageSize=e.pageSize,this.initHttpTableParams(),this.getDynamicTableData())},e.prototype.sort=function(e,t){},e.prototype.sortId=function(e,t,n){return e.key-t.key},e.prototype.initHttpTableParams=function(){var e={order:"creationTime desc"};this.tableConfig.isPage&&(e=v(v({},e),{pageSize:this.pageData.pageSize,page:this.pageData.page})),Object.assign(e,this.tableConfig.tableParams),delete this.tableConfig.tableParams.page,delete this.tableConfig.tableParams.pageSize,this.params=e},e.prototype.concatParams=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(e[n]&&String(e[n])&&(t+="&"+n+"="+e[n]),t&&(t="?"+t.slice(1)));return t},e.prototype.outCellContext=function(e,t,n,i){return{$implicit:e,value:t,record:n,index:i}},e.prototype.initTableWidth=function(){var e=0,t=new RegExp("px","g"),n=document.body.clientWidth;this.tableConfig.width&&(n=this.tableConfig.width),(this.tableConfig.radioCheck||this.tableConfig.comCheck||this.tableConfig.showRowNum)&&(e=60),this.columns.forEach((function(n){var i=n.attrs.width;"string"==typeof i&&(-1===i.indexOf("px")?(e+=parseInt(i,0),n.attrs.width=n.attrs.width+"px"):(i=i.toString().replace(t,""),e+=parseInt(i,0)))})),this.scroll.x=n<e+20?e+20+"px":"100%",this.changeDetectorRef.detectChanges()},e.prototype.windResize=function(){var e=this;r.fromEvent(window,"resize").subscribe((function(t){t.isTrusted&&(e.initTableWidth(),e.setScrollY())}))},e.prototype.setAttributes=function(){this.pageRecords.forEach((function(e){Object.defineProperties(e,{checked:{value:!1,enumerable:!0,writable:!0},active:{value:!1,enumerable:!0,writable:!0},disabled:{value:!0,enumerable:!0,writable:!0}})}))},e.prototype.addOperationItem=function(){if(this.tableConfig.isOperation){var e="200";this.tableConfig.operationWidth&&(e=this.tableConfig.operationWidth),this.tableConfig.operationObj={name:"operation",header:"操作",attrs:{width:e,isTemplete:!0,isOperation:!0,isRight:!0}},this.columns.push(this.tableConfig.operationObj)}},e.prototype.rowClick=function(e){this.pageRecords.forEach((function(e){e.disabled||(e.active=!1)})),e.active=!0,this.getRowData.emit(e)},e.prototype.checkAll=function(e){var t=this;this.pageRecords.forEach((function(n){n.disabled||(t.checkObj[n[t.checkKey]]=n.active=e)}));var n=this.totalHistoryList.filter((function(e){return!e.disabled&&t.checkObj[e[t.checkKey]]}));this.comChecked.emit(n),this.refreshStatus()},e.prototype.checkListData=function(e,t){var n=this;this.pageRecords[e].active=this.checkObj[e[this.checkKey]],this.refreshStatus();var i=this.totalHistoryList.filter((function(e){return!e.disabled&&n.checkObj[e[n.checkKey]]}));this.comChecked.emit(i)},e.prototype.singleCheck=function(e){var t=this;this.pageRecords.forEach((function(n,i){e===i?(n.active=n.checked=!n.active,!0===n.checked&&t.radioCheckd.emit(n)):(n.active=!1,n.checked=!1)}))},e.prototype.refreshStatus=function(){var e=this;if(0!==this.pageRecords.length){var t=this.pageRecords.filter((function(e){return!e.disabled})),n=t.length>0&&t.every((function(t){return e.checkObj[t[e.checkKey]]}));this.allUnChecked=t.every((function(t){return!e.checkObj[t[e.checkKey]]})),this.allChecked=n,this.indeterminate=!n&&!this.allUnChecked}},e.prototype.addEditRow=function(){this.addRow()},e.prototype.stopEdit=function(e){},e.prototype.startEdit=function(e){},e.prototype.addRow=function(){this.listOfData=D(this.listOfData,[this.initRow()]),this.tableConfig.tableData=this.listOfData},e.prototype.initRow=function(e){var t={};return this.columns.forEach((function(n,i){var o={name:n.name,type:"string",value:e?e[n.name]:null,edit:!0,error:!1,others:null,isSort:!1,isLeft:!1,isRight:!1},a=JSON.parse(JSON.stringify(n.attrs));if(o.type=a.type,setTimeout((function(){o.isSort=!e&&a.isSort,o.isLeft=!e&&a.isLeft,o.isRight=!e&&a.isRight})),n.others||e||(a.type&&"string"!==a.type||(o.type="string"),"float"===a.type&&(o.type="float",o.value=o.value||0)),n.others){var r=JSON.parse(JSON.stringify(n.others));"select"===r.type?(r.defaultLoad=!0,Object.defineProperty(r,"width",{value:"100%",enumerable:!0})):"year"===r.type||"date"===r.type?(e&&(r.value=o.value),Object.defineProperty(r,"width",{value:"100%",enumerable:!0})):"checkBox"===r.type&&(o.type="boolean",o.value="true"===o.value),o.others=r}t[o.name]=o})),t},e.prototype.showDeleteModal=function(e){var t=this,n=e.event,i=e.cellIndex,o=e.config,a=(e.rowData,e.type),r=e.data;if(n&&n.stopPropagation(),a&&"batchDelete"===a){var s=[];if((s=this.pageRecords.filter((function(e){return e&&e.checked&&void 0!==e.checked}))).length){var l=s.map((function(e){return e[o.key]}));this.modal.confirm({nzTitle:"提示",nzContent:'<b style="color: red;">确定要删除选中数据吗？</b>',nzOkText:"确定",nzOkType:"danger",nzOnOk:function(){return t.deleteByHttp(o,l)},nzCancelText:"取消"})}else this.message.error("请选择要删除的数据")}else this.modal.confirm({nzTitle:"提示",nzContent:'<b style="color: red;">确定要删除选中数据吗？</b>',nzOkText:"确定",nzOkType:"danger",nzOnOk:function(){return t.removeCell(i,r)},nzCancelText:"取消"})},e.prototype.deleteByHttp=function(e,t){var n=this,i={};Object.defineProperty(i,e.key,{value:t,enumerable:!0}),this.httpService.httpDelete(e.url,i).subscribe((function(e){1===e.code&&(n.message.success("删除成功"),n.getDynamicTableData(),n.changeDetectorRef.detectChanges())}))},e.prototype.removeCell=function(e,t){this.listOfData=this.listOfData.filter((function(e){return e.propertyName.value!==t.propertyName.value})),this.tableConfig.tableData=this.listOfData,this.changeDetectorRef.detectChanges()},e.prototype.importData=function(e){},e.prototype.exportOptionChange=function(e){switch(e.value){case"checkedRows":this.exportCheckData(e,"报表");break;case"checkedAllRow":this.openCheckGroup(e);break;case"checkedCodes":this.exportCheckData(e,"二维码");break;case"checkedAllCodes":this.openCheckGroup(e)}},e.prototype.exportCheckData=function(e,t){Object.keys(this.checkObj).length?Object.values(this.checkObj).some((function(e){return!0===e}))?this.openCheckGroup(e,this.checkObj):this.message.error("请勾选要导出的"+t):this.message.error("请勾选要导出的"+t)},e.prototype.openCheckGroup=function(e,t){var n={};t&&(n=t);var i={url:this.tableConfig.queryTitle,params:this.tableConfig.titleParams,exportUrl:e.url,tagData:n,modal:null,type:""},o="导出报表";if(i.type="excel","checkedCodes"!==e.value&&"checkedAllCodes"!==e.value||(o="导出二维码",i.type="code",this.exportCode(e)),"excel"===i.type){var a={type:"drawer",title:o,content:j,params:{config:i}},r=this.commonService.createModal(a);i.modal=r}},e.prototype.exportCode=function(e){var t,n=[];if("checkedCodes"===e.value){for(var i in this.checkObj)this.checkObj[i]&&n.push(i);if(t=n.join(","),n.length>1)this.commonService.downLoad(e.url+"s","POST",t);else{var o=e.url+"/"+t;this.commonService.downLoad(o,"GET")}}else t="",this.commonService.downLoad(e.url,"POST",t)},e.prototype.getDate=function(e,t){e.value=t},e.prototype.selectChange=function(e,t){e.value=t.value},e.prototype.checkedChange=function(e,t){e.value=t},e.prototype.upBack=function(e,t){},e.prototype.searchClick=function(e){""!==e.config.value?this.tableConfig.tableParams[e.name]=e.config.value:this.tableConfig.tableParams[e.name]&&delete this.tableConfig.tableParams[e.name],this.pageData.page=1,this.getDynamicTableData()},e.prototype.rangeDateChange=function(e,t){e.startDate?this.tableConfig.tableParams[t.searchItem.config.keys.start]=e.startDate:this.tableConfig.tableParams[t.searchItem.config.keys.start]&&delete this.tableConfig.tableParams[t.searchItem.config.keys.start],e.endDate?this.tableConfig.tableParams[t.searchItem.config.keys.end]=e.endDate:this.tableConfig.tableParams[t.searchItem.config.keys.end]&&delete this.tableConfig.tableParams[t.searchItem.config.keys.end],(e.startDate&&e.endDate||!e.startDate&&!e.endDate)&&(this.pageData.page=1,this.getDynamicTableData())},e.prototype.dateChange=function(e,t){e?this.tableConfig.tableParams[t.name]=e:this.tableConfig.tableParams[t.name]&&delete this.tableConfig.tableParams[t.name],this.pageData.page=1,this.getDynamicTableData()},e.prototype.selectModelChange=function(e,t){if("default"!==t.config.mode&&t.config.mode){var n=e.map((function(e){return e.value}));if(!e.length)null===(i=this.tableConfig.tableParams[t.name])&&void 0===i||delete this.tableConfig.tableParams[t.name];n.length&&(this.tableConfig.tableParams[t.name]=n)}else{var i;if(null==e)null===(i=this.tableConfig.tableParams[t.name])&&void 0===i||delete this.tableConfig.tableParams[t.name];e&&(this.tableConfig.tableParams[t.name]=e.value)}this.pageData.page=1,this.getDynamicTableData()},e.prototype.treeChange=function(e,t){e&&(this.tableConfig.tableParams[t.name]=e.value||"",this.pageData.page=1,this.getDynamicTableData())},e.prototype.yearChange=function(e,t){e?this.tableConfig.tableParams[t.name]=e:this.tableConfig.tableParams[t.name]&&delete this.tableConfig.tableParams[t.name],this.pageData.page=1,this.getDynamicTableData()},e.prototype.reload=function(){var e={order:"creationTime desc"};this.tableConfig.isPage&&(e.pageSize=this.pageData.pageSie,e.page=this.pageData.page),this.params=e,this.tableConfig.queryTitle?this.getDynamicHeaders():this.tableConfig.queryTable&&this.getDynamicTableData(),this.setScrollY()},e.ctorParameters=function(){return[{type:S},{type:I},{type:T},{type:i.NzModalService},{type:i.NzMessageService},{type:t.ChangeDetectorRef},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[L]}]}]},C([t.Input()],e.prototype,"cellContent",void 0),C([t.Input()],e.prototype,"tableConfig",void 0),C([t.Output()],e.prototype,"radioCheckd",void 0),C([t.Output()],e.prototype,"comChecked",void 0),C([t.Output()],e.prototype,"rowData",void 0),C([t.Output()],e.prototype,"editRowTable",void 0),C([t.Output()],e.prototype,"getRowData",void 0),C([t.Input()],e.prototype,"checkObj",void 0),C([t.Input()],e.prototype,"checkKey",void 0),C([t.Input()],e.prototype,"totalHistoryList",void 0),C([t.Input()],e.prototype,"httpMethodType",void 0),e=C([t.Component({selector:"app-s-table",template:'<ng-container *ngIf="tableConfig">\n    <div class="table">\n        \x3c!--内置新增行（可编辑单元格）添加，批量删除、导出、导入、选择不固定列功能按钮--\x3e\n        <div class="stOperationBar" id="stOperationBar">\n            <button *ngIf="tableConfig.isEditCol && tableConfig.showAdd" class="addBtn" nz-button nzType="primary"\n                (click)="addEditRow()">\n                <i nz-icon nzType="plus-circle" nzTheme="outline"></i>新增行\n            </button>\n            <ng-container *ngIf="tableConfig.isAdd && tableConfig.addConfig">\n                <button class="barLine" nz-button nzType="primary"\n                    (click)="tableConfig.addConfig.clickEvent(tableConfig.addConfig)">\n                    <i nz-icon nzType="plus-circle" nzTheme="outline"></i>添加\n                </button>\n            </ng-container>\n            <ng-container *ngIf="tableConfig.isBatchDelete && tableConfig.batchDeleteConfig">\n                <button class="barLine" nz-button nzType="danger"\n                    (click)="showDeleteModal({type: \'batchDelete\', config: tableConfig.batchDeleteConfig})">\n                    <i nz-icon nzType="delete" nzTheme="outline"></i>批量删除\n                </button>\n            </ng-container>\n            <ng-container *ngIf="tableConfig.isImport && tableConfig.importConfig">\n                <button class="barLine" nz-button nzType="primary"\n                    (click)="tableConfig.importConfig.clickEvent? tableConfig.importConfig.clickEvent(tableConfig.importConfig) : importData(tableConfig.importConfig)">\n                    <i nz-icon nzType="import" nzTheme="outline"></i>导入\n                </button>\n            </ng-container>\n            <ng-container *ngIf="tableConfig.isExport">\n                <button nz-button nz-dropdown [nzDropdownMenu]="menu4">\n                    导出\n                    <i nz-icon nzType="down"></i>\n                </button>\n                <nz-dropdown-menu #menu4="nzDropdownMenu">\n                    <ul nz-menu>\n                        <li *ngFor="let menu of tableConfig.exportConfig.data" nz-menu-item\n                            (click)="exportOptionChange(menu)">{{menu.label}}</li>\n                    </ul>\n                </nz-dropdown-menu>\n            </ng-container>\n            <ng-container *ngIf="tableConfig.isCollapse">\n                \x3c!-- <app-s-selector style="margin-left: 10px;" [options]="collapseOptions"></app-s-selector> --\x3e\n                <button class="show-cols-button" nz-button nzType="primary" nz-popover [nzPopoverTitle]="null"\n                    [(nzVisible)]="visible" nzPopoverPlacement="bottomRight" (nzPopoverVisibleChange)="change()"\n                    nzPopoverTrigger="click" [nzPopoverContent]="contentTemplate">\n                    {{collapseOptions.label}}\n                </button>\n                <ng-template #contentTemplate>\n                    <nz-checkbox-wrapper style="width: 450px" (nzOnChange)="collapseChange($event)">\n                        <div nz-row>\n                            <div nz-col nzSpan="8" *ngFor="let item of collapseOptions?.data">\n                                <label nz-checkbox [nzValue]="item" [ngModel]="collapseCheckedMap[item.value]"\n                                    title="{{item.label}}">{{item.label}}</label>\n                            </div>\n                        </div>\n                    </nz-checkbox-wrapper>\n                </ng-template>\n            </ng-container>\n        </div>\n        <div class=\'table\'>\n            <nz-table #basicTable [nzData]="tableConfig.isEditCol? listOfData: pageRecords" [nzLoading]="loading"\n                [nzScroll]="scroll" [nzBordered]="tableConfig.isBorder" [nzTitle]="tableConfig.title" nzShowSizeChanger\n                nzShowQuickJumper [nzPageIndex]="pageData.page" [nzPageSize]="pageData.pageSize"\n                [nzShowTotal]="totalTpl" (nzQueryParams)="getParams($event)" nzFrontPagination="false"\n                [nzTotal]="pageData.total" [nzShowPagination]="tableConfig.isShowPagination">\n                <thead *ngIf="columns.length">\n                    <tr>\n                        \x3c!--单选--\x3e\n                        <th *ngIf="tableConfig?.radioCheck" [nzWidth]="fixedItem" nzLeft nzAlign="center"\n                            [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}">选项</th>\n                        \x3c!--多选--\x3e\n                        <th [nzWidth]="fixedItem" *ngIf="tableConfig.comCheck" nzShowCheckbox nzAlign="center"\n                            [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}" nzLeft [(nzChecked)]="!allUnChecked"\n                            [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)">\n                        </th>\n                        \x3c!-- 显示序号 --\x3e\n                        <th *ngIf="tableConfig?.showRowNum" [nzWidth]="fixedItem" nzLeft nzAlign="center"\n                            [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}">序号</th>\n                        <ng-container *ngFor="let thItem of columns">\n                            <ng-container *ngIf="!thItem.attrs.isOperation">\n                                <th *ngIf="!thItem?.attrs.isSort" [nzWidth]=\'thItem?.attrs.width\'\n                                    [nzAlign]="thItem?.attrs.align || \'left\'" [nzLeft]="thItem.attrs.isLeft"\n                                    [nzRight]="thItem.attrs.isRight">\n                                    {{thItem[\'header\']}}\n                                </th>\n                                <th *ngIf="thItem?.attrs.isSort" [nzLeft]="thItem.attrs.isLeft"\n                                    [nzRight]="thItem.attrs.isRight" [nzWidth]=\'thItem?.attrs.width\'\n                                    [nzAlign]="thItem?.attrs.align || \'left\'" nzShowSort\n                                    (nzSortChange)="sort(thItem?.name, $event)">\n                                    {{thItem[\'header\']}}\n                                </th>\n                            </ng-container>\n                            <ng-container *ngIf="thItem.attrs.isOperation">\n                                <th [nzWidth]=\'thItem?.attrs.width\' nzRight [nzAlign]="\'center\'">{{thItem[\'header\']}}\n                                </th>\n                            </ng-container>\n                        </ng-container>\n                    </tr>\n                    \x3c!-- && tableConfig.colSearchConfig && tableConfig.colSearchConfig.length --\x3e\n                    <tr *ngIf="tableConfig.isColSearch && searchItemsInited">\n                        \x3c!--单选--\x3e\n                        <th *ngIf="tableConfig.radioCheck" nzLeft></th>\n                        \x3c!--多选--\x3e\n                        <th *ngIf="tableConfig.comCheck" nzLeft></th>\n                        \x3c!-- 序号 --\x3e\n                        <th *ngIf="tableConfig.showRowNum" [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}"\n                            nzAlign=\'center\' nzLeft></th>\n                        <th *ngFor="let sItem of columns" [nzLeft]="sItem.attrs.isLeft" [nzRight]="sItem.attrs.isRight">\n                            <ng-container *ngIf="sItem.searchItem">\n                                <ng-container\n                                    *ngIf="sItem.searchItem?.type === \'text\' || sItem.searchItem?.type === \'number\'">\n                                    <nz-input-group nzSearch [nzAddOnAfter]="suffixIconButton">\n                                        <input [type]="sItem.searchItem.type"\n                                            [(ngModel)]="sItem.searchItem.config.value" nz-input\n                                            [placeholder]="sItem.searchItem.config.placeHolder"\n                                            (keyup.enter)="searchClick(sItem.searchItem)"\n                                            (keyup)="upBack($event, sItem.searchItem)" />\n                                    </nz-input-group>\n                                    <ng-template #suffixIconButton>\n                                        <button nz-button nzType="primary" nzSearch\n                                            (click)="searchClick(sItem.searchItem)"><i nz-icon\n                                                nzType="search"></i></button>\n                                    </ng-template>\n                                </ng-container>\n                                <ng-container *ngIf="sItem.searchItem.type === \'date\'">\n                                    <app-s-date [dateObj]="sItem.searchItem.config"\n                                        (dateChange)="dateChange($event, sItem)"></app-s-date>\n                                </ng-container>\n                                <ng-container *ngIf="sItem.searchItem.type === \'year\'">\n                                    <app-s-date [dateObj]="sItem.searchItem.config"\n                                        (yearChange)="yearChange($event, sItem)"></app-s-date>\n                                </ng-container>\n                                <ng-container *ngIf="sItem.searchItem.type === \'rangDate\'">\n                                    <app-s-date [dateObj]="sItem.searchItem.config"\n                                        (rangeDateChange)="rangeDateChange($event, sItem)"></app-s-date>\n                                </ng-container>\n                                <ng-container *ngIf="sItem.searchItem.type === \'select\'">\n                                    <app-s-selector [options]="sItem.searchItem.config"\n                                        (optionChange)="selectModelChange($event, sItem.searchItem)"></app-s-selector>\n                                </ng-container>\n                                <ng-container *ngIf="sItem.searchItem.type === \'treeSelect\'">\n                                    <app-s-tree-select [treeSelectConfig]="sItem.searchItem.config"\n                                        (treeSelectChange)="treeChange($event, sItem.searchItem)"></app-s-tree-select>\n                                </ng-container>\n                            </ng-container>\n                        </th>\n                    </tr>\n                </thead>\n                <thead *ngIf="tableConfig.theadTemplete">\n                </thead>\n                \x3c!--常规表格--\x3e\n                <tbody>\n                    <ng-container *ngIf="!tableConfig.isEditCol">\n                        <tr *ngFor="let data of pageRecords; let i = index" (click)="rowClick(data)"\n                            [ngClass]="data.active ? \'active\' : \'\'">\n                            \x3c!--单选--\x3e\n                            <td nzShowCheckbox *ngIf="tableConfig.radioCheck" [(nzChecked)]="checkObj[data[checkKey]]"\n                                nzLeft [nzDisabled]="data.disabled" (nzCheckedChange)="singleCheck(i)"\n                                [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}"></td>\n                            \x3c!--多选--\x3e\n                            <td nzShowCheckbox *ngIf="tableConfig.comCheck" [(nzChecked)]="checkObj[data[checkKey]]"\n                                nzLeft [nzDisabled]="data.disabled" (nzCheckedChange)="checkListData(i, data.checked)"\n                                [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}"></td>\n                            \x3c!-- <td nzShowCheckbox *ngIf="tableConfig.comCheck"  [(nzChecked)]="checkObj[data.id]" nzLeft [nzDisabled]="data.disabled"\n                        (nzCheckedChange)="checkListData(data)" [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}"></td> --\x3e\n                            \x3c!-- 序号 --\x3e\n                            \x3c!-- 当表头数据和表格数据同事存在时，显示行号 --\x3e\n                            <td *ngIf="tableConfig.showRowNum && pageData.total > 0 && columns.length"\n                                [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}" nzAlign=\'center\' nzLeft>\n                                {{(pageData.page - 1) * pageData.pageSize + i + 1}}</td>\n                            <ng-container *ngFor="let column of columns; let colI = index">\n                                <td *ngIf="column?.attrs.isTemplete && !column?.attrs.isOperation"\n                                    [nzAlign]="column?.attrs.align">\n                                    <ng-container\n                                        *ngTemplateOutlet="cellContent; context:outCellContext(column?.name, data[column?.name], data, i);">\n                                    </ng-container>\n                                </td>\n                                <td *ngIf="column?.attrs.isTemplete && column?.attrs.isOperation" nzRight\n                                    [nzAlign]="\'center\'">\n                                    <ng-container\n                                        *ngTemplateOutlet="cellContent; context:outCellContext(column?.name, data[column?.name], data, i);">\n                                    </ng-container>\n                                </td>\n                                \x3c!-- <td *ngIf="column?.attrs.isTemplete" [nzAlign]="column?.attrs.align">\n                                <ng-container *ngTemplateOutlet="cellContent; context:outCellContext(column?.name, data[column?.name], data, i);"></ng-container>\n                            </td> --\x3e\n                                <td *ngIf="!column.attrs.isTemplete && !column.attrs.isOperation"\n                                    [nzLeft]="column.attrs.isLeft" [nzRight]="column.attrs.isRight"\n                                    [ngStyle]="{\'overflow\': \'hidden\', \'text-overflow\': \'ellipsis\', \'white-space\': \'nowrap\', \'max-width\': column.width}"\n                                    [title]="data[column?.name] || \'\'">{{data[column?.name]}}</td>\n                            </ng-container>\n                        </tr>\n                    </ng-container>\n\n                    \x3c!-- 编辑单元格 --\x3e\n                    <ng-container *ngIf="tableConfig.isEditCol">\n                        <tr *ngFor="let data of listOfData; let dI = index">\n                            <ng-container *ngFor="let eCol of columns; let eI = index">\n                                <td class="editable-row" nzAlign="left" *ngIf="!eCol.attrs.isOperation"\n                                    [nzLeft]="eCol.attrs.isLeft" [nzRight]="eCol.attrs.isRight">\n                                    <ng-container *ngTemplateOutlet="trTpl; context: {data: data[eCol.name]}">\n                                    </ng-container>\n                                    <ng-template #trTpl let-eColData="data">\n                                        <ng-container *ngIf="eColData">\n                                            <ng-container\n                                                *ngIf="!eColData.others && (eColData.type === \'string\' || eColData.type === \'float\')">\n                                                <div (click)="startEdit(eColData)" [hidden]="eColData.edit"\n                                                    [ngClass]="eColData.ecit? \'active\' : \'editable-cell\'">\n                                                    {{eColData.value}}</div>\n                                                <input *ngIf="eColData.type === \'string\' || \'number\'"\n                                                    [type]="eColData.type === \'string\' ? \'input\' : \'number\'" nz-input\n                                                    [(ngModel)]="eColData.value" [hidden]="!eColData.edit"\n                                                    (blur)="stopEdit(eColData)"\n                                                    [ngClass]="eColData.error ? \'error\' : \'\'" />\n                                            </ng-container>\n                                            <ng-container *ngIf="eColData.others">\n                                                <ng-container *ngIf="eColData.others.type === \'select\'">\n                                                    <app-s-selector [options]="eColData.others"\n                                                        (optionChange)="selectChange(eColData, $event)">\n                                                    </app-s-selector>\n                                                </ng-container>\n                                                <ng-container *ngIf="eColData.others.type === \'date\'">\n                                                    <app-s-date [dateObj]="eColData.others"\n                                                        (dateChange)="getDate(eColData, $event)"></app-s-date>\n                                                </ng-container>\n                                                <ng-container *ngIf="eColData.others.type === \'year\'">\n                                                    <app-s-date [dateObj]="eColData.others"\n                                                        (yearChange)="getDate(eColData, $event)"></app-s-date>\n                                                </ng-container>\n                                                <ng-container *ngIf="eColData.others.type === \'checkBox\'">\n                                                    {{eColData.others.modelChange | json}}\n                                                    <label nz-checkbox [(ngModel)]="eColData.value"\n                                                        (ngModelChange)="checkedChange(eColData, $event)">{{eColData.others.label}}</label>\n                                                </ng-container>\n                                            </ng-container>\n                                        </ng-container>\n                                    </ng-template>\n                                </td>\n                                <ng-container *ngIf="eCol?.attrs.isOperation">\n                                    <td nzAlign=\'center\' nzRight>\n                                        <button *ngIf="tableConfig.showDelete" nz-button nzType="danger" nzDanger\n                                            nzShape="circle"\n                                            (click)="showDeleteModal({event:$event, cellIndex: dI, data: data})"><i\n                                                nz-icon nzType="delete" nzTheme="outline"></i></button>\n                                    </td>\n                                </ng-container>\n                            </ng-container>\n                        </tr>\n                    </ng-container>\n                </tbody>\n            </nz-table>\n            <ng-template #totalTpl let-total>共 {{ total }} 条</ng-template>\n        </div>\n    </div>\n    <div class="fresh" (click)="reload()">\n        <i nz-icon nzType="reload" nzTheme="outline"></i>\n    </div>\n    \x3c!--分页--\x3e\n    \x3c!-- <div class="pager" *ngIf="tableConfig.isPage && pageData.total > 0">\n        <app-s-pager [pageData]=\'pageData\' (pageIndex)="pageIndexChange($event)" (pageSize)="pageSizeChange($event)">\n        </app-s-pager>\n    </div> --\x3e\n</ng-container>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".show-cols-button{float:right}.pager{margin-top:20px;bottom:15px;right:0}.editable-cell{position:relative;padding:5px 12px}.editable-row input.error{border-color:#ff4d4f!important}.stOperationBar{overflow:hidden;padding:5px 0}.fresh{margin-top:20px;position:fixed;bottom:15px;left:240px}.fresh i{background-color:transparent;color:#1890ff;padding:5px;font-size:20px;position:relative;margin:0 5px;cursor:pointer}:host ::ng-deep .ant-select-multiple.ant-select-allow-clear .ant-select-selector{max-height:32px;overflow:auto}:host ::ng-deep .ant-popover-inner-content nz-checkbox-wrapper>div label{display:flex;align-items:center}:host ::ng-deep .ant-popover-inner-content nz-checkbox-wrapper>div label span:last-of-type{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]}),z(6,t.Optional()),z(6,t.Inject(L))],e)}(),F=function(){function e(){this.pageIndex=new t.EventEmitter,this.pageSize=new t.EventEmitter}return e.prototype.ngAfterViewInit=function(){var e=document.getElementsByTagName("nz-pagination")[0].clientHeight;sessionStorage.setItem("pageHeight",JSON.stringify(e))},e.prototype.ngOnInit=function(){},e.prototype.pageIndexChange=function(e){this.pageData.page=e,this.pageIndex.emit(e)},e.prototype.pageSizeChange=function(e){this.pageData.pageSize=e,this.pageSize.emit(e)},C([t.Input()],e.prototype,"pageData",void 0),C([t.Output()],e.prototype,"pageIndex",void 0),C([t.Output()],e.prototype,"pageSize",void 0),e=C([t.Component({selector:"app-s-pager",template:'<div class=\'footer\' id="footer">\n    <nz-pagination\n      [(nzPageIndex)]="pageData.page"\n      [nzTotal]="pageData.total"\n      [(nzPageSize)]="pageData.pageSize"\n      nzShowSizeChanger\n      nzShowQuickJumper\n      (nzPageIndexChange)="pageIndexChange($event)"\n      (nzPageSizeChange)="pageSizeChange($event)"\n      >\n    </nz-pagination>\n    <label>共{{pageData?.total || 0}}条数据</label>\n</div>\n',styles:[".footer{display:flex;text-align:right}.footer label{display:inline-block;padding:0 10px 0 15px;align-self:center}.footer nz-pagination{flex:1}"]})],e)}(),M=function(){function e(e,n){this.httpService=e,this.commonService=n,this.optionChange=new t.EventEmitter,this.style={maxHeight:"150px",overflow:"auto"},this.loading=!1,this.pramas={page:1,pageSize:20},this.compareFn=function(e,t){return e&&t?e.value===t.value:e===t}}return e.prototype.ngOnInit=function(){this.options&&(this.initOptions(),this.options.url&&this.options.defaultLoad&&(this.initParams(),this.options.data=[],this.getOptionsData()))},e.prototype.modelChange=function(e){this.optionChange.emit(e)},e.prototype.getStepMess=function(){},e.prototype.openChange=function(e){},e.prototype.loadMore=function(){this.initParams(),this.options.isPage&&(this.pramas.page+=1,this.getOptionsData())},e.prototype.initParams=function(){var e={};if(this.options.params&&Object.keys(this.options.params).length)for(var t in this.options.params)this.options.params.hasOwnProperty(t)&&this.options.params[t]&&Object.defineProperty(e,t,{value:this.options[t],enumerable:!0,writable:!0});this.options.isPage&&Object.defineProperties(e,{page:{value:this.pramas.page?this.pramas.page:1,enumerable:!0,writable:!0},pageSize:{value:this.options.pageSize?this.options.pageSize:20,enumerable:!0,writable:!0}}),this.pramas=e},e.prototype.getOptionsData=function(){var e=this;this.options.data=[],this.loading=!0,this.httpService.httpGet(this.options.url,this.pramas).subscribe((function(t){1===t.code&&(e.loading=!1,e.options.data=t.data)}))},e.prototype.renderOptionList=function(e){this.options.url?(e.length&&this.resetOPtionData(e),this.options.data=D(this.options.data,e),this.options.defaultLoad&&this.options.isSelectedFirst&&("default"===this.options.mode?this.options.selectedValue={label:this.options.data[0].label,value:this.options.data[0].value,key:this.options.key?this.options.key:null,children:this.options.children?this.options.children:null,parent:this.options.parent?this.options.parent:null}:this.options.selectedValue=[{label:this.options.data[0].label,value:this.options.data[0].value,showStep:this.options.data[0].showStep}])):this.options.data.length&&(this.resetOPtionData(e),this.options.data=e)},e.prototype.resetOPtionData=function(e,t,n){var i=this;e.forEach((function(e){t&&(e.label=e[t]),n&&(e.value=e[n]),e.key=i.options.key?i.options.key:null,e.children=i.options.children?i.options.children:null,e.parent=i.options.parent?i.options.parent:null})),this.options.data=e},e.prototype.initOptions=function(){this.options.allowClear=!this.commonService.isNull(this.options.allowClear)||this.options.allowClear,this.options.showSearch=!this.commonService.isNull(this.options.showSearch)||this.options.showSearch,this.options.disabled=!!this.commonService.isNull(this.options.disabled)&&this.options.disabled,this.options.isPage=!!this.commonService.isNull(this.options.isPage)&&this.options.isPage,this.options.defaultLoad=!!this.commonService.isNull(this.options.defaultLoad)&&this.options.defaultLoad,this.options.selectedValue=this.commonService.isNull(this.options.selectedValue)?this.options.selectedValue:null,this.options.isSelectedFirst=!!this.commonService.isNull(this.options.isSelectedFirst)&&this.options.isSelectedFirst,this.options.params=this.commonService.isNull(this.options.params)?this.options.params:{},this.options.mode&&"default"!==this.options.mode?"tags"===this.options.mode||this.options.mode:this.options.mode="default"},e.ctorParameters=function(){return[{type:S},{type:I}]},C([t.Input()],e.prototype,"options",void 0),C([t.Output()],e.prototype,"optionChange",void 0),e=C([t.Component({selector:"app-s-selector",template:'{{options.label}}\n<nz-select\n      [(ngModel)] = "options.selectedValue"\n      [compareWith] = "compareFn"\n      [nzAllowClear] = "true"\n      [nzShowSearch] = "options.showSearch"\n      [nzDisabled] = "options.disabled"\n      [nzPlaceHolder] = "options.label || options.placeHolder"\n      [nzMode] = "options.mode || \'default\'"\n      [ngStyle] = "{width: options.width || \'180px\'}"\n      (ngModelChange) = "options.modelChange ? options.modelChange($event) : modelChange($event)"\n      (nzOpenChange) = "openChange($event)"\n      (nzScrollToBottom) = "loadMore()"\n      [nzDropdownMatchSelectWidth]="false"\n    >\n    <nz-option *ngFor="let option of options.data" [nzValue]="option" [nzLabel]="option.label"></nz-option>\n    <nz-option *ngIf="loading" nzDisabled nzCustomContent>\n      <i nz-icon nzType="loading" class="loading-icon"></i> Loading Data...\n    </nz-option>\n</nz-select>',styles:[""]})],e)}(),A=function(){function e(e,n){var i=this;this.commonService=e,this.datepipe=n,this.yearChange=new t.EventEmitter,this.monthChange=new t.EventEmitter,this.weekChange=new t.EventEmitter,this.dateChange=new t.EventEmitter,this.rangeDateChange=new t.EventEmitter,this.rangeDate={startDate:null,endDate:null},this.today=new Date,this.all=function(e){return 1e5===d(e,i.today)},this.more=function(e){return d(e,i.today)<-1},this.moreDate=function(e){return d(e,i.today)<0},this.less=function(e){return d(e,i.today)>0},this.removecurentMore=function(e){return d(e,i.today)<1},this.removecurentLess=function(e){return d(e,i.today)>-1},this.startDate=function(e){return!!e&&d(e,i.today)<0},this.startRemoveCurrentDate=function(e){return!!e&&d(e,i.today)<1},this.disableEndDate=function(e){return!!e&&e.getTime()<i.rangeDate.startDate.getTime()},this.disableStart=function(e){return!!e&&e.getTime()>(i.rangeDate.end||new Date).getTime()}}return e.prototype.ngOnChanges=function(e){},e.prototype.ngOnInit=function(){this.initDateObj()},e.prototype.onYearChange=function(e,t){e?this.yearChange.emit(this.datepipe.transform(e,t)):this.yearChange.emit(null)},e.prototype.onMonthChange=function(e,t){e?this.monthChange.emit(this.datepipe.transform(e,t)):this.monthChange.emit(null)},e.prototype.onWeekChange=function(e,t){e?this.weekChange.emit(this.datepipe.transform(e,t)):this.weekChange.emit(null)},e.prototype.onDateChange=function(e,t){this.dateChange.emit(this.isShowTimeFormat(e,t))},e.prototype.rangeChange=function(e,t){var n=O(e,2),i=n[0],o=n[1],a={startDate:this.isShowTimeFormat(i,t),endDate:this.isShowTimeFormat(o,t)};this.rangeDateChange.emit(a)},e.prototype.onRangeDateChange=function(e,t,n){e?"start"===n?(this.rangeDate.startDate=e,t.endDisabled=!1):this.rangeDate.endDate=e:"start"===n?(t.startValue=null,t.endValue=null,this.rangeDate.startDate=null,this.rangeDate.endValue=null,t.endDisabled=!0):(t.endValue=null,this.rangeDate.endValue=null,this.rangeDate.endDate=null);var i={startDate:this.isShowTimeFormat(this.rangeDate.startDate,t),endDate:this.isShowTimeFormat(this.rangeDate.endDate,t)};this.rangeDateChange.emit(i)},e.prototype.isShowTimeFormat=function(e,t){var n,i;return e?(i=t.showTime?t.format?t.format:"yyyy-MM-dd HH:mm:ss":t.format?t.format:"yyyy-MM-dd",n=this.datepipe.transform(e,i)):n=null,n},e.prototype.initDateObj=function(){var e=this.dateObj;e.allowClear=!this.commonService.isNull(e.allowClear)||e.allowClear,e.showTime=!!this.commonService.isNull(e.showTime)&&e.showTime,e.disabled=!!this.commonService.isNull(e.disabled)&&e.disabled,e.showToday=!!this.commonService.isNull(e.showToday)&&e.showToday,e.isRemoveCurrent=!!this.commonService.isNull(e.isRemoveCurrent)&&e.isRemoveCurrent,e.isMoreCurrent=!!this.commonService.isNull(e.isMoreCurrent)&&e.isMoreCurrent,e.isLessCurrent=!!this.commonService.isNull(e.isLessCurrent)&&e.isLessCurrent,"rangDate"===e.type&&(e.endDisabled=!0),this.dateObj=e},e.ctorParameters=function(){return[{type:I},{type:n.DatePipe}]},C([t.Input()],e.prototype,"dateObj",void 0),C([t.Output()],e.prototype,"yearChange",void 0),C([t.Output()],e.prototype,"monthChange",void 0),C([t.Output()],e.prototype,"weekChange",void 0),C([t.Output()],e.prototype,"dateChange",void 0),C([t.Output()],e.prototype,"rangeDateChange",void 0),e=C([t.Component({selector:"app-s-date",template:'<ng-container *ngIf="dateObj.type === \'year\'">\n    {{dateObj.label}}\n    <nz-year-picker\n        [(ngModel)] = "dateObj.value"\n        [nzPlaceHolder] = "dateObj.label || \'请选择年份\'"\n        [nzFormat] = "dateObj.format || \'yyyy\'"\n        [nzDisabled] = "dateObj.disabled"\n        [ngStyle] = "{width: dateObj.width || \'180px\'}"\n        [nzDisabledDate] = "dateObj.isMoreCurrent && !dateObj.isRemoveCurrent? more : dateObj.isLessCurrent && !dateObj.isRemoveCurrent ? less : dateObj.isMoreCurrent && dateObj.isRemoveCurrent ? removecurentMore: dateObj.isLessCurrent && dateObj.isRemoveCurrent ? removecurentLess: all"\n        (ngModelChange) = "onYearChange($event, dateObj.format || \'yyyy\')">\n    </nz-year-picker>\n</ng-container>\n<ng-container *ngIf="dateObj.type === \'month\'">\n    {{dateObj.label}}\n    <nz-month-picker\n        [(ngModel)] = "dateObj.value"\n        [nzFormat] = "dateObj.format || \'yyyy-MM\'"\n        [nzDisabled] = "dateObj.disabled"\n        [ngStyle] = "{width: dateObj.width || \'180px\'}"\n        [nzPlaceHolder] = "dateObj.label || \'请选择月份\'"\n        [nzDisabledDate] = "dateObj.isMoreCurrent && !dateObj.isRemoveCurrent? more : dateObj.isLessCurrent && !dateObj.isRemoveCurrent ? less : dateObj.isMoreCurrent && dateObj.isRemoveCurrent ? removecurentMore: dateObj.isLessCurrent && dateObj.isRemoveCurrent ? removecurentLess: all"\n        (ngModelChange) = "onMonthChange($event, dateObj.format || \'yyyy-MM\')">\n    </nz-month-picker>\n</ng-container>\n<ng-container *ngIf="dateObj.type === \'week\'">\n    {{dateObj.label}}\n    <nz-week-picker\n        [nzDisabled] = "dateObj.disabled"\n        [(ngModel)] = "dateObj.value" \n        [nzPlaceHolder] = "dateObj.label || \'请选择工作周\'"\n        [ngStyle] = "{width: dateObj.width || \'180px\'}"\n        [nzDisabledDate] = "dateObj.isMoreCurrent && !dateObj.isRemoveCurrent? more : dateObj.isLessCurrent && !dateObj.isRemoveCurrent ? less : dateObj.isMoreCurrent && dateObj.isRemoveCurrent ? removecurentMore: dateObj.isLessCurrent && dateObj.isRemoveCurrent ? removecurentLess: all"\n        (ngModelChange) = "onWeekChange($event, dateObj.format || \'yyyy-ww\')">\n    </nz-week-picker>\n</ng-container>\n<ng-container *ngIf="dateObj.type === \'date\'">\n    {{dateObj.label}}\n    <nz-date-picker\n        [(ngModel)] = "dateObj.value" \n        [nzDisabled] = "dateObj.disabled"\n        [nzShowTime] = "dateObj.showTime"\n        [nzShowToday] = "dateObj.showToday"\n        [nzPlaceHolder] = "dateObj.label || \'请选择日期\'"\n        [ngStyle] = "{width: dateObj.width || \'180px\'}"\n        [nzDisabledDate] = "dateObj.isMoreCurrent && !dateObj.isRemoveCurrent? moreDate : dateObj.isLessCurrent && !dateObj.isRemoveCurrent ? less : dateObj.isMoreCurrent && dateObj.isRemoveCurrent ? removecurentMore: dateObj.isLessCurrent && dateObj.isRemoveCurrent ? removecurentLess: all"\n        (ngModelChange) = "onDateChange($event, dateObj)"\n        (nzOnOk) = "onDateChange($event, dateObj)"\n    >\n    </nz-date-picker>\n</ng-container>\n<ng-container *ngIf="dateObj.type === \'rangDate\'">\n    <nz-range-picker\n        [(ngModel)] = "dateObj.value"\n        (ngModelChange)="rangeChange($event, dateObj)"\n        [nzShowTime]="dateObj.showTime">\n    </nz-range-picker>\n    \x3c!-- {{dateObj.startLabel}}\n    <nz-date-picker \n        [(ngModel)] = "dateObj.startValue" \n        [nzDisabled] = "dateObj.startDisabled"\n        [nzShowTime] = "dateObj.showTime"\n        [nzShowToday] ="dateObj.showToday"\n        [ngStyle] = "{width: dateObj.width || \'180px\', display: \'inline-block\'}"\n        [nzPlaceHolder] = "dateObj.startLabel || \'选择开始日期\'"\n        (ngModelChange) = "onRangeDateChange($event, dateObj, \'start\')"\n        (nzOnOk) = "onRangeDateChange($event, dateObj, \'start\')"\n        [nzDisabledDate] = "disableStart"\n    ></nz-date-picker>\n    <!~~ <span [ngStyle]="{width: \'10px\', display: \'inline-block\'}"></span> ~~>\n    {{dateObj.endLabel}}\n    <nz-date-picker \n        [(ngModel)] = "dateObj.endValue" \n        [nzDisabled] = "dateObj.endDisabled"\n        [nzShowTime] = "dateObj.showTime"\n        [nzShowToday] ="dateObj.showToday"\n        [ngStyle] = "{width: dateObj.width || \'180px\', display: \'inline-block\'}"\n        [nzPlaceHolder] = "dateObj.endLabel || \'选择结束日期\'"\n        (ngModelChange) = "onRangeDateChange($event, dateObj, \'end\')"\n        [nzDisabledDate] = "disableEndDate"\n        (nzOnOk) = "onRangeDateChange($event, dateObj, \'end\')">\n    </nz-date-picker> --\x3e\n</ng-container>\n',providers:[n.DatePipe],styles:[""]})],e)}(),N=function(){function e(e,t){this.messageService=e,this.modalService=t}return e.prototype.ngOnInit=function(){},e.ctorParameters=function(){return[{type:i.NzMessageService},{type:i.NzModalService}]},C([t.Input()],e.prototype,"modalData",void 0),e=C([t.Component({selector:"app-s-modal",template:"",styles:[""]})],e)}(),R=function(){function e(e,n){this.httpService=e,this.commonService=n,this.currentNode=new t.EventEmitter,this.columns=[],this.pageRecords=[],this.loading=!1,this.scroll={x:"100%",y:"500px"},this.right=!1,this.fixedItem="60px",this.pageData={page:1,pageSize:50,total:0},this.params={},this.listOfMapData=[{name:"1",age:60,address:"1",children:[{name:"11",age:42,address:"11"},{name:"12",age:30,address:"12",children:[{name:"121",age:16,address:"121"}]},{name:"13",address:"13",children:[{name:"131",age:42,address:"131",children:[{name:"1311",age:25,address:"1311"},{name:"1312",age:18,address:"1312"}]}]}]},{name:"1",age:32,address:"1"}],this.mapOfExpandedData={}}return e.prototype.ngOnInit=function(){var e=this;this.columns=this.treeObj.columns,this.setKey(this.listOfMapData,0),this.listOfMapData.forEach((function(t){e.mapOfExpandedData[t.key]=e.convertTreeToList(t)})),this.initTableWidth(),this.windResize()},e.prototype.ngOnChanges=function(e){},e.prototype.changesLoadTable=function(e){e.treeObj.currentValue&&(this.treeObj=e.treeObj.currentValue,this.treeObj.tableData?this.getLocalDatas():(this.getDynamicHeaders(),this.getTableData()),this.windResize())},e.prototype.getLocalDatas=function(){this.setDefaultAttr(),this.listOfMapData=this.treeObj.tableData||[],this.columns=this.treeObj.columns,this.initTableWidth()},e.prototype.initParams=function(){var e={};if(this.treeObj.isPage&&Object.defineProperties(e,{pageSize:{value:this.pageData.pageSize,enumerable:!0},page:{value:this.pageData.page,enumerable:!0}}),this.treeObj.tableParams&&Object.keys(this.treeObj.tableParams).length)for(var t in this.treeObj.tableParams)this.treeObj.tableParams.hasOwnProperty(t)&&this.treeObj.tableParams[t]&&Object.defineProperty(e,t,{value:this.treeObj.tableParams[t],enumerable:!0});this.params=e},e.prototype.getDynamicHeaders=function(){return w(this,void 0,void 0,(function(){var e;return x(this,(function(t){switch(t.label){case 0:return this.treeObj.titleUrl&&this.treeObj.titleParams&&this.getDynamicHeaders(),[4,this.httpService.httpPost(this.treeObj.titleUrl,this.treeObj.titleParams).toPromise()];case 1:return 1===(e=t.sent()).code&&e.MapperList&&e.MapperList.length&&this.initDynamicHeaders(e.MapperList),[2]}}))}))},e.prototype.initDynamicHeaders=function(e){var t=this;e.forEach((function(e){if(e.PropertyName){var n={header:"",name:"",type:"",width:""};n.header=e.ShowName,n.name=e.PropertyName,e.ShowFormatter&&(n.type=e.ShowFormatter.type,n.width=e.ShowFormatter.width,"true"===e.ShowFormatter.isTemplete&&Object.defineProperty(n,"isTemplete",{value:!0,enumerable:!0})),t.columns.push(n)}})),this.treeObj.isOperation&&this.columns.push(this.treeObj.operationObj),this.initTableWidth()},e.prototype.getTableData=function(){return w(this,void 0,void 0,(function(){var e;return x(this,(function(t){switch(t.label){case 0:return this.treeObj.tableUrl?this.treeObj.defaultLoad?(this.initParams(),this.loading=!0,[4,this.httpService.httpGet(this.treeObj.tableUrl,this.params).toPromise()]):[3,2]:[3,3];case 1:return 1===(e=t.sent()).code&&this.inintTableDatas(e),this.loading=!1,[3,3];case 2:this.pageRecords=[],t.label=3;case 3:return[2]}}))}))},e.prototype.inintTableDatas=function(e){var t=this;this.inintTableDatas(e),this.pageData.total=e.data.totalCount,this.listOfMapData=e.data.data,this.setKey(this.listOfMapData,0),this.listOfMapData.forEach((function(e){t.mapOfExpandedData[e.key]=t.convertTreeToList(e)}))},e.prototype.setKey=function(e,t){var n=this;e.forEach((function(e,i){n.treeObj.isExpandAll&&Object.defineProperty(e,"expanded",{value:!0,enumerable:!0,writable:!0});var o=i+1;t&&(o=Number(String(t)+String(o))),e.key=o,e.active=!1,e.checked=!1,e.children&&n.setKey(e.children,o)}))},e.prototype.setAttributes=function(e,t){var n=this;e.forEach((function(i,o){n.treeObj.isExpandAll&&Object.defineProperty(i,"expanded",{value:!0,enumerable:!0,writable:!0}),i.active=!1,i.checked=!1;var a=o+1;t&&(a=Number(String(t)+String(a))),i.key=a,e.children&&e.children.length&&n.setAttributes(e.children,a)}))},e.prototype.collapse=function(e,t,n){var i=this;if(n)this.currentNode.emit(t);else{if(!t.children)return;t.children.forEach((function(t){var n=e.find((function(e){return e.key===t.key}));n.expanded=!1,i.collapse(e,n,!1)}))}},e.prototype.convertTreeToList=function(e){var t=[],n=[],i={},o=!1;for(this.treeObj&&this.treeObj.isExpandAll&&(o=!0),t.push(v(v({},e),{level:0,expanded:o,active:!1,checked:!1}));0!==t.length;){var a=t.pop();if(this.visitNode(a,i,n),a.children)for(var r=a.children.length-1;r>=0;r--)t.push(v(v({},a.children[r]),{level:a.level+1,expand:!1,parent:a}))}return n},e.prototype.visitNode=function(e,t,n){t[e.key]||(t[e.key]=!0,n.push(e))},e.prototype.initTableWidth=function(){var e=0,t=new RegExp("px","g"),n=document.body.clientWidth;(this.treeObj.radioCheck||this.treeObj.comCheck||this.treeObj.showRowNum)&&(e=60),this.columns.forEach((function(n){var i=n.width;"string"==typeof i&&(-1===i.indexOf("px")?(e+=parseInt(i,0),n.width=n.width+"px"):(i=i.toString().replace(t,""),e+=parseInt(i,0)))})),this.scroll.x=n<e+20?e+20+"px":"100%"},e.prototype.windResize=function(){var e=this;r.fromEvent(window,"resize").subscribe((function(t){t.isTrusted&&e.initTableWidth()}))},e.prototype.outCellContext=function(e,t,n){return{$implicit:e,value:t,record:n}},e.prototype.rowClick=function(e){this.activeKey=e,this.setRowActive(this.listOfMapData)},e.prototype.setRowActive=function(e){for(var t=0;t<e.length;t++){if(e[t].active=e[t].checked=!1,e[t].key===this.activeKey){e[t].active=e[t].checked=!0;break}e[t].children&&e[t].children.length&&this.setRowActive(e[t].children)}},e.prototype.setDefaultAttr=function(){this.treeObj.defaultLoad=!this.commonService.isNull(this.treeObj.defaultLoad)||this.treeObj.defaultLoad,this.treeObj.isPage=!this.commonService.isNull(this.treeObj.isPage)||this.treeObj.defaultLoad,this.treeObj.isPage&&(this.pageData.page=this.treeObj.page?this.treeObj.page:1,this.pageData.pageSize=this.treeObj.pageSize?this.treeObj.pageSize:50),this.treeObj.isOperation=!!this.commonService.isNull(this.treeObj.isOperation)&&this.treeObj.isOperation,this.addOperationItem()},e.prototype.addOperationItem=function(){var e=this;if(this.treeObj.isOperation){var t="200px";this.treeObj.operationWidth&&(t=this.treeObj.operationWidth),this.treeObj.operationObj={name:"operation",header:"操作",attrs:{width:t,isTemplete:!0,isOperation:!0,isRight:!0}},setTimeout((function(){e.right=!0}))}},e.ctorParameters=function(){return[{type:S},{type:I}]},C([t.Input()],e.prototype,"cellContent",void 0),C([t.Input()],e.prototype,"treeObj",void 0),C([t.Output()],e.prototype,"currentNode",void 0),e=C([t.Component({selector:"app-s-tree-table",template:'<nz-table #expandTable [nzData]="listOfMapData" [nzShowPagination]="false" nzBordered [nzScroll]="scroll" [nzLoading]="loading">\n    <thead>\n        <tr>\n            \x3c!--单选--\x3e\n             \x3c!-- <th [nzWidth]="fixedItem" *ngIf="treeObj.radioCheck" nzAlign="center" [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}">选项</th> --\x3e\n            \x3c!--多选--\x3e\n          \x3c!-- <th [nzWidth]="fixedItem" *ngIf="tableObj.comCheck" nzShowCheckbox nzAlign="center" [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}"\n              [(nzChecked)]="!allUnChecked"\n              [nzIndeterminate]="indeterminate"\n              (nzCheckedChange)="checkAll($event)">\n          </th> --\x3e\n          <ng-container *ngFor="let thItem of columns">\n            <th *ngIf="!thItem.isOperation" [nzWidth]=\'thItem?.width\' [nzAlign]="thItem?.align || \'left\'">{{thItem.header}}</th>\n            <th *ngIf="thItem.isOperation" [nzWidth]=\'thItem?.width\' [nzRight]="right" [nzAlign]="thItem?.align || \'center\'">{{thItem?.header}}</th>\n          </ng-container>\n        </tr>\n    </thead>\n    <tbody>\n        <tbody>\n            <ng-container *ngFor="let data of expandTable.data; let di = index">\n                <ng-container *ngFor="let item of mapOfExpandedData[data.key]; let mapIndex = index">\n                    <tr *ngIf="(item.parent && item.parent.expanded) || !item.parent" [ngClass]="item.active ? \'active\' : \'\'" (click)="rowClick(item.key)">\n                        \x3c!-- <td nzShowCheckbox *ngIf="treeObj.radioCheck" [(nzChecked)]="data.checked"\n                        (nzCheckedChange)="singleCheck(mapOfExpandedData[data.key], $event)" [ngStyle]="{\'min-width\': fixedItem, width: fixedItem}"></td> --\x3e\n                        <ng-container *ngFor="let col of treeObj.columns; let colIndex = index">\n                            <td *ngIf="col?.isTemplete && !col.isOperation" [nzAlign]="col?.align">\n                                <ng-container *ngTemplateOutlet="cellContent; context:outCellContext(col?.name, item[col?.name], item);"></ng-container>\n                            </td>\n                            <td *ngIf="col?.isTemplete && col.isOperation" nzAlign="center" [nzRight]="right">\n                                <ng-container *ngTemplateOutlet="cellContent; context:outCellContext(col?.name, item[col?.name], item);"></ng-container>\n                            </td>\n                            <td *ngIf="!col.isTemplete && !col.isOperation" [ngStyle] = "{\'overflow\': \'hidden\', \'text-overflow\': \'ellipsis\', \'white-space\': \'nowrap\', \'max-width\': col.width}" [title]=\'item[col?.name]\'\n                                [nzIndentSize]="item.level * 20"\n                                [nzShowExpand]="!!item.children && colIndex === 0"\n                                [(nzExpand)]="item.expanded"\n                                (nzExpandChange)="collapse(mapOfExpandedData[data.key], item, $event)"\n                                >\n                                {{ item[col?.name] }}\n                            </td>\n                        </ng-container>\n                    </tr>\n                </ng-container>\n            </ng-container>\n        </tbody>\n  </nz-table>',styles:[""]})],e)}(),V=function(){function e(e){this.commonService=e,this.inputChange=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.initAtrr()},e.prototype.initAtrr=function(){this.inputObj.disabled=!!this.commonService.isNull(this.inputObj.disabled)&&this.inputObj.disabled},e.prototype.modelChange=function(e){this.inputChange.emit(e)},e.ctorParameters=function(){return[{type:I}]},C([t.Input()],e.prototype,"inputObj",void 0),C([t.Output()],e.prototype,"inputChange",void 0),e=C([t.Component({selector:"app-s-input",template:'{{inputObj.label}}\n<input\n  nz-input\n  [type]="inputObj.type || \'text\'"\n  [ngStyle]="{ width: inputObj.width || \'200px\' }"\n  [disabled]="inputObj.disabled"\n  [(ngModel)]="inputObj.value"\n  [placeholder]="inputObj.label"\n  (ngModelChange)="modelChange($event)"\n/>\n',styles:[""]})],e)}(),G=function(){function e(e,t){this.httpService=e,this.commonService=t,this.stepsDataList=[],this.testData=[{createTime:"2020-05-13 10:00:00",bizTraceCorrelationCode:"跟踪码",bizTraceType:"执行过程跟踪|数据有效性跟踪|权限管理跟踪",bizTraceStep:"step1",bizTraceMessage:"快件123456已经到达 【潮汕中心】",bizTraceData:{showIcon:"home",creatorName:"用户2",creatorType:"用户",creatorId:"5eba3eefc1c6ae0001be31b0"},bizTraceChanges:[{fieldName:"xxxxStatus1",fieldCode:"xxxxStatusCode1",valueOriginal:"xxxx1",valueCurrent:"xxxxx2",permissionInfo:"xx中心临时授权",message:"切换为2，该xxx开放访问权限"},{fieldName:"xxxxStatus2",fieldCode:"xxxxStatusCode2",valueOriginal:"xxxx2",valueCurrent:"xxxxx3",permissionInfo:"xx用户组固定授权",message:"切换为3，仅admin可见"}],bizTraceActions:[{actionName:"查看那位仁兄",actionType:"Goto",actionUrl:"http://biz/view/123456",actionContent:{a:1,b:2}},{actionName:"拨打成都调度中心电话",actionType:"Pop",actionUrl:"http://biz/related/123456",actionContent:{a:1,b:2}},{actionName:"转发一把",actionType:"PostData",actionUrl:"http://biz/relay/123456",actionContent:{a:1,b:2}}]},{createTime:"2020-05-11 10:00:00",bizTraceCorrelationCode:"跟踪码",bizTraceType:"执行过程跟踪|数据有效性跟踪|权限管理跟踪",bizTraceStep:"step2",bizTraceMessage:"快件123456已经到达 【潮汕中心】",bizTraceData:{showIcon:"",creatorName:"用户1",creatorType:"系统",creatorId:"5eba3eefc1c6ae0001be31b0"},bizTraceChanges:[{fieldName:"xxxxStatus1",fieldCode:"xxxxStatusCode1",valueOriginal:"xxxx1",valueCurrent:"xxxxx2",permissionInfo:"xx中心临时授权",message:"切换为2，该xxx开放访问权限"},{fieldName:"xxxxStatus2",fieldCode:"xxxxStatusCode2",valueOriginal:"xxxx2",valueCurrent:"xxxxx3",permissionInfo:"xx用户组固定授权",message:"切换为3，仅admin可见"}],bizTraceActions:[{actionName:"查看那位仁兄",actionType:"Goto",actionUrl:"http://biz/view/123456",actionContent:{a:1,b:2}},{actionName:"拨打成都调度中心电话",actionType:"Pop",actionUrl:"http://biz/related/123456",actionContent:{a:1,b:2}},{actionName:"转发一把",actionType:"PostData",actionUrl:"http://biz/relay/123456",actionContent:{a:1,b:2}}]}]}return e.prototype.ngOnInit=function(){this.setDefaultAttrs(),this.stepsObj.data&&(this.stepsDataList=D(this.stepsObj.data)),this.getStepsData()},e.prototype.getStepsData=function(){return w(this,void 0,void 0,(function(){var e;return x(this,(function(t){switch(t.label){case 0:return this.stepsObj.url?[4,this.httpService.httpGet(this.stepsObj.url,this.stepsObj.params).toPromise()]:[3,2];case 1:1===(e=t.sent()).code&&this.initStepsData(e.data.data),t.label=2;case 2:return[2]}}))}))},e.prototype.initStepsData=function(e){var t=this;this.stepsDataList=[],e.length&&e.forEach((function(e,n){var i="该信息由"+e.bizTraceData.creatorName+"("+e.bizTraceData.creatorType+")于"+e.createTime+"创建",o={title:e.bizTraceStep||"",subTitle:i,icon:e.bizTraceData.showIcon||"up-circle",description:{title:e.bizTraceMessage,btnGroup:[]}};e.bizTraceActions&&e.bizTraceActions.length&&e.bizTraceActions.forEach((function(e){var t={actionName:e.actionName,actionType:e.actionType,actionUrl:e.actionUrl,actionContent:e.actionContent};o.description.btnGroup.push(t)})),t.stepsDataList.push(o)}))},e.prototype.btnClick=function(e){},e.prototype.setDefaultAttrs=function(){},e.ctorParameters=function(){return[{type:S},{type:I}]},C([t.Input()],e.prototype,"stepsObj",void 0),e=C([t.Component({selector:"app-s-steps",template:'<nz-steps nzSize="small" *ngIf="stepsObj" [nzDirection]="stepsObj.direction || \'vertical\'">\n    <ng-container *ngIf="stepsDataList.length">\n        <nz-step *ngFor="let item of stepsDataList; let i = index"\n            [nzTitle]="item.title"\n            [nzSubtitle]="item.subTitle"\n            [nzIcon]="iconTemp"\n            [nzDescription]="temp"\n            >\n            \x3c!-- <i nz-icon nzType="file" nzTheme="outline"></i> --\x3e\n            <ng-template #temp>\n                <div>{{item.description.title}}</div>\n                <ng-container *ngIf="item.description.btnGroup.length">\n                    <button class="btn" *ngFor="let b of item.description.btnGroup" nz-button nzType="primary" nzSize="small" (click)="btnClick(b)">{{b.actionName}}</button>\n                </ng-container>\n            </ng-template>\n            <ng-template #iconTemp>\n                <i nz-icon [nzType]="item.icon" nzTheme="outline" style="font-size: 18px;"></i>\n            </ng-template>\n        </nz-step>\n    </ng-container>\n</nz-steps>',styles:[".btn{margin-right:5px}"]})],e)}(),B=function(){function e(e){this.httpService=e,this.filterOPtions=[],this.childrenList=[],this.compareFn=function(e,t){return e&&t?e.value===t.value:e===t}}return e.prototype.ngOnInit=function(){},e.prototype.getOptionData=function(e){var t=this;return e.url?e.params&&this.httpService.httpGet(e.url,e.params).subscribe((function(n){1===n.code&&(e.data=t.renderOptionList(e,n.data))})):console.log("重新请求数据"),e},e.prototype.renderOptionList=function(e,t){return e.data=[],t.length&&t.forEach((function(t){e.name&&(t.label=t[e.name]),e.value&&(t.value=t[e.value]),t.id=e.id?e.id:null,t.key=e.key?e.key:null,t.children=e.children?e.children:null,t.parent=e.parent?e.parent:null})),t},e.prototype.setChildrenParams=function(e){var t=this;if(e.children&&e.parent){var n=this.optionList.filter((function(t){return t.parent&&t.parent===e.id}));n.length&&n.forEach((function(n){n.params=e.params,t.setChildrenParams(n)}))}},e.prototype.clearChildren=function(e){var t=this;if(e.children&&e.parent){var n=this.optionList.filter((function(t){return t.parent&&t.parent===e.id}));n.length&&n.forEach((function(e){e.selectedValue=null,e.data=[],e.params={},t.clearChildren(e)}))}},e.prototype.optionChange=function(e,t){var n=this,i=this.optionList.filter((function(t){return t.parent===e.id}));t?t&&t.children&&i.forEach((function(i){i.params[e.key]=t.value,t.parent&&(i.params=e.params),i.defaultLoad=!0,i=n.getOptionData(i),n.setChildrenParams(i)})):i.forEach((function(e){e.selectedValue=null,e.data=[],e.params={},n.clearChildren(e)}))},e.ctorParameters=function(){return[{type:S}]},C([t.Input()],e.prototype,"optionList",void 0),e=C([t.Component({selector:"app-s-linkage",template:'<div class=\'selectWapper\'>\n    <app-s-selector style="margin-right: 10px;" *ngFor="let option of optionList" [options]="option" (optionChange)="option.modelChange ? option.modelChange(option) : optionChange(option, $event)"></app-s-selector>\n</div>',styles:[".selectWapper{display:flex}"]})],e)}();function H(e){return/^\s+$/.test(e.value)?{required:{value:e.value}}:null}var q=function(){function e(e,n,i,o){var a=this;this.fb=e,this.datepipe=n,this.commonService=i,this.httpService=o,this.prefixCode="",this.formvalidate=new t.EventEmitter,this.selectChangeEmit=new t.EventEmitter,this.treeSelectChangeEmit=new t.EventEmitter,this.formData=[],this.today=new Date,this.optionList=[],this.nodeTitle="",this.style={maxHeight:"150px",overflow:"auto"},this.compareFn=function(e,t){return e&&t?e.value===t.value:e===t},this.all=function(e){return 1e5===d(e,a.today)},this.more=function(e){return d(e,a.today)<-1},this.moreDate=function(e){return d(e,a.today)<0},this.less=function(e){return d(e,a.today)>0},this.removecurentMore=function(e){return d(e,a.today)<1},this.removecurentLess=function(e){return d(e,a.today)>-1}}return e.prototype.customPrecisionFn=function(e,t){return+Number(e).toFixed(t)},e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.formObj.currentValue&&(this.initForm(),this.initFormData(),this.getCascaderData(),this.getTreeSelectData(),this.getSelectData())},e.prototype.ngOnDestroy=function(){this.removeControl()},e.prototype.removeControl=function(){this.formGroup=null},e.prototype.initForm=function(){var e=this;this.formObj.items;for(var t in this.formData=[],this.formObj.items)if(this.formObj.items.hasOwnProperty(t)){var n=this.formObj.items[t];n.name=t,this.formData.push(n)}this.formData.forEach((function(t){e.formObj.add?t.isEdit=!0:e.formObj.update&&(t.isEdit=!1),t.n&&t.n.length>0&&(t.ui.type="number",t.type="number",1===t.n.length&&parseInt(t.n[0],0)>=20&&(t.ui.type="text",t.type="text"),2===t.n.length&&(parseInt(t.n[0],0)>=20||parseInt(t.n[1],0)>=20)&&(t.ui.type="text",t.type="text"))})),this.formObj.items&&(this.optionList=Object.values(this.formObj.items))},e.prototype.initFormData=function(){var e=this;this.formGroup=this.fb.group({}),this.formData.forEach((function(t,n){var i=[];t.isRequire&&(i.push(a.Validators.required),i.push(H)),"text"!==t.ui.type&&"textArea"!==t.ui.type||t.maxLength&&i.push(a.Validators.maxLength(t.maxLength)),"phone"===t.format&&i.push(a.Validators.pattern(/^1[3-9][0-9]{9}$|^\d{3}(-)?\d{8}$|^\d{4}(-)?\d{7}$/)),"postalCode"===t.format&&i.push(a.Validators.pattern(/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/)),"chinese"===t.format&&i.push(a.Validators.pattern(/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/)),"letterNumber"===t.format&&i.push(a.Validators.pattern(new RegExp("^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{2,"+t.maxLength+"}$"))),("number"===t.ui.type||t.n)&&t.n&&i.push(a.Validators.pattern(e.setNumberPattern(t.n))),t.pattern&&i.push(a.Validators.pattern(t.pattern));var o=!1;t.ui.unEdit&&!e.formObj.isEdit&&(o=!0),e.formGroup.addControl(t.name,new a.FormControl({value:t.value||null,disabled:o},i)),"select"!==t.ui.type&&"treeSelect"!==t.ui.type&&"treeSelectMultiple"!==t.ui.type||(e.formGroup.addControl(t.name+"Dir",new a.FormControl(null,null)),e.formGroup.addControl(t.name.replace("Id","")+"Dir",new a.FormControl(null,null)),e.formGroup.addControl(""+t.name.replace("Id","Name"),new a.FormControl(null,null))),"date"!==t.ui.type&&"year"!==t.ui.type&&"month"!==t.ui.type||e.formGroup.addControl(t.name+"Pipe",new a.FormControl("",null))})),this.formvalidate.emit(this.formGroup)},e.prototype.getSelectLabel=function(e){var t;if(e&&e.name&&e.ui&&e.ui.data){var n=e.name,i=e.ui,o=i.data,a=i.mode,r=this.formGroup.get(n).value;return"multiple"===a?r.map((function(e){var t;return null===(t=o.find((function(t){return t.value===e})))||void 0===t?void 0:t.label})).join(","):null===(t=o.find((function(e){return e.value===r})))||void 0===t?void 0:t.label}return""},e.prototype.getTreeLabel=function(e,t){if(t&&e&&e.name&&e.ui&&e.ui.data){var n=e.name,i=e.ui,o=(i.data,i.mode,this.formGroup.get(n).value);if(o){var a=t.getTreeNodeByKey(o);if(a)return a.title}}return""},Object.defineProperty(e.prototype,"formValue",{get:function(){return this.formGroup.getRawValue()},enumerable:!0,configurable:!0}),e.prototype.setNumberPattern=function(e){var t;return 1===e.length?t=new RegExp("(?:^[1-9]([0-9]{0,"+(e[0]-1)+"})$)|(?:^(?:0){1}$)"):2===e.length&&(t=new RegExp("(?:^[1-9]([0-9]{0,"+(e[0]-1)+"})?(?:\\.[0-9]{1,"+e[1]+"})?$)|(?:^(?:0){1}$)|(?:^[0-9](?:\\.[0-9]{1,"+e[1]+"})?$)")),t},e.prototype.selectChange=function(e,t){var n,i=this;if(this.selectChangeEmit.emit({name:t.name,value:e,data:t.ui.data}),t.ui.modelChange)return t.ui.modelChange(e);if(!t.children&&!t.parent)if(e&&t.ui.data){var o=void 0;(o="multiple"===t.ui.mode?e.map((function(e){var n;return null===(n=t.ui.data.find((function(t){return t.value===e})))||void 0===n?void 0:n.label})).join(","):null===(n=t.ui.data.find((function(t){return t.value===e})))||void 0===n?void 0:n.label)&&this.formGroup.controls[t.name+"Dir"].setValue(o),o&&this.formGroup.controls[t.name.replace("Id","")+"Dir"].setValue(o)}else this.formGroup.controls[t.name+"Dir"].setValue(""),this.formGroup.controls[t.name.replace("Id","")+"Dir"].setValue("");var a=this.optionList.filter((function(e){return e.parent===t.name}));e?a.forEach((function(n){n.params[t.key]=e,n.defaultLoad=!0,i.getOptionsData(n,n),i.setChildrenParams(n)})):a.forEach((function(e){e.selectedValue=null,e.data=[],e.params={},i.clearChildren(e)}))},e.prototype.getSelectData=function(){var e=this;this.formData.filter((function(e){return e&&("select"===e.ui.type||"selectMultiple"===e.ui.type)})).forEach((function(t){t.ui.url&&e.getOptionsData(t.ui,t)}))},e.prototype.getTreeSelectData=function(){var e=this;this.formData.filter((function(e){return e&&("treeSelect"===e.ui.type||"treeSelectMultiple"===e.ui.type)})).forEach((function(t){t.ui.loading=!0;var n=t.ui.url,i=t.ui.params||{};e.httpService.httpGet(n,i).subscribe((function(n){1===n.code&&(t.data=n.data,e.initTreeSelectData(t,n.data),t.ui.loading=!1)}))}))},e.prototype.initTreeSelectData=function(e,t){e.data=[];var n=function(e){if(e.length>0)for(var t=0;t<e.length;t++){var i=e[t],o=i.label,a=i.value,r=i.text,s=i.key,l=i.data;Object.defineProperty(e[t],"title",{value:o||r,enumerable:!0}),Object.defineProperty(e[t],"key",{value:a||s||l,enumerable:!0}),delete e[t].label,delete e[t].value,e[t].children&&e[t].children.length>0?n(e[t].children):e[t].children&&0!==e[t].children.length||Object.defineProperty(e[t],"isLeaf",{value:!0,enumerable:!0})}};n(t),e.ui.data=t},e.prototype.getCascaderData=function(){var e=this;this.formData.filter((function(e){return e&&"cascader"===e.ui.type})).forEach((function(t){var n=t.ui.url,i=t.ui.params||{};e.httpService.httpGet(n,i).subscribe((function(n){1===n.code&&(t.data=n.data,e.initCascaderData(t,n.data))}))}))},e.prototype.initCascaderData=function(e,t){e.data=[];var n=function(e){if(e.length>0)for(var t=0;t<e.length;t++)e[t].children&&e[t].children.length>0?n(e[t].children):e[t].children&&0!==e[t].children.length||Object.defineProperty(e[t],"isLeaf",{value:!0,enumerable:!0})};n(t),e.ui.data=t},e.prototype.cascaderChange=function(e,t){},e.prototype.clearChildren=function(e){var t=this;if(e.children&&e.parent){var n=this.optionList.filter((function(t){return t.parent&&t.parent===e.name}));n.length&&n.forEach((function(e){e.selectedValue=null,e.data=[],e.params={},t.clearChildren(e)}))}},e.prototype.setChildrenParams=function(e){var t=this;if(e.children&&e.parent){var n=this.optionList.filter((function(t){return t.parent&&t.parent===e.name}));n.length&&n.forEach((function(n){n.params=e.params,t.setChildrenParams(n)}))}},e.prototype.getOptionsData=function(e,t){var n=this;e.loading=!0,this.httpService.httpGet(e.url||e.ui.url,e.params||{}).subscribe((function(i){1===i.code&&(n.renderOptionList(e,i.data,t),e.loading=!1)}))},e.prototype.renderOptionList=function(e,t,n){var i=function(e){e.forEach((function(e){e.title=e.label,e.key=e.value,e.children&&i(e.children)}))};i(t),((this.formData||[]).find((function(t){return t.name===e.name}))||{ui:{}}).ui.data=D(t||[]),e.data=D(e.data||[],t||[]),this.formGroup.patchValue(this.formGroup.value),e.defaultLoad&&e.isSelectedFirst&&e.data.length&&("default"===e.mode?e.selectedValue={label:e.data[0].label,value:e.data[0].value,key:e.key?e.key:null,children:e.children?e.children:null,parent:e.parent?e.parent:null}:e.selectedValue=[{label:e.data[0].label,value:e.data[0].value,showStep:e.data[0].showStep}])},e.prototype.resetOPtionData=function(e,t,n,i){t.forEach((function(t){n&&(t.label=t[n]),i&&(t.value=t[i]),t.key=e.key?e.key:null,t.children=e.children?e.children:null,t.parent=e.parent?e.parent:null}))},e.prototype.initOptionParams=function(e){var t={};if(e.params&&Object.keys(e.params).length)for(var n in e.params)e.params.hasOwnProperty(n)&&e.params[n]&&Object.defineProperty(t,n,{value:e[n],enumerable:!0,writable:!0})},e.prototype.treeSelectChange=function(e,t,n){if(this.treeSelectChangeEmit.emit({name:t.name,value:e,node:e&&n.getTreeNodeByKey(e)}),e){var i=n.getTreeNodeByKey(e);i&&(this.formGroup.controls[t.name+"Dir"].setValue(i.title),this.formGroup.controls[t.name.replace("Id","")+"Dir"].setValue(i.title))}else this.formGroup.controls[t.name+"Dir"].setValue(""),this.formGroup.controls[t.name.replace("Id","")+"Dir"].setValue("")},e.prototype.dateChange=function(e,t){if(e){var n="yyyy-MM-dd";t.ui.showTime&&(n="yyyy-MM-dd HH:mm:ss");var i=this.datepipe.transform(e,n);this.formGroup.controls[t.name+"Pipe"].setValue(i)}},e.prototype.yearChange=function(e,t){if(e){var n=this.datepipe.transform(e,"yyyy");this.formGroup.controls[t.name+"Pipe"].setValue(n)}},e.prototype.monthChange=function(e,t){if(e){var n=this.datepipe.transform(e,"yyyy-MM");this.formGroup.controls[t.name+"Pipe"].setValue(n)}},e.prototype.validateForm=function(){for(var e in this.formGroup.controls)this.formGroup.controls.hasOwnProperty(e)&&(this.formGroup.controls[e].markAsDirty(),this.formGroup.controls[e].updateValueAndValidity());return this.formGroup.valid},e.prototype.subForm=function(){this.validateForm()},e.prototype.resetForm=function(){this.formGroup.reset()},e.prototype.initParams=function(){},e.prototype.dateRangeChange=function(e,t){},e.ctorParameters=function(){return[{type:a.FormBuilder},{type:n.DatePipe},{type:I},{type:S}]},C([t.Input()],e.prototype,"formObj",void 0),C([t.Input()],e.prototype,"prefixCode",void 0),C([t.Output()],e.prototype,"formvalidate",void 0),C([t.Output("selectChange")],e.prototype,"selectChangeEmit",void 0),C([t.Output("treeSelectChange")],e.prototype,"treeSelectChangeEmit",void 0),e=C([t.Component({selector:"app-s-form",template:'\x3c!-- <div class="btnCom" *ngIf="formObj.update">\n    <button nz-button nzType="primary" (click)="setEdit()">修改</button>\n</div> --\x3e\n<form nz-form [formGroup]="formGroup">\n    \x3c!-- <div class="top">\n        <h3>{{formObj.formTitle}}</h3>\n        <div class="btns" *ngIf="formObj.add">\n            <button nz-button nzType="primary" (click)="subForm()" class="save">保存</button>\n            <button nz-button nzType="default" (click)="resetForm()">重置</button>\n        </div>\n    </div> --\x3e\n    <div nz-row [nzGutter]="24" class="formContent">\n        <div nz-col *ngFor="let form of formData" [nzSpan]="form.ui.colSpan">\n            <nz-form-item>\n                <nz-form-label [nzFor]="form.name" [nzRequired]="form.isRequire">\n                    <span [title]="form.title">\n                        <div class="label-container">\n                            {{form.title}}</div>\n                        <i *ngIf="form.description" nz-icon nz-tooltip [nzTitle]="form.description"\n                            nzType="question-circle" nzTheme="outline"></i>\n                    </span>\n                </nz-form-label>\n                <nz-form-control [nzErrorTip]="form.errMessage" style="position: relative;">\n                    <ng-container *ngIf="form.ui.type === \'text\'">\n                        <input [hidden]="!form.isEdit" nz-input type="text" [formControlName]="form.name"\n                            [placeholder]="form.title">\n                        \x3c!-- <span *ngIf="!form.isEdit">{{formObj.items[form.name].value}}</span> --\x3e\n                        <span *ngIf="!form.isEdit">{{formValue[form.name]}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'code\'">\n\n                        <app-code [hidden]="!form.isEdit" [formControlName]="form.name" [prefixCode]="prefixCode">\n                        </app-code>\n                        \x3c!-- <span *ngIf="!form.isEdit">{{formObj.items[form.name].value}}</span> --\x3e\n                        <span *ngIf="!form.isEdit">{{formValue[form.name]}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'number\'">\n                        <input [hidden]="!form.isEdit" nz-input type="text" [formControlName]="form.name"\n                            [placeholder]="form.title">\n                        \x3c!-- \n                            <nz-input-number  [hidden]="!form.isEdit" [formControlName]="form.name"  [nzPlaceHolder]="form.title"></nz-input-number> --\x3e\n                        <span *ngIf="!form.isEdit">{{formValue[form.name]}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'password\'">\n                        <input [hidden]="!form.isEdit" nz-input type="password" [formControlName]="form.name"\n                            [placeholder]="form.title">\n                        <span *ngIf="!form.isEdit">{{formValue[form.name]}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'textArea\'">\n                        <textarea [hidden]="!form.isEdit" nz-input nzAutosize [placeholder]="form.title"\n                            [formControlName]="form.name" [maxLength]="form.maxLength"></textarea>\n                        <span *ngIf="!form.isEdit">{{formValue[form.name]}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'cascader\'">\n                        <nz-cascader [hidden]="!form.isEdit" [formControlName]="form.name" nzAllowClear nzShowSearch\n                            [nzPlaceHolder]="form.title" [nzOptions]="form.ui.data"\n                            (ngModelChange)="form.ui.modelChange ? form.ui.modelChange($event) : cascaderChange($event, form)">\n                        </nz-cascader>\n                        <span *ngIf="!form.isEdit && formValue[form.name]">{{formValue[form.name].value}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'select\' || form.ui.type === \'selectMultiple\'">\n                        <nz-select [hidden]="!form.isEdit" [formControlName]="form.name" nzAllowClear nzShowSearch\n                            [nzDisabled]="form.ui.disabled" [nzDropdownMatchSelectWidth]="false"\n                            [nzPlaceHolder]="form.title" [nzMode]="form.ui.mode || \'default\'"\n                            (ngModelChange)="selectChange($event, form)" style="width: 100%" [nzMaxTagCount]="1">\n                            <ng-container *ngFor="let option of form.ui.data">\n                                <nz-option *ngIf="!form.ui.loading" [nzValue]="option.value" [nzLabel]="option.label">\n                                </nz-option>\n                            </ng-container>\n                            <nz-option *ngIf="form.ui.loading" nzDisabled nzCustomContent>\n                                <i nz-icon nzType="loading" class="loading-icon"></i> Loading Data...\n                            </nz-option>\n                        </nz-select>\n                        <span *ngIf="!form.isEdit && formValue[form.name]">{{getSelectLabel(form)}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'treeSelect\' || form.ui.type === \'treeSelectMultiple\'">\n                        <nz-tree-select #treeSelect [formControlName]="form.name" [hidden]="!form.isEdit"\n                            [nzNodes]="form.ui.data || []" [nzAsyncData]="form.ui.loading" nzShowSearch nzAllowClear\n                            [nzPlaceHolder]="form.title" (ngModelChange)="treeSelectChange($event, form, treeSelect)"\n                            [nzDropdownStyle]="style" [nzMultiple]="form.ui.type === \'treeSelectMultiple\'"\n                            [nzMaxTagCount]="1">\n                        </nz-tree-select>\n                        <span *ngIf="!form.isEdit && formValue[form.name]">{{getTreeLabel(form, treeSelect)}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'date\'">\n                        <nz-date-picker [hidden]="!form.isEdit" [formControlName]="form.name"\n                            [nzDisabled]="form.ui.disabled" [nzShowTime]="form.ui.showTime"\n                            [ngStyle]="{\'width\': \'100%\'}" [nzShowToday]="form.ui.showToday"\n                            [nzPlaceHolder]="form.title || \'请选择日期\'"\n                            [nzDisabledDate]="form.ui.isMoreCurrent && !form.ui.isRemoveCurrent? moreDate : form.ui.isLessCurrent && !form.ui.isRemoveCurrent ? less : form.ui.isMoreCurrent && form.ui.isRemoveCurrent ? removecurentMore: form.ui.isLessCurrent && form.ui.isRemoveCurrent ? removecurentLess: all"\n                            (ngModelChange)="dateChange($event, form)" (nzOnOk)="dateChange($event, form)"\n                            style="width: 100%">\n                        </nz-date-picker>\n                        \x3c!-- <span *ngIf="!form.isEdit">\n                           {{formValue[form.name] | date:\'yyyy-MM-dd\'}}\n                        </span> --\x3e\n                        <span *ngIf="!form.isEdit && !form.ui.showTime">{{formValue[form.name] |\n                            date:\'yyyy-MM-dd\'}}</span>\n                        <span *ngIf="!form.isEdit && form.ui.showTime">{{formValue[form.name] | date:\'yyyy-MM-dd\n                            HH:mm:ss\'}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'year\'">\n                        <nz-year-picker [hidden]="!form.isEdit" [formControlName]="form.name"\n                            [ngStyle]="{\'width\': \'100%\'}" [nzPlaceHolder]="form.title || \'请选择年份\'"\n                            (ngModelChange)="yearChange($event, form)">\n                        </nz-year-picker>\n                        <span *ngIf="!form.isEdit">{{formValue[form.name] | date:\'yyyy\'}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'month\'">\n                        <nz-date-picker nzMode="month" [hidden]="!form.isEdit" [formControlName]="form.name"\n                            [ngStyle]="{\'width\': \'100%\'}" [nzPlaceHolder]="form.title || \'请选择月份\'"\n                            (ngModelChange)="monthChange($event, form)"></nz-date-picker>\n                        <span *ngIf="!form.isEdit">{{formValue[form.name] | date:\'yyyy-MM\'}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'rangDate\'">\n                        <nz-range-picker [formControlName]="form.name" [hidden]="!form.isEdit"\n                            [nzShowTime]="form.ui.showTime"></nz-range-picker>\n                        <span *ngIf="!form.isEdit && !form.ui.showTime">{{formValue[form.name] |\n                            date:\'yyyy-MM-dd\'}}</span>\n                        <span *ngIf="!form.isEdit && form.ui.showTime">{{formValue[form.name] | date:\'yyyy-MM-dd\n                            HH:mm:ss\'}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type=== \'radioBox\'">\n                        <nz-radio-group [formControlName]="form.name" [hidden]="!form.isEdit">\n                            <label *ngFor="let radioItem of form.ui.data" nz-radio\n                                [nzValue]="radioItem.value">{{radioItem.label}}</label>\n                        </nz-radio-group>\n                        <span *ngIf="!form.isEdit && formValue[form.name]">{{formValue[form.name].value}}</span>\n                    </ng-container>\n                    <ng-container *ngIf="form.ui.type === \'checkBox\'">\n                        <nz-checkbox-group [(ngModel)]="form.ui.data" [formControlName]="form.name"\n                            [hidden]="!form.isEdit"></nz-checkbox-group>\n                        <span *ngIf="!form.isEdit && formValue[form.name]">{{formValue[form.name].value}}</span>\n                    </ng-container>\n                </nz-form-control>\n            </nz-form-item>\n        </div>\n    </div>\n</form>',providers:[n.DatePipe],styles:[".formContent{background:#fff}.btnCom{text-align:right;padding-bottom:20px}.formContent .formWrap .formItem{display:flex!important}.ant-form-item-label{display:inline-block!important;min-width:10em!important;max-width:10em;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important}.label-container{max-width:10em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:-15px;padding-right:15px}"]})],e)}(),U=function(){function e(){this.scrollToElement=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this,t=setInterval((function(n){e.el?clearInterval(t):e.el=document.querySelector(".formWrap")}),300)},e.prototype.scrollTo=function(e,t){this.anchorConfig.data.forEach((function(t){t.active=!1,t.href===e.href&&(t.active=!0,e.active=!0)})),this.scrollToElement.emit({href:e.href,index:t})},C([t.Input()],e.prototype,"anchorConfig",void 0),C([t.Input()],e.prototype,"el",void 0),C([t.Output()],e.prototype,"scrollToElement",void 0),e=C([t.Component({selector:"app-s-anchor",template:'\x3c!-- <div class="anchorWrap">\n    <div class="content">\n        <ng-container *ngFor="let item of anchorConfig.data; let i = index">\n            <div [ngClass]="item.active ? \'active block\' : \'block\'" (click)="scrollTo(item, i)">\n                <i nz-icon [nzType]="item.icon" nzTheme="outline"></i>\n                <div class="title">{{item.title}}</div>\n            </div>\n        </ng-container>\n    </div>\n</div> --\x3e\n\n<nz-anchor [nzContainer]="el" nzAffix="false">\n    <ng-container *ngFor="let item of anchorConfig.data; let i = index">\n        <nz-link nzHref="#{{item.href}}" [nzTitle]="tpl">\n            <ng-template #tpl>\n                <div [ngClass]="item.active ? \'active block\' : \'block\'">\n                    <i nz-icon [nzType]="item.icon" nzTheme="outline"></i>\n                    <div class="title">{{item.title}}</div>\n                </div>\n            </ng-template>\n            \n        </nz-link>\n    </ng-container>\n</nz-anchor>',styles:[".block{cursor:pointer;padding:25px 0;text-align:center;vertical-align:middle}.block i{font-size:18px;color:#c2c2c2}.block .title{font-size:15px;color:#000;padding-top:10px}.ant-anchor-link-active .block{background-color:#fff}.ant-anchor-link-active .block .title,.ant-anchor-link-active .block i{color:#1890ff}"]})],e)}(),$=function(){function e(e,n){this.domSanitizer=e,this.ref=n,this.title="预览",this.viewWidth=1300,this.viewHeight=700,this.out=new t.EventEmitter,this.isVisible=!1,this.pdfSrc="ssss"}return e.prototype.ngOnInit=function(){this.isVisible=!0,this.html=this.domSanitizer.bypassSecurityTrustHtml('\n    <iframe src="../../../../assets/pdfjs-2.0.943-dist/web/viewer.html?file=\n    https://cors-anywhere.herokuapp.com/'+this.src+'" width="'+this.viewWidth+'" height="'+this.viewHeight+'" class="iframe"></iframe>')},e.prototype.handleCancel=function(){this.isVisible=!1},e.ctorParameters=function(){return[{type:m.DomSanitizer},{type:t.ChangeDetectorRef}]},C([t.Input()],e.prototype,"title",void 0),C([t.Input()],e.prototype,"src",void 0),C([t.Input()],e.prototype,"viewWidth",void 0),C([t.Input()],e.prototype,"viewHeight",void 0),C([t.Output()],e.prototype,"out",void 0),e=C([t.Component({selector:"app-s-pdf-viewer",template:'<nz-modal [(nzVisible)]="isVisible" \n          [nzTitle]="title"\n          [nzZIndex]="1001"\n          [nzWidth]="viewWidth"\n          [nzStyle]="{top: \'20px\'}"\n          [nzFooter]="null"\n          (nzOnCancel)="handleCancel()"\n>\n<div [innerHTML]="html"></div>\n  \x3c!-- <iframe #iframe id="iframe" [attr.src]="pdfSrc" [attr.width]="viewWidth + \'px\'" [attr.height]="viewHeight + \'px\'" frameborder="0"></iframe>     --\x3e\n</nz-modal>\n',styles:[""]})],e)}(),W=function(){function e(){this.isVisible=!1}return e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.init()},e.prototype.ngOnChanges=function(e){},e.prototype.init=function(){this.isVisible=!0,new g(this.imgWrap.nativeElement,{navbar:!1}).view(0)},C([t.ViewChild("imgWrap")],e.prototype,"imgWrap",void 0),C([t.Input()],e.prototype,"src",void 0),e=C([t.Component({selector:"app-s-img-viewer",template:'<div #imgWrap>\n  <img [attr.src]="src" alt="">\n</div>\n',styles:[""]})],e)}(),J=function(){function e(e){this.componentFactoryResolver=e}return e.prototype.ngOnInit=function(){},e.prototype.handleView=function(e,t){if(this.host.clear(),"jpeg"!==e)if("pdf"!==e&&"word"!==e&&"excel"!==e&&"ppt"!==e);else{var n=this.componentFactoryResolver.resolveComponentFactory($);this.host.createComponent(n).instance.src=t}else{var i=this.componentFactoryResolver.resolveComponentFactory(W);this.host.createComponent(i).instance.src=t}},e.ctorParameters=function(){return[{type:t.ComponentFactoryResolver}]},C([t.ViewChild("host",{read:t.ViewContainerRef})],e.prototype,"host",void 0),e=C([t.Component({selector:"app-s-file-viewer",template:"",styles:[""]})],e)}(),_=function(){function e(e,n,i){var o=this;this.message=e,this.commonService=n,this.fileUploadSuccess=new t.EventEmitter,this.showUploadList={showPreviewIcon:!1,showRemoveIcon:!1,hidePreviewIconInNonImage:!0,showDownloadIcon:!1},this.uploadFile={},this.previewImage="",this.previewVisible=!1,this.loading=!1,this.sliderNumber=0,this.handlePreview=function(e){if(e&&null!==e){var t={type:"modal",title:"图片预览",content:o.carousel};o.fileConfig.fileList.forEach((function(t,n){e.url===t.url&&(o.sliderNumber=n)})),o.commonService.createModal(t).afterOpen.subscribe((function(e){o.ca.goTo(o.sliderNumber)}))}},this.beforeUpload=function(e){if(e&&null!==e)return"img"===o.fileConfig.fileType?new r.Observable((function(t){var n=e.size/1024<=o.fileConfig.size;if(!n)return o.message.error("图片不能超过"+o.fileConfig.size/1024+"M"),void t.complete();t.next(n),t.complete()})):void 0},this.removeFile=function(e){o.fileConfig.fileList.forEach((function(t,n){t.fileId===e.fileId&&o.fileConfig.fileList.splice(n,1)})),o.fileConfig.fileList.length<o.fileConfig.max&&(o.fileConfig.showBtn=!0)},this.urlConfig=i||{}}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"showButton",{get:function(){var e,t;return this.fileConfig.showBtn&&(null===(t=null===(e=this.fileConfig)||void 0===e?void 0:e.fileList)||void 0===t?void 0:t.length)<this.fileConfig.max},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){this.initParams(),this.initIconShowOrHide()},e.prototype.initIconShowOrHide=function(){this.showUploadList.showRemoveIcon=this.fileConfig.showRemoveIcon,this.showUploadList.showDownloadIcon=this.fileConfig.showDownloadIcon,this.showUploadList.showPreviewIcon=this.fileConfig.showPreviewIcon,this.showUploadList=v({},this.showUploadList)},e.prototype.initParams=function(){var e=this.fileConfig.fileType;this.fileConfig.fileList=this.fileConfig.fileList||[],"img"===e?(this.fileConfig.size=this.fileConfig.size||10240,this.fileConfig.uploadText=this.fileConfig.uploadText||"上传图片",this.fileConfig.type="image/png,image/jpeg,image/jpg",this.fileConfig.acceptType=".png,.jpeg,.jpg"):"file"===e&&(this.fileConfig.uploadText=this.fileConfig.uploadText||"上传文件")},e.prototype.handleChange=function(e){e&&e.file?this.handleChangeFile(e):this.message.error("上传失败")},e.prototype.handleChangeFile=function(e){var t,n=this;if(e&&null!==e)switch(e.file.status){case"uploading":this.loading=!0,this.fileConfig.showBtn=!1;break;case"done":this.loading=!1,this.fileUploadSuccess.emit(e.file),"img"===this.fileConfig.fileType?this.getBase64(e.file.originFileObj,(function(t){e.file.url=t,n.fileConfig.fileList[n.fileConfig.fileList.length-1].url=t,n.fileConfig.fileList[n.fileConfig.fileList.length-1].fileId=e.file.response.data,n.fileConfig.fileList[n.fileConfig.fileList.length-1].fileName=e.file.name,n.fileConfig.fileList[n.fileConfig.fileList.length-1].fileExtension=n.extname(e.file.name)})):"file"===this.fileConfig.fileType&&"success"===e.type&&((null===(t=this.urlConfig)||void 0===t?void 0:t.downloadUrl)&&(this.fileConfig.fileList[this.fileConfig.fileList.length-1].url=this.urlConfig.downloadUrl+"/"+e.file.response.data),this.fileConfig.fileList[this.fileConfig.fileList.length-1].fileId=e.file.response.data,this.fileConfig.fileList[this.fileConfig.fileList.length-1].fileName=e.file.name,this.fileConfig.fileList[this.fileConfig.fileList.length-1].fileExtension=this.extname(e.file.name)),this.fileConfig.showBtn=!(this.fileConfig.fileList.length===this.fileConfig.max);break;case"error":this.message.error("Network error"),this.loading=!1}},e.prototype.getBase64=function(e,t){var n=new FileReader;n.addEventListener("load",(function(){return t(n.result.toString())})),n.readAsDataURL(e)},e.prototype.extname=function(e){if(!e||"string"!=typeof e)return!1;var t=e.split("").reverse().join("");return"."+t.substring(0,t.search(/\./)).split("").reverse().join("")},e.prototype.prev=function(){this.ca.pre()},e.prototype.next=function(){this.ca.next()},e.prototype.ngOnDestroy=function(){this.fileConfig.fileList=[]},e.ctorParameters=function(){return[{type:i.NzMessageService},{type:I},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[E]}]}]},C([t.ViewChild("carousel")],e.prototype,"carousel",void 0),C([t.ViewChild("ca")],e.prototype,"ca",void 0),C([t.Input()],e.prototype,"fileConfig",void 0),C([t.Output()],e.prototype,"fileUploadSuccess",void 0),e=C([t.Component({selector:"app-s-upload",template:'<nz-upload *ngIf="fileConfig.fileType === \'img\'" [nzAction]="fileConfig.uplodUrl" nzListType="picture-card"\n    [nzAccept]="fileConfig.acceptType" [(nzFileList)]="fileConfig.fileList" [nzShowButton]="fileConfig.showBtn"\n    [nzShowUploadList]="showUploadList" [nzPreview]="handlePreview" [nzFileType]="fileConfig.type"\n    (nzChange)="handleChange($event)" [nzBeforeUpload]="beforeUpload" [nzData]="uploadFile"\n    [nzMultiple]="fileConfig.multiple" [nzRemove]="removeFile" [nzName]="fileConfig.name">\n    <ng-container>\n        <i class="upload-icon" nz-icon [nzType]="loading ? \'loading\' : \'plus\'"></i>\n        <div class="ant-upload-text">{{fileConfig.uploadText}}</div>\n    </ng-container>\n    <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null"\n        (nzOnCancel)="previewVisible = false">\n        <ng-template #modalContent>\n            <img [src]="previewImage" [ngStyle]="{ width: \'100%\' }" />\n        </ng-template>\n    </nz-modal>\n</nz-upload>\n\n<ng-template #carousel>\n    <div class="preview-container">\n        <nz-carousel #ca [nzEnableSwipe]="false">\n            <div class="previce-container_img" nz-carousel-content *ngFor="let file of fileConfig.fileList">\n                <div class="" appZoomAndMove>\n                    <img [src]="file.url" class="img">\n                </div>\n            </div>\n\n        </nz-carousel>\n\n        <span class="prev turn" (click)="prev()"><i nz-icon nzType="left" nzTheme="outline"></i></span>\n        <span class="next turn" (click)="next()"><i nz-icon nzType="right" nzTheme="outline"></i></span>\n    </div>\n</ng-template>\n\n<nz-upload *ngIf="fileConfig.fileType === \'file\'" [nzName]="fileConfig.name" [nzSize]="fileConfig.size"\n    [nzAccept]="fileConfig.acceptType" [nzAction]="fileConfig.uplodUrl" [(nzFileList)]="fileConfig.fileList"\n    [nzShowUploadList]="showUploadList"\n    [nzBeforeUpload]="beforeUpload" (nzChange)="handleChange($event)" [nzRemove]="removeFile" [nzShowButton]="showButton" [nzDownload]="fileConfig.download">\n    <button nz-button><i nz-icon nzType="upload"></i>{{fileConfig.uploadText}}</button>\n</nz-upload>',styles:[".img{width:60%;margin:5% auto}.wrap{position:relative}.turn{position:absolute;top:50%;transform:translateY(-50%);cursor:pointer;background:#364d79;height:100%}.turn.prev{left:0}.turn.next{right:0}.turn i{font-size:100px;color:#fff;position:relative;top:40%}.preview-container{height:100%;position:relative}.preview-container .preview-container_img{width:100%}"]}),z(2,t.Optional()),z(2,t.Inject(E))],e)}(),K=function(){function e(){}return e.prototype.ngOnInit=function(){},e=C([t.Component({selector:"app-s-cascader",template:"\n",styles:[""]})],e)}(),Y=function(){function e(e){this.httpService=e,this.treeSelectChange=new t.EventEmitter,this.style={maxHeight:"150px",overflow:"auto"}}return e.prototype.ngOnInit=function(){this.getData()},e.prototype.getData=function(){var e=this;if(this.treeSelectConfig.data=[],this.treeSelectConfig.url){var t=this.treeSelectConfig.params||{};this.httpService.httpGet(this.treeSelectConfig.url,t).subscribe((function(t){if(1===t.code){if(!t.data||!t.data.length)return;e.initData(t.data)}}))}},e.prototype.initData=function(e){var t=function(e){if(e.length>0)for(var n=0;n<e.length;n++){var i=e[n],o=i.label,a=i.value,r=i.text,s=i.key;Object.defineProperty(e[n],"title",{value:o||r,enumerable:!0}),Object.defineProperty(e[n],"key",{value:a||s,enumerable:!0}),delete e[n].label,delete e[n].value,e[n].children&&e[n].children.length>0?t(e[n].children):e[n].children&&0!==e[n].children.length||Object.defineProperty(e[n],"isLeaf",{value:!0,enumerable:!0})}};t(e),this.treeSelectConfig.data=e},e.prototype.onChange=function(e){this.treeSelectConfig.value=e,this.treeSelectChange.emit({value:e})},e.ctorParameters=function(){return[{type:S}]},C([t.Input()],e.prototype,"treeSelectConfig",void 0),C([t.Output()],e.prototype,"treeSelectChange",void 0),e=C([t.Component({selector:"app-s-tree-select",template:'<nz-tree-select [nzNodes]="treeSelectConfig.data || []" nzShowSearch [nzPlaceHolder]="treeSelectConfig.placeHolder" [(ngModel)]="treeSelectConfig.value"\n[nzDropdownMatchSelectWidth]="false" [ngStyle]="{width: treeSelectConfig[\'width\']}" [nzDropdownStyle]="style" \n    (ngModelChange)="onChange($event)"> \n</nz-tree-select>',styles:[""]})],e)}(),Z=function(){function e(e){this.componentFactoryResolver=e}return e.prototype.handleView=function(e){var t=e.host,n=e.type,i=e.src;if(t.clear(),"jpeg"!==n&&"jpg"!==n)if("pdf"!==n&&"word"!==n&&"excel"!==n&&"ppt"!==n);else{var o=this.componentFactoryResolver.resolveComponentFactory($);t.createComponent(o).instance.src=i}else{var a=this.componentFactoryResolver.resolveComponentFactory(W);t.createComponent(a).instance.src=i}},e.ctorParameters=function(){return[{type:t.ComponentFactoryResolver}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(t.ComponentFactoryResolver))},token:e,providedIn:"root"}),e=C([t.Injectable({providedIn:"root"})],e)}(),X=function(){function e(e,t,n,i){this.httpService=e,this.message=t,this.fileViewerService=n,this.commonService=i}return e.prototype.ngOnInit=function(){},e.prototype.export=function(){var e=this.exportCodeConfig.url+"/"+this.exportCodeConfig.id;this.commonService.downLoad(e,"GET")},e.prototype.showBigPic=function(e){var t={host:this.host,type:"jpg",src:e};this.fileViewerService.handleView(t)},e.ctorParameters=function(){return[{type:S},{type:i.NzMessageService},{type:Z},{type:I}]},C([t.Input()],e.prototype,"exportCodeConfig",void 0),C([t.ViewChild("host",{read:t.ViewContainerRef})],e.prototype,"host",void 0),e=C([t.Component({selector:"app-s-export-code",template:'<div class="_exportCode">\n    <span>工程二维码：</span>\n    <span (click)="showBigPic(exportCodeConfig.src)"><img [src]="exportCodeConfig.src" alt="" width="30" height="30"></span>\n    <button nz-button nzType="primary" (click)="export()">导出</button>\n</div>\n<ng-template #host></ng-template>',styles:["._exportCode img{cursor:pointer}:host ::ng-deep app-s-img-viewer{display:none}"]})],e)}(),Q=function(){function e(e){this.el=e,this.getDragAndMouseWheel()}return e.prototype.getDragAndMouseWheel=function(){var e=this,t=this.el.nativeElement;setTimeout((function(){t.querySelectorAll("img").forEach((function(e){return e.ondragstart=function(){return!1}}))}),100);var n,i=function(e){return getComputedStyle(e).width},o=r.fromEvent(t,"mousedown"),a=r.fromEvent(document,"mousemove"),s=r.fromEvent(document,"mouseup"),p=r.fromEvent(t,"mousewheel");function c(e){var t=getComputedStyle(e).transform.replace(/\s/g,"").split(",");return 6===t.length?{x:parseInt(t[4],10),y:parseInt(t[5],10)}:{x:0,y:0}}this.subscriptionMouseWheel=p.pipe(l.switchMap((function(e){return e.stopPropagation(),r.of({width:i(t),wheelDelta:e.wheelDelta})}))).subscribe((function(i){var o=parseInt(i.width.split("px")[0],10);n||(n=o,e.initWidth=n);var a=o+(i.wheelDelta>0?.1*n:-.1*n);t.style.width=a+"px"})),this.subscriptionDrag=o.pipe(l.switchMap((function(e){return r.of({pos:c(t),event:e}).pipe(l.takeUntil(a))})),l.switchMap((function(e){var t=e.pos,n=e.event,i=n.clientX,o=n.clientY;return a.pipe(l.map((function(e){return{x:e.clientX-i+t.x,y:e.clientY-o+t.y}})),l.takeUntil(s))}))).subscribe((function(e){!function(e,t){e.style.transform="translate("+t.x+"px, "+t.y+"px)"}(t,e)}))},e.prototype.ngOnDestroy=function(){this.subscriptionDrag.unsubscribe(),this.subscriptionMouseWheel.unsubscribe()},e.ctorParameters=function(){return[{type:t.ElementRef}]},e=C([t.Directive({selector:"[appZoomAndMove]"})],e)}(),ee=function(){function e(){}return e=C([t.NgModule({imports:[],declarations:[Q],exports:[Q]})],e)}(),te=function(){function e(){}return e.GetVerificationCode=function(t){var n="";if(t&&17==t.length){var i=t.trim().split("");if(e.IsMatch(i)){var o=i.reduce((function(t,n,i){var o=e.CodeMap1.get(n);return t+e.Calculate(o,i+1)}),0)%11;n=e.CodeMap2.get(o)}}return n},e.Calculate=function(e,t){return(e+1)*t},e.IsMatch=function(t){return t.every((function(t){return void 0!==e.CodeMap1.get(t)}))},e.CodeMap1=new Map([["0",0],["1",1],["2",2],["3",3],["4",4],["5",5],["6",6],["7",7],["8",8],["9",9],["A",10],["B",11],["C",12],["D",13],["E",14],["F",15],["G",16],["H",17],["J",18],["K",19],["L",20],["M",21],["N",22],["P",23],["Q",24],["R",25],["S",26],["T",27],["U",28],["V",29],["W",30],["X",31],["Y",32]]),e.CodeMap2=new Map([[0,"1"],[1,"0"],[2,"X"],[3,"9"],[4,"8"],[5,"7"],[6,"6"],[7,"5"],[8,"4"],[9,"3"],[10,"2"]]),e}(),ne={provide:a.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return ie})),multi:!0},ie=function(){function e(){this.prefixCode="",this.suffixCode="",this.code="",this.value=null,this.reg=/^[\dA-Z]{12}$/,this.propagateChange=function(e){}}return e.prototype.ngOnInit=function(){},e.prototype.writeValue=function(e){if(!e)return this.code="",void(this.suffixCode="");if(18===e.length){var t=O(/^([\da-zA-Z]{5})([\da-zA-Z]{12})([\da-zA-Z]{1})$/.exec(e).slice(1),3),n=t[0],i=t[1],o=t[2];this.code=i,this.prefixCode=n,this.suffixCode=o}12===e.length&&(this.code=e,this.codeChange())},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.codeChange=function(){this.suffixCode=te.GetVerificationCode(""+this.prefixCode+this.code),this.suffixCode?this.propagateChange(""+this.prefixCode+this.code+this.suffixCode):this.propagateChange("")},C([t.Input()],e.prototype,"prefixCode",void 0),e=C([t.Component({selector:"app-code",template:'\n    <nz-input-group [nzSuffix]="suffixCode" [nzPrefix]="prefixCode" [class.ant-input-disabled]="disabled">\n      <input\n        type="text"\n        nz-input\n        placeholder="请输入12位大写字母加数字"\n        [(ngModel)]="code"\n        [maxlength]="12"\n        [pattern]="reg"\n        [disabled]="disabled"\n        (ngModelChange)="codeChange()"\n      />\n    </nz-input-group>\n  ',providers:[ne]})],e)}(),oe=[P,F,M,A,N,R,V,G,B,q,U,J,W,$,_,K,Y,j,X,ie],ae=[n.CommonModule,i.NgZorroAntdModule,o.RouterModule,a.FormsModule,a.ReactiveFormsModule],re=function(){function e(){}return e=C([t.NgModule({entryComponents:oe,declarations:D(oe),imports:D(ae,[ee]),exports:D(ae,oe)})],e)}(),se=function(){function e(){}return e.prototype.validateForm=function(e){for(var t in e.controls)e.controls.hasOwnProperty(t)&&(e.controls[t].markAsDirty(),e.controls[t].updateValueAndValidity());return e.valid},e.prototype.getFormValue=function(e){return e.value},e.prototype.resetForm=function(e,t){if(t)e.patchValue(t);else for(var n in e.reset(),e.controls)e.controls.hasOwnProperty(n)&&(e.controls[n].markAsPristine(),e.controls[n].updateValueAndValidity());return e},e.prototype.reSet=function(e,t){e.reset(t)},e.prototype.submit=function(){},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=C([t.Injectable({providedIn:"root"})],e)}(),le=function(){function e(e,t){this.message=e,this.httpService=t}return e.prototype.initEditTableData=function(e,t){for(var n=[],i=t.columns,o=0;o<e.length;o++)n=D(n,[this.initRowData(i,e[o])]);return n},e.prototype.initRowData=function(e,t){var n={};return e.forEach((function(e){var i=JSON.parse(JSON.stringify(e.attrs)),o={name:e.name,type:"string",value:t[e.name]||t.showFormatter[e.name],edit:!0,error:!1,others:null};t.showFormatter[e.name];if(o.type=i.type,e.others||(i.type&&"string"!==i.type||(o.type="string"),"float"===i.type&&(o.type="float",o.value=o.value||0)),e.others){var a=JSON.parse(JSON.stringify(e.others));if("date"===a.type);else if("select"===a.type){if(a.defaultLoad=!0,Object.defineProperty(a,"width",{value:"100%",enumerable:!0}),t.showFormatter.colUiType){var r=t.showFormatter.colUiType,s=[];if(r.length&&(s=r.split(",")),2===s.length)a.selectedValue={lable:s[0],value:s[1]};else if(s.length>2){for(var l="",p=",",c=1;c<s.length;c++)c===s.length-1&&(p=""),l+=s[c]+p;a.selectedValue={lable:s[0],value:l}}}}else"checkBox"===a.type&&(o.type="boolean",o.value="true"===o.value);o.others=a}n[o.name]=o})),n},e.prototype.isRepeat=function(e){var t={};for(var n in e){if(t[e[n]])return!0;t[e[n]]=!0}return!1},e.prototype.subEditTableData=function(e){var t=[];return e&&e.length&&e.forEach((function(e){var n={propertyName:e.propertyName.value,showFormatter:{}};for(var i in e)e.hasOwnProperty(i)&&(e[i].others&&"select"===e[i].others.type&&e[i].others.selectedValue&&(e[i].value=e[i].others.selectedValue.label+","+e[i].others.selectedValue.value),n.showFormatter[i]=e[i].value);t.push(n)})),t},e.prototype.setColumsFiex=function(e){return e.forEach((function(e){e.attrs.isLeft?e.attrs.isLeft=JSON.parse(e.attrs.isLeft):e.attrs.isLeft=!1,e.attrs.isRight?e.attrs.isRight=JSON.parse(e.attrs.isRight):e.attrs.isRight=!1})),e},e.prototype.getDynamicMapper=function(e,t){return w(this,void 0,void 0,(function(){var n;return x(this,(function(i){switch(i.label){case 0:return[4,this.httpService.httpGet(e,t).toPromise()];case 1:return 1===(n=i.sent()).code&&n.data.mapperList&&n.data.mapperList.length&&n.data.mapperList?[2,n.data.mapperList]:[2]}}))}))},e.prototype.initStaticFormData=function(e){e.colSpan;var t=e.formConfig;if(t){for(var n in t.items)if(t.items.hasOwnProperty(n)){var i=t.items[n];if(i.name=n,i.isEdit=!0,i.description=i.description||"",i.errMessage=i.errMessage||i.title,i.ui)i.ui.colSpan=i.ui.colSpan?i.ui.colSpan:t.colSpan;else{var o={type:i.type,colSpan:i.colSpan?i.colSpan:t.colSpan};Object.defineProperty(i,"ui",{value:o,enumerable:!0})}}return e}},e.prototype.initFormData=function(e,t){var n=this;return this.httpService.httpGet(e.url,e.params).pipe(l.map((function(e){if(1===e.code){if(null===e.data)return;if(e.data.mapperList&&e.data.mapperList.length&&e.data.mapperList)return n.resetFormData(e.data.mapperList,t)}return{}})))},e.prototype.resetFormData=function(e,t){var n={},i=8;return t&&t.colSpan&&(i=t.colSpan),e.forEach((function(e){i=8;var o=(e.showFormatter.colUiType||"文本框,text").split(","),a=o[1],r="text",s="text";s=a,"number"===a&&(r=s=a),"textArea"===a&&(i=24);var l={type:r,name:e.propertyName,title:e.showFormatter.showName,isRequire:JSON.parse(e.showFormatter.isRequire),errMessage:e.showFormatter.errMessage,ui:{type:s,colSpan:i,loading:!1,unEdit:!!e.showFormatter.unEdit&&JSON.parse(e.showFormatter.unEdit)},description:e.showFormatter.description,value:e.showFormatter.defaultValue||null};if("date"===a&&o.length>2)for(var p=2;p<o.length;p++)l[p]=!0;if(("text"===a||"textArea"===a)&&parseInt(e.showFormatter.maxLength,0)>0&&(l.maxLength=parseInt(e.showFormatter.maxLength,0)),"number"===a&&parseFloat(e.showFormatter.maxLength)>0){var c=e.showFormatter.maxLength.split(".");Object.defineProperty(l,"n",{value:c,enumerable:!0,writable:!0})}if(n[e.propertyName]=l,t)for(var h in t.items)if(t.items.hasOwnProperty(h)&&h===e.propertyName){var u=f.cloneDeep(t.items[h]);if(u.ui)u.ui.type=s,u.ui.colSpan=i,u.ui.loading=!1;else{u.type="text";var d={colSpan:i,type:"text",loading:!1,unEdit:!!e.showFormatter.unEdit&&JSON.parse(e.showFormatter.unEdit)};Object.defineProperty(u,"ui",{value:d,enumerable:!0})}u.maxLength=e.showFormatter.maxLength,u.isRequire=JSON.parse(e.showFormatter.isRequire),u.value=e.showFormatter.defaultValue||null,u.title=e.showFormatter.showName||u.title,u.errMessage=e.showFormatter.errMessage||u.errMessage,u.description=e.showFormatter.description||u.description,"radioBox"===a&&(u.ui.type="radio"),"checkBox"===a&&(u.ui.type="checkBox"),"date"===a&&(u.ui.type=a),"code"===a&&(u.ui.type=a),"select"===a&&(u.ui.selectedValue=null,u.value=u.selectedValue,u.ui.data||(u.ui.data=[])),n[e.propertyName]=u}})),n},e.prototype.setFormEdit=function(e,t){return Object.values(e.items).forEach((function(e){e.isEdit=t})),e.isEdit=t,e.show=!0,e},e.prototype.deepClone=function(e){},e.ctorParameters=function(){return[{type:i.NzMessageService},{type:S}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(c.NzMessageService),t.ɵɵinject(S))},token:e,providedIn:"root"}),e=C([t.Injectable({providedIn:"root"})],e)}(),pe=function(){this.allowClear=!0,this.time=new Date,this.nzDefaultOpenValue=new Date,this.nzAllowEmpty=!0,this.nzDisabled=!1,this.nzPlaceHolder="请选择时间",this.nzHourStep=1,this.nzMinuteStep=1,this.nzSecondStep=1,this.nzDisabledHours=[],this.nzDisabledMinutes=[],this.nzDisabledSeconds=[],this.nzSize="",this.nzFormat="HH:mm:ss"},ce=function(){this.add=!1,this.update=!1,this.show=!1,this.isEdit=!0,this.colSpan=8,this.submitUrl="",this.submitType="put"},he=function(){this.url="",this.selectedValue=null,this.data=[],this.ui.data=[],this.isPage=!1,this.page=1,this.pageSize=10,this.isSelectedFirst=!1,this.defaultLoad=!0,this.mode="default",this.allowClear=!0,this.params={}},fe=function(){this.title=this.title,this.defaultLoad=!0,this.showRowNum=!0,this.isOperation=!0,this.isPage=!0,this.isBorder=!1,this.page=1,this.pageSize=10,this.total=0,this.checked=!1,this.active=!1,this.radioChec=!0,this.comCheck=!0,this.isExpandAll=!1,this.isLeaf=!1,this.colSearchConfig=[],this.tableParams={},this.reLoad=!1,this.isShowPagination=!0},ue=function(){this.name="uploadFile",this.type="image/png,image/jpeg,image/jpg",this.size=10240,this.multiple=!1,this.uploadText="",this.fileList=[],this.fileBaseUrl="",this.showBtn=!0,this.fileListUrl="",this.max=1,this.fileType="",this.donwnLoadUrl="",this.showPreviewIcon=!0,this.showRemoveIcon=!0,this.showDownloadIcon=!1,this.cacheData=[],this.acceptType=""},de=function(e){function t(){var t=e.call(this)||this;return t.isCollapse=!0,t.isEdit=!0,t.isBatchDelete=!1,t.isColSearch=!0,t.exportConfig={params:{},data:[]},t}return b(t,e),t}(fe),me=function(){this.allClear=!0,this.placeHolder="select data",this.disabled=!1,this.multiple=!1,this.showSearch=!0,this.data=[],this.url="",this.params={},this.value=""},ge=function(){this.url="",this.params={},this.data=[]},ye=function(){function e(e){this.isConfirm=!0,this.tableObjSync=new fe,this.getInjector(e)}return e.prototype.ngOnInit=function(){var e=this.getConfig();this.tableObjSync=v(v({},this.tableObjSync),e)},e.prototype.getConfig=function(){return{}},e.prototype.getInjector=function(e){this.modal=e.get(i.NzModalService),this.message=e.get(i.NzMessageService),this.httpService=e.get(S),this.commonService=e.get(I),this.tableService=e.get(T)},e.prototype.deleteRowData=function(e,t,n,i,o){var a=this;if(e){var r="确定要删除选中数据吗";o&&(r=o);var s='<b style="color: red;">'+r+"</b>";i&&(s=i),this.isConfirm?this.modal.confirm({nzTitle:n||"提示",nzContent:s,nzOkText:"确定",nzOkType:"danger",nzOnOk:function(){return a.deleteByHttp(e,t)},nzCancelText:"取消",nzOnCancel:function(){return console.log("Cancel")}}):this.deleteByHttp(e,t)}else this.message.error("请选择要删除的数据")},e.prototype.deleteByHttp=function(e,t){var n=this,i=t+"/"+e;this.httpService.httpDelete(i).subscribe((function(e){1===e.code&&(n.message.success("删除成功"),n.reloadTable(),n.afterDelete())}))},e.prototype.afterDelete=function(){},e.prototype.openModalDialog=function(e){var t={content:this.getComponent(),params:e};this.openModal(t)},e.prototype.openDrawer=function(e){var t=this,n={type:"drawer",title:e.title||"DrawerComponent",params:e.params||null,content:e.content,style:{width:e.width}};this.commonService.createModal(n).afterClose.subscribe((function(){t.reloadTable(),t.afterClose(e.content)}))},e.prototype.openModal=function(e){var t=this,n={type:"modal",title:e.title||"ModalComponent",params:e.params||null,content:e.content,footer:e.footer||null};this.commonService.createModal(n).afterClose.subscribe((function(){t.reloadTable(),t.afterClose()}))},e.prototype.afterClose=function(e){},e.prototype.getComponent=function(){return null},e.prototype.reloadTable=function(){this.table.tableConfig.defaultLoad=!0,this.table.getDynamicTableData()},C([t.Input()],e.prototype,"dialogParams",void 0),C([t.ViewChild(P)],e.prototype,"table",void 0),e}(),be=function(e){function t(t){var n=e.call(this,t)||this;return n.tableObjSync=new de,n}return b(t,e),t.prototype.ngOnInit=function(){this.initTableConfig()},t.prototype.initTableConfig=function(){var e=this.getConfig();this.tableObjSync=v(v({},this.tableObjSync),e)},t.prototype.getConfig=function(){return{}},t}(ye),ve=function(){function e(e){this.subParams={},this.formLoading=!0,this.validate=!1,this.submitLoading=!1,this.qrInfo="",this.locationsCacheData=[],this.isUpdateMem=!1,this.getInjector(e)}return e.prototype.ngOnInit=function(){},e.prototype.getInjector=function(e){this.httpService=e.get(S),this.message=e.get(i.NzMessageService),this.baseService=e.get(le),this.formService=e.get(se),this.modal=e.get(i.NzModalService),this.tableService=e.get(T),this.commonService=e.get(I)},e.prototype.initConfigDataOfMapper=function(e){e?this.getMapperFormConfig(e):this.initStaticFormConfig()},e.prototype.initStaticFormConfig=function(){var e=this;this.componentConfigList.forEach((function(t){(t=e.baseService.initStaticFormData(t)).formConfig.show=!0}))},e.prototype.getMapperFormConfig=function(e){var t=this,n=this.componentConfigList;r.forkJoin(n.map((function(n){var i=n.formConfig;if(i.formMapperCode){var o=null,a={url:e,params:{mapperCode:i.formMapperCode,code:i.formMapperCode}};return i.staticConfig&&(o=i.staticConfig),t.baseService.initFormData(a,o).pipe(l.tap((function(e){i.items=e,n.formConfig=v({},i),setTimeout((function(){t.formLoading=!1}),200)})),l.mapTo(i))}return r.of("")}))).subscribe((function(e){t.renderFormAfter()}),(function(e){t.message.error(e.message)}))},e.prototype.renderFormAfter=function(){},e.prototype.addComponentConfig=function(e){this.componentConfigList.push(e)},e.prototype.getComponentConfigList=function(e){var t=this;return this.componentConfigList.forEach((function(n){n.fileConfig&&(n.fileConfig.showPreviewIcon=!0,n.fileConfig.showRemoveIcon=!0,e&&(n.fileConfig.showPreviewIcon=!0,n.fileConfig.showRemoveIcon=!1)),n.tableConfig&&t.detailId&&(n.tableConfig.tableData=[])})),this.componentConfigList},e.prototype.getSubParams=function(){return this.subParams},e.prototype.setSubParams=function(){var e=this;this.validate=!0,this.componentConfigList.forEach((function(t){if(t.isForm&&t.formConfig.formGroup&&!t.tableConfig&&e.reRenderValues(t),t.locationConfig){var n=(e.coordinateValue||[]).map((function(e){var t=O(e,2);return{longitude:t[0],latitude:t[1]}}));if(e.validate&&0===n.length)return void e.message.error("请绘制工程位置");var i=t.name.split(",");e.subParams[i[0]]=n}if(t.fileConfig&&"img"===t.fileConfig.fileType&&!t.tableConfig){var o=[];t.fileConfig.fileList.forEach((function(e){o.push({fileExtension:e.fileExtension,fileId:e.fileId,fileName:e.fileName})}));i=t.name.split(",");e.subParams[i[0]]=o}if(t.fileConfig&&"file"===t.fileConfig.fileType&&!t.tableConfig){var a=[];t.fileConfig.fileList.forEach((function(e){a.push({fileExtension:e.fileExtension,fileId:e.fileId,fileName:e.fileName})})),e.subParams[t.name]=a}}))},e.prototype.submitBefore=function(){},e.prototype.reRenderValues=function(e){if(this.formService.validateForm(e.formConfig.formGroup)){var t=e.formConfig.formGroup.value;for(var n in t){if(-1!==n.indexOf("Pipe"))t[n.split("Pipe")[0]]=t[n]}"baseInfo"===e.name?f.merge(this.subParams,t||{}):this.subParams[e.name]=t||{}}else this.validate=!1},e.prototype.submit=function(e){var t=this;if(this.setSubParams(),this.submitBefore(),this.submitLoading=!0,!this.validate)return this.message.error("表单校验不通过"),void(this.submitLoading=!1);this.validate&&this.coordinateValue&&this.coordinateValue.length?this.httpService.httpPost(e,this.subParams).subscribe((function(e){t.submitLoading=!1,1===e.code&&(t.message.success("保存成功"),t.submitAfter())}),(function(e){t.submitLoading=!1})):this.submitLoading=!1},e.prototype.submitAfter=function(){var e=this;this.componentConfigList.forEach((function(t){t.isForm&&t.formConfig.formGroup&&e.formService.resetForm(t.formConfig.formGroup),t.fileConfig&&(t.fileConfig.fileList=[],t.fileConfig.showBtn=!0),t.locationConfig&&(e.coordinateValue=[]),t.tableConfig&&(t.tableConfig.tableData=[])})),this.clearMap(),this.resetOthersComponent()},e.prototype.clearMap=function(){},e.prototype.reset=function(){var e=this;this.submitLoading=!1,this.componentConfigList.forEach((function(t){t.isForm&&t.formConfig.formGroup&&(t.formConfig.formGroup=e.formService.resetForm(t.formConfig.formGroup),e.validate=!1),t.tableConfig&&(t.tableConfig.tableData=[]),t.fileConfig&&(t.fileConfig.fileList=[])})),this.resetOthersComponent(),this.clearMap()},e.prototype.resetOthersComponent=function(){},e.prototype.singleReset=function(e){e.formConfig.formGroup&&(e.formConfig.formGroup=this.formService.resetForm(e.formConfig.formGroup,e.formConfig.values)),e.fileConfig&&(e.fileConfig.fileList=JSON.parse(JSON.stringify(e.fileConfig.cacheData)))},e.prototype.singleSubmit=function(e){e.isForm&&e.formConfig.formGroup&&this.submitSingleForm(e),e.locationConfig&&this.submitLocations(e),e.fileConfig&&!e.tableConfig?this.submitFile(e):this.submitOthers(e)},e.prototype.submitOthers=function(e){},e.prototype.singleSubmitAfter=function(e,t){},e.prototype.singleSubmitBefore=function(e){},e.prototype.submitSingleForm=function(e){var t=this;this.subParams={projectCode:this.projectCode,projectId:this.detailId};var n=e.formConfig.submitType;if(this.formService.validateForm(e.formConfig.formGroup)){var i=e.formConfig.formGroup.value;for(var o in i){if(-1!==o.indexOf("Pipe"))i[o.split("Pipe")[0]]=i[o]}if("baseInfo"===e.name)this.subParams=Object.assign(e.formConfig.values,i);else{o=e.name;e.editKey&&(o=e.editKey),this.subParams[o]=Object.assign(e.formConfig.values,i)}switch(this.singleSubmitBefore(e),n){case"post":this.httpService.httpPost(e.formConfig.submitUrl,this.subParams).subscribe((function(n){1===n.code&&(t.message.success("保存成功"),t.submitFormAfter(e,n.data),t.singleSubmitAfter(e,n.data),t.renderForm(n.data))}));break;case"put":this.httpService.httpUpdate(e.formConfig.submitUrl,this.subParams).subscribe((function(n){1===n.code&&(t.message.success("保存成功"),t.submitFormAfter(e,n.data),t.singleSubmitAfter(e,n.data),t.renderForm(n.data))}))}}},e.prototype.renderForm=function(e){},e.prototype.submitFormAfter=function(e,t){var n=e.formConfig;for(var i in n.items){if(n.items.hasOwnProperty(i))n.items[i].isEdit=!1}e.formConfig.isEdit=!1,null!==t&&t&&(this.formService.resetForm(e.formConfig.formGroup,t),"baseInfo"!==e.name?(this.subParams.projectCode=this.projectCode,this.subParams.projectId=this.detailId,e.formConfig.values=t):(f.merge(this.subParams,e.formConfig.formGroup.value),f.merge(this.subParams,t)))},e.prototype.submitFile=function(e){var t=this,n=e.formConfig.submitUrl,i={projectCode:this.projectCode,projectId:this.detailId},o=[];if(e.fileConfig.fileList.forEach((function(e){var t={fileExtension:e.fileExtension,fileId:e.fileId,fileName:e.fileName,version:e.version,projectCode:e.projectCode,name:e.fileName};o.push(t)})),"img"===e.fileConfig.fileType)i[e.name.split(",")[1]]=o;else if("file"===e.fileConfig.fileType){var a=e.name;e.editKey&&(a=e.editKey),i[a]=o}JSON.parse(JSON.stringify(e.fileConfig.fileList));this.httpService.httpPost(n,i).subscribe((function(n){1===n.code&&(t.message.success("保存成功"),t.submitFileAfter(e,n.data))}))},e.prototype.submitFileAfter=function(e,t){e.formConfig.isEdit=!1,e.fileConfig.showBtn=!1,t&&0!==t.length&&(t.forEach((function(t){t.url=e.fileConfig.fileBaseUrl+"/"+t.fileId})),e.fileConfig.cacheData=t,e.fileConfig.fileList=t,e.fileConfig.showRemoveIcon=!1,e.fileConfig=JSON.parse(JSON.stringify(e.fileConfig)))},e.prototype.subSingleTableConfig=function(e){var t=this;this.subParams[e.name]=e.tableConfig.tableData,this.httpService.httpPost(e.formConfig.submitUrl,this.subParams).subscribe((function(n){1===n.code&&(t.message.success("保存成功"),t.subSingleTableConfigAfter(n.data),e.tableConfig.tableData=n.data)}))},e.prototype.subSingleTableConfigAfter=function(e){},e.prototype.submitLocations=function(e){var t=this,n={projectCode:this.projectCode,projectId:this.detailId},i=e.name.split(",");if(this.coordinateValue&&this.coordinateValue.length){var o=this.coordinateValue.map((function(e){var t=O(e,2);return{longitude:t[0],latitude:t[1]}}));n[i[1]]=o,this.httpService.httpPost(e.formConfig.submitUrl,n).subscribe((function(n){1===n.code&&(e.formConfig.isEdit=!1,t.message.success("保存成功"))}))}else this.message.error("请绘制工程位置")},e.prototype.getDetailById=function(e,t){var n=this;this.detailId=e;var i=t+"/"+e;this.httpService.httpGet(i).subscribe((function(e){if(1===e.code){if(!e.data)return;n.setDetailDataToFormConfig(e.data),n.getDetailAfter(e.data)}}))},e.prototype.setDetailDataToFormConfig=function(e){var t=this;e.qr&&e.qr.qrInfo&&(this.qrInfo=e.qr.qrInfo),this.componentConfigList.forEach((function(n){if(n.isForm&&!n.tableConfig&&t.initFormData(e,n),n.locationConfig){var i=n.name.split(",")[0];t.initLocationsFormData(e[i],n)}if(n.fileConfig&&!n.tableConfig&&"img"===n.fileConfig.fileType){var o=n.name.split(",")[0];t.initFeaturesFormData(e[o],n)}n.fileConfig&&"file"===n.fileConfig.fileType&&t.initFileFormData(e,n)}))},e.prototype.getDetailAfter=function(e){},e.prototype.getDetailDatas=function(e){return e},e.prototype.getProjectCode=function(e){this.projectCode=e},e.prototype.resetComponentStatus=function(e){e?this.showAllComponent():this.showFirstComponent(),this.showOrHiddenUploadBtn(e)},e.prototype.showAllComponent=function(){this.componentConfigList.forEach((function(e){e.formConfig.show=!0,e.formConfig.update=!0,e.formConfig.add=!1,e.formConfig.isEdit=!1}))},e.prototype.showOrHiddenUploadBtn=function(e){this.componentConfigList.forEach((function(t){t.fileConfig&&(t.fileConfig.showBtn=!e)}))},e.prototype.showFirstComponent=function(){this.componentConfigList.forEach((function(e,t){e.formConfig.show=0===t,e.formConfig.update=!1,e.formConfig.add=!0,e.formConfig.isEdit=!0,e.fileConfig&&(e.fileConfig.fileList=[])}))},e.prototype.setComponentToEdit=function(e,t){var n=e.formConfig;for(var i in n.items){if(n.items.hasOwnProperty(i))n.items[i].isEdit=!0}if(n.isEdit=!0,n.show=!0,e.fileConfig){var o=JSON.parse(JSON.stringify(e));o.fileConfig.showBtn=!0,o.fileConfig.fileList.length===o.fileConfig.max&&(o.fileConfig.showBtn=!1),o.fileConfig.showPreviewIcon=!0,o.fileConfig.showRemoveIcon=!0,e=o}this.componentConfigList[t].name===e.name&&(this.componentConfigList[t]=e)},e.prototype.initFormData=function(e,t){var n=this,i=setInterval((function(){if(t.formConfig.formGroup){var o=n.resetValueForInt(e,t);n.getGroup(o,t),clearInterval(i)}}),300)},e.prototype.resetValueForInt=function(e,t){var n=t.formConfig.items;for(var i in n)n.hasOwnProperty(i)&&n[i].n&&1===n[i].length&&(e[i]=parseInt(e[i],0));return e},e.prototype.getGroup=function(e,t){t.formConfig.items;for(var n in"baseInfo"===t.name?(t.formConfig.values=e,this.formService.resetForm(t.formConfig.formGroup,e)):(t.formConfig.values=e[t.name],this.formService.resetForm(t.formConfig.formGroup,e[t.name])),t.formConfig.items)e.hasOwnProperty(n)&&"select"===t.formConfig.items[n].ui.type&&(t.formConfig.items[n].value=e[n])},e.prototype.setFormValue=function(e,t){var n=t.formConfig.items;for(var i in n)n.hasOwnProperty(i)&&(n[i].value=e[i])},e.prototype.initLocationsFormData=function(e,t){this.coordinateValue=e.map((function(e){return[e.longitude,e.latitude]})),this.locationsCacheData=e.map((function(e){return[e.longitude,e.latitude]}))},e.prototype.getLocationCacheData=function(){return this.locationsCacheData},e.prototype.initFileFormData=function(e,t){e[t.name]&&(e[t.name].forEach((function(e){e.name=e.fileName,e.url=t.fileConfig.fileBaseUrl+"/"+e.fileId})),t.fileConfig.fileList=e[t.name],t.fileConfig.showRemoveIcon=!1,t.fileConfig.showBtn=!1,t.fileConfig.cacheData=JSON.parse(JSON.stringify(e[t.name])))},e.prototype.initTableConfigData=function(e,t){if(e[t.name]){var n=e[t.name];n.forEach((function(e){e.pictureList&&e.pictureList.length>0&&e.pictureList.forEach((function(e){e.name=e.fileName,e.url=t.fileBaseUrl+"/"+e.fileId}))})),t.tableConfig.tableData=n,t.tableConfig=this.tableService.refreshTabl(t.tableConfig)}},e.prototype.initFeaturesFormData=function(e,t){if(e&&e.length){var n=t.fileConfig.fileBaseUrl;e.forEach((function(e){e.url=n+"/"+e.fileId})),t.fileConfig.fileList=e,t.fileConfig.showBtn=!1,t.fileConfig.cacheData=JSON.parse(JSON.stringify(e))}},e.prototype.removeRowData=function(e,t){e.tableConfig.tableData.splice(t,1),e.tableConfig=this.tableService.refreshTabl(e.tableConfig)},e.prototype.showDeleteModal=function(e,t){var n=this;this.modal.confirm({nzTitle:"提示?",nzContent:'<b style="color: red;">确定要删除选中数据吗</b>',nzOkText:"确定",nzOkType:"danger",nzOnOk:function(){return n.removeRowData(e,t)},nzCancelText:"取消"})},e.prototype.insertRowData=function(e){this.formService.validateForm(e.formConfig.formGroup)&&(e.tableConfig.tableData.push(e.formConfig.formGroup.value),e.tableConfig=this.tableService.refreshTabl(e.tableConfig))},e.prototype.showImgs=function(e){},e.prototype.scrollToElement=function(e){document.querySelector("#"+e.href).scrollIntoView(!0),this.componentConfigList[e.index].formConfig.show=!0},e.prototype.downLoadByGet=function(e){this.commonService.downLoad(e,"GET")},e.prototype.downLoadByPost=function(e,t){this.commonService.downLoad(e,"POST",t)},e}();e.BaseService=le,e.CheckGroupConfig=ge,e.CodeComponent=ie,e.CommonService=I,e.EXE_SELECT_VALUE_ACCESSOR=ne,e.FormConfig=ce,e.HttpService=S,e.MapperTableConfig=de,e.MultipleComponent=ve,e.SAnchorComponent=U,e.SCascaderComponent=K,e.SCheckboxGroupComponent=j,e.SDateComponent=A,e.SExportCodeComponent=X,e.SFileViewerComponent=J,e.SFileViewerService=Z,e.SFormComponent=q,e.SFormService=se,e.SImgViewerComponent=W,e.SInputComponent=V,e.SLinkageComponent=B,e.SModalComponent=N,e.SPagerComponent=F,e.SPdfViewerComponent=$,e.SSelectorComponent=M,e.SStepsComponent=G,e.STableComponent=P,e.STableService=T,e.STreeSelectComponent=Y,e.STreeTableComponent=R,e.SUploadComponent=_,e.SailingModule=re,e.SelectConfig=he,e.ShareDirectiveModule=ee,e.TABLE_CONFIG=L,e.TableBase=ye,e.TableConfig=fe,e.TableMapperBase=be,e.TimepickConfig=pe,e.TreeSelectConfig=me,e.URL_CONFIG=E,e.UploadConfig=ue,e.VerificationCodeCore=te,e.ZoomAndMoveDirective=Q,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=iboom-sailing-front.umd.min.js.map