Skip to content

Commit 8a85f1e

Browse files
committed
fix: inner edit table delete func
1 parent 94fe123 commit 8a85f1e

File tree

10 files changed

+693
-800
lines changed

10 files changed

+693
-800
lines changed

β€Žsrc/App.vue

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
1-
<template>
2-
<a-locale-provider :locale="locale">
3-
<div id="app">
4-
<router-view/>
5-
</div>
6-
</a-locale-provider>
7-
</template>
8-
<script>
9-
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
10-
import enquireScreen from '@/utils/device'
11-
12-
export default {
13-
data () {
14-
return {
15-
locale: zhCN,
16-
}
17-
},
18-
created () {
19-
let that = this
20-
enquireScreen(deviceType => {
21-
console.log('deviceType', deviceType)
22-
// tablet
23-
if (deviceType === 0) {
24-
that.$store.commit('TOGGLE_DEVICE', 'tablet')
25-
that.$store.commit('CLOSE_SIDEBAR', false)
26-
}
27-
// mobile
28-
else if (deviceType === 1) {
29-
that.$store.commit('TOGGLE_DEVICE', 'mobile')
30-
that.$store.commit('CLOSE_SIDEBAR', false)
31-
}
32-
else {
33-
that.$store.commit('TOGGLE_DEVICE', 'desktop')
34-
that.$store.commit('TOGGLE_SIDEBAR', true)
35-
}
36-
37-
})
38-
}
39-
}
40-
</script>
41-
<style>
42-
#app {
43-
height: 100%;
44-
}
1+
<template>
2+
<a-locale-provider :locale="locale">
3+
<div id="app">
4+
<router-view/>
5+
</div>
6+
</a-locale-provider>
7+
</template>
8+
<script>
9+
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
10+
import enquireScreen from '@/utils/device'
11+
12+
export default {
13+
data () {
14+
return {
15+
locale: zhCN,
16+
}
17+
},
18+
created () {
19+
let that = this
20+
enquireScreen(deviceType => {
21+
// tablet
22+
if (deviceType === 0) {
23+
that.$store.commit('TOGGLE_DEVICE', 'tablet')
24+
that.$store.commit('CLOSE_SIDEBAR', false)
25+
}
26+
// mobile
27+
else if (deviceType === 1) {
28+
that.$store.commit('TOGGLE_DEVICE', 'mobile')
29+
that.$store.commit('CLOSE_SIDEBAR', false)
30+
}
31+
else {
32+
that.$store.commit('TOGGLE_DEVICE', 'desktop')
33+
that.$store.commit('TOGGLE_SIDEBAR', true)
34+
}
35+
36+
})
37+
}
38+
}
39+
</script>
40+
<style>
41+
#app {
42+
height: 100%;
43+
}
4544
</style>
Lines changed: 63 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,64 @@
1-
<template>
2-
<div :style="{ padding: '0 0 32px 32px' }">
3-
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
4-
<v-chart
5-
height="254"
6-
:data="data"
7-
:scale="scale"
8-
:forceFit="true"
9-
:padding="['auto', 'auto', '40', '50']">
10-
<v-tooltip />
11-
<v-axis />
12-
<v-bar position="x*y"/>
13-
</v-chart>
14-
</div>
15-
</template>
16-
17-
<script>
18-
const tooltip = [
19-
'x*y',
20-
(x, y) => ({
21-
name: x,
22-
value: y
23-
})
24-
]
25-
const scale = [{
26-
dataKey: 'x',
27-
title: 'ζ—₯期(倩)',
28-
alias: 'ζ—₯期(倩)',
29-
min: 2
30-
}, {
31-
dataKey: 'y',
32-
title: '桁量(Gb)',
33-
alias: '桁量(Gb)',
34-
min: 1
35-
}]
36-
37-
export default {
38-
name: "Bar",
39-
props: ['title'],
40-
data () {
41-
return {
42-
data: [],
43-
scale,
44-
tooltip
45-
}
46-
},
47-
created () {
48-
this.getMonthBar()
49-
},
50-
methods: {
51-
getMonthBar() {
52-
this.$http.get('/analysis/month-bar')
53-
.then(res => {
54-
this.data = res.result
55-
})
56-
}
57-
}
58-
}
1+
<template>
2+
<div :style="{ padding: '0 0 32px 32px' }">
3+
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
4+
<v-chart
5+
height="254"
6+
:data="data"
7+
:scale="scale"
8+
:forceFit="true"
9+
:padding="['auto', 'auto', '40', '50']">
10+
<v-tooltip />
11+
<v-axis />
12+
<v-bar position="x*y"/>
13+
</v-chart>
14+
</div>
15+
</template>
16+
17+
<script>
18+
const tooltip = [
19+
'x*y',
20+
(x, y) => ({
21+
name: x,
22+
value: y
23+
})
24+
]
25+
const scale = [{
26+
dataKey: 'x',
27+
title: 'ζ—₯期(倩)',
28+
alias: 'ζ—₯期(倩)',
29+
min: 2
30+
}, {
31+
dataKey: 'y',
32+
title: '桁量(Gb)',
33+
alias: '桁量(Gb)',
34+
min: 1
35+
}]
36+
37+
export default {
38+
name: "Bar",
39+
props: {
40+
title: {
41+
type: String,
42+
default: ''
43+
}
44+
},
45+
data () {
46+
return {
47+
data: [],
48+
scale,
49+
tooltip
50+
}
51+
},
52+
created () {
53+
this.getMonthBar()
54+
},
55+
methods: {
56+
getMonthBar() {
57+
this.$http.get('/analysis/month-bar')
58+
.then(res => {
59+
this.data = res.result
60+
})
61+
}
62+
}
63+
}
5964
</script>

β€Žsrc/components/layout/LayoutMain.vue

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<template>
22
<a-layout class="layout">
33

4-
<a-drawer v-if="device === 'mobile'"
5-
wrapClassName="drawer-sider"
6-
placement="left"
7-
@close="() => this.collapsed = false"
8-
:closable="false"
9-
:visible="collapsed"
10-
>
4+
<a-drawer
5+
v-if="device === 'mobile'"
6+
wrapClassName="drawer-sider"
7+
placement="left"
8+
@close="() => this.collapsed = false"
9+
:closable="false"
10+
:visible="collapsed"
11+
>
1112
<sider-menu
1213
mode="inline"
1314
:menus="menus"
@@ -43,8 +44,8 @@
4344
import SiderMenu from '@/components/menu/SiderMenu'
4445
import LayoutHeader from './LayoutHeader'
4546
import LayoutFooter from './LayoutFooter'
46-
import { asyncRouterMap } from '@/router/index'
47-
import { mapState } from 'vuex'
47+
import {asyncRouterMap} from '@/router/index'
48+
import {mapState} from 'vuex'
4849
4950
export default {
5051
name: "LayoutView",
@@ -53,7 +54,7 @@
5354
LayoutHeader,
5455
LayoutFooter
5556
},
56-
data () {
57+
data() {
5758
return {
5859
// light, dark
5960
menuTheme: 'light',
@@ -63,10 +64,8 @@
6364
menus: []
6465
}
6566
},
66-
created () {
67+
created() {
6768
this.menus = asyncRouterMap
68-
69-
console.log( this.collapsed )
7069
},
7170
computed: {
7271
...mapState({
@@ -76,7 +75,7 @@
7675
})
7776
},
7877
methods: {
79-
toggle () {
78+
toggle() {
8079
this.collapsed = !this.collapsed;
8180
},
8281
}
@@ -238,6 +237,7 @@
238237
.table-alert {
239238
margin-bottom: 16px;
240239
}
240+
241241
.content {
242242
243243
.search {

β€Žsrc/components/menu/MiniSiderMenu.vue

Lines changed: 0 additions & 71 deletions
This file was deleted.

β€Žsrc/components/menu/NavMenu.vue

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
Β (0)