Commit 4371b3cf authored by xinzhedeai's avatar xinzhedeai

电子档案 变形监测y轴处理

parent 4226a5bb
......@@ -292,6 +292,7 @@
symbol: 'none' // 移除箭头
}
}
var chartsOption = {
legend: {
textStyle: {
......@@ -318,10 +319,10 @@
yAxis: [{
type:'value',
name: '单位(mm)',
position:'right',
nameTextStyle: { color: '#fff' },
position:'left',
show: true, // 显示 Y 轴
splitLine: { show: false },
nameTextStyle: { color: '#fff' },
axisLabel: {
show: true, // 显示刻度标签
textStyle: { color: '#fff' }
......@@ -330,15 +331,13 @@
show: true
},
axisTick: { show: true },
title: {
text: 'Precipitation', // 这是你的 Y 轴标题
color: '#a3e4f5' // 这里设置你的颜色,你可以使用十六进制颜色代码,如 '#FF0000',或者 RGB 等
}
min: 0,
max: 100,
}, {
type:'value',
name: '单位(mm)',
nameTextStyle: { color: '#fff' },
position:'left',
position:'right',
show: true, // 显示 Y 轴
splitLine: { show: false },
axisLabel: {
......@@ -352,6 +351,8 @@
show: true
},
axisTick: { show: true },
min: 0,
max: 100,
}],
grid: { right: 45, top: 40, left: 40, bottom: 25 },
dataZoom: [
......@@ -389,6 +390,15 @@
}).then(res => {
const result = res.data.body;
if (result) {
const max = result.max
if(max){
chartsOption.yAxis[0].max = max
chartsOption.yAxis[0].min = -max
chartsOption.yAxis[1].max = max
chartsOption.yAxis[1].min = -max
}
chartsOption.xAxis.data = result.xData.data
chartsOption.series = result.yData.map((item, index) => {
var tempObj = JSON.parse(JSON.stringify(yAxisOption));
......
......@@ -72,13 +72,13 @@
:ref="`addhdpic`"
class="helloworld"
type="file"
accept=".pdf"
accept1=".pdf"
hidden
@change="addhdPicChange"
/>
</label>
<span>仅支持pdf格式文件</span>
<!-- <span>仅支持pdf格式文件</span> -->
</el-form-item>
<el-form-item label="">
<div v-for="(item, index) in uploadedFiles" :key="item.name + index">
......@@ -182,15 +182,9 @@
width="100"
/>
<el-table-column width="200px" prop="createTime" label="录入时间" />
<el-table-column label="操作" width="230px" align="center">
<el-table-column label="操作" width="230px" align="left">
<template slot-scope="scope">
<el-button
v-show="scope.row.downloadWhether"
type="primary"
size="mini"
@click="viewFile(scope.row)"
>预览</el-button
>
<el-button
v-show="scope.row.downloadWhether"
type="primary"
......@@ -205,6 +199,14 @@
@click="delFileById(scope.row)"
>删除</el-button
>
<el-button
v-show="scope.row.downloadWhether && (scope.row.filePath.indexOf('.pdf')>-1)"
type="primary"
size="mini"
@click="viewFile(scope.row)"
>预览</el-button
>
</template>
</el-table-column>
</el-table>
......
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