water-ldht/dist/static/js/chunk-0f18247c.1cece73d.js

7 lines
11 KiB
JavaScript
Raw Normal View History

2024-11-01 16:58:10 +08:00
/*!
* build: vue-admin-beautiful
* vue-admin-beautiful author: chuzhixin 1204505056@qq.com
* vue-admin-beautiful QQ Group(QQ群): 9724353191139183756
* time: 2024-10-10 11:14:28
*/
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0f18247c","chunk-c6a7ae24"],{2195:function(e,t,a){"use strict";a.r(t);var c=a("f2bf");const o={class:"manage-container"};function l(e,t,a,l,r,n){const i=Object(c["resolveComponent"])("el-option"),d=Object(c["resolveComponent"])("el-select"),s=Object(c["resolveComponent"])("el-form-item"),u=Object(c["resolveComponent"])("el-button"),b=Object(c["resolveComponent"])("vab-query-form"),m=Object(c["resolveComponent"])("el-form"),h=Object(c["resolveComponent"])("el-dialog");return Object(c["openBlock"])(),Object(c["createBlock"])(h,{modelValue:r.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>r.dialogFormVisible=e),title:r.title,width:"500px",onClose:n.close},{default:Object(c["withCtx"])(()=>[Object(c["createElementVNode"])("div",o,[Object(c["createVNode"])(m,{ref:"form",model:r.form,"label-width":"80px","label-position":"left"},{default:Object(c["withCtx"])(()=>[Object(c["createVNode"])(s,{label:"选择站点"},{default:Object(c["withCtx"])(()=>[Object(c["createVNode"])(d,{modelValue:r.form.code,"onUpdate:modelValue":t[0]||(t[0]=e=>r.form.code=e),placeholder:"请选择站点"},{default:Object(c["withCtx"])(()=>[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(r.deviceData,e=>(Object(c["openBlock"])(),Object(c["createBlock"])(i,{key:e.code,label:e.name,value:e.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),Object(c["createVNode"])(b,null,{default:Object(c["withCtx"])(()=>[Object(c["createVNode"])(u,{type:"primary",onClick:n.save},{default:Object(c["withCtx"])(()=>t[2]||(t[2]=[Object(c["createTextVNode"])("提交")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])])]),_:1},8,["modelValue","title","onClose"])}var r=a("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()}})}}},i=a("d959"),d=a.n(i);const s=d()(n,[["render",l]]);t["default"]=s},"3a28":function(e,t,a){},"8b4d":function(e,t,a){e.exports={"menu-color":"hsla(0,0%,27%,.95)","menu-color-active":"hsla(208,100%,55%,.95)","menu-background":"#fff","gallery-second-menu-background":"#fff"}},acca:function(e,t,a){"use strict";a.r(t),a.d(t,"getList",(function(){return o})),a.d(t,"doEdit",(function(){return l})),a.d(t,"doDelete",(function(){return r})),a.d(t,"doAdd",(function(){return n})),a.d(t,"getDevices",(function(){return i})),a.d(t,"getLiveAddr",(function(){return d})),a.d(t,"ldDeviceByProjectId",(function(){return s})),a.d(t,"ysBindDevice",(function(){return u})),a.d(t,"capture",(function(){return b}));var c=a("b775");function o(e){return Object(c["default"])({url:"/ys/author/select?page="+e.page+"&size="+e.size,method:"get",data:e})}function l(e){return Object(c["default"])({url:"/ys/author/update",method:"post",data:e})}function r(e){return Object(c["default"])({url:"/ys/author/delete?id="+e.id,method:"post",data:e})}function n(e){return Object(c["default"])({url:"/ys/author/insert",method:"post",data:e})}function i(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(c["default"])({url:"/ys/api/getDevices"+t,method:"get",data:e})}function d