| | |
| | | <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;"> |
| | |
| | | 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") && |
| | |
| | | this.initResourceConfig(); |
| | | this.initClockConf(); |
| | | //this.markStartTime(); |
| | | |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | }, |
| | | runClock() { |
| | | this.equipmentTime = this.formatTime(++this.timestamp, 'Y-M-D h:m:s'); |
| | | // console.log(this.equipmentTime) |
| | | this.clockTimer = setTimeout(() => { |
| | | this.runClock(); |
| | | }, 1000) |
| | |
| | | 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) |
| | |
| | | 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) |
| | |
| | | message: "设置成功" |
| | | }); |
| | | } |
| | | |
| | | this.initClockConf(); |
| | | }) |
| | | }, |