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/package.json
CHANGED
|
@@ -64,6 +64,7 @@ import { ElMessage } from 'element-plus'
|
|
|
64
64
|
const emit = defineEmits(['input', 'fieldClick', 'importComplete'])
|
|
65
65
|
const props = defineProps({
|
|
66
66
|
parameterAction: String,
|
|
67
|
+
fileData: Object,
|
|
67
68
|
vmodel: Object,
|
|
68
69
|
source: Object,
|
|
69
70
|
flagAppMode: Boolean,
|
|
@@ -94,10 +95,9 @@ const headers = computed(() => {
|
|
|
94
95
|
function clickHandle() {
|
|
95
96
|
emit('fieldClick', model.value);
|
|
96
97
|
}
|
|
98
|
+
|
|
97
99
|
function handleAvatarSuccess(res) {
|
|
98
|
-
|
|
99
|
-
emit('importComplete', res, model.value);
|
|
100
|
-
});
|
|
100
|
+
emit('importComplete', res, model.value);
|
|
101
101
|
}
|
|
102
102
|
function handleAvatarError(info) {
|
|
103
103
|
ElMessage({
|
|
@@ -459,41 +459,126 @@ function toolbarClickHandler(field) {
|
|
|
459
459
|
}
|
|
460
460
|
//导入
|
|
461
461
|
function importComplete(res, field) {
|
|
462
|
+
if (res && res.rtnCode && res.rtnCode === 201) {
|
|
463
|
+
if (res.rtnMsg) {
|
|
464
|
+
ElMessage({
|
|
465
|
+
message: res.rtnMsg,
|
|
466
|
+
type: 'warning',
|
|
467
|
+
showClose: true,
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
else if (res && res.rtnCode && res.rtnCode === 202 && res.rtnMsg) {
|
|
473
|
+
common.confirm(res.rtnMsg, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
474
|
+
|
|
475
|
+
})
|
|
476
|
+
.catch(() => {
|
|
477
|
+
});
|
|
478
|
+
}
|
|
462
479
|
if (field.flagAsync) {
|
|
463
|
-
if (res.
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
480
|
+
if (res.rtnCode && res.rtnCode === 202 && res.rtnMsg) {
|
|
481
|
+
common.confirm(res.rtnMsg, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
482
|
+
if (res.content && res.content.action) {
|
|
483
|
+
var dialogOption = {
|
|
484
|
+
title: field.pageTitle || field.label,
|
|
485
|
+
content: [{
|
|
486
|
+
component: 'ct-progress',
|
|
487
|
+
width: '350px',
|
|
488
|
+
height: '165px',
|
|
489
|
+
attrs: {
|
|
490
|
+
progressAction: res.content.action,
|
|
491
|
+
progressKey: res.content.key,
|
|
492
|
+
progressType: 'import',
|
|
493
|
+
onFinished(data) {
|
|
494
|
+
common.closeDialog(dialogOption);
|
|
495
|
+
if (field.isExport) {
|
|
496
|
+
if (data.content.indexOf(".zip") > -1) {
|
|
497
|
+
window.location.href = encodeURI(data.content);
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
if (data.content.indexOf("?") > -1) {
|
|
501
|
+
downloadUrl.value = data.content + "&" + Math.random();
|
|
502
|
+
}
|
|
503
|
+
else {
|
|
504
|
+
downloadUrl.value = data.content + "?" + Math.random();
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
if (data.rtnMsg) {
|
|
509
|
+
ElMessage({
|
|
510
|
+
message: data.rtnMsg,
|
|
511
|
+
type: 'success',
|
|
512
|
+
showClose: true,
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
getPage(1, false);
|
|
516
|
+
},
|
|
517
|
+
onError(data) {
|
|
518
|
+
common.closeDialog(dialogOption);
|
|
519
|
+
ElMessage({
|
|
520
|
+
message: data.rtnMsg,
|
|
521
|
+
type: 'warning',
|
|
522
|
+
showClose: true,
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
}]
|
|
527
|
+
};
|
|
528
|
+
common.openDialog(dialogOption);
|
|
529
|
+
}
|
|
530
|
+
})
|
|
531
|
+
.catch(() => { });
|
|
532
|
+
}
|
|
533
|
+
else {
|
|
534
|
+
if (res.content && res.content.action) {
|
|
535
|
+
var dialogOption = {
|
|
536
|
+
title: field.pageTitle || field.label,
|
|
537
|
+
content: [{
|
|
538
|
+
component: 'ct-progress',
|
|
539
|
+
width: '350px',
|
|
540
|
+
height: '165px',
|
|
541
|
+
attrs: {
|
|
542
|
+
progressAction: res.content.action,
|
|
543
|
+
progressKey: res.content.key,
|
|
544
|
+
progressType: 'import',
|
|
545
|
+
onFinished(data) {
|
|
546
|
+
common.closeDialog(dialogOption);
|
|
547
|
+
if (field.isExport) {
|
|
548
|
+
if (data.content.indexOf(".zip") > -1) {
|
|
549
|
+
window.location.href = encodeURI(data.content);
|
|
550
|
+
}
|
|
551
|
+
else {
|
|
552
|
+
if (data.content.indexOf("?") > -1) {
|
|
553
|
+
downloadUrl.value = data.content + "&" + Math.random();
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
downloadUrl.value = data.content + "?" + Math.random();
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
if (data.rtnMsg) {
|
|
561
|
+
ElMessage({
|
|
562
|
+
message: data.rtnMsg,
|
|
563
|
+
type: 'success',
|
|
564
|
+
showClose: true,
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
getPage(1, false);
|
|
568
|
+
},
|
|
569
|
+
onError(data) {
|
|
570
|
+
common.closeDialog(dialogOption);
|
|
477
571
|
ElMessage({
|
|
478
572
|
message: data.rtnMsg,
|
|
479
|
-
type: '
|
|
573
|
+
type: 'warning',
|
|
480
574
|
showClose: true,
|
|
481
575
|
});
|
|
482
576
|
}
|
|
483
|
-
getPage(1, false);
|
|
484
577
|
},
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
type: 'warning',
|
|
490
|
-
showClose: true,
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
},
|
|
494
|
-
}]
|
|
495
|
-
};
|
|
496
|
-
common.openDialog(dialogOption);
|
|
578
|
+
}]
|
|
579
|
+
};
|
|
580
|
+
common.openDialog(dialogOption);
|
|
581
|
+
}
|
|
497
582
|
}
|
|
498
583
|
}
|
|
499
584
|
else {
|
|
@@ -1051,7 +1136,7 @@ function updateCurrentRow(router, data, flagSimple) {
|
|
|
1051
1136
|
SearchTable.getCurrentRowApiData(model.value,
|
|
1052
1137
|
function () {
|
|
1053
1138
|
itemKey.value = Math.random()
|
|
1054
|
-
model.value.selectAll=false
|
|
1139
|
+
model.value.selectAll = false
|
|
1055
1140
|
emit("searchComplate");
|
|
1056
1141
|
if (data && !flagSimple) {
|
|
1057
1142
|
emit("simpleRouterRefreshHandler");
|
|
@@ -28,9 +28,15 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
</template>
|
|
30
30
|
</el-table-column>
|
|
31
|
-
<template v-else>
|
|
32
|
-
<el-table-column v-if="col.
|
|
31
|
+
<template v-else-if="col.show">
|
|
32
|
+
<el-table-column v-if="col.flagHtml" :prop="col.id" :label="col.name" :min-width="col.width">
|
|
33
|
+
<template #default="scope">
|
|
34
|
+
<span v-html="scope.row[col.id]"></span>
|
|
35
|
+
</template>
|
|
36
|
+
</el-table-column>
|
|
37
|
+
<el-table-column v-else :prop="col.id" :label="col.name" :min-width="col.width">
|
|
33
38
|
</el-table-column>
|
|
39
|
+
|
|
34
40
|
</template>
|
|
35
41
|
</template>
|
|
36
42
|
</el-table>
|
package/src/loader/src/Field.js
CHANGED
|
@@ -734,6 +734,13 @@ const Base = function (source, moreActionRouter) {
|
|
|
734
734
|
set lazyLoad(v) {
|
|
735
735
|
source.lazyLoad = v;
|
|
736
736
|
},
|
|
737
|
+
// 控件类型为 VueCustomizedComponent 时 对应的 前端vue的组件名称
|
|
738
|
+
get vueComponentName() {
|
|
739
|
+
return source.vueComponentName;
|
|
740
|
+
},
|
|
741
|
+
set vueComponentName(v) {
|
|
742
|
+
source.vueComponentName = v;
|
|
743
|
+
},
|
|
737
744
|
//Field结束
|
|
738
745
|
|
|
739
746
|
collapseName: -1,//所属分组
|
package/src/loader/src/Form.js
CHANGED
|
@@ -1082,7 +1082,16 @@ function changeHandler(field, model) {
|
|
|
1082
1082
|
var router = model.actionRouters.find((v) => {
|
|
1083
1083
|
return v.id === field.onAfterChanged;
|
|
1084
1084
|
});
|
|
1085
|
-
|
|
1085
|
+
if(router){
|
|
1086
|
+
clickHandler(router);
|
|
1087
|
+
}
|
|
1088
|
+
else{
|
|
1089
|
+
if (model.scripts) {
|
|
1090
|
+
model.scripts.formData.setExcuteListData(model.fields);
|
|
1091
|
+
}
|
|
1092
|
+
model.scripts.$fd = field.id;
|
|
1093
|
+
common.excute.call(model.scripts, field.onAfterChanged);
|
|
1094
|
+
}
|
|
1086
1095
|
}
|
|
1087
1096
|
}
|
|
1088
1097
|
function getRouterAndSubmitData(field, model) {
|
|
@@ -247,6 +247,9 @@ const LibFunction = {
|
|
|
247
247
|
item = NumberWithPlusAndMinus(item)
|
|
248
248
|
item.is = 'ct-numberwithplusandminus'
|
|
249
249
|
break;
|
|
250
|
+
case Enum.ControlType.VueCustomizedComponent:
|
|
251
|
+
item.is = 'ct-'+item.vueComponentName.toLowerCase();
|
|
252
|
+
break;
|
|
250
253
|
default:
|
|
251
254
|
item = Label(item)
|
|
252
255
|
item.is = 'ct-label'
|
package/src/loader/src/Router.js
CHANGED
|
@@ -17,7 +17,7 @@ const Router = function (source) {
|
|
|
17
17
|
return source.action;
|
|
18
18
|
},
|
|
19
19
|
set action(v) {
|
|
20
|
-
return source.action=v;
|
|
20
|
+
return source.action = v;
|
|
21
21
|
},
|
|
22
22
|
// action的url对应的FieldName,如果此处有值,则忽略action
|
|
23
23
|
get actionField() {
|
|
@@ -92,10 +92,24 @@ const Router = function (source) {
|
|
|
92
92
|
source.hidden = !v;
|
|
93
93
|
},
|
|
94
94
|
|
|
95
|
+
//是否显示
|
|
96
|
+
get vueComponentName() {
|
|
97
|
+
return source.vueComponentName;
|
|
98
|
+
},
|
|
99
|
+
set vueComponentName(v) {
|
|
100
|
+
source.vueComponentName = vueComponentName;
|
|
101
|
+
},
|
|
102
|
+
|
|
95
103
|
//Action 对应的页面样式
|
|
96
104
|
get pageStyle() {
|
|
97
105
|
return source.pageStyle;
|
|
98
106
|
},
|
|
107
|
+
get isVueComponentInLayer() {
|
|
108
|
+
return source.pageStyle === Enum.PageStyle.OpenVueComponentInLayer;
|
|
109
|
+
},
|
|
110
|
+
get isVueComponentInTab() {
|
|
111
|
+
return source.pageStyle === Enum.PageStyle.OpenVueComponentInTab;
|
|
112
|
+
},
|
|
99
113
|
get isOpenForm() {
|
|
100
114
|
return source.pageStyle === Enum.PageStyle.FormPageInLayer;
|
|
101
115
|
},
|
package/src/main.js
CHANGED
|
@@ -21,8 +21,8 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
app.use(centaline, {
|
|
24
|
-
|
|
25
|
-
baseUrl: "http://10.88.22.66:6060/onecard-api/",
|
|
24
|
+
baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
|
|
25
|
+
//baseUrl: "http://10.88.22.66:6060/onecard-api/",
|
|
26
26
|
//baseUrl: "http://10.1.245.50:38735/max-uplink-api/",
|
|
27
27
|
//baseUrl: "http://10.1.245.111:38028/",
|
|
28
28
|
flagRouterSelf: true,
|
|
@@ -63,8 +63,8 @@ app.use(centaline, {
|
|
|
63
63
|
return {
|
|
64
64
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
65
65
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
66
|
-
authObject: '{token:"1-
|
|
67
|
-
|
|
66
|
+
//authObject: '{token:"1-7acf3f06-c2ea-471c-a5fa-07e1c2a81728"}',
|
|
67
|
+
authObject: '{EmpID:"Token_d646226c-ed20-4baa-bac4-6e6dbc101cd4",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_d646226c-ed20-4baa-bac4-6e6dbc101cd4",Platform:"WEB"}',
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
// 请求完成事件,可判断是否登录过期执行响应操作
|