Ver Código Fonte

修改提交

wangkang3 4 anos atrás
pai
commit
a7b6292b90

+ 4 - 1
ebc-middle-platform/package.json

@ -77,6 +77,9 @@
77 77
    "vuex": "^2.3.1",
78 78
    "vuex-persistedstate": "^2.5.4",
79 79
    "vuex-router-sync": "^4.1.2",
80
    "webpack-theme-color-replacer": "^1.2.15"
80
    "webpack-theme-color-replacer": "^1.2.15",
81
    "sockjs-client": "^1.4.0",
82
    "stompjs": "^2.3.3",
83
    "net": "1.0.2"
81 84
  }
82 85
}

+ 23 - 0
ebc-middle-platform/src/assets/styles/_layout.scss

@ -427,3 +427,26 @@ $layout-sider-collapse-width: 64px;
427 427
  box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
428 428
}
429 429
430
.alarm-info-container{
431
  display: flex;
432
  margin: 20px 50px 0 50px;
433
  padding: 10px 10px 20px 10px;
434
  background-color: #F5F5F5;
435
  .alarm-info{
436
    display: flex;
437
    flex-direction: column;
438
    justify-content: space-between;
439
    margin-left: 40px;
440
    >div{
441
      display: flex;
442
    }
443
  }
444
}
445
.rescue{
446
  display: flex;
447
  justify-content: center;
448
  margin-top: 40px;
449
}
450
.modal-footer{
451
  justify-content: center
452
}

+ 1 - 1
ebc-middle-platform/src/assets/styles/aid-theme/_variable.scss

@ -1,7 +1,7 @@
1 1
/** variable.scss 是主题定制变量定义文件,请根据项目设计需求调整变量值 **/
2 2
3 3
// 品牌主色定制
4
$brand-primary: #147BD1;
4
$brand-primary: #004ea0;
5 5
6 6
// body 背景色定制
7 7
$body-bg: rgba(0,0,0,.02);

+ 38 - 1
ebc-middle-platform/src/modules/layouts/BasicLayout.vue

@ -6,6 +6,38 @@
6 6
      </keep-alive>
7 7
      <router-view v-else />
8 8
    </transition>
9
    <t-modal :visibled.sync="modal" :closable="false" :mask-closable="false" :width="800" title="报警">
10
      <div class="alarm-info-container">
11
        <div>
12
          <img src="/static/images/Alarm.png"/>
13
        </div>
14
        <div class="alarm-info">
15
          <div>
16
            <div>报警类型:</div><div>落水报警</div>
17
          </div>
18
          <div>
19
            <div>报警人:</div><div>张三</div>
20
          </div>
21
          <div>
22
            <div>报警位置:</div><div>113.445294°E  23.157791°N   1#风机附近</div>
23
          </div>
24
        </div>
25
      </div>
26
      <div class="rescue">
27
        <div>救援人员:</div>
28
        <div>
29
          <t-select placeholder="请选择救援人员">
30
            <t-option>张三(zhangsan)</t-option>
31
            <t-option>李四(lisi)</t-option>
32
          </t-select>
33
        </div>
34
      </div>
35
      <div slot="footer">
36
        <t-button @click="closeAlarmModal">直接关闭报警</t-button>
37
        <t-button color="success" @click="closeAlarmModal">确认并稍后指派</t-button>
38
        <t-button color="success" @click="closeAlarmModal">确认并立即指派</t-button>
39
      </div>
40
    </t-modal>
9 41
  </global-layout>
10 42
</template>
11 43
@ -18,13 +50,18 @@ export default {
18 50
  },
19 51
  data () {
20 52
    return {
21
53
      modal: true
22 54
    }
23 55
  },
24 56
  computed: {
25 57
    keepAlive () {
26 58
      return this.$route.meta.keepAlive
27 59
    }
60
  },
61
  methods: {
62
    closeAlarmModal() {
63
      this.modal = false
64
    }
28 65
  }
29 66
}
30 67
</script>

+ 230 - 32
ebc-middle-platform/src/modules/orientation/orientation.scss

@ -1,10 +1,58 @@
1 1
.orientation-container{
2
    width: 92.5%;
2
    width: 100%;
3 3
    height: 88%;
4
    margin: 10px;
5
    margin-left: 40px;
6
    margin-right: 40px;
4
    padding-left: 40px;
5
    padding-right: 40px;
7 6
    box-sizing: border-box;
7
    .top-container{
8
      display: flex;
9
      justify-content: space-between;
10
      line-height: 40px;
11
      .person-info{
12
        display: flex;
13
        font-size: 16px;
14
        div{
15
          margin-right: 10px;
16
          display: flex;
17
          .number{
18
            color: #2373D2;
19
            font-size: 24px;
20
            font-weight: 600;
21
            line-height: 30px;
22
            margin: 0 6px;
23
          }
24
          .normal{
25
            width: 10px;
26
            height: 10px;
27
            margin-top: 15px;
28
            background-color: #19BB20;
29
          }  
30
          .off-line{
31
            width: 10px;
32
            height: 10px;
33
            margin-top: 15px;
34
            background-color: #D5D5D5;
35
          } 
36
          .sos{
37
            width: 10px;
38
            height: 10px;
39
            margin-top: 15px;
40
            background-color:#F5222D;
41
          } 
42
        }
43
        .time{
44
          font-size: 16px;
45
          margin-left: 50px;
46
        }
47
      }
48
      .right-content{
49
        display: flex;
50
        button{
51
          margin-top: 5px;
52
          margin-right: 10px;
53
        }
54
      }
55
    }
8 56
    .search-container{
9 57
      width: 50%;
10 58
      margin-bottom: 10px;
@ -18,47 +66,194 @@
18 66
      margin: auto;
19 67
      height: 60px;
20 68
    }
69
    .label{
70
      position: absolute;
71
      z-index: 10;
72
      right: 90px;
73
      bottom: 77px;
74
      background-color: #59748A;
75
      font-size: 12px;
76
      line-height: 30px;
77
      color: #fff;
78
      display: flex;
79
      padding: 10px 0 10px 30px;
80
      border-radius: 5px;
81
      .item{
82
        margin-right: 30px;
83
        >div{
84
          display: flex;
85
          .sos{
86
            width: 10px;
87
            height: 10px;
88
            background-color: #F5222D;
89
            margin-top: 10px;
90
            margin-right: 5px;
91
          }
92
          .offline{
93
            width: 10px;
94
            height: 10px;
95
            background-color: #2B3944;
96
            margin-top: 10px;
97
            margin-right: 5px;
98
          }
99
          .outline{
100
            width: 10px;
101
            height: 10px;
102
            background-color:#FAAD14;
103
            margin-top: 10px;
104
            margin-right: 5px;
105
          }
106
          .normal{
107
            width: 10px;
108
            height: 10px;
109
            background-color: #19BB20;
110
            margin-top: 10px;
111
            margin-right: 5px;
112
          }
113
          .fenji{
114
            width: 10px;
115
            height: 10px;
116
            background-size: 100% 100%;
117
            background-image: url('/static/images/风机.png');
118
            margin-top: 10px;
119
            margin-right: 5px;
120
          }
121
          .shengyazhan{
122
            width: 10px;
123
            height: 10px;
124
            background-size: 100% 100%;
125
            background-image: url('/static/images/升压站画面.png');
126
            margin-top: 10px;
127
            margin-right: 5px;
128
          }
129
          .chuanbo{
130
            width: 10px;
131
            height: 10px;
132
            background-size: 100% 100%;
133
            background-image: url('/static/images/船舶.png');
134
            margin-top: 10px;
135
            margin-right: 5px;
136
          }
137
          .zyqy{
138
            width: 10px;
139
            height: 10px;
140
            background-color: #438D65;
141
            margin-top: 10px;
142
            margin-right: 5px;
143
          }
144
          .dzwl{
145
            width: 10px;
146
            height: 10px;
147
            background-color: #A74B5C;
148
            margin-top: 10px;
149
            margin-right: 5px;
150
          }
151
        }
152
      }
153
    }
154
}
155
.track-modal-container{
156
  display: flex;
157
  .track-modal-left{
158
    border: 1px solid #E7E7E7;
159
    width: 200px;
160
    height: 500px;
161
    text-align: center;
162
    line-height: 30px;
163
    .active{
164
      color: #3BC541;
165
      border-color: #3BC541;
166
    }
167
  }
168
  .track-modal-right{
169
    height: 500px;
170
    width: 1000px;
171
    margin-left: 5px;
172
  }
21 173
}
22 174
.tabs-content{
23 175
  height: 100%;
24 176
}
25 177
26 178
.demo__slipbox .slipbox__header{
27
    text-align: left;
28
    padding:0px;
29
    height: 0px;
30
  }
31
  .demo__slipbox .slipbox__header span{
32
    margin-left: 15px;
33
  }
34
  .demo__slipbox .slipbox__body{
35
    border-top: 1px solid #ccc;
36
  }
37
  .span_left{display:-moz-inline-box; display:inline-block; width:150px;}
38
  .min_font{font-size: 12px;}
179
  text-align: left;
180
  padding:0px;
181
  height: 0px;
182
}
183
.demo__slipbox .slipbox__header span{
184
  margin-left: 15px;
185
}
186
.demo__slipbox .slipbox__body{
187
  border-top: 1px solid #ccc;
188
}
189
.span_left{display:-moz-inline-box; display:inline-block; width:150px;}
190
.min_font{font-size: 12px;}
39 191
40
  .selectedCss{
41
   border-color: #19bb20;
42
   border-width: 2px;
192
.selectedCss{
193
 border-color: #19bb20;
194
 border-width: 2px;
43 195
}
44 196
.liCss{
45
  border-style:solid;
46
  border-radius:5px;
47
 
48
  margin-top: 10px;
49
  margin-bottom: 10px;
50
  padding: 10px;
197
border-style:solid;
198
border-radius:5px;
199
200
margin-top: 10px;
201
margin-bottom: 10px;
202
padding: 10px;
51 203
52 204
}
53 205
.normalCss{
54
  border-color: rgba(141, 138, 138, 0.63);
55
  border-width:0.5px;
206
border-color: rgba(141, 138, 138, 0.63);
207
border-width:0.5px;
56 208
}
57 209
.moveCss{
58
  border-color: #19bb20;
210
border-color: #19bb20;
59 211
60 212
}
213
.aimap-popup-content-wrapper{
214
background: #344979!important;
215
.aimap-popup-content{
216
  margin: 0;
217
}
218
}
219
.aimap-popup-tip-container{
220
.aimap-popup-tip{
221
  background-color: #344979;
222
}
223
} 
224
.point-out{
225
  color: #fff;
226
  background-color: #147BD1;
227
  border: 1px solid #147BD1;
228
  height: 25px;
229
  cursor: pointer;
230
  line-height: 25px;
231
  margin: 7.5px 10px 0 auto;
232
  border-radius: 4px;
233
  width: 85px;
234
  .btn-primary:hover, .radio-group-button .form-radio:hover:checked, .radio-group-button .form-radio[checked]:hover {
235
    color: #fff;
236
    border-color: transparent;
237
    background-color: #378fd8;
238
}
239
}
240
.close-confirm{
241
  color: #fff;
242
  background-color: #147BD1;
243
  border: 1px solid #147BD1;
244
  height: 25px;
245
  cursor: pointer;
246
  line-height: 25px;
247
  margin: 7.5px 15px 10px 0;
248
  border-radius: 4px;
249
  width: 85px;
250
}
61 251
.tips-item{
252
  .point-out{
253
    color: #fff;
254
    background-color: #147BD1;
255
    border: 1px solid #147BD1
256
  }
62 257
  // width: 300px;
63 258
  // margin: 10px 30px;
64 259
  // border: 1px solid #E0E0E0;
@ -91,7 +286,7 @@
91 286
    }
92 287
    .hand-alarm{
93 288
      color: #FAAD14;
94
      background-color:#495571;
289
      background-color: #495571;
95 290
      margin: 7.5px 0 0 5px;
96 291
      padding: 0 5px;
97 292
      font-size: 8px;
@ -114,6 +309,11 @@
114 309
      }
115 310
    }
116 311
  }
312
  .point-out{
313
    color: #fff;
314
    background-color: #147BD1;
315
    border: 1px solid #147BD1
316
  }
117 317
  .footer{
118 318
    height: 40px;
119 319
    border-top: 1px solid #E0E0E0;
@ -125,6 +325,4 @@
125 325
      margin: 7.5px 10px 0 0;
126 326
    }
127 327
  }
128
}
129
  
130
  
328
}

+ 348 - 350
ebc-middle-platform/src/modules/orientation/orientation.vue

@ -1,415 +1,413 @@
1 1
<template>
2 2
  <div class="orientation-container">
3
    <div class="search-container">
4
      <t-row :gutter="16">
5
        <t-col>
6
          <t-button-group>
7
            <t-button color="primary">海图</t-button>
8
            <t-button>卫星</t-button>
9
          </t-button-group>
10
        </t-col>
11
        <t-col>
12
          <t-input
13
            icon="account-multiple"
14
            icon-placement="right"
15
            placeholder="请输入姓名或终端编号..."
16
            style="width: 220px"
17
          ></t-input>
18
        </t-col>
19
        <t-col>
20
          <t-button color="info" icon="map-marker">轨迹</t-button>
21
        </t-col>
22
        <t-col></t-col>
23
      </t-row>
3
    <div class="top-container">
4
      <div class="person-info">
5
        <div>全部<span class="number">29</span>人</div>
6
        <div><div class="normal"></div>正常<span class="number">26</span>人</div>
7
        <div><div class="off-line"></div>离线<span class="number">2</span>人</div>
8
        <div><div class="sos"></div>SOS<span class="number">1</span>人</div>
9
        <div class="time">当前时间:{{ nowDate|dateFormat }}</div>
10
      </div>
11
      <div class="right-content">
12
        <t-button color="success" icon="map-marker-outline" @click="()=>{trackModal=true}">轨迹</t-button>
13
        <div>悬浮窗<t-switch rounded></t-switch></div>
14
      </div>
24 15
    </div>
25
    <div id="div1" style="height:100%">人员定位</div>
26
    <div>
27
      <t-slipbox
28
        :visibled.sync="visible"
29
        :styles="styls"
30
        :shadow="shadow"
31
        direction="left"
32
        class="demo__slipbox"
33
      >
34
        <template slot="header">
35
          <div class="slipbox__header"></div>
36
        </template>
37
        <template>
38
          <t-tabs style="height:100%">
39
            <t-tab-panel label="全部" panel-id="tab-1" style="height:100%;">
40
              <t-scroll-bar style="height:100%;" :auto-hide="false">
41
                <ul style="padding-left: 0px;">
42
                  <li
43
                    class="liCss"
44
                    v-for="item in dataList"
45
                    :key="item.number"
46
                    :class="[clickActiveName==item.number?'selectedCss':'normalCss',{moveCss:moveActiveName==item.number}]"
47
                    @click="changeColor(item.number)"
48
                    @mouseover="changeMoveColor(item.number)"
49
                  >
50
                    <div style="width:350px;">
51
                      <div slot="head" style="height:24px;margin:5px 0 5px 0">
52
                        <t-icon icon="heart-outline" size="14" color="primary" class="mr-5"></t-icon>
53
                        <span>{{item.name}}</span>
54
                        <span class="min_font">{{item.type}}</span>
55
                        <t-button
56
                          color="info"
57
                          icon="map-marker"
58
                          style="float:right; width:80px;margin-right: 20px;"
59
                          size="sm"
60
                        >轨迹</t-button>
61
                      </div>
62
                      <hr />
63
                      <div style>
64
                        <div style="margin:5px 0;">
65
                          <span class="span_left min_font">终端编码</span>
66
                          <span class="min_font">{{item.number}}</span>
67
                        </div>
68
                        <div style="margin:5px 0;">
69
                          <span class="span_left min_font">最新定位时间</span>
70
                          <span class="min_font">{{item.newMarkerTime}}</span>
71
                        </div>
72
                      </div>
73
                    </div>
74
                  </li>
75
                </ul>
76
              </t-scroll-bar>
77
            </t-tab-panel>
78
            <t-tab-panel label="在线" panel-id="tab-2" icon="home">
79
              <t-scroll-bar  style="height:100%" :auto-hide="false">
80
                <ul style="padding-left: 0px;">
81
                  <li
82
                    class="liCss"
83
                    v-for="item in normalData"
84
                    :key="item.number"
85
                    :class="[clickActiveName==item.number?'selectedCss':'normalCss',{moveCss:moveActiveName==item.number}]"
86
                    @click="changeColor(item.number)"
87
                    @mouseover="changeMoveColor(item.number)"
88
                  >
89
                    <div style="width:350px;">
90
                      <div slot="head" style="height:24px;margin:5px 0 5px 0">
91
                        <t-icon icon="heart-outline" size="14" color="primary" class="mr-5"></t-icon>
92
                        <span>{{item.name}}</span>
93
                        <span class="min_font">{{item.type}}</span>
94
                        <t-button
95
                          color="info"
96
                          icon="map-marker"
97
                          style="float:right; width:80px;margin-right: 20px;"
98
                          size="sm"
99
                        >轨迹</t-button>
100
                      </div>
101
                      <hr />
102
                      <div style>
103
                        <div style="margin:5px 0;">
104
                          <span class="span_left min_font">终端编码</span>
105
                          <span class="min_font">{{item.number}}</span>
106
                        </div>
107
                        <div style="margin:5px 0;">
108
                          <span class="span_left min_font">最新定位时间</span>
109
                          <span class="min_font">{{item.newMarkerTime}}</span>
110
                        </div>
111
                      </div>
112
                    </div>
113
                  </li>
114
                </ul>
115
              </t-scroll-bar>
116
            </t-tab-panel>
117
            <t-tab-panel label="SOS" panel-id="tab-3" icon="home" style="height:100%;">
118
              <t-scroll-bar style="height:100%;" :auto-hide="false">
119
                <ul style="padding-left: 0px;">
120
                  <li
121
                    class="liCss"
122
                    v-for="item in alertData"
123
                    :key="item.number"
124
                    :class="[clickActiveName==item.number?'selectedCss':'normalCss',{moveCss:moveActiveName==item.number}]"
125
                    @click="changeColor(item.number)"
126
                    @mouseover="changeMoveColor(item.number)"
127
                  >
128
                    <div style="width:350px;">
129
                      <div slot="head" style="height:24px;margin:5px 0 5px 0">
130
                        <t-icon icon="heart-outline" size="14" color="primary" class="mr-5"></t-icon>
131
                        <span>{{item.name}}</span>
132
                        <span class="min_font">{{item.type}}</span>
133
                        <t-button
134
                          color="info"
135
                          icon="map-marker"
136
                          style="float:right; width:80px;margin-right: 20px;"
137
                          size="sm"
138
                        >轨迹</t-button>
139
                      </div>
140
                      <hr />
141
                      <div style>
142
                        <div style="margin:5px 0;">
143
                          <span class="span_left min_font">终端编码</span>
144
                          <span class="min_font">{{item.number}}</span>
145
                        </div>
146
                        <div style="margin:5px 0;">
147
                          <span class="span_left min_font">最新定位时间</span>
148
                          <span class="min_font">{{item.newMarkerTime}}</span>
149
                        </div>
150
                      </div>
151
                    </div>
152
                  </li>
153
                </ul>
154
              </t-scroll-bar>
155
            </t-tab-panel>
156
            <t-tab-panel label="离线" panel-id="tab-4" icon="home" >
157
              <t-scroll-bar style="height:100%" :auto-hide="false">
158
                <ul style="padding-left: 0px;">
159
                  <li
160
                    class="liCss"
161
                    v-for="item in offlineData"
162
                    :key="item.number"
163
                    :class="[clickActiveName==item.number?'selectedCss':'normalCss',{moveCss:moveActiveName==item.number}]"
164
                    @click="changeColor(item.number)"
165
                    @mouseover="changeMoveColor(item.number)"
166
                  >
167
                    <div style="width:350px;">
168
                      <div slot="head" style="height:24px;margin:5px 0 5px 0">
169
                        <t-icon icon="heart-outline" size="14" color="primary" class="mr-5"></t-icon>
170
                        <span>{{item.name}}</span>
171
                        <span class="min_font">{{item.type}}</span>
172
                        <t-button
173
                          color="info"
174
                          icon="map-marker"
175
                          style="float:right; width:80px;margin-right: 20px;"
176
                          size="sm"
177
                        >轨迹</t-button>
178
                      </div>
179
                      <hr />
180
                      <div style>
181
                        <div style="margin:5px 0;">
182
                          <span class="span_left min_font">终端编码</span>
183
                          <span class="min_font">{{item.number}}</span>
184
                        </div>
185
                        <div style="margin:5px 0;">
186
                          <span class="span_left min_font">最新定位时间</span>
187
                          <span class="min_font">{{item.newMarkerTime}}</span>
188
                        </div>
189
                      </div>
190
                    </div>
191
                  </li>
192
                </ul>
193
              </t-scroll-bar>
194
            </t-tab-panel>
195
          </t-tabs>
196
        </template>
197
      </t-slipbox>
198
    </div>
199
    <div class="oparate-btn">
200
      <t-button v-if="visible" color="info"  style="height:60px" icon="left-circle-outline" @click.native="hideSlip"></t-button>
201
      <t-button v-else color="info" icon="right-circle-outline" style="height:60px" @click.native="showSlip"></t-button>
16
    <div id="div1" style="height:100%"></div>
17
    <div class="label">
18
      <div class="item">
19
        <div>
20
          <div class="sos"></div><div>SOS</div>
21
        </div>
22
        <div>
23
          <div class="offline"></div><div>离线</div>
24
        </div>
25
        <div>
26
          <div class="outline"></div><div>违规</div>
27
        </div>
28
        <div>
29
          <div class="normal"></div><div>正常</div>
30
        </div>
31
      </div>
32
      <div class="item">
33
        <div>
34
          <div class="fenji"></div><div>风机</div>
35
        </div>
36
        <div>
37
          <div class="shengyazhan"></div><div>升压站</div>
38
        </div>
39
        <div>
40
          <div class="chuanbo"></div><div>船舶</div>
41
        </div>
42
      </div>
43
      <div class="item">
44
        <div>
45
          <div class="zyqy"></div><div>作业区域</div>
46
        </div>
47
        <div>
48
          <div class="dzwl"></div><div>电子围栏</div>
49
        </div>
50
      </div>
202 51
    </div>
52
53
    <t-modal :visibled.sync="trackModal" :footer-visibled="false" :mask-closable="false" :width="1200" title="历史轨迹">
54
      <div class="track-modal-container">
55
        <div class="track-modal-left">
56
          <t-input v-model="trackSearch" icon="search-outline" icon-placement="right" placeholder="请输入姓名或终端编号" style="width: 200px"></t-input>
57
          <div>
58
            <div>张三</div>
59
            <div>张三</div>
60
            <div>张三</div>
61
            <div>张三</div>
62
          </div>
63
        </div>
64
        <div class="track-modal-right">
65
          <div style="display:flex">
66
            <t-button-group>
67
              <t-button v-for="(item,index) in trackTimeList" :class="index==trackQueryCondition.currentIndex?'active':''" :key="index" @click="changeTrackTime(index)">{{ item }}</t-button>
68
            </t-button-group>
69
            <t-date-picker v-show="trackQueryCondition.currentIndex===3" v-model="rangeDate" style="width:250px" type="dateRange" placeholder="请选择时间" @date-change="onChangeDate"></t-date-picker>
70
            <div style="display:flex">
71
              <div>速度</div>
72
              <t-select>
73
                <t-option>1x</t-option>
74
                <t-option>2x</t-option>
75
              </t-select>
76
            </div>
77
            <t-button color="success" icon="video-outline">回放</t-button>
78
            <t-button color="secondary" icon="upload-outline" @click="toExport">导出至Excel</t-button>
79
          </div>
80
          <div id="track-map" style="height:94%">
81
          </div>
82
        </div>
83
      </div>
84
    </t-modal>
203 85
  </div>
204 86
</template>
205 87
206 88
<script>
207
import "./orientation.scss";
208
import { forEach, filter , find} from "lodash";
89
import './orientation.scss'
90
import { forEach, filter, find} from 'lodash'
209 91
export default {
92
  filters: {
93
    dateFormat(value) {
94
      var year = value.getFullYear()
95
      var month = value.getMonth() >= 10 ? value.getMonth() : '0' + value.getMonth()
96
      var day = value.getDate() >= 10 ? value.getDate() : '0' + value.getDate()
97
      var hours = value.getHours() >= 10 ? value.getHours() : '0' + value.getHours()
98
      var minutes = value.getMinutes() >= 10 ? value.getMinutes() : '0' + value.getMinutes()
99
      var seconds = value.getSeconds() >= 10 ? value.getSeconds() : '0' + value.getSeconds()
100
      return year + '.' + month + '.' + day + ' ' + hours + ':' + minutes + ':' + seconds
101
    }
102
  },
210 103
  data() {
211 104
    return {
212 105
      map: null,
213
      pointsarr:null,
214
      polylinearr: "122.0352 32.4444,122.0372 32.4444,122.0400 32.4366,122.2922 32.4233",
215
      polygonarr: "122.2302 32.5444,122.2302 32.3444, 122.4302 32.3444,122.4302 32.6044,122.2302 32.5444",
216
      popup:null,
217
      visible: true,
106
      pointsarr: null,
107
      polylinearr: '122.0352 32.4444,122.0372 32.4444,122.0400 32.4366,122.2922 32.4233',
108
      polygonarr: '122.2302 32.5444,122.2302 32.3444, 122.4302 32.3444,122.4302 32.6044,122.2302 32.5444',
109
      popup: null,
218 110
      shadow: false,
219
      styls: { width: "400px", height: "70%", margin: "120px 0 0 75px" },
220
      clickActiveName: "",
221
      moveActiveName: "",
222 111
      dataList: [
223 112
        {
224
          name: "王小明",
225
          number: "ZDBH0001",
226
          type: "落水告警",
227
          Longitude: "32.4233",
228
          latitude: "122.2922",
229
          alarmTime: "2020.7.10 08:21:43",
230
          newMarkerTime: "2020.7.10 08:21:43",
231
          rescuePerson: "海事局A",
232
          rescueTime: "2020.7.3 11:22:16",
233
          rescueDuration: "10小时39分钟",
113
          name: '王小明',
114
          number: 'ZDBH0001',
115
          type: '落水告警',
116
          Longitude: '32.4233',
117
          latitude: '122.2922',
118
          alarmTime: '2020.7.10 08:21:43',
119
          newMarkerTime: '2020.7.10 08:21:43',
120
          rescuePerson: '海事局A',
121
          rescueTime: '2020.7.3 11:22:16',
122
          rescueDuration: '10小时39分钟'
234 123
        },
235 124
        {
236
          name: "王小明1",
237
          number: "ZDBH0002",
238
          type: "正常",
239
          Longitude: "32.333",
240
          latitude: "122.0822",
241
          alarmTime: "2020.7.10 08:21:43",
242
          newMarkerTime: "2020.7.10 08:21:43",
243
          rescuePerson: "海事局A",
244
          rescueTime: "2020.7.3 11:22:16",
245
          rescueDuration: "10小时39分钟",
125
          name: '王小明1',
126
          number: 'ZDBH0002',
127
          type: '正常',
128
          Longitude: '32.333',
129
          latitude: '122.0822',
130
          alarmTime: '2020.7.10 08:21:43',
131
          newMarkerTime: '2020.7.10 08:21:43',
132
          rescuePerson: '海事局A',
133
          rescueTime: '2020.7.3 11:22:16',
134
          rescueDuration: '10小时39分钟'
246 135
        },
247 136
        {
248
          name: "王小明2",
249
          number: "ZDBH0003",
250
          type: "正常",
251
          Longitude: "32.4444",
252
          latitude: "122.0352",
253
          alarmTime: "2020.7.10 08:21:43",
254
          newMarkerTime: "2020.7.10 08:21:43",
255
          rescuePerson: "海事局A",
256
          rescueTime: "2020.7.3 11:22:16",
257
          rescueDuration: "10小时39分钟",
137
          name: '王小明2',
138
          number: 'ZDBH0003',
139
          type: '正常',
140
          Longitude: '32.4444',
141
          latitude: '122.0352',
142
          alarmTime: '2020.7.10 08:21:43',
143
          newMarkerTime: '2020.7.10 08:21:43',
144
          rescuePerson: '海事局A',
145
          rescueTime: '2020.7.3 11:22:16',
146
          rescueDuration: '10小时39分钟'
258 147
        },
259 148
        {
260
          name: "王小明3",
261
          number: "ZDBH0004",
262
          type: "离线",
263
          Longitude: "32.555",
264
          latitude: "121.0752",
265
          alarmTime: "2020.7.10 08:21:43",
266
          newMarkerTime: "2020.7.10 08:21:43",
267
          rescuePerson: "海事局A",
268
          rescueTime: "2020.7.3 11:22:16",
269
          rescueDuration: "10小时39分钟",
149
          name: '王小明3',
150
          number: 'ZDBH0004',
151
          type: '离线',
152
          Longitude: '32.555',
153
          latitude: '121.0752',
154
          alarmTime: '2020.7.10 08:21:43',
155
          newMarkerTime: '2020.7.10 08:21:43',
156
          rescuePerson: '海事局A',
157
          rescueTime: '2020.7.3 11:22:16',
158
          rescueDuration: '10小时39分钟'
270 159
        },
271 160
        {
272
          name: "王小明4",
273
          number: "ZDBH0005",
274
          type: "落水告警",
275
          Longitude: "32.466",
276
          latitude: "122.04322",
277
          alarmTime: "2020.7.10 08:21:43",
278
          newMarkerTime: "2020.7.10 08:21:43",
279
          rescuePerson: "海事局A",
280
          rescueTime: "2020.7.3 11:22:16",
281
          rescueDuration: "10小时39分钟",
282
        },
161
          name: '王小明4',
162
          number: 'ZDBH0005',
163
          type: '落水告警',
164
          Longitude: '32.466',
165
          latitude: '122.04322',
166
          alarmTime: '2020.7.10 08:21:43',
167
          newMarkerTime: '2020.7.10 08:21:43',
168
          rescuePerson: '海事局A',
169
          rescueTime: '2020.7.3 11:22:16',
170
          rescueDuration: '10小时39分钟'
171
        }
283 172
      ],
284
    };
173
      nowDate: new Date(),
174
      modal: false,
175
      trackModal: false,
176
      trackSearch: '',
177
      trackTimeList: [
178
        '-10min',
179
        '-1h',
180
        '本日',
181
        '自定义'
182
      ],
183
      trackQueryCondition: {
184
        currentIndex: 0
185
      },
186
      trackMap: null,
187
      rangeDate: ''
188
    }
285 189
  },
286 190
  computed: {
287 191
    normalData: function () {
288 192
      return filter(this.dataList, function (o) {
289
        return o.type == "正常";
290
      });
193
        return o.type == '正常'
194
      })
291 195
    },
292 196
    alertData: function () {
293 197
      return filter(this.dataList, function (o) {
294
        return o.type == "落水告警";
295
      });
198
        return o.type == '落水告警'
199
      })
296 200
    },
297 201
    offlineData: function () {
298 202
      return filter(this.dataList, function (o) {
299
        return o.type == "离线";
300
      });
301
    },
203
        return o.type == '离线'
204
      })
205
    }
302 206
  },
303 207
  mounted() {
304
    this.initMap("");
305
    this.pointsSet();
306
    this.polyline();
307
    this.polygon();
308
     this.map.setZoom(9);
208
    this.initMap('')
209
    this.initTrackMap('')
210
    this.pointsSet()
211
    this.polyline()
212
    this.polygon()
213
    this.map.setZoom(9)
214
    setInterval(() => {
215
      this.nowDate = new Date()
216
    }, 1000)
217
    this.loadFenji()
218
    this.loadchuanbo()
219
    this.loadshengyazhan()
309 220
  },
310 221
  methods: {
311 222
    initMap(value) {
312
      if (this.map != null && this.map != "") {
313
        this.map.remove();
223
      if (this.map != null && this.map != '') {
224
        this.map.remove()
225
      }
226
      this.map = new Ai.Map('div1', {
227
        ak: 'MTYwMzIMTAwMU1UWXdNekkwTmpBME1EUTFOeU14TnpRdw__',
228
        center: [39.915599, 122.406568]
229
230
      })
231
      var maplayer = null
232
      maplayer = Ai.TileLayer('http://192.168.74.189:9999/tdtvector')
233
      var la = Ai.WMTSLayer('http://192.168.74.216:5071/gisserver/dzht/dzht/wmts', {opacity: 0.5})
234
      this.map.addLayer(maplayer)
235
      this.map.addLayer(la)
236
237
      Ai.Scale({position: 'bottomright'}).addTo(this.map)
238
      Ai.Zoom({type: 'small'}).addTo(this.map)
239
    },
240
    initTrackMap(value) {
241
      if (this.trackMap != null && this.trackMap != '') {
242
        this.trackMap.remove()
314 243
      }
315
      this.map = new Ai.Map("div1", {
316
        ak: "MTYwMzEMTAwMU1UWXdNekU0TWprMk1EYzFOaU14TnpRdw__",
317
        center:[39.915599, 122.406568],
318
        
319
      });
320
      var maplayer = null;
321
      maplayer = Ai.TileLayer("http://192.168.74.189:9999/tdtvector");
322
      var la = Ai.WMTSLayer('http://192.168.74.216:5071/gisserver/dzht/dzht/wmts' {opacity: 0.5});
323
      this.map.addLayer(maplayer);
324
      this.map.addLayer(la);
325
      
326
      Ai.Scale({position:"bottomright"}).addTo(this.map);
327
      Ai.Zoom({type:"small"}).addTo(this.map);
244
      this.trackMap = new Ai.Map('track-map', {
245
        ak: 'MTYwMzIMTAwMU1UWXdNekkwTmpBME1EUTFOeU14TnpRdw__',
246
        center: [39.915599, 122.406568]
247
248
      })
249
      var maplayer = null
250
      maplayer = Ai.TileLayer('http://192.168.74.189:9999/tdtvector')
251
      var la = Ai.WMTSLayer('http://192.168.74.216:5071/gisserver/dzht/dzht/wmts', {opacity: 0.5} {opacity: 0.5})
252
      this.trackMap.addLayer(maplayer)
253
      this.trackMap.addLayer(la)
254
255
      Ai.Scale({position: 'bottomright'}).addTo(this.trackMap)
256
      Ai.Zoom({type: 'small'}).addTo(this.trackMap)
328 257
    },
329 258
    pointsSet() {
330
      var arr = [];
331
      this.pointsLayer= new Ai.FeatureGroup();
332
      var icon = (icon = Ai.IconPulse({ iconSize: [13, 13] }));
333
      forEach(this.dataList, (value)=>{
334
        var point1;
335
        if (value.type == "落水告警") {
336
          point1 = new Ai.Point([value.Longitude, value.latitude], {
337
            icon: icon,
338
          });
259
      var arr = []
260
      this.pointsLayer = new Ai.FeatureGroup()
261
      var icon = (icon = Ai.IconPulse({ iconSize: [13, 13] }))
262
      forEach(this.dataList, (value) => {
263
        var point1
264
        if (value.type == '落水告警') {
265
          point1 = Ai.Point([value.Longitude, value.latitude], {icon: Ai.Icon({
266
            // 设置图标URL路径
267
            iconUrl: '/static/images/worker(1).png',
268
            // 设置图标大小
269
            iconSize: [20, 20],
270
            // 设置点对象和图标的相对偏移量
271
            iconAnchor: [0, 0]
272
          })})
339 273
        } else {
340
          point1 = new Ai.Point([value.Longitude, value.latitude]);
274
          point1 = Ai.Point([value.Longitude, value.latitude], {icon: Ai.Icon({
275
            // 设置图标URL路径
276
            iconUrl: '/static/images/worker.png',
277
            // 设置图标大小
278
            iconSize: [20, 20],
279
            // 设置点对象和图标的相对偏移量
280
            iconAnchor: [0, 0]
281
          })})
341 282
        }
342
343
        this.pointsLayer.addLayer(point1);
344
        arr.push(point1);
345
        //this.pointsarr.push(point1);
346
      });
347
      this.map.addLayer(this.pointsLayer);
348
      this.map.fitBoundsForLayers(arr);
283
        point1.on('click', (e) => {
284
          console.log(e)
285
          var content = '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>张三</div><div class="hand-alarm">救援人员</div></div><div class="middle"><div class="row">' +
286
           '<div>终端编号</div>' +
287
           '<div>ZDBH0001</div>' +
288
         '</div>' +
289
         '<div class="row">' +
290
           '<div>最新定位时间</div>' +
291
           '<div>2020.08.13 08:24:32</div>' +
292
         '</div></div></div>' +
293
         '<div style="display:flex;">' +
294
          '<button class="point-out" onClick="window.Vue.modal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
295
          '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
296
        '</div></div></div>'
297
          var popup = Ai.Popup({minWidth: 300, offset: [0, -10], autoClose: true})
298
          // 设置弹出框弹出位置
299
            .setLatLng([value.Longitude, value.latitude])
300
          // 设置弹出框弹出内容
301
            .setContent(content)
302
            .openOn(this.map)
303
        })
304
        this.pointsLayer.addLayer(point1)
305
        arr.push(point1)
306
        // this.pointsarr.push(point1);
307
      })
308
      this.map.addLayer(this.pointsLayer)
309
      this.map.fitBoundsForLayers(arr)
349 310
    },
350 311
    polyline() {
351
      var polylineLayer=new Ai.FeatureGroup();
352
      //线绘制
312
      var polylineLayer = new Ai.FeatureGroup()
313
      // 线绘制
353 314
      var lineWktStr =
354
        "LINESTRING ( " +this.polylinearr+")";
315
        'LINESTRING ( ' + this.polylinearr + ')'
355 316
      var polyline = new Ai.Polyline(lineWktStr, {
356
        color: "green",
357
        opacity: 1.0,
358
      });
359
      //this.polylinearr.arr(polyline);
360
      polylineLayer.addLayer(polyline);
361
      this.map.addLayer(polylineLayer);
317
        color: 'green',
318
        opacity: 1.0
319
      })
320
      // this.polylinearr.arr(polyline);
321
      polylineLayer.addLayer(polyline)
322
      this.map.addLayer(polylineLayer)
362 323
    },
363 324
    polygon() {
364
      var polygonLayer=new Ai.FeatureGroup();
365
      //面绘制
325
      var polygonLayer = new Ai.FeatureGroup()
326
      // 面绘制
366 327
      var coverWktStr =
367
        "POLYGON ((" +this.polygonarr+"))";
368
      var polygon = Ai.Polygon(coverWktStr, { color: "red", opacity: 1.0 });
369
      //this.polygonarr.arr(polygon);
370
      polygonLayer.addLayer(polygon);
371
      this.map.addLayer(polygonLayer);
328
        'POLYGON ((' + this.polygonarr + '))'
329
      var polygon = Ai.Polygon(coverWktStr, { color: 'red', opacity: 1.0, weight: 0 })
330
      // this.polygonarr.arr(polygon);
331
      polygonLayer.addLayer(polygon)
332
      this.map.addLayer(polygonLayer)
372 333
    },
373 334
    showSlip() {
374
      this.visible = true;
335
      this.visible = true
375 336
    },
376
    showPopup(number){
377
      if (this.popup != null && this.popup != "") {
378
              this.popup.closePopup();
379
              this.popup.remove();
337
    showPopup(number) {
338
      if (this.popup != null && this.popup != '') {
339
        this.popup.closePopup()
340
        this.popup.remove()
380 341
      }
381
      var data=find(this.dataList,  (o)=> {
382
        return o.number == number;
383
      });
384
      if(data!=null&&data!="")
385
      {
386
        var content = '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>'+data.name+'</div><div class="hand-alarm">'+data.type+'</div></div><div class="middle"><div class="row">' +
387
            '<div>终端编号</div>' +
388
            '<div>'+data.number+'</div>' +
389
          '</div>' +
390
          '<div class="row">' +
391
            '<div>最新定位时间</div>' +
392
            '<div>'+data.newMarkerTime+'</div>' +
393
          '</div></div></div>'
394
         this.popup = Ai.Popup({minWidth: 300, offset: [0, -10], autoClose: false})
342
      var data = find(this.dataList, (o) => {
343
        return o.number == number
344
      })
345
      if (data != null && data != '') {
346
        var content = '<div class="tips-item"><div class="top"><div class="user-pic"><t-icon icon="user-outline"></t-icon></div><div>张三</div><div class="hand-alarm">救援人员</div></div><div class="middle"><div class="row">' +
347
           '<div>终端编号</div>' +
348
           '<div>ZDBH0001</div>' +
349
         '</div>' +
350
         '<div class="row">' +
351
           '<div>最新定位时间</div>' +
352
           '<div>2020.08.13 08:24:32</div>' +
353
         '</div></div></div>' +
354
         '<div style="display:flex;">' +
355
          '<button class="point-out" onClick="window.Vue.modal=true"><i style="font-size: 20px;" class="aidicon aidicon-user-outline"></i>指派</button>' +
356
          '<button class="close-confirm" onClick="window.Vue.close()"><i style="font-size: 20px;" class="aidicon aidicon-close"></i>关闭</button>' +
357
        '</div></div></div>'
358
        this.popup = Ai.Popup({minWidth: 300, offset: [0, -10], autoClose: false})
395 359
        // 设置弹出框弹出位置
396 360
          .setLatLng({lat: data.Longitude, lng: data.latitude})
397 361
        // 设置弹出框弹出内容
398 362
          .setContent(content)
399 363
          .openOn(this.map)
400
401 364
      }
402 365
    },
403
    hideSlip() {
404
      this.visible = false;
366
    loadFenji() {
367
      var point = Ai.Point([29.86089241772908, 122.09930419921876], {icon: Ai.Icon({
368
        // 设置图标URL路径
369
        iconUrl: '/static/images/风机.png',
370
        // 设置图标大小
371
        iconSize: [20, 20],
372
        // 设置点对象和图标的相对偏移量
373
        iconAnchor: [0, 0]
374
      })})
375
      this.pointsLayer.addLayer(point)
376
      this.map.addLayer(this.pointsLayer)
405 377
    },
406
    changeColor(number) {
407
      this.showPopup(number);
408
      this.clickActiveName = number;
378
    loadchuanbo() {
379
      var point = Ai.Point([29.960892, 122.09930419921876], {icon: Ai.Icon({
380
        // 设置图标URL路径
381
        iconUrl: '/static/images/船舶.png',
382
        // 设置图标大小
383
        iconSize: [20, 20],
384
        // 设置点对象和图标的相对偏移量
385
        iconAnchor: [0, 0]
386
      })})
387
      this.pointsLayer.addLayer(point)
388
      this.map.addLayer(this.pointsLayer)
409 389
    },
410
    changeMoveColor(number) {
411
      this.moveActiveName = number;
390
    loadshengyazhan() {
391
      var point = Ai.Point([29.86089241772908, 122.1993], {icon: Ai.Icon({
392
        // 设置图标URL路径
393
        iconUrl: '/static/images/升压站画面.png',
394
        // 设置图标大小
395
        iconSize: [20, 20],
396
        // 设置点对象和图标的相对偏移量
397
        iconAnchor: [0, 0]
398
      })})
399
      this.pointsLayer.addLayer(point)
400
      this.map.addLayer(this.pointsLayer)
412 401
    },
413
  },
414
};
415
</script>
402
    changeTrackTime(index) {
403
      this.trackQueryCondition.currentIndex = index
404
    },
405
    onChangeDate() {
406
407
    },
408
    toExport() {
409
410
    }
411
  }
412
}
413
</script>

+ 3 - 3
ebc-middle-platform/src/modules/page/GlobalLayout.vue

@ -17,11 +17,11 @@
17 17
      </layout-content>
18 18
19 19
      <!-- layout footer -->
20
      <layout-footer style="padding: 0px">
20
      <!-- <layout-footer style="padding: 0px">
21 21
        <global-footer />
22
      </layout-footer>
22
      </layout-footer> -->
23 23
    </layout>
24
    <setting-drawer></setting-drawer>
24
    <!-- <setting-drawer></setting-drawer> -->
25 25
  </layout>
26 26
</template>
27 27

+ 7 - 0
ebc-middle-platform/src/modules/system-management/terminal-management.vue

@ -103,6 +103,12 @@
103 103
          <t-form-item label="终端编号" prop="number">
104 104
            <div>ZDBH002</div>
105 105
          </t-form-item>
106
          <t-form-item label="关联类型" prop="type">
107
            <t-radio-group v-model="relevanceValidate.type">
108
              <t-radio value="0" label="用户"></t-radio>
109
              <t-radio value="1" label="船舶"></t-radio>
110
            </t-radio-group>
111
          </t-form-item>
106 112
          <t-form-item label="关联用户" prop="user">
107 113
            <div class="row">
108 114
              <div class="col-9">
@ -201,6 +207,7 @@ export default {
201 207
      },
202 208
      relevance: false,
203 209
      relevanceValidate: {
210
        type: '0',
204 211
        user: ''
205 212
      },
206 213
      relevanceRuleValidate: {

+ 1 - 1
ebc-middle-platform/src/routes.js

@ -168,7 +168,7 @@ export default [
168 168
            /* webpackChunkName: "attendance" */ '@/modules/layouts/RouteView.vue'
169 169
          ),
170 170
        name: 'attendance',
171
        meta: { title: '报警救援', icon: 'heart-outline' },
171
        meta: { title: '考勤管理', icon: 'heart-outline' },
172 172
        redirect: '/attendance/attendance',
173 173
        children: [
174 174
          {