[update] 部分问题调整

This commit is contained in:
danshihao
2024-04-18 10:09:12 +08:00
parent 1a4612e6f1
commit b7907af6af
4 changed files with 48 additions and 39 deletions
+39 -37
View File
@@ -376,44 +376,46 @@ export default {
}, },
// 初始化 实时示功图 // 初始化 实时示功图
initIndicatorDiagram (data) { initIndicatorDiagram (data) {
// 没有渲染出组件就不执行 this.$nextTick(() => {
if (!this.$refs.indicatorDiagram) { // 没有渲染出组件就不执行
return if (!this.$refs.indicatorDiagram) {
} return
// 置空数据
if (!data || Object.keys(data).length === 0) {
this.$refs.indicatorDiagram.updateMyChartOption()
return
}
// 获取基础配置
const legendData = ['上冲程', '下冲程']
const option = generateBaseOption()
option.legend.data = legendData
option.xAxis[0].data = data['X轴']
option.yAxis[0].name = '载荷(KN)'
option.yAxis[0].nameTextStyle.padding = [0, 0, 0, 5]
option.series = [
{
name: legendData[0],
type: 'line',
stack: 'upStroke',
color: '#FF5353',
symbol: 'none',
smooth: true,
data: data['上冲程']
},
{
name: legendData[1],
type: 'line',
stack: 'downStroke',
color: '#8FC7FF',
symbol: 'none',
smooth: true,
data: data['下冲程']
} }
] // 置空数据
// 设置数据 if (!data || Object.keys(data).length === 0) {
this.$refs.indicatorDiagram && this.$refs.indicatorDiagram.updateMyChartOption(option) this.$refs.indicatorDiagram.updateMyChartOption()
return
}
// 获取基础配置
const legendData = ['上冲程', '下冲程']
const option = generateBaseOption()
option.legend.data = legendData
option.xAxis[0].data = data['X轴']
option.yAxis[0].name = '载荷(KN)'
option.yAxis[0].nameTextStyle.padding = [0, 0, 0, 5]
option.series = [
{
name: legendData[0],
type: 'line',
stack: 'upStroke',
color: '#FF5353',
symbol: 'none',
smooth: true,
data: data['上冲程']
},
{
name: legendData[1],
type: 'line',
stack: 'downStroke',
color: '#8FC7FF',
symbol: 'none',
smooth: true,
data: data['下冲程']
}
]
// 设置数据
this.$refs.indicatorDiagram && this.$refs.indicatorDiagram.updateMyChartOption(option)
})
}, },
// 油井下拉 // 油井下拉
loadOilWellList (wellheadArea) { loadOilWellList (wellheadArea) {
+1
View File
@@ -442,6 +442,7 @@ export default {
.overview-card-main { .overview-card-main {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 0.78rem;
.overview-card-img { .overview-card-img {
flex: 0 0 0.56rem; flex: 0 0 0.56rem;
+7 -2
View File
@@ -153,9 +153,14 @@ export default {
width: 0.14rem; width: 0.14rem;
height: 0.14rem; height: 0.14rem;
} }
/deep/ .van-uploader__preview {
margin: 0.02rem;
width: 1.2rem;
height: 1.2rem;
}
/deep/ .van-uploader__preview-image { /deep/ .van-uploader__preview-image {
width: 1.24rem; width: 100%;
height: 1.24rem; height: 100%;
} }
/deep/ .van-uploader__upload { /deep/ .van-uploader__upload {
width: 1.24rem; width: 1.24rem;
@@ -531,6 +531,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.upload-avatar-box { .upload-avatar-box {
position: relative; position: relative;
margin-top: -13px;
width: 100%; width: 100%;
height: 168px; height: 168px;
background: url("~@/assets/images/systemOverview/systemSettings/upload-avatar.png") no-repeat center center; background: url("~@/assets/images/systemOverview/systemSettings/upload-avatar.png") no-repeat center center;