FastBee/docker/data/nginx/vue/static/js/chunk-28b7a9aa.6b3216c8.js
2025-07-07 09:21:15 +08:00

1 line
7.4 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-28b7a9aa"],{"10f3":function(e,t,i){"use strict";i.d(t,"e",(function(){return r})),i.d(t,"d",(function(){return a})),i.d(t,"c",(function(){return u})),i.d(t,"a",(function(){return o})),i.d(t,"g",(function(){return c})),i.d(t,"f",(function(){return l})),i.d(t,"b",(function(){return s}));var n=i("b775");function r(e){return Object(n["a"])({url:"/iot/group/list",method:"get",params:e})}function a(e){return Object(n["a"])({url:"/iot/group/"+e,method:"get"})}function u(e){return Object(n["a"])({url:"/iot/group/getDeviceIds/"+e,method:"get"})}function o(e){return Object(n["a"])({url:"/iot/group",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/iot/group",method:"put",data:e})}function l(e){return Object(n["a"])({url:"/iot/group/updateDeviceGroups",method:"put",data:e})}function s(e){return Object(n["a"])({url:"/iot/group/"+e,method:"delete"})}},"584f":function(e,t,i){"use strict";i.d(t,"k",(function(){return r})),i.d(t,"n",(function(){return a})),i.d(t,"l",(function(){return u})),i.d(t,"m",(function(){return o})),i.d(t,"j",(function(){return c})),i.d(t,"e",(function(){return l})),i.d(t,"c",(function(){return s})),i.d(t,"f",(function(){return d})),i.d(t,"h",(function(){return m})),i.d(t,"g",(function(){return p})),i.d(t,"a",(function(){return f})),i.d(t,"o",(function(){return h})),i.d(t,"b",(function(){return v})),i.d(t,"d",(function(){return g})),i.d(t,"i",(function(){return b}));var n=i("b775");function r(e){return Object(n["a"])({url:"/iot/device/list",method:"get",params:e})}function a(e){return Object(n["a"])({url:"/iot/device/unAuthlist",method:"get",params:e})}function u(e){return Object(n["a"])({url:"/iot/device/listByGroup",method:"get",params:e})}function o(e){return Object(n["a"])({url:"/iot/device/shortList",method:"get",params:e})}function c(){return Object(n["a"])({url:"/iot/device/all",method:"get"})}function l(e){return Object(n["a"])({url:"/iot/device/"+e,method:"get"})}function s(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){return Object(n["a"])({url:"/iot/device/runningStatus",method:"get",params:e})}function f(e){return Object(n["a"])({url:"/iot/device",method:"post",data:e})}function h(e){return Object(n["a"])({url:"/iot/device",method:"put",data:e})}function v(e){return Object(n["a"])({url:"/iot/device/"+e,method:"delete"})}function g(){return Object(n["a"])({url:"/iot/device/generator",method:"get"})}function b(e){return Object(n["a"])({url:"/iot/device/getMqttConnectData",method:"get",params:e})}},d4b0: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:"800px","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",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",attrs:{data:e.deviceList,size:"mini",border:""},on:{select:e.handleSelectionChange,"select-all":e.handleSelectionAll}},[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"},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:"status"},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:e.getList}}),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.handleDeviceSelected}},[e._v("确 定")]),i("el-button",{on:{click:e.closeSelectDeviceList}},[e._v("取 消")])],1)],1)},r=[],a=(i("d3b7"),i("159b"),i("14d9"),i("a434"),i("10f3")),u=i("584f"),o={name:"device-list",dicts:["iot_device_status"],props:{group:{type:Object,default:null}},data:function(){return{deviceGroup:{},loading:!0,ids:[],openDeviceList:!1,total:0,deviceList:[],queryParams:{pageNum:1,pageSize:10,deviceName:null,productId:null,productName:null,userId:null,userName:null,tenantId:null,tenantName:null,serialNumber:null,status:null,networkAddress:null,activeTime:null}}},watch:{group:{handler:function(e,t){e.groupId&&(this.deviceGroup=e,this.queryParams.userId=this.deviceGroup.userId,this.queryParams.pageNum=1,this.getDeviceIdsByGroupId(this.deviceGroup.groupId))},immediate:!0}},created:function(){},methods:{getDeviceIdsByGroupId:function(e){var t=this;Object(a["c"])(e).then((function(e){t.ids=e.data,t.getList()}))},getList:function(){var e=this;this.loading=!0,this.queryParams.params={},null!=this.daterangeActiveTime&&""!=this.daterangeActiveTime&&(this.queryParams.params["beginActiveTime"]=this.daterangeActiveTime[0],this.queryParams.params["endActiveTime"]=this.daterangeActiveTime[1]),Object(u["l"])(this.queryParams).then((function(t){e.deviceList=t.rows,e.total=t.total,e.loading=!1,e.deviceList.forEach((function(t){e.$nextTick((function(){e.ids.some((function(e){return e===t.deviceId}))&&e.$refs.multipleTable.toggleRowSelection(t,!0)}))}))}))},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.daterangeActiveTime=[],this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e,t){var i=this.ids.indexOf(t.deviceId),n=e.indexOf(t);-1==i&&-1!=n?this.ids.push(t.deviceId):-1!=i&&-1==n&&this.ids.splice(i,1)},handleSelectionAll:function(e){for(var t=0;t<this.deviceList.length;t++){var i=this.ids.indexOf(this.deviceList[t].deviceId),n=e.indexOf(this.deviceList[t]);-1==i&&-1!=n?this.ids.push(this.deviceList[t].deviceId):-1!=i&&-1==n&&this.ids.splice(i,1)}},closeSelectDeviceList:function(){this.openDeviceList=!1},handleDeviceSelected:function(){var e=this;this.group.deviceIds=this.ids,Object(a["f"])(this.group).then((function(t){e.$modal.msgSuccess("更新分组下的设备成功"),e.openDeviceList=!1}))}}},c=o,l=i("2877"),s=Object(l["a"])(c,n,r,!1,null,null,null);t["default"]=s.exports}}]);