miaofuhao %!s(int64=3) %!d(string=před) týdny
rodič
revize
18b6db11c1

+ 233 - 0
apps/web-ele/src/views/Archive/temporaryDuty/addGasStation/addGasStation-data.tsx

@@ -0,0 +1,233 @@
1
+import type { FormSchemaGetter } from '#/adapter/form';
2
+import type { VxeGridProps } from '#/adapter/vxe-table';
3
+
4
+// 场站新增任务数据类型定义
5
+export interface WorkReportData {
6
+  id: number;
7
+  taskName: string; // 任务名称
8
+  station: string; // 油站
9
+  executor: string; // 执行人
10
+  position: string; // 岗位
11
+  comment: string; // 评论
12
+  deadline: string; // 截止时间
13
+  processTime: string; // 处理时间
14
+  completionStatus: string; // 完成状态
15
+  creator: string; // 创建人
16
+  area: string; // 片区
17
+}
18
+
19
+// 场站新增任务表格配置
20
+export const tableColumns: VxeGridProps['columns'] = [
21
+  { title: '任务名称', field: 'taskName', minWidth: 180, align: 'center' },
22
+  { title: '油站', field: 'station', minWidth: 150, align: 'center' },
23
+  { title: '执行人', field: 'executor', minWidth: 120, align: 'center' },
24
+  { title: '岗位', field: 'position', minWidth: 120, align: 'center' },
25
+  { title: '评论', field: 'comment', minWidth: 150, align: 'center' },
26
+  { title: '截止时间', field: 'deadline', minWidth: 150, align: 'center' },
27
+  { title: '处理时间', field: 'processTime', minWidth: 150, align: 'center' },
28
+  {
29
+    title: '完成状态',
30
+    field: 'completionStatus',
31
+    minWidth: 120,
32
+    align: 'center',
33
+  },
34
+  { title: '创建', field: 'creator', minWidth: 120, align: 'center' },
35
+  {
36
+    title: '操作',
37
+    minWidth: 100,
38
+    align: 'center',
39
+    slots: {
40
+      default: 'action',
41
+    },
42
+  },
43
+];
44
+
45
+// 场站新增任务虚拟数据
46
+export const WORK_REPORT_MOCK_DATA: WorkReportData[] = [
47
+  {
48
+    id: 1,
49
+    taskName: '设备维护保养',
50
+    station: '北京东加油站',
51
+    executor: '张三',
52
+    position: '站长',
53
+    comment: '设备运行正常',
54
+    deadline: '2024-12-10',
55
+    processTime: '2024-12-08',
56
+    completionStatus: '已完成',
57
+    creator: '李四',
58
+    area: '默认片区',
59
+  },
60
+  {
61
+    id: 2,
62
+    taskName: '安全检查',
63
+    station: '北京西加油站',
64
+    executor: '王五',
65
+    position: '安全主管',
66
+    comment: '发现1处安全隐患已整改',
67
+    deadline: '2024-12-15',
68
+    processTime: '2024-12-12',
69
+    completionStatus: '已完成',
70
+    creator: '赵六',
71
+    area: '默认片区',
72
+  },
73
+  {
74
+    id: 3,
75
+    taskName: '油品配送',
76
+    station: '机场油站',
77
+    executor: '孙七',
78
+    position: '配送员',
79
+    comment: '按时完成配送',
80
+    deadline: '2024-12-20',
81
+    processTime: '2024-12-18',
82
+    completionStatus: '已完成',
83
+    creator: '周八',
84
+    area: '片区1',
85
+  },
86
+  {
87
+    id: 4,
88
+    taskName: '员工培训',
89
+    station: '北京南加油站',
90
+    executor: '吴九',
91
+    position: '培训师',
92
+    comment: '培训效果良好',
93
+    deadline: '2024-12-25',
94
+    processTime: '',
95
+    completionStatus: '未完成',
96
+    creator: '郑十',
97
+    area: '片区2',
98
+  },
99
+  {
100
+    id: 5,
101
+    taskName: '消防演练',
102
+    station: '北京北加油站',
103
+    executor: '钱一',
104
+    position: '安全经理',
105
+    comment: '演练顺利完成',
106
+    deadline: '2024-12-30',
107
+    processTime: '',
108
+    completionStatus: '未完成',
109
+    creator: '孙二',
110
+    area: '片区3',
111
+  },
112
+];
113
+
114
+export const queryFormSchema: FormSchemaGetter = () => QUERY_FORM_SCHEMA;
115
+
116
+// 查询表单模式配置
117
+const QUERY_FORM_SCHEMA = [
118
+  {
119
+    component: 'Select',
120
+    fieldName: 'area',
121
+    label: '片区',
122
+    componentProps: {
123
+      placeholder: '请选择片区',
124
+      options: [
125
+        { label: '默认片区', value: '默认片区' },
126
+        { label: '片区1', value: '片区1' },
127
+        { label: '片区2', value: '片区2' },
128
+        { label: '片区3', value: '片区3' },
129
+      ],
130
+    },
131
+  },
132
+  {
133
+    component: 'Select',
134
+    fieldName: 'station',
135
+    label: '油站',
136
+    componentProps: {
137
+      placeholder: '请选择油站',
138
+      options: [
139
+        { label: '机场油站', value: '机场油站' },
140
+        { label: '北京东加油站', value: '北京东加油站' },
141
+        { label: '北京西加油站', value: '北京西加油站' },
142
+        { label: '北京南加油站', value: '北京南加油站' },
143
+        { label: '北京北加油站', value: '北京北加油站' },
144
+        { label: '龙飞虎加油站', value: '龙飞虎加油站' },
145
+        { label: '法站加油站', value: '法站加油站' },
146
+      ],
147
+    },
148
+  },
149
+  {
150
+    component: 'Select',
151
+    fieldName: 'completionStatus',
152
+    label: '完成状态',
153
+    componentProps: {
154
+      placeholder: '请选择完成状态',
155
+      options: [
156
+        { label: '已完成', value: '已完成' },
157
+        { label: '未完成', value: '未完成' },
158
+        { label: '进行中', value: '进行中' },
159
+      ],
160
+    },
161
+  },
162
+  {
163
+    component: 'DatePicker',
164
+    fieldName: 'processTimeRange',
165
+    label: '处理时间',
166
+    componentProps: {
167
+      placeholder: '请选择时间范围',
168
+      type: 'daterange',
169
+      rangeSeparator: '至',
170
+      startPlaceholder: '开始时间',
171
+      endPlaceholder: '结束时间',
172
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
173
+    },
174
+  },
175
+  {
176
+    component: 'Select',
177
+    fieldName: 'position',
178
+    label: '岗位',
179
+    componentProps: {
180
+      placeholder: '请选择岗位',
181
+      options: [
182
+        { label: '站长', value: '站长' },
183
+        { label: '安全主管', value: '安全主管' },
184
+        { label: '配送员', value: '配送员' },
185
+        { label: '培训师', value: '培训师' },
186
+        { label: '安全经理', value: '安全经理' },
187
+      ],
188
+    },
189
+  },
190
+  {
191
+    component: 'Select',
192
+    fieldName: 'comment',
193
+    label: '评论',
194
+    componentProps: {
195
+      placeholder: '请选择评论状态',
196
+      options: [
197
+        { label: '有评论', value: '有评论' },
198
+        { label: '无评论', value: '无评论' },
199
+      ],
200
+    },
201
+  },
202
+  {
203
+    component: 'Select',
204
+    fieldName: 'creator',
205
+    label: '创建人',
206
+    componentProps: {
207
+      placeholder: '请选择创建人',
208
+      options: [
209
+        { label: '李四', value: '李四' },
210
+        { label: '赵六', value: '赵六' },
211
+        { label: '周八', value: '周八' },
212
+        { label: '郑十', value: '郑十' },
213
+        { label: '孙二', value: '孙二' },
214
+      ],
215
+    },
216
+  },
217
+  {
218
+    component: 'Input',
219
+    fieldName: 'executor',
220
+    label: '执行人',
221
+    componentProps: {
222
+      placeholder: '请输入执行人',
223
+    },
224
+  },
225
+  {
226
+    component: 'Input',
227
+    fieldName: 'taskName',
228
+    label: '任务名称',
229
+    componentProps: {
230
+      placeholder: '请输入任务名称',
231
+    },
232
+  },
233
+];

+ 101 - 0
apps/web-ele/src/views/Archive/temporaryDuty/addGasStation/index.vue

@@ -0,0 +1,101 @@
1
+<script lang="ts" setup>
2
+// 导入部分
3
+import type { VbenFormProps } from '@vben/common-ui';
4
+
5
+import type { VxeGridProps } from '#/adapter/vxe-table';
6
+
7
+import { Page } from '@vben/common-ui';
8
+
9
+import { ElButton, ElSpace } from 'element-plus';
10
+
11
+import { useVbenVxeGrid } from '#/adapter/vxe-table';
12
+
13
+import {
14
+  queryFormSchema,
15
+  tableColumns,
16
+  WORK_REPORT_MOCK_DATA,
17
+} from './addGasStation-data';
18
+
19
+// 表单配置
20
+const formOptions: VbenFormProps = {
21
+  commonConfig: {
22
+    labelWidth: 80,
23
+    componentProps: { allowClear: true },
24
+  },
25
+  schema: queryFormSchema(),
26
+  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
27
+};
28
+
29
+// 报工数据统计表格配置
30
+const workReportGridOptions: VxeGridProps = {
31
+  columns: tableColumns,
32
+  height: '800px',
33
+  proxyConfig: {
34
+    autoLoad: true,
35
+    ajax: {
36
+      query: async () => ({
37
+        items: WORK_REPORT_MOCK_DATA,
38
+        total: WORK_REPORT_MOCK_DATA.length,
39
+      }),
40
+    },
41
+  },
42
+  rowConfig: { keyField: 'id' },
43
+  pagerConfig: { enabled: true, pageSize: 100, pageSizes: [10, 20, 50, 100] },
44
+};
45
+
46
+// 创建表格实例
47
+const [WorkReportTable] = useVbenVxeGrid({
48
+  formOptions,
49
+  gridOptions: workReportGridOptions,
50
+});
51
+
52
+// 导出按钮点击事件
53
+const handleExport = () => {
54
+  console.log('导出数据');
55
+  // TODO: 添加导出逻辑
56
+};
57
+
58
+// 查看按钮点击事件
59
+const handleView = (row: any) => {
60
+  console.log('查看详情:', row);
61
+  // TODO: 添加查看详情逻辑
62
+};
63
+</script>
64
+
65
+<template>
66
+  <Page :auto-content-height="true">
67
+    <div class="task-report-container">
68
+      <!-- 报工数据统计表格 -->
69
+      <div class="table-container">
70
+        <WorkReportTable table-title="场站新增任务列表">
71
+          <template #toolbar-tools>
72
+            <ElSpace>
73
+              <ElButton
74
+                @click="handleExport"
75
+                v-access:code="['system:workDataStatistics:export']"
76
+              >
77
+                导出
78
+              </ElButton>
79
+            </ElSpace>
80
+          </template>
81
+          <!-- 操作按钮插槽 -->
82
+          <template #action="{ row }">
83
+            <ElSpace>
84
+              <ElButton type="primary" size="small" @click="handleView(row)">
85
+                查看
86
+              </ElButton>
87
+            </ElSpace>
88
+          </template>
89
+        </WorkReportTable>
90
+      </div>
91
+    </div>
92
+  </Page>
93
+</template>
94
+
95
+<style scoped lang="scss">
96
+.task-report-container {
97
+  min-height: calc(100vh - 120px);
98
+  padding: 16px;
99
+  background-color: #fff;
100
+}
101
+</style>

+ 100 - 0
apps/web-ele/src/views/Archive/temporaryDuty/visitorAdd/index.vue

@@ -0,0 +1,100 @@
1
+<script lang="ts" setup>
2
+// 导入部分
3
+import type { VbenFormProps } from '@vben/common-ui';
4
+
5
+import type { VxeGridProps } from '#/adapter/vxe-table';
6
+
7
+import { Page } from '@vben/common-ui';
8
+
9
+import { ElButton, ElMessage, ElSpace } from 'element-plus';
10
+
11
+import { useVbenVxeGrid } from '#/adapter/vxe-table';
12
+
13
+import {
14
+  queryFormSchema,
15
+  tableColumns,
16
+  WORK_REPORT_MOCK_DATA,
17
+} from './visitorAdd-data';
18
+
19
+// 表单配置
20
+const formOptions: VbenFormProps = {
21
+  commonConfig: {
22
+    labelWidth: 80,
23
+    componentProps: { allowClear: true },
24
+  },
25
+  schema: queryFormSchema(),
26
+  wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',
27
+};
28
+
29
+// 访客新增表格配置
30
+const workReportGridOptions: VxeGridProps = {
31
+  columns: tableColumns,
32
+  height: '800px',
33
+  proxyConfig: {
34
+    autoLoad: true,
35
+    ajax: {
36
+      query: async () => ({
37
+        items: WORK_REPORT_MOCK_DATA,
38
+        total: WORK_REPORT_MOCK_DATA.length,
39
+      }),
40
+    },
41
+  },
42
+  rowConfig: { keyField: 'id' },
43
+  pagerConfig: { enabled: true, pageSize: 100, pageSizes: [10, 20, 50, 100] },
44
+};
45
+
46
+// 创建表格实例
47
+const [WorkReportTable] = useVbenVxeGrid({
48
+  formOptions,
49
+  gridOptions: workReportGridOptions,
50
+});
51
+
52
+// 导出按钮点击事件
53
+const handleExport = () => {
54
+  console.log('导出数据');
55
+  ElMessage.success('导出功能已触发');
56
+};
57
+
58
+// 查看按钮点击事件
59
+const handleView = (row: any) => {
60
+  console.log('查看详情:', row);
61
+  ElMessage.info(`查看任务: ${row.taskName}`);
62
+};
63
+</script>
64
+
65
+<template>
66
+  <Page :auto-content-height="true">
67
+    <div class="task-report-container">
68
+      <!-- 访客新增列表 -->
69
+      <div class="table-container">
70
+        <WorkReportTable table-title="访客新增任务列表">
71
+          <template #toolbar-tools>
72
+            <ElSpace>
73
+              <ElButton
74
+                @click="handleExport"
75
+                v-access:code="['system:workDataStatistics:export']"
76
+              >
77
+                导出
78
+              </ElButton>
79
+            </ElSpace>
80
+          </template>
81
+          <template #action="{ row }">
82
+            <ElSpace>
83
+              <ElButton type="primary" @click="handleView(row)">
84
+                查看
85
+              </ElButton>
86
+            </ElSpace>
87
+          </template>
88
+        </WorkReportTable>
89
+      </div>
90
+    </div>
91
+  </Page>
92
+</template>
93
+
94
+<style scoped lang="scss">
95
+.task-report-container {
96
+  min-height: calc(100vh - 120px);
97
+  padding: 16px;
98
+  background-color: #fff;
99
+}
100
+</style>

+ 266 - 0
apps/web-ele/src/views/Archive/temporaryDuty/visitorAdd/visitorAdd-data.tsx

@@ -0,0 +1,266 @@
1
+import type { FormSchemaGetter } from '#/adapter/form';
2
+import type { VxeGridProps } from '#/adapter/vxe-table';
3
+
4
+// 访客新增数据类型定义
5
+export interface VisitorAddData {
6
+  id: number;
7
+  taskName: string; // 任务名称
8
+  station: string; // 油站
9
+  executor: string; // 执行人
10
+  position: string; // 岗位
11
+  comment: string; // 评论
12
+  deadline: string; // 截止时间
13
+  processTime: string; // 处理时间
14
+  status: string; // 完成状态
15
+  creator: string; // 创建人
16
+}
17
+
18
+// 访客新增表格配置
19
+export const tableColumns: VxeGridProps['columns'] = [
20
+  { title: '任务名称', field: 'taskName', minWidth: 150, align: 'center' },
21
+  { title: '油站', field: 'station', minWidth: 120, align: 'center' },
22
+  { title: '执行人', field: 'executor', minWidth: 100, align: 'center' },
23
+  { title: '岗位', field: 'position', minWidth: 100, align: 'center' },
24
+  { title: '评论', field: 'comment', minWidth: 150, align: 'center' },
25
+  { title: '截止时间', field: 'deadline', minWidth: 150, align: 'center' },
26
+  { title: '处理时间', field: 'processTime', minWidth: 150, align: 'center' },
27
+  { title: '完成状态', field: 'status', minWidth: 100, align: 'center' },
28
+  { title: '创建人', field: 'creator', minWidth: 100, align: 'center' },
29
+  {
30
+    title: '操作',
31
+    minWidth: 100,
32
+    align: 'center',
33
+    fixed: 'right',
34
+    slots: {
35
+      default: 'action',
36
+    },
37
+  },
38
+];
39
+
40
+// 访客新增虚拟数据
41
+export const WORK_REPORT_MOCK_DATA: VisitorAddData[] = [
42
+  {
43
+    id: 1,
44
+    taskName: '访客信息录入',
45
+    station: '北京东加油站',
46
+    executor: '张三',
47
+    position: '站长',
48
+    comment: '已完成访客信息录入',
49
+    deadline: '2024-01-15 18:00:00',
50
+    processTime: '2024-01-15 16:30:00',
51
+    status: '已完成',
52
+    creator: '李四',
53
+  },
54
+  {
55
+    id: 2,
56
+    taskName: '访客权限设置',
57
+    station: '北京西加油站',
58
+    executor: '王五',
59
+    position: '安全员',
60
+    comment: '已为访客设置临时权限',
61
+    deadline: '2024-01-16 12:00:00',
62
+    processTime: '2024-01-16 10:45:00',
63
+    status: '已完成',
64
+    creator: '赵六',
65
+  },
66
+  {
67
+    id: 3,
68
+    taskName: '访客引导服务',
69
+    station: '机场油站',
70
+    executor: '孙七',
71
+    position: '服务员',
72
+    comment: '已完成访客引导',
73
+    deadline: '2024-01-17 14:00:00',
74
+    processTime: '2024-01-17 13:20:00',
75
+    status: '已完成',
76
+    creator: '周八',
77
+  },
78
+  {
79
+    id: 4,
80
+    taskName: '访客记录归档',
81
+    station: '北京南加油站',
82
+    executor: '吴九',
83
+    position: '资料员',
84
+    comment: '正在整理访客记录',
85
+    deadline: '2024-01-18 17:00:00',
86
+    processTime: '',
87
+    status: '进行中',
88
+    creator: '郑十',
89
+  },
90
+  {
91
+    id: 5,
92
+    taskName: '访客车辆登记',
93
+    station: '北京北加油站',
94
+    executor: '冯一',
95
+    position: '保安',
96
+    comment: '已完成车辆登记',
97
+    deadline: '2024-01-19 09:00:00',
98
+    processTime: '2024-01-19 08:30:00',
99
+    status: '已完成',
100
+    creator: '陈二',
101
+  },
102
+  {
103
+    id: 6,
104
+    taskName: '访客培训',
105
+    station: '龙飞虎加油站',
106
+    executor: '褚三',
107
+    position: '培训员',
108
+    comment: '已安排访客培训',
109
+    deadline: '2024-01-20 15:00:00',
110
+    processTime: '',
111
+    status: '进行中',
112
+    creator: '卫四',
113
+  },
114
+  {
115
+    id: 7,
116
+    taskName: '访客离场确认',
117
+    station: '法站加油站',
118
+    executor: '蒋五',
119
+    position: '管理员',
120
+    comment: '已确认访客离场',
121
+    deadline: '2024-01-21 11:00:00',
122
+    processTime: '2024-01-21 10:15:00',
123
+    status: '已完成',
124
+    creator: '沈六',
125
+  },
126
+  {
127
+    id: 8,
128
+    taskName: '访客满意度调查',
129
+    station: '河北油站',
130
+    executor: '韩七',
131
+    position: '客服',
132
+    comment: '正在收集满意度反馈',
133
+    deadline: '2024-01-22 16:00:00',
134
+    processTime: '',
135
+    status: '进行中',
136
+    creator: '杨八',
137
+  },
138
+];
139
+
140
+export const queryFormSchema: FormSchemaGetter = () => QUERY_FORM_SCHEMA;
141
+
142
+// 查询表单模式配置
143
+const QUERY_FORM_SCHEMA = [
144
+  {
145
+    component: 'Select',
146
+    fieldName: 'area',
147
+    label: '片区',
148
+    componentProps: {
149
+      placeholder: '请选择片区',
150
+      options: [
151
+        { label: '默认片区', value: '默认片区' },
152
+        { label: '片区1', value: '片区1' },
153
+        { label: '片区2', value: '片区2' },
154
+        { label: '片区3', value: '片区3' },
155
+      ],
156
+    },
157
+  },
158
+  {
159
+    component: 'Select',
160
+    fieldName: 'station',
161
+    label: '油站',
162
+    componentProps: {
163
+      placeholder: '请选择油站',
164
+      options: [
165
+        { label: '机场油站', value: '机场油站' },
166
+        { label: '北京东加油站', value: '北京东加油站' },
167
+        { label: '北京西加油站', value: '北京西加油站' },
168
+        { label: '北京南加油站', value: '北京南加油站' },
169
+        { label: '北京北加油站', value: '北京北加油站' },
170
+        { label: '河北油站', value: '河北油站' },
171
+        { label: '龙飞虎加油站', value: '龙飞虎加油站' },
172
+        { label: '法站加油站', value: '法站加油站' },
173
+      ],
174
+    },
175
+  },
176
+  {
177
+    component: 'Select',
178
+    fieldName: 'status',
179
+    label: '完成状态',
180
+    componentProps: {
181
+      placeholder: '请选择完成状态',
182
+      options: [
183
+        { label: '已完成', value: '已完成' },
184
+        { label: '进行中', value: '进行中' },
185
+        { label: '未开始', value: '未开始' },
186
+      ],
187
+    },
188
+  },
189
+  {
190
+    component: 'Select',
191
+    fieldName: 'position',
192
+    label: '岗位',
193
+    componentProps: {
194
+      placeholder: '请选择岗位',
195
+      options: [
196
+        { label: '站长', value: '站长' },
197
+        { label: '安全员', value: '安全员' },
198
+        { label: '服务员', value: '服务员' },
199
+        { label: '资料员', value: '资料员' },
200
+        { label: '保安', value: '保安' },
201
+        { label: '培训员', value: '培训员' },
202
+        { label: '管理员', value: '管理员' },
203
+        { label: '客服', value: '客服' },
204
+      ],
205
+    },
206
+  },
207
+  {
208
+    component: 'Select',
209
+    fieldName: 'comment',
210
+    label: '评论',
211
+    componentProps: {
212
+      placeholder: '请选择评论',
213
+      options: [
214
+        { label: '已完成访客信息录入', value: '已完成访客信息录入' },
215
+        { label: '已为访客设置临时权限', value: '已为访客设置临时权限' },
216
+        { label: '已完成访客引导', value: '已完成访客引导' },
217
+        { label: '正在整理访客记录', value: '正在整理访客记录' },
218
+        { label: '已完成车辆登记', value: '已完成车辆登记' },
219
+      ],
220
+    },
221
+  },
222
+  {
223
+    component: 'Select',
224
+    fieldName: 'creator',
225
+    label: '创建人',
226
+    componentProps: {
227
+      placeholder: '请选择创建人',
228
+      options: [
229
+        { label: '李四', value: '李四' },
230
+        { label: '赵六', value: '赵六' },
231
+        { label: '周八', value: '周八' },
232
+        { label: '郑十', value: '郑十' },
233
+        { label: '陈二', value: '陈二' },
234
+      ],
235
+    },
236
+  },
237
+  {
238
+    component: 'DatePicker',
239
+    fieldName: 'processTimeRange',
240
+    label: '处理时间',
241
+    componentProps: {
242
+      placeholder: '请选择时间范围',
243
+      type: 'daterange',
244
+      rangeSeparator: '至',
245
+      startPlaceholder: '开始时间',
246
+      endPlaceholder: '结束时间',
247
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
248
+    },
249
+  },
250
+  {
251
+    component: 'Input',
252
+    fieldName: 'executor',
253
+    label: '执行人',
254
+    componentProps: {
255
+      placeholder: '请输入执行人',
256
+    },
257
+  },
258
+  {
259
+    component: 'Input',
260
+    fieldName: 'taskName',
261
+    label: '任务名称',
262
+    componentProps: {
263
+      placeholder: '请输入任务名称',
264
+    },
265
+  },
266
+];