派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-30 0110b78419d98e114c59fa9fb6f69663fbdc3c98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<template>
  <div>
    <el-scrollbar >
    <div class="disposal-event">
<!--      <el-collapse v-model="activeNames" @change="handleChange">-->
<!--        <el-collapse-item title="事件基本信息" name="1">-->
          <div>
            <h4 class="sub-title ">事件基本信息</h4>
            <div :model="form">
              <el-row>
                <el-col class="info-label" :span="6">事件名称:</el-col>
                <el-col class="info-text" :span="18">{{ form.nameOfEvent }}</el-col>
              </el-row>
              <el-row>
                <el-col class="info-label" :span="6">
                  事件位置:
                </el-col>
                <el-col class="info-text" :span="18">
                  <label>{{ form.eventLocation }}</label>
                </el-col>
              </el-row>
              <el-row>
                <el-col class="info-label" :span="6">
                  位置描述:
                </el-col>
                <el-col class="info-text" :span="18">
                  <label>{{ form.positionDesc }}</label>
                </el-col>
              </el-row>
              <el-row>
                <el-col class="info-label" :span="6">
                  事件单位:
                </el-col>
                <el-col class="info-text" :span="18">
                  {{ form.incidentUnit }}
                </el-col>
              </el-row>
              <el-row>
                <el-col class="info-label" :span="6">
                  事发时间:
                </el-col>
                <el-col class="info-text" :span="18">
                  {{ form.atTime }}
                </el-col>
              </el-row>
              <el-row>
                <el-col class="info-label" :span="6">事件描述:</el-col>
                <el-col class="info-text" :span="18">{{ form.eventDesc }}</el-col>
              </el-row>
              <el-row>
                <el-col class="info-label"  :span="6">附件:</el-col>
                <el-col class="info-text" :span="18"><a class="link-btn" href="javascript:">附件</a>
                  &nbsp;&nbsp;&nbsp;&nbsp;
                  <a class="link-btn" href="javascript:">附件</a>
                </el-col>
              </el-row>
            </div>
          </div>
<!--        </el-collapse-item>-->
<!--        <el-collapse-item title="预案匹配" name="2">-->
          <div>
<!--            <h3 class="sub-title">预案匹配</h3>-->
            <el-table :data="tableData" style="width: 100%">
              <el-table-column prop="name" label="预案名称"></el-table-column>
              <el-table-column prop="define" label="预案定义"></el-table-column>
              <el-table-column prop="hierarchy" label="预案层级"></el-table-column>
              <el-table-column prop="classification" label="预案分类"></el-table-column>
              <el-table-column label="附件">
                <template>
                  <a class="link-btn" href="javascript:">预案</a>
                </template>
              </el-table-column>
            </el-table>
          </div>
<!--        </el-collapse-item>-->
<!--        <el-collapse-item title="环境分析报告" name="3">-->
          <div>
            <h3 class="sub-title">环境分析报告</h3>
            <el-table :data="envTableData" style="width: 100%">
              <el-table-column prop="no" label="序号"></el-table-column>
              <el-table-column prop="radius" label="查询半径"></el-table-column>
              <el-table-column prop="reporterTime" label="生成报告时间"></el-table-column>
              <el-table-column prop="classification" label="操作">
                <template slot-scope="scope" >
                  <el-button class="link-btn" @click="handleClickView(scope.row)" type="text" size="small">查看</el-button>
                  <el-button class="link-btn" @click="handleClickDownload(scope.row)" type="text" size="small">下载</el-button>
                </template>
              </el-table-column>
            </el-table>
          </div>
<!--        </el-collapse-item>-->
<!--      </el-collapse>-->
 
    </div>
    </el-scrollbar>
    <div class="event-management">
      <el-button type="primary" size="mini" @click="mapClick">地图点选</el-button>
      <el-select v-model="radius.value" placeholder="请选择" size="mini" class="map-input">
        <el-option v-for="(item,index) in radius.options" :key="index" :label="item.label" :value="item.value"></el-option>
      </el-select>
      <el-button type="primary" size="mini" @click="eventHanding">开始分析</el-button>
      <el-button type="primary" size="mini" @click="toManagement">事件管理</el-button>
      <!--            <el-button size="mini">关闭</el-button>-->
    </div>
  </div>
 
</template>
 
<script>
 
import eventBus from '../../../eventBus'
import BufferQuery from '@components/base-page/enterprise-emergency/event-handling/BufferQuery'
export default {
  name: 'DisposalEvent',
  data () {
    return {
      bufferQuery: null,
      activeNames: ['1'],
      radius: {
        value: 0.1,
        options: [{ label: '500m', value: 0.5 }, { label: '1km', value: 1 }, { label: '2km', value: 2 }, { label: '5km', value: 5 }, { label: '10km', value: 10 }]
      },
      form: {
        nameOfEvent: '***************事件',
        eventLocation: '**********装置',
        positionDesc: '**********装置',
        incidentUnit: '**********部门',
        atTime: '2021年5月24日 10:27',
        eventDesc: '事件描述事件描述事件描述事件描述'
      },
      tableData: [
        {
          name: '预案A',
          define: '综合预案',
          hierarchy: '二级单位',
          classification: '环保'
        },
        {
          name: '预案B',
          define: '专项预案',
          hierarchy: '直属企业',
          classification: '环保'
        },
        {
          name: '预案C',
          define: '现场处置预案',
          hierarchy: '基层单位',
          classification: '生产'
        },
        {
          name: '预案D',
          define: '现场处置预案',
          hierarchy: '基层单位',
          classification: '生产'
        },
        {
          name: '预案E',
          define: '现场处置预案',
          hierarchy: '基层单位',
          classification: '生产'
        }
      ],
      envTableData: [
        {
          no: '1',
          radius: '500m',
          reporterTime: '2021-6-1 18:00:00',
          data: [],
          downloadUrl: ''
        },
        {
          no: '2',
          radius: '1km',
          reporterTime: '2021-6-1 18:00:00',
          data: [],
          downloadUrl: ''
        }
 
      ]
    }
  },
  mounted () {
    this.bufferQuery = new BufferQuery(window.map, window.L)
    this.bufferQuery.initLayers()
  },
  methods: {
    // 开始分析
    eventHanding () {
      eventBus.$emit('event-handling', {})
    },
    handleClickView (item) {
      console.log(item)
    },
    handleClickDownload (item) {
      console.log(item)
    },
    handleChange (val) {
      console.log(val)
    },
    mapClick () {
      window.map.once('click', (e) => {
        console.log(e)
        // [-75.343, 39.984];
 
        // var circle = turf.circle(center, radius, options)
        // eslint-disable-next-line no-unreachable
        this.bufferQuery.radius = this.radius.value
        const lat = 32.26431369781494
        const lng = 118.79283785820007
        // this.bufferQuery.bufferQuery(e.latlng.lng, e.latlng.lat)
        this.bufferQuery.bufferQuery(lng, lat)
      })
    },
    toManagement () {
 
    }
  }
}
</script>
 
<style lang="less" scoped>
.disposal-event {
  padding: 5px;
height: 400px;
  .fixed-width {
    width: 3.2459893rem;
    min-width: 3.2459893rem;
  }
 
  /deep/ .el-form-item {
    margin: 5px 0;
  }
 
  /deep/ .el-form-item__label {
    color: @color;
    font-size: 0.08rem;
  }
 
  .sub-title {
 
    //color: @color-title;
    padding: 5px;
    font-size: 16px;
  }
 
  .link-btn {
    color: @color-highlight;
  }
 
  .info-label {
    text-align: right;
  }
 
  .info-text {
    text-align: left;
  }
}
.event-management {
  text-align: right;
  margin: 15px;
}
</style>