cnhis-design-vue 3.3.3-beta.65 → 3.3.3-beta.67

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 (51) hide show
  1. package/README.md +87 -87
  2. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +7 -1
  3. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +7 -1
  4. package/es/components/button-print/src/utils/print.d.ts +3 -3
  5. package/es/components/button-print/src/utils/print.js +11 -0
  6. package/es/components/classification/index.d.ts +506 -4
  7. package/es/components/classification/src/components/search-filter/index.vue.d.ts +506 -4
  8. package/es/components/classification/src/components/set-classification/index.vue.d.ts +506 -4
  9. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  10. package/es/components/classification/src/index.vue.d.ts +509 -4
  11. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +3 -2
  12. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +3 -2
  13. package/es/components/field-set/src/FieldColor.vue.d.ts +4 -4
  14. package/es/components/field-set/src/FieldFilter.vue.d.ts +4 -4
  15. package/es/components/field-set/src/FieldSet.vue.d.ts +5 -5
  16. package/es/components/field-set/src/components/table-row.vue.d.ts +4 -4
  17. package/es/components/form-config/index.d.ts +12 -12
  18. package/es/components/form-config/src/FormConfig.vue.d.ts +12 -12
  19. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +8 -8
  20. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +2 -2
  21. package/es/components/iho-chat/index.d.ts +1 -1
  22. package/es/components/iho-chat/src/Index.vue.d.ts +1 -1
  23. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  24. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  25. package/es/components/iho-chat/src/components/Video.vue.d.ts +1 -1
  26. package/es/components/shortcut-setter/index.d.ts +2 -2
  27. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +2 -2
  28. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +489 -0
  29. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +8 -2
  30. package/es/components/table-filter/src/components/classify-filter/components/Base/DateOption.vue.d.ts +226 -0
  31. package/es/components/table-filter/src/components/classify-filter/components/Base/DateOption.vue.js +6 -0
  32. package/es/components/table-filter/src/components/classify-filter/components/Base/DateOption.vue2.js +156 -0
  33. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +238 -0
  34. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +43 -4
  35. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +238 -0
  36. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +45 -4
  37. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +476 -0
  38. package/es/components/table-filter/src/components/classify-filter/helpers/options.d.ts +5 -1
  39. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +123 -2
  40. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +506 -4
  41. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +11 -5
  42. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
  43. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +1 -1
  44. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
  45. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -3
  46. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +3 -3
  47. package/es/components/table-filter/src/types/enums.d.ts +12 -0
  48. package/es/components/table-filter/src/types/enums.js +13 -1
  49. package/es/env.d.ts +25 -25
  50. package/es/shared/package.json.js +1 -1
  51. package/package.json +2 -2
package/README.md CHANGED
@@ -1,87 +1,87 @@
1
- # 安装
2
-
3
- ```shell
4
- npm i cnhis-design-vue@[版本号]
5
- # or
6
- yarn add cnhis-design-vue@[版本号] #推荐
7
- ```
8
-
9
- ## 1.全局引入
10
-
11
- ```typescript
12
- // main.ts
13
- import { createApp } from 'vue';
14
- import App from './App.vue';
15
- import 'cnhis-design-vue/es/packages/index.css';
16
- import cui from 'cnhis-design-vue';
17
-
18
- const app = createApp(App);
19
- app.use(cui).mount('#app');
20
- ```
21
-
22
- ## 2. 按需引入
23
-
24
- 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
-
26
- ### 2.1 样式处理方式1 (按需引入样式)
27
-
28
- ```shell
29
- # 安装自动导入样式的插件
30
- npm i -d vite-plugin-style-import
31
- ```
32
-
33
- ```typescript
34
- // vite.config.ts
35
- import { defineConfig } from 'vite';
36
- import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
-
38
- export default defineConfig({
39
- plugins: [
40
- // ...otherPlugins
41
- createStyleImportPlugin({
42
- libs: [
43
- {
44
- libraryName: 'cnhis-design-vue',
45
- esModule: true,
46
- ensureStyleFile: true,
47
- resolveStyle: name => {
48
- return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
- }
50
- }
51
- ]
52
- })
53
- ]
54
- });
55
- ```
56
-
57
- ### 2.2 样式处理方式2 (全局引入样式)
58
-
59
- ```typescript
60
- // main.ts
61
- import 'cnhis-design-vue/es/components/index.css';
62
- ```
63
-
64
- ## 3.FAQ
65
-
66
- ### 3.1 项目打包后样式丢失
67
-
68
- 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
-
70
- ```typescript
71
- // vite.config.ts
72
- import { defineConfig } from 'vite';
73
-
74
- export default defineConfig({
75
- build: {
76
- rollupOptions: {
77
- // ..otherOptions
78
- output: {
79
- dir: './dist',
80
- manualChunks: {
81
- 'cnhis-vendor': ['cnhis-design-vue']
82
- }
83
- }
84
- }
85
- }
86
- });
87
- ```
1
+ # 安装
2
+
3
+ ```shell
4
+ npm i cnhis-design-vue@[版本号]
5
+ # or
6
+ yarn add cnhis-design-vue@[版本号] #推荐
7
+ ```
8
+
9
+ ## 1.全局引入
10
+
11
+ ```typescript
12
+ // main.ts
13
+ import { createApp } from 'vue';
14
+ import App from './App.vue';
15
+ import 'cnhis-design-vue/es/packages/index.css';
16
+ import cui from 'cnhis-design-vue';
17
+
18
+ const app = createApp(App);
19
+ app.use(cui).mount('#app');
20
+ ```
21
+
22
+ ## 2. 按需引入
23
+
24
+ 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
+
26
+ ### 2.1 样式处理方式1 (按需引入样式)
27
+
28
+ ```shell
29
+ # 安装自动导入样式的插件
30
+ npm i -d vite-plugin-style-import
31
+ ```
32
+
33
+ ```typescript
34
+ // vite.config.ts
35
+ import { defineConfig } from 'vite';
36
+ import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
+
38
+ export default defineConfig({
39
+ plugins: [
40
+ // ...otherPlugins
41
+ createStyleImportPlugin({
42
+ libs: [
43
+ {
44
+ libraryName: 'cnhis-design-vue',
45
+ esModule: true,
46
+ ensureStyleFile: true,
47
+ resolveStyle: name => {
48
+ return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
+ }
50
+ }
51
+ ]
52
+ })
53
+ ]
54
+ });
55
+ ```
56
+
57
+ ### 2.2 样式处理方式2 (全局引入样式)
58
+
59
+ ```typescript
60
+ // main.ts
61
+ import 'cnhis-design-vue/es/components/index.css';
62
+ ```
63
+
64
+ ## 3.FAQ
65
+
66
+ ### 3.1 项目打包后样式丢失
67
+
68
+ 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
+
70
+ ```typescript
71
+ // vite.config.ts
72
+ import { defineConfig } from 'vite';
73
+
74
+ export default defineConfig({
75
+ build: {
76
+ rollupOptions: {
77
+ // ..otherOptions
78
+ output: {
79
+ dir: './dist',
80
+ manualChunks: {
81
+ 'cnhis-vendor': ['cnhis-design-vue']
82
+ }
83
+ }
84
+ }
85
+ }
86
+ });
87
+ ```
@@ -794,9 +794,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
794
794
  templateId,
795
795
  params: curPrintParamList
796
796
  }).then(() => {
797
+ var _a;
797
798
  state.curPrintParamList = curPrintParamList;
798
799
  const paramsFirst = JSON.stringify(Object.assign({}, JSON.parse(getPrintParams()), curPrintParamList[0], printCustomProps.value));
799
800
  const params = props.strategy === "MULTI" ? paramsFirst : getOnceParams(curPrintParamList, templateCode);
801
+ const curFormatIdObj = (_a = state == null ? void 0 : state.formatList) == null ? void 0 : _a.find((item) => item.id == formatId);
800
802
  const queryParams = {
801
803
  formatId,
802
804
  templateId,
@@ -809,7 +811,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
809
811
  resolution: props == null ? void 0 : props.resolution
810
812
  },
811
813
  params,
812
- signature: props.signature
814
+ signature: props.signature,
815
+ formatItem: curFormatIdObj
813
816
  };
814
817
  printInstance.downloadPDF(queryParams, (res) => callLocalServicesSuccessCb(res, "preview"), callLocalServicesErrorCb);
815
818
  }).catch(() => {
@@ -1184,6 +1187,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1184
1187
  state.originParams = formatSomeOriginParams(state.templateParams, props.params);
1185
1188
  };
1186
1189
  const verifiySuccess = (token) => {
1190
+ var _a;
1187
1191
  state.identityVerification.visible = false;
1188
1192
  if (isIReport(state.currentFormatId))
1189
1193
  return callLocalServicesSuccessCb({
@@ -1192,10 +1196,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1192
1196
  }, "edit");
1193
1197
  const paramsFirst = JSON.stringify(Object.assign({}, JSON.parse(getPrintParams()), state.curPrintParamList[0], printCustomProps.value));
1194
1198
  const params = props.strategy === "MULTI" ? paramsFirst : getOnceParams(state.curPrintParamList, getTemplateCodeByFormatId.value);
1199
+ const curFormatIdObj = (_a = state == null ? void 0 : state.formatList) == null ? void 0 : _a.find((item) => item.id == state.currentFormatId);
1195
1200
  const queryParams = {
1196
1201
  formatId: state.currentFormatId,
1197
1202
  number: state.number,
1198
1203
  templateId: getTemplateIdByFormatId.value,
1204
+ formatItem: curFormatIdObj,
1199
1205
  params,
1200
1206
  token
1201
1207
  };
@@ -446,7 +446,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
446
446
  formatId: state.currentFormatId,
447
447
  templateId: getTemplateIdByFormatId.value
448
448
  }).then(() => {
449
+ var _a2;
449
450
  const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
451
+ const curFormatIdObj = (_a2 = state == null ? void 0 : state.formatList) == null ? void 0 : _a2.find((item) => item.id == state.currentFormatId);
450
452
  const queryParams = {
451
453
  formatId: state.currentFormatId,
452
454
  iReportExecuteMode: state.iReportExecuteMode,
@@ -459,7 +461,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
459
461
  resolution: props == null ? void 0 : props.resolution
460
462
  },
461
463
  params,
462
- signature: props.signature
464
+ signature: props.signature,
465
+ formatItem: curFormatIdObj
463
466
  };
464
467
  printInstance.downloadPDF(queryParams, (res) => callLocalServicesSuccessCb(res, "download"), callLocalServicesErrorCb);
465
468
  }).catch(() => {
@@ -723,13 +726,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
723
726
  state.printParams = formatParams(state.templateParams, props.params);
724
727
  };
725
728
  const verifiySuccess = (token) => {
729
+ var _a2;
726
730
  state.identityVerification.visible = false;
727
731
  if (isIReport(state.currentFormatId))
728
732
  return callLocalServicesSuccessCb(null, "edit");
733
+ const curFormatIdObj = (_a2 = state == null ? void 0 : state.formatList) == null ? void 0 : _a2.find((item) => item.id == state.currentFormatId);
729
734
  const queryParams = {
730
735
  formatId: state.currentFormatId,
731
736
  number: state.number,
732
737
  templateId: getTemplateIdByFormatId.value,
738
+ formatItem: curFormatIdObj,
733
739
  params: getPrintParams(),
734
740
  token
735
741
  };
@@ -57,8 +57,8 @@ export declare class Print {
57
57
  pageCount: any;
58
58
  formatId: string;
59
59
  };
60
- _handleEventDirect({ templateId, formatId, number, svrUpdateIp, apptype, printname, uuid, priority, hideButtons, params, paramsArr, cmdid, print, signature, copies, printdlgshow, nobillnode, btnprint, messageTimeout }: AnyObject): Promise<any>;
61
- _handleEventEditFormat({ templateId, formatId, number, params, token, messageTimeout }: AnyObject): Promise<any>;
60
+ _handleEventDirect({ templateId, formatId, number, svrUpdateIp, apptype, printname, uuid, priority, hideButtons, params, paramsArr, cmdid, print, signature, copies, printdlgshow, watermark, nobillnode, btnprint, messageTimeout }: AnyObject): Promise<any>;
61
+ _handleEventEditFormat({ templateId, formatId, number, watermark, params, token, messageTimeout }: AnyObject): Promise<any>;
62
62
  _queryProxyOrigin(): Promise<void>;
63
63
  _queryPrintFile(formatId: string, params?: string): Promise<any>;
64
64
  paramsSerializer(params: AnyObject): AnyObject;
@@ -85,6 +85,6 @@ export declare class Print {
85
85
  formatId: string;
86
86
  }>;
87
87
  printFileData({ formatId, file, printerName }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<false | AnyObject>;
88
- editPrintFormat({ templateId, formatId, number, params, token, messageTimeout }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<false | undefined>;
88
+ editPrintFormat({ templateId, formatId, number, formatItem, params, token, messageTimeout }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<false | undefined>;
89
89
  addPrintFormat({ templateId, params, token }: AnyObject, successCallbackFn?: AnyFn, errorCallbackFn?: AnyFn): Promise<false | undefined>;
90
90
  }
@@ -699,6 +699,7 @@ class Print {
699
699
  signature,
700
700
  copies,
701
701
  printdlgshow = "0",
702
+ watermark,
702
703
  nobillnode = "1",
703
704
  btnprint = "1",
704
705
  messageTimeout = 0
@@ -717,6 +718,7 @@ class Print {
717
718
  cmdid,
718
719
  nobillnode,
719
720
  printdlgshow,
721
+ watermark,
720
722
  btnprint,
721
723
  copies,
722
724
  messageTimeout,
@@ -748,6 +750,7 @@ class Print {
748
750
  templateId,
749
751
  formatId = "",
750
752
  number,
753
+ watermark,
751
754
  params = "",
752
755
  token,
753
756
  messageTimeout = 0
@@ -763,6 +766,7 @@ class Print {
763
766
  templateId,
764
767
  formatId,
765
768
  number,
769
+ watermark,
766
770
  cmdid: "9",
767
771
  token,
768
772
  params: JSON.stringify(formatParams),
@@ -925,6 +929,7 @@ class Print {
925
929
  try {
926
930
  const hideButtonsValue = hideButtons ? hideButtons : (formatItem == null ? void 0 : formatItem.previewCanExport) === void 0 || (formatItem == null ? void 0 : formatItem.previewCanExport) ? void 0 : "Export";
927
931
  const btnprintValue = btnprint != "1" ? btnprint : (formatItem == null ? void 0 : formatItem.previewCanPrint) === false ? "0" : "1";
932
+ const watermark = (formatItem == null ? void 0 : formatItem.showWatermark) ? "1" : void 0;
928
933
  const result = await this._handleEventDirect({
929
934
  templateId,
930
935
  number,
@@ -932,6 +937,7 @@ class Print {
932
937
  params,
933
938
  paramsArr,
934
939
  cmdid: this.isRemote ? PRINT_CMD_ID : PREVIEW_CMD_ID,
940
+ watermark,
935
941
  signature,
936
942
  btnprint: btnprintValue,
937
943
  hideButtons: hideButtonsValue,
@@ -1142,6 +1148,7 @@ class Print {
1142
1148
  this._notifyPrintQueueMap.callback.set(uuid, printQueueCallbackFn);
1143
1149
  }
1144
1150
  const printdlgshowValue = printdlgshow != "0" ? printdlgshow : (formatItem == null ? void 0 : formatItem.showPrintDialog) ? "1" : "0";
1151
+ const watermark = (formatItem == null ? void 0 : formatItem.showWatermark) ? "1" : void 0;
1145
1152
  const result = await this._handleEventDirect({
1146
1153
  templateId,
1147
1154
  number,
@@ -1152,6 +1159,7 @@ class Print {
1152
1159
  print,
1153
1160
  signature,
1154
1161
  printdlgshow: printdlgshowValue,
1162
+ watermark,
1155
1163
  nobillnode,
1156
1164
  copies,
1157
1165
  svrUpdateIp,
@@ -1364,6 +1372,7 @@ class Print {
1364
1372
  templateId,
1365
1373
  formatId,
1366
1374
  number,
1375
+ formatItem,
1367
1376
  params,
1368
1377
  token,
1369
1378
  messageTimeout = 0
@@ -1371,9 +1380,11 @@ class Print {
1371
1380
  const testResult = await this._testConnection();
1372
1381
  if (!this._handleResultTest(testResult, errorCallbackFn))
1373
1382
  return false;
1383
+ const watermark = (formatItem == null ? void 0 : formatItem.showWatermark) ? "1" : void 0;
1374
1384
  const result = await this._handleEventEditFormat({
1375
1385
  templateId,
1376
1386
  formatId,
1387
+ watermark,
1377
1388
  number,
1378
1389
  params,
1379
1390
  token,