centaline-data-driven-v3 0.0.85 → 0.0.87
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- 头部 -->
|
|
4
4
|
<div class="header">
|
|
5
5
|
<div class="header-item">
|
|
6
|
-
<img class="ico-button" :src="util.getAssetsImage('AIChat.png')" @click="hideAI()">
|
|
6
|
+
<img class="ico-button avatar-img" :src="util.getAssetsImage('AIChat.png')" @click="hideAI()">
|
|
7
7
|
</div>
|
|
8
8
|
<div class="header-item" v-if="model.controlLabel">
|
|
9
9
|
<h3 style="line-height: 35px;">
|
|
@@ -75,6 +75,7 @@ import DOMPurify from 'dompurify'
|
|
|
75
75
|
import Router from '../../loader/src/Router';
|
|
76
76
|
import { RouterClickHandler } from '../../utils/mixins';
|
|
77
77
|
import util from '../../utils/pub-use'
|
|
78
|
+
import Enum from '../../utils/Enum';
|
|
78
79
|
|
|
79
80
|
|
|
80
81
|
const emit = defineEmits(['loaded', "getRefFieldPara", "hideAI"])
|
|
@@ -239,10 +240,15 @@ const addMessage = (message) => {
|
|
|
239
240
|
}
|
|
240
241
|
// 添加消息通用方法
|
|
241
242
|
const appendMessage = (message) => {
|
|
243
|
+
|
|
242
244
|
if (!isStopped) {
|
|
243
245
|
model.value.messages[model.value.messages.length - 1].content = model.value.messages[model.value.messages.length - 1].content + message;
|
|
244
246
|
scheduleScroll()
|
|
245
247
|
}
|
|
248
|
+
if (afoot) {
|
|
249
|
+
afoot.value = false;
|
|
250
|
+
}
|
|
251
|
+
|
|
246
252
|
}
|
|
247
253
|
|
|
248
254
|
const UpdateMessageType = (type) => {
|
|
@@ -423,13 +429,12 @@ const fetchAIResponse = async (params) => {
|
|
|
423
429
|
} else {
|
|
424
430
|
startTypingEffect(outtext.value);
|
|
425
431
|
}
|
|
426
|
-
afoot.value = false;
|
|
427
432
|
}).catch(error => {
|
|
428
433
|
UpdateMessageType('error');
|
|
429
434
|
if (error.name === 'AbortError') {
|
|
430
435
|
console.log('Request aborted');
|
|
431
436
|
} else {
|
|
432
|
-
common.message(
|
|
437
|
+
common.message(error, 'error');
|
|
433
438
|
}
|
|
434
439
|
});
|
|
435
440
|
}
|
|
@@ -455,7 +460,7 @@ function stopRequest() {
|
|
|
455
460
|
if (error.name === 'AbortError') {
|
|
456
461
|
console.log('Request aborted');
|
|
457
462
|
} else {
|
|
458
|
-
common.message(
|
|
463
|
+
common.message(error, 'error');
|
|
459
464
|
}
|
|
460
465
|
});
|
|
461
466
|
|
|
@@ -515,12 +520,28 @@ const getTemplateType = (fullText) => {
|
|
|
515
520
|
try {
|
|
516
521
|
const eventData = JSON.parse(fullText)
|
|
517
522
|
if (eventData) {
|
|
518
|
-
if (eventData.
|
|
523
|
+
if (eventData.rtnCode != '200') {
|
|
524
|
+
rtn = "error";
|
|
525
|
+
outtext.value = (eventData.rtnMsg || fullText);
|
|
526
|
+
if (eventData.rtnCode == '401') {
|
|
527
|
+
common.message(eventData.rtnMsg, 'error');
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
else if (eventData.clientActionType == Enum.ClientActionType.ExcuteScript) {
|
|
531
|
+
rtn = 'js';
|
|
532
|
+
if (eventData.content&&props.form) {
|
|
533
|
+
common.excute.call(props.form?.scripts, eventData.content);
|
|
534
|
+
}
|
|
535
|
+
outtext.value = (eventData.rtnMsg || "脚本执行成功!");
|
|
536
|
+
|
|
537
|
+
}
|
|
538
|
+
else if (eventData.content?.rows) {
|
|
519
539
|
rtn = 'table';
|
|
520
540
|
}
|
|
521
541
|
else if (eventData.content?.fields) {
|
|
522
542
|
rtn = 'form';
|
|
523
543
|
}
|
|
544
|
+
|
|
524
545
|
}
|
|
525
546
|
|
|
526
547
|
} catch (error) {
|
|
@@ -533,9 +554,9 @@ const getTemplateType = (fullText) => {
|
|
|
533
554
|
|
|
534
555
|
|
|
535
556
|
function startTypingEffect(fullText) {
|
|
557
|
+
fullText = fullText.replace(/\\n/gi, '\n\n');
|
|
536
558
|
let index = 0;
|
|
537
559
|
outtext.value = ''; // 清空内容
|
|
538
|
-
|
|
539
560
|
function typeNext() {
|
|
540
561
|
// 随机生成3到10之间的字符数
|
|
541
562
|
const randomChars = Math.floor(Math.random() * 5) + 8;
|
|
@@ -900,4 +921,26 @@ function rolRouterCellClickHandler(routerKey, rowindex, forname, forrowindex, fl
|
|
|
900
921
|
transform: rotate(360deg);
|
|
901
922
|
}
|
|
902
923
|
}
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
.avatar-img {
|
|
927
|
+
animation: bounce 0.5s infinite ease-in-out;
|
|
928
|
+
/* 使用ease-in-out让动画更平滑 */
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
@keyframes bounce {
|
|
932
|
+
0% {
|
|
933
|
+
transform: translateY(0);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
50% {
|
|
937
|
+
transform: translateY(-5px);
|
|
938
|
+
/* 中间位置向上移动10像素 */
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
100% {
|
|
942
|
+
transform: translateY(0);
|
|
943
|
+
/* 回到初始位置 */
|
|
944
|
+
}
|
|
945
|
+
}
|
|
903
946
|
</style>
|
|
@@ -38,7 +38,7 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
38
38
|
var router = this.formTable.buttons.find((v) => {
|
|
39
39
|
return v.key === routerKey;
|
|
40
40
|
});
|
|
41
|
-
if(router){
|
|
41
|
+
if (router) {
|
|
42
42
|
this.formTable.$vue.toolbarClickHandler(router);
|
|
43
43
|
}
|
|
44
44
|
},
|
|
@@ -527,8 +527,8 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
527
527
|
},
|
|
528
528
|
};
|
|
529
529
|
if (col.show) {
|
|
530
|
-
|
|
531
|
-
if (col.lock &&
|
|
530
|
+
//合并表头列暂不支持固定列
|
|
531
|
+
if (col.lock && col.trOrder == 1 && col.colspan == 1) {
|
|
532
532
|
if (lockLeft) {
|
|
533
533
|
col.fixed = 'left';
|
|
534
534
|
} else {
|
|
@@ -599,7 +599,7 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
599
599
|
return rtn._dataDictionary;
|
|
600
600
|
},
|
|
601
601
|
get rowColorColumn() { //行字体颜色列
|
|
602
|
-
|
|
602
|
+
return source.content.rowColorColumn;
|
|
603
603
|
},
|
|
604
604
|
//设置行样式
|
|
605
605
|
setRow(rows) {
|
|
@@ -613,10 +613,10 @@ function loadSearchTableModel(source, searchModel, defaultSearchData, action, se
|
|
|
613
613
|
row.rowStyle = "";
|
|
614
614
|
}
|
|
615
615
|
if (rtn.rowColorColumn && row[rtn.rowColorColumn]) {
|
|
616
|
-
|
|
616
|
+
row.rowStyle = row.rowStyle + ";color:" + row[rtn.rowColorColumn] + ";";
|
|
617
617
|
}
|
|
618
618
|
if (row.flagDrag && row.flagDrag == '1') {
|
|
619
|
-
|
|
619
|
+
row.rowStyle = row.rowStyle + "cursor:move;";
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
622
|
},
|
|
@@ -753,7 +753,7 @@ function apiData(model, callback) {
|
|
|
753
753
|
})
|
|
754
754
|
.then(function (response) {
|
|
755
755
|
if (model.$vue && model.$vue.searchStrat && model.$vue.searchEnd) {
|
|
756
|
-
|
|
756
|
+
model.$vue.searchEnd = Date.now();
|
|
757
757
|
}
|
|
758
758
|
model.isLoading = false;
|
|
759
759
|
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
package/src/main.js
CHANGED
|
@@ -21,15 +21,15 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
app.use(centaline, {
|
|
24
|
-
baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
|
|
24
|
+
//baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
|
|
25
25
|
//baseUrl: "https://kq-api.centaline.com.cn/onecard-api/",
|
|
26
|
-
|
|
26
|
+
baseUrl: "http://10.88.22.66:6060/onecard-api/",
|
|
27
27
|
//baseUrl: "http://10.88.22.66:6060/xian/",
|
|
28
28
|
//baseUrl: "http://10.1.245.50:38735/max-uplink-api/",
|
|
29
29
|
//baseUrl: "http://10.1.245.111:38028/",
|
|
30
30
|
|
|
31
31
|
flagRouterSelf: true,
|
|
32
|
-
flagApp:
|
|
32
|
+
flagApp: false,//是否app端
|
|
33
33
|
zindex: 999,
|
|
34
34
|
showRequestSuccessMessage: true,
|
|
35
35
|
showRequestErrorMessage: true,
|
|
@@ -66,8 +66,8 @@ app.use(centaline, {
|
|
|
66
66
|
return {
|
|
67
67
|
//authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
|
|
68
68
|
//oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
|
|
69
|
-
|
|
70
|
-
authObject: '{EmpID:"Token_2fa5c93f-ae55-4e77-98a4-ef9c8b3bec34",MachineCode:"7c4b2ffd-920a-462c-a586-37bbfb45c4fe",SSO_Token:"SSOToken_2fa5c93f-ae55-4e77-98a4-ef9c8b3bec34",Platform:"IOS"}',
|
|
69
|
+
authObject: '{token:"1647-1909419453867757568",platform:"WEB"}',
|
|
70
|
+
//authObject: '{EmpID:"Token_2fa5c93f-ae55-4e77-98a4-ef9c8b3bec34",MachineCode:"7c4b2ffd-920a-462c-a586-37bbfb45c4fe",SSO_Token:"SSOToken_2fa5c93f-ae55-4e77-98a4-ef9c8b3bec34",Platform:"IOS"}',
|
|
71
71
|
};
|
|
72
72
|
},
|
|
73
73
|
getToken() {
|
package/src/views/SearchList.vue
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
:searchDataApi="'/propertyPublishList/getListOfSearchModel'"
|
|
5
5
|
:searchStatsApi="'/propertyPublishList/getListStats'"></ct-searchlist> -->
|
|
6
6
|
|
|
7
|
-
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyTenderList/getLayoutOfSearch'"
|
|
8
|
-
:searchDataApi="'/propertyTenderList/getListOfSearchModel'"></ct-searchlist>
|
|
7
|
+
<!-- <ct-searchlist :apiParam="apiParam" :searchConditionApi="'/propertyTenderList/getLayoutOfSearch'"
|
|
8
|
+
:searchDataApi="'/propertyTenderList/getListOfSearchModel'"></ct-searchlist> -->
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
:searchDataApi="'/
|
|
11
|
+
<ct-searchlist :apiParam="apiParam" :searchConditionApi="'/ReportWorkQuantifyList/getLayoutOfSearch'"
|
|
12
|
+
:searchDataApi="'/ReportWorkQuantifyList/getListOfSearchModel'"></ct-searchlist>
|
|
13
13
|
<ct-dialoglist ref="dialogList"></ct-dialoglist>
|
|
14
14
|
|
|
15
15
|
</div>
|