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