From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期三, 20 七月 2022 15:05:58 +0800 Subject: [PATCH] 修复国标配置的bug --- src/pages/systemSettings/index/App.vue | 1531 ++++------------------------------------------------------ 1 files changed, 123 insertions(+), 1,408 deletions(-) diff --git a/src/pages/systemSettings/index/App.vue b/src/pages/systemSettings/index/App.vue index 34950a2..d2ecf07 100644 --- a/src/pages/systemSettings/index/App.vue +++ b/src/pages/systemSettings/index/App.vue @@ -1,1447 +1,162 @@ <template> - <div class="container"> - <div class="container-left"> - <div - class="left-card" - v-for="(item, index) in menuArr" - :key="index" - @click="openMenu(item, index)" - > - <span class="icon iconfont"></span> - <span class="card-text">{{ item.name }}</span> - </div> - </div> - - <div - class="container-center" - v-if="activePage == '璐︽埛' || activePage == '鏃ユ湡鏃堕棿'" - > - <div class="account-left" v-if="activePage == '璐︽埛'"> - <div class="account-list"> - <div - class="account-card" - v-for="(item, index) in accountArr" - :key="index" - ref="account-card" - @click="openAccount(item, index)" - > - <div class="touxiang"> - <img src="" alt="" /> - </div> - <span class="user-name">{{ item.name }}</span> - </div> - </div> - <div class="add-account"> - <span class="icon iconfont" @click="showAddAccount"></span> - </div> - </div> - <div class="datetime-left" v-if="activePage == '鏃ユ湡鏃堕棿'"> - <div class="time-card"> - <div class="head"> - <span class="icon iconfont"></span> - <span>璁惧鏃堕棿</span> - </div> - <div class="time-main">{{ equipmentTime }}</div> - <div class="date-bot"> - <span class="year">{{ equipmentDate }}</span> - <span class="week">{{ weekday }}</span> - </div> - </div> - - <div class="line"> - <div class="name">NTP鏍℃椂</div> - <el-switch v-model="isNtp" active-color="rgba(61, 104, 225, 1)"> - </el-switch> - </div> - - <div class="line"> - <div class="name">鎵嬪姩鏍″</div> - <el-switch v-model="isManual" active-color="rgba(61, 104, 225, 1)"> - </el-switch> - </div> - </div> - </div> - <div - class="container-right" - v-if="activePage == '璐︽埛' || activePage == '鏃ユ湡鏃堕棿'" - > - <div class="account-right" v-if="activePage == '璐︽埛'"> - <div - class="account-content" - v-if="inAccountDetail == false && isAddAccount == false" - > - <div class="content-top"> - <div class="touxiang-big"></div> - <div class="user-desc"> - <div class="username"> - <span class="icon iconfont" style="margin-right: 5px" - ></span - > - - <span>椋炲埄娴�</span> - </div> - <div class="nickname"> - <span>鏄电О锛�</span> - <span v-show="!showInputNickName">{{ inputNickName }}</span> - <input - type="text" - class="input-nick" - ref="input-nick" - v-show="showInputNickName" - v-model="inputNickName" - @blur="hideInputNick" - @keydown.enter="hideInputNick" - /> - <span class="icon iconfont" @click="editNickName" - ></span - > - </div> - </div> - </div> - <div class="list-btn"> - <div class="item-btn" @click="showChangePassword">淇敼瀵嗙爜</div> - <div class="item-btn" @click="deleteAccount">鍒犻櫎璐︽埛</div> - <div class="item-btn" @click="openPermission">鏉冮檺璁剧疆</div> - </div> - </div> - - <div class="change-pw" v-if="inAccountDetail && isChangePw"> - <div class="title">淇敼瀵嗙爜</div> - - <el-form - :model="passwordForm" - :rules="rules" - ref="passwordForm" - class="password-form" - > - <el-form-item> - <div class="p-title">褰撳墠瀵嗙爜锛�</div> - - <el-input - placeholder="蹇呭~" - v-model="passwordForm.curPassword" - show-password - ></el-input> - </el-form-item> - <el-form-item> - <div class="p-title">鏂板瘑鐮侊細</div> - <el-input - placeholder="蹇呭~" - v-model="passwordForm.newPassword" - show-password - ></el-input> - </el-form-item> - <el-form-item> - <div class="p-title">纭瀵嗙爜锛�</div> - <el-input - placeholder="蹇呭~" - v-model="passwordForm.confirmPassword" - show-password - ></el-input> - </el-form-item> - </el-form> - <div class="btns"> - <div class="cancel" @click="cancelChangePassword">鍙栨秷</div> - <div class="ok">淇濆瓨</div> - </div> - </div> - - <div class="permission" v-if="inAccountDetail && isSetPermission"> - <div class="title">鏉冮檺绠$悊</div> - - <div class="line"> - <div class="name">瀹炴椂鐩戞帶</div> - <el-switch - v-model="isRealtime" - active-color="rgba(61, 104, 225, 1)" - > - </el-switch> - </div> - <div class="line"> - <div class="name">缁熻鏌ヨ</div> - <el-switch v-model="isCount" active-color="rgba(61, 104, 225, 1)"> - </el-switch> - </div> - <div class="line"> - <div class="name">绠楀姏绠$悊</div> - <el-switch - v-model="isCalculate" - active-color="rgba(61, 104, 225, 1)" - > - </el-switch> - </div> - - <div class="btns"> - <div class="cancel" @click="cancelSet">鍙栨秷</div> - <div class="ok">淇濆瓨</div> - </div> - </div> - - <div class="add-account-page" v-if="isAddAccount"> - <div class="title">娣诲姞璐︽埛</div> - <div class="upload-group"> - <div - class="upload-jpg" - v-for="(item, index) in jpgArr" - :key="index" - ></div> - <!-- <div - class="upload-jpg" - style="height: 0px; visibility: hidden" - ></div> - <div - class="upload-jpg" - style="height: 0px; visibility: hidden" - ></div> - <div - class="upload-jpg" - style="height: 0px; visibility: hidden" - ></div> - <div - class="upload-jpg" - style="height: 0px; visibility: hidden" - ></div> --> - </div> - <div class="fill-group"> - <el-form - :model="addForm" - :rules="rules" - ref="addForm" - class="add-form" - > - <el-form-item> - <div class="p-title">鐢ㄦ埛鍚嶏細</div> - - <el-input - placeholder="蹇呭~" - v-model="addForm.userName" - ></el-input> - </el-form-item> - <el-form-item> - <div class="p-title">鏄电О锛�</div> - <el-input - placeholder="蹇呭~" - v-model="addForm.nickName" - ></el-input> - </el-form-item> - <el-form-item> - <div class="p-title">瀵嗙爜锛�</div> - <el-input - placeholder="蹇呭~" - v-model="addForm.password" - show-password - ></el-input> - </el-form-item> - <el-form-item> - <div class="p-title">纭瀵嗙爜锛�</div> - <el-input - placeholder="蹇呭~" - v-model="addForm.confirmPassword" - show-password - ></el-input> - </el-form-item> - </el-form> - </div> - <div class="btns"> - <div class="cancel" @click="cancelAdd">鍙栨秷</div> - <div class="ok">淇濆瓨</div> - </div> - </div> - </div> - - <div class="datetime-right" v-if="activePage == '鏃ユ湡鏃堕棿'"> - <div class="ntp-time" v-if="isNtp"> - <el-form label-width="160px"> - <el-form-item label="鏈嶅姟鍣ㄥ湴鍧�"> - <!-- :disabled="syncType === '2'" --> - <ip-input - :ip="ntpServer" - @on-blur="ntpServer = arguments[0]" - ></ip-input> - </el-form-item> - - <el-form-item label="鏍℃椂鏃堕棿闂撮殧锛堝垎閽燂級"> - <div class="right"> - <el-input-number - v-model.number="timeInterval" - :min="1" - :max="60" - placeholder="璇疯緭鍏�" - size="small" - :controls="false" - ></el-input-number> - <!-- :disabled="syncType === '2'" --> - <!-- :disabled="syncType === '2'" --> - <el-button - type="text" - @click="testNTP" - :loading="ntpTestLoading" - >娴嬭瘯</el-button - > - </div> - </el-form-item> - </el-form> - </div> - - <div class="manual-time" v-if="isManual"> - <switchBar - :barName="`鍚屾鏈绠楁満鏃堕棿`" - @switchChange="syncBrowser" - :value="isSyncBrowser" - ></switchBar> - - <div class="clock-wrap"> - <div class="clock"> - <div class="hour"> - <div class="dnum" @click="showInput('Hour')"> - <span v-show="!showHourInput">{{ syncHour }}</span> - <input - class="input-box" - v-show="showHourInput" - ref="iptHour" - oninput="value=value.replace(/[^\d]/g,'');if(value.length>2)value=value.slice(0,2);if(+value>23)value='23'" - type="text" - v-model="inputHour" - @blur="hideInput('Hour')" - @keydown.enter="hideInput('Hour')" - /> - </div> - <div class="control"> - <span class="icon iconfont" @click="plusOne('hrs')" - ></span - > - <span class="icon iconfont fanzhuan" @click="minusOne('hrs')" - ></span - > - </div> - </div> - <div class="sep">:</div> - <div class="mins"> - <div class="dnum" @click="showInput('Min')"> - <span v-show="!showMinInput">{{ syncMin }}</span> - <input - class="input-box" - v-show="showMinInput" - ref="iptMin" - oninput="value=value.replace(/[^\d]/g,'');if(value.length>2)value=value.slice(0,2);if(+value>59)value='59'" - type="text" - v-model="inputMin" - @blur="hideInput('Min')" - @keydown.enter="hideInput('Min')" - /> - </div> - <div class="control"> - <span class="icon iconfont" @click="plusOne('min')" - ></span - > - <span class="icon iconfont fanzhuan" @click="minusOne('min')" - ></span - > - </div> - </div> - <div class="sep">:</div> - <div class="mins"> - <div class="dnum" @click="showInput('Sec')"> - <span v-show="!showSecInput">{{ syncSec }}</span> - <input - class="input-box" - v-show="showSecInput" - ref="iptSec" - oninput="value=value.replace(/[^\d]/g,'');if(value.length>2)value=value.slice(0,2);if(+value>59)value='59'" - type="text" - v-model="inputSec" - @blur="hideInput('Sec')" - @keydown.enter="hideInput('Sec')" - /> - </div> - <div class="control"> - <span class="icon iconfont" @click="plusOne('sec')" - ></span - > - <span class="icon iconfont fanzhuan" @click="minusOne('sec')" - ></span - > - </div> - </div> - </div> - </div> - - <div class="adjust-bar"> - <div class="minus" @click="minusOne('yrs')">-</div> - <div class="middle" @click="showInput('Yrs')"> - <span v-show="!showYrsInput">{{ syncYrs }}</span> - <input - class="input-box" - v-show="showYrsInput" - ref="iptYrs" - oninput="value=value.replace(/[^\d]/g,'');if(value.length>4)value=value.slice(0,4);" - type="text" - v-model="inputYrs" - @blur="hideInput('Yrs')" - @keydown.enter="hideInput('Yrs')" - /> - 骞� - </div> - <div class="plus" @click="plusOne('yrs')">+</div> - </div> - <div class="adjust-bar"> - <div class="minus" @click="minusOne('mth')">-</div> - <div class="middle" @click="showInput('Month')"> - <span v-show="!showMonthInput">{{ syncMonth }}</span> - <input - class="input-box" - v-show="showMonthInput" - ref="iptMonth" - oninput="value=value.replace(/[^\d]/g,'');if(value.length>2)value=value.slice(0,2);if(+value>12)value='12'" - type="text" - v-model="inputMonth" - @blur="hideInput('Month')" - @keydown.enter="hideInput('Month')" - /> - 鏈� - </div> - - <div class="plus" @click="plusOne('mth')">+</div> - </div> - <div class="adjust-bar"> - <div class="minus" @click="minusOne('day')">-</div> - <div class="middle" @click="showInput('Day')"> - <span v-show="!showDayInput">{{ syncDay }}</span> - <input - class="input-box" - v-show="showDayInput" - ref="iptDay" - oninput="value=value.replace(/[^\d]/g,'');if(value.length>2)value=value.slice(0,2);if(+value>31)value='31'" - type="text" - v-model="inputDay" - @blur="hideInput('Day')" - @keydown.enter="hideInput('Day')" - /> - 鏃� - </div> - <div class="plus" @click="plusOne('day')">+</div> - </div> - </div> - - <div class="btns"> - <div class="cancel" @click="cancelChangePassword">鍙栨秷</div> - <div class="ok" @click="submitClock">淇濆瓨</div> - </div> - </div> - </div> - - <clusterManagement - v-if="activePage == '闆嗙兢绠$悊'" - style="width: 100%" - ></clusterManagement> - <netSettings - v-if="activePage == '缃戠粶璁剧疆'" - style="width: 100%" - ></netSettings> - <keyboardLanguage - v-if="activePage == '閿洏鍜岃瑷�'" - style="width: 100%" - ></keyboardLanguage> - <generalSettings - v-if="activePage == '閫氱敤璁剧疆'" - style="width: 100%" - ></generalSettings> + <div class="s-system-manage"> + <basic-setting v-show="activeName === 'basic'"></basic-setting> </div> </template> <script> -import { - getDevInfo, - getAlarmConfig, - saveDevInfo, - saveAlarmConfig, - getClockInfo, - saveClockInfo, - testNTPserver, - getResourceConfig, - saveResourceConfig, -} from "@/api/system"; -import switchBar from "../components/switchBar"; -import ipInput from "@/components/subComponents/IPInput"; -import clusterManagement from "../views/clusterManagement"; -import netSettings from "../views/NetSettings"; -import keyboardLanguage from "../views/keyboardLanguage"; -import generalSettings from "../views/generalSettings"; +import BasicSetting from "../components/BasicSetting"; + export default { name: "settings", components: { - switchBar, - ipInput, - clusterManagement, - netSettings, - keyboardLanguage, - generalSettings, + BasicSetting, }, data() { return { - showAccount: true, - syncYrs: "", - syncMonth: "", - syncHour: "", - syncDay: "", - syncMin: "", - syncSec: "00", - isSyncBrowser: false, - showDateTime: false, - isAddAccount: false, - isCount: false, - isCalculate: false, - browserTimer: null, - timezone: "", - isRealtime: false, - inputNickName: "鍏斿厰", - showHourInput: false, - showMinInput: false, - showSecInput: false, - showYrsInput: false, - showMonthInput: false, - showDayInput: false, - - timestamp: 0, - inAccountDetail: false, - isChangePw: false, - isSetPermission: false, - timeInterval: 10, - ntpServer: "", - syncType: "1", - equipmentTime: "", - equipmentDate: "", - ntpTestLoading: false, - settime: "", - weekday: "", - menuArr: [ - { name: "璐︽埛" }, - { name: "鏃ユ湡鏃堕棿" }, - { name: "闆嗙兢绠$悊" }, - { name: "缃戠粶璁剧疆" }, - { name: "閿洏鍜岃瑷�" }, - { name: "閫氱敤璁剧疆" }, - ], - accountArr: [{ name: "璐濊拏" }, { name: "鏈辫开" }, { name: "鍗″皵" }], - jpgArr: [{}, {}, {}, {}, {}, {}, {}, {}, {}], - isManual: false, - isNtp: true, - activePage: "璐︽埛", - activeIndex: 0, - clockTimer: null, - inputHour: "", - inputMin: "", - inputSec: "", - inputYrs: "", - showInputNickName: false, - inputMonth: "", - inputDay: "", - passwordForm: { - curPassword: "", - newPassword: "", - confirmPassword: "", - }, - activeAccount: 0, - addForm: { - userName: "", - nickName: "", - password: "", - confirmPassword: "", - }, + activeName: "basic", + buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [], + loginName: + JSON.parse(sessionStorage.getItem("userInfo")).username || "鐢ㄦ埛鍚�", }; }, - beforeDestroy() { - clearTimeout(this.clockTimer); - clearInterval(this.browserTimer); - }, - mounted() { - const s = document.getElementsByClassName("left-card")[0]; - s.style.backgroundColor = "rgba(61, 104, 225, 1)"; - s.style.color = "#fff"; - this.$nextTick(() => { - // this.initSysinfo(); - // this.initResourceConfig(); - this.initClockConf(); - }); + computed: { + isAdmin() { + if ( + sessionStorage.getItem("userInfo") && + sessionStorage.getItem("userInfo") !== "" + ) { + let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username; + return loginName === "superadmin" || loginName === "basic"; + } + return false; + }, }, methods: { - editNickName() { - this.showInputNickName = true; - this.$refs["input-nick"].focus(); - }, - hideInputNick() { - this.showInputNickName = false; - }, - openAccount(item, i) { - this.$refs[`account-card`].forEach((x) => { - x.style.backgroundColor = "rgba(248, 248, 248, 1)"; - x.style.color = "#2c3e50"; - }); - this.$refs[`account-card`][i].style.backgroundColor = - "rgba(61, 104, 225, 1)"; - this.$refs[`account-card`][i].style.color = "#fff"; - }, - minusOne(typ) { - this.isSyncBrowser = false; - this.syncBrowser(false); - let num; - switch (typ) { - case "hrs": - num = +this.syncHour - 1; - if (num == -1) { - num = 23; - } - this.syncHour = this.padZero(num); - break; - case "min": - num = +this.syncMin - 1; - if (num == -1) { - num = 59; - } - this.syncMin = this.padZero(num); - break; - case "sec": - num = +this.syncSec + 1; - if (num == -1) { - num = 59; - } - this.syncSec = this.padZero(num); - break; - case "yrs": - num = +this.syncYrs - 1; - this.syncYrs = this.padZero(num); - break; - case "mth": - num = +this.syncMonth - 1; - if (num == 0) { - num = 12; - this.minusOne("yrs"); - } - this.syncMonth = this.padZero(num); - break; - case "day": - num = +this.syncDay - 1; - if (num == 0) { - this.minusOne("mth"); - const maxDay = new Date( - +this.syncYrs, - +this.syncMonth, - 0 - ).getDate(); - num = maxDay; - } - this.syncDay = this.padZero(num); - break; - default: - break; - } - }, - getMaxDay() { - const maxDay = new Date(+this.syncYrs, +this.syncMonth, 0).getDate(); - if (this.syncDay > maxDay) { - this.syncDay = maxDay; - } - }, - plusOne(typ) { - this.isSyncBrowser = false; - this.syncBrowser(false); - let num; - switch (typ) { - case "hrs": - num = +this.syncHour + 1; - if (num == 24) { - num = 0; - } - this.syncHour = this.padZero(num); - break; - case "min": - num = +this.syncMin + 1; - if (num == 60) { - num = 0; - } - this.syncMin = this.padZero(num); - break; - case "sec": - num = +this.syncSec + 1; - if (num == 60) { - num = 0; - } - this.syncSec = this.padZero(num); - break; - case "yrs": - num = +this.syncYrs + 1; - this.syncYrs = this.padZero(num); - break; - case "mth": - num = +this.syncMonth + 1; - if (num == 13) { - num = 1; - } - this.syncMonth = this.padZero(num); - break; - case "day": - num = +this.syncDay + 1; - const maxDay = new Date(+this.syncYrs, +this.syncMonth, 0).getDate(); - if (num > maxDay) { - num = 1; - } - // - this.syncDay = this.padZero(num); - break; - default: - break; - } - }, - submitClock() { - debugger; - if (this.syncType === "1") { - if (this.ntpServer === "") { - this.$notify({ - type: "error", - message: "NTP 鏈嶅姟鍣ㄥ湴鍧�涓嶈兘涓虹┖", - }); - return false; - } else if (this.timeInterval === "") { - this.timeInterval = 1; - } - } else if (this.isSyncBrowser) { - if (this.settime === "") { - this.$notify({ - type: "error", - message: "璁剧疆鏃堕棿涓嶈兘涓虹┖", - }); - return false; - } + isShow(authority) { + if (this.isAdmin) { + return true; + } else if (this.buttonAuthority.indexOf("," + authority + ",") > -1) { + return true; } else { - this.settime = `${this.syncYrs}-${this.syncMonth}-${this.syncDay} ${this.syncHour}:${this.syncMin}:${this.syncSec}`; + return false; } - let requestBody = { - timeZone: this.timezone, - ntp: this.syncType === "1", - ntpServer: this.ntpServer, - interval: this.timeInterval, - newTime: this.settime, - }; - saveClockInfo(requestBody).then((rsp) => { - if (rsp && rsp.success) { - this.$notify({ - type: "success", - message: "璁剧疆鎴愬姛", - }); - } - this.initClockConf(); - }); - }, - formatTime(number, format) { - var formateArr = ["Y", "M", "D", "h", "m", "s"]; - var returnArr = []; - - var date = new Date(number * 1000); - returnArr.push(date.getFullYear()); - returnArr.push(this.formatNumber(date.getMonth() + 1)); - returnArr.push(this.formatNumber(date.getDate())); - - returnArr.push(this.formatNumber(date.getHours())); - returnArr.push(this.formatNumber(date.getMinutes())); - returnArr.push(this.formatNumber(date.getSeconds())); - - this.weekday = "鏄熸湡" + "鏃ヤ竴浜屼笁鍥涗簲鍏�".charAt(date.getDay()); - for (var i in returnArr) { - format = format.replace(formateArr[i], returnArr[i]); - } - return format; - }, - padZero(n) { - n = +n; - return n < 10 ? "0" + n : "" + n; - }, - //鏁版嵁杞寲 - formatNumber(n) { - n = n.toString(); - return n[1] ? n : "0" + n; - }, - initClockConf(ntpTest = false) { - getClockInfo().then((rsp) => { - if (rsp && rsp.success) { - this.timezone = rsp.data.time_zone; - if (!ntpTest) { - this.syncType = rsp.data.ntp ? "1" : "2"; - } - if (rsp.data.ntp) { - this.ntpServer = rsp.data.ntp_server; - this.timeInterval = rsp.data.interval; - } - this.timestamp = rsp.data.local_time; - if (this.clockTimer === null) { - this.runClock(); - } - } - }); - }, - openMenu(item, i) { - const old = document.getElementsByClassName("left-card")[ - this.activeIndex - ]; - old.style.backgroundColor = "initial"; - old.style.color = "rgba(81, 81, 81, 1)"; - - this.activePage = item.name; - this.activeIndex = i; - const s = document.getElementsByClassName("left-card")[i]; - s.style.backgroundColor = "rgba(61, 104, 225, 1)"; - s.style.color = "#fff"; - }, - showInput(typ) { - this[`show${typ}Input`] = true; - this.$nextTick(() => { - this.$refs[`ipt${typ}`].focus(); - }); - }, - hideInput(typ) { - if (this[`input${typ}`]) { - this[`sync${typ}`] = this.padZero(this[`input${typ}`]); - } - this[`show${typ}Input`] = false; - this[`input${typ}`] = ""; - }, - syncBrowser(val) { - this.isSyncBrowser = val; - if (val == false) { - console.log(12121); - clearInterval(this.browserTimer); - } else { - this.browserTimer = setInterval(() => { - let timestamp = new Date().getTime() / 1000; - this.settime = this.formatTime(timestamp, "Y-M-D h:m:s"); - let [arr1, arr2] = this.settime.split(" "); - [this.syncYrs, this.syncMonth, this.syncDay] = arr1.split("-"); - [this.syncHour, this.syncMin, this.syncSec] = arr2.split(":"); - }, 1000); - } - }, - openChangePw() {}, - showAddAccount() { - this.inAccountDetail = false; - this.isAddAccount = true; - }, - cancelAdd() { - this.inAccountDetail = false; - this.isAddAccount = false; - }, - cancelChangePassword() { - this.isChangePw = false; - this.inAccountDetail = false; - }, - testNTP() { - this.ntpTestLoading = true; - testNTPserver({ server: this.ntpServer }) - .then((rsp) => { - if (rsp && rsp.success) { - this.$notify({ - type: "success", - message: "鏃堕棿鍚屾鎴愬姛", - }); - } else { - this.$notify({ - type: "error", - message: "鏃堕棿鍚屾澶辫触", - }); - } - this.ntpTestLoading = false; - this.initClockConf(true); - }) - .catch((err) => { - this.$notify({ - type: "error", - message: "鏃堕棿鍚屾澶辫触,璇锋鏌ユ湇鍔″櫒ip", - }); - this.ntpTestLoading = false; - }); - }, - cancelSet() { - this.isSetPermission = false; - this.inAccountDetail = false; - }, - showChangePassword() { - this.isChangePw = true; - this.inAccountDetail = true; - }, - runClock() { - const str = this.formatTime(++this.timestamp, "Y-M-D h:m:s"); - [this.equipmentDate, this.equipmentTime] = str.split(" "); - this.clockTimer = setTimeout(() => { - this.runClock(); - }, 1000); - }, - deleteAccount() { - this.$confirm("鎮ㄦ槸鍚︾‘璁ゅ垹闄よ处鎴凤紵", "鍒犻櫎璐︽埛", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - }) - .then(() => { - this.$message({ - type: "success", - message: "鍒犻櫎鎴愬姛!", - }); - }) - .catch(() => {}); - }, - openPermission() { - this.inAccountDetail = true; - this.isSetPermission = true; }, }, - - watch: { - isManual(v) { - this.isNtp = !v; - v && (this.syncType = "2"); - if (v) { - [this.syncYrs, this.syncMonth, this.syncDay] = this.equipmentDate.split( - "-" - ); - [this.syncHour, this.syncMin, this.syncSec] = this.equipmentTime.split( - ":" - ); - } - }, - isNtp(v) { - this.isManual = !v; - v && (this.syncType = "1"); - }, + created() { + if (this.isShow("videoSystem:base")) { + this.activeName = "basic"; + } else if (this.isShow("videoSystem:permission")) { + this.activeName = "user"; + } else if (this.isShow("videoSystem:broadcast")) { + this.activeName = "radio"; + } else if (this.isShow("videoSystem:eventPush")) { + this.activeName = "event"; + } else if (this.isShow("videoSystem:logManage")) { + this.activeName = "log"; + } else if (this.isShow("videoSystem:sysManage")) { + this.activeName = "system"; + } }, }; </script> <style lang="scss"> -.container { +.s-system-manage { + width: 100% !important; + min-width: 1067px; height: 100%; - display: flex; - flex-direction: row; - flex: 1; - flex-basis: auto; box-sizing: border-box; - .container-left { - height: 100%; - width: 210px; - overflow: auto; + padding: 10px; + background-color: #f8f9fb; + .s-system-manage-breadcrumb { + height: 5%; box-sizing: border-box; - flex-shrink: 0; - padding: 10px; - border-right: 5px solid rgba(248, 248, 248, 1); - box-sizing: border-box; - .left-card { - height: 55px; - cursor: pointer; - border-radius: 12px; - margin-bottom: 10px; - display: flex; - align-items: center; - .iconfont { - margin-left: 25px; - margin-right: 10px; - font-size: 24px; + border: 1px solid #e4e7ed; + box-shadow: #e4e7ed 0px 0px 9px inset; + box-shadow: #e4e7ed 0px 0px 9px inset; + border-radius: 5px; + } + + .el-tabs--border-card { + border: 0px solid #dcdfe6; + -webkit-box-shadow: none; + box-shadow: none; + .el-tabs__header { + border: 0px solid #dcdfe6; + .el-tabs__item { + padding: 5px 50px; + height: 50px; + font-family: PingFangSC-Regular; + font-size: 15px; + color: #222222; + text-align: center; + border: 0px solid transparent; } - .card-text { + .el-tabs__item:nth-child(2) { + padding-left: 50px !important; + } + .el-tabs__item:last-child { + padding-right: 50px !important; + } + .el-tabs__item.is-active { + color: #3d68e1; + + // border-right-color: #fff; + // border-left-color: #fff; + } + .el-tabs__item:not(.is-disabled):hover { + color: #3d68e1; + } + } + } + .el-tabs__header { + margin-bottom: 0; + } + .el-tabs__content { + height: calc(100% - 64px); + box-sizing: border-box; + overflow-y: auto; + padding: 20px 40px !important; + background: #fff; + .el-tab-pane { + width: 100%; + .s-title { + text-align: left; + padding: 15px 0px; font-size: 16px; } } - .left-card:hover { - background-color: rgba(61, 104, 225, 1); - color: #fff; - } } - .container-center { - height: 100%; - width: 280px; - overflow: auto; - flex-shrink: 0; - padding: 10px; - border-right: 5px solid rgba(248, 248, 248, 1); - box-sizing: border-box; - .account-left { - - .add-account { - color: rgba(61, 104, 225, 1); - margin-top: 50px; - .iconfont { - cursor: pointer; - font-size: 32px; - } - } - .account-card { - height: 50px; - background-color: rgba(248, 248, 248, 1); - margin-bottom: 10px; - display: flex; - align-items: center; - padding: 0 20px; - box-sizing: border-box; - border-radius: 10px; - cursor: pointer; - .touxiang { - height: 35px; - width: 35px; - background-color: bisque; - border-radius: 17.5px; - } - .user-name { - margin-left: 10px; - font-size: 14px; - } - } - - } - .datetime-left { - .time-card { - height: 105px; - background-color: rgba(248, 248, 248, 1); - margin-bottom: 30px; - border-radius: 10px; - .head { - height: 30px; - line-height: 30px; - text-align: left; - box-sizing: border-box; - padding: 0 10px; - font-size: 14px; - .icon { - margin-right: 5px; - color: rgba(61, 104, 225, 1); - } - } - .time-main { - height: 42px; - line-height: 42px; - font-family: Consolas; - font-size: 36px; - } - .date-bot { - height: 25px; - font-size: 14px; - line-height: 25px; - color: #868686; - display: flex; - justify-content: space-evenly; - } - } - .line { - display: flex; - align-items: center; - height: 50px; - padding: 0 25px; - background-color: rgba(248, 248, 248, 1); - justify-content: space-between; - border-radius: 12px; - margin-bottom: 10px; - .name { - font-size: 14px; - } - } - } + .s-table { + border: 1px solid #e8e8e9; + margin-top: 40px; } - .container-right { - flex: 1; - flex-basis: auto; - overflow: auto; - box-sizing: border-box; + + .ui-top-title { + padding-bottom: 10px; + /* border-bottom: 1px solid #ebebeb; */ position: relative; + text-align: left; + padding-left: 15px; + font-size: 16px; + font-weight: bold; + } - padding: 20px 40px; - .account-right { - .account-content { - .content-top { - height: 120px; - width: 350px; - margin: 0 auto; - display: flex; - align-items: center; - justify-content: center; - margin-bottom: 20px; - .touxiang-big { - width: 100px; - height: 100px; - background-color: bisque; - border-radius: 50px; - } - .user-desc { - height: 100px; - display: flex; - flex-direction: column; - align-items: baseline; - min-width: 200px; - .username { - margin: 5px 15px; - height: 30px; - line-height: 30px; - width: 90px; - text-align: left; - font-size: 15px; - display: flex; - align-items: center; - } - .nickname { - margin: 5px 15px; - font-size: 14px; - .input-nick { - width: 50px; - margin-right: 5px; - } - .iconfont { - font-size: 14px; - margin-left: 5px; - } - } - } - } - .list-btn { - display: flex; + .ui-top-title:before { + content: " "; + border-left: 4px solid #f53d3d; + display: inline-block; + height: 16px; + position: absolute; + top: 50%; + left: 0; + margin-top: -13px; + } - flex-direction: column; - align-items: center; - .item-btn { - width: 500px; - height: 45px; - background-color: #f0f0f0; - margin-bottom: 15px; - border-radius: 10px; - line-height: 45px; - font-size: 15px; - cursor: pointer; - } - .item-btn:hover { - color: rgba(255, 153, 102, 1); - } - } - } - .title { - height: 30px; - line-height: 30px; - /* background-color: aliceblue; */ - margin-bottom: 10px; - font-size: 16px; - font-weight: 600; - } - .change-pw { - .p-title { - text-align: left; - font-size: 15px; - margin-top: 5px; - } - } - .el-form-item { - margin-bottom: 0; - .el-input__inner { - background-color: rgba(240, 240, 240, 1); - border: none; - border-radius: 12px; - height: 45px; - padding: 0 20px; - font-size: 15px; - } - .el-input__clear { - color: dimgray; - font-size: 17px; - line-height: 45px; - } - .el-input__suffix { - right: 1px; - top: -0.5px; - width: 45px; - // background-color: rgba(61, 104, 225, 1); - /* color: white; */ - border-radius: 12px; - } - } - .permission { - .line { - display: flex; - align-items: center; - height: 50px; - padding: 0 25px; - background-color: rgba(248, 248, 248, 1); - justify-content: space-between; - border-radius: 12px; - margin-bottom: 10px; - .name { - font-size: 14px; - } - } - } - - .add-account-page { - // background-color: lightcyan; - // padding: 10px 50px; - .upload-group { - height: 120px; - width: 350px; - margin: 0 auto; - overflow: hidden; - .upload-jpg { - height: 50px; - width: 50px; - float: left; - margin: 0 10px; - background-color: antiquewhite; - margin-bottom: 20px; - border-radius: 25px; - } - } - .fill-group { - .p-title { - text-align: left; - } - } - } - } - .datetime-right { - .el-form-item.is-required:not(.is-no-asterisk) - > .el-form-item__label:before, - .el-form-item.is-required:not(.is-no-asterisk) - .el-form-item__label-wrap - > .el-form-item__label:before { - display: none; - } - .el-form-item { - margin-bottom: 10px; - height: 50px; - background: #f8f8f8; - padding: 4px 20px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border-radius: 10px; - .el-form-item__label { - text-align: left; - line-height: 42px; - } - } - .el-form-item__content { - line-height: 40px; - position: relative; - font-size: 14px; - } - .ip-input-container { - max-width: none !important; - } - .ntp-time { - .right { - display: flex; - align-items: baseline; - .el-input-number--small { - width: 100%; - } - .el-button--text { - margin-left: 10px; - text-decoration: underline; - } - } - .ntp-bar { - height: 40px; - background-color: rgba(248, 248, 248, 1); - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 10px; - border-radius: 10px; - margin-bottom: 10px; - .title { - min-width: 70px; - } - .input-area { - width: 450px; - height: 30px; - background-color: rgba(240, 240, 240, 1); - border-radius: 10px; - line-height: 30px; - font-size: 14px; - } - } - .int-bar { - height: 40px; - background-color: rgba(248, 248, 248, 1); - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 10px; - border-radius: 10px; - margin-bottom: 10px; - .title { - min-width: 130px; - } - .right { - width: 450px; - display: flex; - align-items: center; - height: 30px; - - .input-area { - // width: 410px; - background-color: rgba(240, 240, 240, 1); - border-radius: 10px; - line-height: 30px; - width: -webkit-fill-available; - - font-size: 14px; - } - .test { - width: 40px; - } - } - } - } - .manual-time { - .clock-wrap { - height: 75px; - - background-color: #f8f8f8; - display: flex; - justify-content: center; - align-items: center; - margin-bottom: 10px; - border-radius: 10px; - .clock { - display: flex; - align-items: center; - height: 90px; - justify-content: space-evenly; - .iconfont { - cursor: pointer; - color: rgba(134, 134, 134, 1); - } - .iconfont:hover { - background-color: gainsboro; - } - .hour { - background-color: rgba(240, 240, 240, 1); - display: flex; - align-items: center; - width: 100px; - height: 50px; - justify-content: space-evenly; - border-radius: 10px; - } - .dnum { - width: 40px; - height: 40px; - line-height: 40px; - font-size: 34px; - font-family: Consolas; - display: flex; - align-items: center; - .input-box { - width: inherit; - border: none; - border-radius: 5px; - height: 35px; - font-size: 28px; - text-align: center; - } - - .input-box:focus { - outline: none; - } - } - .control { - width: 20px; - .fanzhuan { - display: inline-block; - -moz-transform: scaleY(-1); - -webkit-transform: scaleY(-1); - -o-transform: scaleY(-1); - transform: scaleY(-1); - } - } - .sep { - font-family: Consolas; - width: 40px; - font-size: 34px; - height: 40px; - line-height: 40px; - } - .mins { - background-color: #f0f0f0; - display: flex; - align-items: center; - width: 110px; - height: 50px; - justify-content: space-evenly; - border-radius: 10px; - } - } - } - .adjust-bar { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 10px; - border-radius: 10px; - height: 50px; - background-color: rgba(248, 248, 248, 1); - .middle { - font-size: 14px; - } - .input-box { - width: 80px; - border: none; - border-radius: 5px; - height: 25px; - font-size: 18px; - text-align: center; - } - - .input-box:focus { - outline: none; - } - .minus { - width: 50px; - height: 50px; - background-color: #f0f0f0; - font-size: 35px; - border-radius: 10px; - cursor: pointer; - line-height: 50px; - color: rgba(134, 134, 134, 1); - } - .plus { - width: 50px; - height: 50px; - cursor: pointer; - background-color: #f0f0f0; - font-size: 35px; - border-radius: 10px; - line-height: 50px; - color: rgba(134, 134, 134, 1); - } - } - } - } - .btns { - display: flex; - justify-content: space-between; - margin-top: 20px; - - .cancel { - height: 40px; - width: 48%; - cursor: pointer; - border-radius: 8px; - background-color: rgba(240, 240, 240, 1); - line-height: 40px; - font-size: 14px; - } - .ok { - height: 40px; - width: 48%; - cursor: pointer; - border-radius: 8px; - background-color: rgba(61, 104, 225, 1); - color: #fff; - line-height: 40px; - font-size: 14px; - } - } + .el-button--text { + color: #3d68e1; + text-decoration: underline; } } </style> - - -- Gitblit v1.8.0