sohelp-eleplus 1.1.18 → 1.1.19
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/README.md +24 -0
- package/cache/ModuleCache.js +2 -32
- package/package.json +1 -1
- package/sohelp-entity-grid/index.vue +3 -3
- package/sohelp-grid/index.vue +94 -19
- package/sohelp-grid/js/DefaultGridOptions.js +5 -1
- package/sohelp-grid/js/DefaultProps.js +3 -3
- package/sohelp-grid/js/useSohelpGridConfig.js +7 -1
- package/sohelp-grid-select/index.vue +2 -2
- package/sohelp-grid-view/filter/filter-form.vue +31 -12
- package/sohelp-grid-view/filter/index.vue +1 -1
- package/sohelp-icon-select/index.vue +2 -2
- package/sohelp-modal/index.vue +28 -21
- package/sohelp-module/useSohelpModule.js +9 -11
- package/sohelp-org-user-tree/index.vue +1 -1
- package/sohelp-table/index.vue +3 -3
- package/sohelp-vform-drawer/index.vue +1 -1
- package/sohelp-vxe-grid/DefaultGridOptions.js +7 -16
- package/sohelp-vxe-grid/DefaultProps.js +10 -20
- package/sohelp-vxe-grid/SohelpGridConfig.js +28 -27
- package/sohelp-vxe-grid/index.vue +397 -440
- package/sohelp-vxe-table/index.vue +3 -3
- package/style/index.scss +0 -0
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VxeGrid默认值选项
|
|
3
|
+
*/
|
|
1
4
|
export default {
|
|
2
5
|
loading: false,
|
|
3
6
|
customConfig: {
|
|
7
|
+
//默认不会将列设置保存到本地存储中
|
|
8
|
+
storage: false,
|
|
4
9
|
placement: "top-right" // 自定义列工具栏位置
|
|
5
10
|
},
|
|
6
|
-
|
|
7
11
|
params: {},
|
|
8
|
-
|
|
9
12
|
rowConfig: {
|
|
10
13
|
useKey: true,
|
|
11
14
|
//sortable 排序
|
|
@@ -68,28 +71,16 @@ export default {
|
|
|
68
71
|
refresh: true,
|
|
69
72
|
custom: true, //是否开启自定义列工具栏
|
|
70
73
|
slots: {
|
|
71
|
-
|
|
74
|
+
tools: "keywords"
|
|
72
75
|
}
|
|
73
76
|
},
|
|
74
|
-
proxyConfig: {
|
|
75
|
-
response: {
|
|
76
|
-
result: "result",
|
|
77
|
-
total: "page.total"
|
|
78
|
-
},
|
|
79
|
-
ajax: {}
|
|
80
|
-
},
|
|
81
77
|
menuConfig: {
|
|
82
78
|
//右键菜单配置
|
|
83
79
|
header: {
|
|
84
80
|
options: []
|
|
85
81
|
},
|
|
86
82
|
body: {
|
|
87
|
-
options: [
|
|
88
|
-
[
|
|
89
|
-
{ code: "insert", name: "插入行", visible: true, disabled: false },
|
|
90
|
-
{ code: "copy", name: "复制行", prefixIcon: "vxe-icon-copy", visible: true, disabled: false }
|
|
91
|
-
]
|
|
92
|
-
]
|
|
83
|
+
options: []
|
|
93
84
|
},
|
|
94
85
|
footer: {
|
|
95
86
|
options: []
|
|
@@ -1,37 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SohelpVxeGrid对外默认属性
|
|
3
|
+
*/
|
|
1
4
|
export default {
|
|
2
5
|
value: [Array, String],
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
refid: {
|
|
6
|
+
/**读取数据源URL**/
|
|
7
|
+
url: {
|
|
6
8
|
type: String,
|
|
7
|
-
|
|
8
|
-
required: true
|
|
9
|
+
default: ""
|
|
9
10
|
},
|
|
10
11
|
/**自动加载数据*/
|
|
11
12
|
autoLoad: {
|
|
12
13
|
type: Boolean,
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
gridOptions:Object,
|
|
16
|
-
/**数据源URL**/
|
|
17
|
-
url: {
|
|
18
|
-
type: String,
|
|
19
|
-
defaultValue: ''
|
|
14
|
+
default: true
|
|
20
15
|
},
|
|
16
|
+
gridOptions: Object,
|
|
21
17
|
/**允许拖动记录*/
|
|
22
18
|
drag: {
|
|
23
19
|
type: Boolean,
|
|
24
20
|
default: false
|
|
25
21
|
},
|
|
26
|
-
|
|
27
|
-
* 是否实体列表
|
|
28
|
-
*/
|
|
29
|
-
isEntityGrid: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: false
|
|
32
|
-
},
|
|
22
|
+
/**是否可以多选*/
|
|
33
23
|
multiple: {
|
|
34
24
|
type: Boolean,
|
|
35
25
|
default: true
|
|
36
26
|
}
|
|
37
|
-
}
|
|
27
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import DefaultGridOptions from
|
|
2
|
-
import { nextTick, reactive, ref } from
|
|
3
|
-
import Sortable from
|
|
4
|
-
import { moduleCache } from
|
|
1
|
+
import DefaultGridOptions from "./DefaultGridOptions";
|
|
2
|
+
import { nextTick, reactive, ref } from "vue";
|
|
3
|
+
import Sortable from "sortablejs";
|
|
4
|
+
import { moduleCache } from "../cache/ModuleCache";
|
|
5
5
|
|
|
6
6
|
/**列转换*/
|
|
7
7
|
const switchVxeProperty = (property) => {
|
|
@@ -12,14 +12,14 @@ const switchVxeProperty = (property) => {
|
|
|
12
12
|
showOverflow: true
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
if (property.name ===
|
|
16
|
-
editor[
|
|
15
|
+
if (property.name === "id") {
|
|
16
|
+
editor["width"] = 50;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
if (property.edit) {
|
|
20
|
-
editor[
|
|
20
|
+
editor["editRender"] = {
|
|
21
21
|
enabled: true,
|
|
22
|
-
name: property.editor ||
|
|
22
|
+
name: property.editor || "input"
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
return editor;
|
|
@@ -30,9 +30,10 @@ const sortable = ref();
|
|
|
30
30
|
const rowDrop = (sohelpVxeGridRef) => {
|
|
31
31
|
nextTick(() => {
|
|
32
32
|
const xGTable = sohelpVxeGridRef.value;
|
|
33
|
-
sortable.value = Sortable.create(xGTable.$el.querySelector(
|
|
34
|
-
handle:
|
|
35
|
-
onEnd: ({ newIndex, oldIndex }) => {
|
|
33
|
+
sortable.value = Sortable.create(xGTable.$el.querySelector(".body--wrapper>.vxe-table--body tbody"), {
|
|
34
|
+
handle: ".drag-btn",
|
|
35
|
+
onEnd: ({ newIndex, oldIndex }) => {
|
|
36
|
+
}
|
|
36
37
|
});
|
|
37
38
|
});
|
|
38
39
|
};
|
|
@@ -55,7 +56,7 @@ const filterFieldsByProperties = (_filter) => {
|
|
|
55
56
|
filter.list = filterArray(filter.list);
|
|
56
57
|
filter.filter.keywords = filterArray(filter.filter.keywords);
|
|
57
58
|
filter.filter.sort = filterArray(filter.filter.sort);
|
|
58
|
-
filter.filter.field = filterArray(filter.filter.field,
|
|
59
|
+
filter.filter.field = filterArray(filter.filter.field, "name");
|
|
59
60
|
return filter;
|
|
60
61
|
};
|
|
61
62
|
|
|
@@ -63,10 +64,10 @@ const filterFieldsByProperties = (_filter) => {
|
|
|
63
64
|
export async function initial(sohelpVxeGridRef, props) {
|
|
64
65
|
var data = null;
|
|
65
66
|
if (props.refid) {
|
|
66
|
-
data =
|
|
67
|
+
data = await moduleCache.getGrid(props.refid);
|
|
67
68
|
|
|
68
69
|
if (!data) {
|
|
69
|
-
throw new Error(
|
|
70
|
+
throw new Error(props.refid+" 不存在!");
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
try {
|
|
@@ -88,17 +89,17 @@ export async function initial(sohelpVxeGridRef, props) {
|
|
|
88
89
|
//初始化属性列表配置
|
|
89
90
|
DefaultGridOptions.columns = [
|
|
90
91
|
{
|
|
91
|
-
field: props.multiple ?
|
|
92
|
-
fixed:
|
|
93
|
-
type: props.multiple ?
|
|
92
|
+
field: props.multiple ? "checkbox" : "radio",
|
|
93
|
+
fixed: "left",
|
|
94
|
+
type: props.multiple ? "checkbox" : "radio",
|
|
94
95
|
width: 35,
|
|
95
|
-
align:
|
|
96
|
+
align: "center"
|
|
96
97
|
},
|
|
97
98
|
{
|
|
98
|
-
type:
|
|
99
|
-
title:
|
|
100
|
-
fixe:
|
|
101
|
-
align:
|
|
99
|
+
type: "seq",
|
|
100
|
+
title: "#",
|
|
101
|
+
fixe: "left",
|
|
102
|
+
align: "center",
|
|
102
103
|
width: 40
|
|
103
104
|
}
|
|
104
105
|
];
|
|
@@ -118,13 +119,13 @@ export async function initial(sohelpVxeGridRef, props) {
|
|
|
118
119
|
|
|
119
120
|
if (drag) {
|
|
120
121
|
DefaultGridOptions.columns.unshift({
|
|
121
|
-
title:
|
|
122
|
-
fixed:
|
|
122
|
+
title: "",
|
|
123
|
+
fixed: "left",
|
|
123
124
|
width: 40,
|
|
124
|
-
align:
|
|
125
|
+
align: "center",
|
|
125
126
|
dragSort: true,
|
|
126
127
|
slots: {
|
|
127
|
-
default:
|
|
128
|
+
default: "draggableDefault"
|
|
128
129
|
}
|
|
129
130
|
});
|
|
130
131
|
}
|
|
@@ -136,7 +137,7 @@ export async function initial(sohelpVxeGridRef, props) {
|
|
|
136
137
|
}
|
|
137
138
|
const gridOptions = props.refid ? DefaultGridOptions : props.gridOptions || DefaultGridOptions;
|
|
138
139
|
|
|
139
|
-
return { gridOptions, sohelpConfig: SohelpConfig, propertiesMap};
|
|
140
|
+
return { gridOptions, sohelpConfig: SohelpConfig, propertiesMap };
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
export default initial;
|