cnhis-design-vue 2.1.19 → 2.1.22

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 (43) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +109 -122
  4. package/es/big-table/style.css +1 -1
  5. package/es/button/index.js +35 -38
  6. package/es/captcha/index.js +3 -3
  7. package/es/checkbox/index.js +1 -1
  8. package/es/color-picker/index.js +1 -1
  9. package/es/drag-layout/index.js +36 -39
  10. package/es/editor/index.js +11 -31
  11. package/es/fabric-chart/index.js +254 -231
  12. package/es/form-table/index.js +62 -85
  13. package/es/index/index.js +689 -592
  14. package/es/index/style.css +1 -1
  15. package/es/input/index.js +1 -1
  16. package/es/map/index.js +1 -1
  17. package/es/multi-chat/index.js +210 -196
  18. package/es/multi-chat/style.css +1 -1
  19. package/es/multi-chat-client/index.js +203 -189
  20. package/es/multi-chat-client/style.css +1 -1
  21. package/es/multi-chat-history/index.js +37 -40
  22. package/es/multi-chat-record/index.js +37 -40
  23. package/es/multi-chat-setting/index.js +54 -57
  24. package/es/multi-chat-sip/index.js +1 -1
  25. package/es/radio/index.js +1 -1
  26. package/es/scale-view/index.js +70 -93
  27. package/es/select/index.js +36 -39
  28. package/es/select-label/index.js +47 -70
  29. package/es/select-person/index.js +35 -38
  30. package/es/table-filter/index.js +149 -145
  31. package/es/table-filter/style.css +1 -1
  32. package/es/tag/index.js +34 -37
  33. package/es/verification-code/index.js +2 -2
  34. package/lib/cui.common.js +783 -682
  35. package/lib/cui.umd.js +783 -682
  36. package/lib/cui.umd.min.js +24 -24
  37. package/package.json +1 -1
  38. package/packages/big-table/src/BigTable.vue +6 -1
  39. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +81 -50
  40. package/packages/multi-chat/chat/chatFooter.vue +1 -5
  41. package/packages/multi-chat/chat/chatMain.vue +29 -5
  42. package/packages/table-filter/src/const/dataOptions.js +10 -10
  43. package/packages/table-filter/src/quick-search/QuickSearch.vue +26 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.19",
3
+ "version": "2.1.22",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -593,6 +593,11 @@ export default create({
593
593
  setCurrentRow(row) {
594
594
  this.$refs.xGrid.setCurrentRow(row);
595
595
  },
596
+ setDefCheckboxRow(row) {
597
+ const vxeTable = this.$refs.xGrid;
598
+ let { tableData } = vxeTable.getTableData();
599
+ this.$refs.xGrid?.setCheckboxRow([tableData?.[0] || row], true);
600
+ },
596
601
  // 加载表格头部
597
602
  loadColumn(config) {
598
603
  this.isLoadColumn = false;
@@ -1288,7 +1293,7 @@ export default create({
1288
1293
  this.fieldKeyMap = {};
1289
1294
  const currentColumns = fieldList.map((item, index) => {
1290
1295
  this.fieldKeyMap[item.columnName] = item;
1291
- let filterField = item?.fieldSetting?.mapping?.type === 'manual' && item.isMerge != 1;
1296
+ let filterField = item?.fieldSetting?.mapping?.type === 'manual' && item.isMerge != 1 && item.notParticipatingSearch != 1;
1292
1297
  // 是否排序 1 不可排序
1293
1298
  let notParticipatingSort = item?.fieldSetting?.notParticipatingSort || '';
1294
1299
  // 有子列表fixed会遮盖 所以主表不设置fixed
@@ -14,6 +14,32 @@ import MouseRightClick from '../components/MouseRightClick';
14
14
  import DropPopup from '../components/DropPopup';
15
15
  import defaultVaule from '../const/defaultVaule';
16
16
 
17
+ /**
18
+ * @description: 递归遍历节点,设置颜色属性
19
+ * @param {fabric.Object[]} pointArr
20
+ * @param {string}} color
21
+ * @return {*}
22
+ */
23
+
24
+ function resetPointColor(pointArr, color) {
25
+ pointArr.forEach(point => {
26
+ const { fill, stroke } = point;
27
+ if (fill && !fill.includes('#fff') && fill !== 'transparent') {
28
+ point.set({ fill: color });
29
+ }
30
+ if (stroke && !stroke.includes('#fff') && stroke !== 'transparent') {
31
+ point.set({ stroke: color });
32
+ }
33
+ if (point._objects?.length) {
34
+ resetPointColor(point._objects, color);
35
+ }
36
+ });
37
+ }
38
+ const setPointLineColor = (point, color, conditionHasLine2) => {
39
+ point.line1?.set({ stroke: color });
40
+ conditionHasLine2 && point.line2?.set({ stroke: color });
41
+ };
42
+
17
43
  const isEffectiveNode = node => {
18
44
  return node?.time && (node?.value || node?.value === 0);
19
45
  };
@@ -470,6 +496,7 @@ export default {
470
496
  polylineTypeId,
471
497
  polylineIndex,
472
498
  pointerList,
499
+ color: lineAttr.stroke,
473
500
  pointList: res
474
501
  });
475
502
  }
@@ -572,45 +599,37 @@ export default {
572
599
  if (this.addPointList.length === 0) {
573
600
  this.$emit('pointChange', data);
574
601
  } else {
575
- const last = this.addPointList.at(-1);
602
+ const lastPoint = this.addPointList.at(-1);
603
+ const position = this.polyline[point.polylineTypeId].position;
576
604
  // 如果是重合/连线节点
577
605
  if (point.get('scaleX') !== point.scale) {
578
- const value = {
579
- ...last,
606
+ const addOjb = {
607
+ ...lastPoint,
580
608
  value: {
581
- time: this.getXValue(point.nextPoint.left),
582
- value: this.getYValue(this.polyline[point.polylineTypeId].position, point.nextPoint.top)
609
+ time: this.getXValue(this._concatPoint?.left),
610
+ value: this.getYValue(position, this._concatPoint?.top)
583
611
  }
584
612
  };
585
- if (point.line2) {
586
- this.addPointList.splice(-1, 1, {
587
- ...last,
588
- value: {
589
- time: this.getXValue(this._currentPoint.left),
590
- value: this.getYValue(this.polyline[point.polylineTypeId].position, this._currentPoint.top)
591
- }
592
- });
593
- this.addPointList.forEach(v => (v.isConcat = true));
613
+ if (lastPoint.value.time == addOjb.value.time) {
614
+ this.addPointList.splice(-1, 1, addOjb);
594
615
  } else {
595
- if (last.left === point.left) {
596
- this.addPointList.splice(-1, 1, value);
597
- } else {
598
- this.addPointList.push(value);
599
- const [lastPoint, prePoint, ...list] = JSON.parse(JSON.stringify(this.addPointList)).reverse();
600
- if (prePoint.value.time == lastPoint.value.time) {
601
- this.addPointList.splice(-2, 1);
602
- }
603
- }
616
+ this.addPointList.push(addOjb);
604
617
  }
605
- } else if (point.line2) {
618
+ this.addPointList.forEach(v => Object.assign(v, { isConcat: true, concatIndex: this._concatIndex }));
619
+ } else if (point.line2 || (point.nextPoint && lastPoint.left >= point.nextPoint.left)) {
620
+ // 1、存在右连线 2、无右侧连线,并且存在下一个节点的情况
606
621
  this.addPointList = [];
607
- this.repaintPolyline(this.polyline[point.polylineTypeId].position, point.polylineIndex);
622
+ this.repaintPolyline(position, point.polylineIndex);
608
623
  return;
609
624
  }
610
625
  !point.line2 && this.addPointList.splice(0, 1);
611
626
  !point.id.includes('isTitle') && this.removePolyline(point.id);
612
- this.$emit('pointOperation', 'increasePointBatch', this.addPointList);
613
- this.addPointList = [];
627
+ if (this.addPointList.length > 0) {
628
+ this.$emit('pointOperation', 'increasePointBatch', this.addPointList);
629
+ this.addPointList = [];
630
+ } else {
631
+ this.repaintPolyline(position, point.polylineIndex);
632
+ }
614
633
  }
615
634
  },
616
635
  // 设置批量新增数据
@@ -622,7 +641,7 @@ export default {
622
641
  this.addPointList.push(data);
623
642
  },
624
643
  /**
625
- * @description: 滑动批量新增节点
644
+ * @description: 拖动批量新增节点
626
645
  * @param {*} point 拖动的最后一个节点
627
646
  * @param {*} originLeft 拖动的源节点的left值
628
647
  * @param {*} originTop 拖动的源节点的top值
@@ -685,13 +704,7 @@ export default {
685
704
  // 复制点和线
686
705
  if (conditionNoLine2 || conditionHasLine2) {
687
706
  // point.line1 && this.removePolyline(point.line1.id);
688
- point.line1?.set({
689
- stroke: 'transparent'
690
- });
691
- conditionHasLine2 &&
692
- point.line2?.set({
693
- stroke: 'transparent'
694
- });
707
+ setPointLineColor(point, 'transparent', conditionHasLine2);
695
708
  // if (i === 1) {
696
709
  this.addPointList.length == 0 && (await this.clonePoint(point, [point.line1 ? point.line1.x1 : originLeft, point.line1 ? point.line1.y1 : originTop, originLeft, originTop]));
697
710
  // }
@@ -731,14 +744,38 @@ export default {
731
744
  }
732
745
 
733
746
  // 检查是否显示重合连线放大节点的标识
734
- if (conditionHasLine2) {
735
- const { polylineTypeId, polylineIndex } = point;
736
- const polylineObj = this.polylinePointList.find(v => v.polylineTypeId == polylineTypeId && v.polylineIndex == polylineIndex);
737
- const pointObjI = polylineObj?.pointerList.findIndex(v => v + n > left);
738
- pointObjI > -1 && concatPoint(polylineObj?.pointList[pointObjI]);
739
- this._currentPoint = polylineObj?.pointList[pointObjI];
740
- } else {
741
- point.nextPoint && concatPoint(point.nextPoint);
747
+ const { polylineTypeId, polylineIndex } = point;
748
+ const polylineObj = this.polylinePointList.find(v => v.polylineTypeId == polylineTypeId && v.polylineIndex == polylineIndex);
749
+ polylineObj?.pointList.forEach(v => v.bringToFront());
750
+ if (point.nextPoint) {
751
+ this._concatIndex = polylineObj?.pointerList.findIndex(v => v + n > left && v > originLeft);
752
+ if (!~this._concatIndex) {
753
+ point.set({
754
+ scaleX: point.scale,
755
+ scaleY: point.scale
756
+ });
757
+ } else {
758
+ concatPoint(polylineObj?.pointList[this._concatIndex]);
759
+ }
760
+ this._concatPoint = polylineObj?.pointList?.[this._concatIndex] || null;
761
+
762
+ // 被覆盖节点置灰配置
763
+ polylineObj?.pointerList.forEach((v, i) => {
764
+ const obj = polylineObj?.pointList[i];
765
+ if (v > originLeft && v < left) {
766
+ // 此处需要递归遍历group节点的所有子节点,然后更改其颜色
767
+ resetPointColor([obj], '#999');
768
+ obj.line2?.set({ stroke: '#999' });
769
+ } else {
770
+ resetPointColor([obj], polylineObj.color);
771
+ obj.line2?.set({ stroke: polylineObj.color });
772
+ }
773
+ });
774
+ if ((point.line1 || point.line2) && left < originLeft + spaceWidth) {
775
+ setPointLineColor(point, polylineObj.color, true);
776
+ } else {
777
+ setPointLineColor(point, 'transparent', true);
778
+ }
742
779
  }
743
780
 
744
781
  // 如果往回拖动则删除经过的已存在的节点
@@ -747,13 +784,7 @@ export default {
747
784
  this.addPointList = this.addPointList.filter(v => v.left < left);
748
785
  const endLength = this.addPointList.length;
749
786
  if (endLength === 0) {
750
- point.line1?.set({
751
- stroke: point.stroke
752
- });
753
- conditionHasLine2 &&
754
- point.line2?.set({
755
- stroke: point.stroke
756
- });
787
+ setPointLineColor(point, polylineObj?.color, conditionHasLine2);
757
788
  this.removePolyline('increasePointBatch', originLeft);
758
789
  }
759
790
  if (endLength > 0) {
@@ -121,11 +121,7 @@
121
121
  destroyOnClose
122
122
  :okText="i18nText('1.2.1.11.6')"
123
123
  :footer="null"
124
- @cancel="
125
- () => {
126
- this.modalShow = false;
127
- }
128
- "
124
+ @cancel="handleClose"
129
125
  @ok="handleOk"
130
126
  >
131
127
  <iframe id="toolbarIframe" v-if="modalData.targetType === 'LINK_ADDRESS'" width="100%" height="100%" frameborder="0" :src="modalData.address" allow="camera;midi"></iframe>
@@ -199,11 +199,7 @@
199
199
  destroyOnClose
200
200
  :okText="i18nText('1.2.1.11.6')"
201
201
  :footer="null"
202
- @cancel="
203
- () => {
204
- this.modalShow = false;
205
- }
206
- "
202
+ @cancel="handleClose"
207
203
  >
208
204
  <iframe id="chat-footer-modal" v-if="modalData.targetType === 'LINK_ADDRESS'" width="100%" height="100%" frameborder="0" :src="modalData.address" allow="camera;midi"></iframe>
209
205
  </a-modal>
@@ -648,10 +644,38 @@ export default {
648
644
  this.modalData = Object.assign({}, data, {
649
645
  address
650
646
  });
647
+ this.$nextTick().then(() => {
648
+ window.addEventListener('message', this.iframeEvent);
649
+ });
651
650
  return;
652
651
  }
653
652
  }
654
653
  },
654
+ iframeEvent(event) {
655
+ const method = event?.data?.method;
656
+ this[method]?.(event);
657
+ },
658
+ // 发送
659
+ handleParentMessageSend({ data, source, origin }) {
660
+ let params = {
661
+ assemblyId: this.assemblyId,
662
+ sessionId: this.sessionId,
663
+ orgId: this.orgId
664
+ };
665
+ params = Object.assign(params, data.data);
666
+ return fetch.post('/chat/access/sendToolBarData', qs.stringify(params)).then(({ data }) => {
667
+ if (data.result === 'SUCCESS') {
668
+ source.postMessage({ status: 0, resultMsg: data.resultMsg }, origin);
669
+ } else {
670
+ source.postMessage({ status: 1, resultMsg: data.resultMsg }, origin);
671
+ }
672
+ });
673
+ },
674
+ // 关闭
675
+ handleClose() {
676
+ this.modalShow = false;
677
+ window.removeEventListener('message', this.iframeEvent);
678
+ },
655
679
  handleTemplateDetail(item) {
656
680
  let content = this.getContent(item) || {};
657
681
  let setting = content.customerSetting || {};
@@ -18,26 +18,26 @@ export const dataOptions = {
18
18
  ],
19
19
  dateTeam2: [
20
20
  { con: 'TODAY', title: '1.1.4.37', name: '今天' },
21
- { con: 'TOMORROW', title: '1.1.4.38', name: '明天' },
21
+ { con: 'YESTERDAY', title: '1.1.4.39', name: '昨天' },
22
22
  { con: 'THIS_WEEK', title: '1.1.4.40', name: '本周' },
23
- { con: 'NEXT_WEEK', title: '1.1.4.41', name: '下周' },
23
+ { con: 'UP_WEEK', title: '1.1.4.42', name: '上周' },
24
24
  { con: 'THIS_MONTH', title: '1.1.4.43', name: '本月' },
25
- { con: 'NEXT_MONTH', title: '1.1.4.44', name: '下月' },
25
+ { con: 'UP_MONTH', title: '1.1.4.45', name: '上月' },
26
26
  { con: 'THIS_SEASON', title: '1.1.4.46', name: '本季度' },
27
- { con: 'NEXT_SEASON', title: '1.1.4.47', name: '下季度' },
27
+ { con: 'UP_SEASON', title: '1.1.4.48', name: '上季度' },
28
28
  { con: 'THIS_YEAR', title: '1.1.4.49', name: '本年' },
29
- { con: 'NEXT_YEAR', title: '1.1.4.50', name: '下年' }
29
+ { con: 'UP_YEAR', title: '1.1.4.51', name: '上年' }
30
30
  ],
31
31
  dateTeam3: [
32
32
  { con: 'TODAY', title: '1.1.4.37', name: '今天' },
33
- { con: 'YESTERDAY', title: '1.1.4.39', name: '昨天' },
33
+ { con: 'TOMORROW', title: '1.1.4.38', name: '明天' },
34
34
  { con: 'THIS_WEEK', title: '1.1.4.40', name: '本周' },
35
- { con: 'UP_WEEK', title: '1.1.4.42', name: '上周' },
35
+ { con: 'NEXT_WEEK', title: '1.1.4.41', name: '下周' },
36
36
  { con: 'THIS_MONTH', title: '1.1.4.43', name: '本月' },
37
- { con: 'UP_MONTH', title: '1.1.4.45', name: '上月' },
37
+ { con: 'NEXT_MONTH', title: '1.1.4.44', name: '下月' },
38
38
  { con: 'THIS_SEASON', title: '1.1.4.46', name: '本季度' },
39
- { con: 'UP_SEASON', title: '1.1.4.48', name: '上季度' },
39
+ { con: 'NEXT_SEASON', title: '1.1.4.47', name: '下季度' },
40
40
  { con: 'THIS_YEAR', title: '1.1.4.49', name: '本年' },
41
- { con: 'UP_YEAR', title: '1.1.4.51', name: '上年' }
41
+ { con: 'NEXT_YEAR', title: '1.1.4.50', name: '下年' }
42
42
  ]
43
43
  };
@@ -245,6 +245,7 @@
245
245
  :placeholder="getI18nText('1.1.4.53', '开始时间')"
246
246
  style="width: 120px"
247
247
  allowClear
248
+ :disabledDate="current => disabledDatePicker(current, item)"
248
249
  />
249
250
  &nbsp;
250
251
  <a-date-picker
@@ -256,6 +257,7 @@
256
257
  v-model="item.DATE.end_val"
257
258
  style="width: 120px"
258
259
  allowClear
260
+ :disabledDate="current => disabledDatePicker(current, item)"
259
261
  />
260
262
  </div>
261
263
  </a-radio-group>
@@ -1849,6 +1851,30 @@ export default create({
1849
1851
  return this.$t ? this.$t.apply(this, i) : d;
1850
1852
  }
1851
1853
  return this.$t ? this.$t(i) : d;
1854
+ },
1855
+
1856
+ /**
1857
+ * 限制日期填写
1858
+ */
1859
+ disabledDatePicker(current,item){
1860
+ /**
1861
+ * 2 过去时间
1862
+ * 3 未来时间
1863
+ */
1864
+ let type = String(item?.advanceOptionSetting);
1865
+ if(!['2','3'].includes(type)) return false;
1866
+ if(type === '2'){
1867
+ return current >= this.$moment().endOf('day');
1868
+ } else if(type==='3'){
1869
+ return current && current < this.$moment().startOf('day');
1870
+ }
1871
+ return false
1872
+ },
1873
+ /**
1874
+ * 限制时间
1875
+ */
1876
+ disabledTimePicker(current,item){
1877
+
1852
1878
  }
1853
1879
  },
1854
1880
  directives: { resize }