|
@@ -3,13 +3,30 @@
|
|
|
<vab-query-form>
|
|
|
<div class="title">
|
|
|
<div class="left">
|
|
|
- <!-- <div class="left-item">
|
|
|
- <div style="width: 70px;">名称:</div>
|
|
|
- <el-input v-model="fuzzyQuery_name" placeholder="请输入" clearable />
|
|
|
+ <div class="left-item">
|
|
|
+ <div>公司:</div>
|
|
|
+ <el-select v-model="companyId" placeholder="请选择" clearable @change="getRegionAndStation">
|
|
|
+ <el-option v-for="item in companyList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="left-item">
|
|
|
+ <div>区域:</div>
|
|
|
+ <el-select v-model="regionId" placeholder="请选择" clearable>
|
|
|
+ <el-option v-for="item in regionList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="left-item">
|
|
|
+ <div>场站:</div>
|
|
|
+ <el-select v-model="stationId" placeholder="请选择" clearable>
|
|
|
+ <el-option v-for="item in stationList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
<el-button icon="el-icon-search" type="primary" native-type="submit" @click="fetchData">
|
|
|
查询
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
<!-- <el-button icon="el-icon-plus" type="primary" @click="handleAdd">
|
|
@@ -79,8 +96,12 @@ export default {
|
|
|
pageNo: 1,
|
|
|
pageSize: 20,
|
|
|
},
|
|
|
+ companyId: '',
|
|
|
+ regionId: '',
|
|
|
+ stationId: '',
|
|
|
+ companyList: [],
|
|
|
+ regionList: [],
|
|
|
stationList: [],
|
|
|
- selectValue: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -89,13 +110,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
- // this.getStation()
|
|
|
- this.fetchData()
|
|
|
- },
|
|
|
- watch: {
|
|
|
- '$route'() {
|
|
|
- this.fetchData()
|
|
|
- }
|
|
|
+ this.getCompany()
|
|
|
},
|
|
|
methods: {
|
|
|
getMyExcelData(val) {
|
|
@@ -111,24 +126,56 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- getStation() {
|
|
|
+ getCompany() {
|
|
|
+ stationApi.companys({
|
|
|
+ id: '',
|
|
|
+ name: '',
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10000,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.companyId = ''
|
|
|
+ this.companyList = res.data.records
|
|
|
+ if(this.companyList.length){
|
|
|
+ this.companyId = this.companyList[0].id
|
|
|
+ this.getRegionAndStation(this.companyId)
|
|
|
+ }else{
|
|
|
+ this.getRegionAndStation('')
|
|
|
+ }
|
|
|
+ this.fetchData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getRegionAndStation(companyId) {
|
|
|
+ stationApi.regionList({
|
|
|
+ companyid: companyId ? companyId : '',
|
|
|
+ name: '',
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10000,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.regionId = ''
|
|
|
+ this.regionList = res.data.records
|
|
|
+ }
|
|
|
+ })
|
|
|
stationApi.windpowerstationList({
|
|
|
id: '',
|
|
|
name: '',
|
|
|
- companyid: '',
|
|
|
+ companyid: companyId ? companyId : '',
|
|
|
pageNum: 1,
|
|
|
- pageSize: 1000,
|
|
|
+ pageSize: 10000,
|
|
|
}).then(res => {
|
|
|
if (res.data) {
|
|
|
- this.listLoading = false
|
|
|
+ this.stationId = ''
|
|
|
this.stationList = res.data.records
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
fetchData() {
|
|
|
stationApi.getAdmList({
|
|
|
- companyid: this.$route.query.companyid || '',
|
|
|
- regionid: this.$route.query.regionid || '',
|
|
|
+ companyid: this.companyId,
|
|
|
+ regionid: this.regionId,
|
|
|
+ id: this.stationId,
|
|
|
// name: this.fuzzyQuery_name,
|
|
|
// pageNum: this.queryForm.pageNo,
|
|
|
// pageSize: this.queryForm.pageSize,
|