sohelp-eleplus 1.1.18 → 1.1.20
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/components.js +2 -0
- package/http/SohelpHttp.js +14 -5
- package/package.json +1 -1
- package/sohelp-card/index.vue +13 -0
- package/sohelp-dict/index.vue +25 -1
- package/sohelp-entity-grid/index.vue +3 -3
- package/sohelp-grid/components/filter-condition-item.vue +7 -3
- package/sohelp-grid/index.vue +341 -125
- package/sohelp-grid/js/DefaultGridOptions.js +30 -17
- package/sohelp-grid/js/DefaultProps.js +3 -3
- package/sohelp-grid/js/useSohelpGridConfig.js +163 -87
- package/sohelp-grid-select/index.vue +2 -2
- package/sohelp-grid-view/filter/filter-form.vue +41 -16
- package/sohelp-grid-view/filter/index.vue +6 -3
- package/sohelp-grid-view/index.vue +15 -6
- package/sohelp-icon-select/index.vue +2 -2
- package/sohelp-import/index.vue +470 -0
- package/sohelp-modal/index.vue +33 -22
- package/sohelp-module/useSohelpModule.js +9 -11
- package/sohelp-org-user-tree/index.vue +1 -1
- package/sohelp-page/index.vue +13 -0
- package/sohelp-table/index.vue +3 -3
- package/sohelp-vform-drawer/index.vue +1 -1
- package/sohelp-vxe-grid/DefaultGridOptions.js +56 -40
- package/sohelp-vxe-grid/DefaultProps.js +10 -20
- package/sohelp-vxe-grid/SohelpGridConfig.js +28 -27
- package/sohelp-vxe-grid/index.vue +345 -387
- package/sohelp-vxe-table/index.vue +3 -3
- package/sohelp-workflow/nodes/approver.vue +0 -1
- package/style/index.scss +0 -0
package/README.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
* 2) npm install sohelp-eleplus
|
|
4
4
|
|
|
5
5
|
# 相关依赖
|
|
6
|
+
* 1) Element-Plus
|
|
7
|
+
* 2) Admin-Element-Plus
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# 如何开发调试
|
|
11
|
+
|
|
12
|
+
通过npm link进行安装关联
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
# 关联连接
|
|
16
|
+
npm link sohelp-eleplus
|
|
17
|
+
|
|
18
|
+
# 导入组件库
|
|
19
|
+
import SohelpEleplus from 'sohelp-eleplus';
|
|
20
|
+
|
|
21
|
+
# 导入样式
|
|
22
|
+
import 'sohelp-eleplus/style/index.scss';
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# 全局安装注册组件库
|
|
26
|
+
app.use(SohelpEleplus);
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
|
|
6
30
|
|
|
7
31
|
|
|
8
32
|
# 如何发布
|
package/cache/ModuleCache.js
CHANGED
|
@@ -71,16 +71,6 @@ class ModuleCache {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
/**初始化实体列表*/
|
|
75
|
-
const entityGrid = moduleData?.entityGrid;
|
|
76
|
-
if (entityGrid) {
|
|
77
|
-
for (const key in entityGrid) {
|
|
78
|
-
const grid = entityGrid[key];
|
|
79
|
-
if (grid && grid.refid) {
|
|
80
|
-
this.setEntityGrid(grid.refid, grid);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
74
|
|
|
85
75
|
/**初始化工作流列表*/
|
|
86
76
|
const workflowList = moduleData?.workflow;
|
|
@@ -142,16 +132,7 @@ class ModuleCache {
|
|
|
142
132
|
this.gridCache.set(refid, value);
|
|
143
133
|
}
|
|
144
134
|
|
|
145
|
-
|
|
146
|
-
* 设置实体网格缓存
|
|
147
|
-
*
|
|
148
|
-
* @param {string} refid - 实体网格的引用ID
|
|
149
|
-
* @param {any} value - 要设置的缓存值
|
|
150
|
-
*/
|
|
151
|
-
setEntityGrid(refid, value) {
|
|
152
|
-
if (!refid) return;
|
|
153
|
-
this.entityGridCache.set(refid, value);
|
|
154
|
-
}
|
|
135
|
+
|
|
155
136
|
|
|
156
137
|
/**
|
|
157
138
|
* 设置实体表单的值
|
|
@@ -214,18 +195,7 @@ class ModuleCache {
|
|
|
214
195
|
return this.layoutCache.has(refid) ? this.layoutCache.get(refid) : null;
|
|
215
196
|
}
|
|
216
197
|
|
|
217
|
-
|
|
218
|
-
* 异步获取实体网格数据
|
|
219
|
-
*
|
|
220
|
-
* @param refid 模块引用ID
|
|
221
|
-
* @returns 返回对应refid的实体网格数据,如果不存在则返回null
|
|
222
|
-
*/
|
|
223
|
-
async getEntityGrid(refid) {
|
|
224
|
-
if (!this.hasModule(refid)) {
|
|
225
|
-
await this.init(refid);
|
|
226
|
-
}
|
|
227
|
-
return this.entityGridCache.has(refid) ? this.entityGridCache.get(refid) : null;
|
|
228
|
-
}
|
|
198
|
+
|
|
229
199
|
|
|
230
200
|
/**
|
|
231
201
|
* 获取实体表单
|
package/components.js
CHANGED
|
@@ -44,3 +44,5 @@ export { default as SohelpTenantSelect } from './sohelp-tenant-select/index.vue'
|
|
|
44
44
|
export { default as SohelpVxeGridSelect } from './sohelp-vxe-grid-select/index.vue';
|
|
45
45
|
export { default as SohelpIconSelect } from './sohelp-icon-select/index.vue';
|
|
46
46
|
export { default as SohelpModal } from './sohelp-modal/index.vue';
|
|
47
|
+
export { default as SohelpCard } from './sohelp-card/index.vue';
|
|
48
|
+
export { default as SohelpPage } from './sohelp-page/index.vue';
|
package/http/SohelpHttp.js
CHANGED
|
@@ -18,9 +18,11 @@ export const SohelpHttp = {
|
|
|
18
18
|
* @param _url
|
|
19
19
|
* @param param
|
|
20
20
|
* @param fileName
|
|
21
|
+
* @param onProgress
|
|
22
|
+
* @param config
|
|
21
23
|
* @returns {Promise<never>}
|
|
22
24
|
*/
|
|
23
|
-
download: async function(_url, param, fileName) {
|
|
25
|
+
download: async function(_url, param, fileName, onProgress, config = {}) {
|
|
24
26
|
if (window.$axios == null) {
|
|
25
27
|
console.error("请在配置main.js中配置window.$axios实例!!");
|
|
26
28
|
return;
|
|
@@ -29,10 +31,17 @@ export const SohelpHttp = {
|
|
|
29
31
|
if (!fileName) {
|
|
30
32
|
fileName = (new Date()).getTime();
|
|
31
33
|
}
|
|
32
|
-
// 发起
|
|
33
|
-
const response = await window.$axios.
|
|
34
|
-
responseType:
|
|
35
|
-
|
|
34
|
+
// 发起POST请求,设置responseType为blob
|
|
35
|
+
const response = await window.$axios.post(_url, param || {}, {
|
|
36
|
+
responseType: 'blob',
|
|
37
|
+
...config,
|
|
38
|
+
onDownloadProgress: (evt) => {
|
|
39
|
+
if (typeof onProgress === "function") {
|
|
40
|
+
const total = evt?.total || 0;
|
|
41
|
+
const loaded = evt?.loaded || 0;
|
|
42
|
+
onProgress(loaded, total);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
36
45
|
}).catch(e => {
|
|
37
46
|
return Promise.reject(e.message);
|
|
38
47
|
});
|
package/package.json
CHANGED
package/sohelp-dict/index.vue
CHANGED
|
@@ -11,10 +11,19 @@
|
|
|
11
11
|
padding-right: 6px;
|
|
12
12
|
padding-top: 3px;
|
|
13
13
|
padding-bottom: 3px;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
14
16
|
"
|
|
15
17
|
v-for="(item, index) in valueData"
|
|
16
18
|
:key="item.value"
|
|
17
|
-
|
|
19
|
+
>
|
|
20
|
+
<el-icon :size="18" style="margin: 2px 5px 0 0">
|
|
21
|
+
<component :is="ElementPlusIcons[icon]" v-if="ElementPlusIcons[icon]" />
|
|
22
|
+
<component :is="EleAdminPlusIcons[icon]" v-else-if="EleAdminPlusIcons[icon]" />
|
|
23
|
+
<span :class="icon" v-else></span>
|
|
24
|
+
</el-icon>
|
|
25
|
+
|
|
26
|
+
{{ item.label }}
|
|
18
27
|
</el-text>
|
|
19
28
|
</template>
|
|
20
29
|
<template v-else-if="type === 'tag'">
|
|
@@ -27,6 +36,11 @@
|
|
|
27
36
|
:key="item.value"
|
|
28
37
|
:disable-transitions="true"
|
|
29
38
|
>
|
|
39
|
+
<el-icon :size="18" style="margin: 2px 5px 0 0">
|
|
40
|
+
<component :is="ElementPlusIcons[icon]" v-if="ElementPlusIcons[icon]" />
|
|
41
|
+
<component :is="EleAdminPlusIcons[icon]" v-else-if="EleAdminPlusIcons[icon]" />
|
|
42
|
+
<span :class="icon" v-else></span>
|
|
43
|
+
</el-icon>
|
|
30
44
|
{{ item.label }}
|
|
31
45
|
</el-tag>
|
|
32
46
|
</div>
|
|
@@ -39,6 +53,11 @@
|
|
|
39
53
|
@change="change"
|
|
40
54
|
>
|
|
41
55
|
<el-radio v-for="item in data.value" :key="item.value" :label="item.value">
|
|
56
|
+
<el-icon :size="18" style="margin: 2px 5px 0 0">
|
|
57
|
+
<component :is="ElementPlusIcons[icon]" v-if="ElementPlusIcons[icon]" />
|
|
58
|
+
<component :is="EleAdminPlusIcons[icon]" v-else-if="EleAdminPlusIcons[icon]" />
|
|
59
|
+
<span :class="icon" v-else></span>
|
|
60
|
+
</el-icon>
|
|
42
61
|
{{ item.label }}
|
|
43
62
|
</el-radio>
|
|
44
63
|
</el-radio-group>
|
|
@@ -50,6 +69,11 @@
|
|
|
50
69
|
@change="change"
|
|
51
70
|
>
|
|
52
71
|
<el-checkbox v-for="item in data.value" :key="item.value" :label="item.value">
|
|
72
|
+
<el-icon :size="18" style="margin: 2px 5px 0 0">
|
|
73
|
+
<component :is="ElementPlusIcons[icon]" v-if="ElementPlusIcons[icon]" />
|
|
74
|
+
<component :is="EleAdminPlusIcons[icon]" v-else-if="EleAdminPlusIcons[icon]" />
|
|
75
|
+
<span :class="icon" v-else></span>
|
|
76
|
+
</el-icon>
|
|
53
77
|
{{ item.label }}
|
|
54
78
|
</el-checkbox>
|
|
55
79
|
</el-checkbox-group>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<sohelp-
|
|
2
|
+
<sohelp-grid-view v-bind="$attrs" ref="sohelpEntityGridRef" :refid="refid" :isEntityGrid="true"></sohelp-grid-view>
|
|
3
3
|
</template>
|
|
4
4
|
<script>
|
|
5
|
-
import
|
|
5
|
+
import SohelpGridView from '../sohelp-grid-view/index.vue'
|
|
6
6
|
import {ref} from "vue";
|
|
7
7
|
export default {
|
|
8
8
|
name: "SohelpEntityGrid",
|
|
9
|
-
components: {
|
|
9
|
+
components: {SohelpGridView},
|
|
10
10
|
props:{
|
|
11
11
|
modelValue: Object,
|
|
12
12
|
/** 实体配置 */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
const emit = defineEmits(['update:modelValue', 'change']);
|
|
18
|
+
const emit = defineEmits(['update:modelValue', 'change', 'search']);
|
|
19
19
|
const condition = reactive({});
|
|
20
20
|
|
|
21
21
|
const dropDownRef = ref(null);
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
return typeof val === 'number';
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
const search = () => {
|
|
28
|
+
emit('search', condition);
|
|
29
|
+
};
|
|
30
|
+
|
|
27
31
|
const getComparisonByEditor = (type) => {
|
|
28
32
|
let data = null;
|
|
29
33
|
if (comparisonType[type]) {
|
|
@@ -80,7 +84,7 @@
|
|
|
80
84
|
};
|
|
81
85
|
</script>
|
|
82
86
|
<template>
|
|
83
|
-
<
|
|
87
|
+
<el-form class="sohelp-filter-condition" v-if="properties" @keyup.enter="search" @submit.prevent="">
|
|
84
88
|
<el-form-item :label="t(properties.i18n) || properties.label">
|
|
85
89
|
<ele-dropdown
|
|
86
90
|
ref="dropDownRef"
|
|
@@ -275,7 +279,7 @@
|
|
|
275
279
|
style="width: 160px"
|
|
276
280
|
class="filter-condition"
|
|
277
281
|
></sohelp-input>
|
|
278
|
-
</
|
|
282
|
+
</el-form>
|
|
279
283
|
</template>
|
|
280
284
|
|
|
281
285
|
<style lang="scss" scoped>
|