@indfnd/common 1.0.52 → 1.0.56
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/CHANGELOG.md +18 -0
- package/dist/ind-common.es.js +598 -532
- package/dist/ind-common.umd.cjs +62 -62
- package/dist/styles/index.css +1 -1
- package/package.json +2 -2
- package/src/styles/components/upload.less +33 -0
- package/dist/style.css +0 -1
package/dist/ind-common.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Drawer$1, Dropdown as Dropdown$1, Modal as Modal$1, Form, FormItem, Select as Select$1, Option, Row, Col, Menu, MenuItem, Badge, DropdownMenu, DropdownItem, Submenu, Tag, Header, Layout, Content, Spin, Poptip as Poptip$1, CheckboxGroup, Checkbox, RadioGroup, Radio, Card, Message, LoadingBar } from "view-design";
|
|
2
|
-
import { isNil, putOssFileApi, formatDate as formatDate$1, useConfig, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, isFunction, isString, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getPermissionCache, getLocalStorage, getSessionStorage, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, isEqual, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor,
|
|
2
|
+
import { isNil, putOssFileApi, formatDate as formatDate$1, useConfig, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, getPreviewUrlApi, isFunction, isString, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getPermissionCache, getLocalStorage, getSessionStorage, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, isEqual, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, listComTreeApi, listUserTreeApi, UC_ENUM, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, setSessionStorage, getAppListApi, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
|
|
3
3
|
import Vue$1 from "vue";
|
|
4
4
|
const name$1 = "@indfnd/common";
|
|
5
|
-
const version = "1.0.
|
|
5
|
+
const version = "1.0.56";
|
|
6
6
|
const author = "huxuetong";
|
|
7
7
|
const publishConfig = {
|
|
8
8
|
registry: "https://registry.npmjs.org/"
|
|
@@ -62,7 +62,7 @@ const dependencies = {
|
|
|
62
62
|
"xlsx-populate": "^1.11.0"
|
|
63
63
|
};
|
|
64
64
|
const devDependencies = {
|
|
65
|
-
"@indfnd/utils": "^0.1.
|
|
65
|
+
"@indfnd/utils": "^0.1.17",
|
|
66
66
|
"ag-grid-community": "^30.1.0",
|
|
67
67
|
"ag-grid-enterprise": "^30.1.0",
|
|
68
68
|
"ag-grid-vue": "^30.1.0",
|
|
@@ -42966,10 +42966,10 @@ var lodash = { exports: {} };
|
|
|
42966
42966
|
}
|
|
42967
42967
|
}).call(commonjsGlobal);
|
|
42968
42968
|
})(lodash, lodash.exports);
|
|
42969
|
-
var _ = lodash.exports;
|
|
42969
|
+
var _$1 = lodash.exports;
|
|
42970
42970
|
const data_children_transform = (paramData) => {
|
|
42971
42971
|
let result = [];
|
|
42972
|
-
let data = _.cloneDeep(paramData);
|
|
42972
|
+
let data = _$1.cloneDeep(paramData);
|
|
42973
42973
|
for (var a = 0; a < data.length; a++) {
|
|
42974
42974
|
result.push(data[a]);
|
|
42975
42975
|
if ("children" in data[a]) {
|
|
@@ -42979,7 +42979,7 @@ const data_children_transform = (paramData) => {
|
|
|
42979
42979
|
return result;
|
|
42980
42980
|
};
|
|
42981
42981
|
function recursive_children(paramData, result) {
|
|
42982
|
-
let data = _.cloneDeep(paramData);
|
|
42982
|
+
let data = _$1.cloneDeep(paramData);
|
|
42983
42983
|
for (var b = 0; b < data.length; b++) {
|
|
42984
42984
|
result.push(data[b]);
|
|
42985
42985
|
if ("children" in data[b]) {
|
|
@@ -43032,12 +43032,12 @@ const paramHeight = 18;
|
|
|
43032
43032
|
const columnTitleHeight = 18;
|
|
43033
43033
|
const dataRowHeight = 18;
|
|
43034
43034
|
function getAgColumnTitleAndData({ columns, datas }) {
|
|
43035
|
-
var columnsClo = _.cloneDeep(columns);
|
|
43036
|
-
var datasClo = _.cloneDeep(datas);
|
|
43037
|
-
_.remove(columnsClo, (d) => {
|
|
43035
|
+
var columnsClo = _$1.cloneDeep(columns);
|
|
43036
|
+
var datasClo = _$1.cloneDeep(datas);
|
|
43037
|
+
_$1.remove(columnsClo, (d) => {
|
|
43038
43038
|
return d.cellClass.indexOf("button") != -1 || d.cellClass.indexOf("radio") != -1 || d.cellClass.indexOf("checkbox") != -1;
|
|
43039
43039
|
});
|
|
43040
|
-
_.forEach(columnsClo, (d) => {
|
|
43040
|
+
_$1.forEach(columnsClo, (d) => {
|
|
43041
43041
|
var _a;
|
|
43042
43042
|
if (d.cellClass.indexOf("index") != -1) {
|
|
43043
43043
|
d.field = "__seq";
|
|
@@ -43050,7 +43050,7 @@ function getAgColumnTitleAndData({ columns, datas }) {
|
|
|
43050
43050
|
let enumList = ((_a2 = d == null ? void 0 : d.cellRendererParams) == null ? void 0 : _a2.enumList) || [];
|
|
43051
43051
|
let enumData = ((_b = d == null ? void 0 : d.cellRendererParams) == null ? void 0 : _b.enumData) || {};
|
|
43052
43052
|
if (enumList.length) {
|
|
43053
|
-
let v = ((_c = _.find(enumList, { K: dd[d.field] })) == null ? void 0 : _c.V) || dd[d.field];
|
|
43053
|
+
let v = ((_c = _$1.find(enumList, { K: dd[d.field] })) == null ? void 0 : _c.V) || dd[d.field];
|
|
43054
43054
|
dd[d.field] = v;
|
|
43055
43055
|
} else {
|
|
43056
43056
|
dd[d.field] = enumData[dd[d.field]] || dd[d.field];
|
|
@@ -43099,7 +43099,7 @@ function getAgColumnTitleAndData({ columns, datas }) {
|
|
|
43099
43099
|
if (!col.children) {
|
|
43100
43100
|
return 1;
|
|
43101
43101
|
} else {
|
|
43102
|
-
var widthSingle = _.sum(
|
|
43102
|
+
var widthSingle = _$1.sum(
|
|
43103
43103
|
col.children.map((d) => {
|
|
43104
43104
|
return getWidthOfCol(d);
|
|
43105
43105
|
})
|
|
@@ -43108,7 +43108,7 @@ function getAgColumnTitleAndData({ columns, datas }) {
|
|
|
43108
43108
|
return widthSingle;
|
|
43109
43109
|
}
|
|
43110
43110
|
};
|
|
43111
|
-
var width = _.sum(
|
|
43111
|
+
var width = _$1.sum(
|
|
43112
43112
|
columnsClo.map((d) => {
|
|
43113
43113
|
var widthSingle = getWidthOfCol(d);
|
|
43114
43114
|
d.width = widthSingle;
|
|
@@ -43172,7 +43172,7 @@ function getAgColumnTitleAndData({ columns, datas }) {
|
|
|
43172
43172
|
if (d.dataType == "percent") {
|
|
43173
43173
|
return "0.00%";
|
|
43174
43174
|
} else if (scale !== void 0) {
|
|
43175
|
-
return "#,##0." + _.range(scale).fill(0).join("");
|
|
43175
|
+
return "#,##0." + _$1.range(scale).fill(0).join("");
|
|
43176
43176
|
} else {
|
|
43177
43177
|
return d.align == "rightNum" ? "#,##0.0000" : d.align == "right" ? "#,##0.00" : "";
|
|
43178
43178
|
}
|
|
@@ -43208,14 +43208,14 @@ var rowSpanExcelInfos = [];
|
|
|
43208
43208
|
function initRowSpanInfos(options) {
|
|
43209
43209
|
if (!!options.rowSpanColumns) {
|
|
43210
43210
|
let calcRowSpan = function(colId, followCol) {
|
|
43211
|
-
var colIdx = _.findIndex(options.columns, { field: colId });
|
|
43211
|
+
var colIdx = _$1.findIndex(options.columns, { field: colId });
|
|
43212
43212
|
if (!!rowSpanRlt[colId]) {
|
|
43213
43213
|
return;
|
|
43214
43214
|
}
|
|
43215
43215
|
var rowSpansTmp = [];
|
|
43216
43216
|
var curVal = "CUR_VAL";
|
|
43217
43217
|
var firstCurRow = {};
|
|
43218
|
-
_.forEach(options.datas, function(d, idx) {
|
|
43218
|
+
_$1.forEach(options.datas, function(d, idx) {
|
|
43219
43219
|
var isFirstRow = !followCol ? d[colId] != curVal : d[colId] != curVal || idx == (rowTmpMapping["" + idx] || {}).first;
|
|
43220
43220
|
if (isFirstRow) {
|
|
43221
43221
|
if (!followCol && firstCurRow.first !== void 0) {
|
|
@@ -43250,7 +43250,7 @@ function initRowSpanInfos(options) {
|
|
|
43250
43250
|
}
|
|
43251
43251
|
});
|
|
43252
43252
|
rowSpanRlt[colId] = rowSpansTmp;
|
|
43253
|
-
_.forEach(rowSpansTmp, function(row, idx) {
|
|
43253
|
+
_$1.forEach(rowSpansTmp, function(row, idx) {
|
|
43254
43254
|
if (row.rowSpan > 1) {
|
|
43255
43255
|
rowSpanExcelInfos.push({
|
|
43256
43256
|
mergeRowS: idx,
|
|
@@ -43267,7 +43267,7 @@ function initRowSpanInfos(options) {
|
|
|
43267
43267
|
var rowSpanRlt = {};
|
|
43268
43268
|
var rowTmpMapping = {};
|
|
43269
43269
|
calcRowSpan(options.rowSpanIndexCol);
|
|
43270
|
-
_.forEach(options.rowSpanColumns, function(col) {
|
|
43270
|
+
_$1.forEach(options.rowSpanColumns, function(col) {
|
|
43271
43271
|
calcRowSpan(col, true);
|
|
43272
43272
|
});
|
|
43273
43273
|
}
|
|
@@ -43276,14 +43276,14 @@ function initRowSpanInfosNew(options) {
|
|
|
43276
43276
|
if (!!options.rowSpanDefs) {
|
|
43277
43277
|
let calcRowSpan = function(colId, followCol) {
|
|
43278
43278
|
let rowTmpMapping = followCol ? rowTmpMappingByColId[followCol] : rowTmpMappingByColId[colId] || (rowTmpMappingByColId[colId] = {});
|
|
43279
|
-
var colIdx = _.findIndex(options.columns, { field: colId });
|
|
43279
|
+
var colIdx = _$1.findIndex(options.columns, { field: colId });
|
|
43280
43280
|
if (!!rowSpanRlt[colId]) {
|
|
43281
43281
|
return;
|
|
43282
43282
|
}
|
|
43283
43283
|
var rowSpansTmp = [];
|
|
43284
43284
|
var curVal = "CUR_VAL";
|
|
43285
43285
|
var firstCurRow = {};
|
|
43286
|
-
_.forEach(options.datas, function(d, idx) {
|
|
43286
|
+
_$1.forEach(options.datas, function(d, idx) {
|
|
43287
43287
|
var isFirstRow = !followCol ? d[colId] != curVal : d[colId] != curVal || idx == (rowTmpMapping["" + idx] || {}).first;
|
|
43288
43288
|
if (isFirstRow) {
|
|
43289
43289
|
if (!followCol && firstCurRow.first !== void 0) {
|
|
@@ -43319,7 +43319,7 @@ function initRowSpanInfosNew(options) {
|
|
|
43319
43319
|
});
|
|
43320
43320
|
rowSpanRlt[colId] = rowSpansTmp;
|
|
43321
43321
|
if (colIdx != -1) {
|
|
43322
|
-
_.forEach(rowSpansTmp, function(row, idx) {
|
|
43322
|
+
_$1.forEach(rowSpansTmp, function(row, idx) {
|
|
43323
43323
|
if (row.rowSpan > 1) {
|
|
43324
43324
|
rowSpanExcelInfos.push({
|
|
43325
43325
|
mergeRowS: idx,
|
|
@@ -43331,13 +43331,13 @@ function initRowSpanInfosNew(options) {
|
|
|
43331
43331
|
});
|
|
43332
43332
|
}
|
|
43333
43333
|
};
|
|
43334
|
-
let rowSpanDefs = _.cloneDeep(options.rowSpanDefs);
|
|
43335
|
-
_.forEach(rowSpanDefs, (colDef) => {
|
|
43334
|
+
let rowSpanDefs = _$1.cloneDeep(options.rowSpanDefs);
|
|
43335
|
+
_$1.forEach(rowSpanDefs, (colDef) => {
|
|
43336
43336
|
colDef.followCol = colDef.followCol || colDef.field;
|
|
43337
43337
|
});
|
|
43338
43338
|
var rowSpanRlt = {};
|
|
43339
43339
|
var rowTmpMappingByColId = {};
|
|
43340
|
-
_.forEach(rowSpanDefs, function(col) {
|
|
43340
|
+
_$1.forEach(rowSpanDefs, function(col) {
|
|
43341
43341
|
calcRowSpan(col.field, col.field !== col.followCol ? col.followCol : null);
|
|
43342
43342
|
});
|
|
43343
43343
|
}
|
|
@@ -43425,7 +43425,7 @@ function exportJsonToExcel(excelData) {
|
|
|
43425
43425
|
}
|
|
43426
43426
|
if (!!excelData.rowSpanDefs) {
|
|
43427
43427
|
initRowSpanInfosNew({ ...excelData, columns: calcExportDatas.columnsCalc });
|
|
43428
|
-
_.forEach(rowSpanExcelInfos, function(rowSpanInfo) {
|
|
43428
|
+
_$1.forEach(rowSpanExcelInfos, function(rowSpanInfo) {
|
|
43429
43429
|
var columnTitleRange = sheet.range(
|
|
43430
43430
|
rowSpanInfo.mergeRowS + rowsNow,
|
|
43431
43431
|
rowSpanInfo.megerColS + 1,
|
|
@@ -43436,7 +43436,7 @@ function exportJsonToExcel(excelData) {
|
|
|
43436
43436
|
});
|
|
43437
43437
|
} else if (!!excelData.rowSpanColumns) {
|
|
43438
43438
|
initRowSpanInfos({ ...excelData, columns: calcExportDatas.columnsCalc });
|
|
43439
|
-
_.forEach(rowSpanExcelInfos, function(rowSpanInfo) {
|
|
43439
|
+
_$1.forEach(rowSpanExcelInfos, function(rowSpanInfo) {
|
|
43440
43440
|
var columnTitleRange = sheet.range(
|
|
43441
43441
|
rowSpanInfo.mergeRowS + rowsNow,
|
|
43442
43442
|
rowSpanInfo.megerColS + 1,
|
|
@@ -43466,122 +43466,127 @@ function exportJsonToExcel(excelData) {
|
|
|
43466
43466
|
}).catch((err) => console.log(err));
|
|
43467
43467
|
}
|
|
43468
43468
|
function previewJsonToExcel(excelData) {
|
|
43469
|
-
|
|
43470
|
-
|
|
43471
|
-
|
|
43472
|
-
|
|
43473
|
-
|
|
43474
|
-
|
|
43475
|
-
|
|
43476
|
-
|
|
43477
|
-
|
|
43478
|
-
|
|
43479
|
-
|
|
43480
|
-
|
|
43481
|
-
|
|
43482
|
-
|
|
43483
|
-
|
|
43484
|
-
|
|
43485
|
-
|
|
43486
|
-
|
|
43487
|
-
|
|
43488
|
-
|
|
43489
|
-
|
|
43490
|
-
|
|
43491
|
-
|
|
43492
|
-
|
|
43493
|
-
|
|
43494
|
-
|
|
43495
|
-
|
|
43496
|
-
|
|
43497
|
-
|
|
43498
|
-
|
|
43499
|
-
|
|
43500
|
-
|
|
43501
|
-
|
|
43502
|
-
|
|
43503
|
-
|
|
43504
|
-
|
|
43505
|
-
|
|
43506
|
-
|
|
43507
|
-
|
|
43508
|
-
|
|
43509
|
-
|
|
43510
|
-
|
|
43511
|
-
|
|
43512
|
-
|
|
43513
|
-
|
|
43514
|
-
|
|
43515
|
-
|
|
43516
|
-
|
|
43517
|
-
|
|
43518
|
-
|
|
43519
|
-
|
|
43520
|
-
|
|
43521
|
-
|
|
43522
|
-
|
|
43523
|
-
var
|
|
43524
|
-
|
|
43525
|
-
|
|
43526
|
-
|
|
43527
|
-
|
|
43528
|
-
|
|
43529
|
-
|
|
43530
|
-
|
|
43531
|
-
} else if (columnType[j] === "s" && lineData[j]) {
|
|
43532
|
-
sheet.cell(rowsNow + i, j + 1).value(lineData[j]);
|
|
43533
|
-
dataCellStyle.numberFormat = "";
|
|
43534
|
-
} else {
|
|
43535
|
-
if (columnType[j] === "p" || columnType[j] === "n") {
|
|
43469
|
+
return new Promise((resolve, reject) => {
|
|
43470
|
+
var calcExportDatas = getAgColumnTitleAndData(excelData);
|
|
43471
|
+
var fileId = "";
|
|
43472
|
+
console.log("calcExportDatas", calcExportDatas);
|
|
43473
|
+
var title = excelData.title;
|
|
43474
|
+
var titleDeepth = calcExportDatas.deepth;
|
|
43475
|
+
var columnAlign = excelData.columnAlign || calcExportDatas.columnAlign;
|
|
43476
|
+
var columnType = excelData.columnType || calcExportDatas.columnType;
|
|
43477
|
+
var columnTitle = calcExportDatas.columnTitle;
|
|
43478
|
+
var columnWidth = excelData.columnWidth || calcExportDatas.columnWidth;
|
|
43479
|
+
var columnCount = columnAlign.length;
|
|
43480
|
+
var paramLeft = excelData.paramLeft;
|
|
43481
|
+
var paramRight = excelData.paramRight;
|
|
43482
|
+
var jsonData = calcExportDatas.exportData;
|
|
43483
|
+
var numberFormat = excelData.numberFormat || calcExportDatas.numberFormat;
|
|
43484
|
+
XlsxPopulate.fromBlankAsync().then((workbook) => {
|
|
43485
|
+
var sheet = workbook.sheet("Sheet1");
|
|
43486
|
+
for (var i = 0; i < columnCount; i++) {
|
|
43487
|
+
sheet.column(i + 1).width(columnWidth[i] == 0 ? 10 : columnWidth[i]);
|
|
43488
|
+
}
|
|
43489
|
+
var titleRange = sheet.range(1, 1, 1, columnCount);
|
|
43490
|
+
titleRange.merged(true);
|
|
43491
|
+
titleRange.style(titleStyle);
|
|
43492
|
+
titleRange.cell(0, 0).value(title);
|
|
43493
|
+
sheet.row(1).height(titleHeight);
|
|
43494
|
+
var rowsNow = 2;
|
|
43495
|
+
if (!!excelData.paramLeft || !!excelData.paramRight) {
|
|
43496
|
+
var paramLeftRange = sheet.range(2, 1, 2, Math.round(columnCount / 2));
|
|
43497
|
+
paramLeftRange.cell(0, 0).value(paramLeft || "");
|
|
43498
|
+
paramLeftRange.merged(true);
|
|
43499
|
+
paramLeftRange.style(paramLeftStyle);
|
|
43500
|
+
var paramRightRange = sheet.range(2, Math.round(columnCount / 2) + 1, 2, columnCount);
|
|
43501
|
+
paramRightRange.cell(0, 0).value(paramRight || "");
|
|
43502
|
+
paramRightRange.merged(true);
|
|
43503
|
+
paramRightRange.style(paramRightStyle);
|
|
43504
|
+
sheet.row(2).height(paramHeight);
|
|
43505
|
+
rowsNow += 1;
|
|
43506
|
+
}
|
|
43507
|
+
columnTitle.forEach((d) => {
|
|
43508
|
+
var _a;
|
|
43509
|
+
var columnTitleRange = sheet.range(
|
|
43510
|
+
d.srow + rowsNow - 1,
|
|
43511
|
+
d.scol,
|
|
43512
|
+
d.erow + rowsNow - 1,
|
|
43513
|
+
d.ecol
|
|
43514
|
+
);
|
|
43515
|
+
columnTitleRange.merged(true);
|
|
43516
|
+
columnTitleRange.style(columnTitleStyle);
|
|
43517
|
+
columnTitleRange.cell(0, 0).value((_a = d.text) == null ? void 0 : _a.replace(/<br\/>/g, ""));
|
|
43518
|
+
});
|
|
43519
|
+
for (let i2 = 0; i2 < titleDeepth; i2++) {
|
|
43520
|
+
sheet.row(rowsNow + i2).height(columnTitleHeight);
|
|
43521
|
+
}
|
|
43522
|
+
rowsNow += titleDeepth;
|
|
43523
|
+
for (var i = 0; i < jsonData.length; i++) {
|
|
43524
|
+
var lineData = jsonData[i];
|
|
43525
|
+
for (var j = 0; j < lineData.length; j++) {
|
|
43526
|
+
if (columnType[j] === "p" && lineData[j]) {
|
|
43527
|
+
sheet.cell(rowsNow + i, j + 1).value(parseFloat(lineData[j] / 100));
|
|
43528
|
+
dataCellStyle.numberFormat = numberFormat[j];
|
|
43529
|
+
} else if (columnType[j] === "n" && lineData[j]) {
|
|
43530
|
+
sheet.cell(rowsNow + i, j + 1).value(parseFloat(lineData[j]));
|
|
43536
43531
|
dataCellStyle.numberFormat = numberFormat[j];
|
|
43532
|
+
} else if (columnType[j] === "s" && lineData[j]) {
|
|
43533
|
+
sheet.cell(rowsNow + i, j + 1).value(lineData[j]);
|
|
43534
|
+
dataCellStyle.numberFormat = "";
|
|
43537
43535
|
} else {
|
|
43538
|
-
|
|
43536
|
+
if (columnType[j] === "p" || columnType[j] === "n") {
|
|
43537
|
+
dataCellStyle.numberFormat = numberFormat[j];
|
|
43538
|
+
} else {
|
|
43539
|
+
sheet.cell(rowsNow + i, j + 1).value("");
|
|
43540
|
+
}
|
|
43539
43541
|
}
|
|
43542
|
+
dataCellStyle.horizontalAlignment = columnAlign[j];
|
|
43543
|
+
sheet.cell(rowsNow + i, j + 1).style(dataCellStyle);
|
|
43540
43544
|
}
|
|
43541
|
-
|
|
43542
|
-
|
|
43545
|
+
if (excelData.rowColor && i % 2 != 0) {
|
|
43546
|
+
var row = sheet.range(rowsNow + i, 1, rowsNow + i, columnCount);
|
|
43547
|
+
row.style({ fill: "f8f8f9" });
|
|
43548
|
+
}
|
|
43549
|
+
sheet.row(rowsNow + i).height(dataRowHeight);
|
|
43543
43550
|
}
|
|
43544
|
-
if (excelData.
|
|
43545
|
-
|
|
43546
|
-
|
|
43551
|
+
if (!!excelData.rowSpanDefs) {
|
|
43552
|
+
initRowSpanInfosNew({ ...excelData, columns: calcExportDatas.columnsCalc });
|
|
43553
|
+
_$1.forEach(rowSpanExcelInfos, function(rowSpanInfo) {
|
|
43554
|
+
var columnTitleRange = sheet.range(
|
|
43555
|
+
rowSpanInfo.mergeRowS + rowsNow,
|
|
43556
|
+
rowSpanInfo.megerColS + 1,
|
|
43557
|
+
rowSpanInfo.mergeRowE + rowsNow,
|
|
43558
|
+
rowSpanInfo.megerColE + 1
|
|
43559
|
+
);
|
|
43560
|
+
columnTitleRange.merged(true);
|
|
43561
|
+
});
|
|
43562
|
+
} else if (!!excelData.rowSpanColumns) {
|
|
43563
|
+
initRowSpanInfos({ ...excelData, columns: calcExportDatas.columnsCalc });
|
|
43564
|
+
_$1.forEach(rowSpanExcelInfos, function(rowSpanInfo) {
|
|
43565
|
+
var columnTitleRange = sheet.range(
|
|
43566
|
+
rowSpanInfo.mergeRowS + rowsNow,
|
|
43567
|
+
rowSpanInfo.megerColS + 1,
|
|
43568
|
+
rowSpanInfo.mergeRowE + rowsNow,
|
|
43569
|
+
rowSpanInfo.megerColE + 1
|
|
43570
|
+
);
|
|
43571
|
+
columnTitleRange.merged(true);
|
|
43572
|
+
});
|
|
43547
43573
|
}
|
|
43548
|
-
|
|
43549
|
-
|
|
43550
|
-
|
|
43551
|
-
|
|
43552
|
-
|
|
43553
|
-
|
|
43554
|
-
|
|
43555
|
-
|
|
43556
|
-
|
|
43557
|
-
|
|
43558
|
-
);
|
|
43559
|
-
columnTitleRange.merged(true);
|
|
43560
|
-
});
|
|
43561
|
-
} else if (!!excelData.rowSpanColumns) {
|
|
43562
|
-
initRowSpanInfos({ ...excelData, columns: calcExportDatas.columnsCalc });
|
|
43563
|
-
_.forEach(rowSpanExcelInfos, function(rowSpanInfo) {
|
|
43564
|
-
var columnTitleRange = sheet.range(
|
|
43565
|
-
rowSpanInfo.mergeRowS + rowsNow,
|
|
43566
|
-
rowSpanInfo.megerColS + 1,
|
|
43567
|
-
rowSpanInfo.mergeRowE + rowsNow,
|
|
43568
|
-
rowSpanInfo.megerColE + 1
|
|
43569
|
-
);
|
|
43570
|
-
columnTitleRange.merged(true);
|
|
43574
|
+
if (excelData.leftColumns || excelData.topRows) {
|
|
43575
|
+
sheet.freezePanes(excelData.leftColumns || 0, (excelData.topRows || 0) + rowsNow - 1);
|
|
43576
|
+
}
|
|
43577
|
+
workbook.outputAsync().then(async function(blob) {
|
|
43578
|
+
const timestamp = new Date().getTime();
|
|
43579
|
+
const filename = `${timestamp}.xlsx`;
|
|
43580
|
+
const { data } = await putOssFileApi(filename, blob);
|
|
43581
|
+
console.log("data is --111111", data);
|
|
43582
|
+
fileId = (data == null ? void 0 : data[0].fileId) || "";
|
|
43583
|
+
resolve(fileId);
|
|
43571
43584
|
});
|
|
43572
|
-
}
|
|
43573
|
-
|
|
43574
|
-
|
|
43575
|
-
}
|
|
43576
|
-
workbook.outputAsync().then(async function(blob) {
|
|
43577
|
-
const timestamp = new Date().getTime();
|
|
43578
|
-
const filename = `${timestamp}.xlsx`;
|
|
43579
|
-
const { data } = await putOssFileApi(filename, blob);
|
|
43580
|
-
console.log("data is --111111", data);
|
|
43581
|
-
(data == null ? void 0 : data[0].fileId) || "";
|
|
43585
|
+
}).catch((err) => {
|
|
43586
|
+
console.log(err);
|
|
43587
|
+
reject(err);
|
|
43582
43588
|
});
|
|
43583
|
-
})
|
|
43584
|
-
return previewUrl;
|
|
43589
|
+
});
|
|
43585
43590
|
}
|
|
43586
43591
|
var dayjs_min = { exports: {} };
|
|
43587
43592
|
(function(module2, exports2) {
|
|
@@ -43876,9 +43881,9 @@ var dayjs_min = { exports: {} };
|
|
|
43876
43881
|
var dayjs = dayjs_min.exports;
|
|
43877
43882
|
const isDev = false;
|
|
43878
43883
|
var config = useConfig(isDev);
|
|
43879
|
-
_.isObject;
|
|
43880
|
-
_.now;
|
|
43881
|
-
_.toNumber;
|
|
43884
|
+
_$1.isObject;
|
|
43885
|
+
_$1.now;
|
|
43886
|
+
_$1.toNumber;
|
|
43882
43887
|
const EventBus = new Vue$1();
|
|
43883
43888
|
const doCustomTimes = (times, callback) => {
|
|
43884
43889
|
let i = -1;
|
|
@@ -44089,6 +44094,21 @@ let transferIndex = 1e3;
|
|
|
44089
44094
|
function transferIncrease() {
|
|
44090
44095
|
transferIndex++;
|
|
44091
44096
|
}
|
|
44097
|
+
const addScript = function(src, cb) {
|
|
44098
|
+
const script = document.createElement("script");
|
|
44099
|
+
script.src = src;
|
|
44100
|
+
document.getElementsByTagName("head")[0].appendChild(script);
|
|
44101
|
+
script.onload = function() {
|
|
44102
|
+
if (!!cb) {
|
|
44103
|
+
cb();
|
|
44104
|
+
}
|
|
44105
|
+
};
|
|
44106
|
+
};
|
|
44107
|
+
function initWps() {
|
|
44108
|
+
addScript(
|
|
44109
|
+
`${location.protocol}//${location.host}/ind-uc-ext/vendor/openSDK-0.0.6/open-jssdk-v0.0.6.umd.js`
|
|
44110
|
+
);
|
|
44111
|
+
}
|
|
44092
44112
|
var render$1r = function() {
|
|
44093
44113
|
var _vm = this;
|
|
44094
44114
|
var _h = _vm.$createElement;
|
|
@@ -48061,7 +48081,7 @@ const __vue2_script$1r = {
|
|
|
48061
48081
|
return this.type === "datetime" ? "YYYY-MM-DD HH:mm" : null;
|
|
48062
48082
|
},
|
|
48063
48083
|
useOptions() {
|
|
48064
|
-
const options = _.cloneDeep(this.options || {});
|
|
48084
|
+
const options = _$1.cloneDeep(this.options || {});
|
|
48065
48085
|
const minDate = this.minDate;
|
|
48066
48086
|
const maxDate = this.maxDate;
|
|
48067
48087
|
if (!options.disabledDate && (minDate || maxDate)) {
|
|
@@ -48715,19 +48735,19 @@ var FormImpl = {
|
|
|
48715
48735
|
formEnumData: Object
|
|
48716
48736
|
},
|
|
48717
48737
|
created() {
|
|
48718
|
-
this.form = _.cloneDeep(this.value);
|
|
48738
|
+
this.form = _$1.cloneDeep(this.value);
|
|
48719
48739
|
this.initDictData();
|
|
48720
48740
|
this.rules = this.ruleValidate;
|
|
48721
48741
|
},
|
|
48722
48742
|
computed: {
|
|
48723
48743
|
labelWidthCalc() {
|
|
48724
|
-
let titlesSize = _.map(this.fieldList, (d) => d.title.length);
|
|
48725
|
-
let labelWidthCalc = Math.min(Math.max(100, _.max(titlesSize) * 14 + 24), 200);
|
|
48744
|
+
let titlesSize = _$1.map(this.fieldList, (d) => d.title.length);
|
|
48745
|
+
let labelWidthCalc = Math.min(Math.max(100, _$1.max(titlesSize) * 14 + 24), 200);
|
|
48726
48746
|
return labelWidthCalc;
|
|
48727
48747
|
},
|
|
48728
48748
|
ruleValidate() {
|
|
48729
48749
|
let validateList = {};
|
|
48730
|
-
_.forEach(this.fieldList, (d) => {
|
|
48750
|
+
_$1.forEach(this.fieldList, (d) => {
|
|
48731
48751
|
var _a, _b;
|
|
48732
48752
|
const required = d.required instanceof Function ? d.required(this.form) : d.required;
|
|
48733
48753
|
if (required) {
|
|
@@ -48829,7 +48849,7 @@ var FormImpl = {
|
|
|
48829
48849
|
value: {
|
|
48830
48850
|
deep: true,
|
|
48831
48851
|
handler() {
|
|
48832
|
-
this.form = _.cloneDeep(this.value);
|
|
48852
|
+
this.form = _$1.cloneDeep(this.value);
|
|
48833
48853
|
}
|
|
48834
48854
|
},
|
|
48835
48855
|
ruleValidateStr: async function ruleValidateStrChange() {
|
|
@@ -48856,7 +48876,7 @@ var FormImpl = {
|
|
|
48856
48876
|
async getDictData() {
|
|
48857
48877
|
const result = await getDictMapApi(this.enumList);
|
|
48858
48878
|
let enumDataRlt = {};
|
|
48859
|
-
_.forEach(result, (v, k) => {
|
|
48879
|
+
_$1.forEach(result, (v, k) => {
|
|
48860
48880
|
enumDataRlt[k] = {
|
|
48861
48881
|
enumData: v.data,
|
|
48862
48882
|
enumList: v.renderData
|
|
@@ -48879,11 +48899,11 @@ var FormImpl = {
|
|
|
48879
48899
|
let spanList;
|
|
48880
48900
|
let searchSpan = window.innerWidth < SMALLWIDTHLIMIT() ? 8 : 6;
|
|
48881
48901
|
let showMorePosition = window.innerWidth < SMALLWIDTHLIMIT() ? 2 : 3;
|
|
48882
|
-
spanList = _.fill(
|
|
48883
|
-
_.range(this.fieldList.length),
|
|
48902
|
+
spanList = _$1.fill(
|
|
48903
|
+
_$1.range(this.fieldList.length),
|
|
48884
48904
|
this.formType == "search" ? searchSpan : this.defaultSpan
|
|
48885
48905
|
);
|
|
48886
|
-
_.forEach(this.fieldList, (d, idx) => {
|
|
48906
|
+
_$1.forEach(this.fieldList, (d, idx) => {
|
|
48887
48907
|
var _a, _b;
|
|
48888
48908
|
if (d.span) {
|
|
48889
48909
|
spanList[idx] = d.span;
|
|
@@ -48898,7 +48918,7 @@ var FormImpl = {
|
|
|
48898
48918
|
});
|
|
48899
48919
|
if (this.formType !== "search") {
|
|
48900
48920
|
let spanCount = 0;
|
|
48901
|
-
_.forEach(spanList, (d, idx) => {
|
|
48921
|
+
_$1.forEach(spanList, (d, idx) => {
|
|
48902
48922
|
if (spanCount != 0 && d != this.defaultSpan && d !== 0) {
|
|
48903
48923
|
if ((spanCount + d) % 24 != 0) {
|
|
48904
48924
|
spanList[idx - 1] = spanList[idx - 1] + 24 - spanCount;
|
|
@@ -48912,7 +48932,7 @@ var FormImpl = {
|
|
|
48912
48932
|
}
|
|
48913
48933
|
});
|
|
48914
48934
|
}
|
|
48915
|
-
_.forEach(this.fieldList, (d, idx) => {
|
|
48935
|
+
_$1.forEach(this.fieldList, (d, idx) => {
|
|
48916
48936
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
48917
48937
|
let itemInner;
|
|
48918
48938
|
if (d.render) {
|
|
@@ -49948,7 +49968,7 @@ const __vue2_script$1k = {
|
|
|
49948
49968
|
},
|
|
49949
49969
|
computed: {
|
|
49950
49970
|
fieldListCalc() {
|
|
49951
|
-
let fieldList = _.cloneDeep(this.fieldList);
|
|
49971
|
+
let fieldList = _$1.cloneDeep(this.fieldList);
|
|
49952
49972
|
fieldList.unshift({
|
|
49953
49973
|
title: "\u9884\u7F6E\u6807\u9898",
|
|
49954
49974
|
type: "input",
|
|
@@ -49962,9 +49982,9 @@ const __vue2_script$1k = {
|
|
|
49962
49982
|
let cacheData = localStorage.getItem("condition-cache" + this.funId);
|
|
49963
49983
|
if (cacheData) {
|
|
49964
49984
|
this.datas = JSON.parse(cacheData);
|
|
49965
|
-
let defaultItem = _.find(this.datas, { isDefault: "1" });
|
|
49985
|
+
let defaultItem = _$1.find(this.datas, { isDefault: "1" });
|
|
49966
49986
|
if (defaultItem && defaultItem.id) {
|
|
49967
|
-
this.$emit("defaultCacheDone", _.cloneDeep(defaultItem));
|
|
49987
|
+
this.$emit("defaultCacheDone", _$1.cloneDeep(defaultItem));
|
|
49968
49988
|
}
|
|
49969
49989
|
} else {
|
|
49970
49990
|
this.datas = [];
|
|
@@ -49978,19 +49998,19 @@ const __vue2_script$1k = {
|
|
|
49978
49998
|
methods: {
|
|
49979
49999
|
setDefaultItem(item2) {
|
|
49980
50000
|
let oldDefault = item2.isDefault;
|
|
49981
|
-
_.forEach(this.datas, (d) => d.isDefault = "0");
|
|
50001
|
+
_$1.forEach(this.datas, (d) => d.isDefault = "0");
|
|
49982
50002
|
item2.isDefault = oldDefault == "1" ? "0" : "1";
|
|
49983
|
-
let datasTmp = _.cloneDeep(this.datas);
|
|
50003
|
+
let datasTmp = _$1.cloneDeep(this.datas);
|
|
49984
50004
|
this.datas = datasTmp;
|
|
49985
50005
|
this.syncToStorage();
|
|
49986
50006
|
},
|
|
49987
50007
|
useItem(item2) {
|
|
49988
|
-
this.$emit("useItem", _.cloneDeep(item2));
|
|
50008
|
+
this.$emit("useItem", _$1.cloneDeep(item2));
|
|
49989
50009
|
this.$emit("input", false);
|
|
49990
50010
|
console.log("useItem", item2);
|
|
49991
50011
|
},
|
|
49992
50012
|
editItem(item2) {
|
|
49993
|
-
this.editData = _.cloneDeep(item2);
|
|
50013
|
+
this.editData = _$1.cloneDeep(item2);
|
|
49994
50014
|
console.log("editItem", this.editData);
|
|
49995
50015
|
this.$refs.editForm.resetFields();
|
|
49996
50016
|
this.showEdit = true;
|
|
@@ -50007,7 +50027,7 @@ const __vue2_script$1k = {
|
|
|
50007
50027
|
} else if (["treeselect"].includes(field.type)) {
|
|
50008
50028
|
return v == null ? void 0 : v.map((d) => d.title).join("\u3001");
|
|
50009
50029
|
} else if (["select", "checkbox", "radio"].includes(field.type)) {
|
|
50010
|
-
let enumTmp = _.reduce(
|
|
50030
|
+
let enumTmp = _$1.reduce(
|
|
50011
50031
|
field.enumList || ((_a = this.formEnumData[field.enumKey]) == null ? void 0 : _a.enumList) || [],
|
|
50012
50032
|
(sum, tmp) => {
|
|
50013
50033
|
sum[tmp.K] = tmp.V;
|
|
@@ -50029,8 +50049,8 @@ const __vue2_script$1k = {
|
|
|
50029
50049
|
content: "\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",
|
|
50030
50050
|
loading: true
|
|
50031
50051
|
});
|
|
50032
|
-
let datasClone = _.cloneDeep(this.datas);
|
|
50033
|
-
_.remove(datasClone, { id: item2.id });
|
|
50052
|
+
let datasClone = _$1.cloneDeep(this.datas);
|
|
50053
|
+
_$1.remove(datasClone, { id: item2.id });
|
|
50034
50054
|
this.datas = datasClone;
|
|
50035
50055
|
this.syncToStorage();
|
|
50036
50056
|
} catch (error) {
|
|
@@ -50043,12 +50063,12 @@ const __vue2_script$1k = {
|
|
|
50043
50063
|
},
|
|
50044
50064
|
async saveCondition() {
|
|
50045
50065
|
if (await this.$refs.editForm.validate()) {
|
|
50046
|
-
let datasClone = _.cloneDeep(this.datas);
|
|
50066
|
+
let datasClone = _$1.cloneDeep(this.datas);
|
|
50047
50067
|
if (this.editData.id) {
|
|
50048
|
-
let curData = _.find(datasClone, { id: this.editData.id });
|
|
50049
|
-
_.assign(curData, _.cloneDeep(this.editData));
|
|
50068
|
+
let curData = _$1.find(datasClone, { id: this.editData.id });
|
|
50069
|
+
_$1.assign(curData, _$1.cloneDeep(this.editData));
|
|
50050
50070
|
} else {
|
|
50051
|
-
let tmp = _.cloneDeep(this.editData);
|
|
50071
|
+
let tmp = _$1.cloneDeep(this.editData);
|
|
50052
50072
|
tmp.id = new Date().getTime() + "" + Math.ceil(Math.random() * 1e4);
|
|
50053
50073
|
tmp.isDefault = "0";
|
|
50054
50074
|
datasClone.push(tmp);
|
|
@@ -50150,7 +50170,7 @@ const __vue2_script$1j = {
|
|
|
50150
50170
|
await this.$nextTick();
|
|
50151
50171
|
this.$refs.conditionManager.showEdit = true;
|
|
50152
50172
|
} else {
|
|
50153
|
-
let cacheTmp = _.find(this.formCacheList, { id: tab });
|
|
50173
|
+
let cacheTmp = _$1.find(this.formCacheList, { id: tab });
|
|
50154
50174
|
console.log("cacheTmp", cacheTmp);
|
|
50155
50175
|
if (cacheTmp && cacheTmp.id) {
|
|
50156
50176
|
this.curCacheId = cacheTmp.id;
|
|
@@ -50371,9 +50391,9 @@ var render$14 = function() {
|
|
|
50371
50391
|
var _c = _vm._self._c || _h;
|
|
50372
50392
|
return _c("div", { staticClass: "export-data" }, [_c("Row", [_c("Form", { attrs: { "label-width": 80, "label-colon": "" } }, [_c("FormItem", { attrs: { "label": "\u5BFC\u51FA\u683C\u5F0F" } }, [_vm._v("xlsx")]), _c("FormItem", { attrs: { "label": "\u6587\u4EF6\u540D" } }, [_c("Input", { staticStyle: { "width": "270px" }, attrs: { "maxlength": "30", "icon": "document", "placeholder": "\u8868\u683C\u6570\u636E" }, model: { value: _vm.fileName, callback: function($$v) {
|
|
50373
50393
|
_vm.fileName = typeof $$v === "string" ? $$v.trim() : $$v;
|
|
50374
|
-
}, expression: "fileName" } })], 1), _c("FormItem", [_c("Button", { attrs: { "type": "default", "loading": _vm.exportCurrentLoading }, on: { "click": _vm.exportCurrentPage } }, [_vm._v("\u5BFC\u51FA\u5F53\u524D\u9875")]), _vm._v(" \xA0 "), _c("Button", { attrs: { "type": "default", "loading": _vm.exportAllLoading }, on: { "click": _vm.exportAllData } }, [_vm._v("\u5BFC\u51FA\u5168\u90E8")])], 1)], 1)], 1), _c("Modal", { staticClass: "preview-modal", attrs: { "width": "80" }, on: { "on-cancel": _vm.onCancel }, model: { value: _vm.boxShow, callback: function($$v) {
|
|
50394
|
+
}, expression: "fileName" } })], 1), _c("FormItem", [_c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportCurrentLoading }, on: { "click": _vm.exportCurrentPage } }, [_vm._v("\u5BFC\u51FA\u5F53\u524D\u9875")]), _vm._v(" \xA0 "), _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportAllLoading }, on: { "click": _vm.exportAllData } }, [_vm._v("\u5BFC\u51FA\u5168\u90E8")]), _vm._v(" \xA0 "), _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportCurrentLoading }, on: { "click": _vm.previewCurrentPage } }, [_vm._v("\u9884\u89C8\u5F53\u524D\u9875")]), _vm._v(" \xA0 "), _c("Button", { staticStyle: { "margin-bottom": "var(--search-margin-bottom)" }, attrs: { "type": "default", "loading": _vm.exportAllLoading }, on: { "click": _vm.previewAllData } }, [_vm._v("\u9884\u89C8\u5168\u90E8")])], 1)], 1)], 1), _c("Modal", { staticClass: "ind-file-preview-modal", attrs: { "width": "80" }, on: { "on-cancel": _vm.onCancel }, model: { value: _vm.boxShow, callback: function($$v) {
|
|
50375
50395
|
_vm.boxShow = $$v;
|
|
50376
|
-
}, expression: "boxShow" } }, [_c("div", { staticStyle: { "width": "100%", "height": "100%", "display": "flex", "justify-content": "center" } }, [_vm.boxShow ? _c("div", { staticClass: "preview-content", attrs: { "id": _vm.id } }) : _vm._e()]), _c("div", { attrs: { "slot": "footer" }, slot: "footer" })])], 1);
|
|
50396
|
+
}, expression: "boxShow" } }, [_c("div", { staticStyle: { "width": "100%", "height": "100%", "display": "flex", "justify-content": "center" } }, [_vm.boxShow ? _c("div", { staticClass: "ind-file-preview-content", attrs: { "id": _vm.id } }) : _vm._e()]), _c("div", { attrs: { "slot": "footer" }, slot: "footer" })])], 1);
|
|
50377
50397
|
};
|
|
50378
50398
|
var staticRenderFns$14 = [];
|
|
50379
50399
|
const __vue2_script$1h = {
|
|
@@ -50472,29 +50492,19 @@ const __vue2_script$1h = {
|
|
|
50472
50492
|
onCancel() {
|
|
50473
50493
|
this.boxShow = false;
|
|
50474
50494
|
},
|
|
50475
|
-
async openPreview() {
|
|
50476
|
-
const result = await
|
|
50495
|
+
async openPreview(fileId) {
|
|
50496
|
+
const result = await getPreviewUrlApi(fileId);
|
|
50477
50497
|
console.log("wps preview url is", result.data);
|
|
50478
50498
|
var tempUrl = "";
|
|
50479
50499
|
if (result.code == "1") {
|
|
50480
50500
|
tempUrl = result.data;
|
|
50481
50501
|
}
|
|
50482
|
-
const token2 = localStorage["v8-token"];
|
|
50483
|
-
console.log("preview token", token2);
|
|
50484
|
-
window["WPS_GetToken"] = () => {
|
|
50485
|
-
return { token: token2 };
|
|
50486
|
-
};
|
|
50487
50502
|
console.log("tempUrl is", tempUrl);
|
|
50488
|
-
var instance =
|
|
50503
|
+
var instance = OpenSDK == null ? void 0 : OpenSDK.config({
|
|
50489
50504
|
url: tempUrl,
|
|
50490
50505
|
mount: document.getElementById(this.id)
|
|
50491
50506
|
});
|
|
50492
50507
|
console.log("instance-----", instance);
|
|
50493
|
-
instance.setToken({
|
|
50494
|
-
token: token2,
|
|
50495
|
-
timeout: 10 * 60 * 1e3
|
|
50496
|
-
});
|
|
50497
|
-
console.log("wps instance", instance);
|
|
50498
50508
|
},
|
|
50499
50509
|
exportCurrentPage() {
|
|
50500
50510
|
this.$emit("doExport");
|
|
@@ -50553,14 +50563,14 @@ const __vue2_script$1h = {
|
|
|
50553
50563
|
if (this.unitType == "WZ") {
|
|
50554
50564
|
data.forEach((d) => {
|
|
50555
50565
|
this.switchCols.forEach((dd) => {
|
|
50556
|
-
let t2 = _.round(parseFloat(d[dd]), 6);
|
|
50566
|
+
let t2 = _$1.round(parseFloat(d[dd]), 6);
|
|
50557
50567
|
d[dd] = isNaN(t2) ? null : t2 * 5;
|
|
50558
50568
|
});
|
|
50559
50569
|
});
|
|
50560
50570
|
} else {
|
|
50561
50571
|
data.forEach((d) => {
|
|
50562
50572
|
this.switchCols.forEach((dd) => {
|
|
50563
|
-
let t2 = _.round(parseFloat(d[dd]), 6);
|
|
50573
|
+
let t2 = _$1.round(parseFloat(d[dd]), 6);
|
|
50564
50574
|
d[dd] = isNaN(t2) ? null : t2 / 5;
|
|
50565
50575
|
});
|
|
50566
50576
|
});
|
|
@@ -50569,7 +50579,7 @@ const __vue2_script$1h = {
|
|
|
50569
50579
|
},
|
|
50570
50580
|
getDataFromServer(params) {
|
|
50571
50581
|
this.dataApi(params).then((result) => {
|
|
50572
|
-
let resultData = _.cloneDeep(result.data.rows || result.data.records || result.data || []);
|
|
50582
|
+
let resultData = _$1.cloneDeep(result.data.rows || result.data.records || result.data || []);
|
|
50573
50583
|
if (this.showSummary) {
|
|
50574
50584
|
let sum = this.summaryData(resultData);
|
|
50575
50585
|
resultData.push(sum);
|
|
@@ -50579,7 +50589,7 @@ const __vue2_script$1h = {
|
|
|
50579
50589
|
});
|
|
50580
50590
|
},
|
|
50581
50591
|
getDataFromData() {
|
|
50582
|
-
const resultData = _.cloneDeep(this.data);
|
|
50592
|
+
const resultData = _$1.cloneDeep(this.data);
|
|
50583
50593
|
if (this.showSummary) {
|
|
50584
50594
|
resultData.push(this.summaryData(resultData));
|
|
50585
50595
|
}
|
|
@@ -50587,7 +50597,7 @@ const __vue2_script$1h = {
|
|
|
50587
50597
|
},
|
|
50588
50598
|
getDataFromServerPreview(params) {
|
|
50589
50599
|
this.dataApi(params).then((result) => {
|
|
50590
|
-
let resultData = _.cloneDeep(result.data.rows || result.data.records || result.data || []);
|
|
50600
|
+
let resultData = _$1.cloneDeep(result.data.rows || result.data.records || result.data || []);
|
|
50591
50601
|
if (this.showSummary) {
|
|
50592
50602
|
let sum = this.summaryData(resultData);
|
|
50593
50603
|
resultData.push(sum);
|
|
@@ -50597,14 +50607,14 @@ const __vue2_script$1h = {
|
|
|
50597
50607
|
});
|
|
50598
50608
|
},
|
|
50599
50609
|
getDataFromDataPreview() {
|
|
50600
|
-
const resultData = _.cloneDeep(this.data);
|
|
50610
|
+
const resultData = _$1.cloneDeep(this.data);
|
|
50601
50611
|
if (this.showSummary) {
|
|
50602
50612
|
resultData.push(this.summaryData(resultData));
|
|
50603
50613
|
}
|
|
50604
50614
|
this.preveiwExcel(this.setExportEnum(resultData));
|
|
50605
50615
|
},
|
|
50606
50616
|
setExportEnum(resultData) {
|
|
50607
|
-
let data = _.cloneDeep(resultData);
|
|
50617
|
+
let data = _$1.cloneDeep(resultData);
|
|
50608
50618
|
data.forEach((e) => {
|
|
50609
50619
|
for (const key in this.exportEnum) {
|
|
50610
50620
|
if (Object.hasOwnProperty.call(e, key)) {
|
|
@@ -50673,9 +50683,9 @@ const __vue2_script$1h = {
|
|
|
50673
50683
|
if (this.dataChildren) {
|
|
50674
50684
|
tableDatas = data_children_transform(tableDatas);
|
|
50675
50685
|
}
|
|
50676
|
-
let data = _.cloneDeep(tableDatas);
|
|
50686
|
+
let data = _$1.cloneDeep(tableDatas);
|
|
50677
50687
|
if (this.pinnedTopRowData) {
|
|
50678
|
-
data = _.concat(this.pinnedTopRowData, data);
|
|
50688
|
+
data = _$1.concat(this.pinnedTopRowData, data);
|
|
50679
50689
|
}
|
|
50680
50690
|
const params = {
|
|
50681
50691
|
title: (this.fileName || "\u8868\u683C\u6570\u636E") + dayjs().format("YYYYMMDDHHmmss"),
|
|
@@ -50696,14 +50706,14 @@ const __vue2_script$1h = {
|
|
|
50696
50706
|
this.exportCurrentLoading = false;
|
|
50697
50707
|
this.exportAllLoading = false;
|
|
50698
50708
|
},
|
|
50699
|
-
preveiwExcel(tableDatas) {
|
|
50709
|
+
async preveiwExcel(tableDatas) {
|
|
50700
50710
|
if (tableDatas.length) {
|
|
50701
50711
|
if (this.dataChildren) {
|
|
50702
50712
|
tableDatas = data_children_transform(tableDatas);
|
|
50703
50713
|
}
|
|
50704
|
-
let data = _.cloneDeep(tableDatas);
|
|
50714
|
+
let data = _$1.cloneDeep(tableDatas);
|
|
50705
50715
|
if (this.pinnedTopRowData) {
|
|
50706
|
-
data = _.concat(this.pinnedTopRowData, data);
|
|
50716
|
+
data = _$1.concat(this.pinnedTopRowData, data);
|
|
50707
50717
|
}
|
|
50708
50718
|
const params = {
|
|
50709
50719
|
title: (this.fileName || "\u8868\u683C\u6570\u636E") + dayjs().format("YYYYMMDDHHmmss"),
|
|
@@ -50717,7 +50727,11 @@ const __vue2_script$1h = {
|
|
|
50717
50727
|
leftColumns: 0,
|
|
50718
50728
|
rowSpanDefs: this.rowSpanDefs
|
|
50719
50729
|
};
|
|
50720
|
-
previewJsonToExcel(params);
|
|
50730
|
+
const fileId = await previewJsonToExcel(params);
|
|
50731
|
+
if (fileId) {
|
|
50732
|
+
this.boxShow = true;
|
|
50733
|
+
this.openPreview(fileId);
|
|
50734
|
+
}
|
|
50721
50735
|
} else {
|
|
50722
50736
|
this.$Message.info("\u8868\u683C\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A\uFF01");
|
|
50723
50737
|
}
|
|
@@ -50765,7 +50779,7 @@ var render$13 = function() {
|
|
|
50765
50779
|
var staticRenderFns$13 = [];
|
|
50766
50780
|
function deepEach$6(parentNode, list, callback) {
|
|
50767
50781
|
if (Array.isArray(list) && list.length) {
|
|
50768
|
-
_.forEach(list, (node, idx) => {
|
|
50782
|
+
_$1.forEach(list, (node, idx) => {
|
|
50769
50783
|
let breakDeep = false;
|
|
50770
50784
|
if (typeof callback === "function") {
|
|
50771
50785
|
try {
|
|
@@ -50790,7 +50804,7 @@ const __vue2_script$1g = {
|
|
|
50790
50804
|
},
|
|
50791
50805
|
computed: {
|
|
50792
50806
|
isTreeColumn() {
|
|
50793
|
-
return _.some(this.curIndex.columnList, (d) => {
|
|
50807
|
+
return _$1.some(this.curIndex.columnList, (d) => {
|
|
50794
50808
|
var _a, _b;
|
|
50795
50809
|
return ((_a = d.children) == null ? void 0 : _a.length) || ((_b = d.treeLevelFlag) == null ? void 0 : _b.length);
|
|
50796
50810
|
});
|
|
@@ -50841,7 +50855,7 @@ const __vue2_script$1g = {
|
|
|
50841
50855
|
},
|
|
50842
50856
|
methods: {
|
|
50843
50857
|
async syncToStorage() {
|
|
50844
|
-
let dataToCache = _.cloneDeep(this.indexCacheList);
|
|
50858
|
+
let dataToCache = _$1.cloneDeep(this.indexCacheList);
|
|
50845
50859
|
dataToCache.forEach((d) => {
|
|
50846
50860
|
deepEach$6(null, d.columnList, (dd) => {
|
|
50847
50861
|
dd.checked = dd.checked ? "1" : "0";
|
|
@@ -50940,30 +50954,30 @@ const __vue2_script$1g = {
|
|
|
50940
50954
|
},
|
|
50941
50955
|
triggerToogle(name2) {
|
|
50942
50956
|
if (name2 != "manage") {
|
|
50943
|
-
let tmp = _.find(this.indexCacheList, { id: name2 }) || {};
|
|
50957
|
+
let tmp = _$1.find(this.indexCacheList, { id: name2 }) || {};
|
|
50944
50958
|
if (tmp) {
|
|
50945
50959
|
this.curIndex = tmp;
|
|
50946
|
-
this.$emit("resetColumns", _.cloneDeep(this.curIndex.columnList));
|
|
50960
|
+
this.$emit("resetColumns", _$1.cloneDeep(this.curIndex.columnList));
|
|
50947
50961
|
}
|
|
50948
50962
|
}
|
|
50949
50963
|
},
|
|
50950
50964
|
apply() {
|
|
50951
|
-
let curIndexClone = _.cloneDeep(this.curIndex);
|
|
50965
|
+
let curIndexClone = _$1.cloneDeep(this.curIndex);
|
|
50952
50966
|
let checkRows = this.$refs.mangeTable.getSelection();
|
|
50953
50967
|
deepEach$6(null, curIndexClone.columnList, (dd) => {
|
|
50954
|
-
dd.checked = _.some(checkRows, { field: dd.field });
|
|
50968
|
+
dd.checked = _$1.some(checkRows, { field: dd.field });
|
|
50955
50969
|
});
|
|
50956
|
-
this.$emit("resetColumns", _.cloneDeep(curIndexClone.columnList));
|
|
50970
|
+
this.$emit("resetColumns", _$1.cloneDeep(curIndexClone.columnList));
|
|
50957
50971
|
this.showManager = false;
|
|
50958
50972
|
},
|
|
50959
50973
|
async saveIndex(isDefault) {
|
|
50960
50974
|
if (await this.$refs.editForm.validate()) {
|
|
50961
|
-
let datasClone = _.cloneDeep(this.indexCacheList);
|
|
50975
|
+
let datasClone = _$1.cloneDeep(this.indexCacheList);
|
|
50962
50976
|
if (this.curIndex.id) {
|
|
50963
|
-
let curData = _.find(datasClone, { id: this.curIndex.id });
|
|
50964
|
-
_.assign(curData, _.cloneDeep(this.curIndex), this.titleForm);
|
|
50977
|
+
let curData = _$1.find(datasClone, { id: this.curIndex.id });
|
|
50978
|
+
_$1.assign(curData, _$1.cloneDeep(this.curIndex), this.titleForm);
|
|
50965
50979
|
} else {
|
|
50966
|
-
let tmp = _.cloneDeep(this.curIndex);
|
|
50980
|
+
let tmp = _$1.cloneDeep(this.curIndex);
|
|
50967
50981
|
tmp.titleName = this.titleForm.titleName;
|
|
50968
50982
|
tmp.id = new Date().getTime() + "" + Math.ceil(Math.random() * 1e4);
|
|
50969
50983
|
tmp.isDefault = isDefault ? "1" : "0";
|
|
@@ -50971,7 +50985,7 @@ const __vue2_script$1g = {
|
|
|
50971
50985
|
}
|
|
50972
50986
|
this.indexCacheList = datasClone;
|
|
50973
50987
|
await this.syncToStorage();
|
|
50974
|
-
this.$emit("resetColumns", _.cloneDeep(this.curIndex.columnList));
|
|
50988
|
+
this.$emit("resetColumns", _$1.cloneDeep(this.curIndex.columnList));
|
|
50975
50989
|
}
|
|
50976
50990
|
},
|
|
50977
50991
|
saveIndexAsDefault() {
|
|
@@ -50983,9 +50997,9 @@ const __vue2_script$1g = {
|
|
|
50983
50997
|
},
|
|
50984
50998
|
async manageIndex() {
|
|
50985
50999
|
this.showManager = true;
|
|
50986
|
-
let cloneData = _.cloneDeep(this.curIndex);
|
|
51000
|
+
let cloneData = _$1.cloneDeep(this.curIndex);
|
|
50987
51001
|
if (!cloneData.id) {
|
|
50988
|
-
let columns = _.cloneDeep(this.tableRef.columns);
|
|
51002
|
+
let columns = _$1.cloneDeep(this.tableRef.columns);
|
|
50989
51003
|
deepEach$6(null, columns, (dd) => {
|
|
50990
51004
|
var _a;
|
|
50991
51005
|
dd.field = dd.field || dd.key;
|
|
@@ -51032,8 +51046,8 @@ const __vue2_script$1g = {
|
|
|
51032
51046
|
content: "\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",
|
|
51033
51047
|
loading: true
|
|
51034
51048
|
});
|
|
51035
|
-
let datasClone = _.cloneDeep(this.indexCacheList);
|
|
51036
|
-
_.remove(datasClone, { id: item2 });
|
|
51049
|
+
let datasClone = _$1.cloneDeep(this.indexCacheList);
|
|
51050
|
+
_$1.remove(datasClone, { id: item2 });
|
|
51037
51051
|
this.indexCacheList = datasClone;
|
|
51038
51052
|
this.syncToStorage();
|
|
51039
51053
|
} catch (error) {
|
|
@@ -51341,7 +51355,6 @@ function tableTooltipRender(h, value, opts = {}) {
|
|
|
51341
51355
|
const cellRendererParams = colDef.cellRendererParams || {};
|
|
51342
51356
|
const tooltipContentDef = cellRendererParams.tooltipContent;
|
|
51343
51357
|
const tooltipContent = tooltipContentDef instanceof Function ? tooltipContentDef(data) : tooltipContentDef;
|
|
51344
|
-
console.log("tooltipContent", tooltipContent);
|
|
51345
51358
|
let text_render;
|
|
51346
51359
|
if (clickable) {
|
|
51347
51360
|
text_render = h(
|
|
@@ -51423,7 +51436,7 @@ const __vue2_script$1d = {
|
|
|
51423
51436
|
if (scale === 0) {
|
|
51424
51437
|
renderVal = value ? parseInt(value) : value;
|
|
51425
51438
|
} else if (scale) {
|
|
51426
|
-
let cellV = _.round(parseFloat(value), 6);
|
|
51439
|
+
let cellV = _$1.round(parseFloat(value), 6);
|
|
51427
51440
|
if (!isNaN(cellV)) {
|
|
51428
51441
|
renderVal = cellV.toFixed(scale);
|
|
51429
51442
|
renderVal = parseFloat(renderVal);
|
|
@@ -51449,7 +51462,7 @@ const __vue2_script$1d = {
|
|
|
51449
51462
|
if (formatRlt && formatRlt.length) {
|
|
51450
51463
|
v = ((props == null ? void 0 : props.enableNegative) ? formatRlt[1] : "") + formatRlt[2] + (formatRlt[4] || "");
|
|
51451
51464
|
}
|
|
51452
|
-
updateV = _.round(parseFloat(v), 6);
|
|
51465
|
+
updateV = _$1.round(parseFloat(v), 6);
|
|
51453
51466
|
this.params.setValue(updateV);
|
|
51454
51467
|
this.$refs.input && this.$refs.input.setCurrentValue(v);
|
|
51455
51468
|
} else {
|
|
@@ -51506,7 +51519,7 @@ const __vue2_script$1c = {
|
|
|
51506
51519
|
const { textCondition } = props || {};
|
|
51507
51520
|
const isText = textCondition instanceof Function ? textCondition(data) : textCondition;
|
|
51508
51521
|
if (isText) {
|
|
51509
|
-
let tmp = _.find(selectList, { K: value });
|
|
51522
|
+
let tmp = _$1.find(selectList, { K: value });
|
|
51510
51523
|
return h("span", tmp.V);
|
|
51511
51524
|
} else {
|
|
51512
51525
|
return h(
|
|
@@ -52475,7 +52488,7 @@ function addCalcRuleMap(ruleMap = {}, calcRule, columnField) {
|
|
|
52475
52488
|
}
|
|
52476
52489
|
function deepEach$5(parentNode, list, callback) {
|
|
52477
52490
|
if (Array.isArray(list) && list.length) {
|
|
52478
|
-
_.forEach(list, (node, idx) => {
|
|
52491
|
+
_$1.forEach(list, (node, idx) => {
|
|
52479
52492
|
let breakDeep = false;
|
|
52480
52493
|
if (typeof callback === "function") {
|
|
52481
52494
|
try {
|
|
@@ -52499,7 +52512,7 @@ function addNodeToTree$1(tree, node) {
|
|
|
52499
52512
|
return;
|
|
52500
52513
|
}
|
|
52501
52514
|
let midPathNode = path2.shift();
|
|
52502
|
-
let midNode = _.find(subTree, { uuid: midPathNode });
|
|
52515
|
+
let midNode = _$1.find(subTree, { uuid: midPathNode });
|
|
52503
52516
|
if (!midNode) {
|
|
52504
52517
|
if (path2.length == 0) {
|
|
52505
52518
|
midNode = {
|
|
@@ -52516,7 +52529,7 @@ function addNodeToTree$1(tree, node) {
|
|
|
52516
52529
|
}
|
|
52517
52530
|
addNodeToTreeInner(midNode.children, path2);
|
|
52518
52531
|
}
|
|
52519
|
-
let path = _.cloneDeep(node.path);
|
|
52532
|
+
let path = _$1.cloneDeep(node.path);
|
|
52520
52533
|
addNodeToTreeInner(tree, path);
|
|
52521
52534
|
}
|
|
52522
52535
|
function generateTreeByNodes$1(nodes) {
|
|
@@ -52528,11 +52541,11 @@ function generateTreeByNodes$1(nodes) {
|
|
|
52528
52541
|
});
|
|
52529
52542
|
let rlt = [];
|
|
52530
52543
|
nodes.forEach((d) => addNodeToTree$1(rlt, d));
|
|
52531
|
-
rlt = _.orderBy(rlt, ["seq"], ["asc"]);
|
|
52544
|
+
rlt = _$1.orderBy(rlt, ["seq"], ["asc"]);
|
|
52532
52545
|
deepEach$5({}, rlt, (d) => {
|
|
52533
52546
|
var _a;
|
|
52534
52547
|
if ((_a = d.children) == null ? void 0 : _a.length) {
|
|
52535
|
-
d.children = _.orderBy(d.children, ["seq"], ["asc"]);
|
|
52548
|
+
d.children = _$1.orderBy(d.children, ["seq"], ["asc"]);
|
|
52536
52549
|
}
|
|
52537
52550
|
});
|
|
52538
52551
|
return rlt;
|
|
@@ -52559,8 +52572,8 @@ function changeCellUnit(fromUnit, toUnit, rowData, prop) {
|
|
|
52559
52572
|
const ratio = unitChangeRatio[`${fromUnit}_${toUnit}`];
|
|
52560
52573
|
if (!ratio)
|
|
52561
52574
|
return;
|
|
52562
|
-
const value = _.round(parseFloat(rowData[prop]), 6);
|
|
52563
|
-
rowData[prop] = isNaN(value) ? null : _.round(value * ratio, 6);
|
|
52575
|
+
const value = _$1.round(parseFloat(rowData[prop]), 6);
|
|
52576
|
+
rowData[prop] = isNaN(value) ? null : _$1.round(value * ratio, 6);
|
|
52564
52577
|
}
|
|
52565
52578
|
var render$10 = function() {
|
|
52566
52579
|
var _vm = this;
|
|
@@ -52576,6 +52589,8 @@ var render$10 = function() {
|
|
|
52576
52589
|
return _vm.tableSettingToggle("3");
|
|
52577
52590
|
} } }, [_vm._v(" \u5BFC\u51FA ")])], 1), _c("DropdownMenu", { style: { width: _vm.btnSel != "1" ? "400px" : "200px", padding: "5px 10px" }, attrs: { "slot": "list" }, slot: "list" }, [_c("ExportData", { directives: [{ name: "show", rawName: "v-show", value: _vm.btnSel == "3", expression: "btnSel == '3'" }], ref: "exportData", attrs: { "rowSpanDefs": _vm.rowSpanDefs, "exportFileName": _vm.exportFileName, "paramLeft": _vm.paramLeft, "paramRight": _vm.paramRight || _vm.paramRightUnit, "rowSpanColumns": _vm.rowSpanColumns || _vm.mergeColumns, "rowSpanIndexCol": _vm.rowSpanIndexCol || _vm.mergeIndexCol, "pinnedTopRowData": _vm.topRows, "tableColumns": _vm.tableColumns, "data": _vm.tableData, "dataApi": _vm.dataApi, "searchParams": _vm.searchParams, "sortParams": _vm.sortParams, "paginationParams": _vm.paginationParams, "show-summary": _vm.tableShowSummary, "summary-method": _vm.tableSummaryMethod, "parsedColumns": _vm.parsedColumns, "exportEnum": _vm.exportEnum, "data-children": _vm.dataChildren, "defaultUnitType": _vm.defaultUnitType, "unitType": _vm.unitType, "switchCols": _vm.switchCols }, on: { "doExport": function($event) {
|
|
52578
52591
|
_vm.optionDropdownVisible = false;
|
|
52592
|
+
}, "doPreview": function($event) {
|
|
52593
|
+
_vm.optionDropdownVisible = false;
|
|
52579
52594
|
} } }), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.btnSel == "2", expression: "btnSel == '2'" }], staticStyle: { "border-bottom": "1px solid #e9e9e9", "padding-bottom": "6px", "margin-bottom": "6px" } }, [_c("Checkbox", { attrs: { "value": _vm.checkAll }, on: { "on-change": _vm.handleCheckAll } }, [_vm._v("\u5168\u9009")])], 1), _c("CheckboxGroup", { directives: [{ name: "show", rawName: "v-show", value: _vm.btnSel == "2", expression: "btnSel == '2'" }], on: { "on-change": _vm.checkAllGroupChange }, model: { value: _vm.checkAllGroup, callback: function($$v) {
|
|
52580
52595
|
_vm.checkAllGroup = $$v;
|
|
52581
52596
|
}, expression: "checkAllGroup" } }, [_vm._l(_vm.columns, function(item2) {
|
|
@@ -52635,7 +52650,7 @@ function suppressNavigation$1(params) {
|
|
|
52635
52650
|
}
|
|
52636
52651
|
function deepEach$4(parentNode, list, callback) {
|
|
52637
52652
|
if (Array.isArray(list) && list.length) {
|
|
52638
|
-
_.forEach(list, (node, idx) => {
|
|
52653
|
+
_$1.forEach(list, (node, idx) => {
|
|
52639
52654
|
let breakDeep = false;
|
|
52640
52655
|
if (typeof callback === "function") {
|
|
52641
52656
|
try {
|
|
@@ -52864,7 +52879,7 @@ const __vue2_script$11 = {
|
|
|
52864
52879
|
isRevertingOldValue: false,
|
|
52865
52880
|
btnSel: "",
|
|
52866
52881
|
tableDataSrc: [],
|
|
52867
|
-
tableData: _.cloneDeep(this.value),
|
|
52882
|
+
tableData: _$1.cloneDeep(this.value),
|
|
52868
52883
|
tableWidth: this.width,
|
|
52869
52884
|
tableHeight: this.height,
|
|
52870
52885
|
tableLoading: this.loading,
|
|
@@ -52937,24 +52952,24 @@ const __vue2_script$11 = {
|
|
|
52937
52952
|
},
|
|
52938
52953
|
computed: {
|
|
52939
52954
|
mergeIndexCol() {
|
|
52940
|
-
let mergeIndex = _.find(this.columns, (d) => {
|
|
52955
|
+
let mergeIndex = _$1.find(this.columns, (d) => {
|
|
52941
52956
|
return d.autoMergeRow === true;
|
|
52942
52957
|
});
|
|
52943
52958
|
return (mergeIndex == null ? void 0 : mergeIndex.key) || (mergeIndex == null ? void 0 : mergeIndex.field);
|
|
52944
52959
|
},
|
|
52945
52960
|
mergeColumns() {
|
|
52946
|
-
let rlt = _.filter(this.columns, (d) => {
|
|
52961
|
+
let rlt = _$1.filter(this.columns, (d) => {
|
|
52947
52962
|
return !!d.autoMergeRow;
|
|
52948
52963
|
}).map((d) => d.key || d.field);
|
|
52949
52964
|
return (rlt == null ? void 0 : rlt.length) ? rlt : void 0;
|
|
52950
52965
|
},
|
|
52951
52966
|
paramRightUnit() {
|
|
52952
|
-
return _.some(this.flatColumns, (d) => {
|
|
52967
|
+
return _$1.some(this.flatColumns, (d) => {
|
|
52953
52968
|
return d.isSwitchUnit;
|
|
52954
52969
|
}) ? "\u5355\u4F4D\uFF1A" + (this.unitType == "X" ? "\u7BB1" : "\u4E07\u652F") : "";
|
|
52955
52970
|
},
|
|
52956
52971
|
isEditTable() {
|
|
52957
|
-
return _.some(this.flatColumns, (d) => {
|
|
52972
|
+
return _$1.some(this.flatColumns, (d) => {
|
|
52958
52973
|
return ["input", "select", "treeselect"].includes(d.type);
|
|
52959
52974
|
});
|
|
52960
52975
|
},
|
|
@@ -52970,7 +52985,7 @@ const __vue2_script$11 = {
|
|
|
52970
52985
|
},
|
|
52971
52986
|
columnCalcMap() {
|
|
52972
52987
|
let rlt = {};
|
|
52973
|
-
_.forEach(this.flatColumns, (d) => {
|
|
52988
|
+
_$1.forEach(this.flatColumns, (d) => {
|
|
52974
52989
|
if (d.calcRule) {
|
|
52975
52990
|
addCalcRuleMap(rlt, d.calcRule, d.field || d.key);
|
|
52976
52991
|
}
|
|
@@ -53032,7 +53047,7 @@ const __vue2_script$11 = {
|
|
|
53032
53047
|
});
|
|
53033
53048
|
let mergeRowsRlt = list.filter((arr) => arr.length !== 1);
|
|
53034
53049
|
let columnRowSpan = {};
|
|
53035
|
-
_.forEach(mergeRowsRlt, (d) => {
|
|
53050
|
+
_$1.forEach(mergeRowsRlt, (d) => {
|
|
53036
53051
|
columnRowSpan[d[0] + ""] = d.length;
|
|
53037
53052
|
});
|
|
53038
53053
|
map[column.field] = columnRowSpan;
|
|
@@ -53055,13 +53070,13 @@ const __vue2_script$11 = {
|
|
|
53055
53070
|
watch: {
|
|
53056
53071
|
pinnedTopRowData: {
|
|
53057
53072
|
handler: function() {
|
|
53058
|
-
this.pinnedTopRowDataWithUnit = _.cloneDeep(this.pinnedTopRowData);
|
|
53073
|
+
this.pinnedTopRowDataWithUnit = _$1.cloneDeep(this.pinnedTopRowData);
|
|
53059
53074
|
this.renderSumRow();
|
|
53060
53075
|
},
|
|
53061
53076
|
deep: true
|
|
53062
53077
|
},
|
|
53063
53078
|
unitType(val, oldValue) {
|
|
53064
|
-
let datasTmp = _.cloneDeep(this.tableData);
|
|
53079
|
+
let datasTmp = _$1.cloneDeep(this.tableData);
|
|
53065
53080
|
datasTmp.forEach((d) => {
|
|
53066
53081
|
this.switchCols.forEach((dd) => {
|
|
53067
53082
|
changeCellUnit(oldValue, val, d, dd);
|
|
@@ -53069,7 +53084,7 @@ const __vue2_script$11 = {
|
|
|
53069
53084
|
});
|
|
53070
53085
|
this.tableData = datasTmp;
|
|
53071
53086
|
if (this.pinnedTopRowDataWithUnit && this.pinnedTopRowDataWithUnit.length) {
|
|
53072
|
-
let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
|
|
53087
|
+
let pinnedTopRowDataWithUnitTmp = _$1.cloneDeep(this.pinnedTopRowDataWithUnit);
|
|
53073
53088
|
pinnedTopRowDataWithUnitTmp.forEach((d) => {
|
|
53074
53089
|
this.switchCols.forEach((dd) => {
|
|
53075
53090
|
changeCellUnit(oldValue, val, d, dd);
|
|
@@ -53111,7 +53126,7 @@ const __vue2_script$11 = {
|
|
|
53111
53126
|
value: {
|
|
53112
53127
|
async handler(val) {
|
|
53113
53128
|
if (!this.updating) {
|
|
53114
|
-
if (!_.some(val, (d) => {
|
|
53129
|
+
if (!_$1.some(val, (d) => {
|
|
53115
53130
|
var _a;
|
|
53116
53131
|
return (_a = d.treeLevelFlag) == null ? void 0 : _a.length;
|
|
53117
53132
|
})) {
|
|
@@ -53127,13 +53142,13 @@ const __vue2_script$11 = {
|
|
|
53127
53142
|
this.overlayNoRowsTemplate = '<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>';
|
|
53128
53143
|
this.updating = true;
|
|
53129
53144
|
this.renderSumRow();
|
|
53130
|
-
let isTreeTable = _.some(this.columns, { tree: true });
|
|
53145
|
+
let isTreeTable = _$1.some(this.columns, { tree: true });
|
|
53131
53146
|
if (isTreeTable) {
|
|
53132
|
-
let treeDataClone = _.cloneDeep(val);
|
|
53147
|
+
let treeDataClone = _$1.cloneDeep(val);
|
|
53133
53148
|
let rlt = generateTreeByNodes$1(treeDataClone);
|
|
53134
53149
|
this.$emit("input", rlt);
|
|
53135
53150
|
} else {
|
|
53136
|
-
this.$emit("input", _.cloneDeep(val));
|
|
53151
|
+
this.$emit("input", _$1.cloneDeep(val));
|
|
53137
53152
|
}
|
|
53138
53153
|
this.$nextTick(() => {
|
|
53139
53154
|
this.updating = false;
|
|
@@ -53174,20 +53189,20 @@ const __vue2_script$11 = {
|
|
|
53174
53189
|
var _a;
|
|
53175
53190
|
this.tableRef = this;
|
|
53176
53191
|
this.unitType = this.defaultTableUnitType;
|
|
53177
|
-
this.cloneColumns = this.tableColumnsInner(_.cloneDeep(this.columns) || []);
|
|
53178
|
-
this.cloneColumns2 = this.tableColumnsInner(_.cloneDeep(this.columns) || []);
|
|
53179
|
-
this.tableColumns = _.cloneDeep(this.cloneColumns);
|
|
53180
|
-
this.showUnitSwitch = _.some(this.flatColumns, { isSwitchUnit: true });
|
|
53181
|
-
this.showZeroSwitch = _.some(this.flatColumns, (d) => {
|
|
53192
|
+
this.cloneColumns = this.tableColumnsInner(_$1.cloneDeep(this.columns) || []);
|
|
53193
|
+
this.cloneColumns2 = this.tableColumnsInner(_$1.cloneDeep(this.columns) || []);
|
|
53194
|
+
this.tableColumns = _$1.cloneDeep(this.cloneColumns);
|
|
53195
|
+
this.showUnitSwitch = _$1.some(this.flatColumns, { isSwitchUnit: true });
|
|
53196
|
+
this.showZeroSwitch = _$1.some(this.flatColumns, (d) => {
|
|
53182
53197
|
return !!d.isSwitchZero;
|
|
53183
53198
|
});
|
|
53184
|
-
this.switchCols = _.filter(this.flatColumns, { isSwitchUnit: true }).map(
|
|
53199
|
+
this.switchCols = _$1.filter(this.flatColumns, { isSwitchUnit: true }).map(
|
|
53185
53200
|
(d) => d.field || d.key
|
|
53186
53201
|
);
|
|
53187
|
-
let switchZeroCol = _.find(this.flatColumns, (d) => {
|
|
53202
|
+
let switchZeroCol = _$1.find(this.flatColumns, (d) => {
|
|
53188
53203
|
return !!d.isSwitchZero;
|
|
53189
53204
|
});
|
|
53190
|
-
let switchZeroTitle = ((_a = _.find(this.flatColumns, (d) => {
|
|
53205
|
+
let switchZeroTitle = ((_a = _$1.find(this.flatColumns, (d) => {
|
|
53191
53206
|
return !!d.isSwitchZero;
|
|
53192
53207
|
})) == null ? void 0 : _a.isSwitchZero) || "\u662F\u5426\u5C55\u793A\u8F93\u5165\u91CF\u4E3A\u96F6\u7684\u6570\u636E";
|
|
53193
53208
|
this.switchZeroTitle = switchZeroTitle;
|
|
@@ -53213,7 +53228,7 @@ const __vue2_script$11 = {
|
|
|
53213
53228
|
if (this.rowSelection == "multiple") {
|
|
53214
53229
|
return [
|
|
53215
53230
|
{
|
|
53216
|
-
name: "\u9884\
|
|
53231
|
+
name: "\u9884\u89C8Excel",
|
|
53217
53232
|
action: () => {
|
|
53218
53233
|
this.$refs.exportData.previewCurrentPage();
|
|
53219
53234
|
}
|
|
@@ -53240,9 +53255,9 @@ const __vue2_script$11 = {
|
|
|
53240
53255
|
name: "\u5168\u90E8\u9009\u53CD",
|
|
53241
53256
|
action: () => {
|
|
53242
53257
|
let selRows = this.getSelection();
|
|
53243
|
-
let allRows = _.cloneDeep(this.rowDataFiltered);
|
|
53244
|
-
_.remove(allRows, (d) => {
|
|
53245
|
-
return _.some(selRows, (d2) => d2.uuid === d.uuid);
|
|
53258
|
+
let allRows = _$1.cloneDeep(this.rowDataFiltered);
|
|
53259
|
+
_$1.remove(allRows, (d) => {
|
|
53260
|
+
return _$1.some(selRows, (d2) => d2.uuid === d.uuid);
|
|
53246
53261
|
});
|
|
53247
53262
|
this.setSelection(allRows, true);
|
|
53248
53263
|
}
|
|
@@ -53251,7 +53266,7 @@ const __vue2_script$11 = {
|
|
|
53251
53266
|
} else {
|
|
53252
53267
|
return [
|
|
53253
53268
|
{
|
|
53254
|
-
name: "\u9884\
|
|
53269
|
+
name: "\u9884\u89C8Excel",
|
|
53255
53270
|
action: () => {
|
|
53256
53271
|
this.$refs.exportData.previewCurrentPage();
|
|
53257
53272
|
}
|
|
@@ -53286,16 +53301,16 @@ const __vue2_script$11 = {
|
|
|
53286
53301
|
return classRlt;
|
|
53287
53302
|
},
|
|
53288
53303
|
async columnsHander(val) {
|
|
53289
|
-
this.showUnitSwitch = _.some(this.flatColumns, { isSwitchUnit: true });
|
|
53290
|
-
this.switchCols = _.filter(this.flatColumns, { isSwitchUnit: true }).map(
|
|
53304
|
+
this.showUnitSwitch = _$1.some(this.flatColumns, { isSwitchUnit: true });
|
|
53305
|
+
this.switchCols = _$1.filter(this.flatColumns, { isSwitchUnit: true }).map(
|
|
53291
53306
|
(d) => d.field || d.key
|
|
53292
53307
|
);
|
|
53293
|
-
this.cloneColumns = this.tableColumnsInner(_.cloneDeep(val) || []);
|
|
53294
|
-
this.cloneColumns2 = this.tableColumnsInner(_.cloneDeep(val) || []);
|
|
53308
|
+
this.cloneColumns = this.tableColumnsInner(_$1.cloneDeep(val) || []);
|
|
53309
|
+
this.cloneColumns2 = this.tableColumnsInner(_$1.cloneDeep(val) || []);
|
|
53295
53310
|
this.currentPage = 1;
|
|
53296
53311
|
this.tableRefresh(true);
|
|
53297
53312
|
this.columnsFilter();
|
|
53298
|
-
let columns = _.cloneDeep(this.cloneColumns);
|
|
53313
|
+
let columns = _$1.cloneDeep(this.cloneColumns);
|
|
53299
53314
|
this.tableColumns = columns;
|
|
53300
53315
|
this.checkAllGroup = val.map((d) => d.title);
|
|
53301
53316
|
this.refreshTable = true;
|
|
@@ -53303,16 +53318,16 @@ const __vue2_script$11 = {
|
|
|
53303
53318
|
this.refreshTable = false;
|
|
53304
53319
|
},
|
|
53305
53320
|
calcRulesData(datas) {
|
|
53306
|
-
if (!_.isEmpty(this.columnCalcMap)) {
|
|
53307
|
-
let valueClone = _.cloneDeep(datas || this.value);
|
|
53321
|
+
if (!_$1.isEmpty(this.columnCalcMap)) {
|
|
53322
|
+
let valueClone = _$1.cloneDeep(datas || this.value);
|
|
53308
53323
|
let calcRules = {};
|
|
53309
|
-
_.forEach(this.columnCalcMap, (v, k) => {
|
|
53310
|
-
_.merge(calcRules, v);
|
|
53324
|
+
_$1.forEach(this.columnCalcMap, (v, k) => {
|
|
53325
|
+
_$1.merge(calcRules, v);
|
|
53311
53326
|
});
|
|
53312
53327
|
let rules = [];
|
|
53313
|
-
_.forEach(calcRules, (v, k) => {
|
|
53328
|
+
_$1.forEach(calcRules, (v, k) => {
|
|
53314
53329
|
var _a;
|
|
53315
|
-
let column = _.find(this.flatColumns, (d) => {
|
|
53330
|
+
let column = _$1.find(this.flatColumns, (d) => {
|
|
53316
53331
|
return d.field == k || d.key == k;
|
|
53317
53332
|
});
|
|
53318
53333
|
rules.push({
|
|
@@ -53327,7 +53342,7 @@ const __vue2_script$11 = {
|
|
|
53327
53342
|
this.tableData = valueClone;
|
|
53328
53343
|
this.totalNumber = valueClone.length;
|
|
53329
53344
|
} else {
|
|
53330
|
-
this.tableData = _.cloneDeep(datas || this.value);
|
|
53345
|
+
this.tableData = _$1.cloneDeep(datas || this.value);
|
|
53331
53346
|
this.totalNumber = this.tableData.length;
|
|
53332
53347
|
}
|
|
53333
53348
|
},
|
|
@@ -53373,11 +53388,11 @@ const __vue2_script$11 = {
|
|
|
53373
53388
|
this.$listeners.cellDoubleClicked(event);
|
|
53374
53389
|
} else {
|
|
53375
53390
|
let colClicked = event.colDef || {};
|
|
53376
|
-
colClicked = _.find(
|
|
53391
|
+
colClicked = _$1.find(
|
|
53377
53392
|
this.columns,
|
|
53378
53393
|
(d) => colClicked.key && d.key == colClicked.key || colClicked.field && d.field == colClicked.field
|
|
53379
53394
|
);
|
|
53380
|
-
let col = _.find(this.columns, { type: "link" });
|
|
53395
|
+
let col = _$1.find(this.columns, { type: "link" });
|
|
53381
53396
|
if (col && (!colClicked.type || ["span", "tooltip", "enum"].includes(colClicked.type))) {
|
|
53382
53397
|
if (col.cellRendererParams.onClick instanceof Function) {
|
|
53383
53398
|
col.cellRendererParams.onClick(event.data);
|
|
@@ -53409,11 +53424,11 @@ const __vue2_script$11 = {
|
|
|
53409
53424
|
let topData = [];
|
|
53410
53425
|
if (sortParams.order === void 0) {
|
|
53411
53426
|
if (this.dataApi) {
|
|
53412
|
-
let tableDataTmp = _.cloneDeep(this.tableData);
|
|
53413
|
-
tableDataTmp = _.orderBy(tableDataTmp, ["_initialseq"], ["asc"]);
|
|
53427
|
+
let tableDataTmp = _$1.cloneDeep(this.tableData);
|
|
53428
|
+
tableDataTmp = _$1.orderBy(tableDataTmp, ["_initialseq"], ["asc"]);
|
|
53414
53429
|
this.tableData = tableDataTmp;
|
|
53415
53430
|
} else {
|
|
53416
|
-
this.tableData = _.cloneDeep(this.value);
|
|
53431
|
+
this.tableData = _$1.cloneDeep(this.value);
|
|
53417
53432
|
}
|
|
53418
53433
|
} else {
|
|
53419
53434
|
if (this.noSortLine > -1) {
|
|
@@ -53481,31 +53496,31 @@ const __vue2_script$11 = {
|
|
|
53481
53496
|
let autoMergeCols = this.flatColumns.filter((d) => d.autoMergeRow);
|
|
53482
53497
|
if (autoMergeCols == null ? void 0 : autoMergeCols.length) {
|
|
53483
53498
|
let mainCol = ((_a = autoMergeCols[0]) == null ? void 0 : _a.field) || ((_b = autoMergeCols[0]) == null ? void 0 : _b.key);
|
|
53484
|
-
_.forEach(autoMergeCols, (d) => {
|
|
53499
|
+
_$1.forEach(autoMergeCols, (d) => {
|
|
53485
53500
|
if (typeof d.autoMergeRow == "string") {
|
|
53486
53501
|
mainCol = d.autoMergeRow;
|
|
53487
53502
|
}
|
|
53488
53503
|
});
|
|
53489
53504
|
let rowSpanDef = this.tableRowSpanMergeIndexMap[mainCol];
|
|
53490
53505
|
let idxArrEnum = {};
|
|
53491
|
-
_.forEach(rowSpanDef, (v, k) => {
|
|
53506
|
+
_$1.forEach(rowSpanDef, (v, k) => {
|
|
53492
53507
|
let begin = parseInt(k);
|
|
53493
53508
|
let end = begin + v;
|
|
53494
|
-
let idxArr2 = _.range(begin, end);
|
|
53509
|
+
let idxArr2 = _$1.range(begin, end);
|
|
53495
53510
|
for (let i = begin; i < end; i++) {
|
|
53496
53511
|
idxArrEnum[i] = idxArr2;
|
|
53497
53512
|
}
|
|
53498
53513
|
});
|
|
53499
53514
|
let idxUuidEnum = {};
|
|
53500
|
-
_.forEach(this.rowDataFiltered, (row, idx) => {
|
|
53515
|
+
_$1.forEach(this.rowDataFiltered, (row, idx) => {
|
|
53501
53516
|
idxUuidEnum[idx + ""] = row.uuid;
|
|
53502
53517
|
});
|
|
53503
53518
|
let idxArr = idxArrEnum[params.node.rowIndex] || [];
|
|
53504
53519
|
if (!params.node.selected) {
|
|
53505
53520
|
let selRows = this.getSelection();
|
|
53506
53521
|
if (selRows.length > 0) {
|
|
53507
|
-
_.forEach(idxArr, (index2) => {
|
|
53508
|
-
_.remove(selRows, (row, idx) => {
|
|
53522
|
+
_$1.forEach(idxArr, (index2) => {
|
|
53523
|
+
_$1.remove(selRows, (row, idx) => {
|
|
53509
53524
|
return row.uuid == idxUuidEnum[index2 + ""];
|
|
53510
53525
|
});
|
|
53511
53526
|
});
|
|
@@ -53795,7 +53810,7 @@ const __vue2_script$11 = {
|
|
|
53795
53810
|
agColumn.valueSetter = (params) => {
|
|
53796
53811
|
params.data[column.field || column.key] = params.newValue;
|
|
53797
53812
|
let rules = [];
|
|
53798
|
-
_.forEach(calcRules, (v, k) => {
|
|
53813
|
+
_$1.forEach(calcRules, (v, k) => {
|
|
53799
53814
|
var _a2;
|
|
53800
53815
|
rules.push({
|
|
53801
53816
|
rltKey: k,
|
|
@@ -53846,7 +53861,7 @@ const __vue2_script$11 = {
|
|
|
53846
53861
|
}
|
|
53847
53862
|
}
|
|
53848
53863
|
if (!isChildren) {
|
|
53849
|
-
this.cloneColumns2 = _.cloneDeep(rlt);
|
|
53864
|
+
this.cloneColumns2 = _$1.cloneDeep(rlt);
|
|
53850
53865
|
}
|
|
53851
53866
|
return rlt;
|
|
53852
53867
|
},
|
|
@@ -53877,11 +53892,11 @@ const __vue2_script$11 = {
|
|
|
53877
53892
|
}
|
|
53878
53893
|
}
|
|
53879
53894
|
if (selectedColumn.length > 0) {
|
|
53880
|
-
this.cloneColumns = _.cloneDeep(selectedColumn);
|
|
53895
|
+
this.cloneColumns = _$1.cloneDeep(selectedColumn);
|
|
53881
53896
|
} else {
|
|
53882
|
-
this.cloneColumns = _.cloneDeep(this.cloneColumns2);
|
|
53897
|
+
this.cloneColumns = _$1.cloneDeep(this.cloneColumns2);
|
|
53883
53898
|
}
|
|
53884
|
-
this.tableColumns = _.cloneDeep(this.cloneColumns);
|
|
53899
|
+
this.tableColumns = _$1.cloneDeep(this.cloneColumns);
|
|
53885
53900
|
if (this.cloneColumns2.length != this.cloneColumns.length) {
|
|
53886
53901
|
this.checkAll = false;
|
|
53887
53902
|
}
|
|
@@ -53978,8 +53993,8 @@ const __vue2_script$11 = {
|
|
|
53978
53993
|
}
|
|
53979
53994
|
}
|
|
53980
53995
|
localStorage.setItem("tableColumns", JSON.stringify(localColumnList));
|
|
53981
|
-
this.cloneColumns = _.cloneDeep(this.cloneColumns2);
|
|
53982
|
-
this.tableColumns = _.cloneDeep(this.cloneColumns);
|
|
53996
|
+
this.cloneColumns = _$1.cloneDeep(this.cloneColumns2);
|
|
53997
|
+
this.tableColumns = _$1.cloneDeep(this.cloneColumns);
|
|
53983
53998
|
this.checkAll = false;
|
|
53984
53999
|
this.handleCheckAll();
|
|
53985
54000
|
this.optionDropdownVisible = false;
|
|
@@ -53990,37 +54005,82 @@ const __vue2_script$11 = {
|
|
|
53990
54005
|
this.hackReset = true;
|
|
53991
54006
|
});
|
|
53992
54007
|
},
|
|
53993
|
-
renderSumRow: _.debounce(function() {
|
|
53994
|
-
|
|
53995
|
-
|
|
53996
|
-
|
|
53997
|
-
|
|
53998
|
-
|
|
53999
|
-
|
|
54000
|
-
|
|
54001
|
-
|
|
54002
|
-
|
|
54003
|
-
|
|
54004
|
-
|
|
54005
|
-
|
|
54006
|
-
|
|
54007
|
-
|
|
54008
|
-
|
|
54009
|
-
|
|
54010
|
-
|
|
54011
|
-
Object.keys(row).forEach((key) => {
|
|
54012
|
-
if (row[key] !== null) {
|
|
54013
|
-
acc[key] = (acc[key] || 0) + parseFloat(row[key] || 0);
|
|
54008
|
+
renderSumRow: _$1.debounce(async function() {
|
|
54009
|
+
var _a;
|
|
54010
|
+
let hasSumRow = _$1.some(this.flatColumns, (item2) => item2.isSum);
|
|
54011
|
+
if (hasSumRow) {
|
|
54012
|
+
console.time("calcSum");
|
|
54013
|
+
let sumCols = _$1.filter(this.flatColumns, (item2) => item2.isSum);
|
|
54014
|
+
let sumCalcCols = _$1.remove(sumCols, (item2) => isString(item2.isSum));
|
|
54015
|
+
let sumFuncCols = _$1.remove(sumCols, (item2) => item2.isSum instanceof Function);
|
|
54016
|
+
const sumCalcRuleMap = {};
|
|
54017
|
+
_$1.forEach(sumCalcCols, (col) => {
|
|
54018
|
+
addCalcRuleMap(sumCalcRuleMap, col.isSum, col.field || col.key);
|
|
54019
|
+
});
|
|
54020
|
+
let sumData = {};
|
|
54021
|
+
for (let i = 0; i < this.flatColumns.length; i++) {
|
|
54022
|
+
if (!["checkbox", "radios", "index"].includes((_a = this.flatColumns[i]) == null ? void 0 : _a.type)) {
|
|
54023
|
+
let colTmp = this.flatColumns[i];
|
|
54024
|
+
sumData[colTmp.field || colTmp.key] = "\u5408\u8BA1";
|
|
54025
|
+
break;
|
|
54014
54026
|
}
|
|
54027
|
+
}
|
|
54028
|
+
sumCols.forEach((d) => sumData[d.field || d.key] = 0);
|
|
54029
|
+
sumData = _$1.reduce(
|
|
54030
|
+
this.rowDataFiltered,
|
|
54031
|
+
(s, d, idx) => {
|
|
54032
|
+
sumCols.forEach((dd) => {
|
|
54033
|
+
if (isString(dd.isSum))
|
|
54034
|
+
return;
|
|
54035
|
+
let field = dd.field || dd.key;
|
|
54036
|
+
let rowMergeInfo = this.tableRowSpanMergeIndexMap[field];
|
|
54037
|
+
let mergedRows = [];
|
|
54038
|
+
_$1.forEach(rowMergeInfo, (v, k) => {
|
|
54039
|
+
let rows2 = _$1.range(k, parseInt(k) + v);
|
|
54040
|
+
mergedRows.push(...rows2.slice(1));
|
|
54041
|
+
});
|
|
54042
|
+
if (!mergedRows.includes(idx)) {
|
|
54043
|
+
sumData[field] = _$1.round(
|
|
54044
|
+
sumData[field] + (!d[field] || isNaN(d[field]) ? 0 : parseFloat(d[field])),
|
|
54045
|
+
6
|
|
54046
|
+
);
|
|
54047
|
+
}
|
|
54048
|
+
});
|
|
54049
|
+
return s;
|
|
54050
|
+
},
|
|
54051
|
+
sumData
|
|
54052
|
+
);
|
|
54053
|
+
_$1.forEach(sumFuncCols, (d) => {
|
|
54054
|
+
sumData[d.field || d.key] = d.isSum(this.rowDataFiltered, d);
|
|
54015
54055
|
});
|
|
54016
|
-
|
|
54017
|
-
|
|
54018
|
-
|
|
54019
|
-
|
|
54020
|
-
|
|
54056
|
+
let sumRows = [sumData];
|
|
54057
|
+
let calcRules = {};
|
|
54058
|
+
_$1.forEach(sumCalcRuleMap, (v, k) => {
|
|
54059
|
+
_$1.merge(calcRules, v);
|
|
54060
|
+
});
|
|
54061
|
+
let rules = [];
|
|
54062
|
+
_$1.forEach(calcRules, (v, k) => {
|
|
54063
|
+
var _a2;
|
|
54064
|
+
let column = _$1.find(sumCalcCols, (d) => {
|
|
54065
|
+
return d.field == k || d.key == k;
|
|
54066
|
+
});
|
|
54067
|
+
rules.push({
|
|
54068
|
+
rltKey: k,
|
|
54069
|
+
ast: v,
|
|
54070
|
+
precision: ((_a2 = column == null ? void 0 : column.cellRendererParams) == null ? void 0 : _a2.scale) || 2,
|
|
54071
|
+
errRtn: 0
|
|
54072
|
+
});
|
|
54073
|
+
});
|
|
54074
|
+
let options = { calcRules: rules };
|
|
54075
|
+
calcDatas(sumRows, options);
|
|
54076
|
+
this.topRows = this.pinnedTopRowDataWithUnit ? _$1.concat(this.pinnedTopRowDataWithUnit, sumRows) : sumRows;
|
|
54077
|
+
console.timeEnd("calcSum");
|
|
54078
|
+
} else {
|
|
54079
|
+
this.topRows = this.pinnedTopRowDataWithUnit;
|
|
54080
|
+
}
|
|
54021
54081
|
}, 5),
|
|
54022
54082
|
async renderTreeData(val) {
|
|
54023
|
-
this.treeData = _.some(val, (d) => {
|
|
54083
|
+
this.treeData = _$1.some(val, (d) => {
|
|
54024
54084
|
var _a, _b;
|
|
54025
54085
|
return ((_a = d.children) == null ? void 0 : _a.length) || ((_b = d.treeLevelFlag) == null ? void 0 : _b.length);
|
|
54026
54086
|
});
|
|
@@ -54036,18 +54096,18 @@ const __vue2_script$11 = {
|
|
|
54036
54096
|
return val;
|
|
54037
54097
|
},
|
|
54038
54098
|
renderTreeFlag(datas) {
|
|
54039
|
-
let treeColDef = _.find(this.columns, { tree: true });
|
|
54099
|
+
let treeColDef = _$1.find(this.columns, { tree: true });
|
|
54040
54100
|
deepEach$4(null, datas, (d, parentNode, idx) => {
|
|
54041
54101
|
d.uuid = d.uuid || uuid();
|
|
54042
54102
|
});
|
|
54043
|
-
if (_.isEmpty(treeColDef)) {
|
|
54103
|
+
if (_$1.isEmpty(treeColDef)) {
|
|
54044
54104
|
return;
|
|
54045
54105
|
}
|
|
54046
54106
|
let treeCol = (treeColDef == null ? void 0 : treeColDef.field) || (treeColDef == null ? void 0 : treeColDef.key);
|
|
54047
54107
|
deepEach$4(null, datas, (d, parentNode, idx) => {
|
|
54048
54108
|
d.treeLevelFlag = parentNode ? [...parentNode.treeLevelFlag, d[treeCol]] : [d[treeCol]];
|
|
54049
54109
|
if (parentNode) {
|
|
54050
|
-
let pPath = parentNode.path ? _.cloneDeep(parentNode.path) : [parentNode.uuid];
|
|
54110
|
+
let pPath = parentNode.path ? _$1.cloneDeep(parentNode.path) : [parentNode.uuid];
|
|
54051
54111
|
pPath.push(d.uuid);
|
|
54052
54112
|
d.path = pPath;
|
|
54053
54113
|
} else {
|
|
@@ -54107,10 +54167,10 @@ const __vue2_script$11 = {
|
|
|
54107
54167
|
setUnitType(unitType) {
|
|
54108
54168
|
this.unitType = unitType;
|
|
54109
54169
|
},
|
|
54110
|
-
toggleUnitIfNeeded: _.debounce(async function() {
|
|
54170
|
+
toggleUnitIfNeeded: _$1.debounce(async function() {
|
|
54111
54171
|
setTimeout(() => {
|
|
54112
54172
|
if (this.pinnedTopRowDataWithUnit && this.pinnedTopRowDataWithUnit.length) {
|
|
54113
|
-
let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
|
|
54173
|
+
let pinnedTopRowDataWithUnitTmp = _$1.cloneDeep(this.pinnedTopRowDataWithUnit);
|
|
54114
54174
|
if (this.unitType != this.defaultUnitType) {
|
|
54115
54175
|
pinnedTopRowDataWithUnitTmp.forEach((d) => {
|
|
54116
54176
|
this.switchCols.forEach((dd) => {
|
|
@@ -54121,7 +54181,7 @@ const __vue2_script$11 = {
|
|
|
54121
54181
|
this.renderSumRow();
|
|
54122
54182
|
}
|
|
54123
54183
|
}
|
|
54124
|
-
let datasTmp = _.cloneDeep(this.tableData);
|
|
54184
|
+
let datasTmp = _$1.cloneDeep(this.tableData);
|
|
54125
54185
|
if (this.unitType != this.defaultUnitType) {
|
|
54126
54186
|
datasTmp.forEach((d) => {
|
|
54127
54187
|
this.switchCols.forEach((dd) => {
|
|
@@ -54163,7 +54223,7 @@ const __vue2_script$11 = {
|
|
|
54163
54223
|
if (this.unitType == "X") {
|
|
54164
54224
|
return this.tableData;
|
|
54165
54225
|
} else {
|
|
54166
|
-
let datasTmp = _.cloneDeep(this.tableData);
|
|
54226
|
+
let datasTmp = _$1.cloneDeep(this.tableData);
|
|
54167
54227
|
datasTmp.forEach((d) => {
|
|
54168
54228
|
this.switchCols.forEach((dd) => {
|
|
54169
54229
|
changeCellUnit(this.unitType, "X", d, dd);
|
|
@@ -54176,7 +54236,7 @@ const __vue2_script$11 = {
|
|
|
54176
54236
|
if (this.unitType == "WZ") {
|
|
54177
54237
|
return this.tableData;
|
|
54178
54238
|
} else {
|
|
54179
|
-
let datasTmp = _.cloneDeep(this.tableData);
|
|
54239
|
+
let datasTmp = _$1.cloneDeep(this.tableData);
|
|
54180
54240
|
datasTmp.forEach((d) => {
|
|
54181
54241
|
this.switchCols.forEach((dd) => {
|
|
54182
54242
|
changeCellUnit(this.unitType, "WZ", d, dd);
|
|
@@ -54189,7 +54249,7 @@ const __vue2_script$11 = {
|
|
|
54189
54249
|
if (this.unitType == "X") {
|
|
54190
54250
|
return this.topRows;
|
|
54191
54251
|
} else {
|
|
54192
|
-
let datasTmp = _.cloneDeep(this.topRows);
|
|
54252
|
+
let datasTmp = _$1.cloneDeep(this.topRows);
|
|
54193
54253
|
datasTmp.forEach((d) => {
|
|
54194
54254
|
this.switchCols.forEach((dd) => {
|
|
54195
54255
|
changeCellUnit(this.unitType, "X", d, dd);
|
|
@@ -54202,7 +54262,7 @@ const __vue2_script$11 = {
|
|
|
54202
54262
|
if (this.unitType == "WZ") {
|
|
54203
54263
|
return this.topRows;
|
|
54204
54264
|
} else {
|
|
54205
|
-
let datasTmp = _.cloneDeep(this.topRows);
|
|
54265
|
+
let datasTmp = _$1.cloneDeep(this.topRows);
|
|
54206
54266
|
datasTmp.forEach((d) => {
|
|
54207
54267
|
this.switchCols.forEach((dd) => {
|
|
54208
54268
|
changeCellUnit(this.unitType, "WZ", d, dd);
|
|
@@ -54217,7 +54277,7 @@ const __vue2_script$11 = {
|
|
|
54217
54277
|
return;
|
|
54218
54278
|
}
|
|
54219
54279
|
this.updating = true;
|
|
54220
|
-
const valueDataMap = _.reduce(
|
|
54280
|
+
const valueDataMap = _$1.reduce(
|
|
54221
54281
|
this.value || [],
|
|
54222
54282
|
(rlt, item2) => {
|
|
54223
54283
|
Object.assign(rlt, { [item2[this.rowKey]]: item2 });
|
|
@@ -54322,7 +54382,7 @@ function suppressNavigation(params) {
|
|
|
54322
54382
|
}
|
|
54323
54383
|
function deepEach$3(parentNode, list, callback) {
|
|
54324
54384
|
if (Array.isArray(list) && list.length) {
|
|
54325
|
-
_.forEach(list, (node, idx) => {
|
|
54385
|
+
_$1.forEach(list, (node, idx) => {
|
|
54326
54386
|
let breakDeep = false;
|
|
54327
54387
|
if (typeof callback === "function") {
|
|
54328
54388
|
try {
|
|
@@ -54544,7 +54604,7 @@ const __vue2_script$10 = {
|
|
|
54544
54604
|
isRevertingOldValue: false,
|
|
54545
54605
|
btnSel: "",
|
|
54546
54606
|
tableDataSrc: [],
|
|
54547
|
-
tableData: _.cloneDeep(this.value),
|
|
54607
|
+
tableData: _$1.cloneDeep(this.value),
|
|
54548
54608
|
tableWidth: this.width,
|
|
54549
54609
|
tableHeight: this.height,
|
|
54550
54610
|
tableLoading: this.loading,
|
|
@@ -54600,24 +54660,24 @@ const __vue2_script$10 = {
|
|
|
54600
54660
|
},
|
|
54601
54661
|
computed: {
|
|
54602
54662
|
mergeIndexCol() {
|
|
54603
|
-
let mergeIndex = _.find(this.columns, (d) => {
|
|
54663
|
+
let mergeIndex = _$1.find(this.columns, (d) => {
|
|
54604
54664
|
return d.autoMergeRow === true;
|
|
54605
54665
|
});
|
|
54606
54666
|
return (mergeIndex == null ? void 0 : mergeIndex.key) || (mergeIndex == null ? void 0 : mergeIndex.field);
|
|
54607
54667
|
},
|
|
54608
54668
|
mergeColumns() {
|
|
54609
|
-
let rlt = _.filter(this.columns, (d) => {
|
|
54669
|
+
let rlt = _$1.filter(this.columns, (d) => {
|
|
54610
54670
|
return !!d.autoMergeRow;
|
|
54611
54671
|
}).map((d) => d.key || d.field);
|
|
54612
54672
|
return (rlt == null ? void 0 : rlt.length) ? rlt : void 0;
|
|
54613
54673
|
},
|
|
54614
54674
|
paramRightUnit() {
|
|
54615
|
-
return _.some(this.flatColumns, (d) => {
|
|
54675
|
+
return _$1.some(this.flatColumns, (d) => {
|
|
54616
54676
|
return d.isSwitchUnit;
|
|
54617
54677
|
}) ? "\u5355\u4F4D\uFF1A" + (this.unitType == "X" ? "\u7BB1" : "\u4E07\u652F") : "";
|
|
54618
54678
|
},
|
|
54619
54679
|
isEditTable() {
|
|
54620
|
-
return _.some(this.flatColumns, (d) => {
|
|
54680
|
+
return _$1.some(this.flatColumns, (d) => {
|
|
54621
54681
|
return ["input", "select", "treeselect"].includes(d.type);
|
|
54622
54682
|
});
|
|
54623
54683
|
},
|
|
@@ -54633,7 +54693,7 @@ const __vue2_script$10 = {
|
|
|
54633
54693
|
},
|
|
54634
54694
|
columnCalcMap() {
|
|
54635
54695
|
let rlt = {};
|
|
54636
|
-
_.forEach(this.flatColumns, (d) => {
|
|
54696
|
+
_$1.forEach(this.flatColumns, (d) => {
|
|
54637
54697
|
if (d.calcRule) {
|
|
54638
54698
|
addCalcRuleMap(rlt, d.calcRule, d.field || d.key);
|
|
54639
54699
|
}
|
|
@@ -54694,7 +54754,7 @@ const __vue2_script$10 = {
|
|
|
54694
54754
|
});
|
|
54695
54755
|
let mergeRowsRlt = list.filter((arr) => arr.length !== 1);
|
|
54696
54756
|
let columnRowSpan = {};
|
|
54697
|
-
_.forEach(mergeRowsRlt, (d) => {
|
|
54757
|
+
_$1.forEach(mergeRowsRlt, (d) => {
|
|
54698
54758
|
columnRowSpan[d[0] + ""] = d.length;
|
|
54699
54759
|
});
|
|
54700
54760
|
map[column.field] = columnRowSpan;
|
|
@@ -54716,13 +54776,13 @@ const __vue2_script$10 = {
|
|
|
54716
54776
|
watch: {
|
|
54717
54777
|
pinnedTopRowData: {
|
|
54718
54778
|
handler: function() {
|
|
54719
|
-
this.pinnedTopRowDataWithUnit = _.cloneDeep(this.pinnedTopRowData);
|
|
54779
|
+
this.pinnedTopRowDataWithUnit = _$1.cloneDeep(this.pinnedTopRowData);
|
|
54720
54780
|
this.renderSumRow();
|
|
54721
54781
|
},
|
|
54722
54782
|
deep: true
|
|
54723
54783
|
},
|
|
54724
54784
|
unitType(val, oldValue) {
|
|
54725
|
-
let datasTmp = _.cloneDeep(this.tableData);
|
|
54785
|
+
let datasTmp = _$1.cloneDeep(this.tableData);
|
|
54726
54786
|
datasTmp.forEach((d) => {
|
|
54727
54787
|
this.switchCols.forEach((dd) => {
|
|
54728
54788
|
changeCellUnit(oldValue, val, d, dd);
|
|
@@ -54730,7 +54790,7 @@ const __vue2_script$10 = {
|
|
|
54730
54790
|
});
|
|
54731
54791
|
this.tableData = datasTmp;
|
|
54732
54792
|
if (this.pinnedTopRowDataWithUnit && this.pinnedTopRowDataWithUnit.length) {
|
|
54733
|
-
let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
|
|
54793
|
+
let pinnedTopRowDataWithUnitTmp = _$1.cloneDeep(this.pinnedTopRowDataWithUnit);
|
|
54734
54794
|
pinnedTopRowDataWithUnitTmp.forEach((d) => {
|
|
54735
54795
|
this.switchCols.forEach((dd) => {
|
|
54736
54796
|
changeCellUnit(oldValue, val, d, dd);
|
|
@@ -54772,7 +54832,7 @@ const __vue2_script$10 = {
|
|
|
54772
54832
|
value: {
|
|
54773
54833
|
async handler(val) {
|
|
54774
54834
|
if (!this.updating) {
|
|
54775
|
-
if (!_.some(val, (d) => {
|
|
54835
|
+
if (!_$1.some(val, (d) => {
|
|
54776
54836
|
var _a;
|
|
54777
54837
|
return (_a = d.treeLevelFlag) == null ? void 0 : _a.length;
|
|
54778
54838
|
})) {
|
|
@@ -54788,13 +54848,13 @@ const __vue2_script$10 = {
|
|
|
54788
54848
|
this.overlayNoRowsTemplate = '<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>';
|
|
54789
54849
|
this.updating = true;
|
|
54790
54850
|
this.renderSumRow();
|
|
54791
|
-
let isTreeTable = _.some(this.columns, { tree: true });
|
|
54851
|
+
let isTreeTable = _$1.some(this.columns, { tree: true });
|
|
54792
54852
|
if (isTreeTable) {
|
|
54793
|
-
let treeDataClone = _.cloneDeep(val);
|
|
54853
|
+
let treeDataClone = _$1.cloneDeep(val);
|
|
54794
54854
|
let rlt = generateTreeByNodes$1(treeDataClone);
|
|
54795
54855
|
this.$emit("input", rlt);
|
|
54796
54856
|
} else {
|
|
54797
|
-
this.$emit("input", _.cloneDeep(val));
|
|
54857
|
+
this.$emit("input", _$1.cloneDeep(val));
|
|
54798
54858
|
}
|
|
54799
54859
|
this.$nextTick(() => {
|
|
54800
54860
|
this.updating = false;
|
|
@@ -54835,20 +54895,20 @@ const __vue2_script$10 = {
|
|
|
54835
54895
|
var _a;
|
|
54836
54896
|
this.tableRef = this;
|
|
54837
54897
|
this.unitType = this.defaultTableUnitType;
|
|
54838
|
-
this.cloneColumns = this.tableColumnsInner(_.cloneDeep(this.columns) || []);
|
|
54839
|
-
this.cloneColumns2 = this.tableColumnsInner(_.cloneDeep(this.columns) || []);
|
|
54840
|
-
this.tableColumns = _.cloneDeep(this.cloneColumns);
|
|
54841
|
-
this.showUnitSwitch = _.some(this.flatColumns, { isSwitchUnit: true });
|
|
54842
|
-
this.showZeroSwitch = _.some(this.flatColumns, (d) => {
|
|
54898
|
+
this.cloneColumns = this.tableColumnsInner(_$1.cloneDeep(this.columns) || []);
|
|
54899
|
+
this.cloneColumns2 = this.tableColumnsInner(_$1.cloneDeep(this.columns) || []);
|
|
54900
|
+
this.tableColumns = _$1.cloneDeep(this.cloneColumns);
|
|
54901
|
+
this.showUnitSwitch = _$1.some(this.flatColumns, { isSwitchUnit: true });
|
|
54902
|
+
this.showZeroSwitch = _$1.some(this.flatColumns, (d) => {
|
|
54843
54903
|
return !!d.isSwitchZero;
|
|
54844
54904
|
});
|
|
54845
|
-
this.switchCols = _.filter(this.flatColumns, { isSwitchUnit: true }).map(
|
|
54905
|
+
this.switchCols = _$1.filter(this.flatColumns, { isSwitchUnit: true }).map(
|
|
54846
54906
|
(d) => d.field || d.key
|
|
54847
54907
|
);
|
|
54848
|
-
let switchZeroCol = _.find(this.flatColumns, (d) => {
|
|
54908
|
+
let switchZeroCol = _$1.find(this.flatColumns, (d) => {
|
|
54849
54909
|
return !!d.isSwitchZero;
|
|
54850
54910
|
});
|
|
54851
|
-
let switchZeroTitle = ((_a = _.find(this.flatColumns, (d) => {
|
|
54911
|
+
let switchZeroTitle = ((_a = _$1.find(this.flatColumns, (d) => {
|
|
54852
54912
|
return !!d.isSwitchZero;
|
|
54853
54913
|
})) == null ? void 0 : _a.isSwitchZero) || "\u662F\u5426\u5C55\u793A\u8F93\u5165\u91CF\u4E3A\u96F6\u7684\u6570\u636E";
|
|
54854
54914
|
this.switchZeroTitle = switchZeroTitle;
|
|
@@ -54894,9 +54954,9 @@ const __vue2_script$10 = {
|
|
|
54894
54954
|
name: "\u5168\u90E8\u9009\u53CD",
|
|
54895
54955
|
action: () => {
|
|
54896
54956
|
let selRows = this.getSelection();
|
|
54897
|
-
let allRows = _.cloneDeep(this.rowDataFiltered);
|
|
54898
|
-
_.remove(allRows, (d) => {
|
|
54899
|
-
return _.some(selRows, (d2) => d2.uuid === d.uuid);
|
|
54957
|
+
let allRows = _$1.cloneDeep(this.rowDataFiltered);
|
|
54958
|
+
_$1.remove(allRows, (d) => {
|
|
54959
|
+
return _$1.some(selRows, (d2) => d2.uuid === d.uuid);
|
|
54900
54960
|
});
|
|
54901
54961
|
this.setSelection(allRows, true);
|
|
54902
54962
|
}
|
|
@@ -54934,16 +54994,16 @@ const __vue2_script$10 = {
|
|
|
54934
54994
|
return classRlt;
|
|
54935
54995
|
},
|
|
54936
54996
|
async columnsHander(val) {
|
|
54937
|
-
this.showUnitSwitch = _.some(this.flatColumns, { isSwitchUnit: true });
|
|
54938
|
-
this.switchCols = _.filter(this.flatColumns, { isSwitchUnit: true }).map(
|
|
54997
|
+
this.showUnitSwitch = _$1.some(this.flatColumns, { isSwitchUnit: true });
|
|
54998
|
+
this.switchCols = _$1.filter(this.flatColumns, { isSwitchUnit: true }).map(
|
|
54939
54999
|
(d) => d.field || d.key
|
|
54940
55000
|
);
|
|
54941
|
-
this.cloneColumns = this.tableColumnsInner(_.cloneDeep(val) || []);
|
|
54942
|
-
this.cloneColumns2 = this.tableColumnsInner(_.cloneDeep(val) || []);
|
|
55001
|
+
this.cloneColumns = this.tableColumnsInner(_$1.cloneDeep(val) || []);
|
|
55002
|
+
this.cloneColumns2 = this.tableColumnsInner(_$1.cloneDeep(val) || []);
|
|
54943
55003
|
this.currentPage = 1;
|
|
54944
55004
|
this.tableRefresh(true);
|
|
54945
55005
|
this.columnsFilter();
|
|
54946
|
-
let columns = _.cloneDeep(this.cloneColumns);
|
|
55006
|
+
let columns = _$1.cloneDeep(this.cloneColumns);
|
|
54947
55007
|
this.tableColumns = columns;
|
|
54948
55008
|
this.checkAllGroup = val.map((d) => d.title);
|
|
54949
55009
|
this.refreshTable = true;
|
|
@@ -54951,16 +55011,16 @@ const __vue2_script$10 = {
|
|
|
54951
55011
|
this.refreshTable = false;
|
|
54952
55012
|
},
|
|
54953
55013
|
calcRulesData(datas) {
|
|
54954
|
-
if (!_.isEmpty(this.columnCalcMap)) {
|
|
54955
|
-
let valueClone = _.cloneDeep(datas || this.value);
|
|
55014
|
+
if (!_$1.isEmpty(this.columnCalcMap)) {
|
|
55015
|
+
let valueClone = _$1.cloneDeep(datas || this.value);
|
|
54956
55016
|
let calcRules = {};
|
|
54957
|
-
_.forEach(this.columnCalcMap, (v, k) => {
|
|
54958
|
-
_.merge(calcRules, v);
|
|
55017
|
+
_$1.forEach(this.columnCalcMap, (v, k) => {
|
|
55018
|
+
_$1.merge(calcRules, v);
|
|
54959
55019
|
});
|
|
54960
55020
|
let rules = [];
|
|
54961
|
-
_.forEach(calcRules, (v, k) => {
|
|
55021
|
+
_$1.forEach(calcRules, (v, k) => {
|
|
54962
55022
|
var _a;
|
|
54963
|
-
let column = _.find(this.flatColumns, (d) => {
|
|
55023
|
+
let column = _$1.find(this.flatColumns, (d) => {
|
|
54964
55024
|
return d.field == k || d.key == k;
|
|
54965
55025
|
});
|
|
54966
55026
|
rules.push({
|
|
@@ -54975,7 +55035,7 @@ const __vue2_script$10 = {
|
|
|
54975
55035
|
this.tableData = valueClone;
|
|
54976
55036
|
this.totalNumber = valueClone.length;
|
|
54977
55037
|
} else {
|
|
54978
|
-
this.tableData = _.cloneDeep(datas || this.value);
|
|
55038
|
+
this.tableData = _$1.cloneDeep(datas || this.value);
|
|
54979
55039
|
this.totalNumber = this.tableData.length;
|
|
54980
55040
|
}
|
|
54981
55041
|
},
|
|
@@ -55021,11 +55081,11 @@ const __vue2_script$10 = {
|
|
|
55021
55081
|
this.$listeners.cellDoubleClicked(event);
|
|
55022
55082
|
} else {
|
|
55023
55083
|
let colClicked = event.colDef || {};
|
|
55024
|
-
colClicked = _.find(
|
|
55084
|
+
colClicked = _$1.find(
|
|
55025
55085
|
this.columns,
|
|
55026
55086
|
(d) => colClicked.key && d.key == colClicked.key || colClicked.field && d.field == colClicked.field
|
|
55027
55087
|
);
|
|
55028
|
-
let col = _.find(this.columns, { type: "link" });
|
|
55088
|
+
let col = _$1.find(this.columns, { type: "link" });
|
|
55029
55089
|
if (col && (!colClicked.type || ["span", "tooltip", "enum"].includes(colClicked.type))) {
|
|
55030
55090
|
if (col.cellRendererParams.onClick instanceof Function) {
|
|
55031
55091
|
col.cellRendererParams.onClick(event.data);
|
|
@@ -55057,11 +55117,11 @@ const __vue2_script$10 = {
|
|
|
55057
55117
|
let topData = [];
|
|
55058
55118
|
if (sortParams.order === void 0) {
|
|
55059
55119
|
if (this.dataApi) {
|
|
55060
|
-
let tableDataTmp = _.cloneDeep(this.tableData);
|
|
55061
|
-
tableDataTmp = _.orderBy(tableDataTmp, ["_initialseq"], ["asc"]);
|
|
55120
|
+
let tableDataTmp = _$1.cloneDeep(this.tableData);
|
|
55121
|
+
tableDataTmp = _$1.orderBy(tableDataTmp, ["_initialseq"], ["asc"]);
|
|
55062
55122
|
this.tableData = tableDataTmp;
|
|
55063
55123
|
} else {
|
|
55064
|
-
this.tableData = _.cloneDeep(this.value);
|
|
55124
|
+
this.tableData = _$1.cloneDeep(this.value);
|
|
55065
55125
|
}
|
|
55066
55126
|
} else {
|
|
55067
55127
|
if (this.noSortLine > -1) {
|
|
@@ -55129,31 +55189,31 @@ const __vue2_script$10 = {
|
|
|
55129
55189
|
let autoMergeCols = this.flatColumns.filter((d) => d.autoMergeRow);
|
|
55130
55190
|
if (autoMergeCols == null ? void 0 : autoMergeCols.length) {
|
|
55131
55191
|
let mainCol = ((_a = autoMergeCols[0]) == null ? void 0 : _a.field) || ((_b = autoMergeCols[0]) == null ? void 0 : _b.key);
|
|
55132
|
-
_.forEach(autoMergeCols, (d) => {
|
|
55192
|
+
_$1.forEach(autoMergeCols, (d) => {
|
|
55133
55193
|
if (typeof d.autoMergeRow == "string") {
|
|
55134
55194
|
mainCol = d.autoMergeRow;
|
|
55135
55195
|
}
|
|
55136
55196
|
});
|
|
55137
55197
|
let rowSpanDef = this.tableRowSpanMergeIndexMap[mainCol];
|
|
55138
55198
|
let idxArrEnum = {};
|
|
55139
|
-
_.forEach(rowSpanDef, (v, k) => {
|
|
55199
|
+
_$1.forEach(rowSpanDef, (v, k) => {
|
|
55140
55200
|
let begin = parseInt(k);
|
|
55141
55201
|
let end = begin + v;
|
|
55142
|
-
let idxArr2 = _.range(begin, end);
|
|
55202
|
+
let idxArr2 = _$1.range(begin, end);
|
|
55143
55203
|
for (let i = begin; i < end; i++) {
|
|
55144
55204
|
idxArrEnum[i] = idxArr2;
|
|
55145
55205
|
}
|
|
55146
55206
|
});
|
|
55147
55207
|
let idxUuidEnum = {};
|
|
55148
|
-
_.forEach(this.rowDataFiltered, (row, idx) => {
|
|
55208
|
+
_$1.forEach(this.rowDataFiltered, (row, idx) => {
|
|
55149
55209
|
idxUuidEnum[idx + ""] = row.uuid;
|
|
55150
55210
|
});
|
|
55151
55211
|
let idxArr = idxArrEnum[params.node.rowIndex] || [];
|
|
55152
55212
|
if (!params.node.selected) {
|
|
55153
55213
|
let selRows = this.getSelection();
|
|
55154
55214
|
if (selRows.length > 0) {
|
|
55155
|
-
_.forEach(idxArr, (index2) => {
|
|
55156
|
-
_.remove(selRows, (row, idx) => {
|
|
55215
|
+
_$1.forEach(idxArr, (index2) => {
|
|
55216
|
+
_$1.remove(selRows, (row, idx) => {
|
|
55157
55217
|
return row.uuid == idxUuidEnum[index2 + ""];
|
|
55158
55218
|
});
|
|
55159
55219
|
});
|
|
@@ -55437,7 +55497,7 @@ const __vue2_script$10 = {
|
|
|
55437
55497
|
agColumn.valueSetter = (params) => {
|
|
55438
55498
|
params.data[column.field || column.key] = params.newValue;
|
|
55439
55499
|
let rules = [];
|
|
55440
|
-
_.forEach(calcRules, (v, k) => {
|
|
55500
|
+
_$1.forEach(calcRules, (v, k) => {
|
|
55441
55501
|
var _a2;
|
|
55442
55502
|
rules.push({
|
|
55443
55503
|
rltKey: k,
|
|
@@ -55488,7 +55548,7 @@ const __vue2_script$10 = {
|
|
|
55488
55548
|
}
|
|
55489
55549
|
}
|
|
55490
55550
|
if (!isChildren) {
|
|
55491
|
-
this.cloneColumns2 = _.cloneDeep(rlt);
|
|
55551
|
+
this.cloneColumns2 = _$1.cloneDeep(rlt);
|
|
55492
55552
|
}
|
|
55493
55553
|
return rlt;
|
|
55494
55554
|
},
|
|
@@ -55519,11 +55579,11 @@ const __vue2_script$10 = {
|
|
|
55519
55579
|
}
|
|
55520
55580
|
}
|
|
55521
55581
|
if (selectedColumn.length > 0) {
|
|
55522
|
-
this.cloneColumns = _.cloneDeep(selectedColumn);
|
|
55582
|
+
this.cloneColumns = _$1.cloneDeep(selectedColumn);
|
|
55523
55583
|
} else {
|
|
55524
|
-
this.cloneColumns = _.cloneDeep(this.cloneColumns2);
|
|
55584
|
+
this.cloneColumns = _$1.cloneDeep(this.cloneColumns2);
|
|
55525
55585
|
}
|
|
55526
|
-
this.tableColumns = _.cloneDeep(this.cloneColumns);
|
|
55586
|
+
this.tableColumns = _$1.cloneDeep(this.cloneColumns);
|
|
55527
55587
|
if (this.cloneColumns2.length != this.cloneColumns.length) {
|
|
55528
55588
|
this.checkAll = false;
|
|
55529
55589
|
}
|
|
@@ -55620,8 +55680,8 @@ const __vue2_script$10 = {
|
|
|
55620
55680
|
}
|
|
55621
55681
|
}
|
|
55622
55682
|
localStorage.setItem("tableColumns", JSON.stringify(localColumnList));
|
|
55623
|
-
this.cloneColumns = _.cloneDeep(this.cloneColumns2);
|
|
55624
|
-
this.tableColumns = _.cloneDeep(this.cloneColumns);
|
|
55683
|
+
this.cloneColumns = _$1.cloneDeep(this.cloneColumns2);
|
|
55684
|
+
this.tableColumns = _$1.cloneDeep(this.cloneColumns);
|
|
55625
55685
|
this.checkAll = false;
|
|
55626
55686
|
this.handleCheckAll();
|
|
55627
55687
|
this.optionDropdownVisible = false;
|
|
@@ -55632,7 +55692,7 @@ const __vue2_script$10 = {
|
|
|
55632
55692
|
this.hackReset = true;
|
|
55633
55693
|
});
|
|
55634
55694
|
},
|
|
55635
|
-
renderSumRow: _.debounce(async function() {
|
|
55695
|
+
renderSumRow: _$1.debounce(async function() {
|
|
55636
55696
|
let hasSumRow = this.flatColumns.some((item2) => item2.isSum);
|
|
55637
55697
|
if (hasSumRow) {
|
|
55638
55698
|
console.time("calcSum");
|
|
@@ -55643,24 +55703,24 @@ const __vue2_script$10 = {
|
|
|
55643
55703
|
break;
|
|
55644
55704
|
}
|
|
55645
55705
|
}
|
|
55646
|
-
let
|
|
55647
|
-
let sumCalcCols = [],
|
|
55648
|
-
|
|
55706
|
+
let sumCols = this.flatColumns.filter((item2) => item2.isSum);
|
|
55707
|
+
let sumCalcCols = [], sumFuncCols = [];
|
|
55708
|
+
sumCols.forEach((col) => {
|
|
55649
55709
|
if (typeof col.isSum === "string")
|
|
55650
55710
|
sumCalcCols.push(col);
|
|
55651
55711
|
else if (col.isSum instanceof Function)
|
|
55652
|
-
|
|
55712
|
+
sumFuncCols.push(col);
|
|
55653
55713
|
});
|
|
55654
55714
|
const sumCalcRuleMap = {};
|
|
55655
55715
|
sumCalcCols.forEach((col) => {
|
|
55656
55716
|
addCalcRuleMap(sumCalcRuleMap, col.isSum, col.field || col.key);
|
|
55657
55717
|
});
|
|
55658
|
-
|
|
55718
|
+
sumCols.forEach((col) => {
|
|
55659
55719
|
if (!((col.field || col.key) in sumData))
|
|
55660
55720
|
sumData[col.field || col.key] = 0;
|
|
55661
55721
|
});
|
|
55662
55722
|
this.rowDataFiltered.forEach((d) => {
|
|
55663
|
-
|
|
55723
|
+
sumCols.forEach((dd) => {
|
|
55664
55724
|
if (typeof dd.isSum === "string")
|
|
55665
55725
|
return;
|
|
55666
55726
|
let field = dd.field || dd.key;
|
|
@@ -55670,18 +55730,18 @@ const __vue2_script$10 = {
|
|
|
55670
55730
|
}
|
|
55671
55731
|
});
|
|
55672
55732
|
});
|
|
55673
|
-
|
|
55733
|
+
sumFuncCols.forEach((col) => {
|
|
55674
55734
|
sumData[col.field || col.key] = col.isSum(this.rowDataFiltered, col);
|
|
55675
55735
|
});
|
|
55676
55736
|
let sumRows = [sumData];
|
|
55677
55737
|
let calcRules = {};
|
|
55678
|
-
_.forEach(sumCalcRuleMap, (v, k) => {
|
|
55679
|
-
_.merge(calcRules, v);
|
|
55738
|
+
_$1.forEach(sumCalcRuleMap, (v, k) => {
|
|
55739
|
+
_$1.merge(calcRules, v);
|
|
55680
55740
|
});
|
|
55681
55741
|
let rules = [];
|
|
55682
|
-
_.forEach(calcRules, (v, k) => {
|
|
55742
|
+
_$1.forEach(calcRules, (v, k) => {
|
|
55683
55743
|
var _a;
|
|
55684
|
-
let column = _.find(sumCalcCols, (d) => {
|
|
55744
|
+
let column = _$1.find(sumCalcCols, (d) => {
|
|
55685
55745
|
return d.field == k || d.key == k;
|
|
55686
55746
|
});
|
|
55687
55747
|
rules.push({
|
|
@@ -55693,7 +55753,7 @@ const __vue2_script$10 = {
|
|
|
55693
55753
|
});
|
|
55694
55754
|
let options = { calcRules: rules };
|
|
55695
55755
|
calcDatas(sumRows, options);
|
|
55696
|
-
this.topRows = this.pinnedTopRowDataWithUnit ? _.concat(this.pinnedTopRowDataWithUnit, sumRows) : sumRows;
|
|
55756
|
+
this.topRows = this.pinnedTopRowDataWithUnit ? _$1.concat(this.pinnedTopRowDataWithUnit, sumRows) : sumRows;
|
|
55697
55757
|
console.timeEnd("calcSum");
|
|
55698
55758
|
} else {
|
|
55699
55759
|
this.topRows = this.pinnedTopRowDataWithUnit;
|
|
@@ -55703,7 +55763,7 @@ const __vue2_script$10 = {
|
|
|
55703
55763
|
return typeof value === "object" || isNaN(value);
|
|
55704
55764
|
},
|
|
55705
55765
|
async renderTreeData(val) {
|
|
55706
|
-
this.treeData = _.some(val, (d) => {
|
|
55766
|
+
this.treeData = _$1.some(val, (d) => {
|
|
55707
55767
|
var _a, _b;
|
|
55708
55768
|
return ((_a = d.children) == null ? void 0 : _a.length) || ((_b = d.treeLevelFlag) == null ? void 0 : _b.length);
|
|
55709
55769
|
});
|
|
@@ -55719,18 +55779,18 @@ const __vue2_script$10 = {
|
|
|
55719
55779
|
return val;
|
|
55720
55780
|
},
|
|
55721
55781
|
renderTreeFlag(datas) {
|
|
55722
|
-
let treeColDef = _.find(this.columns, { tree: true });
|
|
55782
|
+
let treeColDef = _$1.find(this.columns, { tree: true });
|
|
55723
55783
|
deepEach$3(null, datas, (d, parentNode, idx) => {
|
|
55724
55784
|
d.uuid = d.uuid || uuid();
|
|
55725
55785
|
});
|
|
55726
|
-
if (_.isEmpty(treeColDef)) {
|
|
55786
|
+
if (_$1.isEmpty(treeColDef)) {
|
|
55727
55787
|
return;
|
|
55728
55788
|
}
|
|
55729
55789
|
let treeCol = (treeColDef == null ? void 0 : treeColDef.field) || (treeColDef == null ? void 0 : treeColDef.key);
|
|
55730
55790
|
deepEach$3(null, datas, (d, parentNode, idx) => {
|
|
55731
55791
|
d.treeLevelFlag = parentNode ? [...parentNode.treeLevelFlag, d[treeCol]] : [d[treeCol]];
|
|
55732
55792
|
if (parentNode) {
|
|
55733
|
-
let pPath = parentNode.path ? _.cloneDeep(parentNode.path) : [parentNode.uuid];
|
|
55793
|
+
let pPath = parentNode.path ? _$1.cloneDeep(parentNode.path) : [parentNode.uuid];
|
|
55734
55794
|
pPath.push(d.uuid);
|
|
55735
55795
|
d.path = pPath;
|
|
55736
55796
|
} else {
|
|
@@ -55790,10 +55850,10 @@ const __vue2_script$10 = {
|
|
|
55790
55850
|
setUnitType(unitType) {
|
|
55791
55851
|
this.unitType = unitType;
|
|
55792
55852
|
},
|
|
55793
|
-
toggleUnitIfNeeded: _.debounce(async function() {
|
|
55853
|
+
toggleUnitIfNeeded: _$1.debounce(async function() {
|
|
55794
55854
|
setTimeout(() => {
|
|
55795
55855
|
if (this.pinnedTopRowDataWithUnit && this.pinnedTopRowDataWithUnit.length) {
|
|
55796
|
-
let pinnedTopRowDataWithUnitTmp = _.cloneDeep(this.pinnedTopRowDataWithUnit);
|
|
55856
|
+
let pinnedTopRowDataWithUnitTmp = _$1.cloneDeep(this.pinnedTopRowDataWithUnit);
|
|
55797
55857
|
if (this.unitType != this.defaultUnitType) {
|
|
55798
55858
|
pinnedTopRowDataWithUnitTmp.forEach((d) => {
|
|
55799
55859
|
this.switchCols.forEach((dd) => {
|
|
@@ -55804,7 +55864,7 @@ const __vue2_script$10 = {
|
|
|
55804
55864
|
this.renderSumRow();
|
|
55805
55865
|
}
|
|
55806
55866
|
}
|
|
55807
|
-
let datasTmp = _.cloneDeep(this.tableData);
|
|
55867
|
+
let datasTmp = _$1.cloneDeep(this.tableData);
|
|
55808
55868
|
if (this.unitType != this.defaultUnitType) {
|
|
55809
55869
|
datasTmp.forEach((d) => {
|
|
55810
55870
|
this.switchCols.forEach((dd) => {
|
|
@@ -55846,7 +55906,7 @@ const __vue2_script$10 = {
|
|
|
55846
55906
|
if (this.unitType == "X") {
|
|
55847
55907
|
return this.tableData;
|
|
55848
55908
|
} else {
|
|
55849
|
-
let datasTmp = _.cloneDeep(this.tableData);
|
|
55909
|
+
let datasTmp = _$1.cloneDeep(this.tableData);
|
|
55850
55910
|
datasTmp.forEach((d) => {
|
|
55851
55911
|
this.switchCols.forEach((dd) => {
|
|
55852
55912
|
changeCellUnit(this.unitType, "X", d, dd);
|
|
@@ -55859,7 +55919,7 @@ const __vue2_script$10 = {
|
|
|
55859
55919
|
if (this.unitType == "WZ") {
|
|
55860
55920
|
return this.tableData;
|
|
55861
55921
|
} else {
|
|
55862
|
-
let datasTmp = _.cloneDeep(this.tableData);
|
|
55922
|
+
let datasTmp = _$1.cloneDeep(this.tableData);
|
|
55863
55923
|
datasTmp.forEach((d) => {
|
|
55864
55924
|
this.switchCols.forEach((dd) => {
|
|
55865
55925
|
changeCellUnit(this.unitType, "WZ", d, dd);
|
|
@@ -55872,7 +55932,7 @@ const __vue2_script$10 = {
|
|
|
55872
55932
|
if (this.unitType == "X") {
|
|
55873
55933
|
return this.topRows;
|
|
55874
55934
|
} else {
|
|
55875
|
-
let datasTmp = _.cloneDeep(this.topRows);
|
|
55935
|
+
let datasTmp = _$1.cloneDeep(this.topRows);
|
|
55876
55936
|
datasTmp.forEach((d) => {
|
|
55877
55937
|
this.switchCols.forEach((dd) => {
|
|
55878
55938
|
changeCellUnit(this.unitType, "X", d, dd);
|
|
@@ -55885,7 +55945,7 @@ const __vue2_script$10 = {
|
|
|
55885
55945
|
if (this.unitType == "WZ") {
|
|
55886
55946
|
return this.topRows;
|
|
55887
55947
|
} else {
|
|
55888
|
-
let datasTmp = _.cloneDeep(this.topRows);
|
|
55948
|
+
let datasTmp = _$1.cloneDeep(this.topRows);
|
|
55889
55949
|
datasTmp.forEach((d) => {
|
|
55890
55950
|
this.switchCols.forEach((dd) => {
|
|
55891
55951
|
changeCellUnit(this.unitType, "WZ", d, dd);
|
|
@@ -55900,7 +55960,7 @@ const __vue2_script$10 = {
|
|
|
55900
55960
|
return;
|
|
55901
55961
|
}
|
|
55902
55962
|
this.updating = true;
|
|
55903
|
-
const valueDataMap = _.reduce(
|
|
55963
|
+
const valueDataMap = _$1.reduce(
|
|
55904
55964
|
this.value || [],
|
|
55905
55965
|
(rlt, item2) => {
|
|
55906
55966
|
Object.assign(rlt, { [item2[this.rowKey]]: item2 });
|
|
@@ -56296,7 +56356,7 @@ function deepEach$2(list, callback, initLevel) {
|
|
|
56296
56356
|
initLevel += 1;
|
|
56297
56357
|
}
|
|
56298
56358
|
if (Array.isArray(list) && list.length) {
|
|
56299
|
-
_.forEach(list, (node, idx) => {
|
|
56359
|
+
_$1.forEach(list, (node, idx) => {
|
|
56300
56360
|
let breakDeep = false;
|
|
56301
56361
|
if (initLevel) {
|
|
56302
56362
|
node.level = initLevel;
|
|
@@ -56318,9 +56378,9 @@ function deepEach$2(list, callback, initLevel) {
|
|
|
56318
56378
|
}
|
|
56319
56379
|
}
|
|
56320
56380
|
function deepEach2$1(list, parent) {
|
|
56321
|
-
let parentList = _.cloneDeep(parent);
|
|
56381
|
+
let parentList = _$1.cloneDeep(parent);
|
|
56322
56382
|
if (Array.isArray(list) && list.length) {
|
|
56323
|
-
_.forEach(list, (node) => {
|
|
56383
|
+
_$1.forEach(list, (node) => {
|
|
56324
56384
|
node.parentList = [
|
|
56325
56385
|
...parentList,
|
|
56326
56386
|
{
|
|
@@ -56441,7 +56501,7 @@ const __vue2_script$Y = {
|
|
|
56441
56501
|
this.$nextTick(() => {
|
|
56442
56502
|
this.$emit(
|
|
56443
56503
|
"on-load",
|
|
56444
|
-
_.cloneDeep(this.treeData),
|
|
56504
|
+
_$1.cloneDeep(this.treeData),
|
|
56445
56505
|
this.showCheckbox ? this.getCheckedNodes() : this.getSelectedNodes()
|
|
56446
56506
|
);
|
|
56447
56507
|
});
|
|
@@ -56499,15 +56559,15 @@ const __vue2_script$Y = {
|
|
|
56499
56559
|
0
|
|
56500
56560
|
);
|
|
56501
56561
|
deepEach2$1(list, []);
|
|
56502
|
-
this.treeData = _.cloneDeep(list);
|
|
56503
|
-
this.backupTreeData = _.cloneDeep(this.treeData);
|
|
56562
|
+
this.treeData = _$1.cloneDeep(list);
|
|
56563
|
+
this.backupTreeData = _$1.cloneDeep(this.treeData);
|
|
56504
56564
|
this.defaultValueHandler();
|
|
56505
56565
|
this.loading = false;
|
|
56506
56566
|
},
|
|
56507
56567
|
async fetchComTree() {
|
|
56508
56568
|
if (this.data.length) {
|
|
56509
56569
|
this.inited = true;
|
|
56510
|
-
return _.cloneDeep(this.data);
|
|
56570
|
+
return _$1.cloneDeep(this.data);
|
|
56511
56571
|
}
|
|
56512
56572
|
if (this.dataApi) {
|
|
56513
56573
|
try {
|
|
@@ -56588,7 +56648,7 @@ const __vue2_script$Y = {
|
|
|
56588
56648
|
_selectFirstLeaf() {
|
|
56589
56649
|
let exist = false;
|
|
56590
56650
|
if (this.firstLeafByStatus.length) {
|
|
56591
|
-
_.forEach(this.firstLeafByStatus, (status) => {
|
|
56651
|
+
_$1.forEach(this.firstLeafByStatus, (status) => {
|
|
56592
56652
|
if (exist && !this.showCheckbox) {
|
|
56593
56653
|
return false;
|
|
56594
56654
|
}
|
|
@@ -56627,7 +56687,7 @@ const __vue2_script$Y = {
|
|
|
56627
56687
|
}
|
|
56628
56688
|
});
|
|
56629
56689
|
}
|
|
56630
|
-
this.backupTreeData = _.cloneDeep(this.treeData);
|
|
56690
|
+
this.backupTreeData = _$1.cloneDeep(this.treeData);
|
|
56631
56691
|
},
|
|
56632
56692
|
processAncestorNodesExpandStatus() {
|
|
56633
56693
|
if (!this.showCheckbox) {
|
|
@@ -56717,7 +56777,7 @@ const __vue2_script$Y = {
|
|
|
56717
56777
|
},
|
|
56718
56778
|
updateStatusOptions2Nodes(statusList) {
|
|
56719
56779
|
deepEach$2(this.treeData, (node) => {
|
|
56720
|
-
const statusData = _.find(statusList, { id: node.id });
|
|
56780
|
+
const statusData = _$1.find(statusList, { id: node.id });
|
|
56721
56781
|
if (statusData) {
|
|
56722
56782
|
const status = statusData.status;
|
|
56723
56783
|
node.status = status;
|
|
@@ -56730,7 +56790,7 @@ const __vue2_script$Y = {
|
|
|
56730
56790
|
}
|
|
56731
56791
|
});
|
|
56732
56792
|
deepEach$2(this.backupTreeData, (node) => {
|
|
56733
|
-
const statusData = _.find(statusList, { id: node.id });
|
|
56793
|
+
const statusData = _$1.find(statusList, { id: node.id });
|
|
56734
56794
|
if (statusData) {
|
|
56735
56795
|
const status = statusData.status;
|
|
56736
56796
|
node.status = status;
|
|
@@ -56797,9 +56857,9 @@ const __vue2_script$Y = {
|
|
|
56797
56857
|
let checkedNodes = nodesNow.map((d) => d.id);
|
|
56798
56858
|
if (this.checkStrictly || !curNode.children || curNode.children.length === 0) {
|
|
56799
56859
|
if (checkedNodes.includes(curNode.id)) {
|
|
56800
|
-
let d = _.find(nodesNow, { id: curNode.id });
|
|
56801
|
-
_.remove(checkedNodes, (d2) => d2 == curNode.id);
|
|
56802
|
-
_.remove(nodesNow, (d2) => d2.id == curNode.id);
|
|
56860
|
+
let d = _$1.find(nodesNow, { id: curNode.id });
|
|
56861
|
+
_$1.remove(checkedNodes, (d2) => d2 == curNode.id);
|
|
56862
|
+
_$1.remove(nodesNow, (d2) => d2.id == curNode.id);
|
|
56803
56863
|
d.checked = false;
|
|
56804
56864
|
} else {
|
|
56805
56865
|
curNode.checked = true;
|
|
@@ -56816,22 +56876,22 @@ const __vue2_script$Y = {
|
|
|
56816
56876
|
curNode.indeterminate = false;
|
|
56817
56877
|
if (checkAll) {
|
|
56818
56878
|
curNode.checked = false;
|
|
56819
|
-
_.remove(nodesNow, (d) => d.id == curNode.id);
|
|
56820
|
-
_.remove(checkedNodes, (d) => d == curNode.id);
|
|
56879
|
+
_$1.remove(nodesNow, (d) => d.id == curNode.id);
|
|
56880
|
+
_$1.remove(checkedNodes, (d) => d == curNode.id);
|
|
56821
56881
|
deepEach$2(curNode.children, (child) => {
|
|
56822
56882
|
child.checked = false;
|
|
56823
|
-
_.remove(nodesNow, (d) => d.id == child.id);
|
|
56824
|
-
_.remove(checkedNodes, (d) => d == child.id);
|
|
56883
|
+
_$1.remove(nodesNow, (d) => d.id == child.id);
|
|
56884
|
+
_$1.remove(checkedNodes, (d) => d == child.id);
|
|
56825
56885
|
});
|
|
56826
56886
|
} else {
|
|
56827
56887
|
curNode.checked = true;
|
|
56828
|
-
if (_.findIndex(nodesNow, { id: curNode.id }) == -1) {
|
|
56888
|
+
if (_$1.findIndex(nodesNow, { id: curNode.id }) == -1) {
|
|
56829
56889
|
nodesNow.push(curNode);
|
|
56830
56890
|
checkedNodes.push(curNode.id);
|
|
56831
56891
|
}
|
|
56832
56892
|
deepEach$2(curNode.children, (child) => {
|
|
56833
56893
|
child.checked = true;
|
|
56834
|
-
if (_.findIndex(nodesNow, { id: child.id }) == -1) {
|
|
56894
|
+
if (_$1.findIndex(nodesNow, { id: child.id }) == -1) {
|
|
56835
56895
|
nodesNow.push(child);
|
|
56836
56896
|
checkedNodes.push(child.id);
|
|
56837
56897
|
}
|
|
@@ -57021,7 +57081,7 @@ const __vue2_script$Y = {
|
|
|
57021
57081
|
updateNodeStatus(statusData) {
|
|
57022
57082
|
if (Array.isArray(statusData) && statusData.length) {
|
|
57023
57083
|
deepEach$2(this.treeData, (node) => {
|
|
57024
|
-
const matched = _.find(statusData, { id: node.id });
|
|
57084
|
+
const matched = _$1.find(statusData, { id: node.id });
|
|
57025
57085
|
if (matched) {
|
|
57026
57086
|
const status = matched.status;
|
|
57027
57087
|
node.status = status;
|
|
@@ -57030,7 +57090,7 @@ const __vue2_script$Y = {
|
|
|
57030
57090
|
}
|
|
57031
57091
|
});
|
|
57032
57092
|
deepEach$2(this.backupTreeData, (node) => {
|
|
57033
|
-
const matched = _.find(statusData, { id: node.id });
|
|
57093
|
+
const matched = _$1.find(statusData, { id: node.id });
|
|
57034
57094
|
if (matched) {
|
|
57035
57095
|
const status = matched.status;
|
|
57036
57096
|
node.status = status;
|
|
@@ -57046,7 +57106,7 @@ const __vue2_script$Y = {
|
|
|
57046
57106
|
highlightNodes(selectedTitles, callback) {
|
|
57047
57107
|
if (!selectedTitles || !selectedTitles[0]) {
|
|
57048
57108
|
let checkedNodes2 = this.getCheckedNodes(true);
|
|
57049
|
-
this.treeData = _.cloneDeep(this.backupTreeData);
|
|
57109
|
+
this.treeData = _$1.cloneDeep(this.backupTreeData);
|
|
57050
57110
|
this.$nextTick(() => {
|
|
57051
57111
|
this.$emit("on-check-change", checkedNodes2);
|
|
57052
57112
|
});
|
|
@@ -57056,7 +57116,7 @@ const __vue2_script$Y = {
|
|
|
57056
57116
|
return false;
|
|
57057
57117
|
}
|
|
57058
57118
|
let num = 0;
|
|
57059
|
-
let data = _.cloneDeep(this.backupTreeData);
|
|
57119
|
+
let data = _$1.cloneDeep(this.backupTreeData);
|
|
57060
57120
|
if (Array.isArray(selectedTitles) && selectedTitles.length) {
|
|
57061
57121
|
deepEach$2(data, (node) => {
|
|
57062
57122
|
let matched = false;
|
|
@@ -57083,7 +57143,7 @@ const __vue2_script$Y = {
|
|
|
57083
57143
|
});
|
|
57084
57144
|
}
|
|
57085
57145
|
let checkedNodes = this.getCheckedNodes(true);
|
|
57086
|
-
this.treeData = _.cloneDeep(this.deleteNoMatchedNodes(data));
|
|
57146
|
+
this.treeData = _$1.cloneDeep(this.deleteNoMatchedNodes(data));
|
|
57087
57147
|
this.$nextTick(() => {
|
|
57088
57148
|
this.$emit("on-check-change", checkedNodes);
|
|
57089
57149
|
});
|
|
@@ -57214,7 +57274,7 @@ const __vue2_script$X = {
|
|
|
57214
57274
|
if (!tempNodes.length) {
|
|
57215
57275
|
tempNodes = this.getSelectedNodes();
|
|
57216
57276
|
}
|
|
57217
|
-
this.selectedTitles = _.join(_.map(tempNodes || [], "title"), ",");
|
|
57277
|
+
this.selectedTitles = _$1.join(_$1.map(tempNodes || [], "title"), ",");
|
|
57218
57278
|
},
|
|
57219
57279
|
getSelectedNodes() {
|
|
57220
57280
|
return this.$refs.tree.getSelectedNodes();
|
|
@@ -59649,7 +59709,7 @@ const __vue2_script$E = {
|
|
|
59649
59709
|
methods: {
|
|
59650
59710
|
initData() {
|
|
59651
59711
|
let permissions = getPermissionCache();
|
|
59652
|
-
let curPermission = _.find(permissions, { permissionId: this.$route.meta.permissionId }) || {};
|
|
59712
|
+
let curPermission = _$1.find(permissions, { permissionId: this.$route.meta.permissionId }) || {};
|
|
59653
59713
|
try {
|
|
59654
59714
|
this.menuInfo = JSON.parse(curPermission.extendProps) || {};
|
|
59655
59715
|
} catch (e) {
|
|
@@ -59710,7 +59770,7 @@ const __vue2_script$D = {
|
|
|
59710
59770
|
this.$store.commit(
|
|
59711
59771
|
"closeTag",
|
|
59712
59772
|
this.$router,
|
|
59713
|
-
_.find(this.$store.state.app.tagNavList, {
|
|
59773
|
+
_$1.find(this.$store.state.app.tagNavList, {
|
|
59714
59774
|
name: this.$route.name
|
|
59715
59775
|
})
|
|
59716
59776
|
);
|
|
@@ -59764,7 +59824,7 @@ const __vue2_script$C = {
|
|
|
59764
59824
|
} else {
|
|
59765
59825
|
const tagList = getLocalStorage("ibp-sc-tagNavList") || [];
|
|
59766
59826
|
const activeName = getSessionStorage("activeName") || "";
|
|
59767
|
-
const activeNameTag = _.find(tagList, { name: activeName }) || {};
|
|
59827
|
+
const activeNameTag = _$1.find(tagList, { name: activeName }) || {};
|
|
59768
59828
|
const activeUri = activeNameTag.uri;
|
|
59769
59829
|
const routeUri = this.$route.meta.data.uri;
|
|
59770
59830
|
if (activeUri === routeUri) {
|
|
@@ -60081,7 +60141,7 @@ const __vue2_script$y = {
|
|
|
60081
60141
|
if (!tempNodes.length) {
|
|
60082
60142
|
tempNodes = this.getSelectedNodes();
|
|
60083
60143
|
}
|
|
60084
|
-
this.selectedTitles = _.join(_.map(tempNodes || [], "title"), ",");
|
|
60144
|
+
this.selectedTitles = _$1.join(_$1.map(tempNodes || [], "title"), ",");
|
|
60085
60145
|
},
|
|
60086
60146
|
getSelectedNodes() {
|
|
60087
60147
|
return this.$refs.tree.getSelectedNodes();
|
|
@@ -62306,15 +62366,15 @@ const __vue2_script$m = {
|
|
|
62306
62366
|
const def = allConditionDef[conditionKey] || {};
|
|
62307
62367
|
if (isString(customDef))
|
|
62308
62368
|
return def;
|
|
62309
|
-
return _.merge({}, def, customDef);
|
|
62369
|
+
return _$1.merge({}, def, customDef);
|
|
62310
62370
|
});
|
|
62311
62371
|
},
|
|
62312
62372
|
allInfo() {
|
|
62313
|
-
const infos = _.cloneDeep(this.priceInfo);
|
|
62373
|
+
const infos = _$1.cloneDeep(this.priceInfo);
|
|
62314
62374
|
return this.conditions.reduce((rlt, condition) => {
|
|
62315
62375
|
let infoList = [];
|
|
62316
62376
|
if (condition.dataFrom === "enum") {
|
|
62317
|
-
infoList = _.cloneDeep(condition.enumList || []);
|
|
62377
|
+
infoList = _$1.cloneDeep(condition.enumList || []);
|
|
62318
62378
|
} else {
|
|
62319
62379
|
const dataKey = condition.dataKey || condition.key;
|
|
62320
62380
|
const itemInfo = infos[dataKey] || [];
|
|
@@ -63131,7 +63191,7 @@ var signModal = /* @__PURE__ */ function() {
|
|
|
63131
63191
|
}();
|
|
63132
63192
|
function deepEach$1(parentNode, list, callback) {
|
|
63133
63193
|
if (Array.isArray(list) && list.length) {
|
|
63134
|
-
_.forEach(list, (node, idx) => {
|
|
63194
|
+
_$1.forEach(list, (node, idx) => {
|
|
63135
63195
|
let breakDeep = false;
|
|
63136
63196
|
if (typeof callback === "function") {
|
|
63137
63197
|
try {
|
|
@@ -63150,18 +63210,18 @@ function deepEach$1(parentNode, list, callback) {
|
|
|
63150
63210
|
}
|
|
63151
63211
|
}
|
|
63152
63212
|
function generateOptionsSeq(options) {
|
|
63153
|
-
_.forEach(options, (d, idx) => {
|
|
63213
|
+
_$1.forEach(options, (d, idx) => {
|
|
63154
63214
|
d.seq = idx;
|
|
63155
|
-
_.forEach(d.options, (dd, idxx) => {
|
|
63215
|
+
_$1.forEach(d.options, (dd, idxx) => {
|
|
63156
63216
|
dd.seq = idxx;
|
|
63157
63217
|
});
|
|
63158
63218
|
});
|
|
63159
63219
|
console.log("generateOptionsSeq rlt is", options);
|
|
63160
63220
|
}
|
|
63161
63221
|
function generateNodeWithPath(dimension, nodes) {
|
|
63162
|
-
let nodeClone = _.cloneDeep(nodes);
|
|
63222
|
+
let nodeClone = _$1.cloneDeep(nodes);
|
|
63163
63223
|
deepEach$1(dimension, nodeClone, (d, p, idx) => {
|
|
63164
|
-
let pPath = p.path ? _.cloneDeep(p.path) : [{ id: p.id, title: p.title, seq: p.seq }];
|
|
63224
|
+
let pPath = p.path ? _$1.cloneDeep(p.path) : [{ id: p.id, title: p.title, seq: p.seq }];
|
|
63165
63225
|
pPath.push({
|
|
63166
63226
|
id: d.id,
|
|
63167
63227
|
title: d.title,
|
|
@@ -63179,21 +63239,21 @@ function generateNodeWithPath(dimension, nodes) {
|
|
|
63179
63239
|
return nodeClone;
|
|
63180
63240
|
}
|
|
63181
63241
|
function concatNodes(choosedNodes, newNodes, options) {
|
|
63182
|
-
let choosedNodesClone = _.cloneDeep(choosedNodes);
|
|
63183
|
-
let newNodesClone = _.cloneDeep(newNodes);
|
|
63242
|
+
let choosedNodesClone = _$1.cloneDeep(choosedNodes);
|
|
63243
|
+
let newNodesClone = _$1.cloneDeep(newNodes);
|
|
63184
63244
|
if (!(options == null ? void 0 : options.length)) {
|
|
63185
63245
|
return choosedNodesClone;
|
|
63186
63246
|
}
|
|
63187
|
-
_.forEach(newNodesClone, (d) => {
|
|
63188
|
-
_.forEach(options, (dd) => {
|
|
63247
|
+
_$1.forEach(newNodesClone, (d) => {
|
|
63248
|
+
_$1.forEach(options, (dd) => {
|
|
63189
63249
|
let oldPathStr = d.pathStr;
|
|
63190
63250
|
let newPathArr = oldPathStr.split("_");
|
|
63191
63251
|
newPathArr.splice(1, 1, dd.id);
|
|
63192
63252
|
let newPathStr = newPathArr.join("_");
|
|
63193
|
-
if (_.findIndex(choosedNodesClone, { pathStr: newPathStr }) == -1) {
|
|
63194
|
-
let pathTmp = _.cloneDeep(d.path);
|
|
63253
|
+
if (_$1.findIndex(choosedNodesClone, { pathStr: newPathStr }) == -1) {
|
|
63254
|
+
let pathTmp = _$1.cloneDeep(d.path);
|
|
63195
63255
|
pathTmp.splice(1, 0, { id: dd.id, title: dd.title, seq: dd.seq });
|
|
63196
|
-
_.remove(pathTmp, { id: "ALL" });
|
|
63256
|
+
_$1.remove(pathTmp, { id: "ALL" });
|
|
63197
63257
|
choosedNodesClone.push({
|
|
63198
63258
|
...d,
|
|
63199
63259
|
id: newPathStr,
|
|
@@ -63207,8 +63267,8 @@ function concatNodes(choosedNodes, newNodes, options) {
|
|
|
63207
63267
|
}
|
|
63208
63268
|
function generateChoosedNodesByInit(options) {
|
|
63209
63269
|
let rlt = [];
|
|
63210
|
-
_.forEach(options, (option) => {
|
|
63211
|
-
let checkedOptions = _.filter(option.options, { checked: true });
|
|
63270
|
+
_$1.forEach(options, (option) => {
|
|
63271
|
+
let checkedOptions = _$1.filter(option.options, { checked: true });
|
|
63212
63272
|
let checkedIndex = [];
|
|
63213
63273
|
let indexListTmp = generateNodeWithPath(option, [
|
|
63214
63274
|
{
|
|
@@ -63237,7 +63297,7 @@ function addNodeToTree(tree, node) {
|
|
|
63237
63297
|
return;
|
|
63238
63298
|
}
|
|
63239
63299
|
let midPathNode = path2.shift();
|
|
63240
|
-
let midNode = _.find(subTree, { id: midPathNode == null ? void 0 : midPathNode.id });
|
|
63300
|
+
let midNode = _$1.find(subTree, { id: midPathNode == null ? void 0 : midPathNode.id });
|
|
63241
63301
|
if (!midNode) {
|
|
63242
63302
|
if (path2.length == 0) {
|
|
63243
63303
|
midNode = {
|
|
@@ -63259,24 +63319,24 @@ function addNodeToTree(tree, node) {
|
|
|
63259
63319
|
}
|
|
63260
63320
|
addNodeToTreeInner(midNode.children, path2);
|
|
63261
63321
|
}
|
|
63262
|
-
let path = _.cloneDeep(node.path);
|
|
63322
|
+
let path = _$1.cloneDeep(node.path);
|
|
63263
63323
|
addNodeToTreeInner(tree, path);
|
|
63264
63324
|
}
|
|
63265
63325
|
function generateTreeByNodes(nodes) {
|
|
63266
63326
|
let rlt = [];
|
|
63267
63327
|
nodes.forEach((d) => addNodeToTree(rlt, d));
|
|
63268
|
-
rlt = _.orderBy(rlt, ["seq"], ["asc"]);
|
|
63328
|
+
rlt = _$1.orderBy(rlt, ["seq"], ["asc"]);
|
|
63269
63329
|
deepEach$1({}, rlt, (d) => {
|
|
63270
63330
|
var _a;
|
|
63271
63331
|
if ((_a = d.children) == null ? void 0 : _a.length) {
|
|
63272
|
-
d.children = _.orderBy(d.children, ["seq"], ["asc"]);
|
|
63332
|
+
d.children = _$1.orderBy(d.children, ["seq"], ["asc"]);
|
|
63273
63333
|
}
|
|
63274
63334
|
});
|
|
63275
63335
|
console.log("generateTreeByNodes rlt is", rlt);
|
|
63276
63336
|
return rlt;
|
|
63277
63337
|
}
|
|
63278
63338
|
function generateColumnsByTreeNodes(treeNodes) {
|
|
63279
|
-
let columnsClone = _.cloneDeep(treeNodes);
|
|
63339
|
+
let columnsClone = _$1.cloneDeep(treeNodes);
|
|
63280
63340
|
deepEach$1({}, columnsClone, (d) => {
|
|
63281
63341
|
var _a;
|
|
63282
63342
|
;
|
|
@@ -63289,7 +63349,7 @@ function generateColumnsByTreeNodes(treeNodes) {
|
|
|
63289
63349
|
return rlt;
|
|
63290
63350
|
}
|
|
63291
63351
|
function generateOptionsByTreeNodes(treeNodes) {
|
|
63292
|
-
let columnsClone = _.cloneDeep(treeNodes);
|
|
63352
|
+
let columnsClone = _$1.cloneDeep(treeNodes);
|
|
63293
63353
|
let rlt = {};
|
|
63294
63354
|
columnsClone.forEach((d) => {
|
|
63295
63355
|
var _a;
|
|
@@ -63298,8 +63358,8 @@ function generateOptionsByTreeNodes(treeNodes) {
|
|
|
63298
63358
|
return rlt;
|
|
63299
63359
|
}
|
|
63300
63360
|
function getFilterColumnsByParams(options, columns) {
|
|
63301
|
-
let columnsClone = _.cloneDeep(columns);
|
|
63302
|
-
let itemIdx = _.findIndex(columnsClone, { field: "item" });
|
|
63361
|
+
let columnsClone = _$1.cloneDeep(columns);
|
|
63362
|
+
let itemIdx = _$1.findIndex(columnsClone, { field: "item" });
|
|
63303
63363
|
if (itemIdx == -1) {
|
|
63304
63364
|
return columnsClone;
|
|
63305
63365
|
}
|
|
@@ -63307,7 +63367,7 @@ function getFilterColumnsByParams(options, columns) {
|
|
|
63307
63367
|
itemIndex = itemIndex[0];
|
|
63308
63368
|
let items = (options == null ? void 0 : options.items) || [];
|
|
63309
63369
|
let itemsColumns = items.map((d) => {
|
|
63310
|
-
let childrenClone = _.cloneDeep(itemIndex.children);
|
|
63370
|
+
let childrenClone = _$1.cloneDeep(itemIndex.children);
|
|
63311
63371
|
deepEach$1({}, childrenClone, (dd) => {
|
|
63312
63372
|
if (!dd.children || dd.children.length == 0) {
|
|
63313
63373
|
dd.field = dd.field.replace("item_", d.productCode + "_");
|
|
@@ -63457,10 +63517,10 @@ const __vue2_script$j = {
|
|
|
63457
63517
|
this.$refs.tree1.clearCheckedAndSelectedNodes();
|
|
63458
63518
|
},
|
|
63459
63519
|
async removeIndex() {
|
|
63460
|
-
let choosedIndexListClone = _.cloneDeep(this.choosedIndexList);
|
|
63520
|
+
let choosedIndexListClone = _$1.cloneDeep(this.choosedIndexList);
|
|
63461
63521
|
let indexes = this.$refs.tree2.getCheckedNodes(true);
|
|
63462
|
-
_.remove(choosedIndexListClone, (d) => {
|
|
63463
|
-
return _.some(indexes, (dd) => {
|
|
63522
|
+
_$1.remove(choosedIndexListClone, (d) => {
|
|
63523
|
+
return _$1.some(indexes, (dd) => {
|
|
63464
63524
|
return dd.pathStr === d.pathStr;
|
|
63465
63525
|
});
|
|
63466
63526
|
});
|
|
@@ -63527,13 +63587,13 @@ const __vue2_script$i = {
|
|
|
63527
63587
|
},
|
|
63528
63588
|
data() {
|
|
63529
63589
|
return {
|
|
63530
|
-
params: _.cloneDeep(this.value) || {}
|
|
63590
|
+
params: _$1.cloneDeep(this.value) || {}
|
|
63531
63591
|
};
|
|
63532
63592
|
},
|
|
63533
63593
|
watch: {
|
|
63534
63594
|
value() {
|
|
63535
63595
|
if (!isEqual(this.params, this.value)) {
|
|
63536
|
-
this.params = _.cloneDeep(this.value);
|
|
63596
|
+
this.params = _$1.cloneDeep(this.value);
|
|
63537
63597
|
}
|
|
63538
63598
|
}
|
|
63539
63599
|
},
|
|
@@ -63714,7 +63774,7 @@ const __vue2_script$g = {
|
|
|
63714
63774
|
}
|
|
63715
63775
|
});
|
|
63716
63776
|
} else {
|
|
63717
|
-
this.tableData = _.cloneDeep(this.finTableData);
|
|
63777
|
+
this.tableData = _$1.cloneDeep(this.finTableData);
|
|
63718
63778
|
}
|
|
63719
63779
|
this.concatPreData();
|
|
63720
63780
|
}
|
|
@@ -63777,8 +63837,8 @@ const __vue2_script$g = {
|
|
|
63777
63837
|
if (this.itemType == "3") {
|
|
63778
63838
|
this.data.reverse();
|
|
63779
63839
|
}
|
|
63780
|
-
this.finTableData = _.cloneDeep(this.data);
|
|
63781
|
-
this.tableData = _.cloneDeep(this.finTableData);
|
|
63840
|
+
this.finTableData = _$1.cloneDeep(this.data);
|
|
63841
|
+
this.tableData = _$1.cloneDeep(this.finTableData);
|
|
63782
63842
|
if (this.defaultValue.length > 0) {
|
|
63783
63843
|
let defaultValueTxt = this.defaultValue.join(",");
|
|
63784
63844
|
this.selection = this.finTableData.filter((e) => {
|
|
@@ -64039,7 +64099,7 @@ const __vue2_script$f = {
|
|
|
64039
64099
|
async query() {
|
|
64040
64100
|
let data = await this.getData();
|
|
64041
64101
|
this.data = data.data;
|
|
64042
|
-
this.tableData = _.cloneDeep(this.data);
|
|
64102
|
+
this.tableData = _$1.cloneDeep(this.data);
|
|
64043
64103
|
},
|
|
64044
64104
|
filterCom(dataList) {
|
|
64045
64105
|
let pcomList = [];
|
|
@@ -64175,7 +64235,7 @@ const __vue2_script$e = {
|
|
|
64175
64235
|
}
|
|
64176
64236
|
});
|
|
64177
64237
|
} else {
|
|
64178
|
-
this.tableData = _.cloneDeep(this.finTableData);
|
|
64238
|
+
this.tableData = _$1.cloneDeep(this.finTableData);
|
|
64179
64239
|
}
|
|
64180
64240
|
this.concatPreData();
|
|
64181
64241
|
}
|
|
@@ -64190,7 +64250,7 @@ const __vue2_script$e = {
|
|
|
64190
64250
|
}
|
|
64191
64251
|
});
|
|
64192
64252
|
} else {
|
|
64193
|
-
this.tableData = _.cloneDeep(this.finTableData);
|
|
64253
|
+
this.tableData = _$1.cloneDeep(this.finTableData);
|
|
64194
64254
|
}
|
|
64195
64255
|
this.concatPreData();
|
|
64196
64256
|
}
|
|
@@ -64248,7 +64308,7 @@ const __vue2_script$e = {
|
|
|
64248
64308
|
async query() {
|
|
64249
64309
|
let data = await this.getData();
|
|
64250
64310
|
this.data = data.data;
|
|
64251
|
-
this.tableData = this.finTableData = _.cloneDeep(this.data);
|
|
64311
|
+
this.tableData = this.finTableData = _$1.cloneDeep(this.data);
|
|
64252
64312
|
console.log("query this.tableData", this.tableData);
|
|
64253
64313
|
if (this.defaultValue.length > 0) {
|
|
64254
64314
|
let defaultValueTxt = this.defaultValue.join(",");
|
|
@@ -64323,7 +64383,7 @@ function deepEach(list, callback, initLevel) {
|
|
|
64323
64383
|
initLevel += 1;
|
|
64324
64384
|
}
|
|
64325
64385
|
if (Array.isArray(list) && list.length) {
|
|
64326
|
-
_.forEach(list, (node, idx) => {
|
|
64386
|
+
_$1.forEach(list, (node, idx) => {
|
|
64327
64387
|
let breakDeep = false;
|
|
64328
64388
|
if (initLevel) {
|
|
64329
64389
|
node.level = initLevel;
|
|
@@ -64345,9 +64405,9 @@ function deepEach(list, callback, initLevel) {
|
|
|
64345
64405
|
}
|
|
64346
64406
|
}
|
|
64347
64407
|
function deepEach2(list, parent) {
|
|
64348
|
-
let parentList = _.cloneDeep(parent);
|
|
64408
|
+
let parentList = _$1.cloneDeep(parent);
|
|
64349
64409
|
if (Array.isArray(list) && list.length) {
|
|
64350
|
-
_.forEach(list, (node) => {
|
|
64410
|
+
_$1.forEach(list, (node) => {
|
|
64351
64411
|
node.parentList = [
|
|
64352
64412
|
...parentList,
|
|
64353
64413
|
{
|
|
@@ -64510,7 +64570,7 @@ const __vue2_script$d = {
|
|
|
64510
64570
|
);
|
|
64511
64571
|
deepEach2(list, []);
|
|
64512
64572
|
this.treeData = list;
|
|
64513
|
-
this.backupTreeData = _.cloneDeep(this.treeData);
|
|
64573
|
+
this.backupTreeData = _$1.cloneDeep(this.treeData);
|
|
64514
64574
|
this.loading = false;
|
|
64515
64575
|
this.setDefaultValue2Nodes();
|
|
64516
64576
|
if (this.selectFirstLeaf && (!this.defaultValue || this.defaultValue.length == 0)) {
|
|
@@ -64527,14 +64587,14 @@ const __vue2_script$d = {
|
|
|
64527
64587
|
this.$nextTick(() => {
|
|
64528
64588
|
this.$emit(
|
|
64529
64589
|
"on-load",
|
|
64530
|
-
_.cloneDeep(this.treeData),
|
|
64590
|
+
_$1.cloneDeep(this.treeData),
|
|
64531
64591
|
this.showCheckbox ? this.getCheckedNodes() : this.getSelectedNodes()
|
|
64532
64592
|
);
|
|
64533
64593
|
});
|
|
64534
64594
|
},
|
|
64535
64595
|
async fetchComTree() {
|
|
64536
64596
|
if (this.data) {
|
|
64537
|
-
return _.cloneDeep(this.data);
|
|
64597
|
+
return _$1.cloneDeep(this.data);
|
|
64538
64598
|
}
|
|
64539
64599
|
if (this.dataApi) {
|
|
64540
64600
|
try {
|
|
@@ -64615,7 +64675,7 @@ const __vue2_script$d = {
|
|
|
64615
64675
|
_selectFirstLeaf() {
|
|
64616
64676
|
let exist = false;
|
|
64617
64677
|
if (this.firstLeafByStatus.length) {
|
|
64618
|
-
_.forEach(this.firstLeafByStatus, (status) => {
|
|
64678
|
+
_$1.forEach(this.firstLeafByStatus, (status) => {
|
|
64619
64679
|
if (exist) {
|
|
64620
64680
|
return false;
|
|
64621
64681
|
}
|
|
@@ -64652,7 +64712,7 @@ const __vue2_script$d = {
|
|
|
64652
64712
|
}
|
|
64653
64713
|
});
|
|
64654
64714
|
}
|
|
64655
|
-
this.backupTreeData = _.cloneDeep(this.treeData);
|
|
64715
|
+
this.backupTreeData = _$1.cloneDeep(this.treeData);
|
|
64656
64716
|
},
|
|
64657
64717
|
processAncestorNodesExpandStatus() {
|
|
64658
64718
|
deepEach(this.treeData, (node) => {
|
|
@@ -64718,7 +64778,7 @@ const __vue2_script$d = {
|
|
|
64718
64778
|
},
|
|
64719
64779
|
updateStatusOptions2Nodes(statusList) {
|
|
64720
64780
|
deepEach(this.treeData, (node) => {
|
|
64721
|
-
const statusData = _.find(statusList, { id: node.id });
|
|
64781
|
+
const statusData = _$1.find(statusList, { id: node.id });
|
|
64722
64782
|
if (statusData) {
|
|
64723
64783
|
const status = statusData.status;
|
|
64724
64784
|
node.status = status;
|
|
@@ -64731,7 +64791,7 @@ const __vue2_script$d = {
|
|
|
64731
64791
|
}
|
|
64732
64792
|
});
|
|
64733
64793
|
deepEach(this.backupTreeData, (node) => {
|
|
64734
|
-
const statusData = _.find(statusList, { id: node.id });
|
|
64794
|
+
const statusData = _$1.find(statusList, { id: node.id });
|
|
64735
64795
|
if (statusData) {
|
|
64736
64796
|
const status = statusData.status;
|
|
64737
64797
|
node.status = status;
|
|
@@ -64802,9 +64862,9 @@ const __vue2_script$d = {
|
|
|
64802
64862
|
let checkedNodes = nodesNow.map((d) => d.id);
|
|
64803
64863
|
if (this.checkStrictly || !curNode.children) {
|
|
64804
64864
|
if (checkedNodes.includes(curNode.id)) {
|
|
64805
|
-
let d = _.find(nodesNow, { id: curNode.id });
|
|
64806
|
-
_.remove(checkedNodes, (d2) => d2 == curNode.id);
|
|
64807
|
-
_.remove(nodesNow, (d2) => d2.id == curNode.id);
|
|
64865
|
+
let d = _$1.find(nodesNow, { id: curNode.id });
|
|
64866
|
+
_$1.remove(checkedNodes, (d2) => d2 == curNode.id);
|
|
64867
|
+
_$1.remove(nodesNow, (d2) => d2.id == curNode.id);
|
|
64808
64868
|
d.checked = false;
|
|
64809
64869
|
} else {
|
|
64810
64870
|
curNode.checked = true;
|
|
@@ -64822,22 +64882,22 @@ const __vue2_script$d = {
|
|
|
64822
64882
|
curNode.indeterminate = false;
|
|
64823
64883
|
if (checkAll) {
|
|
64824
64884
|
curNode.checked = false;
|
|
64825
|
-
_.remove(nodesNow, (d) => d.id == curNode.id);
|
|
64826
|
-
_.remove(checkedNodes, (d) => d == curNode.id);
|
|
64885
|
+
_$1.remove(nodesNow, (d) => d.id == curNode.id);
|
|
64886
|
+
_$1.remove(checkedNodes, (d) => d == curNode.id);
|
|
64827
64887
|
deepEach(curNode.children, (child) => {
|
|
64828
64888
|
child.checked = false;
|
|
64829
|
-
_.remove(nodesNow, (d) => d.id == child.id);
|
|
64830
|
-
_.remove(checkedNodes, (d) => d == child.id);
|
|
64889
|
+
_$1.remove(nodesNow, (d) => d.id == child.id);
|
|
64890
|
+
_$1.remove(checkedNodes, (d) => d == child.id);
|
|
64831
64891
|
});
|
|
64832
64892
|
} else {
|
|
64833
64893
|
curNode.checked = true;
|
|
64834
|
-
if (_.findIndex(nodesNow, { id: curNode.id }) == -1) {
|
|
64894
|
+
if (_$1.findIndex(nodesNow, { id: curNode.id }) == -1) {
|
|
64835
64895
|
nodesNow.push(curNode);
|
|
64836
64896
|
checkedNodes.push(curNode.id);
|
|
64837
64897
|
}
|
|
64838
64898
|
deepEach(curNode.children, (child) => {
|
|
64839
64899
|
child.checked = true;
|
|
64840
|
-
if (_.findIndex(nodesNow, { id: child.id }) == -1) {
|
|
64900
|
+
if (_$1.findIndex(nodesNow, { id: child.id }) == -1) {
|
|
64841
64901
|
nodesNow.push(child);
|
|
64842
64902
|
checkedNodes.push(child.id);
|
|
64843
64903
|
}
|
|
@@ -65012,7 +65072,7 @@ const __vue2_script$d = {
|
|
|
65012
65072
|
updateNodeStatus(statusData) {
|
|
65013
65073
|
if (Array.isArray(statusData) && statusData.length) {
|
|
65014
65074
|
deepEach(this.treeData, (node) => {
|
|
65015
|
-
const matched = _.find(statusData, { id: node.id });
|
|
65075
|
+
const matched = _$1.find(statusData, { id: node.id });
|
|
65016
65076
|
if (matched) {
|
|
65017
65077
|
const status = matched.status;
|
|
65018
65078
|
node.status = status;
|
|
@@ -65021,7 +65081,7 @@ const __vue2_script$d = {
|
|
|
65021
65081
|
}
|
|
65022
65082
|
});
|
|
65023
65083
|
deepEach(this.backupTreeData, (node) => {
|
|
65024
|
-
const matched = _.find(statusData, { id: node.id });
|
|
65084
|
+
const matched = _$1.find(statusData, { id: node.id });
|
|
65025
65085
|
if (matched) {
|
|
65026
65086
|
const status = matched.status;
|
|
65027
65087
|
node.status = status;
|
|
@@ -65037,14 +65097,14 @@ const __vue2_script$d = {
|
|
|
65037
65097
|
highlightNodes(selectedTitles, callback) {
|
|
65038
65098
|
if (!selectedTitles) {
|
|
65039
65099
|
this.treeData = [];
|
|
65040
|
-
this.treeData = _.cloneDeep(this.backupTreeData);
|
|
65100
|
+
this.treeData = _$1.cloneDeep(this.backupTreeData);
|
|
65041
65101
|
this.$nextTick(() => {
|
|
65042
65102
|
this.$emit("on-check-change");
|
|
65043
65103
|
});
|
|
65044
65104
|
return false;
|
|
65045
65105
|
}
|
|
65046
65106
|
let num = 0;
|
|
65047
|
-
let data = _.cloneDeep(this.backupTreeData);
|
|
65107
|
+
let data = _$1.cloneDeep(this.backupTreeData);
|
|
65048
65108
|
if (Array.isArray(selectedTitles) && selectedTitles.length) {
|
|
65049
65109
|
deepEach(data, (node) => {
|
|
65050
65110
|
let matched = false;
|
|
@@ -65231,12 +65291,12 @@ const __vue2_script$c = {
|
|
|
65231
65291
|
this.checkedNodeList = nodes.filter((node) => !node.children || node.children.length === 0);
|
|
65232
65292
|
} else {
|
|
65233
65293
|
if (curNode.checked) {
|
|
65234
|
-
if (_.findIndex(this.checkedNodeList, { id: curNode.id }) == -1) {
|
|
65294
|
+
if (_$1.findIndex(this.checkedNodeList, { id: curNode.id }) == -1) {
|
|
65235
65295
|
this.checkedNodeList.push(curNode);
|
|
65236
65296
|
}
|
|
65237
65297
|
} else {
|
|
65238
|
-
let checkNodesClone = _.cloneDeep(this.checkedNodeList);
|
|
65239
|
-
_.remove(checkNodesClone, { id: curNode.id });
|
|
65298
|
+
let checkNodesClone = _$1.cloneDeep(this.checkedNodeList);
|
|
65299
|
+
_$1.remove(checkNodesClone, { id: curNode.id });
|
|
65240
65300
|
this.checkedNodeList = checkNodesClone;
|
|
65241
65301
|
}
|
|
65242
65302
|
}
|
|
@@ -65280,7 +65340,7 @@ const __vue2_script$c = {
|
|
|
65280
65340
|
this.searchNum = data;
|
|
65281
65341
|
},
|
|
65282
65342
|
updateSelectedTitles() {
|
|
65283
|
-
this.selectedTitles = _.join(_.map(this.checkedNodeList, "title"), "\uFF0C");
|
|
65343
|
+
this.selectedTitles = _$1.join(_$1.map(this.checkedNodeList, "title"), "\uFF0C");
|
|
65284
65344
|
},
|
|
65285
65345
|
getSelectedNodes() {
|
|
65286
65346
|
return this.$refs.tree.getSelectedNodes();
|
|
@@ -65877,12 +65937,11 @@ var render$4 = function() {
|
|
|
65877
65937
|
var _vm = this;
|
|
65878
65938
|
var _h = _vm.$createElement;
|
|
65879
65939
|
var _c = _vm._self._c || _h;
|
|
65880
|
-
return _c("Modal", { staticClass: "preview-modal", attrs: { "width": "80" }, on: { "on-cancel": _vm.onCancel }, model: { value: _vm.boxShow, callback: function($$v) {
|
|
65940
|
+
return _c("Modal", { staticClass: "ind-file-preview-modal", attrs: { "width": "80" }, on: { "on-cancel": _vm.onCancel }, model: { value: _vm.boxShow, callback: function($$v) {
|
|
65881
65941
|
_vm.boxShow = $$v;
|
|
65882
|
-
}, expression: "boxShow" } }, [_c("div", { staticStyle: { "width": "100%", "height": "100%", "display": "flex", "justify-content": "center" } }, [_vm.boxShow ? _c("div", { staticClass: "preview-content", attrs: { "id": _vm.id } }) : _vm._e()]), _c("div", { attrs: { "slot": "footer" }, slot: "footer" })]);
|
|
65942
|
+
}, expression: "boxShow" } }, [_c("div", { staticStyle: { "width": "100%", "height": "100%", "display": "flex", "justify-content": "center" } }, [_vm.boxShow ? _c("div", { staticClass: "ind-file-preview-content", attrs: { "id": _vm.id } }) : _vm._e()]), _c("div", { attrs: { "slot": "footer" }, slot: "footer" })]);
|
|
65883
65943
|
};
|
|
65884
65944
|
var staticRenderFns$4 = [];
|
|
65885
|
-
var previewModal_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
65886
65945
|
const __vue2_script$4 = {
|
|
65887
65946
|
name: "PreviewModal",
|
|
65888
65947
|
props: {
|
|
@@ -65919,15 +65978,11 @@ const __vue2_script$4 = {
|
|
|
65919
65978
|
tempUrl = result.data;
|
|
65920
65979
|
}
|
|
65921
65980
|
console.log("tempUrl is", tempUrl);
|
|
65922
|
-
var instance =
|
|
65981
|
+
var instance = OpenSDK == null ? void 0 : OpenSDK.config({
|
|
65923
65982
|
url: tempUrl,
|
|
65924
65983
|
mount: document.getElementById(this.id)
|
|
65925
65984
|
});
|
|
65926
65985
|
console.log("instance-----", instance);
|
|
65927
|
-
instance.setToken({
|
|
65928
|
-
token,
|
|
65929
|
-
timeout: 10 * 60 * 1e3
|
|
65930
|
-
});
|
|
65931
65986
|
console.log("wps instance", instance);
|
|
65932
65987
|
},
|
|
65933
65988
|
onCancel() {
|
|
@@ -65943,7 +65998,7 @@ var __component__$4 = /* @__PURE__ */ normalizeComponent(
|
|
|
65943
65998
|
staticRenderFns$4,
|
|
65944
65999
|
false,
|
|
65945
66000
|
__vue2_injectStyles$4,
|
|
65946
|
-
|
|
66001
|
+
null,
|
|
65947
66002
|
null,
|
|
65948
66003
|
null
|
|
65949
66004
|
);
|
|
@@ -66072,7 +66127,7 @@ const __vue2_script$3 = {
|
|
|
66072
66127
|
},
|
|
66073
66128
|
methods: {
|
|
66074
66129
|
initUploadList() {
|
|
66075
|
-
const uploadList = _.cloneDeep(this.defaultList);
|
|
66130
|
+
const uploadList = _$1.cloneDeep(this.defaultList);
|
|
66076
66131
|
uploadList.forEach((item2) => {
|
|
66077
66132
|
if (item2.fileId) {
|
|
66078
66133
|
item2.fileUrl = getOssFileUrl(item2.fileId);
|
|
@@ -66081,7 +66136,7 @@ const __vue2_script$3 = {
|
|
|
66081
66136
|
this.uploadList = uploadList;
|
|
66082
66137
|
},
|
|
66083
66138
|
removeItem(file) {
|
|
66084
|
-
const idx = _.findIndex(this.uploadList, { fileId: file.fileId });
|
|
66139
|
+
const idx = _$1.findIndex(this.uploadList, { fileId: file.fileId });
|
|
66085
66140
|
if (idx !== -1) {
|
|
66086
66141
|
const deleteItem = this.uploadList[idx];
|
|
66087
66142
|
this.uploadList.splice(idx, 1);
|
|
@@ -66103,7 +66158,7 @@ const __vue2_script$3 = {
|
|
|
66103
66158
|
fileName: fileInfo.fileName
|
|
66104
66159
|
};
|
|
66105
66160
|
this.uploadList.push(item2);
|
|
66106
|
-
const allDone = _.every(this.uploadAllList, (item3) => item3.status !== "uploading");
|
|
66161
|
+
const allDone = _$1.every(this.uploadAllList, (item3) => item3.status !== "uploading");
|
|
66107
66162
|
if (allDone) {
|
|
66108
66163
|
this.loading = false;
|
|
66109
66164
|
this.$emit("onSuccess", this.uploadList, res, file);
|
|
@@ -66278,7 +66333,7 @@ const __vue2_script$2 = {
|
|
|
66278
66333
|
},
|
|
66279
66334
|
methods: {
|
|
66280
66335
|
initUploadList() {
|
|
66281
|
-
const uploadList = _.cloneDeep(this.defaultList);
|
|
66336
|
+
const uploadList = _$1.cloneDeep(this.defaultList);
|
|
66282
66337
|
uploadList.forEach((item2) => {
|
|
66283
66338
|
if (item2.fileId) {
|
|
66284
66339
|
item2.fileUrl = getOssFileUrl(item2.fileId);
|
|
@@ -66299,7 +66354,7 @@ const __vue2_script$2 = {
|
|
|
66299
66354
|
content: "\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",
|
|
66300
66355
|
loading: true
|
|
66301
66356
|
});
|
|
66302
|
-
const idx = _.findIndex(this.uploadList, { fileId: file.fileId });
|
|
66357
|
+
const idx = _$1.findIndex(this.uploadList, { fileId: file.fileId });
|
|
66303
66358
|
if (idx !== -1) {
|
|
66304
66359
|
const deleteItem = this.uploadList[idx];
|
|
66305
66360
|
this.uploadList.splice(idx, 1);
|
|
@@ -66328,7 +66383,7 @@ const __vue2_script$2 = {
|
|
|
66328
66383
|
this.uploadList = [];
|
|
66329
66384
|
}
|
|
66330
66385
|
this.uploadList.push(item2);
|
|
66331
|
-
const allDone = _.every(this.uploadAllList, (item3) => item3.status !== "uploading");
|
|
66386
|
+
const allDone = _$1.every(this.uploadAllList, (item3) => item3.status !== "uploading");
|
|
66332
66387
|
if (allDone) {
|
|
66333
66388
|
this.loading = false;
|
|
66334
66389
|
this.$emit("onSuccess", this.uploadList, res, file);
|
|
@@ -66568,7 +66623,7 @@ const __vue2_script$1 = {
|
|
|
66568
66623
|
},
|
|
66569
66624
|
watch: {
|
|
66570
66625
|
"authDetaileTypeForm.authDetaileTypeParam": {
|
|
66571
|
-
handler: _.debounce(function(newVal) {
|
|
66626
|
+
handler: _$1.debounce(function(newVal) {
|
|
66572
66627
|
if (this.selectedRole && newVal.length > 0) {
|
|
66573
66628
|
this.reloadAuthTree();
|
|
66574
66629
|
}
|
|
@@ -66593,7 +66648,7 @@ const __vue2_script$1 = {
|
|
|
66593
66648
|
this.tableLoading = false;
|
|
66594
66649
|
await this.$nextTick();
|
|
66595
66650
|
},
|
|
66596
|
-
tableSelectChange: _.debounce(function(selectedRows) {
|
|
66651
|
+
tableSelectChange: _$1.debounce(function(selectedRows) {
|
|
66597
66652
|
if (selectedRows.length) {
|
|
66598
66653
|
this.selectedRole = selectedRows[0];
|
|
66599
66654
|
this.authDetaileTypeForm.authDetaileTypeParam = [];
|
|
@@ -66932,7 +66987,7 @@ const __vue2_script = {
|
|
|
66932
66987
|
},
|
|
66933
66988
|
watch: {
|
|
66934
66989
|
"authDetaileTypeForm.authDetaileTypeParam": {
|
|
66935
|
-
handler: _.debounce(function(newVal) {
|
|
66990
|
+
handler: _$1.debounce(function(newVal) {
|
|
66936
66991
|
if (this.selectUser && newVal.length > 0) {
|
|
66937
66992
|
this.reloadAuthTree();
|
|
66938
66993
|
}
|
|
@@ -67175,8 +67230,8 @@ var routerPlugin = {
|
|
|
67175
67230
|
const breadCrumbList = store2.state.app.breadCrumbList;
|
|
67176
67231
|
store2.commit("closeTag", {
|
|
67177
67232
|
$router: router,
|
|
67178
|
-
route: _.cloneDeep(
|
|
67179
|
-
_.find(store2.state.app.tagNavList, {
|
|
67233
|
+
route: _$1.cloneDeep(
|
|
67234
|
+
_$1.find(store2.state.app.tagNavList, {
|
|
67180
67235
|
name: breadCrumbList[breadCrumbList.length - 1].name
|
|
67181
67236
|
}) || {}
|
|
67182
67237
|
)
|
|
@@ -67252,7 +67307,7 @@ const notFoundRoute = {
|
|
|
67252
67307
|
component: NotFound
|
|
67253
67308
|
};
|
|
67254
67309
|
function createMacroBasicRoutes({ homeComponent, rootChildren } = {}) {
|
|
67255
|
-
const rootRouteTemp = _.cloneDeep(rootRoute);
|
|
67310
|
+
const rootRouteTemp = _$1.cloneDeep(rootRoute);
|
|
67256
67311
|
if (homeComponent) {
|
|
67257
67312
|
rootRouteTemp.children[0].component = homeComponent;
|
|
67258
67313
|
}
|
|
@@ -67266,7 +67321,7 @@ function createMacroBasicRoutes({ homeComponent, rootChildren } = {}) {
|
|
|
67266
67321
|
return routesTmp;
|
|
67267
67322
|
}
|
|
67268
67323
|
function createMicroBasicRoutes({ rootChildren } = {}) {
|
|
67269
|
-
const rootRouteTemp = _.cloneDeep(rootRoute);
|
|
67324
|
+
const rootRouteTemp = _$1.cloneDeep(rootRoute);
|
|
67270
67325
|
rootRouteTemp.component = EmptyLayout;
|
|
67271
67326
|
rootRouteTemp.children = [];
|
|
67272
67327
|
if (rootChildren && rootChildren.length) {
|
|
@@ -67444,7 +67499,7 @@ async function renderRoutes({ router, store: store2, microType, allowPermissionL
|
|
|
67444
67499
|
await store2.dispatch("getUserInfo");
|
|
67445
67500
|
await store2.dispatch("getAppListData");
|
|
67446
67501
|
const permissionData = await store2.dispatch("getPermissionData");
|
|
67447
|
-
router.options = _.cloneDeep(routerOptionsBak);
|
|
67502
|
+
router.options = _$1.cloneDeep(routerOptionsBak);
|
|
67448
67503
|
const microPermissionData = filterMicroPermissionList(microType, permissionData);
|
|
67449
67504
|
const dynamicRouters = generatorDynamicRouter(microPermissionData, microType);
|
|
67450
67505
|
console.log("dynamicROuters", dynamicRouters);
|
|
@@ -67468,7 +67523,7 @@ async function renderRoutes({ router, store: store2, microType, allowPermissionL
|
|
|
67468
67523
|
}
|
|
67469
67524
|
function addRouterGuards({ router, store: store2, microType, allowPermissionList }) {
|
|
67470
67525
|
const LOGIN_PAGE_NAME = config.loginRouteName;
|
|
67471
|
-
const routerOptionsBak = _.cloneDeep(router.options);
|
|
67526
|
+
const routerOptionsBak = _$1.cloneDeep(router.options);
|
|
67472
67527
|
window.sessionNotValidHandler = function() {
|
|
67473
67528
|
let url = location.href;
|
|
67474
67529
|
const searchIdx = url.indexOf("?");
|
|
@@ -67492,18 +67547,18 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
67492
67547
|
};
|
|
67493
67548
|
router.beforeEach(async (to, from, next) => {
|
|
67494
67549
|
LoadingBar.start();
|
|
67495
|
-
let
|
|
67550
|
+
let token = getToken();
|
|
67496
67551
|
let search = location.search;
|
|
67497
67552
|
if (search) {
|
|
67498
67553
|
let rlt = /token=(.*)/.exec(search);
|
|
67499
67554
|
if (rlt && rlt.length > 1) {
|
|
67500
|
-
if (
|
|
67501
|
-
|
|
67502
|
-
store2.dispatch("loginSuccess",
|
|
67555
|
+
if (token !== rlt[1]) {
|
|
67556
|
+
token = rlt[1];
|
|
67557
|
+
store2.dispatch("loginSuccess", token);
|
|
67503
67558
|
}
|
|
67504
67559
|
}
|
|
67505
67560
|
}
|
|
67506
|
-
if (!
|
|
67561
|
+
if (!token) {
|
|
67507
67562
|
fetch(
|
|
67508
67563
|
`${window.location.protocol}//${window.location.host}/ind-uc-ext-server/sso/ssoTokenLogin`,
|
|
67509
67564
|
{
|
|
@@ -67522,13 +67577,13 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
67522
67577
|
}
|
|
67523
67578
|
).then((response) => response.json()).then((jsonData) => {
|
|
67524
67579
|
if (jsonData.token) {
|
|
67525
|
-
|
|
67526
|
-
sessionStorage.setItem("lambo-token",
|
|
67527
|
-
store2.dispatch("loginSuccess",
|
|
67580
|
+
token = jsonData.token;
|
|
67581
|
+
sessionStorage.setItem("lambo-token", token);
|
|
67582
|
+
store2.dispatch("loginSuccess", token);
|
|
67528
67583
|
}
|
|
67529
67584
|
});
|
|
67530
67585
|
}
|
|
67531
|
-
if (!
|
|
67586
|
+
if (!token && to.name !== LOGIN_PAGE_NAME) {
|
|
67532
67587
|
next({ name: LOGIN_PAGE_NAME });
|
|
67533
67588
|
} else if (to.name === LOGIN_PAGE_NAME) {
|
|
67534
67589
|
next();
|
|
@@ -67577,9 +67632,9 @@ var user = {
|
|
|
67577
67632
|
setUserManageUnitId(state, userManageUnitId) {
|
|
67578
67633
|
state.userManageUnitId = userManageUnitId;
|
|
67579
67634
|
},
|
|
67580
|
-
setToken(state,
|
|
67581
|
-
state.token =
|
|
67582
|
-
setToken(
|
|
67635
|
+
setToken(state, token) {
|
|
67636
|
+
state.token = token;
|
|
67637
|
+
setToken(token);
|
|
67583
67638
|
}
|
|
67584
67639
|
},
|
|
67585
67640
|
actions: {
|
|
@@ -67588,9 +67643,9 @@ var user = {
|
|
|
67588
67643
|
dispatch2("loginSuccess", result.token);
|
|
67589
67644
|
return result.url;
|
|
67590
67645
|
},
|
|
67591
|
-
loginSuccess({ commit: commit2, dispatch: dispatch2 },
|
|
67646
|
+
loginSuccess({ commit: commit2, dispatch: dispatch2 }, token) {
|
|
67592
67647
|
clearUserInfoCache();
|
|
67593
|
-
commit2("setToken",
|
|
67648
|
+
commit2("setToken", token);
|
|
67594
67649
|
commit2("setTagNavList", []);
|
|
67595
67650
|
if (window.top === window.self) {
|
|
67596
67651
|
clearPermissionCache();
|
|
@@ -67883,7 +67938,7 @@ var app = {
|
|
|
67883
67938
|
if (indexDesc) {
|
|
67884
67939
|
commit2(
|
|
67885
67940
|
"setIndexDesc",
|
|
67886
|
-
_.reduce(
|
|
67941
|
+
_$1.reduce(
|
|
67887
67942
|
indexDesc,
|
|
67888
67943
|
(sum, d) => {
|
|
67889
67944
|
sum[d.indexCode] = d.indexDesc;
|
|
@@ -67899,7 +67954,7 @@ var app = {
|
|
|
67899
67954
|
indexDesc = data;
|
|
67900
67955
|
commit2(
|
|
67901
67956
|
"setIndexDesc",
|
|
67902
|
-
_.reduce(
|
|
67957
|
+
_$1.reduce(
|
|
67903
67958
|
indexDesc,
|
|
67904
67959
|
(sum, d) => {
|
|
67905
67960
|
sum[d.indexCode] = d.indexDesc;
|
|
@@ -67921,8 +67976,19 @@ const store = {
|
|
|
67921
67976
|
const install = function(Vue2, opts = { theme: "" }) {
|
|
67922
67977
|
if (install.installed)
|
|
67923
67978
|
return;
|
|
67979
|
+
initWps();
|
|
67924
67980
|
const theme = opts.theme || getDefaultTheme();
|
|
67925
67981
|
doChangeTheme(theme);
|
|
67982
|
+
let url = location.protocol + "//" + location.host + "/ibp-sc/manage/global?t=" + new Date().getTime();
|
|
67983
|
+
axios.get(url).then((data) => {
|
|
67984
|
+
if (data.smallTheme) {
|
|
67985
|
+
let smallThemeDom = document.getElementsByClassName("ind-small-theme")[0];
|
|
67986
|
+
_.forIn(data.smallTheme, (v, k) => {
|
|
67987
|
+
smallThemeDom.style.setProperty(k, v);
|
|
67988
|
+
});
|
|
67989
|
+
}
|
|
67990
|
+
Vue2.prototype.$config = data;
|
|
67991
|
+
});
|
|
67926
67992
|
Object.keys(components).forEach((key) => {
|
|
67927
67993
|
Vue2.component(`Ind${key}`, components[key]);
|
|
67928
67994
|
});
|