Bladeren bron

更新展现方式和人员定位页面

liuchang 4 jaren geleden
bovenliggende
commit
0115602832

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

@ -11,7 +11,7 @@
11 11
export default {
12 12
  primaryColor: '#147BD1', // primary color of ant design
13 13
  navTheme: 'dark', // theme for nav menu
14
  layout: 'sidemenu',
14
  layout: 'topmenu',
15 15
  sidebarOpen: true,
16 16
  storageOptions: {
17 17
    namespace: 'pro__', // key prefix

+ 35 - 3
ebc-middle-platform/src/modules/orientation/orientation.scss

@ -1,5 +1,6 @@
1 1
.orientation-container{
2 2
    width: 92.5%;
3
    height: 88%;
3 4
    margin: 10px;
4 5
    margin-left: 40px;
5 6
    margin-right: 40px;
@ -8,16 +9,47 @@
8 9
      width: 50%;
9 10
      margin-bottom: 10px;
10 11
    }
12
    .oparate-btn{
13
      position: absolute;
14
      float: left;
15
      margin-top: -450px;
16
      z-index: 10;
17
    }
11 18
}
12 19
13 20
.demo__slipbox .slipbox__header{
14 21
    text-align: left;
15
    padding: 16px;
22
    padding:0px;
23
    height: 0px;
16 24
  }
17 25
  .demo__slipbox .slipbox__header span{
18 26
    margin-left: 15px;
19 27
  }
20 28
  .demo__slipbox .slipbox__body{
21
    padding: 20px 20px 100px;
22 29
    border-top: 1px solid #ccc;
23
  }
30
  }
31
  .span_left{display:-moz-inline-box; display:inline-block; width:150px;}
32
  .min_font{font-size: 12px;}
33
34
  .selectedCss{
35
   border-color: #19bb20;
36
   border-width: 2px;
37
}
38
.liCss{
39
  border-style:solid;
40
  border-radius:5px;
41
 
42
  margin-top: 10px;
43
  margin-bottom: 10px;
44
  padding: 10px;
45
46
}
47
  .normalCss{
48
    border-color: rgba(141, 138, 138, 0.63);
49
    border-width:0.5px;
50
  }
51
  .moveCss{
52
    border-color: #19bb20;
53
54
  }
55
  

+ 252 - 73
ebc-middle-platform/src/modules/orientation/orientation.vue

@ -17,120 +17,299 @@
17 17
          ></t-input>
18 18
        </t-col>
19 19
        <t-col>
20
          <t-button color="info" icon="delete-outline">轨迹</t-button>
20
          <t-button color="info" icon="map-marker">轨迹</t-button>
21 21
        </t-col>
22 22
        <t-col></t-col>
23 23
      </t-row>
24 24
    </div>
25
    <div id="div1">人员定位</div>
25
    <div id="div1" style="height:100%">人员定位</div>
26 26
    <div>
27
      <t-slipbox :visibled.sync="visible" :styles="styls" direction="left" class="demo__slipbox" >
27
      <t-slipbox
28
        :visibled.sync="visible"
29
        :styles="styls"
30
        :shadow="shadow"
31
        direction="left"
32
        class="demo__slipbox"
33
      >
28 34
        <template slot="header">
29
          <t-button
30
            type="outline-secondary"
31
            size="sm"
32
            icon="format-align-left"
33
            @click.native="hideSlip"
34
          ></t-button>
35
          <span>自定义头部</span>
35
          <div class="slipbox__header"></div>
36 36
        </template>
37 37
        <template>
38
          <t-form :model="formItem">
39
            <t-form-item label="输入框">
40
              <t-input v-model="formItem.input" placeholder="请输入"></t-input>
41
            </t-form-item>
42
            <t-form-item label="选择器">
43
              <t-select v-model="formItem.select" placeholder="请选择">
44
                <t-option value="beijing">北京市</t-option>
45
                <t-option value="shanghai">上海市</t-option>
46
                <t-option value="shenzhen">深圳市</t-option>
47
              </t-select>
48
            </t-form-item>
49
            <t-form-item label="日期控件">
50
              <div class="row">
51
                <div class="col-12">
52
                  <t-form-item>
53
                    <t-date-picker
54
                      v-model="formItem.rangeDate"
55
                      type="dateTimeRange"
56
                      placeholder="请选择日期时间"
57
                    ></t-date-picker>
58
                  </t-form-item>
59
                </div>
60
                <div class="col-12">
61
                  <t-form-item>
62
                    <t-date-picker v-model="formItem.singleYearVal" type="year" placeholder="请选择年份"></t-date-picker>
63
                  </t-form-item>
64
                </div>
65
              </div>
66
            </t-form-item>
67
            <t-form-item label="性别" prop="gender">
68
              <t-radio-group v-model="formItem.gender">
69
                <t-radio label="male">男</t-radio>
70
                <t-radio label="female">女</t-radio>
71
              </t-radio-group>
72
            </t-form-item>
73
            <t-form-item label="爱好" prop="interest">
74
              <t-checkbox-group v-model="formItem.interest">
75
                <t-checkbox label="吃饭"></t-checkbox>
76
                <t-checkbox label="睡觉"></t-checkbox>
77
                <t-checkbox label="跑步"></t-checkbox>
78
                <t-checkbox label="看电影"></t-checkbox>
79
              </t-checkbox-group>
80
            </t-form-item>
81
            <t-form-item>
82
              <t-button type="primary">提交</t-button>
83
              <t-button class="ml-2">取消</t-button>
84
            </t-form-item>
85
          </t-form>
38
          <t-tabs>
39
            <t-tab-panel label="全部" panel-id="tab-1">
40
              <t-scroll-bar style="height:550px;" :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:550px;" :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">
118
              <t-scroll-bar style="height:550px;" :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:550px;" :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>
86 196
        </template>
87 197
      </t-slipbox>
88
      <div class="oparate__btn--group">
89
        <t-button type="primary" @click.native="showSlip">点击显示滑出块</t-button>
90
        <small>(从右侧出现)</small>
91
      </div>
198
    </div>
199
    <div class="oparate-btn">
200
      <t-button v-if="visible" color="info" icon="left-circle-outline" @click.native="hideSlip"></t-button>
201
      <t-button v-else color="info" icon="right-circle-outline" @click.native="showSlip"></t-button>
92 202
    </div>
93 203
  </div>
94 204
</template>
95 205
96 206
<script>
97 207
import "./orientation.scss";
208
import { filter } from "lodash";
98 209
export default {
99 210
  data() {
100 211
    return {
101 212
      map: null,
102 213
      visible: true,
103 214
      shadow: false,
104
      styls: { width: "400px", height:"80%",margin:"80px 0 0 0",},
105
      formItem: {
106
        input: "",
107
        select: "",
108
        rangeDate: [],
109
        singleYearVal: "",
110
        interest: [],
111
        gender: "",
112
      },
215
      styls: { width: "400px", height: "600px", margin: "120px 0 0 75px" },
216
      clickActiveName: "",
217
      moveActiveName: "",
218
      dataList: [
219
        {
220
          name: "王小明",
221
          number: "ZDBH0001",
222
          type: "落水告警",
223
          address: "113.445294°E 23.157791°N",
224
          alarmTime: "2020.7.10 08:21:43",
225
          newMarkerTime: "2020.7.10 08:21:43",
226
          rescuePerson: "海事局A",
227
          rescueTime: "2020.7.3 11:22:16",
228
          rescueDuration: "10小时39分钟",
229
        },
230
        {
231
          name: "王小明1",
232
          number: "ZDBH0002",
233
          type: "正常",
234
          address: "113.445294°E 23.157791°N",
235
          alarmTime: "2020.7.10 08:21:43",
236
          newMarkerTime: "2020.7.10 08:21:43",
237
          rescuePerson: "海事局A",
238
          rescueTime: "2020.7.3 11:22:16",
239
          rescueDuration: "10小时39分钟",
240
        },
241
        {
242
          name: "王小明2",
243
          number: "ZDBH0003",
244
          type: "正常",
245
          address: "113.445294°E 23.157791°N",
246
          alarmTime: "2020.7.10 08:21:43",
247
          newMarkerTime: "2020.7.10 08:21:43",
248
          rescuePerson: "海事局A",
249
          rescueTime: "2020.7.3 11:22:16",
250
          rescueDuration: "10小时39分钟",
251
        },
252
        {
253
          name: "王小明3",
254
          number: "ZDBH0004",
255
          type: "离线",
256
          address: "113.445294°E 23.157791°N",
257
          alarmTime: "2020.7.10 08:21:43",
258
          newMarkerTime: "2020.7.10 08:21:43",
259
          rescuePerson: "海事局A",
260
          rescueTime: "2020.7.3 11:22:16",
261
          rescueDuration: "10小时39分钟",
262
        },
263
        {
264
          name: "王小明4",
265
          number: "ZDBH0005",
266
          type: "落水告警",
267
          address: "113.445294°E 23.157791°N",
268
          alarmTime: "2020.7.10 08:21:43",
269
          newMarkerTime: "2020.7.10 08:21:43",
270
          rescuePerson: "海事局A",
271
          rescueTime: "2020.7.3 11:22:16",
272
          rescueDuration: "10小时39分钟",
273
        },
274
      ],
113 275
    };
114 276
  },
277
  computed: {
278
    normalData: function () {
279
      return filter(this.dataList, function(o){return o.type=="正常"});
280
    },
281
    alertData: function () {
282
      return filter(this.dataList,function(o){return o.type=="落水告警"});
283
    },
284
    offlineData: function () {
285
      return filter(this.dataList,function(o){return o.type=="离线"});
286
    },
287
  },
115 288
  mounted() {
116 289
    this.initMap("");
117 290
  },
118 291
  methods: {
119 292
    initMap(value) {
120 293
      this.map = new Ai.Map("div1", {
121
        ak: "MTYwMDcMTAwMU1UWXdNRGMxTmpnME1USXpOU014TnpRdw__",
294
        ak: "MTYwMDgMTAwMU1UWXdNRGd5T1RZMk1UZzVPQ014TnpRdw__",
122 295
      });
123 296
      var maplayer = null;
124 297
      maplayer = Ai.TileLayer("http://192.168.74.189:9999/tdtimg");
125 298
      this.map.addLayer(maplayer);
126 299
      this.map.setView([39.915599, 116.406568], 5); //地图定位
127 300
    },
128
     showSlip() {
301
    showSlip() {
129 302
      this.visible = true;
130 303
    },
131 304
    hideSlip() {
132 305
      this.visible = false;
133 306
    },
307
    changeColor(number) {
308
      this.clickActiveName = number;
309
    },
310
    changeMoveColor(number) {
311
      this.moveActiveName = number;
312
    },
134 313
  },
135 314
};
136 315
</script>

+ 1 - 1
ebc-middle-platform/static/conf/defaultConfig.js

@ -11,7 +11,7 @@
11 11
const APP_DEFAULT_CONFIG = {
12 12
  primaryColor: '#147BD1', // primary color of ant design
13 13
  navTheme: 'dark', // theme for nav menu
14
  layout: 'sidemenu',
14
  layout: 'topmenu',
15 15
  sidebarOpen: true,
16 16
  fixedHeader: false,
17 17
  scrollHideHeader: false,