jufubao-admin-library 1.1.28 → 1.1.29
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/viewModules/viewCardsGift/router/greeting_card.js +4 -1
- package/library/viewModules/viewCardsGift/viewCardsGift/config.vue +36 -22
- package/library/viewModules/viewCardsGift/viewCardsGift/list.vue +12 -12
- package/library/viewModules/viewsCompany/schemas/mCompany.js +13 -0
- package/library/viewModules/viewsCompany/viewsCompany/list.vue +37 -2
- package/package.json +1 -1
|
@@ -27,10 +27,14 @@
|
|
|
27
27
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch()"></el-button>
|
|
28
28
|
</div>
|
|
29
29
|
<div class="pages-left__content" v-if="leftGroupList !== null">
|
|
30
|
+
<!--#ifdef saas-admin-->
|
|
30
31
|
<div class="pages-left__content-title" v-if="leftGroupList && leftGroupList.length === 0">【<span>{{custom_group_name}}</span>】可用模版列表</div>
|
|
32
|
+
<!--#endif-->
|
|
31
33
|
<template v-for="(item,index) in leftGroupList" >
|
|
34
|
+
<!--#ifdef saas-admin-->
|
|
32
35
|
<div class="pages-left__content-title" v-if="index ===0 && item.isSelected">当前使用模版</div>
|
|
33
36
|
<div class="pages-left__content-title" v-if="index ===0 && !item.isSelected">【<span>{{custom_group_name}}</span>】可用模版列表</div>
|
|
37
|
+
<!--#endif-->
|
|
34
38
|
<div
|
|
35
39
|
class="pages-left__content-item"
|
|
36
40
|
:key="item.value"
|
|
@@ -42,7 +46,9 @@
|
|
|
42
46
|
</el-image>
|
|
43
47
|
<div>{{item.label}}</div>
|
|
44
48
|
</div>
|
|
49
|
+
<!--#ifdef saas-admin-->
|
|
45
50
|
<div class="pages-left__content-title" v-if="index === 0 && item.isSelected">【<span>{{custom_group_name}}</span>】可用模版列表</div>
|
|
51
|
+
<!--#endif-->
|
|
46
52
|
</template>
|
|
47
53
|
</div>
|
|
48
54
|
<div
|
|
@@ -63,6 +69,7 @@
|
|
|
63
69
|
<hr>
|
|
64
70
|
<div style="font-size: 30px">Detail:{{materialDetailConfig}}</div>
|
|
65
71
|
</template>
|
|
72
|
+
{{materialData}}
|
|
66
73
|
<div
|
|
67
74
|
v-if="isShowPhone"
|
|
68
75
|
v-for="(item,key) in materialData"
|
|
@@ -181,12 +188,12 @@ export default {
|
|
|
181
188
|
|
|
182
189
|
|
|
183
190
|
//自定义素材ID(SaaS后台)
|
|
184
|
-
custom_x_material_id:null,
|
|
185
|
-
custom_x_material_item: null,
|
|
186
|
-
custom_group_id: null,
|
|
187
|
-
custom_group_name:'',
|
|
188
|
-
custom_active_item: null,
|
|
189
|
-
custom_active_material_id: null
|
|
191
|
+
custom_x_material_id:null, //自定义素材对象ID
|
|
192
|
+
custom_x_material_item: null, //获取自定义素材对象
|
|
193
|
+
custom_group_id: null, //分组ID
|
|
194
|
+
custom_group_name:'', //分组名称
|
|
195
|
+
custom_active_item: null, //自定义素材所使用到原始素材对象
|
|
196
|
+
custom_active_material_id: null,//自定义素材所使用到原始素材对象ID
|
|
190
197
|
|
|
191
198
|
//search(SaaS后台)
|
|
192
199
|
is_search_show: false,
|
|
@@ -198,10 +205,13 @@ export default {
|
|
|
198
205
|
|
|
199
206
|
|
|
200
207
|
//main ---> material_cover_config/material_detail_config
|
|
201
|
-
active:''
|
|
202
|
-
activeItem: null,
|
|
208
|
+
active:'',//当前选中到素材ID
|
|
209
|
+
activeItem: null, //当前选中操作贺卡数据
|
|
203
210
|
active_material_id:null, //原素材ID切换的参数
|
|
204
|
-
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
//编辑模式下使用变量
|
|
214
|
+
mainActive:'', //编辑时候区分是封面还是详情原始快
|
|
205
215
|
materialCoverKey:{
|
|
206
216
|
material_cover_config:'materialCoverConfig',
|
|
207
217
|
material_detail_config:'materialDetailConfig'
|
|
@@ -211,12 +221,8 @@ export default {
|
|
|
211
221
|
material_detail_config:{},//{"material_image": "", "material_height": 1334, "material_status": "Y", "material_nickname": "亲爱的 {{name}}!", "material_content": "", "material_end": "{{company}}", "material_color": "#F99E15", "material_margin": { "top": 450, "right": 100, "bottom": 0, "left": 100 } }
|
|
212
222
|
},
|
|
213
223
|
material_cover:null,//封面图
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
materialCoverConfig:{},
|
|
217
|
-
|
|
218
|
-
//详情配置信息
|
|
219
|
-
materialDetailConfig:{},
|
|
224
|
+
materialCoverConfig:{}, //封面配置信息
|
|
225
|
+
materialDetailConfig:{}, //详情配置信息
|
|
220
226
|
|
|
221
227
|
//pages data
|
|
222
228
|
materialDataTimer:null,
|
|
@@ -242,8 +248,9 @@ export default {
|
|
|
242
248
|
let query = this.$route.query;
|
|
243
249
|
if(params.group_id) this.group_id = params.group_id;
|
|
244
250
|
if(params.material_id){
|
|
245
|
-
this.material_id = params.material_id;
|
|
251
|
+
this.material_id = Number(params.material_id);
|
|
246
252
|
this.active_material_id = Number(params.material_id);
|
|
253
|
+
this.active = Number(params.material_id);
|
|
247
254
|
}
|
|
248
255
|
|
|
249
256
|
//自定义素材ID
|
|
@@ -283,12 +290,13 @@ export default {
|
|
|
283
290
|
return item
|
|
284
291
|
});
|
|
285
292
|
|
|
293
|
+
// #ifdef saas-admin
|
|
286
294
|
this.search_group_list.map(item=>{
|
|
287
|
-
debugger
|
|
288
295
|
if(item.value === this.custom_group_id+''){
|
|
289
296
|
this.custom_group_name = item.label;
|
|
290
297
|
}
|
|
291
298
|
});
|
|
299
|
+
// #endif
|
|
292
300
|
|
|
293
301
|
//设置当前选中
|
|
294
302
|
if(activeItem){
|
|
@@ -325,7 +333,7 @@ export default {
|
|
|
325
333
|
}
|
|
326
334
|
this.getGreetingCardList(params)
|
|
327
335
|
.then(res=>{
|
|
328
|
-
this.handleInitLeftData(res.data.list, this.material_id);
|
|
336
|
+
this.handleInitLeftData(res.data.list, this.active || this.material_id);
|
|
329
337
|
}).catch();
|
|
330
338
|
},
|
|
331
339
|
handlePublish(){
|
|
@@ -339,6 +347,7 @@ export default {
|
|
|
339
347
|
material_detail_config:JSON.stringify(this.materialDetailConfig),
|
|
340
348
|
},
|
|
341
349
|
}
|
|
350
|
+
|
|
342
351
|
let loading = Loading.service({});
|
|
343
352
|
this.setGreetingCardBaseConfig(params)
|
|
344
353
|
.then(res=>{
|
|
@@ -473,6 +482,10 @@ export default {
|
|
|
473
482
|
.then(res=>{
|
|
474
483
|
debugger
|
|
475
484
|
this.$message({message:'操作成功!',type:"success"});
|
|
485
|
+
window['xdLocalStore'].set('xd-card-x-material-id', res.data.x_material_id || this.custom_x_material_id);
|
|
486
|
+
setTimeout(()=>{
|
|
487
|
+
this.$router.back();
|
|
488
|
+
},1500)
|
|
476
489
|
loading.close()
|
|
477
490
|
})
|
|
478
491
|
.catch(err=>{
|
|
@@ -496,7 +509,6 @@ export default {
|
|
|
496
509
|
handleChange(item, init = false){
|
|
497
510
|
if(item.value === this.active) return;
|
|
498
511
|
if(init || this.active === '') {
|
|
499
|
-
debugger
|
|
500
512
|
this.handleChangeClear();
|
|
501
513
|
this.activeItem = this.$xdHelper.cloneDeep(item);
|
|
502
514
|
this.active = item.value;
|
|
@@ -554,7 +566,7 @@ export default {
|
|
|
554
566
|
|
|
555
567
|
// #ifdef saas-admin
|
|
556
568
|
//封面数据
|
|
557
|
-
if(this.custom_x_material_item['material_cover_config']
|
|
569
|
+
if(this.custom_x_material_item && this.custom_x_material_item['material_cover_config']
|
|
558
570
|
&& item.id === this.custom_x_material_item['material_id']
|
|
559
571
|
) {
|
|
560
572
|
this.materialCoverConfig = JSON.parse(this.custom_x_material_item['material_cover_config']);
|
|
@@ -562,7 +574,7 @@ export default {
|
|
|
562
574
|
else this.materialCoverConfig = this.toJson(item['material_cover_config'],'material_cover_config');
|
|
563
575
|
|
|
564
576
|
//详情
|
|
565
|
-
if(this.custom_x_material_item['material_detail_config']
|
|
577
|
+
if(this.custom_x_material_item && this.custom_x_material_item['material_detail_config']
|
|
566
578
|
&& item.id === this.custom_x_material_item['material_id']
|
|
567
579
|
) {
|
|
568
580
|
this.materialDetailConfig = JSON.parse(this.custom_x_material_item['material_detail_config']);
|
|
@@ -780,6 +792,8 @@ export default {
|
|
|
780
792
|
height: params['key'] === 'material_detail_config'?'1334px':`450px`,
|
|
781
793
|
backgroundImage: `url(${thumb})`
|
|
782
794
|
};
|
|
795
|
+
|
|
796
|
+
|
|
783
797
|
if((this.mainActive || key)) {
|
|
784
798
|
this.$set(this.materialData, this.materialCoverMap[this.mainActive || key], params);
|
|
785
799
|
}
|
|
@@ -833,7 +847,7 @@ export default {
|
|
|
833
847
|
&__content {
|
|
834
848
|
width: 100%;
|
|
835
849
|
&-item {
|
|
836
|
-
width:
|
|
850
|
+
width: 100%;
|
|
837
851
|
padding: 5px;
|
|
838
852
|
box-sizing: border-box;
|
|
839
853
|
border-radius: 5px;
|
|
@@ -191,7 +191,7 @@ export default {
|
|
|
191
191
|
},
|
|
192
192
|
|
|
193
193
|
handleSubmit(){
|
|
194
|
-
this.$refs['form'].
|
|
194
|
+
this.$refs['form'].submitAll()
|
|
195
195
|
.then(res=>{
|
|
196
196
|
let loading = Loading.service({})
|
|
197
197
|
let form = this.$refs['form'].getAllFormData();
|
|
@@ -354,7 +354,7 @@ export default {
|
|
|
354
354
|
}
|
|
355
355
|
this.greetingCardListForm = [
|
|
356
356
|
params['id'] && {
|
|
357
|
-
label: "
|
|
357
|
+
label: "贺卡ID",
|
|
358
358
|
ele: "el-input",
|
|
359
359
|
value: params['id'],
|
|
360
360
|
valueKey: "id",
|
|
@@ -362,13 +362,14 @@ export default {
|
|
|
362
362
|
disabled: true,
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
|
-
label: "
|
|
365
|
+
label: "贺卡名称",
|
|
366
366
|
ele: "el-input",
|
|
367
367
|
value: params['material_name'] || '',
|
|
368
368
|
valueKey: "material_name",
|
|
369
369
|
className: "input80",
|
|
370
|
+
placeholder: '请输入贺卡名称',
|
|
370
371
|
rules: [
|
|
371
|
-
{ required: true, message: "
|
|
372
|
+
{ required: true, message: "请输入贺卡名称" }
|
|
372
373
|
]
|
|
373
374
|
},
|
|
374
375
|
{
|
|
@@ -378,13 +379,15 @@ export default {
|
|
|
378
379
|
type:'textarea',
|
|
379
380
|
valueKey: "material_desc",
|
|
380
381
|
className: "input80",
|
|
382
|
+
placeholder: '请输入贺卡描述',
|
|
381
383
|
},
|
|
382
384
|
{
|
|
383
|
-
label:
|
|
384
|
-
ele:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
385
|
+
label: '贺卡分组',
|
|
386
|
+
ele: 'xd-select-list',
|
|
387
|
+
valueKey: 'group_id',
|
|
388
|
+
value: params['group_id'] || this.getGroupActive().value,
|
|
389
|
+
list: this.groupList,
|
|
390
|
+
disabled: !params['id'],
|
|
388
391
|
className: "input80",
|
|
389
392
|
},
|
|
390
393
|
{
|
|
@@ -431,14 +434,11 @@ export default {
|
|
|
431
434
|
let form = this.$refs['formCard'];
|
|
432
435
|
form.submitAll()
|
|
433
436
|
.then(res=>{
|
|
434
|
-
debugger
|
|
435
437
|
let loading = Loading.service({})
|
|
436
438
|
let item = this.$xdHelper.cloneDeep(form.getAllFormData());
|
|
437
|
-
if(item['group_name']) delete item['group_name'];
|
|
438
439
|
if(item['material_cover']) {
|
|
439
440
|
item['material_cover'] = item['material_cover']['url'];
|
|
440
441
|
}
|
|
441
|
-
item['group_id'] = Number(this.activeName);
|
|
442
442
|
let params = {item:item};
|
|
443
443
|
let fn = 'addGreetingCard';
|
|
444
444
|
if(item.id) {
|
|
@@ -15,6 +15,19 @@ module.exports = {
|
|
|
15
15
|
disabled: true,
|
|
16
16
|
role: '',
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
title: '客户管理 - 获取站点所有应用',
|
|
20
|
+
mapFn: "getSaasSiteAppList",
|
|
21
|
+
isPublic: true,
|
|
22
|
+
path: '/editx/v1/platforms/all-platform-catelogs',
|
|
23
|
+
isRule: false,
|
|
24
|
+
params: {
|
|
25
|
+
site_id:['站点id', 'String', '必选'],
|
|
26
|
+
},
|
|
27
|
+
resultKey: "data",
|
|
28
|
+
disabled: true,
|
|
29
|
+
role: '',
|
|
30
|
+
},
|
|
18
31
|
{
|
|
19
32
|
title: '客户管理 - 设置',
|
|
20
33
|
mapFn: "updateSaasCompany",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
label-width="120px"
|
|
46
46
|
v-if="status"
|
|
47
47
|
:list="listForm"
|
|
48
|
+
:key="key"
|
|
48
49
|
@success="handleSuccess"
|
|
49
50
|
@onApiSuccessUrl="handleApiSuccessUrl"
|
|
50
51
|
@onGetParamsAndHeader="handleGetParamsAndHeader"
|
|
@@ -92,6 +93,11 @@ export default {
|
|
|
92
93
|
]
|
|
93
94
|
}
|
|
94
95
|
},
|
|
96
|
+
watch:{
|
|
97
|
+
'listValue.site_id'(){
|
|
98
|
+
this.initForm(this.listValue);
|
|
99
|
+
},
|
|
100
|
+
},
|
|
95
101
|
data () {
|
|
96
102
|
return {
|
|
97
103
|
//分页参数
|
|
@@ -113,6 +119,7 @@ export default {
|
|
|
113
119
|
listForm: [],
|
|
114
120
|
status: false,
|
|
115
121
|
id:null, //客户记录ID
|
|
122
|
+
key: Date.now()
|
|
116
123
|
}
|
|
117
124
|
},
|
|
118
125
|
|
|
@@ -123,7 +130,8 @@ export default {
|
|
|
123
130
|
...mapActions('mCompany', [
|
|
124
131
|
'getSaasCompanyList',
|
|
125
132
|
'getSaasSiteList',
|
|
126
|
-
'updateSaasCompany'
|
|
133
|
+
'updateSaasCompany',
|
|
134
|
+
'getSaasSiteAppList'
|
|
127
135
|
]),
|
|
128
136
|
|
|
129
137
|
//create and edit
|
|
@@ -144,7 +152,6 @@ export default {
|
|
|
144
152
|
.then(res=>{
|
|
145
153
|
let form = this.$xdHelper.cloneDeep(this.$refs['form'].getAllFormData());
|
|
146
154
|
let loading = Loading.service({});
|
|
147
|
-
debugger
|
|
148
155
|
this.updateSaasCompany({id:this.id,item:form})
|
|
149
156
|
.then(res=>{
|
|
150
157
|
loading.close();
|
|
@@ -206,6 +213,33 @@ export default {
|
|
|
206
213
|
{ required: true, message: "请选择指定站点",trigger: ['change']}
|
|
207
214
|
]
|
|
208
215
|
},
|
|
216
|
+
params['site_id'] && {
|
|
217
|
+
label: '指定站点应用',
|
|
218
|
+
ele: 'xd-remote-select-list',
|
|
219
|
+
valueKey: 'index_path',
|
|
220
|
+
value: params['index_path'] || null,
|
|
221
|
+
placeholder: '请选择指定站点应用:',
|
|
222
|
+
setting: { multiple: false,},
|
|
223
|
+
className: 'input80',
|
|
224
|
+
handleCustom:({action, data}) =>{
|
|
225
|
+
this.getSaasSiteAppList({site_id: params['site_id']})
|
|
226
|
+
.then(res=>{
|
|
227
|
+
data.cb(res.data.items.map(item=>{
|
|
228
|
+
return {
|
|
229
|
+
label: item.label,
|
|
230
|
+
value: item.route,
|
|
231
|
+
id: item.value
|
|
232
|
+
}
|
|
233
|
+
}))
|
|
234
|
+
})
|
|
235
|
+
.catch(err=>{
|
|
236
|
+
data.cb([])
|
|
237
|
+
})
|
|
238
|
+
},
|
|
239
|
+
rules: [
|
|
240
|
+
{ required: true, message: "请选择指定站点",trigger: ['change']}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
209
243
|
{
|
|
210
244
|
label: '客户状态:',
|
|
211
245
|
ele: 'xd-radio-status',
|
|
@@ -217,6 +251,7 @@ export default {
|
|
|
217
251
|
},
|
|
218
252
|
].filter(ii => ii)
|
|
219
253
|
this.status = true
|
|
254
|
+
this.key = Date.now()
|
|
220
255
|
},
|
|
221
256
|
//create and edit
|
|
222
257
|
|