/*!
 *  build: vue-admin-beautiful 
 *  vue-admin-beautiful author: chuzhixin 1204505056@qq.com 
 *  vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756 
 *  time: 2024-10-10 11:14:28
 */
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c6a7ae24"],{2195:function(e,t,o){"use strict";o.r(t);var a=o("f2bf");const c={class:"manage-container"};function i(e,t,o,i,r,n){const d=Object(a["resolveComponent"])("el-option"),l=Object(a["resolveComponent"])("el-select"),s=Object(a["resolveComponent"])("el-form-item"),u=Object(a["resolveComponent"])("el-button"),f=Object(a["resolveComponent"])("vab-query-form"),m=Object(a["resolveComponent"])("el-form"),b=Object(a["resolveComponent"])("el-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(b,{modelValue:r.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>r.dialogFormVisible=e),title:r.title,width:"500px",onClose:n.close},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",c,[Object(a["createVNode"])(m,{ref:"form",model:r.form,"label-width":"80px","label-position":"left"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(s,{label:"选择站点"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{modelValue:r.form.code,"onUpdate:modelValue":t[0]||(t[0]=e=>r.form.code=e),placeholder:"请选择站点"},{default:Object(a["withCtx"])(()=>[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(r.deviceData,e=>(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:e.code,label:e.name,value:e.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),Object(a["createVNode"])(f,null,{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(u,{type:"primary",onClick:n.save},{default:Object(a["withCtx"])(()=>t[2]||(t[2]=[Object(a["createTextVNode"])("提交")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])])]),_:1},8,["modelValue","title","onClose"])}var r=o("acca"),n={data(){return{form:{ysSerial:"",code:"",account:""},deviceData:[],dialogFormVisible:!1,title:""}},methods:{bindDevice(e){this.form.ysSerial=e.deviceSerial,this.form.account=e.account,this.dialogFormVisible=!0,this.title="绑定设备",this.getDeviceData()},async getDeviceData(){const{data:e}=await Object(r["ldDeviceByProjectId"])({projectId:sessionStorage.getItem("projectId")});this.deviceData=e},close(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1,this.$emit("fetch-data")},save(){this.$refs["form"].validate(async e=>{if(!e)return!1;{const{msg:e}=await Object(r["ysBindDevice"])(this.form);this.$notify({title:e,type:"success"}),this.$refs["form"].resetFields(),this.dialogFormVisible=!1,this.$parent.fetchData()}})}}},d=o("d959"),l=o.n(d);const s=l()(n,[["render",i]]);t["default"]=s},acca:function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return c})),o.d(t,"doEdit",(function(){return i})),o.d(t,"doDelete",(function(){return r})),o.d(t,"doAdd",(function(){return n})),o.d(t,"getDevices",(function(){return d})),o.d(t,"getLiveAddr",(function(){return l})),o.d(t,"ldDeviceByProjectId",(function(){return s})),o.d(t,"ysBindDevice",(function(){return u})),o.d(t,"capture",(function(){return f}));var a=o("b775");function c(e){return Object(a["default"])({url:"/ys/author/select?page="+e.page+"&size="+e.size,method:"get",data:e})}function i(e){return Object(a["default"])({url:"/ys/author/update",method:"post",data:e})}function r(e){return Object(a["default"])({url:"/ys/author/delete?id="+e.id,method:"post",data:e})}function n(e){return Object(a["default"])({url:"/ys/author/insert",method:"post",data:e})}function d(e){let t="?page="+e.page+"&size="+e.size;return""!=e.account&&void 0!=e.account&&(t+="&account="+e.account),""!=e.sonserName&&void 0!=e.sonserName&&(t+="&sonserName="+e.sonserName),""!=e.deviceSerial&&void 0!=e.deviceSerial&&(t+="&deviceSerial="+e.deviceSerial),3!=e.status&&void 0!=e.status&&(t+="&status="+e.status),Object(a["default"])({url:"/ys/api/getDevices"+t,method:"get",data:e})}function l(e){return Object(a["default"])({url:"/ys/api/getLiveAddr?account="+e.account+"&deviceSerial="+e.deviceSerial,method:"get",data:e})}function s(e){return Object(a["default"])({url:"/ys/api/ldDeviceByProjectId?projectId="+e.projectId,method:"get",data:e})}function u(e){return Object(a["default"])({url:"/ys/api/ysBindDevice?ysSerial="+e.ysSerial+"&code="+e.code+"&account="+e.account,method:"post",data:e})}function f(e){return Object(a["default"])({url:"/ys/author/capture?account="+e.account+"&captureFlag="+e.captureFlag,method:"post",data:e})}}}]);