/*! * build: vue-admin-beautiful * vue-admin-beautiful author: chuzhixin 1204505056@qq.com * vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756 * time: 2025-2-18 10:03:11 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1750af58"],{"35ed":function(e,t,o){"use strict";o.r(t);var c=o("f2bf");const i={class:"dialog-footer"};function a(e,t,o,a,l,r){const n=Object(c["resolveComponent"])("el-option"),d=Object(c["resolveComponent"])("el-select"),s=Object(c["resolveComponent"])("el-form-item"),u=Object(c["resolveComponent"])("el-form"),m=Object(c["resolveComponent"])("el-button"),f=Object(c["resolveComponent"])("el-dialog");return Object(c["openBlock"])(),Object(c["createBlock"])(f,{modelValue:l.dialogFormVisible,"onUpdate:modelValue":t[1]||(t[1]=e=>l.dialogFormVisible=e),title:l.title,width:"500px",onClose:r.close},{default:Object(c["withCtx"])(()=>[Object(c["createVNode"])(u,{ref:"form",model:l.form,rules:e.rules,"label-width":"100px"},{default:Object(c["withCtx"])(()=>[Object(c["createVNode"])(s,{label:e.$t("maintenance.sb")},{default:Object(c["withCtx"])(()=>[Object(c["createVNode"])(d,{modelValue:l.form.deviceCode,"onUpdate:modelValue":t[0]||(t[0]=e=>l.form.deviceCode=e),filterable:"",placeholder:"请选择设备"},{default:Object(c["withCtx"])(()=>[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(l.deviceData,e=>(Object(c["openBlock"])(),Object(c["createBlock"])(n,{key:e.code,label:e.name,value:e.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),Object(c["createElementVNode"])("div",i,[Object(c["createVNode"])(m,{onClick:r.close},{default:Object(c["withCtx"])(()=>t[2]||(t[2]=[Object(c["createTextVNode"])("取 消")])),_:1},8,["onClick"]),Object(c["createVNode"])(m,{type:"primary",onClick:r.save},{default:Object(c["withCtx"])(()=>t[3]||(t[3]=[Object(c["createTextVNode"])("确 定")])),_:1},8,["onClick"])])]),_:1},8,["modelValue","title","onClose"])}var l=o("4bf8"),r={name:"BindDevice",data(){return{form:{accessNum:"",deviceCode:""},projectId:"",deviceData:[],title:"",dialogFormVisible:!1}},created(){},methods:{handleCountryChange(e){if(e){const t=e.length-1;this.form.parentId=e[t]}else this.form.parentId=0},async getDevice(){const{data:e}=await Object(l["ldDeviceByProjectId"])({projectId:this.projectId});this.deviceData=e},showDetail(e){this.title="绑定设备",this.form.accessNum=e,this.projectId=sessionStorage.getItem("projectId"),this.dialogFormVisible=!0,this.getDevice()},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(l["simBindDevice"])(this.form);this.$notify({title:e,type:"success"}),this.$refs["form"].resetFields(),this.dialogFormVisible=!1,this.$parent.fetchData()}})}}},n=(o("b24b"),o("d959")),d=o.n(n);const s=d()(r,[["render",a]]);t["default"]=s},"4bf8":function(e,t,o){"use strict";o.r(t),o.d(t,"getList",(function(){return i})),o.d(t,"getTrafficBySim",(function(){return a})),o.d(t,"simBindDevice",(function(){return l})),o.d(t,"getSimTotal",(function(){return r})),o.d(t,"rankCurrentMonth",(function(){return n})),o.d(t,"ldDeviceByProjectId",(function(){return d}));var c=o("b775");function i(e){let t="?pageIndex="+e.page+"&size="+e.size;return""!=e.iccid&&void 0!=e.iccid&&(t+="&iccid="+e.iccid),""!=e.status&&void 0!=e.status&&(t+="&status="+e.status),Object(c["default"])({url:"/telcom/api/getSimList"+t,method:"get",data:e})}function a(e){const t="?accessNum="+e.accessNum+"&billingCycleID="+e.billingCycleID;return Object(c["default"])({url:"/telcom/api/getTrafficBySim"+t,method:"get",data:e})}function l(e){const t="?accessNum="+e.accessNum+"&deviceCode="+e.deviceCode;return Object(c["default"])({url:"/telcom/api/simBindDevice"+t,method:"post",data:e})}function r(e){return Object(c["default"])({url:"/telcom/api/getSimTotal",method:"get",data:e})}function n(e){return Object(c["default"])({url:"/telcom/api/rankCurrentMonth",method:"post",data:e})}function d(e){return Object(c["default"])({url:"/telcom/api/ldDeviceByProjectId?projectId="+e.projectId,method:"get",data:e})}},b24b:function(e,t,o){"use strict";o("b809")},b809:function(e,t,o){}}]);