cnhis-design-vue 3.1.9-beta.3 → 3.1.9-beta.6
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.
- package/README.md +22 -22
- package/es/packages/big-table/index.d.ts +2 -0
- package/es/packages/big-table/src/BigTable.vue.d.ts +6 -17
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.mjs +12 -64
- package/es/packages/big-table/style/index.less +557 -557
- package/es/packages/bpmn-workflow/style/index.less +29 -29
- package/es/packages/button-print/index.d.ts +21 -4
- package/es/packages/button-print/src/ButtonPrint.vue.d.ts +21 -4
- package/es/packages/button-print/src/components/IdentityVerification.vue.d.ts +8 -2
- package/es/packages/button-print/src/utils/print.es.min.mjs +179 -179
- package/es/packages/button-print/style/index.less +30 -30
- package/es/packages/chunk-upload/index.d.ts +8 -2
- package/es/packages/chunk-upload/src/chunk-upload-new.vue.d.ts +11 -6
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +9 -3
- package/es/packages/chunk-upload/style/index.less +394 -394
- package/es/packages/drag-layout/index.d.ts +20 -4
- package/es/packages/drag-layout/src/DragFormRightItem.vue.d.ts +12 -2
- package/es/packages/drag-layout/src/DragLayout.vue.d.ts +22 -7
- package/es/packages/drag-layout/style/index.less +208 -208
- package/es/packages/field-set/index.d.ts +22 -6
- package/es/packages/field-set/index.mjs +2 -2
- package/es/packages/field-set/src/FieldSet.vue.d.ts +5171 -2473
- package/es/packages/field-set/src/FieldSet.vue_vue_type_script_setup_true_lang.mjs +11 -319
- package/es/packages/field-set/src/NewFieldSet.vue.d.ts +11 -3
- package/es/packages/field-set/src/OldFieldSet.mjs +4 -0
- package/es/packages/field-set/src/OldFieldSet.vue.d.ts +2610 -0
- package/es/packages/field-set/src/OldFieldSet.vue_vue_type_script_setup_true_lang.mjs +330 -0
- package/es/packages/field-set/style/index.less +157 -157
- package/es/packages/form-render/index.d.ts +264 -0
- package/es/packages/form-render/src/FormRender.vue.d.ts +264 -0
- package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.mjs +21 -17
- package/es/packages/form-render/src/components/cascader.mjs +1 -1
- package/es/packages/form-render/src/components/select.mjs +40 -27
- package/es/packages/form-table/index.d.ts +28 -4
- package/es/packages/form-table/src/FormTable.vue.d.ts +28 -4
- package/es/packages/form-table/src/components/index.d.ts +28 -4
- package/es/packages/form-table/src/components/table-age.vue.d.ts +2 -0
- package/es/packages/form-table/src/components/table-digital.vue.d.ts +2 -0
- package/es/packages/form-table/src/components/table-input-password.vue.d.ts +2 -0
- package/es/packages/form-table/src/components/table-input.vue.d.ts +2 -0
- package/es/packages/form-table/src/components/table-search-more.vue.d.ts +8 -2
- package/es/packages/form-table/src/components/table-search.vue.d.ts +8 -2
- package/es/packages/form-table/src/components/table-textarea.vue.d.ts +2 -0
- package/es/packages/form-table/src/components/text-over-tooltip.vue.d.ts +2 -0
- package/es/packages/form-table/src/hooks/useDateType.mjs +1 -1
- package/es/packages/form-table/src/hooks/useSearch.mjs +1 -1
- package/es/packages/form-table/style/index.less +301 -301
- package/es/packages/grid/style/index.less +12 -12
- package/es/packages/index.css +27 -23
- package/es/packages/index.less +2451 -2448
- package/es/packages/info-header/index.d.ts +20 -4
- package/es/packages/info-header/src/HiddenContent.vue.d.ts +29 -13
- package/es/packages/info-header/src/HiddenContent.vue_vue_type_script_setup_true_lang.mjs +6 -4
- package/es/packages/info-header/src/InfoHeader.vue.d.ts +20 -4
- package/es/packages/info-header/src/InfoHeader.vue_vue_type_script_setup_true_lang.mjs +10 -5
- package/es/packages/info-header/style/index.css +0 -3
- package/es/packages/info-header/style/index.less +36 -40
- package/es/packages/map/index.d.ts +8 -2
- package/es/packages/map/src/Map.vue.d.ts +8 -2
- package/es/packages/map/style/index.less +59 -59
- package/es/packages/scale-view/index.d.ts +17 -4
- package/es/packages/scale-view/src/ScaleView.vue.d.ts +17 -4
- package/es/packages/scale-view/src/ScaleView.vue_vue_type_script_setup_true_lang.mjs +9 -2
- package/es/packages/scale-view/src/components/EvaluatePage.vue.d.ts +8 -2
- package/es/packages/scale-view/src/components/formitem/r-address.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-checkbox.mjs +10 -4
- package/es/packages/scale-view/src/components/formitem/r-collection.mjs +0 -1
- package/es/packages/scale-view/src/components/formitem/r-datetime.mjs +19 -10
- package/es/packages/scale-view/src/components/formitem/r-input.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-map.mjs +2 -1
- package/es/packages/scale-view/src/components/formitem/r-radio.mjs +10 -4
- package/es/packages/scale-view/src/components/formitem/r-select.mjs +6 -1
- package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +2 -0
- package/es/packages/scale-view/src/hooks/scaleview-computed.mjs +7 -7
- package/es/packages/scale-view/src/hooks/scaleview-init.mjs +4 -3
- package/es/packages/scale-view/src/hooks/scaleview-validate.mjs +85 -64
- package/es/packages/scale-view/src/hooks/use-component.d.ts +18 -4
- package/es/packages/scale-view/style/index.css +27 -20
- package/es/packages/scale-view/style/index.less +308 -301
- package/es/packages/select-label/index.d.ts +20 -4
- package/es/packages/select-label/src/LabelFormContent.vue.d.ts +10 -2
- package/es/packages/select-label/src/LabelFormContent.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/packages/select-label/src/SelectLabel.vue.d.ts +15 -11
- package/es/packages/select-label/src/SelectLabel.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/packages/select-label/src/components/label-classify.vue.d.ts +10 -2
- package/es/packages/select-label/style/index.less +151 -151
- package/es/packages/select-person/index.d.ts +8 -2
- package/es/packages/select-person/src/SelectPerson.vue.d.ts +18 -14
- package/es/packages/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.mjs +16 -2
- package/es/packages/select-person/style/index.less +229 -229
- package/es/packages/time-line/index.d.ts +8 -2
- package/es/packages/time-line/src/TimeLine.vue.d.ts +8 -2
- package/es/packages/time-line/style/index.less +34 -34
- package/es/src/components/SelectPage/SelectPage.vue.d.ts +8 -2
- package/es/src/components/TextOverTooltip/TextOverTooltip.vue.d.ts +2 -0
- package/es/src/utils/utilExpand.mjs +46 -46
- package/global.d.ts +8 -8
- package/package.json +5 -3
- package/yarn-error.log +103 -8659
- package/es/packages/field-set/src/Index.mjs +0 -4
- package/es/packages/field-set/src/Index.vue_vue_type_script_setup_true_lang.mjs +0 -25
- package/es/packages/field-set/src/index.vue_vue_type_script_setup_true_lang2.mjs +0 -25
- package/es/packages/field-set/src/index2.mjs +0 -4
|
@@ -249,6 +249,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
249
249
|
confirmSubmit: (message: any) => void;
|
|
250
250
|
onSubmitForm: () => void;
|
|
251
251
|
cancel: () => void;
|
|
252
|
+
getScaleData: () => any;
|
|
252
253
|
isCollection: (e: string) => boolean;
|
|
253
254
|
NoData: import("vue").DefineComponent<{
|
|
254
255
|
noDataTip: {
|
|
@@ -613,7 +614,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
613
614
|
readonly default: true;
|
|
614
615
|
};
|
|
615
616
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
616
|
-
readonly nativeFocusBehavior:
|
|
617
|
+
readonly nativeFocusBehavior: {
|
|
618
|
+
readonly type: BooleanConstructor;
|
|
619
|
+
readonly default: boolean;
|
|
620
|
+
};
|
|
617
621
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
618
622
|
heightTiny: string;
|
|
619
623
|
heightSmall: string;
|
|
@@ -1327,7 +1331,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1327
1331
|
readonly default: true;
|
|
1328
1332
|
};
|
|
1329
1333
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
1330
|
-
readonly nativeFocusBehavior:
|
|
1334
|
+
readonly nativeFocusBehavior: {
|
|
1335
|
+
readonly type: BooleanConstructor;
|
|
1336
|
+
readonly default: boolean;
|
|
1337
|
+
};
|
|
1331
1338
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
1332
1339
|
heightTiny: string;
|
|
1333
1340
|
heightSmall: string;
|
|
@@ -2131,7 +2138,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2131
2138
|
readonly default: true;
|
|
2132
2139
|
};
|
|
2133
2140
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
2134
|
-
readonly nativeFocusBehavior:
|
|
2141
|
+
readonly nativeFocusBehavior: {
|
|
2142
|
+
readonly type: BooleanConstructor;
|
|
2143
|
+
readonly default: boolean;
|
|
2144
|
+
};
|
|
2135
2145
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
2136
2146
|
heightTiny: string;
|
|
2137
2147
|
heightSmall: string;
|
|
@@ -2845,7 +2855,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2845
2855
|
readonly default: true;
|
|
2846
2856
|
};
|
|
2847
2857
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
2848
|
-
readonly nativeFocusBehavior:
|
|
2858
|
+
readonly nativeFocusBehavior: {
|
|
2859
|
+
readonly type: BooleanConstructor;
|
|
2860
|
+
readonly default: boolean;
|
|
2861
|
+
};
|
|
2849
2862
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
2850
2863
|
heightTiny: string;
|
|
2851
2864
|
heightSmall: string;
|
|
@@ -42,7 +42,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
__name: "ScaleView",
|
|
43
43
|
props: ScaleViewProps,
|
|
44
44
|
emits: ["onCloseSetting", "submitNoRequest", "onSubmit"],
|
|
45
|
-
setup(__props, { emit }) {
|
|
45
|
+
setup(__props, { expose, emit }) {
|
|
46
46
|
const props = __props;
|
|
47
47
|
const state = reactive({ ...ScaleViewState });
|
|
48
48
|
const dialog = useDialog();
|
|
@@ -289,6 +289,12 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
289
289
|
const cancel = () => {
|
|
290
290
|
emit("onCloseSetting");
|
|
291
291
|
};
|
|
292
|
+
const getScaleData = () => {
|
|
293
|
+
return { ...state };
|
|
294
|
+
};
|
|
295
|
+
expose({
|
|
296
|
+
getScaleData
|
|
297
|
+
});
|
|
292
298
|
return (_ctx, _cache) => {
|
|
293
299
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
294
300
|
createCommentVNode(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="\u52A0\u8F7D\u4E2D"></n-spin>\n </template> '),
|
|
@@ -317,7 +323,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
317
323
|
ref_key: "formRef",
|
|
318
324
|
ref: formRef,
|
|
319
325
|
model: state.form,
|
|
320
|
-
rules: state.rules
|
|
326
|
+
rules: state.rules,
|
|
327
|
+
"require-mark-placement": "left"
|
|
321
328
|
}, {
|
|
322
329
|
default: withCtx(() => [
|
|
323
330
|
(openBlock(true), createElementBlock(Fragment, null, renderList(state.formArray, (item, index) => {
|
|
@@ -120,7 +120,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
120
|
readonly default: true;
|
|
121
121
|
};
|
|
122
122
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
123
|
-
readonly nativeFocusBehavior:
|
|
123
|
+
readonly nativeFocusBehavior: {
|
|
124
|
+
readonly type: BooleanConstructor;
|
|
125
|
+
readonly default: boolean;
|
|
126
|
+
};
|
|
124
127
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
125
128
|
heightTiny: string;
|
|
126
129
|
heightSmall: string;
|
|
@@ -834,7 +837,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
834
837
|
readonly default: true;
|
|
835
838
|
};
|
|
836
839
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
837
|
-
readonly nativeFocusBehavior:
|
|
840
|
+
readonly nativeFocusBehavior: {
|
|
841
|
+
readonly type: BooleanConstructor;
|
|
842
|
+
readonly default: boolean;
|
|
843
|
+
};
|
|
838
844
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
839
845
|
heightTiny: string;
|
|
840
846
|
heightSmall: string;
|
|
@@ -214,7 +214,7 @@ var RAddress = defineComponent({
|
|
|
214
214
|
handleDef();
|
|
215
215
|
return () => {
|
|
216
216
|
return createVNode("div", {
|
|
217
|
-
"class": "scale-address"
|
|
217
|
+
"class": "c-scale-address"
|
|
218
218
|
}, [createVNode("div", {
|
|
219
219
|
"class": "field-row"
|
|
220
220
|
}, [hasProvince.value && renderProvince(), hasCity.value && renderCity(), hasDistrict.value && renderDistrict()]), hasAddress.value && renderaddress()]);
|
|
@@ -51,12 +51,18 @@ var scriptCheckbox = defineComponent({
|
|
|
51
51
|
handleOptions
|
|
52
52
|
} = chooseCommon(props, state);
|
|
53
53
|
const chooseStyleSetting = ((_b = (_a = props.item) == null ? void 0 : _a.setting) == null ? void 0 : _b.chooseStyleSetting) || 1;
|
|
54
|
-
const handlePreview = (url, i) => {
|
|
54
|
+
const handlePreview = (e, url, i) => {
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
e.stopPropagation();
|
|
55
57
|
let imgs = state.curOptions.map((v) => v.imageUrl);
|
|
56
58
|
if (!imgs.length)
|
|
57
59
|
return;
|
|
58
60
|
api({
|
|
59
|
-
images: imgs
|
|
61
|
+
images: imgs,
|
|
62
|
+
options: {
|
|
63
|
+
toolbar: true,
|
|
64
|
+
initialViewIndex: i
|
|
65
|
+
}
|
|
60
66
|
});
|
|
61
67
|
};
|
|
62
68
|
const handleCheckboxOther = (isOtherInput) => {
|
|
@@ -156,7 +162,7 @@ var scriptCheckbox = defineComponent({
|
|
|
156
162
|
"size": "24",
|
|
157
163
|
"color": "#fff",
|
|
158
164
|
"component": SearchOutline,
|
|
159
|
-
"
|
|
165
|
+
"onClick": (e) => handlePreview(e, o.imageUrl, i)
|
|
160
166
|
}, null)])]);
|
|
161
167
|
};
|
|
162
168
|
const renderPresuffix = (o, i) => {
|
|
@@ -218,7 +224,7 @@ var scriptCheckbox = defineComponent({
|
|
|
218
224
|
"key": o.value,
|
|
219
225
|
"value": o[opKey]
|
|
220
226
|
}, {
|
|
221
|
-
default: () => [showImgWrap.value(o) && renderImg(o), hasPreSuffix(o) && renderPresuffix(o), !hasPreSuffix(o) && renderDefault(o), o.importability && renderOther(o)]
|
|
227
|
+
default: () => [showImgWrap.value(o) && renderImg(o, i), hasPreSuffix(o) && renderPresuffix(o), !hasPreSuffix(o) && renderDefault(o), o.importability && renderOther(o)]
|
|
222
228
|
}))) ? _slot : {
|
|
223
229
|
default: () => [_slot]
|
|
224
230
|
});
|
|
@@ -33,7 +33,6 @@ var RCollection = defineComponent({
|
|
|
33
33
|
describe
|
|
34
34
|
} = props.item || {};
|
|
35
35
|
const options = ((_b = props.item) == null ? void 0 : _b.setting) || {};
|
|
36
|
-
console.log(props.item);
|
|
37
36
|
const className = computed(() => {
|
|
38
37
|
const type2 = options.promptType;
|
|
39
38
|
return type2 ? `is-${type2}` : "";
|
|
@@ -31,7 +31,8 @@ var scriptDatetime = defineComponent({
|
|
|
31
31
|
const dateType = type === "DATE" ? "date" : (_e = (_d = props.item) == null ? void 0 : _d.setting) == null ? void 0 : _e.dateType;
|
|
32
32
|
const timeFormat = "HH:mm:ss";
|
|
33
33
|
const state = reactive({
|
|
34
|
-
rangeValue: [null, null]
|
|
34
|
+
rangeValue: [null, null],
|
|
35
|
+
dateValue: null
|
|
35
36
|
});
|
|
36
37
|
const useDateRangeType = computed(() => {
|
|
37
38
|
if (dateType == "datetime")
|
|
@@ -54,6 +55,8 @@ var scriptDatetime = defineComponent({
|
|
|
54
55
|
let eV = val1 ? vexutils.isValidDate(new Date(val1)) ? val1 : null : null;
|
|
55
56
|
state.rangeValue = [sV, eV];
|
|
56
57
|
return;
|
|
58
|
+
} else {
|
|
59
|
+
state.dateValue = val;
|
|
57
60
|
}
|
|
58
61
|
};
|
|
59
62
|
const disStartHours = (hour) => {
|
|
@@ -134,12 +137,16 @@ var scriptDatetime = defineComponent({
|
|
|
134
137
|
}
|
|
135
138
|
context.emit("scaleChange", [otherVal || "", formattedValue], props.item);
|
|
136
139
|
};
|
|
140
|
+
const changeDate = (val, formattedValue) => {
|
|
141
|
+
context.emit("scaleChange", formattedValue, props.item);
|
|
142
|
+
};
|
|
137
143
|
const renderTime = () => {
|
|
138
144
|
return createVNode(resolveComponent("n-time-picker"), {
|
|
139
|
-
"formatted-value":
|
|
140
|
-
"onUpdate:formatted-value": ($event) =>
|
|
145
|
+
"formatted-value": state.dateValue,
|
|
146
|
+
"onUpdate:formatted-value": ($event) => state.dateValue = $event,
|
|
141
147
|
"clearable": true,
|
|
142
|
-
"disabled": props.isLock
|
|
148
|
+
"disabled": props.isLock,
|
|
149
|
+
"onUpdate:value": changeDate
|
|
143
150
|
}, null);
|
|
144
151
|
};
|
|
145
152
|
const renderTimeRange = () => {
|
|
@@ -165,20 +172,22 @@ var scriptDatetime = defineComponent({
|
|
|
165
172
|
};
|
|
166
173
|
const renderDate = () => {
|
|
167
174
|
return createVNode(resolveComponent("n-date-picker"), {
|
|
168
|
-
"formatted-value":
|
|
169
|
-
"onUpdate:formatted-value": ($event) =>
|
|
175
|
+
"formatted-value": state.dateValue,
|
|
176
|
+
"onUpdate:formatted-value": ($event) => state.dateValue = $event,
|
|
170
177
|
"type": dateType,
|
|
171
178
|
"clearable": true,
|
|
172
|
-
"disabled": props.isLock
|
|
179
|
+
"disabled": props.isLock,
|
|
180
|
+
"onUpdate:value": changeDate
|
|
173
181
|
}, null);
|
|
174
182
|
};
|
|
175
183
|
const renderDateRange = () => {
|
|
176
184
|
return createVNode(resolveComponent("n-date-picker"), {
|
|
177
|
-
"formatted-value":
|
|
178
|
-
"onUpdate:formatted-value": ($event) =>
|
|
185
|
+
"formatted-value": state.dateValue,
|
|
186
|
+
"onUpdate:formatted-value": ($event) => state.dateValue = $event,
|
|
179
187
|
"type": useDateRangeType.value,
|
|
180
188
|
"clearable": true,
|
|
181
|
-
"disabled": props.isLock
|
|
189
|
+
"disabled": props.isLock,
|
|
190
|
+
"onUpdate:value": changeDate
|
|
182
191
|
}, null);
|
|
183
192
|
};
|
|
184
193
|
defaultValue(props.form[props.item.val_key]);
|
|
@@ -29,7 +29,7 @@ var RInput = defineComponent({
|
|
|
29
29
|
let eleType = ((_b = props.item) == null ? void 0 : _b.type) || "INPUT";
|
|
30
30
|
let isTextarea = eleType == "INPUT" || eleType == "EVALUATE_INPUT";
|
|
31
31
|
let row = ((_d = (_c = props.item) == null ? void 0 : _c.setting) == null ? void 0 : _d.inputRow) || 1;
|
|
32
|
-
let defaultPlaceHolder = (
|
|
32
|
+
let defaultPlaceHolder = (_f = (_e = props.item) == null ? void 0 : _e.setting) == null ? void 0 : _f.defaultPlaceHolder;
|
|
33
33
|
const setTextareaRow = computed(() => {
|
|
34
34
|
if (!row || row == "auto") {
|
|
35
35
|
return {
|
|
@@ -72,7 +72,8 @@ var RMap = defineComponent({
|
|
|
72
72
|
"value": state.mapLocation,
|
|
73
73
|
"disabled": true,
|
|
74
74
|
"class": "map-input",
|
|
75
|
-
"on-click": clickMap
|
|
75
|
+
"on-click": clickMap,
|
|
76
|
+
"placeholder": "\u8BF7\u9009\u62E9"
|
|
76
77
|
}, {
|
|
77
78
|
prefix: () => createVNode(resolveComponent("n-icon"), {
|
|
78
79
|
"size": "18",
|
|
@@ -50,12 +50,18 @@ var scriptRadio = defineComponent({
|
|
|
50
50
|
handleOptions
|
|
51
51
|
} = chooseCommon(props, state);
|
|
52
52
|
const chooseStyleSetting = ((_b = (_a = props.item) == null ? void 0 : _a.setting) == null ? void 0 : _b.chooseStyleSetting) || 1;
|
|
53
|
-
const handlePreview = (url, i) => {
|
|
53
|
+
const handlePreview = (e, url, i) => {
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
e.stopPropagation();
|
|
54
56
|
let imgs = state.curOptions.map((v) => v.imageUrl);
|
|
55
57
|
if (!imgs.length)
|
|
56
58
|
return;
|
|
57
59
|
api({
|
|
58
|
-
images: imgs
|
|
60
|
+
images: imgs,
|
|
61
|
+
options: {
|
|
62
|
+
toolbar: true,
|
|
63
|
+
initialViewIndex: i
|
|
64
|
+
}
|
|
59
65
|
});
|
|
60
66
|
};
|
|
61
67
|
const handleRadioDef = (item, curValue, options) => {
|
|
@@ -148,7 +154,7 @@ var scriptRadio = defineComponent({
|
|
|
148
154
|
"size": "24",
|
|
149
155
|
"color": "#fff",
|
|
150
156
|
"component": SearchOutline,
|
|
151
|
-
"
|
|
157
|
+
"onClick": (e) => handlePreview(e, o.imageUrl, i)
|
|
152
158
|
}, null)])]);
|
|
153
159
|
};
|
|
154
160
|
const renderPresuffix = (o, i) => {
|
|
@@ -210,7 +216,7 @@ var scriptRadio = defineComponent({
|
|
|
210
216
|
"key": o.value,
|
|
211
217
|
"value": o[opKey]
|
|
212
218
|
}, {
|
|
213
|
-
default: () => [showImgWrap.value(o) && renderImg(o), hasPreSuffix(o) && renderPresuffix(o), !hasPreSuffix(o) && renderDefault(o), o.importability && renderOther(o)]
|
|
219
|
+
default: () => [showImgWrap.value(o) && renderImg(o, i), hasPreSuffix(o) && renderPresuffix(o), !hasPreSuffix(o) && renderDefault(o), o.importability && renderOther(o)]
|
|
214
220
|
}))) ? _slot : {
|
|
215
221
|
default: () => [_slot]
|
|
216
222
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, reactive, watch, createVNode, resolveComponent } from 'vue';
|
|
1
|
+
import { defineComponent, reactive, computed, watch, createVNode, resolveComponent } from 'vue';
|
|
2
2
|
import { NSelect } from 'naive-ui';
|
|
3
3
|
|
|
4
4
|
var scriptSelect = defineComponent({
|
|
@@ -52,6 +52,10 @@ var scriptSelect = defineComponent({
|
|
|
52
52
|
fetching: false
|
|
53
53
|
});
|
|
54
54
|
props.openType == "formIframe";
|
|
55
|
+
const isMultiple = computed(() => {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
return !!((_b = (_a = props.item) == null ? void 0 : _a.setting) == null ? void 0 : _b.isMultiple);
|
|
58
|
+
});
|
|
55
59
|
const initSelectOptions = async () => {
|
|
56
60
|
const {
|
|
57
61
|
targetSource,
|
|
@@ -123,6 +127,7 @@ var scriptSelect = defineComponent({
|
|
|
123
127
|
"onUpdate:value": [($event) => props.form[props.item.val_key] = $event, handleSelectChange],
|
|
124
128
|
"filterable": true,
|
|
125
129
|
"placeholder": "\u8BF7\u9009\u62E9",
|
|
130
|
+
"multiple": isMultiple.value,
|
|
126
131
|
"disabled": props.isLock,
|
|
127
132
|
"loading": state.fetching,
|
|
128
133
|
"options": state.curOptions
|
package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts
CHANGED
|
@@ -173,6 +173,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
173
|
scrollable: BooleanConstructor;
|
|
174
174
|
contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
175
175
|
headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
176
|
+
footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
176
177
|
onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
|
|
177
178
|
'onUpdate:show': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: boolean) => void>>;
|
|
178
179
|
onUpdateShow: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: boolean) => void>>;
|
|
@@ -474,6 +475,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
474
475
|
scrollable: BooleanConstructor;
|
|
475
476
|
contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
476
477
|
headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
478
|
+
footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
477
479
|
onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
|
|
478
480
|
'onUpdate:show': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: boolean) => void>>;
|
|
479
481
|
onUpdateShow: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: boolean) => void>>;
|
|
@@ -42,9 +42,9 @@ const ScaleViewComputed = (props, state, config) => {
|
|
|
42
42
|
};
|
|
43
43
|
});
|
|
44
44
|
const handlePageClass = computed(() => {
|
|
45
|
-
if (props.type == "customList" && !
|
|
45
|
+
if (props.type == "customList" && !props.noBtn)
|
|
46
46
|
return false;
|
|
47
|
-
if (!
|
|
47
|
+
if (!props.noBtn && !props.hideBtn)
|
|
48
48
|
return false;
|
|
49
49
|
return true;
|
|
50
50
|
});
|
|
@@ -71,13 +71,13 @@ const ScaleViewComputed = (props, state, config) => {
|
|
|
71
71
|
const isPreviewScale = computed(() => {
|
|
72
72
|
var _a;
|
|
73
73
|
let guage_id = (_a = state.ids) == null ? void 0 : _a.guage_id;
|
|
74
|
-
return guage_id &&
|
|
74
|
+
return guage_id && props.noBtn;
|
|
75
75
|
});
|
|
76
76
|
const showEvaluateEntry = computed(() => {
|
|
77
|
-
return !isPreviewScale.value && state.showEvaluatePage && state.showEvaluateSettingWrap && !state.isFinished && !
|
|
77
|
+
return !isPreviewScale.value && state.showEvaluatePage && state.showEvaluateSettingWrap && !state.isFinished && !props.noBtn && !props.hideBtn;
|
|
78
78
|
});
|
|
79
79
|
const showEvaluateCoundownPage = computed(() => {
|
|
80
|
-
return !isPreviewScale.value && !showEvaluateEntry.value && state.showEvaluateCountdownWrap && !state.isFinished && !
|
|
80
|
+
return !isPreviewScale.value && !showEvaluateEntry.value && state.showEvaluateCountdownWrap && !state.isFinished && !props.noBtn && !props.hideBtn;
|
|
81
81
|
});
|
|
82
82
|
const hasEvaluateResultSetting = computed(() => {
|
|
83
83
|
let { evaluateResultSetting = {} } = state.config;
|
|
@@ -98,9 +98,9 @@ const ScaleViewComputed = (props, state, config) => {
|
|
|
98
98
|
});
|
|
99
99
|
const showSaveBtn = computed(() => {
|
|
100
100
|
if (!hasEvaluateResultSetting.value && !hasDefault.value) {
|
|
101
|
-
return !
|
|
101
|
+
return !props.noBtn && !props.hideBtn;
|
|
102
102
|
}
|
|
103
|
-
return !
|
|
103
|
+
return !props.noBtn && !props.hideBtn && !state.isFinished;
|
|
104
104
|
});
|
|
105
105
|
const componentDisable = computed(() => {
|
|
106
106
|
if (!hasEvaluateResultSetting.value && !hasDefault.value) {
|
|
@@ -170,7 +170,8 @@ const ScaleViewInit = (props, state, emit, config) => {
|
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
172
|
};
|
|
173
|
-
const handleRelationLogic = (list,
|
|
173
|
+
const handleRelationLogic = (list, item) => {
|
|
174
|
+
let relationLogicObj = vexutils.isString(item.relationLogic) ? JSON.parse(item.relationLogic) : item.relationLogic;
|
|
174
175
|
let { condition } = relationLogicObj || {};
|
|
175
176
|
if (!condition || !condition.length)
|
|
176
177
|
return;
|
|
@@ -190,6 +191,7 @@ const ScaleViewInit = (props, state, emit, config) => {
|
|
|
190
191
|
c.value = replaceConditionItem(matchItem.options, value);
|
|
191
192
|
}
|
|
192
193
|
});
|
|
194
|
+
item.relationLogic = relationLogicObj;
|
|
193
195
|
};
|
|
194
196
|
const handleFrontAddress = (list) => {
|
|
195
197
|
if (!list || !list.length)
|
|
@@ -338,8 +340,7 @@ const ScaleViewInit = (props, state, emit, config) => {
|
|
|
338
340
|
return item;
|
|
339
341
|
});
|
|
340
342
|
return results.map((item) => {
|
|
341
|
-
|
|
342
|
-
handleRelationLogic(list, relationLogicObj);
|
|
343
|
+
handleRelationLogic(list, item);
|
|
343
344
|
handLenextLogic(item);
|
|
344
345
|
if (item.type === "CHECKBOX_BLOCK" && item.dbValue && !Array.isArray(item.dbValue) && props.type === "customList") {
|
|
345
346
|
item.dbValue = item.dbValue.split(",").filter((ii) => !!ii);
|
|
@@ -4,70 +4,6 @@ import { ScaleViewComputed } from './scaleview-computed.mjs';
|
|
|
4
4
|
|
|
5
5
|
const ScaleViewValidate = (props, state, config) => {
|
|
6
6
|
const { formKey } = ScaleViewComputed(props, state, config);
|
|
7
|
-
const formatRules = (formArray) => {
|
|
8
|
-
const rules = {};
|
|
9
|
-
formArray.forEach((item) => {
|
|
10
|
-
let newTitle = formKey(item);
|
|
11
|
-
if (newTitle.includes(".")) {
|
|
12
|
-
newTitle = newTitle.replace(/\./g, "~-~");
|
|
13
|
-
}
|
|
14
|
-
rules[newTitle] = [];
|
|
15
|
-
if (item.required) {
|
|
16
|
-
rules[newTitle].push({ required: item.required, message: "\u5FC5\u586B", trigger: "change" });
|
|
17
|
-
}
|
|
18
|
-
if (item.type == "MOBILE" && item.validation) {
|
|
19
|
-
rules[newTitle].push({
|
|
20
|
-
pattern: /^1[3456789]\d{9}$/,
|
|
21
|
-
message: "\u683C\u5F0F\u9519\u8BEF",
|
|
22
|
-
trigger: "blur"
|
|
23
|
-
});
|
|
24
|
-
} else if (item.type == "ID_CARD" && item.validation) {
|
|
25
|
-
rules[newTitle].push({
|
|
26
|
-
pattern: /^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9]|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}))$/,
|
|
27
|
-
message: "\u683C\u5F0F\u9519\u8BEF",
|
|
28
|
-
trigger: "blur"
|
|
29
|
-
});
|
|
30
|
-
} else if (item.type == "ADDRESS" && item.required) {
|
|
31
|
-
if (handleAddressType(item)) {
|
|
32
|
-
rules[newTitle].push({
|
|
33
|
-
validator: checkAdress,
|
|
34
|
-
trigger: "change"
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
} else if (item.type == "LABEL" && item.required) {
|
|
38
|
-
rules[newTitle].push({
|
|
39
|
-
validator: checkLabel,
|
|
40
|
-
trigger: "change"
|
|
41
|
-
});
|
|
42
|
-
} else if (item.type == "DATETIME" && props.type == "customList") {
|
|
43
|
-
let dateMaxType = handleDateMaxType(item);
|
|
44
|
-
if (!dateMaxType)
|
|
45
|
-
return;
|
|
46
|
-
let obj = {
|
|
47
|
-
1: "checkDateMaxCur",
|
|
48
|
-
2: "checkDateMaxSet",
|
|
49
|
-
3: "checkDateMaxOther"
|
|
50
|
-
};
|
|
51
|
-
rules[newTitle].push({
|
|
52
|
-
validator: (rule, value) => obj[dateMaxType](rule, value, item),
|
|
53
|
-
trigger: "change"
|
|
54
|
-
});
|
|
55
|
-
} else if (item.type === "RADIO_BLOCK") {
|
|
56
|
-
state.choiceComObj[formKey(item)] = {};
|
|
57
|
-
rules[newTitle].push({
|
|
58
|
-
validator: (rule, value) => checkRadio(rule, value, item),
|
|
59
|
-
trigger: "change"
|
|
60
|
-
});
|
|
61
|
-
} else if (item.type === "CHECKBOX_BLOCK") {
|
|
62
|
-
state.choiceComObj[formKey(item)] = {};
|
|
63
|
-
rules[newTitle].push({
|
|
64
|
-
validator: (rule, value) => checkCheckbox(rule, value, item),
|
|
65
|
-
trigger: "change"
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return rules;
|
|
70
|
-
};
|
|
71
7
|
const handleAddressType = (item) => {
|
|
72
8
|
let setObj = { addressType: "province-city-district-address" };
|
|
73
9
|
if (vexutils.isJSON(item.setting)) {
|
|
@@ -156,6 +92,91 @@ const ScaleViewValidate = (props, state, config) => {
|
|
|
156
92
|
}
|
|
157
93
|
return true;
|
|
158
94
|
};
|
|
95
|
+
const checkType = (val) => {
|
|
96
|
+
return Object.prototype.toString.call(val);
|
|
97
|
+
};
|
|
98
|
+
const validateRequired = (rule, value) => {
|
|
99
|
+
let type = checkType(value);
|
|
100
|
+
if (type == "[object Object]") {
|
|
101
|
+
if (value && Object.keys(value).length)
|
|
102
|
+
return true;
|
|
103
|
+
} else if (type == "[object Array]") {
|
|
104
|
+
if (value && value.length)
|
|
105
|
+
return true;
|
|
106
|
+
} else if (type == "[object Number]") {
|
|
107
|
+
if (value || value === 0)
|
|
108
|
+
return true;
|
|
109
|
+
} else {
|
|
110
|
+
if (value)
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
return new Error("\u5FC5\u586B");
|
|
114
|
+
};
|
|
115
|
+
const filterArr = ["LABEL", "ADDRESS"];
|
|
116
|
+
const formatRules = (formArray) => {
|
|
117
|
+
const rules = {};
|
|
118
|
+
formArray.forEach((item) => {
|
|
119
|
+
let newTitle = item.val_key;
|
|
120
|
+
if (newTitle.includes(".")) {
|
|
121
|
+
newTitle = newTitle.replace(/\./g, "~-~");
|
|
122
|
+
}
|
|
123
|
+
rules[newTitle] = [];
|
|
124
|
+
if (item.required && !filterArr.includes(item.type)) {
|
|
125
|
+
rules[newTitle].push({ required: item.required, message: "\u5FC5\u586B", trigger: "change", validator: validateRequired });
|
|
126
|
+
}
|
|
127
|
+
if (item.type == "MOBILE" && item.validation) {
|
|
128
|
+
rules[newTitle].push({
|
|
129
|
+
pattern: /^1[3456789]\d{9}$/,
|
|
130
|
+
message: "\u683C\u5F0F\u9519\u8BEF",
|
|
131
|
+
trigger: "blur"
|
|
132
|
+
});
|
|
133
|
+
} else if (item.type == "ID_CARD" && item.validation) {
|
|
134
|
+
rules[newTitle].push({
|
|
135
|
+
pattern: /^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9]|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}))$/,
|
|
136
|
+
message: "\u683C\u5F0F\u9519\u8BEF",
|
|
137
|
+
trigger: "blur"
|
|
138
|
+
});
|
|
139
|
+
} else if (item.type == "ADDRESS" && item.required) {
|
|
140
|
+
if (handleAddressType(item)) {
|
|
141
|
+
rules[newTitle].push({
|
|
142
|
+
validator: checkAdress,
|
|
143
|
+
trigger: "change"
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
} else if (item.type == "LABEL" && item.required) {
|
|
147
|
+
rules[newTitle].push({
|
|
148
|
+
validator: checkLabel,
|
|
149
|
+
trigger: "change"
|
|
150
|
+
});
|
|
151
|
+
} else if (item.type == "DATETIME" && props.type == "customList") {
|
|
152
|
+
let dateMaxType = handleDateMaxType(item);
|
|
153
|
+
if (!dateMaxType)
|
|
154
|
+
return;
|
|
155
|
+
let obj = {
|
|
156
|
+
1: "checkDateMaxCur",
|
|
157
|
+
2: "checkDateMaxSet",
|
|
158
|
+
3: "checkDateMaxOther"
|
|
159
|
+
};
|
|
160
|
+
rules[newTitle].push({
|
|
161
|
+
validator: (rule, value) => obj[dateMaxType](rule, value, item),
|
|
162
|
+
trigger: "change"
|
|
163
|
+
});
|
|
164
|
+
} else if (item.type === "RADIO_BLOCK") {
|
|
165
|
+
state.choiceComObj[formKey(item)] = {};
|
|
166
|
+
rules[newTitle].push({
|
|
167
|
+
validator: (rule, value) => checkRadio(rule, value, item),
|
|
168
|
+
trigger: "change"
|
|
169
|
+
});
|
|
170
|
+
} else if (item.type === "CHECKBOX_BLOCK") {
|
|
171
|
+
state.choiceComObj[formKey(item)] = {};
|
|
172
|
+
rules[newTitle].push({
|
|
173
|
+
validator: (rule, value) => checkCheckbox(rule, value, item),
|
|
174
|
+
trigger: "change"
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
return rules;
|
|
179
|
+
};
|
|
159
180
|
return {
|
|
160
181
|
formatRules
|
|
161
182
|
};
|
|
@@ -5163,6 +5163,7 @@ export declare const componentMap: {
|
|
|
5163
5163
|
scrollable: BooleanConstructor;
|
|
5164
5164
|
contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
5165
5165
|
headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
5166
|
+
footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
5166
5167
|
onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
|
|
5167
5168
|
'onUpdate:show': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: boolean) => void>>;
|
|
5168
5169
|
onUpdateShow: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: boolean) => void>>;
|
|
@@ -5464,6 +5465,7 @@ export declare const componentMap: {
|
|
|
5464
5465
|
scrollable: BooleanConstructor;
|
|
5465
5466
|
contentStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
5466
5467
|
headerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
5468
|
+
footerStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
5467
5469
|
onClickoutside: import("vue").PropType<(e: MouseEvent) => void>;
|
|
5468
5470
|
'onUpdate:show': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: boolean) => void>>;
|
|
5469
5471
|
onUpdateShow: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(value: boolean) => void>>;
|
|
@@ -5629,7 +5631,10 @@ export declare const componentMap: {
|
|
|
5629
5631
|
readonly default: true;
|
|
5630
5632
|
};
|
|
5631
5633
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
5632
|
-
readonly nativeFocusBehavior:
|
|
5634
|
+
readonly nativeFocusBehavior: {
|
|
5635
|
+
readonly type: BooleanConstructor;
|
|
5636
|
+
readonly default: boolean;
|
|
5637
|
+
};
|
|
5633
5638
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
5634
5639
|
heightTiny: string;
|
|
5635
5640
|
heightSmall: string;
|
|
@@ -6343,7 +6348,10 @@ export declare const componentMap: {
|
|
|
6343
6348
|
readonly default: true;
|
|
6344
6349
|
};
|
|
6345
6350
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
6346
|
-
readonly nativeFocusBehavior:
|
|
6351
|
+
readonly nativeFocusBehavior: {
|
|
6352
|
+
readonly type: BooleanConstructor;
|
|
6353
|
+
readonly default: boolean;
|
|
6354
|
+
};
|
|
6347
6355
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
6348
6356
|
heightTiny: string;
|
|
6349
6357
|
heightSmall: string;
|
|
@@ -8484,7 +8492,10 @@ export declare const componentMap: {
|
|
|
8484
8492
|
readonly default: true;
|
|
8485
8493
|
};
|
|
8486
8494
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
8487
|
-
readonly nativeFocusBehavior:
|
|
8495
|
+
readonly nativeFocusBehavior: {
|
|
8496
|
+
readonly type: BooleanConstructor;
|
|
8497
|
+
readonly default: boolean;
|
|
8498
|
+
};
|
|
8488
8499
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
8489
8500
|
heightTiny: string;
|
|
8490
8501
|
heightSmall: string;
|
|
@@ -9198,7 +9209,10 @@ export declare const componentMap: {
|
|
|
9198
9209
|
readonly default: true;
|
|
9199
9210
|
};
|
|
9200
9211
|
readonly onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
|
|
9201
|
-
readonly nativeFocusBehavior:
|
|
9212
|
+
readonly nativeFocusBehavior: {
|
|
9213
|
+
readonly type: BooleanConstructor;
|
|
9214
|
+
readonly default: boolean;
|
|
9215
|
+
};
|
|
9202
9216
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Button", {
|
|
9203
9217
|
heightTiny: string;
|
|
9204
9218
|
heightSmall: string;
|