Browse Source

搜索到地图空间的样式修改

zhaojijng 2 years ago
parent
commit
62ad3c1a51

+ 1 - 1
src/config/user.ts

@@ -1,7 +1,7 @@
 class UserData {
   private static instance: UserData;
   private constructor() {}
-  private user: any = { name: 'sss' };
+  private user: any = { name: '' };
 
   static getInstance() {
     if (!this.instance) {

+ 1 - 1
src/pages/Environment/index.tsx

@@ -275,7 +275,7 @@ const Environment: React.FC = () => {
                 <div
                   className={cx(mapstyles.house, {
                     [mapstyles.notclick]: !item.roomFuncType,
-                    [mapstyles.searchSel]: item.spaceId == searchSpace.spaceId,
+                    [mapstyles.searchSel]: item.spaceId && item.spaceId === searchSpace.spaceId,
                   })}
                   style={{
                     background: item.roomFuncType

+ 1 - 1
src/pages/Equipment/index.tsx

@@ -408,7 +408,7 @@ const Environment: React.FC = () => {
                     className={cx(mapstyles.house, {
                       [mapstyles.notclick]:
                         !item.roomFuncType || (selNav.id !== 'all' && item[selNav.id] == 'not'),
-                      [mapstyles.searchSel]: item.spaceId == searchSpace.spaceId,
+                      [mapstyles.searchSel]: item.spaceId && item.spaceId === searchSpace.spaceId,
                     })}
                     onClick={(event) => {
                       event.stopPropagation();

+ 1 - 1
src/pages/Runtime/index.tsx

@@ -205,7 +205,7 @@ const Runtime: React.FC = () => {
                   key={index + 'house'}
                   className={cx(mapstyles.house, {
                     [mapstyles.notclick]: !item.roomFuncType,
-                    [mapstyles.searchSel]: item.spaceId == searchSpace.spaceId,
+                    [mapstyles.searchSel]: item.spaceId && item.spaceId === searchSpace.spaceId,
                   })}
                   style={{
                     background: item.roomFuncType

+ 11 - 16
src/services/ant-design-pro/environment.ts

@@ -71,7 +71,7 @@ function commonParams() {
 // chart
 export async function queryPropertyData(params: any, options?: { [key: string]: any }) {
   return request<API.DeviceTimeType>(
-    `/sgadmin/duoduo-service/duoduoenv-service/spaceAdjust/queryPropertyData?${commonParams()}`,
+    `/sgadmin/duoduo-service/duoduoenv-service/spaceAdjust/queryPropertyData`,
     {
       method: 'GET',
       params: params,
@@ -82,9 +82,7 @@ export async function queryPropertyData(params: any, options?: { [key: string]:
 export async function queryEnvironmentParam(body: any, otherParam: { [key: string]: any }) {
   //api/duoduo-service/object-service/object/floor/queryParam
   return request<API.EnvironmentParam>(
-    `/sgadmin/duoduo-service/object-service/object/floor/queryParam?endTime=${
-      otherParam.endTime
-    }&startTime=${otherParam.startTime}&param=${otherParam.param}&${commonParams()}`,
+    `/sgadmin/duoduo-service/object-service/object/floor/queryParam?endTime=${otherParam.endTime}&startTime=${otherParam.startTime}&param=${otherParam.param}`,
     {
       method: 'POST',
       headers: {
@@ -98,7 +96,7 @@ export async function queryEnvironmentParam(body: any, otherParam: { [key: strin
 export async function queryEquipStatistics(params: any, options?: { [key: string]: any }) {
   //
   return request<API.EnvironmentParam>(
-    `/sgadmin/duoduo-service/object-service/object/equipment/queryEquipStatistics?${commonParams()}`,
+    `/sgadmin/duoduo-service/object-service/object/equipment/queryEquipStatistics`,
     {
       method: 'GET',
       headers: {
@@ -128,21 +126,18 @@ export async function querySpace(body: any, options?: { [key: string]: any }) {
 }
 
 export async function checkToken(header: any, options?: { [key: string]: any }) {
-  return request<API.EnvironmentParam>(
-    `/sgadmin/duoduo-service/setup-service/user/zjCheckToken?${commonParams()}`,
-    {
-      method: 'GET',
-      headers: {
-        'Content-Type': 'application/json',
-        ...header,
-      },
-      ...(options || {}),
+  return request<API.EnvironmentParam>(`/sgadmin/duoduo-service/setup-service/user/zjCheckToken`, {
+    method: 'GET',
+    headers: {
+      'Content-Type': 'application/json',
+      ...header,
     },
-  );
+    ...(options || {}),
+  });
 }
 //http://10.100.28.79/sgadmin/sso//auth/zjFreshCheckToken
 export async function reFreshCheckToken(header: any, options?: { [key: string]: any }) {
-  return request<API.EnvironmentParam>(`/sgadmin/sso/auth/zjFreshCheckToken?${commonParams()}`, {
+  return request<API.EnvironmentParam>(`/sgadmin/sso/auth/zjFreshCheckToken`, {
     method: 'GET',
     headers: {
       'Content-Type': 'application/json',