sohelp-eleplus 1.1.13
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 +7 -0
- package/cache/DictCache.js +58 -0
- package/cache/ModuleCache.js +352 -0
- package/components.js +45 -0
- package/core-export.js +4 -0
- package/http/CrudHttp.js +115 -0
- package/http/DictHttp.js +12 -0
- package/http/ModuleHttp.js +68 -0
- package/http/SohelpHttp.js +125 -0
- package/index.js +6 -0
- package/installer.js +8 -0
- package/lang/en_US.js +4 -0
- package/lang/zh_CN.js +4 -0
- package/lang/zh_TW.js +4 -0
- package/package.json +9 -0
- package/sohelp-ace-editor/index.vue +198 -0
- package/sohelp-application-select/index.vue +15 -0
- package/sohelp-autocode/index.vue +53 -0
- package/sohelp-calendar-view/index.vue +11 -0
- package/sohelp-card-view/index.vue +11 -0
- package/sohelp-condition/index.vue +210 -0
- package/sohelp-cry-input/index.vue +64 -0
- package/sohelp-date/index.vue +27 -0
- package/sohelp-datetime/index.vue +44 -0
- package/sohelp-datetime-picker/index.vue +86 -0
- package/sohelp-datetime-range/index.vue +59 -0
- package/sohelp-dict/index.vue +207 -0
- package/sohelp-dict/props.js +68 -0
- package/sohelp-drawer/index.vue +31 -0
- package/sohelp-drop-card/index.vue +94 -0
- package/sohelp-drop-card/props.js +68 -0
- package/sohelp-dyn-select/index.vue +99 -0
- package/sohelp-dyn-select/props.js +67 -0
- package/sohelp-dyn-tree/index.vue +82 -0
- package/sohelp-dyn-tree-select/index.vue +114 -0
- package/sohelp-entity-form/index.vue +524 -0
- package/sohelp-entity-grid/index.vue +30 -0
- package/sohelp-file-upload/index.vue +218 -0
- package/sohelp-filter-scheme/components/condition.vue +102 -0
- package/sohelp-filter-scheme/components/filter.vue +45 -0
- package/sohelp-filter-scheme/components/keywords.vue +15 -0
- package/sohelp-filter-scheme/components/scheme.vue +49 -0
- package/sohelp-filter-scheme/index.vue +113 -0
- package/sohelp-grid/SohelpGridConfig.js~ +408 -0
- package/sohelp-grid/components/filter-condition-item.vue +298 -0
- package/sohelp-grid/index.vue +1886 -0
- package/sohelp-grid/js/ConditionType.js +101 -0
- package/sohelp-grid/js/DefaultGridOptions.js +141 -0
- package/sohelp-grid/js/DefaultProps.js +27 -0
- package/sohelp-grid/js/SohelpConfigFunction.js +0 -0
- package/sohelp-grid/js/SohelpGridConfig.js +101 -0
- package/sohelp-grid/js/useSohelpGridConfig.js +519 -0
- package/sohelp-grid-select/index.vue +245 -0
- package/sohelp-grid-view/filter/config/grid-filter-condition.vue +221 -0
- package/sohelp-grid-view/filter/config/grid-filter-config.vue +27 -0
- package/sohelp-grid-view/filter/config/grid-filter-field.vue +378 -0
- package/sohelp-grid-view/filter/config/grid-filter-keywords.vue +310 -0
- package/sohelp-grid-view/filter/config/grid-filter-list.vue +313 -0
- package/sohelp-grid-view/filter/config/grid-filter-scheme.vue +264 -0
- package/sohelp-grid-view/filter/config/grid-filter-sort.vue +310 -0
- package/sohelp-grid-view/filter/config/index.vue +206 -0
- package/sohelp-grid-view/filter/filter-form.vue +427 -0
- package/sohelp-grid-view/filter/filter-toolbar.vue +110 -0
- package/sohelp-grid-view/filter/index.vue +160 -0
- package/sohelp-grid-view/index.vue +379 -0
- package/sohelp-grid-view-select/index.vue +141 -0
- package/sohelp-group-view/index.vue +11 -0
- package/sohelp-icon-select/index.vue +96 -0
- package/sohelp-icon-select/vxeui-icon.js +90 -0
- package/sohelp-image-upload/index.vue +286 -0
- package/sohelp-input/index.vue +39 -0
- package/sohelp-modal/index.vue +49 -0
- package/sohelp-module/index.vue +54 -0
- package/sohelp-module/useModalManager.js +89 -0
- package/sohelp-module/useSohelpModule.js +66 -0
- package/sohelp-number-input/index.vue +32 -0
- package/sohelp-number-range/index.vue +135 -0
- package/sohelp-org-select/index.vue +30 -0
- package/sohelp-org-tree/index.vue +18 -0
- package/sohelp-org-tree-select/index.vue +93 -0
- package/sohelp-org-user-tree/index.vue +26 -0
- package/sohelp-org-user-tree-select/index.vue +11 -0
- package/sohelp-pagination/index.vue +11 -0
- package/sohelp-power/index.vue +105 -0
- package/sohelp-pro-form/components/pro-form-footer.vue +44 -0
- package/sohelp-pro-form/components/pro-form-item.vue +1133 -0
- package/sohelp-pro-form/index.vue +257 -0
- package/sohelp-pro-form/util.js +140 -0
- package/sohelp-pro-layout/index.vue +11 -0
- package/sohelp-pro-table/index.vue +14 -0
- package/sohelp-process/index.vue +216 -0
- package/sohelp-rate/index.vue +56 -0
- package/sohelp-rate/props.js +71 -0
- package/sohelp-relation/index.vue +11 -0
- package/sohelp-rich-text/index.vue +242 -0
- package/sohelp-rich-text/util.js +231 -0
- package/sohelp-richtext/index.vue +10 -0
- package/sohelp-role-select/index.vue +33 -0
- package/sohelp-search/components/search-config.vue +0 -0
- package/sohelp-search/index.vue +49 -0
- package/sohelp-search-pro-form/index.vue +11 -0
- package/sohelp-select/index.vue +120 -0
- package/sohelp-split-panel/index.vue +15 -0
- package/sohelp-switch/index.vue +56 -0
- package/sohelp-table/index.vue +151 -0
- package/sohelp-tenant-select/index.vue +128 -0
- package/sohelp-text/index.vue +14 -0
- package/sohelp-textarea-input/index.vue +36 -0
- package/sohelp-time/index.vue +10 -0
- package/sohelp-tree/index.vue +37 -0
- package/sohelp-tree-select/index.vue +18 -0
- package/sohelp-user-select/index.vue +44 -0
- package/sohelp-user-select/index.vue~ +53 -0
- package/sohelp-user-select/props.js +71 -0
- package/sohelp-user-tag/index.vue +12 -0
- package/sohelp-user-tree/index.vue +11 -0
- package/sohelp-vform-drawer/index.vue +40 -0
- package/sohelp-vform-eleplus/favicon.ico +0 -0
- package/sohelp-vform-eleplus/index.vue +297 -0
- package/sohelp-vform-eleplus/preview.html +91 -0
- package/sohelp-vform-eleplus/render.es.js +72433 -0
- package/sohelp-vform-eleplus/render.style.css +16 -0
- package/sohelp-vform-eleplus/render.umd.js +57 -0
- package/sohelp-vform-eleplus/tinymce/langs/zh_CN.js +462 -0
- package/sohelp-vform-eleplus/tinymce/langs/zh_TW.js +419 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.css +72 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/default/content.css +67 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/default/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/document/content.css +72 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/document/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.css +68 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.css +732 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.css +726 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.css +29 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.css +3047 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.css +714 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.css +3047 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
- package/sohelp-vform-modal/index.vue +41 -0
- package/sohelp-vform-select/index.vue +11 -0
- package/sohelp-vform-vant/favicon.ico +0 -0
- package/sohelp-vform-vant/render.es.js +14608 -0
- package/sohelp-vform-vant/render.style.css +1 -0
- package/sohelp-vform-vant/render.umd.js +22 -0
- package/sohelp-vxe-grid/DefaultGridOptions.js +102 -0
- package/sohelp-vxe-grid/DefaultProps.js +37 -0
- package/sohelp-vxe-grid/SohelpGridConfig.js +142 -0
- package/sohelp-vxe-grid/index.vue +518 -0
- package/sohelp-vxe-grid-select/index.vue +148 -0
- package/sohelp-vxe-table/index.vue +184 -0
- package/sohelp-workflow/index.vue +495 -0
- package/sohelp-workflow/nodeWrap.vue +53 -0
- package/sohelp-workflow/nodes/addNode.vue +27 -0
- package/sohelp-workflow/nodes/approver.vue +125 -0
- package/sohelp-workflow/nodes/branch.vue +434 -0
- package/sohelp-workflow/nodes/promoter.vue +80 -0
- package/sohelp-workflow/nodes/send.vue +95 -0
- package/sohelp-workflow-drawer/components/approval-modal.vue +182 -0
- package/sohelp-workflow-drawer/components/draw-box.vue +141 -0
- package/sohelp-workflow-drawer/components/form.vue +79 -0
- package/sohelp-workflow-drawer/components/table.vue +153 -0
- package/sohelp-workflow-drawer/components/timeline.vue +189 -0
- package/sohelp-workflow-drawer/components/workflow.vue +68 -0
- package/sohelp-workflow-drawer/index.vue +311 -0
- package/sohelp-workflow-drawer/js/index.js +119 -0
- package/style/index.scss +0 -0
- package/utils/ProFormConvertUtil.js +76 -0
- package/utils/core.js +310 -0
- package/utils/use-form-data.js +48 -0
- package/utils/use-mobile.js +43 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template name="sohelp-number-range">
|
|
2
|
+
<view class="sohelp-number-range">
|
|
3
|
+
<el-input
|
|
4
|
+
v-model="value[0]"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
type="number"
|
|
7
|
+
placeholder="最小值"
|
|
8
|
+
:clearable="clearable"
|
|
9
|
+
@change="change"
|
|
10
|
+
:controlsPosition="controlsPosition"
|
|
11
|
+
></el-input>
|
|
12
|
+
{{ separator }}
|
|
13
|
+
<el-input
|
|
14
|
+
v-model="value[1]"
|
|
15
|
+
v-bind="$attrs"
|
|
16
|
+
type="number"
|
|
17
|
+
placeholder="最大值"
|
|
18
|
+
:clearable="clearable"
|
|
19
|
+
@change="change"
|
|
20
|
+
:controlsPosition="controlsPosition"
|
|
21
|
+
></el-input>
|
|
22
|
+
</view>
|
|
23
|
+
</template>
|
|
24
|
+
<script setup>
|
|
25
|
+
import { ref, watch } from 'vue';
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits(['update:modelValue', 'change']);
|
|
28
|
+
const props = defineProps({
|
|
29
|
+
modelValue: [String, Number, Array],
|
|
30
|
+
min: {
|
|
31
|
+
type: Number,
|
|
32
|
+
default: -Infinity
|
|
33
|
+
},
|
|
34
|
+
max: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: Infinity
|
|
37
|
+
},
|
|
38
|
+
separator: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: '-'
|
|
41
|
+
},
|
|
42
|
+
clearable: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true
|
|
45
|
+
},
|
|
46
|
+
controlsPosition: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'right'
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const value = ref([]);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 监听props.modelValue的变化
|
|
56
|
+
*/
|
|
57
|
+
watch(
|
|
58
|
+
() => props.modelValue,
|
|
59
|
+
(val) => {
|
|
60
|
+
if (Array.isArray(val)) {
|
|
61
|
+
value.value = val;
|
|
62
|
+
} else {
|
|
63
|
+
value.value = [val, ''];
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
immediate: true
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 输入值变化时,触发事件
|
|
73
|
+
*/
|
|
74
|
+
const change = () => {
|
|
75
|
+
let [min, max] = value.value.map((val) => (val === '' ? null : Number(val)));
|
|
76
|
+
|
|
77
|
+
if (min !== null) {
|
|
78
|
+
min = Math.max(props.min, min);
|
|
79
|
+
if (props.max !== Infinity) {
|
|
80
|
+
min = Math.min(props.max, min);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (max !== null) {
|
|
85
|
+
max = Math.min(props.max, max);
|
|
86
|
+
if (props.min !== -Infinity) {
|
|
87
|
+
max = Math.max(props.min, max);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (min !== null && max !== null && min >= max) {
|
|
92
|
+
min = props.min !== -Infinity ? props.min : '';
|
|
93
|
+
if (max !== null && max <= props.min) {
|
|
94
|
+
max = '';
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
value.value = [min, max].map((val) => (val === null ? '' : val));
|
|
99
|
+
|
|
100
|
+
emit('update:modelValue', value.value);
|
|
101
|
+
emit('change', value.value);
|
|
102
|
+
};
|
|
103
|
+
</script>
|
|
104
|
+
|
|
105
|
+
<script>
|
|
106
|
+
export default {
|
|
107
|
+
name: 'SohelpNumberRange'
|
|
108
|
+
};
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style lang="scss" scoped>
|
|
112
|
+
.sohelp-number-range {
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: flex-start;
|
|
116
|
+
gap: 6px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:deep(input::-webkit-outer-spin-button),
|
|
120
|
+
:deep(input::-webkit-inner-spin-button) {
|
|
121
|
+
-webkit-appearance: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:deep(input[type='number']) {
|
|
125
|
+
-moz-appearance: textfield;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:deep(input::-webkit-outer-spin-button),
|
|
129
|
+
:deep(input::-webkit-inner-spin-button) {
|
|
130
|
+
-webkit-appearance: none;
|
|
131
|
+
}
|
|
132
|
+
:deep(input[type='number']) {
|
|
133
|
+
-moz-appearance: textfield;
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<sohelp-dyn-select
|
|
3
|
+
v-bind="$attrs"
|
|
4
|
+
:url="url"
|
|
5
|
+
:labelField="labelField"
|
|
6
|
+
:valueField="valueField"
|
|
7
|
+
></sohelp-dyn-select>
|
|
8
|
+
</template>
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'SohelpOrgSelect',
|
|
12
|
+
components: {},
|
|
13
|
+
props: {
|
|
14
|
+
url: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: '/engine/web/org/list'
|
|
17
|
+
},
|
|
18
|
+
labelField: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'org_name'
|
|
21
|
+
},
|
|
22
|
+
valueField: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'id'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(props, { emit, attrs }) {}
|
|
28
|
+
};
|
|
29
|
+
</script>
|
|
30
|
+
<style></style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<sohelp-dyn-tree v-bind="$attrs" :url="url"></sohelp-dyn-tree>
|
|
3
|
+
</template>
|
|
4
|
+
<script>
|
|
5
|
+
export default {
|
|
6
|
+
name: 'SohelpOrgTree',
|
|
7
|
+
components: {},
|
|
8
|
+
props: {
|
|
9
|
+
url: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: '/engine/web/org/list',
|
|
12
|
+
required: true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<style scoped></style>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sohelp-org-tree-select">
|
|
3
|
+
<ele-text v-if="readonly">
|
|
4
|
+
{{ data?.['org_name'] || modelValue}}
|
|
5
|
+
</ele-text>
|
|
6
|
+
<sohelp-tree-select v-else v-model="modelValue" v-model:data="data" v-bind="$attrs" :tree-props="treeProps"></sohelp-tree-select>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
<script setup>
|
|
10
|
+
import SohelpTreeSelect from "../sohelp-tree-select/index.vue";
|
|
11
|
+
import { onMounted, reactive } from "vue";
|
|
12
|
+
import { toTree } from "../utils/core.js";
|
|
13
|
+
import { ElMessage } from "element-plus";
|
|
14
|
+
|
|
15
|
+
const modelValue = defineModel("modelValue", { type: [String, Number, Array], default: "" });
|
|
16
|
+
const data = defineModel("data",{type: Object, default: ()=>({})});
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
url: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "/engine/web/org/list"
|
|
22
|
+
},
|
|
23
|
+
datasource: {
|
|
24
|
+
type: [Array, Function, Promise],
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
readonly: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const treeProps = reactive({
|
|
34
|
+
data: []
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const dataMap = reactive({});
|
|
38
|
+
|
|
39
|
+
onMounted(async () => {
|
|
40
|
+
let data = {};
|
|
41
|
+
if (Array.isArray(props.datasource)) {
|
|
42
|
+
data = props.datasource;
|
|
43
|
+
} else if (typeof props.datasource === "function") {
|
|
44
|
+
const result = await props.datasource();
|
|
45
|
+
data = result;
|
|
46
|
+
} else if (props.datasource instanceof Promise) {
|
|
47
|
+
const result = await props.datasource;
|
|
48
|
+
data = result;
|
|
49
|
+
} else if (props.url) {
|
|
50
|
+
data = await SohelpHttp.get(props.url, {})
|
|
51
|
+
.then((res) => {
|
|
52
|
+
return res?.data || {};
|
|
53
|
+
})
|
|
54
|
+
.catch((e) => {
|
|
55
|
+
ElMessage.error(e?.meta?.message);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (data) {
|
|
59
|
+
//转换成map
|
|
60
|
+
Object.assign(
|
|
61
|
+
dataMap,
|
|
62
|
+
data.reduce((prev, cur) => {
|
|
63
|
+
prev[cur.id] = cur;
|
|
64
|
+
return prev;
|
|
65
|
+
}, {})
|
|
66
|
+
);
|
|
67
|
+
// 转换成树形结构
|
|
68
|
+
treeProps.data = toTree({
|
|
69
|
+
data: data?.map((m) => ({
|
|
70
|
+
...m,
|
|
71
|
+
label: m.org_name,
|
|
72
|
+
parent_id: m.parent_id
|
|
73
|
+
})),
|
|
74
|
+
idField: "id",
|
|
75
|
+
parentIdField: "parent_id"
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
defineExpose({
|
|
81
|
+
treeProps, modelValue, dataMap
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
</script>
|
|
86
|
+
<script>
|
|
87
|
+
|
|
88
|
+
export default {
|
|
89
|
+
name: "SohelpOrgTreeSelect"
|
|
90
|
+
};
|
|
91
|
+
</script>
|
|
92
|
+
|
|
93
|
+
<style scoped></style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<sohelp-dyn-tree v-bind="$attrs" :url="url"></sohelp-dyn-tree>
|
|
3
|
+
</template>
|
|
4
|
+
<script>
|
|
5
|
+
import SohelpDynTree from "../sohelp-dyn-tree/index.vue";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
name: "SohelpOrgUserTree",
|
|
9
|
+
components: {SohelpDynTree},
|
|
10
|
+
props: {
|
|
11
|
+
url: {
|
|
12
|
+
type: String,
|
|
13
|
+
defaultValue: "/engine/web/org/list",
|
|
14
|
+
required: true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(props, {emit}) {
|
|
18
|
+
return {}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style scoped>
|
|
25
|
+
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<sohelp-select @optionClick="powerOptionCLick" ref="powerSelectRef" :datasource="PowerList"
|
|
3
|
+
v-model="value" size="small" style="min-width: 0; width: 100px"
|
|
4
|
+
placeholder="请选择查看范围">
|
|
5
|
+
</sohelp-select>
|
|
6
|
+
<!-- 查看范围 用户选择 -->
|
|
7
|
+
<ele-modal :width="460" v-model="powerUserVisible" title="用户选择">
|
|
8
|
+
<sohelp-user-select v-model="powerUsers" :multiple="true" placeholder="请选择用户"></sohelp-user-select>
|
|
9
|
+
<template #footer>
|
|
10
|
+
<el-button size="small" @click="powerOption('cancel')">{{ t("grid.toolbar.cancel") }}</el-button>
|
|
11
|
+
<el-button size="small" @click="powerOption('confirm')" type="primary">{{ t("grid.toolbar.confirm") }}</el-button>
|
|
12
|
+
</template>
|
|
13
|
+
</ele-modal>
|
|
14
|
+
</template>
|
|
15
|
+
<script setup>
|
|
16
|
+
import { ref } from "vue";
|
|
17
|
+
import { useI18n } from "vue-i18n";
|
|
18
|
+
|
|
19
|
+
const { t } = useI18n();
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 定义查看范围
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const PowerList = [{
|
|
26
|
+
label:"全部数据",
|
|
27
|
+
i18n: "grid.power.all_data",
|
|
28
|
+
value: "0"
|
|
29
|
+
}, {
|
|
30
|
+
label:"我负责的",
|
|
31
|
+
i18n: "grid.power.my_responsibility",
|
|
32
|
+
value: "1"
|
|
33
|
+
}, {
|
|
34
|
+
label: "下属负责的",
|
|
35
|
+
i18n: "grid.power.subordinates_responsibility",
|
|
36
|
+
value: "2"
|
|
37
|
+
}, {
|
|
38
|
+
label:"仅限本部门",
|
|
39
|
+
i18n: "grid.power.only_my_department",
|
|
40
|
+
value: "3"
|
|
41
|
+
}, {
|
|
42
|
+
label: "本公司",
|
|
43
|
+
i18n: "grid.power.this_company",
|
|
44
|
+
value: "4"
|
|
45
|
+
}, {
|
|
46
|
+
label: "下属部门",
|
|
47
|
+
i18n: "grid.power.subordinate_departments",
|
|
48
|
+
value: "5"
|
|
49
|
+
}, {
|
|
50
|
+
label: "本人及下属",
|
|
51
|
+
i18n: "grid.power.me_and_subordinates",
|
|
52
|
+
value: "6"
|
|
53
|
+
}, {
|
|
54
|
+
label: "本部门及下属部门",
|
|
55
|
+
i18n: "grid.power.my_department_and_subordinates",
|
|
56
|
+
value: "7"
|
|
57
|
+
}, {
|
|
58
|
+
label:"仅限本岗位",
|
|
59
|
+
i18n: "grid.power.only_my_position",
|
|
60
|
+
value: "8"
|
|
61
|
+
}, {
|
|
62
|
+
label: "自定义",
|
|
63
|
+
i18n: "grid.power.custom",
|
|
64
|
+
value: "9"
|
|
65
|
+
}];
|
|
66
|
+
|
|
67
|
+
const emits = defineEmits("change");
|
|
68
|
+
const value = ref(0);
|
|
69
|
+
//显示用户选择弹窗
|
|
70
|
+
const powerUserVisible = ref(false);
|
|
71
|
+
//显示用户
|
|
72
|
+
const powerUsers = ref([]);
|
|
73
|
+
/**
|
|
74
|
+
* 查看范围
|
|
75
|
+
*/
|
|
76
|
+
const powerOptionCLick = (val) => {
|
|
77
|
+
if (value.value === "9") {
|
|
78
|
+
powerUserVisible.value = true;
|
|
79
|
+
} else {
|
|
80
|
+
emits("change", value.value);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* 查看范围弹窗操作
|
|
85
|
+
* @param type
|
|
86
|
+
*/
|
|
87
|
+
const powerOption = (type) => {
|
|
88
|
+
if (type === "cancel") {
|
|
89
|
+
powerUserVisible.value = false;
|
|
90
|
+
} else if (type === "confirm") {
|
|
91
|
+
emits("change", { power: 9, powerUsers: powerUsers.value });
|
|
92
|
+
}
|
|
93
|
+
powerUserVisible.value = false;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
</script>
|
|
98
|
+
<script>
|
|
99
|
+
export default {
|
|
100
|
+
name: "SohelpPower"
|
|
101
|
+
};
|
|
102
|
+
</script>
|
|
103
|
+
<style scoped lang="scss">
|
|
104
|
+
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!-- 表单底栏 -->
|
|
2
|
+
<template>
|
|
3
|
+
<ElFormItem v-bind="footerProps || {}">
|
|
4
|
+
<template
|
|
5
|
+
v-for="name in Object.keys(footerSlots || {}).filter(
|
|
6
|
+
(k) =>
|
|
7
|
+
k !== 'footer' &&
|
|
8
|
+
!!(footerSlots && footerSlots[k] && $slots[footerSlots[k]])
|
|
9
|
+
)"
|
|
10
|
+
#[name]="slotProps"
|
|
11
|
+
>
|
|
12
|
+
<slot :name="footerSlots?.[name]" v-bind="slotProps || {}"></slot>
|
|
13
|
+
</template>
|
|
14
|
+
<slot name="footer">
|
|
15
|
+
<ElButton type="primary" @click="submit">{{ submitText }}</ElButton>
|
|
16
|
+
<ElButton @click="reset">{{ resetText }}</ElButton>
|
|
17
|
+
</slot>
|
|
18
|
+
</ElFormItem>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
defineProps({
|
|
23
|
+
/** 底栏ElFormItem属性 */
|
|
24
|
+
footerProps: Object,
|
|
25
|
+
/** 底栏ElFormItem插槽 */
|
|
26
|
+
footerSlots: Object,
|
|
27
|
+
/** 提交按钮文本 */
|
|
28
|
+
submitText: String,
|
|
29
|
+
/** 重置按钮文本 */
|
|
30
|
+
resetText: String
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const emit = defineEmits(['submit', 'reset']);
|
|
34
|
+
|
|
35
|
+
/** 提交 */
|
|
36
|
+
const submit = () => {
|
|
37
|
+
emit('submit');
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** 重置 */
|
|
41
|
+
const reset = () => {
|
|
42
|
+
emit('reset');
|
|
43
|
+
};
|
|
44
|
+
</script>
|