Commit fb1b9436 authored by peco's avatar peco

Merge branch 'develop' of http://106.15.103.105/lihuizhen/ec-report-refactor into develop

parents 9057437e ba01527d
This diff is collapsed.
...@@ -53,6 +53,7 @@ export default { ...@@ -53,6 +53,7 @@ export default {
} else { } else {
this.elementData.dataList = res.data.Result this.elementData.dataList = res.data.Result
} }
this.initChart()
} else { } else {
this.$u.toast(Msg) this.$u.toast(Msg)
} }
......
<template> <template>
<view <view
class="canvas" class="canvas"
:style="{ :style="[styleObject]"
backgroundColor: reportInfo.backgroundColor,
backgroundImage: `url(${reportInfo.backgroundImage})`
}"
> >
<view v-for="element in reportData" :key="item.id"> <view v-for="element in reportData" :key="item.id">
<!-- 普通柱状图 --> <!-- 普通柱状图 -->
...@@ -31,6 +28,17 @@ ...@@ -31,6 +28,17 @@
reportData: [] reportData: []
} }
}, },
computed: {
styleObject() {
let params = {}
const { backgroundColor, backgroundImage } = this.reportInfo
if(backgroundImage) params = { 'background-image': `url(${backgroundImage})` }
return {
'background-color': backgroundColor,
...params
}
}
},
async onLoad() { async onLoad() {
this.getReportList() this.getReportList()
}, },
......
This source diff could not be displayed because it is too large. You can view the blob instead.
import { Function, evaluate } from '../static/plugin/eval5/eval5.js'
/** /**
* 数据转换 * 数据转换
*/ */
export const converFunction = (func, data) => { export const converFunction = (func, data) => {
if(!func) return if(!func) return
return Function('"use strict";return (' + func + ')')()(data); return new Function('"use strict";return (' + func + ')')()(data);
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment