doway-coms 2.11.2 → 2.11.4
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 +1 -1
- package/packages/BaseGrid/src/index.vue +124 -57
package/package.json
CHANGED
|
@@ -864,6 +864,18 @@ export default {
|
|
|
864
864
|
header: {
|
|
865
865
|
options: [
|
|
866
866
|
[
|
|
867
|
+
{
|
|
868
|
+
code: 'fixedCancel',
|
|
869
|
+
name: '取消固定列',
|
|
870
|
+
visible: true,
|
|
871
|
+
disabled: false,
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
code: 'fixedLeft',
|
|
875
|
+
name: '固定列到左侧',
|
|
876
|
+
visible: true,
|
|
877
|
+
disabled: false,
|
|
878
|
+
},
|
|
867
879
|
{
|
|
868
880
|
code: 'clearFilter',
|
|
869
881
|
name: '清空筛选',
|
|
@@ -922,24 +934,46 @@ export default {
|
|
|
922
934
|
],
|
|
923
935
|
},
|
|
924
936
|
visibleMethod: ({ options, column }) => {
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
options.forEach(list => {
|
|
937
|
+
|
|
938
|
+
options.forEach(list => {
|
|
928
939
|
list.forEach(item => {
|
|
929
940
|
if(item.code=='copyRow'||item.code=='paste'){
|
|
930
|
-
|
|
941
|
+
item.visible = this.gridEdit
|
|
931
942
|
}
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
if(item.code=='copyRow'||item.code=='paste'){
|
|
938
|
-
item.visible=false
|
|
943
|
+
if(item.code==='fixedCancel'){
|
|
944
|
+
item.visible = Boolean(column && column.fixed && this.moduleCode && this.dataCode && column.type!=='seq' && column.type!=='checkbox')
|
|
945
|
+
}
|
|
946
|
+
if(item.code==='fixedLeft'){
|
|
947
|
+
item.visible = Boolean(column && !column.fixed && this.moduleCode && this.dataCode && column.type!=='seq' && column.type!=='checkbox')
|
|
939
948
|
}
|
|
940
|
-
})
|
|
941
949
|
})
|
|
942
|
-
|
|
950
|
+
})
|
|
951
|
+
// if(column && column.fixed){
|
|
952
|
+
// options.forEach(list => {
|
|
953
|
+
// list.forEach(item => {
|
|
954
|
+
// if(item.code==''){
|
|
955
|
+
// item.visible=true
|
|
956
|
+
// }
|
|
957
|
+
// })
|
|
958
|
+
// })
|
|
959
|
+
// }
|
|
960
|
+
// if(this.gridEdit){
|
|
961
|
+
// options.forEach(list => {
|
|
962
|
+
// list.forEach(item => {
|
|
963
|
+
// if(item.code=='copyRow'||item.code=='paste'){
|
|
964
|
+
// item.visible=true
|
|
965
|
+
// }
|
|
966
|
+
// })
|
|
967
|
+
// })
|
|
968
|
+
// }else{
|
|
969
|
+
// options.forEach(list => {
|
|
970
|
+
// list.forEach(item => {
|
|
971
|
+
// if(item.code=='copyRow'||item.code=='paste'){
|
|
972
|
+
// item.visible=false
|
|
973
|
+
// }
|
|
974
|
+
// })
|
|
975
|
+
// })
|
|
976
|
+
// }
|
|
943
977
|
return true
|
|
944
978
|
},
|
|
945
979
|
},
|
|
@@ -1252,39 +1286,6 @@ export default {
|
|
|
1252
1286
|
} catch (err) {
|
|
1253
1287
|
console.debug(err)
|
|
1254
1288
|
}
|
|
1255
|
-
if (this.showSeq) {
|
|
1256
|
-
this.internalColumns.push(
|
|
1257
|
-
// {
|
|
1258
|
-
// children: [
|
|
1259
|
-
{
|
|
1260
|
-
type: 'seq',
|
|
1261
|
-
fixed: 'left',
|
|
1262
|
-
width: 50,
|
|
1263
|
-
slots: {
|
|
1264
|
-
header: 'seqHeader',
|
|
1265
|
-
},
|
|
1266
|
-
params: {
|
|
1267
|
-
disableUserVisible: true,
|
|
1268
|
-
},
|
|
1269
|
-
}
|
|
1270
|
-
// ],
|
|
1271
|
-
// slots: {
|
|
1272
|
-
// header: 'seqHeader'
|
|
1273
|
-
// }
|
|
1274
|
-
// }
|
|
1275
|
-
)
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
if (this.showCheckBox) {
|
|
1279
|
-
this.internalColumns.push({
|
|
1280
|
-
type: 'checkbox',
|
|
1281
|
-
fixed: 'left',
|
|
1282
|
-
width: 40,
|
|
1283
|
-
params: {
|
|
1284
|
-
disableUserVisible: true,
|
|
1285
|
-
},
|
|
1286
|
-
})
|
|
1287
|
-
}
|
|
1288
1289
|
//拖动后输入框有错位问题,暂时不启用
|
|
1289
1290
|
// this.initColumnDrop()
|
|
1290
1291
|
for (let i = 0; i < this.columns.length; i++) {
|
|
@@ -1313,6 +1314,39 @@ export default {
|
|
|
1313
1314
|
//设置筛选过滤条件
|
|
1314
1315
|
this.setFilterExpression(this.internalColumns)
|
|
1315
1316
|
}
|
|
1317
|
+
//注意,不能移到上面添加,会出现布局问题,暂时不知道什么原因????
|
|
1318
|
+
if (this.showCheckBox) {
|
|
1319
|
+
this.internalColumns.unshift({
|
|
1320
|
+
type: 'checkbox',
|
|
1321
|
+
fixed: 'left',
|
|
1322
|
+
width: 40,
|
|
1323
|
+
params: {
|
|
1324
|
+
disableUserVisible: true,
|
|
1325
|
+
},
|
|
1326
|
+
})
|
|
1327
|
+
}
|
|
1328
|
+
if (this.showSeq) {
|
|
1329
|
+
this.internalColumns.unshift(
|
|
1330
|
+
// {
|
|
1331
|
+
// children: [
|
|
1332
|
+
{
|
|
1333
|
+
type: 'seq',
|
|
1334
|
+
fixed: 'left',
|
|
1335
|
+
width: 50,
|
|
1336
|
+
slots: {
|
|
1337
|
+
header: 'seqHeader',
|
|
1338
|
+
},
|
|
1339
|
+
params: {
|
|
1340
|
+
disableUserVisible: true,
|
|
1341
|
+
},
|
|
1342
|
+
}
|
|
1343
|
+
// ],
|
|
1344
|
+
// slots: {
|
|
1345
|
+
// header: 'seqHeader'
|
|
1346
|
+
// }
|
|
1347
|
+
// }
|
|
1348
|
+
)
|
|
1349
|
+
}
|
|
1316
1350
|
|
|
1317
1351
|
|
|
1318
1352
|
this.gridEdit = this.edit
|
|
@@ -1717,17 +1751,21 @@ export default {
|
|
|
1717
1751
|
contextMenuClickEvent({ menu, row, column }) {
|
|
1718
1752
|
let vm = this
|
|
1719
1753
|
const $table = this.$refs.baseGrid
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1754
|
+
console.debug('menu',menu)
|
|
1755
|
+
// if (column && column.field) {
|
|
1756
|
+
// if (
|
|
1757
|
+
// menu.code !== 'sort' &&
|
|
1758
|
+
// menu.code !== 'copy' &&
|
|
1759
|
+
// menu.code !== 'copyRow' &&
|
|
1760
|
+
// menu.code !== 'refresh' &&
|
|
1761
|
+
// menu.code !== 'clearFilter' &&
|
|
1762
|
+
// menu.code !== 'fixedLeft' &&
|
|
1763
|
+
// menu.code !== 'fixedRight' &&
|
|
1764
|
+
// menu.code !== 'fixedCancel'
|
|
1765
|
+
// ) {
|
|
1766
|
+
// $table.sort(column.field, menu.code)
|
|
1767
|
+
// }
|
|
1768
|
+
// }
|
|
1731
1769
|
function pasteChildren (row, childrenField, parentField) {
|
|
1732
1770
|
if (row[childrenField] && row[childrenField].length > 0) {
|
|
1733
1771
|
row[childrenField].forEach(item => {
|
|
@@ -1786,6 +1824,16 @@ export default {
|
|
|
1786
1824
|
}
|
|
1787
1825
|
}
|
|
1788
1826
|
break
|
|
1827
|
+
case 'fixedCancel':
|
|
1828
|
+
//取消固定列
|
|
1829
|
+
this.$refs.baseGrid.clearColumnFixed(column.field)
|
|
1830
|
+
this.saveTableHeight()
|
|
1831
|
+
break
|
|
1832
|
+
case 'fixedLeft':
|
|
1833
|
+
//固定列到左侧
|
|
1834
|
+
this.$refs.baseGrid.setColumnFixed(column.field, 'left')
|
|
1835
|
+
this.saveTableHeight()
|
|
1836
|
+
break;
|
|
1789
1837
|
case 'clearFilter':
|
|
1790
1838
|
// 示例
|
|
1791
1839
|
const filterList = this.$refs.baseGrid.getCheckedFilters()
|
|
@@ -1852,6 +1900,21 @@ export default {
|
|
|
1852
1900
|
break
|
|
1853
1901
|
default:
|
|
1854
1902
|
}
|
|
1903
|
+
},
|
|
1904
|
+
/**
|
|
1905
|
+
* 固定列到左侧
|
|
1906
|
+
* @param scope
|
|
1907
|
+
*/
|
|
1908
|
+
fixedLeftColumn(scope){
|
|
1909
|
+
this.$refs.baseGrid.setColumnFixed(scope.column.field, 'left')
|
|
1910
|
+
|
|
1911
|
+
},
|
|
1912
|
+
/**
|
|
1913
|
+
* 取消固定列
|
|
1914
|
+
* @param scope
|
|
1915
|
+
*/
|
|
1916
|
+
fixedCancelColumn(scope){
|
|
1917
|
+
|
|
1855
1918
|
},
|
|
1856
1919
|
getFiltersList() {
|
|
1857
1920
|
return this.filterExpression
|
|
@@ -3712,6 +3775,9 @@ export default {
|
|
|
3712
3775
|
if (tempObject.extraInfo.order) {
|
|
3713
3776
|
tempData.extraInfo.order = tempObject.extraInfo.order
|
|
3714
3777
|
}
|
|
3778
|
+
if(item.fixed){
|
|
3779
|
+
tempData.extraInfo['fixed'] = item.fixed
|
|
3780
|
+
}
|
|
3715
3781
|
postData.fields.push(tempData)
|
|
3716
3782
|
})
|
|
3717
3783
|
saveUserModuleDataFieldApi(postData)
|
|
@@ -3997,6 +4063,7 @@ export default {
|
|
|
3997
4063
|
}
|
|
3998
4064
|
::v-deep span.vxe-cell--title {
|
|
3999
4065
|
margin-right: auto;
|
|
4066
|
+
display: inline-flex;//当表头设置换行时需要把这个样式覆盖加上,否则筛选和过滤会在第二行显示
|
|
4000
4067
|
}
|
|
4001
4068
|
.inner-cell-control {
|
|
4002
4069
|
width: 100% !important;
|