From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/views/bpm/task/copy/index.vue |  161 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 161 insertions(+), 0 deletions(-)

diff --git a/src/views/bpm/task/copy/index.vue b/src/views/bpm/task/copy/index.vue
new file mode 100644
index 0000000..91cfaaf
--- /dev/null
+++ b/src/views/bpm/task/copy/index.vue
@@ -0,0 +1,161 @@
+<!-- 宸ヤ綔娴� - 鎶勯�佹垜鐨勬祦绋� -->
+<template>
+  <doc-alert
+    title="瀹℃壒杞姙銆佸娲俱�佹妱閫�"
+    url="https://doc.iocoder.cn/bpm/task-delegation-and-cc/"
+  />
+
+  <ContentWrap>
+    <!-- 鎼滅储宸ヤ綔鏍� -->
+    <el-form ref="queryFormRef" :inline="true" class="-mb-15px" label-width="68px">
+      <el-form-item label="娴佺▼鍚嶇О" prop="name">
+        <el-input
+          v-model="queryParams.processInstanceName"
+          @keyup.enter="handleQuery"
+          class="!w-240px"
+          clearable
+          placeholder="璇疯緭鍏ユ祦绋嬪悕绉�"
+        />
+      </el-form-item>
+      <el-form-item label="鎶勯�佹椂闂�" prop="createTime">
+        <el-date-picker
+          v-model="queryParams.createTime"
+          :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
+          class="!w-240px"
+          end-placeholder="缁撴潫鏃ユ湡"
+          start-placeholder="寮�濮嬫棩鏈�"
+          type="daterange"
+          value-format="YYYY-MM-DD HH:mm:ss"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="handleQuery">
+          <Icon class="mr-5px" icon="ep:search" />
+          鎼滅储
+        </el-button>
+        <el-button @click="resetQuery">
+          <Icon class="mr-5px" icon="ep:refresh" />
+          閲嶇疆
+        </el-button>
+      </el-form-item>
+    </el-form>
+  </ContentWrap>
+
+  <!-- 鍒楄〃 -->
+  <ContentWrap>
+    <el-table v-loading="loading" :data="list">
+      <!-- TODO 鑺嬭壙锛氬鍔犳憳瑕� -->
+      <el-table-column align="center" label="娴佺▼鍚�" prop="processInstanceName" min-width="180" />
+      <el-table-column label="鎽樿" prop="summary" min-width="180">
+        <template #default="scope">
+          <div class="flex flex-col" v-if="scope.row.summary && scope.row.summary.length > 0">
+            <div v-for="(item, index) in scope.row.summary" :key="index">
+              <el-text type="info"> {{ item.key }} : {{ item.value }} </el-text>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        label="娴佺▼鍙戣捣浜�"
+        prop="startUser.nickname"
+        min-width="100"
+      />
+      <el-table-column
+        :formatter="dateFormatter"
+        align="center"
+        label="娴佺▼鍙戣捣鏃堕棿"
+        prop="processInstanceStartTime"
+        width="180"
+      />
+      <el-table-column align="center" label="鎶勯�佽妭鐐�" prop="activityName" min-width="180" />
+      <el-table-column align="center" label="鎶勯�佷汉" min-width="100">
+        <template #default="scope"> {{ scope.row.createUser?.nickname || '绯荤粺' }} </template>
+      </el-table-column>
+      <el-table-column align="center" label="鎶勯�佹剰瑙�" prop="reason" width="150" />
+      <el-table-column
+        align="center"
+        label="鎶勯�佹椂闂�"
+        prop="createTime"
+        width="180"
+        :formatter="dateFormatter"
+      />
+      <el-table-column align="center" label="鎿嶄綔" fixed="right" width="80">
+        <template #default="scope">
+          <el-button link type="primary" @click="handleAudit(scope.row)">璇︽儏</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 鍒嗛〉 -->
+    <Pagination
+      v-model:limit="queryParams.pageSize"
+      v-model:page="queryParams.pageNo"
+      :total="total"
+      @pagination="getList"
+    />
+  </ContentWrap>
+</template>
+<script lang="ts" setup>
+import { dateFormatter } from '@/utils/formatTime'
+import * as ProcessInstanceApi from '@/api/bpm/processInstance'
+
+defineOptions({ name: 'BpmProcessInstanceCopy' })
+
+const { push } = useRouter() // 璺敱
+
+const loading = ref(false) // 鍒楄〃鐨勫姞杞戒腑
+const total = ref(0) // 鍒楄〃鐨勬�婚〉鏁�
+const list = ref([]) // 鍒楄〃鐨勬暟鎹�
+const queryParams = reactive({
+  pageNo: 1,
+  pageSize: 10,
+  processInstanceId: '',
+  processInstanceName: '',
+  createTime: []
+})
+const queryFormRef = ref() // 鎼滅储鐨勮〃鍗�
+
+/** 鏌ヨ浠诲姟鍒楄〃 */
+const getList = async () => {
+  loading.value = true
+  try {
+    const data = await ProcessInstanceApi.getProcessInstanceCopyPage(queryParams)
+    list.value = data.list
+    total.value = data.total
+  } finally {
+    loading.value = false
+  }
+}
+
+/** 澶勭悊瀹℃壒鎸夐挳 */
+const handleAudit = (row: any) => {
+  const query = {
+    id: row.processInstanceId,
+    activityId: undefined
+  }
+  if (row.activityId) {
+    query.activityId = row.activityId
+  }
+  push({
+    name: 'BpmProcessInstanceDetail',
+    query: query
+  })
+}
+
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+  queryParams.pageNo = 1
+  getList()
+}
+
+/** 閲嶇疆鎸夐挳鎿嶄綔 */
+const resetQuery = () => {
+  queryFormRef.value.resetFields()
+  handleQuery()
+}
+
+/** 鍒濆鍖� **/
+onMounted(() => {
+  getList()
+})
+</script>

--
Gitblit v1.8.0