centaline-data-driven-v3 0.0.86 → 0.0.88

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven-v3",
3
- "version": "0.0.86",
3
+ "version": "0.0.88",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -178,7 +178,7 @@ function init() {
178
178
  function load(data) {
179
179
  model.value = data
180
180
  model.value.parentModelForm = props.parentModelForm
181
- model.value.$vue = { fieldClickHandler, clickHandler, emit, getFormObj, getFileData, Form, validExcute, changeCallBackHandler, load, init, updateFields };
181
+ model.value.$vue = { fieldClickHandler, clickHandler, emit, getFormObj, getFileData, Form, validExcute, changeCallBackHandler, load, init, updateFields,loaded };
182
182
  if (model.value.scripts) {
183
183
  model.value.scripts.formData = model.value.formData;
184
184
  model.value.scripts.formData.form = model.value;
@@ -213,6 +213,9 @@ function load(data) {
213
213
  //通知父组件加载完成
214
214
  emit('loaded', model.value);
215
215
  }
216
+ function loaded(model) {
217
+ emit('loaded', model);
218
+ }
216
219
  function failLoad() {
217
220
  emit('failLoad', model.value);
218
221
  }
@@ -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"])
@@ -433,7 +434,7 @@ const fetchAIResponse = async (params) => {
433
434
  if (error.name === 'AbortError') {
434
435
  console.log('Request aborted');
435
436
  } else {
436
- common.message('请求失败', 'error');
437
+ common.message(error, 'error');
437
438
  }
438
439
  });
439
440
  }
@@ -459,7 +460,7 @@ function stopRequest() {
459
460
  if (error.name === 'AbortError') {
460
461
  console.log('Request aborted');
461
462
  } else {
462
- common.message('请求失败', 'error');
463
+ common.message(error, 'error');
463
464
  }
464
465
  });
465
466
 
@@ -519,12 +520,28 @@ const getTemplateType = (fullText) => {
519
520
  try {
520
521
  const eventData = JSON.parse(fullText)
521
522
  if (eventData) {
522
- if (eventData.content?.rows) {
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) {
523
539
  rtn = 'table';
524
540
  }
525
541
  else if (eventData.content?.fields) {
526
542
  rtn = 'form';
527
543
  }
544
+
528
545
  }
529
546
 
530
547
  } catch (error) {
@@ -537,9 +554,9 @@ const getTemplateType = (fullText) => {
537
554
 
538
555
 
539
556
  function startTypingEffect(fullText) {
557
+ fullText = fullText.replace(/\\n/gi, '\n\n');
540
558
  let index = 0;
541
559
  outtext.value = ''; // 清空内容
542
-
543
560
  function typeNext() {
544
561
  // 随机生成3到10之间的字符数
545
562
  const randomChars = Math.floor(Math.random() * 5) + 8;
@@ -56,7 +56,25 @@ const Fields = ref()
56
56
  const itemKey = ref(0)
57
57
  model.value.selfValidExcute = () => {
58
58
  let rtnBool = true;
59
- if (typeof Fields.value !== 'undefined') {
59
+ if (model.value.layoutTemplate) {
60
+ var i = 0;
61
+ if (model.value.fields.length > 0) {
62
+ model.value.fields.forEach((f) => {
63
+ if (f.validExcute) {
64
+ if (!f.validExcute()) {
65
+ if (i === 0) {
66
+ if (f.displayValidMessage) {
67
+ model.value.displayValidMessage = f.displayValidMessage;
68
+ }
69
+ }
70
+ i++;
71
+ rtnBool = false;
72
+ }
73
+ }
74
+ });
75
+ }
76
+ }
77
+ else if (typeof Fields.value !== 'undefined') {
60
78
  Fields.value.forEach((f) => {
61
79
  if (f.model && typeof f.model.validExcute !== 'undefined') {
62
80
  if (!f.model.validExcute(f.model)) {
@@ -69,6 +69,9 @@ function loadFromModel(source, isFormList) {
69
69
  });
70
70
  if (router) {
71
71
  router[attrKey] = attrValue;
72
+ if(common.flagApp()&&this.form.$vue.loaded){
73
+ this.form.$vue.loaded(this.form)
74
+ }
72
75
  }
73
76
  },
74
77
  //获取Field的属性attrKey的值
@@ -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 && !self.isMergeTitle) {
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
- return source.content.rowColorColumn;
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
- row.rowStyle = row.rowStyle + ";color:" + row[rtn.rowColorColumn] + ";";
616
+ row.rowStyle = row.rowStyle + ";color:" + row[rtn.rowColorColumn] + ";";
617
617
  }
618
618
  if (row.flagDrag && row.flagDrag == '1') {
619
- row.rowStyle = row.rowStyle + "cursor:move;";
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
- model.$vue.searchEnd = Date.now();
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,7 +21,8 @@ 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:"https://uplink.centaline.com.cn/xian/",
25
+ //baseUrl:"http://10.88.22.66/IBS.Mvc/api/",
25
26
  //baseUrl: "https://kq-api.centaline.com.cn/onecard-api/",
26
27
  //baseUrl: "http://10.88.22.13:6060/onecard-api/",
27
28
  //baseUrl: "http://10.88.22.66:6060/xian/",
@@ -29,7 +30,7 @@ app.use(centaline, {
29
30
  //baseUrl: "http://10.1.245.111:38028/",
30
31
 
31
32
  flagRouterSelf: true,
32
- flagApp: true,//是否app端
33
+ flagApp: false,//是否app端
33
34
  zindex: 999,
34
35
  showRequestSuccessMessage: true,
35
36
  showRequestErrorMessage: true,
@@ -66,8 +67,8 @@ app.use(centaline, {
66
67
  return {
67
68
  //authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
68
69
  //oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
69
- //authObject: '{token:"1647-1907352839429165056",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"}',
70
+ authObject: '{token:"1-bce18a8d-21f0-4022-a6ca-450de105cafc"}',
71
+ //authObject: '{EmpID:"Token_156a7f3f-b1e9-4592-aaef-49a572768c06",MachineCode:"7c4b2ffd-920a-462c-a586-37bbfb45c4fe",SSO_Token:"SSOToken_156a7f3f-b1e9-4592-aaef-49a572768c06",Platform:"IOS"}',
71
72
  };
72
73
  },
73
74
  getToken() {
@@ -294,7 +294,7 @@ const common = {
294
294
  center = true;
295
295
  }
296
296
  if (typeof duration === 'undefined') {
297
- duration = 1500;
297
+ duration = 3000;
298
298
  }
299
299
  if (typeof showClose === 'undefined') {
300
300
  showClose = false;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="data-driven" id="app-form" >
3
3
 
4
- <ct-form :api="'/PropertyPublish/getLayoutOfAudit'" :apiParam="apiParam" :flagNavbar="true"></ct-form>
4
+ <ct-form :api="'/admin/SchoolTeachingPlanExam/readDetail'" :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={"workListID":"1902920155446489088","actionType":3}
13
+ const apiParam={"actionType":2,"teachingPlanId":"1"}
14
14
  </script>
@@ -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'"
Binary file