cnhis-design-vue 2.1.15 → 2.1.18

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +119 -106
  4. package/es/big-table/style.css +1 -1
  5. package/es/button/index.js +1208 -1132
  6. package/es/button/style.css +1 -1
  7. package/es/captcha/index.js +3 -3
  8. package/es/checkbox/index.js +1 -1
  9. package/es/color-picker/index.js +1 -1
  10. package/es/drag-layout/index.js +3 -3
  11. package/es/editor/index.js +1 -1
  12. package/es/fabric-chart/index.js +72 -81
  13. package/es/fabric-chart/style.css +1 -1
  14. package/es/form-table/index.js +17 -17
  15. package/es/index/index.js +1582 -1487
  16. package/es/index/style.css +1 -1
  17. package/es/input/index.js +1 -1
  18. package/es/map/index.js +1 -1
  19. package/es/multi-chat/index.js +24 -24
  20. package/es/multi-chat-client/index.js +18 -18
  21. package/es/multi-chat-history/index.js +4 -4
  22. package/es/multi-chat-record/index.js +4 -4
  23. package/es/multi-chat-setting/index.js +74 -59
  24. package/es/multi-chat-setting/style.css +1 -1
  25. package/es/multi-chat-sip/index.js +1 -1
  26. package/es/radio/index.js +1 -1
  27. package/es/scale-view/index.js +24 -24
  28. package/es/select/index.js +3 -3
  29. package/es/select-label/index.js +3 -3
  30. package/es/select-person/index.js +2 -2
  31. package/es/table-filter/index.js +1227 -1151
  32. package/es/table-filter/style.css +1 -1
  33. package/es/tag/index.js +1 -1
  34. package/es/verification-code/index.js +2 -2
  35. package/lib/cui.common.js +1682 -1587
  36. package/lib/cui.umd.js +1682 -1587
  37. package/lib/cui.umd.min.js +23 -23
  38. package/package.json +2 -2
  39. package/packages/big-table/src/components/AutoLayoutButton.vue +1 -1
  40. package/packages/big-table/src/utils/batchEditing.js +610 -603
  41. package/packages/button/src/ButtonPrint/index.vue +4 -0
  42. package/packages/button/src/ButtonPrint/js/print.es.min.js +2791 -3
  43. package/packages/fabric-chart/src/FabricChart.vue +15 -36
  44. package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +4 -3
  45. package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +8 -6
  46. package/packages/multi-chat/setting/baseInfo/index.vue +27 -13
@@ -1,43 +1,22 @@
1
1
  <template>
2
- <div class="c-fabric-chart" :style="{'width': canvasWidth}">
3
- <component
4
- ref="canvasEle"
5
- :is="`FabricCanvas${templateData.type || ''}`"
6
- :id="id"
7
- :templateData="templateData"
8
- v-if="rendercanvas"
9
- >
2
+ <div class="c-fabric-chart" :style="{ width: canvasWidth }">
3
+ <component ref="canvasEle" :is="`FabricCanvas${templateData.type || ''}`" :id="id" :templateData="templateData" v-if="rendercanvas">
10
4
  <template v-if="templateData.type">
11
5
  <fabric-grid></fabric-grid>
12
6
  <fabric-top2 :templateData="templateData"></fabric-top2>
13
7
  <fabric-left2 :templateData="templateData"></fabric-left2>
14
8
  <fabric-right2 :templateData="templateData"></fabric-right2>
15
9
  <fabric-bottom2 :templateData="templateData"></fabric-bottom2>
16
- <fabric-center2
17
- :other="templateData.other"
18
- :polyline="templateData.left.leftYScalevalue"
19
- v-on="$listeners"
20
- @pointOperation="pointOperation"
21
- ></fabric-center2>
10
+ <fabric-center2 :other="templateData.other" :polyline="templateData.left.leftYScalevalue" v-on="$listeners" @pointOperation="pointOperation"></fabric-center2>
22
11
  </template>
23
12
 
24
13
  <template v-else>
25
- <fabric-text-group
26
- v-if="hasXScalevalue"
27
- :templateData="templateData"
28
- v-on="$listeners"
29
- ></fabric-text-group>
14
+ <fabric-text-group v-if="hasXScalevalue" :templateData="templateData" v-on="$listeners"></fabric-text-group>
30
15
  <fabric-grid></fabric-grid>
31
16
  <fabric-scale-value v-if="hasTable" :templateData="templateData"></fabric-scale-value>
32
17
  <fabric-lines v-if="hasTopTable" ref="lines" :linesObj="templateData.top" v-on="$listeners"></fabric-lines>
33
- <fabric-polylines ref="polylines"
34
- v-if="hasTable"
35
- :polyline="polylines"
36
- :other="templateData.left.other || {}"
37
- @pointOperation="pointOperation"
38
- v-on="$listeners"></fabric-polylines>
18
+ <fabric-polylines ref="polylines" v-if="hasTable" :polyline="polylines" :other="templateData.left.other || {}" @pointOperation="pointOperation" v-on="$listeners"></fabric-polylines>
39
19
  </template>
40
-
41
20
  </component>
42
21
  </div>
43
22
  </template>
@@ -74,7 +53,7 @@ export default create({
74
53
  templateData: {
75
54
  type: Object,
76
55
  required: true
77
- },
56
+ }
78
57
  },
79
58
  components: {
80
59
  FabricCanvas,
@@ -109,17 +88,17 @@ export default create({
109
88
  hasTable() {
110
89
  const hasLeft = this.templateData.left?.leftYScalevalue?.list?.length > 0;
111
90
  const hasRight = this.templateData.right?.rightYScalevalue?.list?.length > 0;
112
- return this.hasXScalevalue && hasLeft && hasRight;
91
+ return this.hasXScalevalue && (hasLeft || hasRight);
113
92
  },
114
93
  hasXScalevalue() {
115
94
  return this.templateData.top?.xScalevalue?.list?.length > 0;
116
- },
95
+ }
117
96
  },
118
97
  data() {
119
98
  return {
120
99
  rendercanvas: true,
121
100
  canvasWidth: 0
122
- }
101
+ };
123
102
  },
124
103
  mounted() {
125
104
  this.canvasWidth = `${this.templateData.canvasWidth}px` || '1000px';
@@ -159,21 +138,21 @@ export default create({
159
138
  // 在组件移除后,重新渲染组件
160
139
  // this.$nextTick可实现在DOM 状态更新后,执行传入的方法。
161
140
  this.$nextTick(() => {
162
- this.rendercanvas = true;
163
- })
141
+ this.rendercanvas = true;
142
+ });
164
143
  // this.$refs.canvasEle.renderCanvas();
165
144
  },
166
145
  removeSelectArea() {
167
146
  this.$nextTick(() => {
168
147
  this.$refs.polylines.removeSelectArea();
169
- })
148
+ });
170
149
  }
171
150
  }
172
151
  });
173
152
  </script>
174
153
 
175
154
  <style lang="less" scoped>
176
- .c-fabric-chart {
177
- position: relative;
178
- }
155
+ .c-fabric-chart {
156
+ position: relative;
157
+ }
179
158
  </style>
@@ -82,9 +82,10 @@ export default {
82
82
  console.warn(error);
83
83
  }
84
84
  }
85
- if (!this.templateData.left || !this.templateData.right) {
85
+ // if (!this.templateData.left || !this.templateData.right) {
86
+ if (!this.templateData.left) {
86
87
  try {
87
- throw new Error('缺少左/右侧数据对象, 无法生成垂直方向刻度');
88
+ throw new Error('缺少左侧数据对象, 无法生成垂直方向刻度');
88
89
  } catch (error) {
89
90
  console.warn(error);
90
91
  }
@@ -133,7 +134,7 @@ export default {
133
134
  endX() {
134
135
  // 网格区域水平方向最大坐标值, 也是整个画布右侧列表坐标起始值,网格右下角x轴坐标值
135
136
  if (!this.templateData.right && !this.topTotal) return this.templateData.canvasWidth;
136
- return this.templateData.canvasWidth - (this.templateData.right?.width || 20) - this.topTotal.width;
137
+ return this.templateData.canvasWidth - (this.templateData.right?.width ?? 20) - this.topTotal.width;
137
138
  },
138
139
  endY() {
139
140
  // 画布高度 - 底部列表高度 ,网格右下角y轴坐标值
@@ -65,7 +65,6 @@ export default {
65
65
  });
66
66
  return cur;
67
67
  }, '');
68
- console.log(textList);
69
68
  const group = new this.fabric.Group([...textList], {
70
69
  evented: false,
71
70
  selectable: false
@@ -74,6 +73,7 @@ export default {
74
73
  this.canvas.sendBackwards(group);
75
74
  },
76
75
  rightScaleValue(obj) {
76
+ if (!obj) return;
77
77
  const spaceGridNumber = obj.rightYScalevalue.spaceGridNumber || 2;
78
78
  const marginLeft = obj.rightYScalevalue.marginLeft || 3;
79
79
  const originX = this.propItems.endX + marginLeft;
@@ -95,13 +95,15 @@ export default {
95
95
  this.canvas.sendBackwards(group);
96
96
  },
97
97
  leftScaleValue(obj) {
98
+ const { endY, yCellHeight } = this.propItems;
98
99
  const spaceGridNumber = obj.leftYScalevalue.spaceGridNumber || 2;
99
- const marginRight = obj.leftYScalevalue.marginRight || 3;
100
+ const [titleMarginRight, titleMarginButton] = obj.leftYScalevalue?.titleMargin || [5, 30];
101
+ const listMarginRight = obj.leftYScalevalue.listMarginRight || 3;
100
102
  const style = obj.leftYScalevalue.style || {};
101
- const originX = this.propItems.originX - marginRight;
103
+ const originX = this.propItems.originX;
102
104
  let textList = [];
103
105
  obj.leftYScalevalue.list.forEach((item, index) => {
104
- textList.push(this.createText(item, originX, this.propItems.endY - index * this.propItems.yCellHeight * spaceGridNumber, 'right', style));
106
+ textList.push(this.createText(item, originX - listMarginRight, endY - index * yCellHeight * spaceGridNumber, 'right', style));
105
107
  });
106
108
 
107
109
  // 添加标题和单位
@@ -109,8 +111,8 @@ export default {
109
111
  txt = obj.leftYScalevalue.name || '';
110
112
  if (obj.leftYScalevalue.unit) txt += '\n' + obj.leftYScalevalue.unit;
111
113
  if (txt) {
112
- const top = this.propItems.endY - obj.leftYScalevalue.list.length * this.propItems.yCellHeight * spaceGridNumber;
113
- textList.push(this.createText(txt, originX, top, 'right', { ...style, textAlign: 'right', originY: 'bottom' }));
114
+ const top = endY - (obj.leftYScalevalue.list.length - 1) * yCellHeight * spaceGridNumber - titleMarginButton;
115
+ textList.push(this.createText(txt, originX - titleMarginRight, top, 'right', { ...style, textAlign: 'right', originY: 'bottom' }));
114
116
  }
115
117
  const group = new this.fabric.Group([...textList], {
116
118
  evented: false,
@@ -14,9 +14,9 @@
14
14
  <a-row class="time-setting">
15
15
  <a-col :span="12">
16
16
  <a-form-item :label="i18nText('1.9.403')">
17
- <a-select v-decorator="['timeLength']" :placeholder="i18nText('1.9.404')" style="width: 200px;" showSearch>
18
- <a-select-option v-for="time in timeLengths" :key="time" :value="time">{{ time }}</a-select-option>
19
- </a-select>
17
+ <a-input-number v-decorator="['timeLengthHours']" :min="0" :max="99" />
18
+ <span class="setting-hours-text">小时</span>
19
+ <a-input-number v-decorator="['timeLengthMins']" :min="0" :max="59" />
20
20
  {{ i18nText('2.2.6.6') }}
21
21
  </a-form-item>
22
22
  </a-col>
@@ -395,7 +395,7 @@ export default {
395
395
  readStatus: false,
396
396
  lineUpNotice: false,
397
397
  evaluateId: '',
398
- timeLengths: [5, 10, 20, 30, 40, 50, 60],
398
+ timeLength: '', // 会话时长,分钟计算
399
399
  functionSetting: [], // 服务端功能
400
400
  clientFunctionSetting: [], // 客户端功能
401
401
  functionList: [], // 服务端功能下拉列表
@@ -638,7 +638,7 @@ export default {
638
638
  fillToolbar(toolbar) {
639
639
  this.toolbarList = toolbar.map(item => ({
640
640
  label: item.name,
641
- value: item.name + '-' + item.source,
641
+ value: item.name + '-' + item.source + '-' + item.key,
642
642
  source: item.source,
643
643
  isClosedAble: item.isClosedAble,
644
644
  isCloseChecked: item.isCloseChecked
@@ -646,7 +646,7 @@ export default {
646
646
  const btwList = toolbar.filter(item => item.isClosedAble == "Y" && item.isChecked == "Y");
647
647
  this.closedToolbarList = btwList.map(item => ({
648
648
  label: item.name,
649
- value: item.name + '-' + item.source,
649
+ value: item.name + '-' + item.source + '-' + item.key,
650
650
  source: item.source,
651
651
  isClosedAble: item.isClosedAble,
652
652
  isCloseChecked: item.isCloseChecked
@@ -654,7 +654,7 @@ export default {
654
654
  this.toolbar = toolbar;
655
655
  let toolbarChecked = toolbar.reduce((result, item) => {
656
656
  if (item.isChecked === 'Y') {
657
- result.push(item.name + '-' + item.source);
657
+ result.push(item.name + '-' + item.source + '-' + item.key);
658
658
  }
659
659
  return result;
660
660
  }, []);
@@ -663,7 +663,7 @@ export default {
663
663
  });
664
664
  let closedToolbarChecked = this.closedToolbarList.reduce((result, item) => {
665
665
  if (item.isCloseChecked === 'Y') {
666
- result.push(item.label + '-' + item.source);
666
+ result.push(item.label + '-' + item.source + '-' + item.key);
667
667
  }
668
668
  return result;
669
669
  }, []);
@@ -710,8 +710,16 @@ export default {
710
710
  fillTimeSetting(timeSetting) {
711
711
  if (this.isStaff) return;
712
712
  let { timeLength, showMode, delayedSetting, delayed } = timeSetting;
713
+ this.timeLength = timeLength;
714
+ let timeLengthMins = ''
715
+ let timeLengthHours = ''
716
+ if (this.timeLength) {
717
+ timeLengthMins = parseInt(this.timeLength) % 60;
718
+ timeLengthHours = parseInt(parseInt(this.timeLength) / 60);
719
+ }
713
720
  this.form.setFieldsValue({
714
- timeLength,
721
+ timeLengthMins,
722
+ timeLengthHours,
715
723
  showMode
716
724
  });
717
725
  if (delayed) {
@@ -960,12 +968,12 @@ export default {
960
968
  let { toolbar, closedToolbar } = values;
961
969
  let clone = JSON.parse(JSON.stringify(this.toolbar));
962
970
  setting.toolbar = clone.reduce((result, item) => {
963
- if (toolbar.includes(item.name + '-' + item.source)) {
971
+ if (toolbar.includes(item.name + '-' + item.source + '-' + item.key)) {
964
972
  item.isChecked = 'Y';
965
973
  } else {
966
974
  item.isChecked = 'N';
967
975
  }
968
- if (closedToolbar.includes(item.name + '-' + item.source)) {
976
+ if (closedToolbar.includes(item.name + '-' + item.source + '-' + item.key)) {
969
977
  item.isCloseChecked = 'Y';
970
978
  } else {
971
979
  item.isCloseChecked = 'N';
@@ -1050,8 +1058,11 @@ export default {
1050
1058
  setting.timingSettingSwitch = this.showTimeSetting ? '1' : '0';
1051
1059
  setting.timingSetting = {};
1052
1060
  if (this.showTimeSetting) {
1053
- let { timeLength, showMode } = values;
1054
- Object.assign(setting.timingSetting, { timeLength, showMode });
1061
+ let { showMode, timeLengthMins, timeLengthHours } = values;
1062
+ let settingMins = timeLengthMins ? timeLengthMins : 0;
1063
+ let settingHours = timeLengthHours ? timeLengthHours : 0;
1064
+ this.timeLength = settingMins + settingHours * 60;
1065
+ Object.assign(setting.timingSetting, { timeLength: this.timeLength, showMode });
1055
1066
  setting.timingSetting.delayedSetting = {};
1056
1067
  }
1057
1068
  if (this.showTimeDelay && this.showTimeSetting) {
@@ -1148,6 +1159,9 @@ export default {
1148
1159
  .main-form {
1149
1160
  flex: 1;
1150
1161
  }
1162
+ .setting-hours-text {
1163
+ margin-right: 15px;
1164
+ }
1151
1165
  .time-setting,
1152
1166
  .delayed-setting {
1153
1167
  padding-left: 20px;