FastBee/docker/data/nginx/vue/static/js/chunk-05c05b4c.f2a7751a.js
2025-07-07 09:21:15 +08:00

1 line
9.2 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-05c05b4c"],{"1ab6":function(e,t,i){"use strict";i.r(t);var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:e.$t("firmware.deviceList.index.222542-0"),visible:e.openDeviceList,width:"810px","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:{prop:"deviceName"}},[i("el-input",{staticStyle:{width:"196px"},attrs:{placeholder:e.$t("firmware.deviceList.index.222542-12"),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.query,callback:function(t){e.$set(e.queryParams,"query",t)},expression:"queryParams.query"}})],1),i("el-form-item",{attrs:{prop:"version"}},[i("el-input",{staticClass:"input-with-select",staticStyle:{"vertical-align":"middle",width:"318px"},attrs:{placeholder:e.$t("firmware.deviceList.index.222542-13"),clearable:"",size:"small",disabled:!e.versionType},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.version,callback:function(t){e.$set(e.queryParams,"version",t)},expression:"queryParams.version"}},[i("el-select",{staticStyle:{width:"126px"},attrs:{slot:"prepend",size:"small",placeholder:e.$t("firmware.deviceList.index.222542-14")},slot:"prepend",model:{value:e.versionType,callback:function(t){e.versionType=t},expression:"versionType"}},[i("el-option",{attrs:{label:e.$t("firmware.deviceList.index.222542-15"),value:1}}),i("el-option",{attrs:{label:e.$t("firmware.deviceList.index.222542-16"),value:2}})],1)],1)],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"small"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("search")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",attrs:{data:e.deviceList,size:"small",border:!1},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:e.$t("firmware.deviceList.index.222542-1"),align:"left",prop:"deviceName","min-width":"160"}}),i("el-table-column",{attrs:{label:e.$t("firmware.deviceList.index.222542-5"),align:"left",prop:"serialNumber","min-width":"140"}}),i("el-table-column",{attrs:{label:e.$t("firmware.deviceList.index.222542-15"),align:"center",prop:"firmwareVersion",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.row.firmwareVersion?i("span",[e._v("-")]):e._e(),i("span",[e._v("Version "+e._s(t.row.firmwareVersion))])]}}])}),i("el-table-column",{attrs:{label:e.$t("firmware.deviceList.index.222542-16"),align:"center",prop:"wirelessVersion",width:"110"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.row.wirelessVersion?i("span",[e._v("-")]):i("span",[e._v("Version "+e._s(t.row.wirelessVersion))])]}}])}),i("el-table-column",{attrs:{label:e.$t("firmware.deviceList.index.222542-6"),align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.isOwner?i("el-tag",{attrs:{type:"success"}},[e._v(e._s(e.$t("firmware.deviceList.index.222542-7")))]):i("el-tag",{attrs:{type:"primary"}},[e._v(e._s(e.$t("firmware.deviceList.index.222542-8")))])]}}])}),i("el-table-column",{attrs:{label:e.$t("firmware.deviceList.index.222542-9"),align:"center",prop:"status",width:"100"},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:{layout:"prev, pager, next",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(e._s(e.$t("confirm")))]),i("el-button",{on:{click:e.closeSelectDeviceList}},[e._v(e._s(e.$t("cancel")))])],1)],1)},n=[],a=(i("14d9"),i("a434"),i("d3b7"),i("159b"),i("584f")),s=i("ed08"),o={name:"device-list",dicts:["iot_device_status"],props:{upGrade:{type:Object,default:null}},data:function(){return{formUpGrade:{},loading:!0,ids:[],openDeviceList:!1,total:0,deviceList:[],queryParams:{query:"",pageNum:1,pageSize:10},versionType:null}},watch:{upGrade:{handler:function(e,t){e.flag&&(this.formUpGrade=e,this.queryParams.productId=this.formUpGrade.productId,this.queryParams.firmwareVersion=this.formUpGrade.firmwareVersion,this.ids=this.formUpGrade.deviceList)},immediate:!0,deep:!0},openDeviceList:function(e){e&&(this.queryParams.pageNum=1,this.resetQueryParamsHandle(),this.getList())}},created:function(){},methods:{getList:function(){var e=this;this.loading=!0;var t=Object(s["c"])(this.queryParams);t.firmwareVersion=1===this.versionType?this.queryParams.version:null,t.wirelessVersion=2===this.versionType?this.queryParams.version:null,Object(a["o"])(t).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.serialNumber}))&&e.$refs.multipleTable.toggleRowSelection(t,!0)}))}))}))},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},handleSelectionChange:function(e,t){var i=this.ids.indexOf(t.serialNumber),r=e.indexOf(t);-1==i&&-1!=r?this.ids.push(t.serialNumber):-1!=i&&-1==r&&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].serialNumber),r=e.indexOf(this.deviceList[t]);-1==i&&-1!=r?this.ids.push(this.deviceList[t].serialNumber):-1!=i&&-1==r&&this.ids.splice(i,1)}},closeSelectDeviceList:function(){this.openDeviceList=!1,this.formUpGrade.flag=!1},handleDeviceSelected:function(){this.formUpGrade.deviceList=this.ids,this.formUpGrade.deviceAmount=this.ids.length,this.formUpGrade.flag=!1,this.$modal.msgSuccess(this.$t("firmware.deviceList.index.222542-10")),this.openDeviceList=!1},resetQueryParamsHandle:function(){this.queryParams.firmwareVersion=null,this.queryParams.query=null,this.versionType=null}}},l=o,u=i("2877"),c=Object(u["a"])(l,r,n,!1,null,null,null);t["default"]=c.exports},"584f":function(e,t,i){"use strict";i.d(t,"n",(function(){return n})),i.d(t,"t",(function(){return a})),i.d(t,"o",(function(){return s})),i.d(t,"p",(function(){return o})),i.d(t,"m",(function(){return l})),i.d(t,"f",(function(){return u})),i.d(t,"c",(function(){return c})),i.d(t,"g",(function(){return d})),i.d(t,"i",(function(){return m})),i.d(t,"d",(function(){return f})),i.d(t,"u",(function(){return p})),i.d(t,"q",(function(){return v})),i.d(t,"r",(function(){return h})),i.d(t,"h",(function(){return y})),i.d(t,"a",(function(){return b})),i.d(t,"v",(function(){return g})),i.d(t,"b",(function(){return w})),i.d(t,"e",(function(){return L})),i.d(t,"k",(function(){return O})),i.d(t,"l",(function(){return x})),i.d(t,"j",(function(){return q})),i.d(t,"s",(function(){return _}));var r=i("b775");function n(e){return Object(r["a"])({url:"/iot/device/list",method:"get",params:e})}function a(e){return Object(r["a"])({url:"/iot/device/unAuthlist",method:"get",params:e})}function s(e){return Object(r["a"])({url:"/iot/device/listByGroup",method:"get",params:e})}function o(e){return Object(r["a"])({url:"/iot/device/shortList",method:"get",params:e})}function l(e){return Object(r["a"])({url:"/iot/device/all",method:"get",params:e})}function u(e){return Object(r["a"])({url:"/iot/device/"+e,method:"get"})}function c(e){return Object(r["a"])({url:"/iot/device/synchronization/"+e,method:"get"})}function d(e){return Object(r["a"])({url:"/iot/device/getDeviceBySerialNumber/"+e,method:"get"})}function m(){return Object(r["a"])({url:"/iot/device/statistic",method:"get"})}function f(e,t){return Object(r["a"])({url:"/iot/device/assignment?deptId="+e+"&deviceIds="+t,method:"post"})}function p(e,t){return Object(r["a"])({url:"/iot/device/recovery?deviceIds="+e+"&recoveryDeptId="+t,method:"post"})}function v(e){return Object(r["a"])({url:"/iot/record/list",method:"get",params:e})}function h(e){return Object(r["a"])({url:"/iot/record/list",method:"get",params:e})}function y(e){return Object(r["a"])({url:"/iot/device/runningStatus",method:"get",params:e})}function b(e){return Object(r["a"])({url:"/iot/device",method:"post",data:e})}function g(e){return Object(r["a"])({url:"/iot/device",method:"put",data:e})}function w(e){return Object(r["a"])({url:"/iot/device/"+e,method:"delete"})}function L(e){return Object(r["a"])({url:"/iot/device/generator",method:"get",params:e})}function O(e){return Object(r["a"])({url:"/iot/device/getMqttConnectData",method:"get",params:e})}function x(e){return Object(r["a"])({url:"/sip/sipconfig/auth/"+e,method:"get"})}function q(e){return Object(r["a"])({url:"/iot/device/getHttpAuthData",method:"get",params:e})}function _(e){return Object(r["a"])({url:"/iot/device/listThingsModel",method:"get",params:e})}}}]);