centaline-data-driven 1.6.32 → 1.6.34

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.32",
3
+ "version": "1.6.34",
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.34
2
+ 2024-12-30
3
+
4
+ 优化
5
+
6
+ 树组件增加拖拽改变宽度
7
+
8
+ 附件上传组件增加粘贴上传功能
9
+
10
+ BUG
11
+
12
+ 下拉搜索框修复在拼音打汉字过快时会出现拼音的bug
13
+
14
+ # v1.6.33
15
+ 2024-11-22
16
+
17
+ 优化
18
+
19
+ 表单分组控件添加lazyLoad控制分组里面的内容是否使用 懒加载(默认 false)
20
+
1
21
  # v1.6.32
2
22
  2024-11-20
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="'/api/finance/collection-money/detail'" :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
- "actionType":2,"originalTraId":"1849003143319056385","pageStyle":2,"pageTitle":"新增代收款","pageOnly":true
15
+ "commissionMode":1,"contractId":"202406181443110093F2F8AADD6B96EA","propertyId":"20180321102126B4B8B65EFBD6613722","searchFields":{"fields":[{"fieldName1":"CompanyPath","groupName":"CompanyPath","operation":1,"searchDataType":1,"searchValue1":"001"},{"fieldName1":"EmpID","groupName":"EmpID","operation":1,"searchDataType":1,"searchValue1":"2016080115594575A1A2EFB5B823B8A4"},{"fieldName1":"DeptPath","groupName":"DeptPath","operation":1,"searchDataType":1,"searchValue1":"001.200"},{"fieldName1":"type","groupName":"type","operation":1,"searchDataType":1,"searchValue1":"left"},{"fieldName1":"EstateID","groupName":"EstateID","operation":2,"searchDataType":3,"searchValue1":"201005121336088B888053DAF3FAD603"},{"fieldName1":"ContractDateStar","fieldName2":"ContractDateEnd","groupName":"ContractDateStar","operation":5,"searchDataType":4,"searchValue1":"2023-11-01","searchValue2":""}]},"pageAttribute":{"pageIndex":1},"columnName":"contractDate","actionType":3
16
16
  },
17
17
  topHeight:10,
18
18
  }
@@ -40,6 +40,8 @@
40
40
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/agentuserlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/agentuserlist/getList'"></ct-searchlist> -->
41
41
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/EntranceNoticeInfoList/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/EntranceNoticeInfoList/getList'"></ct-searchlist> -->
42
42
  <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/commissionquery/properformanceszjjbreport/getLayoutOfSearch'" :searchDataApi="'/commissionquery/properformanceszjjbreport/getList'"></ct-searchlist> -->
43
+ <!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/employeelist/getLayoutOfSearch'" :searchDataApi="'/employeelist/getList'"></ct-searchlist> -->
44
+ <ct-searchlist :apiParam="para" :searchConditionApi="'/estatemanage/estatlist/getLayoutOfSearch'" :searchDataApi="'/estatemanage/estatlist/getList'"></ct-searchlist>
43
45
  <!-- CCES -->
44
46
 
45
47
  <!-- <ct-searchlist :apiParam="para"
@@ -106,6 +108,8 @@
106
108
  <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/TaskList/getLayoutOfSearch'" :searchStatsApi="'/TaskList/getListStats'" :searchDataApi="'/TaskList/getListOfSearchModel'"></ct-searchlist> -->
107
109
 
108
110
  <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/PropertyVRRealLookBalanceList/getLayoutOfSearchForOFI'" :searchDataApi="'/PropertyVRRealLookBalanceList/getListOfSearchModel'"></ct-searchlist> -->
111
+
112
+ <!-- <ct-searchlist :apiParam="para" :appRootUrl="appRootUrl" :searchConditionApi="'/PropertyRealLookList/getLayoutOfSearch'" :searchDataApi="'/PropertyRealLookList/getListOfSearchModel'"></ct-searchlist> -->
109
113
 
110
114
  <!-- <ct-searchlist :appRootUrl="appRootUrl" :searchConditionApi="'/SystemParameterList/getLayoutOfSearch'" :searchDataApi="'/SystemParameterList/getListOfSearchModel'"></ct-searchlist> -->
111
115
 
@@ -155,9 +159,18 @@
155
159
  // appRootUrl:'http://10.88.22.13:6060/onecard-api/',
156
160
  appRootUrl:'',
157
161
  para:{
158
- type
159
- :
160
- "top"
162
+
163
+ "deleteRight": 0,
164
+ "editRight": 0,
165
+ "browseRight": 0,
166
+ "auditRight": 0,
167
+ "addRight": 0,
168
+ "deptId": "E5A389CB-8665-4BFD-8C97-3A70CEA28604",
169
+ "cityName": "深圳",
170
+ "name": "深圳中原",
171
+ "path": "001",
172
+ "code": "001",
173
+ "new": false
161
174
  },
162
175
  }
163
176
  },
@@ -8,7 +8,7 @@
8
8
  :file-list="model.fileList" :multiple="true" :auto-upload="true" :action="model.action" :data="model.uploadData"
9
9
  :headers="headers" :before-upload="beforeUploadProcess" :on-success="handleAvatarSuccess"
10
10
  :on-error="handleAvatarError" :on-progress="uploadProcess" :limit="parseInt(model.max || 999)"
11
- :on-exceed="handleExceed">
11
+ :on-exceed="handleExceed" :uploadStatus="!disableUpload&&!model.lock?'upload':'lock'">
12
12
  <template slot="default">
13
13
  <i class="el-icon-plus"></i>
14
14
  </template>
@@ -18,8 +18,11 @@
18
18
  </div>
19
19
  <div slot="tip" v-show="model.description" v-html="model.description">
20
20
  </div>
21
- <img class="qrcode-target" @click.stop="qrcodeFn" ref="QRCodeRef" v-if="model.QRCodeAction"
22
- :src="require('../../../assets/serw1.png')" style="width: 35px;height: 35px;" alt="扫码上传" title="扫码上传">
21
+ <div class="qrcode-target" v-if="model.QRCodeAction">
22
+ <img @click.stop="qrcodeFn" ref="QRCodeRef"
23
+ :src="require('../../../assets/serw1.png')" style="width: 35px;height: 35px;float: right;" alt="扫码上传"
24
+ title="扫码上传">
25
+ </div>
23
26
  <div class="ScanUploadPhoto" v-if="qrcodeVisible" @click.stop="qrcodeVisible = true"
24
27
  :style="{ top: QRCodeRefTop + 'px', left: QRCodeRefLeft + 'px' }">
25
28
  <div style="border-bottom:none">
@@ -44,14 +47,14 @@
44
47
  <span v-if="model.lock" class="el-dropdown-link">
45
48
  <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{
46
49
  model.mediaLabe.mediaLabelName
47
- }}</span>
50
+ }}</span>
48
51
  </span>
49
52
  <!--复杂分类-->
50
53
  <span v-else-if="model.isComplexClassify" class="el-dropdown-link"
51
54
  @click.stop="classifyFormClickHandle(model.mediaLabe)">
52
55
  <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{
53
56
  model.mediaLabe.mediaLabelName
54
- }}</span>
57
+ }}</span>
55
58
  <i class="el-icon-arrow-down el-icon--right"></i>
56
59
  </span>
57
60
  <!--简单分类-->
@@ -62,7 +65,7 @@
62
65
  <span class="el-dropdown-link" @click.stop="classifyClickHandle">
63
66
  <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{
64
67
  model.mediaLabe.mediaLabelName
65
- }}</span>
68
+ }}</span>
66
69
  <i class="el-icon-arrow-down el-icon--right" style="color: #fff;"></i>
67
70
  </span>
68
71
  <el-dropdown-menu slot="dropdown" class="el-upload-list__item-preview">
@@ -72,15 +75,13 @@
72
75
  </el-dropdown-item>
73
76
  </el-dropdown-menu>
74
77
  </el-dropdown>
75
- </span>
76
-
77
-
78
+ </span>
78
79
  <div slot="file" slot-scope="{ file }" :title="file.fileName">
79
80
  <div class="cover-list-item">
80
81
  <div @click="viewerfile(file)">
81
- <div v-if="file.progressFlag" v-loading="file.progressFlag" style="width: 100px; height: 100px"
82
- element-loading-spinner="el-icon-loading">
83
- </div>
82
+ <div v-if="file.progressFlag" v-loading="file.progressFlag" style="width: 100px; height: 100px"
83
+ element-loading-spinner="el-icon-loading">
84
+ </div>
84
85
  <el-image v-else fit="fill"
85
86
  :src="file.url ? file.url : file.mediaUrl ? file.mediaUrl + '/100/100' : require('../../../assets/blank.png')"
86
87
  style="width: 100px; height: 100px" :z-index="previewZIndex">
@@ -154,7 +155,9 @@
154
155
  :accept="model.fileAccept" :on-change="handleChange" list-type="picture-card" :file-list="model.fileList"
155
156
  :multiple="true" :auto-upload="true" :action="model.action" :data="model.uploadData" :headers="headers"
156
157
  :before-upload="beforeUploadProcess" :on-success="handleAvatarSuccess" :on-error="handleAvatarError"
157
- :on-progress="uploadProcess" :limit="parseInt(model.max || 999)" :on-exceed="handleExceed">
158
+ :on-progress="uploadProcess" :limit="parseInt(model.max || 999)" :on-exceed="handleExceed"
159
+ :uploadStatus="!disableUpload&&!model.lock?'upload':'lock'"
160
+ >
158
161
  <i slot="default" class="el-icon-plus"></i>
159
162
  <div slot="tip" class="el-upload__tip errorMessage" style="white-space:pre-wrap;" v-show="!valid"
160
163
  v-html="validMessage">
@@ -162,8 +165,11 @@
162
165
  </div>
163
166
  <div slot="tip" v-show="model.description" v-html="model.description">
164
167
  </div>
165
- <img class="qrcode-target" @click.stop="qrcodeFn" ref="QRCodeRef" v-if="model.QRCodeAction"
166
- :src="require('../../../assets/serw1.png')" style="width: 35px;height: 35px;" alt="扫码上传" title="扫码上传">
168
+ <div class="qrcode-target">
169
+ <img @click.stop="qrcodeFn" ref="QRCodeRef" v-if="model.QRCodeAction"
170
+ :src="require('../../../assets/serw1.png')" style="width: 35px;height: 35px;float: right;" alt="扫码上传"
171
+ title="扫码上传">
172
+ </div>
167
173
  <div class="ScanUploadPhoto" v-if="qrcodeVisible" @click.stop="qrcodeVisible = true"
168
174
  :style="{ top: QRCodeRefTop + 'px', left: QRCodeRefLeft + 'px' }">
169
175
  <div style="border-bottom:none">
@@ -186,13 +192,13 @@
186
192
  <!--锁定-->
187
193
  <span v-if="model.lock" class="el-dropdown-link">
188
194
  <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{
189
- model.mediaLabe.mediaLabelName}}</span>
195
+ model.mediaLabe.mediaLabelName }}</span>
190
196
  </span>
191
197
  <!--复杂分类-->
192
198
  <span v-else-if="model.isComplexClassify" class="el-dropdown-link"
193
199
  @click.stop="classifyFormClickHandle(model.mediaLabe)">
194
200
  <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{
195
- model.mediaLabe.mediaLabelName}}</span>
201
+ model.mediaLabe.mediaLabelName }}</span>
196
202
  <i class="el-icon-arrow-down el-icon--right"></i>
197
203
  </span>
198
204
  <!--简单分类-->
@@ -202,7 +208,7 @@
202
208
 
203
209
  <span class="el-dropdown-link" @click.stop="classifyClickHandle">
204
210
  <span style="width: 80px; height: 26px; display: inline-flex;overflow: hidden;">&nbsp;{{
205
- model.mediaLabe.mediaLabelName}}</span>
211
+ model.mediaLabe.mediaLabelName }}</span>
206
212
  <i class="el-icon-arrow-down el-icon--right" style="color: #fff;"></i>
207
213
  </span>
208
214
  <el-dropdown-menu slot="dropdown" class="el-upload-list__item-preview">
@@ -217,13 +223,13 @@
217
223
  <div slot="file" slot-scope="{ file }" :title="file.fileName">
218
224
  <div class="cover-list-item">
219
225
  <div @click="viewerfile(file)">
220
- <div v-if="file.progressFlag" v-loading="file.progressFlag" style="width: 100px; height: 100px"
221
- element-loading-spinner="el-icon-loading">
222
- </div>
223
- <el-image v-else fit="fill"
224
- :src="file.url ? file.url : file.mediaUrl ? file.url : require('../../../assets/blank.png')"
225
- style="width: 100px; height: 100px" :z-index="previewZIndex">
226
- </el-image>
226
+ <div v-if="file.progressFlag" v-loading="file.progressFlag" style="width: 100px; height: 100px"
227
+ element-loading-spinner="el-icon-loading">
228
+ </div>
229
+ <el-image v-else fit="fill"
230
+ :src="file.url ? file.url : file.mediaUrl ? file.url : require('../../../assets/blank.png')"
231
+ style="width: 100px; height: 100px" :z-index="previewZIndex">
232
+ </el-image>
227
233
  </div>
228
234
  <span class="cover-list-item-span-Default"
229
235
  v-if="(model.lock && file.flagDefault) || (model.rightDefault && model.rightDefault == 1 && file.mediaTypeID == 2)">
@@ -324,8 +330,16 @@ export default {
324
330
  return this.$common.getDataDrivenOpts().zindex + 100;
325
331
  },
326
332
  },
333
+ deactivated() {
334
+ document.addEventListener('paste', this.ListenerPaste);
335
+
336
+ },
337
+ mounted() {
338
+ document.addEventListener('paste', this.ListenerPaste);
339
+
340
+ },
327
341
  created() {
328
- var self = this;
342
+ var self = this;
329
343
  this.$nextTick(function () {
330
344
  if (self.vmodel) {
331
345
  self.load(self.vmodel);
@@ -337,6 +351,8 @@ export default {
337
351
  });
338
352
  }
339
353
  this.disableUpload = this.model.lock;
354
+
355
+
340
356
  });
341
357
  },
342
358
  methods: {
@@ -477,7 +493,7 @@ export default {
477
493
  },
478
494
  handleDownload(file) {
479
495
  },
480
- handleChange(file, fileList) {
496
+ handleChange(file, fileList) {
481
497
  this.changeHandler(this.model.value);
482
498
  },
483
499
  //上传之前的钩子
@@ -706,7 +722,7 @@ export default {
706
722
 
707
723
  var refupload = this.$refs.refupload;
708
724
  if (refupload) {
709
- if (flagError) {
725
+ if (flagError) {
710
726
  this.$message({
711
727
  message: res,
712
728
  type: 'error',
@@ -844,11 +860,63 @@ export default {
844
860
  }
845
861
  self.QRCodeRefLeft = QRCodeRef.getBoundingClientRect().left + QRCodeRefWith + 20;
846
862
  }
863
+ },
864
+ PasteUpload(event) {
865
+ let self = this;
866
+ if (!self.model.locked && !self.disableUpload) {
867
+ // 获取粘贴板中的图片
868
+ const clipboardDatas = (event.clipboardData || event.originalEvent.clipboardData);
869
+ const items = clipboardDatas.items;
870
+ for (let index in items) {
871
+ const item = items[index];
872
+ if (item.kind === 'file') {
873
+ const file = item.getAsFile();
874
+ let uid = self.uploadguid();
875
+ file.uid = file.uid || uid;
876
+ self.$refs.upload.handleStart(file);
877
+ // 提交上传队列
878
+ self.$refs.upload.submit();
879
+ }
880
+ }
881
+ }
882
+
847
883
  },
884
+ ListenerPaste(event) {
885
+ let self = this;
886
+ if (!self.model.locked&&!self.disableUpload) {
887
+ var target = event.target;
888
+ const uploads = document.querySelectorAll('[uploadStatus="upload"]');
889
+
890
+ if (!window.uploads) {
891
+ window.uploads = { count: 0, length: uploads.length };
892
+ }
893
+ if (uploads.length > 1) {
894
+ window.uploads.count = window.uploads.count + 1;
895
+ window.uploads.length = uploads.length;
896
+
897
+ if (window.uploads.count == window.uploads.length) {
898
+ window.uploads = null;
899
+
900
+ self.$message({
901
+ message: "存在多个上传组件,请点击上传!",
902
+ type: 'info',
903
+ showClose: true,
904
+ });
905
+ return false;
906
+ }
907
+ }
908
+ else if (uploads.length == 1) {
909
+ window.uploads = null;
910
+ self.PasteUpload(event);
911
+ }
912
+ }
913
+ }
848
914
  },
849
915
  beforeDestroy() {
850
916
  clearTimeout(this.qrtimer);
851
917
  window.removeEventListener('scroll', this.QRCodeLocate, true)
918
+ //销毁粘贴事件监听器
919
+ document.removeEventListener('paste', this.ListenerPaste)
852
920
  },
853
921
 
854
922
  };
@@ -1012,10 +1080,12 @@ export default {
1012
1080
 
1013
1081
  .qrcode-target {
1014
1082
  position: absolute;
1015
- top: 3px;
1016
1083
  right: 3px;
1017
1084
  width: 35px;
1018
1085
  height: 35px;
1086
+ color: red;
1087
+ text-align: right;
1088
+ top: 0px;
1019
1089
  }
1020
1090
 
1021
1091
  .Public-classification {
@@ -42,7 +42,7 @@
42
42
 
43
43
  <!--tabs-->
44
44
  <el-tabs v-if="model.isHorizontalLayout" v-model="activeName" @tab-click="tabClickHandler">
45
- <el-tab-pane :label="item.label" :name="index.toString()"
45
+ <el-tab-pane :label="item.label" :name="index.toString()" :lazy="item.lazyLoad"
46
46
  v-for="(item, index) in collapse" v-if="item.show !== false" :key="index">
47
47
  <el-row>
48
48
  <template v-for="(col, index) in collapseFieldsRow[index + 1]">
@@ -12,7 +12,7 @@
12
12
  <div>
13
13
  <el-input ref="searchInput" :size="model.attrs.size" suffix-icon="el-icon-search" v-model="searchText" @input="searchInputHandle"></el-input>
14
14
  </div>
15
- <ctSelectOptionVertical :model="model" @click="selectOption($event)"></ctSelectOptionVertical>
15
+ <ctSelectOptionVertical :model="model" @click="selectOption($event)" @dataUpdated="dataUpdated()"></ctSelectOptionVertical>
16
16
  </div>
17
17
  <input slot="reference" v-bind="model.attrs" readonly="readonly" v-model="model.text" :placeholder="soPlaceholder"
18
18
  ref="ct-input" :style="{height:inputHeight + 'px','line-height':inputLineHeight + 'px'}"
@@ -140,17 +140,17 @@
140
140
  mounted() {
141
141
  var self = this;
142
142
  this.$nextTick(function () {
143
- var dropdown = self.$refs["pop"];
144
- this.unwatch1=self.$watch('model.options', function (newVal, oldVal) {
145
- self.$nextTick(() => {
146
- if (typeof dropdown.popperJS !== 'undefined' && dropdown.popperJS) {
147
- dropdown.popperJS.destroy();
148
- dropdown.popperJS = null;
149
- dropdown.updatePopper();
150
- }
151
- self.$refs["searchInput"].$el.querySelector("input").focus();
152
- });
153
- }, { deep: true, immediate: true });
143
+ // var dropdown = self.$refs["pop"];
144
+ // this.unwatch1=self.$watch('model.options', function (newVal, oldVal) {
145
+ // self.$nextTick(() => {
146
+ // if (typeof dropdown.popperJS !== 'undefined' && dropdown.popperJS) {
147
+ // // dropdown.popperJS.destroy();
148
+ // // dropdown.popperJS = null;
149
+ // // dropdown.updatePopper();
150
+ // }
151
+ // // self.$refs["searchInput"].$el.querySelector("input").focus();
152
+ // });
153
+ // }, { deep: true, immediate: true });
154
154
  });
155
155
  },
156
156
  methods: {
@@ -274,6 +274,14 @@
274
274
  self.getOptions(self.searchText);
275
275
  }
276
276
  }, self.model.searchTick);
277
+ },
278
+ dataUpdated: function () {
279
+ this.$nextTick(function () {
280
+ var dropdown = this.$refs["pop"];
281
+ if (typeof dropdown.popperJS !== 'undefined' && dropdown.popperJS) {
282
+ dropdown.updatePopper();
283
+ }
284
+ });
277
285
  }
278
286
  }
279
287
  }
@@ -22,7 +22,7 @@
22
22
  <div>
23
23
  <el-input ref="searchInput" :size="model.attrs.size" suffix-icon="el-icon-search" v-model="searchText" @input="searchInputHandle"></el-input>
24
24
  </div>
25
- <ctSelectOptionVertical :model="model" @click="selectOption($event)"></ctSelectOptionVertical>
25
+ <ctSelectOptionVertical :model="model" @click="selectOption($event)" @dataUpdated="dataUpdated()"></ctSelectOptionVertical>
26
26
  </div>
27
27
  <input slot="reference" v-bind="model.attrs" :placeholder="tagsPlaceholder"
28
28
  ref="ct-input" class="" :style="{height:inputHeight + 'px','line-height':inputLineHeight + 'px'}"
@@ -141,14 +141,14 @@
141
141
  mounted() {
142
142
  var self = this;
143
143
  this.$nextTick(function () {
144
- var dropdown = self.$refs["pop"];
144
+ // var dropdown = self.$refs["pop"];
145
145
  this.unwatch=self.$watch('model.options', function (newVal, oldVal) {
146
146
  self.$nextTick(() => {
147
- if (typeof dropdown.popperJS !== 'undefined' && dropdown.popperJS) {
148
- dropdown.popperJS.destroy();
149
- dropdown.popperJS = null;
150
- dropdown.updatePopper();
151
- }
147
+ // if (typeof dropdown.popperJS !== 'undefined' && dropdown.popperJS) {
148
+ // dropdown.popperJS.destroy();
149
+ // dropdown.popperJS = null;
150
+ // dropdown.updatePopper();
151
+ // }
152
152
  this.setToGlobalOptions();
153
153
  self.$refs["searchInput"].$el.querySelector("input").focus();
154
154
 
@@ -367,6 +367,14 @@
367
367
  self.globalOptions.push(v);
368
368
  }
369
369
  });
370
+ },
371
+ dataUpdated: function () {
372
+ this.$nextTick(function () {
373
+ var dropdown = this.$refs["pop"];
374
+ if (typeof dropdown.popperJS !== 'undefined' && dropdown.popperJS) {
375
+ dropdown.updatePopper();
376
+ }
377
+ });
370
378
  }
371
379
  },
372
380
  watch: {
@@ -1,16 +1,18 @@
1
1
  <template>
2
2
  <div id="app-Tree" style="height:100%;">
3
3
  <el-container style="height: calc(100vh - 98px);" ref="tree_left">
4
- <el-aside :width="leftWidth?leftWidth+'px':'15%'"
4
+ <el-aside :width="asideWidth ? asideWidth + 'px' : '15%'"
5
5
  style="background-color:white;border-radius: 6px;overflow-y:hidden">
6
- <ct-searchtree :flagsearch="true" :searchConditionApi="searchConditionApi" :searchDataApi="searchDataApi" :searchtreeHeight="searchtreeHeight"
7
- @loaded="loaded"></ct-searchtree>
6
+ <ct-searchtree :flagsearch="true" :searchConditionApi="searchConditionApi" :searchDataApi="searchDataApi"
7
+ :searchtreeHeight="searchtreeHeight" @loaded="loaded"></ct-searchtree>
8
+
8
9
  </el-aside>
9
- <el-main v-if="isShowMain">
10
-
11
- <template v-if="pageType=='form'">
10
+ <el-main v-if="isShowMain" style="position: relative;">
11
+ <div class="resizer" @mousedown="startResizing"></div>
12
+ <template v-if="pageType == 'form'">
12
13
  <div style="height: calc(100vh - 120px);">
13
- <div class="ct-form" :style="{'width':(width?width+'px':'auto'),'height':(height?height+'px':'auto')}">
14
+ <div class="ct-form"
15
+ :style="{ 'width': (width ? width + 'px' : 'auto'), 'height': (height ? height + 'px' : 'auto') }">
14
16
  <ct-form :api="formApi" :api-param="apiParam" :width="width" :height="height"></ct-form>
15
17
  </div>
16
18
  </div>
@@ -52,16 +54,28 @@ export default {
52
54
  isShowMain: false,
53
55
  pageType: 'list',
54
56
  apiParam: {},
55
- searchtreeHeight:0,
57
+ searchtreeHeight: 0,
58
+ dataRowRouter: "",
59
+ asideWidth: 200,
60
+ isResizing: false,
61
+ startX: 0,
62
+ startWidth: 0
56
63
  };
57
64
  },
58
65
  methods: {
59
66
  loaded(data) {
60
-
67
+ this.asideWidth = Number(this.leftWidth ? this.leftWidth : 200);
68
+
61
69
  var self = this;
62
70
  self.isShowMain = false;
63
71
  self.pageType = "list";
64
72
  if (data && data.rowRouter && (JSON.stringify(data.rowRouter) != "{}")) {
73
+
74
+ self.dataRowRouter = JSON.stringify(data.rowRouter);
75
+ let localStorageWidth = window.localStorage.getItem(self.dataRowRouter);
76
+ localStorageWidth = localStorageWidth ? localStorageWidth : self.asideWidth + "";
77
+ self.asideWidth = Number(localStorageWidth);
78
+
65
79
  self.formApi = data.rowRouter.getLayout;
66
80
  self.pageType = data.rowRouter.pageType != undefined ? data.rowRouter.pageType : "list";
67
81
  self.width = parseFloat(data.rowRouter.width != undefined ? data.rowRouter.width : "0");
@@ -83,35 +97,64 @@ export default {
83
97
  }
84
98
 
85
99
  });
86
- }
100
+ }
87
101
  this.$emit('loaded');
88
102
  },
89
- setsearchtreeHeight(){
90
- let self = this;
91
- if(self.$refs.tree_left&&self.$refs.tree_left.$el)
92
- {
103
+ setsearchtreeHeight() {
104
+ let self = this;
105
+ if (self.$refs.tree_left && self.$refs.tree_left.$el) {
93
106
  self.searchtreeHeight = self.$refs.tree_left.$el.offsetHeight;
94
107
  }
95
- }
108
+ },
109
+ startResizing(event) {
110
+ this.isResizing = true;
111
+ this.startX = event.clientX;
112
+ this.startWidth = this.asideWidth;
113
+ document.addEventListener('mousemove', this.resizeAside);
114
+ document.addEventListener('mouseup', this.stopResizing);
115
+ },
116
+
117
+ resizeAside(event) {
118
+ if ( this.isResizing) {
119
+ const newWidth = this.startWidth + (event.clientX - this.startX);
120
+ this.asideWidth = newWidth > 50 ? newWidth : 50; // 设置最小宽度为 50px
121
+ window.localStorage.setItem(this.dataRowRouter, this.asideWidth);
122
+ }
123
+ },
124
+
125
+ stopResizing() {
126
+ this.isResizing = false;
127
+ document.removeEventListener('mousemove', this.resizeAside);
128
+ document.removeEventListener('mouseup', this.stopResizing);
129
+ }
96
130
  },
97
- created() {
131
+ created() {
98
132
  this.model = this.vmodel;
99
133
  },
100
134
  mounted() {
101
135
  let self = this;
102
136
  window.addEventListener('resize', function () {
103
137
  self.$nextTick(() => {
104
- self.setsearchtreeHeight();
138
+ self.setsearchtreeHeight();
105
139
  })
106
140
  })
107
- self.setsearchtreeHeight();
141
+ self.setsearchtreeHeight();
142
+ document.addEventListener('mouseup', this.stopResizing);
143
+
108
144
  },
109
- activated(){
110
- let self = this;
111
- self.$nextTick(() => {
112
- self.setsearchtreeHeight();
113
- })
114
- }
145
+ activated() {
146
+ let self = this;
147
+ self.$nextTick(() => {
148
+ self.setsearchtreeHeight();
149
+ document.addEventListener('mouseup', self.stopResizing);
150
+ })
151
+ },
152
+ deactivated() {
153
+ document.removeEventListener('mouseup', this.stopResizing);
154
+ },
155
+ unmounted() {
156
+ document.removeEventListener('mouseup', this.stopResizing);
157
+ }
115
158
  }
116
159
 
117
160
  </script>
@@ -129,5 +172,13 @@ export default {
129
172
  -webkit-box-shadow: #cfcece 0px 7px 9px 0px !important;
130
173
  border-radius: 6px !important;
131
174
  margin-top: 14px;
175
+ }
176
+ .resizer {
177
+ position: absolute;
178
+ top: 0;
179
+ left: 0;
180
+ width: 2px;
181
+ height: 100%;
182
+ cursor: ew-resize;
132
183
  }
133
184
  </style>
@@ -418,6 +418,9 @@ const Base = function (source) {
418
418
  get lineFeed() {
419
419
  return source.lineFeed;
420
420
  },
421
+ get lazyLoad() {
422
+ return source.lazyLoad;
423
+ },
421
424
  };
422
425
 
423
426
  return rtn;
@@ -323,7 +323,8 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
323
323
  classify.file.source.mediaLabelID = classify.option[rtn.optionModel.optionAttrs.value];
324
324
  },
325
325
  handleAvatarSuccess(res, file, fileList) {
326
- if (res.rtnCode === Enum.ReturnCode.Successful) {
326
+ if (Object.prototype.toString.call(res ) === '[object Object]') {
327
+ if ( res.rtnCode === Enum.ReturnCode.Successful) {
327
328
  var media = res.content[0];
328
329
  media.mediaLabelID =file.mediaLabelID || rtn.mediaLabe.mediaLabelID;
329
330
  media.mediaLabelName = file.mediaLabelName || rtn.mediaLabe.mediaLabelName;
@@ -368,7 +369,8 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
368
369
  type: 'error',
369
370
  showClose:true,
370
371
  });
371
- }
372
+ }
373
+ }
372
374
  },
373
375
  addfileItem(file) {
374
376
  let awaitfile = {