zhaojing 1 год назад
Родитель
Сommit
af17a32152

BIN
src/assets/images/page-equipment/air_close.png


Разница между файлами не показана из-за своего большого размера
+ 10 - 0
src/assets/images/page-equipment/aircloudblack.svg


Разница между файлами не показана из-за своего большого размера
+ 10 - 0
src/assets/images/page-equipment/aircloudgreen.svg


Разница между файлами не показана из-за своего большого размера
+ 3 - 0
src/assets/images/page-equipment/aircoldblack.svg


Разница между файлами не показана из-за своего большого размера
+ 3 - 0
src/assets/images/page-equipment/aircoldblue.svg


Разница между файлами не показана из-за своего большого размера
+ 10 - 0
src/assets/images/page-equipment/airsunblack.svg


Разница между файлами не показана из-за своего большого размера
+ 10 - 0
src/assets/images/page-equipment/airsunred.svg


+ 3 - 0
src/assets/images/page-equipment/down_Arrow.svg

@@ -0,0 +1,3 @@
+<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.93037 8.68055C6.19885 8.41207 6.63415 8.41207 6.90264 8.68055L10.9998 12.7777L15.097 8.68055C15.3655 8.41207 15.8008 8.41207 16.0693 8.68055C16.3378 8.94904 16.3378 9.38434 16.0693 9.65282L11.486 14.2362C11.2175 14.5046 10.7822 14.5046 10.5137 14.2362L5.93037 9.65282C5.66188 9.38434 5.66188 8.94904 5.93037 8.68055Z" fill="#9FB7CD"/>
+</svg>

BIN
src/assets/images/page-equipment/openair.png


+ 3 - 0
src/assets/images/page-equipment/up_Arrow.svg

@@ -0,0 +1,3 @@
+<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.93037 13.3195C6.19885 13.588 6.63415 13.588 6.90264 13.3195L10.9998 9.22227L15.097 13.3195C15.3655 13.588 15.8008 13.588 16.0693 13.3195C16.3378 13.051 16.3378 12.6157 16.0693 12.3472L11.486 7.76386C11.2175 7.49538 10.7822 7.49538 10.5137 7.76386L5.93037 12.3472C5.66188 12.6157 5.66188 13.051 5.93037 13.3195Z" fill="#9FB7CD"/>
+</svg>

BIN
src/assets/images/page-equipment/wind_big.png


BIN
src/assets/images/page-equipment/wind_small.png


+ 17 - 0
src/config/sagacare/sagacare_image.js

@@ -54,4 +54,21 @@ export const equipImageMap = {
     curtain_open_row: require('@/assets/images/page-equipment/curtain-open-row.png'),
     curtain_open_icon_row: require('@/assets/images/page-equipment/curtain-open-icon-row.svg'),
     curtain_close_icon_row: require('@/assets/images/page-equipment/curtain-close-icon-row.svg'),
+
+
+
+    up_Arrow: require('@/assets/images/page-equipment/up_Arrow.svg'),
+    down_Arrow: require('@/assets/images/page-equipment/down_Arrow.svg'),
+    openair: require('@/assets/images/page-equipment/openair.png'),
+    air_close: require('@/assets/images/page-equipment/air_close.png'),
+
+    wind_small: require('@/assets/images/page-equipment/wind_small.png'),
+    wind_big: require('@/assets/images/page-equipment/wind_big.png'),
+    airsunred: require('@/assets/images/page-equipment/airsunred.svg'),
+    airsunblack: require('@/assets/images/page-equipment/airsunblack.svg'),
+    aircoldblue: require('@/assets/images/page-equipment/aircoldblue.svg'),
+    aircoldblack: require('@/assets/images/page-equipment/aircoldblack.svg'),
+    aircloudgreen: require('@/assets/images/page-equipment/aircloudgreen.svg'),
+    aircloudblack: require('@/assets/images/page-equipment/aircloudblack.svg'),
+
 };

+ 794 - 0
src/pages/Equipment/components/deviceModal/airEqHand/index.jsx

@@ -0,0 +1,794 @@
+import React, { useState, useEffect, useRef, useCallback } from 'react';
+import { message, Spin } from 'antd';
+// import styles from './index.less';
+// import cx from 'classnames';
+
+import { equipImageMap } from '@/config/sagacare/sagacare_image.js';
+import AnSwitch from '../anSwitch';
+import {
+  changeManualTempHttp,
+  querySpaceConditioners,
+} from '@/services/sagacare_service/equipment';
+import { DownOutlined, UpOutlined } from '@ant-design/icons';
+
+import './index.less';
+
+export default ({ spaceId, projectId, changeDrag }) => {
+  const {
+    up_Arrow,
+    down_Arrow,
+    openair,
+    air_close,
+    wind_small,
+    wind_big,
+    airsunred,
+    airsunblack,
+    aircoldblue,
+    aircoldblack,
+    aircloudgreen,
+    aircloudblack,
+  } = equipImageMap;
+
+  let [airTemp, setAirTemp] = useState();
+  let [allAirShow, setAllAirShow] = useState(false);
+  let baseMode = [
+    {
+      name: '温度',
+      id: 'temp',
+      selectArr: [],
+      //sel: 0,
+      //value: 25
+    },
+    {
+      name: '档位',
+      id: 'gear',
+      selectArr: [0, 1, 2, 3, 'AUTO'],
+    },
+    {
+      name: '模式',
+      id: 'mode',
+      selectArr: ['制冷', '制热', '通风'],
+      refer: [
+        { mid: 1, value: '制冷', sindex: 0 },
+        { mid: 2, value: '制热', sindex: 1 },
+        { mid: 3, value: '通风', sindex: 2 },
+      ],
+    },
+  ];
+  const windGearArr = [0, 1, 2, 3]; // 风量3/5个档位
+  const [allDevices, setAllDevices] = useState([]);
+  const [eqTitle, setEqTitle] = useState('空调');
+  const [nowTemp, setNowTemp] = useState(18);
+  const [airMode, setAirMode] = useState(2); // 空调模式 总的  1=cold;2=hot 3=wind
+  const [airGear, setAirGear] = useState(1); // 风量档位 总的
+  const [isAutoGear, setIsAutoGear] = useState(0);
+  const [airData, setAirData] = useState({ isOpen: false });
+
+  const [movesign, setMovesign] = useState(false);
+  const [startX, setStartX] = useState(0);
+  const [transX, setTransX] = useState(0);
+  const [tempBarWidth, setTempBarWidth] = useState(0);
+  const [startTemp, setStartTemp] = useState(18);
+  const [endTemp, setEndTemp] = useState(26);
+  const infoTimer = useRef(null);
+
+  function doTimeout() {
+    clearInterval(infoTimer.current); // 定时器先清理 再设定
+    infoTimer.current = setInterval(() => {
+      getAirInfo();
+    }, 20000);
+  }
+  const doTransX = useCallback(
+    (newVal) => {
+      var tempNum = (endTemp - startTemp) * 2;
+      var eachUnit = tempBarWidth / tempNum; //0.5度的长度
+      var moveNum = Math.floor(newVal / eachUnit);
+      var nowTemp2 = moveNum * 0.5 + startTemp;
+      setNowTemp(nowTemp2);
+      //console.log("this.nowTemp111",nowTemp2);
+      return nowTemp2;
+      // if (typeof this.nowTemp === 'number' && this.nowTemp % 1 === 0) {
+      // this.vibrateShort();
+      // }
+    },
+    [endTemp, startTemp, tempBarWidth],
+  );
+
+  const barWidth = 17;
+  var tempRef = useRef();
+  function doTemp(newVal, maxTempSet, minTempSet) {
+    //处理温度
+    if (!newVal) return;
+    var tBarWidth = (tempRef.current || {}).clientWidth || 0;
+    var tBarHeight = (tempRef.current || {}).clientHeight || 0;
+
+    tBarWidth = tBarWidth ? tBarWidth - barWidth : tBarWidth;
+    var tempNum = (maxTempSet - minTempSet) * 2;
+
+    var eachUnit = tBarWidth / tempNum; //0.5度的长度
+    var changeNum = (newVal - minTempSet) * 2;
+
+    var transX = eachUnit * changeNum;
+    if (transX < 0) {
+      // transX只能是正的
+      transX = 0;
+    }
+    if (transX > tBarWidth) {
+      transX = tBarWidth;
+    }
+
+    // console.log('tBarWidth', tBarWidth, newVal, maxTempSet, minTempSet);
+    setTransX(transX);
+    setTempBarWidth(tBarWidth);
+  }
+
+  function allAirClick() {
+    getAirInfo();
+    setAllAirShow(!allAirShow);
+  }
+  function cmousedown(e) {
+    if (!airData.isOpen) return;
+    var pageX = e.pageX;
+    setStartX(pageX);
+    setMovesign(true);
+  }
+  function cbarclick(e) {
+    if (!airData.isOpen) return;
+    var pageX = Number(e.pageX); // 页面触点Y坐标
+    var tempRefCurrent = tempRef.current || {};
+    var tempDomLeft = tempRefCurrent.getBoundingClientRect().left || 0;
+    var moveX = pageX - tempDomLeft - 8;
+
+    var transX2 = moveX;
+
+    if (transX2 < 0) {
+      // transX只能是正的
+      transX2 = 0;
+    }
+    if (transX2 > tempBarWidth) {
+      transX2 = tempBarWidth;
+    }
+
+    setTransX(transX2);
+    var tempVal = doTransX(transX2);
+    changeZongAir('temp', tempVal);
+  }
+
+  function cmousemove(e) {
+    if (!airData.isOpen || !movesign) return;
+    var pageX = Number(e.pageX); // 页面触点Y坐标
+
+    var moveX = pageX - startX;
+    setStartX(pageX);
+
+    var transX2 = transX + moveX;
+
+    if (transX2 < 0) {
+      // transX只能是正的
+      transX2 = 0;
+    }
+    if (transX2 > tempBarWidth) {
+      transX2 = tempBarWidth;
+    }
+
+    // console.log('touchmove', startX, transX2, tempBarWidth);
+    setTransX(transX2);
+    doTransX(transX2);
+  }
+
+  function cmouseup(e) {
+    if (!airData.isOpen || !movesign) return;
+    // 挪动到一定区域 则可以自己到固定位置
+    setMovesign(false);
+    changeZongAir('temp', nowTemp);
+    console.log('touchend');
+  }
+
+  function eachAirOpen(aindex) {
+    //this.allDevices[aindex].open = !this.allDevices[aindex].open;
+    var itemClone = { ...allDevices[aindex] };
+    itemClone.open = !itemClone.open;
+
+    var value = itemClone.open ? 1 : 0;
+    var devicesClone = [...allDevices];
+    devicesClone[aindex] = itemClone;
+
+    setAllDevices(devicesClone);
+    changeOneAir(allDevices[aindex].id, allDevices[aindex].switchCode, value); //todo
+  }
+  function arrowDownClick(aindex, mindex, sel) {
+    //console.log('sel', sel);
+    var devicesClone = JSON.parse(JSON.stringify(allDevices));
+    var nowDevice = devicesClone[aindex];
+    var nowModel = devicesClone[aindex].allModel[mindex];
+    if (!nowDevice.open) return;
+    if (sel == 0) return;
+
+    if (nowModel.id == 'gear' && sel == 1) return;
+    if (sel < 0) {
+      nowModel.sel = 0;
+    } else {
+      nowModel.sel--;
+    }
+    setAllDevices(devicesClone);
+
+    if (nowModel.id == 'mode') {
+      var value = nowModel.refer[nowModel.sel].mid;
+      console.log('nowModel.refer', nowModel.refer, nowModel.refer[nowModel.sel].mid);
+    } else if (nowModel.id == 'gear') {
+      var selval = nowModel.selectArr[nowModel.sel];
+      var value = selval == 'AUTO' ? 4 : selval;
+      console.log('nowModel.refer2', selval, value);
+    } else {
+      var value = nowModel.selectArr[nowModel.sel];
+      console.log('nowModel.refer3', value);
+    }
+    debounce(nowDevice.id, nowModel.code, value);
+
+    //console.log("arrowup", aindex, mindex, sel)
+  }
+
+  const debounceTimer = useRef(null);
+  function debounce(id, code, value) {
+    clearTimeout(debounceTimer.current);
+
+    debounceTimer.current = setTimeout(function () {
+      changeOneAir(id, code, value);
+    }, 500);
+  }
+  function arrowUpClick(aindex, mindex, sel) {
+    var devicesClone = JSON.parse(JSON.stringify(allDevices));
+    var nowDevice = devicesClone[aindex];
+    var nowModel = devicesClone[aindex].allModel[mindex];
+
+    if (!nowDevice.open) return;
+    var selectArr = nowModel.selectArr;
+    if (sel == selectArr.length - 1) return;
+    //console.log('sel', sel);
+    if (sel > selectArr.length - 1) {
+      nowModel.sel = selectArr.length - 1;
+    } else {
+      nowModel.sel++;
+    }
+
+    setAllDevices(devicesClone);
+
+    if (nowModel.id == 'mode') {
+      var value = nowModel.refer[nowModel.sel].mid;
+      console.log('nowModel.refer', nowModel.refer, nowModel.refer[nowModel.sel].mid);
+    } else if (nowModel.id == 'gear') {
+      var selval = nowModel.selectArr[nowModel.sel];
+      var value = selval == 'AUTO' ? 4 : selval;
+    } else {
+      var value = nowModel.selectArr[nowModel.sel];
+    }
+
+    debounce(nowDevice.id, nowModel.code, value);
+  }
+  // function querySeasonType() {
+  //     const params = {
+  //         projectId: projectId,
+  //         date: moment().format('YYYYMMDD') // 当天日期
+  //     }
+  //     if (!this.seasonType) {
+  //         getSeasonType(params).then(res => {
+  //             this.seasonType = res.data || '';
+  //         }).catch(() => {
+  //         })
+  //     }
+  // }
+  // function showDetail(funcid) {
+  //     this.$emit('showDetail', { funcid: funcid });
+  //     wx.uma.trackEvent('officeHome_changeAir_temperature', { key: 'roomTemperature' });
+  // }
+
+  // 空调信息airTemp
+  function getAirInfo() {
+    const paramObj = {
+      projectId: projectId, //'Pj1101080255'
+      spaceId: spaceId, //'Sp110108025564f438d7fef64eea8202a6462f1bbcce' //空间id
+    };
+
+    querySpaceConditioners(paramObj)
+      .then((res) => {
+        var data = res.data || {};
+        console.log('getAirInfo', data);
+        data.tempSet = data.tempSet;
+        setAirTemp(data.tempSet);
+        setNowTemp(data.tempSet);
+
+        setAirMode(data.workMode);
+        setAirGear(data.gear);
+        setIsAutoGear(data.isAutoGear);
+        setAirData({ isOpen: data.runStatus ? true : false });
+
+        var maxTempSet = data.maxTempSet;
+        setEndTemp(data.maxTempSet);
+        var minTempSet = data.minTempSet;
+        setStartTemp(data.minTempSet);
+
+        var tempArr = [];
+        for (var i = minTempSet; i <= maxTempSet; i = i + 0.5) {
+          tempArr.push(i);
+        }
+
+        baseMode[0].selectArr = tempArr;
+        doTemp(data.tempSet, maxTempSet, minTempSet);
+        var deviceArr = [];
+        data.equipList.forEach((eitem) => {
+          var deviceObj = {};
+          deviceObj.id = eitem.id;
+          deviceObj.name = eitem.localName;
+          deviceObj.open = eitem.runStatus == 1 ? true : false;
+          deviceObj.switchCode = eitem.switchCode;
+
+          var allModel = JSON.parse(JSON.stringify(baseMode));
+          //console.log('allModel', allModel);
+          allModel.forEach((mitem) => {
+            if (mitem.id == 'temp') {
+              mitem.code = eitem.tempSetCode;
+              //mitem.value = eitem.tempSet;
+              var index = mitem.selectArr.findIndex((ele) => {
+                return ele == eitem.tempSet;
+              });
+              //console.log('index1', index, eitem.tempSet);
+              mitem.sel = index == -1 ? 0 : index;
+            }
+            if (mitem.id == 'gear') {
+              mitem.code = eitem.gearCode;
+              //mitem.value = eitem.gear;
+              var index = mitem.selectArr.findIndex((ele) => {
+                if (eitem.isAutoGear == 1) {
+                  return ele == 'AUTO';
+                } else {
+                  return ele == eitem.gear;
+                }
+              });
+              mitem.sel = index == -1 ? 0 : index;
+            }
+            if (mitem.id == 'mode') {
+              mitem.code = eitem.modeSetCode;
+              //mitem.value = eitem.workMode;
+              var filterObj = mitem.refer.find((ele) => {
+                return ele.mid == eitem.workMode;
+              });
+              mitem.sel = (filterObj || {}).sindex || 0;
+              //  console.log('index3', filterObj, eitem.workMode);
+            }
+          });
+          deviceObj.allModel = allModel;
+          deviceArr.push(deviceObj);
+        });
+
+        setAllDevices(deviceArr);
+      })
+      .catch(() => {});
+  }
+
+  // function vibrateLong() {
+  //     if (wx.canIUse('vibrateLong')) {
+  //         wx.vibrateLong();
+  //     } else {
+  //         wx.vibrateShort();
+  //     }
+  // }
+  // function vibrateShort() {
+  //     if (wx.canIUse('vibrateShort')) {
+  //         wx.vibrateShort();
+  //     } else {
+  //         wx.vibrateLong();
+  //     }
+  // }
+
+  // checkAirCanOpen(itemId) { // 判断空调是否能开启
+  //     if (!this.roomHasScene && !this.isNowTime) {
+  //         wx.showToast({
+  //             title: '大厦该时段无空调提供',
+  //             icon: 'info',
+  //             duration: 1000
+  //         })
+  //         return false;
+  //     }
+  //     if (itemId === 12) { // 12表示开空调
+  //         console.log(this.isNowTime, 'this.isNowTime');
+  //         if (this.roomHasScene && !this.isNowTime) {
+  //             this.$emit('component-open-workTimePop');
+  //             return false;
+  //         }
+  //     }
+  //     return true;
+  // }
+  function changeZongAir(btnType, value) {
+    if (!airData.isOpen && btnType != 'sw') return;
+
+    // 如果是过渡季 并且ACATVA 空调  则不能调节温度 不能开
+    // if (btnType == 'temp' && this.isACATVA && this.seasonType == 'Transition') {
+    //     setTimeout(() => {
+    //         wx.showToast({
+    //             title: '目前为过渡季节,大厦无冷热水供应,空调无法调节',
+    //             duration: 2600,
+    //             icon: 'none'
+    //         })
+    //     }, 0);
+    //     return;
+    // }
+
+    // 如果不是开关空调 显示弹窗
+    // if (btnType != 'sw') {
+    //     this.$emit('airShowVisible', {
+    //         'toWhere': btnTypeDetail,
+    //         'designTemperature': 0                    }
+    //     );
+    // }
+
+    var nowairGear = airGear;
+    var nowAutoGear = isAutoGear;
+    if (btnType == 'gear' && value == 'windLow') {
+      //降挡
+      if (nowairGear > 1) {
+        nowairGear = nowairGear - 1;
+        setAirGear(nowairGear);
+        nowAutoGear = 0;
+        setIsAutoGear(nowAutoGear);
+      } else {
+        return;
+      }
+    }
+    if (btnType == 'gear' && value == 'windUp') {
+      //升档
+      if (nowairGear < 3) {
+        nowairGear = nowairGear + 1;
+        setAirGear(nowairGear);
+        nowAutoGear = 0;
+        setIsAutoGear(nowAutoGear);
+      } else {
+        return;
+      }
+    }
+
+    if (btnType == 'gear' && value == 'auto') {
+      nowAutoGear = isAutoGear == 1 ? 0 : 1;
+      setIsAutoGear(nowAutoGear);
+    }
+    if (btnType == 'mode') {
+      setAirMode(value);
+    }
+    var nowOpen = airData.isOpen;
+    if (btnType == 'sw') {
+      nowOpen = !nowOpen;
+      setAirData({ isOpen: nowOpen });
+    }
+
+    let paramArr = [];
+    allDevices.forEach((dele) => {
+      if (btnType == 'sw') {
+        let paramObj = {
+          id: dele.id,
+          code: dele.switchCode,
+          value: nowOpen ? 1 : 0,
+        };
+        paramArr.push(paramObj);
+      }
+
+      dele.allModel.forEach((mele) => {
+        if (mele.id == 'temp') {
+          var rval = value;
+        } else if (mele.id == 'gear') {
+          var rval = nowAutoGear == 1 ? 4 : nowairGear;
+        } else if (mele.id == 'mode') {
+          var rval = value;
+        }
+        if (mele.id == btnType) {
+          let paramObj = {
+            id: dele.id,
+            code: mele.code,
+            value: rval,
+          };
+          paramArr.push(paramObj);
+        }
+      });
+    });
+    //console.log('this.nowTemp222', value, nowTemp);
+    //wx.showLoading();
+
+    //  下达指令
+    changeManualTempHttp(paramArr)
+      .then((res) => {
+        if (btnType == 'temp') {
+          //_this.airTemp = _this.nowTemp;
+          setAirTemp(value);
+        }
+        doTimeout();
+      })
+      .catch(() => {
+        //wx.hideLoading();
+      });
+  }
+
+  function changeOneAir(id, code, value) {
+    console.log('id code value', id, code, value);
+    const paramArr = [
+      {
+        id: id,
+        code: code,
+        value: value,
+      },
+    ];
+    //wx.showLoading();
+    //  下达指令
+    changeManualTempHttp(paramArr)
+      .then((res) => {
+        doTimeout();
+      })
+      .catch(() => {
+        //wx.hideLoading();
+      });
+  }
+
+  useEffect(() => {
+    doTimeout();
+    getAirInfo();
+    return () => {
+      clearInterval(infoTimer.current);
+    };
+  }, [spaceId]);
+
+  return (
+    <div className="air-adjust office-card g-fl">
+      <div className="air-content">
+        <div className="air-adjust-env">
+          <div className="air-text">
+            <span className="envname">空调</span>
+            <div className="envnum">
+              {airTemp ? airTemp : '--'}
+              <span className="unit">℃</span>
+            </div>
+          </div>
+          <div className="air-show-all">
+            {allDevices.length > 1 && (
+              <div
+                className="air-show-all-cont"
+                onClick={() => {
+                  allAirClick();
+                }}
+              >
+                <img className="air-arrow" src={allAirShow ? up_Arrow : down_Arrow} />
+                <span className="text">{allAirShow ? '收起全部' : '查看全部'}</span>
+              </div>
+            )}
+          </div>
+        </div>
+        <div className="air-adjust-btn">
+          <img className="airImg" src={airData.isOpen ? openair : air_close} />
+        </div>
+        {!allAirShow && (
+          <div
+            className="air-switch"
+            onClick={() => {
+              changeZongAir('sw');
+            }}
+          >
+            <AnSwitch isOpen={airData.isOpen} isAir={true} />
+          </div>
+        )}
+      </div>
+
+      <div
+        style={{
+          visibility: !allAirShow && airData.isOpen ? 'visible' : 'hidden',
+          height: !allAirShow && airData.isOpen ? 'auto' : 0,
+        }}
+      >
+        <div
+          className="air-control-item temp-item"
+          onMouseDown={(event) => {
+            event.stopPropagation();
+          }}
+          onMouseUp={(event) => {
+            cmouseup(event);
+          }}
+          onMouseMove={(event) => {
+            cmousemove(event);
+          }}
+        >
+          <div className="temp-wrap">
+            <div className="minVal">{startTemp}℃</div>
+            <div
+              className="tempBar"
+              ref={tempRef}
+              onClick={(event) => {
+                event.stopPropagation();
+                cbarclick(event);
+              }}
+            >
+              <div className="eachBlock"></div>
+              <div className="eachBlock"></div>
+              <div className="eachBlock"></div>
+              <div className="eachBlock"></div>
+              <div className="eachBlock"></div>
+              {airData.isOpen && (
+                <div
+                  className="circle"
+                  onMouseDown={(event) => {
+                    event.stopPropagation();
+                    cmousedown(event);
+                  }}
+                  style={{ transform: 'translateX(' + transX + 'px)' }}
+                >
+                  <span className="tvalue">{nowTemp}℃</span>
+                </div>
+              )}
+            </div>
+            <div className="maxVal">{endTemp}℃</div>
+          </div>
+          <div className="air-common-text change-text">温度设定</div>
+        </div>
+
+        <div className="air-control-item item-flex ">
+          <div className="air-control-item-box">
+            <div className="envnum-common air-envnum-comon">
+              {windGearArr.map(function (item, index) {
+                return (
+                  <span
+                    className={`envnum-common-wind ${item == airGear ? 'windBlack' : ''}`}
+                    key={index + 'wind'}
+                  >
+                    {item}
+                  </span>
+                );
+              })}
+            </div>
+            <div className="air-common-text change-text">风量调节</div>
+          </div>
+          <div className="air-common-switch">
+            <div
+              className={`switch  ${airGear <= 1 || !airData.isOpen ? 'disabled' : ''}`}
+              onClick={() => {
+                changeZongAir('gear', 'windLow');
+              }}
+            >
+              <img className="wimg" src={wind_small} />
+            </div>
+            <div
+              className={`switch ${airGear >= 3 || !airData.isOpen ? 'disabled' : ''}`}
+              onClick={() => {
+                changeZongAir('gear', 'windUp');
+              }}
+            >
+              <img className="wimg" src={wind_big} />
+            </div>
+            <div
+              className={`switch ${isAutoGear == 1 ? 'yell' : ''} ${
+                !airData.isOpen ? 'disabled' : ''
+              }`}
+              onClick={() => {
+                changeZongAir('gear', 'auto');
+              }}
+            >
+              AUTO
+            </div>
+          </div>
+        </div>
+        <div className="air-control-item item-flex">
+          <div className="air-control-item-box">
+            <div className="envnum-common air-envnum-comon">
+              {airMode == 2 ? '制热' : airMode == 1 ? '制冷' : '通风'}
+            </div>
+            <div className="air-common-text change-text">模式设定</div>
+          </div>
+          <div className="air-common-switch">
+            <div
+              className={`switch ${airMode == 2 ? 'yell' : ''} ${
+                !airData.isOpen ? 'disabled' : ''
+              }`}
+              onClick={() => {
+                changeZongAir('mode', 2);
+              }}
+            >
+              <img src={airMode == 2 ? airsunred : airsunblack} />
+            </div>
+            <div
+              className={`switch ${airMode == 1 ? 'yell' : ''} ${
+                !airData.isOpen ? 'disabled' : ''
+              }`}
+              onClick={() => {
+                changeZongAir('mode', 1);
+              }}
+            >
+              <img src={airMode == 1 ? aircoldblue : aircoldblack} />
+            </div>
+            <div
+              className={`switch ${airMode == 3 ? 'yell' : ''} ${
+                !airData.isOpen ? 'disabled' : ''
+              }`}
+              onClick={() => {
+                changeZongAir('mode', 3);
+              }}
+            >
+              <img src={airMode == 3 ? aircloudgreen : aircloudblack} />
+            </div>
+          </div>
+        </div>
+      </div>
+
+      {allAirShow && (
+        <div className="allAir">
+          {allDevices.map(function (item, aindex) {
+            return (
+              <div
+                className={`eachAir ${!item.open ? 'closeAir' : ''} ${
+                  allDevices.length == 1 ? 'oneAir' : ''
+                }`}
+                key={aindex + 'device'}
+              >
+                <div className="airName">{item.name}</div>
+                <div
+                  className={`openButton ${item.open ? 'open' : ''}`}
+                  onClick={() => {
+                    eachAirOpen(aindex);
+                  }}
+                >
+                  <div className="openBack"></div>
+                  <div className="openCircle">
+                    {/* <van-loading
+                              size="8"
+                              :style="{display:item.loading?'block':'none'}"
+                              wrapperClassName="openCircle"  />*/}
+                  </div>
+                </div>
+                <div className="airBox">
+                  {item.allModel.map(function (mitem, mindex) {
+                    return (
+                      <div
+                        className={`adjustBox ${!item.open ? 'disable' : ''}`}
+                        key={mindex + 'model'}
+                      >
+                        <div
+                          className={`arrow ${
+                            mitem.sel == mitem.selectArr.length - 1 ? 'disable' : ''
+                          }`}
+                          onClick={() => {
+                            arrowUpClick(aindex, mindex, mitem.sel);
+                          }}
+                        >
+                          <UpOutlined />
+                        </div>
+                        <div className="valueBox">
+                          <div
+                            className="valueWrap"
+                            style={{ transform: 'translateY(' + mitem.sel * -50 + 'px)' }}
+                          >
+                            {mitem.selectArr.map(function (sitem, sindex) {
+                              return (
+                                <div className="value" key={sindex + 'val'}>
+                                  {sitem}
+                                </div>
+                              );
+                            })}
+                          </div>
+                        </div>
+                        <div
+                          className={`arrow ${
+                            mitem.sel == 0 || (mitem.sel == 1 && mitem.id == 'gear')
+                              ? 'disable'
+                              : ''
+                          }`}
+                          onClick={() => {
+                            arrowDownClick(aindex, mindex, mitem.sel);
+                          }}
+                        >
+                          <DownOutlined />
+                        </div>
+                        <div className="adjustName">{mitem.name}</div>
+                      </div>
+                    );
+                  })}
+                </div>
+              </div>
+            );
+          })}
+        </div>
+      )}
+    </div>
+  );
+};

+ 465 - 0
src/pages/Equipment/components/deviceModal/airEqHand/index.less

@@ -0,0 +1,465 @@
+.air-adjust {
+  position: relative;
+  margin-bottom: 15px;
+  background: hsl(0, 0%, 100%);
+  border-radius: 25px;
+  box-shadow: 0 0 2px rgba(0, 0, 0, 0.07), 0 4px 10px rgba(0, 0, 0, 0.05);
+  user-select: none;
+  .allAir {
+    display: flex;
+    box-sizing: border-box;
+    padding: 0px 5px 0px 5px;
+    flex-wrap: wrap;
+
+    .eachAir {
+      position: relative;
+      width: 50%;
+      box-sizing: border-box;
+      flex-shrink: 0;
+      // border-right: 1px solid rgba(196, 196, 196, 0.4);
+      border-top: 1px solid rgba(196, 196, 196, 0.4);
+      padding: 20px 0px 20px 0px;
+
+      &:nth-child(odd) {
+        border-right: 1px solid rgba(196, 196, 196, 0.4);
+      }
+
+      &.closeAir {
+        color: #c4c4c4;
+      }
+
+      &.oneAir {
+        width: 100%;
+        border-right: none;
+      }
+
+      .openButton {
+        position: absolute;
+        top: 28px;
+        right: 15px;
+        width: 25px;
+        height: 8px;
+        cursor:pointer;
+
+        .openBack {
+          width: 25px;
+          height: 8px;
+          border-radius: 12px;
+          background: rgba(196, 196, 196, 0.2);
+        }
+
+        .openCircle {
+          position: absolute;
+          top: -3px;
+          left: -4px;
+          width: 12px;
+          height: 12px;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          border-radius: 12px;
+          background: #ffffff;
+          border: 1px solid #c4c4c4;
+          box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.03);
+        }
+
+        &.open {
+          .openBack {
+            background: #ffe823;
+          }
+
+          .openCircle {
+            left: 18px;
+          }
+        }
+      }
+
+      .airName {
+        padding: 0px 0px 10px 15px;
+        width: calc(100% - 55px);
+        box-sizing: border-box;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        font-weight: 600;
+        font-size: 15px;
+        color: #4d5262;
+      }
+
+      .airBox {
+        display: flex;
+
+        .adjustBox {
+          width: 33.333%;
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          justify-content: center;
+
+          .valueBox {
+            height: 50px;
+            overflow: hidden;
+            color: #1f2429;
+
+            .valueWrap {
+              transition: transform 1s;
+
+              // transform: translateY(0px);
+              .value {
+                width: 100%;
+                height: 50px;
+                display: flex;
+                align-items: center;
+                //font-weight: 600;
+                justify-content: center;
+                text-align: center;
+                font-size: 14px;
+              }
+            }
+          }
+
+          .arrow {
+            width: 100%;
+            height: 18px;
+            font-size: 16px;
+            color: #405292;
+            display: flex;
+            justify-content: center;
+            cursor:pointer;
+
+            &.disable {
+              color: rgba(196, 196, 196, 0.8);
+            }
+          }
+
+          .adjustName {
+            color: #1f2429;
+            font-size: 12px;
+            padding-top: 8px;
+          }
+
+          &.disable {
+            .arrow {
+              color: rgba(196, 196, 196, 0.8);
+            }
+
+            .adjustName {
+              color: rgba(196, 196, 196, 1);
+            }
+
+            .valueBox {
+              color: rgba(196, 196, 196, 1);
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .air-text {
+    padding-bottom: 7px;
+  }
+
+  .air-content {
+    padding: 24px 15px 10px 30px;
+    box-sizing: border-box;
+    position: relative;
+  }
+
+  .air-switch {
+    position: absolute;
+    bottom: 5px;
+    right: 15px;
+  }
+
+  .air-adjust-env {
+    .envname {
+      font-family: PingFang SC;
+      color: rgba(77, 82, 98, 1);
+      font-size: 16px;
+      font-weight: 600;
+      line-height: 22px;
+    }
+
+    .envnum {
+      font-family: Montserrat;
+      font-size: 23px;
+      font-weight: 400;
+      line-height: 32px;
+      padding-top: 16px;
+      color: #1b144e;
+
+      .unit {
+        padding-left: 3px;
+        font-size: 14px;
+      }
+
+      label {
+        font-family: Mulish;
+        font-weight: 800;
+        font-size: 12px;
+        margin-left: 3px;
+        line-height: 15px;
+        vertical-align: top;
+        color: #c4c4c4;
+      }
+    }
+  }
+
+  .air-adjust-btn {
+    flex: 1;
+
+    .airImg {
+      position: absolute;
+      top: 0;
+      right: 0;
+      width: 157px;
+      height: 110px;
+    }
+  }
+
+  .air-common-text {
+    padding-top: 2px;
+    font-family: PingFang SC;
+    font-size: 13px;
+    font-weight: 400;
+    line-height: 15px;
+    color: rgba(196, 196, 196, 1);
+
+    &.change-text {
+      font-size: 12px;
+      line-height: 20px;
+    }
+  }
+
+  .office-card {
+    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.07),
+      0px 4px 10px rgba(0, 0, 0, 0.05);
+    border-radius: 25px;
+    background: #ffffff;
+    margin-bottom: 15px;
+  }
+
+  .air-show-all {
+    height: 25px;
+
+    .text {
+      margin-right: 4px;
+    }
+
+    .air-arrow {
+      width: 25px;
+      height: 18px;
+    }
+
+    .showarrow {
+      color: #4d5262;
+    }
+
+    .arrow {
+      padding-top: 4px;
+    }
+  }
+
+  .air-show-all-cont {
+    font-family: PingFang SC;
+    font-size: 14px;
+    font-weight: 400;
+    line-height: 25px;
+    color: rgba(196, 196, 196, 1);
+    display: flex;
+    align-items: center;
+    width:90px;
+    cursor:pointer;
+  }
+
+  .air-control-item {
+    padding: 11px 14px 11px 21px;
+    box-sizing: border-box;
+    border-top: 1px solid rgba(196, 196, 196, 0.4);
+    &.temp-item{
+      cursor: default;
+    }
+    &.item-flex {
+      display: flex;
+      justify-content: space-between;
+    }
+
+    .temp-wrap {
+      display: flex;
+      padding-top: 26px;
+      padding-bottom: 5px;
+      height: 20px;
+      align-items: center;
+
+      .minVal {
+        color: #c4c4c4;
+        font-size: 12px;
+        flex-grow: 0;
+        margin-right: 8px;
+      }
+
+      .maxVal {
+        color: #c4c4c4;
+        font-size: 12px;
+        flex-grow: 0;
+        margin-left: 8px;
+      }
+
+      .tempBar {
+        //background: red;
+        height: 10px;
+        flex-grow: 1;
+        position: relative;
+        display: flex;
+        border-radius: 10px;
+        cursor:pointer;
+
+        .circle {
+          position: absolute;
+          width: 19px;
+          height: 19px;
+          left: 0px;
+          top: -5px;
+          background: #ffffff;
+          box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1),
+            0px 4px 10px rgba(0, 0, 0, 0.07);
+          border-radius: 21px;
+          z-index: 1;
+
+          .tvalue {
+            position: relative;
+            top: -26px;
+            text-align: center;
+            color: #1f2429;
+            font-size: 12px;
+            white-space: nowrap;
+          }
+
+          &.disable {
+            opacity: 0.6;
+          }
+        }
+
+        .eachBlock {
+          width: 20%;
+          background: red;
+
+          &:nth-child(1) {
+            background: #5e8bcf;
+            border-top-left-radius: 10px;
+            border-bottom-left-radius: 10px;
+          }
+
+          &:nth-child(2) {
+            background: #9fb7cd;
+          }
+
+          &:nth-child(3) {
+            background: #f3f3f3;
+          }
+
+          &:nth-child(4) {
+            background: #ff9882;
+          }
+
+          &:nth-child(5) {
+            background: #e5574f;
+            border-top-right-radius: 10px;
+            border-bottom-right-radius: 10px;
+          }
+        }
+      }
+    }
+
+    .air-control-item-box {
+      display: flex;
+      // align-items: center;
+      flex-direction: column;
+    }
+
+    .envnum-common {
+      font-family: Montserrat;
+      font-weight: 500;
+      line-height: 24px;
+      font-size: 14px;
+      color: rgba(77, 82, 98, 1);
+
+      &.air-envnum-comon {
+        display: flex;
+        align-items: center;
+      }
+
+      .envnum-common-wind {
+        font-family: Montserrat;
+        font-size: 12px;
+        font-weight: 500;
+        line-height: 15px;
+        margin-right: 7px;
+        color: rgba(196, 196, 196, 1);
+
+        &.windBlack {
+          font-size: 20px;
+          font-weight: 500;
+          line-height: 24px;
+          color: rgba(77, 82, 98, 1);
+        }
+      }
+
+      &.colorRed {
+        color: red;
+      }
+
+      &.colorBlue {
+        color: rgba(94, 139, 207, 1);
+      }
+
+      &.colorBlack {
+        color: rgba(77, 82, 98, 1);
+      }
+
+      label {
+        font-size: 11px;
+        line-height: 13px;
+        color: rgba(196, 196, 196, 1);
+        vertical-align: top;
+      }
+    }
+
+    .air-common-switch {
+      display: flex;
+    }
+
+    .switch:last-child {
+      margin-right: 0px;
+    }
+
+    .switch {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      height: 40px;
+      width: 40px;
+      font-size: 12px;
+      margin-right: 18px;
+      //background: #c4c4c433;
+      background: rgba(196, 196, 196, 0.2);
+      border-radius: 50%;
+      cursor:pointer;
+
+      .wimg {
+        width: 20px;
+        height: 20px;
+      }
+
+      &.yell {
+        background: #ffe823;
+      }
+    }
+  }
+
+  .disabled {
+    opacity: 0.4;
+  }
+
+}

+ 32 - 8
src/pages/Equipment/components/deviceModal/index.jsx

@@ -5,6 +5,7 @@ import Icon from '@/tenants-ui/SgIcon';
 import styles from './index.less';
 import { equipImageMap } from '@/config/sagacare/sagacare_image.js';
 import AirEq from './airEq';
+import AirEqHand from './airEqHand';
 import LampEq from './lampEq';
 import CurtainEq from './curtainEq';
 import { getSpaceAdjustList } from '@/services/sagacare_service/equipment';
@@ -86,6 +87,8 @@ export default ({ onClose, showSpace }) => {
   const [spaceName, setSpaceName] = useState('');
   const [paramList, setParamList] = useState([]);
   const [timeArr, setTimeArr] = useState([]);
+  const [controlMode, setControlMode] = useState(0);
+
   let timer = useRef(null);
   function showEqCard(type) {
     let flag = false;
@@ -123,6 +126,8 @@ export default ({ onClose, showSpace }) => {
                 jtem.num = item[jtem.id];
               }
             });
+
+            setControlMode(item.controlMode);
             setParamList(envArr);
           });
       })
@@ -233,6 +238,12 @@ export default ({ onClose, showSpace }) => {
     right: 0,
   });
   const draggleRef = useRef(null);
+
+  const changeDrag = (data) => {
+    console.log('xxx');
+    setDisabled(data);
+  };
+
   const onStart = (_event, uiData) => {
     const { clientWidth, clientHeight } = window.document.documentElement;
     const targetRect = draggleRef.current?.getBoundingClientRect();
@@ -275,7 +286,17 @@ export default ({ onClose, showSpace }) => {
             e.preventDefault();
           }}
         >
-          <div className={styles.header}>
+          <div
+            className={styles.header}
+            // onMouseOver={() => {
+            //   if (disabled) {
+            //     setDisabled(false);
+            //   }
+            // }}
+            // onMouseOut={() => {
+            //   setDisabled(true);
+            // }}
+          >
             <div className={styles.show}>
               <div className={styles.tileline}>
                 <img src={officeImg} className={styles.titleIcon}></img>
@@ -295,12 +316,7 @@ export default ({ onClose, showSpace }) => {
                     <Icon
                       className=""
                       type="wuren"
-                      style={{
-                        color: '#8B949E',
-                        fontWeight: 'bold',
-                        marginRight: '2px',
-                        fontSize: '9px',
-                      }}
+                      style={{ color: '#8B949E', marginRight: '2px', fontSize: '9px' }}
                     ></Icon>
                     无人
                   </span>
@@ -343,11 +359,19 @@ export default ({ onClose, showSpace }) => {
             </div>
             <div className={styles.devices}>
               <Row gutter={[12, 18]}>
-                {showEqCard('airConditioner') && (
+                {showEqCard('airConditioner') && controlMode == 0 && (
                   <Col span={12}>
                     <AirEq spaceId={showSpace.spaceId} projectId={projectObj.projectId}></AirEq>
                   </Col>
                 )}
+                {showEqCard('airConditioner') && controlMode == 1 && (
+                  <Col span={12}>
+                    <AirEqHand
+                      spaceId={showSpace.spaceId}
+                      projectId={projectObj.projectId}
+                    ></AirEqHand>
+                  </Col>
+                )}
                 {showEqCard('light') && (
                   <Col span={12}>
                     <LampEq spaceId={showSpace.spaceId} projectId={projectObj.projectId}></LampEq>

+ 6 - 0
src/pages/NoAuth/index copy.tsx

@@ -0,0 +1,6 @@
+import React, { useState, useEffect } from 'react';
+
+const NoAuth: React.FC = () => {
+  return <>没有权限,请关闭当前页面,重新从能源进入。</>;
+};
+export default NoAuth;

+ 140 - 96
src/services/sagacare_service/equipment.js

@@ -3,139 +3,183 @@ import { projectObj } from '@/config/api.js';
 import UserStorage from '@/config/sagacare/sagacare_user';
 
 function getProjectId() {
-    //const id = window.localStorage.getItem('localProjectId')
-    const id = projectObj.projectId
-    return id;
+  //const id = window.localStorage.getItem('localProjectId')
+  const id = projectObj.projectId;
+  return id;
 }
 
 function commonParams() {
-    var userObj = UserStorage.getInstance();
-     const user = userObj.getUser();
-     var pubname='sgadmin';
-    return `openid=${user.id}&pubname=${pubname}&projectId=${getProjectId()}&userId=${user.id}&userName=${user.name}&userPhone=${user.phone}`;
+  var userObj = UserStorage.getInstance();
+  const user = userObj.getUser();
+  var pubname = 'sgadmin';
+  return `openid=${user.id}&pubname=${pubname}&projectId=${getProjectId()}&userId=${
+    user.id
+  }&userName=${user.name}&userPhone=${user.phone}`;
 }
 
 // function commonParams() {
 //     return `openid=9a1ecfbacb6b4f249bf2dd3ec7793ead&pubname=sagacareAndtenantslink&projectId=${getProjectId()}&userName=%E5%AE%89%E5%B0%8F%E9%9C%9E&userPhone=17611228068&userId=9a1ecfbacb6b4f249bf2dd3ec7793ead`;
 // }
 
-
 //窗帘  设置设备
 //窗帘  设置设备
 export const setEquipeHttp = (params) => {
-    return request(`/sgadmin/duoduo-service/duoduoenv-service/object/eqp/infocode/set?${commonParams()}`, {
-        method: 'POST',
-        isNotShowErrorToast: true,
-        errorSave: true,
-        data: JSON.stringify(params),
-        headers: {
-            'Content-Type': 'application/json',
-        },
-    });
-}
+  return request(
+    `/sgadmin/duoduo-service/duoduoenv-service/object/eqp/infocode/set?${commonParams()}`,
+    {
+      method: 'POST',
+      isNotShowErrorToast: true,
+      errorSave: true,
+      data: JSON.stringify(params),
+      headers: {
+        'Content-Type': 'application/json',
+      },
+    },
+  );
+};
 
 //窗帘 获取设备
 export const getObjectDataEqpGroupHttp = (params) => {
-    return request(`/sgadmin/duoduo-service/duoduoenv-service/object/objectDataEqpGroup/query?${commonParams()}`, {
-        method: 'POST',
-        isNotShowErrorToast: true,
-        errorSave: true,
-        data: JSON.stringify(params),
-        headers: {
-            'Content-Type': 'application/json',
-        }
-    });
-}
-
-
+  return request(
+    `/sgadmin/duoduo-service/duoduoenv-service/object/objectDataEqpGroup/query?${commonParams()}`,
+    {
+      method: 'POST',
+      isNotShowErrorToast: true,
+      errorSave: true,
+      data: JSON.stringify(params),
+      headers: {
+        'Content-Type': 'application/json',
+      },
+    },
+  );
+};
 
 // 灯的状态
 export const getLampHttp = (params) => {
-    return request(`/sgadmin/duoduo-service/duoduoenv-service/light/status/query?${commonParams()}&spaceId=${params}`, {
-        timeout:1000, 
-        skipErrorHandler:true,
-        method: 'GET',
-        headers: {
-            'Content-Type': 'application/json',
-        },
-    });
+  return request(
+    `/sgadmin/duoduo-service/duoduoenv-service/light/status/query?${commonParams()}&spaceId=${params}`,
+    {
+      timeout: 1000,
+      skipErrorHandler: true,
+      method: 'GET',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+    },
+  );
 };
 
-
 // 批量 开关灯
 export const setallLampHttp = (params) => {
-    return request(`/sgadmin/duoduo-service/duoduoenv-service/light/onoff/set?${commonParams()}`, {
-        method: 'POST',
-        isNotShowErrorToast: true,
-        errorSave: true,
-        data: JSON.stringify(params),
-        headers: {
-            'Content-Type': 'application/json',
-        },
-    });
+  return request(`/sgadmin/duoduo-service/duoduoenv-service/light/onoff/set?${commonParams()}`, {
+    method: 'POST',
+    isNotShowErrorToast: true,
+    errorSave: true,
+    data: JSON.stringify(params),
+    headers: {
+      'Content-Type': 'application/json',
+    },
+  });
 };
 
-// 开关失败时 定时查询灯状态 
+// 开关失败时 定时查询灯状态
 export const getStatusHttp = (params) => {
-    return request(`/sgadmin/duoduo-service/duoduoenv-service/light/onoff/setSatus?${commonParams()}`, {
-        method: 'POST',
-        isNotShowErrorToast: true,
-        errorSave: true,
-        data: JSON.stringify(params),
-        headers: {
-            'Content-Type': 'application/json',
-        },
-    });
+  return request(
+    `/sgadmin/duoduo-service/duoduoenv-service/light/onoff/setSatus?${commonParams()}`,
+    {
+      method: 'POST',
+      isNotShowErrorToast: true,
+      errorSave: true,
+      data: JSON.stringify(params),
+      headers: {
+        'Content-Type': 'application/json',
+      },
+    },
+  );
 };
 
-
 //  空调 - 调节文案/空调信息
 export const getFeedbackDocumentsHttp = (params) => {
-    return request(`/sgadmin/duoduo-service/duoduoenv-service/custom/feedback/documents?${commonParams()}`, {
-        isNotShowErrorToast: true,
-        errorSave: true,
-        method: 'POST',
-        data: JSON.stringify(params),
-        headers: {
-            'Content-Type': 'application/json',
-        },
-    });
+  return request(
+    `/sgadmin/duoduo-service/duoduoenv-service/custom/feedback/documents?${commonParams()}`,
+    {
+      isNotShowErrorToast: true,
+      errorSave: true,
+      method: 'POST',
+      data: JSON.stringify(params),
+      headers: {
+        'Content-Type': 'application/json',
+      },
+    },
+  );
 };
 
 //  空调 调节
 export const changeAirHttp = (params) => {
-    return request(`/sgadmin/duoduo-service/duoduoenv-service/custom/feedbackCreate/v2?${commonParams()}`, {
-        method: 'POST',
-        isNotShowErrorToast: true,
-        errorSave: true,
-        data: JSON.stringify({ ...params, projectId: getProjectId() }),
-        headers: {
-            'Content-Type': 'application/json',
-        },
-    });
+  return request(
+    `/sgadmin/duoduo-service/duoduoenv-service/custom/feedbackCreate/v2?${commonParams()}`,
+    {
+      method: 'POST',
+      isNotShowErrorToast: true,
+      errorSave: true,
+      data: JSON.stringify({ ...params, projectId: getProjectId() }),
+      headers: {
+        'Content-Type': 'application/json',
+      },
+    },
+  );
 };
 
 // 空间环境质量
 export const getSpaceAdjustList = (params) => {
-    return request(`/sgadmin/duoduo-service/duoduoenv-service/space/property?${commonParams()}`, {
-        method: 'POST',
-        isNotShowErrorToast: true,
-        errorSave: true,
-        data: params,
-        headers: {
-            'Content-Type': 'application/json',
-        },
-    });
-}
+  return request(`/sgadmin/duoduo-service/duoduoenv-service/space/property?${commonParams()}`, {
+    method: 'POST',
+    isNotShowErrorToast: true,
+    errorSave: true,
+    data: params,
+    headers: {
+      'Content-Type': 'application/json',
+    },
+  });
+};
 //  批量空调 调节
 export const changeAllAirHttp = (body) => {
-    return request(`/sgadmin/duoduo-service/duoduoenv-service/custom/feedbackCreate/v2Batch?${commonParams()}`, {
-        method: 'POST',
-        isNotShowErrorToast: true,
-        errorSave: true,
-        data: body,
-        headers: {
-            'Content-Type': 'application/json',
-        },
-    });
+  return request(
+    `/sgadmin/duoduo-service/duoduoenv-service/custom/feedbackCreate/v2Batch?${commonParams()}`,
+    {
+      method: 'POST',
+      isNotShowErrorToast: true,
+      errorSave: true,
+      data: body,
+      headers: {
+        'Content-Type': 'application/json',
+      },
+    },
+  );
+};
+
+// 查询空间空调信息
+export const querySpaceConditioners = (params) => {
+  return request(
+    `/sgadmin/duoduo-service/duoduoenv-service/ctrl/querySpaceConditioners?${commonParams()}&spaceId=${
+      params.spaceId
+    }`,
+    {
+      method: 'GET',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+    },
+  );
+};
+
+//  手动控制 下发指令
+export const changeManualTempHttp = (params) => {
+  return request(`/sgadmin/duoduo-service/duoduoenv-service/ctrl/set?${commonParams()}`, {
+    method: 'POST',
+    data: params,
+    headers: {
+      'Content-Type': 'application/json',
+    },
+  });
 };