centaline-data-driven-v3 0.0.99 → 0.1.1
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 +57 -57
- package/package.json +1 -1
- package/src/components/web/photo.vue +2 -3
- package/src/loader/src/File.js +3 -3
- package/src/loader/src/Form.js +19 -0
- package/src/loader/src/Router.js +4 -0
- package/src/main.js +6 -6
- package/src/utils/mixins.js +37 -18
- package/src/views/Form.vue +2 -2
package/package.json
CHANGED
|
@@ -205,13 +205,12 @@ function load(data) {
|
|
|
205
205
|
watch(
|
|
206
206
|
() => model.value, // 监听的源
|
|
207
207
|
(newValue, oldValue) => {
|
|
208
|
-
|
|
209
|
-
console.log('Old value:', oldValue);
|
|
210
|
-
if (newValue?.file && newValue?.file != oldValue?.file) {
|
|
208
|
+
if (newValue?.file?.raw&& newValue?.file != oldValue?.file) {
|
|
211
209
|
// 处理文件上传
|
|
212
210
|
var options = {
|
|
213
211
|
file: newValue.file.raw
|
|
214
212
|
}
|
|
213
|
+
model.value.file = [];
|
|
215
214
|
SliceUpload(options);
|
|
216
215
|
}
|
|
217
216
|
},
|
package/src/loader/src/File.js
CHANGED
|
@@ -303,9 +303,9 @@ function getOptions(model, callBack) {
|
|
|
303
303
|
if (!model.paramName1) {
|
|
304
304
|
return false;
|
|
305
305
|
}
|
|
306
|
-
if (model.optionModel.isInit) {
|
|
307
|
-
|
|
308
|
-
}
|
|
306
|
+
// if (model.optionModel.isInit) {
|
|
307
|
+
// return model.optionModel.options;
|
|
308
|
+
// }
|
|
309
309
|
|
|
310
310
|
var params = {
|
|
311
311
|
action: model.optionApi,
|
package/src/loader/src/Form.js
CHANGED
|
@@ -119,6 +119,25 @@ function loadFromModel(source, isFormList) {
|
|
|
119
119
|
this.form.$vue.loaded(this.form)
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
+
if (rtn1.controlType === Enum.ControlType.File
|
|
123
|
+
|| rtn1.controlType === Enum.ControlType.SliceUpload) {
|
|
124
|
+
if (attrKey.toLowerCase() == 'paramName1'.toLowerCase()) {
|
|
125
|
+
rtn1.mediaLabe.mediaLabelName = ''
|
|
126
|
+
rtn1.mediaLabe.mediaLabelID = ''
|
|
127
|
+
if (rtn1.fileList) {
|
|
128
|
+
rtn1.fileList.forEach((v) => {
|
|
129
|
+
v.mediaLabelID = ''
|
|
130
|
+
v.mediaLabelName = ''
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
|
+
if (rtn1.fileSourceList) {
|
|
134
|
+
rtn1.fileSourceList.forEach((v) => {
|
|
135
|
+
v.mediaLabelID = ''
|
|
136
|
+
v.mediaLabelName = ''
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
122
141
|
hiddenHandle(rtn1, this.form);
|
|
123
142
|
requiredHandle(rtn1, this.form);
|
|
124
143
|
}
|
package/src/loader/src/Router.js
CHANGED
|
@@ -75,6 +75,10 @@ const Router = function (source) {
|
|
|
75
75
|
return source.buttonType === Enum.ButtonType.openFileDialog;
|
|
76
76
|
},
|
|
77
77
|
|
|
78
|
+
get isButton() {
|
|
79
|
+
return source.buttonType === Enum.ButtonType.Button;
|
|
80
|
+
},
|
|
81
|
+
|
|
78
82
|
//是否需要警示标志
|
|
79
83
|
get flagAlert() {
|
|
80
84
|
return source.flagAlert;
|
package/src/main.js
CHANGED
|
@@ -22,7 +22,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
22
22
|
|
|
23
23
|
app.use(centaline, {
|
|
24
24
|
//baseUrl:"https://uplink.centaline.com.cn/xian/",
|
|
25
|
-
baseUrl:"
|
|
25
|
+
baseUrl:"https://kq-api.centaline.com.cn/onecard-api/",
|
|
26
26
|
//baseUrl: "https://kq-api.centaline.com.cn/onecard-api/",
|
|
27
27
|
//baseUrl: "http://10.88.22.13:6060/onecard-api/",
|
|
28
28
|
//baseUrl: "http://10.88.22.66:6060/xian/",
|
|
@@ -30,10 +30,10 @@ app.use(centaline, {
|
|
|
30
30
|
//baseUrl: "http://10.1.245.111:38028/",
|
|
31
31
|
|
|
32
32
|
flagRouterSelf: true,
|
|
33
|
-
flagApp:
|
|
33
|
+
flagApp: false,//是否app端
|
|
34
34
|
zindex: 999,
|
|
35
35
|
showRequestSuccessMessage: true,
|
|
36
|
-
showRequestErrorMessage:
|
|
36
|
+
showRequestErrorMessage: true,
|
|
37
37
|
language: 'HK',
|
|
38
38
|
handler: {
|
|
39
39
|
// 打开tab页
|
|
@@ -67,12 +67,12 @@ app.use(centaline, {
|
|
|
67
67
|
return {
|
|
68
68
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
69
69
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
70
|
-
|
|
71
|
-
authObject: '{EmpID:"Token_4abee9c9-2616-4cb5-beda-1f94dc7d8a96",MachineCode:"ae184643-f8e2-453c-a752-ba82612b592f",SSO_Token:"SSOToken_4abee9c9-2616-4cb5-beda-1f94dc7d8a96",Platform:"IOS"}',
|
|
70
|
+
authObject: '{token:"1647-1927532276019761152",platform:"WEB"}',
|
|
71
|
+
//authObject: '{EmpID:"Token_4abee9c9-2616-4cb5-beda-1f94dc7d8a96",MachineCode:"ae184643-f8e2-453c-a752-ba82612b592f",SSO_Token:"SSOToken_4abee9c9-2616-4cb5-beda-1f94dc7d8a96",Platform:"IOS"}',
|
|
72
72
|
};
|
|
73
73
|
},
|
|
74
74
|
getToken() {
|
|
75
|
-
return "
|
|
75
|
+
return "wufw-1926816278719369216"
|
|
76
76
|
},
|
|
77
77
|
// 请求完成事件,可判断是否登录过期执行响应操作
|
|
78
78
|
requestComplete: function (response) {
|
package/src/utils/mixins.js
CHANGED
|
@@ -124,7 +124,7 @@ function validExcuteMessage(validtemp, model) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
//路由操作事件
|
|
127
|
-
export function RouterClickHandler(field, submitData, action, model, source, callBack,flagMouseenter) {
|
|
127
|
+
export function RouterClickHandler(field, submitData, action, model, source, callBack, flagMouseenter) {
|
|
128
128
|
if (source == 'form') {
|
|
129
129
|
model.scripts.$fd = field.id;
|
|
130
130
|
model.scripts.$result = [];
|
|
@@ -144,7 +144,7 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
144
144
|
//action有值,提交到后台
|
|
145
145
|
if (field.action) {
|
|
146
146
|
if (common.flagApp()) {
|
|
147
|
-
showLoadingToast({ message:common.LocalizedString('正在处理', '正在處理')
|
|
147
|
+
showLoadingToast({ message: common.LocalizedString('正在处理', '正在處理'), forbidClick: true, duration: 100000 });
|
|
148
148
|
}
|
|
149
149
|
field.disabled = true;//提交按钮禁用
|
|
150
150
|
model.pageDisabled = true;
|
|
@@ -424,20 +424,20 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
424
424
|
common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
425
425
|
}
|
|
426
426
|
else if (field.isOpenUrlInBrowse) {// 浏览器打开
|
|
427
|
-
if(common.getDataDrivenOpts().handler.openUrlInBrowse){
|
|
427
|
+
if (common.getDataDrivenOpts().handler.openUrlInBrowse) {
|
|
428
428
|
common.getDataDrivenOpts().handler.openUrlInBrowse(submitData[field.submitFormField]);
|
|
429
429
|
}
|
|
430
|
-
else{
|
|
430
|
+
else {
|
|
431
431
|
window.open(submitData[field.submitFormField], "_blank");
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
435
435
|
submitData = field.getActionPara(submitData).para;
|
|
436
436
|
let query = common.objectToQueryStr(submitData);
|
|
437
|
-
if(common.getDataDrivenOpts().handler.openUrlInBrowse){
|
|
437
|
+
if (common.getDataDrivenOpts().handler.openUrlInBrowse) {
|
|
438
438
|
common.getDataDrivenOpts().handler.openUrlInBrowse(action + query);
|
|
439
439
|
}
|
|
440
|
-
else{
|
|
440
|
+
else {
|
|
441
441
|
window.open(action + query, "_blank");
|
|
442
442
|
}
|
|
443
443
|
}
|
|
@@ -520,10 +520,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
520
520
|
},
|
|
521
521
|
],
|
|
522
522
|
};
|
|
523
|
-
if(flagMouseenter&&callBack){
|
|
523
|
+
if (flagMouseenter && callBack) {
|
|
524
524
|
callBack(dialogOption.content[0])
|
|
525
525
|
}
|
|
526
|
-
else{
|
|
526
|
+
else {
|
|
527
527
|
common.openDialog(dialogOption);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
@@ -664,10 +664,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
664
664
|
else {
|
|
665
665
|
field.loading = true;
|
|
666
666
|
if (!field.flagAlert && field.content) {
|
|
667
|
-
common.message(
|
|
667
|
+
common.message(field.content, 'info', 1500, true)
|
|
668
668
|
}
|
|
669
669
|
field.doBlobAction(submitData, (data, headers) => {
|
|
670
|
-
field.loading=false;
|
|
670
|
+
field.loading = false;
|
|
671
671
|
if (data.type == "application/json") {
|
|
672
672
|
const reader = new FileReader();
|
|
673
673
|
reader.readAsText(data, 'utf-8');
|
|
@@ -772,10 +772,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
772
772
|
},
|
|
773
773
|
}]
|
|
774
774
|
};
|
|
775
|
-
if(flagMouseenter&&callBack){
|
|
775
|
+
if (flagMouseenter && callBack) {
|
|
776
776
|
callBack(dialogOption.content[0])
|
|
777
777
|
}
|
|
778
|
-
else{
|
|
778
|
+
else {
|
|
779
779
|
common.openDialog(dialogOption);
|
|
780
780
|
}
|
|
781
781
|
}
|
|
@@ -798,10 +798,10 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
798
798
|
},
|
|
799
799
|
}]
|
|
800
800
|
};
|
|
801
|
-
if(flagMouseenter&&callBack){
|
|
801
|
+
if (flagMouseenter && callBack) {
|
|
802
802
|
callBack(dialogOption.content[0])
|
|
803
803
|
}
|
|
804
|
-
else{
|
|
804
|
+
else {
|
|
805
805
|
common.openDialog(dialogOption);
|
|
806
806
|
}
|
|
807
807
|
}
|
|
@@ -846,20 +846,30 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
846
846
|
},
|
|
847
847
|
}]
|
|
848
848
|
};
|
|
849
|
-
if(flagMouseenter&&callBack){
|
|
849
|
+
if (flagMouseenter && callBack) {
|
|
850
850
|
callBack(dialogOption.content[0])
|
|
851
851
|
}
|
|
852
|
-
else{
|
|
852
|
+
else {
|
|
853
853
|
common.openDialog(dialogOption);
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
856
|
else {
|
|
857
857
|
if (source == 'table') {
|
|
858
|
-
|
|
858
|
+
model.$vue.operationLoading = true
|
|
859
859
|
}
|
|
860
860
|
else {
|
|
861
|
-
|
|
861
|
+
submitData = field.getActionPara(submitData).para;
|
|
862
|
+
if (field.is == 'ct-button' && field.isButton) {
|
|
863
|
+
field.loading = true;
|
|
864
|
+
var fieldButton = model.fields.find((v) => {
|
|
865
|
+
return v.fieldName1 === field.key;
|
|
866
|
+
});
|
|
867
|
+
if (fieldButton) {
|
|
868
|
+
fieldButton.loading = true;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
862
871
|
}
|
|
872
|
+
|
|
863
873
|
field.doAction(submitData, (data) => {
|
|
864
874
|
if (source == 'table') {
|
|
865
875
|
model.$vue.operationLoading = false
|
|
@@ -904,6 +914,15 @@ export function RouterClickHandler(field, submitData, action, model, source, cal
|
|
|
904
914
|
}
|
|
905
915
|
}
|
|
906
916
|
else {
|
|
917
|
+
if (field.is == 'ct-button' && field.isButton) {
|
|
918
|
+
field.loading = false;
|
|
919
|
+
var fieldButton = model.fields.find((v) => {
|
|
920
|
+
return v.fieldName1 === field.key;
|
|
921
|
+
});
|
|
922
|
+
if (fieldButton) {
|
|
923
|
+
fieldButton.loading = false;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
907
926
|
if (data.rtnCode === Enum.ReturnCode.Successful || data.isSuccess) {
|
|
908
927
|
if (callBack) {
|
|
909
928
|
callBack(data);
|
package/src/views/Form.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="data-driven" id="app-form" >
|
|
3
3
|
|
|
4
|
-
<ct-form :api="'/
|
|
4
|
+
<ct-form :api="'/EmployeeAttendanceBillApply/getLayoutOfNew'" :apiParam="apiParam" :flagNavbar="true"></ct-form>
|
|
5
5
|
<!-- <ct-form :api="'/api/third-dept-tran/tran-comm-adjust/task'" :apiParam="apiParam"></ct-form> -->
|
|
6
6
|
<!-- <ct-form :api="'/PropertyTranToActive/getLayoutOfNew'" :apiParam="apiParam"></ct-form> -->
|
|
7
7
|
<!-- <ct-textbox :source="source"></ct-textbox> -->
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
</template>
|
|
11
11
|
<script lang="ts" setup>
|
|
12
12
|
//const apiParam={"originalTraId":"1739561435204980737","actionType":1,"pageStyle":2,"pageTitle":"成交报告","pageOnly":true}
|
|
13
|
-
const apiParam={"actionType":2
|
|
13
|
+
const apiParam={"actionType":2}
|
|
14
14
|
</script>
|