3f535f30
杨鑫
'初始'
|
1
2
|
<template>
<div style="background-color:#f7f7f7;padding:10px 10px;">
|
c3bca151
wesley88
1
|
3
|
<div class="zhuti" v-if="onaction == '1'">
|
3f535f30
杨鑫
'初始'
|
4
|
<div style="height:58px;line-height:58px;">
|
c3bca151
wesley88
1
|
5
6
|
<div style="color:#0006"> <span>招商资源监测</span> <span style="padding:0 5px;">></span> <span
style="color:#000000e6">商铺基本信息</span></div>
|
3f535f30
杨鑫
'初始'
|
7
|
</div>
|
c3bca151
wesley88
1
|
8
|
<!-- 线上 -->
|
3f535f30
杨鑫
'初始'
|
9
10
11
|
<div>
<!-- 搜索 -->
<div class="formSearch">
|
c3bca151
wesley88
1
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<el-form :inline="true" :model="pagequery">
<el-form-item label="商铺名称" prop="shopName">
<el-input v-model="pagequery.shopName" placeholder="请输入" maxlength="50"></el-input>
</el-form-item>
<el-form-item label="所属区域" prop="belongingRegion">
<el-select v-model="pagequery.belongingRegion" clearable placeholder="请选择" style="width: 168px;margin-right: 15px">
<el-option v-for="(item,index) in regionOptions"
:key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="归属部门" prop="belongingDepartment">
<el-input v-model="pagequery.belongingDepartment" placeholder="请输入" maxlength="50"></el-input>
</el-form-item>
</el-form>
|
3f535f30
杨鑫
'初始'
|
27
28
29
30
31
32
33
|
<div>
<el-button @click="onSubmit" style="background-color: #3F9B6A;color: #fff">查询
</el-button>
<el-button @click="resetting" class="buttonHover"
style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置
</el-button>
</div>
|
3f535f30
杨鑫
'初始'
|
34
|
</div>
|
c3bca151
wesley88
1
|
35
36
37
38
|
<div style="margin-bottom: 20px;">
<el-button @click="removeonaction('2')" style="background-color: #3F9B6A;color: #fff;padding:8px 15px;"
icon="el-icon-circle-plus-outline">新增</el-button>
<!-- <el-button @click="" style="background-color: #3F9B6A;color: #fff">批量导入</el-button> -->
|
3f535f30
杨鑫
'初始'
|
39
40
|
</div>
<!-- 表格 -->
|
c3bca151
wesley88
1
|
41
42
43
|
<el-table :data="tableData" :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
<el-table-column label="序号" width="50">
|
2d4e37fb
wesley88
1
|
44
|
<template slot-scope="scope">
|
c3bca151
wesley88
1
|
45
|
{{scope.$index +1 }}
|
2d4e37fb
wesley88
1
|
46
|
</template>
|
3f535f30
杨鑫
'初始'
|
47
|
</el-table-column>
|
c3bca151
wesley88
1
|
48
49
|
<el-table-column label="商铺名称" prop="shopName" show-overflow-tooltip></el-table-column>
<el-table-column label="商铺类型" prop="publishStatus" show-overflow-tooltip>
|
2d4e37fb
wesley88
1
|
50
|
<template slot-scope="scope">
|
c3bca151
wesley88
1
|
51
|
{{scope.row.shopType=='1'?'移动铺位':scope.row.shopType=='2'?'固定铺位':'无'}}
|
2d4e37fb
wesley88
1
|
52
|
</template>
|
3f535f30
杨鑫
'初始'
|
53
|
</el-table-column>
|
c3bca151
wesley88
1
|
54
|
<el-table-column label="所属区域" prop="belongingRegion" show-overflow-tooltip>
|
2d4e37fb
wesley88
1
|
55
|
</el-table-column>
|
c3bca151
wesley88
1
|
56
57
58
|
<el-table-column prop="detailedLocation" width="180" label="详细地址" show-overflow-tooltip>
</el-table-column>
<el-table-column label="归属部门" prop="belongingDepartment" show-overflow-tooltip>
|
2d4e37fb
wesley88
1
|
59
|
<template slot-scope="scope">
|
c3bca151
wesley88
1
|
60
|
{{scope.row.belongingDepartment || '无'}}
|
2d4e37fb
wesley88
1
|
61
62
|
</template>
</el-table-column>
|
c3bca151
wesley88
1
|
63
|
<el-table-column label="负责人" prop="head" show-overflow-tooltip>
|
2d4e37fb
wesley88
1
|
64
|
<template slot-scope="scope">
|
c3bca151
wesley88
1
|
65
|
{{scope.row.head || '无'}}
|
2d4e37fb
wesley88
1
|
66
|
</template>
|
c3bca151
wesley88
1
|
67
68
69
|
</el-table-column>
<el-table-column label="发布时间" prop="createDate" > </el-table-column>
<el-table-column label="状态" prop="publishStatus" show-overflow-tooltip>
|
2d4e37fb
wesley88
1
|
70
|
<template slot-scope="scope">
|
c3bca151
wesley88
1
|
71
|
{{scope.row.publishStatus=='0'?'空置中':scope.row.publishStatus=='1'?'待审核':scope.row.publishStatus=='2'?'已发布':scope.row.publishStatus=='3'?'不通过':'-'}}
|
2d4e37fb
wesley88
1
|
72
73
|
</template>
</el-table-column>
|
c3bca151
wesley88
1
|
74
|
<el-table-column label="操作" min-width="100" fixed="right">
|
3f535f30
杨鑫
'初始'
|
75
|
<template slot-scope="scope">
|
c3bca151
wesley88
1
|
76
77
|
<div @click="details(scope.row)" class="tableBtn greens">查看</div>
<div class="tableBtn greens" v-if="scope.row.publishStatus=='0' || scope.row.publishStatus=='3'" @click="removeinfo(scope.row,'编辑')">编辑
|
3f535f30
杨鑫
'初始'
|
78
|
</div>
|
c3bca151
wesley88
1
|
79
80
81
82
83
|
<div class="tableBtn greens" v-if="scope.row.publishStatus=='0' || scope.row.publishStatus=='3'" @click="closemsg(scope.row)">删除</div>
<div class="tableBtn greens" v-if="scope.row.publishStatus=='0' || scope.row.publishStatus=='3'"
@click="opencl(scope.row,'sp')">发布</div>
<div class="tableBtn greens" v-if="scope.row.publishStatus=='2'"
@click="removeinfozz(scope.row,'0','下架')">下架</div>
|
3f535f30
杨鑫
'初始'
|
84
85
86
|
</template>
</el-table-column>
</el-table>
|
c3bca151
wesley88
1
|
87
88
89
90
91
92
|
<div style="display: flex;justify-content: space-between;" class="bom">
<div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{total}}</span> 项数据</div>
<el-pagination :current-page="pagequery.pageNumber+1" :page-sizes="[10, 20, 50, 100]" :page-size="pagequery.pageSize"
background small layout="prev, pager, next" :total="total" @size-change="handleSizeChange"
@current-change="handleCurrentChange">
</el-pagination>
|
3f535f30
杨鑫
'初始'
|
93
|
</div>
|
c3bca151
wesley88
1
|
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
|
</div>
</div>
<div class="zhuti" v-if="onaction == '2'">
<div style="height:58px;line-height:58px;">
<div style="color:#0006"> <span>商铺基本信息</span> <span style="padding:0 5px;">></span> <span
style="color:#000000e6">新增</span></div>
</div>
<div style="padding: 20px 20px 20px 0;">
<add @removeonaction="removeonaction"></add>
</div>
</div>
<div class="zhuti" v-if="onaction == '3'">
<div style="height:58px;line-height:58px;">
<div style="color:#0006"> <span>商铺基本信息</span> <span style="padding:0 5px;">></span> <span
style="color:#000000e6">查看</span></div>
</div>
<div>
<resourceCommodity :editbgid="detailsinfo" @removeonaction="removeonaction"></resourceCommodity>
</div>
</div>
<div class="zhuti" v-if="onaction == '4'">
<div style="height:58px;line-height:58px;">
<div style="color:#0006"> <span>商铺基本信息</span> <span style="padding:0 5px;">></span> <span
style="color:#000000e6">{{contractChangeReason}}</span></div>
</div>
<div style="padding: 20px 20px 20px 0;">
<add :info="detailsinfo" @removeonaction="removeonaction"></add>
|
3f535f30
杨鑫
'初始'
|
130
131
|
</div>
</div>
|
c3bca151
wesley88
1
|
132
133
134
135
136
137
138
|
<el-dialog :visible.sync="addcl" title="选择策略" width="65%" append-to-body center
:close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
<cl :resourcesId="oncetype+oninfo.id" v-if="addcl" @minSev="minSev" @mingClose="mingClose"></cl>
</el-dialog>
|
3f535f30
杨鑫
'初始'
|
139
|
</div>
|
c3bca151
wesley88
1
|
140
141
|
|
3f535f30
杨鑫
'初始'
|
142
143
144
|
</template>
<script>
|
2d4e37fb
wesley88
1
|
145
|
import {
|
c3bca151
wesley88
1
|
146
147
148
149
150
151
152
|
delList,
editList,
lvdaoduan,
getAlls
} from '@/api/information';
import add from '@/components/add/addfa'
import resourceCommodity from '@/components/resourceCommodity/index'
|
6831f623
wesley88
1
|
153
154
155
156
|
import {
fangGetAll,
fangDel,
} from '@/api/fangli'
|
c3bca151
wesley88
1
|
157
158
159
160
161
162
|
import cl from '@/components/change/cl.vue'
import {
cereResourceStrategy,
editStatus,
cereBusinessOperationadd,
} from '@/api/newly.js'
|
2d4e37fb
wesley88
1
|
163
|
export default {
|
2d4e37fb
wesley88
1
|
164
165
|
data() {
return {
|
c3bca151
wesley88
1
|
166
167
168
169
170
171
172
173
|
lvdaoList:[],
oncetype:'',
addcl:false,
oninfo:{},
multipleSelection:[],
contractChangeReason: '',
detailsinfo: {},
pagequery: {
|
6831f623
wesley88
1
|
174
175
176
|
// belongingRegion:'',
// shopName:'',
pageNumber: 1,
|
2d4e37fb
wesley88
1
|
177
|
pageSize: 10,
|
6831f623
wesley88
1
|
178
179
|
// belongingGreenwaySection:'',
// belongingDepartment:''
|
2d4e37fb
wesley88
1
|
180
|
},
|
2d4e37fb
wesley88
1
|
181
|
tableData: [],
|
c3bca151
wesley88
1
|
182
|
total: 0,
|
6831f623
wesley88
1
|
183
|
onaction: '1',
|
c3bca151
wesley88
1
|
184
|
formInline: {
|
2d4e37fb
wesley88
1
|
185
|
},
|
2d4e37fb
wesley88
1
|
186
187
|
}
},
|
c3bca151
wesley88
1
|
188
189
190
191
192
193
194
195
196
197
198
199
|
computed: {
regionOptions() {
return this.$store.state.app.regionOptions;
}
},
components: {
cl,
add,
resourceCommodity,
},
async created() {
this.getAll()
|
6831f623
wesley88
1
|
200
201
|
// const lvdao = await lvdaoduan()
// this.lvdaoList = lvdao.data
|
2d4e37fb
wesley88
1
|
202
|
},
|
2d4e37fb
wesley88
1
|
203
|
methods: {
|
c3bca151
wesley88
1
|
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
|
minSev(e) {
this.multipleSelection = e
console.error(this.multipleSelection)
let ids = []
for (let index = 0; index < this.multipleSelection.length; index++) {
ids.push(this.multipleSelection[index].id)
}
console.error(ids)
let c1 = {
resourcesId: this.oncetype+this.oninfo.id,
rentalPoliciesIds: ids,
}
console.error(c1)
cereResourceStrategy(c1).then(res => {
if (res.code == 200) {
this.addcl = false
this.$message({
message: '绑定成功',
type: 'success'
})
editStatus({
resourcesId: this.oncetype+this.oninfo.id,
publishStatus: '1'
}).then(res => {
this.onSubmit()
})
cereBusinessOperationadd({
type:'发布',
resourceId: this.oncetype+this.oninfo.id,
operator: localStorage.getItem('roleName'),
operationTime: this.gettime()
}).then(res => {
console.error(res)
})
} else {
this.$message({
message: '绑定失败',
type: 'error'
})
}
})
|
3f535f30
杨鑫
'初始'
|
245
|
},
|
c3bca151
wesley88
1
|
246
247
248
|
mingClose() {
this.multipleSelection = []
this.addcl = false
|
3f535f30
杨鑫
'初始'
|
249
|
},
|
c3bca151
wesley88
1
|
250
251
252
253
254
|
async opencl(row,e) {
this.oncetype = e
this.oninfo = row
this.multipleSelection = []
this.addcl = true
|
3f535f30
杨鑫
'初始'
|
255
|
},
|
c3bca151
wesley88
1
|
256
257
258
|
gettime() {
// 获取当前时间
let currentTime = new Date();
|
3f535f30
杨鑫
'初始'
|
259
|
|
c3bca151
wesley88
1
|
260
261
|
// 获取年份
let year = currentTime.getFullYear();
|
3f535f30
杨鑫
'初始'
|
262
|
|
c3bca151
wesley88
1
|
263
264
|
// 获取月份(注意月份是从0开始计数的,所以需要加1)
let month = currentTime.getMonth() + 1;
|
3f535f30
杨鑫
'初始'
|
265
|
|
c3bca151
wesley88
1
|
266
267
|
// 获取日期
let day = currentTime.getDate();
|
3f535f30
杨鑫
'初始'
|
268
|
|
c3bca151
wesley88
1
|
269
270
|
// 获取小时
let hours = currentTime.getHours();
|
3f535f30
杨鑫
'初始'
|
271
|
|
c3bca151
wesley88
1
|
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
// 获取分钟
let minutes = currentTime.getMinutes();
// 获取秒数
let seconds = currentTime.getSeconds();
// 获取毫秒数
let milliseconds = currentTime.getMilliseconds();
// 格式化时间为 YYYY-MM-DD
let formattedDate = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
// 格式化时间为 HH:MM:SS
let formattedTime =
`${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
// 格式化时间为 YYYY-MM-DD HH:MM:SS
let formattedDateTime = `${formattedDate} ${formattedTime}`;
return formattedDateTime
|
3f535f30
杨鑫
'初始'
|
291
|
|
2d4e37fb
wesley88
1
|
292
|
},
|
c3bca151
wesley88
1
|
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
removeinfozz(row, e, tit) {
let that = this
this.$confirm('确定要' + tit + '吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
editList({
...row,
publishStatus: e
}).then(res => {
console.error(res)
if (res.code == 200) {
this.$message({
message: tit + '成功',
type: 'success'
})
cereBusinessOperationadd({
type:tit,
resourceId: 'sp'+row.id,
operator: localStorage.getItem('roleName'),
operationTime: that.gettime()
}).then(res => {
console.error(res)
})
this.removeonaction('1')
} else {
this.$message({
message: res.msg,
type: 'error'
})
}
|
3f535f30
杨鑫
'初始'
|
326
|
|
c3bca151
wesley88
1
|
327
328
|
})
})
|
2d4e37fb
wesley88
1
|
329
|
},
|
c3bca151
wesley88
1
|
330
331
332
|
details(row) {
this.detailsinfo = row
this.onaction = '3'
|
2d4e37fb
wesley88
1
|
333
|
},
|
c3bca151
wesley88
1
|
334
335
336
337
|
removeinfo(row, e) {
this.contractChangeReason = e
this.detailsinfo = row
this.onaction = '4'
|
2d4e37fb
wesley88
1
|
338
|
},
|
c3bca151
wesley88
1
|
339
|
async getAll() {
|
6831f623
wesley88
1
|
340
|
const res = await fangGetAll(this.pagequery)
|
c3bca151
wesley88
1
|
341
342
343
344
345
346
347
|
this.tableData = res.data.content
this.total = res.data.totalElements
},
removeonaction(e) {
console.error(e)
this.onaction = e
this.pagequery.pageNumber = 0
|
2d4e37fb
wesley88
1
|
348
349
350
|
this.getAll()
},
handleCurrentChange(val) {
|
c3bca151
wesley88
1
|
351
352
|
this.pagequery.pageNumber = val - 1
this.getAll()
|
2d4e37fb
wesley88
1
|
353
354
|
},
handleSizeChange(val) {
|
c3bca151
wesley88
1
|
355
356
357
|
this.pagequery.pageSize = val
this.pagequery.pageNumber = 0
this.getAll()
|
2d4e37fb
wesley88
1
|
358
|
},
|
c3bca151
wesley88
1
|
359
360
361
362
|
// 查询按钮
async onSubmit() {
this.pagequery.pageNumber = 0
this.getAll()
|
2d4e37fb
wesley88
1
|
363
|
},
|
c3bca151
wesley88
1
|
364
|
//重置按钮
|
2d4e37fb
wesley88
1
|
365
|
resetting() {
|
c3bca151
wesley88
1
|
366
367
368
369
370
371
372
373
374
|
this.pagequery = {
belongingRegion:'',
shopName:'',
pageNumber: 0,
pageSize: 10,
belongingGreenwaySection:'',
belongingDepartment:''
},
this.getAll()
|
2d4e37fb
wesley88
1
|
375
|
},
|
c3bca151
wesley88
1
|
376
377
|
//删除
closemsg(item) {
|
2d4e37fb
wesley88
1
|
378
379
380
381
382
383
384
385
386
387
388
389
390
|
const h = this.$createElement;
this.$msgbox({
title: '消息',
message: h('p', null, [
h('span', null, '是否删除 '),
]),
showCancelButton: true,
showClose: false,
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'oe-dialog-btn',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
|
c3bca151
wesley88
1
|
391
392
|
delList({
id: item.id
|
2d4e37fb
wesley88
1
|
393
394
395
396
397
398
399
400
401
402
403
404
405
|
}).then(res => {
this.$message({
message: '删除成功',
type: 'success'
})
this.getAll()
done();
})
} else {
done();
}
}
})
|
c3bca151
wesley88
1
|
406
|
},
|
3f535f30
杨鑫
'初始'
|
407
|
}
|
3f535f30
杨鑫
'初始'
|
408
|
|
2d4e37fb
wesley88
1
|
409
|
}
|
c3bca151
wesley88
1
|
410
|
</script>
|
3f535f30
杨鑫
'初始'
|
411
|
|
c3bca151
wesley88
1
|
412
|
<style lang="scss" scoped>
|
2d4e37fb
wesley88
1
|
413
|
.formSearch {
|
3f535f30
杨鑫
'初始'
|
414
415
416
417
418
419
|
display: flex;
width: 100%;
font-size: 14px;
justify-content: space-between;
}
|
c3bca151
wesley88
1
|
420
421
422
423
|
.zhuti {
padding: 0 20px 20px 20px;
min-height: calc(100vh - 50px - 20px);
background-color: #Fff;
|
2d4e37fb
wesley88
1
|
424
|
|
2d4e37fb
wesley88
1
|
425
426
|
}
|
c3bca151
wesley88
1
|
427
428
429
430
|
.chengeXia {
border-bottom: 6px solid #3F9B6A;
padding-bottom: 4px;
color: #3F9B6A;
|
2d4e37fb
wesley88
1
|
431
432
|
}
|
c3bca151
wesley88
1
|
433
434
435
|
.tableBtn {
display: inline-block;
margin-right: 10px;
|
2d4e37fb
wesley88
1
|
436
|
cursor: pointer;
|
3f535f30
杨鑫
'初始'
|
437
438
|
}
</style>
|