jufubao-admin-library 1.1.88 → 1.1.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/pageComponents/modules/JfbProductSearch.vue +19 -1
- package/library/viewModules/viewWalkingActivity/viewWalkingActivity/components/PeopleManage.vue +1 -1
- package/library/viewModules/viewsCorporateActivities/router/activity_manage.js +13 -0
- package/library/viewModules/viewsCorporateActivities/viewsCorporateActivities/components/CommentBox.vue +7 -7
- package/library/viewModules/viewsCorporateActivities/viewsCorporateActivities/components/ContentBox.vue +3 -3
- package/library/viewModules/viewsCorporateActivities/viewsCorporateActivities/components/PeopleManage.vue +1 -1
- package/library/viewModules/viewsCorporateActivities/viewsCorporateActivities/create.vue +140 -92
- package/library/viewModules/viewsCorporateActivities/viewsCorporateActivities/list.vue +8 -5
- package/library/viewModules/viewsCorporateActivities/viewsCorporateActivities/result.vue +22 -10
- package/library/viewModules/viewsCorporateActivities/viewsCorporateActivities/sign_result.vue +323 -0
- package/library/viewModules/viewsPrize/viewsPrize/list.vue +2 -2
- package/package.json +1 -1
|
@@ -488,7 +488,25 @@ export default {
|
|
|
488
488
|
value:'jd',
|
|
489
489
|
label:'京东物流',
|
|
490
490
|
}],
|
|
491
|
-
}
|
|
491
|
+
},
|
|
492
|
+
this.projectType==='wholesale'&&{
|
|
493
|
+
label: "状态:", //label
|
|
494
|
+
ele: "xd-select-list", //package 名称
|
|
495
|
+
valueKey: "site_product_status", //form[valueKey]
|
|
496
|
+
value: [], //v-model
|
|
497
|
+
placeholder: "请选择状态",
|
|
498
|
+
multiple: false, //多选
|
|
499
|
+
list: [
|
|
500
|
+
{
|
|
501
|
+
label:'已上架',
|
|
502
|
+
value:'Y'
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
label:'已下架',
|
|
506
|
+
value:'N'
|
|
507
|
+
},
|
|
508
|
+
],
|
|
509
|
+
},
|
|
492
510
|
].filter(i => i);
|
|
493
511
|
this.searchStatus = true
|
|
494
512
|
this.renderSearchKey = Date.now()
|
package/library/viewModules/viewWalkingActivity/viewWalkingActivity/components/PeopleManage.vue
CHANGED
|
@@ -307,7 +307,7 @@ export default {
|
|
|
307
307
|
console.log(this.listValue,'listValue')
|
|
308
308
|
let params = {
|
|
309
309
|
item: {
|
|
310
|
-
action:'
|
|
310
|
+
action:'import_walking_activity_user',
|
|
311
311
|
request_params: JSON.stringify({
|
|
312
312
|
file_url: this.listValue.template.url,
|
|
313
313
|
file_name: this.listValue.template.name,
|
|
@@ -73,6 +73,19 @@ const activityManageRouter = {
|
|
|
73
73
|
// #endif
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
+
{
|
|
77
|
+
path: 'sign_result/:id',
|
|
78
|
+
name: 'ActivitySignResultList',
|
|
79
|
+
hidden:true,
|
|
80
|
+
component: () => setModuleName(import('@/viewsCorporateActivities/sign_result'), 'ActivitySignResultList'),
|
|
81
|
+
meta: {
|
|
82
|
+
title: '查看结果',
|
|
83
|
+
icon: 'xdicon_jiamengshangyonghu',
|
|
84
|
+
// #ifdef saas-admin
|
|
85
|
+
roles: [activity_manage.getActivityUserList]
|
|
86
|
+
// #endif
|
|
87
|
+
}
|
|
88
|
+
},
|
|
76
89
|
]
|
|
77
90
|
}
|
|
78
91
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
<div class="app-container-card" v-for="(item,index) in commentData['comments']" :key="index">
|
|
8
8
|
<div class="app-container-card-left">
|
|
9
|
-
<img src="" alt="">
|
|
9
|
+
<img :src="item.user_avatar" alt="">
|
|
10
10
|
</div>
|
|
11
11
|
<div class="app-container-card-right">
|
|
12
12
|
<div><div>{{item.username}}</div><div v-if="isShow"><i @click="handleShow(item.id,item.is_show,true)" v-if="item.is_show==='Y'" class="xd_admin_iconfont xdicon_chakan"></i><i @click="handleShow(item.id,item.is_show,true)" v-else class="xd_admin_iconfont xdicon_biyan"></i></div></div>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
>
|
|
25
25
|
<div class="app-container-card" v-for="(item,index) in tables" :key="index">
|
|
26
26
|
<div class="app-container-card-left">
|
|
27
|
-
<img src="" alt="">
|
|
27
|
+
<img :src="item.user_avatar" alt="">
|
|
28
28
|
</div>
|
|
29
29
|
<div class="app-container-card-right">
|
|
30
30
|
<div><div>{{item.username}}</div><div v-if="isShow"><i @click="handleShow(item.id,item.is_show,false)" v-if="item.is_show==='Y'" class="xd_admin_iconfont xdicon_chakan"></i><i @click="handleShow(item.id,item.is_show,false)" v-else class="xd_admin_iconfont xdicon_biyan"></i></div></div>
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
69
69
|
},
|
|
70
70
|
data () {
|
|
71
71
|
return {
|
|
72
|
-
|
|
72
|
+
page_token: 1, //当前页面数量
|
|
73
73
|
limit: 20, //搜索参数
|
|
74
74
|
total: 0,
|
|
75
75
|
showDialog:false,
|
|
@@ -114,10 +114,10 @@ export default {
|
|
|
114
114
|
let params = {
|
|
115
115
|
filters:{
|
|
116
116
|
activity_id:this.commentData['activity_id'],
|
|
117
|
-
work_id:this.commentData['
|
|
117
|
+
work_id:this.commentData['id'],
|
|
118
118
|
},
|
|
119
|
-
page_token: isFirst?'1':this.
|
|
120
|
-
page_size: isFirst?3:this.
|
|
119
|
+
page_token: isFirst?'1':this.page_token.toString(),
|
|
120
|
+
page_size: isFirst?3:this.limit
|
|
121
121
|
}
|
|
122
122
|
let loading = Loading.service({})
|
|
123
123
|
this.getCompanyWorkCommentList(params).then((res) => {
|
|
@@ -136,7 +136,7 @@ export default {
|
|
|
136
136
|
* @param page {Number} 访问页面页码数
|
|
137
137
|
*/
|
|
138
138
|
handlePagination(page) {
|
|
139
|
-
this.
|
|
139
|
+
this.page_token = page;
|
|
140
140
|
this.getList(false);
|
|
141
141
|
},
|
|
142
142
|
onJfbTagForReload () {
|
|
@@ -178,9 +178,9 @@ export default {
|
|
|
178
178
|
color: #666666;
|
|
179
179
|
font-size: 14px;
|
|
180
180
|
margin-top: 20px;
|
|
181
|
-
|
|
182
|
-
bottom: 20px;
|
|
183
|
-
right: 10px;
|
|
181
|
+
// position: absolute;
|
|
182
|
+
//bottom: 20px;
|
|
183
|
+
//right: 10px;
|
|
184
184
|
&>div:first-child{
|
|
185
185
|
margin-right: 10px;
|
|
186
186
|
}
|
|
@@ -307,7 +307,7 @@ export default {
|
|
|
307
307
|
let loading = Loading.service({})
|
|
308
308
|
let params = {
|
|
309
309
|
item: {
|
|
310
|
-
action:'
|
|
310
|
+
action:'import_company_activity_user',
|
|
311
311
|
request_params: JSON.stringify({
|
|
312
312
|
file_url: this.listValue.template.url,
|
|
313
313
|
file_name: this.listValue.template.name,
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
<div v-if="contentList.length">
|
|
20
20
|
<div v-for="(item,index) in contentList" :key="index" style="display:flex;width:100%">
|
|
21
21
|
<div style="width:60%">
|
|
22
|
-
<el-form-item label="标题:"
|
|
22
|
+
<el-form-item label="标题:">
|
|
23
23
|
<el-input v-model="contentList[index].title" placeholder="" style="width:60%"></el-input>
|
|
24
24
|
</el-form-item>
|
|
25
|
-
<el-form-item label="">
|
|
25
|
+
<el-form-item label=" " required>
|
|
26
26
|
<el-input v-model="contentList[index].rule" type="textarea" placeholder="" style="width:80%"></el-input>
|
|
27
27
|
</el-form-item>
|
|
28
28
|
</div>
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
status: false,
|
|
74
74
|
renderFormKey: Date.now(),
|
|
75
75
|
businessData: null,
|
|
76
|
-
|
|
76
|
+
companyData:[],
|
|
77
77
|
siteData:[],
|
|
78
78
|
form:{},
|
|
79
79
|
contentList:[],
|
|
@@ -109,16 +109,39 @@ export default {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
+
'listValue.is_all_sub_company_attend':{
|
|
113
|
+
handler(n,o){
|
|
114
|
+
if(n&&n!==o){
|
|
115
|
+
this.initForm(this.listValue)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
'listValue.activity_type':{
|
|
120
|
+
handler(n,o){
|
|
121
|
+
if(n&&n!==o){
|
|
122
|
+
this.initForm(this.listValue)
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
112
126
|
},
|
|
113
127
|
|
|
114
128
|
created () {
|
|
115
129
|
this.title = this.$route.meta.title
|
|
116
130
|
getOptions([
|
|
117
131
|
// #ifdef app-activity
|
|
118
|
-
this.getEditxSiteLists()
|
|
132
|
+
this.getEditxSiteLists(),
|
|
133
|
+
// #endif
|
|
134
|
+
// #ifdef saas-admin
|
|
135
|
+
{
|
|
136
|
+
server: 'saas-company',
|
|
137
|
+
fn: 'sub_company',
|
|
138
|
+
path: 'p1'
|
|
139
|
+
}
|
|
119
140
|
// #endif
|
|
120
141
|
]).then(res=>{
|
|
121
|
-
//
|
|
142
|
+
// #ifdef saas-admin
|
|
143
|
+
this.companyData = res[0].data.list
|
|
144
|
+
// #endif
|
|
122
145
|
// #ifdef app-activity
|
|
123
146
|
this.siteData = res[0].data.list.map((item) => {
|
|
124
147
|
return {
|
|
@@ -133,17 +156,17 @@ export default {
|
|
|
133
156
|
this.getCompanyActivityItem({id:this.id})
|
|
134
157
|
.then(res=>{
|
|
135
158
|
let info = res.data
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
159
|
+
if(res.data.activity_quota){
|
|
160
|
+
info.quota_type = 'Y'
|
|
161
|
+
}else{
|
|
162
|
+
info.quota_type = 'N'
|
|
163
|
+
}
|
|
164
|
+
if(res.data.activity_fee){
|
|
165
|
+
info.fee_type = 'no_free'
|
|
166
|
+
info.activity_fee = this.$xdHelper.divisionFloatNumber(info.activity_fee, 100)
|
|
167
|
+
}else{
|
|
168
|
+
info.fee_type = 'free'
|
|
169
|
+
}
|
|
147
170
|
if(res.data.activity_logo){
|
|
148
171
|
info.activity_logo = {
|
|
149
172
|
url:res.data.activity_logo
|
|
@@ -216,6 +239,7 @@ export default {
|
|
|
216
239
|
valueKey: 'activity_type', //form[valueKey]
|
|
217
240
|
value: params.activity_type || 'sign_up', //v-model
|
|
218
241
|
placeholder: '请选择活动类型',
|
|
242
|
+
disabled:this.id?true:false,
|
|
219
243
|
list: [{ value: 'sign_up', label: '企业报名' }, { value: 'activity', label: '企业活动' }],
|
|
220
244
|
rules: [
|
|
221
245
|
{ required: true, message: '请选择活动类型', trigger: ['blur', 'change'] },
|
|
@@ -253,6 +277,36 @@ export default {
|
|
|
253
277
|
{ required: true, message: '请选择参与设置', trigger: ['blur', 'change'] },
|
|
254
278
|
]
|
|
255
279
|
},
|
|
280
|
+
// #ifdef saas-admin
|
|
281
|
+
{
|
|
282
|
+
label: '全部企业参与:', //label
|
|
283
|
+
ele: "xd-radio",
|
|
284
|
+
valueKey: 'is_all_sub_company_attend', //form[valueKey]
|
|
285
|
+
value: params.is_all_sub_company_attend || 'Y', //v-model
|
|
286
|
+
placeholder: '请选择是否全部企业参与',
|
|
287
|
+
list: [{ value: 'Y', label: '是' }, { value: 'N', label: '否' }],
|
|
288
|
+
rules: [
|
|
289
|
+
{ required: true, message: '请选择是否全部企业参与', trigger: ['blur', 'change'] },
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
params.is_all_sub_company_attend==='N'&&{
|
|
293
|
+
label: '参与企业:',
|
|
294
|
+
ele: 'xd-select-list',
|
|
295
|
+
valueKey: 'sub_company_ids',
|
|
296
|
+
value: params.sub_company_ids||[],
|
|
297
|
+
placeholder: '请选择',
|
|
298
|
+
classNmae:'input40',
|
|
299
|
+
multiple: true,
|
|
300
|
+
list: this.companyData,
|
|
301
|
+
rules: [
|
|
302
|
+
{
|
|
303
|
+
required: true,
|
|
304
|
+
message: '请选择参与企业',
|
|
305
|
+
trigger: 'blur'
|
|
306
|
+
},
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
// #endif
|
|
256
310
|
// #ifdef app-activity
|
|
257
311
|
params.site_id&&{
|
|
258
312
|
label: "活动地址:",
|
|
@@ -377,60 +431,60 @@ export default {
|
|
|
377
431
|
{ required: true, message: "请选择活动时间" }
|
|
378
432
|
]
|
|
379
433
|
},
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
// {
|
|
434
|
+
params.activity_type==='sign_up'&&{
|
|
435
|
+
label: '报名时间:',
|
|
436
|
+
ele: 'xd-date-range',
|
|
437
|
+
valueKey: ['sign_up_start_time', 'sign_up_end_time'],
|
|
438
|
+
value: (params.sign_up_start_time && params.sign_up_end_time) ? [params.sign_up_start_time, params.sign_up_end_time] : null,
|
|
439
|
+
format: 'yyyy/MM/dd HH:mm:ss',
|
|
440
|
+
formatValue: 'timestamp',
|
|
441
|
+
placeholder: ['活动开始时间', '活动结束时间'],
|
|
442
|
+
},
|
|
443
|
+
params.activity_type==='sign_up'&&{
|
|
444
|
+
label: '活动名额:',
|
|
445
|
+
ele: "xd-radio",
|
|
446
|
+
valueKey: 'quota_type',
|
|
447
|
+
value: params.quota_type || 'N',
|
|
448
|
+
placeholder: '请选择活动名额',
|
|
449
|
+
list: [{ value: 'Y', label: '限制' }, { value: 'N', label: '不限' }],
|
|
450
|
+
rules: [
|
|
451
|
+
{ required: true, message: '请选择活动名额', trigger: ['blur', 'change'] },
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
params.activity_type==='sign_up'&¶ms.quota_type==='Y'&&{
|
|
455
|
+
label: "",
|
|
456
|
+
ele: "el-input",
|
|
457
|
+
value: params.activity_quota || '',
|
|
458
|
+
type:'number',
|
|
459
|
+
valueKey: 'activity_quota',
|
|
460
|
+
placeholder: "请输入",
|
|
461
|
+
rules: [
|
|
462
|
+
{ required: true, message: '请输入', trigger: ['blur'] },
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
params.activity_type==='sign_up'&&{
|
|
466
|
+
label: '活动费用:',
|
|
467
|
+
ele: "xd-radio",
|
|
468
|
+
valueKey: 'fee_type',
|
|
469
|
+
value: params.fee_type || 'free',
|
|
470
|
+
placeholder: '请选择活动费用',
|
|
471
|
+
list: [{ value: 'no_free', label: '收费' }, { value: 'free', label: '免费' }],
|
|
472
|
+
rules: [
|
|
473
|
+
{ required: true, message: '请选择活动费用', trigger: ['blur', 'change'] },
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
params.activity_type==='sign_up'&¶ms.fee_type==='no_free'&&{
|
|
477
|
+
label: "",
|
|
478
|
+
ele: "el-input",
|
|
479
|
+
type:'number',
|
|
480
|
+
value: params.activity_fee || '',
|
|
481
|
+
valueKey: 'activity_fee',
|
|
482
|
+
placeholder: "请输入",
|
|
483
|
+
rules: [
|
|
484
|
+
{ required: true, message: '请输入', trigger: ['blur'] },
|
|
485
|
+
]
|
|
486
|
+
},
|
|
487
|
+
// params.activity_type==='sign_up'&&{
|
|
434
488
|
// label: "活动规则:", //label
|
|
435
489
|
// ele: "xd-tinymce", //package 名称
|
|
436
490
|
// valueKey: "activity_rule", //form[valueKey]
|
|
@@ -480,17 +534,6 @@ export default {
|
|
|
480
534
|
{ required: true, message: "请输入数值" }
|
|
481
535
|
]
|
|
482
536
|
},
|
|
483
|
-
// {
|
|
484
|
-
// label: '活动状态:',
|
|
485
|
-
// ele: "xd-radio",
|
|
486
|
-
// valueKey: 'activity_status',
|
|
487
|
-
// value: params.activity_status || 'Y',
|
|
488
|
-
// placeholder: '请选择活动状态',
|
|
489
|
-
// list: [{ value: 'Y', label: '开启' }, { value: 'N', label: '禁用' }],
|
|
490
|
-
// rules: [
|
|
491
|
-
// { required: true, message: '请选择活动状态', trigger: ['blur', 'change'] },
|
|
492
|
-
// ]
|
|
493
|
-
// },
|
|
494
537
|
{
|
|
495
538
|
ele: "title",
|
|
496
539
|
label: "内容设置",
|
|
@@ -507,8 +550,8 @@ export default {
|
|
|
507
550
|
this.renderFormKey = Date.now()
|
|
508
551
|
},
|
|
509
552
|
add(item) {
|
|
510
|
-
if(!item['
|
|
511
|
-
this.$message.error('
|
|
553
|
+
if(!item['rule']){
|
|
554
|
+
this.$message.error('请输入规则')
|
|
512
555
|
return
|
|
513
556
|
}
|
|
514
557
|
// if(this.contentList.length>=10){
|
|
@@ -542,6 +585,20 @@ export default {
|
|
|
542
585
|
this.$message.error('请进行内容设置')
|
|
543
586
|
return false
|
|
544
587
|
}
|
|
588
|
+
if (this.listValue['fee_type'] === 'no_free') {
|
|
589
|
+
copyFormParams['activity_fee'] = this.$xdHelper.multiplyFloatNumber(Number(this.listValue['activity_fee']), 100)
|
|
590
|
+
}else if(this.listValue['fee_type'] === 'free'){
|
|
591
|
+
copyFormParams['activity_fee'] = 0
|
|
592
|
+
}
|
|
593
|
+
if(this.listValue['quota_type']==='N'){
|
|
594
|
+
copyFormParams['activity_quota'] = 0
|
|
595
|
+
}
|
|
596
|
+
if(!this.listValue.sign_up_end_time){
|
|
597
|
+
delete copyFormParams['sign_up_end_time']
|
|
598
|
+
}
|
|
599
|
+
if(!this.listValue.sign_up_start_time){
|
|
600
|
+
delete copyFormParams['sign_up_start_time']
|
|
601
|
+
}
|
|
545
602
|
return copyFormParams
|
|
546
603
|
},
|
|
547
604
|
/**
|
|
@@ -551,15 +608,6 @@ export default {
|
|
|
551
608
|
this.$refs['poster'].submitAll()
|
|
552
609
|
.then(res => {
|
|
553
610
|
let params = this.getParams();
|
|
554
|
-
|
|
555
|
-
// if (params['fee_type'] === 'no_free') {
|
|
556
|
-
// params['activity_fee'] = this.$xdHelper.multiplyFloatNumber(Number(params['activity_fee']), 100)
|
|
557
|
-
// }else if(params['fee_type'] === 'free'){
|
|
558
|
-
// params['activity_fee'] = 0
|
|
559
|
-
// }
|
|
560
|
-
// if(params['quota_type']==='N'){
|
|
561
|
-
// params['activity_quota'] = 0
|
|
562
|
-
// }
|
|
563
611
|
console.log(params,'ppppp')
|
|
564
612
|
// return
|
|
565
613
|
let loading = Loading.service({})
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
is-border
|
|
26
26
|
>
|
|
27
27
|
<template slot="result" slot-scope="scope">
|
|
28
|
-
<el-button style="margin:auto" type="primary" size="small" @click="$router.push(`/activity_manage/result/${scope.row.id}`)">查看</el-button>
|
|
28
|
+
<el-button v-if="scope.row.activity_type==='activity'" style="margin:auto" type="primary" size="small" @click="$router.push(`/activity_manage/result/${scope.row.id}`)">查看</el-button>
|
|
29
|
+
<el-button v-else-if="scope.row.activity_type==='sign_up'" style="margin:auto" type="primary" size="small" @click="$router.push(`/activity_manage/sign_result/${scope.row.id}`)">查看</el-button>
|
|
29
30
|
</template>
|
|
30
31
|
<template slot="activity_start_time" slot-scope="scope">
|
|
31
32
|
<div>{{scope.row.activity_start_time}}</div>
|
|
@@ -253,7 +254,9 @@ export default {
|
|
|
253
254
|
*/
|
|
254
255
|
getList() {
|
|
255
256
|
let params = {
|
|
256
|
-
|
|
257
|
+
filters:{
|
|
258
|
+
...this.searchParams,
|
|
259
|
+
},
|
|
257
260
|
page_token: this.page_size.toString(),
|
|
258
261
|
page_size: this.limit
|
|
259
262
|
};
|
|
@@ -295,12 +298,12 @@ export default {
|
|
|
295
298
|
label: "活动名称",
|
|
296
299
|
ele: "el-input",
|
|
297
300
|
value: "",
|
|
298
|
-
valueKey: "
|
|
301
|
+
valueKey: "activity_name",
|
|
299
302
|
},
|
|
300
303
|
{
|
|
301
304
|
label: '活动状态:',
|
|
302
305
|
ele: 'xd-select-list',
|
|
303
|
-
valueKey: '
|
|
306
|
+
valueKey: 'activity_status',
|
|
304
307
|
value: '',
|
|
305
308
|
placeholder: '请选择状态',
|
|
306
309
|
list: [
|
|
@@ -326,7 +329,7 @@ export default {
|
|
|
326
329
|
{
|
|
327
330
|
label: '活动来源:',
|
|
328
331
|
ele: 'xd-select-list',
|
|
329
|
-
valueKey: '
|
|
332
|
+
valueKey: 'source_from',
|
|
330
333
|
value: '',
|
|
331
334
|
placeholder: '请选择活动类型',
|
|
332
335
|
list: this.sourceFromData
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
import { getOptions } from '@/utils/options';
|
|
52
52
|
|
|
53
53
|
export default {
|
|
54
|
-
name: "
|
|
54
|
+
name: "ActivityManageResult",
|
|
55
55
|
components: {
|
|
56
56
|
XdPagination, //翻译插件
|
|
57
57
|
XdSearch, //搜查插件
|
|
@@ -82,12 +82,21 @@ export default {
|
|
|
82
82
|
id:null,
|
|
83
83
|
contentKey:'contentKey',
|
|
84
84
|
commentKey:'commentKey',
|
|
85
|
+
sortData:[],
|
|
85
86
|
}
|
|
86
87
|
},
|
|
87
88
|
|
|
88
89
|
created() {
|
|
89
90
|
this.id = this.$route.params.id
|
|
90
|
-
|
|
91
|
+
getOptions(
|
|
92
|
+
{
|
|
93
|
+
server: "saas-app-public",
|
|
94
|
+
fn: "company-work-list-rank",
|
|
95
|
+
path: "p1",
|
|
96
|
+
}).then(res=>{
|
|
97
|
+
this.sortData = res.data.list
|
|
98
|
+
this.initSearchForm();
|
|
99
|
+
})
|
|
91
100
|
},
|
|
92
101
|
methods: {
|
|
93
102
|
...mapActions('activity_manage', [
|
|
@@ -148,25 +157,28 @@ export default {
|
|
|
148
157
|
label: "用户搜索",
|
|
149
158
|
ele: "el-input",
|
|
150
159
|
value:'',
|
|
151
|
-
valueKey: '
|
|
160
|
+
valueKey: 'keyword',
|
|
152
161
|
placeholder: "请输入用户手机号/ID",
|
|
153
162
|
},
|
|
154
163
|
{
|
|
155
164
|
label: '状态搜索',
|
|
156
165
|
ele: 'xd-select-list',
|
|
157
|
-
valueKey: '
|
|
166
|
+
valueKey: 'activity_status',
|
|
158
167
|
value: '',
|
|
159
168
|
placeholder: '请选择',
|
|
160
169
|
classNmae:'input40',
|
|
161
170
|
multiple: false,
|
|
162
|
-
list: [{label:'
|
|
171
|
+
list: [{label:'启用',value:'Y'},{label:'禁用',value:'N'}],
|
|
163
172
|
},
|
|
164
173
|
{
|
|
165
|
-
label:
|
|
166
|
-
ele:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
placeholder:
|
|
174
|
+
label: '列表排序',
|
|
175
|
+
ele: 'xd-select-list',
|
|
176
|
+
valueKey: 'activity_sort',
|
|
177
|
+
value: '',
|
|
178
|
+
placeholder: '请选择',
|
|
179
|
+
classNmae:'input40',
|
|
180
|
+
multiple: false,
|
|
181
|
+
list: this.sortData,
|
|
170
182
|
},
|
|
171
183
|
];
|
|
172
184
|
},
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<el-card class="app-container__search">
|
|
4
|
+
<xd-search
|
|
5
|
+
dateFilter
|
|
6
|
+
labelWidth="100px"
|
|
7
|
+
v-if="searchForm.length > 0"
|
|
8
|
+
v-model="searchParams"
|
|
9
|
+
:timeType="true"
|
|
10
|
+
:list="searchForm"
|
|
11
|
+
@onSearch="handleSearch"
|
|
12
|
+
@onDone="getList"
|
|
13
|
+
></xd-search>
|
|
14
|
+
</el-card>
|
|
15
|
+
<el-card class="app-container__list">
|
|
16
|
+
<div slot="header" class="app-container__list-pagination">
|
|
17
|
+
<div></div>
|
|
18
|
+
<div>
|
|
19
|
+
<el-button type="primary" @click="handleExport" v-if="isExport">导出</el-button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="app-container__list-table">
|
|
23
|
+
<xd-table
|
|
24
|
+
:headers="headers"
|
|
25
|
+
:list="tables"
|
|
26
|
+
is-border
|
|
27
|
+
@onClick="handleTableClick"
|
|
28
|
+
>
|
|
29
|
+
<template slot="operate" slot-scope="scope">
|
|
30
|
+
<el-button style="margin:auto" type="primary" size="small" v-if="scope.row.is_read==='N'&&isRead" @click="handleToRead(scope.row)">标记已读</el-button>
|
|
31
|
+
<div v-else style="color:#999999;margin:auto">已读</div>
|
|
32
|
+
</template>
|
|
33
|
+
</xd-table>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="app-container__list-pagination">
|
|
36
|
+
<xd-pagination
|
|
37
|
+
:total="total"
|
|
38
|
+
:limit.sync="limit"
|
|
39
|
+
:page="page_size"
|
|
40
|
+
:auto-scroll="false"
|
|
41
|
+
@onPagination="handlePagination"
|
|
42
|
+
></xd-pagination>
|
|
43
|
+
</div>
|
|
44
|
+
</el-card>
|
|
45
|
+
<xd-dialog :show.sync="dialogExport" title="请输入文件名称" width="500px">
|
|
46
|
+
<el-form
|
|
47
|
+
@submit.native.prevent
|
|
48
|
+
:model="exportFrom"
|
|
49
|
+
:rules="exportRules"
|
|
50
|
+
ref="exportRuleForm"
|
|
51
|
+
label-width="80px">
|
|
52
|
+
<el-form-item label="文件名称" prop="name">
|
|
53
|
+
<el-input
|
|
54
|
+
@keyup.enter.native="saveExportForm"
|
|
55
|
+
v-model="exportFrom.name"
|
|
56
|
+
placeholder="请输入文件名称" />
|
|
57
|
+
</el-form-item>
|
|
58
|
+
</el-form>
|
|
59
|
+
<div slot="btn">
|
|
60
|
+
<el-button type="primary" @click="saveExportForm">确定</el-button>
|
|
61
|
+
<el-button type="default" @click="cancelExportForm">返回</el-button>
|
|
62
|
+
</div>
|
|
63
|
+
</xd-dialog>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<script>
|
|
69
|
+
import XdSearch from "@/components/XdSearch";
|
|
70
|
+
import XdPagination from "@/components/XdPagination.vue";
|
|
71
|
+
import XdTable from "@/components/XdTable";
|
|
72
|
+
import { Loading } from 'element-ui';
|
|
73
|
+
import checkPermission from "@/utils/permission";
|
|
74
|
+
import permissions from "@/constant/permissions"
|
|
75
|
+
import XdDialog from "@/components/XdDialog"
|
|
76
|
+
import {
|
|
77
|
+
mapActions,
|
|
78
|
+
mapState,
|
|
79
|
+
} from 'vuex';
|
|
80
|
+
import { getOptions } from '@/utils/options';
|
|
81
|
+
|
|
82
|
+
export default {
|
|
83
|
+
name: "ActivityManageList",
|
|
84
|
+
components: {
|
|
85
|
+
XdPagination, //翻译插件
|
|
86
|
+
XdSearch, //搜查插件
|
|
87
|
+
XdTable,
|
|
88
|
+
XdDialog
|
|
89
|
+
},
|
|
90
|
+
computed: {
|
|
91
|
+
isRead () {
|
|
92
|
+
// #ifdef saas-admin
|
|
93
|
+
return checkPermission([permissions.activity_manage.activityUseritem])
|
|
94
|
+
// #endif
|
|
95
|
+
// #ifdef app-activity
|
|
96
|
+
return true
|
|
97
|
+
// #endif
|
|
98
|
+
},
|
|
99
|
+
isExport () {
|
|
100
|
+
// #ifdef saas-admin
|
|
101
|
+
return checkPermission([permissions.activity_manage.activityUserListExport])
|
|
102
|
+
// #endif
|
|
103
|
+
// #ifdef app-activity
|
|
104
|
+
return true
|
|
105
|
+
// #endif
|
|
106
|
+
},
|
|
107
|
+
headers(){
|
|
108
|
+
return [
|
|
109
|
+
{"type": "normal", "prop": "id", "align": "center", "label": "ID"},
|
|
110
|
+
// #ifdef saas-admin
|
|
111
|
+
{"type": "normal", "prop": "sub_company_name", "align": "center", "label": "公司"},
|
|
112
|
+
{"type": "normal", "prop": "department_names", "align": "center", "width": 100, "label": "部门"},
|
|
113
|
+
// #endif
|
|
114
|
+
{"type": "normal", "prop": "user_name", "align": "center", "label": "报名人"},
|
|
115
|
+
{"type": "normal", "prop": "created_time", "align": "center", "label": "报名时间"},
|
|
116
|
+
{
|
|
117
|
+
"type": "operate","prop":'operate', "align": "center", "width": 170, "label": "操作",
|
|
118
|
+
"values": [
|
|
119
|
+
|
|
120
|
+
].filter(i=>i)
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
data() {
|
|
126
|
+
return {
|
|
127
|
+
//分页参数
|
|
128
|
+
page_size: 1, //当前页面数量
|
|
129
|
+
limit: 20, //搜索参数
|
|
130
|
+
total: 0,
|
|
131
|
+
|
|
132
|
+
//search
|
|
133
|
+
searchForm: [], //搜索区域模块表单
|
|
134
|
+
searchParams: null, //搜索参数
|
|
135
|
+
|
|
136
|
+
//列表对象
|
|
137
|
+
tables: [],
|
|
138
|
+
|
|
139
|
+
//文件名称
|
|
140
|
+
dialogExport:false,
|
|
141
|
+
exportFrom:{
|
|
142
|
+
name:'',
|
|
143
|
+
},
|
|
144
|
+
exportRules: {
|
|
145
|
+
name: [
|
|
146
|
+
{
|
|
147
|
+
required: true,
|
|
148
|
+
message: "请输入文件名称",
|
|
149
|
+
trigger: "blur",
|
|
150
|
+
},
|
|
151
|
+
{ min: 0, max: 20, message: '文件名称长度不能超过20', trigger: 'blur' }
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
created() {
|
|
158
|
+
this.initSearchForm();
|
|
159
|
+
},
|
|
160
|
+
methods: {
|
|
161
|
+
...mapActions('activity_manage', [
|
|
162
|
+
'getActivityUserList',
|
|
163
|
+
'activityUseritem'
|
|
164
|
+
]),
|
|
165
|
+
onJfbTagForReload(){
|
|
166
|
+
this.getList()
|
|
167
|
+
},
|
|
168
|
+
handleTableClick({value, row}){
|
|
169
|
+
|
|
170
|
+
},
|
|
171
|
+
getParams(){
|
|
172
|
+
let needFilter = JSON.parse(JSON.stringify(this.searchParams))
|
|
173
|
+
let timeObj = {
|
|
174
|
+
created_time_range: {
|
|
175
|
+
start_time: this.searchParams.created_time_start,
|
|
176
|
+
end_time: this.searchParams.created_time_end,
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
delete needFilter.created_time_start
|
|
180
|
+
delete needFilter.created_time_end
|
|
181
|
+
let params = {
|
|
182
|
+
filter: this.searchParams.created_time_start ? { ...needFilter, ...timeObj } : needFilter,
|
|
183
|
+
page_token: this.page_size.toString(),
|
|
184
|
+
page_size: this.limit
|
|
185
|
+
}
|
|
186
|
+
return params
|
|
187
|
+
},
|
|
188
|
+
/**
|
|
189
|
+
* @description 获取数据列表
|
|
190
|
+
*/
|
|
191
|
+
getList() {
|
|
192
|
+
let params = this.getParams()
|
|
193
|
+
let loading = Loading.service({});
|
|
194
|
+
this.getActivityUserList(params).then(res => {
|
|
195
|
+
const {list, total_size} = res.data;
|
|
196
|
+
this.tables = list.map(item=>{
|
|
197
|
+
return {
|
|
198
|
+
...item,
|
|
199
|
+
created_time: getTimeFormat(item.created_time)
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
console.log(this.tables,'this.tables')
|
|
203
|
+
this.total = total_size;
|
|
204
|
+
loading.close();
|
|
205
|
+
}).catch(err=>loading.close())
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @description 点击搜索进行搜索操作
|
|
211
|
+
* @param action 动作
|
|
212
|
+
* @param form 搜索请求参数
|
|
213
|
+
*/
|
|
214
|
+
handleSearch({ action, form }) {
|
|
215
|
+
this.page_size = 1;
|
|
216
|
+
this.getList();
|
|
217
|
+
},
|
|
218
|
+
/**
|
|
219
|
+
* @description 初始化搜索模块
|
|
220
|
+
*/
|
|
221
|
+
initSearchForm() {
|
|
222
|
+
this.searchForm = [
|
|
223
|
+
{
|
|
224
|
+
label: '报名人:',
|
|
225
|
+
ele: 'xd-remote-select',
|
|
226
|
+
valueKey: 'user_id',
|
|
227
|
+
value: [],
|
|
228
|
+
className: 'input40',
|
|
229
|
+
placeholder: `请选择报名人`,
|
|
230
|
+
multiple: false,
|
|
231
|
+
collapseTags: false,
|
|
232
|
+
remoteSearch: (query, resolve) => {
|
|
233
|
+
getOptions({
|
|
234
|
+
server: 'saas-company',
|
|
235
|
+
fn: 'staff',
|
|
236
|
+
path: 'p1',
|
|
237
|
+
params: {
|
|
238
|
+
page_token: '1',
|
|
239
|
+
page_size: '500',
|
|
240
|
+
user_name: query
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
.then(res => {
|
|
244
|
+
resolve(res.data.list)
|
|
245
|
+
})
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
label: '提交时间:', //label
|
|
250
|
+
ele: 'xd-date', //package 名称
|
|
251
|
+
valueKey: ['created_time_start', 'created_time_end'], //form[valueKey]
|
|
252
|
+
value: [], //v-model
|
|
253
|
+
format: 'yyyy/MM/dd HH:mm:ss',//时间显示格式
|
|
254
|
+
formatValue: 'timestamp', //输出时间格式
|
|
255
|
+
placeholder: ['开始时间', '结束时间'],
|
|
256
|
+
},
|
|
257
|
+
|
|
258
|
+
];
|
|
259
|
+
},
|
|
260
|
+
/**
|
|
261
|
+
* @description 翻页处理方法
|
|
262
|
+
* @param page {Number} 访问页面页码数
|
|
263
|
+
*/
|
|
264
|
+
handlePagination(page) {
|
|
265
|
+
this.page_size = page;
|
|
266
|
+
this.getList();
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
handleExport(){
|
|
270
|
+
this.dialogExport = true
|
|
271
|
+
},
|
|
272
|
+
//导出确定
|
|
273
|
+
saveExportForm(){
|
|
274
|
+
this.$refs['exportRuleForm'].validate((valid) => {
|
|
275
|
+
if (valid) {
|
|
276
|
+
let params = {
|
|
277
|
+
...this.getParams(),
|
|
278
|
+
export: 1,
|
|
279
|
+
file_ext: 'xlsx',
|
|
280
|
+
file_name: this.exportFrom.name,
|
|
281
|
+
}
|
|
282
|
+
let loading = Loading.service({})
|
|
283
|
+
this.getActivityUserList(params).then(res => {
|
|
284
|
+
console.log(res, 'asdasda')
|
|
285
|
+
this.$message.success('导出任务已经开始执行,请去任务管理查看下载状态')
|
|
286
|
+
this.exportFrom.name = ''
|
|
287
|
+
this.dialogExport = false
|
|
288
|
+
loading.close()
|
|
289
|
+
}).catch(err => {
|
|
290
|
+
console.log(err, 'err')
|
|
291
|
+
loading.close()
|
|
292
|
+
})
|
|
293
|
+
} else {
|
|
294
|
+
console.log('error submit!!');
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
},
|
|
299
|
+
//导出取消
|
|
300
|
+
cancelExportForm(){
|
|
301
|
+
this.dialogExport = false
|
|
302
|
+
this.exportFrom.name = ''
|
|
303
|
+
this.$refs['exportRuleForm'].clearValidate()
|
|
304
|
+
},
|
|
305
|
+
|
|
306
|
+
//标记已读
|
|
307
|
+
handleToRead(row){
|
|
308
|
+
this.activityUseritem({id:row.id})
|
|
309
|
+
.then(res=>{
|
|
310
|
+
this.$message.success('操作成功')
|
|
311
|
+
this.getList()
|
|
312
|
+
})
|
|
313
|
+
},
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
</script>
|
|
318
|
+
|
|
319
|
+
<style scoped lang="scss">
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
</style>
|
|
323
|
+
|
|
@@ -403,8 +403,8 @@ export default {
|
|
|
403
403
|
},
|
|
404
404
|
getParams(){
|
|
405
405
|
let copySearchParams = this.$xdHelper.cloneDeep(this.searchParams)
|
|
406
|
-
if(this.searchParams&&this.searchParams.
|
|
407
|
-
copySearchParams.op_user_id = this.searchParams.
|
|
406
|
+
if(this.searchParams&&this.searchParams.op_user_list&&this.searchParams.op_user_list.length){
|
|
407
|
+
copySearchParams.op_user_id = this.searchParams.op_user_list[0]['value']
|
|
408
408
|
}
|
|
409
409
|
let params = {
|
|
410
410
|
filters:{
|