Bläddra i källkod

Merge branch 'featExcelCxl'

moccus 2 år sedan
förälder
incheckning
8b716f93af

+ 1 - 1
src/api/realtimeDatabaseConfiguration.js

@@ -44,7 +44,7 @@ const deleteManufacturer =(data)=>{
 // 设备类型
 const modelpower =(data)=>{
   return request({
-      url:`/modelpower/listByPage?name=${encodeURIComponent(data.name)}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+      url:`/modelpower/listByPage?modelid=${data.modelid}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
       method:"get"
   })
 }

+ 2 - 2
src/api/table.js

@@ -55,8 +55,8 @@ const newtreeTreels = (data) => {
 // 可研电量
 const projectstudy = (data) => {
   return request({
-    url: `/projectstudy/List?id=${data.id}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
-    method: 'get',
+      url:`/projectstudy/List?windpower=${data.windpower}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+      method:"get"
   })
 }
 const addProjectstudy = (pairs) => {

+ 65 - 18
src/views/stationConfiguration/admlist/index.vue

@@ -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,

+ 2 - 2
src/views/stationConfiguration/modelpower/index.vue

@@ -4,7 +4,7 @@
 			<div class="title">
 				<div class="left">
 					<div class="left-item">
-						<div style="width: 70px;">名称:</div>
+						<div style="width: 70px;">型号:</div>
 						<el-input v-model="fuzzyQuery_name" placeholder="请输入" clearable />
 					</div>
 					<el-button icon="el-icon-search" type="primary" native-type="submit" @click="fetchData">
@@ -120,7 +120,7 @@ export default {
 		},
 		fetchData() {
 			api.modelpower({
-				name: this.fuzzyQuery_name,
+				modelid: this.fuzzyQuery_name,
 				pageNum: this.queryForm.pageNo,
 				pageSize: this.queryForm.pageSize,
 			}).then(res => {

+ 17 - 6
src/views/stationConfiguration/projectstudy/index.vue

@@ -4,9 +4,10 @@
 			<vab-query-form-left-panel>
 				<el-form ref="form" :model="queryForm" :inline="true" @submit.native.prevent>
 					<el-form-item>
-						<el-cascader class="cascaders" v-model="cascaderSel" :options="options"
-							:props="{ checkStrictly: true, label: 'name', value: 'id' }" clearable>
-						</el-cascader>
+						<el-select v-model="queryForm.stationId" placeholder="请选择" clearable>
+							<el-option v-for="item in stationList" :key="item.id" :label="item.name" :value="item.id">
+							</el-option>
+						</el-select>
 					</el-form-item>
 					<el-form-item>
 						<el-button icon="el-icon-search" type="primary" native-type="submit" @click="handleQuery">
@@ -54,6 +55,7 @@
 
 <script>
 import api from '@/api/table'
+import stationApi from '@/api/station'
 import TableEdit from './components/TableEdit'
 export default {
 	name: 'ComprehensiveTable',
@@ -76,6 +78,7 @@ export default {
 			list: [],
 			cascaderSel: [],
 			imageList: [],
+			stationList: [],
 			listLoading: true,
 			layout: 'total, sizes, prev, pager, next, jumper',
 			total: 0,
@@ -83,6 +86,7 @@ export default {
 			selectRows: '',
 			elementLoadingText: '正在加载...',
 			queryForm: {
+				stationId: '',
 				pageNo: 1,
 				pageSize: 20,
 				title: '',
@@ -103,9 +107,16 @@ export default {
 	mounted() { },
 	methods: {
 		getStation() {
-			api.treels().then(res => {
+			stationApi.windpowerstationList({
+				id: '',
+				name: '',
+				companyid: '',
+				pageNum: 1,
+				pageSize: 10000,
+			}).then(res => {
 				if (res.data) {
-					this.options = res.data
+					this.queryForm.stationId = ''
+					this.stationList = res.data.records
 				}
 			})
 		},
@@ -171,7 +182,7 @@ export default {
 		async fetchData() {
 			this.listLoading = true
 			api.projectstudy({
-				id: this.cascaderSel.length? this.cascaderSel[this.cascaderSel.length-1]: '',
+				windpower: this.queryForm.stationId,
 				pageNum: this.queryForm.pageNo,
 				pageSize: this.queryForm.pageSize,
 			}).then(res => {