(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3fb34dc7"],{
/***/"3b79":
/***/function(t,e,a){
// extracted by mini-css-extract-plugin
/***/},
/***/"52ae":
/***/function(t,e,a){"use strict";
/* harmony export (binding) */a.d(e,"e",(function(){return c})),
/* harmony export (binding) */a.d(e,"c",(function(){return l})),
/* harmony export (binding) */a.d(e,"h",(function(){return d})),
/* harmony export (binding) */a.d(e,"k",(function(){return p})),
/* harmony export (binding) */a.d(e,"j",(function(){return m})),
/* harmony export (binding) */a.d(e,"f",(function(){return y})),
/* harmony export (binding) */a.d(e,"i",(function(){return g})),
/* harmony export (binding) */a.d(e,"g",(function(){return S})),
/* harmony export (binding) */a.d(e,"d",(function(){return x})),
/* harmony export (binding) */a.d(e,"a",(function(){return k})),
/* harmony export (binding) */a.d(e,"b",(function(){return T}));
/* harmony import */var i=a("c7eb"),n=a("1da1"),o=a("7424"),s=a("b775");
/* harmony import */
/**
 * snmp模型添加
 */
function c(t){return r.apply(this,arguments)}
/**
 * snmp单个模型获取
 */function r(){return(r=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.SNMPMODELADD,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function l(t){return u.apply(this,arguments)}
/**
 * snmp模型修改
 */function u(){return(u=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.SNMPMODELSINGLE,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function d(t){return h.apply(this,arguments)}
/**
 * snmp Mib保存
 */function h(){return(h=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.SNMPMODELEDIT,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t){return f.apply(this,arguments)}
/**
 * snmp模型列表
 */function f(){return(f=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.SAVEMIB,s.b.POST,e,{timeout:6e8}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(t){return D.apply(this,arguments)}
/**
 * snmp模型删除
 */function D(){return(D=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.SNMPMODELLIST,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function y(t){return v.apply(this,arguments)}
/**
 * snmp mib获取
 */function v(){return(v=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.SNMPMODELDELETE,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t){return b.apply(this,arguments)}
/**
 * snmp mib 删除
 */function b(){return(b=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.GETMIBS,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(t){return w.apply(this,arguments)}
/**
 * 数据编辑
 */function w(){return(w=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.DELETEMIBS,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return O.apply(this,arguments)}
/**
 * 通过设备模型获取数据
 */function O(){return(O=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.MODELDATAEDIT,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t){return M.apply(this,arguments)}function M(){return(M=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.GETMIBS,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(t){return C.apply(this,arguments)}function C(){return(C=Object(n.a)(Object(i.a)().mark((function t(e){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(s.g)(o.GETHistoryMIBS,s.b.POST,e));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}
/* unused harmony default export */},
/***/"774d":
/***/function(t,e,a){"use strict";
/* harmony import */a("7a6d");
/* harmony import */},
/***/"7a6d":
/***/function(t,e,a){
// extracted by mini-css-extract-plugin
/***/},
/***/a2a5:
/***/function(t,e,a){"use strict";
/* harmony import */a("3b79");
/* harmony import */},
/***/af4d:
/***/function(t,e,a){"use strict";
// ESM COMPAT FLAG
a.r(e);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"411544a2-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/reporting/diyReport/diyReportContent.vue?vue&type=template&id=1ab90901&scoped=true
a("14d9"),a("fb6a"),a("b0c0");var i=a("600d"),n=(a("c2ec"),a("c1df"),a("f7e6")),o=a.n(n),s=(a("99af"),a("d3b7"),a("4d63"),a("c607"),a("ac1f"),a("2c3e"),a("25f0"),a("1276"),a("caad"),a("2532"),a("52ae")),c=a("1d40"),r={name:"deviceHistoryDataModel",i18n:a("89fe"),data:function(){var t=this;return{visible:!1,pageSize:10,searchText:"",searchedColumn:"",selectedRowsIndex:0,DeviceType:-1,dataModelDialog:!1,selectDataModelUUid:"",pagePosition:"bottom",pageOptions:[{value:"bottom",text:"Bottom"},{value:"top",text:"Top"},{value:"both",text:"Both"}],pagination:{pageSize:15,showSizeChanger:!0},deviceTreeData:[],fromType:1,columns:[{width:"20%",slotName:"readData.tableName",scopedSlots:{filterDropdown:"filterDropdown",filterIcon:"filterIcon",customRender:"customRender",title:"readData.tableName"},dataIndex:"name",onFilter:function(t,e){return e.name.toString().toLowerCase().includes(t.toLowerCase())},onFilterDropdownVisibleChange:function(e){e&&setTimeout((function(){t.searchInput.focus()}),0)}}],FromList:[{value:1,title:"component.deviceDataModel.deviceModel"},{value:2,title:"component.deviceDataModel.deviceData"},{value:3,title:"component.deviceDataModel.SystemData"}],deviceName:"",modelList:[],dataSource:[],IsDevice:!1,DeviceSN:"",messageShowLoad:!1,supportDeviceList:[],selectionDataInfo:null}},watch:{$route:function(){}},activated:function(){this.changeDeviceType(this.DeviceType)},mounted:function(){2==this.fromType&&this.getMonitorTree(),this.modelList=[],this.dataSource=[],this.getSupportDevice(),this.dataModelDialog=!1},methods:{setRowClassName:function(t,e){return this.selectedRowsIndex==e?"clickRowStyle":""},rowClick:function(t,e){var a=this;return{on:{click:function(){a.selectionDataInfo=t,a.selectedRowsIndex=e},dblclick:function(){a.selectionDataInfo=t,a.selectedRowsIndex=e}}}},handleSearch:function(t,e,a){e(),this.searchText=t[0],this.searchedColumn=a},handleReset:function(t){t(),this.searchText=""},getRealData:function(t){var e=this,a={uuid:t};this.dataSource=[],this.messageShowLoad=!0,this.getReadDataResponse=!1,Object(i.k)(a).then((function(t){if(e.getReadDataResponse=!0,e.messageShowLoad=!1,0==t.data.code)for(var a=0;a<t.data.realData.length;a++){var i={};i.id=a.toString(),i.name=t.data.realData[a].name,i.uuid=t.data.realData[a].mduid,i.unit=t.data.realData[a].unit,e.dataSource.push(i),i={}}}))},GetSystemData:function(t){var e=this,a={uuid:t};this.dataSource=[],this.messageShowLoad=!0,this.getReadDataResponse=!1,Object(c.j)(a).then((function(t){if(e.getReadDataResponse=!0,e.messageShowLoad=!1,0==t.data.code)for(var a=0;a<t.data.list.length;a++){var i={};i.id=a.toString(),i.name=t.data.list[a].name,i.uuid=t.data.list[a].uuid,i.unit=t.data.list[a].unit,e.dataSource.push(i),i={}}}))},GetDataModelData:function(t){var e=this,a={type:t};this.dataSource=[],this.messageShowLoad=!0,this.getReadDataResponse=!1,Object(c.d)(a).then((function(t){if(e.getReadDataResponse=!0,e.messageShowLoad=!1,0==t.data.code)for(var a=0;a<t.data.list.length;a++){var i={};i.id=a.toString(),i.name=t.data.list[a].name,i.uuid=t.data.list[a].uuid,i.unit=t.data.list[a].unit,e.dataSource.push(i),i={}}}))},getMonitorTree:function(){var t=this;this.deviceTreeData=[],Object(i.j)().then((function(e){0==e.data.code&&(t.deviceTreeData=null==e.data.list?[]:e.data.list)}))},getDeviceDataModel:function(t){var e={muid:t,type:this.DeviceType};this.dataSource=[];var a=this;this.messageShowLoad=!0,Object(s.a)(e).then((function(t){if(a.messageShowLoad=!1,null!=t.data.mibs&&t.data.mibs.length>0)for(var e={},i=0;i<t.data.mibs.length;i++)e.id=i.toString(),e.name=t.data.mibs[i].name,e.uuid=t.data.mibs[i].uuid,e.unit=t.data.mibs[i].unit,a.dataSource.push(e),e={}}))},getDeviceHistoryDataModel:function(t){var e={muid:t,type:this.DeviceType};this.dataSource=[];var a=this;this.messageShowLoad=!0,Object(s.b)(e).then((function(t){if(a.messageShowLoad=!1,null!=t.data.mibs&&t.data.mibs.length>0)for(var e={},i=0;i<t.data.mibs.length;i++)e.id=i.toString(),e.name=t.data.mibs[i].name,e.uuid=t.data.mibs[i].uuid,e.unit=t.data.mibs[i].unit,a.dataSource.push(e),e={}}))},changeDataFromType:function(t){this.dataSource=[],this.fromType=t,2==t?(this.IsDevice=!0,this.getMonitorTree()):1==t?this.IsDevice=!1:3==t&&this.GetSystemData()},changeDeviceType:function(t){this.dataSource=[],this.IsDevice=!1,this.DeviceSN="",this.DeviceType=t,6!=t&&7!=t?this.getModelList():this.GetDataModelData(t)},getModelList:function(){var t=this;this.modelList=[];var e={type:this.DeviceType};Object(s.j)(e).then((function(e){var a={};if(null!=e.data.list)for(var i=0;i<e.data.list.length;i++)a.id=i,a.uuid=e.data.list[i].uuid,a.text=e.data.list[i].name,t.modelList.push(a),a={}}))},getSupportDevice:function(){var t=this;Object(i.m)().then((function(e){t.supportDeviceList=null==e.data.list?[]:e.data.list,t.supportDeviceList.push({name:"component.deviceDataModel.SystemVar",type:6}),t.supportDeviceList.push({name:"device.CustomDevice",type:7})}))},selectData:function(t){},SelectDevice:function(t,e,a){this.deviceName=e.$options.propsData.title,this.IsDevice=!0,this.dataSource=[],this.DeviceSN=t,this.getRealData(t)},changeDeviceModel:function(t){this.dataSource=[],this.selectDataModelUUid=t[0],this.getDeviceDataModel(t[0])},handleCancel:function(){this.dataModelDialog=!1},showDataModal:function(){this.dataModelDialog=!0,this.visible=!0,this.modelList=[],this.dataSource=[]},onSelectData:function(){this.IsDevice?(this.selectionDataInfo.DeviceName=this.deviceName,this.selectionDataInfo.IsDevice=!0,this.selectionDataInfo.DeviceSN=this.DeviceSN):(this.selectionDataInfo.DeviceType=this.DeviceType,this.selectionDataInfo.IsDevice=!1,this.selectionDataInfo.DeviceSN=""),1!=this.fromType?(this.selectionDataInfo.DeviceType=-1,this.selectionDataInfo.selectDataModelUUid=""):(this.selectionDataInfo.selectDataModelUUid=this.selectDataModelUUid,this.selectionDataInfo.DeviceType=this.DeviceType),this.selectionDataInfo.name=this.$t(this.selectionDataInfo.name),this.$emit("onSelectDataModel",this.selectionDataInfo),this.dataModelDialog=!1}}},l=(a("a2a5"),a("2877")),u=Object(l.a)(r,(function(){var t=this,e=t._self._c;return e("div",{ref:"dataModel"},[e("a-modal",{attrs:{visible:t.dataModelDialog,title:t.$t("component.deviceDataModel.title"),width:"800px",bodyStyle:{"min-height":"500px"},mask:!0,footer:null,zIndex:1004,resizable:!0,modal:!0},on:{cancel:function(e){t.dataModelDialog=!1}}},[e("div",{staticStyle:{margin:"6px"}},[e("a-card",{attrs:{size:"small",title:t.$t("component.deviceDataModel.DataFrom"),region:"north"}},[e("a-form",{attrs:{layout:"inline","label-col":{span:5},"wrapper-col":{span:19}}},[e("a-form-item",{attrs:{label:t.$t("component.deviceDataModel.selectDeviceType")}},[e("a-select",{staticStyle:{width:"400px"},attrs:{dropdownStyle:{"z-index":9999999}},on:{change:t.changeDeviceType}},t._l(t.supportDeviceList,(function(a,i){return e("a-select-option",{key:i,attrs:{value:a.type}},[t._v(" "+t._s(t.$t(a.name))+" ")])})),1)],1)],1)],1)],1),e("a-spin",{staticStyle:{"min-height":"300px"},attrs:{spinning:t.messageShowLoad}},[e("div",{staticStyle:{margin:"6px"}},[e("a-layout",[1==t.fromType&&6!=t.DeviceType&&7!=t.DeviceType?e("a-layout-sider",{staticStyle:{background:"#fff"},attrs:{bodyStyle:{padding:"2px"},panelStyle:{width:"200px",minWidth:"100px"},title:t.$t("component.deviceDataModel.DataModelList"),region:"west",split:!1}},[e("a-card",{staticStyle:{"min-height":"340px"},attrs:{size:"small",hoverable:!0,title:t.$t("component.deviceDataModel.DataModelList")}},[e("a-directory-tree",{attrs:{"tree-data":t.modelList,"replace-fields":{key:"uuid",title:"text"}},on:{select:t.changeDeviceModel}})],1)],1):t._e(),e("a-layout-content",{staticStyle:{background:"#fff"},attrs:{title:t.$t("component.deviceDataModel.DataList"),split:!1,bodyStyle:{padding:"2px","min-height":"300px"},panelStyle:{width:1==t.fromType&&6!=t.DeviceType&&7!=t.DeviceType?"500px":"700px",height:"100%",minWidth:"100px"}}},[e("a-table",{attrs:{"row-key":"uuid",customRow:t.rowClick,columns:t.columns,size:"small",rowClassName:t.setRowClassName,"data-source":t.dataSource,pagination:t.pagination,scroll:{y:340}},scopedSlots:t._u([{key:"name",fn:function(e){return[t._v(" "+t._s(t.$t(e))+" ")]}},{key:"filterDropdown",fn:function(a){var i=a.setSelectedKeys,n=a.selectedKeys,o=a.confirm,s=a.clearFilters,c=a.column;return e("div",{staticStyle:{padding:"8px"}},[e("a-input",{directives:[{name:"ant-ref",rawName:"v-ant-ref",value:function(e){return t.searchInput=e},expression:"c => (searchInput = c)"}],staticStyle:{width:"188px","margin-bottom":"8px",display:"block"},attrs:{placeholder:"Search ".concat(c.dataIndex),value:n[0]},on:{change:function(t){return i(t.target.value?[t.target.value]:[])},pressEnter:function(){return t.handleSearch(n,o,c.dataIndex)}}}),e("a-button",{staticStyle:{width:"90px","margin-right":"8px"},attrs:{type:"primary",icon:"search",size:"small"},on:{click:function(){return t.handleSearch(n,o,c.dataIndex)}}},[t._v(" "+t._s(t.$t("readData.Search"))+" ")]),e("a-button",{staticStyle:{width:"90px"},attrs:{size:"small"},on:{click:function(){return t.handleReset(s)}}},[t._v(" "+t._s(t.$t("readData.Reset"))+" ")])],1)}},{key:"filterIcon",fn:function(t){return e("a-icon",{style:{color:t?"#108ee9":void 0},attrs:{type:"search"}})}},{key:"customRender",fn:function(a,i,n,o){return[t.searchText&&t.searchedColumn===o.dataIndex?e("span",[t._l(a.toString().split(new RegExp("(?<=".concat(t.searchText,")|(?=").concat(t.searchText,")"),"i")),(function(a,i){return[a.toLowerCase()===t.searchText.toLowerCase()?e("mark",{key:i,staticClass:"highlight"},[t._v(t._s(t.$t(a)))]):[t._v(t._s(t.$t(a)))]]}))],2):[t._v(" "+t._s(t.$t(a))+" ")]]}}])},[t._l(t.columns,(function(a,i){return e("template",{slot:a.slotName},[e("span",{key:i},[t._v(t._s(t.$t(a.slotName)))])])}))],2)],1)],1)],1)]),e("a-divider"),e("div",{staticClass:"dialog-button"},[e("a-button",{key:"submit",attrs:{type:"primary"},on:{click:t.onSelectData}},[t._v(" "+t._s(t.$t("component.deviceDataModel.submit"))+" ")]),e("a-button",{key:"back",staticStyle:{"margin-left":"10px"},on:{click:t.handleCancel}},[t._v(" "+t._s(t.$t("component.deviceDataModel.cancel"))+" ")])],1)],1)],1)}),[],!1,null,"14f94718",null)
/* harmony default export */,d=u.exports,h=a("cf45"),p=(a("f2d9"),a("0340")),f=a("f64d"),m={name:"diyDataHistory",i18n:a("89fe"),components:{
// DownloadExcel,
DeviceHistoryDataModel:d},data:function(){return{isMaskShow:!1,selectRow:0,selectCol:0,exportName:"",messageShowLoad:!1,advanced:!0,sheetOptions:{}}},authorize:{},mounted:function(){},activated:function(){var t=this,e=this;this.sheetOptions={container:"luckysheetContent",
// 设定DOM容器的id
title:"luckysheetContent",
// 设定表格名称
lang:"zh",
// 设定表格语言
gridKey:e.$route.params.uuid,plugins:["chart"],loading:{image:function(){return'<svg viewBox="25 25 50 50" class="circular">\n            <circle cx="50" cy="50" r="20" fill="none"></circle>\n            </svg>'},imageClass:"loadingAnimation"},showinfobar:!1,cellRightClickConfig:{customs:[{title:this.$t("diyReport.SelectData"),onClick:function(t,a,i){e.InsertData(t,a,i)}},{title:this.$t("diyReport.SelectDataMax"),onClick:function(t,a,i){e.InsertVar(t,a,i,4)}},{title:this.$t("diyReport.SelectDataMin"),onClick:function(t,a,i){e.InsertVar(t,a,i,5)}},{title:this.$t("diyReport.SelectDataDifference"),onClick:function(t,a,i){e.InsertVar(t,a,i,6)}},{title:this.$t("diyReport.SelectDataSum"),onClick:function(t,a,i){e.InsertVar(t,a,i,7)}},{title:this.$t("diyReport.SelectDataCount"),onClick:function(t,a,i){e.InsertVar(t,a,i,8)}},{title:this.$t("diyReport.SelectDataAverage"),onClick:function(t,a,i){e.InsertVar(t,a,i,9)}},{title:this.$t("diyReport.SelectDate"),onClick:function(t,a,i){e.InsertVar(t,a,i,1)}},{title:this.$t("diyReport.SelectDevice"),onClick:function(t,a,i){e.InsertVar(t,a,i,2)}},{title:this.$t("diyReport.SelectRange"),onClick:function(t,a,i){e.InsertVar(t,a,i,3)}}],copy:!0,
// 复制
copyAs:!1,
// 复制为
paste:!0,
// 粘贴
insertRow:!1,
// 插入行
insertColumn:!1,
// 插入列
deleteRow:!1,
// 删除选中行
deleteColumn:!1,
// 删除选中列
deleteCell:!1,
// 删除单元格
hideRow:!1,
// 隐藏选中行和显示选中行
hideColumn:!1,
// 隐藏选中列和显示选中列
rowHeight:!1,
// 行高
columnWidth:!1,
// 列宽
clear:!1,
// 清除内容
matrix:!1,
// 矩阵操作选区
sort:!1,
// 排序选区
filter:!1,
// 筛选选区
chart:!1,
// 图表生成
image:!0,
// 插入图片
link:!1,
// 插入链接
data:!1,
// 数据验证
cellFormat:!1},showtoolbarConfig:{undoRedo:!0,
//撤销重做，注意撤消重做是两个按钮，由这一个配置决定显示还是隐藏
paintFormat:!0,
//格式刷
currencyFormat:!1,
//货币格式
percentageFormat:!1,
//百分比格式
numberDecrease:!1,
// '减少小数位数'
numberIncrease:!1,
// '增加小数位数
moreFormats:!1,
// '更多格式'
font:!0,
// '字体'
fontSize:!0,
// '字号大小'
bold:!0,
// '粗体 (Ctrl+B)'
italic:!0,
// '斜体 (Ctrl+I)'
strikethrough:!0,
// '删除线 (Alt+Shift+5)'
underline:!0,
// '下划线 (Alt+Shift+6)'
textColor:!0,
// '文本颜色'
fillColor:!0,
// '单元格颜色'
border:!0,
// '边框'
mergeCell:!0,
// '合并单元格'
horizontalAlignMode:!0,
// '水平对齐方式'
verticalAlignMode:!0,
// '垂直对齐方式'
textWrapMode:!0,
// '换行方式'
textRotateMode:!0,
// '文本旋转方式'
image:!0,
// '插入图片'
link:!0,
// '插入链接'
chart:!1,
// '图表'（图标隐藏，但是如果配置了chart插件，右击仍然可以新建图表）
postil:!1,
//'批注'
pivotTable:!1,
//'数据透视表'
function:!1,
// '公式'
frozenMode:!1,
// '冻结方式'
sortAndFilter:!0,
// '排序和筛选'
conditionalFormat:!0,
// '条件格式'
dataVerification:!1,
// '数据验证'
splitColumn:!0,
// '分列'
screenshot:!1,
// '截图'
findAndReplace:!0,
// '查找替换'
protection:!1,
// '工作表保护'
print:!1,
// '打印'
selectData:!0}},"CN"==this.$i18n.locale?(this.sheetOptions.lang="zh",this.json_fields=this.json_fields_cn):(this.sheetOptions.lang="en",this.json_fields=this.json_fields_en),this.exportName=this.$t("reporting.DataHistory.exportName")+"."+Object(h.a)(new Date,"yyyy-MM-dd hh:mm:ss")+".xlsx",
// In some cases, you need to use $nextTick
this.$nextTick((function(){
// luckysheet.create( this.sheetOptions);
var e=new Date,a="/static/reportTemplete/"+t.$route.params.uuid+".xlsx?"+e.getMilliseconds(),i=t.$route.params.uuid,n=t;o.a.transformExcelToLuckyByUrl(a,i,(function(t,e){null!=t.sheets&&0!=t.sheets.length&&(n.sheetOptions.data={},
// luckysheet.destroy()
n.sheetOptions.data=t.sheets,n.sheetOptions.title=t.info.name,n.sheetOptions.userInfo=t.info.name.creator,luckysheet.create(n.sheetOptions))}))}))},filters:{formatDate:function(t){var e=new Date(t);return Object(h.a)(e,"yyyy-MM-dd hh:mm:ss")}},created:function(){},watch:{$route:function(){luckysheet.destroy()}},methods:{onSelectData:function(t){luckysheet.setCellValue(this.selectRow,this.selectCol,"{{DataModel."+t.name+"}}")},InsertVar:function(t,e,a,i){this.selectRow=a.rowIndex,this.selectCol=a.columnIndex;var n=luckysheet.getCellValue(this.selectRow,this.selectCol);if(""!=n&&null!=n)n=n.slice(0,n.length-2);else if(1!=i&&2!=i&&3!=i)return;1==i?luckysheet.setCellValue(this.selectRow,this.selectCol,"{{DataModel.HistoryRecordDateTime}}"):2==i?luckysheet.setCellValue(this.selectRow,this.selectCol,"{{DeviceName}}"):3==i?luckysheet.setCellValue(this.selectRow,this.selectCol,"{{TimeRange}}"):4==i?luckysheet.setCellValue(this.selectRow,this.selectCol,n+"的时间段最大值}}"):5==i?luckysheet.setCellValue(this.selectRow,this.selectCol,n+"的时间段最小值}}"):6==i?luckysheet.setCellValue(this.selectRow,this.selectCol,n+"的时间段差值}}"):7==i?luckysheet.setCellValue(this.selectRow,this.selectCol,n+"的时间段和}}"):8==i?luckysheet.setCellValue(this.selectRow,this.selectCol,n+"的时间段数量}}"):9==i&&luckysheet.setCellValue(this.selectRow,this.selectCol,n+"的时间段平均值}}")},InsertData:function(t,e,a){this.$refs.deviceHistoryDataModel.showDataModal(),this.selectRow=a.rowIndex,this.selectCol=a.columnIndex},startDownload:function(){this.isLoadExecl=!0,this.loadExecl=this.$message.loading(this.$t("reporting.DataHistory.LoadingExecl"),0)},finishDownload:function(){this.$message.destroy(this.loadExecl),this.isLoadExecl=!1},filterOption:function(t,e){return e.componentOptions.children[0].text.toLowerCase().indexOf(t.toLowerCase())>=0},SelectTreeDevice:function(t,e,a){this.GetDeviceModelDataList()},GetDeviceModelDataList:function(){var t=this;this.AlarmDataTree=[];var e={SelectDevice:this.SelectDevice,getType:2};Object(i.b)(e).then((function(e){0==e.data.code&&(t.AlarmDataTree=e.data.list)}))},onDateChange:function(t,e){this.SelectDateRange=e},LoadReportTemplete:function(){var t=new Date,e="/static/reportTemplete/"+this.$route.params.uuid+".xlsx?"+t.getMilliseconds(),a=this;luckysheet.destroy(),o.a.transformExcelToLuckyByUrl(e,"1111",(function(t,e){null!=t.sheets&&0!=t.sheets.length&&(a.sheetOptions.data=t.sheets,a.sheetOptions.title=t.info.name,a.sheetOptions.userInfo=t.info.name.creator,luckysheet.create(a.sheetOptions))}))},back:function(){this.$router.push("/Reporting/DiyReportTemplete")},SaveReportTemplete:function(){var t=this;Object(p.b)(luckysheet.getluckysheetfile(),(function(e){t.dataSource=[];var a={Uuid:t.$route.params.uuid,sheetData:e};t.messageShowLoad=!0,Object(f.f)(a).then((function(e){0==e.data.code&&t.$message.success(t.$t("diyReportTemplete.SaveSuccess"),3),t.messageShowLoad=!1})).catch((function(){t.messageShowLoad=!1,t.$message.destroy(),t.$message.error(t.$t("loginPage.serverError"),3)}))}))}},destroyed:function(){luckysheet.destroy()}},D=(a("774d"),Object(l.a)(m,(function(){var t=this,e=t._self._c;return e("a-card",[e("a-row",[e("a-col",{attrs:{span:8}},[e("a-button",{staticStyle:{"margin-left":"10px","margin-top":"10px","margin-bottom":"10px"},attrs:{icon:"save",type:"primary"},on:{click:t.SaveReportTemplete}},[t._v(t._s(t.$t("diyReportTemplete.Save")))]),e("a-button",{staticStyle:{"margin-left":"10px","margin-top":"10px","margin-bottom":"10px"},attrs:{icon:"reload",type:"default"},on:{click:t.LoadReportTemplete}},[t._v(t._s(t.$t("diyReportTemplete.Reload")))]),e("a-button",{staticStyle:{"margin-left":"10px","margin-top":"10px","margin-bottom":"10px"},attrs:{icon:"backward",type:"default"},on:{click:t.back}},[t._v(t._s(t.$t("dataModel.modbusModel.Back")))])],1),e("a-col",{attrs:{span:12}},[e("div",{staticStyle:{"margin-left":"10px","margin-top":"10px","margin-bottom":"10px","margin-right":"10px"}},[e("a-alert",{attrs:{message:t.$t("diyReportTemplete.TempleteTips"),type:"info","show-icon":""}})],1)])],1),e("div",{staticClass:"hello"},[e("div",{staticStyle:{margin:"0px",padding:"0px",height:"600px",top:"5px","z-index":"-1"},attrs:{id:"luckysheetContent"}}),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isMaskShow,expression:"isMaskShow"}],staticStyle:{position:"absolute","z-index":"1000000",left:"0px",top:"0px",bottom:"0px",right:"0px",background:"rgba(255, 255, 255, 0.8)","text-align":"center","font-size":"40px","align-items":"center","justify-content":"center",display:"flex"}},[t._v("Downloading")]),e("device-history-data-model",{ref:"deviceHistoryDataModel",on:{onSelectDataModel:t.onSelectData}})],1)],1)}),[],!1,null,"1ab90901",null)
/* harmony default export */);e.default=D.exports}}]);