648540858
2023-04-04 b4048fbe80dba8e7756ae557a15ab60b4f80a44b
web_src/src/components/dialog/platformEdit.vue
@@ -96,9 +96,10 @@
              </el-form-item>
              <el-form-item label="其他选项">
                <el-checkbox label="启用" v-model="platform.enable" @change="checkExpires"></el-checkbox>
                <el-checkbox label="云台控制" v-model="platform.ptz"></el-checkbox>
<!--                <el-checkbox label="云台控制" v-model="platform.ptz"></el-checkbox>-->
                <el-checkbox label="拉起离线推流" v-model="platform.startOfflinePush"></el-checkbox>
                <el-checkbox label="RTCP保活" v-model="platform.rtcp" @change="rtcpCheckBoxChange"></el-checkbox>
                <el-checkbox label="作为消息通道" v-model="platform.asMessageChannel" ></el-checkbox>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="onSubmit">{{
@@ -138,13 +139,14 @@
      showDialog: false,
      isLoging: false,
      onSubmit_text: "立即创建",
      saveUrl: "./api/platform/save",
      saveUrl: "/api/platform/save",
      platform: {
        id: null,
        enable: true,
        ptz: true,
        rtcp: false,
        asMessageChannel: false,
        name: null,
        serverGBId: null,
        serverGBDomain: null,
@@ -155,7 +157,7 @@
        devicePort: null,
        username: null,
        password: null,
        expires: 300,
        expires: 3600,
        keepTimeout: 60,
        transport: "UDP",
        characterSet: "GB2312",
@@ -192,7 +194,7 @@
        this.saveUrl = "/api/platform/add";
        this.$axios({
          method: 'get',
          url:`./api/platform/server_config`
          url:`/api/platform/server_config`
        }).then(function (res) {
          console.log(res);
          if (res.data.code === 0) {
@@ -213,6 +215,7 @@
        this.platform.enable = platform.enable;
        this.platform.ptz = platform.ptz;
        this.platform.rtcp = platform.rtcp;
        this.platform.asMessageChannel = platform.asMessageChannel;
        this.platform.name = platform.name;
        this.platform.serverGBId = platform.serverGBId;
        this.platform.serverGBDomain = platform.serverGBDomain;
@@ -290,6 +293,7 @@
        enable: true,
        ptz: true,
        rtcp: false,
        asMessageChannel: false,
        name: null,
        serverGBId: null,
        administrativeDivision: null,
@@ -301,7 +305,7 @@
        devicePort: null,
        username: null,
        password: null,
        expires: 300,
        expires: 3600,
        keepTimeout: 60,
        transport: "UDP",
        characterSet: "GB2312",
@@ -315,7 +319,7 @@
      var that = this;
      await that.$axios({
                method: 'get',
                url:`./api/platform/exit/${deviceGbId}`})
                url:`/api/platform/exit/${deviceGbId}`})
        .then(function (res) {
            if (res.data.code === 0) {
              result = res.data.data;
@@ -327,8 +331,8 @@
      return result;
    },
    checkExpires: function() {
      if (this.platform.enable && this.platform.expires == "0") {
        this.platform.expires = "300";
      if (this.platform.enable && this.platform.expires === "0") {
        this.platform.expires = "3600";
      }
    },
    rtcpCheckBoxChange: function (result){