cnhis-design-vue 3.1.40-beta.0 → 3.1.40-beta.2

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 (55) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/style/index.css +1 -1
  3. package/es/components/button-print/src/utils/print.js +6 -1
  4. package/es/components/form-render/index.js +1 -1
  5. package/es/components/form-render/src/FormRender.vue.js +1 -0
  6. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -0
  7. package/es/components/form-render/src/components/renderer/select.js +4 -2
  8. package/es/components/form-render/src/hooks/index.js +1 -1
  9. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
  10. package/es/components/form-render/src/hooks/useFormRenderOptions.js +25 -21
  11. package/es/components/form-render/style/index.css +1 -1
  12. package/es/components/iho-table/src/IhoTable.vue.js +2 -1
  13. package/es/components/index.css +1 -1
  14. package/es/components/index.js +1 -1
  15. package/es/components/info-header/src/InfoHeader.vue.js +8 -1
  16. package/es/components/scale-view/index.d.ts +5 -2
  17. package/es/components/scale-view/src/ScaleView.vue.d.ts +5 -2
  18. package/es/components/scale-view/src/ScaleView.vue.js +5 -4
  19. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -0
  20. package/es/components/scale-view/src/hooks/scaleview-computed.js +76 -31
  21. package/es/components/scale-view/src/hooks/use-evaluate.js +13 -13
  22. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +2 -1
  23. package/es/env.d.ts +24 -24
  24. package/es/shared/assets/img/failure.js +1 -1
  25. package/es/shared/assets/img/failure.png.js +1 -1
  26. package/es/shared/assets/img/icon-asc.js +1 -1
  27. package/es/shared/assets/img/icon-desc.js +1 -1
  28. package/es/shared/assets/img/no-permission.js +1 -1
  29. package/es/shared/assets/img/no-permission.png.js +1 -1
  30. package/es/shared/assets/img/nodata.js +1 -1
  31. package/es/shared/assets/img/nodata.png.js +1 -1
  32. package/es/shared/assets/img/notfound.js +1 -1
  33. package/es/shared/assets/img/notfound.png.js +1 -1
  34. package/es/shared/assets/img/qr.js +1 -1
  35. package/es/shared/assets/img/qr.png.js +1 -1
  36. package/es/shared/assets/img/success.js +1 -1
  37. package/es/shared/assets/img/success.png.js +1 -1
  38. package/es/shared/assets/img/video.js +1 -1
  39. package/es/shared/assets/img/video.png.js +1 -1
  40. package/es/shared/assets/img/video_default_cover.js +1 -1
  41. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  42. package/es/shared/assets/img/video_hover.js +1 -1
  43. package/es/shared/assets/img/video_play_hover.js +1 -1
  44. package/es/shared/assets/img/xb_big.js +1 -1
  45. package/es/shared/assets/img/xb_big.png.js +1 -1
  46. package/es/shared/assets/img/xb_small.js +1 -1
  47. package/es/shared/assets/img/xb_small.png.js +1 -1
  48. package/package.json +2 -2
  49. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  50. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  51. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  52. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  53. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  54. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  55. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -5,7 +5,8 @@ import moment from 'moment';
5
5
  import { componentMapStr } from './use-component.js';
6
6
 
7
7
  const ScaleViewComputed = (props, state, config) => {
8
- let { query } = config;
8
+ const { query } = config;
9
+ const cur = new Date().getTime();
9
10
  const queryformBoldOpen = computed(() => {
10
11
  return (query == null ? void 0 : query.formBoldOpen) == 1;
11
12
  });
@@ -15,8 +16,43 @@ const ScaleViewComputed = (props, state, config) => {
15
16
  return false;
16
17
  return (query == null ? void 0 : query.evatip) == 1 || ((_a = props.params) == null ? void 0 : _a.evatip) == 1;
17
18
  });
19
+ const evaluateResultSetting = computed(() => {
20
+ var _a;
21
+ return ((_a = state.config) == null ? void 0 : _a.evaluateResultSetting) || {};
22
+ });
23
+ const getEvaluateTime = computed(() => {
24
+ const { evaluateTime } = evaluateResultSetting.value;
25
+ return +evaluateTime;
26
+ });
27
+ const evaluateStartTime = computed(() => {
28
+ var _a;
29
+ return (_a = evaluateResultSetting.value) == null ? void 0 : _a.evaluateStartTime;
30
+ });
31
+ const getEvaluateStartTime = computed(() => {
32
+ const tempSt = new Date(evaluateStartTime.value);
33
+ const isValidDate = XEUtils.isValidDate(tempSt);
34
+ if (!isValidDate)
35
+ return false;
36
+ return tempSt;
37
+ });
38
+ const evaBanEnd = computed(() => {
39
+ if (!evaluateStartTime.value || !getEvaluateTime.value)
40
+ return false;
41
+ const startTime = getEvaluateStartTime.value;
42
+ if (!startTime)
43
+ return false;
44
+ const endTime = moment(evaluateStartTime.value).add(getEvaluateTime.value, "minutes").valueOf();
45
+ return cur >= endTime;
46
+ });
47
+ const evaBanStart = computed(() => {
48
+ const startTime = getEvaluateStartTime.value;
49
+ if (!startTime)
50
+ return false;
51
+ const sT = moment(startTime).valueOf();
52
+ return cur < sT;
53
+ });
18
54
  const isFormBoldOpen = computed(() => (item) => {
19
- let res = item.required;
55
+ const res = item.required;
20
56
  if (!props.styleSetting || !Object.keys(props.styleSetting).length || !("formBoldOpen" in props.styleSetting)) {
21
57
  return res && queryformBoldOpen.value;
22
58
  }
@@ -53,15 +89,15 @@ const ScaleViewComputed = (props, state, config) => {
53
89
  });
54
90
  const handleShowQuestionNumber = computed(() => (item) => {
55
91
  var _a;
56
- let { type } = item || {};
57
- let tempTile = ((_a = state.config) == null ? void 0 : _a.autoQuestionNumber) === false ? item.showTitle : `${item.softcode}\u3001${item.showTitle}`;
92
+ const { type } = item || {};
93
+ const tempTile = ((_a = state.config) == null ? void 0 : _a.autoQuestionNumber) === false ? item.showTitle : `${item.softcode}\u3001${item.showTitle}`;
58
94
  if (!isEvaluation(type))
59
95
  return tempTile;
60
- let score = handleEvaluationScore(item);
96
+ const score = handleEvaluationScore(item);
61
97
  return `${tempTile}&nbsp;<span style="color:#2d7aff;" class="score-i">${score}</span>`;
62
98
  });
63
99
  const hasScore = computed(() => {
64
- let { config: config2 } = state;
100
+ const { config: config2 } = state;
65
101
  if (!config2 || !Object.keys(config2).length)
66
102
  return false;
67
103
  if ("totalScore" in config2)
@@ -70,9 +106,17 @@ const ScaleViewComputed = (props, state, config) => {
70
106
  });
71
107
  const isPreviewScale = computed(() => {
72
108
  var _a;
73
- let guage_id = (_a = state.ids) == null ? void 0 : _a.guage_id;
109
+ const guage_id = (_a = props.ids) == null ? void 0 : _a.guage_id;
74
110
  return guage_id && props.noBtn;
75
111
  });
112
+ const skipCover = computed(() => {
113
+ const params = props.params || {};
114
+ if (!("skipCover" in params)) {
115
+ return false;
116
+ }
117
+ const res = params.skipCover && !evaBanStart.value && !evaBanEnd.value;
118
+ return res;
119
+ });
76
120
  const showEvaluateEntry = computed(() => {
77
121
  return !isPreviewScale.value && state.showEvaluatePage && state.showEvaluateSettingWrap && !state.isFinished && !props.noBtn && !props.hideBtn;
78
122
  });
@@ -80,8 +124,8 @@ const ScaleViewComputed = (props, state, config) => {
80
124
  return !isPreviewScale.value && !showEvaluateEntry.value && state.showEvaluateCountdownWrap && !state.isFinished && !props.noBtn && !props.hideBtn;
81
125
  });
82
126
  const hasEvaluateResultSetting = computed(() => {
83
- let { evaluateResultSetting = {} } = state.config;
84
- let valueArr = Object.values(evaluateResultSetting).filter((item) => {
127
+ const { evaluateResultSetting: evaluateResultSetting2 = {} } = state.config;
128
+ const valueArr = Object.values(evaluateResultSetting2).filter((item) => {
85
129
  if (item)
86
130
  return true;
87
131
  }) || [];
@@ -91,11 +135,11 @@ const ScaleViewComputed = (props, state, config) => {
91
135
  return state.paramsEvaluate && Object.keys(state.paramsEvaluate).length;
92
136
  });
93
137
  const hasDefault = computed(() => {
94
- let hash = window.location.search;
138
+ const hash = window.location.search || window.location.hash;
95
139
  if (!hash)
96
140
  return;
97
- let defaultVariable = ["evaname", "evadesc", "evast", "evadur", "evaan"];
98
- let hasDefaultItem = defaultVariable.find((item) => hash.includes(item));
141
+ const defaultVariable = ["evaname", "evadesc", "evast", "evadur", "evaan"];
142
+ const hasDefaultItem = defaultVariable.find((item) => hash.includes(item));
99
143
  return state.paramsEvaluate || hasDefaultItem;
100
144
  });
101
145
  const showSaveBtn = computed(() => {
@@ -111,7 +155,7 @@ const ScaleViewComputed = (props, state, config) => {
111
155
  return !!props.hideBtn || !!props.isLock || state.isFinished;
112
156
  });
113
157
  const showEvaluateLabel = computed(() => (item) => {
114
- let obj = {
158
+ const obj = {
115
159
  EVALUATE_RADIO_BLOCK: "\u5355\u9009\u9898",
116
160
  EVALUATE_CHECKBOX_BLOCK: "\u591A\u9009\u9898"
117
161
  };
@@ -119,17 +163,17 @@ const ScaleViewComputed = (props, state, config) => {
119
163
  });
120
164
  const showAnswerParse = computed(() => (item) => {
121
165
  var _a;
122
- let { evaluateAnswer, checkAnswerMode, evaluateStartTime, evaluateTime } = ((_a = state.config) == null ? void 0 : _a.evaluateResultSetting) || {};
123
- let arr = ["EVALUATE_RADIO_BLOCK", "EVALUATE_CHECKBOX_BLOCK", "EVALUATE_SELECT", "EVALUATE_INPUT"];
124
- let maxScore = (item == null ? void 0 : item.scoreConfigs) || 0;
125
- let isShow = evaluateAnswer && state.isFinished && arr.includes(item.type) && maxScore;
126
- if (!evaluateStartTime || !evaluateTime || checkAnswerMode && checkAnswerMode == 1) {
166
+ const { evaluateAnswer, checkAnswerMode, evaluateStartTime: evaluateStartTime2, evaluateTime } = ((_a = state.config) == null ? void 0 : _a.evaluateResultSetting) || {};
167
+ const arr = ["EVALUATE_RADIO_BLOCK", "EVALUATE_CHECKBOX_BLOCK", "EVALUATE_SELECT", "EVALUATE_INPUT"];
168
+ const maxScore = (item == null ? void 0 : item.scoreConfigs) || 0;
169
+ const isShow = evaluateAnswer && state.isFinished && arr.includes(item.type) && maxScore;
170
+ if (!evaluateStartTime2 || !evaluateTime || checkAnswerMode && checkAnswerMode == 1) {
127
171
  return isShow;
128
172
  }
129
- if (!XEUtils.isValidDate(new Date(evaluateStartTime)))
173
+ if (!XEUtils.isValidDate(new Date(evaluateStartTime2)))
130
174
  return isShow;
131
- let endTime = moment(evaluateStartTime).add(evaluateTime, "minutes");
132
- let isRang = endTime.diff(moment(), "seconds", true);
175
+ const endTime = moment(evaluateStartTime2).add(evaluateTime, "minutes");
176
+ const isRang = endTime.diff(moment(), "seconds", true);
133
177
  return isShow && isRang <= 0;
134
178
  });
135
179
  const tipMsg = computed(() => {
@@ -184,8 +228,8 @@ const ScaleViewComputed = (props, state, config) => {
184
228
  const propsConfig = computed(() => (item, index) => {
185
229
  var _a;
186
230
  const propType = componentMapStr[item.type];
187
- let useProps = comProsMap[propType] || {};
188
- let propsObj = {
231
+ const useProps = comProsMap[propType] || {};
232
+ const propsObj = {
189
233
  form: state.form,
190
234
  item,
191
235
  index,
@@ -232,8 +276,8 @@ const ScaleViewComputed = (props, state, config) => {
232
276
  const { relation_logic_is, condition, relation_logic } = relationLogicObj;
233
277
  if (relation_logic_is) {
234
278
  const results = condition.map((c) => {
235
- let mItem = formArray.filter((f) => f.seq == c.subject_seq)[0];
236
- let key = formKey(mItem);
279
+ const mItem = formArray.filter((f) => f.seq == c.subject_seq)[0];
280
+ const key = formKey(mItem);
237
281
  if (XEUtils.isArray(form[key])) {
238
282
  return form[key].some((v) => c.value.includes(v));
239
283
  } else {
@@ -254,25 +298,25 @@ const ScaleViewComputed = (props, state, config) => {
254
298
  return item.databaseTitle || item.title;
255
299
  };
256
300
  const handleEvaluationScore = (ele) => {
257
- let { minScore = 0, maxScore = 0, scoreType } = ele.scoreConfigs || {};
301
+ const { minScore = 0, maxScore = 0, scoreType } = ele.scoreConfigs || {};
258
302
  return `(${maxScore}\u5206)`;
259
303
  };
260
304
  const evaluatePageProps = computed(() => {
261
- var _a, _b;
305
+ var _a;
262
306
  return {
263
307
  formArray: state.formArray,
264
308
  evaluateResultConfig: ((_a = state.config) == null ? void 0 : _a.evaluateResultConfig) || {},
265
- evaluateResultSetting: ((_b = state.config) == null ? void 0 : _b.evaluateResultSetting) || {},
309
+ evaluateResultSetting: evaluateResultSetting.value,
266
310
  isFinished: state.isFinished,
267
311
  maxScore: state.maxScore
268
312
  };
269
313
  });
270
314
  const evaluateCountdownProps = computed(() => {
271
- var _a, _b;
315
+ var _a;
272
316
  return {
273
317
  formArray: state.formArray,
274
318
  evaluateResultConfig: ((_a = state.config) == null ? void 0 : _a.evaluateResultConfig) || {},
275
- evaluateResultSetting: ((_b = state.config) == null ? void 0 : _b.evaluateResultSetting) || {},
319
+ evaluateResultSetting: evaluateResultSetting.value,
276
320
  form: state.form,
277
321
  isFinished: state.isFinished,
278
322
  currentTime: state.currentTime,
@@ -302,7 +346,8 @@ const ScaleViewComputed = (props, state, config) => {
302
346
  showEvent,
303
347
  formKey,
304
348
  evaluatePageProps,
305
- evaluateCountdownProps
349
+ evaluateCountdownProps,
350
+ skipCover
306
351
  };
307
352
  };
308
353
 
@@ -3,7 +3,7 @@ import moment from 'moment';
3
3
  import XEUtils from 'xe-utils';
4
4
 
5
5
  const useEvaluate = (props, state, config) => {
6
- let { emit } = config;
6
+ const { emit } = config;
7
7
  const evaluateState = reactive({
8
8
  totalLen: 0,
9
9
  timer: null,
@@ -29,22 +29,22 @@ const useEvaluate = (props, state, config) => {
29
29
  return (_a = props.evaluateResultSetting) == null ? void 0 : _a.evaluateStartTime;
30
30
  });
31
31
  const getEvaluateStartTime = computed(() => {
32
- let tempSt = new Date(evaluateStartTime.value);
33
- let isValidDate = XEUtils.isValidDate(tempSt);
32
+ const tempSt = new Date(evaluateStartTime.value);
33
+ const isValidDate = XEUtils.isValidDate(tempSt);
34
34
  if (!isValidDate)
35
35
  return false;
36
36
  return tempSt;
37
37
  });
38
38
  const getEvaluateTime = computed(() => {
39
- let { evaluateTime } = props.evaluateResultSetting;
39
+ const { evaluateTime } = props.evaluateResultSetting;
40
40
  return +evaluateTime;
41
41
  });
42
42
  const getEvaluateEnd = computed(() => {
43
- if (!showRange)
43
+ if (!showRange.value)
44
44
  return false;
45
45
  if (!getEvaluateTime.value)
46
46
  return false;
47
- let rangTime = moment(evaluateStartTime.value).add(getEvaluateTime.value, "minutes").valueOf();
47
+ const rangTime = moment(evaluateStartTime.value).add(getEvaluateTime.value, "minutes").valueOf();
48
48
  if (state.curTime >= rangTime)
49
49
  return true;
50
50
  return props.isFinished;
@@ -56,7 +56,7 @@ const useEvaluate = (props, state, config) => {
56
56
  return "\u5F00\u59CB\u6D4B\u8BC4";
57
57
  });
58
58
  const disabledEvaluate = computed(() => {
59
- let res = getEvaluateStartTime.value && !evaluateState.isTimeOut || getEvaluateEnd.value;
59
+ const res = getEvaluateStartTime.value && !evaluateState.isTimeOut || getEvaluateEnd.value;
60
60
  return res;
61
61
  });
62
62
  const showRange = computed(() => {
@@ -71,7 +71,7 @@ const useEvaluate = (props, state, config) => {
71
71
  return false;
72
72
  if (getEvaluateStartTime.value)
73
73
  return true;
74
- let rangTime = moment(evaluateStartTime.value).add(getEvaluateTime.value, "minutes").valueOf();
74
+ const rangTime = moment(evaluateStartTime.value).add(getEvaluateTime.value, "minutes").valueOf();
75
75
  return state.curTime < rangTime;
76
76
  });
77
77
  onMounted(() => {
@@ -83,23 +83,23 @@ const useEvaluate = (props, state, config) => {
83
83
  const isBanStart = () => {
84
84
  if (!evaluateStartTime.value || !getEvaluateTime.value)
85
85
  return false;
86
- let startTime = getEvaluateStartTime.value;
86
+ const startTime = getEvaluateStartTime.value;
87
87
  if (!startTime)
88
88
  return false;
89
- let endTime = moment(evaluateStartTime.value).add(getEvaluateTime.value, "minutes").valueOf();
90
- let cur = new Date().getTime();
89
+ const endTime = moment(evaluateStartTime.value).add(getEvaluateTime.value, "minutes").valueOf();
90
+ const cur = new Date().getTime();
91
91
  return cur >= endTime;
92
92
  };
93
93
  const getTotalLen = () => {
94
94
  var _a;
95
- let arrList = (_a = props.formArray) == null ? void 0 : _a.filter((item) => !evaluateState.filterArr.includes(item.type) && !item.hide);
95
+ const arrList = (_a = props.formArray) == null ? void 0 : _a.filter((item) => !evaluateState.filterArr.includes(item.type) && !item.hide);
96
96
  if (!arrList || !arrList.length)
97
97
  return;
98
98
  evaluateState.totalLen = arrList.length;
99
99
  };
100
100
  const countdown = (startTime) => {
101
101
  clearTimer();
102
- let msec = startTime - new Date().getTime();
102
+ const msec = startTime - new Date().getTime();
103
103
  if (msec <= 0) {
104
104
  evaluateState.countdownStr = "00:00:00";
105
105
  evaluateState.isTimeOut = true;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, provide, onBeforeUnmount, openBlock, createElementBlock, renderSlot } from 'vue';
1
+ import { defineComponent, ref, provide, onBeforeUnmount, openBlock, createElementBlock, createCommentVNode, renderSlot } from 'vue';
2
2
  import { uuidGenerator } from '../../../shared/utils/index.js';
3
3
  import { InjectionShortcutManager } from './constants/index.js';
4
4
  import '../index.js';
@@ -26,6 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
26
  class: "shortcut-provider",
27
27
  tabindex: -9999
28
28
  }, [
29
+ createCommentVNode(" \u9700\u8981\u7ED1\u5B9A\u8BE5\u4F5C\u7528\u57DF\u5FEB\u6377\u952E\u7684\u5185\u5BB9 "),
29
30
  renderSlot(_ctx.$slots, "default")
30
31
  ], 512);
31
32
  };
package/es/env.d.ts CHANGED
@@ -1,24 +1,24 @@
1
- /// <reference types="vite/client" />
2
-
3
- interface ImportMetaEnv {
4
- readonly VITE_APP_TYPE: string;
5
- // 更多环境变量...
6
- }
7
-
8
- interface ImportMeta {
9
- readonly env: ImportMetaEnv;
10
- }
11
-
12
- declare module '*.vue' {
13
- // @ts-ignore
14
- import type { App, defineComponent } from 'vue';
15
- // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
- // // const component: DefineComponent<{}, {}, any>
17
- const component: ReturnType<typeof defineComponent> & {
18
- install(app: App): void;
19
- };
20
- // @ts-ignore
21
- export default component;
22
- }
23
-
24
- declare module '*.js';
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_APP_TYPE: string;
5
+ // 更多环境变量...
6
+ }
7
+
8
+ interface ImportMeta {
9
+ readonly env: ImportMetaEnv;
10
+ }
11
+
12
+ declare module '*.vue' {
13
+ // @ts-ignore
14
+ import type { App, defineComponent } from 'vue';
15
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
+ // // const component: DefineComponent<{}, {}, any>
17
+ const component: ReturnType<typeof defineComponent> & {
18
+ install(app: App): void;
19
+ };
20
+ // @ts-ignore
21
+ export default component;
22
+ }
23
+
24
+ declare module '*.js';