FastBee/docker/data/nginx/vue/static/js/chunk-793c42a8.7d0957c0.js
2025-07-07 09:21:15 +08:00

1 line
5.3 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-793c42a8"],{"5b52":function(e,t,a){"use strict";a.d(t,"h",(function(){return n})),a.d(t,"c",(function(){return r})),a.d(t,"i",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"e",(function(){return u})),a.d(t,"g",(function(){return c})),a.d(t,"b",(function(){return o})),a.d(t,"f",(function(){return d})),a.d(t,"d",(function(){return m}));var i=a("b775");function n(e){return Object(i["a"])({url:"/sub/gateway/list",method:"get",params:e})}function r(e){return Object(i["a"])({url:"/sub/gateway/"+e,method:"delete"})}function s(e){return Object(i["a"])({url:"/sub/gateway/subDevice",method:"get",params:e})}function l(e){return Object(i["a"])({url:"/sub/gateway/addBatch",method:"post",data:e})}function u(e){return Object(i["a"])({url:"/sub/gateway/editBatch",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/productModbus/gateway/list",method:"get",params:e})}function o(e){return Object(i["a"])({url:"productModbus/gateway/addBatch",method:"post",data:e})}function d(e){return Object(i["a"])({url:"/productModbus/gateway/editBatch",method:"post",data:e})}function m(e){return Object(i["a"])({url:"/productModbus/gateway/"+e,method:"delete"})}},ea2a:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.$t("device.sub-device-list.323213-0"),visible:e.openDeviceList,width:"800px","append-to-body":""},on:{"update:visible":function(t){e.openDeviceList=t}}},[a("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[a("el-form-item",{attrs:{label:e.$t("device.index.105953-20"),prop:"serialNumber"}},[a("el-input",{attrs:{placeholder:e.$t("device.sub-device-list.323213-1"),clearable:""},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),a("el-form-item",{attrs:{label:e.$t("device.sub-device-list.323213-2"),prop:"deviceName"}},[a("el-input",{attrs:{placeholder:e.$t("device.sub-device-list.323213-3"),clearable:""},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),a("el-form-item",{staticStyle:{float:"right"}},[a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("refresh")))]),a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("search")))])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.gatewayList},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),a("el-table-column",{attrs:{label:"ID",align:"center",prop:"deviceId"}}),a("el-table-column",{attrs:{label:e.$t("device.device-edit.148398-7"),align:"center",prop:"serialNumber"}}),a("el-table-column",{attrs:{label:e.$t("device.device-edit.148398-1"),align:"center",prop:"deviceName"}})],1),a("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}}),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.handleDeviceSelected}},[e._v(e._s(e.$t("confirm")))]),a("el-button",{on:{click:e.closeSelectDeviceList}},[e._v(e._s(e.$t("cancel")))])],1)],1)},n=[],r=(a("d81d"),a("5b52")),s={name:"sub-device-list",props:{gateway:{type:Object,default:null}},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,gatewayList:[],title:"",open:!1,openDeviceList:!1,queryParams:{pageNum:1,pageSize:10,deviceName:null,serialNumber:null},form:{}}},created:function(){},watch:{gateway:{handler:function(){this.queryParams.pageNum=1,this.getList()},immediate:!0}},methods:{getList:function(){var e=this;this.loading=!0,Object(r["i"])(this.queryParams).then((function(t){e.gatewayList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={deviceId:null,deviceName:null,serialNumber:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.deviceId})),this.single=1!==e.length,this.multiple=!e.length},closeSelectDeviceList:function(){this.openDeviceList=!1},handleDeviceSelected:function(){var e=this;this.gateway.subDeviceIds=this.ids,Object(r["a"])(this.gateway).then((function(t){e.$modal.msgSuccess(e.$t("device.sub-device-list.323213-4")),e.openDeviceList=!1,e.$emit("addSuccess")}))}}},l=s,u=a("2877"),c=Object(u["a"])(l,i,n,!1,null,null,null);t["default"]=c.exports}}]);