Browse Source

fix:变电所

chenxinlei 2 years ago
parent
commit
d19c8814d9
2 changed files with 61 additions and 53 deletions
  1. 60 53
      src/api/realtimeDatabaseConfiguration.js
  2. 1 0
      src/api/station.js

+ 60 - 53
src/api/realtimeDatabaseConfiguration.js

@@ -1,99 +1,106 @@
 import request from '@/utils/request'
 
-const database =(data)=>{
+const database = (data) => {
   return request({
-      url:`/realtimeDatabaseConfiguration/listByPage?name=${encodeURIComponent(data.name)}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
-      method:"get"
+    url: `/realtimeDatabaseConfiguration/listByPage?name=${encodeURIComponent(
+      data.name
+    )}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+    method: 'get',
   })
 }
-const addDatabase =(pairs)=>{
+const addDatabase = (pairs) => {
   return request({
-      url:`/realtimeDatabaseConfiguration/save`,
-      method:"post",
-      data: pairs
+    url: `/realtimeDatabaseConfiguration/save`,
+    method: 'post',
+    data: pairs,
   })
 }
-const deleteDatabase =(data)=>{
+const deleteDatabase = (data) => {
   return request({
-      url:`/realtimeDatabaseConfiguration/remove-modelpower?ids=${data.id}`,
-      method:"delete",
+    url: `/realtimeDatabaseConfiguration/remove-modelpower?ids=${data.id}`,
+    method: 'delete',
   })
 }
 
 // 设备厂商
-const manufacturer =(data)=>{
+const manufacturer = (data) => {
   return request({
-      url:`/manufacturer/listByPage?name=${encodeURIComponent(data.name)}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
-      method:"get"
+    url: `/manufacturer/listByPage?name=${encodeURIComponent(
+      data.name
+    )}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+    method: 'get',
   })
 }
-const addManufacturer =(pairs)=>{
+const addManufacturer = (pairs) => {
   return request({
-      url:`/manufacturer/save`,
-      method:"post",
-      data: pairs
+    url: `/manufacturer/save`,
+    method: 'post',
+    data: pairs,
   })
 }
-const deleteManufacturer =(data)=>{
+const deleteManufacturer = (data) => {
   return request({
-      url:`/manufacturer/remove-manufacturer?ids=${data.id}`,
-      method:"delete",
+    url: `/manufacturer/remove-manufacturer?ids=${data.id}`,
+    method: 'delete',
   })
 }
 
 // 设备类型
-const modelpower =(data)=>{
+const modelpower = (data) => {
   return request({
-      url:`/modelpower/listByPage?modelid=${data.modelid}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
-      method:"get"
+    url: `/modelpower/listByPage?modelid=${data.modelid}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+    method: 'get',
   })
 }
-const addModelpower =(pairs)=>{
+const addModelpower = (pairs) => {
   return request({
-      url:`/modelpower/save`,
-      method:"post",
-      data: pairs
+    url: `/modelpower/save`,
+    method: 'post',
+    data: pairs,
   })
 }
-const deleteModelpower =(data)=>{
+const deleteModelpower = (data) => {
   return request({
-      url:`/modelpower/remove-modelpower/${data.id}`,
-      method:"delete",
+    url: `/modelpower/remove-modelpower/${data.id}`,
+    method: 'delete',
   })
 }
 
 // 变电所
-const windsubstation =(data)=>{
+const windsubstation = (data) => {
   return request({
-      url:`/windsubstation/listByPage?name=${encodeURIComponent(data.name)}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
-      method:"get"
+    url: `/pro-basic-windsub-station/List?name=${encodeURIComponent(
+      data.name
+    )}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+    method: 'get',
   })
 }
-const addWindsubstation =(pairs)=>{
+const addWindsubstation = (pairs) => {
   return request({
-      url:`/windsubstation/save`,
-      method:"post",
-      data: pairs
+    url: `/pro-basic-windsub-station/save`,
+    method: 'post',
+    data: pairs,
   })
 }
-const deleteWindsubstation =(data)=>{
+// /pro-basic-windsub-station/remove-WindsubStation/{ids}
+const deleteWindsubstation = (data) => {
   return request({
-      url:`/windsubstation/remove-windsub/${data.id}`,
-      method:"delete",
+    url: `/pro-basic-windsub-station/remove-WindsubStation/${data.id}`,
+    method: 'delete',
   })
 }
 
 export default {
-	database,
-	addDatabase,
-	deleteDatabase,
-	addManufacturer,
-	addModelpower,
-	addWindsubstation,
-	manufacturer,
-	modelpower,
-	windsubstation,
-	deleteManufacturer,
-	deleteModelpower,
-	deleteWindsubstation,
-}
+  database,
+  addDatabase,
+  deleteDatabase,
+  addManufacturer,
+  addModelpower,
+  addWindsubstation,
+  manufacturer,
+  modelpower,
+  windsubstation,
+  deleteManufacturer,
+  deleteModelpower,
+  deleteWindsubstation,
+}

+ 1 - 0
src/api/station.js

@@ -86,6 +86,7 @@ const deleteWindpowerstation = (data) => {
     method: 'delete',
   })
 }
+//期次
 const projectList = (data) => {
   return request({
     url: `/pro-basic-project/List?id=${data.id}&windpowerstationId=${data.windpowerstationId}&name=${data.name}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,