江河联动

This commit is contained in:
庞东林
2022-01-10 09:56:26 +08:00
parent 4873ce3b96
commit fe1e0a71d4
17 changed files with 685 additions and 100 deletions

View File

@@ -1,11 +1,11 @@
<!-- 江河水查看数据页面-->
<template>
<div class="ele-body">
<a-card :bordered="false">
<!-- 搜索表单 -->
<a-form :model="where" :label-col="{ md: { span: 8 }, sm: { span: 24 } }"
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }">
<a-row>
<a-col :lg="6" :md="12" :sm="24" :xs="24">
<a-form-item label="断面名称">
<a-select allow-clear mode="multiple" placeholder="请选择断面名称" v-model:value="where.name">
<a-select-option v-for="item in sectionInfo" :key="item.stationName" :value="item.stationName">
@@ -13,17 +13,21 @@
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24" :xs="24">
<a-form-item label="时间:">
<a-month-picker valueFormat="YYYY-MM" v-model:value="where.time" :disabled-date="disabledDate" />
</a-form-item>
<a-form-item label="类型:" style="width:100px">
</a-col>
<a-col :lg="6" :md="12" :sm="24" :xs="24">
<a-form-item label="类型:">
<a-select v-model:value="where.type" allowClear showSearch>
<a-select-option value="0">上半月</a-select-option>
<a-select-option value="1">下半月</a-select-option>
<a-select-option value="2">整月</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24" :xs="24">
<a-form-item class="ele-text-right" :wrapper-col="{ span: 24 }">
<a-space>
@@ -41,7 +45,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
</ele-pro-table>
</a-spin>
</a-card>
</div>
<!-- 编辑弹窗 -->
</template>
@@ -63,6 +66,18 @@
export default {
name: "RiverCollectWater",
components: {},
props:{
// 表格搜索条件
searchForm:{
typeof:Object,
default: function () {
return {}
},
},
visiable:{
typeof:Boolean
}
},
data() {
return {
data: [],
@@ -292,7 +307,23 @@
rules: {},
};
},
watch: {
searchForm(newV) {
this.where = newV;
},
// 监听组件显示
visiable(val){
if(val && this.where.time){
this.reload()
}
}
},
created() {
// 回显并搜素
this.where = this.searchForm;
if(this.where.time){
this.reload()
}
listInfo().then((res) => {
if (res.data.code == 0) {
console.log(res.data.data)
@@ -306,6 +337,9 @@
methods: {
/* 刷新表格 */
reload() {
// 上传搜索条件给父级
this.$emit("search", this.where);
this.loading = true;
listWaterSiteMonthTotal(this.where).then((res) => {
this.datasource = {};
@@ -381,4 +415,7 @@
</script>
<style scoped lang="less">
.ant-calendar-picker{
width: 100%;
}
</style>