zhangzengfei
2021-06-11 fa7044f3ccc9a91bc2bc117d1a06f650d86554f2
src/pages/settings/components/BasicSetting.vue
@@ -5,9 +5,10 @@
      v-model="activeName"
      v-loading="loading"
      :element-loading-text="loadingText"
      type="border-card"
    >
      <!-- 本机信息 -->
      <el-tab-pane label="本机信息" name="first">
      <el-tab-pane label="本机信息" name="sysInfo" v-if="isShow('settings:sysInfo')">
        <el-menu
          :default-openeds="openeds"
          background-color="#fff"
@@ -75,23 +76,27 @@
            <template slot="title">
              <b class="tree-font">详细信息</b>
            </template>
            <el-menu-item-group class="item-group">
            <el-menu-item-group class="item-group desc-info">
              <el-row :gutter="gutter">
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">ID</div>
                  <div class="xiangqin-label">设备ID</div>
                  <div class="xiangqing-info">{{sysinfo.server_id}}</div>
                </el-col>
                <el-col :span="12" class="flex-box">
                <!-- <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">设备编号</div>
                  <div class="xiangqing-info">{{sysinfo.deviceNum}}</div>
                </el-col>
                </el-col>-->
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">设备型号</div>
                  <div class="xiangqing-info">{{sysinfo.deviceType}}</div>
                  <div class="xiangqing-info">{{sysinfo.deviceModel}}</div>
                </el-col>
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">设备序列号</div>
                  <div class="xiangqing-info">{{sysinfo.deviceSerialNum}}</div>
                  <div class="xiangqin-label">设备类型</div>
                  <div class="xiangqing-info">{{sysinfo.deviceDesc}}</div>
                </el-col>
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">通道个数</div>
                  <div class="xiangqing-info">{{sysinfo.channelCount}}</div>
                </el-col>
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">主控版本</div>
@@ -102,12 +107,20 @@
                  <div class="xiangqing-info">{{sysinfo.webVersion}}</div>
                </el-col>
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">通道个数</div>
                  <div class="xiangqing-info">{{sysinfo.channelCount}}</div>
                  <div class="xiangqin-label">硬盘信息</div>
                  <div class="xiangqing-info">{{sysinfo.disks}}</div>
                </el-col>
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">硬盘个数</div>
                  <div class="xiangqing-info">{{sysinfo.diskCount}}</div>
                  <div class="xiangqin-label">CPU</div>
                  <div class="xiangqing-info">{{sysinfo.cpuInfo}}</div>
                </el-col>
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">内存</div>
                  <div class="xiangqing-info">{{sysinfo.mem}}</div>
                </el-col>
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">运行时间</div>
                  <div class="xiangqing-info">{{sysinfo.uptime}}</div>
                </el-col>
              </el-row>
            </el-menu-item-group>
@@ -158,127 +171,14 @@
            </el-menu-item-group>
          </el-submenu>
          <!-- 对外服务IP 改名为外部网络(新tab)-->
          <!-- 文件音视频 -->
          <!-- <el-submenu index="4">
            <template slot="title">
              <b class="tree-font">文件音视频</b>
            </template>
            <el-menu-item-group class="item-group">
              <el-row :gutter="20">
                <el-col :span="8">
                  <div class="p5">
                    <span class="iconfont iconpicture" style="margin-right: 5px;"></span>
                    <span class="mr10">图片端口</span>
                    <el-input v-model="localFile.picPort" style="width:300px;" placeholder="请输入内容"></el-input>
                  </div>
                  <div class="p5">
                    <span class="iconfont iconshipin" style="margin-right: 5px;"></span>
                    <span class="mr10">视频端口</span>
                    <el-input v-model="localFile.videoPort" style="width:300px;" placeholder="请输入内容"></el-input>
                  </div>
                  <div class="p5">
                    <span class="iconfont iconyinpinx" style="margin-right: 5px;"></span>
                    <span class="mr10">音频端口</span>
                    <el-input v-model="localFile.audioPort" style="width:300px;" placeholder="请输入内容"></el-input>
                  </div>
                </el-col>
                <el-col :span="16">
                  <el-table
                    :data="localFile.fileTable"
                    border
                    style="width: 100%">
                    <el-table-column
                      type="index"
                      label="序号"
                      align="center"
                      width="50">
                    </el-table-column>
                    <el-table-column
                      prop="date"
                      label="名称"
                      align="center"
                      width="180">
                    </el-table-column>
                    <el-table-column
                      prop="name"
                      label="ID"
                      align="center"
                      width="180">
                    </el-table-column>
                    <el-table-column
                      prop="name"
                      label="IP"
                      align="center"
                      width="180">
                    </el-table-column>
                    <el-table-column
                      prop="name"
                      label="在线状态"
                      align="center"
                      width="80">
                    </el-table-column>
                    <el-table-column
                      label="类别"
                      align="center"
                      width="100">
                      <template>
                        <span class="iconfont iconpicture" style="margin-right: 5px;"></span>
                        <span class="iconfont iconshipin" style="margin-right: 5px;"></span>
                        <span class="iconfont iconyinpinx" style="margin-right: 5px;"></span>
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="address"
                      align="center"
                      label="备注">
                      <template slot-scope="{row}">
                        <div v-if="row.edit">
                          <el-input :autofocus="row.edit" v-focus v-model="row.address" size="small" />
                          <el-button size="mini" type="info" @click="handleCancel(row)">取消</el-button>
                          <el-button size="mini" type="primary" @click="handleSave(row)">保存</el-button>
                        </div>
                        <div v-else>
                          <span>{{ row.address }}</span>
                          <el-button
                            type="text"
                            style="color: black;font-size:16px"
                            @click="handleEdit(row)"
                            icon="iconfont iconbianji"
                          ></el-button>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table>
                </el-col>
              </el-row>
            </el-menu-item-group>
          </el-submenu>-->
        </el-menu>
      </el-tab-pane>
      <!-- 时间配置 -->
      <el-tab-pane label="时间配置" name="second">
      <el-tab-pane label="时间配置" name="timeSet" v-if="isShow('settings:timeSet')">
        <el-form label-width="100px">
          <el-form-item label="设备时间">
            <!-- <el-input v-model="equipmentTime" placeholder="请输入" size="small"></el-input> -->
            {{ equipmentTime }}
          </el-form-item>
          <el-form-item label="时区" prop="timezone">
            <el-select
              v-model="timezone"
              placeholder="请选择"
              style="width: 360px; height: 32px"
              size="small"
            >
              <el-option
                v-for="item in timeZoneOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
          <div style="text-align: left;padding: 10px 0px">
            <div class="time-type">NTP校时</div>
@@ -310,6 +210,7 @@
              style="position: absolute; left: 330px;"
              :disabled="syncType === '2'"
              @click="testNTP"
              :loading="ntpTestLoading"
            >测试</el-button>
          </el-form-item>
@@ -327,7 +228,6 @@
              placeholder="选择日期时间"
              size="small"
              value-format="yyyy-MM-dd HH:mm:ss"
              :readonly="settimeRadio"
              :disabled="syncType === '1'"
            ></el-date-picker>
            <el-checkbox
@@ -347,184 +247,54 @@
      </el-tab-pane>
      <!-- 集群管理 -->
      <el-tab-pane label="集群管理" name="third">
      <el-tab-pane label="集群管理" name="cluster" v-if="isShow('settings:cluster')">
        <cluster-management></cluster-management>
      </el-tab-pane>
      <el-tab-pane label="外部网络" name="fourth">
        <el-row :gutter="20">
          <el-col :span="10">
            <div>
              <div class="flex-box">
                <div style="line-height:32px;">
                  <el-radio v-model="ipServer.diyOrLocalIP" :label="1">设置外部IP</el-radio>
                  <el-radio v-model="ipServer.diyOrLocalIP" :label="0">选用本机IP</el-radio>
                </div>
                <div class="ml10" style="width:205px;">
                  <ip-input :ip="ipServer.ip" @on-blur="ipServer.ip = arguments[0]"></ip-input>
                </div>
              </div>
              <div class="flex-box p5" >
                <span style="line-height:32px;">域名</span>
                <div style="margin-left:14px;width:205px;">
                  <el-input size="small" style v-model="ipServer.localhost"></el-input>
                </div>
              </div>
              <div class="flex-box" >
                <span style="line-height:32px;">本地文件端口</span>
                <div style="margin-left:14px;width:205px;">
                  <el-input size="small" style v-model="ipServer.localFilePort"></el-input>
                </div>
              </div>
            </div>
          </el-col>
          <!-- <el-col :span="14">
            <div>
              <el-table
                :data="ipServer.fileTable"
                border
                fit
                style="width: 100%">
                <el-table-column
                  type="index"
                  label="序号"
                  align="center"
                  width="50">
                </el-table-column>
                <el-table-column
                  prop="date"
                  label="名称"
                  align="center"
                  >
                </el-table-column>
                <el-table-column
                  prop="name"
                  label="ID"
                  align="center"
                  >
                </el-table-column>
                <el-table-column
                  prop="name"
                  label="IP"
                  align="center"
                  >
                </el-table-column>
                <el-table-column
                  prop="name"
                  label="在线状态"
                  align="center"
                  >
                </el-table-column>
              </el-table>
            </div>
          </el-col>-->
        </el-row>
        <div class="mt15 save-btn" style="width:1000px;float:left;">
          <el-button type="primary" @click="submitResource" size="small">保存</el-button>
        </div>
      </el-tab-pane>
      <el-tab-pane label="权限管理" name="user" >
        <authority-management v-if="activeName === 'user'"></authority-management>
      </el-tab-pane>
      <el-tab-pane label="广播设置" name="radio" >
        <radio-set v-if="activeName === 'radio'"></radio-set>
      </el-tab-pane>
      <!-- GB28181设置 -->
      <el-tab-pane label="GB28181设置" name="fifth">
        <el-form
          :model="gb28181"
          :rules="rules"
          label-width="140px"
          class="alarmSetting"
          ref="gb28181"
      <!-- <el-tab-pane label="外部访问" name="fourth">
        <el-menu
          :default-openeds="openeds"
          background-color="#fff"
          text-color="#303133"
          active-text-color="#409EFF"
          style="height: 100%;"
          class="menu-css"
          @open="menuOpen"
          @close="menuClose"
        >
          <!-- <el-form-item label="国际服务器IP" prop="ServerIp">
            <ip-input :ip="gb28181.ServerIp" @on-blur="gb28181.ServerIp = arguments[0]"></ip-input>
          </el-form-item>-->
          <div style="text-align: left;margin-bottom: 22px;">
            <el-radio-group v-model="gb28181.idType">
              <el-radio :label="0">输入已有ID</el-radio>
              <el-radio :label="1">生成新的ID</el-radio>
            </el-radio-group>
          </div>
          <el-form-item label="所在地">
            <el-select
              v-model="locationCity.province"
              @change="changeProvince"
              size="small"
              placeholder="请选择省份"
            >
              <el-option
                v-for="item in locationCity.provinceOptions"
                :key="item.id"
                :label="item.name"
                size="small"
                :value="item.id"
              ></el-option>
            </el-select>
            <el-select
              class="ml10 mr10"
              v-model="locationCity.city"
              :disabled="!locationCity.province"
              @change="changeCity"
              size="small"
              placeholder="请选择城市"
            >
              <el-option
                v-for="item in locationCity.cityOptions"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
            <el-select
              v-model="locationCity.county"
              :disabled="!locationCity.city"
              size="small"
              placeholder="请选择区县"
            >
              <el-option
                v-for="item in locationCity.countyOptions"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </el-select>
            <el-button
              type="text"
              style="position: absolute"
              v-show="gb28181.idType === 1"
              @click="newGBID"
            >生成ID</el-button>
          </el-form-item>
          <!-- <el-form-item label="国际服务器端口" prop="GbServerPort">
            <el-input v-model.number="gb28181.ServerPort" placeholder="请输入" size="small"></el-input>
          </el-form-item>-->
          <el-form-item label="国标ID">
            <el-input v-model="gb28181.PublicId" placeholder="请输入" size="small"></el-input>
          </el-form-item>
          <el-form-item label="国标端口" prop="ServerPort">
            <el-input v-model.number="gb28181.GbServerPort" placeholder="请输入" size="small"></el-input>
          </el-form-item>
          <el-form-item label="开启鉴权">
            <el-switch v-model="gb28181.IsAuth"></el-switch>
          </el-form-item>
          <el-form-item label="鉴权密码" v-show="gb28181.IsAuth">
            <el-input v-model="gb28181.Password" placeholder="请输入" size="small"></el-input>
          </el-form-item>
          <el-col :span="12">
            <el-form-item>
              <el-button type="primary" @click="submitGB28281" size="small">保存</el-button>
            </el-form-item>
          </el-col>
        </el-form>
          <el-submenu index="0">
            <template slot="title">
              <b class="tree-font">外部访问设置</b>
            </template>
            <el-menu-item-group class="item-group">
              <el-form :model="sysinfo" :rules="rules" ref="sysinfo" label-width="100px">
                <div class="flex-box">
                  <label>设置外部IP</label>
                  <div style="width:300px;">
                    <ip-input :ip="ipServer.ip" @on-blur="ipServer.ip = arguments[0]"></ip-input>
                  </div>
                  <el-checkbox label="选用本机IP" size="small" style="margin-left: 20px"></el-checkbox>
                </div>
                <div class="flex-box">
                  <label>域名</label>
                  <el-input size="small" v-model="ipServer.localhost"></el-input>
                </div>
                <div class="flex-box">
                  <label>本地文件端口</label>
                  <el-input size="small" v-model="ipServer.localFilePort"></el-input>
                </div>
                <div class="mt15 mb10 save-btn">
                  <el-button type="primary" @click="submitSysinfo" size="small">保存</el-button>
                </div>
              </el-form>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-tab-pane>-->
      <el-tab-pane label="权限管理" name="permission" v-if="isShow('settings:permission')">
        <authority-management v-if="activeName === 'permission'"></authority-management>
      </el-tab-pane>
      <el-tab-pane label="广播设置" name="broadcast" v-if="isShow('settings:broadcast')">
        <radio-set v-if="activeName === 'broadcast'"></radio-set>
      </el-tab-pane>
    </el-tabs>
  </div>
@@ -534,17 +304,13 @@
import {
  getDevInfo,
  getAlarmConfig,
  getGB28181Config,
  saveDevInfo,
  saveAlarmConfig,
  saveGB28181Config,
  getClockInfo,
  saveClockInfo,
  testNTPserver,
  getResourceConfig,
  saveResourceConfig,
  getGb28181AreaList,
  newGb28181ID
} from "@/api/system";
import { isPort, isIPv4 } from "@/scripts/validate";
@@ -554,6 +320,7 @@
import ClusterManagement from "./ClusterManagement";
import AuthorityManagement from "./AuthorityManagement";
import RadioSet from "./RadioSet";
import config from '../../../../package.json'
export default {
  name: "BasicSettings",
@@ -564,15 +331,26 @@
    RadioSet
  },
  computed: {
    timeZoneOption() {
      let options = []
      TimeZones.forEach(zone => {
        options = options.concat(zone.utc.map(v => {
          return { value: v, label: v }
        }))
      })
      return options
    }
    // timeZoneOption() {
    //   let options = []
    //   TimeZones.forEach(zone => {
    //     options = options.concat(zone.utc.map(v => {
    //       return { value: v, label: v }
    //     }))
    //   })
    //   return options
    // },
    isAdmin() {
      if (
        sessionStorage.getItem("userInfo") &&
        sessionStorage.getItem("userInfo") !== ""
      ) {
        let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username;
        return loginName === "superadmin" || loginName === "basic";
      }
      return false;
    },
  },
  directives: {
    focus: {
@@ -586,7 +364,7 @@
      loading: true,
      loadingText: "",
      gutter: 10,
      activeName: "first",
      activeName: "sysInfo",
      timezone: "",
      syncType: "1",
      ntpServer: "",
@@ -600,7 +378,6 @@
      timestamp: 0,
      sysinfo: {},
      alarmConf: {},
      gb28181: {},
      originNetConfig: {
        ip: "",
        gw: "",
@@ -674,29 +451,6 @@
        ip: "",
        localhost: "",
        localFilePort: "",
        fileTable: [
          {
            date: '2016-05-02',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1518 弄',
            edit: false
          }, {
            date: '2016-05-04',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1517 弄',
            edit: false
          }, {
            date: '2016-05-01',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1519 弄',
            edit: false
          }, {
            date: '2016-05-03',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1516 弄',
            edit: false
          }
        ]
      },
      locationCity: {
        province: '',
@@ -706,16 +460,31 @@
        cityOptions: [],
        countyOptions: []
      },
      webPort: 0,
      ntpTestLoading: false,
      buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
    };
    webPort: 0;
  },
  created() {
    if (this.isShow("settings:sysInfo")) {
      this.activeName = "sysInfo";
    } else if (this.isShow("settings:timeSet")) {
      this.activeName = "timeSet";
    } else if (this.isShow("settings:cluster")) {
      this.activeName = "cluster";
    } else if (this.isShow("settings:permission")) {
      this.activeName = "permission";
    } else if (this.isShow("settings:broadcast")) {
      this.activeName = "broadcast";
    }
  },
  mounted() {
    this.$nextTick(() => {
      this.initSysinfo();
      // this.initAlarmConf();
      this.initResourceConfig();
      this.initGB28181Conf();
      this.initClockConf();
      //this.markStartTime();
    });
  },
  beforeDestroy() {
@@ -723,6 +492,9 @@
    clearInterval(this.browserTimer);
  },
  methods: {
    isShow(authority) {
      return this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
    },
    initSysinfo() {
      this.loadingText = "正在获取设备信息...";
      getDevInfo().then(rsp => {
@@ -736,11 +508,23 @@
          this.alarmConf.min_video_len = rsp.data.min_video_len;
          this.alarmConf.max_video_len = rsp.data.max_video_len;
          if (this.sysinfo.deviceInfo) {
            let devInfo = this.sysinfo.deviceInfo;
            this.sysinfo.cpuInfo = devInfo.cpu[0].modelName;
            this.sysinfo.disks = "( " + devInfo.disk + ") ";
            this.sysinfo.mem = (devInfo.mem.total / 1024 / 1024 / 1024).toFixed(2) + "GB";
            // this.sysinfo.arch = devInfo.host.kernelArch;
            this.sysinfo.uptime = this.secondsFormat(devInfo.host.uptime);
          }
          if (!this.sysinfo.server_port) {
            this.sysinfo.server_port = 7003;
          }
          this.webPort = this.sysinfo.server_port;
          this.sysinfo.webVersion = 'V' + config.version;
        }
        this.loading = false;
@@ -748,11 +532,20 @@
        this.loading = false;
      });
    },
    initClockConf() {
    secondsFormat(s) {
      var day = Math.floor(s / (24 * 3600)); // Math.floor()向下取整
      var hour = Math.floor((s - day * 24 * 3600) / 3600);
      var minute = Math.floor((s - day * 24 * 3600 - hour * 3600) / 60);
      var second = s - day * 24 * 3600 - hour * 3600 - minute * 60;
      return day + "天" + hour + "时" + minute + "分" + second + "秒";
    },
    initClockConf(ntpTest = false) {
      getClockInfo().then(rsp => {
        if (rsp && rsp.success) {
          this.timezone = rsp.data.time_zone;
          this.syncType = rsp.data.ntp ? "1" : "2";
          if (!ntpTest) {
            this.syncType = rsp.data.ntp ? "1" : "2";
          }
          if (rsp.data.ntp) {
            this.ntpServer = rsp.data.ntp_server;
            this.timeInterval = rsp.data.interval;
@@ -766,7 +559,6 @@
    },
    runClock() {
      this.equipmentTime = this.formatTime(++this.timestamp, 'Y-M-D h:m:s');
      // console.log(this.equipmentTime)
      this.clockTimer = setTimeout(() => {
        this.runClock();
      }, 1000)
@@ -788,19 +580,6 @@
        }
      })
    },
    initGB28181Conf() {
      getGB28181Config().then(rsp => {
        if (rsp && rsp.success) {
          this.gb28181 = rsp.data;
          this.gb28181.idType = 0;
        }
      });
      getGb28181AreaList().then(rsp => {
        if (rsp && rsp.success) {
          this.locationCity.provinceOptions = rsp.data;
        }
      })
    },
    syncBrowser(enable) {
      if (!enable) {
        clearInterval(this.browserTimer)
@@ -810,6 +589,10 @@
          this.settime = this.formatTime(timestamp, 'Y-M-D h:m:s')
        }, 1000)
      }
    },
    markStartTime() {
      let timestamp = new Date().getTime() / 1000;
      this.settime = this.formatTime(timestamp, 'Y-M-D h:m:s')
    },
    submitSysinfo() {
      this.$refs["sysinfo"].validate(valid => {
@@ -822,7 +605,7 @@
            if (this.sysinfo.ip !== this.originNetConfig.ip) {
              let newUri = location.protocol + "//" + this.sysinfo.ip + ":" + this.sysinfo.server_port;
              var changeIPTimer = setTimeout(() => {
                this.$alert('<strong>您已修改了服务器ip, 请重新登录</strong><a href="' + newUri + '"> ' + newUri + '<a/>', '提示', {
                this.$alert('<strong>您已修改了服务器ip, 请重新登录</strong><a target="_parent" href="' + newUri + '"> ' + newUri + '<a/>', '提示', {
                  dangerouslyUseHTMLString: true
                });
              }, 10000)
@@ -868,7 +651,7 @@
            if (this.sysinfo.server_port !== this.webPort) {
              let newUri = location.protocol + "//" + this.sysinfo.ip + ":" + this.sysinfo.server_port;
              var changeIPTimer = setTimeout(() => {
                this.$alert('<strong>您已修改了服务器端口, 请重新登录</strong><a href="' + newUri + '"> ' + newUri + '<a/>', '提示', {
                this.$alert('<strong>您已修改了服务器端口, 请重新登录</strong><a target="_parent" href="' + newUri + '"> ' + newUri + '<a/>', '提示', {
                  dangerouslyUseHTMLString: true
                });
              }, 5000)
@@ -879,6 +662,9 @@
          return false;
        }
      });
    },
    checkTimeZone(val) {
    },
    submitClock() {
      if (this.syncType === '1') {
@@ -914,9 +700,11 @@
            message: "设置成功"
          });
        }
        this.initClockConf();
      })
    },
    testNTP() {
      this.ntpTestLoading = true;
      testNTPserver({ server: this.ntpServer }).then(rsp => {
        if (rsp && rsp.success) {
          this.$notify({
@@ -929,11 +717,15 @@
            message: "时间同步失败"
          });
        }
        this.ntpTestLoading = false;
        this.initClockConf(true);
      }).catch(err => {
        this.$notify({
          type: "error",
          message: "时间同步失败,请检查服务器ip"
        });
        this.ntpTestLoading = false;
      })
    },
    submitAlarm() {
@@ -980,23 +772,6 @@
          });
        }
      })
    },
    submitGB28281() {
      this.$refs["gb28181"].validate(valid => {
        if (valid) {
          saveGB28181Config(this.gb28181).then(rsp => {
            if (rsp && rsp.success) {
              this.$notify({
                type: "success",
                message: "GB28181设置保存成功"
              });
            }
          });
        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },
    onIpBlur(e, ip) {
      console.log(e, ip);
@@ -1052,33 +827,6 @@
      let re = /^(?=^.{3,255}$)(http(s)?:\/\/)?(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+\.\w+)*$/
      return re.test(str)
    },
    changeProvince() {
      let pid = this.locationCity.province;
      getGb28181AreaList({ parentId: pid }).then(rsp => {
        if (rsp && rsp.success) {
          this.locationCity.cityOptions = rsp.data;
          this.locationCity.city = this.locationCity.cityOptions[0].id;
          this.changeCity();
        }
      })
    },
    changeCity() {
      let pid = this.locationCity.city;
      getGb28181AreaList({ parentId: pid }).then(rsp => {
        if (rsp && rsp.success) {
          this.locationCity.countyOptions = rsp.data;
          this.locationCity.county = this.locationCity.countyOptions[0].id;
        }
      })
    },
    newGBID() {
      let cCode = this.locationCity.county + "";
      newGb28181ID({ code: cCode }).then(rsp => {
        if (rsp && rsp.success) {
          this.gb28181.PublicId = rsp.data;
        }
      })
    }
  }
};
</script>
@@ -1088,10 +836,13 @@
  height: 100%;
  .el-form {
    width: 1000px;
    margin-top: 30px;
    // margin-left: -80px;
    .el-form-item {
      text-align: left;
      &.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
        margin-left: -8px;
      }
      .el-button {
        float: right;
      }
@@ -1148,49 +899,6 @@
    font-weight: 600;
    background-color: #e4e6ed;
  }
  #e-basic-setting {
    .el-tabs__header {
      border: 0px solid #dcdfe6;
      .el-tabs__item {
        padding: 5px 50px;
        height: 50px;
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #222222;
        text-align: center;
        border: 0px solid transparent;
      }
      .el-tabs__item:nth-child(2) {
        padding-left: 50px;
      }
      .el-tabs__item:last-child {
        padding-right: 50px;
      }
      .el-tabs__item.is-active {
        color: #ff7733;
        font-weight: bold;
        // border-right-color: #fff;
        // border-left-color: #fff;
      }
      .el-tabs__item:not(.is-disabled):hover {
        color: #ff7733;
      }
    }
    .el-tabs__active-bar {
      background-color: #ff7733;
    }
    .xiangqin-label {
      text-align: left;
      width: 85px;
      font-size: 14px;
      line-height: 30px;
    }
    .xiangqing-info {
      text-align: left;
      font-size: 14px;
      line-height: 30px;
    }
  }
  #cut_min_duration {
    .el-slider__bar {
@@ -1219,7 +927,7 @@
    list-style: none;
    position: relative;
    margin: 0;
    padding-left: 0;
    padding-left: 10px;
    background-color: #ffffff;
    .el-submenu__title {
      height: 35px;
@@ -1272,6 +980,26 @@
}
</style>
<style lang="scss" scoped>
.flex-box {
  display: flex;
  height: 50px;
  label {
    width: 120px;
  }
  .el-input {
    width: 300px;
  }
}
.desc-info {
  margin-bottom: 14px;
  .flex-box {
    height: 40px;
    line-height: 40px;
    .xiangqin-label {
      width: 80px;
    }
  }
}
.menu-css,
.el-menu {
  border-right: none;