jufubao-movie 1.0.36-beta1 → 1.0.36-beta3

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.
@@ -1,4 +1,8 @@
1
1
  'use strict';
2
+ function checkValue(value, dValue = 0){
3
+ if(value === undefined || value === '' || value === null) return dValue;
4
+ return Number(value || 0);
5
+ }
2
6
 
3
7
  /**
4
8
  * @description 当表单组件中有联动操作时候,使用方法进行返回
@@ -6,52 +10,546 @@
6
10
  export default {
7
11
  style: [],
8
12
  content: (data) => {
13
+ let titleHeight = 60;
14
+ let content = 362;
15
+ let titlePadding = checkValue(data.titleMargin?data.titleMargin.top:'', 20) + checkValue(data.titleMargin?data.titleMargin.bottom:'', 20);
16
+ let contentPadding = checkValue(data.contMargin?data.contMargin.top:'', 20) + checkValue(data.contMargin?data.contMargin.bottom:'', 20);;
17
+ let outSpacing = 20 * 3
18
+ if(data['outSpacing']) outSpacing = Number(data['outSpacing']) * 3;
19
+ let imgHeight = titleHeight + content + contentPadding + titlePadding + outSpacing;
20
+ if(data.isTitleBorder) imgHeight = imgHeight + 4;
21
+ if(data.isContBorder) imgHeight = imgHeight + 4;
22
+
9
23
  return [
10
24
  {
11
25
  label: '背景颜色:',
12
26
  ele: 'xd-color',
13
- valueKey: 'bgcolor',
14
- value: data.bgcolor || '',
27
+ valueKey: 'bgColor',
28
+ value: data.bgColor || '',
29
+ groupKey:'content',
15
30
  placeholder: '请输入占位框背景颜色',
31
+ classNmae: 'input60',
32
+ },
33
+ {
34
+ label: '背景图:',
35
+ ele: 'xd-upload',
36
+ valueKey: 'bgImage',
37
+ value: data.bgImage || {},
38
+ defaultValue: data.bgImage,
39
+ slot: true,
40
+ tipsformet: `上传文件格式:@imageType@,不超过@size@MB.,建议宽度度为750*${imgHeight}像素。`,
41
+ type: ['jpg', 'png', 'jpeg'],
42
+ styleType: 'one',
43
+ uploadType: 'aliyun',
44
+ groupKey:'content',
45
+ size: 5,
46
+ action: 'aliyun',
47
+ oneWidth: 300,
48
+ oneHeight: 300 * (imgHeight)/ 750,
49
+ },
50
+ {
51
+ label: '获取列表记录条数:',
52
+ ele: 'el-input',
53
+ type: 'number',
54
+ groupKey:'content',
55
+ valueKey: 'pageSize',
56
+ value: data['pageSize'] || 20,
57
+ notice: '获取列表最大值为<span style="color:red">50</span> 条记录。设置大于50条记录不生效,此时使用50条记录',
58
+ inline: false,
59
+ className: 'input60',
60
+ },
61
+ {
62
+ label: "标题显示样式",
63
+ ele: "xd-radio",
64
+ valueKey: "titleStyle",
65
+ value: data['titleStyle'] || "button",
66
+ groupKey: 'content',
67
+ list: [
68
+ {label: "下划线样式", value: "line"},
69
+ {label: "按钮样式", value: "button"}
70
+ ]
71
+ },
72
+ {
73
+ label: "是否热映影片",
74
+ ele: "xd-radio",
75
+ valueKey: "showHot",
76
+ value: data['showHot'] || "Y",
77
+ groupKey: 'content',
78
+ list: [
79
+ {label: "显示", value: "Y"},
80
+ {label: "隐藏", value: "N"}
81
+ ]
82
+ },
83
+ data['showHot'] === 'Y'&& {
84
+ label: '热映影片自定义名称:',
85
+ ele: 'el-input',
86
+ type: 'text',
87
+ groupKey:'content',
88
+ valueKey: 'showHotName',
89
+ value: data['showHotName'] || '',
90
+ notice: '热映影片自定义名称设置,默认值:<span style="color:red">热映影片</span>',
91
+ inline: false,
92
+ className: 'input60',
93
+ },
94
+ {
95
+ label: "是否即将上映",
96
+ ele: "xd-radio",
97
+ valueKey: "showRightnow",
98
+ value: data['showRightnow'] || "Y",
99
+ groupKey: 'content',
100
+ list: [
101
+ {label: "显示", value: "Y"},
102
+ {label: "隐藏", value: "N"}
103
+ ]
104
+ },
105
+ data['showRightnow'] === 'Y'&& {
106
+ label: '即将上映自定义名称:',
107
+ ele: 'el-input',
108
+ type: 'text',
109
+ groupKey:'content',
110
+ valueKey: 'showRightnowName',
111
+ value: data['showRightnowName'] || '',
112
+ notice: '即将上映自定义名称设置,默认值:<span style="color:red">即将上映</span>',
113
+ inline: false,
114
+ className: 'input60',
115
+ },
116
+ {
117
+ label: "是否显示更多按钮",
118
+ ele: "xd-radio",
119
+ valueKey: "showMoreBtn",
120
+ value: data['showMoreBtn'] || "Y",
121
+ groupKey: 'content',
122
+ list: [
123
+ {label: "显示", value: "Y"},
124
+ {label: "隐藏", value: "N"}
125
+ ]
126
+ },
127
+ {
128
+ label: "是否影片数量",
129
+ ele: "xd-radio",
130
+ valueKey: "showTotal",
131
+ value: data['showTotal'] || "Y",
132
+ groupKey: 'content',
133
+ list: [
134
+ {label: "显示", value: "Y"},
135
+ {label: "隐藏", value: "N"}
136
+ ]
137
+ },
138
+ {
139
+ label: '外边间距:',
140
+ ele: 'el-input',
141
+ type: 'number',
142
+ groupKey:'style',
143
+ valueKey: 'outSpacing',
144
+ value: data['outSpacing'] || 20,
145
+ notice: '外边间距设置,单位:像素,默认值:<span style="color:red">20</span> px',
146
+ inline: false,
147
+ className: 'input60',
148
+ },
149
+ {
150
+ ele: 'title',
151
+ label: '标题轮廓样式设置',
152
+ size: 'small',
153
+ groupKey:'style',
154
+ },
155
+ {
156
+ label: '背景颜色:',
157
+ ele: 'xd-color',
158
+ valueKey: 'titleBgColor',
159
+ value: data['titleBgColor'] || '',
160
+ groupKey:'style',
161
+ placeholder: '请输入背景颜色',
162
+ classNmae: 'input60',
163
+ },
164
+ {
165
+ label: '圆角设置:',
166
+ ele: 'xd-site-select-list',
167
+ valueKey: 'titleRradius',
168
+ value: data['titleRradius'] || '0',
169
+ groupKey:'style',
170
+ placeholder: '请选择内容圆角设置',
171
+ multiple: false,
172
+ className: 'input80',
173
+ handleCustom({action, data}) {
174
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
175
+ .then(res => {
176
+ data.cb(res.list)
177
+ })
178
+ .catch(error => {
179
+ console.error(error);
180
+ });
181
+ },
182
+ },
183
+ {
184
+ label: '填充设置:',
185
+ ele: 'xd-margin-padding',
186
+ groupKey:'style',
187
+ valueKey: 'titleMargin',
188
+ value: data['titleMargin'] || null,
189
+ setting: {
190
+ type: 'margin',
191
+ },
192
+ inline: false,
193
+ notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
194
+ },
195
+ {
196
+ label: '是否有投影:',
197
+ ele: 'xd-radio',
198
+ valueKey: 'isTitleShadow',
199
+ value: data['isTitleShadow'] || 'N',
200
+ placeholder: '请选择是否投影',
201
+ multiple: false,
202
+ className: 'input80',
203
+ groupKey:'style',
204
+ list: [
205
+ {label: '是', value: 'Y'},
206
+ {label: '否', value: 'N'},
207
+ ]
208
+ },
209
+ data['isTitleShadow'] === 'Y' && {
210
+ label: '投影颜色:',
211
+ ele: 'xd-color',
212
+ valueKey: 'isTitleShadowColor',
213
+ value: data['isTitleShadowColor'] || '',
214
+ placeholder: '请选择投影颜色',
16
215
  classNmae: 'input80',
17
- rules: [
18
- {
19
- required: true,
20
- message: '请输入占位框背景颜色',
21
- trigger: 'blur'
22
- },
216
+ groupKey:'style',
217
+ },
218
+ data['isTitleShadow'] === 'Y' && {
219
+ label: '投影范围:',
220
+ ele: 'xd-site-select-list',
221
+ valueKey: 'isTitleShadowWidth',
222
+ value: data['isTitleShadowWidth'] || '',
223
+ placeholder: '请选择投影范围',
224
+ multiple: false,
225
+ className: 'input80',
226
+ groupKey:'style',
227
+ handleCustom({action, data}) {
228
+ XdBus.getParentApi('getOptionsSettingList')({
229
+ setting_id: 'edtix_style_radius',
230
+ key: Date.now()
231
+ })
232
+ .then(res => {
233
+ data.cb(res.list)
234
+ })
235
+ .catch(error => {
236
+ console.error(error);
237
+ });
238
+ },
239
+ },
240
+ {
241
+ label: '是否有边框:',
242
+ ele: 'xd-radio',
243
+ valueKey: 'isTitleBorder',
244
+ value: data['isTitleBorder'] || 'N',
245
+ placeholder: '请选择是否有边框',
246
+ multiple: false,
247
+ className: 'input50',
248
+ groupKey:'style',
249
+ list: [
250
+ {label: '是', value: 'Y'},
251
+ {label: '否', value: 'N'},
23
252
  ]
24
253
  },
254
+ data['isTitleBorder'] === 'Y' && {
255
+ label: '边框颜色:',
256
+ ele: 'xd-color',
257
+ valueKey: 'isTitleBorderColor',
258
+ value: data['isTitleBorderColor'] || '',
259
+ placeholder: '请选择边框颜色',
260
+ classNmae: 'input50',
261
+ groupKey:'style',
262
+ },
25
263
  {
26
- label: '选中路径:',
27
- ele: 'xd-select-pages-path',
28
- valueKey: 'select-pages-path',
29
- value: data['select-pages-path'] || null,
264
+ label: '数量文字颜色:',
265
+ ele: 'xd-color',
266
+ valueKey: 'totalColor',
267
+ value: data['totalColor'] || '',
268
+ groupKey:'style',
269
+ placeholder: '请输入背景颜色',
270
+ classNmae: 'input60',
271
+ },
272
+
273
+ {
274
+ ele: 'title',
275
+ label: '标题切换标签设置<span style="color:red">按钮样式</span>生效',
276
+ size: 'small',
277
+ groupKey:'style',
278
+ },
279
+ {
280
+ label: '标题背景颜色:',
281
+ ele: 'xd-color',
282
+ valueKey: 'titleTextBgColor',
283
+ value: data['titleTextBgColor'] || '',
284
+ groupKey:'style',
285
+ placeholder: '请输入标题背景颜色',
286
+ classNmae: 'input60',
287
+ },
288
+ {
289
+ label: '标题选中背景颜色:',
290
+ ele: 'xd-color',
291
+ valueKey: 'titleTextActBgColor',
292
+ value: data['titleTextActBgColor'] || '',
293
+ groupKey:'style',
294
+ placeholder: '请输入标题选中背景颜色',
295
+ classNmae: 'input60',
296
+ },
297
+ {
298
+ label: '标题文字颜色:',
299
+ ele: 'xd-color',
300
+ valueKey: 'titleTextColor',
301
+ value: data['titleTextColor'] || '',
302
+ groupKey:'style',
303
+ placeholder: '请输入标题文字颜色',
304
+ classNmae: 'input60',
305
+ },
306
+ {
307
+ label: '标题选中文字颜色:',
308
+ ele: 'xd-color',
309
+ valueKey: 'titleTextActColor',
310
+ value: data['titleTextActColor'] || '',
311
+ groupKey:'style',
312
+ placeholder: '请输入选中文字颜色',
313
+ classNmae: 'input60',
314
+ },
315
+ {
316
+ label: '圆角设置:',
317
+ ele: 'xd-site-select-list',
318
+ valueKey: 'titleTextRradius',
319
+ value: data['titleTextRradius'] || '40',
320
+ groupKey:'style',
321
+ placeholder: '请选择内容圆角设置',
322
+ multiple: false,
323
+ className: 'input80',
324
+ handleCustom({action, data}) {
325
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
326
+ .then(res => {
327
+ data.cb(res.list)
328
+ })
329
+ .catch(error => {
330
+ console.error(error);
331
+ });
332
+ },
333
+ },
334
+ {
335
+ ele: 'title',
336
+ label: '更多按钮样式设置',
337
+ size: 'small',
338
+ groupKey:'style',
339
+ },
340
+ {
341
+ label: '背景颜色:',
342
+ ele: 'xd-color',
343
+ valueKey: 'moreBgColor',
344
+ value: data['moreBgColor'] || '',
345
+ groupKey:'style',
346
+ placeholder: '请输入背景颜色',
347
+ classNmae: 'input60',
348
+ },
349
+ {
350
+ label: '文字颜色:',
351
+ ele: 'xd-color',
352
+ valueKey: 'moreTextColor',
353
+ value: data['moreTextColor'] || '',
354
+ groupKey:'style',
355
+ placeholder: '请输入文字颜色',
356
+ classNmae: 'input60',
357
+ },
358
+ {
359
+ label: '圆角设置:',
360
+ ele: 'xd-site-select-list',
361
+ valueKey: 'moreRradius',
362
+ value: data['moreRradius'] || '40',
363
+ groupKey:'style',
364
+ placeholder: '请选择内容圆角设置',
365
+ multiple: false,
366
+ className: 'input80',
367
+ handleCustom({action, data}) {
368
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
369
+ .then(res => {
370
+ data.cb(res.list)
371
+ })
372
+ .catch(error => {
373
+ console.error(error);
374
+ });
375
+ },
376
+ },
377
+
378
+ {
379
+ ele: 'title',
380
+ label: '内容列表',
381
+ size: 'small',
382
+ groupKey:'style',
383
+ },
384
+ {
385
+ label: '背景颜色:',
386
+ ele: 'xd-color',
387
+ valueKey: 'contBgColor',
388
+ value: data['contBgColor'] || '',
389
+ groupKey:'style',
390
+ placeholder: '请输入背景颜色',
391
+ classNmae: 'input60',
392
+ },
393
+ {
394
+ label: '圆角设置:',
395
+ ele: 'xd-site-select-list',
396
+ valueKey: 'contRradius',
397
+ value: data['contRradius'] || '10',
398
+ groupKey:'style',
399
+ placeholder: '请选择圆角设置',
400
+ multiple: false,
401
+ className: 'input80',
402
+ handleCustom({action, data}) {
403
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
404
+ .then(res => {
405
+ data.cb(res.list)
406
+ })
407
+ .catch(error => {
408
+ console.error(error);
409
+ });
410
+ },
411
+ },
412
+ {
413
+ label: '填充设置:',
414
+ ele: 'xd-margin-padding',
415
+ groupKey:'style',
416
+ valueKey: 'contMargin',
417
+ value: data['contMargin'] || null,
30
418
  setting: {
31
- router: XdBus.getParentApi('getPagesTree')
419
+ type: 'margin',
32
420
  },
421
+ inline: false,
422
+ notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
33
423
  },
34
- data.bgcolor && {
35
- label: '高度:',
36
- ele: 'el-input',
37
- type: 'number',
38
- valueKey: 'height',
39
- value: data.height || 100,
40
- placeholder: '请输入占位框高度,单位像素,默认:10px',
424
+ {
425
+ label: '是否有投影:',
426
+ ele: 'xd-radio',
427
+ valueKey: 'isContShadow',
428
+ value: data['isContShadow'] || 'N',
429
+ placeholder: '请选择是否投影',
430
+ multiple: false,
41
431
  className: 'input80',
42
- rules: [
43
- {
44
- required: true,
45
- message: '请输入占位框高度',
46
- trigger: 'blur'
47
- },
432
+ groupKey:'style',
433
+ list: [
434
+ {label: '是', value: 'Y'},
435
+ {label: '', value: 'N'},
48
436
  ]
49
437
  },
438
+ data['isContShadow'] === 'Y' && {
439
+ label: '投影颜色:',
440
+ ele: 'xd-color',
441
+ valueKey: 'isContShadowColor',
442
+ value: data['isContShadowColor'] || '',
443
+ placeholder: '请选择投影颜色',
444
+ classNmae: 'input80',
445
+ groupKey:'style',
446
+ },
447
+ data['isContShadow'] === 'Y' && {
448
+ label: '投影范围:',
449
+ ele: 'xd-site-select-list',
450
+ valueKey: 'isContShadowWidth',
451
+ value: data['isContShadowWidth'] || '',
452
+ placeholder: '请选择投影范围',
453
+ multiple: false,
454
+ className: 'input80',
455
+ groupKey:'style',
456
+ handleCustom({action, data}) {
457
+ XdBus.getParentApi('getOptionsSettingList')({
458
+ setting_id: 'edtix_style_radius',
459
+ key: Date.now()
460
+ })
461
+ .then(res => {
462
+ data.cb(res.list)
463
+ })
464
+ .catch(error => {
465
+ console.error(error);
466
+ });
467
+ },
468
+ },
469
+ {
470
+ label: '是否有边框:',
471
+ ele: 'xd-radio',
472
+ valueKey: 'isContBorder',
473
+ value: data['isContBorder'] || 'N',
474
+ placeholder: '请选择是否有边框',
475
+ multiple: false,
476
+ className: 'input50',
477
+ groupKey:'style',
478
+ list: [
479
+ {label: '是', value: 'Y'},
480
+ {label: '否', value: 'N'},
481
+ ]
482
+ },
483
+ data['isContBorder'] === 'Y' && {
484
+ label: '边框颜色:',
485
+ ele: 'xd-color',
486
+ valueKey: 'isContBorderColor',
487
+ value: data['isContBorderColor'] || '',
488
+ placeholder: '请选择边框颜色',
489
+ classNmae: 'input50',
490
+ groupKey:'style',
491
+ },
492
+ {
493
+ ele: 'title',
494
+ label: '图片样式设置',
495
+ size: 'small',
496
+ groupKey:'style',
497
+ },
498
+ {
499
+ label: '图片圆角设置:',
500
+ ele: 'xd-site-select-list',
501
+ valueKey: 'contItemRradius',
502
+ value: data['contItemRradius'] || '10',
503
+ groupKey:'style',
504
+ placeholder: '请选择图片圆角设置',
505
+ multiple: false,
506
+ className: 'input80',
507
+ handleCustom({action, data}) {
508
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
509
+ .then(res => {
510
+ data.cb(res.list)
511
+ })
512
+ .catch(error => {
513
+ console.error(error);
514
+ });
515
+ },
516
+ },
517
+
50
518
  {
51
- label: '', //label
52
- ele: 'slot', //package 名称
53
- slot: 'is_reference',
519
+ label: '影片列表访问地址:',
520
+ ele: 'xd-select-pages-path',
521
+ valueKey: 'fimeListPath',
522
+ groupKey:'advanced',
523
+ value: data['fimeListPath'] || null,
524
+ className: 'input100',
525
+ setting: {
526
+ router: XdBus.getParentApi('getPagesTree')
527
+ },
528
+ },
529
+
530
+ {
531
+ label: '影片详情访问地址:',
532
+ ele: 'xd-select-pages-path',
533
+ valueKey: 'fimeDetailPath',
534
+ groupKey:'advanced',
535
+ value: data['fimeDetailPath'] || null,
536
+ className: 'input100',
537
+ setting: {
538
+ router: XdBus.getParentApi('getPagesTree')
539
+ },
54
540
  },
541
+ {
542
+ label: '选择影院访问地址:',
543
+ ele: 'xd-select-pages-path',
544
+ groupKey:'advanced',
545
+ valueKey: 'buyPath',
546
+ value: data['buyPath'] || null,
547
+ className: 'input100',
548
+ setting: {
549
+ router: XdBus.getParentApi('getPagesTree')
550
+ },
551
+ },
552
+
55
553
  ].filter(i=>i)
56
554
  },
57
555
  advanced: [],