ZZJ
2021-10-22 38f098f7d4ca5831a513a8d50e2efee08d452e03
暂存
24个文件已添加
2个文件已修改
1337 ■■■■■ 已修改文件
public/apps.json 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/Group 488.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/Mask Group-1.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/Mask Group-2.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/Mask Group.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/安全帽-线 1.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/安全帽-线-1 1.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/视频.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/视频_点击.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/语音.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/InternetData/语音_点击.png 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetData/components/telephoneBox.vue 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetData/views/helemtTable.vue 415 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/components/headCard.vue 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/components/helemetEchart.vue 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/components/helemetHead.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/components/realTimeItem.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/components/tabSingle.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/components/warnDescription.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/index/index.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/index/main.ts 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/module/elecModule.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/module/historyModule.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/module/mapIndex.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/module/realTimeModule.vue 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/internetEquipment/views/helemetEquipment.vue 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/apps.json
@@ -645,6 +645,29 @@
      "installed": true,
      "isUpgrade": false,
      "progressMsg": ""
    },
    {
      "id": "fa5674ee-70cf-4e22-8a06-c17426fb737",
      "name": "互联网设备管理",
      "package": "internetEquipment",
      "type": "2",
      "url": "/view/internetEquipment/",
      "title": "互联网设备管理",
      "width": 1440,
      "height": 900,
      "iconBlob": "",
      "icon": "../../images/app-mid/visual.png",
      "version": "1.0.0",
      "create_time": "2020-10-09 14:00:08",
      "create_by": "",
      "update_time": "",
      "update_by": "",
      "isDelete": 0,
      "isDefault": false,
      "remoteVersion": "",
      "installed": true,
      "isUpgrade": false,
      "progressMsg": ""
    }
  ],
  "msg": "请求处理成功",
public/images/InternetData/Group 488.png
public/images/InternetData/Mask Group-1.png
public/images/InternetData/Mask Group-2.png
public/images/InternetData/Mask Group.png
public/images/InternetData/°²È«Ã±-Ïß 1.png
public/images/InternetData/°²È«Ã±-Ïß-1 1.png
public/images/InternetData/ÊÓÆµ.png
public/images/InternetData/ÊÓÆµ_µã»÷.png
public/images/InternetData/ÓïÒô.png
public/images/InternetData/ÓïÒô_µã»÷.png
src/pages/internetData/components/telephoneBox.vue
New file
@@ -0,0 +1,124 @@
<template>
  <div class="telephone-box">
      <div class="title">
          <span class="icon iconfont">&#xe7cc;</span>
          <span>去电</span>
      </div>
      <div class="info">
          <div class="id">1139</div>
          <div class="sip">sip:1139@47.112.193.0</div>
      </div>
      <div class="video">1</div>
      <div class="control">
          <span class="icon iconfont">&#xe740;</span>
          <span class="icon iconfont mid">&#xe740;</span>
          <span class="icon iconfont">&#xe740;</span>
      </div>
      <div class="close el-icon-close" @click="close"></div>
  </div>
</template>
<script>
export default {
    props:{
        tele:{
            type:Object
        }
    },
    data (){
        return {
        }
    },
    methods:{
        close (){
            this.$emit("close",this.tele)
        }
    }
}
</script>
<style scoped lang="scss">
.telephone-box {
    box-sizing: border-box;
    position: fixed;
    z-index: 2;
    padding: 32px 28px 28px 55px;
    width: 420px;
    height: 382px;
    left: 50%;
    top: 50%;
    margin-top: -15%;
    margin-left: -15%;
    background: #FFFFFF;
    border-radius: 8px;
        color: #4F4F4F;
    .title {
        text-align: left;
        font-size: 16px;
        font-weight: 700;
        .icon {
            margin-right: 2px;
            font-size: 18px;
            font-weight: normal;
        }
    }
    .info {
        margin-top: 18px;
        font-weight: bold;
        font-size: 16px;
        .sip {
            margin-top: 2px;
            font-size: 12px;
            font-weight: normal;
        }
    }
    .video {
        margin: 0 auto;
        margin-top: 20px;
        box-sizing: border-box;
        width: 104px;
        height: 104px;
        background: #454141;
        border: 5px solid #FFAA44;
        border-radius: 50%;
        font-size: 36px;
        color: #fff;
        line-height: 94px;
    }
    .control {
        margin-top: 50px;
        .icon {
            font-size: 37px;
        }
        .mid {
            margin: 0 37px;
        }
    }
    .close {
        position: absolute;
        top: 12px;
        right: 12px;
        font-size: 12px;
        font-weight: 700;
    }
}
</style>
src/pages/internetData/views/helemtTable.vue
@@ -2,76 +2,117 @@
<div class="helemtTable">
<el-table
    :data="tableData"
    style="width: 100%">
    style="width: 100%"
    header-align="center"
    :highlight-current-row="true"
    >
    <el-table-column
      header-align="center"
      label="序号"
      align="center"
      width="80"
      type="index">
    </el-table-column>
    <el-table-column
      header-align="center"
      label="设备"
      width="230">
      width="260">
      <template slot-scope="scope">
        <div class="index-container">
          <div class="index">{{scope.$index}}</div>
          <div class="info">
            <div class="icon iconfont">&#xe8a0;</div>
            <div class="right">
              <div class="code">{{scope.row.code}}</div>
              <div class="elec">电量 : <span class="elec-number">{{scope.row.elec}}</span></div>
              <div class="code">设备编码 : {{scope.row.code}}</div>
              <div class="elec">电量 :
                <span
                :class="{ 'elec-high': scope.row.elec >= 40,
                'elec-middle': scope.row.elec < 40 && scope.row.elec > 0,
                'elec-low': scope.row.elec === 0}"
                >{{scope.row.elec}}</span></div>
            </div>
          </div>
        </div>
      </template>
    </el-table-column>
    <el-table-column
      header-align="center"
       align="center"
        prop="ip"
        label="IP地址">
    </el-table-column>
    <el-table-column
      header-align="center"
       align="center"
        prop="mac"
        label="mac地址"
        width="150">
        width="140">
    </el-table-column>
    <el-table-column
      header-align="center"
       align="center"
        prop="longitude"
        label="经度">
    </el-table-column>
    <el-table-column
      header-align="center"
       align="center"
        prop="latitude"
        label="纬度">
    </el-table-column>
    <el-table-column
        header-align="center"
         align="center"
        prop="latitude"
        label="地址">
    </el-table-column>
    <el-table-column
        header-align="center"
        align="center"
        prop="height"
        label="高度">
    </el-table-column>
    <el-table-column
        header-align="center"
        align="center"
        prop="positon"
        label="定位状态">
    </el-table-column>
    <el-table-column
        align="center"
        header-align="center"
        prop="time"
        label="访问时间">
    </el-table-column>
    <el-table-column
      align="center"
      header-align="center"
      label="操作">
      <template slot-scope="scope">
        <template slot-scope="scope">
        <div class="action-container">
          <div class="icon iconfont"></div>
          <div class="icon iconfont"></div>
          <img src="/images/InternetData/视频.png" alt=""
          v-if="!scope.row.isSend"
          @click="sendVoice(scope.row)"
          >
          <img src="/images/InternetData/视频_点击.png" alt=""
          v-else
          @click="sendVoice(scope.row)"
          >
          <img src="/images/InternetData/语音.png" alt=""
          v-if="!scope.row.istele"
          @click="telephone(scope.row)"
          >
          <img src="/images/InternetData/语音_点击.png" alt=""
          v-else
          @click="telephone(scope.row)"
          >
        </div>
      </template>
    </el-table-column>
@@ -79,27 +120,373 @@
  </el-table>
  <el-pagination
  background
  :total="100"
  @size-change="handleSizeChange"
  @current-change="handleCurrentChange"
  :current-page.sync="currentPage"
  :page-sizes="[5, 10, 15, 20]"
  :page-size="10"
  popper-class="page_helemt"
  layout="prev, pager, next,sizes,jumper"
  >
 </el-pagination>
 <telephoneBox :tele="telephoneObj" v-if="telephoneObj" @close="closeTele"/>
 <div class="mask" v-if="telephoneObj"></div>
</div>
  
</template>
<script>
import telephoneBox from '@/pages/internetData/components/telephoneBox'
export default {
  data (){
    return {
      currentPage:1,
      tableData: [
        {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位" },
      ]
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
         {code: "A123123123123", elec:29.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
         {code: "A123123123123", elec:0, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
         {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
         {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
         {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
         {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
          {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
          {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
          {code: "A123123123123", elec:79.1, ip:"192.168.1.2", mac:"ec:da:da:da:ed:98",
        longitude:120.1231231, latitude:120.1231231,height:"11.21",time:"0.23.45",positon:"单向定位",
        isSend:false,istele:false
         },
      ],
      commentContent:'',
      telephoneObj:null
    }
  },
  methods :{
    sendVoice (target){
      target.isSend = true
      const h = this.$createElement;
      this.$msgbox({
        message: h(
          "div",
          {
            attrs: {
              class: "el-textarea"
            }
          },
          [  h(
          "div",
          {
            attrs: {
              class: "el-title"
            }
          },[h("span",{
            attrs: {
              class: "icon iconfont"
            }
          },"\ue7cc"),h("span",null,"发送语音")]),
            h("textarea", {
              attrs: {
                placeholder: "请输入语音命令",
                maxlength:"20",
                class: "el-textarea__inner",
                autocomplete: "off",
                rows: 3,
                id: "commentContent",
              },
              value: this.commentContent,
              on: { input: this.onCommentInputChange }
            }),
            h("div",{attrs:{class:"info",id: "comment_info"}},"还可输入20个字符")
          ]
        ),
        showCancelButton: true,
        confirmButtonText: "确定",
        confirmButtonClass:"hele_btn_save",
        cancelButtonClass:"hele_btn_cancel",
        cancelButtonText: "取消",
        beforeClose: (action, instance, done) => {
       document.querySelector("#commentContent").value = ''
       document.querySelector("#comment_info").innerHTML = `还可输入20个字符`
            target.isSend = false
            done();
        }
      }).then(action => {
        target.isSend = false
      });
    },
    telephone (target){
      target.istele = true
      this.telephoneObj = target
    },
    handleCurrentChange (){
    },
    handleSizeChange (){
    },
    onCommentInputChange(){
      let value = document.querySelector("#commentContent").value
      console.log(value);
      let cont = 20-value.length
      document.querySelector("#comment_info").innerHTML = `还可输入${cont}个字符`
    },
    closeTele(e){
      e.istele = false
      this.telephoneObj = null
    }
  },
  components :{
    telephoneBox
  }
}
</script>
<style scoped lang="scss">
.helemtTable {
  ::v-deep .el-table {
  position: relative;
   .el-table {
    overflow-y: scroll;
    height: 660px;
    font-size: 12px;
    font-weight: 700;
    img {
      width: 22px;
      height: 22px;
      &:first-child {
        margin-right: 10px;
      }
    }
    .index-container {
      display: flex;
      align-items: center;
      justify-content: space-around;
      height: 56px;
      .icon {
        font-size: 46px;
        color: #FFAA44;
      }
    }
    ::v-deep .el-table__row{
      td {
         border-bottom: 2px solid #fff;
         border-top: 2px solid #fff;
         &:first-child {
           border-radius: 20px 0 0 20px;
           border-left: 2px solid #fff;
           border-bottom: 2px solid #fff;
           }
          &:last-child {
           border-radius: 0 20px 20px 0;
           border-right: 2px solid #fff;
           border-bottom: 2px solid #fff;
           }
      }
      &:hover {
        background-color: rgb(242, 242, 247) ;
        td {
         border-bottom: 2px solid rgb(242, 242, 247);
         border-top: 2px solid rgb(242, 242, 247);
         &:first-child {
           border-radius: 20px 0 0 20px;
           border-left: 2px solid rgb(242, 242, 247);
           border-bottom: 2px solid rgb(242, 242, 247);
           }
          &:last-child {
           border-radius: 0 20px 20px 0;
           border-right: 2px solid rgb(242, 242, 247);
           border-bottom: 2px solid rgb(242, 242, 247);
           }
      }
      }
      &.current-row {
        td {
         background-color: #fff;
         border-top: 2px solid rgb(17, 170, 102);
         border-bottom: 2px solid rgb(17, 170, 102);
         &:first-child {
           border-radius: 20px 0 0 20px;
           border-left: 2px solid rgb(17, 170, 102);
           border-bottom: 2px solid rgb(17, 170, 102);
           }
          &:last-child {
           border-radius: 0 20px 20px 0;
           border-right: 2px solid rgb(17, 170, 102);
           border-bottom: 2px solid rgb(17, 170, 102);
           }
      }
      }
    }
    .elec-high {
      color: rgb(17, 170, 102);
    }
    .elec-middle {
      color: rgb(255, 170, 68);
    }
    .elec-low {
      color: rgb(255, 100, 100);
    }
  }
  ::v-deep .el-pagination {
    margin-top: 20px;
    .el-pager li:not(.disabled):not(.active):hover {
    color: #11AA66;
    }
   .el-pager li:not(.disabled).active {
      background-color: #11AA66;
    }
    input:focus, input:hover {
      border: 1px solid #11AA66 !important;
    }
    .el-input.is-focus input{
      border: 1px solid #11AA66 !important;
    }
  }
  ::v-deep .has-gutter {
    height: 70px;
  }
   .mask {
      position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 1;
    background-color: black;
    opacity: .5;
    }
}
 .el-textarea {
    height: 150px;
    padding: 0 15px;
    .el-title {
      margin-top: 20px;
      margin-bottom: 15px;
      color:  #4F4F4F;
      font-size: 16px;
      font-weight: 700;
      .icon {
        font-weight: normal;
        font-size: 19px;
      }
    }
    .el-textarea__inner {
        width: 357px;
        &:focus {
border: 1px solid #11AA66 ;
        }
      }
    .info {
      font-size: 12px;
      color: #828282;
      text-align: right;
      padding-right: 38px;
    }
  }
</style>
<style lang="scss">
.page_helemt {
    .el-select-dropdown__item.selected span{
      color: #11AA66;
    }
}
.hele_btn_save {
  width: 175px;
  height: 40px;
background: #11AA66 !important;
border: 1px solid #11AA66 !important;
border-radius: 25px !important;
margin: 10px 17px 12px 10px !important;
&:hover {
background: #11AA66 !important;
border: 1px solid #11AA66 !important;
}
}
.hele_btn_cancel {
width: 175px;
height: 40px;
border: 1px solid #E0E0E0;
box-sizing: border-box;
border-radius: 25px !important;
}
</style>
src/pages/internetEquipment/components/headCard.vue
New file
@@ -0,0 +1,74 @@
<template>
  <div class="head-card">
      <div class="card-left">
          <div class="number" :style="colorStyle">{{number}}</div>
          <div class="info">{{info}}</div>
      </div>
      <div class="card-right icon iconfont">&#xe743;</div>
  </div>
</template>
<script>
export default {
    props: {
        number: {
            require: true
        },
        info: {
            require: true
        },
        icon: {
            require: true
        },
        color: {
            require: true
        }
    },
    data (){
        return {
        }
    },
    computed: {
        colorStyle (){
            return {
                "--color":this.color
            }
        }
    }
}
</script>
<style scoped lang="scss">
.head-card {
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    width: 187px;
    height: 90px;
    background: #FFFFFF;
    box-shadow: 0px 2px 10px rgba(141, 164, 187, 0.25);
    border-radius: 15px;
    .card-left {
        .number {
            font-size: 24px;
            font-weight: 700;
            color: var(--color);
        }
        .info {
            font-size: 12px;
            color: #4F4F4F;
;
        }
    }
    .card-right {
        font-size: 58px;
        color: var(--color);
    }
}
</style>
src/pages/internetEquipment/components/helemetEchart.vue
New file
@@ -0,0 +1,122 @@
<template>
  <div class="helemet-echart">
      <div id="echart-cotainer" ></div>
  </div>
</template>
<script>
import echarts from "echarts";
export default {
    data (){
        return {
            option : {
              grid: {
                  show :false,
                  bottom: 20,
                  top: 20,
                  left: 40,
                  right: 20
              },
              xAxis: {
                type: 'category',
                boundaryGap: false,
                data: ['1', '2021-09-02 00:00', '1', '2021-09-02 00:00', '1', '2021-09-02 00:00', '1'],
                axisLine: {
                    show: false  //不显示坐标轴轴线
                },
                axisTick: {
                    show: false  //不显示坐标轴刻度
                },
                spiltLine:{
                    show: false  //想要不显示网格线,改为false
                }
              },
              yAxis: {
                type: 'value',
                splitLine : {
                    show: false
                },
                axisLine: {
                    show: false  //不显示坐标轴轴线
                },
                axisTick: {
                    show: false  //不显示坐标轴刻度
                },
              },
              series: [
                {
                  data: [820, 932, 901, 934, 1290, 1330, 1320],
                  type: 'line',
                  areaStyle: {},
                  areaStyle: {
                        normal: {
                        color: '#FFF8EB' //改变区域颜色
                                }
                             },
                  itemStyle: {
                      normal: {
                          lineStyle: {
                              color: '#FFAA44'
                          }
                      }
                  }
/* itemStyle: {
    normal: {
        color: '#f7ba0e',
        label: {
            show: true,
            position: 'top',
            formatter:this.format,
            rich: {
                color1: {
                    color: '#f7ba0e'
                },
                color2: {
                    color: '#42a1fe'
                }
            },
            textStyle: {
                color: '#333'
            }
        }
    }
} */
                }
              ],
            }
        }
    },
    mounted (){
         let myChart = echarts.init(document.getElementById('echart-cotainer'))
         myChart.setOption(this.option);
    },
    methods :{
      /*   format (params) {
            console.log(params);
                for (var i = 0,
                l = this.option.xAxis.data.length; i < l; i++) {
                    if (this.option.xAxis.data[i] == params.name) {
                        var val1 = params.value || 0;
                         console.log(this);
                        var val2 = this.option.series[0].data[i] || 0;
                        return '{color1|' + val1 + '}/{color2|' + val2 + '}';
                    }
                }
        } */
    }
}
</script>
<style scoped lang="scss">
.helemet-echart {
    #echart-cotainer {
        height: 100%;
    }
}
</style>
src/pages/internetEquipment/components/helemetHead.vue
New file
@@ -0,0 +1,54 @@
<template>
  <div class="helemetHead">
      <headCard v-for="(item,index) in cardData"
      :key="index"
      :number="item.number"
      :info="item.info"
      :icon="item.icon"
      :color="item.color"
      />
      <helemetEchart />
  </div>
</template>
<script>
import headCard from '@/pages/internetEquipment/components/headCard'
import helemetEchart from '@/pages/internetEquipment/components/helemetEchart'
export default {
    data (){
        return {
            cardData: [
                {number:233,info:"设备总量",icon:"\ue743",color:"#4E94FF"},
                {number:34,info:"本月新增",icon:"\ue743",color:"#FFAA44"},
                {number:45,info:"今日预警",icon:"\ue743",color:"#FF6464"},
            ]
        }
    },
    components :{
        headCard,
        helemetEchart
    }
}
</script>
<style scoped lang="scss">
.helemetHead {
    display: flex;
    .head-card {
        margin-right: 10px;
    }
    .helemet-echart {
        margin-left: 10px;
        width: 570px;
        height: 90px;
        box-shadow: 0px 2px 10px rgba(141, 164, 187, 0.25);
        border-radius: 15px;
    }
}
</style>
src/pages/internetEquipment/components/realTimeItem.vue
New file
@@ -0,0 +1,29 @@
<template>
  <div class="realTimeItem">
      <warnDescription/>
  </div>
</template>
<script>
import warnDescription from '@/pages/internetEquipment/components/warnDescription'
export default {
    props :{
        warnObj:{
            type:Object
        },
    },
    components :{
        warnDescription
    }
}
</script>
<style scoped lang="scss">
.realTimeItem {
    display: flex;
    flex-direction: column;
    width: 167px;
    height: 134px;
}
</style>
src/pages/internetEquipment/components/tabSingle.vue
New file
@@ -0,0 +1,59 @@
<template>
  <div class="tab_single" :class="{'active' : id ===activeTab}">
    <div class="icon iconfont">{{icon}}</div>
    <div class="title">{{title}}</div>
  </div>
</template>
<script>
export default {
    props: {
        icon: {
            type : String,
            require :true
        },
        title: {
            type : String,
            require :true
        },
        id: {
            type : Number,
            require :true
        },
        activeTab: {
            type : Number,
            require :true
        }
    }
}
</script>
<style scoped lang="scss">
.tab_single {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: 50px;
    width: 190px;
    border-radius: 15px;
    background-color: #fff;
    color: #4F4F4F;
    cursor: pointer;
    .icon {
        font-size: 25px;
    }
    .title {
        width: 82px;
        text-align: left;
        font-size: 16px;
    }
    &.active {
        background-color: #11AA66;
        color: #fff;
    }
}
</style>
src/pages/internetEquipment/components/warnDescription.vue
New file
@@ -0,0 +1,37 @@
<template>
  <div class="warn-description">
      <div class="code"><span>设备编码: </span>{{warnDes.code}}</div>
      <div class="location" v-if="warnDes.location">{{warnDes.location}}</div>
      <div class="time"><span>时间: </span>{{warnDes.time}}</div>
      <div class="position" v-if="warnDes.longitude"><span>经度: </span>{{warnDes.longitude}} <span>纬度: </span>{{warnDes.latitude}}</div>
      <div class="warnIcon" v-if="warnDes.warn"><span class="icon iconfont">&#xe71c;</span> {{warnDes.warn}}</div>
  </div>
</template>
<script>
export default {
  props :{
    warnDes : {
      type: Object
    }
  }
}
</script>
<style scoped lang="scss">
.warn-description {
  .code, .location, .time, .position, .warnIcon {
  text-align: left;
  margin-bottom: 5px;
  }
  span {
    font-weight: 700;
  }
  .warnIcon {
    color: #FF6464;
  }
}
</style>
src/pages/internetEquipment/index/index.vue
New file
@@ -0,0 +1,81 @@
<template>
  <div class="internert-equipment">
    <!-- å·¦ä¾§tab栏 -->
    <div class="left_tab">
      <tab-single
       v-for="(item,index) in tabArr"
       :id="index"
       :key="index"
       :icon="item.icon"
       :title="item.title"
       :activeTab="activeTab"
       @click.native="toggleActive(index)"
      />
    </div>
    <!-- å³ä¾§å†…容 -->
    <div class="right_content">
      <!-- å®‰å…¨å¸½è®¾å¤‡ -->
      <helemetEquipment v-if="activeTab === 0"/>
    </div>
  </div>
</template>
<script>
import tabSingle from "../components/tabSingle.vue";
import helemetEquipment from '@/pages/internetEquipment/views/helemetEquipment'
export default {
  data (){
    return {
      // å·¦ä¾§tab数据
      tabArr: [
      {icon: "\ue77f", title: "安全帽设备"},
      {icon: "\ue767", title: "供配电设备"},
      {icon: "\ue763", title: "消防设备"},
      {icon: "\ue765", title: "能源设备"},
      {icon: "\ue7c0", title: "给排水设备"},
      ],
      activeTab: 0
    }
  },
  components: {
    tabSingle,
    helemetEquipment
  },
  methods :{
    toggleActive (index){
      this.activeTab = index
    }
  }
}
</script>
<style scoped lang="scss">
* {
  box-sizing: border-box;
}
.internert-equipment {
  display: flex;
  height: 100%;
  background-color: #fff;
  border-top: 1px solid #E0E0E0;
  .left_tab {
  padding: 20px;
  width: 230px;
  height: 100%;
  .tab_single {
    margin-bottom: 10px;
    }
  }
  .right_content {
    height: 100%;
    width: 100%;
  }
}
</style>
src/pages/internetEquipment/index/main.ts
New file
@@ -0,0 +1,12 @@
import Vue from 'vue';
import App from './index.vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
// import "@/assets/css/element-variables.scss";
Vue.use(ElementUI)
new Vue({
  el: '#app',
  render: h => h(App)
})
src/pages/internetEquipment/module/elecModule.vue
New file
@@ -0,0 +1,40 @@
<template>
  <div class="elec-module">
      <div class="title"></div>
      <div class="elec-item"
       v-for="(item,index) in warnArr"
       :key="index">
          <warnDescription
        :warnDes="{code:item.code,
        time:item.time,
        location:item.location}"/>
      </div>
  </div>
</template>
<script>
import warnDescription from '@/pages/internetEquipment/components/warnDescription'
export default {
    props :{
         warnArr:{
            type: Array
        }
    },
    components :{
        warnDescription
    }
}
</script>
<style scoped lang="scss">
.elec-module {
    width: 280px;
    height: 292px;
    background-color: #fff;
    box-shadow: 0px 2px 10px rgba(141, 164, 187, 0.25);
    border-radius: 15px;
    overflow-y: scroll;
}
</style>
src/pages/internetEquipment/module/historyModule.vue
New file
@@ -0,0 +1,38 @@
<template>
  <div class="history-module">
      <div class="title"></div>
      <div class="history-item"
      v-for="(item,index) in warnArr"
      :key="index">
          <warnDescription
        :warnDes="{code:item.code,
        time:item.time,
        warn:item.warn}"/>
      </div>
  </div>
</template>
<script>
import warnDescription from '@/pages/internetEquipment/components/warnDescription'
export default {
    props :{
        warnArr : {
            type: Array
        }
    },
    components :{
        warnDescription
    }
}
</script>
<style scoped lang="scss">
.history-module {
    width: 280px;
    height: 292px;
    background-color: #fff;
    box-shadow: 0px 2px 10px rgba(141, 164, 187, 0.25);
    border-radius: 15px;
    overflow-y: scroll;
}
</style>
src/pages/internetEquipment/module/mapIndex.vue
New file
@@ -0,0 +1,21 @@
<template>
  <div class="map-index">
  </div>
</template>
<script>
export default {
}
</script>
<style scoped lang="scss">
.map-index  {
    width: 1170px;
    height: 396px;
    border-radius: 15px;
    background-color: skyblue
}
</style>
src/pages/internetEquipment/module/realTimeModule.vue
New file
@@ -0,0 +1,62 @@
<template>
  <div class="real-time-module">
      <div class="title">实时抓拍预警</div>
      <div class="real-time-item"
      v-for="(item,index) in warnArr"
      :key="index">
          <img :src="item.image" alt="" class="warnArea">
          <warnDescription
        :warnDes="{code:item.code,
        time:item.time,
        longitude:item.longitude,
        latitude:item.latitude,
        warn:item.warn}"/>
      </div>
  </div>
</template>
<script>
import warnDescription from '@/pages/internetEquipment/components/warnDescription'
export default {
    props :{
        warnArr:{
            type: Array
        }
    },
    components :{
        warnDescription
    }
}
</script>
<style scoped lang="scss">
.real-time-module {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    padding-right: 0px;
    width: 570px;
    height: 292px;
    background-color: #fff;
    box-shadow: 0px 2px 10px rgba(141, 164, 187, 0.25);
    border-radius: 15px;
    overflow-y: scroll;
    .title {
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: 700;
        width: 530px;
        text-align: left;
    }
    .real-time-item {
        margin-right: 14px;
    }
    .warnArea {
        width: 167px;
        height: 104px;
        border-radius: 5px;
    }
}
</style>
src/pages/internetEquipment/views/helemetEquipment.vue
New file
@@ -0,0 +1,146 @@
<template>
  <div class="helmet-equipment">
    <helemetHead />
    <mapIndex />
    <div class="footer">
      <realTimeModule :warnArr="warnArr"/>
      <elecModule :warnArr="warnArr"/>
      <historyModule :warnArr="warnArr"/>
    </div>
  </div>
</template>
<script>
import helemetHead from '@/pages/internetEquipment/components/helemetHead'
import mapIndex from '@/pages/internetEquipment/module/mapIndex'
import realTimeModule from '@/pages/internetEquipment/module/realTimeModule'
import elecModule from '@/pages/internetEquipment/module/elecModule'
import historyModule from '@/pages/internetEquipment/module/historyModule'
export default {
  data (){
    return {
      warnArr:[{
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      },{
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      },
      {
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      },
      {
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      },
      {
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      },
      {
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      },
      {
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      },
      {
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      },
      {
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      },
      {
        code:"A100640819DA3B",
        image:"/images/settings/background.png",
        location:"朝阳科技园",
        time:"2021-09-21 12:23",
        longitude:"23.2344",
        latitude:"45.4455",
        warn:"未在电子围栏区域"
      }]
    }
  },
  components: {
    helemetHead,
    mapIndex,
    realTimeModule,
    elecModule,
    historyModule
  }
}
</script>
<style scoped lang="scss">
* {
  box-sizing: border-box;
}
.helmet-equipment {
    padding: 20px;
    width: 100%;
    height: 100%;
    background: #FBFCFE;
    .map-index {
      margin: 20px 0;
    }
    .footer {
      height: 292px;
      display: flex;
      justify-content: space-between;
      color: #4F4F4F;
    }
}
</style>