Commit 4371b3cf authored by xinzhedeai's avatar xinzhedeai

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

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