Commit 10d99f0e authored by Jenny's avatar Jenny

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

parents de7cb6f7 cfe6978c
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<BasicText :elementInfo="elementInfo.option.title"></BasicText> <BasicText :elementInfo="elementInfo.option.title"></BasicText>
<u-empty <u-empty
v-if="!elementInfo.option.images.list.length"></u-empty> v-if="!elementInfo.option.images.list.length"></u-empty>
<u-image <u-image class="uimage"
v-if="elementInfo.option.images.list.length === 1" v-if="elementInfo.option.images.list.length === 1"
width="100%" width="100%"
:height="imageHeight" :height="imageHeight"
...@@ -58,11 +58,11 @@ ...@@ -58,11 +58,11 @@
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
}
image { .uimage {
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
object-fit: contain; object-fit: contain;
} }
}
</style> </style>
<template>
<view class="container">
<u-line-progress
class="u-line"
v-if="elementInfo.option.progress.type === 'line'"
:style="{'width': elementInfo.width + 'rpx'}"
:height="elementInfo.option.progress.height"
:active-color="elementInfo.option.progress.strokeColor"
:inactive-color="elementInfo.option.progress.trailColor"
:round="elementInfo.option.progress.strokeLinecap == 'round' ? true : false"
:percent="elementInfo.data.dataList.endVal"
:show-percent="elementInfo.option.progress.showInfo">
</u-line-progress>
<u-circle-progress
class="u-circle"
v-if="elementInfo.option.progress.type === 'circle'"
:width="elementInfo.option.progress.width"
:border-width="elementInfo.option.progress.strokeWidth"
:active-color="elementInfo.option.progress.strokeColor"
:inactive-color="elementInfo.option.progress.trailColor"
:percent="elementInfo.data.dataList.endVal"
:bg-color="00000000">
<view class="u-progress-text">{{elementInfo.data.dataList.endVal}}%</view>
</u-circle-progress>
</view>
</template>
<script>
import uniEcCanvas from '@/components/uni-ec-canvas/uni-ec-canvas'
import * as echarts from '@/components/uni-ec-canvas/echarts'
import echartElementData from '@/mixins/echartElementData.js'
let chart = null
export default {
name:"NormalProgress",
mixins: [echartElementData],
data() {
return {
};
},
onReady () {
},
components: {
uniEcCanvas
},
methods: {
}
}
</script>
<style>
.container {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.u-line {
align-self: center;
}
.u-circle {
align-self: center;
}
.u-progress-text {
font-size: 40rpx;
font-weight: bold;
color: white;
}
</style>
\ No newline at end of file
<template>
<view class="remoteView">
<u-image
class="remoteImage"
:src="imageUrl"
width="100%"
:height="imageHeight"
></u-image>
</view>
</template>
<script>
import echartElementData from '@/mixins/echartElementData.js'
export default {
name:"RemoteImage",
mixins: [echartElementData],
data() {
return {
imageUrl:"",
windowWidth: 0, //屏幕宽度
imageHeight:0 //图片高度
};
},
computed:{
},
methods:{
initChart() {
uni.getSystemInfo({
success: res=> {
this.windowWidth = res.windowWidth;
this.imageHeight = (this.windowWidth*this.elementInfo.height)/this.elementInfo.width;
}
});
this.$nextTick(() => {
this.imageUrl = this.elementData.dataList.imageUrl
})
},
}
}
</script>
<style lang="scss" scoped>
.remoteView {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
.remoteImage {
object-fit: contain;
}
</style>
...@@ -32,8 +32,12 @@ ...@@ -32,8 +32,12 @@
<BasicText v-if="element.type == 'BasicText'" :elementInfo="element"></BasicText> <BasicText v-if="element.type == 'BasicText'" :elementInfo="element"></BasicText>
<!-- 真实时间 --> <!-- 真实时间 -->
<RealTime v-if="element.type == 'RealTime'" :elementInfo="element"></RealTime> <RealTime v-if="element.type == 'RealTime'" :elementInfo="element"></RealTime>
<!-- 普通进度条 -->
<NormalProgress v-if="element.type == 'NormalProgress'" :elementInfo="element"></NormalProgress>
<!-- 普通图片 --> <!-- 普通图片 -->
<NormalImage v-if="element.type == 'NormalImage'" :elementInfo="element"></NormalImage> <NormalImage v-if="element.type == 'NormalImage'" :elementInfo="element"></NormalImage>
<!-- 远程图片 -->
<RemoteImage v-if="element.type == 'RemoteImage'" :elementInfo="element"></RemoteImage>
</view> </view>
</view> </view>
</template> </template>
......
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