cloud-web-corejs 1.0.54-dev.541 → 1.0.54-dev.543
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/package.json +6 -9
- package/src/components/baseAlert/index.vue +23 -19
- package/src/components/baseAlert/mixins.js +61 -1
- package/src/components/{univer → luckysheet}/dialog.vue +61 -32
- package/src/components/luckysheet/export.js +390 -0
- package/src/components/{univer → luckysheet}/index.js +4 -27
- package/src/components/luckysheet/view.vue +298 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1752 -1
- package/src/components/xform/form-render/container-item/data-table-item.vue +6 -1
- package/src/components/xform/form-render/container-item/data-table-mixin.js +37 -21
- package/src/components/xform/form-render/index.vue +1 -7
- package/src/components/xform/form-render/indexMixin.js +3 -3
- package/src/mixins/tableTree/index.js +199 -4
- package/src/router/modules/customer.js +17 -0
- package/src/components/univer/button.vue +0 -57
- package/src/components/univer/univerSheet.vue +0 -200
- package/src/components/xform/form-designer/form-widget/dialog/univerDialog.vue +0 -200
|
@@ -272,7 +272,12 @@
|
|
|
272
272
|
</a>
|
|
273
273
|
</template>
|
|
274
274
|
<template v-else>
|
|
275
|
-
<a
|
|
275
|
+
<a
|
|
276
|
+
class="a-link"
|
|
277
|
+
data-tit="新增"
|
|
278
|
+
@click="addEditRow(null, obj)"
|
|
279
|
+
v-if="widget.options.isTreeTable"
|
|
280
|
+
>
|
|
276
281
|
<el-tooltip
|
|
277
282
|
:enterable="false"
|
|
278
283
|
effect="dark"
|
|
@@ -2359,7 +2359,7 @@ modules = {
|
|
|
2359
2359
|
editDefaultRow = originOption.editDefaultRow || {};
|
|
2360
2360
|
}
|
|
2361
2361
|
}
|
|
2362
|
-
|
|
2362
|
+
|
|
2363
2363
|
// Object.assign(newRow, editDefaultRow, rowData);
|
|
2364
2364
|
newRow.id
|
|
2365
2365
|
= "row_" + new Date().valueOf() + Math.floor(Math.random() * 1000000);
|
|
@@ -2422,20 +2422,19 @@ modules = {
|
|
|
2422
2422
|
removeTreeRow(obj) {
|
|
2423
2423
|
let row = obj.row;
|
|
2424
2424
|
let $grid = this.getGridTable();
|
|
2425
|
-
let childrenField = $grid.treeConfig
|
|
2425
|
+
let childrenField = $grid.treeConfig?.children;
|
|
2426
2426
|
// let tableRows = this.formModel[this.fieldKeyName];
|
|
2427
2427
|
// let index = tableRows.findIndex(item => item.id === row.id)
|
|
2428
2428
|
let delIds = [];
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
item[childrenField]
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
}
|
|
2429
|
+
let loopDo = (item) => {
|
|
2430
|
+
if (item._X_ROW_KEY) delIds.push(item._X_ROW_KEY);
|
|
2431
|
+
if(childrenField && item[childrenField]){
|
|
2432
|
+
item[childrenField].forEach((subItem) => {
|
|
2433
|
+
loopDo(subItem);
|
|
2434
|
+
});
|
|
2435
|
+
}
|
|
2436
|
+
};
|
|
2437
|
+
loopDo(row);
|
|
2439
2438
|
/* delIds.forEach((id) => {
|
|
2440
2439
|
let index = tableRows.findIndex((item) => item.id === id);
|
|
2441
2440
|
let delRow = tableRows[index];
|
|
@@ -2443,8 +2442,20 @@ modules = {
|
|
|
2443
2442
|
this.deleteRowWidgets(delRow);
|
|
2444
2443
|
}); */
|
|
2445
2444
|
let tableRows = this.getValue();
|
|
2446
|
-
let
|
|
2447
|
-
|
|
2445
|
+
let delIndex = []
|
|
2446
|
+
tableRows.map((item,index) => {
|
|
2447
|
+
if(delIds.includes(item._X_ROW_KEY)){
|
|
2448
|
+
delIndex.push(index);
|
|
2449
|
+
}
|
|
2450
|
+
});
|
|
2451
|
+
delIndex.reverse().forEach((index) => {
|
|
2452
|
+
tableRows.splice(index, 1);
|
|
2453
|
+
});
|
|
2454
|
+
|
|
2455
|
+
// $grid.remove(obj.row);
|
|
2456
|
+
|
|
2457
|
+
// let newRows = tableRows.filter((item) => !delIds.includes(item.id));
|
|
2458
|
+
// this.setValue(newRows);
|
|
2448
2459
|
this.$nextTick(() => {
|
|
2449
2460
|
this.handleWbs();
|
|
2450
2461
|
});
|
|
@@ -2454,12 +2465,13 @@ modules = {
|
|
|
2454
2465
|
},
|
|
2455
2466
|
addEditRow(rowData, obj, toEnd, toSibling) {
|
|
2456
2467
|
let isEditTable = this.widget.options.isEditTable || false;
|
|
2468
|
+
let isTreeTable = this.widget.options.isTreeTable || false;
|
|
2457
2469
|
let parent = obj?.row;
|
|
2458
2470
|
let $grid = this.getGridTable();
|
|
2459
2471
|
if (isEditTable && this.hasEditingRow($grid, 1)) {
|
|
2460
2472
|
return false;
|
|
2461
2473
|
}
|
|
2462
|
-
|
|
2474
|
+
|
|
2463
2475
|
let newRow = {};
|
|
2464
2476
|
let originOption = $grid.originOption;
|
|
2465
2477
|
let editDefaultRow;
|
|
@@ -2470,15 +2482,19 @@ modules = {
|
|
|
2470
2482
|
editDefaultRow = originOption.editDefaultRow || {};
|
|
2471
2483
|
}
|
|
2472
2484
|
}
|
|
2473
|
-
|
|
2485
|
+
|
|
2474
2486
|
newRow.id
|
|
2475
|
-
|
|
2476
|
-
if
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2487
|
+
= "row_" + new Date().valueOf() + Math.floor(Math.random() * 1000000);
|
|
2488
|
+
if(isTreeTable){
|
|
2489
|
+
let parentField = $grid.treeConfig.parentField;
|
|
2490
|
+
if (!toSibling) {
|
|
2491
|
+
newRow[parentField] = parent?.id || 0;
|
|
2492
|
+
} else {
|
|
2493
|
+
newRow[parentField] = obj?.row[parentField] || 0;
|
|
2494
|
+
}
|
|
2480
2495
|
}
|
|
2481
2496
|
|
|
2497
|
+
|
|
2482
2498
|
let newData = this.createNewTableData(isEditTable);
|
|
2483
2499
|
newRow = Object.assign({}, newData, newRow, editDefaultRow, rowData);
|
|
2484
2500
|
|
|
@@ -113,7 +113,6 @@
|
|
|
113
113
|
import "./container-item/index";
|
|
114
114
|
import FieldComponents from "../../../components/xform/form-designer/form-widget/field-widget/index";
|
|
115
115
|
import indexMixin from "../../../components/xform/form-render/indexMixin";
|
|
116
|
-
import univerDialog from "../../../components/xform/form-designer/form-widget/dialog/univerDialog.vue";
|
|
117
116
|
|
|
118
117
|
export default {
|
|
119
118
|
name: "VFormRender",
|
|
@@ -134,12 +133,7 @@ export default {
|
|
|
134
133
|
fileReferenceDialog: () =>
|
|
135
134
|
import(
|
|
136
135
|
"../../../components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue"
|
|
137
|
-
)
|
|
138
|
-
univerDialog,
|
|
139
|
-
/* univerDialog: () =>
|
|
140
|
-
import(
|
|
141
|
-
"../../../components/xform/form-designer/form-widget/dialog/univerDialog.vue"
|
|
142
|
-
), */
|
|
136
|
+
)
|
|
143
137
|
},
|
|
144
138
|
mixins: [indexMixin],
|
|
145
139
|
};
|
|
@@ -42,6 +42,7 @@ import JsPDF from "jspdf";
|
|
|
42
42
|
import formulaDialog from "@base/components/xform/form-designer/form-widget/dialog/formulaDialog.vue";
|
|
43
43
|
import baseFormulaDialog from "@base/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue";
|
|
44
44
|
import QRCode from "qrcode";
|
|
45
|
+
import { openLuckysheetDialog } from "@base/components/luckysheet";
|
|
45
46
|
|
|
46
47
|
let modules = {};
|
|
47
48
|
const baseRefUtil = {
|
|
@@ -3715,9 +3716,8 @@ modules = {
|
|
|
3715
3716
|
}
|
|
3716
3717
|
});
|
|
3717
3718
|
},
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
this.showUniverDialog = true;
|
|
3719
|
+
openLuckysheetDialog(option) {
|
|
3720
|
+
openLuckysheetDialog(option);
|
|
3721
3721
|
}
|
|
3722
3722
|
},
|
|
3723
3723
|
};
|