(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-52e7"],{"6jv3":function(t,e,r){"use strict";var n=r("NdvA");r.n(n).a},"7Enr":function(t,e,r){"use strict";r.d(e,"e",function(){return o}),r.d(e,"a",function(){return i}),r.d(e,"f",function(){return l}),r.d(e,"b",function(){return s}),r.d(e,"c",function(){return u}),r.d(e,"d",function(){return c});var n=r("X4fA"),a=r("t3Un");function o(t){return Object(a.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/majorEquipment/page",method:"post",data:t})}function i(t){return Object(a.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/majorEquipment/add",method:"post",data:t})}function l(t){return Object(a.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/majorEquipment/mod",method:"post",data:t})}function s(t){return Object(a.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/majorEquipment/del",method:"post",data:t})}function u(t){return Object(a.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/majorEquipment/getMajorEquipment",method:"post",data:t})}function c(){return Object(a.a)({headers:{Authorization:Object(n.a)()},url:"http://222.92.213.21:8006/zhongtai/getUserList",method:"post"})}},NdvA:function(t,e,r){},RKTn:function(t,e,r){"use strict";r.r(e);var n=r("omC7"),a=r.n(n),o=r("cLjf"),i=r.n(o),l=r("hDQ3"),s=r.n(l),u=r("X4fA"),c=r("t3Un");function f(t){return Object(c.a)({headers:{Authorization:Object(u.a)()},url:"http://222.92.213.21:8006/zhongtai/majorEquipmentAlarm/page",method:"post",data:t})}var m=r("7Enr"),h={data:function(){return{dialogVisible:!1,title:"",form:{equipmentId:"",status:"",alarmTime:"",alarmInfo:"",remark:""},alarmTime:"",pageSize:10,recordTotal:0,currentPage:1,list:[],listQuery:{filter:{equipmentName:""},pageIndex:1,pageSize:10},type:"",rules:{equipmentId:{required:!0,message:"请选择设备名称",trigger:"change"},status:{required:!0,message:"请选择设备状态",trigger:"change"},alarmTime:{required:!0,message:"请选择报警时间",trigger:"change"},alarmInfo:{required:!0,message:"请输入报警信息",trigger:"change"}},equipmentName:[],unitIdOptions:[{label:"未处理",value:0},{label:"已处理",value:1}]}},created:function(){this.elementManagementL(),this.alarmMajorEquipmentErt()},methods:{alarmMajorEquipmentErt:function(){var t=this;Object(m.c)().then(function(e){console.log(e),t.equipmentName=e.data.result})},elementManagementL:function(){var t=this;return s()(i.a.mark(function e(){var r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(t.listQuery);case 2:r=e.sent,console.log(r),200==r.data.code&&(t.list=r.data.result.records,t.recordTotal=r.data.result.total,t.pageSize=r.data.result.size,t.currentPage=r.data.result.current);case 5:case"end":return e.stop()}},e,t)}))()},handleClick:function(t,e){var r=this;this.dialogVisible=!0,this.$nextTick(function(){r.$refs.form.clearValidate()}),"新增"==e?(this.title="新增",this.form={equipmentId:"",status:0,remark:"",alarmTime:"",alarmInfo:""}):(this.title="编辑",this.form=JSON.parse(a()(t)))},AddelementManagement:function(){var t=this;this.$refs.form.validate(function(e){e&&("新增"==t.title?function(t){return Object(c.a)({headers:{Authorization:Object(u.a)()},url:"http://222.92.213.21:8006/zhongtai/majorEquipmentAlarm/add",method:"post",data:t})}(t.form).then(function(e){200==e.data.code?(t.dialogVisible=!1,t.elementManagementL(),t.$notify({type:"success",duration:2e3,message:"新增成功",title:"成功"})):t.$message({type:"warning",message:e.data.message})}):function(t){return Object(c.a)({headers:{Authorization:Object(u.a)()},url:"http://222.92.213.21:8006/zhongtai/majorEquipmentAlarm/mod",method:"post",data:t})}(t.form).then(function(e){200==e.data.code?(t.dialogVisible=!1,t.elementManagementL(),t.$notify({type:"success",duration:2e3,message:"编辑成功",title:"成功"})):t.$message({type:"warning",message:e.data.message})}))})},cancel:function(){this.elementManagementL(),this.dialogVisible=!1},deleteById:function(t){var e=this;this.$confirm("确认删除吗","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(function(){(function(t){return Object(c.a)({headers:{Authorization:Object(u.a)()},url:"http://222.92.213.21:8006/zhongtai/majorEquipmentAlarm/del",method:"post",data:t})})({id:t}).then(function(t){200==t.data.code?(e.elementManagementL(),e.$notify({title:"成功",message:"删除成功",type:"success",duration:2e3})):e.$message({type:"warning",message:t.data.message})})}).catch(function(t){})},find:function(){this.elementManagementL()},reset:function(){this.listQuery.filter={},this.elementManagementL()},handleSizeChange:function(t){this.listQuery.pageSize=t,this.elementManagementL()},handleCurrentChange:function(t){this.listQuery.pageIndex=t,this.elementManagementL()}}},p=(r("6jv3"),r("ZrdR")),d=Object(p.a)(h,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-container"},[r("el-form",{ref:"form",attrs:{model:t.form,"label-width":"80px"}},[r("el-row",[r("el-col",{attrs:{span:5}},[r("el-form-item",{attrs:{label:"设备名称"}},[r("el-input",{attrs:{clearable:""},model:{value:t.listQuery.filter.equipmentName,callback:function(e){t.$set(t.listQuery.filter,"equipmentName",e)},expression:"listQuery.filter.equipmentName"}})],1)],1),t._v(" "),r("el-col",{attrs:{span:5}},[r("el-form-item",{attrs:{label:"设备状态"}},[r("el-select",{attrs:{placeholder:"请选择状态",clearable:""},model:{value:t.listQuery.filter.status,callback:function(e){t.$set(t.listQuery.filter,"status",e)},expression:"listQuery.filter.status"}},t._l(t.unitIdOptions,function(t){return r("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1)],1),t._v(" "),r("el-col",{staticStyle:{"text-align":"center"},attrs:{span:6}},[r("el-button",{staticClass:"btns",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(e){t.find()}}},[t._v("搜索")]),t._v(" "),r("el-button",{staticClass:"btns",attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(e){t.handleClick("","新增")}}},[t._v("新增")]),t._v(" "),r("el-button",{staticClass:"btns",attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:function(e){t.reset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),r("el-table",{staticStyle:{width:"100%"},attrs:{data:t.list,border:""}},[r("el-table-column",{attrs:{prop:"equipmentName",align:"center",label:"设备名称"}}),t._v(" "),r("el-table-column",{attrs:{label:"状态",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.status?r("span",[t._v("未处理")]):t._e(),t._v(" "),1==e.row.status?r("span",[t._v("已处理")]):t._e()]}}])}),t._v(" "),r("el-table-column",{attrs:{prop:"alarmTime",label:"报警时间",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{prop:"alarmInfo",label:"报警信息",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{prop:"remark",label:"备注",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{attrs:{type:"text",size:"small"},on:{click:function(r){t.handleClick(e.row,"编辑")}}},[t._v("编辑")]),t._v(" "),r("el-button",{staticStyle:{color:"red"},attrs:{type:"text",size:"small"},on:{click:function(r){t.deleteById(e.row.id)}}},[t._v("删除")])]}}])})],1),t._v(" "),r("div",{staticStyle:{"text-align":"right"}},[r("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.recordTotal>0,expression:"recordTotal>0"}],staticStyle:{"margin-top":"20px"},attrs:{"current-page":t.currentPage,"page-sizes":[10,20,30,50],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.recordTotal},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),r("el-dialog",{attrs:{title:t.title,visible:t.dialogVisible,"close-on-click-modal":!1,width:"40%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[r("el-form",{ref:"form",attrs:{rules:t.rules,model:t.form,"label-width":"80px"}},[r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"设备名称",prop:"equipmentId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择设备名称"},model:{value:t.form.equipmentId,callback:function(e){t.$set(t.form,"equipmentId",e)},expression:"form.equipmentId"}},t._l(t.equipmentName,function(t){return r("el-option",{key:t.value,attrs:{label:t.name,value:t.id}})}))],1)],1),t._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"状态",prop:"status"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择设备状态"},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},t._l(t.unitIdOptions,function(t){return r("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1)],1)],1),t._v(" "),r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"报警时间",prop:"alarmTime"}},[r("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"选择日期时间"},model:{value:t.form.alarmTime,callback:function(e){t.$set(t.form,"alarmTime",e)},expression:"form.alarmTime"}})],1)],1)],1),t._v(" "),r("el-row",[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"报警信息",prop:"alarmInfo"}},[r("el-input",{attrs:{type:"textarea",placeholder:"请输入报警信息",maxlength:"50"},model:{value:t.form.alarmInfo,callback:function(e){t.$set(t.form,"alarmInfo",e)},expression:"form.alarmInfo"}})],1)],1)],1),t._v(" "),r("el-row",[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"备注",prop:"remark"}},[r("el-input",{attrs:{type:"textarea",maxlength:"50"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)],1)],1)],1),t._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{staticClass:"btns",attrs:{type:"primary"},on:{click:function(e){t.AddelementManagement()}}},[t._v("确 定")]),t._v(" "),r("el-button",{on:{click:function(e){t.cancel()}}},[t._v("取 消")])],1)],1)],1)},[],!1,null,"3aed9a21",null);d.options.__file="index.vue";e.default=d.exports},cLjf:function(t,e,r){t.exports=r("xOJF")},hDQ3:function(t,e,r){"use strict";e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(r("Asgo"));e.default=function(t){return function(){var e=t.apply(this,arguments);return new n.default(function(t,r){return function a(o,i){try{var l=e[o](i),s=l.value}catch(t){return void r(t)}if(!l.done)return n.default.resolve(s).then(function(t){a("next",t)},function(t){a("throw",t)});t(s)}("next")})}}},k4Ii:function(t,e){!function(e){"use strict";var r,n=Object.prototype,a=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag",u="object"==typeof t,c=e.regeneratorRuntime;if(c)u&&(t.exports=c);else{(c=e.regeneratorRuntime=u?t.exports:{}).wrap=w;var f="suspendedStart",m="suspendedYield",h="executing",p="completed",d={},g={};g[i]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==n&&a.call(y,i)&&(g=y);var b=k.prototype=_.prototype=Object.create(g);j.prototype=b.constructor=k,k.constructor=j,k[s]=j.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===j||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(b),t},c.awrap=function(t){return{__await:t}},O(L.prototype),L.prototype[l]=function(){return this},c.AsyncIterator=L,c.async=function(t,e,r,n){var a=new L(w(t,e,r,n));return c.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(b),b[s]="Generator",b[i]=function(){return this},b.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},c.values=S,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(q),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,a){return l.type="throw",l.arg=t,e.next=n,a&&(e.method="next",e.arg=r),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),q(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;q(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),d}}}function w(t,e,r,n){var a=e&&e.prototype instanceof _?e:_,o=Object.create(a.prototype),i=new I(n||[]);return o._invoke=function(t,e,r){var n=f;return function(a,o){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===a)throw o;return A()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var l=E(i,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var s=x(t,e,r);if("normal"===s.type){if(n=r.done?p:m,s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=p,r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function x(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function _(){}function j(){}function k(){}function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(t){var e;this._invoke=function(r,n){function o(){return new Promise(function(e,o){!function e(r,n,o,i){var l=x(t[r],t,n);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&a.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,o,i)},function(t){e("throw",t,o,i)}):Promise.resolve(u).then(function(t){s.value=t,o(s)},i)}i(l.arg)}(r,n,e,o)})}return e=e?e.then(o,o):o()}}function E(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,E(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var a=x(n,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,d;var o=a.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function z(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function q(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(a.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=r,e.done=!0,e};return o.next=o}}return{next:A}}function A(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},xOJF:function(t,e,r){var n=function(){return this}()||Function("return this")(),a=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,o=a&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r("k4Ii"),a)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}}}]);
|