@ibiz-template/vue3-util 0.7.41-alpha.76 → 0.7.41-alpha.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +71 -64
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.mjs +71 -64
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +81 -68
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +71 -64
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.controller.cjs +71 -64
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +81 -68
- package/package.json +4 -4
|
@@ -127,77 +127,84 @@ class MultiDataContainerController extends runtime.PanelContainerController {
|
|
|
127
127
|
* @date 2023-08-04 03:05:59
|
|
128
128
|
* @protected
|
|
129
129
|
*/
|
|
130
|
-
initContainerData() {
|
|
131
|
-
const { dataSourceType, dataName, scriptCode } = this.model;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
130
|
+
async initContainerData() {
|
|
131
|
+
const { dataSourceType, dataName, scriptCode, showBusyIndicator } = this.model;
|
|
132
|
+
try {
|
|
133
|
+
if (showBusyIndicator)
|
|
134
|
+
this.startLoading();
|
|
135
|
+
switch (dataSourceType) {
|
|
136
|
+
case "DEACTION":
|
|
137
|
+
case "DEDATASET":
|
|
138
|
+
await this.setDataByDeMethod();
|
|
139
|
+
break;
|
|
140
|
+
case "APPGLOBALPARAM":
|
|
141
|
+
this.setDataByAppGlobalParam();
|
|
142
|
+
break;
|
|
143
|
+
case "DELOGIC":
|
|
144
|
+
await this.setDataByDeLogic();
|
|
145
|
+
break;
|
|
146
|
+
case "TOPVIEWSESSIONPARAM": {
|
|
147
|
+
if (!dataName) {
|
|
148
|
+
throw new core.RuntimeModelError(
|
|
149
|
+
this.model,
|
|
150
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
this.bindViewData(this.panel.getTopView(), dataName);
|
|
154
|
+
break;
|
|
149
155
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
case "VIEWSESSIONPARAM": {
|
|
157
|
+
if (!dataName) {
|
|
158
|
+
throw new core.RuntimeModelError(
|
|
159
|
+
this.model,
|
|
160
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
this.bindViewData(this.panel.view, dataName);
|
|
164
|
+
break;
|
|
159
165
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
case "ACTIVEDATAPARAM": {
|
|
167
|
+
if (!dataName) {
|
|
168
|
+
throw new core.RuntimeModelError(
|
|
169
|
+
this.model,
|
|
170
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
await this.setData(this.dataParent.data[dataName]);
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
case "CUSTOM": {
|
|
177
|
+
if (!scriptCode) {
|
|
178
|
+
throw new core.RuntimeModelError(
|
|
179
|
+
this.model,
|
|
180
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
const computeData = runtime.ScriptFactory.execScriptFn(
|
|
184
|
+
{
|
|
185
|
+
...this.panel.getEventArgs(),
|
|
186
|
+
data: this.dataParent.data
|
|
187
|
+
},
|
|
188
|
+
scriptCode,
|
|
189
|
+
{
|
|
190
|
+
isAsync: false,
|
|
191
|
+
singleRowReturn: true
|
|
192
|
+
}
|
|
168
193
|
);
|
|
194
|
+
await this.setData(computeData);
|
|
195
|
+
break;
|
|
169
196
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
case "CUSTOM": {
|
|
174
|
-
if (!scriptCode) {
|
|
175
|
-
throw new core.RuntimeModelError(
|
|
197
|
+
default:
|
|
198
|
+
throw new core.ModelError(
|
|
176
199
|
this.model,
|
|
177
|
-
ibiz.i18n.t("vue3Util.panelComponent.
|
|
200
|
+
ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType", {
|
|
201
|
+
dataSourceType
|
|
202
|
+
})
|
|
178
203
|
);
|
|
179
|
-
}
|
|
180
|
-
const computeData = runtime.ScriptFactory.execScriptFn(
|
|
181
|
-
{
|
|
182
|
-
...this.panel.getEventArgs(),
|
|
183
|
-
data: this.dataParent.data
|
|
184
|
-
},
|
|
185
|
-
scriptCode,
|
|
186
|
-
{
|
|
187
|
-
isAsync: false,
|
|
188
|
-
singleRowReturn: true
|
|
189
|
-
}
|
|
190
|
-
);
|
|
191
|
-
this.setData(computeData);
|
|
192
|
-
break;
|
|
193
204
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType", {
|
|
198
|
-
dataSourceType
|
|
199
|
-
})
|
|
200
|
-
);
|
|
205
|
+
} finally {
|
|
206
|
+
if (showBusyIndicator)
|
|
207
|
+
this.endLoading();
|
|
201
208
|
}
|
|
202
209
|
}
|
|
203
210
|
/**
|
package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.controller.cjs
CHANGED
|
@@ -136,77 +136,84 @@ class MultiDataContainerRawController extends runtime.PanelContainerController {
|
|
|
136
136
|
* @protected
|
|
137
137
|
* @memberof MultiDataContainerRawController
|
|
138
138
|
*/
|
|
139
|
-
initContainerData() {
|
|
140
|
-
const { dataSourceType, dataName, scriptCode } = this.model;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
139
|
+
async initContainerData() {
|
|
140
|
+
const { dataSourceType, dataName, scriptCode, showBusyIndicator } = this.model;
|
|
141
|
+
try {
|
|
142
|
+
if (showBusyIndicator)
|
|
143
|
+
this.startLoading();
|
|
144
|
+
switch (dataSourceType) {
|
|
145
|
+
case "DEACTION":
|
|
146
|
+
case "DEDATASET":
|
|
147
|
+
await this.setDataByDeMethod();
|
|
148
|
+
break;
|
|
149
|
+
case "APPGLOBALPARAM":
|
|
150
|
+
this.setDataByAppGlobalParam();
|
|
151
|
+
break;
|
|
152
|
+
case "DELOGIC":
|
|
153
|
+
await this.setDataByDeLogic();
|
|
154
|
+
break;
|
|
155
|
+
case "TOPVIEWSESSIONPARAM": {
|
|
156
|
+
if (!dataName) {
|
|
157
|
+
throw new core.RuntimeModelError(
|
|
158
|
+
this.model,
|
|
159
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
this.bindViewData(this.panel.getTopView(), dataName);
|
|
163
|
+
break;
|
|
158
164
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
case "VIEWSESSIONPARAM": {
|
|
166
|
+
if (!dataName) {
|
|
167
|
+
throw new core.RuntimeModelError(
|
|
168
|
+
this.model,
|
|
169
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
this.bindViewData(this.panel.view, dataName);
|
|
173
|
+
break;
|
|
168
174
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
case "ACTIVEDATAPARAM": {
|
|
176
|
+
if (!dataName) {
|
|
177
|
+
throw new core.RuntimeModelError(
|
|
178
|
+
this.model,
|
|
179
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
await this.setData(this.dataParent.data[dataName]);
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
case "CUSTOM": {
|
|
186
|
+
if (!scriptCode) {
|
|
187
|
+
throw new core.RuntimeModelError(
|
|
188
|
+
this.model,
|
|
189
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
const computeData = runtime.ScriptFactory.execScriptFn(
|
|
193
|
+
{
|
|
194
|
+
...this.panel.getEventArgs(),
|
|
195
|
+
data: this.dataParent.data
|
|
196
|
+
},
|
|
197
|
+
scriptCode,
|
|
198
|
+
{
|
|
199
|
+
isAsync: false,
|
|
200
|
+
singleRowReturn: true
|
|
201
|
+
}
|
|
177
202
|
);
|
|
203
|
+
await this.setData(computeData);
|
|
204
|
+
break;
|
|
178
205
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
case "CUSTOM": {
|
|
183
|
-
if (!scriptCode) {
|
|
184
|
-
throw new core.RuntimeModelError(
|
|
206
|
+
default:
|
|
207
|
+
throw new core.ModelError(
|
|
185
208
|
this.model,
|
|
186
|
-
ibiz.i18n.t("vue3Util.panelComponent.
|
|
209
|
+
ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType", {
|
|
210
|
+
dataSourceType
|
|
211
|
+
})
|
|
187
212
|
);
|
|
188
|
-
}
|
|
189
|
-
const computeData = runtime.ScriptFactory.execScriptFn(
|
|
190
|
-
{
|
|
191
|
-
...this.panel.getEventArgs(),
|
|
192
|
-
data: this.dataParent.data
|
|
193
|
-
},
|
|
194
|
-
scriptCode,
|
|
195
|
-
{
|
|
196
|
-
isAsync: false,
|
|
197
|
-
singleRowReturn: true
|
|
198
|
-
}
|
|
199
|
-
);
|
|
200
|
-
this.setData(computeData);
|
|
201
|
-
break;
|
|
202
213
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType", {
|
|
207
|
-
dataSourceType
|
|
208
|
-
})
|
|
209
|
-
);
|
|
214
|
+
} finally {
|
|
215
|
+
if (showBusyIndicator)
|
|
216
|
+
this.endLoading();
|
|
210
217
|
}
|
|
211
218
|
}
|
|
212
219
|
/**
|
|
@@ -134,81 +134,94 @@ class SingleDataContainerController extends runtime.PanelContainerController {
|
|
|
134
134
|
* @date 2023-08-04 03:05:59
|
|
135
135
|
* @protected
|
|
136
136
|
*/
|
|
137
|
-
initContainerData() {
|
|
138
|
-
const {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
this.
|
|
150
|
-
|
|
151
|
-
case "DELOGIC":
|
|
152
|
-
this.setDataByDeLogic();
|
|
153
|
-
break;
|
|
154
|
-
case "TOPVIEWSESSIONPARAM": {
|
|
155
|
-
if (!dataName) {
|
|
156
|
-
throw new core.RuntimeModelError(
|
|
157
|
-
this.model,
|
|
158
|
-
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
this.bindViewData(this.panel.getTopView(), dataName);
|
|
162
|
-
break;
|
|
137
|
+
async initContainerData() {
|
|
138
|
+
const {
|
|
139
|
+
dataName,
|
|
140
|
+
scriptCode,
|
|
141
|
+
dataSourceType,
|
|
142
|
+
dataRegionType,
|
|
143
|
+
showBusyIndicator
|
|
144
|
+
} = this.model;
|
|
145
|
+
try {
|
|
146
|
+
if (showBusyIndicator)
|
|
147
|
+
this.startLoading();
|
|
148
|
+
if (dataRegionType === "LOGINFORM") {
|
|
149
|
+
this.setLoginForm();
|
|
150
|
+
return;
|
|
163
151
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
152
|
+
switch (dataSourceType) {
|
|
153
|
+
case "DEACTION":
|
|
154
|
+
case "DEDATASET":
|
|
155
|
+
await this.setDataByDeMethod();
|
|
156
|
+
break;
|
|
157
|
+
case "APPGLOBALPARAM":
|
|
158
|
+
this.setDataByAppGlobalParam();
|
|
159
|
+
break;
|
|
160
|
+
case "DELOGIC":
|
|
161
|
+
await this.setDataByDeLogic();
|
|
162
|
+
break;
|
|
163
|
+
case "TOPVIEWSESSIONPARAM": {
|
|
164
|
+
if (!dataName) {
|
|
165
|
+
throw new core.RuntimeModelError(
|
|
166
|
+
this.model,
|
|
167
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
this.bindViewData(this.panel.getTopView(), dataName);
|
|
171
|
+
break;
|
|
170
172
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
173
|
+
case "VIEWSESSIONPARAM": {
|
|
174
|
+
if (!dataName) {
|
|
175
|
+
throw new core.RuntimeModelError(
|
|
176
|
+
this.model,
|
|
177
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
this.bindViewData(this.panel.view, dataName);
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
case "ACTIVEDATAPARAM": {
|
|
184
|
+
if (!dataName) {
|
|
185
|
+
throw new core.RuntimeModelError(
|
|
186
|
+
this.model,
|
|
187
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
await this.setData(this.dataParent.data[dataName]);
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
case "CUSTOM": {
|
|
194
|
+
if (!scriptCode) {
|
|
195
|
+
throw new core.RuntimeModelError(
|
|
196
|
+
this.model,
|
|
197
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
const computeData = runtime.ScriptFactory.execScriptFn(
|
|
201
|
+
{
|
|
202
|
+
...this.panel.getEventArgs(),
|
|
203
|
+
data: this.dataParent.data
|
|
204
|
+
},
|
|
205
|
+
scriptCode,
|
|
206
|
+
{
|
|
207
|
+
isAsync: false,
|
|
208
|
+
singleRowReturn: true
|
|
209
|
+
}
|
|
179
210
|
);
|
|
211
|
+
await this.setData(computeData);
|
|
212
|
+
break;
|
|
180
213
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
case "CUSTOM": {
|
|
185
|
-
if (!scriptCode) {
|
|
186
|
-
throw new core.RuntimeModelError(
|
|
214
|
+
default:
|
|
215
|
+
throw new core.ModelError(
|
|
187
216
|
this.model,
|
|
188
|
-
ibiz.i18n.t("vue3Util.panelComponent.
|
|
217
|
+
ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType", {
|
|
218
|
+
dataSourceType
|
|
219
|
+
})
|
|
189
220
|
);
|
|
190
|
-
}
|
|
191
|
-
const computeData = runtime.ScriptFactory.execScriptFn(
|
|
192
|
-
{
|
|
193
|
-
...this.panel.getEventArgs(),
|
|
194
|
-
data: this.dataParent.data
|
|
195
|
-
},
|
|
196
|
-
scriptCode,
|
|
197
|
-
{
|
|
198
|
-
isAsync: false,
|
|
199
|
-
singleRowReturn: true
|
|
200
|
-
}
|
|
201
|
-
);
|
|
202
|
-
this.setData(computeData);
|
|
203
|
-
break;
|
|
204
221
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType", {
|
|
209
|
-
dataSourceType
|
|
210
|
-
})
|
|
211
|
-
);
|
|
222
|
+
} finally {
|
|
223
|
+
if (showBusyIndicator)
|
|
224
|
+
this.endLoading();
|
|
212
225
|
}
|
|
213
226
|
}
|
|
214
227
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-util",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.78",
|
|
4
4
|
"description": "通用组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@ibiz-template/cli": "^0.3.23",
|
|
40
|
-
"@ibiz-template/core": "^0.7.41-alpha.
|
|
41
|
-
"@ibiz-template/runtime": "^0.7.41-alpha.
|
|
40
|
+
"@ibiz-template/core": "^0.7.41-alpha.78",
|
|
41
|
+
"@ibiz-template/runtime": "^0.7.41-alpha.78",
|
|
42
42
|
"@ibiz-template/theme": "^0.7.39",
|
|
43
43
|
"@ibiz/model-core": "^0.1.84",
|
|
44
44
|
"@types/path-browserify": "^1.0.2",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"vue": "^3.3.8",
|
|
68
68
|
"vue-router": "^4.2.4"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "38afd6a27e57380b9240b87a849b874aa64d4c05"
|
|
71
71
|
}
|