centaline-data-driven-v3 0.0.57 → 0.0.58
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/centaline-data-driven-v3.umd.js +42 -42
- package/package.json +1 -1
- package/src/components/app/SearchList/SearchTable.vue +1 -1
- package/src/components/web/Button.vue +3 -3
- package/src/components/web/SearchList/SearchTable.vue +114 -29
- package/src/components/web/other/PopupSearchListTable.vue +8 -2
- package/src/loader/src/Field.js +7 -0
- package/src/loader/src/Form.js +10 -1
- package/src/loader/src/LibFunction.js +3 -0
- package/src/loader/src/Router.js +15 -1
- package/src/main.js +4 -4
- package/src/utils/Enum.js +778 -766
- package/src/utils/mixins.js +57 -10
- package/src/views/SearchList.vue +3 -2
package/src/utils/mixins.js
CHANGED
|
@@ -2,7 +2,7 @@ import { ref } from 'vue'
|
|
|
2
2
|
import Field from '@/loader/src/Field';
|
|
3
3
|
import common from './common';
|
|
4
4
|
import Enum from './Enum';
|
|
5
|
-
import { showLoadingToast,closeToast} from "vant";
|
|
5
|
+
import { showLoadingToast, closeToast } from "vant";
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
//初始化数据
|
|
@@ -145,8 +145,8 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
145
145
|
if (verified) {
|
|
146
146
|
//action有值,提交到后台
|
|
147
147
|
if (field.action) {
|
|
148
|
-
if(common.flagApp()){
|
|
149
|
-
showLoadingToast({ message: '正在处理',forbidClick: true, duration: 100000 });
|
|
148
|
+
if (common.flagApp()) {
|
|
149
|
+
showLoadingToast({ message: '正在处理', forbidClick: true, duration: 100000 });
|
|
150
150
|
}
|
|
151
151
|
field.disabled = true;//提交按钮禁用
|
|
152
152
|
model.pageDisabled = true;
|
|
@@ -166,7 +166,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
166
166
|
progressKey: res.content.key,
|
|
167
167
|
progressType: field.isExport ? 'export' : 'import',
|
|
168
168
|
onFinished(data) {
|
|
169
|
-
if(common.flagApp()){
|
|
169
|
+
if (common.flagApp()) {
|
|
170
170
|
closeToast()
|
|
171
171
|
}
|
|
172
172
|
field.disabled = false;
|
|
@@ -199,7 +199,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
199
199
|
model.$vue.emit('submit', { formData: model, responseData: data });
|
|
200
200
|
},
|
|
201
201
|
onError(data) {
|
|
202
|
-
if(common.flagApp()){
|
|
202
|
+
if (common.flagApp()) {
|
|
203
203
|
closeToast()
|
|
204
204
|
}
|
|
205
205
|
field.disabled = false;
|
|
@@ -233,7 +233,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
233
233
|
progressKey: res202.content.key,
|
|
234
234
|
progressType: field.isExport ? 'export' : 'import',
|
|
235
235
|
onFinished(data) {
|
|
236
|
-
if(common.flagApp()){
|
|
236
|
+
if (common.flagApp()) {
|
|
237
237
|
closeToast()
|
|
238
238
|
}
|
|
239
239
|
field.disabled = false;
|
|
@@ -266,7 +266,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
266
266
|
model.$vue.emit('submit', { formData: model, responseData: data });
|
|
267
267
|
},
|
|
268
268
|
onError(data) {
|
|
269
|
-
if(common.flagApp()){
|
|
269
|
+
if (common.flagApp()) {
|
|
270
270
|
closeToast()
|
|
271
271
|
}
|
|
272
272
|
field.disabled = false;
|
|
@@ -282,7 +282,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
282
282
|
}
|
|
283
283
|
});
|
|
284
284
|
}).catch(() => {
|
|
285
|
-
if(common.flagApp()){
|
|
285
|
+
if (common.flagApp()) {
|
|
286
286
|
closeToast()
|
|
287
287
|
}
|
|
288
288
|
field.disabled = false;
|
|
@@ -293,7 +293,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
293
293
|
}
|
|
294
294
|
else {
|
|
295
295
|
field.doAction(model.$vue.getFormObj(), (data) => {
|
|
296
|
-
if(common.flagApp()){
|
|
296
|
+
if (common.flagApp()) {
|
|
297
297
|
closeToast()
|
|
298
298
|
}
|
|
299
299
|
field.disabled = false;
|
|
@@ -436,6 +436,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
436
436
|
submitData = field.getActionPara(submitData).para;
|
|
437
437
|
common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
438
438
|
}
|
|
439
|
+
else if(field.isVueComponentInTab){
|
|
440
|
+
submitData = field.getActionPara(submitData).para;
|
|
441
|
+
common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
442
|
+
}
|
|
439
443
|
else if (field.isOpenUrlInBrowse) {// 浏览器打开
|
|
440
444
|
window.open(submitData[field.submitFormField], "_blank");
|
|
441
445
|
}
|
|
@@ -788,6 +792,49 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
788
792
|
};
|
|
789
793
|
common.openDialog(dialogOption);
|
|
790
794
|
}
|
|
795
|
+
else if (field.isVueComponentInLayer) {
|
|
796
|
+
var dialogOption = {
|
|
797
|
+
title: field.pageTitle,
|
|
798
|
+
pane: common.getParentPane(),
|
|
799
|
+
content: [{
|
|
800
|
+
component: field.vueComponentName,
|
|
801
|
+
width: field.pageWidth + 'px',
|
|
802
|
+
height: field.pageHeight + 'px',
|
|
803
|
+
attrs: {
|
|
804
|
+
apiParam: field.actionType == Enum.ActionType.None ? submitData : field.getActionPara(submitData).para,
|
|
805
|
+
onNew: (id) => {
|
|
806
|
+
field.flagAddRowAfterAction = true;
|
|
807
|
+
field.flagFreshCurrentRow = false;
|
|
808
|
+
var res = { responseData: { content: id } };
|
|
809
|
+
model.$vue.updateCurrentRow(field, res);
|
|
810
|
+
common.closeDialog(dialogOption);
|
|
811
|
+
},
|
|
812
|
+
onUpdate: (id) => {
|
|
813
|
+
field.flagAddRowAfterAction = false;
|
|
814
|
+
field.flagFreshCurrentRow = true;
|
|
815
|
+
var res = { responseData: { content: id } };
|
|
816
|
+
model.$vue.updateCurrentRow(field, res);
|
|
817
|
+
common.closeDialog(dialogOption);
|
|
818
|
+
},
|
|
819
|
+
onDelete: () => {
|
|
820
|
+
var res = {};
|
|
821
|
+
res.notification = 4;
|
|
822
|
+
res.content = model.listData[model.selectIndex][model.primaryKey];
|
|
823
|
+
model.$vue.doAction(res);
|
|
824
|
+
common.closeDialog(dialogOption);
|
|
825
|
+
},
|
|
826
|
+
onRefreshParent: () => {
|
|
827
|
+
model.$vue.getPage(1);
|
|
828
|
+
common.closeDialog(dialogOption);
|
|
829
|
+
},
|
|
830
|
+
onCloseDialog: () => {
|
|
831
|
+
common.closeDialog(dialogOption);
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
}]
|
|
835
|
+
};
|
|
836
|
+
common.openDialog(dialogOption);
|
|
837
|
+
}
|
|
791
838
|
else {
|
|
792
839
|
submitData = field.getActionPara(submitData).para;
|
|
793
840
|
if (source == 'table') {
|
|
@@ -872,7 +919,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
872
919
|
let title = field.pageTitle == undefined ? field.label : field.pageTitle;
|
|
873
920
|
submitData.actionType = field.actionType;
|
|
874
921
|
if (model.isIframe) {
|
|
875
|
-
|
|
922
|
+
submitData.isIframe = model.isIframe;
|
|
876
923
|
}
|
|
877
924
|
var fun = common.getDataDrivenOpts().handler[action];
|
|
878
925
|
fun(submitData, title, model);
|
package/src/views/SearchList.vue
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/
|
|
4
|
-
:searchDataApi="'/
|
|
3
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyPublishList/getLayoutOfSearch'"
|
|
4
|
+
:searchDataApi="'/propertyPublishList/getListOfSearchModel'"
|
|
5
|
+
:searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist>
|
|
5
6
|
<ct-dialoglist ref="dialogList"></ct-dialoglist>
|
|
6
7
|
|
|
7
8
|
</div>
|