1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-device-warning"],{"0343":function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.content-box[data-v-3273cee4]{padding:%?30?% %?30?% %?60?% %?30?%}.row_box .text[data-v-3273cee4]{word-break:break-all}',""]),t.exports=e},"0f4f":function(t,e,n){"use strict";n.r(e);var i=n("a118"),s=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=s.a},"210d":function(t,e,n){"use strict";n.r(e);var i=n("ad51"),s=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=s.a},2401:function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var i={uSticky:n("680e").default,uDropdown:n("20b3").default,uDropdownItem:n("0dcd").default,uLoadmore:n("eb64").default,uPopup:n("df25").default},s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"bg-page"},[n("u-sticky",{attrs:{"z-index":"99",h5NavHeight:t.h5NavHeightP}},[n("v-uni-view",{staticClass:"secreen-section",staticStyle:{"background-color":"#fff"}},[n("u-dropdown",{ref:"uDropdown",staticClass:"dropdown-box",class:[t.dropDownShow?"":"downClose"],on:{close:function(e){arguments[0]=e=t.$handleEvent(e),t.dropdownClose.apply(void 0,arguments)},open:function(e){arguments[0]=e=t.$handleEvent(e),t.dropdownOpen.apply(void 0,arguments)}}},[n("u-dropdown-item",{attrs:{title:"预警等级",options:t.lvList},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.change1.apply(void 0,arguments)}},model:{value:t.lvvalue,callback:function(e){t.lvvalue=e},expression:"lvvalue"}}),n("u-dropdown-item",{attrs:{title:"设备类型",options:t.typeList},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.change2.apply(void 0,arguments)}},model:{value:t.typevalue,callback:function(e){t.typevalue=e},expression:"typevalue"}}),n("u-dropdown-item",{attrs:{title:"状态",options:t.statusList},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.change3.apply(void 0,arguments)}},model:{value:t.statusvalue,callback:function(e){t.statusvalue=e},expression:"statusvalue"}})],1)],1)],1),n("v-uni-view",{staticClass:"content-box",staticStyle:{"padding-bottom":"60rpx"}},[t._l(t.loglist,(function(e,i){return n("v-uni-view",{key:e.id,staticClass:"tb_swipe_list",attrs:{show:e.show,index:i}},[n("v-uni-view",{staticClass:"tb_body",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.showInfo(i)}}},[n("v-uni-view",{staticClass:"row_box"},[n("v-uni-view",{staticClass:"text"},[t._v("基地:"+t._s(e.base_name))])],1),n("v-uni-view",{staticClass:"row_box"},[n("v-uni-view",{staticClass:"text"},[t._v("监控点:"+t._s(e.point_name))])],1),n("v-uni-view",{staticClass:"row_box"},[n("v-uni-view",{staticClass:"text"},[t._v("等级:"+t._s(t.lvname[e.lv]))])],1),n("v-uni-view",{staticClass:"row_box"},[n("v-uni-view",{staticClass:"text"},[t._v("状态:"+t._s(t.statusname[e.status]))])],1),n("v-uni-view",{staticClass:"row_box"},[n("v-uni-view",{staticClass:"text"},[t._v("时间:"+t._s(t._f("timeFormat")(e.created_at)))])],1)],1)],1)})),n("u-loadmore",{attrs:{status:t.loading,"margin-top":"60"}})],2),n("u-popup",{attrs:{mode:"bottom","border-radius":"28","z-index":"900"},model:{value:t.popupShow,callback:function(e){t.popupShow=e},expression:"popupShow"}},[n("v-uni-view",{staticClass:"popup-form-info"},[n("v-uni-view",{staticClass:"top_box u-border-bottom"},[n("v-uni-view",{staticClass:"title"},[t._v("警报明细")])],1),n("v-uni-view",{staticClass:"section_c"},[n("v-uni-view",{staticClass:"plist u-border-bottom"},[n("v-uni-view",{staticClass:"label_t"},[t._v("基地")]),n("v-uni-view",{staticClass:"flex-1"},[t._v(t._s(t.formInfo.base_name))])],1),n("v-uni-view",{staticClass:"plist u-border-bottom"},[n("v-uni-view",{staticClass:"label_t"},[t._v("监控点")]),n("v-uni-view",{staticClass:"flex-1"},[t._v(t._s(t.formInfo.point_name))])],1),n("v-uni-view",{staticClass:"plist u-border-bottom"},[n("v-uni-view",{staticClass:"label_t"},[t._v("设备类型")]),n("v-uni-view",{staticClass:"flex-1"},[t._v(t._s(t.devicetypename[t.formInfo.device_type]))])],1),n("v-uni-view",{staticClass:"plist u-border-bottom"},[n("v-uni-view",{staticClass:"label_t"},[t._v("等级")]),n("v-uni-view",{staticClass:"flex-1"},[t._v(t._s(t.lvname[t.formInfo.lv]))])],1),n("v-uni-view",{staticClass:"plist u-border-bottom"},[n("v-uni-view",{staticClass:"label_t"},[t._v("状态")]),n("v-uni-view",{staticClass:"flex-1"},[t._v(t._s(t.statusname[t.formInfo.status]))])],1),n("v-uni-view",{staticClass:"plist u-border-bottom"},[n("v-uni-view",{staticClass:"label_t"},[t._v("创建时间")]),n("v-uni-view",{staticClass:"flex-1"},[t._v(t._s(t._f("timeFormat")(t.formInfo.created_at)))])],1),n("v-uni-view",{staticClass:"plist u-border-bottom"},[n("v-uni-view",{staticClass:"label_t"},[t._v("内容")]),n("v-uni-view",{staticClass:"flex-1"},[t._v(t._s(t.formInfo.content))])],1)],1)],1)],1)],1)},a=[]},"346d":function(t,e,n){"use strict";n.r(e);var i=n("2401"),s=n("210d");for(var a in s)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(a);n("d1da");var o,l=n("f0c5"),u=Object(l["a"])(s["default"],i["b"],i["c"],!1,null,"3273cee4",null,!1,i["a"],o);e["default"]=u.exports},"3b60":function(t,e,n){var i=n("0343");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var s=n("4f06").default;s("510ae1ac",i,!0,{sourceMap:!1,shadowMode:!1})},"5e8e":function(t,e,n){"use strict";var i=n("83cc"),s=n.n(i);s.a},"680e":function(t,e,n){"use strict";n.r(e);var i=n("8cc1"),s=n("0f4f");for(var a in s)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(a);n("5e8e");var o,l=n("f0c5"),u=Object(l["a"])(s["default"],i["b"],i["c"],!1,null,"adf85ec2",null,!1,i["a"],o);e["default"]=u.exports},"83cc":function(t,e,n){var i=n("9146");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var s=n("4f06").default;s("c6b9ca94",i,!0,{sourceMap:!1,shadowMode:!1})},"8cc1":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{},[n("v-uni-view",{staticClass:"u-sticky-wrap",class:[t.elClass],style:{height:t.fixed?t.height+"px":"auto",backgroundColor:t.bgColor}},[n("v-uni-view",{staticClass:"u-sticky",style:{position:t.fixed?"fixed":"static",top:t.stickyTop+"px",left:t.left+"px",width:"auto"==t.width?"auto":t.width+"px",zIndex:t.uZIndex}},[t._t("default")],2)],1)],1)},a=[]},9146:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.u-sticky[data-v-adf85ec2]{z-index:9999999999}',""]),t.exports=e},a118:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("a9e3"),n("2c3e");e.default={name:"u-sticky",props:{offsetTop:{type:[Number,String],default:0},index:{type:[Number,String],default:""},enable:{type:Boolean,default:!0},h5NavHeight:{type:[Number,String],default:44},bgColor:{type:String,default:"#ffffff"},zIndex:{type:[Number,String],default:""}},data:function(){return{fixed:!1,height:"auto",stickyTop:0,elClass:this.$u.guid(),left:0,width:"auto"}},watch:{offsetTop:function(t){this.initObserver()},enable:function(t){0==t?(this.fixed=!1,this.disconnectObserver("contentObserver")):this.initObserver()}},computed:{uZIndex:function(){return this.zIndex?this.zIndex:this.$u.zIndex.sticky}},mounted:function(){this.initObserver()},methods:{initObserver:function(){var t=this;this.enable&&(this.stickyTop=0!=this.offsetTop?uni.upx2px(this.offsetTop)+this.h5NavHeight:this.h5NavHeight,this.disconnectObserver("contentObserver"),this.$uGetRect("."+this.elClass).then((function(e){t.height=e.height,t.left=e.left,t.width=e.width,t.$nextTick((function(){t.observeContent()}))})))},observeContent:function(){var t=this;this.disconnectObserver("contentObserver");var e=this.createIntersectionObserver({thresholds:[.95,.98,1]});e.relativeToViewport({top:-this.stickyTop}),e.observe("."+this.elClass,(function(e){t.enable&&t.setFixed(e.boundingClientRect.top)})),this.contentObserver=e},setFixed:function(t){var e=t<this.stickyTop;e?this.$emit("fixed",this.index):this.fixed&&this.$emit("unfixed",this.index),this.fixed=e},disconnectObserver:function(t){var e=this[t];e&&e.disconnect()}},beforeDestroy:function(){this.disconnectObserver("contentObserver")}}},ad51:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("99af");var i=n("815d");e.default={data:function(){return{dropDownShow:!1,per_page:15,page:1,loglist:[],loading:"loadmore",lvList:[{label:"全部",value:0},{label:"Ⅰ级预警",value:1},{label:"Ⅱ级预警",value:2},{label:"Ⅲ级预警",value:3},{label:"Ⅳ级预警",value:4}],lvvalue:"",typeList:[{label:"全部",value:""},{label:"监控设备",value:1},{label:"土壤设备",value:2},{label:"水质设备",value:3},{label:"气象设备",value:4}],typevalue:"",statusList:[{label:"全部",value:-1},{label:"未处理",value:0},{label:"已处理",value:1},{label:"已忽略",value:2}],statusvalue:-1,statusname:{0:"未处理",1:"已处理",2:"已忽略"},lvname:{1:"Ⅰ级预警",2:"Ⅱ级预警",3:"Ⅲ级预警",4:"Ⅳ级预警"},devicetypename:{1:"监控设备",2:"土壤设备",3:"水质设备",4:"气象设备"},popupShow:!1,formInfo:{}}},filters:{timeFormat:function(t){return(0,i.formatDate)(1e3*t,"yyyy-MM-dd hh:mm")},typename:function(t){var e={delete:"删除",create:"创建",update:"修改"},n=e[t]?e[t]:"其它";return n}},onLoad:function(){this.queryloglist()},methods:{showInfo:function(t){this.formInfo=this.loglist[t],this.popupShow=!0},change1:function(t){console.log(t),this.queryloglist(!0)},change2:function(t){console.log(t),this.queryloglist(!0)},change3:function(t){console.log(t),this.queryloglist(!0)},dropdownClose:function(){this.dropDownShow=!1},dropdownOpen:function(){this.dropDownShow=!0},queryloglist:function(t){var e=this;if(t&&(this.loading="loadmore",this.loglist=[],this.page=1),"nomore"==this.loading)return!1;var n={per_page:this.per_page,page:this.page++,_t:(new Date).getTime()};this.lvvalue&&(n["lv"]=this.lvvalue),this.typevalue&&(n["device"]=this.typevalue),this.statusvalue>-1&&(n["status"]=this.statusvalue),this.loading="loading",this.$http.get("/api/device-warning-logs",{params:n}).then((function(t){var n=t.data;if(console.log(n),e.loading="loadmore",200==n.code){var i=n.data||[],s=n.meta,a=s.current_page,o=(s.per_page,s.last_page);e.loglist=e.loglist.concat(i),console.log(e.loglist),a>=o&&(e.loading="nomore")}})).catch((function(){e.loading="loadmore"}))}},onReachBottom:function(){"loadmore"==this.loading&&this.queryloglist()}}},d1da:function(t,e,n){"use strict";var i=n("3b60"),s=n.n(i);s.a}}]); |