Pārlūkot izejas kodu

更新202110080907

fanghuisheng 3 gadi atpakaļ
vecāks
revīzija
15a3d6965d

+ 0 - 1
src/layouts/IndexLayout/index.vue

@@ -28,7 +28,6 @@
         </permission>
       </div>
     </div>
-    <bread-crumbs class="breadcrumb" :list="breadCrumbs"></bread-crumbs>
     <settings></settings>
   </div>
 </template>

+ 50 - 0
src/layouts/IndexLayout/locales/zh-TW.ts

@@ -2,6 +2,56 @@ export default {
   'index-layout.topmenu.userinfo': '個人信息',
   'index-layout.topmenu.logout': '退出',
 
+  'index-layout.menu.alarmManage': '告警管理',
+  'index-layout.menu.siteManage': '站点管理',
+
+  'index-layout.menu.stationManage': '台区管理',
+  'index-layout.menu.stationManage.EditArticle': '站点列表',
+  'index-layout.menu.stationManage.Articleindex': '所有台区',
+
+  'index-layout.menu.deviceManage': '设备管理',
+  'index-layout.menu.deviceManage.powerEquip': '电力监测设备',
+  'index-layout.menu.deviceManage.videoEquip': '视频监测设备',
+  'index-layout.menu.deviceManage.communicateEquip': '通信设备',
+  'index-layout.menu.deviceManage.channelList': '通道列表',
+  'index-layout.menu.deviceManage.attribTemplate': '属性模板',
+
+  'index-layout.menu.dataManage': '数据管理',
+  'index-layout.menu.dataManage.sameAnalysis': '同比分析报表',
+  'index-layout.menu.dataManage.chainAnalysis': '环比分析报表',
+  'index-layout.menu.dataManage.handOpera': '手动抄表',
+  'index-layout.menu.dataManage.energyReport': '用能月报',
+  'index-layout.menu.dataManage.demandAnalysis': '需量分析',
+  'index-layout.menu.dataManage.consumConfig': '能耗分析配置',
+
+
+  'index-layout.menu.powerQuality': '电能质量',
+  'index-layout.menu.powerQuality.sameAnalysis': '谐波报表',
+  'index-layout.menu.powerQuality.chainAnalysis': '实时监测',
+  'index-layout.menu.powerQuality.handOpera': '评估报告',
+  'index-layout.menu.powerQuality.energyReport': '三相不平衡分析',
+
+  'index-layout.menu.monthReport': '月度报告',
+
+  'index-layout.menu.planOutage': '计划停电',
+
+  'index-layout.menu.patrolManage': '巡检管理',
+  'index-layout.menu.patrolManage.patrolPlan': '巡检计划',
+  'index-layout.menu.patrolManage.patrolRecord': '巡检记录',
+  'index-layout.menu.patrolManage.patrolContent': '巡检内容',
+  'index-layout.menu.patrolManage.checkEntries': '检查条目',
+
+  'index-layout.menu.operManage': '运维管理',
+  'index-layout.menu.operManage.siteAchives': '现场档案',
+  'index-layout.menu.operManage.defectManage': '缺陷管理',
+  'index-layout.menu.operManage.workManage': '工单管理',
+  'index-layout.menu.operManage.operStatistics': '运维统计',
+  'index-layout.menu.operManage.workStatistics': '工作量统计',
+
+  'index-layout.menu.systemManage': '系统管理',
+  'index-layout.menu.systemManage.userManage': '用户管理',
+  'index-layout.menu.systemManage.rolePermission': '权限管理',
+
   'index-layout.menu.roles': '權限驗證',
   'index-layout.menu.roles.all': '用戶都有權限',
   'index-layout.menu.roles.user': 'Users有權限',

+ 136 - 2
src/views/deviceManage/attribTemplate/index.vue

@@ -1,5 +1,139 @@
 <template>
-  <div style="padding:30px;">
-   属性模板
+  <div class="attribTemplate">
+    <div class="attribContent1">
+      <div style="display: flex">
+        <el-input
+          placeholder="设备类型"
+          v-model="filterText"
+          class="attContentInput"
+          style="width: 90%"
+        >
+          <template #suffix>
+            <i class="el-icon-search el-input__icon"></i>
+          </template>
+        </el-input>
+        <el-button type="success" @click="addItem()">新增</el-button>
+      </div>
+
+      <div class="attSwitch">
+        <div
+          class="attSwitchOne"
+          :style="data.length - 1 > data.length ? 'border-bottom: 0' : ''"
+          v-for="(data, ind) in attSwitchData"
+          :key="ind"
+          @click="attSwitchOne(ind)"
+        >
+          <div>{{ data.lable }}</div>
+          <div>{{ data.value }}</div>
+        </div>
+      </div>
+    </div>
+    <div class="attribContent2"></div>
   </div>
 </template>
+<script lang="ts">
+import { defineComponent, ref, Ref } from "vue";
+
+interface PowerEquipData {
+  attSwitchData: any;
+}
+
+export default defineComponent({
+  name: "attribTemplate",
+  components: {},
+  props: {},
+  setup(): PowerEquipData {
+    const attSwitchData = [
+      {
+        id: "powerEquip",
+        lable: "电力监测设备",
+        value: 0,
+      },
+      {
+        id: "videoEquip",
+        lable: "视频监测设备",
+        value: 0,
+      },
+      {
+        id: "communicateEquip",
+        lable: "通信设备",
+        value: 0,
+      },
+      {
+        id: "channelList",
+        lable: "通道列表",
+        value: 0,
+      },
+    ];
+    return {
+      attSwitchData,
+    };
+  },
+  methods: {
+    attSwitchOne(id) {
+      var dom = document.getElementsByClassName("attSwitchOne");
+      var cont = dom[id].getAttribute("style")
+      if (cont != null && cont != "") {
+        dom[id].setAttribute("style", "");
+      } else {
+        dom[id].setAttribute("style", "background-color: #409eff");
+      }
+    },
+  },
+});
+</script>
+
+<style lang="scss">
+.attribTemplate {
+  display: flex;
+  height: calc(100vh - 100px);
+  padding: 30px;
+  margin-top: 50px;
+  .attribContent1 {
+    background-color: #fff;
+    width: 20%;
+    height: 100%;
+    margin-right: 25px;
+    padding: 20px;
+    .el-input__icon {
+      color: #409eff;
+    }
+    .el-input__inner:hover {
+      border-color: #409eff;
+    }
+    .el-input__inner:focus {
+      border-color: #409eff;
+    }
+    .attContentInput {
+      width: 9rem;
+      margin-right: 15px;
+    }
+    .attSwitch {
+      margin-top: 20px;
+      width: 100%;
+      height: 20px;
+      cursor: pointer;
+      .attSwitchOne {
+        display: flex;
+        border: 0.5px solid silver;
+        padding: 8px;
+        font-size: 13px;
+        div:nth-child(1) {
+          width: 100%;
+        }
+      }
+      .attSwitchOne:hover {
+        background-color: #409eff;
+      }
+      .attSwitchOne:focus {
+        background-color: #409eff;
+      }
+    }
+  }
+  .attribContent2 {
+    background-color: #fff;
+    width: 80%;
+    height: 100%;
+  }
+}
+</style>

+ 382 - 2
src/views/deviceManage/powerEquip/index.vue

@@ -1,5 +1,385 @@
 <template>
-  <div style="padding:30px;">
-   电力监测设备
+  <div class="powerEquip">
+    <el-tabs
+      v-model="activeName"
+      type="card"
+      @tab-click="handleClick"
+      style="background-color: #fff; height: 100%"
+      class="tabsSizeColor"
+    >
+      <el-tab-pane label="电力监测设备" name="first">
+        <div class="first">
+          <div class="firstTop">
+            <div class="firstTopLeft">
+              <el-button class='goBack' @click='goBack' v-if="deviceNumData.length > 0" >返回</el-button>
+              <span class="firstTopLeftTitle">{{ title }}:</span>
+              <el-input
+                placeholder="输入关键字进行过滤"
+                v-model="filterText"
+                class="firstTopLeftInput"
+              >
+                <template #suffix>
+                  <i class="el-icon-search el-input__icon"></i>
+                </template>
+              </el-input>
+              <el-button
+                type="primary"
+                icon="el-icon-search"
+                class="search-button"
+                >搜索</el-button
+              >
+              <el-button icon="el-icon-plus" type="success" @click="addItem()"
+                >新增</el-button
+              >
+            </div>
+
+            <div class="firstRight">
+              <el-button type="primary">导入</el-button>
+              <el-button type="primary">导出</el-button>
+            </div>
+          </div>
+
+          <div class="firstContent" v-if="deviceNumData.length <= 0">
+            <el-table
+              :data="tableData"
+              border
+              stripe
+              :header-cell-style="headClass"
+            >
+              <el-table-column fixed prop="manufactor" label="厂家" width="">
+              </el-table-column>
+              <el-table-column prop="deviceModel" label="型号" width="">
+              </el-table-column>
+              <el-table-column prop="deviceNum" label="设备数量" width="">
+                <template #default="scope">
+                  <div
+                    style="margin-right: 15px; cursor: pointer; color: #409eff"
+                    @click="deviceNumSelect({ id: scope.row.manufactor })"
+                  >
+                    {{ scope.row.deviceNum }}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column fixed="right" label="操作" width="250">
+                <template #default="scope">
+                  <el-button
+                    type="text"
+                    size="small"
+                    style="color: #409eff"
+                    @click.prevent="editRow(scope.row)"
+                    >编辑</el-button
+                  >
+                  <el-button
+                    @click="handleDelete(scope.$index, scope.row)"
+                    type="text"
+                    size="small"
+                    style="color: red"
+                    >删除</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <div class="firstContent" v-if="deviceNumData.length > 0">
+            <el-table
+              :data="deviceNumData"
+              border
+              stripe
+              :header-cell-style="headClass"
+            >
+              <el-table-column prop="stationStatus" label="状态" width="">
+                <template #default="scope">
+                  <el-avatar
+                    class="status"
+                    :style="
+                      scope.row.stationStatus == 0
+                        ? 'background-color:red'
+                        : 'background-color:#04F21C'
+                    "
+                  ></el-avatar>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="deviceName"
+                label="电力监测设备名称"
+                width=""
+              >
+              </el-table-column>
+              <el-table-column prop="deviceCode" label="设备编号" width="">
+              </el-table-column>
+              <el-table-column prop="location" label="所属地点" width="">
+              </el-table-column>
+              <el-table-column prop="ratedVoltage" label="额定电压" width="">
+              </el-table-column>
+              <el-table-column prop="ratedCurrent" label="额定电流" width="">
+              </el-table-column>
+              <el-table-column
+                prop="currentLoRaTh"
+                label="电流负载率门限"
+                width=""
+              >
+              </el-table-column>
+              <el-table-column prop="powerQuAn" label="电能质量分析" width="">
+              </el-table-column>
+              <el-table-column prop="meterAddress" label="表计地址" width="">
+              </el-table-column>
+              <el-table-column fixed="right" label="操作" width="">
+                <template #default="scope">
+                  <el-button
+                    type="text"
+                    size="small"
+                    style="color: #409eff"
+                    @click.prevent="editRow(scope.row)"
+                    >编辑</el-button
+                  >
+                  <el-button
+                    @click="handleDelete(scope.$index, scope.row)"
+                    type="text"
+                    size="small"
+                    style="color: red"
+                    >删除</el-button
+                  >
+                </template>
+              </el-table-column>
+              <el-table-column fixed="right" label="变量" width="">
+                <template #default="scope">
+                  <el-button
+                    type="text"
+                    size="small"
+                    style="color: #409eff"
+                    @click.prevent="variableList(scope.row)"
+                    >变量列表</el-button
+                  >
+                  <el-button
+                    @click="clone(scope.$index, scope.row)"
+                    type="text"
+                    size="small"
+                    style="color: #409eff"
+                    >克隆</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+      </el-tab-pane>
+      <el-tab-pane label="视频监测设备" name="second"> </el-tab-pane>
+      <el-tab-pane label="通信设备" name="third"> </el-tab-pane>
+      <el-tab-pane label="通道列表" name="five"> </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
+<script lang="ts">
+import { defineComponent, ref, Ref } from "vue";
+
+interface PowerEquipData {
+  title: Ref;
+  deviceNumData: Ref;
+  tableData: Ref;
+  activeName: Ref;
+  filterText: Ref;
+}
+
+export default defineComponent({
+  name: "powerEquip",
+  components: {},
+  props: {},
+  setup(): PowerEquipData {
+    const title = ref("厂家或型号");
+    const deviceNumData = ref([]);
+    const tableData = ref([
+      {
+        manufactor: "上海永天科技股份有限公司",
+        deviceModel: "测试设备",
+        deviceNum: "8",
+      },
+      {
+        manufactor: "上海永天科技股份有限公司",
+        deviceModel: "测试设备",
+        deviceNum: "8",
+      },
+      {
+        manufactor: "上海永天科技股份有限公司",
+        deviceModel: "测试设备",
+        deviceNum: "8",
+      },
+      {
+        manufactor: "上海永天科技股份有限公司",
+        deviceModel: "测试设备",
+        deviceNum: "8",
+      },
+      {
+        manufactor: "上海永天科技股份有限公司",
+        deviceModel: "测试设备",
+        deviceNum: "8",
+      },
+      {
+        manufactor: "上海永天科技股份有限公司",
+        deviceModel: "测试设备",
+        deviceNum: "8",
+      },
+      {
+        manufactor: "上海永天科技股份有限公司",
+        deviceModel: "测试设备",
+        deviceNum: "8",
+      },
+      {
+        manufactor: "上海永天科技股份有限公司",
+        deviceModel: "测试设备",
+        deviceNum: "8",
+      },
+    ]);
+    const activeName = ref("first");
+    const filterText = ref("");
+    
+    return {
+      title,
+      deviceNumData,
+      tableData,
+      activeName,
+      filterText,
+    };
+  },
+  methods: {
+    //返回
+    goBack(){
+      this.deviceNumData = []
+    },
+    //编辑
+    editRow(row) {
+      console.log(row);
+    },
+    //删除
+    handleDelete(index, row) {
+      console.log(index, row);
+    },
+    //变量列表
+    variableList(row) {
+      console.log(row);
+    },
+    //克隆
+    clone(index, row) {
+      console.log(index, row);
+    },
+    //设备数量查询
+    deviceNumSelect(data) {
+      console.log(data);
+      this.title = "设备或编号";
+      this.filterText = "";
+      this.deviceNumData = [
+        {
+          stationStatus: 0,
+          deviceName: "测试设备",
+          deviceCode: "cubbs",
+          location: "站点1",
+          ratedVoltage: 10,
+          ratedCurrent: 58,
+          currentLoRaTh: 80,
+          powerQuAn: "开启",
+          meterAddress: "1",
+        },
+        {
+          stationStatus: 1,
+          deviceName: "测试设备",
+          deviceCode: "cubbs",
+          location: "站点1",
+          ratedVoltage: 10,
+          ratedCurrent: 58,
+          currentLoRaTh: 80,
+          powerQuAn: "开启",
+          meterAddress: "1",
+        },
+      ];
+      console.log(this.deviceNumData)
+    },
+
+    // 表头样式设置
+    headClass() {
+      return "background:#FAFAFA !important;color: black;";
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+  },
+});
+</script>
+
+<style lang="scss">
+.powerEquip {
+  height: calc(100vh - 100px);
+  padding: 30px;
+  margin-top: 50px;
+}
+//firstInput样式
+.first {
+  margin: 15px;
+  //顶部左侧样式
+  .firstTop {
+    display: flex;
+    height: 32px;
+    line-height: 32px;
+    .firstTopLeft {
+      width: 70%;
+      .goBack{
+        margin-right: 15px;
+      }
+      .firstTopLeftTitle {
+        font-size: 14px;
+        margin-right: 10px;
+      }
+      .firstTopLeftInput {
+        width: 15rem;
+      }
+      .el-input__icon {
+        color: #409eff;
+      }
+      .el-input__inner:hover {
+        border-color: #409eff;
+      }
+      .el-input__inner:focus {
+        border-color: #409eff;
+      }
+      .search-button {
+        margin-left: 1rem;
+      }
+    }
+
+    //顶部右侧样式
+    .firstRight {
+      width: 30%;
+      button {
+        margin-left: 1rem;
+        float: right;
+      }
+    }
+  }
+  .firstContent {
+    margin-top: 15px;
+  }
+}
+
+// tab重置样式
+.tabsSizeColor > .el-tabs__header .el-tabs__item {
+  line-height: 50px;
+  height: 50px;
+  font-size: 16px;
+}
+.tabsSizeColor > .el-tabs__header .el-tabs__item.is-active {
+  border-bottom: 2px solid #409eff;
+  color: #409eff;
+}
+.tabsSizeColor > .el-tabs__header .el-tabs__item.is-active:hover {
+  color: #409eff !important;
+}
+.tabsSizeColor .el-tabs__header:hover,
+.el-tabs__item:hover {
+  color: #409eff !important;
+}
+.el-tabs__header {
+  margin-bottom: 0;
+}
+.el-tabs--card > .el-tabs__header .el-tabs__item,
+.el-tabs--card > .el-tabs__header .el-tabs__nav {
+  border: none;
+}
+</style>

+ 25 - 24
src/views/monthReport/index.vue

@@ -3,29 +3,30 @@
     <div class="dashboard-text">月度报告</div>
 
     <el-tree default-expand-all :data="data">
-      <span
-        class="custom-tree-node"
-        :default-slot="{node,data}"
-        style="width: 100%"
-        @mouseenter="mouseenter(data)"
-        @mouseleave="mouseleave(data)"
-      >
-        <span>{{ node.label }}</span>
-        <el-link
-          v-show="data.show"
-          size="mini"
-          style="margin-left: 5px"
-          type="primary"
-          icon="el-icon-plus"
-        ></el-link>
-        <el-link
-          v-show="data.show"
-          size="mini"
-          style="margin-left: 5px"
-          type="primary"
-          icon="el-icon-delete"
-        ></el-link>
-      </span>
+      <template #default="{ node, data }">
+        <span
+          class="custom-tree-node"
+          style="width: 100%"
+          @mouseenter="mouseenter(data)"
+          @mouseleave="mouseleave(data)"
+        >
+          <span>{{ node.label }}</span>
+          <el-link
+            v-show="data.show"
+            size="mini"
+            style="margin-left: 5px"
+            type="primary"
+            icon="el-icon-plus"
+          ></el-link>
+          <el-link
+            v-show="data.show"
+            size="mini"
+            style="margin-left: 5px"
+            type="primary"
+            icon="el-icon-delete"
+          ></el-link>
+        </span>
+      </template>
     </el-tree>
   </div>
 </template>
@@ -63,7 +64,7 @@ export default {
   },
   methods: {
     mouseenter(data) {
-      alert(1)
+      alert(1);
       console.log(data);
       data.show = true;
     },

+ 12 - 1
src/views/siteManage/index.vue

@@ -44,7 +44,11 @@
           >
             <span>{{ node.label }}</span>
             <span>
-              <a class="deleteLink" v-show="data.show" @click="remove(node, data)">
+              <a
+                class="deleteLink"
+                v-show="data.show"
+                @click="remove(node, data)"
+              >
                 <i size="mini" class="el-icon-delete"></i>
               </a>
             </span>
@@ -359,6 +363,13 @@ export default {
 }
 .el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
   border-bottom: 2px solid #409eff;
+  color: #409eff;
+}
+.el-tabs--card
+.el-tabs__header:hover,
+.el-tabs__item:hover
+{
+  color: #409eff !important;
 }
 .el-tabs__header {
   margin-bottom: 0;