centaline-data-driven-v3 0.0.88 → 0.0.89
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/package.json
CHANGED
|
@@ -523,23 +523,30 @@ const getTemplateType = (fullText) => {
|
|
|
523
523
|
if (eventData.rtnCode != '200') {
|
|
524
524
|
rtn = "error";
|
|
525
525
|
outtext.value = (eventData.rtnMsg || fullText);
|
|
526
|
-
if (eventData.rtnCode ==
|
|
527
|
-
common.
|
|
526
|
+
if (eventData.rtnCode == Enum.ReturnCode.Unauthorized) {
|
|
527
|
+
if (common.getDataDrivenOpts().handler?.login) {
|
|
528
|
+
common.getDataDrivenOpts().handler.login();
|
|
529
|
+
};
|
|
528
530
|
}
|
|
529
531
|
}
|
|
530
532
|
else if (eventData.clientActionType == Enum.ClientActionType.ExcuteScript) {
|
|
531
533
|
rtn = 'js';
|
|
532
|
-
if (eventData.content&&props.form) {
|
|
534
|
+
if (eventData.content && props.form) {
|
|
533
535
|
common.excute.call(props.form?.scripts, eventData.content);
|
|
534
536
|
}
|
|
535
537
|
outtext.value = (eventData.rtnMsg || "脚本执行成功!");
|
|
536
538
|
|
|
537
539
|
}
|
|
538
|
-
else if (eventData.content
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
540
|
+
else if (eventData.content) {
|
|
541
|
+
if (!isJSONObject(eventData.content)) {
|
|
542
|
+
outtext.value = eventData.content;
|
|
543
|
+
}
|
|
544
|
+
else if (eventData.content?.rows) {
|
|
545
|
+
rtn = 'table';
|
|
546
|
+
}
|
|
547
|
+
else if (eventData.content?.fields) {
|
|
548
|
+
rtn = 'form';
|
|
549
|
+
}
|
|
543
550
|
}
|
|
544
551
|
|
|
545
552
|
}
|
|
@@ -551,14 +558,25 @@ const getTemplateType = (fullText) => {
|
|
|
551
558
|
return rtn;
|
|
552
559
|
|
|
553
560
|
}
|
|
561
|
+
function isJSONObject(value) {
|
|
562
|
+
if (typeof value !== 'object' || value === null) {
|
|
563
|
+
return false; // 如果不是对象,直接返回 false
|
|
564
|
+
}
|
|
554
565
|
|
|
566
|
+
try {
|
|
567
|
+
JSON.stringify(value);
|
|
568
|
+
return true; // 如果可以序列化为 JSON,说明是 JSON 对象
|
|
569
|
+
} catch (e) {
|
|
570
|
+
return false; // 如果序列化失败,说明不是 JSON 对象
|
|
571
|
+
}
|
|
572
|
+
}
|
|
555
573
|
|
|
556
574
|
function startTypingEffect(fullText) {
|
|
557
575
|
fullText = fullText.replace(/\\n/gi, '\n\n');
|
|
558
576
|
let index = 0;
|
|
559
577
|
outtext.value = ''; // 清空内容
|
|
560
578
|
function typeNext() {
|
|
561
|
-
// 随机生成
|
|
579
|
+
// 随机生成4到12之间的字符数
|
|
562
580
|
const randomChars = Math.floor(Math.random() * 5) + 8;
|
|
563
581
|
const charsToLoad = Math.min(randomChars, fullText.length - index);
|
|
564
582
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<div style="display: flex; flex: 0 0 100%;" v-if="col.show !== false && col.lineFeed"></div>
|
|
13
13
|
<div v-if="col.show !== false"
|
|
14
14
|
:class="index > 0 && (col.controlLabel == '' || col.is == 'ct-button') ? 'complex-left-10' : ''"
|
|
15
|
-
:style="{ 'width': (col.width
|
|
15
|
+
:style="{ 'width': (col.width && col.width>0 ? col.width + 'px' : '100%'), 'flex': (col.width && col.width>0? '0 0 ' + col.width + 'px' : '100%') }">
|
|
16
16
|
<component ref="Fields" :is="col.is" :vmodel="col" :parameterAction="parameterAction"
|
|
17
17
|
v-bind="col.bindPara" @fieldClick="fieldClickHandler(col)" @change="change(col)"
|
|
18
18
|
@popupSearchList="popupSearchListHandler"></component>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<div style="display: flex; flex: 0 0 100%;" v-if="col.show !== false && col.lineFeed"></div>
|
|
29
29
|
<el-col v-if="col.show !== false"
|
|
30
30
|
:class="[index > 0 && (col.controlLabel == '' || col.is == 'ct-btn') ? 'complex-left-10' : '', 'containerCol']"
|
|
31
|
-
:style="{ 'width': (col.width
|
|
31
|
+
:style="{ 'width': (col.width && col.width>0 ? col.width + 'px' : '100%'), 'flex': (col.width && col.width>0 ? '0 0 ' + col.width + 'px' : '100%') }">
|
|
32
32
|
<component ref="Fields" :is="col.is" :vmodel="col" :parameterAction="parameterAction"
|
|
33
33
|
v-bind="col.bindPara" @fieldClick="fieldClickHandler(col)" @change="change(col)"
|
|
34
34
|
@popupSearchList="popupSearchListHandler">
|
package/src/loader/src/Form.js
CHANGED
|
@@ -3,7 +3,7 @@ import LibFunction from './LibFunction';
|
|
|
3
3
|
import Router from './Router';
|
|
4
4
|
import Enum from '../../utils/Enum';
|
|
5
5
|
import common from '../../utils/common';
|
|
6
|
-
import request from '../../utils/request';
|
|
6
|
+
import request from '../../utils/request';
|
|
7
7
|
|
|
8
8
|
function loadFormApi(api, callBack, apiParam, failCallBack, isFormList) {
|
|
9
9
|
if (api) {
|
|
@@ -47,7 +47,7 @@ function loadFromModel(source, isFormList) {
|
|
|
47
47
|
return rtn1.code1;
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
//获取code2
|
|
52
52
|
getCode2ByField1(id) {
|
|
53
53
|
var rtn1 = this.fieldsDic[id];
|
|
@@ -69,7 +69,7 @@ function loadFromModel(source, isFormList) {
|
|
|
69
69
|
});
|
|
70
70
|
if (router) {
|
|
71
71
|
router[attrKey] = attrValue;
|
|
72
|
-
if(common.flagApp()&&this.form.$vue.loaded){
|
|
72
|
+
if (common.flagApp() && this.form.$vue.loaded) {
|
|
73
73
|
this.form.$vue.loaded(this.form)
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -307,6 +307,9 @@ function loadFromModel(source, isFormList) {
|
|
|
307
307
|
if (flagTemplate) {
|
|
308
308
|
data.field[attrName] = value;
|
|
309
309
|
}
|
|
310
|
+
if (data.listData.flagTemplate && data.listData.$vue) {
|
|
311
|
+
data.listData.$vue.itemKey = Math.random()
|
|
312
|
+
}
|
|
310
313
|
}
|
|
311
314
|
|
|
312
315
|
//如果有汇总列,触发重新计算汇总
|
|
@@ -751,13 +754,13 @@ function loadFromModel(source, isFormList) {
|
|
|
751
754
|
return v1.key === field.fieldName1;
|
|
752
755
|
});
|
|
753
756
|
}
|
|
754
|
-
rtn._aiRouter= router;
|
|
757
|
+
rtn._aiRouter = router;
|
|
755
758
|
return rtn._aiRouter;
|
|
756
759
|
}
|
|
757
|
-
},
|
|
760
|
+
},
|
|
758
761
|
get aiChat() {
|
|
759
762
|
return source.aiChat;
|
|
760
|
-
},
|
|
763
|
+
},
|
|
761
764
|
//获取表单数据
|
|
762
765
|
getFormObj() {
|
|
763
766
|
var rtnFormObj = {};
|
|
@@ -800,9 +803,9 @@ function loadFromModel(source, isFormList) {
|
|
|
800
803
|
getRefFieldPara(refFieldNameArr) {
|
|
801
804
|
let submitData = {};
|
|
802
805
|
var tempFormData = rtn.getFormObj();
|
|
803
|
-
|
|
806
|
+
|
|
804
807
|
refFieldNameArr.forEach((v) => {
|
|
805
|
-
submitData[v] =
|
|
808
|
+
submitData[v] = common.getDataOfUpperLower(tempFormData, v);
|
|
806
809
|
});
|
|
807
810
|
return submitData;
|
|
808
811
|
},
|
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
|
-
baseUrl:"https://uplink.centaline.com.cn/xian/",
|
|
25
|
-
|
|
24
|
+
//baseUrl:"https://uplink.centaline.com.cn/xian/",
|
|
25
|
+
baseUrl:"http://10.88.22.66/IBS.Mvc/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/",
|
|
@@ -67,8 +67,8 @@ 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
|
-
authObject: '{token:"1-bce18a8d-21f0-4022-a6ca-450de105cafc"}',
|
|
71
|
-
|
|
70
|
+
//authObject: '{token:"1-bce18a8d-21f0-4022-a6ca-450de105cafc"}',
|
|
71
|
+
authObject: '{EmpID:"Token_2053032d-9248-494b-9295-12c2ddf81d22",MachineCode:"7c4b2ffd-920a-462c-a586-37bbfb45c4fe",SSO_Token:"SSOToken_2053032d-9248-494b-9295-12c2ddf81d22",Platform:"WEB"}',
|
|
72
72
|
};
|
|
73
73
|
},
|
|
74
74
|
getToken() {
|
package/src/views/SearchList.vue
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-search" style="width:100%;height:100%;position: fixed;">
|
|
3
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyPublishList/getLayoutOfSearch'"
|
|
3
|
+
<!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyPublishList/getLayoutOfSearch'"
|
|
4
4
|
:searchDataApi="'/propertyPublishList/getListOfSearchModel'"
|
|
5
|
-
:searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist>
|
|
6
|
-
|
|
5
|
+
:searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist> -->
|
|
6
|
+
|
|
7
7
|
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyTenderList/getLayoutOfSearch'"
|
|
8
|
-
:searchDataApi="'/propertyTenderList/getListOfSearchModel'"></ct-searchlist>
|
|
8
|
+
:searchDataApi="'/propertyTenderList/getListOfSearchModel'"></ct-searchlist>
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
<!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/EmployeeAttendanceBillList/getLayoutOfSearchForMy'"
|