|
|
@@ -1,51 +1,53 @@
|
|
1
|
1
|
import type { FormSchemaGetter } from '#/adapter/form';
|
|
2
|
2
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
3
|
|
-
|
|
4
|
|
-// import { selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
|
|
5
|
|
-import { queryGasStationList } from '#/api/schedule/index';
|
|
|
3
|
+import { selectAllSysStationAreaList } from '#/api/system/infoEntry/stationInfo/stationInfo';
|
|
|
4
|
+// import { queryGasStationList } from '#/api/schedule/index';
|
|
6
|
5
|
import { queryrclassesApilist } from '#/api/schedule/work/classes';
|
|
7
|
|
-import { useAuthStore } from '#/store/auth';
|
|
|
6
|
+import { useUserStore } from '@vben/stores';
|
|
|
7
|
+const userStore = useUserStore();
|
|
|
8
|
+const getstationId = userStore.userInfo?.stations?.[0]?.id;
|
|
8
|
9
|
|
|
9
|
|
-const getstationId = useAuthStore().userStore?.userInfo?.stations[0]?.id;
|
|
10
|
|
-export const querySchema: FormSchemaGetter = () => [
|
|
11
|
|
- {
|
|
12
|
|
- component: 'ApiSelect',
|
|
13
|
|
- componentProps: {
|
|
14
|
|
- api: queryGasStationList,
|
|
15
|
|
- labelField: 'stationName',
|
|
16
|
|
- valueField: 'stationId',
|
|
17
|
|
- placeholder: '请选择油站',
|
|
18
|
|
- clearable: true,
|
|
|
10
|
+export const querySchema: FormSchemaGetter = () => {
|
|
|
11
|
+ return [
|
|
|
12
|
+ {
|
|
|
13
|
+ component: 'ApiSelect',
|
|
|
14
|
+ componentProps: {
|
|
|
15
|
+ api: selectAllSysStationAreaList,
|
|
|
16
|
+ labelField: 'stationName',
|
|
|
17
|
+ valueField: 'id',
|
|
|
18
|
+ placeholder: '请选择油站',
|
|
|
19
|
+ clearable: true,
|
|
|
20
|
+ },
|
|
|
21
|
+ fieldName: 'stationName',
|
|
|
22
|
+ defaultValue: getstationId,
|
|
|
23
|
+ label: '油站',
|
|
19
|
24
|
},
|
|
20
|
|
- fieldName: 'stationId',
|
|
21
|
|
- defaultValue: getstationId,
|
|
22
|
|
- label: '油站',
|
|
23
|
|
- },
|
|
24
|
|
- {
|
|
25
|
|
- component: 'ApiSelect',
|
|
26
|
|
- componentProps: {
|
|
27
|
|
- api: queryrclassesApilist,
|
|
28
|
|
- labelField: 'shiftName',
|
|
29
|
|
- valueField: 'shiftName',
|
|
30
|
|
- placeholder: '请选择班次名称',
|
|
31
|
|
- clearable: true,
|
|
32
|
|
- resultField: 'rows',
|
|
|
25
|
+ {
|
|
|
26
|
+ component: 'ApiSelect',
|
|
|
27
|
+ componentProps: {
|
|
|
28
|
+ api: queryrclassesApilist,
|
|
|
29
|
+ labelField: 'shiftName',
|
|
|
30
|
+ valueField: 'shiftName',
|
|
|
31
|
+ placeholder: '请选择班次名称',
|
|
|
32
|
+ clearable: true,
|
|
|
33
|
+ resultField: 'rows',
|
|
|
34
|
+ },
|
|
|
35
|
+ fieldName: 'shiftName',
|
|
|
36
|
+ label: '班次名称',
|
|
33
|
37
|
},
|
|
34
|
|
- fieldName: 'shiftName',
|
|
35
|
|
- label: '班次名称',
|
|
36
|
|
- },
|
|
37
|
|
- {
|
|
38
|
|
- component: 'DatePicker',
|
|
39
|
|
- componentProps: {
|
|
40
|
|
- type: 'datetime',
|
|
41
|
|
- format: 'YYYY-MM-DD',
|
|
42
|
|
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
43
|
|
- placeholder: '选择时间',
|
|
|
38
|
+ {
|
|
|
39
|
+ component: 'DatePicker',
|
|
|
40
|
+ componentProps: {
|
|
|
41
|
+ type: 'datetime',
|
|
|
42
|
+ format: 'YYYY-MM-DD',
|
|
|
43
|
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
44
|
+ placeholder: '选择时间',
|
|
|
45
|
+ },
|
|
|
46
|
+ fieldName: 'startTime',
|
|
|
47
|
+ label: '上班时间',
|
|
44
|
48
|
},
|
|
45
|
|
- fieldName: 'startTime',
|
|
46
|
|
- label: '上班时间',
|
|
47
|
|
- },
|
|
48
|
|
-];
|
|
|
49
|
+ ];
|
|
|
50
|
+};
|
|
49
|
51
|
|
|
50
|
52
|
export const columns: VxeGridProps['columns'] = [
|
|
51
|
53
|
{
|