|
@@ -0,0 +1,559 @@
|
|
1
|
+<template>
|
|
2
|
+ <el-tabs v-model="activeName">
|
|
3
|
+ <el-tab-pane label="基础信息" name="detail">
|
|
4
|
+ <el-form ref="form" :model="building" label-width="160px">
|
|
5
|
+ <el-form-item label="楼盘编号">
|
|
6
|
+ <el-input v-model="building.code"></el-input>
|
|
7
|
+ </el-form-item>
|
|
8
|
+ <el-form-item label="楼盘名称">
|
|
9
|
+ <el-input v-model="building.buildingName"></el-input>
|
|
10
|
+ </el-form-item>
|
|
11
|
+ <el-form-item label="别名">
|
|
12
|
+ <el-input v-model="building.name"></el-input>
|
|
13
|
+ </el-form-item>
|
|
14
|
+ <el-form-item label="均价">
|
|
15
|
+ <el-input v-model="building.price"></el-input>
|
|
16
|
+ </el-form-item>
|
|
17
|
+ <el-form-item label="开盘时间">
|
|
18
|
+ <el-date-picker
|
|
19
|
+ v-model="building.openingDate"
|
|
20
|
+ type="date"
|
|
21
|
+ placeholder="选择日期">
|
|
22
|
+ </el-date-picker>
|
|
23
|
+ </el-form-item>
|
|
24
|
+ <el-form-item label="电话">
|
|
25
|
+ <el-input v-model="building.tel"></el-input>
|
|
26
|
+ </el-form-item>
|
|
27
|
+ <el-form-item label="项目动态">
|
|
28
|
+ <el-input v-model="building.dynamic"></el-input>
|
|
29
|
+ </el-form-item>
|
|
30
|
+ <el-form-item label="物业类型">
|
|
31
|
+ <el-select v-model="buildingProperty" multiple placeholder="请选择">
|
|
32
|
+ <el-option v-for="(t,i) in propertyType" :key="i" :label="t.name" :value="t.id"></el-option>
|
|
33
|
+ </el-select>
|
|
34
|
+ </el-form-item>
|
|
35
|
+ <el-form-item label="销售状态">
|
|
36
|
+ <el-input v-model="building.marketStatus"></el-input>
|
|
37
|
+ </el-form-item>
|
|
38
|
+ <el-form-item label="标签">
|
|
39
|
+ <el-select
|
|
40
|
+ v-model="tags"
|
|
41
|
+ multiple
|
|
42
|
+ filterable
|
|
43
|
+ allow-create
|
|
44
|
+ default-first-option
|
|
45
|
+ placeholder="请输入标签">
|
|
46
|
+ </el-select>
|
|
47
|
+ </el-form-item>
|
|
48
|
+ <el-form-item label="项目主图">
|
|
49
|
+ <el-upload
|
|
50
|
+ :action="upFileUrl"
|
|
51
|
+ name='file'
|
|
52
|
+ list-type="picture-card"
|
|
53
|
+ :file-list="imgList"
|
|
54
|
+ :show-file-list="true"
|
|
55
|
+ :before-upload="beforeImgUpload"
|
|
56
|
+ :on-success="handleAvatarSuccess"
|
|
57
|
+ :on-remove="handleRemove">
|
|
58
|
+ <i class="el-icon-plus"></i>
|
|
59
|
+ </el-upload>
|
|
60
|
+ <el-dialog :visible.sync="dialogVisible">
|
|
61
|
+ <img width="100%" :src="dialogImageUrl" alt="">
|
|
62
|
+ </el-dialog>
|
|
63
|
+ </el-form-item>
|
|
64
|
+ <el-form-item label="地址图片">
|
|
65
|
+ <el-upload
|
|
66
|
+ class="avatar-uploader"
|
|
67
|
+ :action="upFileUrl"
|
|
68
|
+ name='file'
|
|
69
|
+ :show-file-list="false"
|
|
70
|
+ :before-upload="beforeImgUpload"
|
|
71
|
+ :on-success="handleMapImgSuccess">
|
|
72
|
+ <img v-if="building.mapImg" :src="building.mapImg" class="avatar">
|
|
73
|
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
74
|
+ </el-upload>
|
|
75
|
+ </el-form-item>
|
|
76
|
+ <el-form-item label="排序">
|
|
77
|
+ <el-input v-model="building.orderNo"></el-input>
|
|
78
|
+ </el-form-item>
|
|
79
|
+ <el-form-item label="优惠信息">
|
|
80
|
+ <el-input v-model="building.discount"></el-input>
|
|
81
|
+ </el-form-item>
|
|
82
|
+ <el-form-item label="首页推荐">
|
|
83
|
+ <el-radio-group v-model="building.isMain">
|
|
84
|
+ <el-radio :label="1">是</el-radio>
|
|
85
|
+ <el-radio :label="0">否</el-radio>
|
|
86
|
+ </el-radio-group>
|
|
87
|
+ </el-form-item>
|
|
88
|
+ <el-form-item label="项目备注">
|
|
89
|
+ <div id="websiteEditorElem" style="height: 400px"></div>
|
|
90
|
+ </el-form-item>
|
|
91
|
+ <el-form-item label="楼盘区域">
|
|
92
|
+ <el-input v-model="building.buildingArea"></el-input>
|
|
93
|
+ </el-form-item>
|
|
94
|
+ <el-form-item label="项目地址">
|
|
95
|
+ <el-input v-model="building.address"></el-input>
|
|
96
|
+ </el-form-item>
|
|
97
|
+ <el-form-item label="项目坐标">
|
|
98
|
+ <el-input v-model="building.coordinate" :disabled="true"></el-input>
|
|
99
|
+ </el-form-item>
|
|
100
|
+ <el-form-item label="项目地址">
|
|
101
|
+ <div class="search">
|
|
102
|
+ <el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult"></el-amap-search-box>
|
|
103
|
+ </div>
|
|
104
|
+ <div class="flex-item">
|
|
105
|
+ <div style="width: 100%;">
|
|
106
|
+ <el-amap ref="map" vid="amapDemo" :center="mapCenter" :zoom="12" :events="events" class="amap-demo">
|
|
107
|
+ <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" ></el-amap-marker>
|
|
108
|
+ </el-amap>
|
|
109
|
+ </div>
|
|
110
|
+ </div>
|
|
111
|
+ </el-form-item>
|
|
112
|
+ <el-form-item>
|
|
113
|
+ <el-button type="primary" @click="onSubmit">保存</el-button>
|
|
114
|
+ <el-button @click="onCancel">取消</el-button>
|
|
115
|
+ </el-form-item>
|
|
116
|
+ </el-form>
|
|
117
|
+ </el-tab-pane>
|
|
118
|
+ <el-tab-pane label="图片设置" name="apartment" v-if="detail.buildingId">
|
|
119
|
+ <div class="system-table-search">
|
|
120
|
+ <div class="flex-h">
|
|
121
|
+ <div class="flex-item flex-h">
|
|
122
|
+ <el-button size="mini" type="success" @click='addHx'>新增图片库</el-button>
|
|
123
|
+ </div>
|
|
124
|
+ </div>
|
|
125
|
+ </div>
|
|
126
|
+ <el-table
|
|
127
|
+ :data="aparments"
|
|
128
|
+ style="width: 100%">
|
|
129
|
+ <el-table-column
|
|
130
|
+ prop="apartmentName"
|
|
131
|
+ label="名称"
|
|
132
|
+ >
|
|
133
|
+ </el-table-column>
|
|
134
|
+ <el-table-column
|
|
135
|
+ prop="apartmentType"
|
|
136
|
+ label="类型"
|
|
137
|
+ >
|
|
138
|
+ <template slot-scope="scope">
|
|
139
|
+ <span>{{scope.row.apartmentType == 'apart'?'户型':'相册'}}</span>
|
|
140
|
+ </template>
|
|
141
|
+ </el-table-column>
|
|
142
|
+ <el-table-column
|
|
143
|
+ prop="marketStatus"
|
|
144
|
+ label="销售状态"
|
|
145
|
+ >
|
|
146
|
+ <template slot-scope="scope">
|
|
147
|
+ <span>{{getSaleTypeName(scope.row.marketStatus)}}</span>
|
|
148
|
+ </template>
|
|
149
|
+ </el-table-column>
|
|
150
|
+ <el-table-column
|
|
151
|
+ prop="remark"
|
|
152
|
+ label="备注"
|
|
153
|
+ >
|
|
154
|
+ </el-table-column>
|
|
155
|
+ <el-table-column
|
|
156
|
+ prop="createDate"
|
|
157
|
+ label="创建时间"
|
|
158
|
+ >
|
|
159
|
+ </el-table-column>
|
|
160
|
+ <el-table-column
|
|
161
|
+ fixed="right"
|
|
162
|
+ label="操作"
|
|
163
|
+ width="180">
|
|
164
|
+ <template slot-scope="scope">
|
|
165
|
+ <el-button type="text" @click="handleEdit(scope.row)" size="small">编辑</el-button>
|
|
166
|
+ <el-button @click="handleDel(scope.row)" type="text" size="small">删除</el-button>
|
|
167
|
+ </template>
|
|
168
|
+ </el-table-column>
|
|
169
|
+ </el-table>
|
|
170
|
+ <el-dialog title="图片信息" :visible.sync="showHx">
|
|
171
|
+ <el-form ref="form" :model="aparmentInfo" label-width="160px">
|
|
172
|
+ <el-form-item label="名称">
|
|
173
|
+ <el-input v-model="aparmentInfo.apartmentName"></el-input>
|
|
174
|
+ </el-form-item>
|
|
175
|
+ <el-form-item label="类型">
|
|
176
|
+ <el-select v-model="aparmentInfo.apartmentType" placeholder="请选择">
|
|
177
|
+ <el-option label="户型" value="apart"></el-option>
|
|
178
|
+ <el-option label="相册" value="photo"></el-option>
|
|
179
|
+ </el-select>
|
|
180
|
+ </el-form-item>
|
|
181
|
+ <el-form-item label="销售状态">
|
|
182
|
+ <el-select v-model="aparmentInfo.marketStatus" placeholder="请选择">
|
|
183
|
+ <el-option v-for="(type,i) in saleType" :key="i" :label="type.name" :value="type.id"></el-option>
|
|
184
|
+ </el-select>
|
|
185
|
+ </el-form-item>
|
|
186
|
+ <el-form-item label="图片">
|
|
187
|
+ <el-upload
|
|
188
|
+ :action="upFileUrl"
|
|
189
|
+ name='file'
|
|
190
|
+ list-type="picture-card"
|
|
191
|
+ :file-list="aparmentImg"
|
|
192
|
+ :show-file-list="true"
|
|
193
|
+ :before-upload="beforeImgUpload"
|
|
194
|
+ :on-success="handleAparmentSuccess"
|
|
195
|
+ :on-remove="handleAparmentRemove">
|
|
196
|
+ <i class="el-icon-plus"></i>
|
|
197
|
+ </el-upload>
|
|
198
|
+ <el-dialog :visible.sync="dialogApartVisible">
|
|
199
|
+ <img width="100%" :src="dialogApartImageUrl" alt="">
|
|
200
|
+ </el-dialog>
|
|
201
|
+ </el-form-item>
|
|
202
|
+ <el-form-item label="备注">
|
|
203
|
+ <el-input type="textarea" v-model="aparmentInfo.remark"></el-input>
|
|
204
|
+ </el-form-item>
|
|
205
|
+ <el-form-item>
|
|
206
|
+ <el-button type="primary" @click="saveAparment">保存</el-button>
|
|
207
|
+ <el-button @click="showHx = false">取消</el-button>
|
|
208
|
+ </el-form-item>
|
|
209
|
+ </el-form>
|
|
210
|
+ </el-dialog>
|
|
211
|
+ </el-tab-pane>
|
|
212
|
+ </el-tabs>
|
|
213
|
+</template>
|
|
214
|
+
|
|
215
|
+<script>
|
|
216
|
+import { createNamespacedHelpers } from 'vuex'
|
|
217
|
+import apis from '../../config/api'
|
|
218
|
+import { mapState } from 'vuex'
|
|
219
|
+import E from 'wangeditor'
|
|
220
|
+
|
|
221
|
+const { mapState: mapBuildingState, mapActions: mapBuildingActions, mapMutations: mapBuildingMutations } = createNamespacedHelpers('building')
|
|
222
|
+
|
|
223
|
+const { mapActions: mapApartmentActions } = createNamespacedHelpers('apartment')
|
|
224
|
+
|
|
225
|
+const { mapActions: mapImgActions } = createNamespacedHelpers('img')
|
|
226
|
+
|
|
227
|
+export default {
|
|
228
|
+ data () {
|
|
229
|
+ var _self = this
|
|
230
|
+ return {
|
|
231
|
+ upFileUrl: apis.file.upload.url,
|
|
232
|
+ commPrefix: '',
|
|
233
|
+ imgurl: '',
|
|
234
|
+ loadingZm: false,
|
|
235
|
+ activeName: 'detail',
|
|
236
|
+ dialogImageUrl: '',
|
|
237
|
+ dialogVisible: false,
|
|
238
|
+ dialogApartImageUrl: '',
|
|
239
|
+ dialogApartVisible: false,
|
|
240
|
+ showHx: false,
|
|
241
|
+ markers: [],
|
|
242
|
+ imgList: [],
|
|
243
|
+ tags: [],
|
|
244
|
+ buildingProperty: [],
|
|
245
|
+ aparments: [],
|
|
246
|
+ aparmentInfo: {},
|
|
247
|
+ aparmentImg: [],
|
|
248
|
+ searchOption: {
|
|
249
|
+ city: '南京',
|
|
250
|
+ citylimit: false
|
|
251
|
+ },
|
|
252
|
+ mapCenter: [118.789509, 32.019989],
|
|
253
|
+ events: {
|
|
254
|
+ click: (e) => {
|
|
255
|
+ _self.updateDetail({..._self.building, coordinate: e.lnglat.lat + ',' + e.lnglat.lng})
|
|
256
|
+ }
|
|
257
|
+ },
|
|
258
|
+ }
|
|
259
|
+ },
|
|
260
|
+ computed: {
|
|
261
|
+ ...mapBuildingState({
|
|
262
|
+ detail: x => x.detail,
|
|
263
|
+ }),
|
|
264
|
+ ...mapState({
|
|
265
|
+ dicts: x => x.dicts,
|
|
266
|
+ }),
|
|
267
|
+ building: {
|
|
268
|
+ get () {
|
|
269
|
+ return this.detail
|
|
270
|
+ },
|
|
271
|
+ set (val) {
|
|
272
|
+ return this.updateDetail(val)
|
|
273
|
+ }
|
|
274
|
+ },
|
|
275
|
+ propertyType () {
|
|
276
|
+ return (this.dicts || []).filter(x => x.type === 'propertyType')
|
|
277
|
+ },
|
|
278
|
+ saleType () {
|
|
279
|
+ return (this.dicts || []).filter(x => x.type === 'saleType')
|
|
280
|
+ }
|
|
281
|
+ },
|
|
282
|
+ methods: {
|
|
283
|
+ ...mapBuildingMutations([
|
|
284
|
+ 'updateDetail'
|
|
285
|
+ ]),
|
|
286
|
+ ...mapBuildingActions([
|
|
287
|
+ 'getDetail',
|
|
288
|
+ 'addBuilding',
|
|
289
|
+ 'editBuilding'
|
|
290
|
+ ]),
|
|
291
|
+ ...mapApartmentActions([
|
|
292
|
+ 'getApartments',
|
|
293
|
+ 'getApartmentDetail',
|
|
294
|
+ 'addApartment',
|
|
295
|
+ 'editApartment',
|
|
296
|
+ 'deleteApartment'
|
|
297
|
+ ]),
|
|
298
|
+ ...mapImgActions([
|
|
299
|
+ 'uploadImg'
|
|
300
|
+ ]),
|
|
301
|
+ getSaleTypeName (id) {
|
|
302
|
+ return ((this.dicts || []).filter(x => x.type === 'saleType' && x.id == id) [0] || {}).name
|
|
303
|
+ },
|
|
304
|
+ onCancel () {
|
|
305
|
+ this.$router.push({name: 'buildinglist'})
|
|
306
|
+ },
|
|
307
|
+ handleRemove (file, fileList) {
|
|
308
|
+ this.imgList = fileList
|
|
309
|
+ },
|
|
310
|
+ handleAparmentRemove (file, fileList) {
|
|
311
|
+ this.aparmentImg = fileList
|
|
312
|
+ },
|
|
313
|
+ onSearchResult (pois) { // 搜索地图
|
|
314
|
+ let latSum = 0
|
|
315
|
+ let lngSum = 0
|
|
316
|
+ if (pois.length > 0) {
|
|
317
|
+ pois.forEach(poi => {
|
|
318
|
+ let { lng, lat } = poi
|
|
319
|
+ lngSum += lng
|
|
320
|
+ latSum += lat
|
|
321
|
+ this.markers.push([poi.lng, poi.lat])
|
|
322
|
+ })
|
|
323
|
+ let center = {
|
|
324
|
+ lng: lngSum / pois.length,
|
|
325
|
+ lat: latSum / pois.length
|
|
326
|
+ }
|
|
327
|
+ this.mapCenter = [center.lng, center.lat]
|
|
328
|
+ }
|
|
329
|
+ },
|
|
330
|
+ beforeImgUpload (file) {
|
|
331
|
+ if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
|
|
332
|
+ this.$message.error('上传图片只能是 JPG 或 PNG 格式!')
|
|
333
|
+ return false
|
|
334
|
+ }
|
|
335
|
+ // if (file.size / 1024 > 300) {
|
|
336
|
+ // this.$message.error('图片大小不允许超过300k!')
|
|
337
|
+ // return false
|
|
338
|
+ // }
|
|
339
|
+ this.loading = this.$loading({
|
|
340
|
+ lock: true,
|
|
341
|
+ text: '上传中...',
|
|
342
|
+ spinner: 'el-icon-loading',
|
|
343
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
344
|
+ })
|
|
345
|
+
|
|
346
|
+ return true
|
|
347
|
+ },
|
|
348
|
+ handleAvatarSuccess (res) {
|
|
349
|
+ this.imgList = [...this.imgList, {
|
|
350
|
+ url: res.data
|
|
351
|
+ }]
|
|
352
|
+ this.loading.close()
|
|
353
|
+ },
|
|
354
|
+ handleMapImgSuccess(res) {
|
|
355
|
+ this.building = {...this.building, mapImg: res.data }
|
|
356
|
+ this.loading.close()
|
|
357
|
+ },
|
|
358
|
+ handleAparmentSuccess (res) {
|
|
359
|
+ this.aparmentImg = [...this.aparmentImg, {
|
|
360
|
+ url: res.data
|
|
361
|
+ }]
|
|
362
|
+ this.loading.close()
|
|
363
|
+ },
|
|
364
|
+ onSubmit () {
|
|
365
|
+ const imgs = this.imgList.map((x, i) => {
|
|
366
|
+ return {
|
|
367
|
+ imgType: 'banner',
|
|
368
|
+ url: x.url,
|
|
369
|
+ orderNo: (i + 1)
|
|
370
|
+ }
|
|
371
|
+ })
|
|
372
|
+ const tag = this.tags.map(x => {
|
|
373
|
+ return {
|
|
374
|
+ tagName: x
|
|
375
|
+ }
|
|
376
|
+ })
|
|
377
|
+ const building = {...this.building, img: imgs, propertyType: this.buildingProperty.join(','), tag}
|
|
378
|
+ if (!building.buildingId) {
|
|
379
|
+ // 新增
|
|
380
|
+ this.addBuilding({
|
|
381
|
+ onSuccess: this.onCancel,
|
|
382
|
+ detail: JSON.stringify(building)
|
|
383
|
+ })
|
|
384
|
+ } else {
|
|
385
|
+ // 修改
|
|
386
|
+ this.editBuilding({
|
|
387
|
+ onSuccess: this.onCancel,
|
|
388
|
+ detail: JSON.stringify(building)
|
|
389
|
+ })
|
|
390
|
+ }
|
|
391
|
+ },
|
|
392
|
+ FormatDate (date) {
|
|
393
|
+ return (date || '').split('T')[0] === '0001-01-01' ? '' : (date || '').split('T')[0]
|
|
394
|
+ },
|
|
395
|
+ saveAparment () {
|
|
396
|
+ const imgs = this.aparmentImg.map((x, i) => {
|
|
397
|
+ return {
|
|
398
|
+ imgType: 'aparment',
|
|
399
|
+ url: x.url,
|
|
400
|
+ orderNo: (i + 1)
|
|
401
|
+ }
|
|
402
|
+ })
|
|
403
|
+ if (!this.aparmentInfo.apartmentId) {
|
|
404
|
+ this.addApartment(JSON.stringify({
|
|
405
|
+ ...this.aparmentInfo,
|
|
406
|
+ img: imgs
|
|
407
|
+ })).then(() => {
|
|
408
|
+ this.getAparmentList()
|
|
409
|
+ this.showHx = false
|
|
410
|
+ })
|
|
411
|
+ } else {
|
|
412
|
+ this.editApartment(JSON.stringify({
|
|
413
|
+ ...this.aparmentInfo,
|
|
414
|
+ img: imgs
|
|
415
|
+ })).then(() => {
|
|
416
|
+ this.getAparmentList()
|
|
417
|
+ this.showHx = false
|
|
418
|
+ })
|
|
419
|
+ }
|
|
420
|
+ },
|
|
421
|
+ addHx () {
|
|
422
|
+ this.aparmentImg = []
|
|
423
|
+ this.aparmentInfo = {buildingId: this.building.buildingId}
|
|
424
|
+ this.showHx = true
|
|
425
|
+ },
|
|
426
|
+ getAparmentList () {
|
|
427
|
+ this.getApartments({buildingId: this.$route.query.id}).then(data => {
|
|
428
|
+ this.aparments = data
|
|
429
|
+ })
|
|
430
|
+ },
|
|
431
|
+ handleEdit (row) {
|
|
432
|
+ this.aparmentImg = []
|
|
433
|
+ this.getApartmentDetail({
|
|
434
|
+ id: row.apartmentId
|
|
435
|
+ }).then(data => {
|
|
436
|
+ console.log("...",data)
|
|
437
|
+ this.aparmentImg = data.buildingImgList.map(x => {
|
|
438
|
+ return {
|
|
439
|
+ name: x.imgId,
|
|
440
|
+ url: x.url
|
|
441
|
+ }
|
|
442
|
+ })
|
|
443
|
+ this.aparmentInfo = data
|
|
444
|
+ this.showHx = true
|
|
445
|
+ })
|
|
446
|
+ },
|
|
447
|
+ handleDel (row) {
|
|
448
|
+ this.$confirm('确认删除此数据?', '提示', {
|
|
449
|
+ confirmButtonText: '确定',
|
|
450
|
+ cancelButtonText: '取消',
|
|
451
|
+ type: 'warning'
|
|
452
|
+ }).then(() => {
|
|
453
|
+ if (this.building.status === 1) {
|
|
454
|
+ this.$message.error('当前楼盘处于发布状态,不允许删除!')
|
|
455
|
+ return false
|
|
456
|
+ }
|
|
457
|
+ this.deleteApartment({
|
|
458
|
+ id: row.apartmentId
|
|
459
|
+ }).then(() => {
|
|
460
|
+ this.getAparmentList()
|
|
461
|
+ })
|
|
462
|
+ })
|
|
463
|
+ }
|
|
464
|
+ },
|
|
465
|
+ mounted () {
|
|
466
|
+ const _that = this
|
|
467
|
+ const phoneEditor = new E('#websiteEditorElem')
|
|
468
|
+ phoneEditor.customConfig.onchange = function (html) {
|
|
469
|
+ _that.building = {..._that.building, remark: html}
|
|
470
|
+ }
|
|
471
|
+ phoneEditor.customConfig.customUploadImg = function (files, insert) {
|
|
472
|
+ _that.uploadImg(files[0]).then(data => {
|
|
473
|
+ insert(data[0])
|
|
474
|
+ })
|
|
475
|
+ }
|
|
476
|
+ phoneEditor.customConfig.menus = [
|
|
477
|
+ 'head', // 标题
|
|
478
|
+ 'bold', // 粗体
|
|
479
|
+ 'fontSize', // 字号
|
|
480
|
+ 'fontName', // 字体
|
|
481
|
+ 'italic', // 斜体
|
|
482
|
+ 'underline', // 下划线
|
|
483
|
+ 'strikeThrough', // 删除线
|
|
484
|
+ 'foreColor', // 文字颜色
|
|
485
|
+ 'backColor', // 背景颜色
|
|
486
|
+ 'justify', // 对齐方式
|
|
487
|
+ 'image', // 插入图片
|
|
488
|
+ ]
|
|
489
|
+ phoneEditor.create()
|
|
490
|
+ if ((this.$route.query.id || '') !== '') {
|
|
491
|
+ this.getAparmentList()
|
|
492
|
+ window.console.log(this.getDetail)
|
|
493
|
+ this.getDetail({id: this.$route.query.id}).then(data => {
|
|
494
|
+ this.buildingProperty = data.propertyType.split(',')
|
|
495
|
+ phoneEditor.txt.html(data.remark)
|
|
496
|
+ this.imgList = data.buildingImg.map(x => {
|
|
497
|
+ return {
|
|
498
|
+ name: x.imgId,
|
|
499
|
+ url: x.url
|
|
500
|
+ }
|
|
501
|
+ })
|
|
502
|
+ this.tags = data.buildingTag.map(x => x.tagName)
|
|
503
|
+ })
|
|
504
|
+ } else {
|
|
505
|
+ phoneEditor.txt.html('')
|
|
506
|
+ }
|
|
507
|
+ }
|
|
508
|
+}
|
|
509
|
+</script>
|
|
510
|
+
|
|
511
|
+<style lang="scss">
|
|
512
|
+.header{
|
|
513
|
+ width: 50px;
|
|
514
|
+ height: 50px;
|
|
515
|
+ img{
|
|
516
|
+ width: 100%;
|
|
517
|
+ height: 100%;
|
|
518
|
+ }
|
|
519
|
+}
|
|
520
|
+.avatar-uploader .el-upload {
|
|
521
|
+ border: 1px dashed #d9d9d9;
|
|
522
|
+ border-radius: 6px;
|
|
523
|
+ cursor: pointer;
|
|
524
|
+ position: relative;
|
|
525
|
+ overflow: hidden;
|
|
526
|
+}
|
|
527
|
+.avatar-uploader .el-upload:hover {
|
|
528
|
+ border-color: #409EFF;
|
|
529
|
+}
|
|
530
|
+.avatar-uploader-icon {
|
|
531
|
+ font-size: 28px;
|
|
532
|
+ color: #8c939d;
|
|
533
|
+ width: 178px;
|
|
534
|
+ height: 178px;
|
|
535
|
+ line-height: 178px;
|
|
536
|
+ text-align: center;
|
|
537
|
+}
|
|
538
|
+.avatar {
|
|
539
|
+ width: 178px;
|
|
540
|
+ height: 178px;
|
|
541
|
+ display: block;
|
|
542
|
+}
|
|
543
|
+
|
|
544
|
+.flex-item .amap-demo{
|
|
545
|
+ height: 300px;
|
|
546
|
+}
|
|
547
|
+
|
|
548
|
+.el-select{
|
|
549
|
+ width: 100% !important;
|
|
550
|
+}
|
|
551
|
+
|
|
552
|
+.el-select-dropdown{
|
|
553
|
+ z-index: 10003 !important;
|
|
554
|
+}
|
|
555
|
+
|
|
556
|
+.el-date-picker{
|
|
557
|
+ z-index: 10002 !important;
|
|
558
|
+}
|
|
559
|
+</style>
|