Bladeren bron

mod: 销售详情与处理

闪电 1 maand geleden
bovenliggende
commit
fce46dd294

+ 0 - 3
apps/web-ele/.env.development

@@ -4,11 +4,8 @@ VITE_PORT=8081
4 4
 VITE_BASE=/
5 5
 
6 6
 # 接口地址
7
-<<<<<<< HEAD
8
-=======
9 7
 
10 8
 # VITE_GLOB_API_URL=http://localhost:8080
11
->>>>>>> 0e1f6ad81045fb3321fea8042547bff705cc8a75
12 9
 VITE_GLOB_API_URL=http://39.164.159.226:8088
13 10
 # VITE_GLOB_API_URL=http://localhost:8080
14 11
 # VITE_GLOB_API_URL=http://192.168.1.7:8080

+ 10 - 0
apps/web-ele/src/api/task/index.ts

@@ -4,6 +4,7 @@ enum Api {
4 4
   emergencyWySubmit = '/formEmergencyDrill/drill/submit',
5 5
   emergencyWySubmitReport = '/formEmergencyDrill/drill/submitReport',
6 6
   groupLogBase = '/formTeamShiftLog/log/handle',
7
+  salesSurveyHandle = '/formCompetitorSalesSurvey/survey/handle',
7 8
   scheduleShiftManagementList = '/scheduleShiftManagement/management/list',
8 9
   // childBase = '/taskCheckSubItem/item',
9 10
 }
@@ -43,3 +44,12 @@ export function submitEmergencyWy(params: any) {
43 44
 export function submitEmergencyWyReport(params: any) {
44 45
   return requestClient.put(`${Api.emergencyWySubmitReport}`, params);
45 46
 }
47
+
48
+/**
49
+ * 销量调查处理
50
+ * @param params 处理参数
51
+ * @returns
52
+ */
53
+export function handleSalesSurvey(params: any) {
54
+  return requestClient.put(`${Api.salesSurveyHandle}`, params);
55
+}

+ 254 - 0
apps/web-ele/src/views/schedule/detail/components/sales-survey.vue

@@ -0,0 +1,254 @@
1
+<script lang="ts" setup>
2
+// @ts-ignore
3
+import { computed, ref } from 'vue';
4
+
5
+import { ElCard, ElDescriptions, ElDescriptionsItem } from 'element-plus';
6
+
7
+// @ts-ignore
8
+import { useVbenVxeGrid } from '#/adapter/vxe-table';
9
+
10
+// 定义组件的Props接口
11
+interface SalesSurveyProps {
12
+  taskDetail: any;
13
+}
14
+
15
+// 接收父组件传递的任务详情数据
16
+const props = defineProps<SalesSurveyProps>();
17
+
18
+// 计算属性,获取销售调研数据
19
+const salesSurveyData = computed(() => {
20
+  return props.taskDetail || [];
21
+});
22
+
23
+// 格式化日期时间
24
+
25
+// 格式化数值,保留两位小数
26
+const formatNumber = (value: number | string) => {
27
+  if (value === undefined || value === null || value === '') return '-';
28
+  const num = Number(value);
29
+  if (isNaN(num)) return '-';
30
+  return num.toFixed(2);
31
+};
32
+
33
+// 表格列配置
34
+const tableColumns: any = [
35
+  {
36
+    field: 'competitorName',
37
+    title: '场站',
38
+    width: 100,
39
+    fixed: 'left',
40
+    formatter: ({ row }) => {
41
+      return row.competitorName || row.stationName || '-';
42
+    },
43
+  },
44
+  {
45
+    field: 'gasolineCar',
46
+    title: '汽油车',
47
+    width: 180,
48
+    children: [
49
+      {
50
+        field: 'gasolineVehicleCount',
51
+        title: '进站次数',
52
+        width: 90,
53
+      },
54
+      {
55
+        field: 'gasolineVolumeDiff',
56
+        title: '加油升差数',
57
+        width: 90,
58
+      },
59
+    ],
60
+  },
61
+  {
62
+    field: 'dieselCar',
63
+    title: '柴油车',
64
+    width: 180,
65
+    children: [
66
+      {
67
+        field: 'dieselVehicleCount',
68
+        title: '进站次数',
69
+        width: 90,
70
+      },
71
+      {
72
+        field: 'dieselVolumeDiff',
73
+        title: '加油升差数',
74
+        width: 90,
75
+      },
76
+    ],
77
+  },
78
+  {
79
+    field: 'motorcycle',
80
+    title: '摩托车',
81
+    width: 180,
82
+    children: [
83
+      {
84
+        field: 'motorcycleCount',
85
+        title: '进站次数',
86
+        width: 90,
87
+      },
88
+      {
89
+        field: 'motorcycleVolumeDiff',
90
+        title: '加油升差数',
91
+        width: 90,
92
+      },
93
+    ],
94
+  },
95
+  {
96
+    field: 'gasCar',
97
+    title: '气车',
98
+    width: 180,
99
+    children: [
100
+      {
101
+        field: 'gasVehicleCount',
102
+        title: '进站次数',
103
+        width: 90,
104
+      },
105
+      {
106
+        field: 'gasVolumeDiff',
107
+        title: '加油升差数',
108
+        width: 90,
109
+      },
110
+    ],
111
+  },
112
+  {
113
+    field: 'periodForecastDiff',
114
+    title: '时段预测销量差(升)',
115
+    width: 150,
116
+  },
117
+  {
118
+    field: 'dailyForecastDiff',
119
+    title: '全天预测销量差(升)',
120
+    width: 150,
121
+  },
122
+  {
123
+    field: 'surveySales',
124
+    title: '调查销量(升)',
125
+    width: 180,
126
+    children: [
127
+      {
128
+        field: 'gasolineSurveyVolume',
129
+        title: '汽油',
130
+        width: 90,
131
+      },
132
+      {
133
+        field: 'dieselSurveyVolume',
134
+        title: '柴油',
135
+        width: 90,
136
+      },
137
+    ],
138
+  },
139
+];
140
+
141
+// 初始化表格配置
142
+const gridOptions: any = {
143
+  size: 'medium',
144
+  toolbarConfig: {
145
+    custom: false,
146
+    refresh: false,
147
+    zoom: false,
148
+  },
149
+  pagerConfig: {
150
+    enabled: false,
151
+  },
152
+  proxyConfig: {
153
+    ajax: {
154
+      query: async () => {
155
+        return {
156
+          items: props.taskDetail || [],
157
+        };
158
+      },
159
+    },
160
+  },
161
+  columns: tableColumns,
162
+};
163
+
164
+// 表格数据
165
+const tableDatas = ref<any>([]);
166
+// 使用BasicTable组件
167
+const [BasicTable, basicTableApi] = useVbenVxeGrid({
168
+  gridOptions,
169
+});
170
+</script>
171
+
172
+<template>
173
+  <ElCard>
174
+    <template #header>
175
+      <div class="flex items-center gap-4">
176
+        <div style="width: 4px; height: 12px; background-color: #215acd"></div>
177
+        <span
178
+          class="text-lg font-bold text-gray-800"
179
+          style="font-size: 14px; font-weight: 600"
180
+        >
181
+          销售调研详情
182
+        </span>
183
+      </div>
184
+    </template>
185
+
186
+    <div class="task-info">
187
+      <!-- 基本信息 -->
188
+      <div class="section-title">
189
+        <div class="section-bar"></div>
190
+        <span class="section-text">基本信息</span>
191
+      </div>
192
+      <ElDescriptions :column="4" class="mb-6">
193
+        <ElDescriptionsItem label="调查开始时间:">
194
+          {{ taskDetail[0].surveyStartTime || '-' }}
195
+        </ElDescriptionsItem>
196
+        <ElDescriptionsItem label="调查结束时间:">
197
+          {{ taskDetail[0].surveyEndTime || '-' }}
198
+        </ElDescriptionsItem>
199
+      </ElDescriptions>
200
+
201
+      <!-- 销量调查表格 -->
202
+      <div class="section-title">
203
+        <div class="section-bar"></div>
204
+        <span class="section-text">销量调查数据</span>
205
+      </div>
206
+      <div class="mb-6">
207
+        <BasicTable table-title="" class="w-full" />
208
+      </div>
209
+    </div>
210
+  </ElCard>
211
+</template>
212
+
213
+<style scoped lang="scss">
214
+.task-info {
215
+  .section-title {
216
+    display: flex;
217
+    align-items: center;
218
+    gap: 8px;
219
+    margin: 20px 0 12px 0;
220
+
221
+    .section-bar {
222
+      width: 4px;
223
+      height: 12px;
224
+      background-color: #215acd;
225
+    }
226
+
227
+    .section-text {
228
+      font-size: 14px;
229
+      font-weight: 600;
230
+      color: var(--text-color-primary);
231
+    }
232
+  }
233
+
234
+  :deep(.el-descriptions) {
235
+    margin-bottom: 0 !important;
236
+  }
237
+
238
+  :deep(.el-descriptions__label) {
239
+    font-size: 14px;
240
+    font-weight: 400;
241
+    color: var(--text-color-secondary);
242
+  }
243
+
244
+  :deep(.el-descriptions__content) {
245
+    font-size: 14px;
246
+    font-weight: 500;
247
+    color: var(--text-color-primary);
248
+  }
249
+
250
+  :deep(.el-descriptions__table) {
251
+    background: transparent !important;
252
+  }
253
+}
254
+</style>

+ 2 - 0
apps/web-ele/src/views/schedule/detail/drawer/index.ts

@@ -4,4 +4,6 @@ export { default as MeetingDrawer } from './meeting/index.vue';
4 4
 
5 5
 export { default as ManagementPlanDrawer } from './plan/index.vue';
6 6
 
7
+export { default as SalesSurveyDrawer } from './salesSurvey/index.vue';
8
+
7 9
 export { default as UploadDrawer } from './upload/index.vue';

+ 165 - 0
apps/web-ele/src/views/schedule/detail/drawer/salesSurvey/config-data.tsx

@@ -0,0 +1,165 @@
1
+// @ts-ignore: 忽略
2
+import type { FormSchemaGetter } from '#/adapter/form';
3
+// @ts-ignore: 忽略
4
+import type { VxeGridProps } from '#/adapter/vxe-table';
5
+
6
+// 抽屉表单配置
7
+export const drawerFormSchema: any | FormSchemaGetter = () => [
8
+  {
9
+    component: 'DatePicker',
10
+    componentProps: {
11
+      placeholder: '请选择调查开始时间',
12
+      type: 'datetime',
13
+      format: 'YYYY-MM-DD HH:mm:ss',
14
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
15
+      width: '100%',
16
+    },
17
+    fieldName: 'surveyStartTime',
18
+    label: '调查开始时间',
19
+    rules: 'required',
20
+  },
21
+  {
22
+    component: 'DatePicker',
23
+    componentProps: {
24
+      placeholder: '请选择调查结束时间',
25
+      type: 'datetime',
26
+      format: 'YYYY-MM-DD HH:mm:ss',
27
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
28
+      width: '100%',
29
+    },
30
+    fieldName: 'surveyEndTime',
31
+    label: '调查结束时间',
32
+    rules: 'required',
33
+  },
34
+  {
35
+    fieldName: 'salesSurveyTable',
36
+    label: '销量调查表格',
37
+    // component: 'div',
38
+    hideLabel: true,
39
+    renderComponentContent: () => {
40
+      return {
41
+        default: () => [],
42
+      };
43
+    },
44
+  },
45
+];
46
+
47
+// 默认表格列配置
48
+export const defautTableColumns: VxeGridProps['columns'] = [
49
+  {
50
+    field: 'competitorName',
51
+    title: '场站',
52
+    width: 100,
53
+    fixed: 'left',
54
+    formatter: ({ row }) => {
55
+      return row.competitorName || row.stationName || '-';
56
+    },
57
+  },
58
+  {
59
+    field: 'gasolineCar',
60
+    title: '汽油车',
61
+    width: 180,
62
+    children: [
63
+      {
64
+        field: 'gasolineVehicleCount',
65
+        title: '进站次数',
66
+        editRender: { name: 'input' },
67
+        width: 90,
68
+      },
69
+      {
70
+        field: 'gasolineVolumeDiff',
71
+        title: '加油升差数',
72
+        editRender: { name: 'input' },
73
+        width: 90,
74
+      },
75
+    ],
76
+  },
77
+  {
78
+    field: 'dieselCar',
79
+    title: '柴油车',
80
+    width: 180,
81
+    children: [
82
+      {
83
+        field: 'dieselVehicleCount',
84
+        title: '进站次数',
85
+        width: 90,
86
+        editRender: { name: 'input' },
87
+      },
88
+      {
89
+        field: 'dieselVolumeDiff',
90
+        title: '加油升差数',
91
+        width: 90,
92
+        editRender: { name: 'input' },
93
+      },
94
+    ],
95
+  },
96
+  {
97
+    field: 'motorcycle',
98
+    title: '摩托车',
99
+    width: 180,
100
+    children: [
101
+      {
102
+        field: 'motorcycleCount',
103
+        title: '进站次数',
104
+        width: 90,
105
+        editRender: { name: 'input' },
106
+      },
107
+      {
108
+        field: 'motorcycleVolumeDiff',
109
+        title: '加油升差数',
110
+        width: 90,
111
+        editRender: { name: 'input' },
112
+      },
113
+    ],
114
+  },
115
+  {
116
+    field: 'gasCar',
117
+    title: '气车',
118
+    width: 180,
119
+    children: [
120
+      {
121
+        field: 'gasVehicleCount',
122
+        title: '进站次数',
123
+        width: 90,
124
+        editRender: { name: 'input' },
125
+      },
126
+      {
127
+        field: 'gasVolumeDiff',
128
+        title: '加油升差数',
129
+        width: 90,
130
+        editRender: { name: 'input' },
131
+      },
132
+    ],
133
+  },
134
+  {
135
+    field: 'periodForecastDiff',
136
+    title: '时段预测销量差(升)',
137
+    width: 150,
138
+    editRender: { name: 'input' },
139
+  },
140
+  {
141
+    field: 'dailyForecastDiff',
142
+    title: '全天预测销量差(升)',
143
+    editRender: { name: 'input' },
144
+    width: 150,
145
+  },
146
+  {
147
+    field: 'surveySales',
148
+    title: '调查销量(升)',
149
+    width: 180,
150
+    children: [
151
+      {
152
+        field: 'gasolineSurveyVolume',
153
+        title: '汽油',
154
+        width: 90,
155
+        editRender: { name: 'input' },
156
+      },
157
+      {
158
+        field: 'dieselSurveyVolume',
159
+        title: '柴油',
160
+        width: 90,
161
+        editRender: { name: 'input' },
162
+      },
163
+    ],
164
+  },
165
+];

+ 166 - 0
apps/web-ele/src/views/schedule/detail/drawer/salesSurvey/index.vue

@@ -0,0 +1,166 @@
1
+<script setup lang="ts">
2
+// @ts-ignore: 忽略
3
+import type { VxeGridProps } from '#/adapter/vxe-table';
4
+
5
+import { ref } from 'vue';
6
+
7
+// @ts-ignore: 忽略
8
+import { useVbenDrawer, useVbenForm } from '@vben/common-ui';
9
+
10
+// @ts-ignore: 忽略
11
+import { useVbenVxeGrid } from '#/adapter/vxe-table';
12
+// @ts-ignore: 忽略
13
+import { handleSalesSurvey } from '#/api/task';
14
+
15
+// @ts-ignore: 忽略
16
+import { defautTableColumns, drawerFormSchema } from './config-data.tsx';
17
+
18
+// 定义事件
19
+const emit = defineEmits<{ reload: [] }>();
20
+
21
+// 初始化表单配置
22
+const [Form, formApi] = useVbenForm({
23
+  showDefaultActions: false,
24
+  schema: drawerFormSchema(),
25
+});
26
+
27
+// 初始化任务参数
28
+const taskParams = ref({
29
+  taskId: '',
30
+  taskName: '',
31
+  taskList: '',
32
+});
33
+
34
+// 初始化抽屉组件
35
+const [Drawer, drawerApi] = useVbenDrawer({
36
+  async onOpenChange(isOpen: boolean) {
37
+    if (!isOpen) {
38
+      return;
39
+    }
40
+    try {
41
+      drawerApi.drawerLoading(true);
42
+      const { taskId, taskName, taskList } = drawerApi.getData();
43
+      taskParams.value.taskId = taskId;
44
+      taskParams.value.taskName = taskName;
45
+      taskParams.value.taskList = taskList;
46
+    } catch (error) {
47
+      console.error(error);
48
+    } finally {
49
+      drawerApi.drawerLoading(false);
50
+    }
51
+  },
52
+  onClosed() {
53
+    formApi.resetForm();
54
+  },
55
+  async onConfirm() {
56
+    try {
57
+      this.confirmLoading = true;
58
+      const { valid } = await formApi.validate();
59
+      if (!valid) {
60
+        return;
61
+      }
62
+
63
+      const values = await formApi.getValues();
64
+      // const params = {
65
+      //   id: taskParams.value.taskId,
66
+      //   ...values,
67
+      // };
68
+
69
+      const list = basicTableApi.grid.getData();
70
+      const params: any = [];
71
+      list.forEach((item: any) => {
72
+        params.push({
73
+          ...item,
74
+          surveyStartTime: values.surveyStartTime,
75
+          surveyEndTime: values.surveyEndTime,
76
+        });
77
+      });
78
+
79
+      // 这里可以调用API提交数据
80
+      await handleSalesSurvey(params);
81
+
82
+      emit('reload');
83
+      drawerApi.close();
84
+    } catch (error) {
85
+      console.error(error);
86
+    } finally {
87
+      this.confirmLoading = false;
88
+    }
89
+  },
90
+});
91
+
92
+// 初始化表格配置
93
+const gridOptions: VxeGridProps = {
94
+  size: 'medium',
95
+  toolbarConfig: {
96
+    custom: false,
97
+    refresh: false,
98
+    zoom: false,
99
+  },
100
+  pagerConfig: {
101
+    enabled: false,
102
+  },
103
+  proxyConfig: {
104
+    ajax: {
105
+      query: async () => {
106
+        // 这里可以调用API获取表格数据
107
+        return {
108
+          items: taskParams.value.taskList, // 初始数据为空
109
+        };
110
+      },
111
+    },
112
+  },
113
+  columns: defautTableColumns,
114
+  editConfig: {
115
+    mode: 'cell',
116
+    trigger: 'click',
117
+  },
118
+};
119
+
120
+// 初始化表格组件
121
+const [BasicTable, basicTableApi] = useVbenVxeGrid({
122
+  gridOptions,
123
+});
124
+
125
+// 确认事件
126
+const confirmEvent = (row: any) => {
127
+  // 处理确认事件
128
+};
129
+</script>
130
+
131
+<template>
132
+  <Drawer :title="taskParams.taskName">
133
+    <Form>
134
+      <!-- 销量调查表格插槽 -->
135
+      <template #salesSurveyTable>
136
+        <BasicTable table-title="" class="w-full">
137
+          <template #action="{ row }">
138
+            <ElSpace>
139
+              <ElPopconfirm
140
+                :title="$t('common.confirm-delete')"
141
+                @confirm="confirmEvent(row)"
142
+              >
143
+                <template #reference>
144
+                  <ElButton
145
+                    size="small"
146
+                    type="danger"
147
+                    plain
148
+                    v-access:code="['system:dict:remove']"
149
+                  >
150
+                    删除
151
+                  </ElButton>
152
+                </template>
153
+              </ElPopconfirm>
154
+            </ElSpace>
155
+          </template>
156
+        </BasicTable>
157
+      </template>
158
+    </Form>
159
+  </Drawer>
160
+</template>
161
+
162
+<style scoped lang="scss">
163
+:deep(.el-input-number) {
164
+  width: 100%;
165
+}
166
+</style>

+ 54 - 32
apps/web-ele/src/views/schedule/detail/index.vue

@@ -43,6 +43,8 @@ import MeetingComponent from './components/meeting.vue';
43 43
 // @ts-ignore
44 44
 import ManagementPlanComponent from './components/plan.vue';
45 45
 // @ts-ignore
46
+import SalesSurveyComponent from './components/sales-survey.vue';
47
+// @ts-ignore
46 48
 import WeeklyComponent from './components/weekly.vue';
47 49
 import { mobileTaskTypes } from './config-data';
48 50
 import {
@@ -50,6 +52,7 @@ import {
50 52
   GroupLogDrawer,
51 53
   ManagementPlanDrawer,
52 54
   MeetingDrawer,
55
+  SalesSurveyDrawer,
53 56
   UploadDrawer,
54 57
 } from './drawer';
55 58
 
@@ -253,6 +256,10 @@ const DynamicDrawerComponent = defineComponent({
253 256
         Component = UploadDrawer;
254 257
       } else if (taskInfo.value.formType === 'form') {
255 258
         switch (taskInfo.value.subFormType) {
259
+          case 'competition_sales_survey': {
260
+            Component = SalesSurveyDrawer;
261
+            break;
262
+          }
256 263
           case 'emergency_wy': {
257 264
             Component = EmergencyWyDrawer;
258 265
             break;
@@ -509,7 +516,7 @@ onMounted(async () => {
509 516
               "
510 517
             >
511 518
               <div style="padding-left: 24px; margin-top: 10px">
512
-                <!-- <div>处理建议: {{ taskData.frequency }}</div> -->
519
+                <!-- <div>处理时间: {{ taskData.frequency }}</div> -->
513 520
                 <div>描述图片:</div>
514 521
                 <div class="task-images">
515 522
                   <img
@@ -523,6 +530,41 @@ onMounted(async () => {
523 530
                 </div>
524 531
               </div>
525 532
             </ElDescriptionsItem>
533
+
534
+            <ElDescriptionsItem
535
+              v-if="taskResult.handleContent || taskInfo.cancelReason"
536
+              label="处理情况:"
537
+              :span="4"
538
+            >
539
+              {{ taskResult.handleContent || taskInfo.cancelReason || '' }}
540
+            </ElDescriptionsItem>
541
+            <ElDescriptionsItem label="处理时间:" :span="4">
542
+              {{ taskInfo.completeTime || taskInfo.cancelTime || '-' }}
543
+            </ElDescriptionsItem>
544
+            <ElDescriptionsItem
545
+              v-if="taskResult.files && taskResult.files.length > 0"
546
+              label="处理附件:"
547
+              :span="4"
548
+            >
549
+              <div class="attachment-list">
550
+                <div
551
+                  v-for="(file, index) in taskResult.files"
552
+                  :key="index"
553
+                  class="attachment-item"
554
+                  @click="
555
+                    () =>
556
+                      downloadFile(
557
+                        file,
558
+                        taskResult.fileNames[index] || `附件${+index + 1}`,
559
+                      )
560
+                  "
561
+                >
562
+                  <span class="attachment-name">{{
563
+                    taskResult.fileNames[index] || `附件${+index + 1}`
564
+                  }}</span>
565
+                </div>
566
+              </div>
567
+            </ElDescriptionsItem>
526 568
           </ElDescriptions>
527 569
         </ElCard>
528 570
 
@@ -596,6 +638,15 @@ onMounted(async () => {
596 638
           "
597 639
         />
598 640
 
641
+        <!-- 销售调查组件 -->
642
+        <SalesSurveyComponent
643
+          :task-detail="taskInfo.taskList"
644
+          v-if="
645
+            taskInfo.formType === 'form' &&
646
+            taskInfo.subFormType === 'competition_sales_survey'
647
+          "
648
+        />
649
+
599 650
         <!-- 紧急情况组件 -->
600 651
         <EmergencyComponent
601 652
           :task-detail="taskInfo.taskList[0]"
@@ -614,7 +665,7 @@ onMounted(async () => {
614 665
         />
615 666
 
616 667
         <!-- 处理信息组件 -->
617
-        <ElCard v-if="taskInfo.status === 3">
668
+        <!-- <ElCard v-if="taskInfo.status === 3">
618 669
           <template #header>
619 670
             <div class="flex items-center gap-4">
620 671
               <div
@@ -639,11 +690,6 @@ onMounted(async () => {
639 690
             <ElDescriptionsItem label="处理时间:" :span="4">
640 691
               {{ taskInfo.completeTime || taskInfo.cancelTime || '-' }}
641 692
             </ElDescriptionsItem>
642
-            <!-- <ElDescriptionsItem label="处理状态:">
643
-              <ElTag :type="statusConfig[taskInfo.status]?.type || 'info'">
644
-                {{ statusConfig[taskInfo.status]?.text || taskInfo.status }}
645
-              </ElTag>
646
-            </ElDescriptionsItem> -->
647 693
             <ElDescriptionsItem
648 694
               v-if="taskResult.files && taskResult.files.length > 0"
649 695
               label="处理附件:"
@@ -668,32 +714,8 @@ onMounted(async () => {
668 714
                 </div>
669 715
               </div>
670 716
             </ElDescriptionsItem>
671
-            <!-- <ElDescriptionsItem :span="4">
672
-              <div style="padding-left: 24px; margin-top: 10px">
673
-                <div v-if="taskResult.content">
674
-                  处理建议: {{ taskResult.content }}
675
-                </div>
676
-                <div v-if="taskResult.images && taskResult.images.length > 0">
677
-                  任务图片:
678
-                </div>
679
-                <div
680
-                  v-if="taskResult.images && taskResult.images.length > 0"
681
-                  class="task-images"
682
-                >
683
-                  <img
684
-                    v-for="(image, index) in taskResult.images"
685
-                    :key="index"
686
-                    :src="image"
687
-                    alt="处理图片"
688
-                    class="task-image"
689
-                    @click="previewImage(image)"
690
-                  />
691
-                </div>
692
-                <span v-else>-</span>
693
-              </div>
694
-            </ElDescriptionsItem> -->
695 717
           </ElDescriptions>
696
-        </ElCard>
718
+        </ElCard> -->
697 719
       </div>
698 720
 
699 721
       <div style="width: 412px">

+ 18 - 6
apps/web-ele/src/views/system/post/config-data.ts

@@ -39,15 +39,27 @@ export const tableColumns: VxeGridProps['columns'] = [
39 39
   {
40 40
     field: 'taskType',
41 41
     title: '任务类型',
42
-    formatter: (params: { cellValue: string | string[]; column: any; row: any }) => {
42
+    formatter: (params: {
43
+      cellValue: string | string[];
44
+      column: any;
45
+      row: any;
46
+    }) => {
43 47
       const options = getTaskTypeOptions();
44 48
       // 处理接口返回的逗号分隔字符串和前端多选的数组
45 49
       const cellValue = params.cellValue;
46
-      const values = typeof cellValue === 'string' ? cellValue.split(',') : Array.isArray(cellValue) ? cellValue : [cellValue];
47
-      return values.map(value => {
48
-        const option = options.find((item) => item.value === value);
49
-        return option ? option.label : value;
50
-      }).filter(label => label).join(', ');
50
+      const values =
51
+        typeof cellValue === 'string'
52
+          ? cellValue.split(',')
53
+          : (Array.isArray(cellValue)
54
+            ? cellValue
55
+            : [cellValue]);
56
+      return values
57
+        .map((value) => {
58
+          const option = options.find((item) => item.value === value);
59
+          return option ? option.label : value;
60
+        })
61
+        .filter(Boolean)
62
+        .join(', ');
51 63
     },
52 64
   },
53 65
   {