webpackJsonp([17],{"H+sC":function(t,e){},cxLP:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("Gu7T"),s=i.n(a),l={name:"MonitorTable",props:{title:{type:String,default:""},layout:{type:Array,default:function(){return[]}},model:{type:Array,default:function(){return[]}},mode:{type:String,default:"1"},clickable:{type:Boolean,default:!1}},data:function(){return{curSrc:null,showImg:!1,listData:[],cur:0,dataSize:100,btnMsg:"加载更多"}},methods:{handleView:function(t){this.curSrc=t,this.showImg=!0},handleRowClick:function(t){this.clickable&&this.$emit("row-click",t)},more:function(){var t;this.cur+=1;var e=this.model.slice(this.cur*this.dataSize,(this.cur+1)*this.dataSize);(t=this.listData).push.apply(t,s()(e)),this.model.length<=(this.cur+1)*this.dataSize&&(this.btnMsg="— 暂无更多数据 —")}},watch:{model:{handler:function(t){t.length<=this.dataSize&&(this.btnMsg="— 暂无更多数据 —"),this.cur=0,this.listData=t.slice(this.cur*this.dataSize,(this.cur+1)*this.dataSize)},immediate:!0}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"monitor-table"},[t.title?a("p",{staticClass:"title"},[t._v(t._s(t.title))]):t._e(),t._v(" "),"1"==t.mode?a("Row",{staticClass:"row row-title"},t._l(t.layout,function(e){return a("i-col",{key:e.key,staticClass:"col",attrs:{span:e.width,offset:e.offset||0}},[a("div",{style:"text-align: "+(e.align||"left")+"; "},[t._v("\n        "+t._s(e.title)+"\n        ")])])}),1):t._e(),t._v(" "),t.model&&t.model.length>0&&"1"==t.mode?[a("div",t._l(t.listData,function(e,s){return a("Row",{key:s,staticClass:"row",class:t.clickable?"clickable":"",nativeOn:{click:function(i){return t.handleRowClick(e)}}},t._l(t.layout,function(s){return a("i-col",{key:s.key,staticClass:"col",attrs:{span:s.width,offset:s.offset||0}},["img"==s.type?[e[s.key]&&e[s.key].length>0?t._l(e[s.key],function(e,i){return a("img",{key:e+i,attrs:{src:e},on:{click:function(i){return t.handleView(e)}}})}):t._e()]:t._e(),t._v(" "),"icon"==s.type?[e[s.key]?a("img",{staticStyle:{width:"1rem",height:"1rem"},attrs:{src:i("g1gp")}}):t._e()]:a("div",{style:"text-align: "+(s.align||"left")+";color: "+(e.color||"")+" "},[t._v("\n            "+t._s(s.format?s.format(e[s.key]):e[s.key]||"暂无")+"\n            "),s.tooltip?a("Tooltip",{attrs:{"max-width":"10rem",content:e[s.tooltip],transfer:""}},[a("Icon",{staticStyle:{"font-size":"1.2rem",cursor:"pointer","margin-left":"0.2rem"},attrs:{type:"md-alert",color:"gold"}})],1):t._e()],1)],2)}),1)}),1),t._v(" "),a("div",{class:"no-data "+("加载更多"==t.btnMsg?"btn":""),on:{click:t.more}},[t._v(t._s(t.btnMsg))])]:t.model&&t.model.length>0&&"2"==t.mode?[a("div",t._l(t.listData,function(e,i){return a("Row",{key:i,staticClass:"row"},[a("i-col",{staticClass:"col",attrs:{span:16}},[a("div",[a("p",[t._v(t._s(e.INDEXNAME))]),t._v(" "),a("p",{staticStyle:{color:"#aaa"}},[t._v(t._s(e.REMARK))])])]),t._v(" "),a("i-col",{staticClass:"col",attrs:{span:8}},[e.imageList&&e.imageList.length>0?t._l(e.imageList,function(e,i){return a("img",{key:e+i,attrs:{src:t.$api.IMG_URL+e.imageName},on:{click:function(i){return t.handleView(e.imageName)}}})}):t._e()],2)],1)}),1)]:a("div",{staticClass:"no-data"},[t._v("\n    — 暂无数据 —\n  ")]),t._v(" "),a("m-modal",{model:{value:t.showImg,callback:function(e){t.showImg=e},expression:"showImg"}},[t.showImg?a("img",{staticStyle:{width:"100%"},attrs:{src:t.$api.IMG_URL+t.curSrc}}):t._e()])],2)},staticRenderFns:[]};var o=i("VU/8")(l,n,!1,function(t){i("H+sC")},"data-v-32e65b93",null);e.default=o.exports}});
//# sourceMappingURL=17.12d3154154339a1bfdfd.js.map