@ibiz-template/vue3-components 0.7.1 → 0.7.3
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/dist/index-GhyQOvbY.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-X-Qzwu1f.js → xlsx-util-bB9hH3iO.js} +1 -1
- package/es/common/data-import/data-import.d.ts +1 -3
- package/es/common/data-import/data-import.mjs +34 -77
- package/es/common/data-import2/data-import2.d.ts +0 -1
- package/es/common/data-import2/data-import2.mjs +26 -67
- package/es/common/data-import2-select/data-import2-select.mjs +5 -3
- package/es/control/form/form/form.mjs +7 -9
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +40 -0
- package/es/control/grid/grid/grid.d.ts +1 -0
- package/es/control/grid/grid/grid.mjs +15 -3
- package/es/control/grid/grid/index.d.ts +3 -0
- package/es/control/search-bar/filter-tree/filter-tree.mjs +6 -1
- package/es/control/tree-grid/index.d.ts +3 -0
- package/es/control/tree-grid/tree-grid.d.ts +3 -1
- package/es/control/tree-grid/tree-grid.mjs +15 -3
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +7 -1
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.css +1 -1
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +7 -3
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +5 -1
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +7 -3
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +5 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +18 -3
- package/es/editor/text-box/input/input.d.ts +1 -1
- package/es/editor/text-box/input/input.mjs +4 -1
- package/es/index.mjs +1 -0
- package/es/panel-component/data-import/data-import-shell.css +0 -0
- package/es/panel-component/data-import/data-import-shell.d.ts +27 -0
- package/es/panel-component/data-import/data-import-shell.mjs +49 -0
- package/es/panel-component/data-import/data-import.provider.d.ts +15 -0
- package/es/panel-component/data-import/data-import.provider.mjs +21 -0
- package/es/panel-component/data-import/index.d.ts +24 -0
- package/es/panel-component/data-import/index.mjs +15 -0
- package/es/panel-component/index.d.ts +1 -0
- package/es/panel-component/index.mjs +5 -1
- package/es/panel-component/panel-index-view-search/panel-index-view-search.mjs +0 -1
- package/es/panel-component/user-action/index.d.ts +25 -0
- package/es/panel-component/user-action/index.mjs +14 -0
- package/es/panel-component/user-action/user-action-provider.d.ts +6 -0
- package/es/panel-component/user-action/user-action-provider.mjs +21 -0
- package/es/panel-component/user-action/user-action.css +1 -0
- package/es/panel-component/user-action/user-action.d.ts +28 -0
- package/es/panel-component/user-action/user-action.mjs +74 -0
- package/es/util/modal-util/modal-util.mjs +16 -4
- package/es/view-engine/app-data-upload-view.engine.d.ts +13 -0
- package/es/view-engine/app-data-upload-view.engine.mjs +7 -0
- package/es/view-engine/index-view.engine.mjs +13 -1
- package/es/view-engine/index.mjs +5 -0
- package/lib/common/data-import/data-import.cjs +33 -76
- package/lib/common/data-import2/data-import2.cjs +24 -66
- package/lib/common/data-import2-select/data-import2-select.cjs +5 -3
- package/lib/control/form/form/form.cjs +7 -9
- package/lib/control/grid/grid/grid.cjs +14 -2
- package/lib/control/search-bar/filter-tree/filter-tree.cjs +6 -1
- package/lib/control/tree-grid/tree-grid.cjs +14 -2
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +6 -0
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +7 -3
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.css +1 -1
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +5 -1
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +7 -3
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +5 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +18 -3
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/lib/editor/text-box/input/input.cjs +4 -1
- package/lib/index.cjs +12 -10
- package/lib/panel-component/data-import/data-import-shell.cjs +51 -0
- package/lib/panel-component/data-import/data-import-shell.css +0 -0
- package/lib/panel-component/data-import/data-import.provider.cjs +23 -0
- package/lib/panel-component/data-import/index.cjs +20 -0
- package/lib/panel-component/index.cjs +31 -26
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.cjs +0 -1
- package/lib/panel-component/user-action/index.cjs +19 -0
- package/lib/panel-component/user-action/user-action-provider.cjs +23 -0
- package/lib/panel-component/user-action/user-action.cjs +76 -0
- package/lib/panel-component/user-action/user-action.css +1 -0
- package/lib/util/modal-util/modal-util.cjs +16 -4
- package/lib/view-engine/app-data-upload-view.engine.cjs +9 -0
- package/lib/view-engine/index-view.engine.cjs +12 -0
- package/lib/view-engine/index.cjs +5 -0
- package/package.json +6 -6
- package/dist/index-XRnHM6lw.js +0 -4
|
@@ -3,16 +3,28 @@ import { ElMessageBox } from 'element-plus';
|
|
|
3
3
|
"use strict";
|
|
4
4
|
class ModalUtil {
|
|
5
5
|
async info(params) {
|
|
6
|
-
await ElMessageBox.alert(params.desc, params.title, {
|
|
6
|
+
await ElMessageBox.alert(params.desc, params.title, {
|
|
7
|
+
...params.options,
|
|
8
|
+
type: "info"
|
|
9
|
+
});
|
|
7
10
|
}
|
|
8
11
|
async success(params) {
|
|
9
|
-
await ElMessageBox.alert(params.desc, params.title, {
|
|
12
|
+
await ElMessageBox.alert(params.desc, params.title, {
|
|
13
|
+
...params.options,
|
|
14
|
+
type: "success"
|
|
15
|
+
});
|
|
10
16
|
}
|
|
11
17
|
async warning(params) {
|
|
12
|
-
await ElMessageBox.alert(params.desc, params.title, {
|
|
18
|
+
await ElMessageBox.alert(params.desc, params.title, {
|
|
19
|
+
...params.options,
|
|
20
|
+
type: "warning"
|
|
21
|
+
});
|
|
13
22
|
}
|
|
14
23
|
async error(params) {
|
|
15
|
-
await ElMessageBox.alert(params.desc, params.title, {
|
|
24
|
+
await ElMessageBox.alert(params.desc, params.title, {
|
|
25
|
+
...params.options,
|
|
26
|
+
type: "error"
|
|
27
|
+
});
|
|
16
28
|
}
|
|
17
29
|
async confirm(params) {
|
|
18
30
|
return new Promise((resolve) => {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAppDataUploadViewState, IViewEvent, ViewController, ViewEngineBase } from '@ibiz-template/runtime';
|
|
2
|
+
import { IAppView } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* 应用数据上传视图引擎
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2024-04-15 04:03:03
|
|
7
|
+
* @export
|
|
8
|
+
* @class AppDataUploadViewEngine
|
|
9
|
+
* @extends {ViewEngineBase}
|
|
10
|
+
*/
|
|
11
|
+
export declare class AppDataUploadViewEngine extends ViewEngineBase {
|
|
12
|
+
protected view: ViewController<IAppView, IAppDataUploadViewState, IViewEvent>;
|
|
13
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewEngineBase, ViewCallTag } from '@ibiz-template/runtime';
|
|
1
|
+
import { ViewEngineBase, OpenAppViewCommand, ViewCallTag } from '@ibiz-template/runtime';
|
|
2
2
|
|
|
3
3
|
"use strict";
|
|
4
4
|
class IndexViewEngine extends ViewEngineBase {
|
|
@@ -30,6 +30,18 @@ class IndexViewEngine extends ViewEngineBase {
|
|
|
30
30
|
}
|
|
31
31
|
async onMounted() {
|
|
32
32
|
await super.onMounted();
|
|
33
|
+
if (!this.isExistAndInLayout("appmenu")) {
|
|
34
|
+
const { model, context, params } = this.view;
|
|
35
|
+
const { defAppViewId } = model;
|
|
36
|
+
if (defAppViewId) {
|
|
37
|
+
ibiz.commands.execute(
|
|
38
|
+
OpenAppViewCommand.TAG,
|
|
39
|
+
defAppViewId,
|
|
40
|
+
context,
|
|
41
|
+
params
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
33
45
|
if (window.innerWidth <= 1200) {
|
|
34
46
|
this.toggleCollapse();
|
|
35
47
|
}
|
package/es/view-engine/index.mjs
CHANGED
|
@@ -44,6 +44,7 @@ import { GanttViewEngine } from './gantt-view.engine.mjs';
|
|
|
44
44
|
import { DEIndexViewEngine } from './de-index-view-engine.mjs';
|
|
45
45
|
import { SubAppRefViewEngine } from './sub-app-ref-view.engine.mjs';
|
|
46
46
|
import { TabSearchViewEngine } from './tab-search-view.engine.mjs';
|
|
47
|
+
import { AppDataUploadViewEngine } from './app-data-upload-view.engine.mjs';
|
|
47
48
|
|
|
48
49
|
"use strict";
|
|
49
50
|
const IBizViewEngine = {
|
|
@@ -236,6 +237,10 @@ const IBizViewEngine = {
|
|
|
236
237
|
"VIEW_DESUBAPPREFVIEW",
|
|
237
238
|
(c) => new SubAppRefViewEngine(c)
|
|
238
239
|
);
|
|
240
|
+
ibiz.engine.register(
|
|
241
|
+
"VIEW_APPDATAUPLOADVIEW",
|
|
242
|
+
(c) => new AppDataUploadViewEngine(c)
|
|
243
|
+
);
|
|
239
244
|
ibiz.engine.register(
|
|
240
245
|
"VIEW_GridView9",
|
|
241
246
|
(c) => new GridViewEngine(c)
|
|
@@ -35,7 +35,6 @@ const DataImport = /* @__PURE__ */ vue.defineComponent({
|
|
|
35
35
|
},
|
|
36
36
|
setup(props) {
|
|
37
37
|
const ns = vue3Util.useNamespace("data-import");
|
|
38
|
-
const inputUpLoad = vue.ref();
|
|
39
38
|
const message = vue.ref({
|
|
40
39
|
state: "ready",
|
|
41
40
|
message: ""
|
|
@@ -45,86 +44,50 @@ const DataImport = /* @__PURE__ */ vue.defineComponent({
|
|
|
45
44
|
const onCancelButtonClick = () => {
|
|
46
45
|
props.dismiss();
|
|
47
46
|
};
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
const onLinkClick = async () => {
|
|
48
|
+
runtime.downloadImportTemplate(props.appDataEntity, props.dataImport);
|
|
49
|
+
};
|
|
50
|
+
const selectFile = async () => {
|
|
51
|
+
isLoading.value = true;
|
|
52
|
+
const result = await runtime.selectAndImport({
|
|
53
|
+
appDataEntity: props.appDataEntity,
|
|
54
|
+
dataImport: props.dataImport,
|
|
55
|
+
context: props.context
|
|
56
|
+
});
|
|
57
|
+
if (result.cancel) {
|
|
58
|
+
isLoading.value = false;
|
|
51
59
|
return;
|
|
52
60
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
if (!result.isAsync) {
|
|
62
|
+
if (result.errorMessage) {
|
|
63
|
+
errorMessage.value = result.errorMessage;
|
|
64
|
+
} else {
|
|
65
|
+
const {
|
|
66
|
+
success,
|
|
67
|
+
total,
|
|
68
|
+
message: _message
|
|
69
|
+
} = result;
|
|
70
|
+
const totalNum = total ? Number(total) : 0;
|
|
71
|
+
const successNum = success ? Number(success) : 0;
|
|
72
|
+
const errorNum = total - success;
|
|
73
|
+
message.value.state = _message ? "error" : "over";
|
|
74
|
+
message.value.message = _message || ibiz.i18n.t("component.dataImport.importSuccess", {
|
|
75
|
+
totalNum,
|
|
76
|
+
successNum,
|
|
77
|
+
errorNum
|
|
63
78
|
});
|
|
64
|
-
onCancelButtonClick();
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
result = await runtime.importData(selectedFile, props.appDataEntity, props.dataImport, props.context);
|
|
68
|
-
ibiz.mc.command.send({
|
|
69
|
-
srfdecodename: props.appDataEntity.codeName
|
|
70
|
-
}, "OBJECTCREATED", "DATAIMPORT");
|
|
71
|
-
const {
|
|
72
|
-
success,
|
|
73
|
-
total,
|
|
74
|
-
message: _message
|
|
75
|
-
} = result;
|
|
76
|
-
const totalNum = total ? Number(total) : 0;
|
|
77
|
-
const successNum = success ? Number(success) : 0;
|
|
78
|
-
const errorNum = total - success;
|
|
79
|
-
message.value.state = _message ? "error" : "over";
|
|
80
|
-
message.value.message = _message || ibiz.i18n.t("component.dataImport.importSuccess", {
|
|
81
|
-
totalNum,
|
|
82
|
-
successNum,
|
|
83
|
-
errorNum
|
|
84
|
-
});
|
|
85
|
-
} catch (error) {
|
|
86
|
-
if (error instanceof Error) {
|
|
87
|
-
errorMessage.value = error.message;
|
|
88
79
|
}
|
|
89
|
-
} finally {
|
|
90
|
-
isLoading.value = false;
|
|
91
80
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
let templateUrl = "".concat(props.appDataEntity.codeName2.toLowerCase(), "/importtemplate");
|
|
96
|
-
if ((_a = props.dataImport) == null ? void 0 : _a.codeName) {
|
|
97
|
-
templateUrl += "?srfimporttag=".concat(props.dataImport.codeName);
|
|
81
|
+
isLoading.value = false;
|
|
82
|
+
if (result.isAsync) {
|
|
83
|
+
onCancelButtonClick();
|
|
98
84
|
}
|
|
99
|
-
const res = await ibiz.net.request(templateUrl, {
|
|
100
|
-
responseType: "blob"
|
|
101
|
-
});
|
|
102
|
-
if (res.status === 200) {
|
|
103
|
-
let fileName = ((_b = res.headers["content-disposition"].split(";").find((str) => str.indexOf("filename=") !== -1)) == null ? void 0 : _b.slice(9)) || "";
|
|
104
|
-
fileName = decodeURIComponent(fileName);
|
|
105
|
-
const blob = new Blob([res.data], {
|
|
106
|
-
type: "application/vnd.ms-excel"
|
|
107
|
-
});
|
|
108
|
-
const elink = document.createElement("a");
|
|
109
|
-
elink.download = fileName;
|
|
110
|
-
elink.style.display = "none";
|
|
111
|
-
elink.href = URL.createObjectURL(blob);
|
|
112
|
-
document.body.appendChild(elink);
|
|
113
|
-
elink.click();
|
|
114
|
-
URL.revokeObjectURL(elink.href);
|
|
115
|
-
document.body.removeChild(elink);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
const selectFile = () => {
|
|
119
|
-
inputUpLoad.value.click();
|
|
120
85
|
};
|
|
121
86
|
return {
|
|
122
87
|
ns,
|
|
123
88
|
onLinkClick,
|
|
124
89
|
selectFile,
|
|
125
90
|
onCancelButtonClick,
|
|
126
|
-
onFileChange,
|
|
127
|
-
inputUpLoad,
|
|
128
91
|
isLoading,
|
|
129
92
|
message,
|
|
130
93
|
errorMessage
|
|
@@ -134,13 +97,7 @@ const DataImport = /* @__PURE__ */ vue.defineComponent({
|
|
|
134
97
|
let _slot, _slot2;
|
|
135
98
|
return vue.withDirectives(vue.createVNode("div", {
|
|
136
99
|
"class": this.ns.b()
|
|
137
|
-
}, [vue.createVNode("
|
|
138
|
-
"ref": "inputUpLoad",
|
|
139
|
-
"type": "file",
|
|
140
|
-
"style": "display: none",
|
|
141
|
-
"accept": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
142
|
-
"onChange": this.onFileChange
|
|
143
|
-
}, null), vue.createVNode("div", {
|
|
100
|
+
}, [vue.createVNode("div", {
|
|
144
101
|
"class": this.ns.e("caption")
|
|
145
102
|
}, [ibiz.i18n.t("component.dataImport.importData")]), this.message.state === "ready" ? vue.createVNode("div", {
|
|
146
103
|
"class": this.ns.b("upload"),
|
|
@@ -13,17 +13,6 @@ var runtime = require('@ibiz-template/runtime');
|
|
|
13
13
|
function _isSlot(s) {
|
|
14
14
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
15
15
|
}
|
|
16
|
-
async function importMapping(method, id, data) {
|
|
17
|
-
let url = "extension/import_schemas";
|
|
18
|
-
if (id) {
|
|
19
|
-
url = "".concat(url, "/").concat(id);
|
|
20
|
-
}
|
|
21
|
-
const res = await ibiz.net.request(url, {
|
|
22
|
-
method,
|
|
23
|
-
data
|
|
24
|
-
});
|
|
25
|
-
return res;
|
|
26
|
-
}
|
|
27
16
|
const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
28
17
|
name: "DataImport2",
|
|
29
18
|
props: {
|
|
@@ -67,6 +56,7 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
67
56
|
const columnMappingListMap = /* @__PURE__ */ new Map();
|
|
68
57
|
const options = vue.ref([]);
|
|
69
58
|
const isNoPersonel = vue.ref(false);
|
|
59
|
+
const dataImport = props.dataImport || runtime.getDefaultDataImport(props.appDataEntity);
|
|
70
60
|
const clearSelect = () => {
|
|
71
61
|
const keys = [...columnMap.keys()];
|
|
72
62
|
keys.forEach((item) => {
|
|
@@ -87,7 +77,7 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
87
77
|
}
|
|
88
78
|
let columnMapData = columnData.fields;
|
|
89
79
|
if (!columnData.fields) {
|
|
90
|
-
const res = await
|
|
80
|
+
const res = await runtime.getImportSchema(columnData.id);
|
|
91
81
|
if (res.status === 200 && res.data) {
|
|
92
82
|
columnMapData = res.data.fields;
|
|
93
83
|
}
|
|
@@ -129,7 +119,6 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
129
119
|
watchValue(newValue);
|
|
130
120
|
});
|
|
131
121
|
const onButtonColumnMappingImportClick = async () => {
|
|
132
|
-
var _a;
|
|
133
122
|
const string = selectValues.value.join("");
|
|
134
123
|
if (string === "") {
|
|
135
124
|
ibiz.message.warning(ibiz.i18n.t("component.dataImport2.atLastOne"));
|
|
@@ -140,32 +129,25 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
140
129
|
const columnMapArr = [...columnMap.values()];
|
|
141
130
|
const fields = columnMapArr.filter((columnitem) => columnitem.name !== "");
|
|
142
131
|
const data = {
|
|
143
|
-
// schame_tag: '', // 导入模式标记 不传
|
|
144
|
-
// id: '', // 导入模式标识 也不用传
|
|
145
132
|
name: "".concat(fileName.value.split(".")[0], "|").concat((/* @__PURE__ */ new Date()).toLocaleString()),
|
|
146
133
|
// 导入模式名称 按照导入的名称|时间来生成
|
|
147
|
-
|
|
148
|
-
fields,
|
|
134
|
+
fields
|
|
149
135
|
// 导入模式属性 {name:'',order_value:1}
|
|
150
|
-
// type: '', // 导入模式类型 暂时不用传
|
|
151
|
-
system_tag: (_a = ibiz.appData) == null ? void 0 : _a.context.srfsystemid,
|
|
152
|
-
// 系统标记
|
|
153
|
-
data_entity_tag: props.appDataEntity.codeName,
|
|
154
|
-
// 数据实体标记
|
|
155
|
-
import_tag: props.appDataEntity.defaultAppDEDataImportId,
|
|
156
|
-
// 导入标记 导入模型的代码名称
|
|
157
|
-
owner_type: "PERSONAL"
|
|
158
|
-
// 所有者类型
|
|
159
136
|
};
|
|
160
137
|
if (props.params) {
|
|
161
138
|
Object.assign(data, props.params);
|
|
162
139
|
}
|
|
163
140
|
if (listValue.value) {
|
|
164
141
|
const columnData = columnMappingListMap.get(listValue.value);
|
|
165
|
-
if (columnData
|
|
142
|
+
if (columnData) {
|
|
166
143
|
data.name = columnData.name;
|
|
144
|
+
data.id = columnData.id;
|
|
167
145
|
}
|
|
168
|
-
const resput = await
|
|
146
|
+
const resput = await runtime.updateImportSchema({
|
|
147
|
+
appDataEntity: props.appDataEntity,
|
|
148
|
+
dataImport,
|
|
149
|
+
data
|
|
150
|
+
});
|
|
169
151
|
if (resput.status === 200 && resput.ok) {
|
|
170
152
|
columnMappingListMap.set(listValue.value, resput.data);
|
|
171
153
|
}
|
|
@@ -178,7 +160,11 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
178
160
|
checkmark: false,
|
|
179
161
|
close: false
|
|
180
162
|
});
|
|
181
|
-
const res = await
|
|
163
|
+
const res = await runtime.createImportSchema({
|
|
164
|
+
appDataEntity: props.appDataEntity,
|
|
165
|
+
dataImport,
|
|
166
|
+
data
|
|
167
|
+
});
|
|
182
168
|
if (res.status === 200 && res.ok) {
|
|
183
169
|
columnMappingListMap.set(data.name, res.data);
|
|
184
170
|
}
|
|
@@ -196,33 +182,11 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
196
182
|
if (data) {
|
|
197
183
|
id = data.id;
|
|
198
184
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
205
|
-
let url = "".concat(path, "/asyncimportdata2");
|
|
206
|
-
const queryData = {
|
|
207
|
-
srfossfileid: fileid,
|
|
208
|
-
srfimportschemaid: id
|
|
209
|
-
};
|
|
210
|
-
if (srfimporttag) {
|
|
211
|
-
Object.assign(queryData, {
|
|
212
|
-
srfimporttag
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
if (props.params) {
|
|
216
|
-
Object.assign(queryData, props.params);
|
|
217
|
-
}
|
|
218
|
-
url += qs.stringify(queryData, {
|
|
219
|
-
addQueryPrefix: true
|
|
220
|
-
});
|
|
221
|
-
await ibiz.net.request(url, {
|
|
222
|
-
method: "get"
|
|
223
|
-
});
|
|
224
|
-
ibiz.notification.info({
|
|
225
|
-
desc: ibiz.i18n.t("component.dataImport.startImport")
|
|
185
|
+
await runtime.asyncImportData2({
|
|
186
|
+
appDataEntity: props.appDataEntity,
|
|
187
|
+
dataImport,
|
|
188
|
+
fileId: fileid,
|
|
189
|
+
schemaId: id
|
|
226
190
|
});
|
|
227
191
|
onCancelButtonClick();
|
|
228
192
|
} else {
|
|
@@ -244,13 +208,10 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
244
208
|
}
|
|
245
209
|
};
|
|
246
210
|
const columnMappingListQuery = async () => {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
n_data_entity_tag_eq: props.appDataEntity.codeName
|
|
252
|
-
};
|
|
253
|
-
const res = await importMapping("post", "fetch_cur_user", params);
|
|
211
|
+
const res = await runtime.fetchImportSchemas({
|
|
212
|
+
appDataEntity: props.appDataEntity,
|
|
213
|
+
dataImport
|
|
214
|
+
});
|
|
254
215
|
if (res.status === 200 && res.data) {
|
|
255
216
|
res.data.forEach((item) => {
|
|
256
217
|
options.value.push({
|
|
@@ -266,8 +227,6 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
266
227
|
}
|
|
267
228
|
};
|
|
268
229
|
vue.onMounted(() => {
|
|
269
|
-
var _a;
|
|
270
|
-
const dataImport = (_a = props.appDataEntity.appDEDataImports) == null ? void 0 : _a.find((importItem) => importItem.id === props.appDataEntity.defaultAppDEDataImportId);
|
|
271
230
|
if (dataImport && dataImport.dedataImportItems) {
|
|
272
231
|
dataOption.value = dataImport.dedataImportItems;
|
|
273
232
|
} else if (props.appDataEntity.appDEFields) {
|
|
@@ -473,4 +432,3 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
473
432
|
});
|
|
474
433
|
|
|
475
434
|
exports.DataImport2 = DataImport2;
|
|
476
|
-
exports.importMapping = importMapping;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
-
var dataImport2 = require('../data-import2/data-import2.cjs');
|
|
6
5
|
require('./data-import2-select.css');
|
|
6
|
+
var runtime = require('@ibiz-template/runtime');
|
|
7
7
|
|
|
8
8
|
"use strict";
|
|
9
9
|
function _isSlot(s) {
|
|
@@ -56,7 +56,9 @@ const DataImport2Select = /* @__PURE__ */ vue.defineComponent({
|
|
|
56
56
|
const data = props.columnMappingListMap.get(item.oldLabel);
|
|
57
57
|
if (data) {
|
|
58
58
|
data.name = item.label;
|
|
59
|
-
const result = await
|
|
59
|
+
const result = await runtime.updateImportSchema({
|
|
60
|
+
data
|
|
61
|
+
});
|
|
60
62
|
if (result.status === 200 && result.ok) {
|
|
61
63
|
emit("columnMappingListMapChange", item.label, result.data);
|
|
62
64
|
}
|
|
@@ -81,7 +83,7 @@ const DataImport2Select = /* @__PURE__ */ vue.defineComponent({
|
|
|
81
83
|
e.stopPropagation();
|
|
82
84
|
const columnData = props.columnMappingListMap.get(str);
|
|
83
85
|
if (columnData) {
|
|
84
|
-
const res = await
|
|
86
|
+
const res = await runtime.deleteImportSchema(columnData.id);
|
|
85
87
|
if (res.status === 200 && res.ok) {
|
|
86
88
|
emit("optionsChange", str);
|
|
87
89
|
emit("columnMappingListMapChange", str);
|
|
@@ -43,16 +43,11 @@ const FormControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
const detailId = detail.id;
|
|
46
|
-
const detailProps = {
|
|
47
|
-
modelData: detail,
|
|
48
|
-
controller: c.details[detailId],
|
|
49
|
-
key: detail.id,
|
|
50
|
-
attrs: renderAttrs(detail)
|
|
51
|
-
};
|
|
52
46
|
if (slots[detailId]) {
|
|
53
47
|
return vue.renderSlot(slots, detailId, {
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
model: detail,
|
|
49
|
+
data: c.state.data,
|
|
50
|
+
value: c.state.data[detailId]
|
|
56
51
|
});
|
|
57
52
|
}
|
|
58
53
|
const childSlots = {};
|
|
@@ -75,7 +70,10 @@ const FormControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
75
70
|
}
|
|
76
71
|
const component = vue.resolveComponent(provider.component);
|
|
77
72
|
return vue.h(component, {
|
|
78
|
-
|
|
73
|
+
modelData: detail,
|
|
74
|
+
controller: c.details[detailId],
|
|
75
|
+
key: detail.id,
|
|
76
|
+
attrs: renderAttrs(detail)
|
|
79
77
|
}, childSlots);
|
|
80
78
|
};
|
|
81
79
|
const FormDetail = (_props) => {
|
|
@@ -140,7 +140,9 @@ const GridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
140
140
|
default: true
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
setup(props
|
|
143
|
+
setup(props, {
|
|
144
|
+
slots
|
|
145
|
+
}) {
|
|
144
146
|
const c = vue3Util.useControlController((...args) => new runtime.GridController(...args));
|
|
145
147
|
const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
146
148
|
const {
|
|
@@ -218,6 +220,15 @@ const GridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
218
220
|
"class": ns.b("batch-toolbar-items")
|
|
219
221
|
}, null)])]);
|
|
220
222
|
};
|
|
223
|
+
const renderTableColumn = (model, index) => {
|
|
224
|
+
if (slots[model.id]) {
|
|
225
|
+
return vue.renderSlot(slots, model.id, {
|
|
226
|
+
model,
|
|
227
|
+
data: c.state.items
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
return renderChildColumn(c, model, renderColumns.value, index);
|
|
231
|
+
};
|
|
221
232
|
vue.onUnmounted(() => {
|
|
222
233
|
zIndex.decrement();
|
|
223
234
|
});
|
|
@@ -227,6 +238,7 @@ const GridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
227
238
|
tableRef,
|
|
228
239
|
tableData,
|
|
229
240
|
renderColumns,
|
|
241
|
+
renderTableColumn,
|
|
230
242
|
onDbRowClick,
|
|
231
243
|
onRowClick,
|
|
232
244
|
onSelectionChange,
|
|
@@ -284,7 +296,7 @@ const GridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
284
296
|
"type": "selection",
|
|
285
297
|
"width": "55"
|
|
286
298
|
}, null), this.renderColumns.map((model, index) => {
|
|
287
|
-
return
|
|
299
|
+
return this.renderTableColumn(model, index);
|
|
288
300
|
})];
|
|
289
301
|
},
|
|
290
302
|
append: () => {
|
|
@@ -380,7 +380,12 @@ const FilterTreeControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
380
380
|
}, null);
|
|
381
381
|
})) ? _slot2 : {
|
|
382
382
|
default: () => [_slot2]
|
|
383
|
-
}),
|
|
383
|
+
}), vue.createVNode(vue.resolveComponent("iBizFilterModeSelect"), {
|
|
384
|
+
"disabled": true,
|
|
385
|
+
"class": ns.e("mode-select"),
|
|
386
|
+
"value": child.valueOP,
|
|
387
|
+
"modes": [child.valueOP]
|
|
388
|
+
}, null), renderEditor(child, itemsC)];
|
|
384
389
|
}
|
|
385
390
|
return vue.createVNode("div", {
|
|
386
391
|
"class": (ns.b("group"), ns.bm("group", "items"))
|
|
@@ -60,7 +60,9 @@ const TreeGridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
60
|
default: true
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
setup(props
|
|
63
|
+
setup(props, {
|
|
64
|
+
slots
|
|
65
|
+
}) {
|
|
64
66
|
const c = vue3Util.useControlController((...args) => new runtime.TreeGridController(...args));
|
|
65
67
|
const ns = vue3Util.useNamespace("control-grid");
|
|
66
68
|
const ns2 = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
@@ -162,6 +164,15 @@ const TreeGridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
162
164
|
"class": ns.b("batch-toolbar-items")
|
|
163
165
|
}, null)])]);
|
|
164
166
|
};
|
|
167
|
+
const renderColumn = (model, index) => {
|
|
168
|
+
if (slots[model.id]) {
|
|
169
|
+
return vue.renderSlot(slots, model.id, {
|
|
170
|
+
model,
|
|
171
|
+
data: c.state.items
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
return grid.renderChildColumn(c, model, renderColumns.value, index);
|
|
175
|
+
};
|
|
165
176
|
return {
|
|
166
177
|
c,
|
|
167
178
|
ns,
|
|
@@ -170,6 +181,7 @@ const TreeGridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
170
181
|
treeGirdData,
|
|
171
182
|
tableData,
|
|
172
183
|
renderColumns,
|
|
184
|
+
renderColumn,
|
|
173
185
|
defaultSort,
|
|
174
186
|
onDbRowClick,
|
|
175
187
|
onRowClick,
|
|
@@ -229,7 +241,7 @@ const TreeGridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
229
241
|
"type": "selection",
|
|
230
242
|
"width": "55"
|
|
231
243
|
}, null), state.isCreated && this.renderColumns.map((model, index) => {
|
|
232
|
-
return
|
|
244
|
+
return this.renderColumn(model, index);
|
|
233
245
|
})];
|
|
234
246
|
},
|
|
235
247
|
append: () => {
|
|
@@ -175,6 +175,12 @@ const TreeGridExControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
175
175
|
render() {
|
|
176
176
|
const renderColumn = (model, index) => {
|
|
177
177
|
var _a, _b;
|
|
178
|
+
if (this.$slots[model.id]) {
|
|
179
|
+
return vue.renderSlot(this.$slots, model.id, {
|
|
180
|
+
model,
|
|
181
|
+
data: this.c.state.items
|
|
182
|
+
});
|
|
183
|
+
}
|
|
178
184
|
const {
|
|
179
185
|
codeName: columnName,
|
|
180
186
|
width
|
|
@@ -157,6 +157,8 @@ const IBizAutoComplete = /* @__PURE__ */ vue.defineComponent({
|
|
|
157
157
|
};
|
|
158
158
|
},
|
|
159
159
|
render() {
|
|
160
|
+
const overflowMode = this.c.editorParams.overflowMode || ibiz.config.pickerEditor.overflowMode;
|
|
161
|
+
const isEllipsis = overflowMode === "ellipsis";
|
|
160
162
|
const editContent = vue.createVNode(vue.resolveComponent("el-autocomplete"), vue.mergeProps({
|
|
161
163
|
"class": this.ns.b("input"),
|
|
162
164
|
"ref": "editorRef",
|
|
@@ -166,7 +168,7 @@ const IBizAutoComplete = /* @__PURE__ */ vue.defineComponent({
|
|
|
166
168
|
"placeholder": this.c.placeHolder,
|
|
167
169
|
"placement": "bottom",
|
|
168
170
|
"clearable": this.autoCompleteClearable,
|
|
169
|
-
"popper-class": this.ns.e("transfer"),
|
|
171
|
+
"popper-class": [this.ns.e("transfer")],
|
|
170
172
|
"teleported": !this.showFormDefaultContent,
|
|
171
173
|
"fetch-suggestions": this.onSearch,
|
|
172
174
|
"onClear": this.onClear,
|
|
@@ -175,13 +177,15 @@ const IBizAutoComplete = /* @__PURE__ */ vue.defineComponent({
|
|
|
175
177
|
"onInput": this.handleInput,
|
|
176
178
|
"onFocus": this.onFocus,
|
|
177
179
|
"onBlur": this.onBlur,
|
|
178
|
-
"onKeyup": this.handleKeyUp
|
|
180
|
+
"onKeyup": this.handleKeyUp,
|
|
181
|
+
"fit-input-width": isEllipsis
|
|
179
182
|
}, this.$attrs), {
|
|
180
183
|
default: ({
|
|
181
184
|
item
|
|
182
185
|
}) => {
|
|
183
186
|
return vue.createVNode("div", {
|
|
184
|
-
"class": this.ns.e("transfer-item")
|
|
187
|
+
"class": [this.ns.e("transfer-item"), this.ns.is("ellipsis", isEllipsis)],
|
|
188
|
+
"title": isEllipsis ? item[this.c.textName] : ""
|
|
185
189
|
}, [item[this.c.textName]]);
|
|
186
190
|
},
|
|
187
191
|
suffix: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-autocomplete{width:100%}.ibiz-autocomplete .ibiz-autocomplete-input{width:100%}.ibiz-autocomplete--readonly{font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-readonly-color)}.ibiz-autocomplete-form-default-content{display:none}.ibiz-form-item .ibiz-autocomplete.is-show-default:hover .ibiz-autocomplete-form-default-content{display:none}.ibiz-form-item .ibiz-autocomplete.is-show-default:hover .ibiz-autocomplete-input{display:block}.ibiz-form-item .ibiz-autocomplete.is-show-default .ibiz-autocomplete-form-default-content{display:flex;align-items:center;width:100%;padding:var(--ibiz-form-item-hover-edit-padding);font-family:Arial,sans-serif;font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-text-color)}.ibiz-form-item .ibiz-autocomplete.is-show-default .ibiz-autocomplete-input{display:none}.ibiz-form-item .ibiz-autocomplete.is-show-default.is-editable .ibiz-autocomplete-form-default-content{display:none}.ibiz-form-item .ibiz-autocomplete.is-show-default.is-editable .ibiz-autocomplete-input{display:block}
|
|
1
|
+
.ibiz-autocomplete{width:100%}.ibiz-autocomplete__transfer-item.is-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-autocomplete .ibiz-autocomplete-input{width:100%}.ibiz-autocomplete--readonly{font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-readonly-color)}.ibiz-autocomplete-form-default-content{display:none}.ibiz-form-item .ibiz-autocomplete.is-show-default:hover .ibiz-autocomplete-form-default-content{display:none}.ibiz-form-item .ibiz-autocomplete.is-show-default:hover .ibiz-autocomplete-input{display:block}.ibiz-form-item .ibiz-autocomplete.is-show-default .ibiz-autocomplete-form-default-content{display:flex;align-items:center;width:100%;padding:var(--ibiz-form-item-hover-edit-padding);font-family:Arial,sans-serif;font-size:var(--ibiz-form-item-font-size);line-height:var(--ibiz-editor-default-line-height);color:var(--ibiz-form-item-text-color)}.ibiz-form-item .ibiz-autocomplete.is-show-default .ibiz-autocomplete-input{display:none}.ibiz-form-item .ibiz-autocomplete.is-show-default.is-editable .ibiz-autocomplete-form-default-content{display:none}.ibiz-form-item .ibiz-autocomplete.is-show-default.is-editable .ibiz-autocomplete-input{display:block}
|
|
@@ -281,6 +281,8 @@ const IBizMPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
281
281
|
},
|
|
282
282
|
render() {
|
|
283
283
|
let _slot;
|
|
284
|
+
const overflowMode = this.c.editorParams.overflowMode || ibiz.config.pickerEditor.overflowMode;
|
|
285
|
+
const isEllipsis = overflowMode === "ellipsis";
|
|
284
286
|
const editContent = [!this.readonly && vue.createVNode(vue.resolveComponent("el-select"), vue.mergeProps({
|
|
285
287
|
"ref": "editorRef",
|
|
286
288
|
"class": [this.ns.b("select")],
|
|
@@ -299,9 +301,11 @@ const IBizMPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
299
301
|
"disabled": this.disabled,
|
|
300
302
|
"onFocus": this.onFocus,
|
|
301
303
|
"onBlur": this.onBlur,
|
|
302
|
-
"onKeyup": this.handleKeyUp
|
|
304
|
+
"onKeyup": this.handleKeyUp,
|
|
305
|
+
"fit-input-width": isEllipsis
|
|
303
306
|
}, this.$attrs), _isSlot(_slot = this.items.map((item) => {
|
|
304
307
|
return vue.createVNode(vue.resolveComponent("el-option"), {
|
|
308
|
+
"title": isEllipsis ? item[this.c.textName] : "",
|
|
305
309
|
"key": item[this.c.keyName],
|
|
306
310
|
"value": item[this.c.keyName],
|
|
307
311
|
"label": item[this.c.textName]
|