diff --git a/nezha-fronted/index.html b/nezha-fronted/index.html index e8f44f335..627735877 100644 --- a/nezha-fronted/index.html +++ b/nezha-fronted/index.html @@ -1,12 +1,21 @@ - - - - nezha-fronted - - -
- - - + + + + + nezha-fronted + + + + +
+ + + + \ No newline at end of file diff --git a/nezha-fronted/package.json b/nezha-fronted/package.json index d9b9e6610..418d08572 100644 --- a/nezha-fronted/package.json +++ b/nezha-fronted/package.json @@ -16,6 +16,7 @@ "node-sass": "^4.13.0", "vue": "^2.5.2", "vue-i18n": "^8.15.1", + "vue-resource": "^1.5.1", "vue-router": "^3.0.1", "vuex": "^3.1.2", "xterm": "^3.1.0" diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 66f52acef..26e31136f 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -1,7 +1,4 @@ -* { - margin: 0; - padding: 0; -} + [v-cloak] { display: none; } @@ -11,6 +8,9 @@ body { html { height: 100%; } +li{ + list-style-type:none ; +} .content-box { height: 100%; } diff --git a/nezha-fronted/src/components/charts/chart-table.scss b/nezha-fronted/src/components/charts/chart-table.scss index cdc1ece32..796908096 100644 --- a/nezha-fronted/src/components/charts/chart-table.scss +++ b/nezha-fronted/src/components/charts/chart-table.scss @@ -1,4 +1,12 @@ /* ---------edit-chart-move--------- */ +.clearfix:after{ + display: block; + content: ""; + clear: both; +} +.clearfix{ + margin-bottom: 20px; +} .chart-table { width: 100%; height: 100%; @@ -6,32 +14,46 @@ position: relative; background: #FFF; border: 1px solid #d8dce1; - padding: 10px; + padding: 20px 30px; margin-bottom: 10px; .table-title { font-family: Arial; font-size: 18px; font-weight:bold; + line-height: 30px; + } + .edit:after{ + display: block; + content: ""; + clear: both; } .edit { // position: absolute; // right: 40px; // top: 5px; // z-index: 10; - padding-right: 40px; - padding-bottom:9px; + background: $btn-light-background-color; + border-radius: 6px;; + border: 1px solid #ccc; .set-icon { display: inline-block; cursor: pointer; - font-size: 14px; - margin-left: 15px; - color: #5aacff; - border: 0 none; - background: transparent; + padding: 5px 15px; + border-right: 1px solid #ccc; + + } + .set-icon:last-child{ + border-right: none !important; + } + .el-icon-refresh-right{ + color: #F0BF84; + } + i{ + font-size: 16px; + color: #000; } .list-icon { float: left; - margin-right: 10px; } .show-icon { cursor: pointer; diff --git a/nezha-fronted/src/components/charts/chart-table.vue b/nezha-fronted/src/components/charts/chart-table.vue index 85991460a..a1c98e893 100644 --- a/nezha-fronted/src/components/charts/chart-table.vue +++ b/nezha-fronted/src/components/charts/chart-table.vue @@ -1,307 +1,295 @@ - + diff --git a/nezha-fronted/src/components/charts/line-chart-block.scss b/nezha-fronted/src/components/charts/line-chart-block.scss index a27f7fb39..d3a1a17fa 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.scss +++ b/nezha-fronted/src/components/charts/line-chart-block.scss @@ -1,11 +1,19 @@ /* ---------edit-chart-move--------- */ +.clearfix:after{ + display: block; + content: ""; + clear: both; +} +.clearfix{ + margin-bottom: 20px; +} .line-chart-block { - width: 100%; height: 100%; // min-height: 500px; position: relative; background: #FFF; border: 1px solid #d8dce1; + padding: 20px 30px; margin-bottom: 10px; padding-bottom: 3px; .line-area { @@ -21,19 +29,34 @@ white-space: pre-wrap !important; } } + .edit:after{ + display: block; + content: ""; + clear: both; + } .edit { position: absolute; right: 40px; top: 15px; z-index: 10; + background: $btn-light-background-color; + border-radius: 6px;; + border: 1px solid #ccc; .set-icon { display: inline-block; cursor: pointer; - font-size: 14px; - margin-left: 15px; - color: #5aacff; - border: 0 none; - background: transparent; + padding: 5px 15px; + border-right: 1px solid #ccc; + } + .set-icon:last-child{ + border-right: none !important; + } + .el-icon-refresh-right{ + color: #F0BF84; + } + i{ + font-size: 16px; + color: #000; } .list-icon { float: left; diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index 4efde4c6c..9ef91baee 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -785,6 +785,7 @@ export default { } return num.toFixed(2); }, + handleClose(){}, /* handleClose(done) { /* @@ -980,6 +981,13 @@ export default { }, mounted() { this.firstLoad = false; + let Myecharts2 = echarts.init(document.getElementById('lineChartArea')); + console.log(Myecharts2); + + setTimeout(function () { + Myecharts2.resize() + }, 500) + }, beforeDestroy() {}, }; diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index 9d47eafd4..569431fc7 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -1,108 +1,24 @@ - - + + diff --git a/nezha-fronted/src/main.js b/nezha-fronted/src/main.js index 8eff4d1ea..bf6b19640 100644 --- a/nezha-fronted/src/main.js +++ b/nezha-fronted/src/main.js @@ -1,4 +1,5 @@ //import "./assets/css/main.css"; +import './assets/stylus/index.scss' import "./assets/css/nzIcon.css"; import 'element-ui/lib/theme-chalk/index.css'; import ElementUI from 'element-ui'; @@ -11,7 +12,6 @@ import store from './store/index'; import App from './App' import router from './router' import VueResource from 'vue-resource' -import './assets/stylus/index.scss' import axios from 'axios'; import {post, get, put, del} from './http.js'