cnhis-design-vue 3.3.3-beta.7 → 3.3.3-release.7
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 +87 -87
- package/es/components/audio-sdk/index.d.ts +13 -11
- package/es/components/audio-sdk/src/Index.vue.d.ts +13 -11
- package/es/components/audio-sdk/src/Index.vue2.js +36 -4
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +1 -1
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +1 -1
- package/es/components/audio-sdk/src/components/recording.vue2.js +17 -3
- package/es/components/base-search/index.d.ts +3 -0
- package/es/components/base-search/src/index.vue.d.ts +3 -0
- package/es/components/big-table/src/components/NoData.vue2.js +8 -1
- package/es/components/big-table/src/hooks/useTableParse.js +8 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +3 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +13 -0
- package/es/components/card-reader-sdk-cn/src/henan/index.js +8 -1
- package/es/components/classification/index.d.ts +56 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +56 -6
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +56 -6
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/index.vue.d.ts +56 -6
- package/es/components/expand-field/index.d.ts +792 -1
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +792 -1
- package/es/components/expand-field/src/components/form.vue2.js +8 -1
- package/es/components/expand-field/src/index.vue.d.ts +792 -1
- package/es/components/field-editor/index.d.ts +13 -0
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +13 -0
- package/es/components/field-editor/src/FieldEditor.vue2.js +2 -1
- package/es/components/field-editor/src/fields.d.ts +1 -0
- package/es/components/field-editor/src/fields.js +6 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
- package/es/components/field-set/src/FieldFilter.vue.d.ts +3 -3
- package/es/components/field-set/src/FieldSet.vue.d.ts +35 -4
- package/es/components/field-set/src/FieldSet.vue2.js +112 -65
- package/es/components/field-set/src/Index.vue2.js +8 -3
- package/es/components/field-set/src/TableStyle.vue2.js +2 -2
- package/es/components/field-set/src/components/table-row.vue.d.ts +3 -3
- package/es/components/field-set/src/constants/index.d.ts +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +39 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +39 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +13 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +13 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +8 -1
- package/es/components/form-render/index.d.ts +13 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +13 -0
- package/es/components/form-render/src/FormRender.vue2.js +4 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +13 -0
- package/es/components/form-render/src/components/renderer/formItem.js +8 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +12 -3
- package/es/components/form-render/src/hooks/useBusinessBinding.js +7 -7
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +8 -1
- package/es/components/form-render/src/utils/business.d.ts +3 -1
- package/es/components/form-render/src/utils/business.js +7 -1
- package/es/components/iho-chat/index.d.ts +18 -1
- package/es/components/iho-chat/src/Index.vue.d.ts +18 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +2 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +22 -10
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +3 -2
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +16 -0
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +112 -53
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/hooks/index.d.ts +1 -0
- package/es/components/iho-chat/src/hooks/index.js +1 -0
- package/es/components/iho-chat/src/hooks/useDraggable.d.ts +25 -0
- package/es/components/iho-chat/src/hooks/useDraggable.js +151 -0
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +26 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +26 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +13 -0
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +16 -2
- package/es/components/quick-search/index.d.ts +2 -0
- package/es/components/quick-search/src/index.vue.d.ts +2 -0
- package/es/components/scale-view/index.d.ts +53 -3
- package/es/components/scale-view/src/ScaleView.vue.d.ts +56 -5
- package/es/components/scale-view/src/ScaleView.vue2.js +79 -4
- package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +5 -0
- package/es/components/scale-view/src/components/AnswerParse.vue2.js +74 -8
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +3 -0
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +26 -2
- package/es/components/scale-view/src/components/EvaluatePage.vue.d.ts +3 -0
- package/es/components/scale-view/src/components/EvaluatePage.vue2.js +27 -6
- package/es/components/scale-view/src/components/NoData.vue2.js +9 -3
- package/es/components/scale-view/src/components/ScaleScore.d.ts +1 -1
- package/es/components/scale-view/src/components/ScaleScore.js +45 -3
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +16 -2
- package/es/components/scale-view/src/components/formitem/r-sign.js +32 -4
- package/es/components/scale-view/src/components/formitem/r-upload.js +65 -7
- package/es/components/scale-view/src/components/formitem/sign-com.js +8 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +18 -3
- package/es/components/scale-view/src/hooks/scaleview-init.js +24 -3
- package/es/components/scale-view/src/hooks/scaleview-methods.js +40 -5
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +8 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +8 -0
- package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +2 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +64 -8
- package/es/components/scale-view/src/hooks/scaleview-validate.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +157 -24
- package/es/components/scale-view/src/hooks/use-evaluate.js +16 -2
- package/es/components/scale-view/src/hooks/use-noData.js +33 -5
- package/es/components/scale-view/src/utils/judge-types.d.ts +2 -1
- package/es/components/scale-view/src/utils/judge-types.js +10 -10
- package/es/components/scale-view/src/utils/watch-form-change.d.ts +13 -0
- package/es/components/scale-view/src/utils/watch-form-change.js +71 -0
- package/es/components/select-person/index.d.ts +792 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +433 -273
- package/es/components/select-person/src/SelectPerson.vue.js +6 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +788 -0
- package/es/components/select-person/src/SelectPersonRole.vue.js +2 -2
- package/es/components/select-person/src/components/GroupItem.vue.d.ts +19 -0
- package/es/components/select-person/src/components/GroupItem.vue.js +6 -0
- package/es/components/select-person/src/components/GroupItem.vue2.js +37 -0
- package/es/components/select-person/src/components/SearchGroupList.vue.d.ts +214 -0
- package/es/components/select-person/src/components/SearchGroupList.vue.js +6 -0
- package/es/components/select-person/src/components/SearchGroupList.vue2.js +145 -0
- package/es/components/select-person/src/components/SearchMultiple.vue2.js +1 -1
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +21 -12
- package/es/components/select-person/src/components/TagItem.vue.d.ts +43 -0
- package/es/components/select-person/src/components/TagItem.vue.js +6 -0
- package/es/components/select-person/src/components/TagItem.vue2.js +40 -0
- package/es/components/select-person/src/index.vue.d.ts +793 -1
- package/es/components/select-person/src/index.vue2.js +21 -4
- package/es/components/select-person/src/types/index.d.ts +35 -0
- package/es/components/select-person/src/types/index.js +1 -0
- package/es/components/select-person/src/utils/index.d.ts +3 -0
- package/es/components/select-person/src/utils/index.js +25 -2
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +13 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +54 -6
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +26 -10
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +17 -2
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +37 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +18 -2
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +44 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +36 -4
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +2 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +55 -6
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +6 -3
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +12 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +25 -6
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +12 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +2 -2
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +2 -2
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +20 -3
- package/es/components/table-filter/src/hooks/useRenderWidget.js +4 -0
- package/es/components/table-filter/src/tool/date.d.ts +3 -0
- package/es/components/table-filter/src/tool/date.js +139 -0
- package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
- package/es/components/table-filter/src/tool/transformData.js +11 -8
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +2 -1
- package/es/components/table-filter/src/types/index.d.ts +12 -0
- package/es/components/vod-chunk-upload/index.d.ts +3 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.d.ts +1 -29
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +109 -11
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +15 -1
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +72 -9
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +3 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +75 -9
- package/es/env.d.ts +25 -25
- package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
import 'xe-utils';
|
2
|
-
import 'moment';
|
2
|
+
import moment from 'moment';
|
3
3
|
import vexutilsExpand from '../../../../shared/utils/vexutilsExpand.js';
|
4
4
|
import { ScaleViewComputed } from './scaleview-computed.js';
|
5
5
|
|
@@ -16,11 +16,11 @@ const ScaleViewValidate = (props, state, config) => {
|
|
16
16
|
} else {
|
17
17
|
setObj = item.setting;
|
18
18
|
}
|
19
|
-
|
19
|
+
const isAdress = setObj.addressType.includes("address");
|
20
20
|
return isAdress;
|
21
21
|
};
|
22
22
|
const checkAdress = (rule, value) => {
|
23
|
-
|
23
|
+
const {
|
24
24
|
address
|
25
25
|
} = value || {};
|
26
26
|
if (!address) {
|
@@ -46,7 +46,7 @@ const ScaleViewValidate = (props, state, config) => {
|
|
46
46
|
}
|
47
47
|
}());
|
48
48
|
}
|
49
|
-
|
49
|
+
const {
|
50
50
|
labelStr,
|
51
51
|
labels = []
|
52
52
|
} = value;
|
@@ -69,19 +69,104 @@ const ScaleViewValidate = (props, state, config) => {
|
|
69
69
|
}
|
70
70
|
return setObj.dateMaxType;
|
71
71
|
};
|
72
|
+
const checkDateMaxCur = (rule, value, item) => {
|
73
|
+
if (!value)
|
74
|
+
return true;
|
75
|
+
const {
|
76
|
+
dateType
|
77
|
+
} = item.setting;
|
78
|
+
if (!dateType)
|
79
|
+
return true;
|
80
|
+
let dateMaxValue = state.currentTime;
|
81
|
+
if (dateType == "time") {
|
82
|
+
dateMaxValue = state.currentTime.format("HH:mm:ss");
|
83
|
+
}
|
84
|
+
const isMax = handleMax(dateType, value, dateMaxValue);
|
85
|
+
if (!isMax) {
|
86
|
+
return new Error(function() {
|
87
|
+
var _a, _b, _c;
|
88
|
+
try {
|
89
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.586")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.586")) || "\u6700\u5927\u4E0D\u80FD\u8D85\u8FC7\u5F53\u524D\u65E5\u671F\u65F6\u95F4";
|
90
|
+
} catch (e) {
|
91
|
+
return "\u6700\u5927\u4E0D\u80FD\u8D85\u8FC7\u5F53\u524D\u65E5\u671F\u65F6\u95F4";
|
92
|
+
}
|
93
|
+
}());
|
94
|
+
}
|
95
|
+
return true;
|
96
|
+
};
|
97
|
+
const checkDateMaxSet = (rule, value, item) => {
|
98
|
+
if (!value)
|
99
|
+
return true;
|
100
|
+
const {
|
101
|
+
dateMaxValue,
|
102
|
+
dateType
|
103
|
+
} = item.setting;
|
104
|
+
if (!dateMaxValue || !dateType)
|
105
|
+
return true;
|
106
|
+
const isMax = handleMax(dateType, value, dateMaxValue);
|
107
|
+
if (!isMax) {
|
108
|
+
return new Error(function() {
|
109
|
+
var _a, _b, _c;
|
110
|
+
try {
|
111
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.585")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.585")) || "\u6700\u5927\u4E0D\u80FD\u8D85\u8FC7\u6307\u5B9A\u65E5\u671F\u65F6\u95F4";
|
112
|
+
} catch (e) {
|
113
|
+
return "\u6700\u5927\u4E0D\u80FD\u8D85\u8FC7\u6307\u5B9A\u65E5\u671F\u65F6\u95F4";
|
114
|
+
}
|
115
|
+
}());
|
116
|
+
}
|
117
|
+
return true;
|
118
|
+
};
|
119
|
+
const checkDateMaxOther = (rule, value, item) => {
|
120
|
+
if (!value)
|
121
|
+
return true;
|
122
|
+
const {
|
123
|
+
outDateMaxValue,
|
124
|
+
dateType
|
125
|
+
} = item.setting;
|
126
|
+
if (!outDateMaxValue || !dateType)
|
127
|
+
return true;
|
128
|
+
const matchDateItem = state.formArray.find((v) => v.seq === outDateMaxValue);
|
129
|
+
if (!matchDateItem || matchDateItem.hide)
|
130
|
+
return true;
|
131
|
+
const matchValue = state.form[formKey(matchDateItem)];
|
132
|
+
if (!matchValue)
|
133
|
+
return;
|
134
|
+
const isMax = handleMax(dateType, value, matchValue);
|
135
|
+
const title = matchDateItem.title;
|
136
|
+
const str1 = function() {
|
137
|
+
var _a, _b, _c;
|
138
|
+
try {
|
139
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.584")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.584")) || "\u6700\u5927\u4E0D\u80FD\u8D85\u8FC7";
|
140
|
+
} catch (e) {
|
141
|
+
return "\u6700\u5927\u4E0D\u80FD\u8D85\u8FC7";
|
142
|
+
}
|
143
|
+
}();
|
144
|
+
const str2 = function() {
|
145
|
+
var _a, _b, _c;
|
146
|
+
try {
|
147
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.583")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.583")) || "\u65E5\u671F\u65F6\u95F4";
|
148
|
+
} catch (e) {
|
149
|
+
return "\u65E5\u671F\u65F6\u95F4";
|
150
|
+
}
|
151
|
+
}();
|
152
|
+
if (!isMax) {
|
153
|
+
return new Error(`${str1}\u3010${title}\u3011${str2}`);
|
154
|
+
}
|
155
|
+
return true;
|
156
|
+
};
|
72
157
|
const checkRadio = (rule, value, item) => {
|
73
158
|
if (!value)
|
74
159
|
return true;
|
75
|
-
|
160
|
+
const {
|
76
161
|
options
|
77
162
|
} = item;
|
78
163
|
if (!options.length || value === "other")
|
79
164
|
return true;
|
80
165
|
const key = formKey(item);
|
81
|
-
|
166
|
+
const {
|
82
167
|
optionsPreSuffixObj = {}
|
83
168
|
} = state.choiceComObj[key] || {};
|
84
|
-
|
169
|
+
const matchItem = options.find((o, i) => {
|
85
170
|
if (i + 1 === value) {
|
86
171
|
return true;
|
87
172
|
}
|
@@ -90,9 +175,16 @@ const ScaleViewValidate = (props, state, config) => {
|
|
90
175
|
if (!matchItem || matchItem.importability)
|
91
176
|
return true;
|
92
177
|
if (matchItem.prefix || matchItem.suffix) {
|
93
|
-
|
178
|
+
const inputValue = optionsPreSuffixObj[value];
|
94
179
|
if (!inputValue) {
|
95
|
-
return new Error(
|
180
|
+
return new Error(function() {
|
181
|
+
var _a, _b, _c;
|
182
|
+
try {
|
183
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.582")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.582")) || "\u8BF7\u5B8C\u5584\u9009\u9879";
|
184
|
+
} catch (e) {
|
185
|
+
return "\u8BF7\u5B8C\u5584\u9009\u9879";
|
186
|
+
}
|
187
|
+
}());
|
96
188
|
}
|
97
189
|
}
|
98
190
|
return true;
|
@@ -100,21 +192,22 @@ const ScaleViewValidate = (props, state, config) => {
|
|
100
192
|
const checkCheckbox = (rule, value, item) => {
|
101
193
|
if (!value || !value.length)
|
102
194
|
return true;
|
103
|
-
|
195
|
+
const {
|
104
196
|
options
|
105
197
|
} = item;
|
106
198
|
if (!options.length)
|
107
199
|
return true;
|
108
|
-
let i = 0,
|
200
|
+
let i = 0, v;
|
201
|
+
const len = value.length;
|
109
202
|
const key = formKey(item);
|
110
|
-
|
203
|
+
const {
|
111
204
|
optionsPreSuffixObj = {}
|
112
205
|
} = state.choiceComObj[key] || {};
|
113
206
|
for (; i < len; i++) {
|
114
207
|
v = value[i];
|
115
208
|
if (v === "other")
|
116
209
|
continue;
|
117
|
-
|
210
|
+
const matchItem = options.find((o, j) => {
|
118
211
|
if (j + 1 === v) {
|
119
212
|
return true;
|
120
213
|
}
|
@@ -123,19 +216,45 @@ const ScaleViewValidate = (props, state, config) => {
|
|
123
216
|
if (!matchItem || matchItem.importability)
|
124
217
|
continue;
|
125
218
|
if (matchItem.prefix || matchItem.suffix) {
|
126
|
-
|
219
|
+
const inputValue = optionsPreSuffixObj[v];
|
127
220
|
if (!inputValue) {
|
128
|
-
return new Error(
|
221
|
+
return new Error(function() {
|
222
|
+
var _a, _b, _c;
|
223
|
+
try {
|
224
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.582")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.582")) || "\u8BF7\u5B8C\u5584\u9009\u9879";
|
225
|
+
} catch (e) {
|
226
|
+
return "\u8BF7\u5B8C\u5584\u9009\u9879";
|
227
|
+
}
|
228
|
+
}());
|
129
229
|
}
|
130
230
|
}
|
131
231
|
}
|
132
232
|
return true;
|
133
233
|
};
|
234
|
+
const handleMax = (dateType, value, dateMaxValue) => {
|
235
|
+
let curValue = "";
|
236
|
+
let tempValue = "";
|
237
|
+
if (dateType == "time") {
|
238
|
+
const curYMD = state.currentTime.format("YYYY MM DD ");
|
239
|
+
curValue = moment(curYMD + dateMaxValue).valueOf();
|
240
|
+
tempValue = moment(curYMD + value).valueOf();
|
241
|
+
} else if (dateType == "date") {
|
242
|
+
curValue = moment(dateMaxValue).valueOf();
|
243
|
+
tempValue = moment(value).valueOf();
|
244
|
+
} else {
|
245
|
+
curValue = moment(dateMaxValue).valueOf();
|
246
|
+
tempValue = moment(value).valueOf();
|
247
|
+
}
|
248
|
+
if (tempValue > curValue) {
|
249
|
+
return false;
|
250
|
+
}
|
251
|
+
return true;
|
252
|
+
};
|
134
253
|
const checkType = (val) => {
|
135
254
|
return Object.prototype.toString.call(val);
|
136
255
|
};
|
137
256
|
const validateRequired = (rule, value) => {
|
138
|
-
|
257
|
+
const type = checkType(value);
|
139
258
|
if (type == "[object Object]") {
|
140
259
|
if (value && Object.keys(value).length)
|
141
260
|
return true;
|
@@ -162,7 +281,7 @@ const ScaleViewValidate = (props, state, config) => {
|
|
162
281
|
const formatRules = (formArray) => {
|
163
282
|
const rules = {};
|
164
283
|
formArray.forEach((item) => {
|
165
|
-
|
284
|
+
const newTitle = item.val_key;
|
166
285
|
rules[newTitle] = [];
|
167
286
|
if (item.required && !filterArr.includes(item.type)) {
|
168
287
|
rules[newTitle].push({
|
@@ -182,13 +301,27 @@ const ScaleViewValidate = (props, state, config) => {
|
|
182
301
|
if (item.type == "MOBILE" && item.validation) {
|
183
302
|
rules[newTitle].push({
|
184
303
|
pattern: /^1[3456789]\d{9}$/,
|
185
|
-
message:
|
304
|
+
message: function() {
|
305
|
+
var _a, _b, _c;
|
306
|
+
try {
|
307
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.581")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.581")) || "\u683C\u5F0F\u9519\u8BEF";
|
308
|
+
} catch (e) {
|
309
|
+
return "\u683C\u5F0F\u9519\u8BEF";
|
310
|
+
}
|
311
|
+
}(),
|
186
312
|
trigger: "blur"
|
187
313
|
});
|
188
314
|
} else if (item.type == "ID_CARD" && item.validation) {
|
189
315
|
rules[newTitle].push({
|
190
316
|
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}))$/,
|
191
|
-
message:
|
317
|
+
message: function() {
|
318
|
+
var _a, _b, _c;
|
319
|
+
try {
|
320
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.581")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.581")) || "\u683C\u5F0F\u9519\u8BEF";
|
321
|
+
} catch (e) {
|
322
|
+
return "\u683C\u5F0F\u9519\u8BEF";
|
323
|
+
}
|
324
|
+
}(),
|
192
325
|
trigger: "blur"
|
193
326
|
});
|
194
327
|
} else if (item.type == "ADDRESS" && item.required) {
|
@@ -204,13 +337,13 @@ const ScaleViewValidate = (props, state, config) => {
|
|
204
337
|
trigger: "change"
|
205
338
|
});
|
206
339
|
} else if (item.type == "DATETIME" && props.type == "customList") {
|
207
|
-
|
340
|
+
const dateMaxType = handleDateMaxType(item);
|
208
341
|
if (!dateMaxType)
|
209
342
|
return;
|
210
|
-
|
211
|
-
1:
|
212
|
-
2:
|
213
|
-
3:
|
343
|
+
const obj = {
|
344
|
+
1: checkDateMaxCur,
|
345
|
+
2: checkDateMaxSet,
|
346
|
+
3: checkDateMaxOther
|
214
347
|
};
|
215
348
|
rules[newTitle].push({
|
216
349
|
validator: (rule, value) => obj[dateMaxType](rule, value, item),
|
@@ -44,9 +44,23 @@ const useEvaluate = (props, state, config) => {
|
|
44
44
|
});
|
45
45
|
const getEvaluateText = computed(() => {
|
46
46
|
if (getEvaluateEnd.value || state.banStart) {
|
47
|
-
return
|
47
|
+
return function() {
|
48
|
+
var _a, _b, _c;
|
49
|
+
try {
|
50
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.580")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.580")) || "\u6D4B\u8BC4\u5DF2\u7ED3\u675F";
|
51
|
+
} catch (e) {
|
52
|
+
return "\u6D4B\u8BC4\u5DF2\u7ED3\u675F";
|
53
|
+
}
|
54
|
+
}();
|
48
55
|
}
|
49
|
-
return
|
56
|
+
return function() {
|
57
|
+
var _a, _b, _c;
|
58
|
+
try {
|
59
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.579")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.579")) || "\u5F00\u59CB\u6D4B\u8BC4";
|
60
|
+
} catch (e) {
|
61
|
+
return "\u5F00\u59CB\u6D4B\u8BC4";
|
62
|
+
}
|
63
|
+
}();
|
50
64
|
});
|
51
65
|
const disabledEvaluate = computed(() => {
|
52
66
|
const res = getEvaluateStartTime.value && !evaluateState.isTimeOut || getEvaluateEnd.value;
|
@@ -1,19 +1,47 @@
|
|
1
1
|
import { reactive } from 'vue';
|
2
2
|
|
3
3
|
function useNoData() {
|
4
|
-
|
4
|
+
const state = reactive({
|
5
5
|
noData: false,
|
6
|
-
noDataTip:
|
6
|
+
noDataTip: function() {
|
7
|
+
var _a, _b, _c;
|
8
|
+
try {
|
9
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.445")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.445")) || "\u6682\u65E0\u6570\u636E";
|
10
|
+
} catch (e) {
|
11
|
+
return "\u6682\u65E0\u6570\u636E";
|
12
|
+
}
|
13
|
+
}(),
|
7
14
|
noDataImg: "nodata"
|
8
15
|
});
|
9
|
-
const setNoData = (noData, noDataTip =
|
16
|
+
const setNoData = (noData, noDataTip = function() {
|
17
|
+
var _a, _b, _c;
|
18
|
+
try {
|
19
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.445")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.445")) || "\u6682\u65E0\u6570\u636E";
|
20
|
+
} catch (e) {
|
21
|
+
return "\u6682\u65E0\u6570\u636E";
|
22
|
+
}
|
23
|
+
}(), noDataImg = "nodata") => {
|
10
24
|
state.noData = noData;
|
11
|
-
state.noDataTip = noDataTip ||
|
25
|
+
state.noDataTip = noDataTip || function() {
|
26
|
+
var _a, _b, _c;
|
27
|
+
try {
|
28
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.445")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.445")) || "\u6682\u65E0\u6570\u636E";
|
29
|
+
} catch (e) {
|
30
|
+
return "\u6682\u65E0\u6570\u636E";
|
31
|
+
}
|
32
|
+
}();
|
12
33
|
state.noDataImg = errResult(noDataImg) || "nodata";
|
13
34
|
};
|
14
35
|
const resetNodata = () => {
|
15
36
|
state.noData = false;
|
16
|
-
state.noDataTip =
|
37
|
+
state.noDataTip = function() {
|
38
|
+
var _a, _b, _c;
|
39
|
+
try {
|
40
|
+
return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.445")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.445")) || "\u6682\u65E0\u6570\u636E";
|
41
|
+
} catch (e) {
|
42
|
+
return "\u6682\u65E0\u6570\u636E";
|
43
|
+
}
|
44
|
+
}();
|
17
45
|
state.noDataImg = "nodata";
|
18
46
|
};
|
19
47
|
const errResult = (result) => {
|
@@ -1,8 +1,9 @@
|
|
1
|
+
import { AnyObject } from '../../../../shared/types';
|
1
2
|
export declare const isOnlyOptions: (e: string) => boolean;
|
2
3
|
export declare const isSortItem: (item: any) => any;
|
3
4
|
export declare const isCollection: (e: string) => boolean;
|
4
5
|
export declare const isEvaluation: (e: string) => boolean;
|
5
|
-
export declare const handleQueryParams: () =>
|
6
|
+
export declare const handleQueryParams: () => AnyObject;
|
6
7
|
export declare const getQueryVariable: (variable: any, state: any, params: any) => any;
|
7
8
|
export declare const formatMap: {
|
8
9
|
datetime: string;
|
@@ -49,18 +49,18 @@ const getQueryVariable = (variable, state, params) => {
|
|
49
49
|
return query[variable] || false;
|
50
50
|
};
|
51
51
|
const formatMap = {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
52
|
+
datetime: "yyyy-MM-dd HH:mm:ss",
|
53
|
+
datehour: "yyyy-MM-dd HH:mm",
|
54
|
+
date: "yyyy-MM-dd",
|
55
|
+
time: "HH:mm:ss",
|
56
|
+
hour: "HH:mm"
|
57
57
|
};
|
58
58
|
const valueReg = {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
59
|
+
datetime: /^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/,
|
60
|
+
datehour: /^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2})$/,
|
61
|
+
date: /^(\d{4})-(\d{2})-(\d{2})$/,
|
62
|
+
time: /^(\d{2}):(\d{2}):(\d{2})$/,
|
63
|
+
hour: /^(\d{2}):(\d{2})$/
|
64
64
|
};
|
65
65
|
const transDbvalueFormat = /* @__PURE__ */ new Map([["datetime", ["datetime", "datehour", "date", "time", "hour"]], ["datehour", ["datetime", "datehour", "date", "time", "hour"]], ["date", ["date"]], ["time", ["time", "hour"]], ["hour", ["time", "hour"]]]);
|
66
66
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* 表单变更检查器
|
3
|
+
* 用于手动检查表单对象是否发生实际变更
|
4
|
+
*/
|
5
|
+
export declare function useFormChangeWatcher<T extends Record<string, any>>(): {
|
6
|
+
setInitialSnapshot: (formData: T) => void;
|
7
|
+
checkFormChange: (newFormData?: T | null) => boolean;
|
8
|
+
getInitialSnapshot: () => T | null;
|
9
|
+
getFormDiff: (newFormData?: T | null) => Record<string, {
|
10
|
+
old: any;
|
11
|
+
new: any;
|
12
|
+
}> | null;
|
13
|
+
};
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import { cloneDeep, isEqual } from 'lodash-es';
|
2
|
+
|
3
|
+
function customIsEqual(newValue, oldValue) {
|
4
|
+
if (isArrayEmpty(newValue) && (isArrayEmpty(oldValue) || oldValue === "")) {
|
5
|
+
return true;
|
6
|
+
}
|
7
|
+
if (typeof newValue === "object" && typeof oldValue === "object" && newValue !== null && oldValue !== null) {
|
8
|
+
if (Array.isArray(newValue) && Array.isArray(oldValue)) {
|
9
|
+
return isEqual(newValue, oldValue);
|
10
|
+
} else if (!Array.isArray(newValue) && !Array.isArray(oldValue)) {
|
11
|
+
const newKeys = Object.keys(newValue);
|
12
|
+
const oldKeys = Object.keys(oldValue);
|
13
|
+
if (newKeys.length !== oldKeys.length) {
|
14
|
+
return false;
|
15
|
+
}
|
16
|
+
for (const key of newKeys) {
|
17
|
+
if (!oldKeys.includes(key) || !customIsEqual(newValue[key], oldValue[key])) {
|
18
|
+
return false;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
return true;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
return isEqual(newValue, oldValue);
|
25
|
+
}
|
26
|
+
function isArrayEmpty(value) {
|
27
|
+
return value === null || Array.isArray(value) && value.length === 0;
|
28
|
+
}
|
29
|
+
function useFormChangeWatcher() {
|
30
|
+
let initialSnapshot = null;
|
31
|
+
const setInitialSnapshot = (formData) => {
|
32
|
+
initialSnapshot = cloneDeep(formData);
|
33
|
+
};
|
34
|
+
const checkFormChange = (newFormData = null) => {
|
35
|
+
if (!initialSnapshot) {
|
36
|
+
return false;
|
37
|
+
}
|
38
|
+
return !customIsEqual(newFormData, initialSnapshot);
|
39
|
+
};
|
40
|
+
const getInitialSnapshot = () => {
|
41
|
+
return initialSnapshot ? cloneDeep(initialSnapshot) : null;
|
42
|
+
};
|
43
|
+
const getFormDiff = (newFormData = null) => {
|
44
|
+
if (!initialSnapshot)
|
45
|
+
return null;
|
46
|
+
if (!newFormData)
|
47
|
+
return null;
|
48
|
+
const current = newFormData;
|
49
|
+
const diff = {};
|
50
|
+
const allKeys = /* @__PURE__ */ new Set([...Object.keys(initialSnapshot), ...Object.keys(current)]);
|
51
|
+
allKeys.forEach((key) => {
|
52
|
+
const oldValue = initialSnapshot[key];
|
53
|
+
const newValue = current[key];
|
54
|
+
if (!customIsEqual(oldValue, newValue)) {
|
55
|
+
diff[key] = {
|
56
|
+
old: oldValue,
|
57
|
+
new: newValue
|
58
|
+
};
|
59
|
+
}
|
60
|
+
});
|
61
|
+
return Object.keys(diff).length > 0 ? diff : null;
|
62
|
+
};
|
63
|
+
return {
|
64
|
+
setInitialSnapshot,
|
65
|
+
checkFormChange,
|
66
|
+
getInitialSnapshot,
|
67
|
+
getFormDiff
|
68
|
+
};
|
69
|
+
}
|
70
|
+
|
71
|
+
export { useFormChangeWatcher };
|