Bladeren bron

历史报警的modal等

wangkang3 4 jaren geleden
bovenliggende
commit
22f309a6fc

+ 98 - 2
ebc-middle-platform/src/modules/authorization/menu-authorization.vue

@ -22,6 +22,7 @@
22 22
      <t-transfer
23 23
        ref="transfer"
24 24
        :data="dataTable"
25
        :target-keys="targetKeys"
25 26
        :selected-keys="targetKeysTable"
26 27
        :operations="['← 绑定','解绑 →']"
27 28
        :titles="['已关联菜单','可关联菜单']"
@ -35,7 +36,7 @@
35 36
          ></t-tree>
36 37
        </div>
37 38
        <div slot="listBodyRight" slot-scope="tableRight">
38
          <t-tree :multiple="true"
39
          <t-tree ref="rightTree" :multiple="true"
39 40
                  :with-ancestors="true"
40 41
                  :with-descendants="true"
41 42
                  :node-data="tableRight.data" @select="changeRightTree"
@ -130,6 +131,7 @@ export default {
130 131
        }
131 132
      ],
132 133
      targetKeysTable: [],
134
      targetKeys: [],
133 135
      copyData: [],
134 136
      removeData: []
135 137
    }
@ -156,7 +158,7 @@ export default {
156 158
        })
157 159
        this.removeData = []
158 160
      }
159
      console.log(this.dataTable)
161
      console.log(this.targetKeysTable)
160 162
    },
161 163
    changeLeftTree(ids) {
162 164
      console.log(ids)
@ -209,6 +211,21 @@ export default {
209 211
                index: dataIndex
210 212
              })
211 213
            }
214
            if (includeFlag) {
215
              var includeIndex = 0
216
              this.dataTable.forEach((e, index) => {
217
                if (e.id === id) {
218
                  includeIndex = index
219
                }
220
              })
221
              this.removeData.push({
222
                key: id,
223
                label: this.$refs.leftTree.getNodeStateById(id).label,
224
                title: this.$refs.leftTree.getNodeStateById(id).title,
225
                id: id,
226
                index: includeIndex
227
              })
228
            }
212 229
          } else {
213 230
            if (includeFlag) {
214 231
              var includeIndex = 0
@ -241,6 +258,85 @@ export default {
241 258
    },
242 259
    changeRightTree(ids) {
243 260
      console.log(ids)
261
      var transferId = []
262
      ids.forEach(id => {
263
        console.log(this.$refs.rightTree.getNodeStateById(id))
264
        if (this.$refs.rightTree.getNodeStateById(id).children && this.isContained(ids, this.$refs.rightTree.getNodeStateById(id).children)) {
265
          // 修改子节点的pid
266
          var includeFlag = true
267
          this.$refs.rightTree.getNodeStateById(id).children.forEach(elementChild => {
268
            // 不含在选中的ids
269
            if (ids.indexOf(elementChild) === -1) {
270
              includeFlag = false
271
              // this.dataTable.forEach(elementChildTable => {
272
              //   if (elementChildTable.id === elementChild) {
273
              //     if (elementChildTable.pid.indexOf('copy') === -1) {
274
              //       elementChildTable.pid = 'copy' + elementChildTable.pid
275
              //     }
276
              //   }
277
              // })
278
            } else {
279
              // this.dataTable.forEach(elementChildTable => {
280
              //   if (elementChildTable.id === elementChild) {
281
              //     if (elementChildTable.pid.indexOf('copy') !== -1) {
282
              //       elementChildTable.pid = elementChildTable.pid.slice(4)
283
              //     }
284
              //   }
285
              // })
286
              this.dataTable.forEach(elementChildTable => {
287
                if (elementChildTable.id === elementChild) {
288
                  if (elementChildTable.pid.indexOf('copy') === -1) {
289
                    elementChildTable.pid = 'copy' + elementChildTable.pid
290
                  }
291
                }
292
              })
293
            }
294
          })
295
296
          if (includeFlag) {
297
            transferId.push(id)
298
            var includeIndex = 0
299
            this.dataTable.forEach((e, index) => {
300
              if (e.id === id) {
301
                includeIndex = index
302
              }
303
            })
304
            this.removeData.push({
305
              key: id,
306
              label: this.$refs.rightTree.getNodeStateById(id).label,
307
              title: this.$refs.rightTree.getNodeStateById(id).title,
308
              id: id,
309
              index: includeIndex
310
            })
311
          } else {
312
            var dataIndex = 0
313
            this.dataTable.forEach((e, index) => {
314
              if (e.id === id) {
315
                dataIndex = index
316
              }
317
            })
318
            this.copyData.push({
319
              key: 'copy' + id,
320
              label: this.$refs.rightTree.getNodeStateById(id).label,
321
              title: this.$refs.rightTree.getNodeStateById(id).title,
322
              id: 'copy' + id,
323
              index: dataIndex
324
            })
325
          }
326
        } else {
327
          transferId.push(id)
328
        }
329
        if (id.indexOf('copy') === -1) {
330
          // transferId.push(id)
331
        } else {
332
          console.log(this.$refs.rightTree.getNodeStateById(id).children)
333
          if (!this.$refs.rightTree.getNodeStateById(id).children) {
334
            console.log(123213, id)
335
          }
336
        }
337
      })
338
      console.log(transferId)
339
      this.targetKeysTable = transferId
244 340
    },
245 341
    onPagerChange(page) {
246 342

+ 2 - 0
ebc-middle-platform/src/modules/call-help/current.vue

@ -87,6 +87,8 @@ export default {
87 87
    var maplayer = null
88 88
    maplayer = Ai.TileLayer('http://192.168.74.189:9999/tdtvector')
89 89
    this.map.addLayer(maplayer)
90
    var la = Ai.WMTSLayer('http://192.168.74.216:5071/gisserver/dzht:dzht/wmts')
91
    this.map.addLayer(la)
90 92
    var icon = Ai.Icon({
91 93
      // 设置图标URL路径
92 94
      iconUrl: '/static/images/worker.png',

+ 95 - 0
ebc-middle-platform/src/modules/call-help/history.scss

@ -61,4 +61,99 @@
61 61
  .table-pager{
62 62
    margin: 20px auto;
63 63
  }
64
}
65
.modal{
66
  .operate{
67
    display: flex;
68
    line-height: 30px;
69
    >div{
70
      margin-right: 10px;
71
    }
72
    .playback-btn{
73
      margin-left: 20px;
74
    }
75
  }
76
  #playback{
77
    height: 600px;
78
    margin-top: 10px;
79
  }
80
}
81
.aimap-popup-content-wrapper{
82
  background: #344979!important;
83
  .aimap-popup-content{
84
    margin: 0;
85
  }
86
}
87
.aimap-popup-tip-container{
88
  .aimap-popup-tip{
89
    background-color: #344979;
90
  }
91
} 
92
.tips-item{
93
  // width: 300px;
94
  // margin: 10px 30px;
95
  // border: 1px solid #E0E0E0;
96
  border-radius: 5px;
97
  background: #344979;
98
  .top{
99
    display: flex;
100
    border-bottom: 1px solid #99A3BA;
101
    height: 40px;
102
    line-height: 40px;
103
    padding-left: 20px;
104
    font-size: 12px;
105
    color: #ffffff;
106
    .user-pic{
107
      width: 25px;
108
      height: 25px;
109
      border-radius: 50%;
110
      background-image: url('/static/images/user.png');
111
      background-size: 100% 100%;
112
      margin: 7.5px 5px 0 0;
113
    }
114
    .alarm{
115
      color: #F5222D;
116
      background-color: #343E6B;
117
      margin: 7.5px 0 0 5px;
118
      padding: 0 5px;
119
      font-size: 8px;
120
      height: 25px;
121
      line-height: 25px;
122
    }
123
    .hand-alarm{
124
      color: #FAAD14;
125
      background-color:#495571;
126
      margin: 7.5px 0 0 5px;
127
      padding: 0 5px;
128
      font-size: 8px;
129
      height: 25px;
130
      line-height: 25px;
131
    }
132
  }
133
  .middle{
134
    padding-left: 20px;
135
    line-height: 30px;
136
    font-size: 10px;
137
    color: #ffffff;
138
    .row{
139
      display: flex;
140
      margin: 0;
141
      justify-content: space-between;
142
      >div{
143
        flex: 1;
144
        text-align: left;
145
      }
146
    }
147
  }
148
  .footer{
149
    height: 40px;
150
    border-top: 1px solid #E0E0E0;
151
    display: flex;
152
    justify-content: flex-end;
153
    button{
154
      height: 25px;
155
      line-height: 25px;
156
      margin: 7.5px 10px 0 0;
157
    }
158
  }
64 159
}

+ 151 - 7
ebc-middle-platform/src/modules/call-help/history.vue

@ -49,7 +49,7 @@
49 49
          width="120"
50 50
        >
51 51
          <template slot-scope="scope">
52
            <a href="javascript:void(0)" size="sm" @click="handleClick(scope.row)">救援回放</a>
52
            <a href="javascript:void(0)" size="sm" @click="rescuePlayback(scope.row)">救援回放</a>
53 53
            <a href="javascript:void(0)" size="sm" @click="remove(scope.$index)">删除</a>
54 54
          </template>
55 55
        </t-table-column>
@ -63,6 +63,26 @@
63 63
               @on-change="onPagerChange">
64 64
      </t-pager>
65 65
    </div>
66
    <t-modal :visibled.sync="modal" :footer-visibled="false" class="modal" title="救援回放" width="1200px">
67
      <div class="operate">
68
        <div class="label">速度:</div>
69
        <div class="input-rule">
70
          <t-select v-model="speed">
71
            <t-option value="4">4X</t-option>
72
            <t-option value="2">2X</t-option>
73
            <t-option value="1">1X</t-option>
74
            <t-option value="0.5">0.5X</t-option>
75
            <t-option value="0.25">0.25X</t-option>
76
          </t-select>
77
        </div>
78
        <div class="playback-btn">
79
          <t-button color="secondary" icon="video-outline" class="reset-btn" @click="onReset">回放</t-button>
80
        </div>
81
      </div>
82
      <div id="playback">
83
84
      </div>
85
    </t-modal>
66 86
  </div>
67 87
</template>
68 88
<script>
@ -121,24 +141,145 @@ export default {
121 141
            rescuePerson: '海事局A',
122 142
            rescueTime: '2020.7.3 11:22:16',
123 143
            rescueDuration: '10小时39分钟'
144
          },
145
          {
146
            name: '王小明',
147
            number: 'ZDBH0001',
148
            type: '落水告警',
149
            address: '113.445294°E 23.157791°N',
150
            alarmTime: '2020.7.10 08:21:43',
151
            rescuePerson: '海事局A',
152
            rescueTime: '2020.7.3 11:22:16',
153
            rescueDuration: '10小时39分钟'
154
          },
155
          {
156
            name: '王小明',
157
            number: 'ZDBH0001',
158
            type: '落水告警',
159
            address: '113.445294°E 23.157791°N',
160
            alarmTime: '2020.7.10 08:21:43',
161
            rescuePerson: '海事局A',
162
            rescueTime: '2020.7.3 11:22:16',
163
            rescueDuration: '10小时39分钟'
164
          },
165
          {
166
            name: '王小明',
167
            number: 'ZDBH0001',
168
            type: '落水告警',
169
            address: '113.445294°E 23.157791°N',
170
            alarmTime: '2020.7.10 08:21:43',
171
            rescuePerson: '海事局A',
172
            rescueTime: '2020.7.3 11:22:16',
173
            rescueDuration: '10小时39分钟'
174
          },
175
          {
176
            name: '王小明',
177
            number: 'ZDBH0001',
178
            type: '落水告警',
179
            address: '113.445294°E 23.157791°N',
180
            alarmTime: '2020.7.10 08:21:43',
181
            rescuePerson: '海事局A',
182
            rescueTime: '2020.7.3 11:22:16',
183
            rescueDuration: '10小时39分钟'
184
          },
185
          {
186
            name: '王小明',
187
            number: 'ZDBH0001',
188
            type: '落水告警',
189
            address: '113.445294°E 23.157791°N',
190
            alarmTime: '2020.7.10 08:21:43',
191
            rescuePerson: '海事局A',
192
            rescueTime: '2020.7.3 11:22:16',
193
            rescueDuration: '10小时39分钟'
124 194
          }
125 195
        ],
126 196
        pager: {
127 197
          currentPage: 1,
128 198
          size: 10,
129
          total: 0
199
          total: 100
130 200
        }
131 201
      },
132 202
      queryCondition: {
133 203
        type: '',
134 204
        alarmPerson: ''
135 205
      },
136
      rangeDate: ''
206
      rangeDate: '',
207
      modal: false,
208
      speed: '1'
137 209
    }
138 210
  },
139 211
  mounted() {
140
    this.table.data = this.table.data.concat(this.table.data)
141
    this.table.pager.total = this.table.data.length
212
    this.map = new Ai.Map('playback', {
213
      ak: 'MTYwMTEMTAwMU1UWXdNVEV3TXpRek16STVOU014TnpRdw__',
214
      center: [39.915599, 116.406568],
215
      zoom: 5
216
    })
217
    var maplayer = null
218
    maplayer = Ai.TileLayer('http://192.168.74.189:9999/tdtvector')
219
    this.map.addLayer(maplayer)
220
    var la = Ai.WMTSLayer('http://192.168.74.216:5071/gisserver/dzht:dzht/wmts')
221
    this.map.addLayer(la)
222
    var icon = Ai.Icon({
223
      // 设置图标URL路径
224
      iconUrl: '/static/images/worker(1).png',
225
      // 设置图标大小
226
      iconSize: [20, 20],
227
      // 设置点对象和图标的相对偏移量
228
      iconAnchor: [0, 0]
229
    })
230
    var point = Ai.Point([29.86089241772908, 122.09930419921876], {icon: icon})
231
    point.on('click', (e) => {
232
      console.log(e)
233
      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">' +
234
            '<div>终端编号</div>' +
235
            '<div>ZDBH0001</div>' +
236
          '</div>' +
237
          '<div class="row">' +
238
            '<div>最新定位时间</div>' +
239
            '<div>2020.08.13 08:24:32</div>' +
240
          '</div></div></div>'
241
      var popup = Ai.Popup({minWidth: 300, offset: [0, -10], autoClose: false})
242
      // 设置弹出框弹出位置
243
        .setLatLng({lat: 29.86089241772908, lng: 122.09930419921876})
244
      // 设置弹出框弹出内容
245
        .setContent(content)
246
        .openOn(this.map)
247
    })
248
    this.map.addLayer(point)
249
    point = Ai.Point([29.388158098102554, 122.45361328125], {icon: Ai.Icon({
250
      // 设置图标URL路径
251
      iconUrl: '/static/images/worker.png',
252
      // 设置图标大小
253
      iconSize: [20, 20],
254
      // 设置点对象和图标的相对偏移量
255
      iconAnchor: [0, 0]
256
    })})
257
    point.on('click', (e) => {
258
      console.log(e)
259
      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="alarm">报警人员</div></div><div class="middle"><div class="row">' +
260
            '<div>终端编号</div>' +
261
            '<div>ZDBH0001</div>' +
262
          '</div>' +
263
          '<div class="row">' +
264
            '<div>最新定位时间</div>' +
265
            '<div>2020.08.13 08:24:32</div>' +
266
          '</div></div></div>'
267
      var popup = Ai.Popup({minWidth: 300, offset: [0, -10], autoClose: false})
268
      // 设置弹出框弹出位置
269
        .setLatLng({lat: 29.388158098102554, lng: 122.45361328125})
270
      // 设置弹出框弹出内容
271
        .setContent(content)
272
        .openOn(this.map)
273
    })
274
    this.map.addLayer(point)
275
    var lineWktstr = 'LINESTRING ( 122.09930419921876 29.86089241772908,122.18582153320314 29.6913335169976,122.21878051757814 29.42494595179543,122.45361328125 29.388158098102554)'
276
    var polyline = Ai.Polyline(lineWktstr, {color: 'red'})
277
    this.map.addLayer(polyline)
278
    this.map.on('click', function(evt) {
279
      var lat = evt.latlng.lat // 点击地图时的纬度
280
      var lng = evt.latlng.lng // 点击地图时的经度
281
      console.log(lng, lat)
282
    })
142 283
  },
143 284
  methods: {
144 285
    onChange(value) {
@ -154,10 +295,13 @@ export default {
154 295
155 296
    },
156 297
    onPagerChange(page) {
157
298
      console.log(page)
158 299
    },
159 300
    onSizeChange(number) {
160
301
      console.log(number, this.table.pager.currentPage)
302
    },
303
    rescuePlayback(row) {
304
      this.modal = true
161 305
    }
162 306
  }
163 307
}

+ 1 - 1
ebc-middle-platform/src/modules/system-management/map-mark.vue

@ -164,7 +164,7 @@ export default {
164 164
  },
165 165
  mounted() {
166 166
    this.map = new Ai.Map('modalMap', {
167
      ak: 'MTYwMDkMTAwMU1UWXdNRGt4T0RnNU5UVXlNaU14TnpRdw__',
167
      ak: 'MTYwMDkMTAwMU1UWXdNRGs1T0RZeE1EZzNPU014TnpRdw__',
168 168
      center: [39.915599, 116.406568],
169 169
      zoom: 5
170 170
    })