Browse Source

feat: 南方片交互

master
LeoAnn 2 weeks ago
parent
commit
5cab78e068
  1. 47
      src/api/basic/station.js
  2. 25
      src/api/day/dayZscs.js
  3. 124
      src/components/SelectStaion/index.vue
  4. 216
      src/views/basic/station/index.vue
  5. 36
      src/views/day/dayEvaporationWater/index.vue
  6. 36
      src/views/day/dayFlow/index.vue
  7. 144
      src/views/day/dayRain/index.vue
  8. 34
      src/views/day/daySedimentConcentration/index.vue
  9. 36
      src/views/day/dayWaterLever/index.vue
  10. 34
      src/views/day/dayWaterTemperature/index.vue
  11. 338
      src/views/day/dayZscs/index.vue
  12. 34
      src/views/excerpt/floodExcerpt/index.vue
  13. 36
      src/views/excerpt/followingTheTideExcerpt/index.vue
  14. 36
      src/views/excerpt/rainExcerpt/index.vue
  15. 34
      src/views/excerpt/rsverFloodExcerpt/index.vue
  16. 34
      src/views/excerpt/szFloodExcerpt/index.vue
  17. 729
      src/views/historyExport/ycSoft/index.vue
  18. 11
      src/views/historyExport/ycTask/index.vue
  19. 34
      src/views/month/evaporationWater/index.vue
  20. 34
      src/views/month/monthFlow/index.vue
  21. 35
      src/views/month/monthRain/index.vue
  22. 32
      src/views/month/monthTideLever/index.vue
  23. 34
      src/views/month/monthWaterTemperature/index.vue
  24. 34
      src/views/month/sedimentConcentration/index.vue
  25. 34
      src/views/month/sedimentTransportRate/index.vue
  26. 34
      src/views/month/waterLever/index.vue
  27. 2
      src/views/register.vue
  28. 43
      src/views/year/maxDayRain/index.vue
  29. 44
      src/views/year/maxFloodScale/index.vue
  30. 43
      src/views/year/maxHourRain/index.vue
  31. 43
      src/views/year/maxMinuteRain/index.vue
  32. 41
      src/views/year/sedimentConcentration/index.vue
  33. 44
      src/views/year/sedimentTransportRate/index.vue
  34. 46
      src/views/year/yearEvaporationWater/index.vue
  35. 43
      src/views/year/yearFlow/index.vue
  36. 43
      src/views/year/yearRain/index.vue
  37. 42
      src/views/year/yearTideLever/index.vue
  38. 34
      src/views/year/yearWaterLever/index.vue
  39. 43
      src/views/year/yearWaterTemperature/index.vue

47
src/api/basic/station.js

@ -11,18 +11,55 @@ export default { @@ -11,18 +11,55 @@ export default {
pageSize: searchModel.pageSize,
startTime: searchModel.startTime,
endTime: searchModel.endTime,
stcd:searchModel.stcd,
stnm:searchModel.stnm
stcds: searchModel.stcds,
}
})
},
importDateToSoft(from){
importDateToSoft() {
return request({
url: "/basic/importDateToSoft",
method: 'post',
})
},
getStnmAndStcdList(startTime, endTime, type) {
return request({
url: "/basic/getStationList",
method: 'get',
params: {
startTime: startTime,
endTime: endTime,
type: type
}
})
},
getStnmAndStcdByType(start, end, type) {
return request({
url: "/basic/getStationListByType",
method: 'get',
params: {
type: type,
startTime: start,
endTime: end,
}
})
},
importDateToSoftOrExportSoft(param) {
return request({
url: "/basic/importDateToSoftOrExportSoft",
method: 'post',
data:param
})
},
testSqlConnection(param) {
return request({
url: "/basic/testConnection",
method: 'get',
params: {
startTime: from.startTime,
endTime: from.endTime,
sqlseverIp: param.sqlseverIp,
userName: param.userName,
password: param.password,
dataBase: param.dataBase,
}
})
}

25
src/api/day/dayZscs.js

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
import request from '@/utils/request'
export default {
getZscsTableList(searchModel) {
return request({
url: "/day/getDayZscsList",
method: 'get',
params: {
pageNum: searchModel.pageNum,
pageSize: searchModel.pageSize,
startTime: searchModel.startTime,
endTime: searchModel.endTime,
stcd:searchModel.stcd,
stnm:searchModel.stnm
}
})
},
exportRainDataList(){
return request({
url: "/export/exportMonthRainList",
method: 'get',
responseType: 'blob'
})
},
}

124
src/components/SelectStaion/index.vue

@ -0,0 +1,124 @@ @@ -0,0 +1,124 @@
<template>
<el-cascader
:key="componentKey"
v-model="selectedValues"
:options="options"
:props="props"
@change="handleChange"
collapse-tags
filterable
clearable>
</el-cascader>
</template>
<script>
import stationApi from "@/api/basic/station";
export default {
name: "station",
props: {
startTime: { type: String, required: true, default: null },
endTime: { type: String, required: true, default: null },
type: {
type: String,
required: true,
default:null//
}
},
data() {
return {
props: {
multiple: true,
checkStrictly: true,//
value: 'value', //
label: 'label',
disabled: 'disabled'
},
componentKey: 0,
options: [],
stcds: '',
selectedValues: [], //
}
},
watch: {
//
startTime(newVal) {
this.checkAndFetchData(newVal, this.endTime);
},
endTime(newVal) {
this.checkAndFetchData(this.startTime, newVal);
}
},
methods: {
formatDateTime(date) {
if (!date) return '';
const d = new Date(date);
if (isNaN(d.getTime())) return '';
const year = d.getFullYear();
const month = String(d.getMonth() + 1).padStart(2, '0');
const day = String(d.getDate()).padStart(2, '0');
const hours = String(d.getHours()).padStart(2, '0'); //
const minutes = String(d.getMinutes()).padStart(2, '0'); //
const seconds = String(d.getSeconds()).padStart(2, '0'); //
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
//
checkAndFetchData(start, end) {
if (start && end) {
this.componentKey++;
this.options=[]
this.selectedValues=[]
if (this.type.includes("Day") || this.type.includes("Dp")){
//
this.getStaionList(this.formatDateTime(start), this.formatDateTime(end),this.type);
}else {
this.getStaionList(start, end,this.type);
}
}
},
async getStaionList(startTime, endTime, type) {
const res = await stationApi.getStnmAndStcdList(startTime, endTime, type);
//
const processTree = (nodes) => {
return nodes.map(node => {
const hasChildren = node.children && node.children.length > 0;
return {
...node,
disabled: hasChildren, //
children: hasChildren ? processTree(node.children) : null
};
});
};
this.options = processTree([res.data]); //
},
handleChange(selectedValues, selectedNodes) {
const value=this.selectedValues.map(path => path[path.length - 1])[0];
if (value==='all') {
this.selectedValues = ["1,all"];
}
const lastValue = selectedValues.map(path => path[path.length - 1]);
this.stcds = lastValue.join(",")
this.$emit('stcd-update', this.stcds); //
},
getStcds() {
this.$emit('childEvent', stcds);
}
},
mounted() {
if (this.startTime !=null || this.endTime !=null) {
this.getStaionList(this.startTime,this.endTime,this.type)
}else {
this.getStaionList(null,null,this.type)
}
}
}
</script>
<style scoped lang="scss">
</style>

216
src/views/basic/station/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,19 +15,35 @@ @@ -21,19 +15,35 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getMonthRainList">查询</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="exportDate">导出</el-button>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@click="importSoft"
>导入南方片
</el-button>
</el-form-item>
<!-- <el-form-item>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- @click="importSoft"-->
<!-- >导出南方片格式文件-->
<!-- </el-button>-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- @click="openSoft"-->
<!-- >导入南方片格式文件-->
<!-- </el-button>-->
<!-- </el-form-item>-->
</el-form>
<div class="main-content">
<div class="main-title">
@ -256,40 +266,32 @@ @@ -256,40 +266,32 @@
>
</el-pagination>
</div>
<!-- 用户导入对话框 -->
<!-- <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>-->
<!-- <el-upload-->
<!-- class="upload-demo"-->
<!-- drag-->
<!-- :action="uploadUrl"-->
<!-- :data="uploadData"-->
<!-- accept=".xls,.xlsx"-->
<!-- :http-request="handleUpload">-->
<!-- <i class="el-icon-upload"></i>-->
<!-- <div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>-->
<!-- <div class="el-upload__tip" slot="tip">只能上传Excel文件</div>-->
<!-- </el-upload>-->
<!-- </el-dialog>-->
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
class="upload-demo"
drag
ref="uploadRef"
:action="uploadUrl"
:data="uploadData"
:headers="uploadHeaders"
:before-upload="beforeUpload"
:on-success="handleSuccess"
:on-error="handleError"
accept=".zip"
:limit="1"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text"> ZIP 文件拖到此处<em>点击上传</em></div>
<div slot="tip" class="el-upload__tip">
支持单个 ZIP 文件最大 50MB
</div>
</el-upload>
</el-dialog>
<!-- 导入数据到南方片-->
<!-- 导入数据到南方片-->
<el-dialog :title="title" :visible.sync="softOpen" width="400px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="起年">
<el-date-picker
v-model="form.startTime"
type="year"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="截止年">
<el-date-picker
v-model="form.endTime"
type="year"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -302,23 +304,30 @@ @@ -302,23 +304,30 @@
<script>
import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import stationApi from "@/api/basic/station";
import SelectStaion from "@/components/SelectStaion/index.vue";
import {getToken} from "@/utils/auth";
export default {
name: "station",
components: {SelectStaion},
data() {
return {
props: {multiple: true},
options: [],
tableData: [],
uploadData: {},
uploadUrl: '/year/importHourMaxRainData',
uploadData: {
type:"stsc"
},
uploadUrl: '/manages-api/basic/uploadSoftFile',
uploadHeaders: {
Authorization: 'Bearer ' + getToken() // Bearer + Token
},
total: 0,
searchModel: {
startTime: '',
endTime: '',
stcd: '',
stnm: '',
stcds: '',
pageNum: 1,
pageSize: 15
},
@ -326,26 +335,61 @@ export default { @@ -326,26 +335,61 @@ export default {
title: '导入数据',
open: false
},
softOpen:false,
title:'',
form:{
startTime:'',
endTime:''
softOpen: false,
title: '',
form: {
startTime: '',
endTime: ''
},
//
rules: {
startTime: [
{ required: true, message: '开始时间不能为空', trigger: 'blur' }
{required: true, message: '开始时间不能为空', trigger: 'blur'}
],
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
{required: true, message: '结束时间不能为空', trigger: 'blur'}
]
}
},
isComponentReady: false,
type: "Stsc",
}
},
methods: {
beforeUpload(file) {
// 1.
const isZip = file.name.endsWith('.zip');
if (!isZip) {
this.$message.error('仅支持上传 ZIP 格式文件!');
return false; //
}
// 2. 50MB
const isSizeValid = file.size <= 50 * 1024 * 1024;
if (!isSizeValid) {
this.$message.error('文件大小不能超过 50MB!');
return false;
}
return true; //
},
handleSuccess(response) {
if (response.code === 0) { //
this.$message.success('文件上传成功!');
this.upload.open = false; //
this.$refs.uploadRef?.clearFiles();
//
this.$emit('upload-success');
} else {
this.$message.error(response.msg || '上传失败');
}
},
handleError(err) {
this.$message.error(`上传失败: ${err.message}`);
},
openSoft() {
this.upload.open = true
},
formatDateToYear(date) {
if (date == null){
if (date == null) {
return '';
}
const d = new Date(date);
@ -354,18 +398,17 @@ export default { @@ -354,18 +398,17 @@ export default {
}
const year = d.getFullYear();
return `${year}`;
} ,
},
async getMonthRainList() {
console.log("endYear->",this.searchModel.endTime)
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear = this.formatDateToYear(this.searchModel.startTime)
const endYear = this.formatDateToYear(this.searchModel.endTime)
const param = {
pageNum: this.searchModel.pageNum,
pageSize: this.searchModel.pageSize,
startTime: startYear,
endTime: endYear,
stcd: this.searchModel.stcd,
stnm: this.searchModel.stnm
stcds: this.searchModel.stcds,
}
const res = await stationApi.getStationList(param)
this.tableData = res.data;
@ -383,13 +426,13 @@ export default { @@ -383,13 +426,13 @@ export default {
this.searchModel.pageNum = pageNum
this.getMonthRainList()
},
importSoft(){
importSoft() {
this.reset();
this.softOpen = true;
this.title = "导入数据到南方片";
},
reset(){
this.form={
reset() {
this.form = {
startTime: '',
endTime: ''
}
@ -397,22 +440,12 @@ export default { @@ -397,22 +440,12 @@ export default {
},
/** 提交按钮 */
submitForm() {
const startYear= this.formatDateToYear(this.form.startTime)
const endYear= this.formatDateToYear(this.form.endTime)
const param={
startTime: startYear,
endTime: endYear,
}
this.$refs["form"].validate(valid => {
if (valid) {
stationApi.importDateToSoft(param).then(res => {
if (res.code === 0) {
this.$modal.msgSuccess(res.msg)
this.softOpen = false;
}
})
stationApi.importDateToSoft().then(res => {
if (res.code === 0) {
this.$modal.msgSuccess(res.msg)
this.softOpen = false;
}
});
})
},
cancel() {
this.softOpen = false;
@ -421,7 +454,7 @@ export default { @@ -421,7 +454,7 @@ export default {
async exportDate() {
const startYearAndMonth = this.formatDateToYear(this.searchModel.startTime)
const endYearAndMonth = this.formatDateToYear(this.searchModel.endTime)
const stcd = this.searchModel.stcd || ''; // undefined
const stcd = this.searchModel.stcds || ''; // undefined
const stnm = this.searchModel.stnm || ''; // undefined
const res = await this.$axiosPost('/report/station?startTime=' +
@ -437,10 +470,23 @@ export default { @@ -437,10 +470,23 @@ export default {
}
}
},
}
,
created() {
this.getMonthRainList()
}
,
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
}
,
}
</script>
<style scoped lang="scss">

36
src/views/day/dayEvaporationWater/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -45,7 +48,7 @@ @@ -45,7 +48,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -134,15 +137,17 @@ @@ -134,15 +137,17 @@
<script>
import dayEvaporationWaterApi from "@/api/day/dayEvaporationWater";
import stationApi from "@/api/basic/station";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
total: 0,
searchModel: {
startTime: '1950-01-01 00:00:00',
endTime: '1955-01-01 00:00:00',
endTime: '1951-01-01 00:00:00',
stcd: '',
stnm: '',
pageNum: 1,
@ -167,12 +172,24 @@ export default { @@ -167,12 +172,24 @@ export default {
endTime: [
{required: true, message: '结束时间不能为空', trigger: 'blur'}
]
}
},
isComponentReady: false,
type:"DayDwe",
}
},
created(){
this.getList();
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -186,6 +203,7 @@ export default { @@ -186,6 +203,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear = this.$common.formatDate(this.searchModel.startTime)
const endYear = this.$common.formatDate(this.searchModel.endTime)

36
src/views/day/dayFlow/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -45,7 +48,7 @@ @@ -45,7 +48,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -131,15 +134,17 @@ import {getToken} from '@/utils/auth' @@ -131,15 +134,17 @@ import {getToken} from '@/utils/auth'
import request from '@/utils/request';
import dayFlowApi from "@/api/day/dayFlow";
import stationApi from "@/api/basic/station";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
total: 0,
searchModel: {
startTime: '1950-01-01 00:00:00',
endTime: '1955-01-01 00:00:00',
endTime: '1951-01-01 00:00:00',
stcd: '',
stnm: '',
pageNum: 1,
@ -164,12 +169,24 @@ export default { @@ -164,12 +169,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"DayQ",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -183,6 +200,7 @@ export default { @@ -183,6 +200,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)

144
src/views/day/dayRain/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -31,7 +34,14 @@ @@ -31,7 +34,14 @@
<el-button
type="primary"
@click="importSoft"
>导入南方片
>导出南方片格式文件
</el-button>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@click="openSoft"
>导入南方片格式文件
</el-button>
</el-form-item>
</el-form>
@ -45,7 +55,7 @@ @@ -45,7 +55,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -120,6 +130,28 @@ @@ -120,6 +130,28 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
class="upload-demo"
drag
ref="uploadRef"
:action="uploadUrl"
:data="uploadData"
:headers="uploadHeaders"
:before-upload="beforeUpload"
:on-success="handleSuccess"
:on-error="handleError"
accept=".zip"
:limit="1"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text"> ZIP 文件拖到此处<em>点击上传</em></div>
<div slot="tip" class="el-upload__tip">
支持单个 ZIP 文件最大 50MB
</div>
</el-upload>
</el-dialog>
</div>
</template>
@ -129,15 +161,18 @@ import {getToken} from '@/utils/auth' @@ -129,15 +161,18 @@ import {getToken} from '@/utils/auth'
import request from '@/utils/request';
import dayRainApi from "@/api/day/dayRain";
import monthRainApi from "@/api/month/monthRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
uploadData: {},
total: 0,
searchModel: {
startTime: '1950-01-01 00:00:00',
endTime: '1955-01-01 00:00:00',
endTime: '1951-01-01 00:00:00',
stcd: '',
stnm: '',
pageNum: 1,
@ -147,43 +182,92 @@ export default { @@ -147,43 +182,92 @@ export default {
title: '导入数据',
open: false
},
softOpen:false,
title:'',
form:{
startTime:'',
endTime:''
uploadUrl: '/manages-api/basic/uploadSoftFile',
uploadHeaders: {
Authorization: 'Bearer ' + getToken() // Bearer + Token
},
softOpen: false,
title: '',
form: {
startTime: '',
endTime: ''
},
//
rules: {
startTime: [
{ required: true, message: '开始时间不能为空', trigger: 'blur' }
{required: true, message: '开始时间不能为空', trigger: 'blur'}
],
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
{required: true, message: '结束时间不能为空', trigger: 'blur'}
]
}
},
isComponentReady: false,
type: "DayRain",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
beforeUpload(file) {
// 1.
const isZip = file.name.endsWith('.zip');
if (!isZip) {
this.$message.error('仅支持上传 ZIP 格式文件!');
return false; //
}
// 2. 50MB
const isSizeValid = file.size <= 50 * 1024 * 1024;
if (!isSizeValid) {
this.$message.error('文件大小不能超过 50MB!');
return false;
}
return true; //
},
handleSuccess(response) {
if (response.code === 0) { //
this.$message.success('文件上传成功!');
this.upload.open = false; //
this.$refs.uploadRef?.clearFiles();
//
this.$emit('upload-success');
} else {
this.$message.error(response.msg || '上传失败');
}
},
handleError(err) {
this.$message.error(`上传失败: ${err.message}`);
},
openSoft() {
this.upload.open = true
},
formatDate(date) {
if (date == null){
if (date == null) {
return '';
}
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}else {
} else {
return date
}
},
async getList() {
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear = this.$common.formatDate(this.searchModel.startTime)
const endYear = this.$common.formatDate(this.searchModel.endTime)
const param = {
pageNum: this.searchModel.pageNum,
pageSize: this.searchModel.pageSize,
@ -205,8 +289,8 @@ export default { @@ -205,8 +289,8 @@ export default {
this.getList()
},
async exportDate() {
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)
const startYear = this.$common.formatDate(this.searchModel.startTime)
const endYear = this.$common.formatDate(this.searchModel.endTime)
const stcd = this.searchModel.stcd || ''; // undefined
const stnm = this.searchModel.stnm || '';
const res = await this.$axiosPost('/report/dayRain?startTime=' +
@ -220,13 +304,13 @@ export default { @@ -220,13 +304,13 @@ export default {
// startYear+'&endTime='+endYear+
// '&stcd='+this.searchModel.stcd+'&stnm='+this.searchModel.stnm, {}, '.xls')
},
importSoft(){
importSoft() {
this.reset();
this.softOpen = true;
this.title = "导入数据到南方片";
},
reset(){
this.form={
reset() {
this.form = {
startTime: '',
endTime: ''
}
@ -234,9 +318,9 @@ export default { @@ -234,9 +318,9 @@ export default {
},
/** 提交按钮 */
submitForm() {
const startYear= this.$common.formatDate(this.form.startTime)
const endYear= this.$common.formatDate(this.form.endTime)
const param={
const startYear = this.$common.formatDate(this.form.startTime)
const endYear = this.$common.formatDate(this.form.endTime)
const param = {
startTime: this.formatDate(startYear),
endTime: this.formatDate(endYear),
}

34
src/views/day/daySedimentConcentration/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -45,7 +48,7 @@ @@ -45,7 +48,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -130,8 +133,10 @@ import {getToken} from '@/utils/auth' @@ -130,8 +133,10 @@ import {getToken} from '@/utils/auth'
import request from '@/utils/request';
import daySedimentConcentrationApi from "@/api/day/daySedimentConcentration";
import dayRainApi from "@/api/day/dayRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -163,12 +168,24 @@ export default { @@ -163,12 +168,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"DayDcs",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -182,6 +199,7 @@ export default { @@ -182,6 +199,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)

36
src/views/day/dayWaterLever/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -45,7 +48,7 @@ @@ -45,7 +48,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -128,15 +131,17 @@ @@ -128,15 +131,17 @@
<script>
import dayWaterLeverApi from "@/api/day/dayWaterLever";
import dayRainApi from "@/api/day/dayRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
total: 0,
searchModel: {
startTime: '1950-01-01 00:00:00',
endTime: '1955-01-01 00:00:00',
endTime: '1951-01-01 00:00:00',
stcd: '',
stnm: '',
pageNum: 1,
@ -161,12 +166,24 @@ export default { @@ -161,12 +166,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"DayDz",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -180,6 +197,7 @@ export default { @@ -180,6 +197,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)

34
src/views/day/dayWaterTemperature/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -45,7 +48,7 @@ @@ -45,7 +48,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -128,8 +131,10 @@ @@ -128,8 +131,10 @@
<script>
import dayWaterTemperatureApi from "@/api/day/dayWaterTemperature";
import dayEvaporationWaterApi from "@/api/day/dayEvaporationWater";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -162,12 +167,24 @@ export default { @@ -162,12 +167,24 @@ export default {
endTime: [
{required: true, message: '结束时间不能为空', trigger: 'blur'}
]
}
},
isComponentReady: false,
type:"DayDwt",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -181,6 +198,7 @@ export default { @@ -181,6 +198,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)
const param = {

338
src/views/day/dayZscs/index.vue

@ -0,0 +1,338 @@ @@ -0,0 +1,338 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
type="datetime"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="截止日期">
<el-date-picker
v-model="searchModel.endTime"
type="datetime"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="exportDate">导出</el-button>
</el-form-item>
<!-- <el-form-item>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- @click="importSoft"-->
<!-- >导入南方片-->
<!-- </el-button>-->
<!-- </el-form-item>-->
</el-form>
<div class="main-content">
<div class="main-title">
<div class="table-title">逐时潮水位表</div>
<div class="table-header">
<div class="table-time" style="float: right">单位:水位: m)</div>
</div>
</div>
<el-table
:data="tableData"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column
align="center"
prop="stcd"
label="站码"
>
</el-table-column>
<el-table-column
align="center"
prop="stnm"
label="站名"
>
</el-table-column>
<el-table-column
align="center"
prop="tm"
label="日期">
</el-table-column>
<el-table-column
align="center"
prop="tdr"
label="潮时">
</el-table-column>
<el-table-column
align="center"
prop="tdz"
label="潮水位">
</el-table-column>
<el-table-column
align="center"
prop="tdzrcd"
label="潮水位注解码">
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchModel.pageNum"
:page-sizes="[15, 30, 50,100]"
:page-size="searchModel.pageSize"
layout="total, sizes, prev, pager, next, jumper"
style="padding: 30px 0; text-align: center;"
:total="total"
>
</el-pagination>
</div>
<el-dialog :title="title" :visible.sync="softOpen" width="400px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="起年">
<el-date-picker
v-model="form.startTime"
type="datetime"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="截止年">
<el-date-picker
v-model="form.endTime"
type="datetime"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import dayZscsApi from "@/api/day/dayZscs";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
total: 0,
searchModel: {
startTime: '2014-01-01 00:00:00',
endTime: '2015-01-01 00:00:00',
stcd: '',
stnm: '',
pageNum: 1,
pageSize: 15
},
upload: {
title: '导入数据',
open: false
},
softOpen: false,
title: '',
form: {
startTime: '',
endTime: ''
},
//
rules: {
startTime: [
{required: true, message: '开始时间不能为空', trigger: 'blur'}
],
endTime: [
{required: true, message: '结束时间不能为空', trigger: 'blur'}
]
},
isComponentReady: false,
type:"DayZscs",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null) {
return '';
}
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
} else {
return date
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear = this.$common.formatDate(this.searchModel.startTime)
const endYear = this.$common.formatDate(this.searchModel.endTime)
const param = {
pageNum: this.searchModel.pageNum,
pageSize: this.searchModel.pageSize,
startTime: this.formatDate(startYear),
endTime: this.formatDate(endYear),
stcd: this.searchModel.stcd,
stnm: this.searchModel.stnm
}
const res = await dayZscsApi.getZscsTableList(param)
this.tableData = res.data;
this.total = res.count;
},
handleSizeChange(pageSize) {
this.searchModel.pageSize = pageSize
this.getList()
},
handleCurrentChange(pageNum) {
this.searchModel.pageNum = pageNum
this.getList()
},
async exportDate() {
const startYear = this.$common.formatDate(this.searchModel.startTime)
const endYear = this.$common.formatDate(this.searchModel.endTime)
const stcd = this.searchModel.stcd || ''; // undefined
const stnm = this.searchModel.stnm || '';
const res = await this.$axiosPost('/report/dayZscs?startTime=' +
this.formatDate(startYear) + '&endTime=' + this.formatDate(endYear) +
'&stcd=' + stcd + '&stnm=' + stnm);
if (res.code === 0) {
this.$modal.msgSuccess(res.msg)
}
//
// this.download('/report/dayRain?startTime='+
// startYear+'&endTime='+endYear+
// '&stcd='+this.searchModel.stcd+'&stnm='+this.searchModel.stnm, {}, '.xls')
},
importSoft() {
this.reset();
this.softOpen = true;
this.title = "导入数据到南方片";
},
reset() {
this.form = {
startTime: '',
endTime: ''
}
this.resetForm("form");
},
/** 提交按钮 */
submitForm() {
const startYear = this.$common.formatDate(this.form.startTime)
const endYear = this.$common.formatDate(this.form.endTime)
const param = {
startTime: this.formatDate(startYear),
endTime: this.formatDate(endYear),
}
this.$refs["form"].validate(valid => {
if (valid) {
dayRainApi.importDateToSoft(param).then(res => {
if (res.code === 0) {
this.$modal.msgSuccess(res.msg)
this.softOpen = false;
}
})
}
});
},
cancel() {
this.softOpen = false;
this.reset();
},
},
}
</script>
<style scoped lang="scss">
.app-container {
padding: 20px;
background: #F2F2F2;
height: calc(100vh - 100px);
.el-form {
background: #fff;
padding: 10px;
height: 6vh;
border-radius: 4px;
box-shadow: 0 0 10px 1px rgba(123, 123, 123, 0.4);
}
.main-content {
height: calc(100vh - 150px);
background: #fff;
margin-top: 20px;
padding: 5px;
border-radius: 4px;
box-shadow: 0 0 10px 1px rgba(123, 123, 123, 0.4);
.main-title {
height: 90px;
.table-title {
font-size: 25px;
font-weight: bold;
width: 100%;
height: 60px;
text-align: center;
}
.table-header {
width: 100%;
height: 30px;
line-height: 30px;
display: inline;
padding: 0 20px;
font-size: 14px;
.table-time {
display: inline;
float: left;
margin-left: 20px;
font-size: 14px;
color: #606266;
font-weight: 700;
}
}
}
}
:hover::-webkit-scrollbar {
width: 0; /* 鼠标 hover 时显示滚动条 */
}
}
</style>

34
src/views/excerpt/floodExcerpt/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -45,7 +48,7 @@ @@ -45,7 +48,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -140,8 +143,10 @@ @@ -140,8 +143,10 @@
<script>
import floodExcerptApi from "@/api/excerpt/floodExcerpt";
import dayRainApi from "@/api/day/dayRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -174,12 +179,24 @@ export default { @@ -174,12 +179,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"DpFdheex",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -193,6 +210,7 @@ export default { @@ -193,6 +210,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear = this.$common.formatDate(this.searchModel.startTime)
const endYear = this.$common.formatDate(this.searchModel.endTime)

36
src/views/excerpt/followingTheTideExcerpt/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -45,7 +48,7 @@ @@ -45,7 +48,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -154,15 +157,17 @@ @@ -154,15 +157,17 @@
<script>
import followingTheTideExcerptApi from "@/api/excerpt/followingTheTideExcerpt";
import dayRainApi from "@/api/day/dayRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
total: 0,
searchModel: {
startTime: '1950-01-01 00:00:00',
endTime: '1955-01-01 00:00:00',
endTime: '1951-01-01 00:00:00',
stcd: '',
stnm: '',
pageNum: 1,
@ -187,12 +192,24 @@ export default { @@ -187,12 +192,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"DpHltdz",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -206,6 +223,7 @@ export default { @@ -206,6 +223,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)

36
src/views/excerpt/rainExcerpt/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -70,7 +73,7 @@ @@ -70,7 +73,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -134,15 +137,17 @@ @@ -134,15 +137,17 @@
<script>
import rainExcerptApi from "@/api/excerpt/rainExcerpt";
import dayRainApi from "@/api/day/dayRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
total: 0,
searchModel: {
startTime: '1950-01-01 00:00:00',
endTime: '1955-01-01 00:00:00',
endTime: '1951-01-01 00:00:00',
stcd: '',
stnm: '',
pageNum: 1,
@ -167,12 +172,24 @@ export default { @@ -167,12 +172,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"DayPrex",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -186,6 +203,7 @@ export default { @@ -186,6 +203,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)

34
src/views/excerpt/rsverFloodExcerpt/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -155,8 +158,10 @@ @@ -155,8 +158,10 @@
<script>
import rsverFloodExcerptApi from "@/api/excerpt/rsverFloodExcerpt";
import dayRainApi from "@/api/day/dayRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -188,12 +193,24 @@ export default { @@ -188,12 +193,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"DpRvfhex",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -207,6 +224,7 @@ export default { @@ -207,6 +224,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)

34
src/views/excerpt/szFloodExcerpt/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起始日期">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDate(this.searchModel.startTime)"
:endTime="this.formatDate(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -45,7 +48,7 @@ @@ -45,7 +48,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -153,8 +156,10 @@ @@ -153,8 +156,10 @@
<script>
import szFloodExcerptApi from "@/api/excerpt/szFloodExcerpt";
import dayRainApi from "@/api/day/dayRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -186,12 +191,24 @@ export default { @@ -186,12 +191,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"DpWsfhex",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDate(date) {
if (date == null){
@ -205,6 +222,7 @@ export default { @@ -205,6 +222,7 @@ export default {
}
},
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.$common.formatDate(this.searchModel.startTime)
const endYear= this.$common.formatDate(this.searchModel.endTime)

729
src/views/historyExport/ycSoft/index.vue

@ -0,0 +1,729 @@ @@ -0,0 +1,729 @@
<template>
<div class="app-container">
<div class="el-header">
<el-form :inline="true" ref="mainForm"
:model="formData"
:rules="formRules"
class="demo-form-inline">
<!-- 服务器配置部分 -->
<el-form-item label="数据服务器IP:" prop="sqlseverIp">
<el-input v-model="formData.sqlseverIp"></el-input>
</el-form-item>
<el-form-item label="登录名" prop="userName">
<el-input v-model="formData.userName"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input v-model="formData.password" type="password"></el-input>
</el-form-item>
<el-form-item label="数据库名称:" prop="dataBase">
<el-input v-model="formData.dataBase"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="testConnection">测试连接</el-button>
</el-form-item>
</el-form>
</div>
<div class="el-left">
<div class="table-title">南方片数据交互</div>
<el-form>
<el-form-item style="margin-left: 15%" label="交互类型:" prop="softTypeValue">
<el-select style="margin-left: 5%" v-model="formData.softTypeValue" clearable placeholder="请选择交互类型">
<el-option
v-for="item in softType"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item style="margin-left: 15%" label="开始时间:" prop="startTime">
<el-date-picker
style="margin-left: 5%"
v-model="formData.startTime"
type="month"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-left: 15%" label="结束时间:" prop="endTime">
<el-date-picker
style="margin-left: 5%"
v-model="formData.endTime"
type="month"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="类型:" style="margin-left: 15%" prop="stationTypeValue">
<el-select style="margin-left: 12%" v-model="formData.stationTypeValue" clearable placeholder="请选择类型">
<el-option
v-for="item in stationType"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button style="float: right" type="primary" @click="submitForm">提交</el-button>
</el-form-item>
</el-form>
</div>
<div class="el-middle">
<div class="table-title">可选测站</div>
<div style="width: 60%; margin-bottom: 5px; margin-left: 22%">
<el-input placeholder="请输入站点名称" v-model="filterText" clearable />
</div>
<!-- 新增滚动容器 -->
<div style="margin-left: 20%" class="tree-scroll-container">
<el-tree
ref="tree"
:data="options"
:props="props"
node-key="value"
:filter-node-method="filterNode"
@check-change="handleCheckChange"
:highlight-current="true"
default-expand-all
show-checkbox
/>
</div>
</div>
<div class="el-main">
<el-table
:data="tableData"
ref="treeTable"
:row-class-name="getRowClassName"
row-key="id"
:tree-props="{children: 'children'}"
@select="handleSelect"
@select-all="handleSelectAll"
default-expand-all
border
>
<!-- 多选列 -->
<el-table-column
type="selection"
width="55"
:reserve-selection="true">
</el-table-column>
<!-- 树形内容列 -->
<el-table-column label="所有表项">
<template slot-scope="{ row }">
<span :style="{ paddingLeft: (row.level * 18) + 'px' }">
{{ row.label }}
</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import {treeselect} from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import stationApi from "@/api/basic/station";
import dayRainApi from "@/api/day/dayRain";
export default {
data() {
return {
formData: {
sqlseverIp: '',
userName: '',
password: '',
dataBase: '',
softTypeValue: '',
startTime: '',
endTime: '',
stationTypeValue: '',
selectedValues: []
},
//
formRules: {
sqlseverIp: [
{required: true, message: '请输入数据服务器IP', trigger: 'blur'}
],
userName: [
{required: true, message: '请输入登录名', trigger: 'blur'}
],
password: [
{required: true, message: '请输入密码', trigger: 'blur'}
],
dataBase: [
{required: true, message: '请输入数据库名称', trigger: 'blur'}
],
softTypeValue: [
{required: true, message: '请选择交互类型', trigger: 'change'}
],
startTime: [
{required: true, message: '请选择开始时间', trigger: 'change'}
],
endTime: [
{required: true, message: '请选择结束时间', trigger: 'change'}
],
stationTypeValue: [
{required: true, message: '请选择类型', trigger: 'change'}
],
selectedValues: [
{required: true, message: '请选择站点', trigger: 'change'}
]
},
isAllSelected: false,
tableData: [
{
id: 1,
label: '基本信息',
parentId: null,
level: 0,
checked: false,
indeterminate: false, //
children: [
{id: 11, parentId: 1, label: '测站信息一览表', level: 1, checked: false},
]
},
{
id: 2,
label: '雨量资料',
level: 0,
parentId: null,
checked: false,
indeterminate: false, //
children: [
{id: 21, parentId: 2, label: '逐日降水表', level: 1, checked: false},
{id: 22, parentId: 2, label: '各时段最大降水表(1)', level: 1, checked: false},
{id: 23, parentId: 2, label: '各时段最大降水表(2)', level: 1, checked: false},
{id: 24, parentId: 2, label: '降水量摘录表', level: 1, checked: false},
]
},
{
id: 3,
label: '水位资料',
level: 0,
parentId: null,
checked: false,
indeterminate: false, //
children: [
{id: 31, parentId: 3, label: '逐日平均水位表', level: 1, checked: false},
{id: 32, parentId: 3, label: '水闸洪水水文要素摘录表', level: 1, checked: false},
{id: 33, parentId: 4, label: '逐潮高低潮位表', level: 1, checked: false},
{id: 34, parentId: 4, label: '潮位月年统计表', level: 1, checked: false},
]
},
{
id: 5,
label: '流量资料',
level: 0,
parentId: null,
checked: false,
indeterminate: false, //
children: [
{id: 51, parentId: 5, label: '逐日平均流量表', level: 1, checked: false},
]
},
],
softType: [{
value: '0',
label: '导出数据到云服务数据库'
}, {
value: '1',
label: '导入数据到南方片数据库'
}],
softTypeValue: '',
stationType: [
{
value: 'P',
label: '雨量站'
},
{
value: 'H',
label: '水文站'
},
{
value: 'Q',
label: '水位站'
}
],
stationTypeValue: '',
props: {
multiple: true,
checkStrictly: true,//
value: 'value', //
label: 'label',
disabled: 'disabled'
},
componentKey: 0,
options: [],
stcds: '',
filterText:"",
selectedValues: [], //
//
loading: true,
//
showSearch: true,
//
total: 0,
//
title: "",
//
form: {},
//
rules: {},
dateYear: [],
deptOptions: undefined,
isHandlingCheckChange: false
};
},
created() {
},
watch: {
filterText(val) {
this.$refs['tree'].filter(val);
},
'formData.startTime': {
handler(newVal) {
this.checkAndFetchData(newVal, this.formData.endTime, this.formData.stationTypeValue);
},
immediate: true //
},
'formData.endTime'(newVal) {
this.checkAndFetchData(this.formData.startTime, newVal, this.formData.stationTypeValue);
},
'formData.stationTypeValue'(newVal) {
this.checkAndFetchData(this.formData.startTime, this.formData.endTime, newVal);
}
},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
handleCheckChange(data, checked, indeterminate) {
//
if (this.isHandlingCheckChange) return;
this.isHandlingCheckChange = true;
try {
//
const checkedKeys = this.$refs.tree.getCheckedKeys();
// 1"all"
if (data.value === 'all' && checked) {
// "all"
this.$refs.tree.setCheckedKeys(['all']);
this.stcds = 'all';
}
// 2all
else if (checked && data.value !== 'all') {
// "all"
if (checkedKeys.includes('all')) {
const newCheckedKeys = checkedKeys.filter(key => key !== 'all');
this.$refs.tree.setCheckedKeys(newCheckedKeys);
this.stcds = newCheckedKeys.join(",");
} else {
//
this.stcds = this.$refs.tree.getCheckedKeys(true).join(",");
}
}
// 3
else {
this.stcds = this.$refs.tree.getCheckedKeys(true).join(",");
}
} finally {
this.isHandlingCheckChange = false;
}
},
getRowClassName({row}) {
if (row.indeterminate) {
return 'indeterminate-row'; //
}
return '';
},
//
findParent(parentId) {
if (!parentId) return null;
// 广
const queue = [...this.tableData];
while (queue.length) {
const node = queue.shift();
if (node.id === parentId) return node;
if (node.children) queue.push(...node.children);
}
return null;
},
// 1.
handleSelect(selection, row) {
if (row.indeterminate && !selection.includes(row)) {
this.clearIndeterminateState(row); //
} else {
row.checked = selection.includes(row);
//
if (row.children) {
this.toggleChildren(row, row.checked);
}
}
//
this.updateParentStatus(row);
},
//
clearIndeterminateState(node) {
//
node.checked = false;
node.indeterminate = false;
this.$refs.treeTable.toggleRowSelection(node, false);
//
if (node.children) {
node.children.forEach(child => {
this.clearIndeterminateState(child);
});
}
},
// 2.
toggleChildren(node, isSelected) {
if (node.children) {
node.children.forEach(child => {
//
this.$refs.treeTable.toggleRowSelection(child, isSelected);
child.checked = isSelected;
//
if (child.children) this.toggleChildren(child, isSelected);
});
}
},
// 3.
// updateParentStatus
updateParentStatus(childNode) {
const parent = this.findParent(childNode.parentId);
if (!parent) return;
const checkedCount = parent.children.filter(c => c.checked).length;
const indeterminateCount = parent.children.filter(c => c.indeterminate).length; //
//
parent.checked = checkedCount === parent.children.length;
parent.indeterminate =
(checkedCount > 0 && checkedCount < parent.children.length) ||
indeterminateCount > 0; // [7](@ref)
// UI
this.$refs.treeTable.toggleRowSelection(parent, parent.checked);
this.$set(parent, 'indeterminate', parent.indeterminate);
//
if (parent.indeterminate && !parent.checked) {
//
parent.children.forEach(child => {
if (child.indeterminate) {
this.clearIndeterminateState(child);
}
});
}
},
// 4. /
handleSelectAll(selection) {
const isAllSelected = selection.length > 0;
//
const setAllSelection = (nodes, status) => {
nodes.forEach(node => {
//
node.checked = status;
node.indeterminate = false; //
this.$refs.treeTable.toggleRowSelection(node, status);
//
if (node.children && node.children.length) {
setAllSelection(node.children, status);
}
});
};
setAllSelection(this.tableData, isAllSelected);
//
if (!isAllSelected) {
this.$nextTick(() => {
this.$refs.treeTable.clearSelection(); // [1,3](@ref)
});
}
},
formatDateToYearMonth(date) {
if (date == null) {
return '';
}
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
const month = (d.getMonth() + 1).toString().padStart(2, '0');
return `${year}-${month}`;
},
//
checkAndFetchData(start, end, stationTypeValue) {
if (start && end && stationTypeValue) {
this.componentKey++;
this.options = []
this.formData.selectedValues = []
this.getStaionList(start, end, stationTypeValue);
}
},
async testConnection() {
const res = await stationApi.testSqlConnection(this.formData)
if (res.code === 0) {
this.$modal.msgSuccess(res.data)
} else {
this.$modal.msgError("链接失败")
}
},
async getStaionList(start, end, type) {
const res = await stationApi.getStnmAndStcdByType(this.formatDateToYearMonth(start),
this.formatDateToYearMonth(end), type);
//
const processTree = (nodes) => {
return nodes.map(node => {
const hasChildren = node.children && node.children.length > 0;
return {
...node,
disabled: hasChildren, //
children: hasChildren ? processTree(node.children) : null
};
});
};
this.options = processTree([res.data]); //
},
submitForm() {
this.$refs.mainForm.validate(valid => {
if (valid) {
//
this.executeSubmit(this.formData);
} else {
//
this.$message.error('请填写所有必填项');
return false;
}
});
// this.executeSubmit(this.formData);
},
getFilteredSelection() {
const allSelected = this.$refs.treeTable.selection; // [1](@ref)
const result = [];
//
allSelected.forEach(node => {
const isParent = node.children && node.children.length > 0;
// 1
if (isParent && allSelected.some(n => n.parentId === node.id)) {
return; //
}
// 2
result.push(node);
});
return result;
},
executeSubmit(formData) {
const filteredData = this.getFilteredSelection();
const ids = filteredData.length
? filteredData.map(item => item.id).join(',')
: '';
const params = {
sqlseverIp: this.formData.sqlseverIp,
userName: this.formData.userName,
password: this.formData.password,
dataBase: this.formData.dataBase,
startTime: this.formatDateToYearMonth(this.formData.startTime),
endTime: this.formatDateToYearMonth(this.formData.endTime),
softTypeValue: this.formData.softTypeValue,
stationTypeValue: this.formData.stationTypeValue,
stcds: this.stcds,
ids: ids
}
stationApi.importDateToSoftOrExportSoft(params).then(res => {
if (res.code === 0) {
this.$modal.msgSuccess(res.msg);
} else {
this.$modal.msgError(res.msg);
}
});
},
//
cancel() {
this.open = false;
this.softOpen = false;
this.reset();
},
//
reset() {
this.form = {
startTime: '',
endTime: ''
}
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
},
mounted() {
}
};
</script>
<style scoped lang="scss">
.app-container {
background: #F2F2F2;
.el-header {
border-radius: 4px;
background: #FFFFFF;
color: #333;
padding: 10px;
height: 55px;
box-shadow: 0 0 10px 1px rgba(123, 123, 123, 0.4);
}
//.el-header {
// border-radius: 4px;
// background: #FFFFFF;
// color: #333;
// padding: 10px;
// height: 100px;
// box-shadow: 0 0 10px 1px rgba(123, 123, 123, 0.4);
//}
.el-middle {
.table-title{
font-size: 25px;
font-weight: bold;
width: 100%;
height: 60px;
// line-height: 30px;
text-align: center;
}
border-radius: 4px;
color: #333;
overflow: hidden; /* 改为允许滚动条 */
background: #FFFFFF;
text-align: center;
height: calc(95vh - 120px);
padding: 5px !important;
float: left;
width: 30%;
margin-left: 20px;
margin-top: 20px;
padding-bottom: 15px !important;
box-shadow: 0 0 10px 1px rgba(123, 123, 123, 0.4);
/* 专用滚动容器样式 */
.tree-scroll-container {
height: calc(100% - 40px); /* 减去输入框高度 */
overflow: auto; /* 双向滚动 */
}
/* 修复横向滚动 */
.tree-scroll-container .el-tree {
min-width: 100%;
}
.el-table .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #409EFF;
border-color: #409EFF;
}
}
.el-left {
.table-title{
font-size: 25px;
font-weight: bold;
width: 100%;
height: 60px;
// line-height: 30px;
text-align: center;
}
border-radius: 4px;
color: #333;
background: #FFFFFF;
text-align: center;
height: calc(95vh - 120px);
padding: 5px !important;
float: left;
width: 25%;
margin-top: 20px;
padding-bottom: 15px !important;
box-shadow: 0 0 10px 1px rgba(123, 123, 123, 0.4);
.el-table .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #409EFF;
border-color: #409EFF;
}
}
.el-main {
border-radius: 4px;
color: #333;
background: #FFFFFF;
text-align: center;
height: calc(95vh - 120px);
padding: 5px !important;
float: right;
width: 43%;
margin-top: 20px;
padding-bottom: 15px !important;
box-shadow: 0 0 10px 1px rgba(123, 123, 123, 0.4);
.el-table .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background-color: #409EFF;
border-color: #409EFF;
}
}
}
</style>
<!-- 在组件中添加CSS样式 -->
<style>
/* 半选状态样式 */
.el-table .indeterminate-row .el-checkbox__inner {
background-color: #409EFF;
border-color: #409EFF;
}
.el-table .indeterminate-row .el-checkbox__inner::after {
content: "";
position: absolute;
display: block;
background-color: white;
height: 2px;
width: 55%;
top: 50%;
left: 20%;
transform: translateY(-50%);
}
</style>

11
src/views/historyExport/ycTask/index.vue

@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
<span v-if="scope.row.status == 0"><el-tag type="warning">执行中</el-tag></span>
<span v-if="scope.row.status == 1"><el-tag type="success">已完成</el-tag></span>
<span v-if="scope.row.status == 2"><el-tag type="success">导入完成</el-tag></span>
<span v-if="scope.row.status == 3"><el-tag type="success">导入完成</el-tag></span>
<span v-if="scope.row.status == 4"><el-tag type="error">任务失败</el-tag></span>
</template>
</el-table-column>
@ -42,6 +43,13 @@ @@ -42,6 +43,13 @@
@click="downZip(scope.row)"
v-if="scope.row.status == 1"
>下载</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-link"
@click="downSoftZip(scope.row)"
v-if="scope.row.status == 3"
>下载南方片文件</el-button>
<el-button
size="mini"
icon="el-icon-delete"
@ -171,6 +179,9 @@ export default { @@ -171,6 +179,9 @@ export default {
downZip(data){
this.download('/basic/downloadExcel/'+data.id, {},data.filename+`.xls`)
},
downSoftZip(){
this.download('/basic/downloadSoftFile', {},"sqlsever"+`.zip`)
},
/** 删除按钮操作 */
async handleDelete(row) {
const ids = row.id || this.ids;

34
src/views/month/evaporationWater/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年月">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYearMonth(this.searchModel.startTime)"
:endTime="this.formatDateToYearMonth(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getMonthRainList">查询</el-button>
<el-button type="primary" @click="exportDate">导出</el-button>
@ -44,7 +47,7 @@ @@ -44,7 +47,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -187,8 +190,10 @@ import {getToken} from '@/utils/auth' @@ -187,8 +190,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import evaporationWaterApi from "@/api/month/evaporationWater";
import monthRainApi from "@/api/month/monthRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -223,12 +228,24 @@ export default { @@ -223,12 +228,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"MthMtwe",
}
},
created() {
this.getMonthRainList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYearMonth(date) {
if (date == null){
@ -243,6 +260,7 @@ export default { @@ -243,6 +260,7 @@ export default {
return `${year}${month}`;
},
async getMonthRainList(){
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYearAndMonth= this.formatDateToYearMonth(this.searchModel.startTime)
const endYearAndMonth= this.formatDateToYearMonth(this.searchModel.endTime)
const param = {

34
src/views/month/monthFlow/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年月">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYearMonth(this.searchModel.startTime)"
:endTime="this.formatDateToYearMonth(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getMonthRainList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -190,9 +193,11 @@ import {getToken} from '@/utils/auth' @@ -190,9 +193,11 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import monthFlowApi from "@/api/month/monthFlow";
import monthRainApi from "@/api/month/monthRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
name: "monthFlow",
components: {SelectStaion},
data() {
return {
tableData: [],
@ -225,12 +230,24 @@ export default { @@ -225,12 +230,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"MthQ",
}
},
created() {
this.getMonthRainList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYearMonth(date) {
if (date == null){
@ -245,6 +262,7 @@ export default { @@ -245,6 +262,7 @@ export default {
return `${year}${month}`;
},
async getMonthRainList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYearAndMonth= this.formatDateToYearMonth(this.searchModel.startTime)
const endYearAndMonth= this.formatDateToYearMonth(this.searchModel.endTime)
const param = {

35
src/views/month/monthRain/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年月">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYearMonth(this.searchModel.startTime)"
:endTime="this.formatDateToYearMonth(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getMonthRainList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -165,8 +168,10 @@ @@ -165,8 +168,10 @@
<script>
import monthRainApi from "@/api/month/monthRain";
import yearRainApi from "@/api/year/yearRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
name: "hourMaxRain",
components: {SelectStaion},
data() {
return {
tableData: [],
@ -200,11 +205,24 @@ export default { @@ -200,11 +205,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"MthRain",
}
},
created() {
this.getMonthRainList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYearMonth(date) {
@ -220,6 +238,7 @@ export default { @@ -220,6 +238,7 @@ export default {
return `${year}${month}`;
},
async getMonthRainList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYearAndMonth= this.formatDateToYearMonth(this.searchModel.startTime)
const endYearAndMonth= this.formatDateToYearMonth(this.searchModel.endTime)
const param = {

32
src/views/month/monthTideLever/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年月">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYearMonth(this.searchModel.startTime)"
:endTime="this.formatDateToYearMonth(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getMonthRainList">查询</el-button>
</el-form-item>
@ -39,7 +42,7 @@ @@ -39,7 +42,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -419,9 +422,11 @@ @@ -419,9 +422,11 @@
import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import monthTideLeverApi from "@/api/month/monthTideLever";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
name: "monthFlow",
components: {SelectStaion},
data() {
return {
tableData: [],
@ -439,8 +444,20 @@ export default { @@ -439,8 +444,20 @@ export default {
title: '导入数据',
open: false
},
isComponentReady: false,
type:"MthMttdz",
}
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYearMonth(date) {
if (date == null){
@ -455,6 +472,7 @@ export default { @@ -455,6 +472,7 @@ export default {
return `${year}${month}`;
},
async getMonthRainList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYearAndMonth= this.formatDateToYearMonth(this.searchModel.startTime)
const endYearAndMonth= this.formatDateToYearMonth(this.searchModel.endTime)
const param = {

34
src/views/month/monthWaterTemperature/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年月">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYearMonth(this.searchModel.startTime)"
:endTime="this.formatDateToYearMonth(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getMonthRainList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -194,8 +197,10 @@ import {getToken} from '@/utils/auth' @@ -194,8 +197,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import monthWaterTemperatureApi from "@/api/month/monthWaterTemperature";
import monthRainApi from "@/api/month/monthRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -230,12 +235,24 @@ export default { @@ -230,12 +235,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"MthMtwt",
}
},
created() {
this.getMonthRainList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYearMonth(date) {
if (date == null){
@ -250,6 +267,7 @@ export default { @@ -250,6 +267,7 @@ export default {
return `${year}${month}`;
},
async getMonthRainList(){
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYearAndMonth= this.formatDateToYearMonth(this.searchModel.startTime)
const endYearAndMonth= this.formatDateToYearMonth(this.searchModel.endTime)
const param = {

34
src/views/month/sedimentConcentration/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年月">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYearMonth(this.searchModel.startTime)"
:endTime="this.formatDateToYearMonth(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getMonthRainList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -190,9 +193,11 @@ import {getToken} from '@/utils/auth' @@ -190,9 +193,11 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import sedimentConcentrationApi from "@/api/month/sedimentConcentration";
import monthRainApi from "@/api/month/monthRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
name: "hourMaxRain",
components: {SelectStaion},
data() {
return {
tableData: [],
@ -227,12 +232,24 @@ export default { @@ -227,12 +232,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"MthMtcs",
}
},
created() {
this.getMonthRainList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYearMonth(date) {
if (date == null){
@ -247,6 +264,7 @@ export default { @@ -247,6 +264,7 @@ export default {
return `${year}${month}`;
},
async getMonthRainList(){
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYearAndMonth= this.formatDateToYearMonth(this.searchModel.startTime)
const endYearAndMonth= this.formatDateToYearMonth(this.searchModel.endTime)
const param = {

34
src/views/month/sedimentTransportRate/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年月">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYearMonth(this.searchModel.startTime)"
:endTime="this.formatDateToYearMonth(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getMonthRainList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -182,9 +185,11 @@ import request from '@/utils/request'; @@ -182,9 +185,11 @@ import request from '@/utils/request';
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import sedimentTransportRateApi from "@/api/month/sedimentTransportRate";
import monthRainApi from "@/api/month/monthRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
name: "hourMaxRain",
components: {SelectStaion},
data() {
return {
tableData: [],
@ -219,12 +224,24 @@ export default { @@ -219,12 +224,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"MthMtqs",
}
},
created() {
this.getMonthRainList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYearMonth(date) {
if (date == null){
@ -239,6 +256,7 @@ export default { @@ -239,6 +256,7 @@ export default {
return `${year}${month}`;
},
async getMonthRainList(){
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYearAndMonth= this.formatDateToYearMonth(this.searchModel.startTime)
const endYearAndMonth= this.formatDateToYearMonth(this.searchModel.endTime)
const param = {

34
src/views/month/waterLever/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年月">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYearMonth(this.searchModel.startTime)"
:endTime="this.formatDateToYearMonth(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getWaterLeverListTableList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -188,9 +191,11 @@ import {getToken} from '@/utils/auth' @@ -188,9 +191,11 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import waterLeverApi from "@/api/month/waterLever";
import monthRainApi from "@/api/month/monthRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
name: "hourMaxRain",
components: {SelectStaion},
data() {
return {
tableData: [],
@ -222,12 +227,24 @@ export default { @@ -222,12 +227,24 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"MthMtz",
}
},
created() {
this.getWaterLeverListTableList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYearMonth(date) {
if (date == null){
@ -242,6 +259,7 @@ export default { @@ -242,6 +259,7 @@ export default {
return `${year}${month}`;
},
async getWaterLeverListTableList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYearAndMonth= this.formatDateToYearMonth(this.searchModel.startTime)
const endYearAndMonth= this.formatDateToYearMonth(this.searchModel.endTime)
const param = {

2
src/views/register.vue

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<template>
<div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">历史数据查询系统</h3>
<h3 class="title">水库智能洪水预报系统</h3>
<el-form-item prop="username">
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />

43
src/views/year/maxDayRain/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号">
@ -172,8 +175,10 @@ import {getToken} from '@/utils/auth' @@ -172,8 +175,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import maxDayRainApi from "@/api/year/maxDayRain.js";
import dayEvaporationWaterApi from "@/api/day/dayEvaporationWater";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -207,22 +212,32 @@ export default { @@ -207,22 +212,32 @@ export default {
endTime: [
{required: true, message: '结束时间不能为空', trigger: 'blur'}
]
}
},
isComponentReady: false,
type:"YearDmxp",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return null; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
},
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

44
src/views/year/maxFloodScale/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -172,8 +175,10 @@ import {getToken} from '@/utils/auth' @@ -172,8 +175,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import maxFloodScaleApi from "@/api/year/maxFloodScale";
import yearRainApi from "@/api/year/yearRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -206,23 +211,32 @@ export default { @@ -206,23 +211,32 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"YearImxfw",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
},
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

43
src/views/year/maxHourRain/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号">
@ -175,8 +178,10 @@ import {getToken} from '@/utils/auth' @@ -175,8 +178,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import maxHourRainApi from "@/api/year/maxHourRain";
import stationApi from "@/api/basic/station";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -208,22 +213,32 @@ export default { @@ -208,22 +213,32 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"YearHmxp",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
},
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear = this.formatDateToYear(this.searchModel.startTime)
const endYear = this.formatDateToYear(this.searchModel.endTime)
const param = {

43
src/views/year/maxMinuteRain/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -174,8 +177,10 @@ import {getToken} from '@/utils/auth' @@ -174,8 +177,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import maxMinuteRainApi from "@/api/year/maxMinuteRain";
import stationApi from "@/api/basic/station";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -207,22 +212,32 @@ export default { @@ -207,22 +212,32 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"YearMmxp",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
},
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

41
src/views/year/sedimentConcentration/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -204,8 +207,10 @@ import {getToken} from '@/utils/auth' @@ -204,8 +207,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import sedimentConcentrationApi from "@/api/year/sedimentConcentration";
import yearRainApi from "@/api/year/yearRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -238,22 +243,32 @@ export default { @@ -238,22 +243,32 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"YearYrcs",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

44
src/views/year/sedimentTransportRate/index.vue

@ -1,12 +1,7 @@ @@ -1,12 +1,7 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +16,15 @@ @@ -21,6 +16,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -47,7 +51,7 @@ @@ -47,7 +51,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -220,8 +224,10 @@ import {getToken} from '@/utils/auth' @@ -220,8 +224,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import sedimentTransportRateApi from "@/api/year/sedimentTransportRate";
import yearRainApi from "@/api/year/yearRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -254,22 +260,32 @@ export default { @@ -254,22 +260,32 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"YearYrqs",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
},
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

46
src/views/year/yearEvaporationWater/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -153,12 +156,14 @@ @@ -153,12 +156,14 @@
<el-table-column
align="center"
prop="idsdt"
width="180px"
label="终冰日期">
</el-table-column>
<el-table-column
align="center"
prop="icapd"
width="180px"
label="初冰日期">
</el-table-column>
@ -172,6 +177,7 @@ @@ -172,6 +177,7 @@
<el-table-column
align="center"
prop="nt"
width="300px"
label="备注">
</el-table-column>
</el-table>
@ -236,8 +242,10 @@ import {getToken} from '@/utils/auth' @@ -236,8 +242,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import yearEvaporationWaterApi from "@/api/year/yearEvaporationWater";
import yearRainApi from "@/api/year/yearRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -272,22 +280,32 @@ export default { @@ -272,22 +280,32 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"YearYrwe",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
},
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

43
src/views/year/yearFlow/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -230,9 +233,11 @@ import {getToken} from '@/utils/auth' @@ -230,9 +233,11 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import yearFlowApi from "@/api/year/yearFlow";
import yearRainApi from "@/api/year/yearRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
name: "hourMaxRain",
components: {SelectStaion},
data() {
return {
tableData: [],
@ -264,22 +269,32 @@ export default { @@ -264,22 +269,32 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"YearYrq",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
},
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

43
src/views/year/yearRain/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -184,15 +187,18 @@ @@ -184,15 +187,18 @@
<script>
import {getToken} from '@/utils/auth'
import request from '@/utils/request';
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import yearRainApi from "@/api/year/yearRain";
import stationApi from "@/api/basic/station";
import SelectStaion from "@/components/SelectStaion"
export default {
components:{
SelectStaion
},
data() {
return {
tableData: [],
isComponentReady: false,
uploadData: {},
uploadUrl: '/year/importHourMaxRainData',
total: 0,
@ -215,6 +221,7 @@ export default { @@ -215,6 +221,7 @@ export default {
startTime:'',
endTime:''
},
type:"YearRain",
//
rules: {
startTime: [
@ -229,6 +236,16 @@ export default { @@ -229,6 +236,16 @@ export default {
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
importSoft(){
this.reset();
@ -266,14 +283,12 @@ export default { @@ -266,14 +283,12 @@ export default {
this.reset();
},
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

42
src/views/year/yearTideLever/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -39,7 +42,7 @@ @@ -39,7 +42,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" width="70" align="center">
@ -142,8 +145,10 @@ import {getToken} from '@/utils/auth' @@ -142,8 +145,10 @@ import {getToken} from '@/utils/auth'
import request from '@/utils/request';
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import yearTideLeverApi from "@/api/year/yearTideLever";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -163,18 +168,28 @@ export default { @@ -163,18 +168,28 @@ export default {
title: '导入数据',
open: false
},
isComponentReady: false,
type:"YearYrtdz",
}
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {
@ -245,7 +260,8 @@ export default { @@ -245,7 +260,8 @@ export default {
},
created() {
this.getList()
}
},
}
</script>
<style scoped lang="scss">

34
src/views/year/yearWaterLever/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -46,7 +40,7 @@ @@ -46,7 +40,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -196,9 +190,11 @@ import {getToken} from '@/utils/auth' @@ -196,9 +190,11 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import yearWaterLeverApi from "@/api/year/yearWaterLever";
import yearRainApi from "@/api/year/yearRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
name: "hourMaxRain",
components: {SelectStaion},
data() {
return {
tableData: [],
@ -231,22 +227,32 @@ export default { @@ -231,22 +227,32 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"YearYrz",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
},
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

43
src/views/year/yearWaterTemperature/index.vue

@ -1,12 +1,6 @@ @@ -1,12 +1,6 @@
<template>
<div class="app-container">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="站码">
<el-input v-model="searchModel.stcd" placeholder="站码" clearable></el-input>
</el-form-item>
<el-form-item label="站名">
<el-input v-model="searchModel.stnm" placeholder="站名" clearable></el-input>
</el-form-item>
<el-form-item label="起年">
<el-date-picker
v-model="searchModel.startTime"
@ -21,6 +15,15 @@ @@ -21,6 +15,15 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="站点">
<SelectStaion
v-if="isComponentReady"
ref="selectStaionRef"
:startTime="this.formatDateToYear(this.searchModel.startTime)"
:endTime="this.formatDateToYear(this.searchModel.endTime)"
:type="this.type">
</SelectStaion>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList">查询</el-button>
</el-form-item>
@ -46,7 +49,7 @@ @@ -46,7 +49,7 @@
</div>
<el-table
:data="tableData"
height="730"
height="500"
border
style="width: 100%">
<el-table-column label="序号" align="center">
@ -193,8 +196,10 @@ import {getToken} from '@/utils/auth' @@ -193,8 +196,10 @@ import {getToken} from '@/utils/auth'
import hourMaxRainApi from '@/api/basic/hourMaxRain.js'
import yearWaterTemperatureApi from "@/api/year/yearWaterTemperature";
import yearRainApi from "@/api/year/yearRain";
import SelectStaion from "@/components/SelectStaion/index.vue";
export default {
components: {SelectStaion},
data() {
return {
tableData: [],
@ -227,22 +232,32 @@ export default { @@ -227,22 +232,32 @@ export default {
endTime: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
]
}
},
isComponentReady: false,
type:"YearYrwt",
}
},
created() {
this.getList()
},
mounted() {
this.$nextTick(() => {
this.isComponentReady = true;
});
this.$nextTick(() => {
if (this.$refs.selectStaionRef) {
this.searchModel.stcd = this.$refs.selectStaionRef.stcds;
}
});
},
methods: {
formatDateToYear(date) {
if (!date) return ''; //
const d = new Date(date);
if (isNaN(d.getTime())) {
return '';
}
const year = d.getFullYear();
return `${year}`;
},
return isNaN(d.getTime()) ? null : `${d.getFullYear()}`;
} ,
async getList() {
this.searchModel.stcd = this.$refs.selectStaionRef?.stcds || '';
const startYear= this.formatDateToYear(this.searchModel.startTime)
const endYear= this.formatDateToYear(this.searchModel.endTime)
const param = {

Loading…
Cancel
Save