Explorar el Código

fix:设备三个模块

chenxinlei hace 2 años
padre
commit
d17e71b34c

+ 24 - 6
src/api/realtimeDatabaseConfiguration.js

@@ -23,9 +23,18 @@ const deleteDatabase = (data) => {
 }
 
 // 设备厂商
+// DELETE
+// /pro-econ-manufacturer/{ids}
+// 设备厂商-删除
+// POST
+// /pro-econ-manufacturer/add
+// 设备厂商-新增or修改
+// GET
+// /pro-econ-manufacturer/list
+// 设备厂商-列表
 const manufacturer = (data) => {
   return request({
-    url: `/manufacturer/listByPage?name=${encodeURIComponent(
+    url: `/pro-econ-manufacturer/list?name=${encodeURIComponent(
       data.name
     )}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
     method: 'get',
@@ -33,35 +42,44 @@ const manufacturer = (data) => {
 }
 const addManufacturer = (pairs) => {
   return request({
-    url: `/manufacturer/save`,
+    url: `/pro-econ-manufacturer/add`,
     method: 'post',
     data: pairs,
   })
 }
 const deleteManufacturer = (data) => {
   return request({
-    url: `/manufacturer/remove-manufacturer?ids=${data.id}`,
+    url: `/pro-econ-manufacturer/ids=${data.id}`,
     method: 'delete',
   })
 }
 
 // 设备类型
+// DELETE
+// /pro-basic-model-power/{ids}
+// 设备类型对应功率表-删除
+// POST
+// /pro-basic-model-power/add
+// 设备类型对应功率表-新增or修改
+// GET
+// /pro-basic-model-power/list
+// 设备类型对应功率表-列表
 const modelpower = (data) => {
   return request({
-    url: `/modelpower/listByPage?modelid=${data.modelid}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+    url: `/pro-basic-model-power/list?modelId=${data.modelid}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
     method: 'get',
   })
 }
 const addModelpower = (pairs) => {
   return request({
-    url: `/modelpower/save`,
+    url: `/pro-basic-model-power/add`,
     method: 'post',
     data: pairs,
   })
 }
 const deleteModelpower = (data) => {
   return request({
-    url: `/modelpower/remove-modelpower/${data.id}`,
+    url: `/pro-basic-model-power/${data.id}`,
     method: 'delete',
   })
 }

+ 13 - 3
src/api/station.js

@@ -156,9 +156,19 @@ const newtreeTreels = (data) => {
     method: 'get',
   })
 }
+
+// DELETE
+// /pro-econ-equipmentmodel/{ids}
+// 设备型号-新增or修改
+// POST
+// /pro-econ-equipmentmodel/add
+// 设备型号-新增or修改
+// GET
+// /pro-econ-equipmentmodel/list
+// 设备型号-列表
 const equipmentmodel = (data) => {
   return request({
-    url: `/equipmentmodel/listByPage?name=${encodeURIComponent(
+    url: `/pro-econ-equipmentmodel/list?name=${encodeURIComponent(
       data.name
     )}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
     method: 'get',
@@ -166,14 +176,14 @@ const equipmentmodel = (data) => {
 }
 const addEquipmentmodel = (pairs) => {
   return request({
-    url: `/equipmentmodel/save`,
+    url: `/pro-econ-equipmentmodel/add`,
     method: 'post',
     data: pairs,
   })
 }
 const deleteEquipmentmodel = (data) => {
   return request({
-    url: `/equipmentmodel/remove-manufacturer?ids=${data.id}`,
+    url: `/pro-econ-equipmentmodel/ids=${data.id}`,
     method: 'delete',
   })
 }

+ 43 - 32
src/views/stationConfiguration/equipmentmodel/components/TableEdit.vue

@@ -5,8 +5,8 @@
         <el-form-item label="id" prop="id">
           <el-input class="inputs" v-model="form.id" autocomplete="off" :disabled="!idAdd ? true : false"></el-input>
         </el-form-item>
-        <el-form-item label="编码" prop="code">
-          <el-input class="inputs" v-model.trim="form.code" autocomplete="off"></el-input>
+        <el-form-item label="编码" prop="nemCode">
+          <el-input class="inputs" v-model.trim="form.nemCode" autocomplete="off"></el-input>
         </el-form-item>
       </div>
       <div class="lists">
@@ -18,11 +18,11 @@
         </el-form-item>
       </div>
       <div class="lists">
-        <el-form-item label="容量" prop="powerproduction">
-          <el-input class="inputs" v-model.trim="form.powerproduction" autocomplete="off"></el-input>
+        <el-form-item label="容量" prop="powerProduction">
+          <el-input class="inputs" v-model.trim="form.powerProduction" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="厂商编号" prop="windturbinemanufacturerid">
-          <el-input class="inputs" v-model.trim="form.windturbinemanufacturerid" autocomplete="off"></el-input>
+        <el-form-item label="厂商编号" prop="windturbineManufacturerId">
+          <el-input class="inputs" v-model.trim="form.windturbineManufacturerId" autocomplete="off"></el-input>
         </el-form-item>
       </div>
       <div class="lists">
@@ -35,26 +35,32 @@
         </el-form-item>
       </div>
       <div class="lists">
-        <el-form-item label="切入风速" prop="cutinwindspeed">
-          <el-input class="inputs" v-model="form.cutinwindspeed" autocomplete="off"></el-input>
+        <el-form-item label="切入风速" prop="cutinwindSpeed">
+          <el-input class="inputs" v-model="form.cutinwindSpeed" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item label="额定风速" prop="ratedwindspeed">
-          <el-input class="inputs" v-model.trim="form.ratedwindspeed" autocomplete="off"></el-input>
+        <el-form-item label="额定风速" prop="ratedwindSpeed">
+          <el-input class="inputs" v-model.trim="form.ratedwindSpeed" autocomplete="off"></el-input>
         </el-form-item>
       </div>
       <div class="lists">
-        <el-form-item label="切出风速" prop="cutoutwindspeed">
-          <el-input class="inputs" v-model="form.cutoutwindspeed" autocomplete="off">
+        <el-form-item label="切出风速" prop="cutoutwindSpeed">
+          <el-input class="inputs" v-model="form.cutoutwindSpeed" autocomplete="off">
           </el-input>
         </el-form-item>
-        <el-form-item label="叶片切入面积" prop="sweptarea">
-          <el-input class="inputs" v-model.trim="form.sweptarea" autocomplete="off"></el-input>
+        <el-form-item label="叶片切入面积" prop="sweptArea">
+          <el-input class="inputs" v-model.trim="form.sweptArea" autocomplete="off"></el-input>
         </el-form-item>
       </div>
       <div class="lists">
-        <el-form-item label="设备类别" prop="equipmentcategory">
-          <el-input class="inputs" v-model="form.equipmentcategory" autocomplete="off">
-          </el-input>
+        <el-form-item label="设备类别" prop="equipmentCategory">
+          <el-select v-model="form.equipmentCategory" placeholder="请选择" style="width:200px">
+            <el-option
+              v-for="item in equipmentCategoryOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id">
+            </el-option>
+          </el-select>
         </el-form-item>
       </div>
     </el-form>
@@ -82,35 +88,40 @@ export default {
   },
   data() {
     return {
+      equipmentCategoryOptions: [
+        {id: 0, name: "风机"},
+        {id: 1, name: "集中"},
+        {id: 2, name: "组串"},
+      ],
       form: {
         id: '',
-        code: '',
+        nemCode: '',
         name: '',
         description: '',
-        powerproduction: '',
-        windturbinemanufacturerid: '',
+        powerProduction: '',
+        windturbineManufacturerId: '',
         photo: '',
         unit: '',
-        cutinwindspeed: '',
-        ratedwindspeed: '',
-        cutoutwindspeed: '',
-        sweptarea: '',
-        equipmentcategory: '',
+        cutinwindSpeed: '',
+        ratedwindSpeed: '',
+        cutoutwindSpeed: '',
+        sweptArea: '',
+        equipmentCategory: '',
       },
       rules: {
         id: [{ required: true, trigger: 'blur', message: '请输入' }],
         code: [{ required: true, trigger: 'blur', message: '请输入' }],
         name: [{ required: true, trigger: 'blur', message: '请输入' }],
         description: [{ required: true, trigger: 'blur', message: '请输入' }],
-        powerproduction: [{ required: true, trigger: 'blur', message: '请输入' }],
-        windturbinemanufacturerid: [{ required: true, trigger: 'blur', message: '请输入' }],
+        powerProduction: [{ required: true, trigger: 'blur', message: '请输入' }],
+        windturbineManufacturerId: [{ required: true, trigger: 'blur', message: '请输入' }],
         photo: [{ required: true, trigger: 'blur', message: '请输入' }],
         unit: [{ required: true, trigger: 'blur', message: '请输入' }],
-        cutinwindspeed: [{ required: true, trigger: 'blur', message: '请输入' }],
-        ratedwindspeed: [{ required: true, trigger: 'blur', message: '请输入' }],
-        cutoutwindspeed: [{ required: true, trigger: 'blur', message: '请输入' }],
-        sweptarea: [{ required: true, trigger: 'blur', message: '请输入' }],
-        equipmentcategory: [{ required: true, trigger: 'blur', message: '请输入' }],
+        cutinwindSpeed: [{ required: true, trigger: 'blur', message: '请输入' }],
+        ratedwindSpeed: [{ required: true, trigger: 'blur', message: '请输入' }],
+        cutoutwindSpeed: [{ required: true, trigger: 'blur', message: '请输入' }],
+        sweptArea: [{ required: true, trigger: 'blur', message: '请输入' }],
+        equipmentCategory: [{ required: true, trigger: 'blur', message: '请输入' }],
       },
       title: '',
       dialogFormVisible: false,

+ 41 - 29
src/views/stationConfiguration/equipmentmodel/index.vue

@@ -27,25 +27,25 @@
 				:element-loading-text="elementLoadingText" :height="height" @selection-change="setSelectRows">
 				<el-table-column show-overflow-tooltip type="selection" align="center" width="40"></el-table-column>
 				<el-table-column show-overflow-tooltip label="id" prop="id" align="center" sortable></el-table-column>
-				<el-table-column show-overflow-tooltip label="编码" prop="code" align="center" sortable></el-table-column>
+				<el-table-column show-overflow-tooltip label="编码" prop="nemCode" align="center" sortable></el-table-column>
 				<el-table-column show-overflow-tooltip label="名称" prop="name" align="center" sortable></el-table-column>
 				<el-table-column show-overflow-tooltip label="描述" prop="description" align="center" sortable></el-table-column>
-				<el-table-column show-overflow-tooltip label="容量" prop="powerproduction" align="center" sortable>
+				<el-table-column show-overflow-tooltip label="容量" prop="powerProduction" align="center" sortable>
 				</el-table-column>
-				<el-table-column show-overflow-tooltip label="厂商编号" prop="windturbinemanufacturerid" align="center" sortable>
+				<el-table-column show-overflow-tooltip label="厂商编号" prop="windturbineManufacturerId" align="center" sortable>
 				</el-table-column>
 				<el-table-column show-overflow-tooltip label="图片" prop="photo" align="center" sortable>
 				</el-table-column>
 				<el-table-column width="180" show-overflow-tooltip label="传输总发电量单位" prop="unit" align="center" sortable></el-table-column>
-				<el-table-column show-overflow-tooltip label="切入风速" prop="cutinwindspeed" align="center" sortable>
+				<el-table-column show-overflow-tooltip label="切入风速" prop="cutinwindSpeed" align="center" sortable>
 				</el-table-column>
-				<el-table-column show-overflow-tooltip label="额定风速" prop="ratedwindspeed" align="center" sortable>
+				<el-table-column show-overflow-tooltip label="额定风速" prop="ratedwindSpeed" align="center" sortable>
 				</el-table-column>
-				<el-table-column show-overflow-tooltip label="切出风速" prop="cutoutwindspeed" align="center" sortable>
+				<el-table-column show-overflow-tooltip label="切出风速" prop="cutoutwindSpeed" align="center" sortable>
 				</el-table-column>
-				<el-table-column width="150" show-overflow-tooltip label="叶片切入面积" prop="sweptarea" align="center" sortable>
+				<el-table-column width="150" show-overflow-tooltip label="叶片切入面积" prop="sweptArea" align="center" sortable>
 				</el-table-column>
-				<el-table-column show-overflow-tooltip label="设备类别" prop="equipmentcategory" align="center" sortable>
+				<el-table-column show-overflow-tooltip label="设备类别" prop="equipmentCategory" :formatter="equipmentCategoryFormatter" align="center" sortable>
 				</el-table-column>
 				<el-table-column show-overflow-tooltip label="操作" width="100px" fixed="right">
 					<template #default="{ row }">
@@ -74,6 +74,12 @@ export default {
 	},
 	data() {
 		return {
+      // 0:风机;1:集中;2:组串
+      equipmentCategoryOptions: [
+        {id: 0, name: "风机"},
+        {id: 1, name: "集中"},
+        {id: 2, name: "组串"},
+      ],
 			fuzzyQuery_name: '',
 			listLoading: true,
 			list: [],
@@ -104,6 +110,12 @@ export default {
 		this.fetchData()
 	},
 	methods: {
+    equipmentCategoryFormatter(row, column, cellValue, index){
+      let val = this.equipmentCategoryOptions.filter(item=>{
+        return item.id === row.equipmentCategory
+      });
+      return val[0].name
+    },
 		handleQuery() {
 			this.queryForm.pageNo = 1
 			this.fetchData()
@@ -147,19 +159,19 @@ export default {
 					this.list = res.data.records
 					this.templateExcel = [
 						{
-							id: '',
-							code: '',
-							name: '',
-							description: '',
-							powerproduction: '',
-							windturbinemanufacturerid: '',
-							photo: '',
-							unit: '',
-							cutinwindspeed: '',
-							ratedwindspeed: '',
-							cutoutwindspeed: '',
-							sweptarea: '',
-							equipmentcategory: '',
+							id: "",
+              nemCode: "",
+              name: "",
+              description: "",
+              powerProduction: "",
+              windturbineManufacturerId: "",
+              photo: "",
+              unit: "",
+              cutinwindSpeed: "",
+              ratedwindSpeed: "",
+              cutoutwindSpeed: "",
+              sweptArea: "",
+              equipmentCategory: "",
 						}
 					]
 					// 导出
@@ -167,18 +179,18 @@ export default {
 					res.data.records.forEach(item => {
 						exportExcel.push({
 							id: item.id,
-							code: item.code,
+							nemCode: item.nemCode,
 							name: item.name,
 							description: item.description,
-							powerproduction: item.powerproduction,
-							windturbinemanufacturerid: item.windturbinemanufacturerid,
+							powerProduction: item.powerProduction,
+							windturbineManufacturerId: item.windturbineManufacturerId,
 							photo: item.photo,
 							unit: item.unit,
-							cutinwindspeed: item.cutinwindspeed,
-							ratedwindspeed: item.ratedwindspeed,
-							cutoutwindspeed: item.cutoutwindspeed,
-							sweptarea: item.sweptarea,
-							equipmentcategory: item.equipmentcategory,
+							cutinwindSpeed: item.cutinwindSpeed,
+							ratedwindSpeed: item.ratedwindSpeed,
+							cutoutwindSpeed: item.cutoutwindSpeed,
+							sweptArea: item.sweptArea,
+							equipmentCategory: item.equipmentCategory,
 						})
 					})
 					this.exportExcel = exportExcel

+ 5 - 1
src/views/stationConfiguration/manufacturer/index.vue

@@ -7,7 +7,7 @@
 						<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">
+					<el-button icon="el-icon-search" type="primary" native-type="submit" @click="searchFetchData">
 						查询
 					</el-button>
 				</div>
@@ -118,6 +118,10 @@ export default {
 				}
 			})
 		},
+    searchFetchData(){
+      this.queryForm.pageNo = 1
+      this.fetchData()
+    },
 		fetchData() {
 			api.manufacturer({
 				name: this.fuzzyQuery_name,

+ 12 - 12
src/views/stationConfiguration/modelpower/components/TableEdit.vue

@@ -5,21 +5,21 @@
 				<el-form-item label="id" prop="id">
 					<el-input class="inputs" v-model="form.id" autocomplete="off" :disabled="!idAdd?true:false"></el-input>
 				</el-form-item>
-				<el-form-item label="型号编号" prop="modelid">
-					<el-input class="inputs" v-model.trim="form.modelid" autocomplete="off"></el-input>
+				<el-form-item label="型号编号" prop="modelId">
+					<el-input class="inputs" v-model.trim="form.modelId" autocomplete="off"></el-input>
 				</el-form-item>
 			</div>
 			<div class="lists">
 				<el-form-item label="风速/光照度" prop="speed">
 					<el-input class="inputs" v-model="form.speed" autocomplete="off"></el-input>
 				</el-form-item>
-				<el-form-item label="稳态功率相当于理论" prop="theorypower">
-					<el-input class="inputs" v-model="form.theorypower" autocomplete="off"></el-input>
+				<el-form-item label="稳态功率相当于理论" prop="theoryPower">
+					<el-input class="inputs" v-model="form.theoryPower" autocomplete="off"></el-input>
 				</el-form-item>
 			</div>
 			<div class="lists">
-				<el-form-item label="动态功率保证功率" prop="ensurepower">
-					<el-input class="inputs" v-model="form.ensurepower" autocomplete="off"></el-input>
+				<el-form-item label="动态功率保证功率" prop="ensurePower">
+					<el-input class="inputs" v-model="form.ensurePower" autocomplete="off"></el-input>
 				</el-form-item>
 			</div>
 		</el-form>
@@ -49,18 +49,18 @@ export default {
 		return {
 			form: {
 				id: '',
-				modelid: '',
+				modelId: '',
 				speed: '',
-				theorypower: '',
-				ensurepower: ''
+				theoryPower: '',
+				ensurePower: ''
 
 			},
 			rules: {
 				id: [{ required: true, trigger: 'blur', message: '请输入' }],
-				modelid: [{ required: true, trigger: 'blur', message: '请输入' }],
+				modelId: [{ required: true, trigger: 'blur', message: '请输入' }],
 				speed: [{ required: true, trigger: 'blur', message: '请输入' }],
-				theorypower: [{ required: true, trigger: 'blur', message: '请输入' }],
-				ensurepower: [{ required: true, trigger: 'blur', message: '请输入' }]
+				theoryPower: [{ required: true, trigger: 'blur', message: '请输入' }],
+				ensurePower: [{ required: true, trigger: 'blur', message: '请输入' }]
 			},
 			title: '',
 			dialogFormVisible: false,

+ 14 - 10
src/views/stationConfiguration/modelpower/index.vue

@@ -7,7 +7,7 @@
 						<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">
+					<el-button icon="el-icon-search" type="primary" native-type="submit" @click="searchFetchData">
 						查询
 					</el-button>
 				</div>
@@ -27,11 +27,11 @@
 				:element-loading-text="elementLoadingText" :height="height" @selection-change="setSelectRows">
 				<el-table-column show-overflow-tooltip type="selection" align="center" width="40"></el-table-column>
 				<el-table-column show-overflow-tooltip label="id" prop="id" align="center" sortable></el-table-column>
-				<el-table-column show-overflow-tooltip label="型号编号" prop="modelid" align="center" sortable></el-table-column>
+				<el-table-column show-overflow-tooltip label="型号编号" prop="modelId" align="center" sortable></el-table-column>
 				<el-table-column show-overflow-tooltip label="风速/光照度" prop="speed" align="center" sortable></el-table-column>
-				<el-table-column show-overflow-tooltip label="稳态功率相当于理论" prop="theorypower" align="center" sortable>
+				<el-table-column show-overflow-tooltip label="稳态功率相当于理论" prop="theoryPower" align="center" sortable>
 				</el-table-column>
-				<el-table-column show-overflow-tooltip label="动态功率保证功率" prop="ensurepower" align="center" sortable>
+				<el-table-column show-overflow-tooltip label="动态功率保证功率" prop="ensurePower" align="center" sortable>
 				</el-table-column>
 				<el-table-column show-overflow-tooltip label="操作" width="100px" fixed="right">
 					<template #default="{ row }">
@@ -118,6 +118,10 @@ export default {
 				}
 			})
 		},
+    searchFetchData(){
+      this.queryForm.pageNo = 1
+      this.fetchData()
+    },
 		fetchData() {
 			api.modelpower({
 				modelid: this.fuzzyQuery_name,
@@ -131,10 +135,10 @@ export default {
 					this.templateExcel = [
 						{
 							id: '',
-							modelid: '',
+							modelId: '',
 							speed: '',
-							theorypower: '',
-							ensurepower: ''
+							theoryPower: '',
+							ensurePower: ''
 						}
 					]
 					// 导出
@@ -142,10 +146,10 @@ export default {
 					res.data.records.forEach(item => {
 						exportExcel.push({
 							id: item.id,
-							modelid: item.modelid,
+							modelId: item.modelId,
 							speed: item.speed,
-							theorypower: item.theorypower,
-							ensurepower: item.ensurepower
+							theoryPower: item.theoryPower,
+							ensurePower: item.ensurePower
 						})
 					})
 					this.exportExcel = exportExcel

+ 5 - 1
src/views/stationConfiguration/windsubstation/index.vue

@@ -7,7 +7,7 @@
 						<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">
+					<el-button icon="el-icon-search" type="primary" native-type="submit" @click="searchFetchData">
 						查询
 					</el-button>
 				</div>
@@ -126,6 +126,10 @@ export default {
 				}
 			})
 		},
+    searchFetchData(){
+      this.queryForm.pageNo = 1
+      this.fetchData()
+    },
 		fetchData() {
 			api.windsubstation({
 				name: this.fuzzyQuery_name,

+ 12 - 1
src/views/stationConfiguration/windterbin/index.vue

@@ -36,7 +36,7 @@
         <el-table-column show-overflow-tooltip label="线路编号" prop="lineId" align="center" sortable></el-table-column>
         <el-table-column show-overflow-tooltip label="地球纬度" prop="latitude" align="center" sortable></el-table-column>
         <el-table-column show-overflow-tooltip label="地球经度" prop="longitude" align="center" sortable></el-table-column>
-        <el-table-column show-overflow-tooltip label="机型" prop="equipmentCategory" align="center" sortable></el-table-column>
+        <el-table-column show-overflow-tooltip label="机型" prop="equipmentCategory" :formatter="equipmentCategoryFormatter" align="center" sortable></el-table-column>
         <el-table-column show-overflow-tooltip label="图片" prop="photo" align="center" sortable></el-table-column>
         <!-- <el-table-column show-overflow-tooltip label="标杆风机" prop="isStandard" align="center" sortable></el-table-column> -->
         <el-table-column show-overflow-tooltip label="操作" fixed="right">
@@ -68,6 +68,11 @@ export default {
   },
   data() {
     return {
+      equipmentCategoryOptions: [
+        {id: 0, name: "风机"},
+        {id: 1, name: "集中"},
+        {id: 2, name: "组串"},
+      ],
       fuzzyQuery_name: '',
       listLoading: true,
       list: [],
@@ -99,6 +104,12 @@ export default {
     this.getTree()
   },
   methods: {
+    equipmentCategoryFormatter(row, column, cellValue, index){
+      let val = this.equipmentCategoryOptions.filter(item=>{
+        return item.id === row.equipmentCategory
+      });
+      return val[0].name
+    },
     handleQuery() {
       this.queryForm.pageNo = 1
       this.fetchData()