zhangzengfei
2021-06-11 fa7044f3ccc9a91bc2bc117d1a06f650d86554f2
src/pages/settings/components/BasicSetting.vue
@@ -92,7 +92,7 @@
                </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.deviceDesc}}</div>
                </el-col>
                <el-col :span="12" class="flex-box">
                  <div class="xiangqin-label">通道个数</div>
@@ -178,26 +178,8 @@
      <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"
              @change="checkTimeZone"
            >
              <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>
            <div style="padding: 10px 0px;">
@@ -349,15 +331,15 @@
    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") &&
@@ -503,7 +485,6 @@
      this.initResourceConfig();
      this.initClockConf();
      //this.markStartTime();
    });
  },
  beforeDestroy() {
@@ -543,7 +524,7 @@
          this.webPort = this.sysinfo.server_port;
          this.sysinfo.webVersion = config.version;
          this.sysinfo.webVersion = 'V' + config.version;
        }
        this.loading = false;
@@ -578,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)
@@ -625,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)
@@ -671,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)
@@ -684,7 +664,6 @@
      });
    },
    checkTimeZone(val) {
      debugger;
    },
    submitClock() {
@@ -721,7 +700,6 @@
            message: "设置成功"
          });
        }
        this.initClockConf();
      })
    },