tianyabing 2 роки тому
батько
коміт
a7dcf19a6c
43 змінених файлів з 3229 додано та 112 видалено
  1. 1 0
      src/api/work/apiWorkFloor.js
  2. 4 0
      src/api/work/apiWorkMeeting.js
  3. BIN
      src/assets/images/scene/device/bulb-full.png
  4. BIN
      src/assets/images/scene/device/shuiweijianceshebei.png
  5. 1 1
      src/components/dashboard/more/carbonOverviewChart.vue
  6. 2 2
      src/components/dashboard/portrait/coldPortrait.vue
  7. 1 1
      src/components/dashboard/portrait/electricityPortrait.vue
  8. 2 2
      src/components/dashboard/portrait/hotPortrait.vue
  9. 1 1
      src/components/dashboard/portrait/money/investDistributeChart.vue
  10. 5 1
      src/components/dashboard/portrait/money/investYearChart.vue
  11. 4 3
      src/components/dashboard/portrait/restaurant/restaurantTrendChart.vue
  12. 8 7
      src/components/dashboard/portrait/restaurantPortrait.vue
  13. 2 2
      src/components/dashboard/portrait/supermarket/supermarketTrendChart.vue
  14. 1 1
      src/components/dashboard/portrait/waterPortrait.vue
  15. 1 1
      src/components/life/healthyHome/components/lifeHealthyHomeChart.vue
  16. 1 1
      src/components/life/restaurant/components/lifeRestConsumeChart.vue
  17. 5 5
      src/components/life/restaurant/components/lifeRestDailyMenu.vue
  18. 1 1
      src/components/life/restaurant/components/lifeRestEatChart.vue
  19. 2 2
      src/components/life/supermarket/components/lifeSupermarketAnalysisChart.vue
  20. 4 3
      src/components/scene/energy/common/deviceCardAir.vue
  21. 96 0
      src/components/scene/energy/common/deviceCardLight.vue
  22. 103 0
      src/components/scene/energy/common/deviceCardWater.vue
  23. 3 0
      src/components/scene/energy/sceneEnergyAircondition.vue
  24. 264 19
      src/components/scene/energy/sceneEnergyAircondition/airconditioningCard.vue
  25. 568 0
      src/components/scene/energy/sceneEnergyAircondition/sceneWaterCard.vue
  26. 572 0
      src/components/scene/energy/sceneEnergyAircondition/scenelightCard.vue
  27. 7 4
      src/components/scene/energy/sceneEnergyLight.vue
  28. 7 4
      src/components/scene/energy/sceneEnergyWater.vue
  29. 371 0
      src/components/scene/energy/tactics/AirTactics.vue
  30. 325 0
      src/components/scene/energy/tactics/lightTactics.vue
  31. 297 0
      src/components/scene/energy/tactics/waterTactics.vue
  32. 51 7
      src/components/security/alarm/manage/securityAlarmManageDistributeMap.vue
  33. 142 1
      src/components/security/alarm/securityAlarmGrid.vue
  34. 138 1
      src/components/security/alarm/securityAlarmInfo.vue
  35. 5 5
      src/components/security/alarm/securityAlarmMap.vue
  36. 5 18
      src/components/security/common/securityDeviceSelect.vue
  37. 170 5
      src/components/security/device/securityDevice.vue
  38. 27 5
      src/components/security/device/securityDeviceItem.vue
  39. 6 3
      src/components/work/bus/component/workBusChart.vue
  40. 1 1
      src/components/work/overview/workOverview.vue
  41. 2 2
      src/components/work/print/component/workPrintChart.vue
  42. 20 2
      src/components/work/print/workPrint.vue
  43. 3 1
      src/utils/constant.js

+ 1 - 0
src/api/work/apiWorkFloor.js

@@ -2,6 +2,7 @@ import Request from "@/utils/request";
 
 // 核心指标
 const getCoreData = (timeRange) => {
+
     return Request.post('/floor/getFloorCoreIndicators', timeRange)
 }
 

+ 4 - 0
src/api/work/apiWorkMeeting.js

@@ -14,6 +14,10 @@ const getMeetingRecords = (timeRange) => {
     return Request.post('/meeting/getConferenceRoomInfo', timeRange)
 }
 
+const x = () => {
+    return Request.post('/meeting/getConferenceRoomTreeInfo')
+}
+
 export default {
     getCoreData,
     getMeetingCostTrend,

BIN
src/assets/images/scene/device/bulb-full.png


BIN
src/assets/images/scene/device/shuiweijianceshebei.png


+ 1 - 1
src/components/dashboard/more/carbonOverviewChart.vue

@@ -57,7 +57,7 @@ export default {
             data: [],
             type: 'bar',
             stack: 'A',
-            barWidth: '40%',
+            barWidth: '25',
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
             }

+ 2 - 2
src/components/dashboard/portrait/coldPortrait.vue

@@ -15,9 +15,9 @@ export default {
         },
         {
           type: 0,
-          title: '今日用冷趋',
+          title: '今日用冷趋',
           num: 0,
-          historyDesc: '比',
+          historyDesc: '比',
           showTrendIcon: true,
         },
         {

+ 1 - 1
src/components/dashboard/portrait/electricityPortrait.vue

@@ -26,7 +26,7 @@ export default {
           title: '今日用电趋势',
           num: 0,
           showTrendIcon: true,
-          historyDesc: '比',
+          historyDesc: '比',
         },
         {
           type: 0,

+ 2 - 2
src/components/dashboard/portrait/hotPortrait.vue

@@ -18,11 +18,11 @@ export default {
           title: '今日用热趋势',
           num: 0,
           showTrendIcon: true,
-          historyDesc: '比',
+          historyDesc: '比',
         },
         {
           type: 1,
-          title: '人均用热成本(kWh)',
+          title: '人均用热成本(元/人/天)',
           content: ''
         },
         {

+ 1 - 1
src/components/dashboard/portrait/money/investDistributeChart.vue

@@ -75,7 +75,7 @@ export default {
             data: [],
             type: 'bar',
             stack: 'A',
-            barWidth: '30%',
+            barWidth: '30',
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
             }

+ 5 - 1
src/components/dashboard/portrait/money/investYearChart.vue

@@ -32,6 +32,8 @@ export default {
           {
             name: '已使用时间',
             type: 'value',
+            min: 0,
+            max: 50,
             nameTextStyle: {
               padding: [10, 0, 10, 15]
             },
@@ -39,6 +41,8 @@ export default {
           {
             type: 'value',
             name: '标准年限',
+            min: 0,
+            max: 50,
             nameTextStyle: {
               padding: [10, 20, 10, 0]
             },
@@ -68,7 +72,7 @@ export default {
             data: [],
             type: 'bar',
             stack: 'A',
-            barWidth: '30%',
+            barWidth: '30',
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
             }

+ 4 - 3
src/components/dashboard/portrait/restaurant/restaurantTrendChart.vue

@@ -37,14 +37,14 @@ export default {
             name: '金额(元)',
             type: 'value',
             nameTextStyle: {
-              padding: [10, 0, 10, -12]
+              padding: [10, 40, 10, 0]
             },
           },
           {
             name: '订单(单)',
             type: 'value',
             nameTextStyle: {
-              padding: [10, 0, 10, 10]
+              padding: [10, 0, 10, 0]
             },
           },
         ],
@@ -85,7 +85,7 @@ export default {
             data: [],
             type: 'bar',
             yAxisIndex:0,
-            barWidth: '20%',
+            barWidth: this.$constant.ECHARTS_BAR_WIDTH,
             backgroundStyle: {
               color: 'rgb(253, 232, 229, 0.5)'
             },
@@ -127,6 +127,7 @@ export default {
   props: {
     height: Number,
     data: Array,
+    queryData: Object,
   },
   mounted() {
     this.$nextTick(()=>{

+ 8 - 7
src/components/dashboard/portrait/restaurantPortrait.vue

@@ -5,7 +5,13 @@ import CoreData from "@/components/common/coreData.vue";
 import RestaurantTrendChart from "@/components/dashboard/portrait/restaurant/restaurantTrendChart.vue";
 export default {
   data() {
+    let range = this.$util.dateUtil.getNearlyMonthRange();
     return {
+      queryData: {
+        companyId: '0',
+        deptId: '0',
+        timeRange: range
+      },
       coreData: [
         {
           type: 0,
@@ -58,7 +64,7 @@ export default {
       //this.getTrendData()
     },
     getCoreData() {
-      api.getRestCoreData().then(res=>{
+      api.getRestCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value
@@ -69,11 +75,6 @@ export default {
         this.coreData[4].content = res.worthAttention
       })
     },
-    getTrendData() {
-      api.getRestTrendData().then(res=>{
-
-      })
-    }
   }
 }
 </script>
@@ -84,7 +85,7 @@ export default {
       <CoreData :data-list="coreData"></CoreData>
     </div>
     <div style="padding: 15px">
-      <RestaurantTrendChart :height="chartHeight"></RestaurantTrendChart>
+      <RestaurantTrendChart :query-data="queryData" :height="chartHeight"></RestaurantTrendChart>
     </div>
   </div>
 </template>

+ 2 - 2
src/components/dashboard/portrait/supermarket/supermarketTrendChart.vue

@@ -41,7 +41,7 @@ export default {
             name: '金额(元)',
             type: 'value',
             nameTextStyle: {
-              padding: [10, 0, 10, -12]
+              padding: [10, 20, 10, 0]
             },
           },
           {
@@ -89,7 +89,7 @@ export default {
             data: [],
             type: 'bar',
             yAxisIndex:0,
-            barWidth: 20,
+            barWidth: this.$constant.ECHARTS_BAR_WIDTH,
             backgroundStyle: {
               color: 'rgb(253, 232, 229, 0.5)'
             },

+ 1 - 1
src/components/dashboard/portrait/waterPortrait.vue

@@ -26,7 +26,7 @@ export default {
           title: '今日用水趋势',
           num: 0,
           showTrendIcon: true,
-          historyDesc: '比',
+          historyDesc: '比',
           historyNum: '0'
         },
         {

+ 1 - 1
src/components/life/healthyHome/components/lifeHealthyHomeChart.vue

@@ -79,7 +79,7 @@ export default {
             name: '进舱人数',
             data: [],
             type: 'bar',
-            barWidth: '15%',
+            barWidth: this.$constant.ECHARTS_BAR_WIDTH,
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
             },

+ 1 - 1
src/components/life/restaurant/components/lifeRestConsumeChart.vue

@@ -103,7 +103,7 @@ export default {
             data: [],
             type: 'bar',
             stack: 'A',
-            barWidth: '25%',
+            barWidth: this.$constant.ECHARTS_BAR_WIDTH,
             yAxisIndex:1,
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'

+ 5 - 5
src/components/life/restaurant/components/lifeRestDailyMenu.vue

@@ -8,15 +8,12 @@
     :customRow="customRow"
   >
     <template #cuisineType="text,record">
-      <span v-if="text==0">热菜</span>
       <span v-if="text==1">主食</span>
       <span v-if="text==2">汤</span>
+      <span v-if="text==3">热菜</span>
     </template>
     <template #price="text, record">
-        <span v-for="(value, key, index) in JSON.parse(text)" :key = index>
-          <span v-if="index!=0">/</span>
-          {{key+value}}
-        </span>元
+      {{ text }}(元)
     </template>
   </a-table>
 </template>
@@ -33,6 +30,8 @@ export default {
           dataIndex: "cuisineType",
           key: "cuisineType",
           scopedSlots: { customRender: 'cuisineType' },
+          width: 80,
+          align: 'center',
         },
         {
           dataIndex: "cuisineName",
@@ -41,6 +40,7 @@ export default {
         {
           dataIndex: "price",
           key: "price",
+          width: 120,
           scopedSlots: { customRender: 'price' },
         },
       ],

+ 1 - 1
src/components/life/restaurant/components/lifeRestEatChart.vue

@@ -102,7 +102,7 @@ export default {
             type: 'bar',
             stack: 'A',
             yAxisIndex: 1,
-            barWidth: '25%',
+            barWidth: this.$constant.ECHARTS_BAR_WIDTH,
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
             },

+ 2 - 2
src/components/life/supermarket/components/lifeSupermarketAnalysisChart.vue

@@ -122,7 +122,7 @@ export default {
             data: [],
             type: 'bar',
             stack: 'A',
-            barWidth: '15%',
+            barWidth: '30%',
             yAxisIndex: 1,
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
@@ -143,7 +143,7 @@ export default {
             data: [],
             type: 'bar',
             stack: 'B',
-            barWidth: '15%',
+            barWidth: '30%',
             yAxisIndex: 2,
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'

+ 4 - 3
src/components/scene/energy/common/deviceCardAir.vue

@@ -79,6 +79,9 @@ export default {
     padding-top: 14px;
     padding-left: 20px;
     font-size: 16px;
+    .anticon:hover {
+      background-color: rgba(182, 182, 182, 0.7);
+    }
   }
   .deviceCardAir-bottom {
     margin-top: 12px;
@@ -88,8 +91,6 @@ export default {
   .anticon {
     //padding: 6px;
   }
-  .anticon:hover {
-    background-color: rgba(182, 182, 182, 0.7);
-  }
+
 }
 </style>

+ 96 - 0
src/components/scene/energy/common/deviceCardLight.vue

@@ -0,0 +1,96 @@
+<template>
+  <div class="deviceCardAir" :style="{backgroundColor: color}">
+
+    <div class="deviceCardAir-top">
+      <span>#{{ item.id }}</span>
+      <span @click="toggle(item)" class="anticon" style="float: right;border-radius: 15px;cursor: pointer;padding: 6px 8px 7px;margin-right: 15px">
+        <a-icon type="poweroff"  />
+      </span>
+    </div>
+
+    <!--<div class="deviceCardAir-content">-->
+    <!--  <div style="font-size: 18px;width: 20px;margin-left: 20px;margin-top: 12px;display: inline-block">-->
+    <!--    <span v-if="item.online && item.mode=='hot'">制热</span>-->
+    <!--    <span v-if="item.online && item.mode=='cold'">制冷</span>-->
+    <!--    <span v-if="!item.online">-</span>-->
+    <!--  </div>-->
+    <!--  <div style="display: inline-block;font-size: 25px;vertical-align: top;padding-top: 20px;margin-left: 10%">-->
+    <!--    <span>{{ item.tm }}ºC</span>-->
+    <!--  </div>-->
+    <!--</div>-->
+
+    <div class="deviceCardAir-bottom">
+      <span class="anticon" >
+        <a-icon type="setting" />
+      </span>
+      <span style="margin-left: 15px">
+        {{ item.name }}
+      </span>
+    </div>
+
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      color: '',
+    }
+  },
+  props: {
+    item: Object,
+    toggle: Function
+  },
+  watch: {
+    "item.online": function (val) {
+      if (this.item.online) {
+        this.color='#2ea8e5';
+      } else {
+        this.color='#bebebe'
+      }
+    },
+  },
+  mounted() {
+    if (this.item.online) {
+      this.color='#2ea8e5';
+    } else {
+      this.color='#bebebe'
+    }
+  },
+  methods: {
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.deviceCardAir {
+  width: 100%;
+  height: 10rem;
+  background-color: #2ea8e5;
+  border-radius: 4px;
+  color: white;
+  background-image: url("@/assets/images/scene/device/bulb-full.png");
+  background-repeat: no-repeat;
+  background-position: 85% 70%;
+  background-size: 25%;
+  .deviceCardAir-top {
+    padding-top: 14px;
+    padding-left: 20px;
+    font-size: 20px;
+    .anticon:hover {
+      background-color: rgba(182, 182, 182, 0.7);
+    }
+  }
+  .deviceCardAir-bottom {
+    margin-top: 15%;
+    margin-left: 18px;
+    font-size: 23px;
+  }
+  .anticon {
+    //padding: 6px;
+  }
+
+}
+</style>

+ 103 - 0
src/components/scene/energy/common/deviceCardWater.vue

@@ -0,0 +1,103 @@
+<template>
+  <div class="deviceCardAir" :style="{backgroundColor: color}">
+
+    <div class="deviceCardAir-top">
+      <span>#{{ item.id }}</span>
+      <span @click="toggle(item)" class="anticon" style="float: right;border-radius: 15px;cursor: pointer;padding: 6px 8px 7px;margin-right: 15px">
+        <a-icon type="poweroff"  />
+      </span>
+    </div>
+
+    <div class="deviceCardAir-bottom">
+      <a-row>
+        <a-col :span="8">
+          <div style="height: 8px"></div>
+          <div :style="{backgroundColor: item.online?'#2eb8e6':'#bebebe'}" style="font-size: 14px;text-align: center;width: 60px;padding: 3px 0;vertical-align: top;">
+            <div>净水量</div>
+            <div v-if="item.online && item.waterNum">{{ item.waterNum }}m²</div>
+            <div v-else>-</div>
+          </div>
+        </a-col>
+        <a-col :span="8"></a-col>
+        <a-col :span="8">
+          <div>
+            <div v-if="item.online && item.tm">{{ item.tm + '℃' }}</div>
+            <div v-else>-</div>
+            <div>
+              <span v-if="item.online && item.status=='1'">加水中</span>
+              <span v-if="item.online && item.status=='2'">保温中</span>
+            </div>
+          </div>
+        </a-col>
+      </a-row>
+      <!--<span style="margin-left: 15px">-->
+      <!--  {{ item.name }}-->
+      <!--</span>-->
+    </div>
+
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      color: '',
+    }
+  },
+  props: {
+    item: Object,
+    toggle: Function
+  },
+  watch: {
+    "item.online": function (val) {
+      if (this.item.online) {
+        this.color='#2ea8e5';
+      } else {
+        this.color='#bebebe'
+      }
+    },
+  },
+  mounted() {
+    if (this.item.online) {
+      this.color='#2ea8e5';
+    } else {
+      this.color='#bebebe'
+    }
+  },
+  methods: {
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.deviceCardAir {
+  width: 100%;
+  height: 10rem;
+  background-color: #2ea8e5;
+  border-radius: 4px;
+  color: white;
+  background-image: url("@/assets/images/scene/device/shuiweijianceshebei.png");
+  background-repeat: no-repeat;
+  background-position: 47% 70%;
+  background-size: 25%;
+  .deviceCardAir-top {
+    padding-top: 14px;
+    padding-left: 20px;
+    font-size: 20px;
+    .anticon:hover {
+      background-color: rgba(182, 182, 182, 0.7);
+    }
+  }
+  .deviceCardAir-bottom {
+    margin-top: 10px;
+    margin-left: 18px;
+    font-size: 23px;
+  }
+  .anticon {
+    //padding: 6px;
+  }
+
+}
+</style>

+ 3 - 0
src/components/scene/energy/sceneEnergyAircondition.vue

@@ -15,6 +15,7 @@
 
     <div class="dashboardPortrait-body">
       <AirconditioningCard v-if="currCheck == 'air'" />
+      <AirTactics v-if="currCheck == 'methods'" />
     </div>
 
   </div>
@@ -23,11 +24,13 @@
 <script>
 import timeRange from "@/components/common/timeRange.vue";
 import AirconditioningCard from "@/components/scene/energy/sceneEnergyAircondition/airconditioningCard.vue";
+import AirTactics from "@/components/scene/energy/tactics/AirTactics.vue";
 
 export default {
   components: {
     AirconditioningCard,
     timeRange,
+    AirTactics,
   },
   data() {
     return {

+ 264 - 19
src/components/scene/energy/sceneEnergyAircondition/airconditioningCard.vue

@@ -47,11 +47,12 @@
     </div>
 
     <div class="sceneCard-control">
+
       <div style="display: inline-block;width: 50%;text-align: left">
         <a-space>
           <a-button style="font-size: 12px" size="small" @click="allPowerOff"><a-icon type="poweroff" />全开</a-button>
           <a-button style="font-size: 12px" size="small" @click="allPowerOn"><a-icon type="poweroff" />全关</a-button>
-          <a-button type="primary" size="small" style="font-size: 12px" >批量执行策略</a-button>
+          <a-button type="primary" size="small" style="font-size: 12px" v-show="!showCard" @click="()=>{this.showBatchCL=true}">批量执行策略</a-button>
         </a-space>
       </div>
 
@@ -60,21 +61,29 @@
           <a-select-option value="0">
             按楼层显示
           </a-select-option>
-          <a-select-option value="1">
-            按公司
-          </a-select-option>
-          <a-select-option value="2">
-            按功能
-          </a-select-option>
-          <a-select-option value="3">
-            按分组
-          </a-select-option>
+          <!--<a-select-option value="1">-->
+          <!--  按公司-->
+          <!--</a-select-option>-->
+          <!--<a-select-option value="2">-->
+          <!--  按功能-->
+          <!--</a-select-option>-->
+          <!--<a-select-option value="3">-->
+          <!--  按分组-->
+          <!--</a-select-option>-->
         </a-select>
         <a-button type="link" @click="toggleShowCard"><a-icon type="unordered-list" />
           <span v-if="showCard">列表模式</span>
           <span v-if="!showCard">卡片模式</span>
         </a-button>
       </div>
+
+
+      <a-alert type="success" show-icon v-if="selectedRowKeys.length>0" closeText="取消选择" @close="clearSelectRow">
+        <template #message>
+          已选择{{ selectedRowKeys.length }}台设备
+        </template>
+      </a-alert>
+
     </div>
 
     <div class="airContainer">
@@ -114,7 +123,39 @@
           </template>
           <template v-if="!showCard">
             <div :key="item.value" :id="item.label" v-show="currFloor==item.label">
-              <a-table></a-table>
+              <a-table :rowKey=" (record, index) => record.id"
+                       :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+                       :columns="columns"
+                       :show-header="true"
+                       :data-source="item.devices"
+                       :pagination="false"
+                       :scroll="{ y: 400 }"
+              >
+                <template #name="text, record">
+                  <span>{{ record.id }}</span>
+                </template>
+                <template #mode="text, record">
+                  <span v-if="text=='hot'">制热</span>
+                  <span v-if="text=='cold'">制冷</span>
+                </template>
+                <template #tm="text, record">
+                  <span>{{text}}°C</span>
+                </template>
+                <template #isControl="text, record">
+                  <span>是</span>
+                </template>
+                <template #online="text, record">
+                  <span v-if="text">
+                    <span style="color: #19b955;background-color: #19b955;width: 15px;height: 15px;display: inline-block;border-radius: 8px;vertical-align: middle">•</span> 在线
+                  </span>
+                  <span v-if="!text">
+                    <span style="color: gray;background-color: gray;width: 15px;height: 15px;display: inline-block;border-radius: 8px;vertical-align: middle">•</span> 离线
+                  </span>
+                </template>
+                <template #strategy="text, record">
+                  <span>智慧场景策略配置</span>
+                </template>
+              </a-table>
             </div>
           </template>
 
@@ -122,6 +163,148 @@
       </div>
     </div>
 
+    <a-modal title="批量执行策略" v-if="showBatchCL" v-model="showBatchCL" width="500" height="300" centered style="max-height: 300px;overflow-y: auto" @ok="handleOk">
+      <a-form-model :form="formData" :label-col="{span:6}" :wrapperCol="{span:16}" style="overflow-y: auto;height: 450px">
+
+        <a-form-item label="选择策略:" class="formItem" >
+          <a-radio-group v-model="formData.resource">
+            <a-radio value="1">已有策略</a-radio>
+            <a-radio value="2">自定义</a-radio>
+          </a-radio-group>
+        </a-form-item>
+
+        <a-form-item label="策略名称:" class="formItem" >
+          <template v-if="formData.resource=='1'">
+            <a-select default-value="0" style="width: 200px" v-model="formData.clId">
+              <a-select-option value="0"> 策略1 </a-select-option>
+              <!--<a-select-option v-for="item in companyData" :key="item.value" :value="item.value"> {{ item.label }} </a-select-option>-->
+            </a-select>
+          </template>
+          <template v-else>
+            <a-input v-model="formData.clName" placeholder="请输入策略名称" />
+          </template>
+        </a-form-item>
+
+        <a-form-item label="执行方式:" class="formItem" >
+          <a-select default-value="0" style="width: 200px" v-model="formData.method" >
+            <a-select-option value="1"> 每日执行 </a-select-option>
+            <a-select-option value="2"> 工作日与非工作日区别执行 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="执行时间:" class="formItem" >
+          <timeRange time-format="yyyy/MM/DD" :time-range="formData.timeRange" />
+        </a-form-item>
+
+        <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" v-if="formData.method=='2'" >工作日策略 -</div>
+
+        <a-form-item label="开机策略:" class="formItem" >
+          <a-select default-value="0" style="width: 200px" v-model="formData.openCl">
+            <a-select-option value="0"> 定时开关机 </a-select-option>
+            <a-select-option value="1"> 24小时开机 </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item label="开机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.openTime" :disabled="!(formData.openCl=='0')" />
+        </a-form-item>
+        <a-form-item label="关机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0')" />
+        </a-form-item>
+        <a-form-item label="空调模式:" class="formItem" >
+          <a-select style="width: 200px" v-model="formData.mode">
+            <a-select-option value="1"> 制冷 </a-select-option>
+            <a-select-option value="2"> 制热 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="空调风速:" class="formItem" >
+          <a-select style="width: 200px" v-model="formData.wind">
+            <a-select-option value="1"> 一级 </a-select-option>
+            <a-select-option value="2"> 二级 </a-select-option>
+            <a-select-option value="3"> 三级 </a-select-option>
+            <a-select-option value="0"> 自动 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="设置温度:" class="formItem" >
+          <a-select style="width: 200px" v-model="formData.tm">
+            <a-select-option value="18"> 18°C </a-select-option>
+            <a-select-option value="19"> 19°C </a-select-option>
+            <a-select-option value="20"> 20°C </a-select-option>
+            <a-select-option value="21"> 21°C </a-select-option>
+            <a-select-option value="22"> 22°C </a-select-option>
+            <a-select-option value="23"> 23°C </a-select-option>
+            <a-select-option value="24"> 24°C </a-select-option>
+            <a-select-option value="25"> 25°C </a-select-option>
+            <a-select-option value="26"> 26°C </a-select-option>
+            <a-select-option value="27"> 27°C </a-select-option>
+            <a-select-option value="28"> 28°C </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="人体感应:" class="formItem" >
+          <a-select default-value="0" style="width: 200px" v-model="formData.sensor">
+            <a-select-option value="0"> 无 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <div v-if="formData.method=='2'">
+
+          <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" >非工作日策略 -</div>
+
+          <a-form-item label="开机策略:" class="formItem" >
+            <a-select default-value="0" style="width: 200px" v-model="formData.openCl">
+              <a-select-option value="0"> 定时开关机 </a-select-option>
+              <a-select-option value="1"> 24小时开机 </a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item label="开机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.openTime"  :disabled="!(formData.openCl=='0')"/>
+          </a-form-item>
+          <a-form-item label="关机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0')" />
+          </a-form-item>
+          <a-form-item label="空调模式:" class="formItem" >
+            <a-select style="width: 200px" v-model="formData.mode">
+              <a-select-option value="1"> 制冷 </a-select-option>
+              <a-select-option value="2"> 制热 </a-select-option>
+            </a-select>
+          </a-form-item>
+
+          <a-form-item label="空调风速:" class="formItem" >
+            <a-select style="width: 200px" v-model="formData.wind">
+              <a-select-option value="1"> 一级 </a-select-option>
+              <a-select-option value="2"> 二级 </a-select-option>
+              <a-select-option value="3"> 三级 </a-select-option>
+              <a-select-option value="0"> 自动 </a-select-option>
+            </a-select>
+          </a-form-item>
+
+          <a-form-item label="设置温度:" class="formItem" >
+            <a-select style="width: 200px" v-model="formData.tm">
+              <a-select-option value="18"> 18°C </a-select-option>
+              <a-select-option value="19"> 19°C </a-select-option>
+              <a-select-option value="20"> 20°C </a-select-option>
+              <a-select-option value="21"> 21°C </a-select-option>
+              <a-select-option value="22"> 22°C </a-select-option>
+              <a-select-option value="23"> 23°C </a-select-option>
+              <a-select-option value="24"> 24°C </a-select-option>
+              <a-select-option value="25"> 25°C </a-select-option>
+              <a-select-option value="26"> 26°C </a-select-option>
+              <a-select-option value="27"> 27°C </a-select-option>
+              <a-select-option value="28"> 28°C </a-select-option>
+            </a-select>
+          </a-form-item>
+
+          <a-form-item label="人体感应:" class="formItem" >
+            <a-select default-value="0" style="width: 200px" v-model="formData.sensor">
+              <a-select-option value="0"> 无 </a-select-option>
+            </a-select>
+          </a-form-item>
+        </div>
+
+      </a-form-model>
+    </a-modal>
 
   </div>
 </template>
@@ -129,20 +312,69 @@
 <script>
 import Query from "@/components/common/query.vue";
 import DeviceCardAir from "@/components/scene/energy/common/deviceCardAir.vue";
+import timeRange from "@/components/common/timeRange.vue";
 export default {
   components: {
     Query,
     DeviceCardAir,
+    timeRange,
   },
   data() {
     return {
+      formData: {},
       currFloor: '1F',
       showCard: true,
+      showBatchCL: false,
       queryData: {
         switch: '0',
         mode: '0',
         tm: '0'
       },
+      selectedRowKeys: [],
+
+      columns: [
+        {
+          title: '名称',
+          dataIndex: 'name',
+          key: 'name',
+          scopedSlots: { customRender: 'name' },
+        },
+        {
+          title: '模式',
+          dataIndex: 'mode',
+          key: 'mode',
+          scopedSlots: { customRender: 'mode' },
+        },
+        {
+          title: '温度',
+          dataIndex: 'tm',
+          key: 'tm',
+          scopedSlots: { customRender: 'tm' },
+        },
+        {
+          title: '风速',
+          dataIndex: 'wind',
+          key: 'wind',
+        },
+        {
+          title: '是否支持调控',
+          dataIndex: 'isControl',
+          key: 'isControl',
+          scopedSlots: { customRender: 'isControl' },
+        },
+        {
+          title: '状态',
+          dataIndex: 'online',
+          key: 'online',
+          scopedSlots: { customRender: 'online' },
+        },
+        {
+          title: '执行策略',
+          dataIndex: 'strategy',
+          key: 'strategy',
+          scopedSlots: { customRender: 'strategy' },
+        },
+      ],
       oriFloors: [],
       floors: [
         {
@@ -219,13 +451,13 @@ export default {
           value: '4',
           devices: [
             {
-              id: '3101-1',
+              id: '4101-1',
               mode: 'hot',
               tm: '26',
               wind: '一级',
               online: true
             },{
-              id: '3101-2',
+              id: '4101-2',
               mode: 'hot',
               tm: '26',
               wind: '一级',
@@ -238,13 +470,13 @@ export default {
           value: '5',
           devices: [
             {
-              id: '3101-1',
+              id: '5101-1',
               mode: 'hot',
               tm: '26',
               wind: '一级',
               online: true,
             },{
-              id: '3101-2',
+              id: '5101-2',
               mode: 'hot',
               tm: '26',
               wind: '一级',
@@ -257,13 +489,13 @@ export default {
           value: '6',
           devices: [
             {
-              id: '3101-1',
+              id: '6101-1',
               mode: 'hot',
               tm: '26',
               wind: '一级',
               online: true
             },{
-              id: '3101-2',
+              id: '6101-2',
               mode: 'hot',
               tm: '26',
               wind: '一级',
@@ -276,13 +508,13 @@ export default {
           value: '7',
           devices: [
             {
-              id: '3101-1',
+              id: '7101-1',
               mode: 'hot',
               tm: '26',
               wind: '一级',
               online: true
             },{
-              id: '3101-2',
+              id: '7101-2',
               mode: 'hot',
               tm: '26',
               wind: '一级',
@@ -297,9 +529,16 @@ export default {
     this.oriFloors = JSON.parse(JSON.stringify(this.floors));
   },
   methods: {
+    clearSelectRow() {
+      this.selectedRowKeys = []
+    },
     reset() {
       this.floors = JSON.parse(JSON.stringify(this.oriFloors));
     },
+    handleOk() {
+      this.showBatchCL = false;
+      this.$message.success('设置成功')
+    },
     search() {
       let objarr = JSON.parse(JSON.stringify(this.oriFloors));
       let app = this
@@ -324,6 +563,9 @@ export default {
       })
       this.floors = objarr
     },
+    onSelectChange(val) {
+      this.selectedRowKeys = val
+    },
     toggleOnline(device) {
       device.online=!device.online;
     },
@@ -361,6 +603,9 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.formItem {
+  margin: 12px 0;
+}
 .sceneCard {
   width: 100%;
   height: 100%;

+ 568 - 0
src/components/scene/energy/sceneEnergyAircondition/sceneWaterCard.vue

@@ -0,0 +1,568 @@
+<template>
+  <div class="sceneCard">
+
+    <div class="sceneCard-query">
+      <Query :query-data.sync="queryData" :search="search" :reset="reset" >
+        <template #extraItem>
+
+          <a-form-model-item label="开关:" class="formItem">
+            <a-select default-value="0" style="width: 120px" v-model="queryData.switch">
+              <a-select-option value="0"> 全部 </a-select-option>
+              <a-select-option value="1"> 开 </a-select-option>
+              <a-select-option value="2"> 关 </a-select-option>
+            </a-select>
+          </a-form-model-item>
+
+          <a-form-model-item label="人体感应:" class="formItem">
+            <a-select default-value="0" style="width: 120px" v-model="queryData.sensor">
+              <a-select-option value="0"> 无 </a-select-option>
+            </a-select>
+          </a-form-model-item>
+
+          <!--<a-form-model-item label="设备编号:" class="formItem">-->
+          <!--  <a-input v-model="queryData.deviceNo" placeholder="请输入设备编号" />-->
+          <!--</a-form-model-item>-->
+
+        </template>
+      </Query>
+    </div>
+
+    <div class="sceneCard-control">
+
+      <div style="display: inline-block;width: 50%;text-align: left">
+        <a-space>
+          <a-button style="font-size: 12px" size="small" @click="allPowerOff"><a-icon type="poweroff" />全开</a-button>
+          <a-button style="font-size: 12px" size="small" @click="allPowerOn"><a-icon type="poweroff" />全关</a-button>
+          <a-button type="primary" size="small" style="font-size: 12px" v-show="!showCard" @click="()=>{this.showBatchCL=true}">批量执行策略</a-button>
+        </a-space>
+      </div>
+
+      <div style="display: inline-block;width: 50%;text-align: right">
+        <a-select default-value="0">
+          <a-select-option value="0">
+            按楼层显示
+          </a-select-option>
+          <!--<a-select-option value="1">-->
+          <!--  按公司-->
+          <!--</a-select-option>-->
+          <!--<a-select-option value="2">-->
+          <!--  按功能-->
+          <!--</a-select-option>-->
+          <!--<a-select-option value="3">-->
+          <!--  按分组-->
+          <!--</a-select-option>-->
+        </a-select>
+        <a-button type="link" @click="toggleShowCard"><a-icon type="unordered-list" />
+          <span v-if="showCard">列表模式</span>
+          <span v-if="!showCard">卡片模式</span>
+        </a-button>
+      </div>
+
+
+      <a-alert type="success" show-icon v-if="selectedRowKeys.length>0" closeText="取消选择" @close="clearSelectRow">
+        <template #message>
+          已选择{{ selectedRowKeys.length }}台设备
+        </template>
+      </a-alert>
+
+    </div>
+
+    <div class="airContainer">
+      <div class="airContainer-left">
+        <div class="deviceFloorIndex">
+          <a-input-search placeholder="请输入楼层"></a-input-search>
+          <a-anchor :getContainer="getContainer" :target-offset="100"  style="margin-top: 12px" @change="floorChange">
+            <template v-for="item in floors" >
+              <a-anchor-link :href="'#'+item.label" :key="item.value" >
+                <template #title>
+                  <!--<span style="display: inline-block;padding-left: 5px; width: 20px;height: 40px;overflow: hidden">-->
+                  <!--  <div style="position: absolute;top: 15px;left: -2px;width: 4px;height: 4px;border-radius: 2px;background-color: #2EA8E6"></div>-->
+                  <!--  <div style="width: 18px;height: 18px;border-bottom: 1px dashed #2EA8E6;" ></div>-->
+                  <!--  <div style="width: 18px;height: 18px;border-left: 1px dashed #2EA8E6" ></div>-->
+                  <!--</span>-->
+                  {{ item.label }}
+                </template>
+              </a-anchor-link>
+            </template>
+          </a-anchor>
+
+        </div>
+      </div>
+      <div class="airContainer-right" ref="airContainerRight">
+        <template v-for="item in floors">
+          <template v-if="showCard">
+            <div :key="item.value" style="margin-bottom: 15px">
+              <a-divider :id="item.label" style="margin: 0 0 15px;padding: 0" orientation="left" dashed >{{ item.label }}</a-divider>
+              <div style="padding: 0 15px">
+                <a-row :gutter="[30,12]">
+                  <a-col v-for="device in item.devices" :key="device.id" :span="6">
+                    <deviceCardWater :item="device" :toggle="toggleOnline"  />
+                  </a-col>
+                </a-row>
+              </div>
+            </div>
+          </template>
+          <template v-if="!showCard">
+            <div :key="item.value" :id="item.label" v-show="currFloor==item.label">
+              <a-table :rowKey=" (record, index) => record.id"
+                       :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+                       :columns="columns"
+                       :show-header="true"
+                       :data-source="item.devices"
+                       :pagination="false"
+                       :scroll="{ y: 400 }"
+              >
+                <template #name="text, record">
+                  <span>{{ record.id }}</span>
+                </template>
+                <template #mode="text, record">
+                  <span v-if="text=='hot'">制热</span>
+                  <span v-if="text=='cold'">制冷</span>
+                </template>
+                <template #tm="text, record">
+                  <span>{{text}}°C</span>
+                </template>
+                <template #isControl="text, record">
+                  <span>是</span>
+                </template>
+                <template #online="text, record">
+                  <span v-if="text">
+                    <span style="color: #19b955;background-color: #19b955;width: 15px;height: 15px;display: inline-block;border-radius: 8px;vertical-align: middle">•</span> 在线
+                  </span>
+                  <span v-if="!text">
+                    <span style="color: gray;background-color: gray;width: 15px;height: 15px;display: inline-block;border-radius: 8px;vertical-align: middle">•</span> 离线
+                  </span>
+                </template>
+                <template #strategy="text, record">
+                  <span>智慧场景策略配置</span>
+                </template>
+              </a-table>
+            </div>
+          </template>
+
+        </template>
+      </div>
+    </div>
+
+    <a-modal title="批量执行策略" v-if="showBatchCL" v-model="showBatchCL" width="500" height="300" centered style="max-height: 300px;overflow-y: auto" @ok="handleOk">
+      <a-form-model :form="formData" :label-col="{span:6}" :wrapperCol="{span:16}" style="overflow-y: auto;height: 450px">
+
+        <a-form-item label="选择策略:" class="formItem" >
+          <a-radio-group v-model="formData.resource">
+            <a-radio value="1">已有策略</a-radio>
+            <a-radio value="2">自定义</a-radio>
+          </a-radio-group>
+        </a-form-item>
+
+        <a-form-item label="策略名称:" class="formItem" >
+          <template v-if="formData.resource=='1'">
+            <a-select default-value="0" style="width: 200px" v-model="formData.clId">
+              <a-select-option value="0"> 策略1 </a-select-option>
+              <!--<a-select-option v-for="item in companyData" :key="item.value" :value="item.value"> {{ item.label }} </a-select-option>-->
+            </a-select>
+          </template>
+          <template v-else>
+            <a-input v-model="formData.clName" placeholder="请输入策略名称" />
+          </template>
+        </a-form-item>
+
+        <a-form-item label="执行方式:" class="formItem" >
+          <a-select default-value="0" style="width: 200px" v-model="formData.method" >
+            <a-select-option value="1"> 每日执行 </a-select-option>
+            <a-select-option value="2"> 工作日与非工作日区别执行 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="执行时间:" class="formItem" >
+          <timeRange time-format="yyyy/MM/DD" :time-range="formData.timeRange" />
+        </a-form-item>
+
+        <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" v-if="formData.method=='2'" >工作日策略 -</div>
+
+        <a-form-item label="开机策略:" class="formItem" >
+          <a-select default-value="0" style="width: 200px" v-model="formData.openCl">
+            <a-select-option value="0"> 定时开关机 </a-select-option>
+            <a-select-option value="1"> 24小时开机 </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item label="开机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.openTime" :disabled="!(formData.openCl=='0')" />
+        </a-form-item>
+        <a-form-item label="关机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0')" />
+        </a-form-item>
+
+        <div v-if="formData.method=='2'">
+
+          <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" >非工作日策略 -</div>
+
+          <a-form-item label="开机策略:" class="formItem" >
+            <a-select default-value="0" style="width: 200px" v-model="formData.openCl">
+              <a-select-option value="0"> 定时开关机 </a-select-option>
+              <a-select-option value="1"> 24小时开机 </a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item label="开机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.openTime"  :disabled="!(formData.openCl=='0')"/>
+          </a-form-item>
+          <a-form-item label="关机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0')" />
+          </a-form-item>
+        </div>
+
+      </a-form-model>
+    </a-modal>
+
+  </div>
+</template>
+
+<script>
+import Query from "@/components/common/query.vue";
+import deviceCardWater from "@/components/scene/energy/common/deviceCardWater.vue";
+import timeRange from "@/components/common/timeRange.vue";
+export default {
+  components: {
+    Query,
+    deviceCardWater,
+    timeRange,
+  },
+  data() {
+    return {
+      formData: {},
+      currFloor: '1F',
+      showCard: true,
+      showBatchCL: false,
+      queryData: {
+        switch: '0',
+        mode: '0',
+        tm: '0'
+      },
+      selectedRowKeys: [],
+
+      columns: [
+        {
+          title: '名称',
+          dataIndex: 'name',
+          key: 'name',
+          scopedSlots: { customRender: 'name' },
+        },
+        {
+          title: '人体感应',
+          dataIndex: 'sensor',
+          key: 'sensor',
+        },
+        {
+          title: '是否支持调控',
+          dataIndex: 'isControl',
+          key: 'isControl',
+          scopedSlots: { customRender: 'isControl' },
+        },
+        {
+          title: '状态',
+          dataIndex: 'online',
+          key: 'online',
+          scopedSlots: { customRender: 'online' },
+        },
+        {
+          title: '执行策略',
+          dataIndex: 'strategy',
+          key: 'strategy',
+          scopedSlots: { customRender: 'strategy' },
+        },
+      ],
+      oriFloors: [],
+      floors: [
+        {
+          label: '1F',
+          value: '1',
+          devices: [
+            {
+              id: '1101-1',
+              name: '饮水机#1',
+              sensor: '无',
+              waterNum: '654',
+              tm: '78',
+              status: '1',
+              online: true
+            },{
+              id: '1101-2',
+              name: '饮水机#2',
+              sensor: '无',
+              waterNum: '700',
+              tm: '95',
+              status: '2',
+              online: true
+            },{
+              id: '1102-1',
+              name: '饮水机#3',
+              sensor: '无',
+              waterNum: '700',
+              tm: '95',
+              status: '2',
+              online: true
+            },{
+              id: '1102-2',
+              name: '饮水机#4',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            },
+          ]
+        },
+        {
+          label: '2F',
+          value: '2',
+          devices: [
+            {
+              id: '2101-1',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            },{
+              id: '2101-2',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '3F',
+          value: '3',
+          devices: [
+            {
+              id: '3101-1',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            },{
+              id: '3101-2',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '4F',
+          value: '4',
+          devices: [
+            {
+              id: '4101-1',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            },{
+              id: '4101-2',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '5F',
+          value: '5',
+          devices: [
+            {
+              id: '5101-1',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true,
+            },{
+              id: '5101-2',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '6F',
+          value: '6',
+          devices: [
+            {
+              id: '6101-1',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            },{
+              id: '6101-2',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '7F',
+          value: '7',
+          devices: [
+            {
+              id: '7101-1',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            },{
+              id: '7101-2',
+              name: '饮水机',
+              sensor: '无',
+              waterNum: '700',
+              tm: '100',
+              status: '2',
+              online: true
+            }
+          ]
+        },
+      ]
+    }
+  },
+  mounted() {
+    this.oriFloors = JSON.parse(JSON.stringify(this.floors));
+  },
+  methods: {
+    clearSelectRow() {
+      this.selectedRowKeys = []
+    },
+    reset() {
+      this.floors = JSON.parse(JSON.stringify(this.oriFloors));
+    },
+    handleOk() {
+      this.showBatchCL = false;
+      this.$message.success('设置成功')
+    },
+    search() {
+      let objarr = JSON.parse(JSON.stringify(this.oriFloors));
+      let app = this
+      objarr.forEach(item=>{
+        if (item.devices) {
+          item.devices = item.devices.filter(item=>{
+            if (!app.queryData.switch || app.queryData.switch=='0') {
+            } else {
+              return app.queryData.switch==item.online
+            }
+            return true;
+          })
+        }
+      })
+      this.floors = objarr
+    },
+    onSelectChange(val) {
+      this.selectedRowKeys = val
+    },
+    toggleOnline(device) {
+      device.online=!device.online;
+    },
+    floorChange(val) {
+      let obj = val.replace('#','')
+      this.currFloor = obj;
+      //console.log(this.currFloor)
+    },
+    getContainer() {
+      return this.$refs.airContainerRight
+    },
+    toggleShowCard() {
+      this.showCard = !this.showCard;
+    },
+    allPowerOn() {
+      this.floors.forEach(item=>{
+        if (item.devices) {
+          item.devices.forEach(i=>{
+            i.online = false
+          })
+        }
+      })
+    },
+    allPowerOff() {
+      this.floors.forEach(item=>{
+        if (item.devices) {
+          item.devices.forEach(i=>{
+            i.online = true
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.formItem {
+  margin: 12px 0;
+}
+.sceneCard {
+  width: 100%;
+  height: 100%;
+  .sceneCard-query {
+
+  }
+  .sceneCard-control {
+    margin-top: 12px;
+  }
+  .airContainer {
+    width: 100%;
+    height: 600px;
+    padding: 15px 8px;
+    .airContainer-left {
+      background-color: #fafafa;
+      width: 20%;
+      height: 100%;
+      display: inline-block;
+      vertical-align: top;
+      padding: 12px;
+      overflow-y: auto;
+    }
+    .airContainer-right {
+      display: inline-block;
+      width: 80%;
+      height: 100%;
+      vertical-align: top;
+      padding: 12px 20px;
+      overflow-y: auto;
+    }
+    .ant-anchor-link {
+      line-height: 45px;
+      font-size: 16px;
+    }
+    .ant-anchor-link-active {
+      background-color: #e0effa;
+      border-radius: 0px 4px 4px 0px;
+    }
+  }
+}
+</style>

+ 572 - 0
src/components/scene/energy/sceneEnergyAircondition/scenelightCard.vue

@@ -0,0 +1,572 @@
+<template>
+  <div class="sceneCard">
+
+    <div class="sceneCard-query">
+      <Query :query-data.sync="queryData" :search="search" :reset="reset" >
+        <template #extraItem>
+
+          <a-form-model-item label="开关:" class="formItem">
+            <a-select default-value="0" style="width: 120px" v-model="queryData.switch">
+              <a-select-option value="0"> 全部 </a-select-option>
+              <a-select-option value="1"> 开 </a-select-option>
+              <a-select-option value="2"> 关 </a-select-option>
+            </a-select>
+          </a-form-model-item>
+
+          <a-form-model-item label="人体感应:" class="formItem">
+            <a-select default-value="0" style="width: 120px" v-model="queryData.sensor">
+              <a-select-option value="0"> 无 </a-select-option>
+            </a-select>
+          </a-form-model-item>
+
+          <!--<a-form-model-item label="设备编号:" class="formItem">-->
+          <!--  <a-input v-model="queryData.deviceNo" placeholder="请输入设备编号" />-->
+          <!--</a-form-model-item>-->
+
+        </template>
+      </Query>
+    </div>
+
+    <div class="sceneCard-control">
+
+      <div style="display: inline-block;width: 50%;text-align: left">
+        <a-space>
+          <a-button style="font-size: 12px" size="small" @click="allPowerOff"><a-icon type="poweroff" />全开</a-button>
+          <a-button style="font-size: 12px" size="small" @click="allPowerOn"><a-icon type="poweroff" />全关</a-button>
+          <a-button type="primary" size="small" style="font-size: 12px" v-show="!showCard" @click="()=>{this.showBatchCL=true}">批量执行策略</a-button>
+        </a-space>
+      </div>
+
+      <div style="display: inline-block;width: 50%;text-align: right">
+        <a-select default-value="0">
+          <a-select-option value="0">
+            按楼层显示
+          </a-select-option>
+          <!--<a-select-option value="1">-->
+          <!--  按公司-->
+          <!--</a-select-option>-->
+          <!--<a-select-option value="2">-->
+          <!--  按功能-->
+          <!--</a-select-option>-->
+          <!--<a-select-option value="3">-->
+          <!--  按分组-->
+          <!--</a-select-option>-->
+        </a-select>
+        <a-button type="link" @click="toggleShowCard"><a-icon type="unordered-list" />
+          <span v-if="showCard">列表模式</span>
+          <span v-if="!showCard">卡片模式</span>
+        </a-button>
+      </div>
+
+
+      <a-alert type="success" show-icon v-if="selectedRowKeys.length>0" closeText="取消选择" @close="clearSelectRow">
+        <template #message>
+          已选择{{ selectedRowKeys.length }}台设备
+        </template>
+      </a-alert>
+
+    </div>
+
+    <div class="airContainer">
+      <div class="airContainer-left">
+        <div class="deviceFloorIndex">
+          <a-input-search placeholder="请输入楼层"></a-input-search>
+          <a-anchor :getContainer="getContainer" :target-offset="100"  style="margin-top: 12px" @change="floorChange">
+            <template v-for="item in floors" >
+              <a-anchor-link :href="'#'+item.label" :key="item.value" >
+                <template #title>
+                  <!--<span style="display: inline-block;padding-left: 5px; width: 20px;height: 40px;overflow: hidden">-->
+                  <!--  <div style="position: absolute;top: 15px;left: -2px;width: 4px;height: 4px;border-radius: 2px;background-color: #2EA8E6"></div>-->
+                  <!--  <div style="width: 18px;height: 18px;border-bottom: 1px dashed #2EA8E6;" ></div>-->
+                  <!--  <div style="width: 18px;height: 18px;border-left: 1px dashed #2EA8E6" ></div>-->
+                  <!--</span>-->
+                  {{ item.label }}
+                </template>
+              </a-anchor-link>
+            </template>
+          </a-anchor>
+
+        </div>
+      </div>
+      <div class="airContainer-right" ref="airContainerRight">
+        <template v-for="item in floors">
+          <template v-if="showCard">
+            <div :key="item.value" style="margin-bottom: 15px">
+              <a-divider :id="item.label" style="margin: 0 0 15px;padding: 0" orientation="left" dashed >{{ item.label }}</a-divider>
+              <div style="padding: 0 15px">
+                <a-row :gutter="[30,12]">
+                  <a-col v-for="device in item.devices" :key="device.id" :span="6">
+                    <deviceCardLight :item="device" :toggle="toggleOnline"  />
+                  </a-col>
+                </a-row>
+              </div>
+            </div>
+          </template>
+          <template v-if="!showCard">
+            <div :key="item.value" :id="item.label" v-show="currFloor==item.label">
+              <a-table :rowKey=" (record, index) => record.id"
+                       :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+                       :columns="columns"
+                       :show-header="true"
+                       :data-source="item.devices"
+                       :pagination="false"
+                       :scroll="{ y: 400 }"
+              >
+                <template #name="text, record">
+                  <span>{{ record.id }}</span>
+                </template>
+                <template #mode="text, record">
+                  <span v-if="text=='hot'">制热</span>
+                  <span v-if="text=='cold'">制冷</span>
+                </template>
+                <template #tm="text, record">
+                  <span>{{text}}°C</span>
+                </template>
+                <template #isControl="text, record">
+                  <span>是</span>
+                </template>
+                <template #online="text, record">
+                  <span v-if="text">
+                    <span style="color: #19b955;background-color: #19b955;width: 15px;height: 15px;display: inline-block;border-radius: 8px;vertical-align: middle">•</span> 在线
+                  </span>
+                  <span v-if="!text">
+                    <span style="color: gray;background-color: gray;width: 15px;height: 15px;display: inline-block;border-radius: 8px;vertical-align: middle">•</span> 离线
+                  </span>
+                </template>
+                <template #strategy="text, record">
+                  <span>智慧场景策略配置</span>
+                </template>
+              </a-table>
+            </div>
+          </template>
+
+        </template>
+      </div>
+    </div>
+
+    <a-modal title="批量执行策略" v-if="showBatchCL" v-model="showBatchCL" width="500" height="300" centered style="max-height: 300px;overflow-y: auto" @ok="handleOk">
+      <a-form-model :form="formData" :label-col="{span:6}" :wrapperCol="{span:16}" style="overflow-y: auto;height: 450px">
+
+        <a-form-item label="选择策略:" class="formItem" >
+          <a-radio-group v-model="formData.resource">
+            <a-radio value="1">已有策略</a-radio>
+            <a-radio value="2">自定义</a-radio>
+          </a-radio-group>
+        </a-form-item>
+
+        <a-form-item label="策略名称:" class="formItem" >
+          <template v-if="formData.resource=='1'">
+            <a-select default-value="0" style="width: 200px" v-model="formData.clId">
+              <a-select-option value="0"> 策略1 </a-select-option>
+              <!--<a-select-option v-for="item in companyData" :key="item.value" :value="item.value"> {{ item.label }} </a-select-option>-->
+            </a-select>
+          </template>
+          <template v-else>
+            <a-input v-model="formData.clName" placeholder="请输入策略名称" />
+          </template>
+        </a-form-item>
+
+        <a-form-item label="执行方式:" class="formItem" >
+          <a-select default-value="0" style="width: 200px" v-model="formData.method" >
+            <a-select-option value="1"> 每日执行 </a-select-option>
+            <a-select-option value="2"> 工作日与非工作日区别执行 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="执行时间:" class="formItem" >
+          <timeRange time-format="yyyy/MM/DD" :time-range="formData.timeRange" />
+        </a-form-item>
+
+        <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" v-if="formData.method=='2'" >工作日策略 -</div>
+
+        <a-form-item label="开机策略:" class="formItem" >
+          <a-select default-value="0" style="width: 200px" v-model="formData.openCl">
+            <a-select-option value="0"> 定时开关机 </a-select-option>
+            <a-select-option value="1"> 24小时开机 </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item label="开机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.openTime" :disabled="!(formData.openCl=='0')" />
+        </a-form-item>
+        <a-form-item label="关机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0')" />
+        </a-form-item>
+        <a-form-item label="空调模式:" class="formItem" >
+          <a-select style="width: 200px" v-model="formData.mode">
+            <a-select-option value="1"> 制冷 </a-select-option>
+            <a-select-option value="2"> 制热 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="空调风速:" class="formItem" >
+          <a-select style="width: 200px" v-model="formData.wind">
+            <a-select-option value="1"> 一级 </a-select-option>
+            <a-select-option value="2"> 二级 </a-select-option>
+            <a-select-option value="3"> 三级 </a-select-option>
+            <a-select-option value="0"> 自动 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="设置温度:" class="formItem" >
+          <a-select style="width: 200px" v-model="formData.tm">
+            <a-select-option value="18"> 18°C </a-select-option>
+            <a-select-option value="19"> 19°C </a-select-option>
+            <a-select-option value="20"> 20°C </a-select-option>
+            <a-select-option value="21"> 21°C </a-select-option>
+            <a-select-option value="22"> 22°C </a-select-option>
+            <a-select-option value="23"> 23°C </a-select-option>
+            <a-select-option value="24"> 24°C </a-select-option>
+            <a-select-option value="25"> 25°C </a-select-option>
+            <a-select-option value="26"> 26°C </a-select-option>
+            <a-select-option value="27"> 27°C </a-select-option>
+            <a-select-option value="28"> 28°C </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="人体感应:" class="formItem" >
+          <a-select default-value="0" style="width: 200px" v-model="formData.sensor">
+            <a-select-option value="0"> 无 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <div v-if="formData.method=='2'">
+
+          <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" >非工作日策略 -</div>
+
+          <a-form-item label="开机策略:" class="formItem" >
+            <a-select default-value="0" style="width: 200px" v-model="formData.openCl">
+              <a-select-option value="0"> 定时开关机 </a-select-option>
+              <a-select-option value="1"> 24小时开机 </a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item label="开机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.openTime"  :disabled="!(formData.openCl=='0')"/>
+          </a-form-item>
+          <a-form-item label="关机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0')" />
+          </a-form-item>
+          <a-form-item label="灯光亮度:" class="formItem" >
+            <a-slider id="test" v-model:value="formData.brightness"  />
+          </a-form-item>
+
+          <a-form-item label="灯光色温:" class="formItem" >
+            <a-slider id="test" v-model:value="formData.color"  />
+          </a-form-item>
+
+
+
+          <a-form-item label="人体感应:" class="formItem" >
+            <a-select default-value="0" style="width: 200px" v-model="formData.sensor">
+              <a-select-option value="0"> 无 </a-select-option>
+            </a-select>
+          </a-form-item>
+        </div>
+
+      </a-form-model>
+    </a-modal>
+
+  </div>
+</template>
+
+<script>
+import Query from "@/components/common/query.vue";
+import deviceCardLight from "@/components/scene/energy/common/deviceCardLight.vue";
+import timeRange from "@/components/common/timeRange.vue";
+export default {
+  components: {
+    Query,
+    deviceCardLight,
+    timeRange,
+  },
+  data() {
+    return {
+      formData: {},
+      currFloor: '1F',
+      showCard: true,
+      showBatchCL: false,
+      queryData: {
+        switch: '0',
+        mode: '0',
+        tm: '0'
+      },
+      selectedRowKeys: [],
+
+      columns: [
+        {
+          title: '名称',
+          dataIndex: 'name',
+          key: 'name',
+          scopedSlots: { customRender: 'name' },
+        },
+        {
+          title: '人体感应',
+          dataIndex: 'sensor',
+          key: 'sensor',
+        },
+        {
+          title: '是否支持调控',
+          dataIndex: 'isControl',
+          key: 'isControl',
+          scopedSlots: { customRender: 'isControl' },
+        },
+        {
+          title: '状态',
+          dataIndex: 'online',
+          key: 'online',
+          scopedSlots: { customRender: 'online' },
+        },
+        {
+          title: '执行策略',
+          dataIndex: 'strategy',
+          key: 'strategy',
+          scopedSlots: { customRender: 'strategy' },
+        },
+      ],
+      oriFloors: [],
+      floors: [
+        {
+          label: '1F',
+          value: '1',
+          devices: [
+            {
+              id: '1101-1',
+              name: '环形灯#1',
+              sensor: '无',
+              online: true
+            },{
+              id: '1101-2',
+              name: '环形灯#2',
+              sensor: '无',
+              online: true
+            },{
+              id: '1102-1',
+              name: '环形灯#3',
+              sensor: '无',
+              online: true
+            },{
+              id: '1102-2',
+              name: '环形灯#4',
+              sensor: '无',
+              online: true
+            },
+          ]
+        },
+        {
+          label: '2F',
+          value: '2',
+          devices: [
+            {
+              id: '2101-1',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            },{
+              id: '2101-2',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '3F',
+          value: '3',
+          devices: [
+            {
+              id: '3101-1',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            },{
+              id: '3101-2',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '4F',
+          value: '4',
+          devices: [
+            {
+              id: '4101-1',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            },{
+              id: '4101-2',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '5F',
+          value: '5',
+          devices: [
+            {
+              id: '5101-1',
+              name: '环形灯',
+              sensor: '无',
+              online: true,
+            },{
+              id: '5101-2',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '6F',
+          value: '6',
+          devices: [
+            {
+              id: '6101-1',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            },{
+              id: '6101-2',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            }
+          ]
+        },
+        {
+          label: '7F',
+          value: '7',
+          devices: [
+            {
+              id: '7101-1',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            },{
+              id: '7101-2',
+              name: '环形灯',
+              sensor: '无',
+              online: true
+            }
+          ]
+        },
+      ]
+    }
+  },
+  mounted() {
+    this.oriFloors = JSON.parse(JSON.stringify(this.floors));
+  },
+  methods: {
+    clearSelectRow() {
+      this.selectedRowKeys = []
+    },
+    reset() {
+      this.floors = JSON.parse(JSON.stringify(this.oriFloors));
+    },
+    handleOk() {
+      this.showBatchCL = false;
+      this.$message.success('设置成功')
+    },
+    search() {
+      let objarr = JSON.parse(JSON.stringify(this.oriFloors));
+      let app = this
+      objarr.forEach(item=>{
+        if (item.devices) {
+          item.devices = item.devices.filter(item=>{
+            if (!app.queryData.switch || app.queryData.switch=='0') {
+            } else {
+              return app.queryData.switch==item.online
+            }
+            return true;
+          })
+        }
+      })
+      this.floors = objarr
+    },
+    onSelectChange(val) {
+      this.selectedRowKeys = val
+    },
+    toggleOnline(device) {
+      device.online=!device.online;
+    },
+    floorChange(val) {
+      let obj = val.replace('#','')
+      this.currFloor = obj;
+      //console.log(this.currFloor)
+    },
+    getContainer() {
+      return this.$refs.airContainerRight
+    },
+    toggleShowCard() {
+      this.showCard = !this.showCard;
+    },
+    allPowerOn() {
+      this.floors.forEach(item=>{
+        if (item.devices) {
+          item.devices.forEach(i=>{
+            i.online = false
+          })
+        }
+      })
+    },
+    allPowerOff() {
+      this.floors.forEach(item=>{
+        if (item.devices) {
+          item.devices.forEach(i=>{
+            i.online = true
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.formItem {
+  margin: 12px 0;
+}
+.sceneCard {
+  width: 100%;
+  height: 100%;
+  .sceneCard-query {
+
+  }
+  .sceneCard-control {
+    margin-top: 12px;
+  }
+  .airContainer {
+    width: 100%;
+    height: 600px;
+    padding: 15px 8px;
+    .airContainer-left {
+      background-color: #fafafa;
+      width: 20%;
+      height: 100%;
+      display: inline-block;
+      vertical-align: top;
+      padding: 12px;
+      overflow-y: auto;
+    }
+    .airContainer-right {
+      display: inline-block;
+      width: 80%;
+      height: 100%;
+      vertical-align: top;
+      padding: 12px 20px;
+      overflow-y: auto;
+    }
+    .ant-anchor-link {
+      line-height: 45px;
+      font-size: 16px;
+    }
+    .ant-anchor-link-active {
+      background-color: #e0effa;
+      border-radius: 0px 4px 4px 0px;
+    }
+  }
+}
+</style>

+ 7 - 4
src/components/scene/energy/sceneEnergyLight.vue

@@ -4,7 +4,7 @@
       <div class="dashboardPortrait-select">
         <a-checkable-tag v-model="tagCheck.air" color="white" class="dashboardPortrait-select-tag"
                          @change="handleTagSelect('air')">
-          <span class="dashboardPortrait-select-text">空调总览</span>
+          <span class="dashboardPortrait-select-text">照明总览</span>
         </a-checkable-tag>
         <a-checkable-tag v-model="tagCheck.methods" color="white" class="dashboardPortrait-select-tag"
                          @change="handleTagSelect('methods')">
@@ -14,7 +14,8 @@
     </div>
 
     <div class="dashboardPortrait-body">
-      <AirconditioningCard v-if="currCheck == 'air'" />
+      <scenelightCard v-if="currCheck == 'air'" />
+      <lightTactics v-if="currCheck == 'methods'" />
     </div>
 
   </div>
@@ -22,12 +23,14 @@
 
 <script>
 import timeRange from "@/components/common/timeRange.vue";
-import AirconditioningCard from "@/components/scene/energy/sceneEnergyAircondition/airconditioningCard.vue";
+import scenelightCard from "@/components/scene/energy/sceneEnergyAircondition/scenelightCard.vue";
+import lightTactics from "@/components/scene/energy/tactics/lightTactics.vue";
 
 export default {
   components: {
-    AirconditioningCard,
+    scenelightCard,
     timeRange,
+    lightTactics,
   },
   data() {
     return {

+ 7 - 4
src/components/scene/energy/sceneEnergyWater.vue

@@ -4,7 +4,7 @@
       <div class="dashboardPortrait-select">
         <a-checkable-tag v-model="tagCheck.air" color="white" class="dashboardPortrait-select-tag"
                          @change="handleTagSelect('air')">
-          <span class="dashboardPortrait-select-text">空调总览</span>
+          <span class="dashboardPortrait-select-text">饮水机总览</span>
         </a-checkable-tag>
         <a-checkable-tag v-model="tagCheck.methods" color="white" class="dashboardPortrait-select-tag"
                          @change="handleTagSelect('methods')">
@@ -14,7 +14,8 @@
     </div>
 
     <div class="dashboardPortrait-body">
-      <AirconditioningCard v-if="currCheck == 'air'" />
+      <sceneWaterCard v-if="currCheck == 'air'" />
+      <waterTactics v-if="currCheck == 'methods'" />
     </div>
 
   </div>
@@ -22,12 +23,14 @@
 
 <script>
 import timeRange from "@/components/common/timeRange.vue";
-import AirconditioningCard from "@/components/scene/energy/sceneEnergyAircondition/airconditioningCard.vue";
+import sceneWaterCard from "@/components/scene/energy/sceneEnergyAircondition/sceneWaterCard.vue";
+import waterTactics from "@/components/scene/energy/tactics/waterTactics.vue";
 
 export default {
   components: {
-    AirconditioningCard,
+    sceneWaterCard,
     timeRange,
+    waterTactics,
   },
   data() {
     return {

+ 371 - 0
src/components/scene/energy/tactics/AirTactics.vue

@@ -0,0 +1,371 @@
+<template>
+  <div class="accessManage ">
+    <div class="page-query-core" style="padding: 30px 15px;background-color: #fafafa">
+      <Query :show="['']" :query-data.sync="queryData" :search="search" >
+        <template #extraItem>
+          <a-form-model-item label="策略名称" style="margin-left: 45px">
+            <a-input style="width: 250px" v-model="queryData.name" placeholder="请输入策略名称"/>
+          </a-form-model-item>
+          <a-form-model-item label="状态" style="margin-left: 45px">
+            <a-select v-model="queryData.enable" style="width: 250px">
+              <a-select-option value="0">全部</a-select-option>
+              <a-select-option :value="true">开启</a-select-option>
+              <a-select-option :value="false">关闭</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </template>
+      </Query>
+    </div>
+
+    <div class="accessManage-body">
+      <a-button size="small" type="primary" style="height: 24px;width: 85px" @click="()=>{this.showCLInfo=true}">新建</a-button>
+      <a-button size="small" style="height: 25px;width: 85px" @click="batchDelete">批量删除</a-button>
+      <a-table :columns="tableColumns" :data-source="tableData" :pagination="true" style="margin-top: 12px"
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+               :rowKey=" (record, index) => record.key"
+               :scroll="{ y: 400 }" bordered>
+        <template #enable="text, record">
+          <a-switch v-model="record.enable" />
+        </template>
+        <template #operation="text, record">
+          <a-button type="link" @click="viewItem(record)">查看</a-button>
+          <a-button type="link" @click="editItem(record)">编辑</a-button>
+          <a-button type="link" @click="deleteItem(record)">删除</a-button>
+        </template>
+      </a-table>
+
+      <!--<div style="width: 100%;text-align: right;margin-top: 15px;">-->
+      <!--  <a-pagination ref="pagination"-->
+      <!--                :showQuickJumper="true"-->
+      <!--                :show-size-changer="true"-->
+      <!--                :show-total="showTotal"-->
+      <!--                v-model:current="currentPage"-->
+      <!--                :default-current="1"-->
+      <!--                :total="500"-->
+      <!--                @showSizeChange="onShowSizeChange"-->
+      <!--  />-->
+      <!--</div>-->
+    </div>
+
+
+    <a-modal title="批量执行策略" v-if="showCLInfo" v-model="showCLInfo" width="500" height="300" centered style="max-height: 300px;overflow-y: auto" @ok="handleOk">
+      <a-form-model :form="formData" :label-col="{span:6}" :wrapperCol="{span:16}" style="overflow-y: auto;height: 450px">
+
+        <a-form-item label="策略名称:" class="formItem" >
+          <a-input :disabled="disabledForm" v-model="formData.clName" placeholder="请输入策略名称" />
+        </a-form-item>
+
+        <a-form-item label="执行方式:" class="formItem" >
+          <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.method" >
+            <a-select-option value="1"> 每日执行 </a-select-option>
+            <a-select-option value="2"> 工作日与非工作日区别执行 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="执行时间:" class="formItem" >
+          <timeRange :disabled="disabledForm" time-format="yyyy/MM/DD" :time-range.sync="formData.timeRange" />
+        </a-form-item>
+
+        <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" v-if="formData.method=='2'" >工作日策略 -</div>
+
+        <a-form-item label="开机策略:" class="formItem" >
+          <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.openCl">
+            <a-select-option value="0"> 定时开关机 </a-select-option>
+            <a-select-option value="1"> 24小时开机 </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item label="开机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.openTime" :disabled="!(formData.openCl=='0') || disabledForm" />
+        </a-form-item>
+        <a-form-item label="关机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0') || disabledForm" />
+        </a-form-item>
+        <a-form-item label="空调模式:" class="formItem" >
+          <a-select :disabled="disabledForm" style="width: 200px" v-model="formData.mode">
+            <a-select-option value="1"> 制冷 </a-select-option>
+            <a-select-option value="2"> 制热 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="空调风速:" class="formItem" >
+          <a-select  :disabled="disabledForm" style="width: 200px" v-model="formData.wind">
+            <a-select-option value="1"> 一级 </a-select-option>
+            <a-select-option value="2"> 二级 </a-select-option>
+            <a-select-option value="3"> 三级 </a-select-option>
+            <a-select-option value="0"> 自动 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="设置温度:" class="formItem" >
+          <a-select :disabled="disabledForm" style="width: 200px" v-model="formData.tm">
+            <a-select-option value="18"> 18°C </a-select-option>
+            <a-select-option value="19"> 19°C </a-select-option>
+            <a-select-option value="20"> 20°C </a-select-option>
+            <a-select-option value="21"> 21°C </a-select-option>
+            <a-select-option value="22"> 22°C </a-select-option>
+            <a-select-option value="23"> 23°C </a-select-option>
+            <a-select-option value="24"> 24°C </a-select-option>
+            <a-select-option value="25"> 25°C </a-select-option>
+            <a-select-option value="26"> 26°C </a-select-option>
+            <a-select-option value="27"> 27°C </a-select-option>
+            <a-select-option value="28"> 28°C </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="人体感应:" class="formItem" >
+          <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.sensor">
+            <a-select-option value="0"> 无 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <div v-if="formData.method=='2'">
+
+          <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" >非工作日策略 -</div>
+
+          <a-form-item label="开机策略:" class="formItem" >
+            <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.openCl">
+              <a-select-option value="0"> 定时开关机 </a-select-option>
+              <a-select-option value="1"> 24小时开机 </a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item label="开机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.openTime"  :disabled="!(formData.openCl=='0') || disabledForm"/>
+          </a-form-item>
+          <a-form-item label="关机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0') || disabledForm" />
+          </a-form-item>
+          <a-form-item label="空调模式:" class="formItem" >
+            <a-select :disabled="disabledForm" style="width: 200px" v-model="formData.mode">
+              <a-select-option value="1"> 制冷 </a-select-option>
+              <a-select-option value="2"> 制热 </a-select-option>
+            </a-select>
+          </a-form-item>
+
+          <a-form-item label="空调风速:" class="formItem" >
+            <a-select  :disabled="disabledForm" style="width: 200px" v-model="formData.wind">
+              <a-select-option value="1"> 一级 </a-select-option>
+              <a-select-option value="2"> 二级 </a-select-option>
+              <a-select-option value="3"> 三级 </a-select-option>
+              <a-select-option value="0"> 自动 </a-select-option>
+            </a-select>
+          </a-form-item>
+
+          <a-form-item label="设置温度:" class="formItem" >
+            <a-select :disabled="disabledForm" style="width: 200px" v-model="formData.tm">
+              <a-select-option value="18"> 18°C </a-select-option>
+              <a-select-option value="19"> 19°C </a-select-option>
+              <a-select-option value="20"> 20°C </a-select-option>
+              <a-select-option value="21"> 21°C </a-select-option>
+              <a-select-option value="22"> 22°C </a-select-option>
+              <a-select-option value="23"> 23°C </a-select-option>
+              <a-select-option value="24"> 24°C </a-select-option>
+              <a-select-option value="25"> 25°C </a-select-option>
+              <a-select-option value="26"> 26°C </a-select-option>
+              <a-select-option value="27"> 27°C </a-select-option>
+              <a-select-option value="28"> 28°C </a-select-option>
+            </a-select>
+          </a-form-item>
+
+          <a-form-item label="人体感应:" class="formItem" >
+            <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.sensor">
+              <a-select-option value="0"> 无 </a-select-option>
+            </a-select>
+          </a-form-item>
+        </div>
+
+      </a-form-model>
+    </a-modal>
+
+  </div>
+</template>
+
+<script>
+import Query from "@/components/common/query.vue";
+
+export default {
+  components: {
+    Query
+  },
+  data() {
+    return {
+      showCLInfo: false,
+      disabledForm: false,
+      formData: {},
+      currentPage: 1,
+      selectedRowKeys: [],
+      queryData: {
+        enable: '0'
+      },
+      tableColumns: [
+        {
+          title: '名称',
+          dataIndex: 'name',
+          key: 'name',
+        },
+        {
+          title: '创建时间',
+          dataIndex: 'createTime',
+          key: 'createTime',
+        },
+        {
+          title: '创建人',
+          dataIndex: 'creator',
+          key: 'creator',
+        },
+        {
+          title: '启用',
+          dataIndex: 'enable',
+          key: 'enable',
+          scopedSlots: { customRender: 'enable' },
+        },
+        {
+          title: '操作',
+          dataIndex: 'operation',
+          key: 'operation',
+          scopedSlots: { customRender: 'operation' },
+        },
+
+      ],
+      oriTableData: [],
+      tableData: [
+        {
+          key: '1',
+          name: "智慧场景空调策略1",
+          createTime: '2023/03/20 15:35:20',
+          creator: '张峰',
+          enable: true,
+          content: {
+            method: "1",
+            mode: "2",
+            openCl: "1",
+            sensor: "0",
+            tm: "23",
+            wind: "1"
+          }
+        },{
+          key: '2',
+          name: "智慧场景空调策略2",
+          createTime: '2023/03/20 15:35:20',
+          creator: '张峰',
+          enable: true,
+          content: {
+            method: "1",
+            mode: "2",
+            openCl: "1",
+            sensor: "0",
+            tm: "23",
+            wind: "1"
+          }
+        },{
+          key: '3',
+          name: "智慧场景空调策略3",
+          createTime: '2023/03/20 15:35:20',
+          creator: '张峰',
+          enable: true,
+          content: {
+            method: "1",
+            mode: "2",
+            openCl: "1",
+            sensor: "0",
+            tm: "23",
+            wind: "1"
+          }
+        }
+      ]
+    }
+  },
+  mounted() {
+    this.oriTableData = JSON.parse(JSON.stringify(this.tableData));
+  },
+  methods: {
+    showTotal(total, range) {
+      let pageSize = range[1]-range[0]+1;
+      let pages = Math.ceil(total/pageSize);
+      return '共'+total+'条数据,第 '+this.currentPage+'/'+pages+' 页';
+    },
+    onShowSizeChange(val) {
+
+    },
+    onSelectChange(val) {
+      this.selectedRowKeys = val
+    },
+    batchDelete() {
+      let app = this;
+      console.log(app.selectedRowKeys)
+      this.tableData.forEach(item=>{
+        let index = app.selectedRowKeys.indexOf(item.key);
+        if (index>-1) {
+          app.tableData.splice(app.tableData.indexOf(item), 1)
+        }
+      })
+      this.selectedRowKeys = []
+    },
+    handleOk() {
+      this.$message.success('操作成功');
+      let createTime = this.$util.dateUtil.getCurrDateTime()
+      let obj = {
+        key: new Date(),
+        name: this.formData.clName,
+        createTime: createTime,
+        creator: this.$store.userStore().userInfo.userName,
+        enable: true,
+        content: this.formData
+      }
+      this.tableData.push(obj);
+      this.showCLInfo = false;
+    },
+    search() {
+      let arr = this.oriTableData.filter(item=>{
+        if (this.queryData.name && this.queryData.name != '') {
+          return item.name.indexOf(this.queryData.name)>-1;
+        } else {
+        }
+        if (this.queryData.enable == true || this.queryData.enable == false) {
+          return item.enable = this.queryData.enable
+        } else {
+        }
+        return true;
+      })
+      this.tableData = arr
+    },
+    viewItem(item) {
+      this.disabledForm = true;
+      item.content.clName = item.name;
+      this.formData = item.content;
+      this.showCLInfo = true;
+    },
+    deleteItem(item) {
+      let index = this.tableData.indexOf(item);
+      if (index>-1) {
+        this.tableData.splice(index, 1)
+      }
+    },
+    editItem(item) {
+      this.disabledForm = false;
+      item.content.clName = item.name;
+      this.formData = item.content;
+      this.showCLInfo = true;
+    },
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.accessManage {
+  width: 100%;
+  height: 100%;
+
+  .ant-form-inline .ant-form-item {
+    margin-right: 60px;
+
+  }
+
+  .accessManage-body {
+    background: white;
+    border-radius: 4px;
+    margin-top: 12px;
+    padding: 15px;
+  }
+
+}
+</style>

+ 325 - 0
src/components/scene/energy/tactics/lightTactics.vue

@@ -0,0 +1,325 @@
+<template>
+  <div class="accessManage ">
+    <div class="page-query-core" style="padding: 30px 15px;background-color: #fafafa">
+      <Query :show="['']" :query-data.sync="queryData" :search="search" >
+        <template #extraItem>
+          <a-form-model-item label="策略名称" style="margin-left: 45px">
+            <a-input style="width: 250px" v-model="queryData.name" placeholder="请输入策略名称"/>
+          </a-form-model-item>
+          <a-form-model-item label="状态" style="margin-left: 45px">
+            <a-select v-model="queryData.enable" style="width: 250px">
+              <a-select-option value="0">全部</a-select-option>
+              <a-select-option :value="true">开启</a-select-option>
+              <a-select-option :value="false">关闭</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </template>
+      </Query>
+    </div>
+
+    <div class="accessManage-body">
+      <a-button size="small" type="primary" style="height: 24px;width: 85px" @click="()=>{this.showCLInfo=true}">新建</a-button>
+      <a-button size="small" style="height: 25px;width: 85px" @click="batchDelete">批量删除</a-button>
+      <a-table :columns="tableColumns" :data-source="tableData" :pagination="true" style="margin-top: 12px"
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+               :rowKey=" (record, index) => record.key"
+               :scroll="{ y: 400 }" bordered>
+        <template #enable="text, record">
+          <a-switch v-model="record.enable" />
+        </template>
+        <template #operation="text, record">
+          <a-button type="link" @click="viewItem(record)">查看</a-button>
+          <a-button type="link" @click="editItem(record)">编辑</a-button>
+          <a-button type="link" @click="deleteItem(record)">删除</a-button>
+        </template>
+      </a-table>
+
+      <!--<div style="width: 100%;text-align: right;margin-top: 15px;">-->
+      <!--  <a-pagination ref="pagination"-->
+      <!--                :showQuickJumper="true"-->
+      <!--                :show-size-changer="true"-->
+      <!--                :show-total="showTotal"-->
+      <!--                v-model:current="currentPage"-->
+      <!--                :default-current="1"-->
+      <!--                :total="500"-->
+      <!--                @showSizeChange="onShowSizeChange"-->
+      <!--  />-->
+      <!--</div>-->
+    </div>
+
+
+    <a-modal title="批量执行策略" v-if="showCLInfo" v-model="showCLInfo" width="500" height="300" centered style="max-height: 300px;overflow-y: auto" @ok="handleOk">
+      <a-form-model :form="formData" :label-col="{span:6}" :wrapperCol="{span:16}" style="overflow-y: auto;height: 450px">
+
+        <a-form-item label="策略名称:" class="formItem" >
+          <a-input :disabled="disabledForm" v-model="formData.clName" placeholder="请输入策略名称" />
+        </a-form-item>
+
+        <a-form-item label="执行方式:" class="formItem" >
+          <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.method" >
+            <a-select-option value="1"> 每日执行 </a-select-option>
+            <a-select-option value="2"> 工作日与非工作日区别执行 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="执行时间:" class="formItem" >
+          <timeRange :disabled="disabledForm" time-format="yyyy/MM/DD" :time-range.sync="formData.timeRange" />
+        </a-form-item>
+
+        <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" v-if="formData.method=='2'" >工作日策略 -</div>
+
+        <a-form-item label="开机策略:" class="formItem" >
+          <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.openCl">
+            <a-select-option value="0"> 定时开关机 </a-select-option>
+            <a-select-option value="1"> 24小时开机 </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item label="开机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.openTime" :disabled="!(formData.openCl=='0') || disabledForm" />
+        </a-form-item>
+        <a-form-item label="关机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0') || disabledForm" />
+        </a-form-item>
+
+        <a-form-item label="灯光亮度:" class="formItem" >
+          <a-slider id="test" v-model:value="formData.brightness" :disabled="disabledForm" />
+        </a-form-item>
+
+        <a-form-item label="灯光色温:" class="formItem" >
+          <a-slider id="test" v-model:value="formData.color" :disabled="disabledForm" />
+        </a-form-item>
+
+        <a-form-item label="人体感应:" class="formItem" >
+          <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.sensor">
+            <a-select-option value="0"> 无 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <div v-if="formData.method=='2'">
+
+          <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" >非工作日策略 -</div>
+
+          <a-form-item label="开机策略:" class="formItem" >
+            <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.openCl">
+              <a-select-option value="0"> 定时开关机 </a-select-option>
+              <a-select-option value="1"> 24小时开机 </a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item label="开机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.openTime"  :disabled="!(formData.openCl=='0') || disabledForm"/>
+          </a-form-item>
+          <a-form-item label="关机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0') || disabledForm" />
+          </a-form-item>
+
+          <a-form-item label="灯光亮度:" class="formItem" >
+            <a-slider id="test" v-model:value="formData.brightness" :disabled="disabledForm"  />
+          </a-form-item>
+
+          <a-form-item label="灯光色温:" class="formItem" >
+            <a-slider id="test" v-model:value="formData.color" :disabled="disabledForm"  />
+          </a-form-item>
+
+          <a-form-item label="人体感应:" class="formItem" >
+            <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.sensor">
+              <a-select-option value="0"> 无 </a-select-option>
+            </a-select>
+          </a-form-item>
+        </div>
+
+      </a-form-model>
+    </a-modal>
+
+  </div>
+</template>
+
+<script>
+import Query from "@/components/common/query.vue";
+
+export default {
+  components: {
+    Query
+  },
+  data() {
+    return {
+      showCLInfo: false,
+      disabledForm: false,
+      formData: {},
+      currentPage: 1,
+      selectedRowKeys: [],
+      queryData: {
+        enable: '0'
+      },
+      tableColumns: [
+        {
+          title: '名称',
+          dataIndex: 'name',
+          key: 'name',
+        },
+        {
+          title: '创建时间',
+          dataIndex: 'createTime',
+          key: 'createTime',
+        },
+        {
+          title: '创建人',
+          dataIndex: 'creator',
+          key: 'creator',
+        },
+        {
+          title: '启用',
+          dataIndex: 'enable',
+          key: 'enable',
+          scopedSlots: { customRender: 'enable' },
+        },
+        {
+          title: '操作',
+          dataIndex: 'operation',
+          key: 'operation',
+          scopedSlots: { customRender: 'operation' },
+        },
+
+      ],
+      oriTableData: [],
+      tableData: [
+        {
+          key: '1',
+          name: "智慧场景照明策略1",
+          createTime: '2023/03/20 15:35:20',
+          creator: '张峰',
+          enable: true,
+          content: {
+            method: "1",
+            mode: "2",
+            openCl: "1",
+            sensor: "0",
+            tm: "23",
+            wind: "1"
+          }
+        },{
+          key: '2',
+          name: "智慧场景照明策略2",
+          createTime: '2023/03/20 15:35:20',
+          creator: '张峰',
+          enable: true,
+          content: {
+            method: "1",
+            mode: "2",
+            openCl: "1",
+            sensor: "0",
+            tm: "23",
+            wind: "1"
+          }
+        },{
+          key: '3',
+          name: "智慧场景照明策略3",
+          createTime: '2023/03/20 15:35:20',
+          creator: '张峰',
+          enable: true,
+          content: {
+            method: "1",
+            mode: "2",
+            openCl: "1",
+            sensor: "0",
+            tm: "23",
+            wind: "1"
+          }
+        }
+      ]
+    }
+  },
+  mounted() {
+    this.oriTableData = JSON.parse(JSON.stringify(this.tableData));
+  },
+  methods: {
+    showTotal(total, range) {
+      let pageSize = range[1]-range[0]+1;
+      let pages = Math.ceil(total/pageSize);
+      return '共'+total+'条数据,第 '+this.currentPage+'/'+pages+' 页';
+    },
+    onShowSizeChange(val) {
+
+    },
+    onSelectChange(val) {
+      this.selectedRowKeys = val
+    },
+    batchDelete() {
+      let app = this;
+      console.log(app.selectedRowKeys)
+      this.tableData.forEach(item=>{
+        let index = app.selectedRowKeys.indexOf(item.key);
+        if (index>-1) {
+          app.tableData.splice(app.tableData.indexOf(item), 1)
+        }
+      })
+      this.selectedRowKeys = []
+    },
+    handleOk() {
+      this.$message.success('操作成功');
+      let createTime = this.$util.dateUtil.getCurrDateTime()
+      let obj = {
+        key: new Date(),
+        name: this.formData.clName,
+        createTime: createTime,
+        creator: this.$store.userStore().userInfo.userName,
+        enable: true,
+        content: this.formData
+      }
+      this.tableData.push(obj);
+      this.showCLInfo = false;
+    },
+    search() {
+      let arr = this.oriTableData.filter(item=>{
+        if (this.queryData.name && this.queryData.name != '') {
+          return item.name.indexOf(this.queryData.name)>-1;
+        } else {
+        }
+        if (this.queryData.enable == true || this.queryData.enable == false) {
+          return item.enable = this.queryData.enable
+        } else {
+        }
+        return true;
+      })
+      this.tableData = arr
+    },
+    viewItem(item) {
+      this.disabledForm = true;
+      item.content.clName = item.name;
+      this.formData = item.content;
+      this.showCLInfo = true;
+    },
+    deleteItem(item) {
+      let index = this.tableData.indexOf(item);
+      if (index>-1) {
+        this.tableData.splice(index, 1)
+      }
+    },
+    editItem(item) {
+      this.disabledForm = false;
+      item.content.clName = item.name;
+      this.formData = item.content;
+      this.showCLInfo = true;
+    },
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.accessManage {
+  width: 100%;
+  height: 100%;
+
+  .ant-form-inline .ant-form-item {
+    margin-right: 60px;
+
+  }
+
+  .accessManage-body {
+    background: white;
+    border-radius: 4px;
+    margin-top: 12px;
+    padding: 15px;
+  }
+
+}
+</style>

+ 297 - 0
src/components/scene/energy/tactics/waterTactics.vue

@@ -0,0 +1,297 @@
+<template>
+  <div class="accessManage ">
+    <div class="page-query-core" style="padding: 30px 15px;background-color: #fafafa">
+      <Query :show="['']" :query-data.sync="queryData" :search="search" >
+        <template #extraItem>
+          <a-form-model-item label="策略名称" style="margin-left: 45px">
+            <a-input style="width: 250px" v-model="queryData.name" placeholder="请输入策略名称"/>
+          </a-form-model-item>
+          <a-form-model-item label="状态" style="margin-left: 45px">
+            <a-select v-model="queryData.enable" style="width: 250px">
+              <a-select-option value="0">全部</a-select-option>
+              <a-select-option :value="true">开启</a-select-option>
+              <a-select-option :value="false">关闭</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </template>
+      </Query>
+    </div>
+
+    <div class="accessManage-body">
+      <a-button size="small" type="primary" style="height: 24px;width: 85px" @click="()=>{this.showCLInfo=true}">新建</a-button>
+      <a-button size="small" style="height: 25px;width: 85px" @click="batchDelete">批量删除</a-button>
+      <a-table :columns="tableColumns" :data-source="tableData" :pagination="true" style="margin-top: 12px"
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+               :rowKey=" (record, index) => record.key"
+               :scroll="{ y: 400 }" bordered>
+        <template #enable="text, record">
+          <a-switch v-model="record.enable" />
+        </template>
+        <template #operation="text, record">
+          <a-button type="link" @click="viewItem(record)">查看</a-button>
+          <a-button type="link" @click="editItem(record)">编辑</a-button>
+          <a-button type="link" @click="deleteItem(record)">删除</a-button>
+        </template>
+      </a-table>
+
+      <!--<div style="width: 100%;text-align: right;margin-top: 15px;">-->
+      <!--  <a-pagination ref="pagination"-->
+      <!--                :showQuickJumper="true"-->
+      <!--                :show-size-changer="true"-->
+      <!--                :show-total="showTotal"-->
+      <!--                v-model:current="currentPage"-->
+      <!--                :default-current="1"-->
+      <!--                :total="500"-->
+      <!--                @showSizeChange="onShowSizeChange"-->
+      <!--  />-->
+      <!--</div>-->
+    </div>
+
+
+    <a-modal title="批量执行策略" v-if="showCLInfo" v-model="showCLInfo" width="500" height="300" centered style="max-height: 300px;overflow-y: auto" @ok="handleOk">
+      <a-form-model :form="formData" :label-col="{span:6}" :wrapperCol="{span:16}" style="overflow-y: auto;height: 450px">
+
+        <a-form-item label="策略名称:" class="formItem" >
+          <a-input :disabled="disabledForm" v-model="formData.clName" placeholder="请输入策略名称" />
+        </a-form-item>
+
+        <a-form-item label="执行方式:" class="formItem" >
+          <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.method" >
+            <a-select-option value="1"> 每日执行 </a-select-option>
+            <a-select-option value="2"> 工作日与非工作日区别执行 </a-select-option>
+          </a-select>
+        </a-form-item>
+
+        <a-form-item label="执行时间:" class="formItem" >
+          <timeRange :disabled="disabledForm" time-format="yyyy/MM/DD" :time-range.sync="formData.timeRange" />
+        </a-form-item>
+
+        <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" v-if="formData.method=='2'" >工作日策略 -</div>
+
+        <a-form-item label="开机策略:" class="formItem" >
+          <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.openCl">
+            <a-select-option value="0"> 定时开关机 </a-select-option>
+            <a-select-option value="1"> 24小时开机 </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item label="开机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.openTime" :disabled="!(formData.openCl=='0') || disabledForm" />
+        </a-form-item>
+        <a-form-item label="关机时间:" class="formItem" >
+          <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0') || disabledForm" />
+        </a-form-item>
+
+        <div v-if="formData.method=='2'">
+
+          <div style="margin-left: 8%;font-weight: bold;margin-bottom: 15px" >非工作日策略 -</div>
+
+          <a-form-item label="开机策略:" class="formItem" >
+            <a-select :disabled="disabledForm" default-value="0" style="width: 200px" v-model="formData.openCl">
+              <a-select-option value="0"> 定时开关机 </a-select-option>
+              <a-select-option value="1"> 24小时开机 </a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item label="开机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.openTime"  :disabled="!(formData.openCl=='0') || disabledForm"/>
+          </a-form-item>
+          <a-form-item label="关机时间:" class="formItem" >
+            <a-time-picker use24-hours v-model="formData.closeTime" :disabled="!(formData.openCl=='0') || disabledForm" />
+          </a-form-item>
+        </div>
+
+      </a-form-model>
+    </a-modal>
+
+  </div>
+</template>
+
+<script>
+import Query from "@/components/common/query.vue";
+
+export default {
+  components: {
+    Query
+  },
+  data() {
+    return {
+      showCLInfo: false,
+      disabledForm: false,
+      formData: {},
+      currentPage: 1,
+      selectedRowKeys: [],
+      queryData: {
+        enable: '0'
+      },
+      tableColumns: [
+        {
+          title: '名称',
+          dataIndex: 'name',
+          key: 'name',
+        },
+        {
+          title: '创建时间',
+          dataIndex: 'createTime',
+          key: 'createTime',
+        },
+        {
+          title: '创建人',
+          dataIndex: 'creator',
+          key: 'creator',
+        },
+        {
+          title: '启用',
+          dataIndex: 'enable',
+          key: 'enable',
+          scopedSlots: { customRender: 'enable' },
+        },
+        {
+          title: '操作',
+          dataIndex: 'operation',
+          key: 'operation',
+          scopedSlots: { customRender: 'operation' },
+        },
+
+      ],
+      oriTableData: [],
+      tableData: [
+        {
+          key: '1',
+          name: "智慧场景饮水机策略1",
+          createTime: '2023/03/20 15:35:20',
+          creator: '张峰',
+          enable: true,
+          content: {
+            method: "1",
+            mode: "2",
+            openCl: "1",
+            sensor: "0",
+            tm: "23",
+            wind: "1"
+          }
+        },{
+          key: '2',
+          name: "智慧场景饮水机策略2",
+          createTime: '2023/03/20 15:35:20',
+          creator: '张峰',
+          enable: true,
+          content: {
+            method: "1",
+            mode: "2",
+            openCl: "1",
+            sensor: "0",
+            tm: "23",
+            wind: "1"
+          }
+        },{
+          key: '3',
+          name: "智慧场景饮水机策略3",
+          createTime: '2023/03/20 15:35:20',
+          creator: '张峰',
+          enable: true,
+          content: {
+            method: "1",
+            mode: "2",
+            openCl: "1",
+            sensor: "0",
+            tm: "23",
+            wind: "1"
+          }
+        }
+      ]
+    }
+  },
+  mounted() {
+    this.oriTableData = JSON.parse(JSON.stringify(this.tableData));
+  },
+  methods: {
+    showTotal(total, range) {
+      let pageSize = range[1]-range[0]+1;
+      let pages = Math.ceil(total/pageSize);
+      return '共'+total+'条数据,第 '+this.currentPage+'/'+pages+' 页';
+    },
+    onShowSizeChange(val) {
+
+    },
+    onSelectChange(val) {
+      this.selectedRowKeys = val
+    },
+    batchDelete() {
+      let app = this;
+      console.log(app.selectedRowKeys)
+      this.tableData.forEach(item=>{
+        let index = app.selectedRowKeys.indexOf(item.key);
+        if (index>-1) {
+          app.tableData.splice(app.tableData.indexOf(item), 1)
+        }
+      })
+      this.selectedRowKeys = []
+    },
+    handleOk() {
+      this.$message.success('操作成功');
+      let createTime = this.$util.dateUtil.getCurrDateTime()
+      let obj = {
+        key: new Date(),
+        name: this.formData.clName,
+        createTime: createTime,
+        creator: this.$store.userStore().userInfo.userName,
+        enable: true,
+        content: this.formData
+      }
+      this.tableData.push(obj);
+      this.showCLInfo = false;
+    },
+    search() {
+      let arr = this.oriTableData.filter(item=>{
+        if (this.queryData.name && this.queryData.name != '') {
+          return item.name.indexOf(this.queryData.name)>-1;
+        } else {
+        }
+        if (this.queryData.enable == true || this.queryData.enable == false) {
+          return item.enable = this.queryData.enable
+        } else {
+        }
+        return true;
+      })
+      this.tableData = arr
+    },
+    viewItem(item) {
+      this.disabledForm = true;
+      item.content.clName = item.name;
+      this.formData = item.content;
+      this.showCLInfo = true;
+    },
+    deleteItem(item) {
+      let index = this.tableData.indexOf(item);
+      if (index>-1) {
+        this.tableData.splice(index, 1)
+      }
+    },
+    editItem(item) {
+      this.disabledForm = false;
+      item.content.clName = item.name;
+      this.formData = item.content;
+      this.showCLInfo = true;
+    },
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.accessManage {
+  width: 100%;
+  height: 100%;
+
+  .ant-form-inline .ant-form-item {
+    margin-right: 60px;
+
+  }
+
+  .accessManage-body {
+    background: white;
+    border-radius: 4px;
+    margin-top: 12px;
+    padding: 15px;
+  }
+
+}
+</style>

+ 51 - 7
src/components/security/alarm/manage/securityAlarmManageDistributeMap.vue

@@ -1,10 +1,10 @@
 <template>
-  <div style="width: 100%;height: 500px">
-    <div style="width: 100%;height: 450px">
-      <ImageMap></ImageMap>
+  <div style="width: 100%;height: 400px">
+    <div style="width: 100%;height: 350px;overflow-y: auto">
+      <ImageMap :markers="devicePositions" :src="areaSrc" style="height: 200px"></ImageMap>
     </div>
-    <div style="width: 100%;height: 50px">
-      <a-radio-group style="margin: 3px auto 3px 33%;" :options="floorOptions" default-value="1" @change="floorChange" />
+    <div style="width: 100%;height: 50px;margin-top: 5px;text-align: center">
+      <a-radio-group style="margin: 0 auto" :options="floorOptions" default-value="1" @change="floorChange" />
     </div>
   </div>
 </template>
@@ -14,10 +14,54 @@ import ImageMap from "@/components/security/alarm/map/imageMap.vue";
 export default {
   data() {
     return {
+      areaSrc: 'security/area_1F.png',
+      devicePositions: [
+        {
+          status: 1,
+          left: 348,
+          top: 27,
+        },{
+          status: 1,
+          left: 373,
+          top: 27,
+        },{
+          status: 1,
+          left: 230,
+          top: 76,
+        },{
+          status: 0,
+          left: 260,
+          top: 76,
+        },{
+          status: 1,
+          left: 300,
+          top: 100,
+        },{
+          status: 0,
+          left: 325,
+          top: 100,
+        },{
+          status: 1,
+          left: 300,
+          top: 130,
+        },{
+          status: 2,
+          left: 325,
+          top: 130,
+        },{
+          status: 1,
+          left: 430,
+          top: 155,
+        },{
+          status: 1,
+          left: 180,
+          top: 350
+        }
+      ],
       floorOptions: [
         { label: '一层大厅', value: '1' },
-        { label: 'B1停车场', value: 'B1' },
-        { label: 'B2停车场', value: 'B2' },
+        //{ label: 'B1停车场', value: 'B1' },
+        //{ label: 'B2停车场', value: 'B2' },
       ]
     }
   },

+ 142 - 1
src/components/security/alarm/securityAlarmGrid.vue

@@ -5,7 +5,7 @@
         <a-row style="height: 100%">
           <a-col :span="4" style="height: 90%">
             <div style="padding-left: 15px; height: 100%">
-              <SecurityDeviceSelect></SecurityDeviceSelect>
+              <SecurityDeviceSelect :tree-data="treeData"></SecurityDeviceSelect>
             </div>
           </a-col>
           <a-col :span="20" style="height: 90%">
@@ -27,6 +27,147 @@ export default {
   components: {
     SecurityDeviceSelect,
     HkwsCamera
+  },
+  data() {
+    return {
+      treeData: [
+        {
+          title: '一层大厅',
+          key: '1',
+          selectable: false,
+          children: [
+            {
+              title: '大厅正门',
+              key: '1-0',
+              slots: {
+                icon: 'camera',
+              },
+            },
+            {
+              title: '1-2',
+              key: '1-2',
+              slots: {
+                icon: 'camera',
+              },
+            },{
+              title: '1-3',
+              key: '1-3',
+              slots: {
+                icon: 'camera',
+              },
+            }
+
+          ],
+        },
+        {
+          title: '2F',
+          key: '2',
+          selectable: false,
+          children: [
+            {
+              title: '正门',
+              key: '2-0',
+              slots: {
+                icon: 'camera',
+              },
+            },{
+              title: '2-1',
+              key: '2-1',
+              slots: {
+                icon: 'camera',
+              },
+            },{
+              title: '2-2',
+              key: '2-2',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },
+        {
+          title: '3F',
+          key: '3',
+          selectable: false,
+          children: [
+            {
+              title: '正门',
+              key: '3-0',
+              slots: {
+                icon: 'camera',
+              },
+            },
+            {
+              title: '3-1',
+              key: '3-1',
+              slots: {
+                icon: 'camera',
+              },
+            },
+            {
+              title: '3-2',
+              key: '3-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },
+        {
+          title: '4F',
+          key: '4',
+          selectable: false,
+          children: [
+            {
+              title: '4-1',
+              key: '4-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },{
+          title: '5F',
+          key: '5',
+          selectable: false,
+          children: [
+            {
+              title: '5-1',
+              key: '5-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },{
+          title: '6F',
+          key: '6',
+          selectable: false,
+          children: [
+            {
+              title: '6-1',
+              key: '6-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },{
+          title: '7F',
+          key: '7',
+          selectable: false,
+          children: [
+            {
+              title: '7-1',
+              key: '7-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },
+      ],
+    }
   }
 }
 </script>

+ 138 - 1
src/components/security/alarm/securityAlarmInfo.vue

@@ -2,7 +2,7 @@
   <div class="securityAlarmInfo">
     <a-row style="height: 100%">
       <a-col :span="4" style="height: 100%">
-        <security-device-select/>
+        <security-device-select :tree-data="treeData"/>
       </a-col>
       <a-col :span="20" style="height: 100%;padding: 15px">
         <div class="securityAlarmInfo-query">
@@ -106,6 +106,143 @@ export default {
     return {
       showDetail: false,
       formData: {},
+      treeData: [
+        {
+          title: '一层大厅',
+          key: '1',
+          selectable: false,
+          children: [
+            {
+              title: '大厅正门',
+              key: '1-0',
+              slots: {
+                icon: 'camera',
+              },
+            },
+            {
+              title: '1-2',
+              key: '1-2',
+              slots: {
+                icon: 'camera',
+              },
+            },{
+              title: '1-3',
+              key: '1-3',
+              slots: {
+                icon: 'camera',
+              },
+            }
+
+          ],
+        },
+        {
+          title: '2F',
+          key: '2',
+          selectable: false,
+          children: [
+            {
+              title: '正门',
+              key: '2-0',
+              slots: {
+                icon: 'camera',
+              },
+            },{
+              title: '2-1',
+              key: '2-1',
+              slots: {
+                icon: 'camera',
+              },
+            },{
+              title: '2-2',
+              key: '2-2',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },
+        {
+          title: '3F',
+          key: '3',
+          selectable: false,
+          children: [
+            {
+              title: '正门',
+              key: '3-0',
+              slots: {
+                icon: 'camera',
+              },
+            },
+            {
+              title: '3-1',
+              key: '3-1',
+              slots: {
+                icon: 'camera',
+              },
+            },
+            {
+              title: '3-2',
+              key: '3-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },
+        {
+          title: '4F',
+          key: '4',
+          selectable: false,
+          children: [
+            {
+              title: '4-1',
+              key: '4-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },{
+          title: '5F',
+          key: '5',
+          selectable: false,
+          children: [
+            {
+              title: '5-1',
+              key: '5-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },{
+          title: '6F',
+          key: '6',
+          selectable: false,
+          children: [
+            {
+              title: '6-1',
+              key: '6-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },{
+          title: '7F',
+          key: '7',
+          selectable: false,
+          children: [
+            {
+              title: '7-1',
+              key: '7-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },
+      ],
       tableData: [
         {
           time: '2022-08-01 12:00:00',

+ 5 - 5
src/components/security/alarm/securityAlarmMap.vue

@@ -5,8 +5,8 @@
         <span>楼层:</span>
         <a-select v-model="floor" style="width: 150px">
           <a-select-option value="1">1F</a-select-option>
-          <a-select-option value="2">B2</a-select-option>
-          <a-select-option value="3">B3</a-select-option>
+          <!--<a-select-option value="2">B2</a-select-option>-->
+          <!--<a-select-option value="3">B3</a-select-option>-->
         </a-select>
 
         <div style="display: inline-block;float: right">
@@ -64,9 +64,9 @@ export default {
       floor: '1',
       areaSrc: 'security/area_1F.png',
       deviceNum: {
-        online: 0,
-        unline: 0,
-        alarm: 0,
+        online: 7,
+        unline: 2,
+        alarm: 1,
       },
       devicePositions: [
         {

+ 5 - 18
src/components/security/common/securityDeviceSelect.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="securityDeviceSelect" style="width: 100%;height: 100%">
-    <div class="securityDeviceSelect-title">监控点位</div>
+    <div class="securityDeviceSelect-title">设备点位</div>
     <div>
       <a-input-search style="margin-bottom: 8px" placeholder="请输入关键字" @change="onChange"/>
       <a-tree
@@ -34,26 +34,13 @@
 import Card from "@/components/common/card.vue";
 
 export default {
+  props: {
+    treeData: Object,
+  },
   data() {
     return {
-      expandedKeys: [],
+      expandedKeys: ['1'],
       oriData: [],
-      treeData: [
-        {
-          title: '一层大厅',
-          key: '1',
-          selectable: false,
-          children: [
-            {
-              title: '大厅正门',
-              key: '1-0',
-              slots: {
-                icon: 'camera',
-              },
-            }
-          ],
-        },
-      ],
       searchValue: '',
     }
   },

+ 170 - 5
src/components/security/device/securityDevice.vue

@@ -2,7 +2,7 @@
   <div class="securityDevice">
     <a-row style="height: 100%">
       <a-col :span="4" style="height: 100%">
-        <SecurityDeviceSelect />
+        <SecurityDeviceSelect :tree-data="treeData" />
       </a-col>
       <a-col :span="20" style="height: 100%">
         <div class="securityDevice-content">
@@ -10,10 +10,7 @@
             <!--<a-divider style="padding: 0;margin: 0;"/>-->
 
             <div class="securityDevice-devices">
-              <SecurityDeviceItem />
-              <SecurityDeviceItem />
-              <SecurityDeviceItem />
-              <SecurityDeviceItem />
+              <SecurityDeviceItem v-for="(item,index) in devices" :key="index" :item="item" />
             </div>
           </Card>
         </div>
@@ -31,6 +28,174 @@ export default {
     Card,
     SecurityDeviceSelect,
     SecurityDeviceItem,
+  },
+  data() {
+    return {
+      devices: [
+        {
+          name: '门禁设备#1',
+          online: true,
+          type: 'door',
+        },
+        {
+          name: '门禁设备#2',
+          online: true,
+          type: 'door',
+        },
+        {
+          name: '门禁设备#3',
+          online: true,
+          type: 'door',
+        },
+        {
+          name: '空调设备#1',
+          online: true,
+          type: 'air',
+        },
+        {
+          name: '摄像头#1',
+          online: true,
+          type: 'camera',
+        }
+      ],
+      treeData: [
+        {
+          title: '一层大厅',
+          key: '1',
+          selectable: false,
+          children: [
+            {
+              title: '大厅正门',
+              key: '1-0',
+              slots: {
+                icon: 'camera',
+              },
+            },
+            {
+              title: '1-2',
+              key: '1-2',
+              slots: {
+                icon: 'camera',
+              },
+            },{
+              title: '1-3',
+              key: '1-3',
+              slots: {
+                icon: 'camera',
+              },
+            }
+
+          ],
+        },
+        {
+          title: '2F',
+          key: '2',
+          selectable: false,
+          children: [
+            {
+              title: '正门',
+              key: '2-0',
+              slots: {
+                icon: 'camera',
+              },
+            },{
+              title: '2-1',
+              key: '2-1',
+              slots: {
+                icon: 'camera',
+              },
+            },{
+              title: '2-2',
+              key: '2-2',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },
+        {
+          title: '3F',
+          key: '3',
+          selectable: false,
+          children: [
+            {
+              title: '正门',
+              key: '3-0',
+              slots: {
+                icon: 'camera',
+              },
+            },
+            {
+              title: '3-1',
+              key: '3-1',
+              slots: {
+                icon: 'camera',
+              },
+            },
+            {
+              title: '3-2',
+              key: '3-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },
+        {
+          title: '4F',
+          key: '4',
+          selectable: false,
+          children: [
+            {
+              title: '4-1',
+              key: '4-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },{
+          title: '5F',
+          key: '5',
+          selectable: false,
+          children: [
+            {
+              title: '5-1',
+              key: '5-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },{
+          title: '6F',
+          key: '6',
+          selectable: false,
+          children: [
+            {
+              title: '6-1',
+              key: '6-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },{
+          title: '7F',
+          key: '7',
+          selectable: false,
+          children: [
+            {
+              title: '7-1',
+              key: '7-1',
+              slots: {
+                icon: 'camera',
+              },
+            }
+          ],
+        },
+      ],
+    }
   }
 }
 </script>

+ 27 - 5
src/components/security/device/securityDeviceItem.vue

@@ -4,21 +4,33 @@
       <a-col>
         <div class="securityDeviceItem-line">
           <span class="securityDeviceItem-line-label">设备名称:</span>
-          门禁设备1#
+          {{ item.name }}
         </div>
       </a-col>
       <a-col :span="18">
         <div class="securityDeviceItem-line">
           <span class="securityDeviceItem-line-label">设备状态:</span>
-          在线
+          <span v-if="item.online">
+            <span style="width: 10px;height: 10px;display: inline-block;background-color: #3CC2AC;border-radius: 5px;margin-left: 5px"></span>
+            在线
+          </span>
+          <span v-if="!item.online">
+            <span style="width: 10px;height: 10px;display: inline-block;background-color: gray;border-radius: 5px;margin-left: 5px"></span>
+            离线
+          </span>
         </div>
         <div class="securityDeviceItem-line">
           <span class="securityDeviceItem-line-label">功能交互:</span>
+          <div style="">
+            <a-switch :style="{backgroundColor: item.online?'#3CC2AC':'#b9bcbf'}" size="small" v-model="item.online" @change="changeStatus"/>
+          </div>
         </div>
       </a-col>
       <a-col :span="6">
-        <div >
-          <img height="60" :src="requireImg('security/devices/device-door.png')" />
+        <div>
+          <img v-if="item.type=='door'" height="60" :src="requireImg('security/devices/device-door.png')"/>
+          <img v-if="item.type=='camera'" height="60" :src="requireImg('security/devices/device-camera.png')"/>
+          <img v-if="item.type=='air'" height="60" :src="requireImg('security/devices/device-air.png')"/>
         </div>
       </a-col>
 
@@ -33,7 +45,15 @@
 import {requireImg} from "@/utils/requireImg";
 
 export default {
-  methods: {requireImg}
+  props: {
+    item: Object
+  },
+  methods: {
+    requireImg,
+    changeStatus(val) {
+
+    }
+  }
 }
 </script>
 
@@ -44,9 +64,11 @@ export default {
   width: 300px;
   height: 150px;
   background-color: #F7FBFF;
+
   .securityDeviceItem-line {
     line-height: 25px;
     margin: 12px 12px 0;
+
     .securityDeviceItem-line-label {
       color: #B2B2B2;
     }

+ 6 - 3
src/components/work/bus/component/workBusChart.vue

@@ -34,6 +34,7 @@ export default {
             name: '出车次数',
             type: 'value',
             position: 'left',
+            max: 5,
             axisLine: {
               show: true,
             },
@@ -44,6 +45,7 @@ export default {
           {
             name: '出车时长(h)',
             type: 'value',
+            max: 10,
             axisLine: {
               show: true,
             },
@@ -76,7 +78,8 @@ export default {
             name: '平均出车时长',
             data: [],
             type: 'bar',
-            barWidth: '15%',
+            yAxisIndex: '1',
+            barWidth: '30%',
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
             },
@@ -88,8 +91,8 @@ export default {
             name: '出车次数',
             data: [],
             type: 'bar',
-            yAxisIndex: 1,
-            barWidth: '15%',
+            yAxisIndex: 0,
+            barWidth: '30%',
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
             },

+ 1 - 1
src/components/work/overview/workOverview.vue

@@ -60,7 +60,7 @@ export default {
     return {
       queryData: {
         companyId: '0',
-        floorId: '0',
+        floorId: '1',
         timeRange: timeRange
       },
       columns: [

+ 2 - 2
src/components/work/print/component/workPrintChart.vue

@@ -88,7 +88,7 @@ export default {
             name: '打印纸张',
             data: [],
             type: 'bar',
-            barWidth: '15%',
+            barWidth: this.$constant.ECHARTS_BAR_WIDTH,
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
             },
@@ -101,7 +101,7 @@ export default {
             data: [],
             type: 'bar',
             yAxisIndex: 1,
-            barWidth: '15%',
+            barWidth: this.$constant.ECHARTS_BAR_WIDTH,
             backgroundStyle: {
               color: 'rgba(180, 180, 180, 0.2)'
             },

+ 20 - 2
src/components/work/print/workPrint.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="page-query-core">
-      <query :show="['company', 'floor', 'time']" :query-data.sync="queryData" :reset="reset" :search="search"></query>
+      <query :show="['company', 'floor', 'time']" :floor-options="floorData" :query-data.sync="queryData" :reset="reset" :search="search"></query>
       <card :title="'核心指标'">
         <CoreData :data-list="coreData"></CoreData>
       </card>
@@ -54,9 +54,27 @@ export default {
     return {
       queryData: {
         companyId: '0',
-        floorId: '0',
+        floorId: '16',
         timeRange: timeRange,
       },
+      floorData: [
+        {
+          value: '16',
+          label: "16F"
+        },
+        {
+          value: '17',
+          label: "17F"
+        },
+        {
+          value: '18',
+          label: "18F"
+        },
+        {
+          value: '19',
+          label: "19F"
+        },
+      ],
       columns: [
         {title: "序号", dataIndex: "index", key: "1", width: 48},
         {title: "姓名", dataIndex: "name", key: "2", width: 60},

+ 3 - 1
src/utils/constant.js

@@ -13,6 +13,8 @@ const ECHARTS_DATAZOOM = [
     }
 ]
 
+const ECHARTS_BAR_WIDTH = '30%'
+
 // 常量-时间范围快捷搜索条件
 const PICKER_OPTIONS = {
     shortcuts: [
@@ -63,5 +65,5 @@ const COLOR_LEAVEL = {
 // 折线图可选颜色
 const ECHART_LINE_COLOR_LIST = ["#303133", "#606266", "#909399", "#C0C4CC", "DCDFE6"];
 export default {
-    PICKER_OPTIONS, COLOR_LEAVEL, ECHART_LINE_COLOR_LIST,ECHARTS_DATAZOOM
+    PICKER_OPTIONS, COLOR_LEAVEL, ECHART_LINE_COLOR_LIST,ECHARTS_DATAZOOM,ECHARTS_BAR_WIDTH
 }