centaline-data-driven 1.6.57 → 1.6.59

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.
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div id="app-Tree" style="height:100%;">
2
+ <div ref="treeAppRef" id="app-Tree" style="height:100%;">
3
3
  <el-container style="height: calc(100vh - 98px);" ref="tree_left">
4
4
  <el-aside :width="asideWidth ? asideWidth + 'px' : '15%'"
5
5
  style="background-color:white;border-radius: 6px;overflow-y:hidden">
@@ -10,11 +10,10 @@
10
10
  <el-main v-if="isShowMain" style="position: relative;">
11
11
  <div class="resizer" @mousedown="startResizing"></div>
12
12
  <template v-if="pageType == 'form'">
13
- <div style="height: calc(100vh - 120px);">
14
- <div class="ct-form"
15
- :style="{ 'width': (width ? width + 'px' : 'auto'), 'height': (height ? height + 'px' : 'auto') }">
16
- <ct-form :api="formApi" :api-param="apiParam" :width="width" :height="height"></ct-form>
17
- </div>
13
+ <div class="ct-tree-form"
14
+ :style="{'width': (width ? width + 'px' : 'auto'), 'height': (height ? height + 'px' : (heightPage?heightPage:'auto'))
15
+ ,'position': 'relative','background-color': '#FFFFFF','border-radius': '6px'}">
16
+ <ct-form :api="formApi" :api-param="apiParam" :width="width" :height="height"></ct-form>
18
17
  </div>
19
18
  </template>
20
19
  <template v-else>
@@ -51,6 +50,7 @@ export default {
51
50
  formApi: "",
52
51
  width: 0,
53
52
  height: 0,
53
+ heightPage: '',
54
54
  isShowMain: false,
55
55
  pageType: 'list',
56
56
  apiParam: {},
@@ -80,6 +80,18 @@ export default {
80
80
  self.pageType = data.rowRouter.pageType != undefined ? data.rowRouter.pageType : "list";
81
81
  self.width = parseFloat(data.rowRouter.width != undefined ? data.rowRouter.width : "0");
82
82
  self.height = parseFloat(data.rowRouter.height != undefined ? data.rowRouter.height : "0");
83
+ if(self.pageType == 'form'){
84
+ self.heightPage = 'calc(100vh - 100px)';
85
+ let w1 = (this.$refs.treeAppRef)?this.$refs.treeAppRef.parentElement.offsetWidth : 0;
86
+ if(w1 > 0 && (self.width+self.asideWidth)>w1){
87
+ self.width = w1 - self.asideWidth - 30;
88
+ }
89
+ let h1 = (this.$refs.treeAppRef)?this.$refs.treeAppRef.parentElement.offsetHeight : 0;
90
+ if(h1 > 0 && self.height > 0 && self.height>h1){
91
+ self.height=0;
92
+ }
93
+ }
94
+
83
95
  self.searchTableConditionApi = data.rowRouter.getLayoutOfSearch;
84
96
  self.searchTableDataApi = data.rowRouter.getList;
85
97
  var defaultPara = self.$common.deepClone(data);
@@ -113,7 +125,6 @@ export default {
113
125
  document.addEventListener('mousemove', this.resizeAside);
114
126
  document.addEventListener('mouseup', this.stopResizing);
115
127
  },
116
-
117
128
  resizeAside(event) {
118
129
  if ( this.isResizing) {
119
130
  const newWidth = this.startWidth + (event.clientX - this.startX);
@@ -121,7 +132,6 @@ export default {
121
132
  window.localStorage.setItem(this.dataRowRouter, this.asideWidth);
122
133
  }
123
134
  },
124
-
125
135
  stopResizing() {
126
136
  this.isResizing = false;
127
137
  document.removeEventListener('mousemove', this.resizeAside);
@@ -167,12 +177,13 @@ export default {
167
177
  padding: 0;
168
178
  }
169
179
 
170
- #app-Tree .el-main ct-form {
180
+ #app-Tree .el-main ct-tree-form {
171
181
  border: 1px solid #cfcece;
172
182
  -webkit-box-shadow: #cfcece 0px 7px 9px 0px !important;
173
183
  border-radius: 6px !important;
174
184
  margin-top: 14px;
175
185
  }
186
+
176
187
  .resizer {
177
188
  position: absolute;
178
189
  top: 0;
@@ -28,6 +28,18 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
28
28
  get tip() {
29
29
  return source.tip;
30
30
  },
31
+ set tip(v) {
32
+ source.tip = v;
33
+ },
34
+ get bottomTip() {
35
+ return source.bottomTip;
36
+ },
37
+ set bottomTip(v) {
38
+ source.bottomTip = v;
39
+ },
40
+ get flagFixedTabOnHorizontalLayout() {
41
+ return source.flagFixedTabOnHorizontalLayout;
42
+ },
31
43
  get flagShowTitle() {
32
44
  let v=false;
33
45
  if(source.flagShowTitle)v=source.flagShowTitle;
@@ -0,0 +1,25 @@
1
+ import base from '../../index';
2
+ import Base from './Base';
3
+
4
+ const JsonViewer = function (source) {
5
+ var init = function (data) {
6
+ var rtn = {
7
+ get jsonData() {
8
+ if (data.code1 && typeof data.code1 === 'string') {
9
+ return JSON.parse(data.code1);
10
+ }
11
+ else {
12
+ return data.code1;
13
+ }
14
+ },
15
+ get height() {
16
+ return data.rows ? data.rows * 20 + 'px' : 'auto';
17
+ }
18
+ };
19
+ rtn = base.copy(Base(data), rtn);
20
+ return rtn;
21
+ }
22
+
23
+ return init(source);
24
+ }
25
+ export default JsonViewer;
@@ -50,8 +50,9 @@ const SensitiveEye = function (source) {
50
50
  extraData: extraData
51
51
  }
52
52
  };
53
- Vue.prototype.$api.postHandler(common.globalUri(), params).then((response) => {
54
- if (response.rtnCode === Enum.ReturnCode.Successful) {
53
+ if(rtn.getFormRefFieldPara())params.para = Object.assign(params.para,JSON.parse(rtn.getFormRefFieldPara()));
54
+ Vue.prototype.$api.postHandler(common.globalUri(), params,rtn.form.scripts).then((response) => {
55
+ if (response.rtnCode === Enum.ReturnCode.Successful && response.clientActionType !== Enum.ClientActionType.ExcuteScript) {
55
56
  self.labelValue1 = response.content;
56
57
  }
57
58
  });
@@ -1,7 +1,15 @@
1
-
1
+ import common from '../../../common';
2
2
  async function postFile(api, data, callback) {
3
3
  var xhr = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP");
4
4
  xhr.open('POST', api, !0)
5
+
6
+ let headers=common.getDataDrivenOpts().handler.getRequestHeaders(api);
7
+ if(headers){
8
+ for (const [key, value] of Object.entries(headers)) {
9
+ xhr.setRequestHeader(key,value)
10
+ }
11
+ }
12
+
5
13
  xhr.onreadystatechange = function () {
6
14
  if (xhr.readyState != 4 || xhr.status < 200) {
7
15
  return false;
@@ -311,6 +311,16 @@ const Enum = {
311
311
  */
312
312
  AIChat:62,
313
313
 
314
+ /**
315
+ * json 数据查看控件
316
+ */
317
+ JsonViewer:63,
318
+
319
+ /**
320
+ * Markdown 数据查看控件
321
+ */
322
+ MarkdownViewer:64,
323
+
314
324
  },
315
325
 
316
326
  //返回状态码
@@ -43,6 +43,7 @@ import LH from '../LH';
43
43
  import Image from '../Image';
44
44
  import Steps from '../Steps';
45
45
  import Location from '../Location';
46
+ import JsonViewer from '../JsonViewer';
46
47
 
47
48
  const LibFunction = {
48
49
  install(Vue) {},
@@ -415,6 +416,10 @@ const LibFunction = {
415
416
  item = Location(field,moreActionRouter);
416
417
  item.is = 'ct-Location';
417
418
  break;
419
+ case Enum.ControlType.JsonViewer: //json 数据查看控件
420
+ item = JsonViewer(field);
421
+ item.is = 'ct-JsonViewer';
422
+ break;
418
423
  default:
419
424
  item = L(field);
420
425
  item.is = 'ct-labelText';
@@ -456,6 +461,7 @@ const LibFunction = {
456
461
  || field.controlType === Enum.ControlType.List || field.controlType === Enum.ControlType.File
457
462
  || field.controlType === Enum.ControlType.SliceUpload || field.controlType === Enum.ControlType.PhoneDial
458
463
  || field.controlType === Enum.ControlType.Steps || field.controlType === Enum.ControlType.Location
464
+ || field.controlType === Enum.ControlType.JsonViewer || field.controlType === Enum.ControlType.MarkdownViewer
459
465
  || field.controlType === Enum.ControlType.SearchPage;
460
466
  },
461
467
  showLabel: showLabel
@@ -51,6 +51,7 @@ const loader = {
51
51
  Location: require("./ctl/Location.js").default,
52
52
  SosNew: require("./ctl/SosNew.js").default,
53
53
  TagsNew: require("./ctl/TagsNew.js").default,
54
+ JsonViewer: require("./ctl/JsonViewer.js").default,
54
55
  };
55
56
 
56
57
  export default loader;
package/src/main.js CHANGED
@@ -17,11 +17,13 @@ Vue.use(centaline, {
17
17
  // baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
18
18
  // baseUrl: "http://10.88.22.46:9004/max-uplink-api/",
19
19
  // baseUrl: "http://10.88.22.46:6060/onecard-api/",
20
- baseUrl: "http://10.88.22.46:9999/service-api/",
20
+ baseUrl: "http://10.88.22.46:9999/service-api/",
21
+ // baseUrl: "http://10.88.22.42:9999/service-api/",
21
22
  // baseUrl: "http://10.88.22.46:22324/service-api/v1/form/router",
22
23
  // baseUrl: "http://10.25.10.67:8999/service-api/v1/form/router",
23
24
  // baseUrl: "http://10.88.22.13:17070/max-uplink-api/",
24
25
  // baseUrl: "http://10.88.22.13:9004/max-uplink-api/",
26
+ // baseUrl: "http://10.88.22.13:7080/ibs-api/",
25
27
  // baseUrl:"http://szamaxbusiness-api-test2.centaline.com.cn/max-uplink-api/",
26
28
  // baseUrl: "http://10.88.22.13:7070/onecard-api/",
27
29
  // baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
@@ -31,7 +33,6 @@ Vue.use(centaline, {
31
33
  // baseUrl: "http://10.25.10.69:8080/",
32
34
  // baseUrl: "https://ccesutest.centaline.com.cn/service-api/v1/form/router",
33
35
  // baseUrl: "http://10.88.22.69:8080/",
34
- // baseUrl: "http://10.88.22.42:9999/service-api/",
35
36
  // baseUrl: "http://10.1.245.111:38908/service-api/",
36
37
  // baseUrl: "http://10.1.245.111:31574/service-api/",
37
38
  // baseUrl: "https://tjcptest.centaline.com.cn/",
@@ -66,19 +67,19 @@ Vue.use(centaline, {
66
67
  alert("openAnnexVerify")
67
68
  },
68
69
  // 获取请求头
69
- getRequestHeaders: function () {
70
+ getRequestHeaders: function (action) {
70
71
  return {
71
- oldToken: '30bf66c7-b93e-47b4-9d6f-3a7e85c19ac0',
72
- token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjksOwjAMBe-SdS05tuPE7PpJNhwCBWglWCHaSiDE3SniEGznjfTm5eb16HYuIUWltoc-sYKkYGDcF_ApGWYzjrE_CHOHKANQxAJSYgYTCYBoahaC0qAHJc6lbRW8bLuUbpNIBDS3QTJhZiHXuPFxczsfmXxCJG3cpS4_gMb6Bes83vfj8x9x1-Wy3eJ48seQJuCaziATTWDRIlSazCNrlerd-wMAAP__.93H7c7k4TLTqbKpozp0aTSU4U_WrQu3eS990iS-TCpw',
73
- // authObject: '{token:"jiangzf-1955865005534617600",platform:"WEB"}',
72
+ // oldToken: '30bf66c7-b93e-47b4-9d6f-3a7e85c19ac0',
73
+ // token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjksOwjAMBe-SdS05tuPE7PpJNhwCBWglWCHaSiDE3SniEGznjfTm5eb16HYuIUWltoc-sYKkYGDcF_ApGWYzjrE_CHOHKANQxAJSYgYTCYBoahaC0qAHJc6lbRW8bLuUbpNIBDS3QTJhZiHXuPFxczsfmXxCJG3cpS4_gMb6Bes83vfj8x9x1-Wy3eJ48seQJuCaziATTWDRIlSazCNrlerd-wMAAP__.93H7c7k4TLTqbKpozp0aTSU4U_WrQu3eS990iS-TCpw',
74
+ // authObject: '{token:"T5067-1995406631567089664",platform:"WEB"}',
74
75
 
75
76
  // originalRequestURL: 'http://10.88.22.67:8080',
76
- EstateInfo: '{"estateId":"1c581b7c-d629-4670-8a7c-6d622860bc58","estateName":"0%E9%87%91%E9%9A%85%E4%BA%91%E7%AD%91%E5%A4%A9%E6%B4%A5","estDeptPath":"009.014.001.001"}',
77
- estateId: '',
78
- appinfo:'{"appId":"8F184E91-2C73-45E3-B518-889491E07CDA","appName":"%E6%95%B0%E6%8D%AE%E9%A9%B1%E5%8A%A8%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0"}',
77
+ // EstateInfo: '{"estateId":"1c581b7c-d629-4670-8a7c-6d622860bc58","estateName":"0%E9%87%91%E9%9A%85%E4%BA%91%E7%AD%91%E5%A4%A9%E6%B4%A5","estDeptPath":"009.014.001.001"}',
78
+ // estateId: '',
79
+ // appinfo:'{"appId":"8F184E91-2C73-45E3-B518-889491E07CDA","appName":"%E6%95%B0%E6%8D%AE%E9%A9%B1%E5%8A%A8%E7%AE%A1%E7%90%86%E5%90%8E%E5%8F%B0"}',
79
80
 
80
- authObject: '{"currentEstate":{"estateId":"241113105409757BFF2887A7472E99D2","estateName":"U%E7%89%88%E6%A5%BC%E7%9B%98%E6%8C%89%E7%82%B9%E4%BD%8D","estDeptPath":"001.200.063.001"},"platform":1,"osVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"aRYECc","time":1762502469262,"sign":"3619227d847afa9c7dad6788b4b069d0","systemSource":"CCESU","empNo":"hqxtgl","empId":"2411121446336B97FBEB7FD54905A903","clientVersion":"12.5","empName":"hq%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86","roleName":"%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98","deptFullName":"%E6%9C%AA%E5%8C%B9%E9%85%8DCCHR%E4%B8%ADHROC%E9%83%A8%E9%97%A8%2F%E9%9B%86%E5%9B%A2IT%2FCCES%E7%BB%84"}',
81
- AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjdjMTVhNjcyLTI1OTAtNDJjOS05ZGY4LTlhMWZjOGU3NTc3NyJ9.l5OQ1vse_HTJrmceicNHas9HLyaLcyMHtoYqO8fQOqb8bmjMHoKlutaIjSIk_etQnWi85iF4JJh-ll2fwdkp-A',
81
+ authObject: '{"currentEstate":{"estateId":"2411131056106A1F68DFE6454976B1A9","estateName":"U%E7%89%88%E6%A5%BC%E7%9B%98%E6%8C%89%E6%A5%BC%E4%BB%B7","estDeptPath":"001.200.063.001"},"platform":1,"osVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"Kx2b5s","time":"2025-12-04 15:45:19","timestamp":1764834319180,"sign":"b61d76794e3732fe7d9628ca5a405877","systemSource":"CCESU","empNo":"hqxtgl","empId":"2411121446336B97FBEB7FD54905A903","clientVersion":"12.5","empName":"hq%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86","roleName":"%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98","deptFullName":"%E6%9C%AA%E5%8C%B9%E9%85%8DCCHR%E4%B8%ADHROC%E9%83%A8%E9%97%A8%2F%E9%9B%86%E5%9B%A2IT%2FCCES%E7%BB%84"}',
82
+ AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImFiMzUyNDA3LTE5MjktNDc0Zi1hMjE3LTE0ZDk1ZmI1ODQwNyJ9.h8C8KL7X4c8BTRwe15st_j06nH9s8A4ZphIyH7KXIp2a_VsdYpl1T4kuhSZ5xasftGc69LeWmn2N9CwKiyWUVg',
82
83
  };
83
84
  },
84
85
  // 请求完成事件,可判断是否登录过期执行响应操作