cnhis-design-vue 3.1.7-beta.2 → 3.1.8-beta.1

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 (62) hide show
  1. package/env.d.ts +42 -38
  2. package/es/packages/big-table/index2.mjs +4 -4
  3. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.mjs +3 -2
  4. package/es/packages/bpmn-workflow/index2.mjs +3 -3
  5. package/es/packages/button-print/index2.mjs +3 -3
  6. package/es/packages/chunk-upload/index2.mjs +3 -3
  7. package/es/packages/drag-layout/index2.mjs +3 -3
  8. package/es/packages/editor/index2.mjs +3 -3
  9. package/es/packages/field-set/index2.mjs +3 -3
  10. package/es/packages/form-render/index2.mjs +3 -3
  11. package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.mjs +1 -1
  12. package/es/packages/form-render/src/components/cascader.d.ts +2 -2
  13. package/es/packages/form-render/src/components/cascader2.mjs +26 -12
  14. package/es/packages/form-render/src/components/collapse2.mjs +3 -3
  15. package/es/packages/form-render/src/components/combination2.mjs +7 -5
  16. package/es/packages/form-render/src/components/formItem2.mjs +1 -1
  17. package/es/packages/form-render/src/components/inputGroup2.mjs +1 -1
  18. package/es/packages/form-render/src/components/slider2.mjs +1 -1
  19. package/es/packages/form-render/src/hooks/useFieldList2Schema2.mjs +1 -1
  20. package/es/packages/form-render/src/hooks/useFormValidator2.mjs +1 -1
  21. package/es/packages/form-render/src/types/fieldItem.d.ts +1 -0
  22. package/es/packages/form-render/style/index.css +21 -17
  23. package/es/packages/form-render/style/index.less +121 -116
  24. package/es/packages/form-table/index2.mjs +3 -3
  25. package/es/packages/grid/index2.mjs +3 -3
  26. package/es/packages/index.css +21 -17
  27. package/es/packages/index.d.ts +2 -2
  28. package/es/packages/index.less +121 -116
  29. package/es/packages/index.mjs +1 -1
  30. package/es/packages/index2.mjs +2 -2
  31. package/es/packages/info-header/index2.mjs +3 -3
  32. package/es/packages/map/index2.mjs +3 -3
  33. package/es/packages/scale-view/index2.mjs +7 -7
  34. package/es/packages/scale-view/src/ScaleView.vue_vue_type_script_setup_true_lang.mjs +27 -5
  35. package/es/packages/scale-view/src/components/AnswerParse.vue_vue_type_script_setup_true_lang.mjs +2 -2
  36. package/es/packages/scale-view/src/components/formitem/r-checkbox2.mjs +5 -4
  37. package/es/packages/scale-view/src/components/formitem/r-collection2.mjs +1 -1
  38. package/es/packages/scale-view/src/components/formitem/r-datetime2.mjs +5 -3
  39. package/es/packages/scale-view/src/components/formitem/r-radio2.mjs +6 -5
  40. package/es/packages/scale-view/src/components/formitem/r-select2.mjs +3 -3
  41. package/es/packages/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
  42. package/es/packages/scale-view/src/hooks/scaleview-computed2.mjs +33 -13
  43. package/es/packages/scale-view/src/hooks/scaleview-props.d.ts +7 -3
  44. package/es/packages/scale-view/src/hooks/scaleview-props2.mjs +7 -3
  45. package/es/packages/scale-view/src/hooks/use-component2.mjs +4 -2
  46. package/es/packages/select-label/index2.mjs +4 -4
  47. package/es/packages/select-label/src/SelectLabel.vue_vue_type_script_setup_true_lang.mjs +7 -4
  48. package/es/packages/select-person/index2.mjs +3 -3
  49. package/es/packages/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.mjs +1 -1
  50. package/es/packages/time-line/index2.mjs +3 -3
  51. package/es/src/core/create2.mjs +2 -2
  52. package/es/src/global/variable.d.ts +1 -1
  53. package/es/src/global/variable.mjs +1 -1
  54. package/es/src/global/variable2.mjs +2 -2
  55. package/es/src/utils/index.d.ts +0 -1
  56. package/es/src/utils/index.mjs +1 -1
  57. package/es/src/utils/index2.mjs +1 -5
  58. package/memory-log.ts +62 -0
  59. package/package.json +12 -8
  60. package/sync.sh +13 -0
  61. package/md-plugin.ts +0 -201
  62. package/uno.config.ts +0 -22
@@ -1,5 +1,5 @@
1
- import { KEY_COMPONENT_NAME } from 'cnhis-design-vue/es/src/global/variable';
2
- import { safeComponentRegister, getComponentName } from 'cnhis-design-vue/es/src/utils';
1
+ import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
2
+ import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
3
3
  import { loadViewer } from 'cnhis-design-vue/es/src/utils/loadViewer';
4
4
  import { expandXEUtils } from 'cnhis-design-vue/es/src/utils/utilExpand';
5
5
  import './src/ScaleView2.mjs';
@@ -17,21 +17,21 @@ const CDatetime = scriptDatetime;
17
17
  CScaleView.install = function(app) {
18
18
  loadViewer(app);
19
19
  expandXEUtils();
20
- safeComponentRegister(app, CScaleView, KEY_COMPONENT_NAME + getComponentName(CScaleView));
20
+ safeComponentRegister(app, CScaleView, COMPONENT_NAMESPACE + "ScaleView");
21
21
  };
22
22
  CRadio.install = function(app) {
23
23
  loadViewer(app);
24
- safeComponentRegister(app, CRadio, KEY_COMPONENT_NAME + getComponentName(CRadio));
24
+ safeComponentRegister(app, CRadio, COMPONENT_NAMESPACE + "Radio");
25
25
  };
26
26
  CCheckbox.install = function(app) {
27
27
  loadViewer(app);
28
- safeComponentRegister(app, CCheckbox, KEY_COMPONENT_NAME + getComponentName(CCheckbox));
28
+ safeComponentRegister(app, CCheckbox, COMPONENT_NAMESPACE + "Checkbox");
29
29
  };
30
30
  CSelect.install = function(app) {
31
- safeComponentRegister(app, CSelect, KEY_COMPONENT_NAME + getComponentName(CSelect));
31
+ safeComponentRegister(app, CSelect, COMPONENT_NAMESPACE + "Select");
32
32
  };
33
33
  CDatetime.install = function(app) {
34
- safeComponentRegister(app, CDatetime, KEY_COMPONENT_NAME + getComponentName(CDatetime));
34
+ safeComponentRegister(app, CDatetime, COMPONENT_NAMESPACE + "Datetime");
35
35
  };
36
36
 
37
37
  export { CCheckbox, CDatetime, CRadio, CScaleView, CSelect };
@@ -187,7 +187,7 @@ var script = /* @__PURE__ */ defineComponent({
187
187
  handleDynamicDataRelation(list, item, state.formArray);
188
188
  break;
189
189
  case "RADIO_BLOCK":
190
- case "EVALUATE_RADIO_BLOCK":
190
+ case "CHECKBOX_BLOCK":
191
191
  isSetObj && (state.choiceComObj[item.val_key] = choiceObj);
192
192
  nextLogicEvent(val, item, state.formArray);
193
193
  break;
@@ -199,10 +199,32 @@ var script = /* @__PURE__ */ defineComponent({
199
199
  break;
200
200
  }
201
201
  };
202
+ const labelChange = (labelList, item) => {
203
+ state.form[item.val_key] = handleGetLabelSubmit(labelList);
204
+ };
202
205
  const vodFileList = (list, item) => {
203
206
  console.log(item);
204
207
  state.form[item.val_key] = list;
205
208
  };
209
+ const handleGetLabelSubmit = (labelSelectedList) => {
210
+ if (!labelSelectedList || !labelSelectedList.length)
211
+ return {
212
+ labelStr: "",
213
+ labels: []
214
+ };
215
+ const selectedList = labelSelectedList || [];
216
+ const labelStrList = [];
217
+ const labels = [];
218
+ selectedList.forEach((v) => {
219
+ labels.push(v);
220
+ labelStrList.push(v.labelName);
221
+ });
222
+ state.labelSelectedList = selectedList;
223
+ return {
224
+ labelStr: labelStrList.join(","),
225
+ labels
226
+ };
227
+ };
206
228
  const onSubmit = () => {
207
229
  let hasEvaluate = state.formArray.find((item) => isEvaluation(item.type));
208
230
  if (!hasEvaluate) {
@@ -268,7 +290,7 @@ var script = /* @__PURE__ */ defineComponent({
268
290
  };
269
291
  return (_ctx, _cache) => {
270
292
  return openBlock(), createElementBlock("div", _hoisted_1, [
271
- createCommentVNode(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="\u52A0\u8F7D\u4E2D"></n-spin>\r\n </template> '),
293
+ createCommentVNode(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="\u52A0\u8F7D\u4E2D"></n-spin>\n </template> '),
272
294
  !unref(state).spinning && !unref(state).hasFrontAddress ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
273
295
  unref(noDataState).noData ? (openBlock(), createBlock(script$1, {
274
296
  key: 0,
@@ -323,12 +345,12 @@ var script = /* @__PURE__ */ defineComponent({
323
345
  ], 8, _hoisted_5)) : createCommentVNode("v-if", true)
324
346
  ]),
325
347
  default: withCtx(() => [
326
- (openBlock(), createBlock(resolveDynamicComponent(item.renderCom), mergeProps(unref(propsConfig)(item), {
348
+ (openBlock(), createBlock(resolveDynamicComponent(item.renderCom), mergeProps(unref(propsConfig)(item, index), {
327
349
  key: (item.id || item.seq) + index,
328
- index,
329
350
  onScaleChange: scaleChange,
351
+ onOnChange: ($event) => labelChange($event, item),
330
352
  onVodFileList: vodFileList
331
- }), null, 16, ["index"])),
353
+ }), null, 16, ["onOnChange"])),
332
354
  unref(showAnswerParse)(item) ? (openBlock(), createBlock(script$5, {
333
355
  key: 0,
334
356
  item
@@ -26,13 +26,13 @@ var script = /* @__PURE__ */ defineComponent({
26
26
  return ((_a = props.item) == null ? void 0 : _a.questionScore) > 0;
27
27
  });
28
28
  const answerIcon = computed(() => {
29
- return answerSuccess ? "xitongtubiaodui" : "xitongtubiaocuo";
29
+ return answerSuccess.value ? "xitongtubiaodui" : "xitongtubiaocuo";
30
30
  });
31
31
  const answerResText = computed(() => {
32
32
  if ("questionPartScore" in props.item) {
33
33
  return "\u90E8\u5206\u6B63\u786E";
34
34
  }
35
- return answerSuccess ? "\u56DE\u7B54\u6B63\u786E" : "\u56DE\u7B54\u9519\u8BEF";
35
+ return answerSuccess.value ? "\u56DE\u7B54\u6B63\u786E" : "\u56DE\u7B54\u9519\u8BEF";
36
36
  });
37
37
  const scoreText = computed(() => {
38
38
  if ("questionPartScore" in props.item) {
@@ -70,7 +70,7 @@ var scriptCheckbox = defineComponent({
70
70
  let curCheckboxValue = JSON.parse(JSON.stringify(state.curCheckboxValue));
71
71
  context.emit("scaleChange", curCheckboxValue, props.item, {
72
72
  choiceObj,
73
- isSetObj: isCheckboxItem
73
+ isSetObj: isCheckboxItem.value
74
74
  });
75
75
  };
76
76
  const handleCheckboxDef = (item, curValue, options) => {
@@ -141,7 +141,7 @@ var scriptCheckbox = defineComponent({
141
141
  let curCheckboxValue = JSON.parse(JSON.stringify(state.curCheckboxValue));
142
142
  context.emit("scaleChange", curCheckboxValue, props.item, {
143
143
  choiceObj,
144
- isSetObj: isCheckboxItem
144
+ isSetObj: isCheckboxItem.value
145
145
  });
146
146
  };
147
147
  const renderImg = (o, i) => {
@@ -204,7 +204,7 @@ var scriptCheckbox = defineComponent({
204
204
  }, null);
205
205
  };
206
206
  const hasPreSuffix = (o) => {
207
- return isCheckboxItem && showPreSuffix.value(o);
207
+ return isCheckboxItem.value && showPreSuffix.value(o);
208
208
  };
209
209
  let opKey = choiceUseKey.value;
210
210
  return () => {
@@ -212,7 +212,8 @@ var scriptCheckbox = defineComponent({
212
212
  return createVNode(NCheckboxGroup, {
213
213
  "value": state.curCheckboxValue,
214
214
  "onUpdate:value": [($event) => state.curCheckboxValue = $event, () => handleCheckboxOther(false)],
215
- "class": ["c-choice-wrap", "choice-wrap-" + chooseStyleSetting]
215
+ "class": ["c-choice-wrap", "choice-wrap-" + chooseStyleSetting],
216
+ "disabled": props.isLock
216
217
  }, _isSlot(_slot = state.curOptions.map((o, i) => createVNode(resolveComponent("n-checkbox"), {
217
218
  "key": o.value,
218
219
  "value": o[opKey]
@@ -64,7 +64,7 @@ var RCollection = defineComponent({
64
64
  };
65
65
  const renderPrompt = () => {
66
66
  return createVNode("div", {
67
- "class": ["prompt-message", "c-scale-collection", className]
67
+ "class": ["prompt-message", "c-scale-collection", className.value]
68
68
  }, [showIcon.value && createVNode(NIcon, {
69
69
  "class": "prompt-icon",
70
70
  "size": "24",
@@ -168,7 +168,8 @@ var scriptDatetime = defineComponent({
168
168
  "formatted-value": props.form[props.item.val_key],
169
169
  "onUpdate:formatted-value": ($event) => props.form[props.item.val_key] = $event,
170
170
  "type": dateType,
171
- "clearable": true
171
+ "clearable": true,
172
+ "disabled": props.isLock
172
173
  }, null);
173
174
  };
174
175
  const renderDateRange = () => {
@@ -176,10 +177,11 @@ var scriptDatetime = defineComponent({
176
177
  "formatted-value": props.form[props.item.val_key],
177
178
  "onUpdate:formatted-value": ($event) => props.form[props.item.val_key] = $event,
178
179
  "type": useDateRangeType.value,
179
- "clearable": true
180
+ "clearable": true,
181
+ "disabled": props.isLock
180
182
  }, null);
181
183
  };
182
- defaultValue();
184
+ defaultValue(props.form[props.item.val_key]);
183
185
  return () => {
184
186
  if (type === "TIME" || dateType == "time") {
185
187
  if (startToStop == 1)
@@ -103,7 +103,7 @@ var scriptRadio = defineComponent({
103
103
  };
104
104
  context.emit("scaleChange", state.curvalue, props.item, {
105
105
  choiceObj,
106
- isSetObj: isRadioItem
106
+ isSetObj: isRadioItem.value
107
107
  });
108
108
  };
109
109
  watch(() => props.item, (value) => {
@@ -122,7 +122,7 @@ var scriptRadio = defineComponent({
122
122
  console.log(state.optionsPreSuffixObj);
123
123
  context.emit("scaleChange", state.curvalue, props.item, {
124
124
  choiceObj,
125
- isSetObj: isRadioItem
125
+ isSetObj: isRadioItem.value
126
126
  });
127
127
  };
128
128
  const inputChange = () => {
@@ -133,7 +133,7 @@ var scriptRadio = defineComponent({
133
133
  state.curvalue = "other";
134
134
  context.emit("scaleChange", "other", props.item, {
135
135
  choiceObj,
136
- isSetObj: isRadioItem
136
+ isSetObj: isRadioItem.value
137
137
  });
138
138
  };
139
139
  const renderImg = (o, i) => {
@@ -196,7 +196,7 @@ var scriptRadio = defineComponent({
196
196
  }, null);
197
197
  };
198
198
  const hasPreSuffix = (o) => {
199
- return isRadioItem && showPreSuffix.value(o);
199
+ return isRadioItem.value && showPreSuffix.value(o);
200
200
  };
201
201
  let opKey = choiceUseKey.value;
202
202
  return () => {
@@ -204,7 +204,8 @@ var scriptRadio = defineComponent({
204
204
  return createVNode(NRadioGroup, {
205
205
  "value": state.curvalue,
206
206
  "onUpdate:value": [($event) => state.curvalue = $event, radioChange],
207
- "class": ["c-choice-wrap", "choice-wrap-" + chooseStyleSetting]
207
+ "class": ["c-choice-wrap", "choice-wrap-" + chooseStyleSetting],
208
+ "disabled": props.isLock
208
209
  }, _isSlot(_slot = state.curOptions.map((o, i) => createVNode(resolveComponent("n-radio"), {
209
210
  "key": o.value,
210
211
  "value": o[opKey]
@@ -92,20 +92,20 @@ var scriptSelect = defineComponent({
92
92
  res.value = value;
93
93
  matchItem = addItem(value);
94
94
  matchItem && res.list.push(matchItem);
95
- context.emit("scaleChange", res, props.item);
95
+ context.emit("scaleChange", res, props.item, res);
96
96
  return;
97
97
  }
98
98
  res.value = value;
99
99
  if (!value.length) {
100
100
  res.list = [];
101
- context.emit("scaleChange", res, props.item);
101
+ context.emit("scaleChange", res, props.item, res);
102
102
  return;
103
103
  }
104
104
  value.forEach((item) => {
105
105
  matchItem = addItem(item);
106
106
  matchItem && res.list.push(matchItem);
107
107
  });
108
- context.emit("scaleChange", res, props.item);
108
+ context.emit("scaleChange", res, props.item, res);
109
109
  };
110
110
  const addItem = (item) => {
111
111
  return state.curOptions.find((v) => v.value === item);
@@ -21,7 +21,7 @@ export declare const ScaleViewComputed: (props: any, state: any, config: any) =>
21
21
  showEvaluateLabel: import("vue").ComputedRef<(item: any) => any>;
22
22
  showAnswerParse: import("vue").ComputedRef<(item: any) => any>;
23
23
  tipMsg: import("vue").ComputedRef<"保存" | "提交">;
24
- propsConfig: import("vue").ComputedRef<(item: any) => any>;
24
+ propsConfig: import("vue").ComputedRef<(item: any, index: number) => any>;
25
25
  showEvent: (formItem: any, isSubmitCallback?: any) => any;
26
26
  formKey: (item: any) => any;
27
27
  evaluatePageProps: import("vue").ComputedRef<{
@@ -104,9 +104,9 @@ const ScaleViewComputed = (props, state, config) => {
104
104
  });
105
105
  const componentDisable = computed(() => {
106
106
  if (!hasEvaluateResultSetting.value && !hasDefault.value) {
107
- return props.hideBtn || props.isLock;
107
+ return !!props.hideBtn || !!props.isLock;
108
108
  }
109
- return props.hideBtn || props.isLock || state.isFinished;
109
+ return !!props.hideBtn || !!props.isLock || state.isFinished;
110
110
  });
111
111
  const showEvaluateLabel = computed(() => (item) => {
112
112
  let obj = {
@@ -178,28 +178,48 @@ const ScaleViewComputed = (props, state, config) => {
178
178
  getChunkUploadConfig
179
179
  };
180
180
  });
181
+ const selectLabelProps = computed(() => {
182
+ return {
183
+ selectedList: state.labelSelectedList,
184
+ getLabelList: props.getLabelList
185
+ };
186
+ });
181
187
  const comProsMap = {
182
188
  "RSelectCom": selectProps.value,
183
189
  "RCascaderCom": cascaderProps.value,
184
190
  "RUploadCom": uploadProps.value,
185
191
  "RMapCom": mapProps.value,
186
- "RVodChunkUploadCom": vodChunkUploadProps.value
192
+ "RVodChunkUploadCom": vodChunkUploadProps.value,
193
+ "CSelectLabelCom": selectLabelProps.value
187
194
  };
188
- const propsConfig = computed(() => (item) => {
189
- let useProps = comProsMap[componentMapStr[item.type]] || {};
190
- if (componentMapStr[item.type] == "RVodChunkUploadCom") {
191
- console.log(useProps);
192
- }
193
- return {
195
+ const propsConfig = computed(() => (item, index) => {
196
+ var _a;
197
+ const propType = componentMapStr[item.type];
198
+ let useProps = comProsMap[propType] || {};
199
+ let propsObj = {
194
200
  form: state.form,
195
201
  item,
202
+ index,
196
203
  isLock: componentDisable.value,
197
- locationProp: state.form[item.val_key],
198
- formData: item,
199
- limitNum: item.setting.limitPic,
200
- defFileList: state.form[item.val_key],
201
204
  ...useProps
202
205
  };
206
+ if (propType === "RVodChunkUploadCom") {
207
+ Object.assign(propsObj, {
208
+ formData: item,
209
+ limitNum: ((_a = item.setting) == null ? void 0 : _a.limitPic) || 1,
210
+ defFileList: state.form[item.val_key]
211
+ });
212
+ }
213
+ if (propType === "RMapCom") {
214
+ Object.assign(propsObj, {
215
+ locationProp: state.form[item.val_key]
216
+ });
217
+ }
218
+ if (propType === "CSelectLabelCom") {
219
+ delete propsObj.form;
220
+ delete propsObj.index;
221
+ }
222
+ return propsObj;
203
223
  });
204
224
  const showEvent = (formItem, isSubmitCallback) => {
205
225
  if (formItem.hide)
@@ -15,11 +15,11 @@ declare const ScaleViewProps: {
15
15
  default: () => {};
16
16
  };
17
17
  noBtn: {
18
- type: BooleanConstructor;
18
+ type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
19
19
  default: boolean;
20
20
  };
21
21
  hideBtn: {
22
- type: BooleanConstructor;
22
+ type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
23
23
  default: boolean;
24
24
  };
25
25
  source: {
@@ -27,7 +27,7 @@ declare const ScaleViewProps: {
27
27
  default: string;
28
28
  };
29
29
  isLock: {
30
- type: BooleanConstructor;
30
+ type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
31
31
  default: boolean;
32
32
  };
33
33
  type: {
@@ -67,6 +67,10 @@ declare const ScaleViewProps: {
67
67
  type: FunctionConstructor;
68
68
  default: () => Promise<never[]>;
69
69
  };
70
+ getLabelList: {
71
+ type: FunctionConstructor;
72
+ default: () => Promise<never[]>;
73
+ };
70
74
  uploadPictureUrl: {
71
75
  type: StringConstructor;
72
76
  default: string;
@@ -7,10 +7,10 @@ const ScaleViewProps = {
7
7
  },
8
8
  params: { default: () => ({}), type: Object },
9
9
  guageData: { type: Object, default: () => ({}) },
10
- noBtn: { type: Boolean, default: false },
11
- hideBtn: { type: Boolean, default: false },
10
+ noBtn: { type: [Boolean, String, Number], default: false },
11
+ hideBtn: { type: [Boolean, String, Number], default: false },
12
12
  source: { type: String, default: "" },
13
- isLock: { type: Boolean, default: false },
13
+ isLock: { type: [Boolean, String, Number], default: false },
14
14
  type: {
15
15
  type: String,
16
16
  default: ""
@@ -45,6 +45,10 @@ const ScaleViewProps = {
45
45
  type: Function,
46
46
  default: () => Promise.resolve([])
47
47
  },
48
+ getLabelList: {
49
+ type: Function,
50
+ default: () => Promise.resolve([])
51
+ },
48
52
  uploadPictureUrl: { type: String, default: "" },
49
53
  uploadFileUrl: { type: String, default: "" },
50
54
  ak: {
@@ -10,6 +10,7 @@ import RAddress from '../components/formitem/r-address2.mjs';
10
10
  import RUpload from '../components/formitem/r-upload2.mjs';
11
11
  import RMap from '../components/formitem/r-map2.mjs';
12
12
  import RVodChunkUpload from 'cnhis-design-vue/es/packages/chunk-upload/src/vod-chunk-upload';
13
+ import CSelectLabel from 'cnhis-design-vue/es/packages/select-label';
13
14
 
14
15
  let RInputCom = shallowRef(RInput);
15
16
  let RRadioCom = shallowRef(scriptRadio);
@@ -22,6 +23,7 @@ let RAddressCom = shallowRef(RAddress);
22
23
  let RUploadCom = shallowRef(RUpload);
23
24
  let RMapCom = shallowRef(RMap);
24
25
  let RVodChunkUploadCom = shallowRef(RVodChunkUpload);
26
+ let CSelectLabelCom = shallowRef(CSelectLabel);
25
27
  const componentMap = {
26
28
  "TITLE": RCollectionCom,
27
29
  "LINEBAR": RCollectionCom,
@@ -36,7 +38,7 @@ const componentMap = {
36
38
  "ID_CARD": RInputCom,
37
39
  "ADDRESS": RAddressCom,
38
40
  "LOCATION": RMapCom,
39
- "LABEL": RInputCom,
41
+ "LABEL": CSelectLabelCom,
40
42
  "UPFILE": RUploadCom,
41
43
  "UPPICTURE": RUploadCom,
42
44
  "VEDIO": RVodChunkUploadCom,
@@ -63,7 +65,7 @@ const componentMapStr = {
63
65
  "ID_CARD": "RInputCom",
64
66
  "ADDRESS": "RInputCom",
65
67
  "LOCATION": "RMapCom",
66
- "LABEL": "RInputCom",
68
+ "LABEL": "CSelectLabelCom",
67
69
  "UPFILE": "RUploadCom",
68
70
  "UPPICTURE": "RUploadCom",
69
71
  "VEDIO": "RVodChunkUploadCom",
@@ -1,5 +1,5 @@
1
- import { KEY_COMPONENT_NAME } from 'cnhis-design-vue/es/src/global/variable';
2
- import { safeComponentRegister, getComponentName } from 'cnhis-design-vue/es/src/utils';
1
+ import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
2
+ import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
3
3
  import './src/SelectLabel2.mjs';
4
4
  import './src/LabelFormContent2.mjs';
5
5
  import script from './src/SelectLabel.vue_vue_type_script_setup_true_lang.mjs';
@@ -8,10 +8,10 @@ import script$1 from './src/LabelFormContent.vue_vue_type_script_setup_true_lang
8
8
  const SelectLabel = script;
9
9
  const LabelFormContent = script$1;
10
10
  SelectLabel.install = function(app) {
11
- safeComponentRegister(app, SelectLabel, KEY_COMPONENT_NAME + getComponentName(SelectLabel));
11
+ safeComponentRegister(app, SelectLabel, COMPONENT_NAMESPACE + "SelectLabel");
12
12
  };
13
13
  LabelFormContent.install = function(app) {
14
- safeComponentRegister(app, LabelFormContent, KEY_COMPONENT_NAME + getComponentName(LabelFormContent));
14
+ safeComponentRegister(app, LabelFormContent, COMPONENT_NAMESPACE + "LabelFormContent");
15
15
  };
16
16
 
17
17
  export { LabelFormContent as CLabelFormContent, SelectLabel as default };
@@ -66,7 +66,7 @@ var script = /* @__PURE__ */ defineComponent({
66
66
  })
67
67
  }
68
68
  },
69
- emits: ["change"],
69
+ emits: ["onChange", "scaleChange", "vodFileList"],
70
70
  setup(__props, {
71
71
  emit
72
72
  }) {
@@ -126,7 +126,8 @@ var script = /* @__PURE__ */ defineComponent({
126
126
  if (fdIndex != -1) {
127
127
  selectedList.splice(fdIndex, 1);
128
128
  }
129
- emit("change", [...selectedList]);
129
+ emit("onChange", [...selectedList]);
130
+ state.labelSelectedList = selectedList;
130
131
  hanldeSetLabelItem(d.labelId, false);
131
132
  };
132
133
  const handleCommonLabelChange = (v, d) => {
@@ -146,7 +147,8 @@ var script = /* @__PURE__ */ defineComponent({
146
147
  selectedList.splice(fdIndex, 1);
147
148
  }
148
149
  }
149
- emit("change", [...selectedList]);
150
+ emit("onChange", [...selectedList]);
151
+ state.labelSelectedList = selectedList;
150
152
  };
151
153
  const handleEditLabel = (type) => {
152
154
  if (props.isLock)
@@ -180,7 +182,8 @@ var script = /* @__PURE__ */ defineComponent({
180
182
  const handleSaveLabel = () => {
181
183
  var _a;
182
184
  (_a = labelFormContentRef.value) == null ? void 0 : _a.handleLabelForm((selectList) => {
183
- emit("change", [...selectList]);
185
+ emit("onChange", [...selectList]);
186
+ state.labelSelectedList = selectList;
184
187
  hadleCommonlabels(state.commonLabelList, selectList);
185
188
  handleLabelCancel();
186
189
  });
@@ -1,11 +1,11 @@
1
- import { KEY_COMPONENT_NAME } from 'cnhis-design-vue/es/src/global/variable';
2
- import { safeComponentRegister, getComponentName } from 'cnhis-design-vue/es/src/utils';
1
+ import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
2
+ import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
3
3
  import './src/SelectPerson2.mjs';
4
4
  import script from './src/SelectPerson.vue_vue_type_script_setup_true_lang.mjs';
5
5
 
6
6
  const SelectPerson = script;
7
7
  SelectPerson.install = function(app) {
8
- safeComponentRegister(app, SelectPerson, KEY_COMPONENT_NAME + getComponentName(SelectPerson));
8
+ safeComponentRegister(app, SelectPerson, COMPONENT_NAMESPACE + "SelectPerson");
9
9
  };
10
10
 
11
11
  export { SelectPerson as default };
@@ -830,7 +830,7 @@ var script = /* @__PURE__ */ defineComponent({
830
830
  }, {
831
831
  default: withCtx(() => [_hoisted_5]),
832
832
  _: 1
833
- }, 8, ["checked", "indeterminate"])), createCommentVNode(' <div v-show="state.search.status == 3 || (state.search.status == 0 && state.treeData.main && state.treeData.main.length == 0)" class="no-data-tips">\r\n \u67E5\u65E0\u7ED3\u679C\r\n </div> '), createCommentVNode(" main tree "), withDirectives(createVNode(unref(NTree), {
833
+ }, 8, ["checked", "indeterminate"])), createCommentVNode(' <div v-show="state.search.status == 3 || (state.search.status == 0 && state.treeData.main && state.treeData.main.length == 0)" class="no-data-tips">\n \u67E5\u65E0\u7ED3\u679C\n </div> '), createCommentVNode(" main tree "), withDirectives(createVNode(unref(NTree), {
834
834
  class: "main-tree-container",
835
835
  "checked-keys": unref(state).checkedKeys.main,
836
836
  "onUpdate:checked-keys": _cache[3] || (_cache[3] = ($event) => unref(state).checkedKeys.main = $event),
@@ -1,11 +1,11 @@
1
- import { KEY_COMPONENT_NAME } from 'cnhis-design-vue/es/src/global/variable';
2
- import { safeComponentRegister, getComponentName } from 'cnhis-design-vue/es/src/utils';
1
+ import { COMPONENT_NAMESPACE } from 'cnhis-design-vue/es/src/global/variable';
2
+ import { safeComponentRegister } from 'cnhis-design-vue/es/src/utils';
3
3
  import './src/TimeLine2.mjs';
4
4
  import script from './src/TimeLine.vue_vue_type_script_setup_true_lang.mjs';
5
5
 
6
6
  const TimeLine = script;
7
7
  TimeLine.install = function(app) {
8
- safeComponentRegister(app, TimeLine, KEY_COMPONENT_NAME + getComponentName(TimeLine));
8
+ safeComponentRegister(app, TimeLine, COMPONENT_NAMESPACE + "TimeLine");
9
9
  };
10
10
 
11
11
  export { TimeLine as default };
@@ -1,7 +1,7 @@
1
- import { KEY_COMPONENT_NAME } from '../global/variable2.mjs';
1
+ import { COMPONENT_NAMESPACE } from '../global/variable2.mjs';
2
2
 
3
3
  function create(vm) {
4
- vm.name = KEY_COMPONENT_NAME + (vm.name || "");
4
+ vm.name = COMPONENT_NAMESPACE + (vm.name || "");
5
5
  return vm;
6
6
  }
7
7
 
@@ -1,2 +1,2 @@
1
- export declare const KEY_COMPONENT_NAME = "C";
1
+ export declare const COMPONENT_NAMESPACE = "C";
2
2
  export declare const GROUP_TITLE_KEY = "group-show-title";
@@ -1 +1 @@
1
- export { GROUP_TITLE_KEY, KEY_COMPONENT_NAME } from './variable2.mjs';
1
+ export { COMPONENT_NAMESPACE, GROUP_TITLE_KEY } from './variable2.mjs';
@@ -1,4 +1,4 @@
1
- const KEY_COMPONENT_NAME = "C";
1
+ const COMPONENT_NAMESPACE = "C";
2
2
  const GROUP_TITLE_KEY = "group-show-title";
3
3
 
4
- export { GROUP_TITLE_KEY, KEY_COMPONENT_NAME };
4
+ export { COMPONENT_NAMESPACE, GROUP_TITLE_KEY };
@@ -1,3 +1,2 @@
1
1
  import { App, Component } from 'vue';
2
2
  export declare function safeComponentRegister(app: App, component: Component, cName?: string | undefined, scheduler?: () => void): void;
3
- export declare function getComponentName(component: Component): any;
@@ -1 +1 @@
1
- export { getComponentName, safeComponentRegister } from './index2.mjs';
1
+ export { safeComponentRegister } from './index2.mjs';
@@ -3,7 +3,6 @@ function safeComponentRegister(app, component, cName = component.name, scheduler
3
3
  throw new Error(`[CUI]: invalid component name for ${component}`);
4
4
  const { components = {} } = app._context;
5
5
  if (components[cName]) {
6
- console.warn(`[CUI]: You are trying to register a component named ${cName} multiple times`);
7
6
  return;
8
7
  }
9
8
  if (scheduler) {
@@ -12,8 +11,5 @@ function safeComponentRegister(app, component, cName = component.name, scheduler
12
11
  app.component(cName, component);
13
12
  }
14
13
  }
15
- function getComponentName(component) {
16
- return component.name || Reflect.get(component, "__name");
17
- }
18
14
 
19
- export { getComponentName, safeComponentRegister };
15
+ export { safeComponentRegister };