2 lines
8.0 KiB
JavaScript
2 lines
8.0 KiB
JavaScript
"use strict";(self["webpackChunkproject"]=self["webpackChunkproject"]||[]).push([[3712],{3712:function(t,s,a){a.r(s),a.d(s,{default:function(){return g}});var i=function(){var t=this,s=t._self._c;return s("div",[s("DataAcquire")],1)},e=[],o=function(){var t=this,s=t._self._c;return s("div",[s("div",[s("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{title:t.$t("dbcollectiongate.title"),visible:t.outerVisible,width:"382px"},on:{"update:visible":function(s){t.outerVisible=s}}},[s("el-form",{ref:"formData",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules,"label-width":"zh"===t.$i18n.locale?"130px":"85px"}},[s("el-form-item",{attrs:{label:t.$t("dbcollectiongate.name"),prop:"wgpz_wgmc"}},[s("el-select",{staticStyle:{width:"200px"},attrs:{placeholder:t.$t("select")},model:{value:t.formData.wgpz_wgmc,callback:function(s){t.$set(t.formData,"wgpz_wgmc",s)},expression:"formData.wgpz_wgmc"}},t._l(t.options1,(function(t){return s("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),s("el-form-item",{attrs:{label:t.$t("dbcollectiongate.ID"),prop:"wgpz_wgid"}},[s("el-select",{staticStyle:{width:"200px"},attrs:{placeholder:t.$t("select")},model:{value:t.formData.wgpz_wgid,callback:function(s){t.$set(t.formData,"wgpz_wgid",s)},expression:"formData.wgpz_wgid"}},t._l(t.options2,(function(t){return s("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),s("el-form-item",{attrs:{label:t.$t("dbcollectiongate.type"),prop:"wgpz_wglx"}},[s("el-select",{staticStyle:{width:"200px"},attrs:{placeholder:t.$t("select")},model:{value:t.formData.wgpz_wglx,callback:function(s){t.$set(t.formData,"wgpz_wglx",s)},expression:"formData.wgpz_wglx"}},t._l(t.options3,(function(t){return s("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1),s("el-dialog",{attrs:{width:"382px",title:t.$t("dbcollectiongate.dialogTitle"),visible:t.innerVisible,"append-to-body":""},on:{"update:visible":function(s){t.innerVisible=s}}},[s("p",{staticClass:"inner_content",staticStyle:{color:"#fff !important"}},[t._v(" "+t._s(t.$t("dbcollectiongate.dialogContent"))+" ")]),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:t.innerConfirm}},[t._v(t._s(t.$t("confirm")))]),s("el-button",{on:{click:function(s){t.innerVisible=!1}}},[t._v(t._s(t.$t("cancel")))])],1)]),s("div",{staticClass:"dialog-footer-outer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:function(s){return t.saveInfo("formData")}}},[t._v(t._s(t.$t("save")))]),s("el-button",{on:{click:function(s){t.outerVisible=!1}}},[t._v(t._s(t.$t("cancel")))])],1)],1)],1)])},r=[],d=(a(560),a(1876)),p={name:"DataAcquire",data(){return{loading:!1,user_id:"",options1:this.$t("dbcollectiongate.options1"),options2:[{value:"LAN-BOX1",label:"LAN-BOX1"},{value:"WLAN-BOX1",label:"WLAN-BOX1"}],options3:this.$t("dbcollectiongate.options3"),value:"",formData:{ippz_lwfs:"",ippz_zwym:"",ippz_mrwg:"",ippz_dns_sx:"",ippz_dns_by:"",ippz_ip:"",ippz_mac:"",ippz_wifi_ssid:"",ippz_wifi_mm:"",wgpz_wgmc:"",wgpz_wgid:"",wgpz_wglx:"",tdpz_tdmc:"",tdpz_td:"",tdpz_qdmc:"",tdpz_chuankou:"",tdpz_btl:"",tdpz_sjw:"",tdpz_tzw:"",tdpz_jojy:"",tdpz_cgsj:"",tdpz_jgsj:"",tdpz_lxsj:"",tdpz_cfcs:"",tdpz_watchtime:"",tdpz_cjsylxdz:"",tdpz_dxzkb:"",tdpz_050F:"",tdpz_0610:"",sbpz_sbid:"",sbpz_sbmc:"",sbpz_sbdz:"",sbpz_jysb:"",sbpz_jdzxz:"",cjdpz_tagid:"",cjdpz_mc:"",cjdpz_sjq:"",cjdpz_jcqdz:"",cjdpz_cjsjlx:"",cjdpz_zjx:"",cjdpz_dxsx:"",cjdpz_beilv:"",mqtt_qiyong:"",mqtt_ip:"",mqtt_port:"",mqtt_wgsn:"",mqtt_sssjfbzt:"",mqtt_qos:"",mqtt_scms:"",mqtt_sczq:"",mqtt_sjgl:"",mqtt_cjd_sbmc:"",mqtt_cjd_tagid:"",mqtt_retained:""},rules:{wgpz_wgmc:[{required:!0,message:"请选择网关名称",trigger:"blur"}],wgpz_wgid:[{required:!0,message:"请选择网关id",trigger:"blur"}],wgpz_wglx:[{required:!0,message:"请选择网关类型",trigger:"blur"}]},outerVisible:!0,innerVisible:!1}},methods:{saveInfo(t){this.$refs[t].validate((t=>{if(!t)return console.log("error submit!!"),!1;this.innerVisible=!0}))},async innerConfirm(){this.outerVisible=!1,this.innerVisible=!1;let t=await(0,d.uu)({mark:"DB-IotLite_wx",user_id:this.user_id,mark_value:JSON.stringify(this.formData),step:"1"});console.log(t),t.data.state?(this.$message({message:this.$t("success"),type:"success"}),this.trees[0].label=this.formData.wgpz_wgid,this.sendTree(),this.$router.replace(`/dbcollectserial?user_id=${this.user_id}`)):this.$message({message:this.$t("fail"),type:"error"})},async getUserAnswer(){this.loading=!0;let t=await(0,d.Xo)({mark:"DB-IotLite_wx",user_id:this.user_id});if(console.log(t),this.loading=!1,t.data.state||(0,d.Y5)({mark:"DB-IotLite_wx",user_id:this.user_id}).then((t=>{let s=null;s="zh"===this.$i18n.locale?JSON.parse(t.data.data.r3_en_default):JSON.parse(t.data.data.r3),s.wgpz_wgid&&(this.formData.wgpz_wgid=s.wgpz_wgid,this.formData.wgpz_wgmc=s.wgpz_wgmc,this.formData.wgpz_wglx=s.wgpz_wglx)})),t.data.data&&t.data.state)if(t.data.data.step)1==t.data.data.step?this.$router.push(`/dbcollectserial?user_id=${this.user_id}`):2==t.data.data.step?this.$router.push(`/dbserialdevice?user_id=${this.user_id}`):3==t.data.data.step&&this.$router.push(`/dbwificollect?user_id=${this.user_id}`);else{let s=JSON.parse(t.data.data.mark_value);s.wgpz_wgid&&(this.formData.wgpz_wgid=s.wgpz_wgid,console.log(this.formData.wgpz_wgid),this.formData.wgpz_wgmc=s.wgpz_wgmc,this.formData.wgpz_wglx=s.wgpz_wglx),this.formData.ippz_lwfs=s.ippz_lwfs,this.formData.ippz_ip=s.ippz_ip,this.formData.ippz_zwym=s.ippz_zwym,this.formData.ippz_mrwg=s.ippz_mrwg,this.formData.ippz_dns_sx=s.ippz_dns_sx,this.formData.ippz_dns_by=s.ippz_dns_by,this.formData.ippz_mac=s.ippz_mac,this.formData.ippz_wifi_ssid=s.ippz_wifi_ssid,this.formData.ippz_wifi_mm=s.ippz_wifi_mm,this.formData.tdpz_tdmc=s.tdpz_tdmc,this.formData.tdpz_td=s.tdpz_td,this.formData.tdpz_qdmc=s.tdpz_qdmc,this.formData.tdpz_chuankou=s.tdpz_chuankou,this.formData.tdpz_btl=s.tdpz_btl,this.formData.tdpz_sjw=s.tdpz_sjw,this.formData.tdpz_tzw=s.tdpz_tzw,this.formData.tdpz_jojy=s.tdpz_jojy,this.formData.tdpz_cgsj=s.tdpz_cgsj,this.formData.tdpz_jgsj=s.tdpz_jgsj,this.formData.tdpz_lxsj=s.tdpz_lxsj,this.formData.tdpz_cfcs=s.tdpz_cfcs,this.formData.tdpz_watchtime=s.tdpz_watchtime,this.formData.tdpz_cjsylxdz=s.tdpz_cjsylxdz,this.formData.tdpz_dxzkb=s.tdpz_dxzkb,this.formData.tdpz_050F=s.tdpz_050F,this.formData.tdpz_0610=s.tdpz_0610,this.formData.sbpz_sbid=s.sbpz_sbid,this.formData.sbpz_sbmc=s.sbpz_sbmc,this.formData.sbpz_sbdz=s.sbpz_sbdz,this.formData.sbpz_jysb=s.sbpz_jysb,this.formData.sbpz_jdzxz=s.sbpz_jdzxz,this.formData.cjdpz_tagid=s.cjdpz_tagid,this.formData.cjdpz_mc=s.cjdpz_mc,this.formData.cjdpz_sjq=s.cjdpz_sjq,this.formData.cjdpz_jcqdz=s.cjdpz_jcqdz,this.formData.cjdpz_cjsjlx=s.cjdpz_cjsjlx,this.formData.cjdpz_zjx=s.cjdpz_zjx,this.formData.cjdpz_dxsx=s.cjdpz_dxsx,this.formData.cjdpz_beilv=s.cjdpz_beilv,this.formData.mqtt_qiyong=s.mqtt_qiyong,this.formData.mqtt_ip=s.mqtt_ip,this.formData.mqtt_port=s.mqtt_port,this.formData.mqtt_wgsn=s.mqtt_wgsn,this.formData.mqtt_sssjfbzt=s.mqtt_sssjfbzt,this.formData.mqtt_qos=s.mqtt_qos,this.formData.mqtt_scms=s.mqtt_scms,this.formData.mqtt_sczq=s.mqtt_sczq,this.formData.mqtt_sjgl=s.mqtt_sjgl,this.mqtt_retained=s.mqtt_retained,this.formData.mqtt_cjd_sbmc=s.mqtt_cjd_sbmc,this.formData.mqtt_cjd_tagid=s.mqtt_cjd_tagid}},async sendTree(){let t=await(0,d.Wh)({user_id:this.user_id,data:JSON.stringify(this.trees),type:"2"});console.log(t)}},created(){this.user_id=window.location.href.split("?")[1],this.getUserAnswer(),"undefined"!=this.user_id&&(0,d.EQ)({user_id:this.user_id,type:"2"}).then((t=>{console.log(t),"zh"===this.$i18n.locale?this.trees=JSON.parse(t.data.data.r2):this.trees=JSON.parse(t.data.data.data)}))}},_=p,l=a(1001),c=(0,l.Z)(_,o,r,!1,null,"2a54e5b4",null),m=c.exports,z={name:"InternetCompetitionDbCollectionwifi",components:{DataAcquire:m},data(){return{}},mounted(){},methods:{}},n=z,f=(0,l.Z)(n,i,e,!1,null,"41b6a297",null),g=f.exports}}]);
|
|
//# sourceMappingURL=3712.33b20665.js.map
|