Commit cd385997 authored by Kimber's avatar Kimber
parents 5ea66232 0f0b5ee9
......@@ -164,6 +164,7 @@
watch: {
createTime() {
this.getChartsData()
this.getTableList()
}
},
methods: {
......@@ -194,6 +195,7 @@
Axiosx.get(host + '/data/sz/historyInside/shi', {
params: {
code: this.currentSensorId,
daterange: this.createTime ? this.createTime.join(',') : ''
}
}).then(res => {
this.tableList = res.data.body || [];
......
......@@ -214,6 +214,7 @@
watch: {
createTime() {
this.getChartsData()
this.getTableList()
}
},
methods: {
......@@ -244,6 +245,7 @@
Axiosx.get(host + '/data/mp/historyInside', {
params: {
code: this.currentSensorId,
daterange: this.createTime ? this.createTime.join(',') : ''
}
}).then(res => {
this.tableList = res.data.body || [];
......@@ -290,6 +292,7 @@
symbol: 'none' // 移除箭头
}
}
var chartsOption = {
legend: {
textStyle: {
......@@ -316,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' }
......@@ -328,17 +331,13 @@
show: true
},
axisTick: { show: true },
min: -20,
max: 20,
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,8 +351,8 @@
show: true
},
axisTick: { show: true },
min: -20,
max: 20,
min: 0,
max: 100,
}],
grid: { right: 45, top: 40, left: 40, bottom: 25 },
dataZoom: [
......@@ -391,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));
......
......@@ -34,9 +34,9 @@ let jessibucaPlayer = {};
}
);
var host = location.protocol + '//' + (location.hostname === '192.168.3.226' ? '192.168.3.37' : '192.168.13.200') + ':8013';
var host = location.protocol + '//' + (location.hostname === '192.168.3.38' ? '192.168.3.37' : '192.168.13.200') + ':8013';
var selfHost = location.hostname === '192.168.3.226' ? 'http://192.168.3.38:8057' : location.protocol + '//' + window.location.host;
var selfHost = location.hostname === '192.168.3.38' ? 'http://192.168.3.38:8057' : location.protocol + '//' + window.location.host;
// 请求 token 用
......
......@@ -160,6 +160,8 @@
watch: {
createTime() {
this.getChartsData()
this.getTableList()
}
},
methods: {
......@@ -190,6 +192,7 @@
Axiosx.get(host + '/data/sz/historyInside/wen', {
params: {
code: this.currentSensorId,
daterange: this.createTime ? this.createTime.join(',') : ''
}
}).then(res => {
this.tableList = res.data.body || [];
......
......@@ -167,6 +167,8 @@
watch: {
createTime() {
this.getChartsData()
this.getTableList()
}
},
mounted() {
......@@ -199,6 +201,7 @@
Axiosx.get(host + '/data/rg/historyInside', {
params: {
code: this.currentSensorId,
daterange: this.createTime ? this.createTime.join(',') : ''
}
}).then(res => {
this.tableList = res.data.body || [];
......
......@@ -162,6 +162,8 @@
watch: {
createTime() {
this.getChartsData()
this.getTableList()
}
},
methods: {
......@@ -191,6 +193,7 @@
Axiosx.get(host + '/data/sz/historyInside/feng', {
params: {
code: this.currentSensorId,
daterange: this.createTime ? this.createTime.join(',') : ''
}
}).then(res => {
this.tableList = res.data.body || [];
......
......@@ -69,16 +69,16 @@
>
上传文件
<input
:ref="`addhdpic`"
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">
......@@ -149,7 +149,7 @@
v-show="selectedFolderInfo.uploadWhether"
type="primary"
size="mini"
@click="fileUploadModal = true"
@click="showFileUploadModal"
>上传文件</el-button
>
<el-input
......@@ -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>
......@@ -280,6 +282,16 @@ export default {
},
created() {},
methods: {
showFileUploadModal(){
this.fileUploadModal = true;
this.uploadedFiles = []
this.$nextTick(() => {
if (this.$refs.addhdpic) {
this.$refs.addhdpic.value = '';
}
});
},
viewFile(row){
this.pdfSrc = process.env.VUE_APP_LOCAL_API+'/file'+row.filePath;
const link = document.createElement('a');
......@@ -496,7 +508,11 @@ export default {
edocApi.addFileByFolderId(formData).then((res) => {
this.$message.success("操作成功");
this.getfileByFolderId();
this.$refs.addhdpic.value = '';
this.fileType = ''
this.fileUploadModal = false;
});
this.modalBtnLoad = false;
},
......
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