南昌市物联网技防平台-前端
shuishen
2021-03-31 89d4495d39f259d3cf4a76831b607547d3d4a464
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jfpt-Vue
8 files modified
1 files deleted
414 ■■■■■ changed files
src/api/client/client.js 2 ●●● patch | view | raw | blame | history
src/page/index/logo.vue 27 ●●●● patch | view | raw | blame | history
src/page/index/top/top-menu.vue 12 ●●●● patch | view | raw | blame | history
src/views/clientManagement/clientManagement.vue 70 ●●●●● patch | view | raw | blame | history
src/views/home/home.vue 5 ●●●●● patch | view | raw | blame | history
src/views/parcel/ImagePreview.js 233 ●●●●● patch | view | raw | blame | history
src/views/parcel/parcel.vue 31 ●●●● patch | view | raw | blame | history
src/views/parcel/parcelKind.vue 27 ●●●● patch | view | raw | blame | history
src/views/realTimePolice/real.vue 7 ●●●●● patch | view | raw | blame | history
src/api/client/client.js
@@ -69,7 +69,7 @@
export const getDeptLazyTree = (parentId) => {
  return request({
    url: '/api/blade-system/dept/lazy-tree',
    url: '/api/blade-system/dept/lazy-trees',
    method: 'get',
    params: {
      parentId
src/page/index/logo.vue
@@ -802,6 +802,9 @@
    //启动websocket
    websocketStart() {
      var that = this;
      if (!window.WebSocket) {
        window.WebSocket = window.MozWebSocket;
      }
@@ -816,7 +819,14 @@
        window.socket.onopen = function (event) {};
        window.socket.onclose = function (event) {};
        window.socket.onclose = function (event) {
        };
        window.socket.error = function (event) {
          //执行重连
          that.websocketStart();
        };
      } else {
        console.log("WebSocket连接没有建立成功!!");
      }
@@ -836,12 +846,23 @@
          //开启心跳传送
          window.websockPing = setInterval(function () {
            window.socket.send("ping");
            if (window.socket.readyState == WebSocket.OPEN) {
              window.socket.send("ping");
            }else{
              console.log("心跳停止,断开重连")
              //断开连接,重连
              window.clearTimeout(window.websockPing);
              //执行重连
              that.websocketStart();
            }
          }, 10000);
        } else {
          console.log("WebSocket连接没有建立成功!!");
          //执行重连
          this.websocketStart();
          that.websocketStart();
        }
      }, 3000);
    },
src/page/index/top/top-menu.vue
@@ -9,12 +9,12 @@
          <span>{{generateTitle(itemHome)}}</span>
        </template>
      </el-menu-item>
      <el-menu-item index="0" @click.native="openHomes(ZHAJ)" key="0">
        <template slot="title">
          <i :class="ZHAJ.source"></i>
          <span>{{generateTitle(ZHAJ)}}</span>
        </template>
      </el-menu-item>
<!--      <el-menu-item index="0" @click.native="openHomes(ZHAJ)" key="0">-->
<!--        <template slot="title">-->
<!--          <i :class="ZHAJ.source"></i>-->
<!--          <span>{{generateTitle(ZHAJ)}}</span>-->
<!--        </template>-->
<!--      </el-menu-item>-->
      <template v-for="(item,index) in items">
        <el-menu-item :index="item.id+''" @click.native="openMenu(item)" :key="index">
          <template slot="title">
src/views/clientManagement/clientManagement.vue
@@ -18,6 +18,7 @@
                   @row-update="rowUpdate"
                   @row-save="rowSave"
                   :row-style="rowStyle"
                   row-class-name="tabFontSize"
                   :before-open="beforeOpen"
                   @search-change="searchChange"
                   @search-reset="searchReset"
@@ -238,6 +239,7 @@
          labelWidth: '100',
          dialogWidth: 950,
          menuWidth: 250,
          align:"center",
          size: "mini",
          tip: false,
          searchShow: true,
@@ -246,7 +248,7 @@
          border: true,
          index: true,
          viewBtn: true,
          selection: false,
          selection: true,
          dialogClickModal: false,
          column: [
            {
@@ -255,23 +257,7 @@
              prop: "deviceName",
              searchPlaceholder: "设备名称/编号",
              search: true,
            },
            {
              label: "上级菜单",
              prop: "deptId",
              type: "tree",
              dicUrl: "/api/blade-system/dept/trees",
              hide: true,
              props: {
                label: "title"
              },
              rules: [
                {
                  required: false,
                  message: "请选择上级菜单",
                  trigger: "click"
                }
              ]
              sortable:true,
            },
            {
              label: "到期时间",
@@ -304,6 +290,23 @@
                {
                  required: false,
                  message: "请输入设备编号",
                  trigger: "click"
                }
              ]
            },
            {
              label: "使用方",
              prop: "deptId",
              width: 200,
              type: "tree",
              dicUrl: "/api/blade-system/dept/trees",
              props: {
                label: "title"
              },
              rules: [
                {
                  required: false,
                  message: "请选择上级菜单",
                  trigger: "click"
                }
              ]
@@ -440,11 +443,10 @@
              span: 3,
              labelWidth: "0",
              className: "cityClass3"
            },
            {
              label: "权属",
              prop: "ownership",
              width: 150
            }, {
              label: "街道",
              prop: "street",
              width: 200
            },
            {
              label: "负责人",
@@ -452,13 +454,9 @@
              width: 72
            },
            {
              label: "负责人联系方式",
              label: "负责人电话",
              prop: "onePhone",
              width: 110
            }, {
              label: "街道",
              prop: "street",
              width: 200
            }, {
              label: "到期时间",
              prop: "expireTime",
@@ -477,7 +475,7 @@
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              width: 130
            }, {
              label: "最后上传时间",
              label: "心跳时间",
              prop: "heartbeat",
              type: "datetime",
              format: "yyyy-MM-dd",
@@ -652,6 +650,16 @@
            ...this.query
          };
        }
        //在线设备
        if(this.$route.query.dxtype != undefined){
          values = {
            ...params,
            dxtype: this.$route.query.dxtype,
            ...this.query,
          };
        }
        this.loading = true;
        getList(page.currentPage, page.pageSize, values, this.treeDeptId).then(res => {
          const data = res.data.data;
@@ -787,4 +795,8 @@
    color: red;
  }
  .tabFontSize{
    font-size: 15px;
  }
</style>
src/views/home/home.vue
@@ -55,9 +55,10 @@
        });
      },
      //在线设备分页数据
      handleStartEquipment(){
      handleStartEquipment(data){
         this.$router.push({
          path: `/clientManagement/index`
          path: `/clientManagement/index`,
          query: data[0]
        });
      },
      //客户管理分页数据
src/views/parcel/ImagePreview.js
File was deleted
src/views/parcel/parcel.vue
@@ -36,6 +36,7 @@
    <template>
      <div>
          <el-image-viewer 
              class="img"
              v-if="showViewer" 
              :on-close="closeViewer" 
              :url-list="['data:image/png;base64,'+imgUrl]" />
@@ -60,9 +61,6 @@
        showViewer: false, // 显示查看器
        imgUrl:'',
        loading: true,
        dialogTableVisible: false,
        parcelConversation:false,
        oldParcelSatart:false,
        page: {
          pageSize: 10,
          currentPage: 1,
@@ -138,6 +136,7 @@
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              searchRange: true,
              searchSpan: 8,
              searchValue:[this.getStartTime(),this.getEndTime()],
              hide: true,
              addDisplay: false,
              editDisplay: false,
@@ -168,6 +167,7 @@
            {
              label: "是否违禁",
              search: true,
              searchValue: this.getIsKindParams(),
              searchLabelWidth: 120,
              searchSpan: 4,
              hide: true,
@@ -246,6 +246,23 @@
      refreshChange() {
        this.onLoad(this.page, this.query);
      },
      getStartTime(){
           if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) {
             return this.$route.query.startTime
           }
      },
      getEndTime(){
           if (this.$route.query.endTime != undefined && this.$route.query.endTime != null && this.$route.query.endTime != "" ) {
             return this.$route.query.endTime
           }
      },
      getIsKindParams(){
        if(this.$route.query.decisioDiagramResult && this.$route.query!='' && this.$route.query!=null && this.$route.query!=undefined){
          //回显
          return this.$route.query.decisioDiagramResult
        }
      },
      //给行加颜色
      rowStyle({row, column, rowIndex}){
         if(row.mechineMark==1){
           return {
@@ -282,7 +299,6 @@
              }
            }
        }
        if (dateTime) {
          values = {
@@ -323,3 +339,10 @@
    }
  };
</script>
<style lang="scss">
    .img {
      .el-icon-circle-close {
        color: white;
      }
    }
</style>
src/views/parcel/parcelKind.vue
@@ -38,6 +38,7 @@
        :preview-src-list="['data:image/png;base64,'+imgUrl]"
        z-index=9999></el-image> -->
        <el-image-viewer 
                     class="img"
                     v-if="showViewer" 
                     :on-close="closeViewer" 
                     :url-list="['data:image/png;base64,'+imgUrl]" />
@@ -122,6 +123,7 @@
              format: "yyyy-MM-dd HH:mm:ss",
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              searchRange: true,
              searchValue: [this.getStartTime(),this.getEndTime()],
              searchSpan: 8,
              hide: true,
              addDisplay: false,
@@ -228,6 +230,18 @@
      refreshChange() {
        this.onLoad(this.page, this.query);
      },
      //获取开始时间返回搜索框
      getStartTime(){
           if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) {
             return this.$route.query.startTime
           }
      },
      //获取结束时间返回搜索框
      getEndTime(){
           if (this.$route.query.endTime != undefined && this.$route.query.endTime != null && this.$route.query.endTime != "" ) {
             return this.$route.query.endTime
           }
      },
      onLoad(page, params = {}) {
        const { dateTime } = this.query;
        let values = {
@@ -283,9 +297,16 @@
          });
      },
      // 关闭查看器
        closeViewer() {
          this.showViewer = false
        }
      closeViewer() {
        this.showViewer = false
      }
    }
  };
</script>
<style lang="scss">
    .img {
      .el-icon-circle-close {
        color: white;
      }
    }
</style>
src/views/realTimePolice/real.vue
@@ -29,9 +29,9 @@
    >
      <template slot="menuLeft">
        <el-button
          hidden="hidden"
          type="danger"
          size="small"
          v-show="true"
          size="mini"
          icon="el-icon-delete"
          plain
          v-if="permission.real_delete"
@@ -438,10 +438,11 @@
        tip: false,
        searchShow: true,
        searchMenuSpan: 3,
        align:"center",
        border: true,
        index: true,
        viewBtn: true,
        selection: false,
        selection: true,
        dialogClickModal: false,
        column: [
          {