super-page-runtime 2.0.56 → 2.0.57
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.
|
@@ -12,6 +12,7 @@ import { refreshPage } from "../api/api-util.js";
|
|
|
12
12
|
import { getPermissionCodes, getModelFields } from "../page-init-util.js";
|
|
13
13
|
import { updateChartDatasources, getVariableValue, setVariableValue } from "../page-helper-util.js";
|
|
14
14
|
import printLabelUtil from "./print-label.js";
|
|
15
|
+
import { getTableNameByTableUuid } from "../table-utils.js";
|
|
15
16
|
const standardEvents = {
|
|
16
17
|
// 表单标准事件保存save
|
|
17
18
|
save: function(params) {
|
|
@@ -750,10 +751,11 @@ function deleteFunc(params) {
|
|
|
750
751
|
).then(() => {
|
|
751
752
|
const pageContext = params.pageContext;
|
|
752
753
|
const configureObj = params.configureObj;
|
|
753
|
-
const tableName = pageContext.tableName;
|
|
754
754
|
const configureBase = configureObj.props.base;
|
|
755
755
|
const systemCode = pageContext.systemCode;
|
|
756
756
|
const backendUrl = pageContext.backendUrl;
|
|
757
|
+
let tableUuid = configureObj.props.base.tableUuid;
|
|
758
|
+
const tableName = getTableNameByTableUuid(pageContext, tableUuid);
|
|
757
759
|
const baseUrl = getBaseUrl(backendUrl, pageContext.isTest);
|
|
758
760
|
let path = baseUrl + "/dsc/commons/" + tableName;
|
|
759
761
|
path = getRealRestApiPath(path, systemCode, backendUrl, pageContext.isTest);
|
|
@@ -792,7 +794,6 @@ function deleteFunc(params) {
|
|
|
792
794
|
http.delete(path, {
|
|
793
795
|
data: param
|
|
794
796
|
}).then((data) => {
|
|
795
|
-
const tableUuid = configureObj.props.base.tableUuid;
|
|
796
797
|
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
797
798
|
if (gridRef) {
|
|
798
799
|
gridRef.isDeleteChange(true);
|
|
@@ -10,7 +10,19 @@ function popupToPage(params) {
|
|
|
10
10
|
console.log("弹框显示页面--popupToPage====params=", params);
|
|
11
11
|
eventBus.$emit(pageCode + "_open-dialog", params);
|
|
12
12
|
}
|
|
13
|
+
function getTableNameByTableUuid(pageContext, tableUuid) {
|
|
14
|
+
let tableName = pageContext.tableName;
|
|
15
|
+
if (!tableUuid && tableName) {
|
|
16
|
+
return tableName;
|
|
17
|
+
}
|
|
18
|
+
let tableConfigure;
|
|
19
|
+
if (pageContext.tableRuntimes && tableUuid && pageContext.tableRuntimes[tableUuid]) {
|
|
20
|
+
tableConfigure = JSON.parse(pageContext.tableRuntimes[tableUuid].configure);
|
|
21
|
+
}
|
|
22
|
+
return tableConfigure && tableConfigure.props && tableConfigure.props.dataOrigin ? tableConfigure.props.dataOrigin.tableName : null;
|
|
23
|
+
}
|
|
13
24
|
export {
|
|
14
25
|
getDataTypeMapRequest,
|
|
26
|
+
getTableNameByTableUuid,
|
|
15
27
|
popupToPage
|
|
16
28
|
};
|