南昌市物联网技防平台-前端
zengh
2021-04-25 dbecf369cd23f22391f0024a29b7387ae2fc906a
Merge remote-tracking branch 'origin/master'
5 files modified
265 ■■■■ changed files
src/router/views/index.js 5 ●●●●● patch | view | raw | blame | history
src/views/clientManagement/clientManagement.vue 13 ●●●● patch | view | raw | blame | history
src/views/dataL/dataL.vue 4 ●●●● patch | view | raw | blame | history
src/views/policeTracking/policeTracking.vue 29 ●●●● patch | view | raw | blame | history
src/views/system/cs.vue 214 ●●●●● patch | view | raw | blame | history
src/router/views/index.js
@@ -351,7 +351,6 @@
    }]
},{//路由占位
    path: '/dataL',
    component: Layout,
    redirect: '/dataL/hFive',
    children: [{
        path: 'hFive',
@@ -365,7 +364,6 @@
},
{
    path: '/policeInformationDistribution',
    component: Layout,
    redirect: '/policeInformationDistribution/patrolManagement',
    children: [{
        path: 'patrolManagement',
@@ -378,7 +376,6 @@
    }]
},{
    path: '/policeInformationDistribution',
    component: Layout,
    redirect: '/policeInformationDistribution/policeManagementTeam',
    children: [{
        path: 'policeManagementTeam',
@@ -391,7 +388,6 @@
    }]
},{
    path: '/report',
    component: Layout,
    redirect: '/report/reportConfiguration',
    children: [{
        path: 'reportConfiguration',
@@ -404,7 +400,6 @@
    }]
},{
    path: '/report',
    component: Layout,
    redirect: '/report/announcementReport',
    children: [{
        path: 'announcementReport',
src/views/clientManagement/clientManagement.vue
@@ -28,7 +28,9 @@
                   @current-change="currentChange"
                   @size-change="sizeChange"
                   @refresh-change="refreshChange"
                   @on-load="onLoad">
                   @on-load="onLoad"
                   @row-click="rowClick">
          <template slot="menuLeft">
            <el-button type="danger"
                       size="mini"
@@ -147,7 +149,8 @@
      <el-table
        :data="gridData"
        border
        style="width: 100%">
        style="width: 100%"
        >
        <el-table-column
          fixed
          prop="xb"
@@ -915,7 +918,7 @@
        this.loading = true;
        getList(page.currentPage, page.pageSize, values, this.treeDeptId).then(res => {
          debugger;
          // debugger;
          const data = res.data.data;
          this.page.total = data.total;
@@ -1022,6 +1025,10 @@
        }
        menu.style.left = event.clientX + 10 - (60) + 'px'
        document.addEventListener('click', this.foo); // 给整个document新增监听鼠标事件,点击任何位置执行foo方法
      },
      rowClick(val){//行点击事件
      // console.log(val);
      this.$router.push({ path: "/dataL/dataL", query: val });
      }
    }
  };
src/views/dataL/dataL.vue
@@ -1180,8 +1180,8 @@
      //   _iframe1.contentWindow.location.reload(true);
      location.reload();
    },
    handleCurrentChange(val) {
      console.log(val.i);
    handleCurrentChange(val) {//行点击事件
      // console.log(val.i);
    },
  },
  created() {
src/views/policeTracking/policeTracking.vue
@@ -156,7 +156,7 @@
                <el-col span="12">
                  <el-form-item label="备注">
                    <el-input
                      disabled="true"
                      disabled="form.securityArr.length > 0"
                      v-model="form.bz"
                      autocomplete="off"
                    ></el-input>
@@ -251,17 +251,8 @@
              </el-table-column>
              <el-table-column
                v-if="form.securityArr.length > 0"
                prop="status"
                label="通知状态"
                width="120"
                align="center"
              >
              </el-table-column>
              <el-table-column
                v-else
                prop="roleName"
                label="所属角色"
                width="120"
                align="center"
              >
@@ -503,8 +494,8 @@
        <video
          :src="vaddress"
          muted="muted"
          autoplay="autoplay"
          loop
          autoplay="autoplay"
          id="old_video"
          style="width: 100%; height: 100%; object-fit: fill"
          controls
@@ -787,7 +778,7 @@
                  name: item.name,
                  phone: item.phone,
                  online_status: item.online_status == 1 ? "在线" : "掉线",
                  status: "接警人(已通知)",
                  status: "已接警",
                  tenantName: item.tenantName,
                });
              }
@@ -809,6 +800,12 @@
                });
              }
            });
             that.tableData.forEach(item => {
               if (item.id == that.form.oneId) {
                 item.status+='(负责人)'
               }
             })
          } else {
            res.data.data.records.forEach((item) => {
              if (item.id == that.form.oneId) {
@@ -818,7 +815,7 @@
                  name: item.name,
                  phone: item.phone,
                  online_status: item.online_status == 1 ? "在线" : "掉线",
                  roleName: item.roleName + "(负责人)",
                  status: "未通知(负责人)",
                  tenantName: item.tenantName,
                });
              }
@@ -832,7 +829,7 @@
                  name: item.name,
                  phone: item.phone,
                  online_status: item.online_status == 1 ? "在线" : "掉线",
                  roleName: item.roleName,
                  status: "未通知",
                  tenantName: item.tenantName,
                });
              }
@@ -972,4 +969,8 @@
    }
  }
}
#old_video::-webkit-media-controls-timeline {
  display: block;
}
</style>
src/views/system/cs.vue
@@ -20,6 +20,7 @@
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
      @row-click="rowClick"
    >
      <template slot="menuLeft">
        <el-button
@@ -88,10 +89,59 @@
        @submit="handleDatasourceSubmit"
      />
    </el-dialog>
    <!-- 右侧弹窗,业主的设备 -->
    <el-dialog
      :title="onceData.tenantName"
      :visible.sync="dialogVisible"
      width="620px"
      :before-close="handleClose"
      modal-append-to-body="false"
      append-to-body="true"
      class="right-open"
    >
      <el-divider content-position="left">点击查看详情</el-divider>
      <div class="r-o-our">
        <!-- <avue-crud :data="datas" :option="options" @row-click="rowClicks">
          <template slot-scope="{ row }" slot="devicestate">
            <el-tag
              >{{
                row.devicestate == "0"
                  ? "撤防"
                  : row.devicestate == "1"
                  ? "布防"
                  : "无"
              }}
            </el-tag>
          </template>
          <template slot-scope="{ row }" slot="dxzt">
            <el-tag
              >{{ row.dxzt == "0" ? "掉线" : row.dxzt == "1" ? "在线" : "无" }}
            </el-tag>
          </template>
        </avue-crud> -->
        <el-table
          :data="datas"
          style="width: 603px; height: auto"
          stripe="true"
          @row-click="rowClicks"
          class="r-o-o-table"
          border="true"
        >
          <el-table-column prop="deviceName" label="设备名称" width="300">
          </el-table-column>
          <el-table-column prop="deviceNumber" label="设备编号" width="120">
          </el-table-column>
          <el-table-column prop="stateSevicestate" label="布撤防状态" width="100">
          </el-table-column>
          <el-table-column prop="stateOnline" ref="stateOnline" label="设备状态" width="80"> </el-table-column>
        </el-table>
      </div>
    </el-dialog>
  </basic-container>
</template>
<script>
import { getAll } from "@/api/client/client";
import {
  getList,
  getDetail,
@@ -128,6 +178,69 @@
      loading: true,
      box: false,
      datasourceBox: false,
      dialogVisible: false, //右侧弹窗
      onceData: {}, //数据
      win: {}, //样式
      datas: "", //cc
      // options: {
      //   addBtn: false,
      //   height: 'auto',
      //   menu: false,
      //   header: false,
      //   calcHeight: 80,
      //   stripe:true,
      //   title: "表格的标题",
      //   titleSize: "h3",
      //   titleStyle: {
      //     color: "red",
      //   },
      //   page: false,
      //   align: "center",
      //   menuAlign: "center",
      //   column: [
      //     {
      //       label: "设备名称",
      //       prop: "deviceName",
      //       width: 180,
      //     },
      //     {
      //       label: "设备编号",
      //       prop: "deviceNumber",
      //       width: 150,
      //     },
      //     {
      //       label: "布撤防状态",
      //       prop: "devicestate",
      //       type: "select",
      //       slot: true,
      //       width: 100,
      //       rules: [
      //         {
      //           required: true,
      //           message: "请选择布撤防状态",
      //           trigger: "blur",
      //         },
      //       ],
      //       dicData: [
      //         {
      //           label: "撤防",
      //           value: "0",
      //         },
      //         {
      //           label: "布防",
      //           value: "1",
      //         },
      //       ],
      //     },
      //     {
      //       label: "设备状态",
      //       prop: "dxzt",
      //       slot: true,
      //       addDisplay: false,
      //       editDisplay: false,
      //     },
      //   ],
      // },
      page: {
        pageSize: 10,
        currentPage: 1,
@@ -442,8 +555,7 @@
                    ],
                  },
                ];
              }
              else if (value.value == "2") {
              } else if (value.value == "2") {
                that.option.group = [
                  {
                    label: "详细信息",
@@ -621,10 +733,10 @@
      add(row).then(
        () => {
          if (row.type == "0") {
            console.log(123)
            console.log(123);
            instery(
              row.dj,
             // row.had,
              // row.had,
              row.ht,
              row.ctime,
              row.content,
@@ -634,7 +746,7 @@
            insertss(
              row.dj,
              row.nature,
             // row.had,
              // row.had,
              row.motto,
              row.ctime,
              row.content,
@@ -646,7 +758,7 @@
              row.category,
              row.attributes,
              row.developers,
             // row.had,
              // row.had,
              row.housetype,
              row.content,
              row.hn
@@ -753,7 +865,7 @@
            });
          } else if (this.form.type == "0") {
            selectTy(this.form.tenantName).then((re) => {
              console.log(re ,123)
              console.log(re, 123);
              const data = res.data.data;
              data.dj = re.data.data[0].dj;
              data.ht = re.data.data[0].ht;
@@ -952,6 +1064,8 @@
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        // console.log(res);
        this.onceData = res.data.data.records[0];
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
@@ -959,6 +1073,34 @@
        this.selectionClear();
      });
    },
    rowClick(val) {
      //行点击事件 //右侧弹窗事件
      // console.log(val);
      this.onceData = val;
      this.dialogVisible = true;
    },
    rowClicks(val) {
      //弹窗行点击事件
      // console.log(val);
      this.$router.push({ path: "/dataL/dataL", query: val });
    },
    changeDataOpen(det){
      if(det.length > 0){
        for(var key in det){
          det[key].stateOnline = det[key].onlineStatus == "0" ? "掉线" : det[key].onlineStatus == "1" ? "在线" : "无"
          det[key].stateSevicestate = det[key].devicestate == "0" ? "撤防" : det[key].devicestate == "1" ? "布防" : "无"
        }
      }
    }
  },
  mounted() {
    getAll().then((res) => {
      //测试数据
      this.datas = res.data.data;
      this.changeDataOpen(this.datas)
      console.log(this.datas);
    });
  },
};
</script>
@@ -1077,4 +1219,62 @@
.el-input__inner {
  width: aotu;
}
.right-open {
  //右侧弹窗样式
  display: flex;
  justify-content: center;
  align-items: Center;
  overflow: hidden;
  .el-dialog {
    margin: 0 auto !important;
    height: 98%;
    overflow: hidden;
    position: fixed;
    top: 1%;
    right: 0;
    .el-dialog__body {
      position: absolute;
      left: 0;
      top: 54px;
      bottom: 0;
      right: 0;
      padding: 0;
      z-index: 1;
      overflow: hidden;
      overflow-y: auto;
    }
  }
  @keyframes dialog-fade-in {
    0% {
      transform: translate3d(0, 0, 0, 100%);
      opacity: 0;
    }
    100% {
      transform: translate3d(0, 0, 0, 0);
      opacity: 1;
    }
  }
  @keyframes dialog-fade-out {
    0% {
      transform: translate3d(0, 0, 0);
      opacity: 1;
    }
    100% {
      transform: translate3d(0, 0, 0);
      opacity: 0;
    }
  }
  .r-o-our {
    width: calc(100% - 2px);
    height: calc(100% - 28px);
    // border: hotpink 1px solid;
    overflow: auto;
  }
}
.r-o-o-table{
  // border: rgb(69, 36, 146) 1px solid;
  position: relative;
  left: 8px;
}
</style>