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.
@@ -70,6 +70,7 @@ const paths = {
70
70
  "dynamicAppContainer": "./src/centaline/dynamicAppContainer/index.js", //
71
71
  "dynamicSteps": "./src/centaline/dynamicSteps/index.js", //步骤控件
72
72
  "dynamicLocation": "./src/centaline/dynamicLocation/index.js", //经纬度获取控件
73
+ "dynamicJsonViewer": "./src/centaline/dynamicJsonViewer/index.js", //json 数据查看控件
73
74
  },
74
75
  "plugs": {
75
76
  "api": "./src/centaline/api/index.js", //调用API插件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.6.57",
3
+ "version": "1.6.59",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -25,6 +25,7 @@
25
25
  "vue": "2.5.17",
26
26
  "vue-baidu-map": "^0.21.22",
27
27
  "vue-cropper": "^0.5.8",
28
+ "vue-json-viewer": "^2.2.22",
28
29
  "vue-ueditor-wrap": "^2.5.6",
29
30
  "vuedraggable": "^2.24.3"
30
31
  },
package/release-log.md CHANGED
@@ -1,3 +1,29 @@
1
+ # v1.6.59
2
+ 2025-12-09
3
+
4
+ 优化
5
+
6
+ 分片上传添加请求头传到API,添加action传到前端
7
+
8
+ 树界面右侧表单按钮样式调整
9
+
10
+ # v1.6.58
11
+ 2025-12-01
12
+
13
+ 新增
14
+
15
+ 表单页面添加bottomTip,显示在页面底部并且悬停,支持html
16
+
17
+ 添加 json 数据查看控件
18
+
19
+ 优化
20
+
21
+ 敏感信息查看控件调整,请求参数添加支持直接获取
22
+
23
+ 表单界面的下部的操作按钮统一固定于界面底部
24
+
25
+ 表单页面分组水平布局时,是否固定 分组tab(默认 false)
26
+
1
27
  # v1.6.57
2
28
  2025-11-07
3
29
 
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="'/api/third-dept-tran/transaction/edit'" :apiParam="apiParam" :topHeight="topHeight" :documentHeight="'600px'"></ct-form>
4
+ <ct-form :api="'/salemanage/ContractByPoint/readDetail'" :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
- "originalTraId":"1913105048579919873","actionType":3,"pageStyle":2,"pageTitle":"修改成交单","pageOnly":true
15
+ "commissionMode":1,"contractId":"251120105528E09634DE592A4DF8A326","propertyId":"250522090514A8BF158FF92A43479EA6","searchFields":{"fields":[{"fieldName1":"CompanyPath","groupName":"CompanyPath","operation":1,"searchDataType":1,"searchValue1":"001"},{"fieldName1":"EmpID","groupName":"EmpID","operation":1,"searchDataType":1,"searchValue1":"20201030134831BAA0AC5CDC9344B21E"},{"fieldName1":"DeptPath","groupName":"DeptPath","operation":1,"searchDataType":1,"searchValue1":"001.200.063.001"},{"fieldName1":"type","groupName":"type","operation":1,"searchDataType":1,"searchValue1":"left"},{"fieldName1":"EstateID","groupName":"EstateID","operation":2,"searchDataType":3,"searchValue1":"2411211358417B58943C6E954B35BB56"}]},"pageAttribute":{"pageIndex":1},"columnName":"contractDate","actionType":3
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -21,7 +21,9 @@
21
21
 
22
22
  <!-- CCES -->
23
23
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/agentuserlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/agentuserlist/getList'"></ct-searchlist> -->
24
- <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/contractmanage/ContractList/getLayoutOfSearch'" :searchDataApi="'/contractmanage/ContractList/getList'"></ct-searchlist> -->
24
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/buildinginfo/getLayoutOfSearch'" :searchDataApi="'/buildinginfo/getList'"></ct-searchlist> -->
25
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/roomtypelist/getLayoutOfSearch'" :searchDataApi="'/roomtypelist/getList'"></ct-searchlist> -->
26
+ <ct-searchlist :apiParam="para" :searchConditionApi="'/contractmanage/ContractList/getLayoutOfSearch'" :searchDataApi="'/contractmanage/ContractList/getList'"></ct-searchlist>
25
27
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/sunexpensemanage/sunexpenserecordlist/getLayoutOfSearch'" :searchDataApi="'/sunexpensemanage/sunexpenserecordlist/getList'"></ct-searchlist> -->
26
28
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/workwxmanage/WorkWXApplicationList/getLayoutOfSearch'" :searchDataApi="'/workwxmanage/WorkWXApplicationList/getList'"></ct-searchlist> -->
27
29
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/UrgentResponsiblePersonList/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/UrgentResponsiblePersonList/getList'"></ct-searchlist> -->
@@ -33,17 +35,17 @@
33
35
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/customerquery/publiccustcalltaskreferrallist/getLayoutOfSearch'" :searchDataApi="'/customerquery/publiccustcalltaskreferrallist/getList'"></ct-searchlist> -->
34
36
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/agentuserlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/agentuserlist/getList'"></ct-searchlist> -->
35
37
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/EntranceNoticeInfoList/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/EntranceNoticeInfoList/getList'"></ct-searchlist> -->
36
- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/squareuploadlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/squareuploadlist/getList'"></ct-searchlist>
38
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/squareuploadlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/squareuploadlist/getList'"></ct-searchlist> -->
37
39
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/commissionquery/properformanceszjjbreport/getLayoutOfSearch'" :searchDataApi="'/commissionquery/properformanceszjjbreport/getList'"></ct-searchlist> -->
38
40
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/employeelist/getLayoutOfSearch'" :searchDataApi="'/employeelist/getList'"></ct-searchlist> -->
39
41
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/estatemanage/estatlist/getLayoutOfSearch'" :searchDataApi="'/estatemanage/estatlist/getList'"></ct-searchlist> -->
40
42
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/system/AreaList/getLayoutOfSearch'" :searchDataApi="'/system/AreaList/getList'"></ct-searchlist> -->
41
- <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/roomtypelist/getLayoutOfSearch'" :searchDataApi="'/roomtypelist/getList'"></ct-searchlist> -->
42
43
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/priceuploadlist/getLayoutOfSearch'" :searchDataApi="'//salemattersmanage/priceuploadlist/getList'"></ct-searchlist> -->
43
44
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/app/workbenchdetails/getContractLayoutOfSearch'" :searchDataApi="'/app/workbenchdetails/getContractList'"></ct-searchlist> -->
44
45
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/selectionactivitymanage/EvaluationActWorksList/getLayoutOfSearch'" :searchDataApi="'/selectionactivitymanage/EvaluationActWorksList/getListOfSearchModel'"></ct-searchlist> -->
45
46
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/financesalemanage/finContractList/getLayoutOfSearch'" :searchDataApi="'/financesalemanage/finContractList/getList'"></ct-searchlist> -->
46
47
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/financecommissionmanage/fincommissionapplylist/getLayoutOfSearch'" :searchDataApi="'/financecommissionmanage/fincommissionapplylist/getList'"></ct-searchlist> -->
48
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/customermanage/ProjectCustomerList/getLayoutOfSearch'" :searchDataApi="'/customermanage/ProjectCustomerList/getList'"></ct-searchlist> -->
47
49
  <!-- CCES -->
48
50
 
49
51
  <!-- <ct-searchlist :apiParam="para"
@@ -127,6 +129,7 @@
127
129
 
128
130
  <!-- ibs -->
129
131
  <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/EmployeeWorkLogList/ind/getLayoutOfSearch'" :searchDataApi="'/EmployeeWorkLogList/ind/getListOfSearchModel'"></ct-searchlist> -->
132
+ <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/ApiAccessLogList/getLayoutOfSearch'" :searchDataApi="'/ApiAccessLogList/getListOfSearchModel'"></ct-searchlist> -->
130
133
  <ct-dialog-list></ct-dialog-list>
131
134
  </div>
132
135
  </template>
@@ -141,7 +144,7 @@
141
144
  // appRootUrl:'http://10.88.22.13:6060/onecard-api/',
142
145
  appRootUrl:'',
143
146
  para:{
144
-
147
+ "type":"left"
145
148
  },
146
149
  }
147
150
  },
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <div id="app-Tree" style="height:100%;position: fixed;width:100%">
2
+ <div id="app-Tree" style="height:100%;position: fixed;width:100%;background: #c8c8c8;padding: 10px;">
3
3
  <ct-treelist :flagsearch="true" :apiParam="apiParam" :leftWidth="'280'"
4
- :searchConditionApi="'/SystemParameterCatalogList/getLayoutOfSearch'"
5
- :searchDataApi="'/SystemParameterCatalogList/getListOfSearchModel'" @loaded="loaded"></ct-treelist>
4
+ :searchConditionApi="'/system/menulist/getTreeLayoutOfSearch'"
5
+ :searchDataApi="'/system/menulist/getTreeList'" @loaded="loaded"></ct-treelist>
6
6
  <ct-dialog-list></ct-dialog-list>
7
7
  </div>
8
8
  </template>
@@ -248,7 +248,7 @@ html {
248
248
  }
249
249
 
250
250
  .ct-form {
251
- margin:10px;
251
+ /* margin:10px; */
252
252
  }
253
253
 
254
254
  .ct-iti.ct-iti-mini, .ct-date.ct-date-mini, .ct-mt-mini, .ct-so.ct-so-mini, .ct-tags.ct-tags-mini, .ct-Dtd.ct-Dtd-mini .el-input-group__prepend,
@@ -321,8 +321,13 @@ export default {
321
321
  };
322
322
  },
323
323
  computed: {
324
- headers: function () {
325
- return this.$common.getDataDrivenOpts().handler.getRequestHeaders();
324
+ headers: {
325
+ get() {
326
+ return this.$common.getDataDrivenOpts().handler.getRequestHeaders(this.model.action);
327
+ },
328
+ set(newValue) {
329
+ return newValue;
330
+ }
326
331
  },
327
332
  previewZIndex: function () {
328
333
  return this.$common.getDataDrivenOpts().zindex + 100;
@@ -501,6 +506,7 @@ export default {
501
506
  },
502
507
  //上传之前的钩子
503
508
  beforeUploadProcess(file) {
509
+ this.headers = this.$common.getDataDrivenOpts().handler.getRequestHeaders(this.model.action);
504
510
  return true;
505
511
  },
506
512
 
@@ -1,12 +1,14 @@
1
1
  <template>
2
- <div v-loading="loading" :style="{width:pageWidth?pageWidth+'px':'100%',margin:'auto','min-height': minHeight}">
3
- <div v-if="model !== null && !loading" class="ct-form" :class="{'domDisabled':model.pageDisabled}" :key="formKey">
4
- <div v-if="model.tip" class="tip-absolute" :style="{width:(tipWidth-20)+'px'}">
2
+ <div ref="formRef" v-loading="loading" :style="{width:pageWidth?pageWidth+'px':'100%',margin:'auto','min-height': minHeight,padding:'10px'}">
3
+ <div ref="fieldsRef" v-if="model !== null && !loading" class="ct-form" :class="{'domDisabled':model.pageDisabled}" :key="formKey">
4
+ <div ref="topTipRef" v-if="model.tip" class="tip-absolute">
5
5
  <span v-html="model.tip"></span>
6
6
  </div>
7
7
 
8
8
  <!--可根据场景判断显示el-card还是el-main-->
9
- <component :is="model.showTitle?'el-main':'el-card'">
9
+ <component :is="model.showTitle?'el-main':'el-card'">
10
+ <div v-if="(!this.model.isHorizontalLayout || this.flagScroll) && model.tip" :style="{'height': (model.tip ? 24:0) + 'px'}"></div>
11
+
10
12
  <div slot="header" class="clearfix" v-if="typeof model.title !== 'undefined' && model.flagShowTitle">
11
13
  <span style="font-weight:bold">{{model.title}}</span>
12
14
  </div>
@@ -56,9 +58,12 @@
56
58
  </el-row>
57
59
 
58
60
  <!--tabs-->
59
- <el-tabs v-if="model.isHorizontalLayout" v-model="activeName" @tab-click="tabClickHandler">
60
- <el-tab-pane :label="item.label" :name="index.toString()" :lazy="item.lazyLoad"
61
- v-for="(item, index) in collapse" v-if="item.show !== false" :key="index">
61
+ <el-tabs ref="tabsRef" v-if="model.isHorizontalLayout" v-model="activeName" @tab-click="tabClickHandler">
62
+ <el-tab-pane :name="index.toString()" :lazy="item.lazyLoad"
63
+ v-for="(item, index) in collapse" v-if="item.show !== false" :key="index">
64
+ <template slot="label">
65
+ <span v-html="item.label"></span>
66
+ </template>
62
67
  <el-row>
63
68
  <template v-for="(col, index) in collapseFieldsRow[index + 1]">
64
69
  <template v-if="col.show !== false && col.lineFeed">
@@ -87,6 +92,41 @@
87
92
  </template>
88
93
  </el-row>
89
94
  </el-tab-pane>
95
+ <template v-if="model.flagFixedTabOnHorizontalLayout">
96
+ <!--尾部元素-->
97
+ <el-row ref="independentRef" v-if="independentItem.length > 0" style="margin-top: 20px;">
98
+ <template v-for="(col, index) in independentItem">
99
+ <template v-if="col.show !== false && col.lineFeed">
100
+ <div style="display: flex; flex: 0 0 100%;"></div>
101
+ <el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
102
+ <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
103
+ :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
104
+ @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
105
+ @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
106
+ @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
107
+ @popupLocation="popupLocationHandler"
108
+ @tableButtonClick="clickHandler"></component>
109
+ </el-col>
110
+ </template>
111
+ <template v-else>
112
+ <el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
113
+ <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
114
+ :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
115
+ @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
116
+ @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
117
+ @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
118
+ @popupLocation="popupLocationHandler"
119
+ @tableButtonClick="clickHandler"></component>
120
+ </el-col>
121
+ </template>
122
+ </template>
123
+ </el-row>
124
+ <el-row ref="linksRef" v-if="model.links.findIndex((v)=>{return v.show}) > -1" style="margin-top: 8px;">
125
+ <el-col :span="24" style="text-align:left">
126
+ <component v-for="(btn, index) in model.links" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"></component>
127
+ </el-col>
128
+ </el-row>
129
+ </template>
90
130
  </el-tabs>
91
131
 
92
132
  <!--分组-->
@@ -126,23 +166,13 @@
126
166
  </el-collapse-item>
127
167
  </el-collapse>
128
168
 
129
- <!--尾部元素-->
130
- <el-row v-if="independentItem.length > 0" style="margin-top: 20px;">
131
- <template v-for="(col, index) in independentItem">
132
- <template v-if="col.show !== false && col.lineFeed">
133
- <div style="display: flex; flex: 0 0 100%;"></div>
134
- <el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
135
- <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
136
- :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
137
- @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
138
- @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
139
- @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
140
- @popupLocation="popupLocationHandler"
141
- @tableButtonClick="clickHandler"></component>
142
- </el-col>
143
- </template>
144
- <template v-else>
145
- <el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
169
+ <template v-if="!model.flagFixedTabOnHorizontalLayout">
170
+ <!--尾部元素-->
171
+ <el-row ref="independentRef" v-if="independentItem.length > 0" style="margin-top: 20px;">
172
+ <template v-for="(col, index) in independentItem">
173
+ <template v-if="col.show !== false && col.lineFeed">
174
+ <div style="display: flex; flex: 0 0 100%;"></div>
175
+ <el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
146
176
  <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
147
177
  :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
148
178
  @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
@@ -150,24 +180,42 @@
150
180
  @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
151
181
  @popupLocation="popupLocationHandler"
152
182
  @tableButtonClick="clickHandler"></component>
153
- </el-col>
183
+ </el-col>
184
+ </template>
185
+ <template v-else>
186
+ <el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
187
+ <component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
188
+ :fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
189
+ @click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
190
+ @input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
191
+ @popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
192
+ @popupLocation="popupLocationHandler"
193
+ @tableButtonClick="clickHandler"></component>
194
+ </el-col>
195
+ </template>
154
196
  </template>
155
- </template>
156
- </el-row>
157
- <el-row v-if="model.links.findIndex((v)=>{return v.show}) > -1" style="margin-top: 8px;">
158
- <el-col :span="24" style="text-align:left">
159
- <component v-for="(btn, index) in model.links" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"></component>
160
- </el-col>
161
- </el-row>
162
- <el-row v-if="model.buttons.findIndex((v)=>{return v.show}) > -1" :class="isScroll?'ccai button-absolute':'button-initial'"
163
- :style="{'max-width':pageWidth?(pageWidth-20)+'px':'100%'}">
164
- <el-col :span="24" style="display: flex;align-items: center;justify-content: center;height: 40px ;padding-bottom: 1px;padding-left: 5px;padding-right: 5px;" class="btnPadBom">
165
- <component v-for="(btn, index) in model.buttons" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"
166
- :style="{'float':btn.isCheckbox ? btn.alignCss:''}"></component>
167
- </el-col>
168
- </el-row>
169
- <div v-if="isScroll" style="height: 34px;"></div>
197
+ </el-row>
198
+ <el-row ref="linksRef" v-if="model.links.findIndex((v)=>{return v.show}) > -1" style="margin-top: 8px;">
199
+ <el-col :span="24" style="text-align:left">
200
+ <component v-for="(btn, index) in model.links" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"></component>
201
+ </el-col>
202
+ </el-row>
203
+ </template>
170
204
  </component>
205
+
206
+ <div v-if="model.bottomTip || (model.buttons.length>0 && model.buttons.findIndex((v)=>{return v.show}) > -1)"
207
+ :style="{'height': (model.bottomTip ? 34:0) + (model.buttons.length>0 && model.buttons.findIndex((v)=>{return v.show}) > -1?34:0) + 'px'}"></div>
208
+ </div>
209
+ <div ref="bottomTipRef" v-if="model && !loading && model.bottomTip"
210
+ :class="(model.buttons.length>0 && model.buttons.findIndex((v)=>{return v.show}) > -1?'tip-bottom-absolute40':'tip-bottom-absolute')">
211
+ <span v-html="model.bottomTip"></span>
212
+ </div>
213
+ <div ref="buttonsRef" v-if="model && !loading && model.buttons.length>0 && model.buttons.findIndex((v)=>{return v.show}) > -1"
214
+ :class="isScroll?'ccai button-absolute':'button-absolute'" :style="{'max-width':pageWidth?(pageWidth-20)+'px':'100%'}">
215
+ <el-col :span="24" style="display: flex;align-items: center;justify-content: center;height: 40px ;padding-bottom: 1px;padding-left: 5px;padding-right: 5px;" class="btnPadBom">
216
+ <component v-for="(btn, index) in model.buttons" :key="index" :is="btn.is" :vmodel="btn" @click="clickHandler" v-if="btn.show"
217
+ :style="{'float':btn.isCheckbox ? btn.alignCss:''}"></component>
218
+ </el-col>
171
219
  </div>
172
220
  <div style="min-height:200px" v-if="loading"></div>
173
221
  <iframe :src="downloadUrl" style="height:0px;width:0px;border-width: 0px;display: none;"> </iframe>
@@ -332,6 +380,7 @@
332
380
  this.model.scripts.formData.fieldsDic = this.model.fieldsDic;
333
381
  }
334
382
  this.loadFields();
383
+ this.loadTabs();
335
384
 
336
385
  if (this.model.onload) {
337
386
  let onloads = this.model.onload.split(';');
@@ -417,6 +466,36 @@
417
466
  }
418
467
  });
419
468
  },
469
+ loadTabs(){
470
+ this.$nextTick(function () {
471
+ if(this.model.flagFixedTabOnHorizontalLayout && this.model.isHorizontalLayout && this.collapse.length > 0){
472
+ let h1 = this.$refs.formRef.parentElement.offsetHeight - 10 | 0;
473
+ let h2 = this.$refs.tabsRef.$el.children[1].offsetTop + 15 | 0;
474
+ let h3 = this.$refs.independentRef ? this.$refs.independentRef.$el.offsetHeight + 20 : 0;
475
+ let h4 = this.$refs.linksRef ? this.$refs.linksRef.$el.offsetHeight : 0;
476
+ let h5 = this.$refs.buttonsRef ? this.$refs.buttonsRef.children[0].offsetHeight : 0;
477
+ let h6 = this.$refs.bottomTipRef ? this.$refs.bottomTipRef.offsetHeight : 0;
478
+ let h7 = this.$refs.topTipRef ? this.$refs.topTipRef.offsetHeight : 0;
479
+ if(h5===0 && h6===0){
480
+ h1=h1-5;
481
+ }
482
+ let tabHeight = h1 - h2 - h5 - h6 - h7;
483
+ this.$refs.tabsRef.$el.children[1].style.height = tabHeight + 'px';
484
+ this.$refs.tabsRef.$el.children[1].style.overflow = 'auto';
485
+ }
486
+ else{
487
+ if(this.$refs.formRef && (!this.model.isHorizontalLayout || this.flagScroll)){
488
+ let h1 = this.$refs.formRef.parentElement.offsetHeight;
489
+ // let h5 = this.$refs.buttonsRef ? this.$refs.buttonsRef.children[0].offsetHeight : 0;
490
+ // let h6 = this.$refs.bottomTipRef ? this.$refs.bottomTipRef.offsetHeight : 0;
491
+ // let h7 = this.$refs.topTipRef ? this.$refs.topTipRef.offsetHeight : 0;
492
+ // let fieldsHeight = h1 - h5 - h6 - h7;
493
+ // this.$refs.fieldsRef.style.height = fieldsHeight + 'px';
494
+ this.minHeight = h1 + 'px';
495
+ }
496
+ }
497
+ })
498
+ },
420
499
  fieldClickHandler(field) {
421
500
  let submitData = null;
422
501
  var router = this.model.buttons.find((v) => {
@@ -1580,10 +1659,10 @@
1580
1659
 
1581
1660
  .el-collapse-saveLine .ct-collapse-item-title:last-child .el-collapse-item__wrap {
1582
1661
  border-bottom: none;
1583
- }
1584
-
1662
+ }
1663
+
1585
1664
  .button-initial {
1586
- margin-top: 8px;
1665
+ line-height: 34px;
1587
1666
  }
1588
1667
 
1589
1668
  .button-absolute {
@@ -1602,9 +1681,48 @@
1602
1681
  }
1603
1682
 
1604
1683
  .tip-absolute {
1684
+ width:'100%';
1605
1685
  z-index: 100;
1606
- top: 10;
1607
- left: 10;
1686
+ top: 0;
1687
+ left: 0;
1688
+ right: 0;
1689
+ position: absolute;
1690
+ line-height: 24px;
1691
+ background-color:#ffe7cc;
1692
+ color:#EC3D3D;
1693
+ border-radius: 5px;
1694
+ padding: 8px;
1695
+ font-size: 12px;
1696
+ }
1697
+
1698
+ .tip-bottom {
1699
+ line-height: 24px;
1700
+ background-color:#ffe7cc;
1701
+ color:#EC3D3D;
1702
+ border-radius: 5px;
1703
+ padding: 8px;
1704
+ font-size: 12px;
1705
+ }
1706
+ .tip-bottom-absolute {
1707
+ width:'100%';
1708
+ z-index: 100;
1709
+ bottom: 0;
1710
+ left: 0;
1711
+ right: 0;
1712
+ position: absolute;
1713
+ line-height: 24px;
1714
+ background-color:#ffe7cc;
1715
+ color:#EC3D3D;
1716
+ border-radius: 5px;
1717
+ padding: 8px;
1718
+ font-size: 12px;
1719
+ }
1720
+ .tip-bottom-absolute40 {
1721
+ width:'100%';
1722
+ z-index: 100;
1723
+ bottom: 40px;
1724
+ left: 0;
1725
+ right: 0;
1608
1726
  position: absolute;
1609
1727
  line-height: 24px;
1610
1728
  background-color:#ffe7cc;
@@ -0,0 +1,11 @@
1
+ import dynamicJsonViewer from './src/dynamicJsonViewer'
2
+
3
+ dynamicJsonViewer.install = function (Vue, options) {
4
+ Vue.component(dynamicJsonViewer.name, dynamicJsonViewer);
5
+ }
6
+
7
+ if (typeof window !== 'undefined' && window.Vue) {
8
+ window.Vue.use(dynamicJsonViewer);
9
+ }
10
+
11
+ export default dynamicJsonViewer;
@@ -0,0 +1,144 @@
1
+ <template>
2
+ <div class="field-top">
3
+ <div v-if="model !== null" class="ct-JsonViewer">
4
+ <div :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']" style="display: inline-block;">
5
+ <div v-if="model.showLabel && model.label" :class="[model.labelClass]" style="text-align: left;padding-bottom: 5px;color: #303133;">
6
+ <h5>{{model.label}}</h5>
7
+ </div>
8
+ <div class="josnViewerBox" tabindex="-1" v-if="isRefresh" :style="{ height: model.height || 'auto','max-height':(listHeight?listHeight-130+'px':'calc(100vh - 130px)') }">
9
+ <JsonViewer :value="model.jsonData" copyable show-array-index show-double-quotes theme="light" :expanded="true"
10
+ :expand-depth="2" @onKeyClick="keyClick">
11
+ <template slot="copy">
12
+ <div class="btn-iocn">
13
+ <i class="el-icon-refresh" title="复原到初始状态" @click.stop="resetJSON">
14
+ </i>
15
+ <i class="el-icon-copy-document" title="复制JSON内容">
16
+ </i>
17
+ </div>
18
+ </template>
19
+ </JsonViewer>
20
+ </div>
21
+ </div>
22
+ <transition name="el-fade-in">
23
+ <span v-show="!valid" class="errorMessage">
24
+ {{validMessage}}
25
+ </span>
26
+ </transition>
27
+ </div>
28
+ </div>
29
+ </template>
30
+ <script>
31
+ import dynamicElement from '../../mixins/dynamicElement';
32
+ import JsonViewer from 'vue-json-viewer'
33
+ import 'vue-json-viewer/style.css'
34
+ export default {
35
+ name: 'ct-JsonViewer',
36
+ mixins: [dynamicElement],
37
+ components: {
38
+ 'JsonViewer': JsonViewer
39
+ },
40
+ props: {
41
+ vmodel: Object,
42
+ api: String,
43
+ listHeight: {
44
+ type: Number,
45
+ default: null
46
+ },
47
+ },
48
+ data() {
49
+ return {
50
+ isRefresh:true,
51
+ };
52
+ },
53
+ mounted() {
54
+ var self = this;
55
+ this.$nextTick(function () {
56
+ if (self.vmodel) {
57
+ self.load(self.vmodel);
58
+ }
59
+ else if (typeof self.source !== 'undefined') {
60
+ self.loaderObj.JsonViewer(self.source, (data) => {
61
+ self.load(data);
62
+ });
63
+ }
64
+ });
65
+ },
66
+ destroyed (){
67
+ this.model=null;
68
+ this.$el=null;
69
+ },
70
+ methods: {
71
+ load(data) {
72
+ this.model = data;
73
+ },
74
+ resetJSON() {
75
+ this.isRefresh = false;
76
+ this.$nextTick(function () {
77
+ this.isRefresh = true;
78
+ });
79
+ },
80
+ keyClick(keyName) {
81
+ console.log(keyName, "it was click")
82
+ }
83
+ }
84
+ }
85
+ </script>
86
+ <style>
87
+ .josnViewerBox {
88
+ overflow: auto;
89
+ width: 100%;
90
+ border: 1px solid #eee;
91
+ border-radius: 4px;
92
+ padding: 2px;
93
+ box-sizing: border-box;
94
+ background-color: #ffffff;
95
+ line-height: normal;
96
+
97
+ .jv-container .jv-code{
98
+ padding: 0px !important;
99
+ }
100
+ .jv-container.light {
101
+ background: #fff;
102
+ white-space: nowrap;
103
+ color: #525252;
104
+ font-size: 14px;
105
+ font-family: Consolas, Menlo, Courier, monospace;
106
+ }
107
+ .jv-container.light .jv-button, .jv-container.jv-dark .jv-button {
108
+ color: #49b3ff;
109
+ }
110
+ .jv-container.light .jv-key {
111
+ color: #111;
112
+ margin-right: 4px;
113
+ }
114
+ .jv-container.light .jv-item.jv-string {
115
+ color: #42b983;
116
+ word-break: break-word;
117
+ white-space: normal;
118
+ }
119
+ .jv-container.light .jv-item.jv-number {
120
+ color: #fc1e70;
121
+ }
122
+ .jv-container.light .jv-item.jv-boolean {
123
+ color: #fc1e70;
124
+ }
125
+ .jv-tooltip {
126
+ position: sticky !important;
127
+ top: 0 !important;
128
+ right: 0 !important;
129
+ /* 新增:靠右定位 */
130
+ z-index: 10;
131
+ margin-left: auto;
132
+ /* 辅助:确保靠右 */
133
+ float: right;
134
+ }
135
+ .btn-iocn {
136
+ display: flex;
137
+ gap: 10px;
138
+ }
139
+
140
+ }
141
+ .josnViewerBox:focus {
142
+ border: 1px solid #3D5ECC;
143
+ }
144
+ </style>