(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-115ac4f8","chunk-998b165e","chunk-55daa2dc","chunk-b2bd8bd6"],{1464:function(t,e,r){"use strict";r("7a34")},"1e36":function(t,e,r){"use strict";r.d(e,"d",(function(){return i})),r.d(e,"e",(function(){return o})),r.d(e,"c",(function(){return n})),r.d(e,"a",(function(){return l})),r.d(e,"f",(function(){return s})),r.d(e,"b",(function(){return c}));var a=r("b775");function i(t){return Object(a["a"])({url:"/iot/category/list",method:"get",params:t})}function o(){return Object(a["a"])({url:"/iot/category/shortlist",method:"get"})}function n(t){return Object(a["a"])({url:"/iot/category/"+t,method:"get"})}function l(t){return Object(a["a"])({url:"/iot/category",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/iot/category",method:"put",data:t})}function c(t){return Object(a["a"])({url:"/iot/category/"+t,method:"delete"})}},3021:function(t,e,r){"use strict";r.d(e,"c",(function(){return i})),r.d(e,"a",(function(){return o})),r.d(e,"d",(function(){return n})),r.d(e,"b",(function(){return l}));var a=r("b775");function i(t,e){return Object(a["a"])({url:"/sip/sipconfig/"+t+"/"+e,method:"get"})}function o(t){return Object(a["a"])({url:"/sip/sipconfig",method:"post",data:t})}function n(t){return Object(a["a"])({url:"/sip/sipconfig",method:"put",data:t})}function l(t){return Object(a["a"])({url:"/sip/sipconfig/product/"+t,method:"delete"})}},"38da":function(t,e,r){"use strict";r.d(e,"f",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"a",(function(){return n})),r.d(e,"g",(function(){return l})),r.d(e,"b",(function(){return s})),r.d(e,"c",(function(){return c})),r.d(e,"e",(function(){return u}));var a=r("b775");function i(t){return Object(a["a"])({url:"/iot/temp/list",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/iot/temp/"+t,method:"get"})}function n(t){return Object(a["a"])({url:"/iot/temp",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/iot/temp",method:"put",data:t})}function s(t){return Object(a["a"])({url:"/iot/temp/"+t,method:"delete"})}function c(t){return Object(a["a"])({url:"/iot/temp/getTemp",method:"get",params:t})}function u(t){return Object(a["a"])({url:"/iot/temp/getTempByPid",method:"get",params:t})}},4443:function(t,e,r){"use strict";r("dfef")},"47e5":function(t,e,r){"use strict";r("de70")},"4efc":function(t,e,r){t.exports=r.p+"static/img/gateway.5a51e30f.png"},"52bb":function(t,e,r){t.exports=r.p+"static/img/product.66c3c4d5.png"},"584f":function(t,e,r){"use strict";r.d(e,"k",(function(){return i})),r.d(e,"n",(function(){return o})),r.d(e,"l",(function(){return n})),r.d(e,"m",(function(){return l})),r.d(e,"j",(function(){return s})),r.d(e,"e",(function(){return c})),r.d(e,"c",(function(){return u})),r.d(e,"f",(function(){return d})),r.d(e,"h",(function(){return p})),r.d(e,"g",(function(){return m})),r.d(e,"a",(function(){return f})),r.d(e,"o",(function(){return h})),r.d(e,"b",(function(){return v})),r.d(e,"d",(function(){return b})),r.d(e,"i",(function(){return g}));var a=r("b775");function i(t){return Object(a["a"])({url:"/iot/device/list",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/iot/device/unAuthlist",method:"get",params:t})}function n(t){return Object(a["a"])({url:"/iot/device/listByGroup",method:"get",params:t})}function l(t){return Object(a["a"])({url:"/iot/device/shortList",method:"get",params:t})}function s(){return Object(a["a"])({url:"/iot/device/all",method:"get"})}function c(t){return Object(a["a"])({url:"/iot/device/"+t,method:"get"})}function u(t){return Object(a["a"])({url:"/iot/device/synchronization/"+t,method:"get"})}function d(t){return Object(a["a"])({url:"/iot/device/getDeviceBySerialNumber/"+t,method:"get"})}function p(){return Object(a["a"])({url:"/iot/device/statistic",method:"get"})}function m(t){return Object(a["a"])({url:"/iot/device/runningStatus",method:"get",params:t})}function f(t){return Object(a["a"])({url:"/iot/device",method:"post",data:t})}function h(t){return Object(a["a"])({url:"/iot/device",method:"put",data:t})}function v(t){return Object(a["a"])({url:"/iot/device/"+t,method:"delete"})}function b(t){return Object(a["a"])({url:"/iot/device/generator",method:"get",params:t})}function g(t){return Object(a["a"])({url:"/iot/device/getMqttConnectData",method:"get",params:t})}},"7a34":function(t,e,r){},"814a":function(t,e,r){"use strict";r.d(e,"e",(function(){return i})),r.d(e,"f",(function(){return o})),r.d(e,"d",(function(){return n})),r.d(e,"c",(function(){return l})),r.d(e,"a",(function(){return s})),r.d(e,"g",(function(){return c})),r.d(e,"b",(function(){return u}));var a=r("b775");function i(t){return Object(a["a"])({url:"/iot/firmware/list",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/iot/firmware/upGradeVersionList",method:"get",params:t})}function n(t){return Object(a["a"])({url:"/iot/firmware/getLatest/"+t,method:"get"})}function l(t){return Object(a["a"])({url:"/iot/firmware/"+t,method:"get"})}function s(t){return Object(a["a"])({url:"/iot/firmware",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/iot/firmware",method:"put",data:t})}function u(t){return Object(a["a"])({url:"/iot/firmware/"+t,method:"delete"})}},9355:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{"padding-left":"20px"}},[r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:firmware:add"],expression:"['iot:firmware:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:t.handleAdd}},[t._v("新增")])],1),r("el-col",{attrs:{span:1.5}},[r("el-button",{attrs:{type:"warning",plain:"",icon:"el-icon-refresh",size:"mini"},on:{click:t.getList}},[t._v("刷新")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{data:t.firmwareList,size:"small"},on:{"selection-change":t.handleSelectionChange}},[r("el-table-column",{attrs:{label:"固件名称",align:"center",prop:"firmwareName"}}),r("el-table-column",{attrs:{label:"固件版本",align:"center",prop:"version",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v("Version ")]),t._v(" "+t._s(e.row.version)+" ")]}}])}),r("el-table-column",{attrs:{label:"状态",align:"center",prop:"isLatest",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.isLatest?r("el-tag",{attrs:{type:"success"}},[t._v("最新")]):r("el-tag",{attrs:{type:"info"}},[t._v("默认")])]}}])}),r("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"createTime",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(t.parseTime(e.row.createTime,"{y}-{m}-{d}")))])]}}])}),r("el-table-column",{attrs:{label:"下载地址",align:"center",prop:"filePath","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-link",{attrs:{href:t.getDownloadUrl(e.row.filePath),underline:!1,type:"success"}},[t._v(t._s(t.getDownloadUrl(e.row.filePath)))])]}}])}),r("el-table-column",{attrs:{label:"固件描述",align:"center",prop:"remark","min-width":"200"}}),r("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:firmware:edit"],expression:"['iot:firmware:edit']"}],staticStyle:{padding:"5px"},attrs:{size:"small",type:"primary",icon:"el-icon-edit"},on:{click:function(r){return t.handleUpdate(e.row)}}},[t._v("修改")]),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:firmware:remove"],expression:"['iot:firmware:remove']"}],staticStyle:{padding:"5px"},attrs:{size:"small",type:"danger",icon:"el-icon-delete"},on:{click:function(r){return t.handleDelete(e.row)}}},[t._v("删除")])]}}])})],1),r("el-dialog",{attrs:{title:t.title,visible:t.open,width:"500px","append-to-body":""},on:{"update:visible":function(e){t.open=e}}},[r("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"固件名称",prop:"firmwareName"}},[r("el-input",{attrs:{placeholder:"请输入固件名称"},model:{value:t.form.firmwareName,callback:function(e){t.$set(t.form,"firmwareName",e)},expression:"form.firmwareName"}})],1),r("el-form-item",{attrs:{label:"固件版本",prop:"version"}},[r("el-input",{attrs:{placeholder:"请输入固件版本",type:"number",step:"0.1"},model:{value:t.form.version,callback:function(e){t.$set(t.form,"version",e)},expression:"form.version"}})],1),r("el-form-item",{attrs:{label:"最新固件",prop:"isLatest"}},[r("el-switch",{attrs:{"active-text":"","inactive-text":"","active-value":1,"inactive-value":0},model:{value:t.form.isLatest,callback:function(e){t.$set(t.form,"isLatest",e)},expression:"form.isLatest"}}),r("el-link",{staticStyle:{"font-size":"12px","margin-left":"15px"},attrs:{type:"info",underline:!1}},[t._v("提示:产品中只能有一个最新固件")])],1),r("el-form-item",{attrs:{label:"固件上传",prop:"filePath"}},[r("fileUpload",{ref:"file-upload",attrs:{value:t.form.filePath,limit:1,fileSize:10,fileType:["bin","zip","pdf"]},on:{input:function(e){return t.getFilePath(e)}}})],1),r("el-form-item",{attrs:{label:"固件描述",prop:"remark"}},[r("el-input",{attrs:{type:"textarea",rows:"4",placeholder:"请输入固件信息"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("确 定")]),r("el-button",{on:{click:t.cancel}},[t._v("取 消")])],1)],1)],1)},i=[],o=r("5530"),n=(r("d81d"),r("2a75")),l=r("814a"),s=r("5f87"),c={name:"product-firmware",dicts:["iot_yes_no"],components:{fileUpload:n["a"]},props:{product:{type:Object,default:null}},watch:{product:function(t,e){this.productInfo=t,this.productInfo&&0!=this.productInfo.productId&&(this.queryParams.productId=this.productInfo.productId,this.form.productId=this.productInfo.productId,this.form.productName=this.productInfo.productName,this.getList())}},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,firmwareList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:100,firmwareName:null,productName:null,productId:0,isSys:null},productInfo:{},form:{version:1},rules:{firmwareName:[{required:!0,message:"固件名称不能为空",trigger:"blur"}],version:[{required:!0,message:"固件版本不能为空",trigger:"blur"}],filePath:[{required:!0,message:"文件路径不能为空",trigger:"blur"}]},upload:{isUploading:!1,headers:{Authorization:"Bearer "+Object(s["a"])()},url:"/prod-api/iot/tool/upload",fileList:[]}}},created:function(){},methods:{getDownloadUrl:function(t){return window.location.origin+"/prod-api"+t},getList:function(){var t=this;this.loading=!0,Object(l["e"])(this.queryParams).then((function(e){t.firmwareList=e.rows,t.total=e.total,t.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={firmwareId:null,firmwareName:null,tenantId:null,tenantName:null,productId:this.form.productId,productName:this.form.productName,isSys:null,isLatest:0,version:1,filePath:null,delFlag:null,createBy:null,createTime:null,updateBy:null,updateTime:null,remark:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(t){this.ids=t.map((function(t){return t.firmwareId})),this.single=1!==t.length,this.multiple=!t.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加产品固件",this.upload.fileList=[]},handleUpdate:function(t){var e=this;this.reset();var r=t.firmwareId||this.ids;Object(l["c"])(r).then((function(t){e.form=t.data,e.open=!0,e.title="修改产品固件",e.upload.fileList=[{name:e.form.firmwareName,url:e.form.filePath}]}))},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){e&&(null!=t.form.firmwareId?Object(l["g"])(t.form).then((function(e){t.$modal.msgSuccess("修改成功"),t.open=!1,t.getList()})):Object(l["a"])(t.form).then((function(e){t.$modal.msgSuccess("新增成功"),t.open=!1,t.getList()})))}))},handleDelete:function(t){var e=this,r=t.firmwareId||this.ids;this.$modal.confirm('是否确认删除产品固件编号为"'+r+'"的数据项?').then((function(){return Object(l["b"])(r)})).then((function(){e.getList(),e.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("iot/firmware/export",Object(o["a"])({},this.queryParams),"firmware_".concat((new Date).getTime(),".xlsx"))},getFilePath:function(t){this.form.filePath=t},submitUpload:function(){this.$refs.upload.submit()},handleFileUploadProgress:function(t,e,r){this.upload.isUploading=!0},handleFileSuccess:function(t,e,r){this.upload.isUploading=!1,this.form.filePath=t.url,this.$modal.msgSuccess(t.msg)},handleDownload:function(t){window.open("/prod-api"+t.filePath)}}},u=c,d=r("2877"),p=Object(d["a"])(u,a,i,!1,null,null,null);e["default"]=p.exports},"9b9c":function(t,e,r){"use strict";r.d(e,"f",(function(){return i})),r.d(e,"g",(function(){return o})),r.d(e,"e",(function(){return n})),r.d(e,"a",(function(){return l})),r.d(e,"i",(function(){return s})),r.d(e,"d",(function(){return c})),r.d(e,"b",(function(){return u})),r.d(e,"c",(function(){return d})),r.d(e,"h",(function(){return p}));var a=r("b775");function i(t){return Object(a["a"])({url:"/iot/product/list",method:"get",params:t})}function o(){return Object(a["a"])({url:"/iot/product/shortList",method:"get"})}function n(t){return Object(a["a"])({url:"/iot/product/"+t,method:"get"})}function l(t){return Object(a["a"])({url:"/iot/product",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/iot/product",method:"put",data:t})}function c(t){return Object(a["a"])({url:"/iot/product/deviceCount/"+t,method:"get"})}function u(t){return Object(a["a"])({url:"/iot/product/status/",method:"put",data:t})}function d(t){return Object(a["a"])({url:"/iot/product/"+t,method:"delete"})}function p(t){return Object(a["a"])({url:"/iot/product/queryByTemplateId",method:"get",params:t})}},a67d:function(t,e,r){"use strict";r("eab6")},b213:function(t,e,r){"use strict";r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return n})),r.d(e,"e",(function(){return l})),r.d(e,"b",(function(){return s}));var a=r("b775");function i(t){return Object(a["a"])({url:"/iot/protocol/list",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/iot/protocol/"+t,method:"get"})}function n(t){return Object(a["a"])({url:"/iot/protocol",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/iot/protocol",method:"put",data:t})}function s(t){return Object(a["a"])({url:"/iot/protocol/"+t,method:"delete"})}},bbfb:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{"padding-left":"20px"}},[r("el-row",{attrs:{gutter:10}},[r("el-col",{attrs:{span:14}},[r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-col",{attrs:{span:1.5}},[r("el-button",{attrs:{type:"warning",plain:"",icon:"el-icon-refresh",size:"mini"},on:{click:t.getList}},[t._v("刷新")])],1),r("el-tag",{staticStyle:{"margin-left":"15px"},attrs:{type:"danger"}},[t._v("该功能暂不可用,后面版本发布")])],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-bottom":"60px","margin-top":"20px"},attrs:{data:t.modelList,border:"",size:"small"}},[r("el-table-column",{attrs:{label:"名称",align:"center",prop:"modelName"}}),r("el-table-column",{attrs:{label:"标识符",align:"center",prop:"identifier"}}),r("el-table-column",{attrs:{label:"物模型类别",align:"center",prop:"type"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("dict-tag",{attrs:{options:t.dict.type.iot_things_type,value:e.row.type}})]}}])}),r("el-table-column",{attrs:{label:"数据类型",align:"center",prop:"datatype"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("dict-tag",{attrs:{options:t.dict.type.iot_data_type,value:e.row.datatype}})]}}])}),r("el-table-column",{attrs:{label:"部件",align:"center",prop:"part"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.part)+" 系统定义的部件 ")]}}])})],1),r("el-divider",[t._v("高级功能")]),r("el-form",{ref:"form",attrs:{model:t.form,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"自定义页面",prop:"page"}},[r("el-input",{attrs:{placeholder:"请输入自定义页面"},model:{value:t.form.page,callback:function(e){t.$set(t.form,"page",e)},expression:"form.page"}})],1)],1)],1),r("el-col",{attrs:{span:8,offset:2}},[r("div",{staticClass:"phone"},[r("div",{staticClass:"phone-container"})]),r("div",{staticStyle:{"text-align":"center","margin-top":"15px",width:"370px"}},[t._v("界面展示")])])],1)],1)},i=[],o=r("01ca"),n={name:"device-log",dicts:["iot_things_type","iot_data_type","iot_yes_no"],props:{product:{type:Object,default:null}},data:function(){return{loading:!1,modelList:[],title:"",queryParams:{productId:0,type:4},form:{},productInfo:{}}},watch:{product:function(t,e){this.productInfo=t,this.productInfo&&0!=this.productInfo.productId&&(this.queryParams.productId=this.productInfo.productId,this.getList())}},created:function(){},methods:{getList:function(){var t=this;this.loading=!0,Object(o["f"])(this.queryParams).then((function(e){t.modelList=e.rows,t.total=e.total,t.loading=!1}))}}},l=n,s=(r("1464"),r("2877")),c=Object(s["a"])(l,a,i,!1,null,"acd2e2f8",null);e["default"]=c.exports},c59e:function(t,e,r){t.exports=r.p+"static/img/video.fb1e1b71.png"},ddac:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{"padding-left":"20px"}},[r("el-form",{directives:[{name:"show",rawName:"v-show",value:t.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:t.queryParams,inline:!0,"label-width":"68px"}},[r("el-form-item",{attrs:{label:"设备编号",prop:"serialNumber"}},[r("el-input",{attrs:{placeholder:"请输入设备编号",clearable:"",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery(e)}},model:{value:t.queryParams.serialNumber,callback:function(e){t.$set(t.queryParams,"serialNumber",e)},expression:"queryParams.serialNumber"}})],1),r("el-form-item",{attrs:{label:"授权码",prop:"authorizeCode"}},[r("el-input",{attrs:{placeholder:"请输入授权码",clearable:"",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery(e)}},model:{value:t.queryParams.authorizeCode,callback:function(e){t.$set(t.queryParams,"authorizeCode",e)},expression:"queryParams.authorizeCode"}})],1),r("el-form-item",{attrs:{label:"状态",prop:"status"}},[r("el-select",{attrs:{placeholder:"请选择状态",clearable:"",size:"small"},model:{value:t.queryParams.status,callback:function(e){t.$set(t.queryParams,"status",e)},expression:"queryParams.status"}},t._l(t.dict.type.iot_auth_status,(function(t){return r("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:t.handleQuery}},[t._v("搜索")]),r("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:t.resetQuery}},[t._v("重置")])],1)],1),r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:authorize:add"],expression:"['iot:authorize:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:t.handleAdd}},[t._v("生成授权码")])],1),r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:authorize:remove"],expression:"['iot:authorize:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:t.multiple},on:{click:t.handleDelete}},[t._v("批量删除")])],1),r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:authorize:export"],expression:"['iot:authorize:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:t.handleExport}},[t._v("导出")])],1),r("el-col",{attrs:{span:1.5}},[r("el-link",{staticStyle:{"padding-top":"5px"},attrs:{type:"info",underline:!1}},[t._v("Tips:双击可以复制授权码。")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{data:t.authorizeList,size:"small"},on:{"selection-change":t.handleSelectionChange,"cell-dblclick":t.celldblclick}},[r("el-table-column",{attrs:{type:"selection",selectable:t.selectable,width:"55",align:"center"}}),r("el-table-column",{attrs:{label:"授权码",width:"320",align:"center",prop:"authorizeCode"}}),r("el-table-column",{attrs:{label:"状态",align:"center",prop:"active",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("dict-tag",{attrs:{options:t.dict.type.iot_auth_status,value:e.row.status}})]}}])}),r("el-table-column",{attrs:{label:"设备编号",width:"150",align:"center",prop:"serialNumber"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-link",{attrs:{type:"primary",underline:!1},on:{click:function(r){return t.getDeviceBySerialNumber(e.row.serialNumber)}}},[t._v(t._s(e.row.serialNumber))])]}}])}),r("el-table-column",{attrs:{label:"授权时间",align:"center",prop:"updateTime",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(t.parseTime(e.row.updateTime,"{y}-{m}-{d} {h}:{m}:{s}")))])]}}])}),r("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark"}}),r("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[1!=e.row.status||e.row.deviceId?t._e():r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:authorize:edit"],expression:"['iot:authorize:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-s-check"},on:{click:function(r){return t.handleUpdate(e.row,"auth")}}},[t._v("设备授权")]),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:authorize:edit"],expression:"['iot:authorize:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-notebook-1"},on:{click:function(r){return t.handleUpdate(e.row,"remark")}}},[t._v("备注")]),e.row.deviceId?t._e():r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:authorize:remove"],expression:"['iot:authorize:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(r){return t.handleDelete(e.row)}}},[t._v("删除")])]}}])})],1),r("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],attrs:{total:t.total,page:t.queryParams.pageNum,limit:t.queryParams.pageSize},on:{"update:page":function(e){return t.$set(t.queryParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.queryParams,"pageSize",e)},pagination:t.getList}}),r("el-dialog",{attrs:{title:t.title,visible:t.open,width:t.editWidth,"append-to-body":""},on:{"update:visible":function(e){t.open=e}}},["auth"==t.editType?r("div",[r("div",{staticClass:"el-divider el-divider--horizontal",staticStyle:{"margin-top":"-25px"}}),r("el-form",{ref:"queryDeviceForm",attrs:{model:t.deviceParams,inline:!0,"label-width":"68px"}},[r("el-form-item",{attrs:{label:"设备名称",prop:"deviceName"}},[r("el-input",{staticStyle:{width:"150px"},attrs:{placeholder:"请输入设备名称",clearable:"",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery(e)}},model:{value:t.deviceParams.deviceName,callback:function(e){t.$set(t.deviceParams,"deviceName",e)},expression:"deviceParams.deviceName"}})],1),r("el-form-item",{staticStyle:{margin:"0 30px"},attrs:{label:"设备编号",prop:"serialNumber"}},[r("el-input",{staticStyle:{width:"150px"},attrs:{placeholder:"请输入设备编号",clearable:"",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery(e)}},model:{value:t.deviceParams.serialNumber,callback:function(e){t.$set(t.deviceParams,"serialNumber",e)},expression:"deviceParams.serialNumber"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:t.handleDeviceQuery}},[t._v("搜索")]),r("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:t.resetDeviceQuery}},[t._v("重置")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.deviceLoading,expression:"deviceLoading"}],ref:"singleTable",attrs:{data:t.deviceList,size:"mini","highlight-current-row":""},on:{"row-click":t.rowClick}},[r("el-table-column",{attrs:{label:"选择",width:"50",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){return[r("input",{attrs:{type:"radio",name:"device"},domProps:{checked:t.row.isSelect}})]}}],null,!1,1388052008)}),r("el-table-column",{attrs:{label:"设备名称",align:"center",prop:"deviceName"}}),r("el-table-column",{attrs:{label:"设备ID",align:"center",prop:"deviceId"}}),r("el-table-column",{attrs:{label:"设备编号",align:"center",prop:"serialNumber"}}),r("el-table-column",{attrs:{label:"用户名称",align:"center",prop:"userName"}}),r("el-table-column",{attrs:{label:"设备状态",align:"center",prop:"status"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("dict-tag",{attrs:{options:t.dict.type.iot_device_status,value:e.row.status}})]}}],null,!1,2431977129)})],1),r("pagination",{directives:[{name:"show",rawName:"v-show",value:t.deviceTotal>0,expression:"deviceTotal>0"}],attrs:{total:t.deviceTotal,page:t.deviceParams.pageNum,limit:t.deviceParams.pageSize},on:{"update:page":function(e){return t.$set(t.deviceParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.deviceParams,"pageSize",e)},pagination:t.getDeviceList}})],1):t._e(),"remark"==t.editType?r("div",[r("el-input",{attrs:{type:"textarea",rows:"4",placeholder:"请输入内容"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1):t._e(),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("确 定")]),r("el-button",{on:{click:t.cancel}},[t._v("取 消")])],1)]),r("el-dialog",{attrs:{title:"设备详情",visible:t.openDevice,width:"600px","append-to-body":""},on:{"update:visible":function(e){t.openDevice=e}}},[null==t.device?r("div",{staticStyle:{"text-align":"center"}},[r("i",{staticClass:"el-icon-warning",staticStyle:{color:"#E6A23C"}}),t._v(" 提示:查找不到设备,可能已经被删除")]):t._e(),null!=t.device?r("el-descriptions",{attrs:{border:"",column:2,size:"medium"}},[r("el-descriptions-item",{attrs:{label:"设备ID"}},[t._v(t._s(t.device.deviceId))]),r("el-descriptions-item",{attrs:{label:"设备名称"}},[t._v(t._s(t.device.deviceName))]),r("el-descriptions-item",{attrs:{label:"设备编号"}},[t._v(t._s(t.device.serialNumber))]),r("el-descriptions-item",{attrs:{label:"设备状态"}},[1==t.device.status?r("el-tag",{attrs:{type:"warning"}},[t._v("未激活")]):2==t.device.status?r("el-tag",{attrs:{type:"danger"}},[t._v("禁用")]):3==t.device.status?r("el-tag",{attrs:{type:"success"}},[t._v("在线")]):4==t.device.status?r("el-tag",{attrs:{type:"info"}},[t._v("离线")]):t._e()],1),r("el-descriptions-item",{attrs:{label:"设备影子"}},[1==t.device.isShadow?r("el-tag",{attrs:{type:"success"}},[t._v("启用")]):r("el-tag",{attrs:{type:"info"}},[t._v("未启用")])],1),r("el-descriptions-item",{attrs:{label:"定位方式"}},[1==t.device.locationWay?r("el-tag",{attrs:{type:"success"}},[t._v("自动定位")]):2==t.device.locationWay?r("el-tag",{attrs:{type:"warning"}},[t._v("设备定位")]):3==t.device.locationWay?r("el-tag",{attrs:{type:"primary"}},[t._v("自定义位置")]):t._e()],1),r("el-descriptions-item",{attrs:{label:"产品名称"}},[t._v(t._s(t.device.productName))]),r("el-descriptions-item",{attrs:{label:"租户名称"}},[t._v(t._s(t.device.userName))]),r("el-descriptions-item",{attrs:{label:"固件版本"}},[t._v("Version "+t._s(t.device.firmwareVersion))]),r("el-descriptions-item",{attrs:{label:"所在地址"}},[t._v(t._s(t.device.networkAddress))]),r("el-descriptions-item",{attrs:{label:"设备经度"}},[t._v(t._s(t.device.longitude))]),r("el-descriptions-item",{attrs:{label:"设备纬度"}},[t._v(t._s(t.device.latitude))]),r("el-descriptions-item",{attrs:{label:"入网IP"}},[t._v(t._s(t.device.networkIp))]),r("el-descriptions-item",{attrs:{label:"设备信号"}},[t._v(t._s(t.device.rssi))]),r("el-descriptions-item",{attrs:{label:"创建时间"}},[t._v(t._s(t.device.createTime))]),r("el-descriptions-item",{attrs:{label:"激活时间"}},[t._v(t._s(t.device.activeTime))]),r("el-descriptions-item",{attrs:{label:"备注信息"}},[t._v(t._s(t.device.remark))])],1):t._e(),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.goToEditDevice(t.device.deviceId)}}},[t._v("查看设备")]),r("el-button",{on:{click:t.closeDevice}},[t._v("关 闭")])],1)],1)],1)},i=[],o=r("5530"),n=r("ade3"),l=(r("14d9"),r("d81d"),r("584f")),s=r("b775");function c(t){return Object(s["a"])({url:"/iot/authorize/list",method:"get",params:t})}function u(t){return Object(s["a"])({url:"/iot/authorize/"+t,method:"get"})}function d(t){return Object(s["a"])({url:"/iot/authorize/addProductAuthorizeByNum",method:"post",data:t})}function p(t){return Object(s["a"])({url:"/iot/authorize",method:"put",data:t})}function m(t){return Object(s["a"])({url:"/iot/authorize/"+t,method:"delete"})}var f={name:"product-authorize",dicts:["iot_auth_status","iot_device_status"],props:{product:{type:Object,default:null}},watch:{product:function(t,e){this.productInfo=t,this.productInfo&&0!=this.productInfo.productId&&(this.queryParams.productId=this.productInfo.productId,this.deviceParams.productId=this.productInfo.productId,this.getList(),this.getDeviceList())}},data:function(){var t;return{device:{},openDevice:!1,deviceLoading:!0,deviceTotal:0,deviceList:[],deviceParams:(t={pageNum:1,pageSize:10,userId:null,deviceName:null,productId:0,productName:null},Object(n["a"])(t,"userId",null),Object(n["a"])(t,"userName",null),Object(n["a"])(t,"tenantId",null),Object(n["a"])(t,"tenantName",null),Object(n["a"])(t,"serialNumber",null),Object(n["a"])(t,"status",null),Object(n["a"])(t,"networkAddress",null),Object(n["a"])(t,"activeTime",null),t),editType:"",editWidth:"500px",loading:!0,ids:[],multiple:!0,showSearch:!0,total:0,authorizeList:[],title:"",open:!1,createNum:10,queryParams:{pageNum:1,pageSize:10,authorizeCode:null,productId:null,deviceId:null,serialNumber:null,userId:null,userName:null,status:null},form:{},productInfo:{}}},created:function(){},methods:{getDeviceBySerialNumber:function(t){var e=this;this.openDevice=!0,Object(l["f"])(t).then((function(t){e.device=t.data}))},goToEditDevice:function(t){this.openDevice=!1,this.$router.push({path:"/iot/device-edit",query:{deviceId:t}})},getDeviceList:function(){var t=this;this.deviceLoading=!0,this.deviceParams.params={},Object(l["n"])(this.deviceParams).then((function(e){for(var r=0;r0,expression:"tempTotal>0"}],attrs:{total:t.tempTotal,small:"",layout:"total, prev, pager, next",page:t.tempParams.pageNum,limit:t.tempParams.pageSize},on:{"update:page":function(e){return t.$set(t.tempParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.tempParams,"pageSize",e)},pagination:t.getTempList}})],1),a("el-col",{attrs:{span:13}},[a("el-form",{attrs:{inline:!0,model:t.pointsParams}},[a("el-form-item",{attrs:{size:"mini"}},[a("span",{staticStyle:{"font-size":"16px","font-weight":"400"},attrs:{slot:"label"},slot:"label"},[t._v("物模型列表")])]),a("el-form-item",{attrs:{size:"mini"}},[a("span",{staticStyle:{"font-weight":"400","font-size":"12px"},attrs:{slot:"label"},slot:"label"},[t._v("从机数量:")]),t._v(" "+t._s(t.selectRowData.slaveTotal)+" ")]),a("el-form-item",{attrs:{size:"mini"}},[a("span",{staticStyle:{"font-weight":"400","font-size":"12px"},attrs:{slot:"label"},slot:"label"},[t._v("变量数量:")]),t._v(" "+t._s(t.selectRowData.pointTotal)+" ")]),a("el-form-item",{attrs:{size:"mini"}},[a("span",{staticStyle:{"font-weight":"400","font-size":"12px"},attrs:{slot:"label"},slot:"label"},[t._v("采集方式:")]),a("dict-tag",{staticStyle:{display:"inline-block"},attrs:{options:t.dict.type.data_collect_type,value:t.selectRowData.pollingMethod,size:"small"}})],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{data:t.pointList,border:!1,size:"mini"}},[a("el-table-column",{attrs:{prop:"templateName",label:"物模型名称"}}),a("el-table-column",{attrs:{prop:"regAddr",label:"寄存器"}}),a("el-table-column",{attrs:{prop:"datatype",label:"数值类型"}})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],attrs:{total:t.total,small:"",layout:"total, prev, pager, next",page:t.pointsParams.pageNum,limit:t.pointsParams.pageSize},on:{"update:page":function(e){return t.$set(t.pointsParams,"pageNum",e)},"update:limit":function(e){return t.$set(t.pointsParams,"pageSize",e)},pagination:t.getList}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.cancel}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.submitSelect}},[t._v("确 定")])],1)],1)],1)},i=[],o=r("c7eb"),n=r("1da1"),l=(r("a9e3"),r("d3b7"),r("b0c0"),r("2ca0"),r("416d")),s=r("9355"),c=r("bbfb"),u=r("1850"),d=r("ddac"),p=r("0835"),m=r("f9ef"),f=r("b213"),h=r("1e36"),v=r("9b9c"),b=r("38da"),g=r("cec4"),y={name:"ProductEdit",dicts:["iot_device_type","iot_network_method","iot_vertificate_method","iot_transport_type","data_collect_type"],components:{productThingsModel:l["default"],productApp:c["default"],productAlert:u["default"],productAuthorize:d["default"],productFirmware:s["default"],imageUpload:p["a"],configSip:m["default"]},data:function(){return{keyInputType:"password",accountInputType:"password",passwordInputType:"password",activeName:"basic",categoryShortList:[],protocolList:[],form:{networkMethod:1,deviceType:1,vertificateMethod:3,transport:"MQTT",imgUrl:""},tempOpen:!1,rules:{productName:[{required:!0,message:"产品名称不能为空",trigger:"blur"}],categoryId:[{required:!0,message:"产品分类ID不能为空",trigger:"blur"}],deviceType:[{required:!0,message:"请选择设备类型",trigger:"blur"}],protocolCode:[{required:!0,message:"设备协议不能为空",trigger:"blur"}],transport:[{required:!0,message:"传输协议不能为空",trigger:"blur"}]},queryParams:{tenantName:null},pointList:[],open:!1,title:"",loading:!0,tempList:[],total:0,tempTotal:0,pointsParams:{pageNum:1,pageSize:8,templateId:0},tempParams:{pageNum:1,pageSize:10},currentRow:{},selectRowData:{},isModbus:!1}},created:function(){var t=this.$route.query&&this.$route.query.productId;this.form.productId=t,0!=this.form.productId&&null!=this.form.productId&&this.getProduct();var e=this.$route.query&&this.$route.query.tabPanelName;null!=e&&""!=e&&(this.activeName=e),this.getShortCategory(),this.form.productId&&0!=this.form.productId||(this.accountInputType="text",this.passwordInputType="text"),this.getProtocol()},activated:function(){var t=this.$route.query.t;if(null!=t&&t!=this.uniqueId){this.uniqueId=t;var e=this.$route.query.productId;null!=e&&0!=e&&(this.form.productId=Number(e),this.getProduct(),this.getShortCategory());var r=this.$route.query&&this.$route.query.tabPanelName;null!=r&&""!=r&&(this.activeName=r)}},methods:{getShortCategory:function(){var t=this;Object(h["e"])().then((function(e){t.categoryShortList=e.data}))},goBack:function(){var t={path:"/iot/product",query:{t:Date.now(),pageNum:this.$route.query.pageNum}};this.$tab.closeOpenPage(t),this.reset()},getProduct:function(){var t=this;Object(v["e"])(this.form.productId).then((function(e){t.form=e.data,t.changeProductCode(t.form.protocolCode)}))},reset:function(){this.form={productId:0,productName:null,categoryId:null,categoryName:null,status:0,tslJson:null,isAuthorize:0,deviceType:1,networkMethod:1,vertificateMethod:3,mqttAccount:null,mqttPassword:null,mqttSecret:null,remark:null,imgUrl:""},this.resetForm("form")},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){if(e){if(t.tempOpen&&!t.form.templateId)return void t.$modal.alert("请选择采集点模板");null!=t.form.productId&&0!=t.form.productId?Object(v["i"])(t.form).then((function(e){t.changeProductCode(t.form.protocolCode),t.$modal.alertSuccess("修改成功")})):Object(v["a"])(t.form).then((function(e){t.form.isModbus?t.$modal.alertSuccess("物模型已经从采集点模板同步至产品"):t.$modal.alertSuccess("添加成功,可以开始定义物模型或配置"),t.form=e.data,t.changeProductCode(t.form.protocolCode)}))}}))},getDeviceCountByProductId:function(t){return new Promise((function(e,r){Object(v["d"])(t).then((function(t){e(t)})).catch((function(t){r(t)}))}))},changeProductStatus:function(t){var e=this;return Object(n["a"])(Object(o["a"])().mark((function r(){var a,i;return Object(o["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(a="确定取消发布?",2!=t){r.next=5;break}a="产品发布后,可以创建对应的设备",r.next=10;break;case 5:if(1!=t){r.next=10;break}return r.next=8,e.getDeviceCountByProductId(e.form.productId);case 8:i=r.sent,i.data>0&&(a="重要提示:产品下已有 "+i.data+" 个设备,取消发布可以修改产品信息和模型,重新发布后对应设备状态将会被重置!");case 10:e.$confirm(a,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r={};r.productId=e.form.productId,r.status=t,r.deviceType=e.form.deviceType,Object(v["b"])(r).then((function(t){e.$modal.alertSuccess(t.msg),e.activeName="basic",e.getProduct()})).catch((function(){2==t?e.activeName="basic":e.goBack()}))})).catch((function(){e.activeName="basic"}));case 11:case"end":return r.stop()}}),r)})))()},selectCategory:function(t){for(var e=0;e