@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.
Files changed (63) hide show
  1. package/dist/index-ErDi07y2.js +14 -0
  2. package/dist/index-ErDi07y2.js.map +1 -0
  3. package/dist/index.min.css +1 -1
  4. package/dist/index.system.min.js +1 -1
  5. package/dist/{xlsx-util-Mxa6HuaG.js → xlsx-util-5UOUTynl.js} +2 -2
  6. package/dist/{xlsx-util-Mxa6HuaG.js.map → xlsx-util-5UOUTynl.js.map} +1 -1
  7. package/es/common/col/col.mjs +0 -3
  8. package/es/common/data-import2/data-import2.css +1 -1
  9. package/es/common/data-import2/data-import2.d.ts +23 -9
  10. package/es/common/data-import2/data-import2.mjs +120 -159
  11. package/es/common/data-import2-select/data-import2-select.css +1 -0
  12. package/es/common/data-import2-select/data-import2-select.d.ts +59 -0
  13. package/es/common/data-import2-select/data-import2-select.mjs +170 -0
  14. package/es/common/data-import2-table/data-import2-table.css +1 -0
  15. package/es/common/data-import2-table/data-import2-table.d.ts +56 -0
  16. package/es/common/data-import2-table/data-import2-table.mjs +104 -0
  17. package/es/common/index.mjs +4 -0
  18. package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +1 -1
  19. package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.provider.mjs +1 -1
  20. package/es/control/grid/row-edit-popover/row-edit-popover.css +1 -1
  21. package/es/control/tree/index.d.ts +1 -0
  22. package/es/control/tree/tree.css +1 -1
  23. package/es/control/tree/tree.d.ts +1 -0
  24. package/es/control/tree/tree.mjs +91 -53
  25. package/es/editor/index.mjs +9 -2
  26. package/es/panel-component/panel-button/panel-button.controller.mjs +4 -1
  27. package/es/view-engine/index-view.engine.d.ts +0 -7
  28. package/es/view-engine/index-view.engine.mjs +0 -37
  29. package/lib/common/col/col.cjs +0 -3
  30. package/lib/common/data-import2/data-import2.cjs +119 -157
  31. package/lib/common/data-import2/data-import2.css +1 -1
  32. package/lib/common/data-import2-select/data-import2-select.cjs +172 -0
  33. package/lib/common/data-import2-select/data-import2-select.css +1 -0
  34. package/lib/common/data-import2-table/data-import2-table.cjs +106 -0
  35. package/lib/common/data-import2-table/data-import2-table.css +1 -0
  36. package/lib/common/index.cjs +4 -0
  37. package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +1 -1
  38. package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.provider.cjs +1 -1
  39. package/lib/control/grid/row-edit-popover/row-edit-popover.css +1 -1
  40. package/lib/control/tree/tree.cjs +90 -52
  41. package/lib/control/tree/tree.css +1 -1
  42. package/lib/editor/index.cjs +9 -2
  43. package/lib/panel-component/panel-button/panel-button.controller.cjs +4 -1
  44. package/lib/view-engine/index-view.engine.cjs +0 -37
  45. package/package.json +9 -8
  46. package/dist/index-1dtzc9-X.js +0 -14
  47. package/dist/index-1dtzc9-X.js.map +0 -1
  48. package/es/_virtual/_commonjs-dynamic-modules.mjs +0 -5
  49. package/es/_virtual/pluralize.mjs +0 -3
  50. 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
  51. 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
  52. 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
  53. 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
  54. 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
  55. package/es/node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.mjs +0 -515
  56. package/lib/_virtual/_commonjs-dynamic-modules.cjs +0 -7
  57. package/lib/_virtual/pluralize.cjs +0 -5
  58. 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
  59. 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
  60. 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
  61. 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
  62. 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
  63. 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
  }
@@ -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('../../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');
10
- var plural = require('../../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');
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
- let dataOption = [];
48
+ const dataOption = vue.ref([]);
53
49
  const dataimport2 = vue.ref();
54
50
  const select = vue.ref();
55
- let fileName = "";
51
+ const fileName = vue.ref("");
56
52
  let fileid = "";
57
- const ColumnMappingSave = vue.ref(false);
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
- captionMap.set(itemName, index + 1);
93
- newColumnValue.index = columnMapValue.index;
94
- columnMap.set(item, newColumnValue);
95
- selectValues.value[newColumnValue.index] = newColumnValue.name;
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
- const keys = [...columnMap.keys()];
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.data_entity_tag;
171
- const url = `${plural.pluralLower(dataEntityTag)}/asyncimportdata2?srfimporttag=${props.appDataEntity.defaultAppDEDataImportId}&srfossfileid=${fileid}&srfimportschemaid=${id}`;
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 renderEmpty = () => {
338
- return vue.createVNode("div", {
339
- "class": ns.e("empty")
340
- }, [vue.createTextVNode("\u6682\u65E0\u6570\u636E")]);
292
+ const columnMappingSaveChange = (data) => {
293
+ ColumnMappingSave.value = data;
294
+ };
295
+ const selectValuesChange = (index, item) => {
296
+ selectValues.value[index] = item;
341
297
  };
342
- const handleDeleteOption = async (e, str) => {
343
- e.stopPropagation();
344
- const columnData = columnMappingListMap.get(str);
345
- const res = await importMapping("delete", columnData.id);
346
- if (res.status === 200 && res.ok) {
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("el-select"), {
405
- "ref": "select",
406
- "modelValue": this.listValue,
407
- "onUpdate:modelValue": ($event) => this.listValue = $event,
408
- "clearable": true,
409
- "placeholder": "\u9009\u62E9\u5BFC\u5165\u6A21\u5F0F",
410
- "disabled": !(this.previewinfo[0] && this.previewinfo[0].length),
411
- "popper-class": this.ns.e("dataimport-select")
412
- }, _isSlot(_slot2 = this.options.map((item) => {
413
- return vue.createVNode(vue.resolveComponent("el-option"), {
414
- "label": item.label,
415
- "value": item.value,
416
- "class": [this.ns.e("select-option")]
417
- }, {
418
- default: () => vue.createVNode("div", {
419
- "class": [this.ns.e("select-option-item")]
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: () => [vue.createTextVNode("\u6587\u4EF6\u4E0A\u4F20")]
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("div", {
456
- "class": [this.ns.e("template-container"), "ibiz-panel-view-content"]
457
- }, [this.previewinfo[0] && this.previewinfo[0].length ? this.renderTable() : this.renderEmpty()])]), [[vue.resolveDirective("loading"), this.isLoading]]);
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-import2__template-container{height:100%}.ibiz-data-import2__empty{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ibiz-data-import2__dataimport-select{margin-top:-5px}.ibiz-data-import2__select{width:100%}.ibiz-data-import2__select-option{padding:0 0 0 20px}.ibiz-data-import2__select-option-item{display:flex;align-items:center;justify-content:center;height:100%}.ibiz-data-import2__select-option-item-button{height:100%}
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%}