chenxiaochao hace 2 meses
padre
commit
ebc29e6bcb

+ 249 - 0
apps/web-ele/src/views/Archive/OPM/COS/config-data.tsx

@@ -0,0 +1,249 @@
1
+import type { FormSchemaGetter } from '#/adapter/form';
2
+import type { VxeGridProps } from '#/adapter/vxe-table';
3
+import { DictEnum } from '@vben/constants';
4
+import { getDictOptions } from '#/utils/dict';
5
+export const querySchema: FormSchemaGetter = () => [
6
+  {
7
+    component: 'Select',
8
+    componentProps: {
9
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
10
+    },
11
+    fieldName: 'IGasstationstatus',
12
+    label: '我方油站',
13
+  },
14
+  {
15
+    component: 'Select',
16
+    componentProps: {
17
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
18
+    },
19
+    fieldName: 'youGasstationstatus',
20
+    label: '竟对油站',
21
+  },
22
+  {
23
+    component: 'Select',
24
+    componentProps: {
25
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
26
+    },
27
+    fieldName: 'Status',
28
+    label: '状态',
29
+  },
30
+  {
31
+    component: 'DatePicker',
32
+    componentProps: {
33
+      type: 'daterange',
34
+      format: 'YYYY-MM-DD',
35
+      valueFormat: 'YYYY-MM-DD',
36
+      startPlaceholder: '开始日期',
37
+      endPlaceholder: '结束日期',
38
+    },
39
+    fieldName: 'Time',
40
+    label: '时间',
41
+  },
42
+  {
43
+    component: 'Select',
44
+    componentProps: {
45
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
46
+    },
47
+    fieldName: 'Commentstatus',
48
+    label: '评论',
49
+  },
50
+  {
51
+    component: 'Select',
52
+    componentProps: {
53
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
54
+    },
55
+    fieldName: 'PositionStatus',
56
+    label: '岗位',
57
+  },
58
+  {
59
+    component: 'Select',
60
+    componentProps: {
61
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
62
+    },
63
+    fieldName: 'CreateStatus',
64
+    label: '创建',
65
+  },
66
+  {
67
+    component: 'Select',
68
+    componentProps: {
69
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
70
+    },
71
+    fieldName: 'executorStatus',
72
+    label: '执行人',
73
+  },
74
+];
75
+
76
+export const columns: VxeGridProps['columns'] = [
77
+  {
78
+    field: 'action',
79
+    fixed: 'left',
80
+    slots: { default: 'action' },
81
+    resizable: false,
82
+    title: '操作',
83
+    width: 180,
84
+  },
85
+  {
86
+    title: '处理时间',
87
+    fixed: 'left',
88
+    field: 'ProcessingTime',
89
+    minWidth: 130,
90
+  },
91
+  {
92
+    title: '我方油站',
93
+    fixed: 'left',
94
+    field: 'IGasstationstatus',
95
+    minWidth: 130,
96
+  },
97
+  {
98
+    title: '竟对油站',
99
+    fixed: 'left',
100
+    field: 'youGasstationstatus',
101
+    minWidth: 130,
102
+  },
103
+
104
+  {
105
+    title: '汽油车',
106
+    field: 'Gasolinecar',
107
+    // minWidth: 130,
108
+    children: [
109
+      {
110
+        title: '进站车次',
111
+        field: 'GasArrivingTrains',
112
+        minWidth: 130,
113
+      },
114
+      {
115
+        title: '加油升数差',
116
+        field: 'GasOilNumber',
117
+        minWidth: 130,
118
+      },
119
+    ],
120
+  },
121
+  {
122
+    title: '柴油车',
123
+    field: 'dieselcar',
124
+    // minWidth: 130,
125
+    children: [
126
+      {
127
+        title: '进站车次',
128
+        field: 'dieArrivingTrains',
129
+        minWidth: 130,
130
+      },
131
+      {
132
+        title: '加油升数差',
133
+        field: 'dieOilNumber',
134
+        minWidth: 130,
135
+      },
136
+    ],
137
+  },
138
+  {
139
+    title: '摩托车',
140
+    field: 'Motorcycle',
141
+    // minWidth: 130,
142
+    children: [
143
+      {
144
+        title: '进站车次',
145
+        field: 'MotoArrivingTrains',
146
+        minWidth: 130,
147
+      },
148
+      {
149
+        title: '加油升数差',
150
+        field: 'MotoOilNumber',
151
+        minWidth: 130,
152
+      },
153
+    ],
154
+  },
155
+  {
156
+    title: '气车',
157
+    field: 'pneumaticcar',
158
+    // minWidth: 130,
159
+    children: [
160
+      {
161
+        title: '进站车次',
162
+        field: 'pneuArrivingTrains',
163
+        minWidth: 130,
164
+      },
165
+      {
166
+        title: '加油升数差',
167
+        field: 'pneuOilNumber',
168
+        minWidth: 130,
169
+      },
170
+    ],
171
+  },
172
+  {
173
+    title: '时段预测销量差(升)',
174
+    field: 'TimePredictionSales',
175
+    minWidth: 170,
176
+  },
177
+];
178
+export const mockData = [
179
+  {
180
+    ProcessingTime: '2024-06-01 08:00:00',
181
+    IGasstationstatus: '正常营业',
182
+    youGasstationstatus: '促销中',
183
+    GasArrivingTrains: 320,
184
+    GasOilNumber: -120,
185
+    dieArrivingTrains: 180,
186
+    dieOilNumber: -80,
187
+    MotoArrivingTrains: 90,
188
+    MotoOilNumber: -35,
189
+    pneuArrivingTrains: 50,
190
+    pneuOilNumber: -20,
191
+    TimePredictionSales: -355,
192
+  },
193
+  {
194
+    ProcessingTime: '2024-06-01 09:15:00',
195
+    IGasstationstatus: '库存预警',
196
+    youGasstationstatus: '正常营业',
197
+    GasArrivingTrains: 380,
198
+    GasOilNumber: -150,
199
+    dieArrivingTrains: 210,
200
+    dieOilNumber: -95,
201
+    MotoArrivingTrains: 105,
202
+    MotoOilNumber: -42,
203
+    pneuArrivingTrains: 60,
204
+    pneuOilNumber: -25,
205
+    TimePredictionSales: -312,
206
+  },
207
+  {
208
+    ProcessingTime: '2024-06-01 10:30:00',
209
+    IGasstationstatus: '正常营业',
210
+    youGasstationstatus: '降价促销',
211
+    GasArrivingTrains: 310,
212
+    GasOilNumber: -135,
213
+    dieArrivingTrains: 170,
214
+    dieOilNumber: -78,
215
+    MotoArrivingTrains: 98,
216
+    MotoOilNumber: -40,
217
+    pneuArrivingTrains: 55,
218
+    pneuOilNumber: -22,
219
+    TimePredictionSales: -275,
220
+  },
221
+  {
222
+    ProcessingTime: '2024-06-01 11:45:00',
223
+    IGasstationstatus: '设备维护',
224
+    youGasstationstatus: '正常营业',
225
+    GasArrivingTrains: 340,
226
+    GasOilNumber: -160,
227
+    dieArrivingTrains: 200,
228
+    dieOilNumber: -88,
229
+    MotoArrivingTrains: 110,
230
+    MotoOilNumber: -45,
231
+    pneuArrivingTrains: 65,
232
+    pneuOilNumber: -28,
233
+    TimePredictionSales: -321,
234
+  },
235
+  {
236
+    ProcessingTime: '2024-06-01 13:00:00',
237
+    IGasstationstatus: '正常营业',
238
+    youGasstationstatus: '会员日',
239
+    GasArrivingTrains: 410,
240
+    GasOilNumber: -185,
241
+    dieArrivingTrains: 225,
242
+    dieOilNumber: -105,
243
+    MotoArrivingTrains: 120,
244
+    MotoOilNumber: -52,
245
+    pneuArrivingTrains: 70,
246
+    pneuOilNumber: -30,
247
+    TimePredictionSales: -372,
248
+  },
249
+];

+ 101 - 0
apps/web-ele/src/views/Archive/OPM/COS/index.vue

@@ -0,0 +1,101 @@
1
+<template>
2
+  <Page :auto-content-height="true">
3
+    <BasicTable>
4
+      <template #toolbar-tools>
5
+        <el-button type="primary" plain>导出</el-button>
6
+        <el-button @click="() => (showSearchForm = !showSearchForm)">
7
+          展开/折叠
8
+        </el-button>
9
+      </template>
10
+      <template #action="{ row }">
11
+        <el-button
12
+          size="small"
13
+          type="primary"
14
+          plain
15
+          @click="() => handleTaskClick(row.taskId)"
16
+          >查看</el-button
17
+        >
18
+      </template>
19
+    </BasicTable>
20
+  </Page>
21
+</template>
22
+<script setup lang="ts">
23
+import { ref } from 'vue';
24
+import { useRouter } from 'vue-router';
25
+import { Page } from '@vben/common-ui';
26
+import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
27
+import { columns, querySchema } from './config-data';
28
+import type { VbenFormProps } from '@vben/common-ui';
29
+import { mockData } from './config-data';
30
+const showSearchForm = ref(true) as any;
31
+const router = useRouter();
32
+const formOptions: VbenFormProps = {
33
+  commonConfig: {
34
+    labelWidth: 80,
35
+    componentProps: {
36
+      allowClear: true,
37
+    },
38
+  },
39
+  schema: querySchema(),
40
+  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
41
+  // 日期选择格式化
42
+  // fieldMappingTime: [
43
+  //   [
44
+  //     'createTime',
45
+  //     ['params[beginTime]', 'params[endTime]'],
46
+  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
47
+  //   ],
48
+  // ],
49
+};
50
+
51
+// 列表中显示配置
52
+const gridOptions: VxeGridProps = {
53
+  checkboxConfig: {
54
+    // 高亮
55
+    highlight: true,
56
+    // 翻页时保留选中状态
57
+    reserve: true,
58
+    // 点击行选中
59
+    trigger: 'default',
60
+    checkMethod: ({ row }) => row?.roleId !== 1,
61
+  },
62
+  columns,
63
+  size: 'medium',
64
+  height: 'auto',
65
+  data: mockData,
66
+  // proxyConfig: {
67
+  //   ajax: {
68
+  //     query: async ({ page }, formValues = {}) => {
69
+  //       const resp = await getRoleList({
70
+  //         ...formValues,
71
+  //         pageNum: page.currentPage,
72
+  //         pageSize: page.pageSize,
73
+  //       });
74
+  //       return { items: resp.rows, total: resp.total };
75
+  //     },
76
+  //   },
77
+  // },
78
+  rowConfig: {
79
+    keyField: 'roleId',
80
+  },
81
+  toolbarConfig: {
82
+    custom: true,
83
+    refresh: true,
84
+    zoom: true,
85
+  },
86
+  id: 'system-role-index',
87
+};
88
+const [BasicTable, BasicTableApi] = useVbenVxeGrid({
89
+  showSearchForm,
90
+  formOptions,
91
+  gridOptions,
92
+});
93
+const handleTaskClick = (taskId: number) => {
94
+  router.push(`/schedule/detail/${taskId}`);
95
+};
96
+</script>
97
+<style scoped lang="scss">
98
+:deep(.el-tooltip__trigger:focus) {
99
+  outline: none;
100
+}
101
+</style>

+ 212 - 0
apps/web-ele/src/views/Archive/OPM/CPS/config-data.tsx

@@ -0,0 +1,212 @@
1
+import type { FormSchemaGetter } from '#/adapter/form';
2
+import type { VxeGridProps } from '#/adapter/vxe-table';
3
+import { DictEnum } from '@vben/constants';
4
+import { getDictOptions } from '#/utils/dict';
5
+export const querySchema: FormSchemaGetter = () => [
6
+  {
7
+    component: 'Select',
8
+    componentProps: {
9
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
10
+    },
11
+    fieldName: 'IGasstationstatus',
12
+    label: '我方油站',
13
+  },
14
+  {
15
+    component: 'Select',
16
+    componentProps: {
17
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
18
+    },
19
+    fieldName: 'youGasstationstatus',
20
+    label: '竟对油站',
21
+  },
22
+  {
23
+    component: 'Select',
24
+    componentProps: {
25
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
26
+    },
27
+    fieldName: 'Status',
28
+    label: '状态',
29
+  },
30
+  {
31
+    component: 'DatePicker',
32
+    componentProps: {
33
+      type: 'daterange',
34
+      format: 'YYYY-MM-DD',
35
+      valueFormat: 'YYYY-MM-DD',
36
+      startPlaceholder: '开始日期',
37
+      endPlaceholder: '结束日期',
38
+    },
39
+    fieldName: 'Time',
40
+    label: '时间',
41
+  },
42
+  {
43
+    component: 'Select',
44
+    componentProps: {
45
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
46
+    },
47
+    fieldName: 'Commentstatus',
48
+    label: '评论',
49
+  },
50
+  {
51
+    component: 'Select',
52
+    componentProps: {
53
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
54
+    },
55
+    fieldName: 'PositionStatus',
56
+    label: '岗位',
57
+  },
58
+  {
59
+    component: 'Select',
60
+    componentProps: {
61
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
62
+    },
63
+    fieldName: 'CreateStatus',
64
+    label: '创建',
65
+  },
66
+  {
67
+    component: 'Select',
68
+    componentProps: {
69
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
70
+    },
71
+    fieldName: 'executorStatus',
72
+    label: '执行人',
73
+  },
74
+];
75
+
76
+export const columns: VxeGridProps['columns'] = [
77
+  {
78
+    field: 'action',
79
+    fixed: 'left',
80
+    slots: { default: 'action' },
81
+    resizable: false,
82
+    title: '操作',
83
+    width: 180,
84
+  },
85
+  {
86
+    title: '处理时间',
87
+    fixed: 'left',
88
+    field: 'ProcessingTime',
89
+    minWidth: 130,
90
+  },
91
+  {
92
+    title: '我方油站',
93
+    fixed: 'left',
94
+    field: 'IGasstationstatus',
95
+    minWidth: 130,
96
+  },
97
+  {
98
+    title: '竟对油站',
99
+    fixed: 'left',
100
+    field: 'youGasstationstatus',
101
+    minWidth: 130,
102
+  },
103
+  {
104
+    title: '油站性质',
105
+    field: 'GasstationNature',
106
+    minWidth: 130,
107
+  },
108
+  {
109
+    title: '竞争关系',
110
+    field: 'Competitiverelationship',
111
+    minWidth: 130,
112
+  },
113
+  {
114
+    title: '距离(KM)',
115
+    field: 'Deadline',
116
+    minWidth: 130,
117
+  },
118
+  {
119
+    title: '挂牌价',
120
+    field: 'Deadline',
121
+    // minWidth: 130,
122
+    children: [
123
+      {
124
+        title: '95#',
125
+        field: '95#',
126
+        minWidth: 130,
127
+      },
128
+      {
129
+        title: '92#',
130
+        field: '92#',
131
+        minWidth: 130,
132
+      },
133
+      {
134
+        title: '92#专车',
135
+        field: 'Privatecar92#',
136
+        minWidth: 130,
137
+      },
138
+      {
139
+        title: '92#的士',
140
+        field: 'taxi92#',
141
+        minWidth: 130,
142
+      },
143
+      {
144
+        title: '92#油卡',
145
+        field: 'taxi92#',
146
+        minWidth: 130,
147
+      },
148
+    ],
149
+  },
150
+];
151
+export const mockData = [
152
+  {
153
+    ProcessingTime: '2024-06-01 08:00:00',
154
+    IGasstationstatus: '正常营业',
155
+    youGasstationstatus: '促销中',
156
+    GasstationNature: '民营',
157
+    Competitiverelationship: '直接竞争',
158
+    Deadline: 1.2,
159
+    '95#': 7.85,
160
+    '92#': 7.45,
161
+    'Privatecar92#': 7.35,
162
+    'taxi92#': 7.25,
163
+  },
164
+  {
165
+    ProcessingTime: '2024-06-01 09:15:00',
166
+    IGasstationstatus: '库存预警',
167
+    youGasstationstatus: '正常营业',
168
+    GasstationNature: '国企',
169
+    Competitiverelationship: '间接竞争',
170
+    Deadline: 2.1,
171
+    '95#': 7.90,
172
+    '92#': 7.50,
173
+    'Privatecar92#': 7.40,
174
+    'taxi92#': 7.30,
175
+  },
176
+  {
177
+    ProcessingTime: '2024-06-01 10:30:00',
178
+    IGasstationstatus: '正常营业',
179
+    youGasstationstatus: '降价促销',
180
+    GasstationNature: '合资',
181
+    Competitiverelationship: '直接竞争',
182
+    Deadline: 0.8,
183
+    '95#': 7.80,
184
+    '92#': 7.40,
185
+    'Privatecar92#': 7.30,
186
+    'taxi92#': 7.20,
187
+  },
188
+  {
189
+    ProcessingTime: '2024-06-01 11:45:00',
190
+    IGasstationstatus: '设备维护',
191
+    youGasstationstatus: '正常营业',
192
+    GasstationNature: '民营',
193
+    Competitiverelationship: '间接竞争',
194
+    Deadline: 1.5,
195
+    '95#': 7.95,
196
+    '92#': 7.55,
197
+    'Privatecar92#': 7.45,
198
+    'taxi92#': 7.35,
199
+  },
200
+  {
201
+    ProcessingTime: '2024-06-01 13:00:00',
202
+    IGasstationstatus: '正常营业',
203
+    youGasstationstatus: '会员日',
204
+    GasstationNature: '国企',
205
+    Competitiverelationship: '直接竞争',
206
+    Deadline: 1.0,
207
+    '95#': 7.88,
208
+    '92#': 7.48,
209
+    'Privatecar92#': 7.38,
210
+    'taxi92#': 7.28,
211
+  },
212
+];

+ 101 - 0
apps/web-ele/src/views/Archive/OPM/CPS/index.vue

@@ -0,0 +1,101 @@
1
+<template>
2
+  <Page :auto-content-height="true">
3
+    <BasicTable>
4
+      <template #toolbar-tools>
5
+        <el-button type="primary" plain>导出</el-button>
6
+        <el-button @click="() => (showSearchForm = !showSearchForm)">
7
+          展开/折叠
8
+        </el-button>
9
+      </template>
10
+      <template #action="{ row }">
11
+        <el-button
12
+          size="small"
13
+          type="primary"
14
+          plain
15
+          @click="() => handleTaskClick(row.taskId)"
16
+          >查看</el-button
17
+        >
18
+      </template>
19
+    </BasicTable>
20
+  </Page>
21
+</template>
22
+<script setup lang="ts">
23
+import { ref } from 'vue';
24
+import { useRouter } from 'vue-router';
25
+import { Page } from '@vben/common-ui';
26
+import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
27
+import { columns, querySchema } from './config-data';
28
+import type { VbenFormProps } from '@vben/common-ui';
29
+import { mockData } from './config-data';
30
+const showSearchForm = ref(true) as any;
31
+const router = useRouter();
32
+const formOptions: VbenFormProps = {
33
+  commonConfig: {
34
+    labelWidth: 80,
35
+    componentProps: {
36
+      allowClear: true,
37
+    },
38
+  },
39
+  schema: querySchema(),
40
+  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
41
+  // 日期选择格式化
42
+  // fieldMappingTime: [
43
+  //   [
44
+  //     'createTime',
45
+  //     ['params[beginTime]', 'params[endTime]'],
46
+  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
47
+  //   ],
48
+  // ],
49
+};
50
+
51
+// 列表中显示配置
52
+const gridOptions: VxeGridProps = {
53
+  checkboxConfig: {
54
+    // 高亮
55
+    highlight: true,
56
+    // 翻页时保留选中状态
57
+    reserve: true,
58
+    // 点击行选中
59
+    trigger: 'default',
60
+    checkMethod: ({ row }) => row?.roleId !== 1,
61
+  },
62
+  columns,
63
+  size: 'medium',
64
+  height: 'auto',
65
+  data: mockData,
66
+  // proxyConfig: {
67
+  //   ajax: {
68
+  //     query: async ({ page }, formValues = {}) => {
69
+  //       const resp = await getRoleList({
70
+  //         ...formValues,
71
+  //         pageNum: page.currentPage,
72
+  //         pageSize: page.pageSize,
73
+  //       });
74
+  //       return { items: resp.rows, total: resp.total };
75
+  //     },
76
+  //   },
77
+  // },
78
+  rowConfig: {
79
+    keyField: 'roleId',
80
+  },
81
+  toolbarConfig: {
82
+    custom: true,
83
+    refresh: true,
84
+    zoom: true,
85
+  },
86
+  id: 'system-role-index',
87
+};
88
+const [BasicTable, BasicTableApi] = useVbenVxeGrid({
89
+  showSearchForm,
90
+  formOptions,
91
+  gridOptions,
92
+});
93
+const handleTaskClick = (taskId: number) => {
94
+  router.push(`/schedule/detail/${taskId}`);
95
+};
96
+</script>
97
+<style scoped lang="scss">
98
+:deep(.el-tooltip__trigger:focus) {
99
+  outline: none;
100
+}
101
+</style>

+ 165 - 0
apps/web-ele/src/views/Archive/OPM/OPA/config-data.tsx

@@ -0,0 +1,165 @@
1
+import type { FormSchemaGetter } from '#/adapter/form';
2
+import type { VxeGridProps } from '#/adapter/vxe-table';
3
+import { DictEnum } from '@vben/constants';
4
+import { getDictOptions } from '#/utils/dict';
5
+export const querySchema: FormSchemaGetter = () => [
6
+  {
7
+    component: 'Select',
8
+    componentProps: {
9
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
10
+    },
11
+    fieldName: 'Gasstationstatus',
12
+    label: '油站',
13
+  },
14
+  {
15
+    component: 'DatePicker',
16
+    componentProps: {
17
+      type: 'daterange',
18
+      format: 'YYYY-MM-DD',
19
+      valueFormat: 'YYYY-MM-DD',
20
+      startPlaceholder: '开始日期',
21
+      endPlaceholder: '结束日期',
22
+    },
23
+    fieldName: 'CheckTime',
24
+    label: '检查时间',
25
+  },
26
+  {
27
+    component: 'Select',
28
+    componentProps: {
29
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
30
+    },
31
+    fieldName: 'CheckName',
32
+    label: '检查名称',
33
+  },
34
+  {
35
+    component: 'Select',
36
+    componentProps: {
37
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
38
+    },
39
+    fieldName: 'Label',
40
+    label: '标签',
41
+  },
42
+  {
43
+    component: 'Select',
44
+    componentProps: {
45
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
46
+    },
47
+    fieldName: 'executorStatus',
48
+    label: '执行人',
49
+  },
50
+  {
51
+    component: 'DatePicker',
52
+    componentProps: {
53
+      type: 'daterange',
54
+      format: 'YYYY-MM-DD',
55
+      valueFormat: 'YYYY-MM-DD',
56
+      startPlaceholder: '开始日期',
57
+      endPlaceholder: '结束日期',
58
+    },
59
+    fieldName: 'CloseTime',
60
+    label: '关闭时间',
61
+  },
62
+];
63
+
64
+export const columns: VxeGridProps['columns'] = [
65
+  {
66
+    field: 'action',
67
+    fixed: 'left',
68
+    slots: { default: 'action' },
69
+    resizable: false,
70
+    title: '操作',
71
+    width: 180,
72
+  },
73
+  {
74
+    title: '油站',
75
+    field: 'Gasstation',
76
+    minWidth: 130,
77
+  },
78
+  {
79
+    title: '检查名称',
80
+    field: 'CheckName',
81
+    minWidth: 130,
82
+  },
83
+  {
84
+    title: '检查人',
85
+    field: 'CheckPerson',
86
+    minWidth: 130,
87
+  },
88
+  {
89
+    title: '标签',
90
+    field: 'Label',
91
+    minWidth: 130,
92
+  },
93
+  {
94
+    title: '发现问题',
95
+    field: 'Discoverproblem',
96
+    minWidth: 130,
97
+  },
98
+  {
99
+    title: '处理建议',
100
+    field: 'HandlingSuggestions',
101
+    minWidth: 130,
102
+  },
103
+  {
104
+    title: '是否转任务',
105
+    field: 'Whethertransfertask',
106
+    minWidth: 130,
107
+  },
108
+  {
109
+    title: '任务状态',
110
+    field: 'TaskStatus',
111
+    minWidth: 130,
112
+  },
113
+];
114
+export const mockData = [
115
+  {
116
+    Gasstation: '中山路加油站',
117
+    CheckName: '油罐液位巡检',
118
+    CheckPerson: '王保瑞',
119
+    Label: '安全',
120
+    Discoverproblem: '液位传感器读数漂移',
121
+    HandlingSuggestions: '立即校准并更换探头',
122
+    Whethertransfertask: '是',
123
+    TaskStatus: '待处理',
124
+  },
125
+  {
126
+    Gasstation: '北环大道油站',
127
+    CheckName: '消防器材检查',
128
+    CheckPerson: '王凯',
129
+    Label: '消防',
130
+    Discoverproblem: '灭火器压力不足',
131
+    HandlingSuggestions: '重新充装并记录',
132
+    Whethertransfertask: '否',
133
+    TaskStatus: '已完成',
134
+  },
135
+  {
136
+    Gasstation: '城南综合能源站',
137
+    CheckName: '加油机滤芯检查',
138
+    CheckPerson: '李威',
139
+    Label: '设备',
140
+    Discoverproblem: '滤芯堵塞超标',
141
+    HandlingSuggestions: '停机更换滤芯',
142
+    Whethertransfertask: '是',
143
+    TaskStatus: '处理中',
144
+  },
145
+  {
146
+    Gasstation: '高速服务区东站',
147
+    CheckName: 'POS 系统巡检',
148
+    CheckPerson: '张敏',
149
+    Label: '系统',
150
+    Discoverproblem: '小票打印机卡纸',
151
+    HandlingSuggestions: '清理纸屑并测试',
152
+    Whethertransfertask: '否',
153
+    TaskStatus: '已完成',
154
+  },
155
+  {
156
+    Gasstation: '城西快充站',
157
+    CheckName: '充电桩接地检测',
158
+    CheckPerson: '刘洋',
159
+    Label: '电气',
160
+    Discoverproblem: '接地电阻偏高',
161
+    HandlingSuggestions: '重新打接地极',
162
+    Whethertransfertask: '是',
163
+    TaskStatus: '待处理',
164
+  },
165
+];

+ 102 - 0
apps/web-ele/src/views/Archive/OPM/OPA/index.vue

@@ -0,0 +1,102 @@
1
+<template>
2
+  <Page :auto-content-height="true">
3
+    <BasicTable>
4
+      <template #toolbar-tools>
5
+        <el-button type="primary" plain>新增</el-button>
6
+        <el-button type="primary" plain>导出</el-button>
7
+        <el-button @click="() => (showSearchForm = !showSearchForm)">
8
+          展开/折叠
9
+        </el-button>
10
+      </template>
11
+      <template #action="{ row }">
12
+        <el-button
13
+          size="small"
14
+          type="primary"
15
+          plain
16
+          @click="() => handleTaskClick(row.taskId)"
17
+          >查看</el-button
18
+        >
19
+      </template>
20
+    </BasicTable>
21
+  </Page>
22
+</template>
23
+<script setup lang="ts">
24
+import { ref } from 'vue';
25
+import { useRouter } from 'vue-router';
26
+import { Page } from '@vben/common-ui';
27
+import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
28
+import { columns, querySchema } from './config-data';
29
+import type { VbenFormProps } from '@vben/common-ui';
30
+import { mockData } from './config-data';
31
+const showSearchForm = ref(true) as any;
32
+const router = useRouter();
33
+const formOptions: VbenFormProps = {
34
+  commonConfig: {
35
+    labelWidth: 80,
36
+    componentProps: {
37
+      // allowClear: true,
38
+    },
39
+  },
40
+  schema: querySchema(),
41
+  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
42
+  // 日期选择格式化
43
+  // fieldMappingTime: [
44
+  //   [
45
+  //     'createTime',
46
+  //     ['params[beginTime]', 'params[endTime]'],
47
+  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
48
+  //   ],
49
+  // ],
50
+};
51
+
52
+// 列表中显示配置
53
+const gridOptions: VxeGridProps = {
54
+  checkboxConfig: {
55
+    // 高亮
56
+    highlight: true,
57
+    // 翻页时保留选中状态
58
+    reserve: true,
59
+    // 点击行选中
60
+    trigger: 'default',
61
+    checkMethod: ({ row }) => row?.roleId !== 1,
62
+  },
63
+  columns,
64
+  size: 'medium',
65
+  height: 'auto',
66
+  data: mockData,
67
+  // proxyConfig: {
68
+  //   ajax: {
69
+  //     query: async ({ page }, formValues = {}) => {
70
+  //       const resp = await getRoleList({
71
+  //         ...formValues,
72
+  //         pageNum: page.currentPage,
73
+  //         pageSize: page.pageSize,
74
+  //       });
75
+  //       return { items: resp.rows, total: resp.total };
76
+  //     },
77
+  //   },
78
+  // },
79
+  rowConfig: {
80
+    keyField: 'roleId',
81
+  },
82
+  toolbarConfig: {
83
+    custom: true,
84
+    refresh: true,
85
+    zoom: true,
86
+  },
87
+  id: 'system-role-index',
88
+};
89
+const [BasicTable, BasicTableApi] = useVbenVxeGrid({
90
+  showSearchForm,
91
+  formOptions,
92
+  gridOptions,
93
+});
94
+const handleTaskClick = (taskId: number) => {
95
+  router.push(`/schedule/detail/${taskId}`);
96
+};
97
+</script>
98
+<style scoped lang="scss">
99
+:deep(.el-tooltip__trigger:focus) {
100
+  outline: none;
101
+}
102
+</style>

+ 234 - 0
apps/web-ele/src/views/Archive/OPM/OPI/config-data.tsx

@@ -0,0 +1,234 @@
1
+import type { FormSchemaGetter } from '#/adapter/form';
2
+import type { VxeGridProps } from '#/adapter/vxe-table';
3
+import { DictEnum } from '@vben/constants';
4
+import { getDictOptions } from '#/utils/dict';
5
+export const querySchema: FormSchemaGetter = () => [
6
+  {
7
+    component: 'Select',
8
+    componentProps: {
9
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
10
+    },
11
+    fieldName: 'Areastatus',
12
+    label: '片区',
13
+  },
14
+  {
15
+    component: 'Select',
16
+    componentProps: {
17
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
18
+    },
19
+    fieldName: 'Gasstationstatus',
20
+    label: '油站',
21
+  },
22
+  {
23
+    component: 'Select',
24
+    componentProps: {
25
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
26
+    },
27
+    fieldName: 'Completedstatus',
28
+    label: '完成状态',
29
+  },
30
+  {
31
+    component: 'DatePicker',
32
+    componentProps: {
33
+      type: 'daterange',
34
+      format: 'YYYY-MM-DD',
35
+      valueFormat: 'YYYY-MM-DD',
36
+      startPlaceholder: '开始日期',
37
+      endPlaceholder: '结束日期',
38
+    },
39
+    fieldName: 'createTime',
40
+    label: '处理时间',
41
+  },
42
+  {
43
+    component: 'Select',
44
+    componentProps: {
45
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
46
+    },
47
+    fieldName: 'Positionstatus',
48
+    label: '岗位',
49
+  },
50
+  {
51
+    component: 'Select',
52
+    componentProps: {
53
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
54
+    },
55
+    fieldName: 'Commentstatus',
56
+    label: '评论',
57
+  },
58
+  {
59
+    component: 'Select',
60
+    componentProps: {
61
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
62
+    },
63
+    fieldName: 'createStatus',
64
+    label: '创建',
65
+  },
66
+  {
67
+    component: 'Select',
68
+    componentProps: {
69
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
70
+    },
71
+    fieldName: 'executorStatus',
72
+    label: '执行人',
73
+  },
74
+  {
75
+    component: 'Select',
76
+    componentProps: {
77
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
78
+    },
79
+    fieldName: 'taskStatus',
80
+    label: '任务名称',
81
+  },
82
+  {
83
+    component: 'Input',
84
+    fieldName: 'TaskName',
85
+    componentProps: {
86
+      maxlength: 30,
87
+    },
88
+    label: '任务名称',
89
+  },
90
+  {
91
+    component: 'RadioGroup',
92
+    fieldName: 'extraFlag',
93
+    defaultValue: '',
94
+    componentProps: {
95
+      options: [
96
+        { label: '异常', value: 'abnormal' },
97
+        { label: '不拍照', value: 'noPhoto' },
98
+      ],
99
+    },
100
+  },
101
+];
102
+
103
+export const columns: VxeGridProps['columns'] = [
104
+  {
105
+    field: 'action',
106
+    fixed: 'left',
107
+    slots: { default: 'action' },
108
+    resizable: false,
109
+    title: '操作',
110
+    width: 180,
111
+  },
112
+  {
113
+    title: '任务名称',
114
+    field: 'TaskName',
115
+    minWidth: 130,
116
+  },
117
+  {
118
+    title: '油站',
119
+    field: 'Gasstation',
120
+    minWidth: 130,
121
+  },
122
+  {
123
+    title: '异常总数',
124
+    field: 'Abnormalnumber',
125
+    minWidth: 130,
126
+  },
127
+  {
128
+    title: '无拍照数',
129
+    field: 'NoPhotographynumber',
130
+    minWidth: 130,
131
+  },
132
+  {
133
+    title: '执行人',
134
+    field: 'Executor',
135
+    minWidth: 130,
136
+  },
137
+  {
138
+    title: '岗位',
139
+    field: 'Position',
140
+    minWidth: 130,
141
+  },
142
+  {
143
+    title: '评论',
144
+    field: 'Comment',
145
+    minWidth: 130,
146
+  },
147
+  {
148
+    title: '截止时间',
149
+    field: 'Deadline',
150
+    minWidth: 130,
151
+  },
152
+  {
153
+    title: '处理时间',
154
+    field: 'ProcessingTime',
155
+    minWidth: 130,
156
+  },
157
+  {
158
+    title: '完成状态',
159
+    field: 'CompletionStatus',
160
+    minWidth: 130,
161
+  },
162
+  {
163
+    title: '创建',
164
+    field: 'Create',
165
+    minWidth: 130,
166
+  },
167
+];
168
+export const mockData = [
169
+  {
170
+    TaskName: '高峰期车流异常核查',
171
+    Gasstation: '中山路加油站',
172
+    Abnormalnumber: 3,
173
+    NoPhotographynumber: 1,
174
+    Executor: '王保瑞',
175
+    Position: '当班经理',
176
+    Comment: '车流异常需增派人手',
177
+    Deadline: '2024-06-10 18:00',
178
+    ProcessingTime: '2024-06-01 08:00',
179
+    CompletionStatus: '处理中',
180
+    Create: '2024-05-30 14:00',
181
+  },
182
+  {
183
+    TaskName: '油罐液位异常处理',
184
+    Gasstation: '北环大道油站',
185
+    Abnormalnumber: 2,
186
+    NoPhotographynumber: 0,
187
+    Executor: '王凯',
188
+    Position: '安全员',
189
+    Comment: '液位传感器读数漂移',
190
+    Deadline: '2024-06-05 12:00',
191
+    ProcessingTime: '2024-06-01 09:15',
192
+    CompletionStatus: '已完成',
193
+    Create: '2024-05-29 16:30',
194
+  },
195
+  {
196
+    TaskName: '加油机滤芯更换',
197
+    Gasstation: '城南综合能源站',
198
+    Abnormalnumber: 1,
199
+    NoPhotographynumber: 0,
200
+    Executor: '李威',
201
+    Position: '设备管理员',
202
+    Comment: '滤芯堵塞超标需更换',
203
+    Deadline: '2024-06-08 17:00',
204
+    ProcessingTime: '2024-06-01 10:30',
205
+    CompletionStatus: '已完成',
206
+    Create: '2024-05-28 10:00',
207
+  },
208
+  {
209
+    TaskName: 'POS系统异常处理',
210
+    Gasstation: '高速服务区东站',
211
+    Abnormalnumber: 2,
212
+    NoPhotographynumber: 1,
213
+    Executor: '张敏',
214
+    Position: '收银员',
215
+    Comment: '小票打印机卡纸异常',
216
+    Deadline: '2024-06-07 20:00',
217
+    ProcessingTime: '2024-06-01 11:45',
218
+    CompletionStatus: '处理中',
219
+    Create: '2024-05-30 09:20',
220
+  },
221
+  {
222
+    TaskName: '充电桩接地检测',
223
+    Gasstation: '城西快充站',
224
+    Abnormalnumber: 1,
225
+    NoPhotographynumber: 0,
226
+    Executor: '刘洋',
227
+    Position: '电工',
228
+    Comment: '接地电阻偏高需复检',
229
+    Deadline: '2024-06-06 16:00',
230
+    ProcessingTime: '2024-06-01 13:00',
231
+    CompletionStatus: '待处理',
232
+    Create: '2024-05-31 15:10',
233
+  },
234
+];

+ 99 - 0
apps/web-ele/src/views/Archive/OPM/OPI/index.vue

@@ -0,0 +1,99 @@
1
+<template>
2
+  <Page :auto-content-height="true">
3
+    <BasicTable>
4
+      <template #action="{ row }">
5
+        <el-button
6
+          size="small"
7
+          type="primary"
8
+          plain
9
+          @click="() => handleTaskClick(row.taskId)"
10
+          >查看</el-button
11
+        >
12
+        <el-button size="small" type="primary" plain>打印</el-button>
13
+      </template>
14
+    </BasicTable>
15
+  </Page>
16
+</template>
17
+<script setup lang="ts">
18
+import { useRouter } from 'vue-router';
19
+import { Page } from '@vben/common-ui';
20
+import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
21
+import { columns, querySchema } from './config-data';
22
+import type { VbenFormProps } from '@vben/common-ui';
23
+import { mockData } from './config-data';
24
+const router = useRouter();
25
+const formOptions: VbenFormProps = {
26
+  commonConfig: {
27
+    labelWidth: 80,
28
+    componentProps: {
29
+      allowClear: true,
30
+    },
31
+  },
32
+  schema: querySchema(),
33
+  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
34
+  handleSubmit: (values: any) => {
35
+    console.log('👉 表单提交数据', values);
36
+  },
37
+  handleReset: async (values: any) => {
38
+    const res = await values;
39
+    console.log('👉 重置后数据', res);
40
+  },
41
+  // 日期选择格式化
42
+  // fieldMappingTime: [
43
+  //   [
44
+  //     'createTime',
45
+  //     ['params[beginTime]', 'params[endTime]'],
46
+  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
47
+  //   ],
48
+  // ],
49
+};
50
+// 列表中显示配置
51
+const gridOptions: VxeGridProps = {
52
+  checkboxConfig: {
53
+    // 高亮
54
+    highlight: true,
55
+    // 翻页时保留选中状态
56
+    reserve: true,
57
+    // 点击行选中
58
+    trigger: 'default',
59
+    checkMethod: ({ row }) => row?.roleId !== 1,
60
+  },
61
+  columns,
62
+  size: 'medium',
63
+  height: 'auto',
64
+  data: mockData,
65
+  // proxyConfig: {
66
+  //   ajax: {
67
+  //     query: async ({ page }, formValues = {}) => {
68
+  //       const resp = await getRoleList({
69
+  //         ...formValues,
70
+  //         pageNum: page.currentPage,
71
+  //         pageSize: page.pageSize,
72
+  //       });
73
+  //       return { items: resp.rows, total: resp.total };
74
+  //     },
75
+  //   },
76
+  // },
77
+  rowConfig: {
78
+    keyField: 'roleId',
79
+  },
80
+  toolbarConfig: {
81
+    custom: true,
82
+    refresh: true,
83
+    zoom: true,
84
+  },
85
+  id: 'system-role-index',
86
+};
87
+const [BasicTable, BasicTableApi] = useVbenVxeGrid({
88
+  formOptions,
89
+  gridOptions,
90
+});
91
+const handleTaskClick = (taskId: number) => {
92
+  router.push(`/schedule/detail/${taskId}`);
93
+};
94
+</script>
95
+<style scoped lang="scss">
96
+:deep(.el-tooltip__trigger:focus) {
97
+  outline: none;
98
+}
99
+</style>

+ 167 - 0
apps/web-ele/src/views/Archive/OPM/OPWR/config-data.tsx

@@ -0,0 +1,167 @@
1
+import type { FormSchemaGetter } from '#/adapter/form';
2
+import type { VxeGridProps } from '#/adapter/vxe-table';
3
+import { DictEnum } from '@vben/constants';
4
+import { getDictOptions } from '#/utils/dict';
5
+export const querySchema: FormSchemaGetter = () => [
6
+  {
7
+    component: 'Select',
8
+    componentProps: {
9
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
10
+    },
11
+    fieldName: 'Areastatus',
12
+    label: '片区',
13
+  },
14
+  {
15
+    component: 'Select',
16
+    componentProps: {
17
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
18
+    },
19
+    fieldName: 'Gasstationstatus',
20
+    label: '油站',
21
+  },
22
+  {
23
+    component: 'Select',
24
+    componentProps: {
25
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
26
+    },
27
+    fieldName: 'Status',
28
+    label: '状态',
29
+  },
30
+  {
31
+    component: 'DatePicker',
32
+    componentProps: {
33
+      type: 'daterange',
34
+      format: 'YYYY-MM-DD',
35
+      valueFormat: 'YYYY-MM-DD',
36
+      startPlaceholder: '开始日期',
37
+      endPlaceholder: '结束日期',
38
+    },
39
+    fieldName: 'SubmitTime',
40
+    label: '提交时间',
41
+  },
42
+  {
43
+    component: 'Select',
44
+    componentProps: {
45
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
46
+    },
47
+    fieldName: 'Commentstatus',
48
+    label: '评论',
49
+  },
50
+  {
51
+    component: 'Select',
52
+    componentProps: {
53
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
54
+    },
55
+    fieldName: 'PositionStatus',
56
+    label: '岗位',
57
+  },
58
+  {
59
+    component: 'Select',
60
+    componentProps: {
61
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
62
+    },
63
+    fieldName: 'CreateStatus',
64
+    label: '创建',
65
+  },
66
+  {
67
+    component: 'Select',
68
+    componentProps: {
69
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
70
+    },
71
+    fieldName: 'executorStatus',
72
+    label: '执行人',
73
+  },
74
+];
75
+
76
+export const columns: VxeGridProps['columns'] = [
77
+  {
78
+    field: 'action',
79
+    fixed: 'left',
80
+    slots: { default: 'action' },
81
+    resizable: false,
82
+    title: '操作',
83
+    width: 180,
84
+  },
85
+  {
86
+    title: '油站',
87
+    field: 'Gasstation',
88
+    minWidth: 130,
89
+  },
90
+  {
91
+    title: '执行人',
92
+    field: 'Executor',
93
+    minWidth: 130,
94
+  },
95
+  {
96
+    title: '岗位',
97
+    field: 'Position',
98
+    minWidth: 130,
99
+  },
100
+  {
101
+    title: '评论',
102
+    field: 'Comment',
103
+    minWidth: 130,
104
+  },
105
+  {
106
+    title: '截止时间',
107
+    field: 'Deadline',
108
+    minWidth: 130,
109
+  },
110
+  {
111
+    title: '提交时间',
112
+    field: 'SubmitTime',
113
+    minWidth: 130,
114
+  },
115
+  {
116
+    title: '任务状态',
117
+    field: 'TaskStatus',
118
+    minWidth: 130,
119
+  },
120
+];
121
+export const mockData = [
122
+  {
123
+    Gasstation: '中山路加油站',
124
+    Executor: '王保瑞',
125
+    Position: '当班经理',
126
+    Comment: '高峰期车流大,需增派人手',
127
+    Deadline: '2024-06-10 18:00',
128
+    SubmitTime: '2024-06-01 08:15',
129
+    TaskStatus: '待处理',
130
+  },
131
+  {
132
+    Gasstation: '北环大道油站',
133
+    Executor: '王凯',
134
+    Position: '安全员',
135
+    Comment: '油罐液位异常,需立即检查',
136
+    Deadline: '2024-06-05 12:00',
137
+    SubmitTime: '2024-06-01 09:30',
138
+    TaskStatus: '处理中',
139
+  },
140
+  {
141
+    Gasstation: '城南综合能源站',
142
+    Executor: '李威',
143
+    Position: '设备管理员',
144
+    Comment: '加油机滤芯更换完成,请复核',
145
+    Deadline: '2024-06-08 17:00',
146
+    SubmitTime: '2024-06-01 10:45',
147
+    TaskStatus: '已完成',
148
+  },
149
+  {
150
+    Gasstation: '高速服务区东站',
151
+    Executor: '张敏',
152
+    Position: '收银员',
153
+    Comment: 'POS 系统版本升级,测试支付流程',
154
+    Deadline: '2024-06-07 20:00',
155
+    SubmitTime: '2024-06-01 14:20',
156
+    TaskStatus: '待处理',
157
+  },
158
+  {
159
+    Gasstation: '城西快充站',
160
+    Executor: '刘洋',
161
+    Position: '电工',
162
+    Comment: '充电桩接地电阻复检',
163
+    Deadline: '2024-06-06 16:00',
164
+    SubmitTime: '2024-06-01 15:10',
165
+    TaskStatus: '处理中',
166
+  },
167
+];

+ 93 - 0
apps/web-ele/src/views/Archive/OPM/OPWR/index.vue

@@ -0,0 +1,93 @@
1
+<template>
2
+  <Page :auto-content-height="true">
3
+    <BasicTable>
4
+      <template #action="{ row }">
5
+        <el-button
6
+          size="small"
7
+          type="primary"
8
+          plain
9
+          @click="() => handleTaskClick(row.taskId)"
10
+          >查看</el-button
11
+        >
12
+      </template>
13
+    </BasicTable>
14
+  </Page>
15
+</template>
16
+<script setup lang="ts">
17
+import { useRouter } from 'vue-router';
18
+import { Page } from '@vben/common-ui';
19
+import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
20
+import { columns, querySchema } from './config-data';
21
+import type { VbenFormProps } from '@vben/common-ui';
22
+import { mockData } from './config-data';
23
+const router = useRouter();
24
+
25
+const formOptions: VbenFormProps = {
26
+  commonConfig: {
27
+    labelWidth: 80,
28
+    componentProps: {
29
+      allowClear: true,
30
+    },
31
+  },
32
+  schema: querySchema(),
33
+  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
34
+  // 日期选择格式化
35
+  // fieldMappingTime: [
36
+  //   [
37
+  //     'createTime',
38
+  //     ['params[beginTime]', 'params[endTime]'],
39
+  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
40
+  //   ],
41
+  // ],
42
+};
43
+
44
+// 列表中显示配置
45
+const gridOptions: VxeGridProps = {
46
+  checkboxConfig: {
47
+    // 高亮
48
+    highlight: true,
49
+    // 翻页时保留选中状态
50
+    reserve: true,
51
+    // 点击行选中
52
+    trigger: 'default',
53
+    checkMethod: ({ row }) => row?.roleId !== 1,
54
+  },
55
+  columns,
56
+  size: 'medium',
57
+  height: 'auto',
58
+  data: mockData,
59
+  // proxyConfig: {
60
+  //   ajax: {
61
+  //     query: async ({ page }, formValues = {}) => {
62
+  //       const resp = await getRoleList({
63
+  //         ...formValues,
64
+  //         pageNum: page.currentPage,
65
+  //         pageSize: page.pageSize,
66
+  //       });
67
+  //       return { items: resp.rows, total: resp.total };
68
+  //     },
69
+  //   },
70
+  // },
71
+  rowConfig: {
72
+    keyField: 'roleId',
73
+  },
74
+  toolbarConfig: {
75
+    custom: true,
76
+    refresh: true,
77
+    zoom: true,
78
+  },
79
+  id: 'system-role-index',
80
+};
81
+const [BasicTable, BasicTableApi] = useVbenVxeGrid({
82
+  formOptions,
83
+  gridOptions,
84
+});
85
+const handleTaskClick = (taskId: number) => {
86
+  router.push(`/schedule/detail/${taskId}`);
87
+};
88
+</script>
89
+<style scoped lang="scss">
90
+:deep(.el-tooltip__trigger:focus) {
91
+  outline: none;
92
+}
93
+</style>

+ 242 - 0
apps/web-ele/src/views/Archive/OPM/TRS/config-data.tsx

@@ -0,0 +1,242 @@
1
+import type { FormSchemaGetter } from '#/adapter/form';
2
+import type { VxeGridProps } from '#/adapter/vxe-table';
3
+import { DictEnum } from '@vben/constants';
4
+import { getDictOptions } from '#/utils/dict';
5
+export const querySchema: FormSchemaGetter = () => [
6
+  {
7
+    component: 'Select',
8
+    componentProps: {
9
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
10
+    },
11
+    fieldName: 'IGasstationstatus',
12
+    label: '我方油站',
13
+  },
14
+  {
15
+    component: 'Select',
16
+    componentProps: {
17
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
18
+    },
19
+    fieldName: 'youGasstationstatus',
20
+    label: '竟对油站',
21
+  },
22
+  {
23
+    component: 'Select',
24
+    componentProps: {
25
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
26
+    },
27
+    fieldName: 'Status',
28
+    label: '状态',
29
+  },
30
+  {
31
+    component: 'DatePicker',
32
+    componentProps: {
33
+      type: 'daterange',
34
+      format: 'YYYY-MM-DD',
35
+      valueFormat: 'YYYY-MM-DD',
36
+      startPlaceholder: '开始日期',
37
+      endPlaceholder: '结束日期',
38
+    },
39
+    fieldName: 'Time',
40
+    label: '时间',
41
+  },
42
+  {
43
+    component: 'Select',
44
+    componentProps: {
45
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
46
+    },
47
+    fieldName: 'Commentstatus',
48
+    label: '评论',
49
+  },
50
+  {
51
+    component: 'Select',
52
+    componentProps: {
53
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
54
+    },
55
+    fieldName: 'PositionStatus',
56
+    label: '职位',
57
+  },
58
+  {
59
+    component: 'Select',
60
+    componentProps: {
61
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
62
+    },
63
+    fieldName: 'CreateStatus',
64
+    label: '创建',
65
+  },
66
+  {
67
+    component: 'Select',
68
+    componentProps: {
69
+      options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
70
+    },
71
+    fieldName: 'executorStatus',
72
+    label: '执行人',
73
+  },
74
+];
75
+
76
+export const columns: VxeGridProps['columns'] = [
77
+  {
78
+    field: 'action',
79
+    fixed: 'left',
80
+    slots: { default: 'action' },
81
+    resizable: false,
82
+    title: '操作',
83
+    width: 180,
84
+  },
85
+  {
86
+    title: '处理时间',
87
+    fixed: 'left',
88
+    field: 'ProcessingTime',
89
+    minWidth: 130,
90
+  },
91
+  {
92
+    title: '我方油站',
93
+    fixed: 'left',
94
+    field: 'IGasstationstatus',
95
+    minWidth: 130,
96
+  },
97
+  {
98
+    title: '竟对油站',
99
+    fixed: 'left',
100
+    field: 'youGasstationstatus',
101
+    minWidth: 130,
102
+  },
103
+
104
+  {
105
+    title: '汽油车',
106
+    field: 'Gasolinecar',
107
+    // minWidth: 130,
108
+    children: [
109
+      {
110
+        title: '路面车流',
111
+        field: 'GasRoadtraffic',
112
+        minWidth: 130,
113
+      },
114
+      {
115
+        title: '进站车流',
116
+        field: 'GasIncomingtraffic',
117
+        minWidth: 130,
118
+      },
119
+      {
120
+        title: '拐入率',
121
+        field: 'GasTurninrate',
122
+        minWidth: 130,
123
+      },
124
+    ],
125
+  },
126
+  {
127
+    title: '柴油车',
128
+    field: 'dieselcar',
129
+    // minWidth: 130,
130
+    children: [
131
+      {
132
+        title: '路面车流',
133
+        field: 'DieselRoadtraffic',
134
+        minWidth: 130,
135
+      },
136
+      {
137
+        title: '进站车流',
138
+        field: 'DieselIncomingtraffic',
139
+        minWidth: 130,
140
+      },
141
+      {
142
+        title: '拐入率',
143
+        field: 'DieselTurninrate',
144
+        minWidth: 130,
145
+      },
146
+    ],
147
+  },
148
+  {
149
+    title: '摩托车',
150
+    field: 'Motorcycle',
151
+    // minWidth: 130,
152
+    children: [
153
+      {
154
+        title: '路面车流',
155
+        field: 'MotoRoadtraffic',
156
+        minWidth: 130,
157
+      },
158
+      {
159
+        title: '进站车流',
160
+        field: 'MotoIncomingtraffic',
161
+        minWidth: 130,
162
+      },
163
+      {
164
+        title: '拐入率',
165
+        field: 'MotoTurninrate',
166
+        minWidth: 130,
167
+      },
168
+    ],
169
+  },
170
+];
171
+export const mockData = [
172
+  {
173
+    ProcessingTime: '2024-06-01 08:00:00',
174
+    IGasstationstatus: '正常营业',
175
+    youGasstationstatus: '促销中',
176
+    GasRoadtraffic: 1200,
177
+    GasIncomingtraffic: 320,
178
+    GasTurninrate: '26.7%',
179
+    DieselRoadtraffic: 800,
180
+    DieselIncomingtraffic: 180,
181
+    DieselTurninrate: '22.5%',
182
+    MotoRoadtraffic: 450,
183
+    MotoIncomingtraffic: 90,
184
+    MotoTurninrate: '20.0%',
185
+  },
186
+  {
187
+    ProcessingTime: '2024-06-01 09:15:00',
188
+    IGasstationstatus: '库存预警',
189
+    youGasstationstatus: '正常营业',
190
+    GasRoadtraffic: 1350,
191
+    GasIncomingtraffic: 380,
192
+    GasTurninrate: '28.1%',
193
+    DieselRoadtraffic: 920,
194
+    DieselIncomingtraffic: 210,
195
+    DieselTurninrate: '22.8%',
196
+    MotoRoadtraffic: 510,
197
+    MotoIncomingtraffic: 105,
198
+    MotoTurninrate: '20.6%',
199
+  },
200
+  {
201
+    ProcessingTime: '2024-06-01 10:30:00',
202
+    IGasstationstatus: '正常营业',
203
+    youGasstationstatus: '降价促销',
204
+    GasRoadtraffic: 1100,
205
+    GasIncomingtraffic: 310,
206
+    GasTurninrate: '28.2%',
207
+    DieselRoadtraffic: 750,
208
+    DieselIncomingtraffic: 170,
209
+    DieselTurninrate: '22.7%',
210
+    MotoRoadtraffic: 480,
211
+    MotoIncomingtraffic: 98,
212
+    MotoTurninrate: '20.4%',
213
+  },
214
+  {
215
+    ProcessingTime: '2024-06-01 11:45:00',
216
+    IGasstationstatus: '设备维护',
217
+    youGasstationstatus: '正常营业',
218
+    GasRoadtraffic: 1250,
219
+    GasIncomingtraffic: 340,
220
+    GasTurninrate: '27.2%',
221
+    DieselRoadtraffic: 880,
222
+    DieselIncomingtraffic: 200,
223
+    DieselTurninrate: '22.7%',
224
+    MotoRoadtraffic: 520,
225
+    MotoIncomingtraffic: 110,
226
+    MotoTurninrate: '21.2%',
227
+  },
228
+  {
229
+    ProcessingTime: '2024-06-01 13:00:00',
230
+    IGasstationstatus: '正常营业',
231
+    youGasstationstatus: '会员日',
232
+    GasRoadtraffic: 1400,
233
+    GasIncomingtraffic: 410,
234
+    GasTurninrate: '29.3%',
235
+    DieselRoadtraffic: 950,
236
+    DieselIncomingtraffic: 225,
237
+    DieselTurninrate: '23.7%',
238
+    MotoRoadtraffic: 560,
239
+    MotoIncomingtraffic: 120,
240
+    MotoTurninrate: '21.4%',
241
+  },
242
+];

+ 95 - 0
apps/web-ele/src/views/Archive/OPM/TRS/index.vue

@@ -0,0 +1,95 @@
1
+<template>
2
+  <Page :auto-content-height="true">
3
+    <BasicTable>
4
+      <template #action="{ row }">
5
+        <el-button
6
+          size="small"
7
+          type="primary"
8
+          plain
9
+          @click="() => handleTaskClick(row.taskId)"
10
+          >查看</el-button
11
+        >
12
+      </template>
13
+    </BasicTable>
14
+  </Page>
15
+</template>
16
+<script setup lang="ts">
17
+import { ref } from 'vue';
18
+import { useRouter } from 'vue-router';
19
+import { Page } from '@vben/common-ui';
20
+import { useVbenVxeGrid, type VxeGridProps } from '#/adapter/vxe-table';
21
+import { columns, querySchema } from './config-data';
22
+import type { VbenFormProps } from '@vben/common-ui';
23
+import { mockData } from './config-data';
24
+const showSearchForm = ref(true) as any;
25
+const router = useRouter();
26
+const formOptions: VbenFormProps = {
27
+  commonConfig: {
28
+    labelWidth: 80,
29
+    componentProps: {
30
+      allowClear: true,
31
+    },
32
+  },
33
+  schema: querySchema(),
34
+  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
35
+  // 日期选择格式化
36
+  // fieldMappingTime: [
37
+  //   [
38
+  //     'createTime',
39
+  //     ['params[beginTime]', 'params[endTime]'],
40
+  //     ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
41
+  //   ],
42
+  // ],
43
+};
44
+
45
+// 列表中显示配置
46
+const gridOptions: VxeGridProps = {
47
+  checkboxConfig: {
48
+    // 高亮
49
+    highlight: true,
50
+    // 翻页时保留选中状态s
51
+    reserve: true,
52
+    // 点击行选中
53
+    trigger: 'default',
54
+    checkMethod: ({ row }) => row?.roleId !== 1,
55
+  },
56
+  columns,
57
+  size: 'medium',
58
+  height: 'auto',
59
+  data: mockData,
60
+  // proxyConfig: {
61
+  //   ajax: {
62
+  //     query: async ({ page }, formValues = {}) => {
63
+  //       const resp = await getRoleList({
64
+  //         ...formValues,
65
+  //         pageNum: page.currentPage,
66
+  //         pageSize: page.pageSize,
67
+  //       });
68
+  //       return { items: resp.rows, total: resp.total };
69
+  //     },
70
+  //   },
71
+  // },
72
+  rowConfig: {
73
+    keyField: 'roleId',
74
+  },
75
+  toolbarConfig: {
76
+    custom: true,
77
+    refresh: true,
78
+    zoom: true,
79
+  },
80
+  id: 'system-role-index',
81
+};
82
+const [BasicTable, BasicTableApi] = useVbenVxeGrid({
83
+  showSearchForm,
84
+  formOptions,
85
+  gridOptions,
86
+});
87
+const handleTaskClick = (taskId: number) => {
88
+  router.push(`/schedule/detail/${taskId}`);
89
+};
90
+</script>
91
+<style scoped lang="scss">
92
+:deep(.el-tooltip__trigger:focus) {
93
+  outline: none;
94
+}
95
+</style>