فهرست منبع

审批完成后刷新

kagg886 1 ماه پیش
والد
کامیت
ede0f94590
1فایلهای تغییر یافته به همراه24 افزوده شده و 9 حذف شده
  1. 24 9
      src/views/flow/flowCraft/index.vue

+ 24 - 9
src/views/flow/flowCraft/index.vue

@@ -1,12 +1,14 @@
 <script lang="ts" setup>
 import { ref, computed, onMounted, reactive, toRefs, getCurrentInstance } from 'vue'
-import { staticFlowForm, listFlowForm, listFlowFormTodo } from '/@/api/flow/flowForm'
+import { staticFlowForm, listFlowForm, listFlowFormTodo, ListFlowFormData } from '/@/api/flow/flowForm'
 import { useStore } from '/@/store'
 import { useLoading } from '/@/utils/loading-util'
 import AddFormData from '/@/views/flow/flowForm/list/component/addFormData.vue'
 import { FlowFormTableColumns, FlowFormTableDataState, FormFieldsData } from '/@/views/flow/flowForm/list/component/model'
 import AddReportDialog from '/@/views/system/report/componments/add-report-dialog.vue'
 import { CreateComplaintRequest } from '/@/api/system/report/type'
+import { FlowDemoTableColumns } from '/@/views/flow/flowDemo/list/component/model'
+import CheckFlow from '/@/components/gFlow/checkFlow.vue'
 
 const store = useStore()
 const { proxy } = <any>getCurrentInstance()
@@ -130,12 +132,6 @@ const handleCurrentChange = (val: number) => {
 	flowFormList()
 }
 
-// 获取表单数据列表(用于刷新)
-const getFormDataList = () => {
-	// 这里可以根据需要实现刷新逻辑
-	console.log('刷新表单数据列表')
-}
-
 // 处理投诉管理点击事件
 const handleComplaintClick = () => {
 	// 重置表单数据
@@ -162,7 +158,6 @@ const handleComplaintSuccess = () => {
 
 // 我的待办对话框
 const todoDialogVisible = ref(false)
-const todoTableLoading = ref(false)
 const todoFields = ref<FormFieldsData[]>([])
 const todoTableData = ref<any[]>([])
 const todoTableParam = ref({
@@ -215,6 +210,17 @@ const columnColor = (row: any) => {
 			return 'info'
 	}
 }
+const ckFlowRef = ref()
+const handleStartFlow = (row: FlowDemoTableColumns | null) => {
+	ckFlowRef.value.handleStartFlow(row)
+}
+
+const refresh = async () => {
+	await Promise.all([
+		loadTodoList(),
+		getSummaryData()
+	])
+}
 </script>
 
 <template>
@@ -386,8 +392,15 @@ const columnColor = (row: any) => {
 					</template>
 				</el-table-column>
 				<el-table-column label="创建人" align="center" prop="created_user.userNickname" min-width="140px" />
+				<el-table-column label="操作" align="center">
+					<template #default="scope">
+						<el-button v-if="scope.row.actionBtn && scope.row.actionBtn.type != 'disabled'" type="primary" link @click="handleStartFlow(scope.row)"
+							><el-icon><ele-Coordinate /></el-icon>{{ scope.row.actionBtn.title }}</el-button
+						>
+					</template>
+				</el-table-column>
 			</el-table>
-			<div style="margin-top: 16px; text-align: right;">
+			<div style="margin-top: 16px; text-align: right">
 				<el-pagination
 					v-show="todoTableParam.total > 0"
 					v-model:current-page="todoTableParam.pageNum"
@@ -405,6 +418,8 @@ const columnColor = (row: any) => {
 				</span>
 			</template>
 		</el-dialog>
+
+		<checkFlow ref="ckFlowRef" @getList="refresh"></checkFlow>
 	</div>
 </template>