sohelp-eleplus 1.1.15 → 1.1.16
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/components.js +1 -0
- package/package.json +1 -1
- package/sohelp-dict/index.vue +116 -117
- package/sohelp-drawer/index.vue +20 -1
- package/sohelp-grid/index.vue +48 -44
- package/sohelp-grid/js/useSohelpGridConfig.js +2 -2
- package/sohelp-grid-view/filter/config/index.vue +5 -5
- package/sohelp-grid-view/filter/filter-form.vue +2 -2
- package/sohelp-grid-view/filter/index.vue +3 -3
- package/sohelp-grid-view/index.vue +1 -1
- package/sohelp-icon-select/icons/AnalysisOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ApplicationOutlined.vue +21 -0
- package/sohelp-icon-select/icons/AppstoreAddOutlined.vue +28 -0
- package/sohelp-icon-select/icons/AppstoreOutlined.vue +30 -0
- package/sohelp-icon-select/icons/ArrowDown.vue +21 -0
- package/sohelp-icon-select/icons/ArrowDownOutlined.vue +20 -0
- package/sohelp-icon-select/icons/ArrowLeft.vue +21 -0
- package/sohelp-icon-select/icons/ArrowLeftOutlined.vue +20 -0
- package/sohelp-icon-select/icons/ArrowRight.vue +21 -0
- package/sohelp-icon-select/icons/ArrowRightOutlined.vue +20 -0
- package/sohelp-icon-select/icons/ArrowUp.vue +21 -0
- package/sohelp-icon-select/icons/ArrowUpOutlined.vue +20 -0
- package/sohelp-icon-select/icons/BellOutlined.vue +21 -0
- package/sohelp-icon-select/icons/BookOutlined.vue +21 -0
- package/sohelp-icon-select/icons/CalendarOutlined.vue +19 -0
- package/sohelp-icon-select/icons/CaretDownFilled.vue +13 -0
- package/sohelp-icon-select/icons/CaretUpFilled.vue +13 -0
- package/sohelp-icon-select/icons/CheckCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/CheckCircleOutlined.vue +23 -0
- package/sohelp-icon-select/icons/CheckOutlined.vue +20 -0
- package/sohelp-icon-select/icons/CityOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ClockCircleOutlined.vue +23 -0
- package/sohelp-icon-select/icons/CloseCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/CloseCircleOutlined.vue +22 -0
- package/sohelp-icon-select/icons/CloseOutlined.vue +20 -0
- package/sohelp-icon-select/icons/CloudUploadOutlined.vue +23 -0
- package/sohelp-icon-select/icons/ClusterOutlined.vue +21 -0
- package/sohelp-icon-select/icons/CodeOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ColumnHeightOutlined.vue +18 -0
- package/sohelp-icon-select/icons/CompassOutlined.vue +22 -0
- package/sohelp-icon-select/icons/CompressOutlined.vue +23 -0
- package/sohelp-icon-select/icons/ConnectionOutlined.vue +24 -0
- package/sohelp-icon-select/icons/ControlOutlined.vue +27 -0
- package/sohelp-icon-select/icons/CopyOutlined.vue +22 -0
- package/sohelp-icon-select/icons/CpuOutlined.vue +22 -0
- package/sohelp-icon-select/icons/DashboardOutlined.vue +26 -0
- package/sohelp-icon-select/icons/DatabaseOutlined.vue +22 -0
- package/sohelp-icon-select/icons/DeleteOutlined.vue +22 -0
- package/sohelp-icon-select/icons/DesktopOutlined.vue +19 -0
- package/sohelp-icon-select/icons/DownloadOutlined.vue +21 -0
- package/sohelp-icon-select/icons/DragOutlined.vue +22 -0
- package/sohelp-icon-select/icons/EditOutlined.vue +21 -0
- package/sohelp-icon-select/icons/EllipsisOutlined.vue +15 -0
- package/sohelp-icon-select/icons/EnvironmentOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ExclamationCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/ExpandOutlined.vue +23 -0
- package/sohelp-icon-select/icons/FileOutlined.vue +22 -0
- package/sohelp-icon-select/icons/FilterFilled.vue +15 -0
- package/sohelp-icon-select/icons/FolderAddOutlined.vue +20 -0
- package/sohelp-icon-select/icons/FolderOutlined.vue +19 -0
- package/sohelp-icon-select/icons/FormOutlined.vue +20 -0
- package/sohelp-icon-select/icons/FullscreenExitOutlined.vue +16 -0
- package/sohelp-icon-select/icons/FullscreenOutlined.vue +16 -0
- package/sohelp-icon-select/icons/FundOutlined.vue +20 -0
- package/sohelp-icon-select/icons/GlobalOutlined.vue +15 -0
- package/sohelp-icon-select/icons/HolderOutlined.vue +18 -0
- package/sohelp-icon-select/icons/HomeOutlined.vue +19 -0
- package/sohelp-icon-select/icons/IdcardOutlined.vue +25 -0
- package/sohelp-icon-select/icons/InfoCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/LinkOutlined.vue +15 -0
- package/sohelp-icon-select/icons/LoadingDotOutlined.vue +21 -0
- package/sohelp-icon-select/icons/LoadingOutlined.vue +19 -0
- package/sohelp-icon-select/icons/LockOutlined.vue +21 -0
- package/sohelp-icon-select/icons/LogOutlined.vue +22 -0
- package/sohelp-icon-select/icons/LogoutOutlined.vue +22 -0
- package/sohelp-icon-select/icons/MailOutlined.vue +19 -0
- package/sohelp-icon-select/icons/MenuFoldOutlined.vue +17 -0
- package/sohelp-icon-select/icons/MenuUnfoldOutlined.vue +17 -0
- package/sohelp-icon-select/icons/MessageOutlined.vue +22 -0
- package/sohelp-icon-select/icons/MinusCircleOutlined.vue +22 -0
- package/sohelp-icon-select/icons/MobileOutlined.vue +20 -0
- package/sohelp-icon-select/icons/MoonOutlined.vue +21 -0
- package/sohelp-icon-select/icons/MoreOutlined.vue +15 -0
- package/sohelp-icon-select/icons/PauseFilled.vue +14 -0
- package/sohelp-icon-select/icons/PieChartOutlined.vue +20 -0
- package/sohelp-icon-select/icons/PlayFilled.vue +13 -0
- package/sohelp-icon-select/icons/PlusCircleOutlined.vue +22 -0
- package/sohelp-icon-select/icons/PlusOutlined.vue +19 -0
- package/sohelp-icon-select/icons/ProtectOutlined.vue +21 -0
- package/sohelp-icon-select/icons/QuestionCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/QuestionCircleOutlined.vue +25 -0
- package/sohelp-icon-select/icons/ReloadOutlined.vue +22 -0
- package/sohelp-icon-select/icons/SearchOutlined.vue +21 -0
- package/sohelp-icon-select/icons/SettingOutlined.vue +24 -0
- package/sohelp-icon-select/icons/ShoppingOutlined.vue +19 -0
- package/sohelp-icon-select/icons/SortOutlined.vue +21 -0
- package/sohelp-icon-select/icons/StarFilled.vue +15 -0
- package/sohelp-icon-select/icons/StepBackwardFilled.vue +17 -0
- package/sohelp-icon-select/icons/StepForwardFilled.vue +17 -0
- package/sohelp-icon-select/icons/SuitcaseOutlined.vue +19 -0
- package/sohelp-icon-select/icons/SunOutlined.vue +29 -0
- package/sohelp-icon-select/icons/SwapOutlined.vue +21 -0
- package/sohelp-icon-select/icons/SyncOutlined.vue +21 -0
- package/sohelp-icon-select/icons/TableOutlined.vue +19 -0
- package/sohelp-icon-select/icons/TagOutlined.vue +20 -0
- package/sohelp-icon-select/icons/TimerOutlined.vue +22 -0
- package/sohelp-icon-select/icons/UndoOutlined.vue +22 -0
- package/sohelp-icon-select/icons/UnlockOutlined.vue +21 -0
- package/sohelp-icon-select/icons/UploadOutlined.vue +21 -0
- package/sohelp-icon-select/icons/UserOutlined.vue +21 -0
- package/sohelp-icon-select/icons/VerticalAlignMiddleOutlined.vue +15 -0
- package/sohelp-icon-select/icons/VerticalLeftOutlined.vue +13 -0
- package/sohelp-icon-select/icons/VerticalRightOutlined.vue +13 -0
- package/sohelp-icon-select/icons/WarningOutlined.vue +21 -0
- package/sohelp-icon-select/icons/ZoomInOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ZoomOutOutlined.vue +22 -0
- package/sohelp-icon-select/icons/index.js +106 -0
- package/sohelp-icon-select/icons/index.ts +106 -0
- package/sohelp-icon-select/index.vue +0 -1
- package/sohelp-modal/index.vue +39 -23
- package/sohelp-search/index.vue +1 -1
- package/sohelp-vform-eleplus/index.vue +5 -5
- package/sohelp-vform-modal/index.vue +1 -1
- package/sohelp-workflow-drawer/components/approval-modal.vue +4 -4
- package/sohelp-workflow-drawer/components/form.vue +1 -2
package/components.js
CHANGED
|
@@ -43,3 +43,4 @@ export { default as SohelpDrawer } from './sohelp-drawer/index.vue';
|
|
|
43
43
|
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
|
+
export { default as SohelpModal } from './sohelp-modal/index.vue';
|
package/package.json
CHANGED
package/sohelp-dict/index.vue
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"
|
|
15
15
|
v-for="(item, index) in valueData"
|
|
16
16
|
:key="item.value"
|
|
17
|
-
|
|
17
|
+
>{{ item.label }}
|
|
18
18
|
</el-text>
|
|
19
19
|
</template>
|
|
20
20
|
<template v-else-if="type === 'tag'">
|
|
@@ -69,139 +69,138 @@
|
|
|
69
69
|
@change="change"
|
|
70
70
|
ref="dictSelectRef"
|
|
71
71
|
>
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
<template #prefix v-if="icon">
|
|
73
|
+
<el-icon :size="18" style="margin-right: 5px">
|
|
74
|
+
<component :is="ElementPlusIcons[icon]" v-if="ElementPlusIcons[icon]" />
|
|
75
|
+
<component :is="EleAdminPlusIcons[icon]" v-else-if="EleAdminPlusIcons[icon]" />
|
|
76
|
+
<span :class="icon" v-else></span>
|
|
77
|
+
</el-icon>
|
|
78
|
+
</template>
|
|
79
|
+
<el-option
|
|
80
|
+
v-for="item in data.value"
|
|
81
|
+
:key="item.id"
|
|
82
|
+
:value="item.value"
|
|
83
|
+
:label="item.label"
|
|
84
|
+
:style="`color:${item.fontColor}`"
|
|
85
|
+
>
|
|
86
|
+
<el-icon :size="18" v-if="item.icon" style="margin-right: 5px">
|
|
87
|
+
<component :is="ElementPlusIcons[item.icon]" v-if="ElementPlusIcons[item.icon]" />
|
|
88
|
+
<component :is="EleAdminPlusIcons[item.icon]" v-else-if="EleAdminPlusIcons[item.icon]" />
|
|
89
|
+
<span :class="item.icon" v-else></span>
|
|
90
|
+
</el-icon>
|
|
82
91
|
{{ item.label }}
|
|
83
92
|
</el-option>
|
|
84
|
-
<template #prefix>
|
|
85
|
-
<component style="width:15px;height:15px;padding-right:5px;"
|
|
86
|
-
:is="ElementPlusIcons[icon]"
|
|
87
|
-
v-if="ElementPlusIcons[icon]" />
|
|
88
|
-
<component style="width:15px;height:15px;padding-right:5px;"
|
|
89
|
-
:is="EleAdminPlusIcons[icon]"
|
|
90
|
-
v-else-if="EleAdminPlusIcons[icon]" />
|
|
91
|
-
<span style="width:15px;height:15px;padding-right:5px;"
|
|
92
|
-
:class="icon" v-else></span>
|
|
93
|
-
</template>
|
|
94
93
|
</el-select>
|
|
95
94
|
</template>
|
|
96
95
|
|
|
97
96
|
<script setup>
|
|
98
|
-
import { computed, nextTick, onMounted, reactive, ref } from
|
|
99
|
-
import { dictCache } from
|
|
100
|
-
import * as ElementPlusIcons from
|
|
101
|
-
import * as EleAdminPlusIcons from
|
|
97
|
+
import { computed, nextTick, onMounted, reactive, ref } from 'vue';
|
|
98
|
+
import { dictCache } from '../cache/DictCache';
|
|
99
|
+
import * as ElementPlusIcons from '@element-plus/icons-vue';
|
|
100
|
+
import * as EleAdminPlusIcons from '@/components/icons';
|
|
102
101
|
|
|
103
|
-
const modelValue = defineModel(
|
|
104
|
-
const emit = defineEmits(
|
|
105
|
-
const props = defineProps({
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
const modelValue = defineModel('modelValue', { type: [String, Number, Array], default: '' });
|
|
103
|
+
const emit = defineEmits('change');
|
|
104
|
+
const props = defineProps({
|
|
105
|
+
/** 字典类型 */
|
|
106
|
+
code: {
|
|
107
|
+
type: String,
|
|
108
|
+
required: true
|
|
109
|
+
},
|
|
110
|
+
/** 组件类型 */
|
|
108
111
|
type: String,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
112
|
+
/** 是否禁用 */
|
|
113
|
+
disabled: Boolean,
|
|
114
|
+
/** 提示文本 */
|
|
115
|
+
placeholder: String,
|
|
116
|
+
/** select的下拉是否插入到body下 */
|
|
117
|
+
teleported: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: true
|
|
120
|
+
},
|
|
121
|
+
autoFocus: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
/** 字典数据 */
|
|
128
|
+
const data = reactive({});
|
|
129
|
+
const dictSelectRef = ref(null);
|
|
127
130
|
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
+
const icon = computed(() => {
|
|
132
|
+
const item = data.value?.find((item) => item.value === modelValue.value);
|
|
133
|
+
return item?.icon;
|
|
134
|
+
});
|
|
131
135
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
//初始化菜单数据
|
|
137
|
+
onMounted(async () => {
|
|
138
|
+
data.value = (await dictCache.get(props.code)) || [];
|
|
139
|
+
//设置默认值
|
|
140
|
+
nextTick(() => {
|
|
141
|
+
if (!modelValue.value && (props.type === 'select' || props.type === undefined) && data.value[0]) {
|
|
142
|
+
modelValue.value = data.value[0].value;
|
|
143
|
+
}
|
|
144
|
+
if (props.autoFocus) {
|
|
145
|
+
dictSelectRef.value?.focus();
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
136
149
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
150
|
+
/**
|
|
151
|
+
* 获取样式
|
|
152
|
+
* @param item
|
|
153
|
+
*/
|
|
154
|
+
const getStyle = (item) => {
|
|
155
|
+
const styles = [];
|
|
156
|
+
if (item?.fontColor) {
|
|
157
|
+
styles.push(`color:${item.fontColor};`);
|
|
144
158
|
}
|
|
145
|
-
if (
|
|
146
|
-
|
|
159
|
+
if (item?.backgroundColor) {
|
|
160
|
+
styles.push(`background-color:${item.backgroundColor};`);
|
|
147
161
|
}
|
|
148
|
-
|
|
149
|
-
}
|
|
162
|
+
return styles.join('');
|
|
163
|
+
};
|
|
150
164
|
|
|
151
|
-
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
styles.push(`color:${item.fontColor};`);
|
|
159
|
-
}
|
|
160
|
-
if (item?.backgroundColor) {
|
|
161
|
-
styles.push(`background-color:${item.backgroundColor};`);
|
|
162
|
-
}
|
|
163
|
-
return styles.join("");
|
|
164
|
-
};
|
|
165
|
+
/**
|
|
166
|
+
* change
|
|
167
|
+
* @param val
|
|
168
|
+
*/
|
|
169
|
+
const change = (val) => {
|
|
170
|
+
emit('change', val);
|
|
171
|
+
};
|
|
165
172
|
|
|
166
|
-
/**
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
/**
|
|
174
|
+
* 显示标签数据
|
|
175
|
+
*/
|
|
176
|
+
const valueData = computed(() => {
|
|
177
|
+
const val = props.modelValue;
|
|
178
|
+
if (val == null || val === '') return [];
|
|
179
|
+
const values = Array.isArray(val)
|
|
180
|
+
? val
|
|
181
|
+
: typeof val === 'number'
|
|
182
|
+
? [val]
|
|
183
|
+
: val
|
|
184
|
+
.split(',')
|
|
185
|
+
.map((v) => v.trim())
|
|
186
|
+
.filter(Boolean);
|
|
173
187
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
.split(",")
|
|
186
|
-
.map((v) => v.trim())
|
|
187
|
-
.filter(Boolean);
|
|
188
|
-
|
|
189
|
-
return (data.value || [])
|
|
190
|
-
.map((d) => (values.includes(d.value) ? d : null))
|
|
191
|
-
.filter(Boolean)
|
|
192
|
-
.concat(
|
|
193
|
-
values.filter((v) => !(data.value || []).some((d) => d.value === v)).map((v) => ({ value: v, label: v }))
|
|
194
|
-
);
|
|
195
|
-
});
|
|
196
|
-
/** 更新选中数据 */
|
|
197
|
-
// const updateValue = (value) => {
|
|
198
|
-
// emit('update:modelValue', value);
|
|
199
|
-
// };
|
|
188
|
+
return (data.value || [])
|
|
189
|
+
.map((d) => (values.includes(d.value) ? d : null))
|
|
190
|
+
.filter(Boolean)
|
|
191
|
+
.concat(
|
|
192
|
+
values.filter((v) => !(data.value || []).some((d) => d.value === v)).map((v) => ({ value: v, label: v }))
|
|
193
|
+
);
|
|
194
|
+
});
|
|
195
|
+
/** 更新选中数据 */
|
|
196
|
+
// const updateValue = (value) => {
|
|
197
|
+
// emit('update:modelValue', value);
|
|
198
|
+
// };
|
|
200
199
|
</script>
|
|
201
200
|
|
|
202
201
|
<script>
|
|
203
|
-
export default {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
};
|
|
202
|
+
export default {
|
|
203
|
+
name: 'SohelpDict',
|
|
204
|
+
inheritAttrs: false
|
|
205
|
+
};
|
|
207
206
|
</script>
|
package/sohelp-drawer/index.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ele-drawer v-bind="$attrs" style="max-width: 100%" class="sohelp-drawer">
|
|
2
|
+
<ele-drawer v-bind="$attrs" style="max-width: 100%" class="sohelp-drawer" v-model="modelValue">
|
|
3
3
|
<div class="drawer__container">
|
|
4
4
|
<!-- 主内容插槽 -->
|
|
5
5
|
<slot></slot>
|
|
@@ -13,6 +13,25 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
</ele-drawer>
|
|
15
15
|
</template>
|
|
16
|
+
|
|
17
|
+
<script setup>
|
|
18
|
+
const modelValue = defineModel('modelValue', {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const show = () => {
|
|
24
|
+
modelValue.value = true;
|
|
25
|
+
};
|
|
26
|
+
const close = () => {
|
|
27
|
+
modelValue.value = false;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
defineExpose({
|
|
31
|
+
show,
|
|
32
|
+
close
|
|
33
|
+
});
|
|
34
|
+
</script>
|
|
16
35
|
<script>
|
|
17
36
|
export default {
|
|
18
37
|
name: 'SohelpDrawer'
|
package/sohelp-grid/index.vue
CHANGED
|
@@ -9,15 +9,18 @@ import { calcSummary, switchGridValue } from "./js/SohelpGridConfig";
|
|
|
9
9
|
import { EleMessage } from "@/components/ele-admin-plus/components";
|
|
10
10
|
import { ElMessageBox } from "element-plus/es";
|
|
11
11
|
import { useFormData } from "@/utils/use-form-data";
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
12
|
+
import { resetCommonConfig, updateCommonConfig } from "../http/ModuleHttp.js";
|
|
13
|
+
import CrudHttp from "../http/CrudHttp.js";
|
|
14
|
+
import ApprovalModal from "sohelp-eleplus/sohelp-workflow-drawer/components/approval-modal.vue";
|
|
15
|
+
import WorkflowDrawer from "sohelp-eleplus/sohelp-workflow-drawer/index.vue";
|
|
16
|
+
import SohelpTextareaInput from "../sohelp-textarea-input/index.vue";
|
|
17
|
+
import SohelpPower from "../sohelp-power/index.vue";
|
|
18
|
+
import FilterConditionItem from "./components/filter-condition-item.vue";
|
|
18
19
|
import { useSohelpGridConfig } from "./js/useSohelpGridConfig.js";
|
|
19
20
|
import { useI18n } from "vue-i18n";
|
|
20
|
-
import SohelpEntityForm from "
|
|
21
|
+
import SohelpEntityForm from "../sohelp-entity-form/index.vue";
|
|
22
|
+
import * as ElementPlusIcons from '@element-plus/icons-vue';
|
|
23
|
+
import * as EleAdminPlusIcons from '@/components/icons';
|
|
21
24
|
|
|
22
25
|
const { initial, isConfigDone } = useSohelpGridConfig();
|
|
23
26
|
const { t } = useI18n();
|
|
@@ -1634,45 +1637,46 @@ defineExpose({
|
|
|
1634
1637
|
|
|
1635
1638
|
<!-- 操作栏 -->
|
|
1636
1639
|
<template #_operation="{ row }">
|
|
1637
|
-
<
|
|
1638
|
-
<
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1640
|
+
<el-space :size="10">
|
|
1641
|
+
<el-link
|
|
1642
|
+
v-for="item in getOperationButtonsByType(row)"
|
|
1643
|
+
:key="item.code"
|
|
1644
|
+
:type="item.code === 'crud.delete' ? 'danger' : 'primary'"
|
|
1645
|
+
v-bind="item.params"
|
|
1646
|
+
@click="operationHandler({item:item, row:row,$grid:sohelpVxeGridRef})"
|
|
1647
|
+
>
|
|
1648
|
+
<el-icon v-if="item.icon" style="margin-right: 5px;">
|
|
1649
|
+
<component :is="ElementPlusIcons[item.icon]" v-if="ElementPlusIcons[item.icon]" />
|
|
1650
|
+
<component :is="EleAdminPlusIcons[item.icon]" v-else-if="EleAdminPlusIcons[item.icon]" />
|
|
1651
|
+
<span :class="item.icon" v-else></span>
|
|
1652
|
+
</el-icon>
|
|
1653
|
+
{{ item.title }}
|
|
1654
|
+
</el-link>
|
|
1650
1655
|
<!-- 更多 -->
|
|
1651
|
-
<
|
|
1652
|
-
<el-
|
|
1653
|
-
<
|
|
1654
|
-
|
|
1655
|
-
<
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
<
|
|
1660
|
-
<el-dropdown-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
<
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
</el-dropdown-
|
|
1670
|
-
</
|
|
1671
|
-
</
|
|
1672
|
-
</
|
|
1673
|
-
|
|
1656
|
+
<el-dropdown v-if="getOperationButtonsByType(row,'more')?.length > 0">
|
|
1657
|
+
<el-link :underline="false">
|
|
1658
|
+
<span>更多</span>
|
|
1659
|
+
<el-icon style="margin-left: 4px;">
|
|
1660
|
+
<arrow-down />
|
|
1661
|
+
</el-icon>
|
|
1662
|
+
</el-link>
|
|
1663
|
+
<template #dropdown>
|
|
1664
|
+
<el-dropdown-menu>
|
|
1665
|
+
<el-dropdown-item v-for="item in getOperationButtonsByType(row,'more')" :key="item.code"
|
|
1666
|
+
@click="operationHandler({item:item, row:row,$grid:sohelpVxeGridRef})"
|
|
1667
|
+
v-bind="item.props">
|
|
1668
|
+
<el-icon v-if="item.icon">
|
|
1669
|
+
<component :is="ElementPlusIcons[item.icon]" v-if="ElementPlusIcons[item.icon]" />
|
|
1670
|
+
<component :is="EleAdminPlusIcons[item.icon]" v-else-if="EleAdminPlusIcons[item.icon]" />
|
|
1671
|
+
<span :class="item.icon" v-else></span>
|
|
1672
|
+
</el-icon>
|
|
1673
|
+
{{ item.title }}
|
|
1674
|
+
</el-dropdown-item>
|
|
1675
|
+
</el-dropdown-menu>
|
|
1676
|
+
</template>
|
|
1677
|
+
</el-dropdown>
|
|
1674
1678
|
<slot name="_operation" :row="row"></slot>
|
|
1675
|
-
</
|
|
1679
|
+
</el-space>
|
|
1676
1680
|
</template>
|
|
1677
1681
|
|
|
1678
1682
|
<!-- 统计 -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reactive, ref } from "vue";
|
|
2
|
-
import _DefaultGridOptions from "
|
|
3
|
-
import { moduleCache } from "
|
|
2
|
+
import _DefaultGridOptions from "../js/DefaultGridOptions";
|
|
3
|
+
import { moduleCache } from "../../cache/ModuleCache";
|
|
4
4
|
import { usePermission } from "@/utils/use-permission";
|
|
5
5
|
import { useMobile } from "@/utils/use-mobile";
|
|
6
6
|
import { useI18n } from "vue-i18n";
|
|
@@ -59,8 +59,8 @@ import { defineProps, onMounted, ref, watch } from "vue";
|
|
|
59
59
|
import GridFilterList from './grid-filter-list.vue';
|
|
60
60
|
import GridFilterConfig from './grid-filter-config.vue';
|
|
61
61
|
|
|
62
|
-
import { moduleCache } from '
|
|
63
|
-
import {
|
|
62
|
+
import { moduleCache } from '../../../cache/ModuleCache.js';
|
|
63
|
+
import { ElMessage } from 'element-plus';
|
|
64
64
|
const props = defineProps({
|
|
65
65
|
modelValue: Boolean,
|
|
66
66
|
config: Object
|
|
@@ -159,16 +159,16 @@ import { defineProps, onMounted, ref, watch } from "vue";
|
|
|
159
159
|
const save = async () => {
|
|
160
160
|
loading.value = true;
|
|
161
161
|
const res = await moduleCache.saveFilterFields(filterConfig.value).catch((e) => {
|
|
162
|
-
|
|
162
|
+
ElMessage.error(e?.message || 'error');
|
|
163
163
|
});
|
|
164
164
|
loading.value = false;
|
|
165
165
|
if (res.meta.success) {
|
|
166
166
|
emit('update:modelValue', false);
|
|
167
167
|
moduleCache.clear();
|
|
168
168
|
emit('done',filterConfig.value);
|
|
169
|
-
|
|
169
|
+
ElMessage.success(res?.meta.message || '操作成功');
|
|
170
170
|
} else {
|
|
171
|
-
|
|
171
|
+
ElMessage.error(res?.meta.message || '操作成功');
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
</script>
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
});
|
|
160
160
|
|
|
161
161
|
const load = () => {
|
|
162
|
-
maxRowsConfig.width = advancedBoxRef.value
|
|
162
|
+
maxRowsConfig.width = advancedBoxRef.value?.offsetWidth || 160;
|
|
163
163
|
maxRowsConfig.current = findAccumulateIndex(maxRowsConfig.itemWidth, maxRowsConfig.width * maxRowsConfig.maxRows);
|
|
164
164
|
};
|
|
165
165
|
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
maxRowsConfig.rowHeight = advancedRow.offsetHeight;
|
|
175
175
|
}
|
|
176
176
|
nextTick(() => {
|
|
177
|
-
maxRowsConfig.searchButtonWidth = searchButtonRef.value
|
|
177
|
+
maxRowsConfig.searchButtonWidth = searchButtonRef.value?.offsetWidth + 35;
|
|
178
178
|
maxRowsConfig.itemWidth = getAllHeights();
|
|
179
179
|
load();
|
|
180
180
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import FilterForm from '
|
|
3
|
-
import FilterToolbar from '
|
|
2
|
+
import FilterForm from './filter-form.vue';
|
|
3
|
+
import FilterToolbar from './filter-toolbar.vue';
|
|
4
4
|
import { computed, ref } from 'vue';
|
|
5
|
-
import FilterConfig from '
|
|
5
|
+
import FilterConfig from './config/index.vue';
|
|
6
6
|
import { useI18n } from 'vue-i18n';
|
|
7
7
|
|
|
8
8
|
const emit = defineEmits('change', 'filter', 'update:modelValue', 'close', 'reset', 'save', 'changeFilterScheme');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { computed, reactive, ref, watch } from 'vue';
|
|
3
3
|
import { useMobile } from '@/utils/use-mobile';
|
|
4
4
|
import SohelpFilter from './filter/index.vue';
|
|
5
|
-
import SohelpGrid from '
|
|
5
|
+
import SohelpGrid from '../sohelp-grid/index.vue';
|
|
6
6
|
// 属性映射
|
|
7
7
|
const propertiesMap = ref({});
|
|
8
8
|
const { mobile } = useMobile();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg
|
|
3
|
+
viewBox="0 0 48 48"
|
|
4
|
+
fill="none"
|
|
5
|
+
stroke="currentColor"
|
|
6
|
+
stroke-width="4"
|
|
7
|
+
stroke-linejoin="round"
|
|
8
|
+
>
|
|
9
|
+
<path d="M0.3 7H47.7M6 7V34H42V7M19 34 12 45M29 34 36 45" />
|
|
10
|
+
<path d="M16 22V27" />
|
|
11
|
+
<path d="M24 18V27" />
|
|
12
|
+
<path d="M32 14V27" />
|
|
13
|
+
</svg>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import { defineComponent } from 'vue';
|
|
18
|
+
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
name: 'AnalysisOutlined'
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg viewBox="0 0 48 48" fill="currentColor">
|
|
3
|
+
<circle cx="9" cy="9" r="4" />
|
|
4
|
+
<circle cx="9" cy="24" r="4" />
|
|
5
|
+
<circle cx="9" cy="39" r="4" />
|
|
6
|
+
<circle cx="24" cy="9" r="4" />
|
|
7
|
+
<circle cx="24" cy="24" r="4" />
|
|
8
|
+
<circle cx="24" cy="39" r="4" />
|
|
9
|
+
<circle cx="39" cy="9" r="4" />
|
|
10
|
+
<circle cx="39" cy="24" r="4" />
|
|
11
|
+
<circle cx="39" cy="39" r="4" />
|
|
12
|
+
</svg>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts">
|
|
16
|
+
import { defineComponent } from 'vue';
|
|
17
|
+
|
|
18
|
+
export default defineComponent({
|
|
19
|
+
name: 'ApplicationOutlined'
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg
|
|
3
|
+
viewBox="0 0 48 48"
|
|
4
|
+
fill="none"
|
|
5
|
+
stroke="currentColor"
|
|
6
|
+
stroke-width="4"
|
|
7
|
+
stroke-linecap="round"
|
|
8
|
+
>
|
|
9
|
+
<path
|
|
10
|
+
d="M18 6H8C7 6 6 7 6 8V18C6 19 7 20 8 20H18C19 20 20 19 20 18V8C20 7 19 6 18 6Z"
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
d="M40 6H30C29 6 28 7 28 8V18C28 19 29 20 30 20H40C41 20 42 19 42 18V8C42 7 41 6 40 6Z"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
d="M40 28H30C29 28 28 29 28 30V40C28 41 29 42 30 42H40C41 42 42 41 42 40V30C42 29 41 28 40 28Z"
|
|
17
|
+
/>
|
|
18
|
+
<path d="M12 27V45M3 36H21" />
|
|
19
|
+
</svg>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { defineComponent } from 'vue';
|
|
24
|
+
|
|
25
|
+
export default defineComponent({
|
|
26
|
+
name: 'AppstoreAddOutlined'
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg
|
|
3
|
+
viewBox="0 0 48 48"
|
|
4
|
+
fill="none"
|
|
5
|
+
stroke="currentColor"
|
|
6
|
+
stroke-width="4"
|
|
7
|
+
stroke-linecap="round"
|
|
8
|
+
>
|
|
9
|
+
<path
|
|
10
|
+
d="M18 6H8C7 6 6 7 6 8V18C6 19 7 20 8 20H18C19 20 20 19 20 18V8C20 7 19 6 18 6Z"
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
d="M40 6H30C29 6 28 7 28 8V18C28 19 29 20 30 20H40C41 20 42 19 42 18V8C42 7 41 6 40 6Z"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
d="M40 28H30C29 28 28 29 28 30V40C28 41 29 42 30 42H40C41 42 42 41 42 40V30C42 29 41 28 40 28Z"
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M18 28H8C7 28 6 29 6 30V40C6 41 7 42 8 42H18C19 42 20 41 20 40V30C20 29 19 28 18 28Z"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
import { defineComponent } from 'vue';
|
|
26
|
+
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
name: 'AppstoreOutlined'
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg
|
|
3
|
+
viewBox="0 0 48 48"
|
|
4
|
+
fill="none"
|
|
5
|
+
stroke="currentColor"
|
|
6
|
+
stroke-width="4"
|
|
7
|
+
stroke-linecap="round"
|
|
8
|
+
stroke-linejoin="round"
|
|
9
|
+
class="ele-arrow-down"
|
|
10
|
+
>
|
|
11
|
+
<path d="M10 17 24 31 38 17" />
|
|
12
|
+
</svg>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts">
|
|
16
|
+
import { defineComponent } from 'vue';
|
|
17
|
+
|
|
18
|
+
export default defineComponent({
|
|
19
|
+
name: 'ArrowDown'
|
|
20
|
+
});
|
|
21
|
+
</script>
|