centaline-data-driven 1.5.80 → 1.5.82

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.
@@ -43,6 +43,7 @@ const paths = {
43
43
  "dynamicPlaceHolder": "./src/centaline/dynamicPlaceHolder/index.js", //占位控件
44
44
  "dynamicDetail": "./src/centaline/dynamicDetail/index.js", //详情页控件
45
45
  "dynamicTree": "./src/centaline/dynamicTree/index.js", //树组件
46
+ "dynamicTreeList": "./src/centaline/dynamicTreeList/index.js", //树组件组合带列表或表单
46
47
  "dynamicSensitiveEye": "./src/centaline/dynamicSensitiveEye/index.js", ////敏感数据小眼睛控
47
48
  "dynamicCb": "./src/centaline/dynamicCb/index.js", ////复选框
48
49
  "progress": "./src/centaline/progress/index.js", //进度条
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.5.80",
3
+ "version": "1.5.82",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
package/release-log.md CHANGED
@@ -1,3 +1,20 @@
1
+ # v1.5.82
2
+ 2023-11-28
3
+ 优化
4
+ 树组件高度计算优化,边框线去掉
5
+
6
+
7
+ # v1.5.81
8
+ 2023-11-28
9
+ 优化
10
+ 树组件与表格拆分成独立组件
11
+
12
+ 查询重置报错处理
13
+
14
+ 新增
15
+
16
+ 表格增加拖拽功能
17
+
1
18
  # v1.5.80
2
19
  2023-11-23
3
20
  bug修复
@@ -25,7 +25,9 @@
25
25
 
26
26
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/finance/invoice-apply/layout'" :searchDataApi="'/api/finance/invoice-apply/list'"></ct-searchlist> -->
27
27
 
28
- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/approveManage/contractBatchOperation/getLayoutOfSearch'" :searchDataApi="'/api/approveManage/contractBatchOperation/getTableList'"></ct-searchlist>
28
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/approveManage/contractBatchOperation/getLayoutOfSearch'" :searchDataApi="'/api/approveManage/contractBatchOperation/getTableList'"></ct-searchlist> -->
29
+
30
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/api/distribution/standing-book/layout'" :searchDataApi="'/api/distribution/standing-book/list'"></ct-searchlist> -->
29
31
 
30
32
 
31
33
  <!-- <ct-searchlist :apiParam="para"
@@ -105,6 +107,8 @@
105
107
 
106
108
  <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/HolidayTypeList/getLayoutOfSearch'" :searchDataApi="'/HolidayTypeList/getListOfSearchModel'"></ct-searchlist> -->
107
109
 
110
+ <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/SystemLogList/getLayoutOfSearch'" :searchDataApi="'/SystemLogList/getListOfSearchModel'"></ct-searchlist>
111
+
108
112
 
109
113
  <ct-dialog-list></ct-dialog-list>
110
114
  </div>
@@ -127,7 +127,7 @@ Axios.defaults.maxContentLength = 400000;
127
127
 
128
128
  const api = {
129
129
  get(url, params, callback) {
130
- if(params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
130
+ if(params.action&&params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
131
131
  url=params.action;
132
132
  params = params.para;
133
133
  }
@@ -146,7 +146,7 @@ const api = {
146
146
  );
147
147
  },
148
148
  post(url, params, callback) {
149
- if(params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
149
+ if(params.action&&params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
150
150
  url=params.action;
151
151
  params = params.para;
152
152
  }
@@ -251,7 +251,7 @@ const api = {
251
251
  return Promise.resolve(response.data,response.headers);
252
252
  },
253
253
  postHandler(url, params, scripts) {
254
- if(params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
254
+ if(params.action&&params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
255
255
  url=params.action;
256
256
  params = params.para;
257
257
  }
@@ -284,7 +284,7 @@ const api = {
284
284
  });
285
285
  },
286
286
  postBlobHandler(url, params, scripts) {
287
- if(params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
287
+ if(params.action&&params.action.indexOf('http://')>-1||params.action.indexOf('https://')>-1){
288
288
  url=params.action;
289
289
  params = params.para;
290
290
  }
@@ -136,7 +136,7 @@
136
136
  <div class="ScanUploadPhoto" v-if="qrcodeVisible" @click.stop="qrcodeVisible=true" :style="{ top: QRCodeRefTop + 'px', left: QRCodeRefLeft + 'px' }">
137
137
  <div style="border-bottom:none">
138
138
  <div style="text-align: center;margin-bottom:10px;margin-top:5px;color:#666666;font-size: 14px;">扫码上传</div>
139
- <i class="jiao"></i>
139
+ <i class="jiao" :style="{ top: QRCodeRefJiaoTop + 'px'}"></i>
140
140
  <div style="width:200px; height:200px;">
141
141
  <img v-if="qrCodeImg" :src="qrCodeImg" width="200" height="200" :style="isQrCode?'opacity: 0.1':''" />
142
142
  <div class="div-fail" v-if="isQrCode">
@@ -736,7 +736,7 @@
736
736
  var QRCodeRefWith = QRCodeRef.width;
737
737
  var QRCodeRefBottom=QRCodeRef.getBoundingClientRect().bottom;
738
738
  var h=window.innerHeight;
739
- if(h-QRCodeRefBottom<270){
739
+ if(h-QRCodeRefBottom<270&&h-QRCodeRefBottom>0){
740
740
  self.QRCodeRefTop =h-280;
741
741
  self.QRCodeRefJiaoTop=270-(h-QRCodeRefBottom)>220?220:270-(h-QRCodeRefBottom);
742
742
  }
@@ -16,7 +16,9 @@
16
16
  @loaded="tableLoaded" :documentWidth="documentWidth" :flagPopupSearchlist="flagPopupSearchlist" :screenTop="screenTop" :flagAppMode="flagAppMode"
17
17
  @toolbarClick="toolbarClickHandler" @refreshParent="refreshParentHandler" :key="reloadKeyTable" @searchComplate="searchComplate" @closeSideBar="closeSideBar"
18
18
  @rowClickHandle="rowClickHandle" @scrollHandle="scrollHandle" @refreshRowHandle="refreshRowHandle" @doClosePopoverHandle="doClosePopoverHandle"
19
- @showTitle="showTitleHandler" @popupClickHandler="popupClickHandler" @simpleRouterRefreshHandler="simpleRouterRefreshHandler"></ct-searchtable>
19
+ @showTitle="showTitleHandler" @popupClickHandler="popupClickHandler" @simpleRouterRefreshHandler="simpleRouterRefreshHandler"
20
+ @drop="drop" :dragStartItem="dragStartItem" :dragStartName="dragStartName"
21
+ ></ct-searchtable>
20
22
  </div>
21
23
  <div ref="sidebar" v-if="flagSideBar && flagSideBarOfData"
22
24
  :style="{'height': pageHeight? pageHeight:'100%','width':sideBarWidth+'px',right:sideBarRight+'px'}"
@@ -76,7 +78,13 @@
76
78
  flagPopupSearchlist:{
77
79
  Boolean,
78
80
  default:false,
79
- },
81
+ }, dragStartItem:{
82
+ String,
83
+ default: '',
84
+ }, dragStartName:{
85
+ String,
86
+ default: '',
87
+ },
80
88
  },
81
89
  data() {
82
90
  return {
@@ -114,6 +122,7 @@
114
122
  drowerClose:'',
115
123
  listHeight:0,
116
124
  pageHeightReal: '',
125
+
117
126
  }
118
127
  },
119
128
  created() {
@@ -463,6 +472,9 @@
463
472
  this.$refs.table.updateCurrentRow({flagFreshCurrentRow:true},{responseData:responseData});
464
473
  }
465
474
  },
475
+ drop(row, column) {
476
+ this.$emit('drop',row,column);
477
+ }
466
478
  },
467
479
  beforeDestroy() {
468
480
  async function destroyDeep(vnode) {
@@ -483,6 +495,15 @@
483
495
  }
484
496
  destroyDeep(this._vnode)
485
497
  },
498
+ watch: {
499
+ pageHeight: function (val) {
500
+ if(this.pageHeight) {
501
+ this.pageHeightReal=this.pageHeight;
502
+ this.$refs.table.setTableHeight();
503
+ }
504
+ },
505
+
506
+ },
486
507
  }
487
508
  </script>
488
509
  <style lang="scss" scoped>
@@ -100,7 +100,11 @@
100
100
  column.fixed === 'left' ? 'left-fixation' : null,
101
101
  column.width === undefined ? 'ct-table-auto' : null,
102
102
  column.fixed === 'right' ? 'right-fixation' : null,
103
- ]" v-bind="column.attrs">
103
+ ]" v-bind="column.attrs"
104
+ @drop="drop($event,row, column, 'body')"
105
+ @dragover.prevent
106
+ @dragenter="dragenter($event, column,'body')"
107
+ @dragleave="dragleave($event, column,'body')">
104
108
  <!--操作列-->
105
109
  <div v-if="column.id === 'operation'" class="div_allinline" :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'" style="float: left;">
106
110
  <template v-for="(router, rowRouterIndex) in getRowRouterShow(row)" >
@@ -167,6 +171,8 @@
167
171
  <div v-else-if="typeof column.template === 'undefined'"
168
172
  :class="column.autoRowHeight ? 'lineFeedCell' : 'cell'" :style="column.style ? column.style : ''">
169
173
  {{ $common.getDataOfUpperLower(row, column.id) }}
174
+
175
+
170
176
  </div>
171
177
 
172
178
  <!--模版列(启用)-->
@@ -255,7 +261,15 @@ export default {
255
261
  screenTop: {
256
262
  Number,
257
263
  default: 0,
258
- },
264
+ },
265
+ dragStartItem:{
266
+ String,
267
+ default: '',
268
+ },
269
+ dragStartName:{
270
+ String,
271
+ default: '',
272
+ },
259
273
  },
260
274
  computed: {},
261
275
  data() {
@@ -301,6 +315,8 @@ export default {
301
315
  theadTitleWidth:0,
302
316
  updateTableColumnsKey:0,
303
317
  backgroundColor: "#ecf5ff",
318
+ dragenterEl:null,
319
+
304
320
  };
305
321
  },
306
322
  deactivated(){
@@ -759,6 +775,7 @@ export default {
759
775
  if (this.$refs.searchTable && this.$refs.toolbar &&
760
776
  this.$refs.searchTable.parentElement && !self.isLayout) {
761
777
  var h1 = this.$refs.searchTable.parentElement.offsetHeight | 0;
778
+ var h1top = this.$refs.searchTable.parentElement.offsetTop| 0;
762
779
  var h2 = this.$refs.searchTable.offsetTop | 0;
763
780
  if(this.from && this.from=='detail'){
764
781
  h2=h2-this.screenTop - 13;
@@ -782,7 +799,7 @@ export default {
782
799
  && this.$parent.$parent.$parent.$children[0].$el.classList.contains('el-aside')) {
783
800
  h9 = 4
784
801
  }
785
- let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - h8 + h9 - 8 ;
802
+ let tableHeight = h1 - h2 - h3 - h4 - h5 - h6 - h7 - h8 + h9 - 8+h1top ;
786
803
 
787
804
  this.model.tableHeight = tableHeight < 40 ? 350 : tableHeight;
788
805
  this.$nextTick(() => {
@@ -2138,6 +2155,107 @@ export default {
2138
2155
  });
2139
2156
  }
2140
2157
  },
2158
+
2159
+ drop(e, row,column, name) {
2160
+ let self = this;
2161
+ let routerKey = "edit";
2162
+ let submitData = {};
2163
+ if (this.dragStartName == "top" &&name == "body" &&column.paramName == "drop") {
2164
+ var actionRouter = self.model.actionRouter;
2165
+ let field = actionRouter.find((b) => {
2166
+ return b.id === routerKey;
2167
+ });
2168
+
2169
+ field.submitListField.forEach((k) => {
2170
+ let keyLower = self.$common.initialsToLowerCase(k);
2171
+ let keyUpper = self.$common.initialsToUpperCase(k);
2172
+ submitData[k] = row[keyLower] || row[keyUpper];
2173
+ });
2174
+ submitData["columnFieldName"] = column.id;
2175
+ submitData["dropObject"] = self.dragStartItem;
2176
+
2177
+ this.$api
2178
+ .postHandler(this.$common.globalUri(), {
2179
+ action: field.action,
2180
+ para: submitData,
2181
+ })
2182
+ .then(function (response) {
2183
+ if (response.rtnCode === 200) {
2184
+ self.$nextTick(() => {
2185
+ let key = column.id;
2186
+ if (row[key]!=undefined) {
2187
+ row[key] = self.dragStartItem.name;
2188
+ } else if (row[self.$common.initialsToUpperCase(key)]!=undefined) {
2189
+ row[self.$common.initialsToUpperCase(key)] =
2190
+ self.dragStartItem.name;
2191
+ } else if (row[self.$common.initialsToLowerCase(key)]!=undefined) {
2192
+ row[self.$common.initialsToLowerCase(key)] =
2193
+ self.dragStartItem.name;
2194
+ }
2195
+ self.$forceUpdate();
2196
+ });
2197
+ }
2198
+ });
2199
+
2200
+ if (name === "body") {
2201
+ let el=e.target.nodeName.toLowerCase()=="td"?e.target:this.getTDOfParents(e.target);
2202
+ this.removeClass(el, "dragEnterHover");
2203
+ }
2204
+ }
2205
+
2206
+ this.$emit("drop", row, column);
2207
+
2208
+ },
2209
+ dragenter(e,column, name) {
2210
+ let el=e.target.nodeName.toLowerCase()=="td"?e.target:this.getTDOfParents(e.target);
2211
+ if (name === "body"&&column.paramName == "drop") {
2212
+ this.addClass(el, "dragEnterHover");
2213
+ }
2214
+ this.dragenterEl=el;
2215
+
2216
+ },
2217
+ dragleave(e, column,name) {
2218
+ let el=e.target.nodeName.toLowerCase()=="td"?e.target:this.getTDOfParents(e.target);
2219
+ // 目标节点的背景色恢复原样
2220
+ if (name === "body"&&this.dragenterEl!=el) {
2221
+ this.removeClass(el, "dragEnterHover");
2222
+ }
2223
+
2224
+ },
2225
+ getTDOfParents(element) {
2226
+ let currentElement = element.parentElement;
2227
+
2228
+ while (currentElement&&currentElement.nodeName.toLowerCase()!="td") {
2229
+
2230
+ currentElement = currentElement.parentElement;
2231
+ }
2232
+ return currentElement;
2233
+ },
2234
+ // 删除样式
2235
+ removeClass(el, className) {
2236
+ if (!this.hasClass(el, className)) return;
2237
+ let newClassName = (el.className || "").split(" ");
2238
+ let index = newClassName.findIndex((item) => {
2239
+ return item == className;
2240
+ });
2241
+ newClassName.splice(index, 1);
2242
+ el.className = newClassName.join(" ");
2243
+ },
2244
+ // 判断是否包括样式
2245
+ hasClass(el, className) {
2246
+ let reg = new RegExp("(^|\\s)" + className + "($|\\s)");
2247
+ console.log(reg.test(el.className));
2248
+ return reg.test(el.className);
2249
+ },
2250
+ // 添加样式
2251
+ addClass(el, className) {
2252
+ if (this.hasClass(el, className)) return;
2253
+ let newClassName = (el.className || "").split(" ");
2254
+ newClassName.push(className);
2255
+ el.className = newClassName.join(" ");
2256
+ },
2257
+
2258
+
2141
2259
  },
2142
2260
  };
2143
2261
  </script>
@@ -2440,5 +2558,10 @@ white-space: nowrap;
2440
2558
  -webkit-animation:none !important;
2441
2559
  animation:none !important;
2442
2560
  }
2561
+ .ct-searchtable .dragEnterHover {
2562
+ border: 1px dashed #e03333 !important;
2563
+ color: #e03333 !important;
2564
+ /* box-shadow: 0 15px 20px rgba(0, 0, 0, 0.3); */
2565
+ }
2443
2566
  </style>
2444
2567
 
@@ -1,11 +1,11 @@
1
- import dynamicTree from './src/dynamicTreeList'
1
+ import dynamicSearchTree from './src/dynamicSearchTree'
2
2
 
3
- dynamicTree.install = function (Vue) {
4
- Vue.component(dynamicTree.name, dynamicTree);
3
+ dynamicSearchTree.install = function (Vue) {
4
+ Vue.component(dynamicSearchTree.name, dynamicSearchTree);
5
5
  }
6
6
 
7
7
  if (typeof window !== 'undefined' && window.Vue) {
8
- window.Vue.use(dynamicTree);
8
+ window.Vue.use(dynamicSearchTree);
9
9
  }
10
10
 
11
- export default dynamicTree;
11
+ export default dynamicSearchTree;