centaline-data-driven 1.6.50 → 1.6.52

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",
3
- "version": "1.6.50",
3
+ "version": "1.6.52",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,23 @@
1
+ # v1.6.52
2
+ 2025-09-01
3
+
4
+ 优化
5
+
6
+ Field添加隐藏属性
7
+
8
+ Field添加显示相关的控制
9
+
10
+ BUG
11
+
12
+ 表单重启一行<br/>不起效果处理
13
+
14
+ # v1.6.51
15
+ 2025-08-07
16
+
17
+ BUG
18
+
19
+ 搜索下拉框在App端无法唤起键盘输入的问题
20
+
1
21
  # v1.6.50
2
22
  2025-08-07
3
23
 
package/src/Form.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="form-app" class="data-driven" style="width:100%;height:100%;overflow:auto">
3
3
  <!-- <ct-form :source="formdata.content" :apiParam="apiParam"></ct-form> -->
4
- <ct-form :api="'/employee/readDetail'" :apiParam="apiParam" :topHeight="topHeight" :documentHeight="'600px'"></ct-form>
4
+ <ct-form :api="'/property/readPropertyUpdateDetail'" :apiParam="apiParam" :topHeight="topHeight" :documentHeight="'600px'"></ct-form>
5
5
  <ct-dialog-list></ct-dialog-list>
6
6
  </div>
7
7
  </template>
@@ -12,7 +12,7 @@
12
12
  data() {
13
13
  return {
14
14
  apiParam:{
15
- "empId":"20221125090727B9ADEDF567D9130923","columnName":"empNameNo","actionType":3
15
+ "estateId":"241112160400DF3DC1EB63A14A1DBBF4","propertyId":"2411121629063ADD517E35104A4E98FD","actionType":3
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -38,6 +38,7 @@
38
38
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/estatemanage/estatlist/getLayoutOfSearch'" :searchDataApi="'/estatemanage/estatlist/getList'"></ct-searchlist> -->
39
39
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/system/AreaList/getLayoutOfSearch'" :searchDataApi="'/system/AreaList/getList'"></ct-searchlist> -->
40
40
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/roomtypelist/getLayoutOfSearch'" :searchDataApi="'/roomtypelist/getList'"></ct-searchlist> -->
41
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/app/workbenchdetails/getContractLayoutOfSearch'" :searchDataApi="'/app/workbenchdetails/getContractList'"></ct-searchlist> -->
41
42
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/selectionactivitymanage/EvaluationActWorksList/getLayoutOfSearch'" :searchDataApi="'/selectionactivitymanage/EvaluationActWorksList/getListOfSearchModel'"></ct-searchlist> -->
42
43
  <!-- CCES -->
43
44
 
@@ -30,7 +30,7 @@
30
30
  <el-row v-if="collapseFieldsRow.length > 0">
31
31
  <template v-for="(col, index) in collapseFieldsRow[0]">
32
32
  <template v-if="col.show !== false && col.lineFeed">
33
- <br/>
33
+ <div style="float: left;width: 100%;"></div>
34
34
  <el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
35
35
  <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
36
36
  :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
@@ -62,7 +62,7 @@
62
62
  <el-row>
63
63
  <template v-for="(col, index) in collapseFieldsRow[index + 1]">
64
64
  <template v-if="col.show !== false && col.lineFeed">
65
- <br/>
65
+ <div style="display: flex; flex: 0 0 100%;"></div>
66
66
  <el-col :key="index" :span="col.colspan" v-if="col.show !== false" style="padding:5px">
67
67
  <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
68
68
  :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
@@ -99,7 +99,7 @@
99
99
  <el-row>
100
100
  <template v-for="(col, index) in collapseFieldsRow[index + 1]">
101
101
  <template v-if="col.show !== false && col.lineFeed">
102
- <br/>
102
+ <div style="display: flex; flex: 0 0 100%;"></div>
103
103
  <el-col :key="index" :span="col.colspan" v-if="col.show !== false" style="padding:5px">
104
104
  <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
105
105
  :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
@@ -130,7 +130,7 @@
130
130
  <el-row v-if="independentItem.length > 0" style="margin-top: 20px;">
131
131
  <template v-for="(col, index) in independentItem">
132
132
  <template v-if="col.show !== false && col.lineFeed">
133
- <br/>
133
+ <div style="display: flex; flex: 0 0 100%;"></div>
134
134
  <el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
135
135
  <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
136
136
  :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
@@ -82,6 +82,11 @@
82
82
  this.model.value = this.$common.numFloat(this.model.value, this.model.decimals, this.inputOld);//保留n位小数
83
83
  if (this.model.max !== "" && parseFloat(this.model.value) > parseFloat(this.model.max)) {
84
84
  this.model.value = this.inputOld;
85
+ this.$message({
86
+ message: '【' + this.model.label + '】最大值为' + this.model.max,
87
+ type: 'error',
88
+ showClose:true,
89
+ });
85
90
  }
86
91
 
87
92
  this.inputHandler(this.model.value);
@@ -105,14 +105,14 @@
105
105
  if (this.model.popupSearchListType === 1){
106
106
  this.$refs.refselect.popperElm.hidden = true
107
107
  }
108
- if(flag){
109
- this.removeReadOnly();
110
- }
108
+ this.removeReadOnly();
111
109
  },
112
110
  removeReadOnly() {
113
111
  this.$nextTick(() => {
114
- const input = this.$refs.select.$el.querySelector('.el-input__inner');
115
- input.removeAttribute('readonly');
112
+ setTimeout(() => {
113
+ const input = this.$refs.refselect.$el.querySelector('.el-input__inner');
114
+ input.removeAttribute('readonly');
115
+ }, 200);
116
116
  });
117
117
  },
118
118
  soChange: function (value) {
@@ -170,5 +170,7 @@
170
170
  }
171
171
  </script>
172
172
  <style>
173
-
173
+ .el-scrollbar .el-scrollbar__bar {
174
+ opacity: 1 !important;
175
+ }
174
176
  </style>
@@ -104,6 +104,9 @@ const Base = function (source) {
104
104
  if (typeof source.show !== "undefined") {
105
105
  return source.show;
106
106
  }
107
+ if (source.hidden) {
108
+ return !source.hidden;
109
+ }
107
110
  return true;
108
111
  },
109
112
  set show(v) {
@@ -424,6 +427,27 @@ const Base = function (source) {
424
427
  get vueComponentName() {
425
428
  return source.vueComponentName;
426
429
  },
430
+ //是否显示
431
+ get hidden() {
432
+ return source.hidden;
433
+ },
434
+ set hidden(v) {
435
+ source.hidden = v;
436
+ },
437
+ //决定其显示相关的字段
438
+ get displayRelationField() {
439
+ return source.displayRelationField;
440
+ },
441
+ set displayRelationField(v) {
442
+ source.displayRelationField = v;
443
+ },
444
+ //决定其显示相关字段的值
445
+ get displayRelationFieldValue() {
446
+ return source.displayRelationFieldValue;
447
+ },
448
+ set displayRelationFieldValue(v) {
449
+ source.displayRelationFieldValue = v;
450
+ },
427
451
  };
428
452
 
429
453
  return rtn;
@@ -205,7 +205,7 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
205
205
  get onload() {
206
206
  return source.onload;
207
207
  },
208
- formData:{
208
+ formData:{
209
209
  common: common,
210
210
  Axios: Axios,
211
211
  form: null,
@@ -261,6 +261,9 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
261
261
  rtn1.jsSetFile(attrValue);
262
262
  }
263
263
 
264
+ if (attrKey == 'hidden') {
265
+ rtn1.source['show'] = !attrValue
266
+ }
264
267
  rtn1.source[attrKey] = attrValue;
265
268
  if (rtn1.source.controlType === 23) {
266
269
  if (rtn1["options"].length == 0) {
@@ -613,6 +616,9 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
613
616
  attrValue = Number(attrValue).toFixed(rtn1.source.decimals1)
614
617
  }
615
618
  }
619
+ if (attrKey == 'hidden') {
620
+ rtn1.source['show'] = !attrValue
621
+ }
616
622
  rtn1.source[attrKey] = attrValue;
617
623
  this.self.hatchHandle(id, attrKey, attrValue, rtn1);
618
624
 
@@ -764,16 +770,31 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
764
770
  let field = null;
765
771
 
766
772
  for (var i in rtn.source.fields) {
767
- if (rtn.source.fields[i].hiddenRelationField === item.id) {
773
+ if (rtn.source.fields[i].hiddenRelationField && rtn.source.fields[i].hiddenRelationField === item.id) {
768
774
  field = rtn.source.fields[i];
769
775
 
770
776
  if (field) {
771
777
  let hiddenValueArr = field.hiddenRelationFieldValue.split(',');
772
- if (hiddenValueArr.indexOf(item.code1) > -1) {
773
- field.show = false;
778
+ if (item.type == Enum.ControlType.MultiSelectWithSearch || item.type == Enum.ControlType.MultiSelectNoSearch) {
779
+ field.show = true;
780
+ var value = item.code1 === '' ? [''] : JSON.parse(item.code1)
781
+ if (value.length > 0) {
782
+ value.forEach((v) => {
783
+ if (v.flagDeleted !== true) {
784
+ if (hiddenValueArr.indexOf(v.code) > -1) {
785
+ field.show = false;
786
+ }
787
+ }
788
+ });
789
+ }
774
790
  }
775
791
  else {
776
- field.show = true;
792
+ if (hiddenValueArr.indexOf(item.code1) > -1) {
793
+ field.show = false;
794
+ }
795
+ else {
796
+ field.show = true;
797
+ }
777
798
  }
778
799
 
779
800
  //本组件隐藏,子组件必须隐藏
@@ -787,8 +808,43 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
787
808
  }
788
809
  }
789
810
  }
790
- }
811
+ else if(rtn.source.fields[i].displayRelationField && rtn.source.fields[i].displayRelationField === item.id){
812
+ field = rtn.source.fields[i];
791
813
 
814
+ if (field) {
815
+ let displayValueArr = field.displayRelationFieldValue.split(',');
816
+ if (item.type == Enum.ControlType.MultiSelectWithSearch || item.type == Enum.ControlType.MultiSelectNoSearch) {
817
+ field.show = false;
818
+ var value = item.code1 === '' ? [''] : JSON.parse(item.code1)
819
+ if (value.length > 0) {
820
+ value.forEach((v) => {
821
+ if (v.flagDeleted !== true) {
822
+ if (displayValueArr.indexOf(v.code) > -1) {
823
+ field.show = true;
824
+ }
825
+ }
826
+ });
827
+ }
828
+ }
829
+ else {
830
+ if (displayValueArr.indexOf(item.code1) > -1) {
831
+ field.show = true;
832
+ }
833
+ else {
834
+ field.show = false;
835
+ }
836
+ }
837
+
838
+ if(!item.show && item.type !== Enum.ControlType.Hidden)field.show = false;
839
+
840
+ sign = true;
841
+
842
+ if (update && rtn.self && sign) {
843
+ rtn.self.$forceUpdate();
844
+ }
845
+ }
846
+ }
847
+ }
792
848
  }
793
849
  },
794
850
  hiddenHandlesource(item){
@@ -10,6 +10,9 @@ const T = function (source) {
10
10
  if (typeof source.show !== "undefined") {
11
11
  flagShow = source.show;
12
12
  }
13
+ else if (source.hidden) {
14
+ flagShow = !source.hidden;
15
+ }
13
16
  if(!rtn.labelValue && !rtn.label){
14
17
  flagShow = false;
15
18
  }
@@ -70,7 +70,9 @@ const SearchScreen = function (source, callBack, screenPara, prevParam) {
70
70
  && attrValue != undefined && attrValue != null && attrValue != '') {
71
71
  rtn1.jsSetFile(attrValue);
72
72
  }
73
-
73
+ if (attrKey == 'hidden') {
74
+ rtn1.source['show'] = !attrValue
75
+ }
74
76
  rtn1.source[attrKey] = attrValue;
75
77
  this.form.hatchHandle(id, attrKey, attrValue, rtn1);
76
78
 
@@ -888,7 +890,7 @@ const SearchScreen = function (source, callBack, screenPara, prevParam) {
888
890
 
889
891
  if(rtn.sourceFieldsArr){
890
892
  for (var i in rtn.sourceFieldsArr) {
891
- if (rtn.sourceFieldsArr[i].hiddenRelationField === item.id) {
893
+ if (rtn.sourceFieldsArr[i].hiddenRelationField && rtn.sourceFieldsArr[i].hiddenRelationField === item.id) {
892
894
  field = rtn.sourceFieldsArr[i];
893
895
 
894
896
  if (field) {
@@ -901,12 +903,24 @@ const SearchScreen = function (source, callBack, screenPara, prevParam) {
901
903
  }
902
904
  }
903
905
  }
906
+ else if(rtn.sourceFieldsArr[i].displayRelationField && rtn.sourceFieldsArr[i].displayRelationField === item.id){
907
+ field = rtn.sourceFieldsArr[i];
908
+ if (field) {
909
+ let displayValueArr = field.displayRelationFieldValue.split(',');
910
+ if (displayValueArr.indexOf(item.code1) > -1) {
911
+ field.show = true;
912
+ }
913
+ else {
914
+ field.show = false;
915
+ }
916
+ }
917
+ }
904
918
  }
905
919
  }
906
920
 
907
921
  if(rtn._screen){
908
922
  for (var i in rtn._screen) {
909
- if (rtn._screen[i].hiddenId === item.id) {
923
+ if (rtn._screen[i].hiddenId && rtn._screen[i].hiddenId === item.id) {
910
924
  field = rtn._screen[i];
911
925
 
912
926
  if (field) {
@@ -920,12 +934,25 @@ const SearchScreen = function (source, callBack, screenPara, prevParam) {
920
934
  field.keyScreen=field.id+Math.random();
921
935
  }
922
936
  }
937
+ else if(rtn._screen[i].displayRelationField && rtn._screen[i].displayRelationField === item.id){
938
+ field = rtn._screen[i];
939
+ if (field) {
940
+ let displayValueArr = field.displayRelationFieldValue.split(',');
941
+ if (displayValueArr.indexOf(item.code1) > -1) {
942
+ field.show = true;
943
+ }
944
+ else {
945
+ field.show = false;
946
+ }
947
+ field.keyScreen=field.id+Math.random();
948
+ }
949
+ }
923
950
  }
924
951
  }
925
952
 
926
953
  if(rtn._highScreen){
927
954
  for (var i in rtn._highScreen) {
928
- if (rtn._highScreen[i].hiddenId === item.id) {
955
+ if (rtn._highScreen[i].hiddenId && rtn._highScreen[i].hiddenId === item.id) {
929
956
  field = rtn._highScreen[i];
930
957
 
931
958
  if (field) {
@@ -939,6 +966,19 @@ const SearchScreen = function (source, callBack, screenPara, prevParam) {
939
966
  field.keyScreen=field.id+Math.random();
940
967
  }
941
968
  }
969
+ else if(rtn._highScreen[i].displayRelationField && rtn._highScreen[i].displayRelationField === item.id){
970
+ field = rtn._highScreen[i];
971
+ if (field) {
972
+ let displayValueArr = field.displayRelationFieldValue.split(',');
973
+ if (displayValueArr.indexOf(item.code1) > -1) {
974
+ field.show = true;
975
+ }
976
+ else {
977
+ field.show = false;
978
+ }
979
+ field.keyScreen=field.id+Math.random();
980
+ }
981
+ }
942
982
  }
943
983
  }
944
984
  }
package/src/main.js CHANGED
@@ -23,7 +23,7 @@ Vue.use(centaline, {
23
23
  // baseUrl: "http://10.88.22.13:17070/max-uplink-api/",
24
24
  // baseUrl: "http://10.88.22.13:9004/max-uplink-api/",
25
25
  // baseUrl:"http://szamaxbusiness-api-test2.centaline.com.cn/max-uplink-api/",
26
- // baseUrl: "http://10.88.22.13:6060/onecard-api/",
26
+ // baseUrl: "http://10.88.22.13:7070/onecard-api/",
27
27
  // baseUrl: "http://10.6.1.163:9000/max-uplink-api/v1/form/router",
28
28
  // baseUrl: "http://10.28.21.164:9004/max-uplink-api/",
29
29
  // baseUrl: "http://10.25.10.63:9999/service-api/",
@@ -70,15 +70,15 @@ Vue.use(centaline, {
70
70
  return {
71
71
  oldToken: 'c827efdb-95fd-4b50-9b65-4e3f736acb53',
72
72
  token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjksOwjAMBe-SdS05tuPE7PpJNhwCBWglWCHaSiDE3SniEGznjfTm5eb16HYuIUWltoc-sYKkYGDcF_ApGWYzjrE_CHOHKANQxAJSYgYTCYBoahaC0qAHJc6lbRW8bLuUbpNIBDS3QTJhZiHXuPFxczsfmXxCJG3cpS4_gMb6Bes83vfj8x9x1-Wy3eJ48seQJuCaziATTWDRIlSazCNrlerd-wMAAP__.93H7c7k4TLTqbKpozp0aTSU4U_WrQu3eS990iS-TCpw',
73
- // authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjkluAjEQAP_iMy315ulubjZjX_IIxGSMBCfEIoGi_D1EeURupbpUfaXbY0nbxDY3bRNBbSSgrPImYUDMea6lt2q8j16yz6jAHBW0WwcPE8gUUtC9tqp73yExMkHeFQO1kqHkHiBtUnO0GSunTRrPS9qSaUxM4rpJp8P9T2TR-BWP27h-jNd_zJ3vp3fWjI1kXSHiM0BXDFgGLXDU42FycedlpO8fAAAA__8.ivEDjo_ZDzbRbY8bF3PeEQaGhl5uvrVbVDPjq9iYHb4"}',
73
+ // authObject: '{token:"jiangzf-1955865005534617600",platform:"WEB"}',
74
74
 
75
75
  // originalRequestURL: 'http://10.88.22.67:8080',
76
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
77
  estateId: '',
78
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"}',
79
79
 
80
- authObject: '{"currentEstate":{"estateId":"241112160400DF3DC1EB63A14A1DBBF4","estateName":"%E6%B5%8B%E8%AF%95%E6%8C%89%E7%82%B9%E4%BD%8Dhq","estDeptPath":"001.200.063.001"},"platform":1,"osVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"6TnEgk","time":1749115399017,"sign":"3a50eb5f08b7bd75b2e7c99f32fa220e","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.eyJsb2dpbl91c2VyX2tleSI6IjlmODc5NTA3LWJmZTgtNDY0MS04ZGE5LWJhOTQ2NjhjNjc0MCJ9.2MoGUYsd88MqzvNsOclX3pb-xX-CVWYPVip3c_B1kxGoKTsvgPbq-oEzMa_xsJ5ZZBTiauHAb21MjJdpnolzyA',
80
+ authObject: '{"currentEstate":{"estateId":"241112160400DF3DC1EB63A14A1DBBF4","estateName":"%E6%B5%8B%E8%AF%95%E6%8C%89%E7%82%B9%E4%BD%8Dhq","estDeptPath":"001.200.063.001"},"platform":1,"osVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"CcTkw4","time":1756699289470,"sign":"805964fbed32f7be5e46e9903c4ec631","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.eyJsb2dpbl91c2VyX2tleSI6IjA1YTUzMWIxLTBiOTYtNDI5OS1hODU3LTI5NTRhOTE0OTE1NCJ9.MYBWLR7_cxK9P-zQoZyO2OLcQE_ucbatLk5iwQ_IJAGdTBsgiKEw8k_2YpK3kvi78FrvypYs49tEWDNOtAElmw',
82
82
  };
83
83
  },
84
84
  // 请求完成事件,可判断是否登录过期执行响应操作