@ibiz-template/vue3-components 0.4.3 → 0.4.4
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-ErDi07y2.js +14 -0
- package/dist/index-ErDi07y2.js.map +1 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-Mxa6HuaG.js → xlsx-util-5UOUTynl.js} +2 -2
- package/dist/{xlsx-util-Mxa6HuaG.js.map → xlsx-util-5UOUTynl.js.map} +1 -1
- 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 +23 -9
- package/es/common/data-import2/data-import2.mjs +120 -159
- 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/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 +91 -53
- package/es/editor/index.mjs +9 -2
- 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 +119 -157
- 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/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 +90 -52
- package/lib/control/tree/tree.css +1 -1
- package/lib/editor/index.cjs +9 -2
- 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 +9 -8
- package/dist/index-1dtzc9-X.js +0 -14
- package/dist/index-1dtzc9-X.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/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
|
@@ -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,17 +45,28 @@ 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) {
|
|
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);
|
|
@@ -77,6 +84,7 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
77
84
|
}
|
|
78
85
|
const keys = [...columnMap.keys()];
|
|
79
86
|
const captionMap = /* @__PURE__ */ new Map();
|
|
87
|
+
clearSelect();
|
|
80
88
|
keys.forEach((item) => {
|
|
81
89
|
const columnMapValue = columnMap.get(item);
|
|
82
90
|
const lastIndex = item.lastIndexOf("-");
|
|
@@ -89,33 +97,29 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
89
97
|
const filteredObjects = columnMapData.filter((columnitem) => columnitem.caption === itemName);
|
|
90
98
|
const newColumnValue = filteredObjects[index];
|
|
91
99
|
if (newColumnValue) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
100
|
+
const dataOptionValue = dataOption.value.find((dataOptionItem) => dataOptionItem.id === newColumnValue.name);
|
|
101
|
+
if (dataOptionValue) {
|
|
102
|
+
captionMap.set(itemName, index + 1);
|
|
103
|
+
newColumnValue.index = columnMapValue.index;
|
|
104
|
+
columnMap.set(item, newColumnValue);
|
|
105
|
+
selectValues.value[newColumnValue.index] = newColumnValue.name;
|
|
106
|
+
}
|
|
96
107
|
}
|
|
97
108
|
});
|
|
98
109
|
} 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
|
-
});
|
|
110
|
+
clearSelect();
|
|
108
111
|
}
|
|
109
112
|
};
|
|
110
113
|
vue.watch(listValue, (newValue, _oldValue) => {
|
|
111
|
-
if (columnMappingSaveName.value !== newValue) {
|
|
112
|
-
ColumnMappingSave.value = false;
|
|
113
|
-
}
|
|
114
|
-
columnMappingSaveName.value = "";
|
|
115
114
|
watchValue(newValue);
|
|
116
115
|
});
|
|
117
116
|
const onButtonColumnMappingImportClick = async () => {
|
|
118
117
|
var _a;
|
|
118
|
+
const string = selectValues.value.join("");
|
|
119
|
+
if (string === "") {
|
|
120
|
+
ibiz.message.warning("\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u6620\u5C04\u5C5E\u6027");
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
119
123
|
if (previewinfo.value[0].length) {
|
|
120
124
|
ColumnMappingSave.value = true;
|
|
121
125
|
const columnMapArr = [...columnMap.values()];
|
|
@@ -123,7 +127,7 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
123
127
|
const data = {
|
|
124
128
|
// schame_tag: '', // 导入模式标记 不传
|
|
125
129
|
// id: '', // 导入模式标识 也不用传
|
|
126
|
-
name: `${fileName.split(".")[0]}|${(/* @__PURE__ */ new Date()).toLocaleString()}`,
|
|
130
|
+
name: `${fileName.value.split(".")[0]}|${(/* @__PURE__ */ new Date()).toLocaleString()}`,
|
|
127
131
|
// 导入模式名称 按照导入的名称|时间来生成
|
|
128
132
|
// order_value: '', // 排序值 也不用传
|
|
129
133
|
fields,
|
|
@@ -133,6 +137,8 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
133
137
|
// 系统标记
|
|
134
138
|
data_entity_tag: props.appDataEntity.codeName,
|
|
135
139
|
// 数据实体标记
|
|
140
|
+
data_entity_tag2: props.appDataEntity.codeName2,
|
|
141
|
+
// 数据实体标记
|
|
136
142
|
import_tag: props.appDataEntity.defaultAppDEDataImportId,
|
|
137
143
|
// 导入标记 导入模型的代码名称
|
|
138
144
|
owner_type: "PERSONAL"
|
|
@@ -140,6 +146,7 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
140
146
|
};
|
|
141
147
|
if (listValue.value) {
|
|
142
148
|
const columnData = columnMappingListMap.get(listValue.value);
|
|
149
|
+
data.name = columnData.name;
|
|
143
150
|
const resput = await importMapping("put", columnData.id, data);
|
|
144
151
|
if (resput.status === 200 && resput.ok) {
|
|
145
152
|
columnMappingListMap.set(listValue.value, resput.data);
|
|
@@ -147,13 +154,16 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
147
154
|
} else {
|
|
148
155
|
options.value.push({
|
|
149
156
|
value: data.name,
|
|
150
|
-
label: data.name
|
|
157
|
+
label: data.name,
|
|
158
|
+
oldLabel: data.name,
|
|
159
|
+
edit: true,
|
|
160
|
+
checkmark: false,
|
|
161
|
+
close: false
|
|
151
162
|
});
|
|
152
163
|
const res = await importMapping("post", "", data);
|
|
153
164
|
if (res.status === 200 && res.ok) {
|
|
154
165
|
columnMappingListMap.set(data.name, res.data);
|
|
155
166
|
}
|
|
156
|
-
columnMappingSaveName.value = data.name;
|
|
157
167
|
listValue.value = data.name;
|
|
158
168
|
}
|
|
159
169
|
} else {
|
|
@@ -162,13 +172,13 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
162
172
|
};
|
|
163
173
|
const onButtonImportClick = async () => {
|
|
164
174
|
if (previewinfo.value[0].length) {
|
|
165
|
-
if (listValue.value) {
|
|
175
|
+
if (listValue.value && ColumnMappingSave.value) {
|
|
166
176
|
const data = columnMappingListMap.get(listValue.value);
|
|
167
177
|
const {
|
|
168
178
|
id
|
|
169
179
|
} = data;
|
|
170
|
-
const dataEntityTag = data.
|
|
171
|
-
const url = `${
|
|
180
|
+
const dataEntityTag = data.data_entity_tag2;
|
|
181
|
+
const url = `${dataEntityTag}/asyncimportdata2?srfimporttag=${props.appDataEntity.defaultAppDEDataImportId}&srfossfileid=${fileid}&srfimportschemaid=${id}`;
|
|
172
182
|
await ibiz.net.request(url, {
|
|
173
183
|
method: "get"
|
|
174
184
|
});
|
|
@@ -206,7 +216,11 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
206
216
|
res.data.forEach((item) => {
|
|
207
217
|
options.value.push({
|
|
208
218
|
value: item.name,
|
|
209
|
-
label: item.name
|
|
219
|
+
label: item.name,
|
|
220
|
+
oldLabel: item.name,
|
|
221
|
+
edit: true,
|
|
222
|
+
checkmark: false,
|
|
223
|
+
close: false
|
|
210
224
|
});
|
|
211
225
|
columnMappingListMap.set(item.name, item);
|
|
212
226
|
});
|
|
@@ -216,71 +230,13 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
216
230
|
var _a;
|
|
217
231
|
const dataImport = (_a = props.appDataEntity.appDEDataImports) == null ? void 0 : _a.find((importItem) => importItem.id === props.appDataEntity.defaultAppDEDataImportId);
|
|
218
232
|
if (dataImport && dataImport.dedataImportItems) {
|
|
219
|
-
dataOption = dataImport.dedataImportItems;
|
|
233
|
+
dataOption.value = dataImport.dedataImportItems;
|
|
220
234
|
} else if (props.appDataEntity.appDEFields) {
|
|
221
|
-
dataOption = props.appDataEntity.appDEFields;
|
|
235
|
+
dataOption.value = props.appDataEntity.appDEFields;
|
|
222
236
|
}
|
|
223
237
|
findDialog(dataimport2.value.parentElement);
|
|
224
238
|
columnMappingListQuery();
|
|
225
239
|
});
|
|
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
240
|
const headers = vue.ref({
|
|
285
241
|
Authorization: `Bearer ${qxUtil.getCookie(core.CoreConst.TOKEN)}`
|
|
286
242
|
});
|
|
@@ -297,10 +253,10 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
297
253
|
isLoading.value = true;
|
|
298
254
|
};
|
|
299
255
|
const onSuccess = (response, _file, _fileList) => {
|
|
300
|
-
fileName = "";
|
|
256
|
+
fileName.value = "";
|
|
301
257
|
fileid = "";
|
|
302
258
|
if (response.name) {
|
|
303
|
-
fileName = response.name;
|
|
259
|
+
fileName.value = response.name;
|
|
304
260
|
}
|
|
305
261
|
if (response.fileid) {
|
|
306
262
|
fileid = response.fileid;
|
|
@@ -330,29 +286,40 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
330
286
|
});
|
|
331
287
|
}
|
|
332
288
|
}
|
|
333
|
-
ColumnMappingSave.value = false;
|
|
334
289
|
isLoading.value = false;
|
|
335
290
|
watchValue(listValue.value);
|
|
336
291
|
};
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
292
|
+
const columnMappingSaveChange = (data) => {
|
|
293
|
+
ColumnMappingSave.value = data;
|
|
294
|
+
};
|
|
295
|
+
const selectValuesChange = (index, item) => {
|
|
296
|
+
selectValues.value[index] = item;
|
|
341
297
|
};
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
298
|
+
const columnMapChange = (key, data) => {
|
|
299
|
+
columnMap.set(key, data);
|
|
300
|
+
};
|
|
301
|
+
const listValueChange = (data) => {
|
|
302
|
+
listValue.value = data;
|
|
303
|
+
};
|
|
304
|
+
const columnMappingListMapChange = (key, data) => {
|
|
305
|
+
if (data) {
|
|
306
|
+
columnMappingListMap.set(key, data);
|
|
307
|
+
} else {
|
|
308
|
+
columnMappingListMap.delete(key);
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
const optionsChange = (str, data) => {
|
|
312
|
+
if (data) {
|
|
313
|
+
const index = options.value.findIndex((obj) => obj.label === str);
|
|
314
|
+
const optionValue = options.value[index];
|
|
315
|
+
Object.keys(data).forEach((key) => {
|
|
316
|
+
optionValue[key] = data[key];
|
|
317
|
+
});
|
|
318
|
+
} else {
|
|
347
319
|
const index = options.value.findIndex((obj) => obj.label === str);
|
|
348
320
|
if (index !== -1) {
|
|
349
321
|
options.value.splice(index, 1);
|
|
350
322
|
}
|
|
351
|
-
columnMappingListMap.delete(str);
|
|
352
|
-
if (listValue.value === str) {
|
|
353
|
-
listValue.value = "";
|
|
354
|
-
}
|
|
355
|
-
select.value.blur();
|
|
356
323
|
}
|
|
357
324
|
};
|
|
358
325
|
return {
|
|
@@ -364,22 +331,28 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
364
331
|
UploadUrl,
|
|
365
332
|
headers,
|
|
366
333
|
onSuccess,
|
|
367
|
-
renderTable,
|
|
368
|
-
renderSelect,
|
|
369
334
|
previewinfo,
|
|
370
335
|
selectValues,
|
|
371
|
-
renderEmpty,
|
|
372
336
|
beforeUpload,
|
|
373
337
|
dataimport2,
|
|
374
338
|
listValue,
|
|
375
339
|
options,
|
|
376
|
-
handleDeleteOption,
|
|
377
340
|
select,
|
|
378
|
-
isNoPersonel
|
|
341
|
+
isNoPersonel,
|
|
342
|
+
fileName,
|
|
343
|
+
dataOption,
|
|
344
|
+
ColumnMappingSave,
|
|
345
|
+
columnMap,
|
|
346
|
+
columnMappingSaveChange,
|
|
347
|
+
selectValuesChange,
|
|
348
|
+
columnMapChange,
|
|
349
|
+
columnMappingListMap,
|
|
350
|
+
listValueChange,
|
|
351
|
+
columnMappingListMapChange,
|
|
352
|
+
optionsChange
|
|
379
353
|
};
|
|
380
354
|
},
|
|
381
355
|
render() {
|
|
382
|
-
let _slot2;
|
|
383
356
|
return vue.withDirectives(vue.createVNode("div", {
|
|
384
357
|
"class": [this.ns.b(), "ibiz-view"],
|
|
385
358
|
"ref": "dataimport2"
|
|
@@ -401,34 +374,22 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
401
374
|
"class": "ibiz-control-toolbar"
|
|
402
375
|
}, [vue.createVNode("div", {
|
|
403
376
|
"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"), {
|
|
377
|
+
}, [this.fileName ? `\u5F53\u524D\u6587\u4EF6\u540D:${this.fileName}` : ""]), this.previewinfo[0] && this.previewinfo[0].length ? vue.createVNode(vue.resolveComponent("data-import2-select"), {
|
|
378
|
+
"previewinfo": this.previewinfo,
|
|
379
|
+
"options": this.options,
|
|
380
|
+
"columnMappingListMap": this.columnMappingListMap,
|
|
381
|
+
"listValue": this.listValue,
|
|
382
|
+
"onListValueChange": this.listValueChange,
|
|
383
|
+
"onColumnMappingListMapChange": this.columnMappingListMapChange,
|
|
384
|
+
"onOptionsChange": this.optionsChange
|
|
385
|
+
}, null) : "", this.previewinfo[0] && this.previewinfo[0].length ? vue.createVNode("div", {
|
|
386
|
+
"class": "ibiz-control-toolbar__item"
|
|
387
|
+
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
388
|
+
"onClick": this.onButtonColumnMappingImportClick,
|
|
389
|
+
"disabled": this.isNoPersonel
|
|
390
|
+
}, {
|
|
391
|
+
default: () => [vue.createTextVNode("\u5BFC\u5165\u6A21\u5F0F\u4FDD\u5B58")]
|
|
392
|
+
})]) : "", vue.createVNode(vue.resolveComponent("el-upload"), {
|
|
432
393
|
"class": "ibiz-control-toolbar__item",
|
|
433
394
|
"action": this.UploadUrl,
|
|
434
395
|
"headers": this.headers,
|
|
@@ -437,25 +398,26 @@ const DataImport2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
437
398
|
"before-upload": this.beforeUpload
|
|
438
399
|
}, {
|
|
439
400
|
default: () => [vue.createVNode(vue.resolveComponent("el-button"), null, {
|
|
440
|
-
default: () => [
|
|
401
|
+
default: () => [this.previewinfo[0] && this.previewinfo[0].length ? "\u91CD\u65B0\u4E0A\u4F20\u6587\u4EF6" : "\u6587\u4EF6\u4E0A\u4F20"]
|
|
441
402
|
})]
|
|
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", {
|
|
403
|
+
}), this.previewinfo[0] && this.previewinfo[0].length ? vue.createVNode("div", {
|
|
450
404
|
"class": "ibiz-control-toolbar__item"
|
|
451
405
|
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
452
406
|
"onClick": this.onButtonImportClick
|
|
453
407
|
}, {
|
|
454
408
|
default: () => [vue.createTextVNode("\u5BFC\u5165")]
|
|
455
|
-
})])])])])]), vue.createVNode("
|
|
456
|
-
"
|
|
457
|
-
|
|
409
|
+
})]) : ""])])])]), vue.createVNode(vue.resolveComponent("data-import2-table"), {
|
|
410
|
+
"previewinfo": this.previewinfo,
|
|
411
|
+
"selectValues": this.selectValues,
|
|
412
|
+
"dataOption": this.dataOption,
|
|
413
|
+
"columnMappingSave": this.ColumnMappingSave,
|
|
414
|
+
"columnMap": this.columnMap,
|
|
415
|
+
"onSelectValuesChange": this.selectValuesChange,
|
|
416
|
+
"onColumnMappingSaveChange": this.columnMappingSaveChange,
|
|
417
|
+
"onColumnMapChange": this.columnMapChange
|
|
418
|
+
}, null)]), [[vue.resolveDirective("loading"), this.isLoading]]);
|
|
458
419
|
}
|
|
459
420
|
});
|
|
460
421
|
|
|
461
422
|
exports.DataImport2 = DataImport2;
|
|
423
|
+
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%}
|