(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["view-logList-vue"],{"30a9":function(t,e,a){"use strict";a.r(e);a("386d");var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"wrapper wrapper-content animated fadeInRight"},[e("div",{staticClass:"ibox-content m-b-sm border-bottom"},[e("div",{staticClass:"row form-horizontal"},[e("div",{staticClass:"form-group margin-0"},[e("label",{staticClass:"col-sm-2 control-label"},[t._v("Log Type")]),e("div",{staticClass:"col-sm-4"},[e("div",[e("el-select",{on:{change:t.init},model:{value:t.server,callback:function(e){t.server=e},expression:"server"}},[e("el-option",{attrs:{label:"Zeelo",value:"1"}}),e("el-option",{attrs:{label:"Mapping",value:"2"}}),e("el-option",{attrs:{label:"Asset",value:"3"}})],1)],1)]),1==t.server?e("label",{staticClass:"col-sm-2 control-label"},[t._v("Username")]):t._e(),1==t.server?e("div",{staticClass:"col-sm-4"},[e("div",[e("el-input",{model:{value:t.userName,callback:function(e){t.userName=e},expression:"userName"}})],1)]):t._e()]),e("div",{staticClass:"form-group margin-0"},[e("label",{staticClass:"col-sm-2 control-label"},[t._v("Module")]),e("div",{staticClass:"col-sm-4"},[e("div",[e("el-select",{attrs:{clearable:""},model:{value:t.modules,callback:function(e){t.modules=e},expression:"modules"}},t._l(t.moduleList,(function(t){return e("el-option",{key:t,attrs:{label:t,value:t}})})),1)],1)]),e("label",{staticClass:"col-sm-2 control-label"},[t._v("Actions")]),e("div",{staticClass:"col-sm-4"},[e("div",[e("el-select",{attrs:{clearable:""},model:{value:t.actions,callback:function(e){t.actions=e},expression:"actions"}},t._l(t.actionsList,(function(t){return e("el-option",{key:t,attrs:{label:t,value:t}})})),1)],1)])]),e("div",{staticClass:"form-group margin-0"},[e("label",{staticClass:"col-sm-2 control-label"},[t._v("Period")]),e("div",{staticClass:"col-sm-8"},[e("div",[e("el-date-picker",{attrs:{type:"daterange","range-separator":"to","value-format":"yyyy-MM-dd","start-placeholder":"Start Time","end-placeholder":"End Time"},model:{value:t.period,callback:function(e){t.period=e},expression:"period"}})],1)]),e("div",{staticClass:"col-sm-2"},[e("div",{},[e("el-button",{attrs:{type:"primary"},on:{click:t.search}},[t._v(t._s(t.$t("message.Search")))])],1)])])])]),e("div",{staticClass:"row"},[e("div",{staticClass:"col-sm-12"},[e("div",{staticClass:"ibox float-e-margins"},[e("div",{staticClass:"ibox-content"},[e("div",{staticClass:"row table-responsive",staticStyle:{"padding-bottom":"60px"}},[e("div",{staticClass:"col-xs-12"},[t._v(t._s(t.rows.length)+t._s(t.$t("message.datagridresult")))]),e("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.rows,border:"",stripe:"","row-key":"id"},on:{"selection-change":t.handleSelectionChange,"sort-change":t.sortChange,"row-dblclick":t.handleDbClick}},[e("el-table-column",{attrs:{prop:"ocModel","show-overflow-tooltip":!0,label:"Module","min-width":"200"}}),e("el-table-column",{attrs:{prop:"ocAction","show-overflow-tooltip":!0,label:"Actions","min-width":"100"}}),e("el-table-column",{attrs:{prop:"dataKey","show-overflow-tooltip":!0,label:"Data Key",width:"100"}}),"1"==t.server?e("el-table-column",{attrs:{prop:"userName","show-overflow-tooltip":!0,label:"Username","min-width":"200"}}):t._e(),""==t.server?e("el-table-column",{attrs:{prop:"userName","show-overflow-tooltip":!0,label:"Project Name","min-width":"200"}}):t._e(),e("el-table-column",{attrs:{prop:"createdTime",label:"Create time",width:"170"}})],1),e("el-col",{staticClass:"el-table_footertoolbar",attrs:{span:24}},[e("el-pagination",{staticStyle:{float:"right"},attrs:{layout:"total, sizes, prev, pager, next, jumper","page-sizes":[10,20,50,100],"page-size":t.pagesize,total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1),e("el-dialog",{attrs:{title:"",visible:t.showDetail,width:"90%","append-to-body":!0,center:""},on:{"update:visible":function(e){t.showDetail=e}}},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-sm-12"},[e("div",{staticClass:"ibox float-e-margins"},[e("div",{staticClass:"ibox-content"},[e("div",{staticClass:"row table-responsive",staticStyle:{"padding-bottom":"60px"}},[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.compareDetail,border:""}},[e("el-table-column",{attrs:{prop:"key",label:"Key",width:"300",sortable:""}}),e("el-table-column",{attrs:{prop:"befValue",label:"Before Value",width:"300",sortable:""}}),e("el-table-column",{attrs:{prop:"afterValue",label:"After Value",width:"300",sortable:""}})],1)],1)])])])]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.cancelEvent}},[t._v("Cancel")])],1)])],1)])])])])},s=[],i=(a("ac4d"),a("8a81"),a("5df3"),a("1c4c"),a("7f7f"),a("6b54"),a("96cf"),a("3b8d")),o=a("db49");a("aa47");function n(t,e){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=l(t))||e&&t&&"number"===typeof t.length){a&&(t=a);var r=0,s=function(){};return{s:s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,n=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return o=t.done,t},e:function(t){n=!0,i=t},f:function(){try{o||null==a.return||a.return()}finally{if(n)throw i}}}}function l(t,e){if(t){if("string"===typeof t)return c(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,r=new Array(e);a<e;a++)r[a]=t[a];return r}var u={mixins:[o["a"].globalMixin],data:function(){return{page:0,pagesize:10,name:"",total:0,rows:[],multipleSelection:[],sortType:"DESC",sortField:"id",showDetail:!1,compareDetail:[],actionsList:[],moduleList:[],period:[],actions:"",modules:"",server:"1",userName:""}},created:function(){},computed:{_projectid:function(){return this.$store.state.projectId}},watch:{_projectid:function(){this.init(),this.getActionList(),this.getModuleList()}},methods:{init:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){var e,a,r,s,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={},1==this.server?e=this.getAuthObj():2==this.server?e=this.getMapAuthObj():3==this.server&&(e=this.getAssetAuthObj()),e.searchBy={},e.sortBy={},this.period.length>0&&(e.searchBy.startDate=this.period[0]+" 00:00:00",e.searchBy.endDate=this.period[1]+" 23:59:59"),e.searchBy.ocModel=this.modules,e.searchBy.ocAction=this.actions,1==this.server&&(e.searchBy.userName=this.userName),e.sortBy[this.sortField]=this.sortType,e.startRow=this.page*this.pagesize,e.maxRows=this.pagesize,e.apiUrl=this.apiConfig.logList,t.next=14,this.$store.dispatch("apiEvent",e);case 14:if(a=t.sent,a!=this.TOKEN_EXPIRED){t.next=18;break}return this.timeoutEvent(),t.abrupt("return");case 18:if(a){t.next=20;break}return t.abrupt("return");case 20:r=null,s=n(a.data.payload);try{for(s.s();!(i=s.n()).done;)r=i.value,r.createdTime=this.dateFormat(r.createdTime)}catch(o){s.e(o)}finally{s.f()}this.rows=a.data.payload,this.setObj(),this.total=a.data.totalRows;case 26:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getActionList:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){var e,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={},1==this.server?e=this.getAuthObj():2==this.server?e=this.getMapAuthObj():3==this.server&&(e=this.getAssetAuthObj()),e.apiUrl=this.apiConfig.logActionList,t.next=5,this.$store.dispatch("apiEvent",e);case 5:if(a=t.sent,a!=this.TOKEN_EXPIRED){t.next=9;break}return this.timeoutEvent(),t.abrupt("return");case 9:if(a){t.next=11;break}return t.abrupt("return");case 11:this.actionsList=a.data.payload;case 12:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getModuleList:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){var e,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={},1==this.server?e=this.getAuthObj():2==this.server?e=this.getMapAuthObj():3==this.server&&(e=this.getAssetAuthObj()),e.apiUrl=this.apiConfig.logModelList,t.next=5,this.$store.dispatch("apiEvent",e);case 5:if(a=t.sent,a!=this.TOKEN_EXPIRED){t.next=9;break}return this.timeoutEvent(),t.abrupt("return");case 9:if(a){t.next=11;break}return t.abrupt("return");case 11:this.moduleList=a.data.payload;case 12:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),search:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.page=0,this.init();case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),cancelEvent:function(){this.compareDetail=[],this.showDetail=!1},handleDbClick:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(e){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={},1==this.server?a=this.getAuthObj():2==this.server?a=this.getMapAuthObj():3==this.server&&(a=this.getAssetAuthObj()),a.apiUrl=this.apiConfig.logDetail+"/"+e.id,t.next=5,this.$store.dispatch("apiEvent",a);case 5:r=t.sent,r&&(this.compareDetail=r.data.payload,this.showDetail=!0);case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),setObj:function(){}},mounted:function(){this.$store.state.projectId&&(this.init(),this.getActionList(),this.getModuleList())}},h=u,p=a("2877"),d=Object(p["a"])(h,r,s,!1,null,null,null);e["default"]=d.exports}}]);
//# sourceMappingURL=view-logList-vue.4b92af24.js.map