Compare commits
4 Commits
8b739366c0
...
174f5ac79e
Author | SHA1 | Date | |
---|---|---|---|
174f5ac79e | |||
0cc623c98b | |||
647be6fd8f | |||
d7fb3356e8 |
|
@ -1,5 +1,7 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
],
|
||||
plugins: ['transform-remove-console']
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"echarts": "^4.8.0",
|
||||
"element-ui": "^2.13.2",
|
||||
"lodash": "^4.17.15",
|
||||
"nprogress": "^0.2.0",
|
||||
"vue": "^2.6.11",
|
||||
"vue-quill-editor": "^3.0.6",
|
||||
"vue-router": "^3.2.0",
|
||||
|
@ -25,6 +26,7 @@
|
|||
"@vue/cli-service": "~4.4.0",
|
||||
"@vue/eslint-config-standard": "^5.1.2",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-plugin-transform-remove-console": "^6.9.4",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -17,8 +17,7 @@ import echarts from 'echarts'
|
|||
import _ from 'lodash'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
},
|
||||
props: {},
|
||||
data () {
|
||||
return {
|
||||
options: {
|
||||
|
@ -58,9 +57,7 @@ export default {
|
|||
const chart = echarts.init(document.querySelector('#main'))
|
||||
this.$http.get('reports/type/1').then(response => {
|
||||
const res = response.data
|
||||
console.log(res.data, this.options)
|
||||
const r = _.merge(res.data, this.options)
|
||||
console.log(r)
|
||||
chart.setOption(r)
|
||||
})
|
||||
}
|
||||
|
|
10
src/main.js
10
src/main.js
|
@ -14,17 +14,25 @@ import 'quill/dist/quill.snow.css' // for snow theme
|
|||
import 'quill/dist/quill.bubble.css' // for bubble theme
|
||||
import timeline from 'element-ui/lib/timeline'
|
||||
import timelineItem from 'element-ui/lib/timeline-item'
|
||||
// 进度条
|
||||
import NProgres from 'nprogress'
|
||||
import 'nprogress/nprogress.css'
|
||||
|
||||
Vue.use(timeline)
|
||||
Vue.use(timelineItem)
|
||||
Vue.use(vueQuillEditor)
|
||||
Vue.component('table-tree', tableTree)
|
||||
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
|
||||
// 为每个请求头挂一个 token
|
||||
// 为每个ajax请求头挂一个 token 并加载进度条
|
||||
axios.interceptors.request.use(config => {
|
||||
NProgres.start()
|
||||
config.headers.Authorization = sessionStorage.getItem('token')
|
||||
return config
|
||||
})
|
||||
axios.interceptors.response.use(response => {
|
||||
NProgres.done()
|
||||
return response
|
||||
})
|
||||
|
||||
Vue.filter('dataFormat', (time) => {
|
||||
const dt = (new Date(time))
|
||||
|
|
10
yarn.lock
10
yarn.lock
|
@ -1695,6 +1695,11 @@ babel-plugin-dynamic-import-node@^2.3.3:
|
|||
dependencies:
|
||||
object.assign "^4.1.0"
|
||||
|
||||
babel-plugin-transform-remove-console@^6.9.4:
|
||||
version "6.9.4"
|
||||
resolved "https://registry.npm.taobao.org/babel-plugin-transform-remove-console/download/babel-plugin-transform-remove-console-6.9.4.tgz#b980360c067384e24b357a588d807d3c83527780"
|
||||
integrity sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=
|
||||
|
||||
babel-runtime@6.x:
|
||||
version "6.26.0"
|
||||
resolved "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
|
||||
|
@ -5738,6 +5743,11 @@ npm-run-path@^4.0.0:
|
|||
dependencies:
|
||||
path-key "^3.0.0"
|
||||
|
||||
nprogress@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.npm.taobao.org/nprogress/download/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1"
|
||||
integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E=
|
||||
|
||||
nth-check@^1.0.2, nth-check@~1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
|
||||
|
|
Loading…
Reference in New Issue
Block a user