cloud-web-corejs 1.0.68 → 1.0.69

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.68",
4
+ "version": "1.0.69",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -53,7 +53,6 @@ modules = {
53
53
  serieClone: {},
54
54
  showChart: true,
55
55
  colors: [
56
-
57
56
  {
58
57
  type: 'linear',
59
58
  x: 0.5,
@@ -207,7 +206,7 @@ modules = {
207
206
  }
208
207
  }
209
208
  },
210
- chartOption(){
209
+ chartOption() {
211
210
  return this.field.options.echarBarOption
212
211
  }
213
212
  },
@@ -236,9 +235,36 @@ modules = {
236
235
  },
237
236
 
238
237
  methods: {
239
- initOption(){
238
+ reflush(){
239
+ this.showChart = false;
240
+ this.$nextTick(()=>{
241
+ this.showChart = true
242
+ })
243
+ },
244
+ getColors(){
245
+ let chartColors = this.field.options.echarBarOption.colors || [];
246
+ let colors = [...chartColors, ...this.colors];
247
+ return colors
248
+ },
249
+ adjustColor() {
250
+ let colors = this.getColors();
251
+ let colorsSize = colors.length;
252
+ this.field.options.echarBarOption.series.forEach((serie, index) => {
253
+ if (colorsSize > index) {
254
+ if (serie.itemStyle) {
255
+ serie.itemStyle.color = colors[index]
256
+ } else {
257
+ serie.itemStyle = {
258
+ color: colors[index]
259
+ }
260
+ }
261
+ }
262
+ })
263
+ },
264
+ initOption() {
240
265
  let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
241
266
  this.field.options.echarBarOption = extendDeeply(this.field.options.echarBarOption, echartConfig);
267
+ this.adjustColor();
242
268
  },
243
269
  /*async loadData() {
244
270
  if (this.designState) {
@@ -372,7 +398,7 @@ modules = {
372
398
  });
373
399
  },
374
400
  setValue(rows) {
375
- this.showChart = false;
401
+ this.showChart = false;
376
402
  let serieClone = this.serieClone;
377
403
  let resDatas = rows || [];
378
404
  let axisDatas = [];
@@ -391,14 +417,18 @@ modules = {
391
417
  nameDatas.push(resData.name);
392
418
  }
393
419
  });
394
- let colors = this.colors;
420
+ let colors = this.getColors();
395
421
  let colorsSize = colors.length;
396
422
  nameDatas.forEach((nameItem, index) => {
397
423
  let serie = deepClone(serieClone);
398
424
  serie.name = nameItem;
399
- if (serie.itemStyle) {
400
- if (colorsSize > index) {
425
+ if (colorsSize > index) {
426
+ if (serie.itemStyle) {
401
427
  serie.itemStyle.color = colors[index]
428
+ } else {
429
+ serie.itemStyle = {
430
+ color: colors[index]
431
+ }
402
432
  }
403
433
  }
404
434
  let serieDatas = [];
@@ -417,11 +447,11 @@ modules = {
417
447
  let chartOptions = this.field.options.echarBarOption;
418
448
  chartOptions[this.alignField].data = axisDatas;
419
449
  chartOptions.series = newSeries;
420
- this.$nextTick(()=>{
421
- this.showChart = true;
450
+ this.$nextTick(() => {
451
+ this.showChart = true;
422
452
  })
423
453
  },
424
- getChart(){
454
+ getChart() {
425
455
  return this.$refs.chart;
426
456
  }
427
457
  }
@@ -9,6 +9,7 @@ import {CanvasRenderer} from 'echarts/renderers';
9
9
  import {LineChart} from 'echarts/charts';
10
10
  import {TitleComponent, TooltipComponent, LegendComponent} from 'echarts/components';
11
11
  import {THEME_KEY} from 'vue-echarts';
12
+ import {extendDeeply} from "@base/utils/index.js";
12
13
 
13
14
  use([CanvasRenderer, LineChart, TitleComponent, TooltipComponent, LegendComponent]);
14
15
  let modules = {};
@@ -52,87 +53,8 @@ modules = {
52
53
  requestAccesses: [],
53
54
  requestAccess: null,
54
55
  serieClone: {},
55
- showChart:true,
56
- colors: [
57
-
58
- {
59
- type: 'linear',
60
- x: 0.5,
61
- y: 0.9,
62
- r: 0.2,
63
- colorStops: [{
64
- offset: 1, color: '#08C084' // 0% 处的颜色
65
- }, {
66
- offset: 0, color: '#97EACE' // 100% 处的颜色
67
- }],
68
- },
69
- {
70
- type: 'linear',
71
- x: 0.5,
72
- y: 0.9,
73
- r: 0.2,
74
- colorStops: [{
75
- offset: 1, color: '#29ABE3' // 0% 处的颜色
76
- }, {
77
- offset: 0, color: '#AADEF4' // 100% 处的颜色
78
- }],
79
- },
80
- {
81
- type: 'linear',
82
- x: 0.5,
83
- y: 0.9,
84
- r: 0.2,
85
- colorStops: [{
86
- offset: 1, color: '#0044FE' // 0% 处的颜色
87
- }, {
88
- offset: 0, color: '#97B3FF' // 100% 处的颜色
89
- }],
90
- },
91
- {
92
- type: 'linear',
93
- x: 0.5,
94
- y: 0.9,
95
- r: 0.2,
96
- colorStops: [{
97
- offset: 1, color: '#75018A' // 0% 处的颜色
98
- }, {
99
- offset: 0, color: '#C492CD' // 100% 处的颜色
100
- }],
101
- },
102
- {
103
- type: 'linear',
104
- x: 0.5,
105
- y: 0.9,
106
- r: 0.2,
107
- colorStops: [{
108
- offset: 1, color: '#BF0104' // 0% 处的颜色
109
- }, {
110
- offset: 0, color: '#E59697' // 100% 处的颜色
111
- }],
112
- },
113
- {
114
- type: 'linear',
115
- x: 0.5,
116
- y: 0.9,
117
- r: 0.2,
118
- colorStops: [{
119
- offset: 1, color: '#FF8B01' // 0% 处的颜色
120
- }, {
121
- offset: 0, color: '#FFCF95' // 100% 处的颜色
122
- }],
123
- },
124
- {
125
- type: 'linear',
126
- x: 0.5,
127
- y: 0.9,
128
- r: 0.2,
129
- colorStops: [{
130
- offset: 1, color: '#FAFE09' // 0% 处的颜色
131
- }, {
132
- offset: 0, color: '#FCFFAF' // 100% 处的颜色
133
- }],
134
- }
135
- ]
56
+ showChart: true,
57
+ colors: []
136
58
  };
137
59
  },
138
60
  computed: {
@@ -158,8 +80,8 @@ modules = {
158
80
  }
159
81
  return '';
160
82
  },
161
- chartOption(){
162
- return this.field.options.echarBarOption
83
+ chartOption() {
84
+ return this.field.options.echarCategoryOption
163
85
  }
164
86
  },
165
87
  beforeCreate() {
@@ -174,6 +96,7 @@ modules = {
174
96
  this.initEventHandler();
175
97
 
176
98
  this.handleOnCreated();
99
+ this.initOption();
177
100
  this.serieClone = deepClone(this.field.options.echarCategoryOption.series[0]);
178
101
  // this.loadData();
179
102
  },
@@ -187,6 +110,38 @@ modules = {
187
110
  },
188
111
 
189
112
  methods: {
113
+ getColors() {
114
+ let chartColors = this.field.options.echarCategoryOption.colors || [];
115
+ let colors = [...chartColors, ...this.colors];
116
+ return colors
117
+ },
118
+ adjustColor() {
119
+ let colors = this.getColors();
120
+ let colorsSize = colors.length;
121
+ this.field.options.echarCategoryOption.series.forEach((serie, index) => {
122
+ if (colorsSize > index) {
123
+ if (serie.lineStyle) {
124
+ serie.lineStyle.color = colors[index]
125
+ } else {
126
+ serie.lineStyle = {
127
+ color: colors[index]
128
+ }
129
+ }
130
+ if (serie.itemStyle) {
131
+ serie.itemStyle.color = colors[index]
132
+ } else {
133
+ serie.itemStyle = {
134
+ color: colors[index]
135
+ }
136
+ }
137
+ }
138
+ })
139
+ },
140
+ initOption() {
141
+ let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
142
+ this.field.options.echarCategoryOption = extendDeeply(this.field.options.echarCategoryOption, echartConfig);
143
+ this.adjustColor();
144
+ },
190
145
  /*async loadData() {
191
146
  if (this.designState) {
192
147
  return;
@@ -315,7 +270,7 @@ modules = {
315
270
  });
316
271
  },
317
272
  setValue(rows) {
318
- this.showChart = false;
273
+ this.showChart = false;
319
274
  let serieClone = this.serieClone;
320
275
  let resDatas = rows || [];
321
276
  let axisDatas = [];
@@ -334,16 +289,28 @@ modules = {
334
289
  nameDatas.push(resData.name);
335
290
  }
336
291
  });
337
- let colors = this.colors;
292
+ let colors = this.getColors();
338
293
  let colorsSize = colors.length;
339
294
  nameDatas.forEach((nameItem, index) => {
340
295
  let serie = deepClone(serieClone);
341
296
  serie.name = nameItem;
342
- /*if (serie.lineStyle) {
343
- if (colorsSize > index) {
297
+ if (colorsSize > index) {
298
+ if (serie.lineStyle) {
344
299
  serie.lineStyle.color = colors[index]
300
+ } else {
301
+ serie.lineStyle = {
302
+ color: colors[index]
303
+ }
304
+ }
305
+ if (serie.itemStyle) {
306
+ serie.itemStyle.color = colors[index]
307
+ } else {
308
+ serie.itemStyle = {
309
+ color: colors[index]
310
+ }
345
311
  }
346
- }*/
312
+ }
313
+
347
314
  delete serie.lineStyle
348
315
 
349
316
  let serieDatas = [];
@@ -363,11 +330,11 @@ modules = {
363
330
  chartOptions.xAxis.data = axisDatas;
364
331
  chartOptions.series = newSeries;
365
332
 
366
- this.$nextTick(()=>{
367
- this.showChart = true;
333
+ this.$nextTick(() => {
334
+ this.showChart = true;
368
335
  })
369
336
  },
370
- getChart(){
337
+ getChart() {
371
338
  return this.$refs.chart;
372
339
  }
373
340
  }
@@ -9,6 +9,7 @@ import {CanvasRenderer} from 'echarts/renderers';
9
9
  import {PieChart} from 'echarts/charts';
10
10
  import {TitleComponent, TooltipComponent, LegendComponent} from 'echarts/components';
11
11
  import {THEME_KEY} from 'vue-echarts';
12
+ import {extendDeeply} from "@base/utils/index.js";
12
13
 
13
14
  use([CanvasRenderer, PieChart, TitleComponent, TooltipComponent, LegendComponent]);
14
15
 
@@ -53,6 +54,7 @@ modules = {
53
54
  requestAccess: null,
54
55
  serieClone: {},
55
56
  showChart: true,
57
+ colors:[]
56
58
  };
57
59
  },
58
60
  computed: {
@@ -79,7 +81,7 @@ modules = {
79
81
  return '';
80
82
  },
81
83
  chartOption() {
82
- return this.field.options.echarBarOption
84
+ return this.field.options.echarPieOption
83
85
  }
84
86
  },
85
87
  beforeCreate() {
@@ -94,6 +96,7 @@ modules = {
94
96
  this.initEventHandler();
95
97
 
96
98
  this.handleOnCreated();
99
+ this.initOption();
97
100
  this.serieClone = deepClone(this.field.options.echarPieOption.series[0]);
98
101
  // this.loadData();
99
102
  },
@@ -107,6 +110,10 @@ modules = {
107
110
  },
108
111
 
109
112
  methods: {
113
+ initOption() {
114
+ let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
115
+ this.field.options.echarPieOption = extendDeeply(this.field.options.echarPieOption, echartConfig);
116
+ },
110
117
  /*async loadData() {
111
118
  if (this.designState) {
112
119
  return;
@@ -196,6 +196,24 @@
196
196
 
197
197
  <el-form-item label-width="0"><el-divider class="custom-divider-margin-top">渐变色</el-divider></el-form-item>-->
198
198
 
199
+ <el-form-item label-width="0">
200
+ <el-divider class="custom-divider-margin-top">自定义配色</el-divider>
201
+ </el-form-item>
202
+ <draggable tag="ul" class="draggable-box" :list="optionModel.echarBarOption.colors"
203
+ v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.el-icon-s-operation' }">
204
+ <li v-for="(colorItem, index) in optionModel.echarBarOption.colors" :key="index">
205
+ <i class="el-icon-s-operation"></i>
206
+ <el-color-picker v-model="optionModel.echarBarOption.colors[index]"></el-color-picker>
207
+ <!-- {{colorItem}} -->
208
+ <el-button circle plain size="mini" type="danger" @click="deleteColor(index)" icon="el-icon-minus"
209
+ class="col-delete-button"></el-button>
210
+ </li>
211
+ </draggable>
212
+ <el-button type="text" @click="addColor" icon="el-icon-circle-plus-outline" class="add-option">{{
213
+ i18nt('新增配色')
214
+ }}
215
+ </el-button>
216
+
199
217
  <requestaccessDialog
200
218
  v-if="showRequestaccessDialog"
201
219
  :visiable.sync="showRequestaccessDialog"
@@ -336,6 +354,13 @@ export default {
336
354
  this.optionModel.accessName = row.accessName;
337
355
  this.optionModel.accessCode = row.accessCode;
338
356
  }
357
+ },
358
+ addColor() {
359
+ if(!this.optionModel.echarBarOption.colors)this.$set(this.optionModel.echarBarOption,'colors',[]);
360
+ this.optionModel.echarBarOption.colors.push('');
361
+ },
362
+ deleteColor(index) {
363
+ this.optionModel.echarBarOption.colors.splice(index, 1);
339
364
  }
340
365
  }
341
366
  };
@@ -203,11 +203,11 @@
203
203
  <el-form-item label-width="0">
204
204
  <el-divider class="custom-divider-margin-top">自定义配色</el-divider>
205
205
  </el-form-item>
206
- <draggable tag="ul" class="draggable-box" :list="optionModel.echarCategoryOption.color"
206
+ <draggable tag="ul" class="draggable-box" :list="optionModel.echarCategoryOption.colors"
207
207
  v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.el-icon-s-operation' }">
208
- <li v-for="(colorItem, index) in optionModel.echarCategoryOption.color" :key="index">
208
+ <li v-for="(colorItem, index) in optionModel.echarCategoryOption.colors" :key="index">
209
209
  <i class="el-icon-s-operation"></i>
210
- <el-color-picker v-model="optionModel.echarCategoryOption.color[index]"></el-color-picker>
210
+ <el-color-picker v-model="optionModel.echarCategoryOption.colors[index]"></el-color-picker>
211
211
  <!-- {{colorItem}} -->
212
212
  <el-button circle plain size="mini" type="danger" @click="deleteColor(index)" icon="el-icon-minus"
213
213
  class="col-delete-button"></el-button>
@@ -356,10 +356,10 @@ export default {
356
356
  },
357
357
  methods: {
358
358
  addColor() {
359
- this.optionModel.echarCategoryOption.color.push('');
359
+ this.optionModel.echarCategoryOption.colors.push('');
360
360
  },
361
361
  deleteColor(index) {
362
- this.optionModel.echarCategoryOption.color.splice(index, 1);
362
+ this.optionModel.echarCategoryOption.colors.splice(index, 1);
363
363
  },
364
364
  addOption() {
365
365
  this.nameSet.push('');
@@ -1999,10 +1999,11 @@ export const advancedFields = [
1999
1999
  color: "",
2000
2000
  fontWeight: "normal"
2001
2001
  },
2002
- data: [{
2003
- value: 1048,
2004
- name: 'Search Engine'
2005
- },
2002
+ data: [
2003
+ {
2004
+ value: 1048,
2005
+ name: 'Search Engine'
2006
+ },
2006
2007
  {
2007
2008
  value: 735,
2008
2009
  name: 'Direct'
@@ -2047,6 +2048,7 @@ export const advancedFields = [
2047
2048
  echarBarOption: {
2048
2049
  backgroundColor: "#fff",
2049
2050
  color: ["#5BC1D7", "#FF8A3D", "#56C271", "#694ED6", "#C033A1", "#FFCC10"],
2051
+ colors: [],
2050
2052
  title: {
2051
2053
  show: true,
2052
2054
  top: '5px',
@@ -2219,6 +2221,7 @@ export const advancedFields = [
2219
2221
  echarCategoryOption: {
2220
2222
  backgroundColor: "#fff",
2221
2223
  color: ["#5BC1D7", "#FF8A3D", "#56C271", "#694ED6", "#C033A1", "#FFCC10"],
2224
+ colors: [],
2222
2225
  title: {
2223
2226
  show: true,
2224
2227
  top: '5px',
@@ -2329,6 +2332,23 @@ export const advancedFields = [
2329
2332
  shadowBlur: 4,
2330
2333
  shadowOffsetY: 6
2331
2334
  },
2335
+ itemStyle: {
2336
+ color: {
2337
+ type: 'linear',
2338
+ x: 0.5,
2339
+ y: 0.5,
2340
+ r: 0.5,
2341
+ colorStops: [{
2342
+ offset: 0, color: '#08C084' // 0% 处的颜色
2343
+ }, {
2344
+ offset: 1, color: '#97EACE' // 100% 处的颜色
2345
+ }],
2346
+ },
2347
+ cap: 'round',
2348
+ shadowColor: '#08C08450',
2349
+ shadowBlur: 4,
2350
+ shadowOffsetY: 6
2351
+ },
2332
2352
  emphasis: {
2333
2353
  scale: 1,
2334
2354
  focus: 'series'
@@ -2363,6 +2383,23 @@ export const advancedFields = [
2363
2383
  shadowBlur: 4,
2364
2384
  shadowOffsetY: 6
2365
2385
  },
2386
+ itemStyle: {
2387
+ color: {
2388
+ type: 'linear',
2389
+ x: 0.5,
2390
+ y: 0.5,
2391
+ r: 0.5,
2392
+ colorStops: [{
2393
+ offset: 0, color: '#FF6116' // 0% 处的颜色
2394
+ }, {
2395
+ offset: 1, color: '#F9A980' // 100% 处的颜色
2396
+ }],
2397
+ },
2398
+ cap: 'round',
2399
+ shadowColor: '#FF611650',
2400
+ shadowBlur: 4,
2401
+ shadowOffsetY: 6
2402
+ },
2366
2403
  emphasis: {
2367
2404
  scale: 1,
2368
2405
  focus: 'series'
@@ -2728,6 +2765,8 @@ export const advancedFields = [
2728
2765
  exportFileName: '导出',
2729
2766
  tableRef: '',
2730
2767
  tableExportParam: "",
2768
+ showImageAtTable: false,
2769
+
2731
2770
  onCreated: "",
2732
2771
  onMounted: "",
2733
2772
  wfFlag: 1,
@@ -2832,6 +2871,7 @@ export const advancedFields = [
2832
2871
  label: "导入",
2833
2872
  columnWidth: "200px",
2834
2873
  size: "",
2874
+ importFileLimitSize: 200,
2835
2875
  // displayStyle: "block",
2836
2876
  disabled: !1,
2837
2877
  hidden: !1,