sohelp-eleplus 1.1.17 → 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.
@@ -12,13 +12,12 @@
12
12
  @radioChange="onRadioChange"
13
13
  @cellClick.stop="onCellClick"
14
14
  >
15
- <template #searchSlot>
15
+ <template #keywords>
16
16
  <div class="search-wrap">
17
17
  <div class="search-box">
18
- <ele-tooltip :content="getKeywordsPlaceholder" placement="top" :offset="3">
18
+ <ele-tooltip content="请输入关键字按回车搜索." placement="top" :offset="3">
19
19
  <sohelp-input
20
20
  v-model="keywords"
21
- :placeholder="getKeywordsPlaceholder"
22
21
  clearable
23
22
  @keyup.enter="reload(gridOptions.params)"
24
23
  class="input-with-select"
@@ -47,446 +46,402 @@
47
46
  </div>
48
47
  </template>
49
48
 
50
- <script>
51
- import { EleMessage } from '@/components/ele-admin-plus/components';
52
- import { DragOutlined } from '@/components/icons';
53
- import { reactive, ref, nextTick, watch, computed } from 'vue';
54
- import DefaultProps from './DefaultProps';
55
- import initial from './SohelpGridConfig';
56
- import { Search } from '@element-plus/icons-vue';
57
-
58
- export default {
59
- name: 'SohelpVxeGrid',
60
- extends: [],
61
- props: DefaultProps,
62
- emits: [
63
- 'pageChange',
64
- 'checkboxAll',
65
- 'checkboxChange',
66
- 'toolbarButtonClick',
67
- 'menuClick',
68
- 'cellClick',
69
- 'pageChange',
70
- 'refresh',
71
- 'radioChange',
72
- 'update:value',
73
- 'update:value'
74
- ],
75
- setup(props, { emit }) {
76
- /**判断配置是否初始化完毕*/
77
- const isConfigInitialized = ref(false);
78
- const sohelpConfig = reactive({});
79
- const isPage = ref(false);
80
- const selectedValue = ref([]);
81
- const selectedData = ref([]);
82
- const keywords = ref('');
83
- const propertiesMap = reactive({});
84
-
85
- /**列表实例*/
86
- const sohelpVxeGridRef = ref(null);
87
- const gridOptions = reactive({});
88
- /**初始化配置*/
89
- initial(sohelpVxeGridRef, props)
90
- .then((config) => {
91
- /**配置刷新功能 */
92
- config.gridOptions = {
93
- ...config.gridOptions,
94
- toolbarConfig: {
95
- ...config.gridOptions?.toolbarConfig,
96
- refresh: true,
97
- zoom: true
98
- },
99
- proxyConfig: {
100
- ajax: {
101
- query: () => refresh() // 简写箭头函数
102
- }
103
- }
104
- };
105
-
106
- Object.assign(gridOptions, config.gridOptions);
107
- Object.assign(sohelpConfig, config.sohelpConfig);
108
- Object.assign(propertiesMap, config.propertiesMap);
109
-
110
- /**配置初始化完成*/
111
- isConfigInitialized.value = true;
112
- })
113
- .catch((e) => {
114
- EleMessage.error(e.message);
115
- });
116
-
117
- const getKeywordsPlaceholder = computed(() => {
118
- if (sohelpConfig?.filter?.keywords?.length) {
119
- return (
120
- '请输入关键 ' +
121
- sohelpConfig.filter.keywords
122
- .filter((key) => propertiesMap[key])
123
- .map((key) => propertiesMap[key].label)
124
- .join('、') +
125
- ' 进行查询'
126
- );
127
- }
128
- return '请输入关键字';
129
- });
130
-
131
- /**判断配置是否初始化完毕*/
132
- const isConfigDone = async () => {
133
- return new Promise((resolve) => {
134
- if (isConfigInitialized.value) {
135
- resolve();
136
- } else {
137
- let timer = setInterval(() => {
138
- if (isConfigInitialized.value) {
139
- clearInterval(timer);
140
- resolve();
141
- }
142
- }, 10);
143
- }
144
- });
145
- };
146
-
147
- /**根据参数加载数据*/
148
- const reload = async (param = {}) => {
149
- gridOptions.loading = true;
150
- gridOptions.params = param;
151
- //配置初始化完毕后,才可以执行刷新
152
- await isConfigDone();
153
- const $grid = sohelpVxeGridRef.value;
154
- if ($grid) {
155
- const url = props.url || sohelpConfig.requestValue;
156
- if (!url) {
157
- gridOptions.loading = false;
158
- return { results: [], total: 0 };
159
- }
160
-
161
- let pageConfig = {};
162
- // 是否分页
163
- if (gridOptions.pagerConfig?.enabled) {
164
- pageConfig.page = gridOptions.pagerConfig?.currentPage ?? 1;
165
- pageConfig.limit = gridOptions.pagerConfig?.pageSize ?? 50;
166
- }
167
-
168
- const res = await SohelpHttp.get(url, {
169
- ...param,
170
- keywords: keywords.value,
171
- ...pageConfig
172
- }).catch((e) => {
173
- gridOptions.loading = false;
174
- EleMessage.error(e);
175
- });
176
-
177
- gridOptions.loading = false;
178
- if (!res.meta.success) {
179
- EleMessage.error(res.meta.message);
180
- return { results: [], total: 0 };
181
- }
182
- $grid.loadData(res.data.results || res.data);
183
- if (gridOptions?.pagerConfig?.enabled) {
184
- gridOptions.pagerConfig.total = res.data.total;
185
- }
49
+ <script setup>
50
+ import { EleMessage } from "@/components/ele-admin-plus/components";
51
+ import { DragOutlined } from "../sohelp-icon-select/icons";
52
+ import { nextTick, onMounted, reactive, ref, watch } from "vue";
53
+ import { merge,cloneDeep } from "lodash-es"; // 正确导入
54
+ import DefaultProps from "./DefaultProps";
55
+ import { Search } from "@element-plus/icons-vue";
56
+ import DefaultGridOptions from "./DefaultGridOptions";
57
+
58
+ /**判断配置是否初始化完毕*/
59
+ const emit = defineEmits([
60
+ "filter",
61
+ "reset",
62
+ "pageChange",
63
+ "checkboxAll",
64
+ "checkboxChange",
65
+ "toolbarButtonClick",
66
+ "menuClick",
67
+ "cellClick",
68
+ "pageChange",
69
+ "refresh",
70
+ "radioChange",
71
+ "update:value",
72
+ "update:value"
73
+ ]);
74
+
75
+ const isPage = ref(false);
76
+ const selectedValue = ref([]);
77
+ const selectedData = ref([]);
78
+ const keywords = ref("");
79
+ const props = defineProps(cloneDeep(DefaultProps));
80
+
81
+ /**列表实例*/
82
+ const sohelpVxeGridRef = ref(null);
83
+
84
+ const gridOptions = reactive(cloneDeep(DefaultGridOptions));
85
+ if (props.gridOptions) {
86
+ merge(gridOptions, props.gridOptions);
87
+ }
88
+
89
+ /**根据URL动态加载数据**/
90
+ if (props.url) {
91
+ merge(gridOptions, {
92
+ proxyConfig: {
93
+ response: {
94
+ result: "result",
95
+ total: "page.total"
96
+ },
97
+ ajax: {
98
+ query: () => {
186
99
  }
187
- gridOptions.loading = false;
188
- initValue();
189
- };
100
+ }
101
+ }
102
+ });
103
+ }
190
104
 
191
- /**实现分页事件*/
192
- const pageChangeEvent = (page) => {
193
- isPage.value = true;
194
- gridOptions.pagerConfig.currentPage = page.currentPage;
195
- gridOptions.pagerConfig.pageSize = page.pageSize;
196
- emit('pageChange', page);
197
- };
198
105
 
199
- /**刷新数据*/
200
- const refresh = () => {
201
- if (!isPage.value) {
202
- keywords.value = '';
203
- if (gridOptions.pagerConfig && gridOptions.pagerConfig.enabled) {
204
- gridOptions.pagerConfig.currentPage = 1;
205
- } else {
206
- gridOptions.pagerConfig = {
207
- currentPage: 1
208
- };
209
- }
210
- //清空选中
211
- selectedValue.value = [];
212
- sohelpVxeGridRef.value?.clearCheckboxRow();
213
- emit('refresh');
214
- }
215
- isPage.value = false;
216
- const autoLoad = props.autoLoad || sohelpConfig?.autoLoad || true;
106
+ /**根据参数加载数据*/
107
+ const reload = async (param = {}) => {
108
+ emit("filter", param);
109
+ gridOptions.loading = true;
110
+ gridOptions.params = param;
111
+ //配置初始化完毕后,才可以执行刷新
217
112
 
218
- if (autoLoad) {
219
- reload({ ...gridOptions.params });
220
- }
221
- };
222
-
223
- /**
224
- * grid事件
225
- * @param param0
226
- */
227
- const menuEvents = async ({ menu, row, column, rowIndex }) => {
228
- const $grid = sohelpVxeGridRef.value;
229
- if ($grid) {
230
- $grid.setCurrentRow(row);
231
- switch (menu.code) {
232
- case 'insert':
233
- const { row } = await $grid.insertAt(
234
- {
235
- role_name: 'sales user'
236
- },
237
- rowIndex
238
- );
239
- break;
240
- }
241
- }
242
- };
113
+ const url = props.url;
114
+ if (!url) {
115
+ gridOptions.loading = false;
116
+ return { results: [], total: 0 };
117
+ }
243
118
 
244
- /**
245
- * 工具栏点击事件
246
- * @param params
247
- */
248
- const onToolbarButtonClick = (params) => {
249
- emit('toolbarButtonClick', params);
250
- };
119
+ let pageConfig = {};
120
+ // 是否分页
121
+ if (gridOptions.pagerConfig?.enabled) {
122
+ pageConfig.page = gridOptions.pagerConfig?.currentPage ?? 1;
123
+ pageConfig.limit = gridOptions.pagerConfig?.pageSize ?? 50;
124
+ }
251
125
 
252
- /**
253
- * checkbox 点击
254
- * @param params
255
- */
256
- const onCheckboxChange = (params) => {
257
- emit('checkboxChange', params);
258
- if (props.multiple) {
259
- setSelectedValue(params.row);
260
- updateData();
261
- }
262
- };
126
+ const res = await SohelpHttp.get(url, {
127
+ ...param,
128
+ keywords: keywords.value,
129
+ ...pageConfig
130
+ }).catch((e) => {
131
+ gridOptions.loading = false;
132
+ EleMessage.error(e);
133
+ });
134
+
135
+ gridOptions.loading = false;
136
+ if (!res.meta.success) {
137
+ EleMessage.error(res.meta.message);
138
+ return { results: [], total: 0 };
139
+ }
140
+ const $grid = sohelpVxeGridRef.value;
141
+ $grid.loadData(res.data.results || res.data);
142
+ if (gridOptions?.pagerConfig?.enabled) {
143
+ gridOptions.pagerConfig.total = res.data.total;
144
+ }
263
145
 
264
- /**
265
- * 获取表格当前页数据
266
- */
267
- const getTableData = () => {
268
- return JSON.parse(JSON.stringify(sohelpVxeGridRef.value?.getTableData().tableData));
146
+ gridOptions.loading = false;
147
+ initValue();
148
+ };
149
+
150
+
151
+ /**实现分页事件*/
152
+ const pageChangeEvent = (page) => {
153
+ isPage.value = true;
154
+ gridOptions.pagerConfig.currentPage = page.currentPage;
155
+ gridOptions.pagerConfig.pageSize = page.pageSize;
156
+ emit("pageChange", page);
157
+ };
158
+
159
+ /**刷新数据*/
160
+ const refresh = () => {
161
+ if (!isPage.value) {
162
+ keywords.value = "";
163
+ if (gridOptions.pagerConfig && gridOptions.pagerConfig.enabled) {
164
+ gridOptions.pagerConfig.currentPage = 1;
165
+ } else {
166
+ gridOptions.pagerConfig = {
167
+ currentPage: 1
269
168
  };
169
+ }
170
+ //清空选中
171
+ selectedValue.value = [];
172
+ sohelpVxeGridRef.value?.clearCheckboxRow();
173
+ emit("refresh");
174
+ }
175
+ isPage.value = false;
176
+ reload({ ...gridOptions.params });
177
+ };
178
+
179
+ /**
180
+ * grid事件
181
+ * @param param0
182
+ */
183
+ const menuEvents = async ({ menu, row, column, rowIndex }) => {
184
+ const $grid = sohelpVxeGridRef.value;
185
+ if ($grid) {
186
+ $grid.setCurrentRow(row);
187
+ }
188
+ };
189
+
190
+ /**
191
+ * 工具栏点击事件
192
+ * @param params
193
+ */
194
+ const onToolbarButtonClick = (params) => {
195
+ emit("toolbarButtonClick", params);
196
+ };
197
+
198
+ /**
199
+ * checkbox 点击
200
+ * @param params
201
+ */
202
+ const onCheckboxChange = (params) => {
203
+ emit("checkboxChange", params);
204
+ if (props.multiple) {
205
+ setSelectedValue(params.row);
206
+ updateData();
207
+ }
208
+ };
209
+
210
+ /**
211
+ * 获取表格当前页数据
212
+ */
213
+ const getTableData = () => {
214
+ return JSON.parse(JSON.stringify(sohelpVxeGridRef.value?.getTableData().tableData));
215
+ };
216
+
217
+ /**
218
+ * 全选、取消全选 更新value,data值
219
+ * @param param0
220
+ */
221
+ const onCheckboxAllChange = (params) => {
222
+ const data = getTableData();
223
+ const ids = data.map((item) => item.id);
224
+ if (params.checked) {
225
+ selectedValue.value = [...new Set([...selectedValue.value, ...ids])];
226
+ selectedData.value = Array.from(
227
+ [...selectedData.value, ...data].reduce((map, item) => map.set(item.id, item), new Map()).values()
228
+ );
229
+ } else {
230
+ selectedValue.value = selectedValue.value.filter((item) => !ids.includes(item));
231
+ }
270
232
 
271
- /**
272
- * 全选、取消全选 更新value,data值
273
- * @param param0
274
- */
275
- const onCheckboxAllChange = (params) => {
276
- const data = getTableData();
277
- const ids = data.map((item) => item.id);
278
- if (params.checked) {
279
- selectedValue.value = [...new Set([...selectedValue.value, ...ids])];
280
- selectedData.value = Array.from(
281
- [...selectedData.value, ...data].reduce((map, item) => map.set(item.id, item), new Map()).values()
282
- );
283
- } else {
284
- selectedValue.value = selectedValue.value.filter((item) => !ids.includes(item));
285
- }
286
-
287
- emit('checkboxAll', params);
288
- updateData();
289
- };
233
+ emit("checkboxAll", params);
234
+ updateData();
235
+ };
236
+
237
+ /**
238
+ * checkbox row click selectValue, selectedData设置是否选中
239
+ * @param row
240
+ */
241
+ const setSelectedValue = (row) => {
242
+ let idx = selectedValue.value.findIndex((id) => id === row.id);
243
+ if (idx != -1) {
244
+ selectedValue.value.splice(idx, 1);
245
+ } else {
246
+ selectedValue.value.push(row.id);
247
+ let _idx = selectedData.value.findIndex((item) => item.id === row.id);
248
+ if (_idx === -1) {
249
+ selectedData.value.push({ ...row });
250
+ }
251
+ }
252
+ };
253
+
254
+ /**
255
+ * 行点击
256
+ * @param params
257
+ */
258
+ const onCellClick = (params) => {
259
+ emit("cellClick", params);
260
+ };
261
+
262
+ /**
263
+ *
264
+ * @param params 单选框点击
265
+ */
266
+ const onRadioChange = (params) => {
267
+ emit("radioChange", params);
268
+ if (!props.multiple) {
269
+ clear();
270
+ const row = sohelpVxeGridRef.value?.getRadioRecord();
271
+ if (row) {
272
+ selectedValue.value = [row.id];
273
+ selectedData.value = Array.from(
274
+ new Map([row, ...selectedData.value].map((item) => [item.id, item])).values()
275
+ );
276
+ } else {
277
+ selectedData.value = props.data;
278
+ selectedValue.value = [];
279
+ }
290
280
 
291
- /**
292
- * checkbox row click selectValue, selectedData设置是否选中
293
- * @param row
294
- */
295
- const setSelectedValue = (row) => {
296
- let idx = selectedValue.value.findIndex((id) => id === row.id);
297
- if (idx != -1) {
298
- selectedValue.value.splice(idx, 1);
299
- } else {
300
- selectedValue.value.push(row.id);
301
- let _idx = selectedData.value.findIndex((item) => item.id === row.id);
302
- if (_idx === -1) {
303
- selectedData.value.push({ ...row });
304
- }
305
- }
306
- };
281
+ updateData();
282
+ }
283
+ };
284
+
285
+ /**
286
+ * 更新value,data
287
+ */
288
+ const updateData = () => {
289
+ emit("update:value", [...selectedValue.value]);
290
+ emit("update:data", [...selectedData.value]);
291
+ };
292
+
293
+ /**grid 事件处理 */
294
+ const gridEvents = {
295
+ cellMenu({ row, rowIndex }) {
296
+ const $grid = sohelpVxeGridRef.value;
297
+ if ($grid) {
298
+ $grid.setCurrentRow(row);
299
+ }
300
+ },
301
+ menuClick({ menu, column, row, rowIndex }) {
302
+ const $grid = sohelpVxeGridRef.value;
303
+ if ($grid) {
304
+ switch (menu.code) {
305
+ case "insert":
306
+ // $grid.insert();
307
+ $grid.insertAt({}, rowIndex);
308
+
309
+ let _table = $grid.getTableData();
310
+
311
+ break;
312
+ case "copy":
313
+ break;
314
+ }
307
315
 
308
- /**
309
- * 行点击
310
- * @param params
311
- */
312
- const onCellClick = (params) => {
313
- emit('cellClick', params);
314
- };
316
+ emit("menuClick", $grid, code);
317
+ }
318
+ }
319
+ };
320
+
321
+ const loadData = (data) => {
322
+ const $grid = sohelpVxeGridRef.value;
323
+ $grid.loadData(data);
324
+ };
325
+
326
+ /**
327
+ * 数据回显
328
+ */
329
+ const initValue = () => {
330
+ nextTick(() => {
331
+ const $grid = sohelpVxeGridRef.value;
332
+ if ($grid && selectedValue.value.length) {
333
+ setTimeout(() => {
334
+ $grid.setCheckboxRowKey(selectedValue.value, true);
335
+ }, 100);
336
+ }
337
+ });
338
+ };
315
339
 
316
- /**
317
- *
318
- * @param params 单选框点击
319
- */
320
- const onRadioChange = (params) => {
321
- emit('radioChange', params);
322
- if (!props.multiple) {
323
- clear();
324
- const row = sohelpVxeGridRef.value?.getRadioRecord();
325
- if (row) {
326
- selectedValue.value = [row.id];
327
- selectedData.value = Array.from(
328
- new Map([row, ...selectedData.value].map((item) => [item.id, item])).values()
329
- );
330
- } else {
331
- selectedData.value = props.data;
332
- selectedValue.value = [];
333
- }
340
+ onMounted(() => {
341
+ if (props.autoLoad) {
342
+ reload({});
343
+ }
344
+ });
345
+
346
+ /**
347
+ * 清空
348
+ */
349
+ const clear = () => {
350
+ const $grid = sohelpVxeGridRef.value;
351
+ $grid?.clearCheckboxReserve();
352
+ $grid?.clearCheckboxRow();
353
+ $grid.clearSelected();
354
+ };
355
+
356
+ const getSelection = () => {
357
+ return sohelpVxeGridRef.value?.getCheckboxRecords() || [];
358
+ };
359
+
360
+ watch(
361
+ () => props.value,
362
+ (val) => {
363
+ let arr = Array.isArray(val) ? val : val ? [val] : [];
364
+ selectedValue.value = props.multiple ? [...arr] : [arr[0]];
365
+ if (props.data && props.data?.length > 0) {
366
+ selectedData.value = [...props.data];
367
+ }
368
+ },
369
+ {
370
+ immediate: true
371
+ }
372
+ );
373
+
374
+ defineExpose({
375
+ $grid: sohelpVxeGridRef,
376
+ getSelection,
377
+ gridOptions,
378
+ loadData,
379
+ refresh,
380
+ reload,
381
+ pageChangeEvent,
382
+ gridEvents,
383
+ menuEvents,
384
+ onToolbarButtonClick,
385
+ onCheckboxChange,
386
+ onCellClick,
387
+ onCheckboxAllChange,
388
+ onRadioChange,
389
+ selectedData,
390
+ selectedValue,
391
+ updateData,
392
+ initValue,
393
+ clear,
394
+ getTableData,
395
+ keywords,
396
+ clearRadioRow: () => {
397
+ sohelpVxeGridRef.value.clearRadioRow();
398
+ }
399
+ });
400
+ </script>
401
+ <script>
402
+ export default {
403
+ name: "SohelpVxeGrid"
404
+ };
405
+ </script>
334
406
 
335
- updateData();
336
- }
337
- };
407
+ <style lang="scss" scoped>
408
+ .sohelp-vxe-grid {
409
+ width: 100%;
410
+ height: 100%;
411
+ box-sizing: border-box;
338
412
 
339
- /**
340
- * 更新value,data
341
- */
342
- const updateData = () => {
343
- emit('update:value', [...selectedValue.value]);
344
- emit('update:data', [...selectedData.value]);
345
- };
413
+ :deep(.vxe-grid) {
414
+ height: 100%;
415
+ width: 100%;
416
+ min-width: 100px;
346
417
 
347
- /**grid 事件处理 */
348
- const gridEvents = {
349
- cellMenu({ row, rowIndex }) {
350
- const $grid = sohelpVxeGridRef.value;
351
- if ($grid) {
352
- $grid.setCurrentRow(row);
353
- }
354
- },
355
- menuClick({ menu, column, row, rowIndex }) {
356
- const $grid = sohelpVxeGridRef.value;
357
- if ($grid) {
358
- switch (menu.code) {
359
- case 'insert':
360
- // $grid.insert();
361
- $grid.insertAt({}, rowIndex);
362
-
363
- let _table = $grid.getTableData();
364
-
365
- break;
366
- case 'copy':
367
- break;
368
- }
418
+ .vxe-grid--layout-body-content-wrapper {
419
+ display: flex;
420
+ flex-direction: column;
369
421
 
370
- emit('menuClick', $grid, code);
371
- }
422
+ .vxe-grid--toolbar-wrapper {
423
+ .vxe-toolbar {
424
+ box-sizing: border-box;
425
+ padding: 0 5px 5px 5px;
372
426
  }
373
- };
374
-
375
- const loadData = (data) =>{
376
- const $grid = sohelpVxeGridRef.value;
377
- $grid.loadData(data);
378
427
  }
379
428
 
380
- /**
381
- * 数据回显
382
- */
383
- const initValue = () => {
384
- nextTick(() => {
385
- const $grid = sohelpVxeGridRef.value;
386
- if ($grid && selectedValue.value.length) {
387
- setTimeout(() => {
388
- $grid.setCheckboxRowKey(selectedValue.value, true);
389
- }, 100);
390
- }
391
- });
392
- };
429
+ .vxe-grid--table-container {
430
+ flex: 1;
431
+ height: 100%;
393
432
 
394
- /**
395
- * 清空
396
- */
397
- const clear = () => {
398
- const $grid = sohelpVxeGridRef.value;
399
- $grid?.clearCheckboxReserve();
400
- $grid?.clearCheckboxRow();
401
- $grid.clearSelected();
402
- };
433
+ .vxe-table {
434
+ height: 100%;
403
435
 
404
- const getSelection = () => {
405
- return sohelpVxeGridRef.value?.getCheckboxRecords() || []
406
- };
436
+ .vxe-table--render-wrapper {
437
+ height: 100%;
407
438
 
408
- watch(
409
- () => props.value,
410
- (val) => {
411
- let arr = Array.isArray(val) ? val : val ? [val] : [];
412
- selectedValue.value = props.multiple ? [...arr] : [arr[0]];
413
- if (props.data && props.data?.length > 0) {
414
- selectedData.value = [...props.data];
415
- }
416
- },
417
- {
418
- immediate: true
419
- }
420
- );
439
+ .vxe-table--layout-wrapper {
440
+ height: calc(100% - 10px);
421
441
 
422
- return {
423
- getSelection,
424
- gridOptions,
425
- loadData,
426
- sohelpVxeGridRef,
427
- DragOutlined,
428
- refresh,
429
- reload,
430
- pageChangeEvent,
431
- gridEvents,
432
- menuEvents,
433
- onToolbarButtonClick,
434
- onCheckboxChange,
435
- onCellClick,
436
- onCheckboxAllChange,
437
- onRadioChange,
438
- selectedData,
439
- selectedValue,
440
- updateData,
441
- initValue,
442
- clear,
443
- getTableData,
444
- keywords,
445
- Search,
446
- getKeywordsPlaceholder,
447
- propertiesMap,
448
- clearRadioRow: () => {
449
- sohelpVxeGridRef.value.clearRadioRow();
450
- }
451
- };
452
- }
453
- };
454
- </script>
455
-
456
- <style lang="scss" scoped>
457
- .sohelp-vxe-grid {
458
- width: 100%;
459
- height: 100%;
460
- box-sizing: border-box;
461
- :deep(.vxe-grid) {
462
- height: 100%;
463
- width: 100%;
464
- min-width: 100px;
465
-
466
- .vxe-grid--layout-body-content-wrapper {
467
- display: flex;
468
- flex-direction: column;
469
-
470
- .vxe-grid--toolbar-wrapper {
471
- .vxe-toolbar {
472
- box-sizing: border-box;
473
- padding: 0 5px 5px 5px;
474
- }
475
- }
476
-
477
- .vxe-grid--table-container {
478
- flex: 1;
479
- height: 100%;
480
- .vxe-table {
481
- height: 100%;
482
- .vxe-table--render-wrapper {
483
- height: 100%;
484
- .vxe-table--layout-wrapper {
485
- height: calc(100% - 10px);
486
- .col--selected {
487
- //去除单元格选中效果
488
- box-shadow: none;
489
- }
442
+ .col--selected {
443
+ //去除单元格选中效果
444
+ box-shadow: none;
490
445
  }
491
446
  }
492
447
  }
@@ -494,25 +449,27 @@
494
449
  }
495
450
  }
496
451
  }
497
-
498
- .drag-btn {
499
- cursor: move;
500
- font-size: 12px;
501
- }
502
-
503
- .vxe-body--row.sortable-ghost,
504
- .vxe-body--row.sortable-chosen {
505
- background-color: #dfecfb;
506
- }
507
-
508
- .search-wrap {
509
- display: flex;
510
- align-items: center;
511
- justify-content: flex-start;
512
- gap: 10px;
513
- margin-right: 10px;
514
- .search-box {
515
- width: 200px;
516
- }
452
+ }
453
+
454
+ .drag-btn {
455
+ cursor: move;
456
+ font-size: 12px;
457
+ }
458
+
459
+ .vxe-body--row.sortable-ghost,
460
+ .vxe-body--row.sortable-chosen {
461
+ background-color: #dfecfb;
462
+ }
463
+
464
+ .search-wrap {
465
+ display: flex;
466
+ align-items: center;
467
+ justify-content: flex-start;
468
+ gap: 10px;
469
+ margin-right: 10px;
470
+
471
+ .search-box {
472
+ width: 200px;
517
473
  }
474
+ }
518
475
  </style>