InternetCompetition/disteng/js/269.a000fdbf.js

2 lines
9.4 KiB
JavaScript

"use strict";(self["webpackChunkproject"]=self["webpackChunkproject"]||[]).push([[269],{3517:function(t,s,a){a.d(s,{Z:function(){return m}});var i=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:t.saveInfo}},[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)])},e=[],p=(a(560),a(1876)),o={name:"TestDataAcquisition",data(){return{loading:!1,user_id:"",trees:[],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_wangkou:"",ippz_zwym:"",ippz_mrwg:"",ippz_dns_sx:"",ippz_dns_by:"",ippz_ip:"",ippz_mac:"3C:2D:50:20:30:3D",wgpz_wgmc:"",wgpz_wgid:"",wgpz_wglx:"",tdpz_tdmc:"",tdpz_td:"",tdpz_qdmc:"",tdpz_ip:"",tdpz_port:"",tdpz_cssj:"",tdpz_jgsj:"",tdpz_lxsj:"",tdpz_cfcs:"",tdpz_watchtime:"",tdpz_cjsylxdz:"",tdpz_dxzkb:"",tdpz_050F:"",tdpz_0610:"",sbpz_sbid:"",sbpz_sbmc:"",sbpz_mac:"",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:""},rules:{wgpz_wgmc:[{required:!0,message:this.$t("dbcollectiongate.rules.wgpz_wgmc"),trigger:"blur"}],wgpz_wgid:[{required:!0,message:this.$t("dbcollectiongate.rules.wgpz_wgid"),trigger:"blur"}],wgpz_wglx:[{required:!0,message:this.$t("dbcollectiongate.rules.wgpz_wglx"),trigger:"blur"}]},outerVisible:!0,innerVisible:!1}},methods:{saveInfo(){this.$refs["formData"].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,p.uu)({mark:"DB-IotLite_yx",user_id:this.user_id,mark_value:JSON.stringify(this.formData),step:"1"});t.data.state?(this.$message({message:this.$t("success"),type:"success"}),this.trees[0].label=this.formData.wgpz_wgid,this.sendTree(),this.$router.push(`/channelconfig?user_id=${this.user_id}`)):this.$message({message:this.$t("fail"),type:"error"}),console.log(t)},async getUserAnswer(){this.loading=!0;let t=await(0,p.Xo)({mark:"DB-IotLite_yx",user_id:this.user_id});if(this.loading=!1,t.data.state){if(console.log(t.data.data.step,"xxxx"),t.data.data&&t.data.state)if(t.data.data.step)1==t.data.data.step?this.$router.push(`/channelconfig?user_id=${this.user_id}`):2==t.data.data.step?this.$router.push(`/dbcollectdevice?user_id=${this.user_id}`):3==t.data.data.step&&this.$router.push(`/dbcollect?user_id=${this.user_id}`);else{console.log(t.data.data.mark_value);let s=JSON.parse(t.data.data.mark_value);s.wgpz_wgid&&(this.formData.wgpz_wgid=s.wgpz_wgid,this.formData.wgpz_wgmc=s.wgpz_wgmc,this.formData.wgpz_wglx=s.wgpz_wglx),this.formData.ippz_wangkou=s.ippz_wangkou,this.formData.ippz_mrwg=s.ippz_mrwg,this.formData.ippz_ip=s.ippz_ip,this.formData.ippz_zwym=s.ippz_zwym,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.tdpz_tdmc=s.tdpz_tdmc,this.formData.tdpz_td=s.tdpz_td,this.formData.tdpz_qdmc=s.tdpz_qdmc,this.formData.tdpz_ip=s.tdpz_ip,this.formData.tdpz_port=s.tdpz_port,this.formData.tdpz_cssj=s.tdpz_cssj,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_mac=s.sbpz_mac,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.formData.mqtt_cjd_sbmc=s.mqtt_cjd_sbmc,this.formData.mqtt_cjd_tagid=s.mqtt_cjd_tagid}}else(0,p.Y5)({mark:"DB-IotLite_yx",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),this.formData.wgpz_wgid=s.wgpz_wgid,this.formData.wgpz_wgmc=s.wgpz_wgmc,this.formData.wgpz_wglx=s.wgpz_wglx,this.formData.ippz_wangkou=s.ippz_wangkou,this.formData.ippz_mrwg=s.ippz_mrwg,this.formData.ippz_ip=s.ippz_ip,this.formData.ippz_zwym=s.ippz_zwym,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.tdpz_tdmc=s.tdpz_tdmc,this.formData.tdpz_td=s.tdpz_td,this.formData.tdpz_qdmc=s.tdpz_qdmc,this.formData.tdpz_ip=s.tdpz_ip,this.formData.tdpz_port=s.tdpz_port,this.formData.tdpz_cssj=s.tdpz_cssj,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_mac=s.sbpz_mac,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.formData.mqtt_cjd_sbmc=s.mqtt_cjd_sbmc,this.formData.mqtt_cjd_tagid=s.mqtt_cjd_tagid}))},async sendTree(){let t=await(0,p.Wh)({user_id:this.user_id,data:JSON.stringify(this.trees),type:"1"});console.log(t)}},mounted(){},created(){this.user_id=window.location.href.split("?")[1],this.getUserAnswer(),"undefined"!=this.user_id&&(0,p.EQ)({user_id:this.user_id,type:"1"}).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)}))}},_=o,d=a(1001),r=(0,d.Z)(_,i,e,!1,null,"431fb39a",null),m=r.exports},269:function(t,s,a){a.r(s),a.d(s,{default:function(){return m}});var i=function(){var t=this,s=t._self._c;return s("div",[s("DataAcquisition")],1)},e=[],p=a(3517),o={name:"InternetCompetitionDbCollectiongate",components:{DataAcquisition:p.Z},data(){return{}},mounted(){},methods:{}},_=o,d=a(1001),r=(0,d.Z)(_,i,e,!1,null,"216f3960",null),m=r.exports}}]);
//# sourceMappingURL=269.a000fdbf.js.map