@ibiz-template/vue3-components 0.4.3 → 0.4.5
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/chart-ImL2qyp9.js +0 -1
- package/dist/ibiz-markdown-editor-BQsiQfa2.js +0 -1
- package/dist/index-UNZ1dtt_.js +0 -1
- package/dist/index-Ul84JXar.js +0 -1
- package/dist/index-zzHHP33g.js +13 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -2
- package/dist/map-chart-7nfIdU3w.js +0 -1
- package/dist/wang-editor-f4440Xvw.js +0 -1
- package/dist/{xlsx-util-Mxa6HuaG.js → xlsx-util-FO177Hj_.js} +1 -2
- package/es/common/col/col.mjs +0 -3
- package/es/common/data-import2/data-import2.css +1 -1
- package/es/common/data-import2/data-import2.d.ts +48 -11
- package/es/common/data-import2/data-import2.mjs +133 -166
- package/es/common/data-import2-select/data-import2-select.css +1 -0
- package/es/common/data-import2-select/data-import2-select.d.ts +59 -0
- package/es/common/data-import2-select/data-import2-select.mjs +170 -0
- package/es/common/data-import2-table/data-import2-table.css +1 -0
- package/es/common/data-import2-table/data-import2-table.d.ts +56 -0
- package/es/common/data-import2-table/data-import2-table.mjs +104 -0
- package/es/common/index.mjs +4 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +2 -2
- package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +1 -1
- package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.provider.mjs +1 -1
- package/es/control/grid/row-edit-popover/row-edit-popover.css +1 -1
- package/es/control/tree/index.d.ts +1 -0
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree/tree.d.ts +1 -0
- package/es/control/tree/tree.mjs +104 -54
- package/es/editor/index.mjs +9 -2
- package/es/index.mjs +0 -1
- package/es/panel-component/index.d.ts +0 -1
- package/es/panel-component/index.mjs +2 -4
- package/es/panel-component/panel-button/panel-button.controller.mjs +4 -1
- package/es/view-engine/index-view.engine.d.ts +0 -7
- package/es/view-engine/index-view.engine.mjs +0 -37
- package/lib/common/col/col.cjs +0 -3
- package/lib/common/data-import2/data-import2.cjs +132 -164
- package/lib/common/data-import2/data-import2.css +1 -1
- package/lib/common/data-import2-select/data-import2-select.cjs +172 -0
- package/lib/common/data-import2-select/data-import2-select.css +1 -0
- package/lib/common/data-import2-table/data-import2-table.cjs +106 -0
- package/lib/common/data-import2-table/data-import2-table.css +1 -0
- package/lib/common/index.cjs +4 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +1 -1
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +1 -1
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.provider.cjs +1 -1
- package/lib/control/grid/row-edit-popover/row-edit-popover.css +1 -1
- package/lib/control/tree/tree.cjs +102 -52
- package/lib/control/tree/tree.css +1 -1
- package/lib/editor/index.cjs +9 -2
- package/lib/index.cjs +15 -17
- package/lib/panel-component/index.cjs +29 -32
- package/lib/panel-component/panel-button/panel-button.controller.cjs +4 -1
- package/lib/view-engine/index-view.engine.cjs +0 -37
- package/package.json +10 -9
- package/dist/chart-ImL2qyp9.js.map +0 -1
- package/dist/ibiz-markdown-editor-BQsiQfa2.js.map +0 -1
- package/dist/index-1dtzc9-X.js +0 -14
- package/dist/index-1dtzc9-X.js.map +0 -1
- package/dist/index-UNZ1dtt_.js.map +0 -1
- package/dist/index-Ul84JXar.js.map +0 -1
- package/dist/index.system.min.js.map +0 -1
- package/dist/map-chart-7nfIdU3w.js.map +0 -1
- package/dist/wang-editor-f4440Xvw.js.map +0 -1
- package/dist/xlsx-util-Mxa6HuaG.js.map +0 -1
- package/es/_virtual/_commonjs-dynamic-modules.mjs +0 -5
- package/es/_virtual/pluralize.mjs +0 -3
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/format-path/format-path.mjs +0 -11
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/index.mjs +0 -4
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/merge-model/merge-model.mjs +0 -22
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/plural/plural.mjs +0 -30
- package/es/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/service-path-util/service-path-util.mjs +0 -187
- package/es/node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.mjs +0 -515
- package/es/panel-component/panel-container-group/index.d.ts +0 -28
- package/es/panel-component/panel-container-group/index.mjs +0 -20
- package/es/panel-component/panel-container-group/panel-container-group.controller.d.ts +0 -31
- package/es/panel-component/panel-container-group/panel-container-group.controller.mjs +0 -35
- package/es/panel-component/panel-container-group/panel-container-group.css +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.d.ts +0 -28
- package/es/panel-component/panel-container-group/panel-container-group.mjs +0 -107
- package/es/panel-component/panel-container-group/panel-container-group.provider.d.ts +0 -15
- package/es/panel-component/panel-container-group/panel-container-group.provider.mjs +0 -21
- package/es/panel-component/panel-container-group/panel-container-group.state.d.ts +0 -12
- package/es/panel-component/panel-container-group/panel-container-group.state.mjs +0 -7
- package/es/panel-component/panel-tab-page/index.d.ts +0 -23
- package/es/panel-component/panel-tab-page/index.mjs +0 -12
- package/es/panel-component/panel-tab-page/panel-tab-page.d.ts +0 -25
- package/es/panel-component/panel-tab-page/panel-tab-page.mjs +0 -62
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.d.ts +0 -13
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.mjs +0 -21
- package/lib/_virtual/_commonjs-dynamic-modules.cjs +0 -7
- package/lib/_virtual/pluralize.cjs +0 -5
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/format-path/format-path.cjs +0 -13
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/index.cjs +0 -14
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/merge-model/merge-model.cjs +0 -24
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/plural/plural.cjs +0 -33
- package/lib/node_modules/.pnpm/@ibiz-template_model-helper@0.4.3_@ibiz-template_runtime@0.4.3_ramda@0.29.1/node_modules/@ibiz-template/model-helper/out/utils/service-path-util/service-path-util.cjs +0 -189
- package/lib/node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.cjs +0 -519
- package/lib/panel-component/panel-container-group/index.cjs +0 -27
- package/lib/panel-component/panel-container-group/panel-container-group.cjs +0 -109
- package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +0 -37
- package/lib/panel-component/panel-container-group/panel-container-group.css +0 -1
- package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +0 -23
- package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +0 -9
- package/lib/panel-component/panel-tab-page/index.cjs +0 -17
- package/lib/panel-component/panel-tab-page/panel-tab-page.cjs +0 -64
- package/lib/panel-component/panel-tab-page/panel-tab-page.provider.cjs +0 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBizPanelContainer, IBizPanelCtrlPos, IBizScrollContainer, IBizNavPos, IBizSingleDataContainer, IBizMultiDataContainer, IBizPanelField, IBizPanelRawItem, IBizGridContainer, IBizPanelContainerImage } from '@ibiz-template/vue3-util';
|
|
1
|
+
import { IBizPanelContainer, IBizPanelCtrlPos, IBizScrollContainer, IBizNavPos, IBizSingleDataContainer, IBizMultiDataContainer, IBizPanelField, IBizPanelRawItem, IBizGridContainer, IBizPanelTabPage, IBizPanelContainerGroup, IBizPanelContainerImage } from '@ibiz-template/vue3-util';
|
|
2
2
|
import { IBizAuthUserinfo } from './auth-userinfo/index.mjs';
|
|
3
3
|
import { IBizNavPosIndex } from './nav-pos-index/index.mjs';
|
|
4
4
|
import { IBizNavTabs } from './nav-tabs/index.mjs';
|
|
@@ -9,13 +9,11 @@ import { IBizPanelViewHeader } from './panel-view-header/index.mjs';
|
|
|
9
9
|
import { IBizPanelExpHeader } from './panel-exp-header/index.mjs';
|
|
10
10
|
import { IBizPanelViewContent } from './panel-view-content/index.mjs';
|
|
11
11
|
import { IBizPanelTabPanel } from './panel-tab-panel/index.mjs';
|
|
12
|
-
import { IBizPanelTabPage } from './panel-tab-page/index.mjs';
|
|
13
12
|
import { IBizSplitContainer } from './split-container/index.mjs';
|
|
14
13
|
import { IBizPanelIndexViewSearch } from './panel-index-view-search/index.mjs';
|
|
15
14
|
import { IBizPanelAppLoginView } from './panel-app-login-view/index.mjs';
|
|
16
15
|
import { IBizPanelRememberMe } from './panel-remember-me/index.mjs';
|
|
17
16
|
import { IBizIndexActions } from './index-actions/index.mjs';
|
|
18
|
-
import { IBizPanelContainerGroup } from './panel-container-group/index.mjs';
|
|
19
17
|
import { IBizUserMessage } from './user-message/index.mjs';
|
|
20
18
|
import { IBizSearchFormButtons } from './searchform-buttons/index.mjs';
|
|
21
19
|
export { NavPosIndexState } from './nav-pos-index/nav-pos-index.state.mjs';
|
|
@@ -59,4 +57,4 @@ const IBizPanelComponents = {
|
|
|
59
57
|
}
|
|
60
58
|
};
|
|
61
59
|
|
|
62
|
-
export { IBizAuthUserinfo, IBizIndexActions, IBizNavPosIndex, IBizPanelAppTitle, IBizPanelButton, IBizPanelComponents, IBizPanelIndexViewSearch,
|
|
60
|
+
export { IBizAuthUserinfo, IBizIndexActions, IBizNavPosIndex, IBizPanelAppTitle, IBizPanelButton, IBizPanelComponents, IBizPanelIndexViewSearch, IBizPanelTabPanel, IBizSplitContainer, IBizPanelComponents as default };
|
|
@@ -89,7 +89,10 @@ class PanelButtonController extends PanelItemController {
|
|
|
89
89
|
* @memberof PanelButtonController
|
|
90
90
|
*/
|
|
91
91
|
async onActionClick(event) {
|
|
92
|
-
const { uiactionId } = this.model;
|
|
92
|
+
const { uiactionId, actionType } = this.model;
|
|
93
|
+
if (actionType === "NONE") {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
93
96
|
await UIActionUtil.execAndResolved(uiactionId, {
|
|
94
97
|
context: this.panel.context,
|
|
95
98
|
params: this.panel.params,
|
|
@@ -22,12 +22,5 @@ export declare class IndexViewEngine extends ViewEngineBase {
|
|
|
22
22
|
* @protected
|
|
23
23
|
*/
|
|
24
24
|
protected toggleCollapse(): void;
|
|
25
|
-
/**
|
|
26
|
-
* 根据首页viewStyle设置主题(临时)
|
|
27
|
-
* @return {*}
|
|
28
|
-
* @author: zhujiamin
|
|
29
|
-
* @Date: 2023-09-05 15:27:15
|
|
30
|
-
*/
|
|
31
|
-
setTheme(): void;
|
|
32
25
|
protected calcViewHeaderVisible(): boolean;
|
|
33
26
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ViewEngineBase, ViewCallTag } from '@ibiz-template/runtime';
|
|
2
|
-
import { isNil, isEmpty } from 'ramda';
|
|
3
2
|
|
|
4
3
|
"use strict";
|
|
5
4
|
class IndexViewEngine extends ViewEngineBase {
|
|
@@ -27,7 +26,6 @@ class IndexViewEngine extends ViewEngineBase {
|
|
|
27
26
|
this.view.slotProps.appmenu = {};
|
|
28
27
|
}
|
|
29
28
|
this.view.slotProps.appmenu.collapse = this.view.state.isCollapse;
|
|
30
|
-
this.setTheme();
|
|
31
29
|
ibiz.util.hiddenAppLoading();
|
|
32
30
|
}
|
|
33
31
|
async onMounted() {
|
|
@@ -66,41 +64,6 @@ class IndexViewEngine extends ViewEngineBase {
|
|
|
66
64
|
}
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
|
-
/**
|
|
70
|
-
* 根据首页viewStyle设置主题(临时)
|
|
71
|
-
* @return {*}
|
|
72
|
-
* @author: zhujiamin
|
|
73
|
-
* @Date: 2023-09-05 15:27:15
|
|
74
|
-
*/
|
|
75
|
-
setTheme() {
|
|
76
|
-
const viewStyle = this.view.model.viewStyle;
|
|
77
|
-
const htmlDom = document.querySelector("html");
|
|
78
|
-
let themeClass = "";
|
|
79
|
-
if (htmlDom && viewStyle) {
|
|
80
|
-
switch (viewStyle) {
|
|
81
|
-
case "DEFAULT":
|
|
82
|
-
if (!isNil(ibiz.config.theme) && !isEmpty(ibiz.config.theme)) {
|
|
83
|
-
themeClass = ibiz.config.theme;
|
|
84
|
-
} else {
|
|
85
|
-
themeClass = "light";
|
|
86
|
-
}
|
|
87
|
-
break;
|
|
88
|
-
case "STYLE2":
|
|
89
|
-
themeClass = "dark";
|
|
90
|
-
break;
|
|
91
|
-
case "STYLE3":
|
|
92
|
-
themeClass = "omni-oa";
|
|
93
|
-
break;
|
|
94
|
-
default:
|
|
95
|
-
themeClass = "light";
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
htmlDom.classList.forEach((removeClass) => {
|
|
99
|
-
htmlDom.classList.remove(removeClass);
|
|
100
|
-
});
|
|
101
|
-
htmlDom.classList.add(themeClass);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
67
|
calcViewHeaderVisible() {
|
|
105
68
|
return true;
|
|
106
69
|
}
|
package/lib/common/col/col.cjs
CHANGED
|
@@ -36,9 +36,6 @@ const IBizCol = /* @__PURE__ */ vue.defineComponent({
|
|
|
36
36
|
const spacingClass = vue.computed(() => {
|
|
37
37
|
const ns2 = vue3Util.useNamespace("spacing");
|
|
38
38
|
const classArr = [];
|
|
39
|
-
if (props.layoutPos.layout !== "FLEX") {
|
|
40
|
-
return classArr;
|
|
41
|
-
}
|
|
42
39
|
const spacings = {
|
|
43
40
|
top: props.layoutPos.spacingTop,
|
|
44
41
|
bottom: props.layoutPos.spacingBottom,
|
|
@@ -2,17 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
-
require('./data-import2.css');
|
|
6
5
|
var qs = require('qs');
|
|
7
6
|
var qxUtil = require('qx-util');
|
|
8
7
|
var core = require('@ibiz-template/core');
|
|
9
|
-
require('
|
|
10
|
-
|
|
8
|
+
var ramda = require('ramda');
|
|
9
|
+
require('./data-import2.css');
|
|
11
10
|
|
|
12
11
|
"use strict";
|
|
13
|
-
function _isSlot(s) {
|
|
14
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
15
|
-
}
|
|
16
12
|
async function importMapping(method, id, data) {
|
|
17
13
|
let url = `extension/import_schemas`;
|
|
18
14
|
if (id) {
|
|
@@ -49,20 +45,34 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
49
45
|
const previewinfo = vue.ref([[]]);
|
|
50
46
|
const columnMap = /* @__PURE__ */ new Map();
|
|
51
47
|
const selectValues = vue.ref([]);
|
|
52
|
-
|
|
48
|
+
const dataOption = vue.ref([]);
|
|
53
49
|
const dataimport2 = vue.ref();
|
|
54
50
|
const select = vue.ref();
|
|
55
|
-
|
|
51
|
+
const fileName = vue.ref("");
|
|
56
52
|
let fileid = "";
|
|
57
|
-
const ColumnMappingSave = vue.ref(
|
|
58
|
-
const columnMappingSaveName = vue.ref("");
|
|
53
|
+
const ColumnMappingSave = vue.ref(true);
|
|
59
54
|
const listValue = vue.ref("");
|
|
60
55
|
const columnMappingListMap = /* @__PURE__ */ new Map();
|
|
61
56
|
const options = vue.ref([]);
|
|
62
57
|
const isNoPersonel = vue.ref(false);
|
|
58
|
+
const clearSelect = () => {
|
|
59
|
+
const keys = [...columnMap.keys()];
|
|
60
|
+
keys.forEach((item) => {
|
|
61
|
+
const data = columnMap.get(item);
|
|
62
|
+
const cloneData = ramda.clone(data);
|
|
63
|
+
if (data && cloneData) {
|
|
64
|
+
cloneData.name = "";
|
|
65
|
+
columnMap.set(item, cloneData);
|
|
66
|
+
selectValues.value[data.index] = "";
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
};
|
|
63
70
|
const watchValue = async (listvalue) => {
|
|
64
71
|
if (listvalue) {
|
|
65
72
|
const columnData = columnMappingListMap.get(listvalue);
|
|
73
|
+
if (!columnData) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
66
76
|
let columnMapData = columnData.fields;
|
|
67
77
|
if (!columnData.fields) {
|
|
68
78
|
const res = await importMapping("get", columnData.id);
|
|
@@ -77,6 +87,7 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
77
87
|
}
|
|
78
88
|
const keys = [...columnMap.keys()];
|
|
79
89
|
const captionMap = /* @__PURE__ */ new Map();
|
|
90
|
+
clearSelect();
|
|
80
91
|
keys.forEach((item) => {
|
|
81
92
|
const columnMapValue = columnMap.get(item);
|
|
82
93
|
const lastIndex = item.lastIndexOf("-");
|
|
@@ -86,36 +97,32 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
86
97
|
captionMap.set(itemName, 0);
|
|
87
98
|
index = 0;
|
|
88
99
|
}
|
|
89
|
-
const filteredObjects = columnMapData.filter((columnitem) => columnitem.caption === itemName);
|
|
90
|
-
const newColumnValue = filteredObjects[index];
|
|
100
|
+
const filteredObjects = columnMapData && columnMapData.filter((columnitem) => columnitem.caption === itemName);
|
|
101
|
+
const newColumnValue = filteredObjects && filteredObjects[index];
|
|
91
102
|
if (newColumnValue) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
103
|
+
const dataOptionValue = dataOption.value.find((dataOptionItem) => dataOptionItem.id === newColumnValue.name);
|
|
104
|
+
if (dataOptionValue && columnMapValue) {
|
|
105
|
+
captionMap.set(itemName, index + 1);
|
|
106
|
+
newColumnValue.index = columnMapValue.index;
|
|
107
|
+
columnMap.set(item, newColumnValue);
|
|
108
|
+
selectValues.value[newColumnValue.index] = newColumnValue.name;
|
|
109
|
+
}
|
|
96
110
|
}
|
|
97
111
|
});
|
|
98
112
|
} else {
|
|
99
|
-
|
|
100
|
-
keys.forEach((item) => {
|
|
101
|
-
const data = columnMap.get(item);
|
|
102
|
-
if (data) {
|
|
103
|
-
data.name = "";
|
|
104
|
-
columnMap.set(item, data);
|
|
105
|
-
selectValues.value[data.index] = "";
|
|
106
|
-
}
|
|
107
|
-
});
|
|
113
|
+
clearSelect();
|
|
108
114
|
}
|
|
109
115
|
};
|
|
110
116
|
vue.watch(listValue, (newValue, _oldValue) => {
|
|
111
|
-
if (columnMappingSaveName.value !== newValue) {
|
|
112
|
-
ColumnMappingSave.value = false;
|
|
113
|
-
}
|
|
114
|
-
columnMappingSaveName.value = "";
|
|
115
117
|
watchValue(newValue);
|
|
116
118
|
});
|
|
117
119
|
const onButtonColumnMappingImportClick = async () => {
|
|
118
120
|
var _a;
|
|
121
|
+
const string = selectValues.value.join("");
|
|
122
|
+
if (string === "") {
|
|
123
|
+
ibiz.message.warning("\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u6620\u5C04\u5C5E\u6027");
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
119
126
|
if (previewinfo.value[0].length) {
|
|
120
127
|
ColumnMappingSave.value = true;
|
|
121
128
|
const columnMapArr = [...columnMap.values()];
|
|
@@ -123,7 +130,7 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
123
130
|
const data = {
|
|
124
131
|
// schame_tag: '', // 导入模式标记 不传
|
|
125
132
|
// id: '', // 导入模式标识 也不用传
|
|
126
|
-
name: `${fileName.split(".")[0]}|${(/* @__PURE__ */ new Date()).toLocaleString()}`,
|
|
133
|
+
name: `${fileName.value.split(".")[0]}|${(/* @__PURE__ */ new Date()).toLocaleString()}`,
|
|
127
134
|
// 导入模式名称 按照导入的名称|时间来生成
|
|
128
135
|
// order_value: '', // 排序值 也不用传
|
|
129
136
|
fields,
|
|
@@ -140,20 +147,26 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
140
147
|
};
|
|
141
148
|
if (listValue.value) {
|
|
142
149
|
const columnData = columnMappingListMap.get(listValue.value);
|
|
143
|
-
|
|
150
|
+
if (columnData && columnData.name) {
|
|
151
|
+
data.name = columnData.name;
|
|
152
|
+
}
|
|
153
|
+
const resput = await importMapping("put", columnData == null ? void 0 : columnData.id, data);
|
|
144
154
|
if (resput.status === 200 && resput.ok) {
|
|
145
155
|
columnMappingListMap.set(listValue.value, resput.data);
|
|
146
156
|
}
|
|
147
157
|
} else {
|
|
148
158
|
options.value.push({
|
|
149
159
|
value: data.name,
|
|
150
|
-
label: data.name
|
|
160
|
+
label: data.name,
|
|
161
|
+
oldLabel: data.name,
|
|
162
|
+
edit: true,
|
|
163
|
+
checkmark: false,
|
|
164
|
+
close: false
|
|
151
165
|
});
|
|
152
166
|
const res = await importMapping("post", "", data);
|
|
153
167
|
if (res.status === 200 && res.ok) {
|
|
154
168
|
columnMappingListMap.set(data.name, res.data);
|
|
155
169
|
}
|
|
156
|
-
columnMappingSaveName.value = data.name;
|
|
157
170
|
listValue.value = data.name;
|
|
158
171
|
}
|
|
159
172
|
} else {
|
|
@@ -162,13 +175,14 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
162
175
|
};
|
|
163
176
|
const onButtonImportClick = async () => {
|
|
164
177
|
if (previewinfo.value[0].length) {
|
|
165
|
-
if (listValue.value) {
|
|
178
|
+
if (listValue.value && ColumnMappingSave.value) {
|
|
166
179
|
const data = columnMappingListMap.get(listValue.value);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
const
|
|
180
|
+
let id = "";
|
|
181
|
+
if (data) {
|
|
182
|
+
id = data.id;
|
|
183
|
+
}
|
|
184
|
+
const dataEntityTag = props.appDataEntity.codeName2;
|
|
185
|
+
const url = `${dataEntityTag}/asyncimportdata2?srfimporttag=${props.appDataEntity.defaultAppDEDataImportId}&srfossfileid=${fileid}&srfimportschemaid=${id}`;
|
|
172
186
|
await ibiz.net.request(url, {
|
|
173
187
|
method: "get"
|
|
174
188
|
});
|
|
@@ -206,7 +220,11 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
206
220
|
res.data.forEach((item) => {
|
|
207
221
|
options.value.push({
|
|
208
222
|
value: item.name,
|
|
209
|
-
label: item.name
|
|
223
|
+
label: item.name,
|
|
224
|
+
oldLabel: item.name,
|
|
225
|
+
edit: true,
|
|
226
|
+
checkmark: false,
|
|
227
|
+
close: false
|
|
210
228
|
});
|
|
211
229
|
columnMappingListMap.set(item.name, item);
|
|
212
230
|
});
|
|
@@ -216,71 +234,15 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
216
234
|
var _a;
|
|
217
235
|
const dataImport = (_a = props.appDataEntity.appDEDataImports) == null ? void 0 : _a.find((importItem) => importItem.id === props.appDataEntity.defaultAppDEDataImportId);
|
|
218
236
|
if (dataImport && dataImport.dedataImportItems) {
|
|
219
|
-
dataOption = dataImport.dedataImportItems;
|
|
237
|
+
dataOption.value = dataImport.dedataImportItems;
|
|
220
238
|
} else if (props.appDataEntity.appDEFields) {
|
|
221
|
-
dataOption = props.appDataEntity.appDEFields;
|
|
239
|
+
dataOption.value = props.appDataEntity.appDEFields;
|
|
240
|
+
}
|
|
241
|
+
if (dataimport2.value && dataimport2.value.parentElement) {
|
|
242
|
+
findDialog(dataimport2.value.parentElement);
|
|
222
243
|
}
|
|
223
|
-
findDialog(dataimport2.value.parentElement);
|
|
224
244
|
columnMappingListQuery();
|
|
225
245
|
});
|
|
226
|
-
const renderSelect = (itemx, index) => {
|
|
227
|
-
let _slot;
|
|
228
|
-
const change = (item) => {
|
|
229
|
-
selectValues.value[index] = item;
|
|
230
|
-
const data = columnMap.get(`${itemx}-${index}`);
|
|
231
|
-
data.name = item;
|
|
232
|
-
columnMap.set(`${itemx}-${index}`, data);
|
|
233
|
-
ColumnMappingSave.value = false;
|
|
234
|
-
};
|
|
235
|
-
return vue.createVNode(vue.resolveComponent("el-select"), {
|
|
236
|
-
"modelValue": selectValues.value[index],
|
|
237
|
-
"placeholder": "\u9009\u62E9\u5F53\u524D\u5217\u5BF9\u5E94\u7684\u5BFC\u5165\u5C5E\u6027",
|
|
238
|
-
"onChange": change,
|
|
239
|
-
"key": index,
|
|
240
|
-
"popper-class": ns.e("dataimport-select"),
|
|
241
|
-
"class": ns.e("select")
|
|
242
|
-
}, _isSlot(_slot = dataOption.map((item) => {
|
|
243
|
-
return vue.createVNode(vue.resolveComponent("el-option"), {
|
|
244
|
-
"key": item.name,
|
|
245
|
-
"value": item.id,
|
|
246
|
-
"label": item.caption ? item.caption : item.logicName
|
|
247
|
-
}, null);
|
|
248
|
-
})) ? _slot : {
|
|
249
|
-
default: () => [_slot]
|
|
250
|
-
});
|
|
251
|
-
};
|
|
252
|
-
const renderTable = () => {
|
|
253
|
-
const arr = previewinfo.value;
|
|
254
|
-
const rows = arr.map((row, rowIndex) => vue.createVNode("tr", {
|
|
255
|
-
"key": rowIndex
|
|
256
|
-
}, [row.map((cell, cellIndex) => rowIndex === 0 ? vue.createVNode("th", {
|
|
257
|
-
"key": cellIndex,
|
|
258
|
-
"style": {
|
|
259
|
-
border: "1px solid #e5e5e5",
|
|
260
|
-
padding: "4px",
|
|
261
|
-
"min-width": "132px"
|
|
262
|
-
}
|
|
263
|
-
}, [cell]) : vue.createVNode("td", {
|
|
264
|
-
"key": cellIndex,
|
|
265
|
-
"style": {
|
|
266
|
-
border: "1px solid #e5e5e5",
|
|
267
|
-
padding: "4px",
|
|
268
|
-
"min-width": "132px"
|
|
269
|
-
}
|
|
270
|
-
}, [cell]))]));
|
|
271
|
-
const newRows = [vue.createVNode("tr", {
|
|
272
|
-
"key": "newRow"
|
|
273
|
-
}, [arr[0].map((item, index) => vue.createVNode("td", {
|
|
274
|
-
"key": index,
|
|
275
|
-
"style": {
|
|
276
|
-
border: "1px solid #e5e5e5",
|
|
277
|
-
"min-width": "132px"
|
|
278
|
-
}
|
|
279
|
-
}, [renderSelect(item, index)]))]), ...rows];
|
|
280
|
-
return vue.createVNode("table", {
|
|
281
|
-
"style": "border-collapse:collapse;border-spacing:0"
|
|
282
|
-
}, [vue.createVNode("tbody", null, [newRows])]);
|
|
283
|
-
};
|
|
284
246
|
const headers = vue.ref({
|
|
285
247
|
Authorization: `Bearer ${qxUtil.getCookie(core.CoreConst.TOKEN)}`
|
|
286
248
|
});
|
|
@@ -297,10 +259,10 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
297
259
|
isLoading.value = true;
|
|
298
260
|
};
|
|
299
261
|
const onSuccess = (response, _file, _fileList) => {
|
|
300
|
-
fileName = "";
|
|
262
|
+
fileName.value = "";
|
|
301
263
|
fileid = "";
|
|
302
264
|
if (response.name) {
|
|
303
|
-
fileName = response.name;
|
|
265
|
+
fileName.value = response.name;
|
|
304
266
|
}
|
|
305
267
|
if (response.fileid) {
|
|
306
268
|
fileid = response.fileid;
|
|
@@ -330,29 +292,40 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
330
292
|
});
|
|
331
293
|
}
|
|
332
294
|
}
|
|
333
|
-
ColumnMappingSave.value = false;
|
|
334
295
|
isLoading.value = false;
|
|
335
296
|
watchValue(listValue.value);
|
|
336
297
|
};
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
298
|
+
const columnMappingSaveChange = (data) => {
|
|
299
|
+
ColumnMappingSave.value = data;
|
|
300
|
+
};
|
|
301
|
+
const selectValuesChange = (index, item) => {
|
|
302
|
+
selectValues.value[index] = item;
|
|
303
|
+
};
|
|
304
|
+
const columnMapChange = (key, data) => {
|
|
305
|
+
columnMap.set(key, data);
|
|
306
|
+
};
|
|
307
|
+
const listValueChange = (data) => {
|
|
308
|
+
listValue.value = data;
|
|
309
|
+
};
|
|
310
|
+
const columnMappingListMapChange = (key, data) => {
|
|
311
|
+
if (data) {
|
|
312
|
+
columnMappingListMap.set(key, data);
|
|
313
|
+
} else {
|
|
314
|
+
columnMappingListMap.delete(key);
|
|
315
|
+
}
|
|
341
316
|
};
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
317
|
+
const optionsChange = (str, data) => {
|
|
318
|
+
if (data) {
|
|
319
|
+
const index = options.value.findIndex((obj) => obj.label === str);
|
|
320
|
+
const optionValue = options.value[index];
|
|
321
|
+
Object.keys(data).forEach((key) => {
|
|
322
|
+
optionValue[key] = data[key];
|
|
323
|
+
});
|
|
324
|
+
} else {
|
|
347
325
|
const index = options.value.findIndex((obj) => obj.label === str);
|
|
348
326
|
if (index !== -1) {
|
|
349
327
|
options.value.splice(index, 1);
|
|
350
328
|
}
|
|
351
|
-
columnMappingListMap.delete(str);
|
|
352
|
-
if (listValue.value === str) {
|
|
353
|
-
listValue.value = "";
|
|
354
|
-
}
|
|
355
|
-
select.value.blur();
|
|
356
329
|
}
|
|
357
330
|
};
|
|
358
331
|
return {
|
|
@@ -364,22 +337,28 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
364
337
|
UploadUrl,
|
|
365
338
|
headers,
|
|
366
339
|
onSuccess,
|
|
367
|
-
renderTable,
|
|
368
|
-
renderSelect,
|
|
369
340
|
previewinfo,
|
|
370
341
|
selectValues,
|
|
371
|
-
renderEmpty,
|
|
372
342
|
beforeUpload,
|
|
373
343
|
dataimport2,
|
|
374
344
|
listValue,
|
|
375
345
|
options,
|
|
376
|
-
handleDeleteOption,
|
|
377
346
|
select,
|
|
378
|
-
isNoPersonel
|
|
347
|
+
isNoPersonel,
|
|
348
|
+
fileName,
|
|
349
|
+
dataOption,
|
|
350
|
+
ColumnMappingSave,
|
|
351
|
+
columnMap,
|
|
352
|
+
columnMappingSaveChange,
|
|
353
|
+
selectValuesChange,
|
|
354
|
+
columnMapChange,
|
|
355
|
+
columnMappingListMap,
|
|
356
|
+
listValueChange,
|
|
357
|
+
columnMappingListMapChange,
|
|
358
|
+
optionsChange
|
|
379
359
|
};
|
|
380
360
|
},
|
|
381
361
|
render() {
|
|
382
|
-
let _slot2;
|
|
383
362
|
return vue.withDirectives(vue.createVNode("div", {
|
|
384
363
|
"class": [this.ns.b(), "ibiz-view"],
|
|
385
364
|
"ref": "dataimport2"
|
|
@@ -401,34 +380,22 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
401
380
|
"class": "ibiz-control-toolbar"
|
|
402
381
|
}, [vue.createVNode("div", {
|
|
403
382
|
"class": "ibiz-control-toolbar__item"
|
|
404
|
-
}, [vue.createVNode(vue.resolveComponent("
|
|
405
|
-
"
|
|
406
|
-
"
|
|
407
|
-
"
|
|
408
|
-
"
|
|
409
|
-
"
|
|
410
|
-
"
|
|
411
|
-
"
|
|
412
|
-
},
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}, [vue.createVNode("span", null, [item.label]), vue.createVNode(vue.resolveComponent("el-button"), {
|
|
421
|
-
"text": true,
|
|
422
|
-
"size": "small",
|
|
423
|
-
"onClick": (e) => this.handleDeleteOption(e, item.value),
|
|
424
|
-
"class": this.ns.e("select-option-item-button")
|
|
425
|
-
}, {
|
|
426
|
-
default: () => [vue.createTextVNode("\u5220\u9664")]
|
|
427
|
-
})])
|
|
428
|
-
});
|
|
429
|
-
})) ? _slot2 : {
|
|
430
|
-
default: () => [_slot2]
|
|
431
|
-
})]), vue.createVNode(vue.resolveComponent("el-upload"), {
|
|
383
|
+
}, [this.fileName ? `\u5F53\u524D\u6587\u4EF6\u540D:${this.fileName}` : ""]), this.previewinfo[0] && this.previewinfo[0].length ? vue.createVNode(vue.resolveComponent("data-import2-select"), {
|
|
384
|
+
"previewinfo": this.previewinfo,
|
|
385
|
+
"options": this.options,
|
|
386
|
+
"columnMappingListMap": this.columnMappingListMap,
|
|
387
|
+
"listValue": this.listValue,
|
|
388
|
+
"onListValueChange": this.listValueChange,
|
|
389
|
+
"onColumnMappingListMapChange": this.columnMappingListMapChange,
|
|
390
|
+
"onOptionsChange": this.optionsChange
|
|
391
|
+
}, null) : "", this.previewinfo[0] && this.previewinfo[0].length ? vue.createVNode("div", {
|
|
392
|
+
"class": "ibiz-control-toolbar__item"
|
|
393
|
+
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
394
|
+
"onClick": this.onButtonColumnMappingImportClick,
|
|
395
|
+
"disabled": this.isNoPersonel
|
|
396
|
+
}, {
|
|
397
|
+
default: () => [vue.createTextVNode("\u5BFC\u5165\u6A21\u5F0F\u4FDD\u5B58")]
|
|
398
|
+
})]) : "", vue.createVNode(vue.resolveComponent("el-upload"), {
|
|
432
399
|
"class": "ibiz-control-toolbar__item",
|
|
433
400
|
"action": this.UploadUrl,
|
|
434
401
|
"headers": this.headers,
|
|
@@ -437,25 +404,26 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
437
404
|
"before-upload": this.beforeUpload
|
|
438
405
|
}, {
|
|
439
406
|
default: () => [vue.createVNode(vue.resolveComponent("el-button"), null, {
|
|
440
|
-
default: () => [
|
|
407
|
+
default: () => [this.previewinfo[0] && this.previewinfo[0].length ? "\u91CD\u65B0\u4E0A\u4F20\u6587\u4EF6" : "\u6587\u4EF6\u4E0A\u4F20"]
|
|
441
408
|
})]
|
|
442
|
-
}), vue.createVNode("div", {
|
|
443
|
-
"class": "ibiz-control-toolbar__item"
|
|
444
|
-
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
445
|
-
"onClick": this.onButtonColumnMappingImportClick,
|
|
446
|
-
"disabled": this.isNoPersonel
|
|
447
|
-
}, {
|
|
448
|
-
default: () => [vue.createTextVNode("\u5BFC\u5165\u6A21\u5F0F\u4FDD\u5B58")]
|
|
449
|
-
})]), vue.createVNode("div", {
|
|
409
|
+
}), this.previewinfo[0] && this.previewinfo[0].length ? vue.createVNode("div", {
|
|
450
410
|
"class": "ibiz-control-toolbar__item"
|
|
451
411
|
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
452
412
|
"onClick": this.onButtonImportClick
|
|
453
413
|
}, {
|
|
454
414
|
default: () => [vue.createTextVNode("\u5BFC\u5165")]
|
|
455
|
-
})])])])])]), vue.createVNode("
|
|
456
|
-
"
|
|
457
|
-
|
|
415
|
+
})]) : ""])])])]), vue.createVNode(vue.resolveComponent("data-import2-table"), {
|
|
416
|
+
"previewinfo": this.previewinfo,
|
|
417
|
+
"selectValues": this.selectValues,
|
|
418
|
+
"dataOption": this.dataOption,
|
|
419
|
+
"columnMappingSave": this.ColumnMappingSave,
|
|
420
|
+
"columnMap": this.columnMap,
|
|
421
|
+
"onSelectValuesChange": this.selectValuesChange,
|
|
422
|
+
"onColumnMappingSaveChange": this.columnMappingSaveChange,
|
|
423
|
+
"onColumnMapChange": this.columnMapChange
|
|
424
|
+
}, null)]), [[vue.resolveDirective("loading"), this.isLoading]]);
|
|
458
425
|
}
|
|
459
426
|
});
|
|
460
427
|
|
|
461
428
|
exports.DataImport2 = DataImport2;
|
|
429
|
+
exports.importMapping = importMapping;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-data-import2{display:flex;flex-flow:column nowrap;min-width:644px;height:568px;background:var(--ibiz-color-bg-1)}.ibiz-data-import2__data-import2-toolbar{display:flex;align-items:center;justify-content:space-between}.ibiz-data-import2__data-import2-toolbar-container{display:flex;align-items:center;justify-content:space-between}.ibiz-data-
|
|
1
|
+
.ibiz-data-import2{display:flex;flex-flow:column nowrap;min-width:644px;height:568px;background:var(--ibiz-color-bg-1)}.ibiz-data-import2__data-import2-toolbar{display:flex;align-items:center;justify-content:space-between}.ibiz-data-import2__data-import2-toolbar-container{display:flex;align-items:center;justify-content:space-between}.ibiz-data-import2__select-option-item-button{height:100%}
|