cnhis-design-vue 3.4.0-beta.15 → 3.4.0-beta.18
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/es/components/button-print/src/utils/print.js +1 -0
- package/es/components/callback/src/components/render/popupMaps.d.ts +81 -207
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +7 -2
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +2 -1
- 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 +4 -4
- package/es/components/field-set/src/components/table-row.vue.d.ts +3 -3
- package/es/components/iho-table/index.d.ts +81 -207
- package/es/components/iho-table/src/IhoTable.vue.d.ts +81 -207
- package/es/components/iho-table/src/constants/index.d.ts +3 -3
- package/es/components/iho-table/src/constants/index.js +0 -21
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +39 -60
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
- package/es/components/table-export-field/index.d.ts +3 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +3 -0
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +50 -6
- package/es/components/table-export-field/src/index.vue.d.ts +3 -0
- package/es/shared/components/CancelRadio/CancelRadio.js +3 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/ho-edge.d.ts +12 -0
- package/es/shared/utils/ho-edge.js +58 -0
- package/package.json +2 -2
@@ -64,10 +64,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
64
64
|
formRef: import("vue").Ref<any, any>;
|
65
65
|
formValue: {
|
66
66
|
projectName: string;
|
67
|
+
exportPath: string;
|
67
68
|
};
|
68
69
|
selectProject: import("vue").Ref<any, any>;
|
69
70
|
projectList: import("vue").Ref<any[], any[]>;
|
70
71
|
exportApiConfig: import("../../../../shared/types").AnyObject;
|
72
|
+
isHoEdge: import("vue").ComputedRef<any>;
|
71
73
|
handleRadioChange: (value: string | number | boolean) => void;
|
72
74
|
validateProjectName: () => boolean;
|
73
75
|
getParams: () => {
|
@@ -75,6 +77,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
75
77
|
lastUsedSchemeName: string;
|
76
78
|
schemeId: string;
|
77
79
|
schemeName: string;
|
80
|
+
exportPath: string;
|
78
81
|
tableListId: string;
|
79
82
|
};
|
80
83
|
saveToCalss: () => void;
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import { i18n } from '../../../../_virtual/_virtual_i18n-methods.js';
|
2
|
-
import { defineComponent, ref, reactive, inject, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createTextVNode, createElementBlock, Fragment, renderList, toDisplayString } from 'vue';
|
2
|
+
import { defineComponent, ref, reactive, inject, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createTextVNode, createElementBlock, Fragment, renderList, toDisplayString, createCommentVNode } from 'vue';
|
3
3
|
import { useMessage, NModal, NCard, NIcon, NButton, NRadioGroup, NRadio, NForm, NFormItem, NInput } from 'naive-ui';
|
4
4
|
import { CloseOutline } from '@vicons/ionicons5';
|
5
5
|
import { InjectionExportApiConfig } from '../constants/index.js';
|
6
6
|
import useAsyncData from '../hooks/useAsyncData.js';
|
7
7
|
import { dragFieldCheckList } from '../tool.js';
|
8
8
|
import { cloneDeep } from 'lodash-es';
|
9
|
+
import { hoEdge } from '../../../../shared/utils/ho-edge.js';
|
9
10
|
|
10
11
|
const _hoisted_1 = {
|
11
12
|
class: "svg-wrap"
|
@@ -67,11 +68,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
67
68
|
const emits = __emit;
|
68
69
|
const formRef = ref(null);
|
69
70
|
const formValue = reactive({
|
70
|
-
projectName: ""
|
71
|
+
projectName: "",
|
72
|
+
exportPath: ""
|
71
73
|
});
|
72
74
|
const selectProject = ref();
|
73
75
|
const projectList = ref([]);
|
74
76
|
const exportApiConfig = inject(InjectionExportApiConfig);
|
77
|
+
const isHoEdge = computed(() => {
|
78
|
+
var _a;
|
79
|
+
return (_a = hoEdge) == null ? void 0 : _a.webview;
|
80
|
+
});
|
75
81
|
function handleRadioChange(value) {
|
76
82
|
selectProject.value = value;
|
77
83
|
}
|
@@ -96,6 +102,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
96
102
|
}
|
97
103
|
function getParams() {
|
98
104
|
const schemeName = formValue.projectName.trim();
|
105
|
+
const exportPath = formValue.exportPath.trim();
|
99
106
|
const {
|
100
107
|
fieldKeys,
|
101
108
|
schemeId
|
@@ -105,6 +112,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
105
112
|
lastUsedSchemeName: schemeName,
|
106
113
|
schemeId: "",
|
107
114
|
schemeName,
|
115
|
+
exportPath,
|
108
116
|
tableListId: props.tableListId
|
109
117
|
};
|
110
118
|
if (selectProject.value === "updateProject") {
|
@@ -120,15 +128,29 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
120
128
|
if (validateProjectName()) {
|
121
129
|
return;
|
122
130
|
}
|
131
|
+
const exportPath = formValue.exportPath.trim();
|
132
|
+
const {
|
133
|
+
schemeId
|
134
|
+
} = props.curProgram;
|
135
|
+
const hoEdgeParams = {
|
136
|
+
"exec": "saveconf",
|
137
|
+
"data": {
|
138
|
+
"key": selectProject.value === "updateProject" ? schemeId : `${defaultKey}_schemeId`,
|
139
|
+
"value": exportPath
|
140
|
+
}
|
141
|
+
};
|
142
|
+
await hoEdge.postMsg(hoEdgeParams);
|
123
143
|
const params = getParams();
|
124
144
|
let res = await saveTableListExportScheme(params, exportApiConfig);
|
125
145
|
if (res) {
|
126
146
|
message.success(i18n("10010.1.438", "\u4FDD\u5B58\u5E76\u5BFC\u51FA\u6210\u529F"));
|
127
|
-
|
147
|
+
cancelSaveToCalss();
|
128
148
|
}
|
129
149
|
});
|
130
150
|
}
|
131
151
|
function cancelSaveToCalss() {
|
152
|
+
formValue.projectName = "";
|
153
|
+
formValue.exportPath = "";
|
132
154
|
emits("cancelSaveModal");
|
133
155
|
}
|
134
156
|
watch(() => props.curProgram, async (program) => {
|
@@ -144,6 +166,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
144
166
|
formValue.projectName = program.schemeName;
|
145
167
|
break;
|
146
168
|
}
|
169
|
+
const hoEdgeParams = {
|
170
|
+
"exec": "getconf",
|
171
|
+
"data": {
|
172
|
+
"key": selectProject.value === "updateProject" ? program.schemeId : `${defaultKey}_schemeId`
|
173
|
+
}
|
174
|
+
};
|
175
|
+
const getHoEdgeData = await hoEdge.postMsg(hoEdgeParams);
|
176
|
+
if (getHoEdgeData == null ? void 0 : getHoEdgeData.result) {
|
177
|
+
formValue.exportPath = (getHoEdgeData == null ? void 0 : getHoEdgeData.res) || "";
|
178
|
+
}
|
147
179
|
}, {
|
148
180
|
immediate: true,
|
149
181
|
deep: true
|
@@ -176,13 +208,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
176
208
|
footer: withCtx(() => [createElementVNode("div", _hoisted_2, [createVNode(unref(NButton), {
|
177
209
|
onClick: cancelSaveToCalss
|
178
210
|
}, {
|
179
|
-
default: withCtx(() => [..._cache[
|
211
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(i18n("10010.1.28", "\u53D6\u6D88"), -1)])]),
|
180
212
|
_: 1
|
181
213
|
}), createVNode(unref(NButton), {
|
182
214
|
type: "info",
|
183
215
|
onClick: saveToCalss
|
184
216
|
}, {
|
185
|
-
default: withCtx(() => [..._cache[
|
217
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(i18n("10010.1.428", "\u786E\u8BA4"), -1)])]),
|
186
218
|
_: 1
|
187
219
|
})])]),
|
188
220
|
default: withCtx(() => [createElementVNode("div", _hoisted_3, [createVNode(unref(NRadioGroup), {
|
@@ -219,7 +251,19 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
219
251
|
maxlength: "100"
|
220
252
|
}, null, 8, ["value"])]),
|
221
253
|
_: 1
|
222
|
-
})
|
254
|
+
}), isHoEdge.value ? (openBlock(), createBlock(unref(NFormItem), {
|
255
|
+
key: 0,
|
256
|
+
label: i18n("10010.1.683", "\u5BFC\u51FA\u8DEF\u5F84"),
|
257
|
+
path: "exportPath"
|
258
|
+
}, {
|
259
|
+
default: withCtx(() => [createVNode(unref(NInput), {
|
260
|
+
value: formValue.exportPath,
|
261
|
+
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => formValue.exportPath = $event),
|
262
|
+
placeholder: i18n("10010.1.684", "\u8BF7\u8F93\u5165\u5BFC\u51FA\u8DEF\u5F84"),
|
263
|
+
clearable: ""
|
264
|
+
}, null, 8, ["value"])]),
|
265
|
+
_: 1
|
266
|
+
})) : createCommentVNode("v-if", true)]),
|
223
267
|
_: 1
|
224
268
|
}, 8, ["model"])])]),
|
225
269
|
_: 1
|
@@ -367,10 +367,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
367
367
|
formRef: import("vue").Ref<any, any>;
|
368
368
|
formValue: {
|
369
369
|
projectName: string;
|
370
|
+
exportPath: string;
|
370
371
|
};
|
371
372
|
selectProject: import("vue").Ref<any, any>;
|
372
373
|
projectList: import("vue").Ref<any[], any[]>;
|
373
374
|
exportApiConfig: import("../../../shared/types").AnyObject;
|
375
|
+
isHoEdge: import("vue").ComputedRef<any>;
|
374
376
|
handleRadioChange: (value: string | number | boolean) => void;
|
375
377
|
validateProjectName: () => boolean;
|
376
378
|
getParams: () => {
|
@@ -378,6 +380,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
378
380
|
lastUsedSchemeName: string;
|
379
381
|
schemeId: string;
|
380
382
|
schemeName: string;
|
383
|
+
exportPath: string;
|
381
384
|
tableListId: string;
|
382
385
|
};
|
383
386
|
saveToCalss: () => void;
|
@@ -24,7 +24,9 @@ var script = /* @__PURE__ */ defineComponent({
|
|
24
24
|
const mergedDisabled = computed(() => {
|
25
25
|
return !!attrs.disabled || !!(NRadioGroup == null ? void 0 : NRadioGroup.disabledRef.value) || !!(NFormItem == null ? void 0 : NFormItem.disabled.value);
|
26
26
|
});
|
27
|
-
async function onItemClick() {
|
27
|
+
async function onItemClick(event) {
|
28
|
+
if (Reflect.get(event, "pointerType") !== "mouse")
|
29
|
+
return;
|
28
30
|
if (!props.cancelable || mergedDisabled.value)
|
29
31
|
return;
|
30
32
|
const oldValue = props.currentValue;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
declare class HoEdge {
|
2
|
+
private readonly webview;
|
3
|
+
private msgHandleQueue;
|
4
|
+
constructor();
|
5
|
+
/** 发送消息 */
|
6
|
+
postMsg(data: any): Promise<unknown> | undefined;
|
7
|
+
/** 接收消息 */
|
8
|
+
msgHandle(evt: any): any;
|
9
|
+
destory(): void;
|
10
|
+
}
|
11
|
+
export declare const hoEdge: HoEdge;
|
12
|
+
export {};
|
@@ -0,0 +1,58 @@
|
|
1
|
+
let HoEdgeInstance = null;
|
2
|
+
class HoEdge {
|
3
|
+
constructor() {
|
4
|
+
this.webview = null;
|
5
|
+
this.msgHandleQueue = [];
|
6
|
+
var _a, _b, _c, _d;
|
7
|
+
if (HoEdgeInstance)
|
8
|
+
return HoEdgeInstance;
|
9
|
+
HoEdgeInstance = this;
|
10
|
+
const _window = window;
|
11
|
+
try {
|
12
|
+
this.webview = _window.top ? (_a = _window.top.chrome) == null ? void 0 : _a.webview : (_b = _window.chrome) == null ? void 0 : _b.webview;
|
13
|
+
} catch (error) {
|
14
|
+
this.webview = (_c = _window.chrome) == null ? void 0 : _c.webview;
|
15
|
+
}
|
16
|
+
if (!this.webview)
|
17
|
+
return;
|
18
|
+
this.msgHandleQueue = [];
|
19
|
+
(_d = this.webview) == null ? void 0 : _d.addEventListener("message", this.msgHandle.bind(this));
|
20
|
+
}
|
21
|
+
postMsg(data) {
|
22
|
+
if (!this.webview)
|
23
|
+
return;
|
24
|
+
return new Promise((resolve) => {
|
25
|
+
var _a;
|
26
|
+
const exec = data.exec;
|
27
|
+
this.msgHandleQueue.push({ resolve, exec });
|
28
|
+
(_a = this.webview) == null ? void 0 : _a.postMessage(data);
|
29
|
+
});
|
30
|
+
}
|
31
|
+
msgHandle(evt) {
|
32
|
+
let data = (evt == null ? void 0 : evt.data) || "{}";
|
33
|
+
if (typeof data === "string") {
|
34
|
+
data = JSON.parse(data);
|
35
|
+
}
|
36
|
+
const handler = this.msgHandleQueue.pop();
|
37
|
+
if (!handler) {
|
38
|
+
console.log("\u627E\u4E0D\u5230\u5339\u914D\u7684\u529F\u80FD\u51FD\u6570");
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
const { resolve, exec } = handler;
|
42
|
+
if (exec !== data.exec) {
|
43
|
+
console.log(`\u5C01\u88C5\u6D4F\u89C8\u5668\u547D\u4EE4\u4E0D\u5339\u914D\uFF0C\u5F53\u524D\uFF1A${exec}\uFF0C\u8FD4\u56DE\u7684\u547D\u4EE4\uFF1A${data.exec}`);
|
44
|
+
return;
|
45
|
+
}
|
46
|
+
return resolve(data);
|
47
|
+
}
|
48
|
+
destory() {
|
49
|
+
var _a;
|
50
|
+
if (!this.webview)
|
51
|
+
return;
|
52
|
+
this.msgHandleQueue = [];
|
53
|
+
(_a = this.webview) == null ? void 0 : _a.removeEventListener("message", this.msgHandle);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
const hoEdge = new HoEdge();
|
57
|
+
|
58
|
+
export { hoEdge };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cnhis-design-vue",
|
3
|
-
"version": "3.4.0-beta.
|
3
|
+
"version": "3.4.0-beta.18",
|
4
4
|
"license": "ISC",
|
5
5
|
"module": "./es/components/index.js",
|
6
6
|
"main": "./es/components/index.js",
|
@@ -73,5 +73,5 @@
|
|
73
73
|
"iOS 7",
|
74
74
|
"last 3 iOS versions"
|
75
75
|
],
|
76
|
-
"gitHead": "
|
76
|
+
"gitHead": "dc101d93829c29940d8b82bf0d5c821a3048c6f0"
|
77
77
|
}
|