(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2cd63069"],{"584f":function(e,t,i){"use strict";i.d(t,"l",(function(){return r})),i.d(t,"q",(function(){return u})),i.d(t,"m",(function(){return a})),i.d(t,"n",(function(){return c})),i.d(t,"k",(function(){return o})),i.d(t,"f",(function(){return s})),i.d(t,"c",(function(){return l})),i.d(t,"g",(function(){return d})),i.d(t,"i",(function(){return m})),i.d(t,"d",(function(){return p})),i.d(t,"r",(function(){return f})),i.d(t,"o",(function(){return v})),i.d(t,"p",(function(){return h})),i.d(t,"h",(function(){return b})),i.d(t,"a",(function(){return g})),i.d(t,"s",(function(){return y})),i.d(t,"b",(function(){return N})),i.d(t,"e",(function(){return O})),i.d(t,"j",(function(){return k}));var n=i("b775");function r(e){return Object(n["a"])({url:"/iot/device/list",method:"get",params:e})}function u(e){return Object(n["a"])({url:"/iot/device/unAuthlist",method:"get",params:e})}function a(e){return Object(n["a"])({url:"/iot/device/listByGroup",method:"get",params:e})}function c(e){return Object(n["a"])({url:"/iot/device/shortList",method:"get",params:e})}function o(){return Object(n["a"])({url:"/iot/device/all",method:"get"})}function s(e){return Object(n["a"])({url:"/iot/device/"+e,method:"get"})}function l(e){return Object(n["a"])({url:"/iot/device/synchronization/"+e,method:"get"})}function d(e){return Object(n["a"])({url:"/iot/device/getDeviceBySerialNumber/"+e,method:"get"})}function m(){return Object(n["a"])({url:"/iot/device/statistic",method:"get"})}function p(e,t){return Object(n["a"])({url:"/iot/device/assignment?deptId="+e+"&deviceIds="+t,method:"post"})}function f(e){return Object(n["a"])({url:"/iot/device/recovery?deviceIds="+e,method:"post"})}function v(){return Object(n["a"])({url:"",method:"get"})}function h(){return Object(n["a"])({url:"",method:"get"})}function b(e){return Object(n["a"])({url:"/iot/device/runningStatus",method:"get",params:e})}function g(e){return Object(n["a"])({url:"/iot/device",method:"post",data:e})}function y(e){return Object(n["a"])({url:"/iot/device",method:"put",data:e})}function N(e){return Object(n["a"])({url:"/iot/device/"+e,method:"delete"})}function O(e){return Object(n["a"])({url:"/iot/device/generator",method:"get",params:e})}function k(e){return Object(n["a"])({url:"/iot/device/getMqttConnectData",method:"get",params:e})}},be84:function(e,t,i){},ecb9:function(e,t,i){"use strict";i("be84")},ed76:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:"选择设备",visible:e.openDeviceList,width:"900px","append-to-body":""},on:{"update:visible":function(t){e.openDeviceList=t}}},[i("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{label:"设备名称",prop:"deviceName"}},[i("el-input",{attrs:{placeholder:"请输入设备名称",clearable:"",size:"small"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.deviceName,callback:function(t){e.$set(e.queryParams,"deviceName",t)},expression:"queryParams.deviceName"}})],1),i("el-form-item",{attrs:{label:"设备编号",prop:"serialNumber"}},[i("el-input",{attrs:{placeholder:"请输入设备编号",clearable:"",size:"small"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.serialNumber,callback:function(t){e.$set(e.queryParams,"serialNumber",t)},expression:"queryParams.serialNumber"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),i("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",attrs:{data:e.deviceList,"row-key":"serialNumber",size:"mini"},on:{select:e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),i("el-table-column",{attrs:{label:"设备名称",align:"center",prop:"deviceName"}}),i("el-table-column",{attrs:{label:"设备编号",align:"center",prop:"serialNumber"}}),i("el-table-column",{attrs:{label:"产品名称",align:"center",prop:"productName"}}),i("el-table-column",{attrs:{label:"设备类型",align:"center",width:"75"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.isOwner?i("el-tag",{attrs:{type:"success"}},[e._v("分享")]):i("el-tag",{attrs:{type:"primary"}},[e._v("拥有")])]}}])}),i("el-table-column",{attrs:{label:"定位方式",align:"center",prop:"locationWay",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("dict-tag",{attrs:{options:e.dict.type.iot_location_way,value:t.row.locationWay}})]}}])}),i("el-table-column",{attrs:{label:"设备状态",align:"center",prop:"status",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("dict-tag",{attrs:{options:e.dict.type.iot_device_status,value:t.row.status}})]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:function(t){return e.getList(null)}}}),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.confirmSelectDevice}},[e._v("确 定")]),i("el-button",{on:{click:e.closeSelectDeviceList}},[e._v("取 消")])],1)],1)},r=[],u=(i("14d9"),i("a434"),i("d3b7"),i("159b"),i("584f")),a={name:"device-list",dicts:["iot_device_status","iot_location_way"],data:function(){return{loading:!0,selectDeviceNums:[],productId:0,productName:"",openDeviceList:!1,total:0,deviceList:[],queryParams:{pageNum:1,pageSize:10,deviceName:null,productId:null,productName:null,serialNumber:null,status:null}}},created:function(){},methods:{getList:function(){var e=this;this.deviceList=[],this.loading=!0,this.queryParams.productId=0==this.queryParams.productId?null:this.queryParams.productId,Object(u["n"])(this.queryParams).then((function(t){e.deviceList=t.rows,e.total=t.total,e.loading=!1,e.selectDeviceNums?e.deviceList.forEach((function(t){e.$nextTick((function(){e.selectDeviceNums.some((function(e){return e===t.serialNumber}))&&e.$refs.multipleTable.toggleRowSelection(t,!0)}))})):e.selectDeviceNums=[]}))},handleQuery:function(){this.queryParams.pageNum=1,this.getList(null)},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e,t){var i=this.selectDeviceNums.indexOf(t.serialNumber),n=e.indexOf(t);-1==i&&-1!=n?(this.selectDeviceNums.push(t.serialNumber),this.productId=t.productId,this.productName=t.productName):-1!=i&&-1==n&&this.selectDeviceNums.splice(i,1),0==this.selectDeviceNums.length?(this.queryParams.productId=null,this.getList()):1==this.selectDeviceNums.length&&(this.queryParams.productId=t.productId,this.getList())},handleSelectionAll:function(e){for(var t=0;t0){var e={productId:this.productId,productName:this.productName,deviceNums:this.selectDeviceNums};this.$emit("deviceEvent",e)}this.openDeviceList=!1}}},c=a,o=(i("ecb9"),i("2877")),s=Object(o["a"])(c,n,r,!1,null,"5bc3a5d8",null);t["default"]=s.exports}}]);