|
|
@@ -0,0 +1,343 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8" class="card-box">
|
|
|
+ <el-card>
|
|
|
+ <div slot="header"><span style=" font-size: 20px; font-weight: bold;"><i class="el-icon-monitor"></i> {{$t('fourgwlsz')}}</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="el-table el-table--enable-row-hover el-table--medium">
|
|
|
+ <template cellspacing="0" style="width: 100%;">
|
|
|
+
|
|
|
+ <el-form ref="form3" :model="form3" :rules="rules1" label-width="auto">
|
|
|
+ <el-form-item :label="this.$t('fourgwl')" prop="czmode" >
|
|
|
+ <el-select style="width: 100%" v-model="form3.czmode" allow-create :filterable="false">
|
|
|
+ <el-option v-for="item in czmodes" :key="item.id" :label="$t(item.name)" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item :label="this.$t('ljzt')" >
|
|
|
+ <el-input :readonly="true" >
|
|
|
+ <template slot="prefix">
|
|
|
+ <span v-if="form3.ljzt=='未连接'" style=" color:red ">{{ form3.ljzt }}</span>
|
|
|
+ <span v-else style=" color: green ">{{ form3.ljzt }}</span>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="this.$t('xhqd')+'(dB)'" prop="xhqd">
|
|
|
+ <el-input :readonly="true" v-model="form3.xhqd" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="this.$t('yys')" prop="yys">
|
|
|
+ <el-input :readonly="true" v-model="form3.yys" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="this.$t('tel')" prop="tel">
|
|
|
+ <el-input :readonly="true" v-model="form3.tel" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" style="float: right;" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm3">{{$t('sz')}}</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import { communicationManagement } from "@/api/pdu/pduServer";
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: "Server",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 服务器信息
|
|
|
+ server: [],
|
|
|
+ // 总体状态监控
|
|
|
+ totalStatus:{},
|
|
|
+ // 通道列表
|
|
|
+ channelList:[],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ sensorStatusTitle: "", // 传感器标题
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ usertoken:"",
|
|
|
+
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ form2: {},
|
|
|
+ form3: {},
|
|
|
+ sensorStatusForm: {}, // 传感器表单数据
|
|
|
+ czmodes:[{"id":"0","name":"gb"},{"id":"1","name":"qy"}],
|
|
|
+ modes:[{"id":"0","name":"zd"},{"id":"1","name":"sd"}],
|
|
|
+ types:[{"id":"WIFIIPV4Save","name":"IPV4"},{"id":"WIFIIPV6Save","name":"IPV6"}],
|
|
|
+ activeName: '温湿度传感器', // 当前激活的标签页的 name
|
|
|
+ sensorStatusTabs:[],
|
|
|
+ sensorStatusOpen: false, // 配置传感器
|
|
|
+ sensorStatusList:[],
|
|
|
+ showClass: true,
|
|
|
+ showClass2: true,
|
|
|
+ productParams:{},
|
|
|
+ rules1: {
|
|
|
+ czmode: [
|
|
|
+ { required: true, message: this.$i18n.t('fourgwl')+" "+this.$i18n.t('bnwk'), trigger: "blur" }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ rules2: {
|
|
|
+ mode: [
|
|
|
+ { required: true, message: this.$i18n.t('xzms')+" "+this.$i18n.t('bnwk'), trigger: "blur" }
|
|
|
+ ],
|
|
|
+ type: [
|
|
|
+ { required: true, message: this.$i18n.t('IPbb')+" "+this.$i18n.t('bnwk'), trigger: "blur" }
|
|
|
+ ]
|
|
|
+
|
|
|
+ },
|
|
|
+ rules3: {
|
|
|
+ mode: [
|
|
|
+ { required: true, message: this.$i18n.t('xzms')+" "+this.$i18n.t('bnwk'), trigger: "blur" }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ passwordVisible: false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ //监听websocket消息
|
|
|
+ this.$bus.$on('FOURG_STATUS', this.onSocketMessageTofourgStatus);
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.usertoken= this.$store.state.user.usertoken;
|
|
|
+ this.productParams= this.$store.state.user.productParams;
|
|
|
+ this.queryIp3();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //4G状态
|
|
|
+ onSocketMessageTofourgStatus(recvMessage) {
|
|
|
+ if (recvMessage.success && recvMessage.data!=null && recvMessage.data.data!='' && recvMessage.data.data!=null) {
|
|
|
+ if(recvMessage.data!=null){
|
|
|
+ this.form3.ljzt=recvMessage.data.ljzt;
|
|
|
+ this.form3.xhqd=recvMessage.data.xhqd;
|
|
|
+ this.form3.yys=recvMessage.data.yys;
|
|
|
+ this.form3.tel=recvMessage.data.tel;
|
|
|
+ }
|
|
|
+ // this.queryTotalStatus();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ togglePasswordVisibility() {
|
|
|
+ this.passwordVisible = !this.passwordVisible;
|
|
|
+ },
|
|
|
+ handleClick(tab, event) {
|
|
|
+ console.log(tab, event);
|
|
|
+ },
|
|
|
+ handleSelectChange(type){
|
|
|
+ if(type == '1') { // 自动获取
|
|
|
+ this.showClass = false;
|
|
|
+ }else{
|
|
|
+ this.showClass = true;
|
|
|
+ // this.form={}
|
|
|
+ this.form.mode=type
|
|
|
+ // const params={};
|
|
|
+ // params.token=this.usertoken;
|
|
|
+ // params.type="WifiIPV4automatic";
|
|
|
+ // communicationManagement(params).then(response => {
|
|
|
+ // this.form=response.data;
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ // if(type=='0'){
|
|
|
+ // const params={};
|
|
|
+ // params.token=this.usertoken;
|
|
|
+ // params.type="automatic";
|
|
|
+ // communicationManagement(params).then(response => {
|
|
|
+ // this.form=response.data;
|
|
|
+ // });
|
|
|
+ // }else{
|
|
|
+ // this.form={}
|
|
|
+ // this.form.mode=type
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ handleSelectChange2(type){
|
|
|
+ if(type == '1') { // 自动获取
|
|
|
+ this.showClass2 = false;
|
|
|
+ }else{
|
|
|
+ this.showClass2 = true;
|
|
|
+ this.form2={}
|
|
|
+ this.form2.mode=type
|
|
|
+ // const params={};
|
|
|
+ // params.token=this.usertoken;
|
|
|
+ // params.type="WifiIPV6automatic";
|
|
|
+ // communicationManagement(params).then(response => {
|
|
|
+ // this.form=response.data;
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ // if(type=='0'){
|
|
|
+ // const params={};
|
|
|
+ // params.token=this.usertoken;
|
|
|
+ // params.type="automatic";
|
|
|
+ // communicationManagement(params).then(response => {
|
|
|
+ // this.form=response.data;
|
|
|
+ // });
|
|
|
+ // }else{
|
|
|
+ // this.form={}
|
|
|
+ // this.form.mode=type
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ //IPV4查询
|
|
|
+ queryIp(){
|
|
|
+ if(this.productParams.ip4sz=='1'){
|
|
|
+ const params={};
|
|
|
+ params.token=this.usertoken;
|
|
|
+ params.type="listWIFIIPV4Query";
|
|
|
+ communicationManagement(params).then(response => {
|
|
|
+ if(response.data!=null){
|
|
|
+ if( response.data.mode=='1'){
|
|
|
+ this.showClass = false;
|
|
|
+ }
|
|
|
+ this.form=response.data;
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //IPV6查询
|
|
|
+ queryIp2(){
|
|
|
+ if(this.productParams.ip6sz=='1'){
|
|
|
+ const params={};
|
|
|
+ params.token=this.usertoken;
|
|
|
+ params.type="listWIFIIPV6Query";
|
|
|
+ communicationManagement(params).then(response => {
|
|
|
+ if(response.data!=null){
|
|
|
+ if( response.data.mode=='1'){
|
|
|
+ this.showClass2 = false;
|
|
|
+ }
|
|
|
+ this.form2=response.data;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ queryIp3(){
|
|
|
+ const params={};
|
|
|
+ params.token=this.usertoken;
|
|
|
+ params.type="listfourgPZQuery";
|
|
|
+ communicationManagement(params).then(response => {
|
|
|
+ if(response.data!=null){
|
|
|
+ this.form3=response.data;
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm: function() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const params={};
|
|
|
+ params.token=this.usertoken;
|
|
|
+ params.type="WIFIIPV4Save";
|
|
|
+ params.mode=this.form.mode;
|
|
|
+ params.ipaddress=this.form.ipaddress;
|
|
|
+ params.mask=this.form.mask;
|
|
|
+ params.gateway=this.form.gateway;
|
|
|
+ params.dns1=this.form.dns1;
|
|
|
+ params.dns2=this.form.dns2;
|
|
|
+ params.mac=this.form.mac;
|
|
|
+ this.$modal.confirm(this.$t('qdybcm')).then(function() {
|
|
|
+ communicationManagement(params);
|
|
|
+ }).then(() => {
|
|
|
+ this.$modal.msgSuccess(this.$t('zxcg'));
|
|
|
+ }).catch(() => {});
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ submitForm2: function() {
|
|
|
+ this.$refs["form2"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const params={};
|
|
|
+ params.token=this.usertoken;
|
|
|
+ params.type="WIFIIPV6Save";
|
|
|
+ params.mode=this.form2.mode;
|
|
|
+ params.ipaddress=this.form2.ipaddress;
|
|
|
+ params.mask=this.form2.mask;
|
|
|
+ params.gateway=this.form2.gateway;
|
|
|
+ params.dns1=this.form2.dns1;
|
|
|
+ params.dns2=this.form2.dns2;
|
|
|
+ // params.mac=this.form2.mac;
|
|
|
+ this.$modal.confirm(this.$t('qdybcm')).then(function() {
|
|
|
+ communicationManagement(params);
|
|
|
+ }).then(() => {
|
|
|
+ this.$modal.msgSuccess(this.$t('zxcg'));
|
|
|
+ }).catch(() => {});
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ submitForm3: function() {
|
|
|
+ this.$refs["form3"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const params={};
|
|
|
+ params.token=this.usertoken;
|
|
|
+ params.type="fourgPZSave";
|
|
|
+ params.czmode=this.form3.czmode;
|
|
|
+ // params.mac=this.form2.mac;
|
|
|
+ this.$modal.confirm(this.$t('qdybcm')).then(function() {
|
|
|
+ communicationManagement(params);
|
|
|
+ }).then(() => {
|
|
|
+ this.$modal.msgSuccess(this.$t('zxcg'));
|
|
|
+ }).catch(() => {});
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ // 打开加载层
|
|
|
+ openLoading() {
|
|
|
+ this.$modal.loading(this.$t('zzjzqsh'));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+ .row-item {
|
|
|
+ display: -webkit-box;
|
|
|
+ line-height: 40px;
|
|
|
+ }
|
|
|
+ .row-item-title {
|
|
|
+ font-weight: bold;
|
|
|
+
|
|
|
+ padding-right: 10px;
|
|
|
+ /*border-left: 1px solid #e4e7ed;*/
|
|
|
+ /*border-top: 1px solid #e4e7ed;*/
|
|
|
+ }
|
|
|
+ .row-item-content {
|
|
|
+ /*border-left: 1px solid #e4e7ed;*/
|
|
|
+ /*border-right: 1px solid #e4e7ed;*/
|
|
|
+ /*border-top: 1px solid #e4e7ed;*/
|
|
|
+ width: 50%;
|
|
|
+ /* padding-left: 10px;*/
|
|
|
+ white-space: nowrap;
|
|
|
+ word-wrap: normal;
|
|
|
+ word-break: keep-all;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+</style>
|