doway-coms 2.4.8 → 2.5.0

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": "doway-coms",
3
- "version": "2.4.8",
3
+ "version": "2.5.0",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -1,46 +1,28 @@
1
1
  <template>
2
2
  <div style="height:300px">
3
3
  <splitpanes class="default-theme">
4
- <pane size="20">
5
- <vxe-table
6
- :size="'mini'"
7
- :height="'100%'"
8
- show-overflow
9
- highlight-current-row
10
- highlight-hover-row
11
- ref="eisTreeView"
12
- row-id="id"
13
- row-key
14
- @current-change="eisCurrentChange"
15
- border="inner"
16
- :show-header="false"
17
- :data="fileGroupData"
18
- :tree-config="{
19
- transform: true,
20
- line: true,
21
- rowField: 'id',
22
- parentField: 'parentId',
23
- expandRowKeys:['sys_top_folder']
24
- }"
25
- >
26
- <vxe-column title="菜单权限" tree-node>
27
- <template #default="{ row }">
28
- <span>
29
- <a-icon type="folder-open" v-if="$refs.eisTreeView.isTreeExpandByRow(row)" />
30
- <a-icon v-else type="folder" />
31
- <span>{{ row.name }}</span>
32
- </span>
33
- </template>
34
- </vxe-column>
35
- <vxe-column width="80px">
36
- <template #default="{ row }">
37
- <span>
38
- <span @click="handleAddSubFolder(row)" v-if="edit===true">添加</span>
39
- <span @click="handleEditSubFolder(row)" v-if="edit===true && row.id!=='sys_top_folder'">编辑</span>
40
- </span>
41
- </template>
42
- </vxe-column>
43
- </vxe-table>
4
+ <pane>
5
+ <vxe-table :size="'mini'" :height="'100%'" show-overflow highlight-current-row highlight-hover-row
6
+ ref="eisTreeView" row-id="id" row-key @current-change="eisCurrentChange" border="inner" :show-header="false"
7
+ :data="fileGroupData" :tree-config="{
8
+ transform: true,
9
+ line: true,
10
+ rowField: 'id',
11
+ parentField: 'parentId',
12
+ expandRowKeys: ['sys_top_folder']
13
+ }">
14
+ <vxe-column title="菜单权限" tree-node>
15
+ <template #default="{ row }">
16
+ <span>
17
+ <a-icon type="folder-open" v-if="$refs.eisTreeView.isTreeExpandByRow(row)" />
18
+ <a-icon v-else type="folder" />
19
+ <span>{{ row.name }}</span>
20
+ <span @click="handleAddSubFolder(row)" v-if="edit === true">添加</span>
21
+ <span @click="handleEditSubFolder(row)" v-if="edit === true && row.id !== 'sys_top_folder'">编辑</span>
22
+ </span>
23
+ </template>
24
+ </vxe-column>
25
+ </vxe-table>
44
26
  <!-- <a-tree :tree-data="fileGroupData" :selectedKeys="currentSelectKey" :replaceFields="{title:'name',key:'id'}" show-icon default-expand-all @select="handleFileGroupSelect">
45
27
  <a-icon slot="fileGroup" type="folder" />
46
28
  <template #title="{ name,id }">
@@ -54,88 +36,53 @@
54
36
  </pane>
55
37
  <pane>
56
38
  <div class="card-view-items">
57
- <div class="card-view-item" :style="{ width: itemWidth + 'px' }" v-for="loopFileData in currentFolderData" @dblclick="panelFolderDblClick(loopFileData)" :key="loopFileData.id">
58
- {{ loopFileData.name }}
59
- <div @click="removeAttach(loopFileData)" v-if="edit===true">删除</div>
60
- <div @click="downloadAttach(loopFileData)" v-if="loopFileData.attachType==='file' && allowDownload===true">下载</div>
61
- </div>
62
-
63
- <div class="card-view-item" :style="{ width: itemWidth + 'px' }" v-if="edit===true && currentSelectKey.length>0">
64
- <a-upload
65
- class="avatar-uploader"
66
- :headers="uploadHeaders"
67
- :action="uploadData.picAction"
68
- :multiple="true"
69
- :data="uploadData"
70
- @change="handleAvatarSuccess"
71
- :showUploadList="false"
72
- :before-upload="beforeAvatarUpload"
73
- >
74
- <div
75
- style="border: 1px solid #d9d9d9; border-radius: 6px"
76
- :style="{ width: width, height: height, lineHeight: height }"
77
- >
78
- <a-icon
79
- type="plus"
80
- class="avatar-uploader-icon"
81
- style="text-align: center"
82
- :style="{ width: width, height: height, lineHeight: height }"
83
- />
84
- </div>
85
- </a-upload>
39
+ <div class="card-view-item" :style="{ width: itemWidth + 'px' }" v-for="loopFileData in currentFolderData"
40
+ @dblclick="panelFolderDblClick(loopFileData)" :key="loopFileData.id">
41
+ {{ loopFileData.name }}
42
+ <div @click="removeAttach(loopFileData)" v-if="edit === true">删除</div>
43
+ <div @click="downloadAttach(loopFileData)"
44
+ v-if="loopFileData.attachType === 'file' && allowDownload === true">下载
86
45
  </div>
87
- <div
88
- class="card-view-item card-view-item-ghost"
89
- :style="{ width: itemWidth + 'px' }"
90
- ></div>
91
- <div
92
- class="card-view-item card-view-item-ghost"
93
- :style="{ width: itemWidth + 'px' }"
94
- ></div>
95
- <div
96
- class="card-view-item card-view-item-ghost"
97
- :style="{ width: itemWidth + 'px' }"
98
- ></div>
99
- <div
100
- class="card-view-item card-view-item-ghost"
101
- :style="{ width: itemWidth + 'px' }"
102
- ></div>
103
- <div
104
- class="card-view-item card-view-item-ghost"
105
- :style="{ width: itemWidth + 'px' }"
106
- ></div>
107
- <div
108
- class="card-view-item card-view-item-ghost"
109
- :style="{ width: itemWidth + 'px' }"
110
- ></div>
46
+ </div>
47
+
48
+ <div class="card-view-item" :style="{ width: itemWidth + 'px' }"
49
+ v-if="edit === true && currentSelectKey.length > 0">
50
+ <a-upload class="avatar-uploader" :headers="uploadHeaders" :action="uploadData.picAction" :multiple="true"
51
+ :data="uploadData" @change="handleAvatarSuccess" :showUploadList="false"
52
+ :before-upload="beforeAvatarUpload">
53
+ <div style="border: 1px solid #d9d9d9; border-radius: 6px"
54
+ :style="{ width: width, height: height, lineHeight: height }">
55
+ <a-icon type="plus" class="avatar-uploader-icon" style="text-align: center"
56
+ :style="{ width: width, height: height, lineHeight: height }" />
57
+ </div>
58
+ </a-upload>
59
+ </div>
60
+ <div class="card-view-item card-view-item-ghost" :style="{ width: itemWidth + 'px' }"></div>
61
+ <div class="card-view-item card-view-item-ghost" :style="{ width: itemWidth + 'px' }"></div>
62
+ <div class="card-view-item card-view-item-ghost" :style="{ width: itemWidth + 'px' }"></div>
63
+ <div class="card-view-item card-view-item-ghost" :style="{ width: itemWidth + 'px' }"></div>
64
+ <div class="card-view-item card-view-item-ghost" :style="{ width: itemWidth + 'px' }"></div>
65
+ <div class="card-view-item card-view-item-ghost" :style="{ width: itemWidth + 'px' }"></div>
111
66
  </div>
112
67
  </pane>
113
68
  </splitpanes>
114
- <VxeModal
115
- v-model="showEditFolder"
116
- transfer
117
- :height="200"
118
- :width="400"
119
- destroy-on-close
120
- :z-index="999"
121
- show-footer
122
- >
69
+ <VxeModal v-model="showEditFolder" transfer :height="200" :width="400" destroy-on-close :z-index="999" show-footer>
123
70
  <template #title>
124
71
  <span>文件夹修改</span>
125
72
  </template>
126
73
  <template #default>
127
- <a-input v-model="currentEditFolderValue"></a-input>
74
+ <a-input v-model="currentEditFolderValue"></a-input>
128
75
  </template>
129
76
  <template #footer>
130
- <vxe-button @click="showEditFolder=false">取消</vxe-button>
131
- <vxe-button status="primary" @click="confirmEditFolder">确定</vxe-button>
132
- </template>
77
+ <vxe-button @click="showEditFolder = false">取消</vxe-button>
78
+ <vxe-button status="primary" @click="confirmEditFolder">确定</vxe-button>
79
+ </template>
133
80
  </VxeModal>
134
81
  </div>
135
82
  </template>
136
83
 
137
84
  <script>
138
- import { notification, Upload,Tree,Icon,Popconfirm,Input } from "ant-design-vue";
85
+ import { notification, Upload, Tree, Icon, Popconfirm, Input } from "ant-design-vue";
139
86
  import { Checkbox, Modal } from "vxe-table";
140
87
  import { attachGetAttachUrlApi, attachSearchApi } from "../../utils/api";
141
88
  import XEUtils from 'xe-utils'
@@ -149,20 +96,20 @@ export default {
149
96
  "a-upload": Upload,
150
97
  VxeModal: Modal,
151
98
  Splitpanes, Pane,
152
- 'a-tree':Tree,
153
- 'a-icon':Icon,
154
- 'a-popconfirm':Popconfirm,
155
- 'a-input':Input
99
+ 'a-tree': Tree,
100
+ 'a-icon': Icon,
101
+ 'a-popconfirm': Popconfirm,
102
+ 'a-input': Input
156
103
  },
157
104
  data() {
158
105
  return {
159
- showEditFolder:false,
160
- currentEditInfo:{},
161
- currentEditFolderValue:'',
162
- currentSelectKey:[],
163
- fileGroupData:[],
106
+ showEditFolder: false,
107
+ currentEditInfo: {},
108
+ currentEditFolderValue: '',
109
+ currentSelectKey: [],
110
+ fileGroupData: [],
164
111
  internalRows: [],
165
- itemWidth:200,
112
+ itemWidth: 200,
166
113
  uploadData: {
167
114
  picType: "",
168
115
  picAction: "",
@@ -173,13 +120,13 @@ export default {
173
120
  },
174
121
  };
175
122
  },
176
- computed:{
177
- currentFolderData(){
178
- if(this.currentSelectKey.length===0){
179
- return []
180
- }
181
- return this.internalRows.filter(p=>p.parentId==this.currentSelectKey[0] && p.sysRowState!=='delete')
182
- }
123
+ computed: {
124
+ currentFolderData() {
125
+ if (this.currentSelectKey.length === 0) {
126
+ return []
127
+ }
128
+ return this.internalRows.filter(p => p.parentId == this.currentSelectKey[0] && p.sysRowState !== 'delete')
129
+ }
183
130
  },
184
131
  props: {
185
132
  isStyle: {
@@ -285,108 +232,108 @@ export default {
285
232
  this.buildTreeData(this.rows);
286
233
  },
287
234
  methods: {
288
- buildTreeData(tempRows){
289
- this.internalRows =JSON.parse(JSON.stringify(tempRows))
235
+ buildTreeData(tempRows) {
236
+ this.internalRows = JSON.parse(JSON.stringify(tempRows))
290
237
  let tempTopFolder = {
291
- sysRowState: 'view',
292
- parentId: null,
293
- sort:0,
294
- attachType:'folder',
295
- name:'文件',
296
- id:'sys_top_folder',
238
+ sysRowState: 'view',
239
+ parentId: null,
240
+ sort: 0,
241
+ attachType: 'folder',
242
+ name: '文件',
243
+ id: 'sys_top_folder',
297
244
  }
298
245
  this.internalRows.push(tempTopFolder)
299
- XEUtils.arrayEach(this.internalRows,p=>{
300
- if(p.parentId || p.id==='sys_top_folder'){
301
- return
302
- }
303
- p.parentId = 'sys_top_folder'
246
+ XEUtils.arrayEach(this.internalRows, p => {
247
+ if (p.parentId || p.id === 'sys_top_folder') {
248
+ return
249
+ }
250
+ p.parentId = 'sys_top_folder'
304
251
  })
305
252
 
306
253
  //
307
- this.fileGroupData = XEUtils.orderBy(XEUtils.filter(this.internalRows,p=>p.attachType==='folder'),p=>p.sort)
308
- console.debug('davistest',this.fileGroupData)
309
- if(this.currentSelectKey.length===0){
310
- this.$refs.eisTreeView.setCurrentRow(tempTopFolder)
311
- this.currentSelectKey = [tempTopFolder.id]
254
+ this.fileGroupData = XEUtils.orderBy(XEUtils.filter(this.internalRows, p => p.attachType === 'folder'), p => p.sort)
255
+ console.debug('davistest', this.fileGroupData)
256
+ if (this.currentSelectKey.length === 0) {
257
+ this.$refs.eisTreeView.setCurrentRow(tempTopFolder)
258
+ this.currentSelectKey = [tempTopFolder.id]
312
259
  }
313
260
  // this.fileGroupData = XEUtils.toArrayTree(tempFoldRows,{strict:true,sortKey:'sort'})
314
-
261
+
315
262
  // // this.internalRows.push(tempTopFolder)
316
263
  // this.fileGroupData = [tempTopFolder]
317
264
  // this.fileGroupData[0].children = XEUtils.toArrayTree(tempFoldRows,{strict:true,sortKey:'sort'})
318
265
  //构造顶级虚拟父节点
319
-
266
+
320
267
  // this.fileData = XEUtils.filter(tempRows,p=>p.attachType==='file')
321
268
  },
322
- handleAddSubFolder(rowInfo){
323
- //添加子项文件夹
324
- this.currentEditInfo =XEUtils.find(this.internalRows,p=>p.id===rowInfo.id)
325
- this.currentEditInfo['operation'] = 'add'
326
- this.showEditFolder = true
269
+ handleAddSubFolder(rowInfo) {
270
+ //添加子项文件夹
271
+ this.currentEditInfo = XEUtils.find(this.internalRows, p => p.id === rowInfo.id)
272
+ this.currentEditInfo['operation'] = 'add'
273
+ this.showEditFolder = true
327
274
  },
328
- handleEditSubFolder(rowInfo){
275
+ handleEditSubFolder(rowInfo) {
329
276
  this.currentEditFolderValue = rowInfo.name
330
- //添加子项文件夹
331
- this.currentEditInfo =XEUtils.find(this.internalRows,p=>p.id===rowInfo.id)
332
- this.currentEditInfo['operation'] = 'edit'
333
- this.showEditFolder = true
277
+ //添加子项文件夹
278
+ this.currentEditInfo = XEUtils.find(this.internalRows, p => p.id === rowInfo.id)
279
+ this.currentEditInfo['operation'] = 'edit'
280
+ this.showEditFolder = true
334
281
  },
335
282
  eisCurrentChange(scope) {
336
283
  this.currentSelectKey = [scope.row.id]
337
-
338
- },
339
- confirmEditFolder(){
340
-
341
- let tempRowInfo = this.$refs.eisTreeView.getRowById(this.currentEditInfo.id)
342
- if(this.currentEditInfo.operation==='add'){
343
- //新增文件夹
344
- let tempAddRowInfo = {
345
- sysRowState: 'add',
346
- parentId: this.currentEditInfo.id,
347
- sort: tempRowInfo.children.length+1,
348
- attachType:'folder',
349
- children:[],
350
- name:this.currentEditFolderValue,
351
- id:this.$store.getters.newId() + "",
352
- }
353
- this.internalRows.push(tempAddRowInfo)
354
- this.$refs.eisTreeView.insertAt(tempAddRowInfo,-1)
355
- }else{
356
- let tempInternalRowInfo = XEUtils.find(this.internalRows,p=>p.id===this.currentEditInfo.id)
357
- if(tempInternalRowInfo.sysRowState!=='add'){
358
- tempInternalRowInfo.sysRowState = 'update'
359
- }
360
- tempInternalRowInfo.name = this.currentEditFolderValue
361
- //修改树节点名称
362
- tempRowInfo.name = tempInternalRowInfo.name
284
+
285
+ },
286
+ confirmEditFolder() {
287
+
288
+ let tempRowInfo = this.$refs.eisTreeView.getRowById(this.currentEditInfo.id)
289
+ if (this.currentEditInfo.operation === 'add') {
290
+ //新增文件夹
291
+ let tempAddRowInfo = {
292
+ sysRowState: 'add',
293
+ parentId: this.currentEditInfo.id,
294
+ sort: tempRowInfo.children.length + 1,
295
+ attachType: 'folder',
296
+ children: [],
297
+ name: this.currentEditFolderValue,
298
+ id: this.$store.getters.newId() + "",
363
299
  }
364
- this.showEditFolder = false
365
- this.currentEditFolderValue =null
366
- },
367
- panelFolderDblClick(loopFileData){
368
- if(loopFileData.attachType==='file'){
369
- return
300
+ this.internalRows.push(tempAddRowInfo)
301
+ this.$refs.eisTreeView.insertAt(tempAddRowInfo, -1)
302
+ } else {
303
+ let tempInternalRowInfo = XEUtils.find(this.internalRows, p => p.id === this.currentEditInfo.id)
304
+ if (tempInternalRowInfo.sysRowState !== 'add') {
305
+ tempInternalRowInfo.sysRowState = 'update'
370
306
  }
307
+ tempInternalRowInfo.name = this.currentEditFolderValue
308
+ //修改树节点名称
309
+ tempRowInfo.name = tempInternalRowInfo.name
310
+ }
311
+ this.showEditFolder = false
312
+ this.currentEditFolderValue = null
313
+ },
314
+ panelFolderDblClick(loopFileData) {
315
+ if (loopFileData.attachType === 'file') {
316
+ return
317
+ }
371
318
 
372
- let tempParentRowInfo = this.$refs.eisTreeView.getRowById(loopFileData.parentId)
373
- let tempExpandRows = []
374
- if(tempParentRowInfo){
375
- tempExpandRows.push(tempParentRowInfo)
376
- }
377
- let tempRowInfo = this.$refs.eisTreeView.getRowById(loopFileData.id)
378
- this.$refs.eisTreeView.setCurrentRow(tempRowInfo)
319
+ let tempParentRowInfo = this.$refs.eisTreeView.getRowById(loopFileData.parentId)
320
+ let tempExpandRows = []
321
+ if (tempParentRowInfo) {
322
+ tempExpandRows.push(tempParentRowInfo)
323
+ }
324
+ let tempRowInfo = this.$refs.eisTreeView.getRowById(loopFileData.id)
325
+ this.$refs.eisTreeView.setCurrentRow(tempRowInfo)
379
326
 
380
- tempExpandRows.push(tempRowInfo)
381
- this.$refs.eisTreeView.setTreeExpand(tempExpandRows,true)
382
- this.currentSelectKey = [loopFileData.id]
327
+ tempExpandRows.push(tempRowInfo)
328
+ this.$refs.eisTreeView.setTreeExpand(tempExpandRows, true)
329
+ this.currentSelectKey = [loopFileData.id]
383
330
  },
384
- handleFileGroupSelect(selectedKeys){
385
- if(selectedKeys.length===0){
386
- return
331
+ handleFileGroupSelect(selectedKeys) {
332
+ if (selectedKeys.length === 0) {
333
+ return
387
334
  }
388
335
  this.currentSelectKey = selectedKeys
389
- },
336
+ },
390
337
  getCurrentToken() {
391
338
  return this.$store.getters.token;
392
339
  },
@@ -440,52 +387,52 @@ export default {
440
387
  }
441
388
  vm.internalRows = newRows;
442
389
  })
443
- .catch(() => {});
390
+ .catch(() => { });
444
391
  },
445
- attachFileClick(attachFile) {},
392
+ attachFileClick(attachFile) { },
446
393
  handleAvatarSuccess(info) {
447
394
  if (info.file.status == "done") {
448
- if(info.file.response.code!==200){
449
- alert(info.file.response.msg)
450
- return
395
+ if (info.file.response.code !== 200) {
396
+ alert(info.file.response.msg)
397
+ return
451
398
  }
452
399
  //添加文件数据
453
400
  let addRow = {
454
- attachId: info.file.response.content.id,
455
- sysRowState: 'add',
456
- parentId: this.currentSelectKey[0],
457
- fileType: info.file.response.content.fileType,
458
- sort:this.internalRows.length+1,
459
- attachType:'file',
460
- name:info.file.response.content.name,
461
- id:this.$store.getters.newId() + "",
401
+ attachId: info.file.response.content.id,
402
+ sysRowState: 'add',
403
+ parentId: this.currentSelectKey[0],
404
+ fileType: info.file.response.content.fileType,
405
+ sort: this.internalRows.length + 1,
406
+ attachFile: 'file',
407
+ name: info.file.response.content.name,
408
+ id: this.$store.getters.newId() + "",
409
+ }
410
+ this.internalRows.push(addRow);
411
+ let tempField;
412
+ for (let i = 0; i < this.cols.length; i++) {
413
+ // 赋值关联字段数据
414
+ let tempValue = addRow;
415
+ tempField = this.cols[i].field;
416
+ if (this.cols[i].isAuto) {
417
+ tempValue[tempField] = this.$store.getters.newId() + "";
418
+ continue;
462
419
  }
463
- this.internalRows.push(addRow);
464
- let tempField;
465
- for (let i = 0; i < this.cols.length; i++) {
466
- // 赋值关联字段数据
467
- let tempValue = addRow;
468
- tempField = this.cols[i].field;
469
- if (this.cols[i].isAuto) {
470
- tempValue[tempField] = this.$store.getters.newId() + "";
471
- continue;
472
- }
473
- if (
474
- this.cols[i].controlType === "text" &&
475
- this.cols[i].linkValueField !== null &&
476
- this.cols[i].linkValueField !== "" &&
477
- this.cols[i].linkValueField !== undefined
478
- ) {
479
- tempValue[tempField] = this.formRow[this.cols[i].linkValueField];
480
- }
481
- }
482
- //通知父组件
483
- this.$emit(
484
- "add",
485
- this.dataName,
486
- info.file.response.content
487
- );
488
- console.debug(this.internalRows)
420
+ if (
421
+ this.cols[i].controlType === "text" &&
422
+ this.cols[i].linkValueField !== null &&
423
+ this.cols[i].linkValueField !== "" &&
424
+ this.cols[i].linkValueField !== undefined
425
+ ) {
426
+ tempValue[tempField] = this.formRow[this.cols[i].linkValueField];
427
+ }
428
+ }
429
+ //通知父组件
430
+ this.$emit(
431
+ "add",
432
+ this.dataName,
433
+ info.file.response.content
434
+ );
435
+ console.debug(this.internalRows)
489
436
  }
490
437
  },
491
438
  beforeAvatarUpload(file) {
@@ -523,13 +470,13 @@ export default {
523
470
  },
524
471
  removeAttach(attachFile) {
525
472
  //检查是否存在子项文件夹或者文件需要删除
526
- let tempChild = XEUtils.find(this.internalRows,p=>p.parentId==attachFile.id && p.sysRowState!=='delete')
527
- if(tempChild){
473
+ let tempChild = XEUtils.find(this.internalRows, p => p.parentId == attachFile.id && p.sysRowState !== 'delete')
474
+ if (tempChild) {
528
475
  notification.error({
529
476
  message: "错误",
530
477
  description: "存在子项文件夹或者文件,请先删除子项文件夹或者文件!",
531
478
  });
532
- return
479
+ return
533
480
  }
534
481
  // console.debug(attachFile)
535
482
  for (let i = 0; i < this.internalRows.length; i++) {
@@ -547,23 +494,23 @@ export default {
547
494
  downloadAttach(attachFile) {
548
495
  window.open(
549
496
  this.internalServiceUrl +
550
- "/DownAttachFile/" +
551
- attachFile.attachId +
552
- `?accessToken=${this.$store.getters.token}`
497
+ "/DownAttachFile/" +
498
+ attachFile.attachId +
499
+ `?accessToken=${this.$store.getters.token}`
553
500
  );
554
501
  },
555
- getUpdateRows(){
502
+ getUpdateRows() {
556
503
  //先获取删除数据,因为前台删除一个明细后又添加相同的明细后台会
557
504
  //报唯一索引错误,因为后台也是先添加然后再是删除的会照成问题
558
505
  //所有就要把删除的放在数组的第一个传递过去,这样后台就先删除然后再新增了
559
- let tempRemoveRows =XEUtils.filter(this.internalRows,p=>p.sysRowState==='delete' && p.id!=='sys_top_folder')
560
- let tempAddRows =XEUtils.filter(this.internalRows,p=>p.sysRowState==='add' && p.id!=='sys_top_folder')
561
- let tempUpdateRows =XEUtils.filter(this.internalRows,p=>p.sysRowState==='update' && p.id!=='sys_top_folder')
562
- let tempRows = XEUtils.union(tempRemoveRows,tempAddRows,tempUpdateRows)
563
- XEUtils.arrayEach(tempRows,p=>{
564
- if(p.parentId==='sys_top_folder'){
565
- p.parentId = null
566
- }
506
+ let tempRemoveRows = XEUtils.filter(this.internalRows, p => p.sysRowState === 'delete' && p.id !== 'sys_top_folder')
507
+ let tempAddRows = XEUtils.filter(this.internalRows, p => p.sysRowState === 'add' && p.id !== 'sys_top_folder')
508
+ let tempUpdateRows = XEUtils.filter(this.internalRows, p => p.sysRowState === 'update' && p.id !== 'sys_top_folder')
509
+ let tempRows = XEUtils.union(tempRemoveRows, tempAddRows, tempUpdateRows)
510
+ XEUtils.arrayEach(tempRows, p => {
511
+ if (p.parentId === 'sys_top_folder') {
512
+ p.parentId = null
513
+ }
567
514
  })
568
515
  return tempRows
569
516
  },
@@ -660,23 +607,24 @@ export default {
660
607
  }
661
608
  }
662
609
 
663
- .attach:hover > .attach-delete {
610
+ .attach:hover>.attach-delete {
664
611
  opacity: 0.8;
665
612
  }
666
613
 
667
- .attach:hover > .attach-download {
614
+ .attach:hover>.attach-download {
668
615
  opacity: 0.7;
669
616
  }
670
617
 
671
- .attach:hover > .attach-view {
618
+ .attach:hover>.attach-view {
672
619
  opacity: 0.7;
673
620
  }
674
621
 
675
- .attach:hover > .attach-circle {
622
+ .attach:hover>.attach-circle {
676
623
  opacity: 0.9;
677
624
  }
678
625
  }
679
626
  }
627
+
680
628
  .tree-node-icon {
681
629
  width: 16px;
682
630
  text-align: center;
@@ -713,10 +661,12 @@ export default {
713
661
  .el-upload-list__item is-success {
714
662
  float: left;
715
663
  }
664
+
716
665
  .currentHeight {
717
666
  display: flex;
718
667
  align-items: center;
719
668
  }
669
+
720
670
  .card-view-items {
721
671
  // margin-top: 100px;
722
672
  // margin-left: 100px;
@@ -726,6 +676,7 @@ export default {
726
676
  justify-content: flex-start;
727
677
  padding: 8px 8px 8px 8px;
728
678
  overflow-y: auto;
679
+
729
680
  .card-view-item-ghost {
730
681
  visibility: hidden;
731
682
  height: 0px !important;
@@ -734,6 +685,7 @@ export default {
734
685
  margin-bottom: 0px;
735
686
  padding: 0px 0px 0px 0px;
736
687
  }
688
+
737
689
  .card-view-item {
738
690
  cursor: pointer;
739
691
  // height: 100px;
@@ -753,15 +705,18 @@ export default {
753
705
  //border-color: #9ad4dc;
754
706
  min-width: 150px;
755
707
  border-radius: 6px;
708
+
756
709
  .card-view-icon {
757
710
  float: left;
758
711
  width: 64px;
759
712
  height: 64px;
760
713
  }
714
+
761
715
  // .card-view-desc {
762
716
  // padding-left: 85px;
763
717
  // }
764
718
  }
719
+
765
720
  .card-view-item:hover {
766
721
  border: 1px solid #1269db;
767
722
  }
@@ -1920,6 +1920,7 @@ export default {
1920
1920
  // }
1921
1921
  }
1922
1922
  if (originCol.controlType === controlType.pulldown) {
1923
+ colParams['selectedSorts'] = originCol.selectedSorts
1923
1924
  colParams['api'] = originCol.api
1924
1925
  colParams['defaultExpression'] = originCol.defaultExpression
1925
1926
  colParams['pageSize'] = originCol.pageSize
@@ -2751,6 +2752,11 @@ export default {
2751
2752
  this.$emit('pulldownBtnClick', btn)
2752
2753
  },
2753
2754
  pulldownMultiSelect(scope, pulldownView, selectRows) {
2755
+ //第一行选中
2756
+ if(scope.column.params.selectedSorts){
2757
+ //存在选择后值排序
2758
+ selectRows = XEUtils.orderBy(selectRows,scope.column.params.selectedSorts)
2759
+ }
2754
2760
  //第一行选中
2755
2761
  pulldownView.setLinkValue(selectRows[0], scope.row)
2756
2762
  this.cellValueChange(scope)