miaofuhao 5 days ago
parent
commit
0303be393f

+ 2 - 2
apps/web-ele/.env.development

@@ -6,8 +6,8 @@ VITE_BASE=/
6 6
 # 接口地址
7 7
 VITE_GLOB_API_URL=http://39.164.159.226:8088
8 8
 # VITE_GLOB_API_URL=http://192.168.1.170:8080
9
-VITE_GLOB_FLOW_URL=http://192.168.31.160:8082
10
-# VITE_GLOB_FLOW_URL=http://192.168.1.21:8082
9
+# VITE_GLOB_FLOW_URL=http://192.168.31.160:8082
10
+VITE_GLOB_FLOW_URL=http://192.168.1.21:8082
11 11
 
12 12
 # 是否开启 Nitro Mock服务,true 为开启,false 为关
13 13
 VITE_NITRO_MOCK=false

+ 11 - 1
apps/web-ele/src/api/system/infoEntry/stationInfo/stationInfo.ts

@@ -15,6 +15,7 @@ enum Api {
15 15
   root = '/sysStation/station',
16 16
   // 查询所有片区信息
17 17
   selectAllSysStationList = '/sysStationArea/area/selectAllSysStationAreaList',
18
+  selectAllSysStation = '/sysStation/station/selectAllSysStationList'
18 19
 }
19 20
 
20 21
 
@@ -26,6 +27,14 @@ enum Api {
26 27
 export function selectAllSysStationAreaList() {
27 28
   return requestClient.get<BaseResult<StationInfoModel[]>>(Api.selectAllSysStationList);
28 29
 }
30
+
31
+/**
32
+ * 查询所有油站信息
33
+ * @returns 油站列表
34
+ */
35
+export function selectAllSysStation() {
36
+  return requestClient.get<BaseResult<StationInfoModel[]>>(Api.selectAllSysStation);
37
+}
29 38
 /**
30 39
  * 查询油站信息列表
31 40
  * @param params 查询参数
@@ -86,4 +95,5 @@ export function deleteStationInfo(ids: number[]) {
86 95
  */
87 96
 export function exportStationInfo(data: Partial<StationInfoModel>) {
88 97
   return commonExport(Api.export, data);
89
-}
98
+}
99
+

+ 13 - 5
apps/web-ele/src/api/workflow/instance/index.ts

@@ -21,7 +21,7 @@ export function getTaskByBusinessId(businessId: string) {
21 21
  * @returns
22 22
  */
23 23
 export function pageByRunning(params?: PageQuery) {
24
-  return requestClient.get('/workflow/instance/pageByRunning', { params });
24
+  return requestClient.get('/workOrder/order/myList', { params });
25 25
 }
26 26
 
27 27
 /**
@@ -70,7 +70,7 @@ export function cancelProcessApply(data: { businessId: ID; message?: string }) {
70 70
  * @param active
71 71
  */
72 72
 export function workflowInstanceActive(instanceId: ID, active: boolean) {
73
-  return requestClient.putWithMsg<void>(
73
+  return requestClient.put<void>(
74 74
     `/workflow/instance/active/${instanceId}?active=${active}`,
75 75
   );
76 76
 }
@@ -81,13 +81,21 @@ export function workflowInstanceActive(instanceId: ID, active: boolean) {
81 81
  * @returns PageResult<Flow>
82 82
  */
83 83
 export function pageByCurrent(params?: PageQuery) {
84
-  return requestClient.get<PageResult<TaskInfo>>(
85
-    '/workflow/instance/pageByCurrent',
84
+  return requestClient.get<PageResult<TaskInfo>>('/workOrder/order/list',
86 85
     { params },
87 86
   );
88 87
 }
89 88
 
90 89
 /**
90
+ * 获取工单详情
91
+ * @param id 工单id
92
+ * @returns TaskInfo
93
+ */
94
+export function getWorkOrderDetail(id: string) {
95
+  return requestClient.get<TaskInfo>(`/workOrder/order/${id}`);
96
+}
97
+
98
+/**
91 99
  * 获取流程图,流程记录
92 100
  * @param businessId 业务标识
93 101
  * @returns 流程图,流程记录
@@ -136,4 +144,4 @@ export function updateFlowVariable(data: {
136 144
     '/workflow/instance/updateVariable',
137 145
     data,
138 146
   );
139
-}
147
+}

+ 10 - 12
apps/web-ele/src/components/dict/src/index.vue

@@ -15,16 +15,9 @@ const props = withDefaults(defineProps<Props>(), {
15 15
   dicts: undefined,
16 16
 });
17 17
 
18
-const color = computed<string>(() => {
18
+const tagType = computed<string>(() => {
19 19
   const current = props.dicts.find((item) => item.dictValue == props.value);
20
-  // // 是否为默认的颜色
21
-  // const isDefault = Reflect.has(tagTypes, listClass);
22
-  // // 判断是默认还是自定义颜色
23
-  // if (isDefault) {
24
-  //   // 这里做了antd - element-plus的兼容
25
-  //   return tagTypes[listClass]!.color;
26
-  // }
27
-  return current?.listClass ?? 'primary';
20
+  return current?.listClass ?? 'default';
28 21
 });
29 22
 
30 23
 const cssClass = computed<string>(() => {
@@ -37,16 +30,21 @@ const label = computed<number | string>(() => {
37 30
   return current?.dictLabel ?? 'unknown';
38 31
 });
39 32
 
40
-const tagComponent = computed(() => (color.value ? ElTag : 'div'));
33
+// 只有当type是Element Plus支持的类型时才传递type属性
34
+const elTagType = computed<string | undefined>(() => {
35
+  const supportedTypes = ['primary', 'success', 'info', 'warning', 'danger'];
36
+  return supportedTypes.includes(tagType.value) ? tagType.value : undefined;
37
+});
38
+
39
+const tagComponent = computed(() => ElTag);
41 40
 </script>
42 41
 
43 42
 <template>
44 43
   <div>
45 44
     <component
46 45
       :is="tagComponent"
47
-      :type="color"
46
+      :type="elTagType"
48 47
       :class="cssClass"
49
-      :color="color"
50 48
     >
51 49
       {{ label }}
52 50
     </component>

+ 23 - 1
apps/web-ele/src/router/routes/local.ts

@@ -144,7 +144,28 @@ const localRoutes: RouteRecordStringComponent[] = [
144 144
     name: 'ScheduleDetail',
145 145
     path: '/schedule/detail/:taskId',
146 146
   },
147
-  {    component: 'workflow/processDefinition/design',    meta: {      activePath: '/workflow/processDefinition',      icon: 'carbon:data-base',      title: '流程设计',      hideInMenu: true,    },    name: 'WorkflowDesign',    path: '/workflow/design/index',  },
147
+  {    
148
+    component: 'workflow/processDefinition/design',    
149
+    meta: {      
150
+      activePath: '/workflow/processDefinition',      
151
+      icon: 'carbon:data-base',      
152
+      title: '流程设计',      
153
+      hideInMenu: true,    
154
+    },    
155
+    name: 'WorkflowDesign',    
156
+    path: '/workflow/design/index',  
157
+  },
158
+  {    
159
+    component: '/workflow/order/creatOrder',    
160
+    meta: {      
161
+      activePath: '/workflow/order',      
162
+      icon: 'carbon:add',      
163
+      title: '创建工单',      
164
+      hideInMenu: false,    
165
+    },    
166
+    name: 'WorkflowCreatOrder',    
167
+    path: '/workflow/order/create',  
168
+  },
148 169
   // 新增路由开始
149 170
   {
150 171
     component: '/examManage/questScoring/cpn/examScoring/index',
@@ -298,3 +319,4 @@ export const localMenuList: RouteRecordStringComponent[] = [
298 319
 
299 320
 
300 321
 
322
+

+ 11 - 3
apps/web-ele/src/utils/render.tsx

@@ -110,13 +110,16 @@ export function renderHttpMethodTag(type: string) {
110 110
     PUT: 'orange',
111 111
   };
112 112
 
113
-  const color = colors[method] ?? 'default';
113
+  const color = colors[method] ?? 'primary'; // 将default改为primary
114 114
   const title = `${method}请求`;
115 115
 
116 116
   return <ElTag color={color}>{title}</ElTag>;
117 117
 }
118 118
 
119
-export function renderDictTag(value: string, dicts: DictData[]) {
119
+export function renderDictTag(value: string | undefined, dicts: DictData[]) {
120
+  if (!value) {
121
+    return <div></div>;
122
+  }
120 123
   return <DictTag dicts={dicts} value={value}></DictTag>;
121 124
 }
122 125
 
@@ -155,7 +158,10 @@ export function renderDictTags(
155 158
  * @param dictName dictName
156 159
  * @returns tag
157 160
  */
158
-export function renderDict(value: string, dictName: string) {
161
+export function renderDict(value: string | undefined, dictName: string) {
162
+  if (!value) {
163
+    return <div></div>;
164
+  }
159 165
   const dictInfo = getDictOptions(dictName);
160 166
   return renderDictTag(value, dictInfo);
161 167
 }
@@ -228,3 +234,5 @@ export function renderBrowserIcon(browser: string, center = false) {
228 234
   const icon = current ? current.icon : DefaultBrowserIcon;
229 235
   return renderIconSpan(icon, browser, center, '5px');
230 236
 }
237
+
238
+

+ 3 - 3
apps/web-ele/src/views/workflow/components/actions/flow-actions.vue

@@ -384,21 +384,21 @@ const showMultiActions = computed(() => {
384 384
                 key="2"
385 385
                 @click="() => transferDrawerApi.open()"
386 386
               >
387
-                <ElRollback class="mr-2" /> 转办
387
+               转办
388 388
               </ElMenuItem>
389 389
               <ElMenuItem
390 390
                 v-if="showMultiActions && buttonPermissions?.addSign"
391 391
                 key="3"
392 392
                 @click="() => addSignatureDrawerApi.open()"
393 393
               >
394
-                <ElUserPlus class="mr-2" /> 加签
394
+               加签
395 395
               </ElMenuItem>
396 396
               <ElMenuItem
397 397
                 v-if="showMultiActions && buttonPermissions?.subSign"
398 398
                 key="4"
399 399
                 @click="() => reductionSignatureDrawerApi.open()"
400 400
               >
401
-                <ElUserMinus class="mr-2" /> 减签
401
+                减签
402 402
               </ElMenuItem>
403 403
             </ElMenu>
404 404
           </template>

+ 6 - 8
apps/web-ele/src/views/workflow/components/approval-card.vue

@@ -45,16 +45,14 @@ const diffUpdateTimeString = computed(() => {
45 45
   >
46 46
     <ElDescriptions
47 47
       :column="1"
48
-      :title="info.businessTitle ?? info.flowName"
48
+      :title="info.orderNo"
49 49
       size="large"
50 50
     >
51 51
       <template #extra>
52
-        <component
53
-          :is="renderDict(info.flowStatus, DictEnum.WF_BUSINESS_STATUS)"
54
-        />
52
+        <component :is="renderDict(info.status, DictEnum.TICKET_STATUS)" />
55 53
       </template>
56
-      <ElDescriptionsItem label="当前任务">
57
-        <div class="font-bold">{{ info.nodeName }}</div>
54
+      <ElDescriptionsItem>
55
+        <div class="font-bold">{{ info.content }}</div>
58 56
       </ElDescriptionsItem>
59 57
       <ElDescriptionsItem label="提交时间">
60 58
         {{ info.createTime }}
@@ -66,12 +64,12 @@ const diffUpdateTimeString = computed(() => {
66 64
     <div class="flex w-full items-center justify-between text-[14px]">
67 65
       <div class="flex items-center gap-1 overflow-hidden whitespace-nowrap">
68 66
         <VbenAvatar
69
-          :alt="info?.createByName"
67
+          :alt="info?.currentHandler"
70 68
           class="bg-primary size-[24px] rounded-full text-[10px] text-white"
71 69
           src=""
72 70
         />
73 71
         <span class="overflow-hidden text-ellipsis opacity-50">
74
-          {{ info.createByName }}
72
+          {{ info.currentHandler }}
75 73
         </span>
76 74
       </div>
77 75
       <div class="text-nowrap opacity-50">

+ 21 - 25
apps/web-ele/src/views/workflow/components/approval-panel.vue

@@ -15,6 +15,7 @@ import { DictEnum } from '@vben/constants';
15 15
 import { cn } from '@vben/utils';
16 16
 
17 17
 // import { Copy } from '@element-plus/icons-vue';
18
+import { CopyDocument } from '@element-plus/icons-vue';
18 19
 import { useClipboard } from '@vueuse/core';
19 20
 import { ElCard, ElMessage, ElTabPane, ElTabs } from 'element-plus';
20 21
 
@@ -97,23 +98,23 @@ async function handleLoadInfo(task: TaskInfo | undefined) {
97 98
     /**
98 99
      * 不为审批不需要调用`getTaskByTaskId`接口
99 100
      */
100
-    if (props.type !== 'approve') {
101
-      const flowResp = await flowInfo(task.businessId);
102
-      currentFlowInfo.value = flowResp;
103
-      return;
104
-    }
101
+    // if (props.type !== 'approve') {
102
+    //   const flowResp = await flowInfo(task.businessId);
103
+    //   currentFlowInfo.value = flowResp;
104
+    //   return;
105
+    // }
105 106
 
106 107
     /**
107 108
      * getTaskByTaskId主要为了获取按钮权限 目前没有其他功能
108 109
      * 行数据(即props.task)获取的是没有按钮权限的
109 110
      */
110
-    const [flowResp, taskResp] = await Promise.all([
111
-      flowInfo(task.businessId),
112
-      getTaskByTaskId(task.id),
113
-    ]);
111
+    // const [flowResp, taskResp] = await Promise.all([
112
+    //   flowInfo(task.businessId),
113
+    //   getTaskByTaskId(task.id),
114
+    // ]);
114 115
 
115
-    currentFlowInfo.value = flowResp;
116
-    onlyForBtnPermissionTask.value = taskResp;
116
+    // currentFlowInfo.value = flowResp;
117
+    // onlyForBtnPermissionTask.value = taskResp;
117 118
   } catch (error) {
118 119
     console.error(error);
119 120
   } finally {
@@ -143,13 +144,6 @@ async function handleCopy(text: string) {
143 144
       class="thin-scrollbar flex-1 overflow-y-hidden"
144 145
       size="small"
145 146
     >
146
-      <template #title>
147
-        <div class="flex items-center gap-2">
148
-          <div>编号: {{ task.id }}</div>
149
-          <!-- <Copy class="cursor-pointer" @click="handleCopy(task.id)" /> -->
150
-        </div>
151
-      </template>
152
-
153 147
       <template #extra>
154 148
         <el-button size="small" @click="() => handleLoadInfo(task)">
155 149
           <div class="flex items-center justify-center">
@@ -162,28 +156,29 @@ async function handleCopy(text: string) {
162 156
         <div class="flex flex-col gap-3">
163 157
           <div class="flex items-center gap-2">
164 158
             <div class="text-2xl font-bold">
165
-              {{ task.businessTitle ?? task.flowName }}
159
+              {{ task.orderNo }}
166 160
             </div>
161
+            <el-icon @click="() => handleCopy(task.orderNo)"><CopyDocument /></el-icon>
167 162
             <div>
168 163
               <component
169
-                :is="renderDict(task.flowStatus, DictEnum.WF_BUSINESS_STATUS)"
164
+                :is="renderDict(task.status, DictEnum.TICKET_STATUS)"
170 165
               />
171 166
             </div>
172 167
           </div>
173 168
 
174 169
           <div class="flex items-center gap-2">
175 170
             <VbenAvatar
176
-              :alt="task?.createByName ?? ''"
171
+              :alt="task?.createBy ?? ''"
177 172
               class="bg-primary size-[28px] rounded-full text-white"
178 173
               src=""
179 174
             />
180 175
 
181
-            <span>{{ task.createByName }}</span>
176
+            <span>{{ task.createBy }}</span>
182 177
 
183 178
             <div class="flex items-center opacity-50">
184 179
               <div class="flex items-center gap-1">
185 180
                 <span class="icon-[bxs--category-alt] size-[16px]"></span>
186
-                流程分类: {{ task.categoryName }}
181
+                流程分类: {{ task.ticketTypeName }}
187 182
               </div>
188 183
 
189 184
               <div class="flex items-center gap-1">
@@ -194,8 +189,8 @@ async function handleCopy(text: string) {
194 189
           </div>
195 190
         </div>
196 191
 
197
-        <ElTabs v-if="currentFlowInfo" class="flex-1">
198
-          <ElTabPane key="1" label="审批详情">
192
+        <ElTabs class="flex-1">
193
+          <ElTabPane key="1" label="工单详情">
199 194
             <ApprovalDetails
200 195
               :current-flow-info="currentFlowInfo"
201 196
               :task="task"
@@ -224,3 +219,4 @@ async function handleCopy(text: string) {
224 219
     </slot>
225 220
   </div>
226 221
 </template>
222
+

+ 246 - 0
apps/web-ele/src/views/workflow/order/creatOrder.vue

@@ -0,0 +1,246 @@
1
+<script lang="ts" setup>
2
+import { ref, reactive } from 'vue';
3
+import { Page } from '@vben/common-ui';
4
+import { ElForm, ElFormItem, ElInput, ElSelect, ElUpload, ElSwitch, ElButton, ElMessage, ElTreeSelect } from 'element-plus';
5
+import { UploadFilled } from '@element-plus/icons-vue';
6
+import { categoryTree } from '#/api/workflow/category/index';
7
+import { selectAllSysStation } from '#/api/system/infoEntry/stationInfo/stationInfo';
8
+import { getSingleImageUploadConfig } from '#/components/upload/config';
9
+import { requestClient } from '#/api/request';
10
+
11
+// 表单数据
12
+const formData = reactive({
13
+  ticketType: '',
14
+  stationId: '',
15
+  contact: '',
16
+  phone: '',
17
+  content: '',
18
+  attachments: '',
19
+  isSubmit: false
20
+});
21
+
22
+// 表单规则
23
+const formRules = reactive({
24
+  ticketType: [{ required: true, message: '请选择工单类型', trigger: 'change' }],
25
+  stationId: [{ required: true, message: '请选择场站', trigger: 'change' }],
26
+  contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
27
+  phone: [
28
+    { required: true, message: '请输入联系电话', trigger: 'blur' },
29
+    { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
30
+  ],
31
+  content: [{ required: true, message: '请输入提报内容', trigger: 'blur' }]
32
+});
33
+
34
+// 工单类型选项
35
+const ticketTypeOptions = ref<any[]>([]);
36
+// 场站选项
37
+const stationOptions = ref<any[]>([]);
38
+// 上传文件列表
39
+const fileList = ref([]);
40
+
41
+// 表单引用
42
+const formRef = ref();
43
+
44
+// 获取工单类型
45
+const getTicketTypes = async () => {
46
+  try {
47
+    const res = await categoryTree();
48
+    console.log(res);
49
+    ticketTypeOptions.value = res || [];
50
+  } catch (error) {
51
+    ElMessage.error('获取工单类型失败');
52
+    console.error('获取工单类型失败:', error);
53
+  }
54
+};
55
+
56
+// 获取场站列表
57
+const getStations = async () => {
58
+  try {
59
+    const res = await selectAllSysStation();
60
+    console.log(res);
61
+    stationOptions.value = res || [];
62
+  } catch (error) {
63
+    ElMessage.error('获取场站列表失败');
64
+    console.error('获取场站列表失败:', error);
65
+  }
66
+};
67
+
68
+// 上传成功回调
69
+const handleUploadSuccess = (response, file, fileList) => {
70
+  if (response.code === 200) {
71
+    // 将文件路径添加到attachments字段
72
+    console.log(response, file, fileList);
73
+    const paths = fileList.map(f => f.response.data.fileName).join(',');
74
+    formData.attachments = paths;
75
+  } else {
76
+    ElMessage.error('文件上传失败');
77
+  }
78
+};
79
+
80
+// 上传失败回调
81
+const handleUploadError = (error) => {
82
+  ElMessage.error('文件上传失败');
83
+  console.error('文件上传失败:', error);
84
+};
85
+
86
+// 移除文件回调
87
+const handleRemove = (file, fileList) => {
88
+  // 更新attachments字段
89
+  const paths = fileList.map(f => f.response.data.url).join(',');
90
+  formData.attachments = paths;
91
+};
92
+
93
+// 表单提交
94
+const handleSubmit = async () => {
95
+  if (!formRef.value) return;
96
+  
97
+  try {
98
+    await formRef.value.validate();
99
+    console.log(formData);
100
+    // 调用创建工单接口
101
+    await requestClient.post('/workOrder/order', formData);
102
+    
103
+    ElMessage.success('工单创建成功');
104
+    
105
+    // 重置表单
106
+    formRef.value.resetFields();
107
+    fileList.value = [];
108
+    formData.attachments = '';
109
+  } catch (error) {
110
+    if (error.name === 'ValidationError') {
111
+      // 表单验证失败,Element Plus会自动提示错误信息
112
+      return;
113
+    }
114
+    
115
+    ElMessage.error('工单创建失败');
116
+    console.error('工单创建失败:', error);
117
+  }
118
+};
119
+
120
+// 初始化数据
121
+const initData = () => {
122
+  getTicketTypes();
123
+  getStations();
124
+};
125
+
126
+// 页面加载时初始化数据
127
+initData();
128
+</script>
129
+
130
+<template>
131
+  <Page>
132
+    <div class="wrap">
133
+      <ElForm
134
+        ref="formRef"
135
+        :model="formData"
136
+        :rules="formRules"
137
+        label-width="100px"
138
+        class="create-order-form"
139
+      >
140
+        <!-- 工单类型 -->
141
+        <ElFormItem label="工单类型" prop="ticketType">
142
+          <ElTreeSelect
143
+            v-model="formData.ticketType"
144
+            :data="ticketTypeOptions"
145
+            check-strictly
146
+            placeholder="请选择工单类型"
147
+            style="width: 100%"
148
+            :props="{ label: 'label', value: 'id', children: 'children' }"
149
+            filterable
150
+          ></ElTreeSelect>
151
+        </ElFormItem>
152
+
153
+        <!-- 场站 -->
154
+        <ElFormItem label="场站" prop="stationId">
155
+          <ElSelect
156
+            v-model="formData.stationId"
157
+            placeholder="请选择场站"
158
+            style="width: 100%"
159
+          >
160
+            <ElOption
161
+              v-for="option in stationOptions"
162
+              :key="option.id"
163
+              :label="option.stationName"
164
+              :value="option.id"
165
+            ></ElOption>
166
+          </ElSelect>
167
+        </ElFormItem>
168
+
169
+        <!-- 联系人 -->
170
+        <ElFormItem label="联系人" prop="contact">
171
+          <ElInput
172
+            v-model="formData.contact"
173
+            placeholder="请输入联系人"
174
+          ></ElInput>
175
+        </ElFormItem>
176
+
177
+        <!-- 联系电话 -->
178
+        <ElFormItem label="联系电话" prop="phone">
179
+          <ElInput
180
+            v-model="formData.phone"
181
+            placeholder="请输入联系电话"
182
+          ></ElInput>
183
+        </ElFormItem>
184
+
185
+        <!-- 提报内容 -->
186
+        <ElFormItem label="提报内容" prop="content">
187
+          <ElInput
188
+            v-model="formData.content"
189
+            type="textarea"
190
+            :rows="4"
191
+            placeholder="请输入提报内容"
192
+          ></ElInput>
193
+        </ElFormItem>
194
+
195
+        <!-- 提报附件 -->
196
+        <ElFormItem label="提报附件">
197
+          <ElUpload
198
+            :file-list="fileList"
199
+            :action="getSingleImageUploadConfig().action"
200
+            :headers="getSingleImageUploadConfig().headers"
201
+            :on-success="handleUploadSuccess"
202
+            :on-error="handleUploadError"
203
+            :on-remove="handleRemove"
204
+            list-type="picture-card"
205
+            multiple
206
+            :limit="5"
207
+          >
208
+            <UploadFilled />
209
+            <template #tip>
210
+              <div class="el-upload__tip">
211
+                支持上传图片格式文件,最多5个,多个文件用逗号分隔
212
+              </div>
213
+            </template>
214
+          </ElUpload>
215
+        </ElFormItem>
216
+
217
+        <!-- 是否提交 -->
218
+        <ElFormItem label="是否提交">
219
+          <ElSwitch v-model="formData.isSubmit"></ElSwitch>
220
+        </ElFormItem>
221
+
222
+        <!-- 提交按钮 -->
223
+        <ElFormItem>
224
+          <ElButton type="primary" @click="handleSubmit">创建工单</ElButton>
225
+        </ElFormItem>
226
+      </ElForm>
227
+    </div>
228
+  </Page>
229
+</template>
230
+
231
+<style lang="scss" scoped>
232
+.wrap {
233
+  padding: 16px;
234
+  background-color: #fff;
235
+  border-radius: 6px;
236
+}
237
+
238
+.create-order-form {
239
+  max-width: 600px;
240
+}
241
+</style>
242
+
243
+
244
+
245
+
246
+

+ 3 - 3
apps/web-ele/src/views/workflow/register.ts

@@ -2,9 +2,9 @@
2 2
  * 这里定义流程描述组件
3 3
  */
4 4
 
5
-// const LeaveDescription = defineAsyncComponent(
6
-//   () => import('#/views/workflow/leave/leave-description.vue'),
7
-// );
5
+const LeaveDescription = defineAsyncComponent(
6
+  () => import('#/views/workflow/leave/leave-description.vue'),
7
+);
8 8
 
9 9
 /**
10 10
  * key为流程的路径(task.formPath) value为要显示的组件

+ 1 - 1
apps/web-ele/src/views/workflow/task/allTaskWaiting.vue

@@ -260,7 +260,7 @@ onMounted(async () => {
260 260
                 <Refresh />
261 261
               </ElButton>
262 262
             </ElTooltip>
263
-            <ElPopover placement="right-top" trigger="click">
263
+            <ElPopover placement="top-end" trigger="click">
264 264
               <template #reference>
265 265
                 <ElButton circle>
266 266
                   <Filter />

+ 23 - 33
apps/web-ele/src/views/workflow/task/myDocument.vue

@@ -7,36 +7,15 @@ import { computed, onMounted, ref, useTemplateRef } from 'vue';
7 7
 import { Page } from '@vben/common-ui';
8 8
 import { useTabs } from '@vben/hooks';
9 9
 
10
-<<<<<<< HEAD
11
-import { Filter, Refresh } from '@element-plus/icons-vue';
12
-import {
13
-  ElButton,
14
-  ElEmpty,
15
-  ElForm,
16
-  ElFormItem,
17
-  ElInput,
18
-  ElMessage,
19
-  ElPopover,
20
-  ElTooltip,
21
-} from 'element-plus';
22
-=======
23
-// import {
24
-//   ElButton,
25
-//   ElEmpty,
26
-//   ElForm,
27
-//   ElFormItem,
28
-//   ElInput,
29
-//   ElMessage,
30
-//   ElPopover,
31
-//   ElSpin,
32
-//   ElTooltip,
33
-// } from 'element-plus';
34
->>>>>>> 0a5e399be8a3dc56c82fd915b6765781a5d30748
10
+import { Filter, Refresh, Search } from '@element-plus/icons-vue';
11
+import { ElButton, ElEmpty, ElForm, ElFormItem, ElInput, ElMessage, ElPopover, ElTooltip } from 'element-plus';
12
+
35 13
 import { cloneDeep, debounce } from 'lodash-es';
36 14
 
37
-import { pageByCurrent } from '#/api/workflow/instance';
15
+import { pageByCurrent, getWorkOrderDetail } from '#/api/workflow/instance';
38 16
 
39 17
 import { bottomOffset } from './constant';
18
+import { ApprovalCard, ApprovalPanel } from '../components';
40 19
 
41 20
 const emptyImage = ElEmpty.PRESENTED_IMAGE_SIMPLE;
42 21
 
@@ -86,6 +65,7 @@ async function reload(resetFields: boolean = false) {
86 65
       pageNum: page.value,
87 66
       ...formData.value,
88 67
     });
68
+    console.log(resp);
89 69
     taskList.value = resp.rows.map((item) => ({ ...item, active: false }));
90 70
     taskTotal.value = resp.total;
91 71
   } catch {
@@ -125,6 +105,7 @@ const handleScroll = debounce(async (e: Event) => {
125 105
         pageNum: page.value,
126 106
         ...formData.value,
127 107
       });
108
+      console.log(resp);
128 109
       taskList.value.push(
129 110
         ...resp.rows.map((item) => ({ ...item, active: false })),
130 111
       );
@@ -150,6 +131,17 @@ async function handleCardClick(item: TaskInfo) {
150 131
     item.active = item.id === id;
151 132
   });
152 133
   lastSelectId.value = id;
134
+  console.log(lastSelectId.value);
135
+  
136
+  // 调用获取工单详情的接口
137
+  try {
138
+    const detail = await getWorkOrderDetail(id);
139
+    console.log('工单详情:', detail);
140
+    // 可以在这里使用获取到的工单详情数据
141
+  } catch (error) {
142
+    console.error('获取工单详情失败:', error);
143
+    ElMessage.error('获取工单详情失败');
144
+  }
153 145
 }
154 146
 
155 147
 const { refreshTab } = useTabs();
@@ -171,18 +163,15 @@ const { refreshTab } = useTabs();
171 163
               placeholder="流程名称搜索"
172 164
               clearable
173 165
               class="w-full"
166
+              :suffix-icon="Search"
174 167
               @keyup.enter="reload(false)"
175 168
             />
176 169
             <ElTooltip placement="top" content="重置">
177
-              <ElButton @click="reload(true)" circle>
178
-                <Refresh />
179
-              </ElButton>
170
+              <ElButton @click="reload(true)" :icon="Refresh" />
180 171
             </ElTooltip>
181
-            <ElPopover placement="right-top" trigger="click">
172
+            <ElPopover placement="top-end" trigger="click">
182 173
               <template #reference>
183
-                <ElButton circle>
184
-                  <Filter />
185
-                </ElButton>
174
+                <ElButton :icon="Filter"  style="margin-left: 0;" />
186 175
               </template>
187 176
               <template #default>
188 177
                 <ElForm
@@ -262,3 +251,4 @@ const { refreshTab } = useTabs();
262 251
   @apply thin-scrollbar;
263 252
 }
264 253
 </style>
254
+

+ 2 - 15
apps/web-ele/src/views/workflow/task/taskCopyList.vue

@@ -6,21 +6,8 @@ import { computed, onMounted, ref, useTemplateRef } from 'vue';
6 6
 
7 7
 import { Page } from '@vben/common-ui';
8 8
 
9
-<<<<<<< HEAD
10 9
 import { ElEmpty, ElMessage } from 'element-plus';
11
-=======
12
-// import {
13
-//   Empty,
14
-//   Form,
15
-//   FormItem,
16
-//   Input,
17
-//   InputSearch,
18
-//   Popover,
19
-//   Spin,
20
-//   Tooltip,
21
-//   TreeSelect,
22
-// } from 'ant-design-vue';
23
->>>>>>> 0a5e399be8a3dc56c82fd915b6765781a5d30748
10
+
24 11
 import { cloneDeep, debounce } from 'lodash-es';
25 12
 
26 13
 import { pageByTaskCopy } from '#/api/workflow/task';
@@ -166,7 +153,7 @@ async function handleCardClick(item: TaskInfo) {
166 153
                 <Refresh />
167 154
               </ElButton>
168 155
             </ElTooltip>
169
-            <ElPopover placement="right-top" trigger="click">
156
+            <ElPopover placement="top-end" trigger="click">
170 157
               <template #reference>
171 158
                 <ElButton circle>
172 159
                   <Filter />

+ 2 - 15
apps/web-ele/src/views/workflow/task/taskFinish.vue

@@ -6,7 +6,6 @@ import { computed, onMounted, ref, useTemplateRef } from 'vue';
6 6
 
7 7
 import { Page } from '@vben/common-ui';
8 8
 
9
-<<<<<<< HEAD
10 9
 import { Filter, Refresh } from '@element-plus/icons-vue';
11 10
 import {
12 11
   ElButton,
@@ -18,19 +17,7 @@ import {
18 17
   ElPopover,
19 18
   ElTooltip,
20 19
 } from 'element-plus';
21
-=======
22
-// import {
23
-//   Empty,
24
-//   Form,
25
-//   FormItem,
26
-//   Input,
27
-//   InputSearch,
28
-//   Popover,
29
-//   Spin,
30
-//   Tooltip,
31
-//   TreeSelect,
32
-// } from 'ant-design-vue';
33
->>>>>>> 0a5e399be8a3dc56c82fd915b6765781a5d30748
20
+
34 21
 import { cloneDeep, debounce } from 'lodash-es';
35 22
 
36 23
 import { pageByTaskFinish } from '#/api/workflow/task';
@@ -174,7 +161,7 @@ async function handleCardClick(item: TaskInfo) {
174 161
                 <Refresh />
175 162
               </ElButton>
176 163
             </ElTooltip>
177
-            <ElPopover placement="right-top" trigger="click">
164
+            <ElPopover placement="top-end" trigger="click">
178 165
               <template #reference>
179 166
                 <ElButton circle>
180 167
                   <Filter />

+ 2 - 15
apps/web-ele/src/views/workflow/task/taskWaiting.vue

@@ -7,7 +7,6 @@ import { computed, onMounted, ref, useTemplateRef } from 'vue';
7 7
 import { Page } from '@vben/common-ui';
8 8
 import { useTabs } from '@vben/hooks';
9 9
 
10
-<<<<<<< HEAD
11 10
 import { Filter, Refresh } from '@element-plus/icons-vue';
12 11
 import {
13 12
   ElButton,
@@ -19,19 +18,7 @@ import {
19 18
   ElPopover,
20 19
   ElTooltip,
21 20
 } from 'element-plus';
22
-=======
23
-// import {
24
-//   Empty,
25
-//   Form,
26
-//   FormItem,
27
-//   Input,
28
-//   InputSearch,
29
-//   Popover,
30
-//   Spin,
31
-//   Tooltip,
32
-//   TreeSelect,
33
-// } from 'ant-design-vue';
34
->>>>>>> 0a5e399be8a3dc56c82fd915b6765781a5d30748
21
+
35 22
 import { cloneDeep, debounce } from 'lodash-es';
36 23
 
37 24
 import { pageByTaskWait } from '#/api/workflow/task';
@@ -172,7 +159,7 @@ const { refreshTab } = useTabs();
172 159
                 <Refresh />
173 160
               </ElButton>
174 161
             </ElTooltip>
175
-            <ElPopover placement="right-top" trigger="click">
162
+            <ElPopover placement="top-end" trigger="click">
176 163
               <template #reference>
177 164
                 <ElButton circle>
178 165
                   <Filter />

+ 1 - 0
packages/@core/base/shared/src/constants/dict-enum.ts

@@ -29,4 +29,5 @@ export enum DictEnum {
29 29
   WF_BUSINESS_STATUS = 'wf_business_status', // 业务状态
30 30
   WF_FORM_TYPE = 'wf_form_type', // 表单类型
31 31
   WF_TASK_STATUS = 'wf_task_status', // 任务状态
32
+  TICKET_STATUS = 'ticket_status', // 工单状态
32 33
 }