(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-d026"],{"9WTv":function(t,e,n){"use strict";n.d(e,"e",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"g",function(){return u}),n.d(e,"c",function(){return s}),n.d(e,"f",function(){return c}),n.d(e,"b",function(){return l}),n.d(e,"h",function(){return p}),n.d(e,"d",function(){return h});var r=n("t3Un"),i=n("X4fA");function o(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/equipment",method:"get",params:t||{}})}function a(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/addEquipment",method:"post",data:t})}function u(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/putEquipment",method:"post",data:t})}function s(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/delEquipment",method:"post",data:t})}function c(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/gasWarn",method:"get",params:t||{}})}function l(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/addGasWarn",method:"post",data:t})}function p(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/putGasWarn",method:"post",data:t})}function h(t){return Object(r.a)({headers:{Authorization:Object(i.a)()},url:"http://222.92.213.21:8006/zhongtai/delGasWarn",method:"post",data:t})}},DD85:function(t,e,n){"use strict";var r=n("dw8B");n.n(r).a},Nlja:function(t,e,n){"use strict";n.r(e);var r=n("cLjf"),i=n.n(r),o=n("hDQ3"),a=n.n(o),u=n("bS4n"),s=n.n(u),c=n("8t5x"),l=n("9WTv"),p=n("7Qib"),h={name:"index",filters:{parseSafety:function(t){return 1===t?"是":0===t?"否":void 0},parseInvolve:function(t){return 1===t?"是":0===t?"否":void 0}},computed:s()({},Object(c.b)(["userType"])),data:function(){return{tableKey:0,equipmentData:[],listLoading:!1,pageSize:10,recordTotal:0,currentPage:1,pageTotal:0,title:"",equipmentFormVisible:!1,equipmentFormRules:{name:[{required:!0,message:"设备名称不能为空",trigger:"blur"}],number:[{required:!0,message:"设备条码不能为空",trigger:"change"}],isphoto:[{required:!0,message:"是否有摄像头必选",trigger:"change"}]},equipmentForm:{id:"",name:"",number:"",isphoto:"",photoname:"",photoaddress:""},isSafetyList:[{id:1,name:"是"},{id:0,name:"否"}],isInvolveList:[{id:1,name:"是"},{id:0,name:"否"}],companyList:[],name:"",number:""}},created:function(){this.getEquipmentData()},methods:{getEquipmentData:function(){var t=this;return a()(i.a.mark(function e(){var n,r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.listLoading=!0,(n={}).pageIndex=t.currentPage,n.pageSize=t.pageSize,n.name=t.name,n.number=t.number,e.next=8,Object(l.e)(n);case 8:"200"===(r=e.sent).data.code?(t.recordTotal=r.data.result.totalCount,t.pageSize=r.data.result.pageSize,t.pageTotal=Object(p.a)(r.data.result.totalCount,r.data.result.pageSize),t.currentPage=r.data.result.pageIndex,t.equipmentData=r.data.result.result):t.$message({message:r.data.message,type:"warning"}),t.listLoading=!1;case 11:case"end":return e.stop()}},e,t)}))()},showDepartmentForm:function(t,e){var n=this;this.equipmentFormVisible=!0,this.$nextTick(function(){n.$refs.equipmentForm.clearValidate()}),"新增"===e?(this.title="新增",this.equipmentForm={}):(this.title="修改",this.equipmentForm=t)},submitEquipment:function(){var t=this;this.$refs.equipmentForm.validate(function(e){e?"新增"===t.title?Object(l.a)(t.equipmentForm).then(function(e){"200"===e.data.code?(t.equipmentFormVisible=!1,t.getEquipmentData(),t.$notify({type:"success",duration:2e3,message:"新增成功",title:"成功"})):t.$message({type:"warning",message:e.data.message})}):Object(l.g)(t.equipmentForm).then(function(e){"200"===e.data.code?(t.equipmentFormVisible=!1,t.getEquipmentData(),t.$notify({type:"success",duration:2e3,title:"成功",message:"编辑成功"})):t.$message({type:"warning",message:e.data.message})}):t.$message({type:"warning",message:"请填写必填项"})})},deleteById:function(t){var e=this;this.$confirm("删除此条信息,是否继续","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(l.c)({id:t.id}).then(function(){e.getEquipmentData(),e.$notify({title:"成功",message:"删除成功",type:"success",duration:2e3})})})},refreshHandle:function(){this.getEquipmentData()},handleSizeChange:function(t){this.pageSize=t,this.getEquipmentData()},handleCurrentChange:function(t){this.currentPage=t,this.getEquipmentData()}}},m=(n("DD85"),n("ZrdR")),f=Object(m.a)(h,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"filter-container"},[n("div",{staticClass:"basic_search"},[n("span",[t._v("设备名称:")]),t._v(" "),n("el-input",{staticStyle:{width:"200px"},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1),t._v(" "),n("div",{staticClass:"basic_search"},[n("span",[t._v("设备条码:")]),t._v(" "),n("el-input",{staticStyle:{width:"200px"},model:{value:t.number,callback:function(e){t.number=e},expression:"number"}})],1),t._v(" "),n("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.refreshHandle}},[t._v("搜索")]),t._v(" "),n("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(e){t.showDepartmentForm("","新增")}}},[t._v("新增")])],1),t._v(" "),n("div",{staticClass:"table_content"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],key:t.tableKey,staticStyle:{width:"100%"},attrs:{data:t.equipmentData,border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{label:"设备名称",prop:"name",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"设备条码",prop:"number",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"是否有摄像头",prop:"isphoto",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("parseInvolve")(e.row.isphoto))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"摄像头名称",prop:"photoname",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"摄像头地址",prop:"photoaddress",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"更新人",prop:"updateby",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"更新时间",prop:"updatetime",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"操作",align:"center",width:"280","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text"},on:{click:function(n){t.showDepartmentForm(e.row,"编辑")}}},[t._v("编辑")]),t._v(" "),n("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(n){t.deleteById(e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),n("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.recordTotal>0,expression:"recordTotal>0"}],staticStyle:{float:"right"},attrs:{"current-page":t.currentPage,"page-sizes":[10,20,30,50],"page-size":t.pageSize,total:t.recordTotal,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}),t._v(" "),n("br")],1),t._v(" "),n("el-dialog",{attrs:{title:t.title,visible:t.equipmentFormVisible,"modal-append-to-body":!1,"close-on-click-modal":!1,width:"40%"},on:{"update:visible":function(e){t.equipmentFormVisible=e}}},[n("el-form",{ref:"equipmentForm",staticStyle:{"margin-left":"50px",width:"500px"},attrs:{rules:t.equipmentFormRules,model:t.equipmentForm,"label-position":"right","label-width":"150px"}},[n("el-form-item",{attrs:{label:"设备名称",prop:"name"}},[n("el-input",{model:{value:t.equipmentForm.name,callback:function(e){t.$set(t.equipmentForm,"name",e)},expression:"equipmentForm.name"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"设备条码:",prop:"number"}},[n("el-input",{model:{value:t.equipmentForm.number,callback:function(e){t.$set(t.equipmentForm,"number","string"==typeof e?e.trim():e)},expression:"equipmentForm.number"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"是否有摄像头:",prop:"isinvolve"}},[n("el-select",{staticStyle:{width:"100%"},attrs:{"auto-complete":"on"},model:{value:t.equipmentForm.isphoto,callback:function(e){t.$set(t.equipmentForm,"isphoto","string"==typeof e?e.trim():e)},expression:"equipmentForm.isphoto"}},t._l(t.isInvolveList,function(t){return n("el-option",{key:t.id,attrs:{value:t.id,label:t.name}})}))],1),t._v(" "),n("el-form-item",{attrs:{label:"摄像头名称:",prop:"photoname"}},[n("el-input",{model:{value:t.equipmentForm.photoname,callback:function(e){t.$set(t.equipmentForm,"photoname","string"==typeof e?e.trim():e)},expression:"equipmentForm.photoname"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"摄像头地址:",prop:"photoaddress"}},[n("el-input",{model:{value:t.equipmentForm.photoaddress,callback:function(e){t.$set(t.equipmentForm,"photoaddress","string"==typeof e?e.trim():e)},expression:"equipmentForm.photoaddress"}})],1)],1),t._v(" "),n("div",{attrs:{align:"right"}},[n("el-button",{on:{click:function(e){t.equipmentFormVisible=!1}}},[t._v("取消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitEquipment()}}},[t._v("确认")])],1)],1)],1)},[],!1,null,"1fa9921a",null);f.options.__file="index.vue";e.default=f.exports},cLjf:function(t,e,n){t.exports=n("xOJF")},dw8B:function(t,e,n){},hDQ3:function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n("Asgo"));e.default=function(t){return function(){var e=t.apply(this,arguments);return new r.default(function(t,n){return function i(o,a){try{var u=e[o](a),s=u.value}catch(t){return void n(t)}if(!u.done)return r.default.resolve(s).then(function(t){i("next",t)},function(t){i("throw",t)});t(s)}("next")})}}},k4Ii:function(t,e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag",c="object"==typeof t,l=e.regeneratorRuntime;if(l)c&&(t.exports=l);else{(l=e.regeneratorRuntime=c?t.exports:{}).wrap=w;var p="suspendedStart",h="suspendedYield",m="executing",f="completed",d={},g={};g[a]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==r&&i.call(y,a)&&(g=y);var b=F.prototype=_.prototype=Object.create(g);q.prototype=b.constructor=F,F.constructor=q,F[s]=q.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===q||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,F):(t.__proto__=F,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(b),t},l.awrap=function(t){return{__await:t}},j(L.prototype),L.prototype[u]=function(){return this},l.AsyncIterator=L,l.async=function(t,e,n,r){var i=new L(w(t,e,n,r));return l.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},j(b),b[s]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=S,z.prototype={constructor:z,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},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 r(r,i){return u.type="throw",u.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),d}}}function w(t,e,n,r){var i=e&&e.prototype instanceof _?e:_,o=Object.create(i.prototype),a=new z(r||[]);return o._invoke=function(t,e,n){var r=p;return function(i,o){if(r===m)throw new Error("Generator is already running");if(r===f){if("throw"===i)throw o;return D()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===p)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=m;var s=x(t,e,n);if("normal"===s.type){if(r=n.done?f:h,s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=f,n.method="throw",n.arg=s.arg)}}}(t,n,a),o}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function q(){}function F(){}function j(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(t){var e;this._invoke=function(n,r){function o(){return new Promise(function(e,o){!function e(n,r,o,a){var u=x(t[n],t,r);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(c).then(function(t){s.value=t,o(s)},a)}a(u.arg)}(n,r,e,o)})}return e=e?e.then(o,o):o()}}function O(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,O(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 i=x(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function z(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return o.next=o}}return{next:D}}function D(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},xOJF:function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n("k4Ii"),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}}}]);
|