数据统计样式等修复

dev_2022-04-07
yujialong 3 years ago
parent dc655e05c4
commit 22a6b89a53
  1. 31
      src/layouts/header/index.vue
  2. 2
      src/pages/data/list/index.vue
  3. 2
      src/pages/index/list/index.vue
  4. 25
      src/pages/stat/list/index.vue

@ -55,17 +55,12 @@ import navbar from '../navbar'
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
import Setting from '@/setting' import Setting from '@/setting'
import util from '@/libs/util' import util from '@/libs/util'
import bus from '@/libs/bus'
export default { export default {
data() { data() {
return { return {
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
isLogin: this.$route.path == '/login', isLogin: this.$route.path == '/login',
isData: this.$route.path == '/data/list',
customer: this.$route.query.customer, customer: this.$route.query.customer,
rendered: false,
keyword: '',
searchTimer: null,
showSetting: true, showSetting: true,
id: '', id: '',
schoolName: '', schoolName: '',
@ -86,25 +81,6 @@ export default {
'routes' 'routes'
]) ])
}, },
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
if (!this.rendered) {
this.searchTimer = setTimeout(() => {
bus.$emit('initData', this.keyword)
}, 500)
}
this.rendered = false
},
'$route'(to, from) {
let isData = this.$route.path == '/data/list'
if (isData) {
this.rendered = true
this.keyword = ''
}
this.isData = isData
}
},
mounted() { mounted() {
// ,store,, // ,store,,
if (this.customer) { if (this.customer) {
@ -146,6 +122,7 @@ export default {
this.showSetting = false this.showSetting = false
}, },
toIndex() { toIndex() {
//
if (this.$route.path === '/index/list') { if (this.$route.path === '/index/list') {
location.reload() location.reload()
} else { } else {
@ -166,13 +143,13 @@ export default {
let route = this.$router.resolve({ let route = this.$router.resolve({
path: this.routes[0].name, path: this.routes[0].name,
query: { query: {
mg: btoa(true), mg: btoa(true), //
schoolId: btoa(this.schoolId), schoolId: btoa(this.schoolId),
customer: btoa(this.isCustomer), customer: btoa(this.isCustomer), //
userName: this.userName userName: this.userName
} }
}) })
window.open(route.href) window.open(route.href) //
} else { } else {
// ,, // ,,
util.warningMsg('该角色未开放模块,请联系管理员') util.warningMsg('该角色未开放模块,请联系管理员')

@ -77,7 +77,7 @@
:with-header="false" :with-header="false"
:visible.sync="previewVisible"> :visible.sync="previewVisible">
<div class="flex j-between"> <div class="flex j-between">
<div class="l-title"> <div class="l-title" style="margin-bottom: 0">
<img src="@/assets/img/data3.png" alt=""> <img src="@/assets/img/data3.png" alt="">
数据预览 数据预览
</div> </div>

@ -163,7 +163,7 @@
:with-header="false" :with-header="false"
:visible.sync="previewVisible"> :visible.sync="previewVisible">
<div class="flex j-between"> <div class="flex j-between">
<div class="l-title"> <div class="l-title" style="margin-bottom: 0">
<img src="@/assets/img/data3.png" alt=""> <img src="@/assets/img/data3.png" alt="">
数据预览 数据预览
</div> </div>

@ -228,7 +228,6 @@ export default {
} }
} }
this.yearLen = len this.yearLen = len
// debugger
this.monthData = result this.monthData = result
this.$nextTick(() => { this.$nextTick(() => {
this.initChart(list) this.initChart(list)
@ -254,7 +253,7 @@ export default {
const datas = list[i][n] const datas = list[i][n]
const item = [] const item = []
datas.map((e, j) => { datas.map((e, j) => {
item.push([`${j + 1}`, e]) item.push([`${j}`, e])
}) })
const temp = { const temp = {
type: 'line', type: 'line',
@ -552,14 +551,26 @@ export default {
vertical-align: middle; vertical-align: middle;
background-color: #55D3DE; background-color: #55D3DE;
} }
/deep/.el-table__body-wrapper tr:nth-child(2n) .meta:after { /deep/.el-table__body-wrapper tr:first-child {
background-color: #7ED321; td:nth-child(3) {
border-bottom: 0 !important;
}
} }
/deep/.el-table__body-wrapper tr:nth-child(3n) .meta:after { /deep/.el-table__body-wrapper tr:nth-child(2n) {
background-color: #1A78F6; td:first-child {
border-bottom: 0 !important;
}
.meta:after {
background-color: #7ED321;
}
}
.el-table__body-wrapper tr:nth-child(3n) {
.meta:after {
background-color: #1A78F6;
}
} }
.chart{ .chart{
width: calc(100% - 240px); width: calc(100% - 180px);
height: 132px; height: 132px;
margin: -132px 0 0 240px; margin: -132px 0 0 240px;
} }

Loading…
Cancel
Save