From eb9378ccee13fd280144fa0ba2066c9bcdb6c406 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期一, 24 五月 2021 17:34:56 +0800
Subject: [PATCH] 日志中心
---
src/pages/logCenter/index/main.ts | 16
src/pages/logCenter/components/CloudNode.vue | 149 +++
src/pages/logCenter/components/switchBar.vue | 42 +
vue.config.js | 7
src/pages/logCenter/views/eventPushLog.vue | 478 ++++++++++++
src/pages/logCenter/index/App.vue | 607 +++++++++++++++
src/pages/logCenter/views/systemLog.vue | 326 ++++++++
src/pages/logCenter/views/operationLog.vue | 202 +++++
src/pages/logCenter/views/pollingLog.vue | 384 ++++++++++
public/apps.json | 23
10 files changed, 2,232 insertions(+), 2 deletions(-)
diff --git a/public/apps.json b/public/apps.json
index a418d8a..fd63aa6 100644
--- a/public/apps.json
+++ b/public/apps.json
@@ -163,6 +163,29 @@
"progressMsg": ""
},
{
+ "id": "850b5e86-dbcf-40f2-8511-745a4d06ec85",
+ "name": "鏃ュ織绠$悊(鏂扮増)",
+ "package": "logCenter",
+ "type": "2",
+ "url": "/view/logCenter/",
+ "title": "鏃ュ織绠$悊(鏂扮増)",
+ "width": 1200,
+ "height": 600,
+ "iconBlob": "",
+ "icon": "../../images/app-mid/log-manage.png",
+ "version": "1.0.0",
+ "create_time": "2020-10-09 14:00:09",
+ "create_by": "",
+ "update_time": "",
+ "update_by": "",
+ "isDelete": 0,
+ "isDefault": true,
+ "remoteVersion": "",
+ "installed": true,
+ "isUpgrade": false,
+ "progressMsg": ""
+ },
+ {
"id": "5a5e0610-0a62-4de3-8021-2c6652c29ebf",
"name": "绯荤粺璁剧疆",
"package": "settings",
diff --git a/src/pages/logCenter/components/CloudNode.vue b/src/pages/logCenter/components/CloudNode.vue
new file mode 100644
index 0000000..800651a
--- /dev/null
+++ b/src/pages/logCenter/components/CloudNode.vue
@@ -0,0 +1,149 @@
+<template>
+ <div class="cloud">
+ <div class="inner">
+ <div class="rect">
+ <serfDiagram
+ ref="inside-nodes"
+ :members="insideNodes"
+ :agent="agentName"
+ :sizeX="insideSizeX"
+ :sizeY="insideSizeY"
+ :startX="insideStartX"
+ :isShowHover="true"
+ class="inside-nodes"
+ ></serfDiagram>
+ </div>
+ </div>
+ <div class="outer" v-if="outsideNodes.length">
+ <serfDiagram
+ ref="outer-nodes"
+ :members="outsideNodes"
+ :agent="agentName"
+ :sizeX="280"
+ :sizeY="370"
+ :startX="60"
+ class="outer-nodes"
+ ></serfDiagram>
+ </div>
+ </div>
+</template>
+<script>
+import SerfDiagram from "@/components/serfDiagram";
+export default {
+ name: "cloudNode",
+ props: {
+ nodes: Array,
+ },
+ components: {
+ SerfDiagram,
+ },
+ data() {
+ return {
+ agentName: "",
+ nodeIcons: [],
+ //insideNodes: [],
+ BaseWidth: 150,
+ BaseHeight: 70,
+ minWidth: 0,
+ minHeight: 0,
+ };
+ },
+ mounted() {
+ console.log(this.nodes);
+ //this.getInsideNodes();
+ },
+ methods: {
+ getRandom(index) {
+ if (index % 2 == 0) {
+ return Math.random() * 20;
+ } else {
+ return Math.random() * 50;
+ }
+ },
+ getInsideNodes() {
+ let arr = this.nodes.filter(
+ (item) => item.hardwareType == "01" || item.hardwareType == "02"
+ );
+ let len = arr.length;
+ let lefts = [];
+ let tops = [];
+ this.insideNodes = arr.map((item, index) => {
+ lefts.push((20 - len) * (index + 1) + this.getRandom(index));
+ tops.push(30 * (index + 1));
+ return {
+ l: 10 + this.getRandom(index),
+ t: 30 * (index + 1),
+ nodeName: item.nodeName,
+ id: item.id,
+ workType: item.workType,
+ };
+ });
+ this.minWidth = Math.max(...lefts) - Math.min(...lefts);
+ this.minHeight = Math.max(...tops) - Math.min(...tops);
+ console.log("w,h", this.minWidth, this.minHeight);
+ },
+ },
+ computed: {
+ cloudPic() {
+ return "/images/settings/cloud.png";
+ },
+ insideNodes() {
+ return this.nodes.filter(
+ (item) => item.hardwareType == "01" || item.hardwareType == "02"
+ );
+ },
+ insideSizeX() {
+ return 160 + 200 * 0.2 * this.insideNodes.length <= 400
+ ? 160 + 200 * 0.2 * this.insideNodes.length
+ : 400;
+ },
+ insideSizeY() {
+ return 140 + 200 * 0.2 * this.insideNodes.length <= 380
+ ? 140 + 200 * 0.2 * this.insideNodes.length
+ : 380;
+ },
+ insideStartX() {
+ return this.insideSizeX / 3;
+ },
+ outsideNodes() {
+ return this.nodes.filter((item) => item.hardwareType == "03");
+ },
+ },
+};
+</script>
+<style lang="scss">
+.cloud {
+ width: 100%;
+ display: flex;
+ .inner {
+ background: url("/images/settings/easy-cloud.png") no-repeat;
+ background-size: 100%;
+ margin-top: -55px;
+ margin-left: 55px;
+
+ .rect {
+ position: relative;
+ margin: 130px 100px 70px;
+ .node {
+ position: absolute;
+ .node-icon {
+ width: 40px;
+ height: 40px;
+ }
+ .node-name {
+ font-size: 14px;
+ color: #333;
+ }
+ }
+ }
+ }
+ .outer {
+ width: 40%;
+ position: relative;
+ text-align: left;
+ .node {
+ position: absolute;
+ }
+ }
+}
+</style>
\ No newline at end of file
diff --git a/src/pages/logCenter/components/switchBar.vue b/src/pages/logCenter/components/switchBar.vue
new file mode 100644
index 0000000..0cbc558
--- /dev/null
+++ b/src/pages/logCenter/components/switchBar.vue
@@ -0,0 +1,42 @@
+<template>
+ <div class="switch-bar">
+ <div class="name">{{ barName }}</div>
+ <el-switch
+ v-model="value"
+ active-color="rgba(61, 104, 225, 1)"
+ @change="switchChange"
+ >
+ </el-switch>
+ </div>
+</template>
+
+<script>
+export default {
+ data() {
+ return {
+ // value: false,
+ };
+ },
+ props: ["barName","value"],
+ methods: {
+ switchChange(val) {
+ this.$emit("switchChange",val);
+ },
+ },
+};
+</script>
+<style lang="scss">
+.switch-bar {
+ 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;
+ }
+}
+</style>
diff --git a/src/pages/logCenter/index/App.vue b/src/pages/logCenter/index/App.vue
new file mode 100644
index 0000000..97c2238
--- /dev/null
+++ b/src/pages/logCenter/index/App.vue
@@ -0,0 +1,607 @@
+<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>
+ <operationLog
+ v-if="activePage == '鎿嶄綔鏃ュ織'"
+ style="width: 100%"
+ ></operationLog>
+ <systemLog
+ v-if="activePage == '绯荤粺鏃ュ織'"
+ style="width: 100%"
+ ></systemLog>
+ <pollingLog v-if="activePage == '杞鏃ュ織'" style="width: 100%"></pollingLog>
+ <eventPushLog
+ v-if="activePage == '浜嬩欢鎺ㄩ�佹棩蹇�'"
+ style="width: 100%"
+ ></eventPushLog>
+ </div>
+</template>
+
+<script>
+import operationLog from "../views/operationLog";
+import systemLog from "../views/systemLog";
+import pollingLog from "../views/pollingLog";
+import eventPushLog from "../views/eventPushLog";
+export default {
+ name: "settings",
+ components: {
+ operationLog,
+ systemLog,
+ pollingLog,
+ eventPushLog,
+ },
+ data() {
+ return {
+ menuArr: [
+ { name: "鎿嶄綔鏃ュ織" },
+ { name: "绯荤粺鏃ュ織" },
+ { name: "杞鏃ュ織" },
+ { name: "浜嬩欢鎺ㄩ�佹棩蹇�" },
+ ],
+ activePage: "鎿嶄綔鏃ュ織",
+ activeIndex: 0,
+ };
+ },
+ mounted() {
+ const s = document.getElementsByClassName("left-card")[0];
+ s.style.backgroundColor = "rgba(61, 104, 225, 1)";
+ s.style.color = "#fff";
+ },
+ methods: {
+ 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";
+ },
+ },
+};
+</script>
+<style lang="scss">
+.container {
+ height: 100%;
+ display: flex;
+ flex-direction: row;
+ flex: 1;
+ flex-basis: auto;
+ box-sizing: border-box;
+ .container-left {
+ height: 100%;
+ width: 210px;
+ overflow: auto;
+ 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;
+ }
+ .card-text {
+ 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;
+ }
+ }
+ }
+ }
+ .container-right {
+ flex: 1;
+ flex-basis: auto;
+ overflow: auto;
+ box-sizing: border-box;
+ position: relative;
+
+ 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;
+
+ 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;
+ }
+ }
+ }
+}
+</style>
+
+
diff --git a/src/pages/logCenter/index/main.ts b/src/pages/logCenter/index/main.ts
new file mode 100644
index 0000000..51740ca
--- /dev/null
+++ b/src/pages/logCenter/index/main.ts
@@ -0,0 +1,16 @@
+import Vue from 'vue';
+import App from './App.vue';
+
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+import "@/assets/css/element-variables.scss";
+import moment from 'moment';
+
+Vue.use(ElementUI)
+Vue.prototype.$moment = moment;
+
+
+new Vue({
+ el: '#app',
+ render: h => h(App)
+})
diff --git a/src/pages/logCenter/views/eventPushLog.vue b/src/pages/logCenter/views/eventPushLog.vue
new file mode 100644
index 0000000..7a000e2
--- /dev/null
+++ b/src/pages/logCenter/views/eventPushLog.vue
@@ -0,0 +1,478 @@
+<template>
+ <div class="all">
+ <div class="cluster-content">
+ <div class="cluster-center" ref="left">
+ <div class="menu-item" @click="openRight(0)">
+ <div class="con">
+ <span class="icon iconfont"></span>
+ <span class="menu-text">绯荤粺鏇存柊</span>
+ </div>
+ </div>
+ <div class="menu-item" @click="openRight(1)">
+ <div class="con">
+ <span class="icon iconfont"></span>
+
+ <span class="menu-text">鏇存柊璁剧疆</span>
+ </div>
+ </div>
+ </div>
+ <div class="cluster-right">
+ <div class="net-set" v-if="activePage == 0">
+ <el-radio-group v-model="radio2" size="medium">
+ <el-radio-button label="妫�鏌ユ洿鏂�"></el-radio-button>
+ <el-radio-button label="涓婁紶鏇存柊"></el-radio-button>
+ </el-radio-group>
+
+ <div class="update-center" v-if="radio2 == '妫�鏌ユ洿鏂�'">
+ <div class="spin-bg"></div>
+ <div class="line"></div>
+ <div class="desc">{{ "妫�鏌ュ埌鏈�鏂扮増鏈細1.0.2" }}</div>
+ <el-button type="primary" size="small">鏇存柊</el-button>
+ </div>
+ <div class="upload-center" v-if="radio2 == '涓婁紶鏇存柊'">
+ <!-- uploadPlaceholder="涓婁紶鍗囩骇鏂囦欢" -->
+ <div class="top">
+ <div class="up-text">涓婁紶鏇存柊鏂囦欢</div>
+ <fileUploader
+ single
+ url="/data/api-v/sysset/patchUpdate"
+ @complete="onFileUpload"
+ @file-added="onFileAdded"
+ />
+ <el-button
+ type="primary"
+ size="small"
+ style="width: 80px"
+ @click="upgrade"
+ :disabled="!fileAdded"
+ :loading="upgrading"
+ >鍗囩骇</el-button
+ >
+ </div>
+
+ <div class="update-center">
+ <div class="spin-bg"></div>
+ <div class="line"></div>
+ <div class="desc">{{ "妫�鏌ュ埌鏈�鏂扮増鏈細1.0.2" }}</div>
+ <el-button type="primary" size="small">鏇存柊</el-button>
+ </div>
+ <!-- <span v-html="patchUpdateStatus"></span> -->
+ </div>
+
+ <div class="cur-version">褰撳墠鐗堟湰锛歿{ "1.0.1" }}</div>
+ </div>
+
+ <div class="wifi" v-if="activePage == 1">
+ <div class="content">
+ <div class="title">绯荤粺鏇存柊璁剧疆</div>
+
+ <div class="bar">
+ <div class="name">鑷姩娓呯悊杞欢鍖呯紦瀛�</div>
+ <el-switch
+ v-model="sys_auto_clear"
+ active-color="rgba(61, 104, 225, 1)"
+ @change="switchChange('sys_auto_clear')"
+ >
+ </el-switch>
+ </div>
+
+ <div class="bar">
+ <div class="name">鏇存柊鎻愰啋</div>
+ <el-switch
+ v-model="sys_remind"
+ active-color="rgba(61, 104, 225, 1)"
+ @change="switchChange('sys_remind')"
+ >
+ </el-switch>
+ </div>
+
+ <div class="bar" v-if="sys_remind">
+ <div class="name">鑷姩涓嬭浇鏇存柊</div>
+ <el-switch
+ v-model="sys_auto_download"
+ active-color="rgba(61, 104, 225, 1)"
+ @change="switchChange('sys_auto_download')"
+ >
+ </el-switch>
+ </div>
+ </div>
+
+ <div class="content">
+ <div class="title">搴旂敤/绠楁硶鏇存柊璁剧疆</div>
+
+ <div class="bar">
+ <div class="name">鑷姩娓呯悊杞欢鍖呯紦瀛�</div>
+ <el-switch
+ v-model="app_auto_clear"
+ active-color="rgba(61, 104, 225, 1)"
+ @change="switchChange('app_auto_clear')"
+ >
+ </el-switch>
+ </div>
+
+ <div class="bar">
+ <div class="name">鏇存柊鎻愰啋</div>
+ <el-switch
+ v-model="app_remind"
+ active-color="rgba(61, 104, 225, 1)"
+ @change="switchChange('app_remind')"
+ >
+ </el-switch>
+ </div>
+
+ <div class="bar" v-if="app_remind">
+ <div class="name">鑷姩涓嬭浇鏇存柊</div>
+ <el-switch
+ v-model="app_auto_download"
+ active-color="rgba(61, 104, 225, 1)"
+ @change="switchChange('app_auto_download')"
+ >
+ </el-switch>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import { getDevInfo, fileUpload, doUpgrade } from "@/api/system";
+import FileUploader from "@/components/subComponents/FileUpload/index";
+
+export default {
+ components: {
+ FileUploader,
+ },
+ data() {
+ return {
+ wifiList: [{ name: "鏃犵嚎缃戠粶1" }, { name: "鏃犵嚎缃戠粶2" }],
+ radio2: "妫�鏌ユ洿鏂�",
+ activePage: 0,
+ patchUpdateStatus: "",
+ probeSum: 0,
+ sys_auto_clear: false,
+ sys_remind: false,
+ sys_auto_download: false,
+ app_auto_clear: false,
+ app_remind: false,
+ app_auto_download: false,
+ timer: null,
+ patchFile: {},
+
+ fileAdded: false,
+ upgrading: false,
+ };
+ },
+ mounted() {},
+ methods: {
+ onFileUpload(file) {
+ this.patchUpdateStatus = `<span style="color:green">涓婁紶鎴愬姛, 鐐瑰嚮鍗囩骇鎸夐挳寮�濮嬪崌绾�</span>`;
+ this.patchFile = { ...file };
+ this.fileAdded = true;
+ },
+ onFileAdded() {
+ this.patchUpdateStatus = "";
+ },
+ upgrade() {
+ this.upgrading = true;
+ this.patchUpdateStatus = `<span style="color:red">姝e湪鍗囩骇...</span>`;
+ doUpgrade(this.patchFile)
+ .then((rsp) => {
+ this.upgrading = false;
+ if (rsp && rsp.success) {
+ clearTimeout(this.timer);
+ this.doneUpgrade();
+ }
+ })
+ .catch((err) => {
+ if (err.code) {
+ this.upgrading = false;
+ this.patchUpdateStatus = `<span style="color:red">${err.data}</span>`;
+ clearTimeout(this.timer);
+ } else {
+ this.probeServer(this.doneUpgrade);
+ }
+ });
+ },
+ doneUpgrade() {
+ this.upgrading = false;
+ this.patchUpdateStatus = `<span style="color:green">鍗囩骇鎴愬姛</span>`;
+ let _this = this;
+ this.$confirm("鍗囩骇鎴愬姛, 璇烽噸鏂扮櫥褰曠郴缁�", "鎴愬姛", {
+ type: "success",
+ cancelButtonClass: "comfirm-class-cancle",
+ confirmButtonClass: "comfirm-class-sure",
+ }).then(() => {
+ _this.reLogin();
+ });
+ },
+ reLogin() {
+ this.$router.push("/");
+ },
+ probeServer(cb) {
+ this.probeSum++;
+ let _this = this;
+ if (this.probeSum > 60) {
+ this.$confirm("杩炴帴鏈嶅姟鍣ㄥけ璐�, 璇峰埛鏂伴〉闈㈡垨鑱旂郴绠$悊鍛�", "澶辫触", {
+ type: "error",
+ cancelButtonClass: "comfirm-class-cancle",
+ confirmButtonClass: "comfirm-class-sure",
+ }).then(() => {
+ cb();
+ });
+ return;
+ }
+ this.timer = setTimeout(() => {
+ getDevInfo()
+ .then(() => {
+ cb();
+ })
+ .catch((err) => {
+ _this.probeServer(cb);
+ });
+ }, 10000);
+ },
+ openRight(typ) {
+ const es = document.getElementsByClassName("menu-item");
+ es[this.activePage].style.backgroundColor = "#f8f8f8";
+ es[this.activePage].style.color = "rgba(54, 54, 54, 1)";
+ es[typ].style.backgroundColor = "rgba(61, 104, 225, 1)";
+ es[typ].style.color = "#fff";
+ this.activePage = typ;
+ },
+ switchChange(typ) {
+ console.log(this[typ]);
+ },
+ },
+};
+</script>
+<style lang="scss">
+.all {
+ width: 100%;
+}
+
+.cluster-content {
+ height: 100%;
+ display: flex;
+ flex-direction: row;
+ flex: 1;
+ flex-basis: auto;
+ box-sizing: border-box;
+ .cluster-center {
+ height: 100%;
+ width: 280px;
+ overflow: auto;
+ box-sizing: border-box;
+ flex-shrink: 0;
+ padding: 10px;
+ border-right: 5px solid #f8f8f8;
+
+ // background-color: lavender;
+ .menu-item {
+ background-color: #f8f8f8;
+ height: 50px;
+ margin-bottom: 10px;
+ border-radius: 8px;
+ line-height: 50px;
+ box-sizing: border-box;
+ font-size: 14px;
+ cursor: pointer;
+ padding: 0 20px;
+ display: flex;
+ justify-content: space-between;
+ .con {
+ .iconfont {
+ margin-right: 10px;
+ }
+ .menu-text {
+ font-size: 15px;
+ }
+ }
+ }
+ }
+ .cluster-right {
+ flex: 1;
+ flex-basis: auto;
+ overflow: auto;
+ box-sizing: border-box;
+ position: relative;
+ padding: 20px 40px;
+ .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-select {
+ width: 100%;
+ }
+ .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;
+ }
+ .net-set {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ height: 95%;
+ // .el-radio-button__inner {
+ // // color: #333333;
+ // border: none;
+ // }
+ .update-center {
+ height: 160px;
+ .spin-bg {
+ width: 70px;
+ height: 70px;
+ background: rgba(230, 230, 230, 1);
+ margin: 0 auto;
+ border-radius: 35px;
+ }
+ .line {
+ width: 180px;
+ height: 5px;
+ background: #e6e6e6;
+ border-radius: 5px;
+ margin: 5px auto;
+ }
+ .desc {
+ height: 20px;
+ line-height: 20px;
+ font-size: 14px;
+ color: rgba(161, 161, 161, 1);
+ margin-bottom: 10px;
+ }
+ .el-button {
+ width: 120px;
+ }
+ .el-button--small {
+ font-size: 14px;
+ }
+ }
+ .upload-center {
+ height: 340px;
+
+ // margin: 0 auto;
+ .update-center {
+ height: 160px;
+ .spin-bg {
+ width: 70px;
+ height: 70px;
+ background: rgba(230, 230, 230, 1);
+ margin: 0 auto;
+ border-radius: 35px;
+ }
+ .line {
+ width: 180px;
+ height: 5px;
+ background: #e6e6e6;
+ border-radius: 5px;
+ margin: 5px auto;
+ }
+ .desc {
+ height: 20px;
+ line-height: 20px;
+ font-size: 14px;
+ color: rgba(161, 161, 161, 1);
+ margin-bottom: 10px;
+ }
+ .el-button {
+ width: 120px;
+ }
+ .el-button--small {
+ font-size: 14px;
+ }
+ }
+ .top {
+ display: flex;
+ justify-content: space-evenly;
+ align-items: center;
+ background: rgba(248, 248, 248, 1);
+ box-sizing: border-box;
+ padding: 8px 10px;
+ border-radius: 8px;
+ .el-input--small .el-input__inner {
+ border: none;
+ }
+ .uploader-btn {
+ padding: 6px 8px;
+ .el-icon-upload2 {
+ font-size: 21px;
+ font-weight: 600;
+ }
+ }
+ }
+ .up-text {
+ height: 32px;
+ line-height: 32px;
+ font-size: 14px;
+ min-width: 105px;
+ margin-right: 5px;
+ }
+ .file-uploader {
+ width: 100%;
+ margin-right: 20px;
+ min-width: 150px;
+ }
+ }
+ .cur-version {
+ font-size: 14px;
+ }
+ }
+ .wifi {
+ .content {
+ margin-bottom: 20px;
+ }
+ .bar {
+ display: flex;
+ align-items: center;
+ height: 50px;
+ padding: 0 25px;
+ background-color: #f8f8f8;
+ justify-content: space-between;
+ border-radius: 12px;
+ margin-bottom: 10px;
+ .name {
+ font-size: 15px;
+ }
+ }
+ .title {
+ text-align: left;
+ padding: 10px;
+ font-size: 16px;
+ }
+ }
+
+ .save-btn {
+ background-color: #3d68e1;
+ width: 240px;
+ height: 40px;
+ margin: 0 auto;
+ border-radius: 10px;
+ color: #fff;
+ line-height: 40px;
+ font-size: 14px;
+ margin-top: 20px;
+ }
+ }
+}
+</style>
diff --git a/src/pages/logCenter/views/operationLog.vue b/src/pages/logCenter/views/operationLog.vue
new file mode 100644
index 0000000..eebc5e2
--- /dev/null
+++ b/src/pages/logCenter/views/operationLog.vue
@@ -0,0 +1,202 @@
+<template>
+ <div class="op-log" v-loading="loading" :element-loading-text="loadingText">
+ <div class="top">
+ <div class="first">
+ <div class="time-option">
+ <div class="title">鍛ㄦ湡锛�</div>
+
+ <div class="opts">
+ <div class="opt" tabindex="1">浠婃棩</div>
+ <div class="opt" tabindex="2">杩戜笁澶�</div>
+ <div class="opt" tabindex="3">杩戜竷澶�</div>
+ <div class="opt" tabindex="4">杩戜竴涓湀</div>
+ <div class="opt" tabindex="5">杩戝叚涓湀</div>
+ </div>
+ </div>
+ <div class="search">
+ <el-input
+ placeholder="鎼滅储"
+ v-model="input3"
+ size="small"
+ class="input-with-select"
+ >
+ <el-button slot="append" icon="el-icon-search"></el-button>
+ </el-input>
+ </div>
+ </div>
+ <div class="second">
+ <div class="bar">
+ <div class="name">鎿嶄綔妯″潡锛�</div>
+
+ <el-select v-model="value" placeholder="璇烽�夋嫨"
+
+ size="small"
+ >
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </div>
+ <div class="bar">
+ <div class="name">鎿嶄綔妯″潡锛�</div>
+
+ <el-select v-model="value" placeholder="璇烽�夋嫨"
+ size="small"
+ >
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </div>
+ <div class="bar">
+ <div class="name">鎿嶄綔妯″潡锛�</div>
+
+ <el-select v-model="value" placeholder="璇烽�夋嫨"
+ size="small"
+ >
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ </div>
+ <div class="table">faefws</div>
+ </div>
+</template>
+
+<script>
+import { deleteDate } from "@/api/system";
+export default {
+ data() {
+ return {
+ loading: false,
+ loadingText: "",
+ input3: "",
+ options: [
+ {
+ value: "閫夐」1",
+ label: "榛勯噾绯�",
+ },
+ {
+ value: "閫夐」2",
+ label: "鍙岀毊濂�",
+ },
+ {
+ value: "閫夐」3",
+ label: "铓典粩鐓�",
+ },
+ {
+ value: "閫夐」4",
+ label: "榫欓』闈�",
+ },
+ {
+ value: "閫夐」5",
+ label: "鍖椾含鐑ら腑",
+ },
+ ],
+ value: "",
+ };
+ },
+ mounted() {},
+
+ methods: {
+ format(array) {
+ return [
+ this.$moment(array[0]).format("YYYY-MM-DD"),
+ this.$moment(array[1]).format("YYYY-MM-DD"),
+ ];
+ },
+ },
+};
+</script>
+<style lang="scss">
+.op-log {
+ margin: 0 auto;
+ padding: 10px 8px 10px 5px;
+
+ background-color: rgba(248, 248, 248, 1);
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ .top {
+ height: 100px;
+ background: #fff;
+ border-radius: 5px;
+ .first {
+ display: flex;
+ justify-content: space-between;
+ height: 45px;
+ padding: 0 20px;
+ .time-option {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ // padding-left: 20px;
+ .title {
+ margin-right: 20px;
+ }
+ .opts {
+ display: flex;
+ justify-content: space-between;
+ .opt {
+ width: fit-content;
+ height: 32px;
+ padding: 0 15px;
+ // background: aquamarine;
+ border-radius: 4px;
+ cursor: pointer;
+ margin-right: 20px;
+ line-height: 32px;
+ font-size: 14px;
+ }
+ .opt:hover {
+ background-color: rgba(61, 104, 225, 1);
+ color: #fff;
+ }
+ .opt:focus {
+ color: #fff;
+ background-color: rgba(61, 104, 225, 1);
+ }
+ }
+ }
+ .search {
+ display: flex;
+ align-items: center;
+ }
+ }
+ .second {
+ display: flex;
+
+ .bar {
+ display: flex;
+ align-items: baseline;
+ background: aliceblue;
+ width: fit-content;
+ padding-left: 20px;
+ .name{
+ margin-right: 5px;
+ }
+ }
+ }
+ }
+ .table {
+ margin-top: 10px;
+ background: #fff;
+ height: 100%;
+ border-radius: 5px;
+ }
+}
+</style>
diff --git a/src/pages/logCenter/views/pollingLog.vue b/src/pages/logCenter/views/pollingLog.vue
new file mode 100644
index 0000000..4b0ee47
--- /dev/null
+++ b/src/pages/logCenter/views/pollingLog.vue
@@ -0,0 +1,384 @@
+<template>
+ <div class="restart">
+ <div class="restart-set">
+ <div class="t">閲嶅惎璁剧疆</div>
+
+ <div class="bar">
+ <div class="name">閲嶅惎鑺傜偣</div>
+ <el-button
+ class="reset-btn"
+ type="primary"
+ size="small"
+ @click="restart"
+ >閲嶅惎</el-button
+ >
+ </div>
+ </div>
+
+ <div class="restart-set">
+ <div class="t">瀹氭椂閲嶅惎</div>
+ <div class="bar">
+ <div class="name">閲嶅惎鍛ㄦ湡</div>
+ <el-select
+ v-model="every"
+ placeholder="鍏抽棴"
+ size="small"
+ @change="changeEvery"
+ >
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </div>
+
+ <div class="bar" v-if="every == 'monthly'">
+ <div class="name">閲嶅惎鏃ユ湡</div>
+ <el-select
+ v-model="cronValueObj.day"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ @change="updateExpression"
+ >
+ <el-option
+ v-for="item in days"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+ </div>
+
+ <div class="bar" v-if="every == 'weekly'">
+ <div class="name">閲嶅惎鏃ユ湡</div>
+ <el-select
+ v-model="cronValueObj.week"
+ placeholder="璇烽�夋嫨"
+ size="small"
+ @change="updateExpression"
+ >
+ <el-option label="鏄熸湡涓�" value="1"></el-option>
+ <el-option label="鏄熸湡浜�" value="2"></el-option>
+ <el-option label="鏄熸湡涓�" value="3"></el-option>
+ <el-option label="鏄熸湡鍥�" value="4"></el-option>
+ <el-option label="鏄熸湡浜�" value="5"></el-option>
+ <el-option label="鏄熸湡鍏�" value="6"></el-option>
+ <el-option label="鏄熸湡鏃�" value="7"></el-option>
+ </el-select>
+ </div>
+
+ <div class="bar" v-if="every != 'close'">
+ <div class="name">閲嶅惎鏃堕棿</div>
+ <el-time-picker
+ v-model="time"
+ :picker-options="{ selectableRange: '00:00:00 - 23:59:59' }"
+ value-format="HH:mm"
+ format="HH:mm"
+ placeholder="浠绘剰鏃堕棿鐐�"
+ size="small"
+ @change="updateExpression"
+ ></el-time-picker>
+ </div>
+ </div>
+
+ <el-button class="save-btn" type="primary" @click="save">淇濆瓨</el-button>
+ </div>
+</template>
+
+<script>
+import {
+ rebootServer,
+ getDevInfo,
+ getRebootTask,
+ setRebootTask,
+ fileUpload,
+ doUpgrade,
+ deleteDate,
+} from "@/api/system";
+export default {
+ data() {
+ return {
+ time: "",
+ saveBtn: false,
+ timer: null,
+ probeSum: 0,
+ cronText: "",
+ cronValueObj: {
+ min: "*",
+ hour: "*",
+ day: "*",
+ month: "*",
+ week: "*",
+ },
+ options: [
+ {
+ value: "close",
+ label: "鍏抽棴",
+ },
+ {
+ value: "daily",
+ label: "姣忔棩",
+ },
+ {
+ value: "weekly",
+ label: "姣忓懆",
+ },
+ {
+ value: "monthly",
+ label: "姣忔湀",
+ },
+ ],
+ every: "close",
+ rebootCron: "",
+ };
+ },
+ computed: {
+ days: () => {
+ let arr = [];
+ for (let i = 1; i < 32; i++) {
+ arr.push({
+ label: i + "鏃�",
+ value: i + "",
+ });
+ }
+ return arr;
+ },
+ },
+ components: {},
+ mounted() {
+ this.getRebootCron();
+ },
+ beforeDestroy() {},
+ methods: {
+ resolveExp() {
+ // "鍑嗗鍙嶈В鏋�", this.expression;
+ if (this.rebootCron.length) {
+ let arr = this.rebootCron.split(" ");
+ if (arr.length >= 5) {
+ //6 浣嶄互涓婃槸鍚堟硶琛ㄨ揪寮�
+ this.cronValueObj.min = arr[0];
+ this.cronValueObj.hour = arr[1];
+ this.cronValueObj.day = arr[2];
+ this.cronValueObj.month = "*";
+ this.cronValueObj.week = arr[4];
+ }
+
+ if (this.cronValueObj.week != "*") {
+ this.every = "weekly";
+ } else if (this.cronValueObj.day != "*") {
+ this.every = "monthly";
+ } else {
+ this.every = "daily";
+ }
+ this.time = this.cronValueObj.hour + ":" + this.cronValueObj.min;
+ } else {
+ //娌℃湁浼犲叆鐨勮〃杈惧紡 鍒欒繕鍘�
+ this.clearCron();
+ }
+ },
+ clearCron() {
+ this.cronValueObj.min = "*";
+ this.cronValueObj.hour = "*";
+ this.cronValueObj.day = "*";
+ this.cronValueObj.month = "*";
+ this.cronValueObj.week = "*";
+ },
+ getRebootCron() {
+ getRebootTask().then((rsp) => {
+ this.rebootCron = rsp.data;
+ });
+ },
+ reLogin() {
+ this.$router.push("/");
+ },
+ restart() {
+ this.$confirm("纭畾瑕侀噸鍚鑺傜偣鍚�?", {
+ center: true,
+ cancelButtonClass: "comfirm-class-cancle",
+ confirmButtonClass: "comfirm-class-sure",
+ }).then(() => {
+ // this.loading = true;
+ // this.loadingText = "鏅鸿兘璁$畻鑺傜偣姝e湪閲嶅惎锛岃鑰愬績绛夊緟..."
+ rebootServer()
+ .then((rsp) => {
+ this.probeServer(this.reLogin);
+ })
+ .catch((err) => {
+ if (err.status == 400) {
+ // this.loading = false;
+ this.$notify({
+ type: "error",
+ message: "閲嶅惎璁$畻鑺傜偣澶辫触",
+ });
+ } else {
+ this.probeServer(this.reLogin);
+ }
+ });
+ });
+ },
+ probeServer(cb) {
+ this.probeSum++;
+ let _this = this;
+ if (this.probeSum > 60) {
+ this.$confirm("杩炴帴鏈嶅姟鍣ㄥけ璐�, 璇峰埛鏂伴〉闈㈡垨鑱旂郴绠$悊鍛�", "澶辫触", {
+ type: "error",
+ cancelButtonClass: "comfirm-class-cancle",
+ confirmButtonClass: "comfirm-class-sure",
+ }).then(() => {
+ cb();
+ });
+ return;
+ }
+ this.timer = setTimeout(() => {
+ getDevInfo()
+ .then(() => {
+ cb();
+ })
+ .catch((err) => {
+ _this.probeServer(cb);
+ });
+ }, 10000);
+ },
+ save() {
+ this.rebootCron = this.cronText;
+ setRebootTask({ task: this.cronText })
+ .then((rsp) => {
+ if (rsp && rsp.success) {
+ this.$notify({
+ type: "success",
+ message: "閰嶇疆鎴愬姛",
+ });
+ }
+ })
+ .catch((err) => {
+ this.$notify({
+ type: "error",
+ message: "閰嶇疆澶辫触",
+ });
+ });
+ },
+ changeEvery() {
+ this.saveBtn = true;
+ if (this.every === "close") {
+ this.cronText = "";
+ return;
+ }
+ if (this.every === "monthly") {
+ this.cronValueObj.week = "*";
+ this.cronValueObj.day = "1";
+ if (!this.time.length) {
+ this.time = "00:00";
+ }
+ }
+ if (this.every === "weekly") {
+ this.cronValueObj.day = "*";
+ this.cronValueObj.week = "1";
+ if (!this.time.length) {
+ this.time = "00:00";
+ }
+ }
+ if (this.every === "daily") {
+ this.cronValueObj.day = "*";
+ this.cronValueObj.week = "*";
+ }
+ this.updateExpression();
+ },
+ updateExpression() {
+ this.saveBtn = true;
+ if (this.time.length) {
+ let arr = this.time.split(":");
+ this.cronValueObj.hour = arr[0];
+ this.cronValueObj.min = arr[1];
+ }
+ this.crontabValueString();
+ },
+ crontabValueString() {
+ let obj = this.cronValueObj;
+ this.cronText =
+ obj.min +
+ " " +
+ obj.hour +
+ " " +
+ obj.day +
+ " " +
+ obj.month +
+ " " +
+ obj.week;
+ },
+ },
+ watch: {
+ rebootCron() {
+ this.resolveExp();
+ },
+ },
+};
+</script>
+<style lang="scss">
+.all {
+ width: 100%;
+}
+.restart {
+ margin: 0 auto;
+ padding: 20px;
+ .t {
+ box-sizing: border-box;
+ text-align: left;
+ width: 70%;
+ margin: 0 auto;
+ padding: 10px;
+ font-size: 16px;
+ }
+ .bar {
+ height: 50px;
+
+ width: 70%;
+ background: rgba(248, 248, 248, 1);
+ margin: 0 auto;
+ min-width: 300px;
+ display: flex;
+ justify-content: space-between;
+ box-sizing: border-box;
+ padding: 0 20px;
+ align-items: center;
+ border-radius: 10px;
+ margin-bottom: 10px;
+ .reset-btn {
+ width: 70px;
+ height: 32px;
+ border-radius: 5px;
+ }
+ .el-select {
+ width: 100%;
+ }
+ .name {
+ min-width: 150px;
+ text-align: left;
+ font-size: 14px;
+ }
+ .el-input__inner::placeholder {
+ color: rgba(107, 107, 107, 1);
+ }
+ .el-input--small .el-input__inner {
+ height: 32px;
+ line-height: 32px;
+ border: none;
+ background: rgba(240, 240, 240, 1);
+ }
+ .el-select .el-input .el-select__caret {
+ color: rgba(138, 138, 138, 1);
+ font-size: 15px;
+ }
+ .el-date-editor.el-input,
+ .el-date-editor.el-input__inner {
+ width: 100%;
+ }
+ }
+ .save-btn {
+ width: 260px;
+ margin-top: 50px;
+ }
+}
+</style>
diff --git a/src/pages/logCenter/views/systemLog.vue b/src/pages/logCenter/views/systemLog.vue
new file mode 100644
index 0000000..6f2d951
--- /dev/null
+++ b/src/pages/logCenter/views/systemLog.vue
@@ -0,0 +1,326 @@
+<template>
+ <div class="all">
+ <div class="backup-content">
+ <div class="backup-center" ref="left">
+ <div class="menu-item" @click="openRight(0)">
+ <div class="con">
+ <span class="icon iconfont"></span>
+ <span class="menu-text">鑷姩澶囦唤璁剧疆</span>
+ </div>
+ </div>
+ <div class="menu-item" @click="openRight(1)">
+ <div class="con">
+ <span class="icon iconfont"></span>
+
+ <span class="menu-text">浠庡浠戒腑鎭㈠</span>
+ </div>
+ </div>
+ </div>
+ <div class="backup-right">
+ <div class="auto" v-if="activePage == 0">
+ <div class="bar">
+ <div class="name">鑷姩澶囦唤</div>
+ <el-switch
+ v-model="isBackUp"
+ active-color="rgba(61, 104, 225, 1)"
+ @change="switchChange"
+ >
+ </el-switch>
+ </div>
+ <div class="bar">
+ <div class="name">澶囦唤鐩綍</div>
+ <input type="file" id="file_input" webkitdirectory directory />
+ </div>
+ <div class="bar">
+ <div class="name">澶囦唤闂撮殧 / 澶�</div>
+ <el-input
+ v-model="interval"
+ :placeholder="'璇疯緭鍏ュぉ鏁�'"
+ @change="handleChange"
+ size="small"
+ ></el-input>
+ <!-- :controls="false" -->
+ </div>
+ <div class="bar">
+ <div class="name">澶囦唤鏁版嵁淇濆瓨鏃堕棿 / 澶�</div>
+ <el-input
+ v-model="lifeSpan"
+ placeholder="璇疯緭鍏ュぉ鏁�"
+ @change="handleChange"
+ size="small"
+ ></el-input>
+ </div>
+ <div class="bar">
+ <div class="name">鑷姩澶囦唤</div>
+ <el-button type="primary" size="small" @click="backUpNow"
+ >绔嬪嵆澶囦唤</el-button
+ >
+ </div>
+ </div>
+ <div class="recover" v-if="activePage == 1">
+ <div class="title">鏄剧ず澶囦唤鐨勬枃浠惰寖鍥达細{{ 5 }}</div>
+
+ <div class="table-head">
+ <span class="line1">鑷姩澶囦唤鏃堕棿</span>
+ <span class="line1">澶囦唤鏂囦欢鍚嶇О</span>
+ <span class="line2">鎿嶄綔</span>
+ </div>
+
+ <div class="bar" v-for="(item, i) in fileList" :key="i">
+ <span class="time">{{ item.time }}</span>
+ <span class="time">{{ item.name }}</span>
+ <span class="operation">鎭㈠</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+export default {
+ mounted() {},
+ data() {
+ return {
+ langList: [
+ { name: "绠�浣撲腑鏂�" },
+ { name: "鑻辨枃" },
+ { name: "绻佷綋涓枃锛堥娓級" },
+ ],
+ fileList: [
+ { time: "2010-10-02 12:30:09", name: "鏂囦欢1" },
+ { time: "2010-10-02 12:30:09", name: "鏂囦欢12121212121" },
+ { time: "2010-10-02", name: "鏂囦欢2211" },
+ { time: "2011", name: "澶囦唤鏂囦欢2" },
+ ],
+ activePage: 0,
+ interval: "",
+ lifeSpan: "",
+ options: [
+ {
+ value: "閫夐」1",
+ label: "鎵嬪姩",
+ },
+ {
+ value: "閫夐」2",
+ label: "鑷姩",
+ },
+ ],
+ isBackUp: true,
+ };
+ },
+ methods: {
+ openRight(typ) {
+ const es = document.getElementsByClassName("menu-item");
+ es[this.activePage].style.backgroundColor = "#f8f8f8";
+ es[this.activePage].style.color = "rgba(54, 54, 54, 1)";
+ es[typ].style.backgroundColor = "rgba(61, 104, 225, 1)";
+ es[typ].style.color = "#fff";
+ this.activePage = typ;
+ },
+ handleChange() {},
+ backUpNow() {
+ this.$confirm("鎮ㄦ槸鍚︾‘璁ょ珛鍗冲浠芥墍鏈夊簲鐢ㄧ殑閰嶇疆鏁版嵁锛�", "绔嬪嵆澶囦唤", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ }).then(() => {
+ this.$message({
+ type: "success",
+ message: "澶囦唤鎴愬姛",
+ });
+ });
+ // .then((resp) => {
+ // if (resp.success) {
+ // this.$message({
+ // type: "success",
+ // message: "鍒犻櫎鏁版嵁鎴愬姛",
+ // });
+ // this.loading = false;
+ // }
+ // })
+ // .catch((err) => {
+ // this.$message({
+ // type: "error",
+ // message: "鍒犻櫎鏁版嵁澶辫触锛�",
+ // });
+ // this.loading = false;
+ // });
+ },
+ switchChange(val) {
+ console.log(val);
+ },
+ },
+};
+</script>
+<style lang="scss">
+.all {
+ width: 100%;
+}
+
+.backup-content {
+ height: 100%;
+ display: flex;
+ flex-direction: row;
+ flex: 1;
+ flex-basis: auto;
+ box-sizing: border-box;
+ .backup-center {
+ height: 100%;
+ width: 280px;
+ overflow: auto;
+ box-sizing: border-box;
+ flex-shrink: 0;
+ padding: 10px;
+ border-right: 5px solid #f8f8f8;
+ .menu-item {
+ background-color: #f8f8f8;
+ height: 50px;
+ margin-bottom: 10px;
+ border-radius: 8px;
+ line-height: 50px;
+ box-sizing: border-box;
+ font-size: 14px;
+ cursor: pointer;
+ padding: 0 20px;
+ display: flex;
+ justify-content: space-between;
+ .con {
+ .iconfont {
+ margin-right: 10px;
+ }
+ .menu-text {
+ font-size: 15px;
+ }
+ }
+ }
+ }
+ .backup-right {
+ flex: 1;
+ flex-basis: auto;
+ overflow: auto;
+ box-sizing: border-box;
+ position: relative;
+ padding: 20px 40px;
+ .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-select {
+ width: 100%;
+ }
+ .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;
+ }
+ .auto {
+ .bar {
+ display: flex;
+ align-items: center;
+ height: 50px;
+ padding: 0 25px;
+ background-color: #f8f8f8;
+ justify-content: space-between;
+ border-radius: 12px;
+ margin-bottom: 10px;
+ .name {
+ font-size: 15px;
+ text-align: left;
+ min-width: 180px;
+ }
+ .el-input {
+ width: 100%;
+ .el-input {
+ height: auto;
+ }
+ .el-input__inner {
+ border: none;
+ border-radius: 8px;
+ background-color: rgba(240, 240, 240, 1);
+ text-align: left;
+ }
+ }
+ }
+ }
+ .recover {
+ .title {
+ font-size: 13px;
+ color: #868686;
+ text-align: left;
+ padding: 0 10px;
+ margin-bottom: 10px;
+ }
+ .table-head {
+ height: 30px;
+ line-height: 30px;
+ display: flex;
+ // justify-content: space-between;
+ box-sizing: border-box;
+ font-size: 15px;
+ padding: 0 10px;
+ margin-bottom: 5px;
+ .line1 {
+ flex: 4;
+ text-align: left;
+ }
+ .line2 {
+ flex: 1;
+ text-align: right;
+ }
+ }
+ .bar {
+ height: 40px;
+ background-color: rgba(248, 248, 248, 1);
+ display: flex;
+ box-sizing: border-box;
+ padding: 0 10px;
+ align-items: center;
+ border-radius: 8px;
+ color: #797979;
+ font-size: 14px;
+ margin-bottom: 10px;
+ .time {
+ width: 45%;
+ text-align: left;
+ }
+ .operation {
+ color: rgba(26, 115, 232, 1);
+ cursor: pointer;
+ width: 10%;
+ text-align: right;
+ }
+ }
+ }
+ .save-btn {
+ background-color: #3d68e1;
+ width: 240px;
+ height: 40px;
+ margin: 0 auto;
+ border-radius: 10px;
+ color: #fff;
+ line-height: 40px;
+ font-size: 14px;
+ margin-top: 20px;
+ }
+ }
+}
+</style>
diff --git a/vue.config.js b/vue.config.js
index db0d789..1f31471 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -41,7 +41,10 @@
})
// const serverUrl = "http://58.118.225.79:41243" // 缇婁簲
-const serverUrl = "http://192.168.20.106:7009"
+const serverUrl = "http://192.168.20.106:8000"
+
+
+
module.exports = {
pages,
@@ -88,7 +91,7 @@
},
"/data/api-v/app/findAllApp": {
// target: '/',
- target: 'http://localhost:8080/',
+ target: 'http://localhost:8081/',
changeOrigin: true,
pathRewrite: {
'^/data/api-v/app/findAllApp': 'apps.json'
--
Gitblit v1.8.0