diff --git a/src/views/admin/system/userFaceApprove/batchDeal.vue b/src/views/admin/system/userFaceApprove/batchDeal.vue
new file mode 100644
index 0000000..12be85b
--- /dev/null
+++ b/src/views/admin/system/userFaceApprove/batchDeal.vue
@@ -0,0 +1,70 @@
+
+
+
+
+ 拒绝
+ 提交
+ 取消
+
+
+
+
+
diff --git a/src/views/admin/system/userFaceApprove/index.vue b/src/views/admin/system/userFaceApprove/index.vue
index 88a7f47..895aa1b 100644
--- a/src/views/admin/system/userFaceApprove/index.vue
+++ b/src/views/admin/system/userFaceApprove/index.vue
@@ -26,6 +26,18 @@
查询
重置
+
+ 审批
+
@@ -36,10 +48,12 @@
v-loading="state.loading"
:data="state.dataList"
row-key="userId"
+ @selection-change="handleSelectionChange"
border
:cell-style="tableStyle.cellStyle"
:header-cell-style="tableStyle.headerCellStyle"
>
+
@@ -65,8 +79,9 @@
link
icon="VideoPlay"
@click="deal(row)"
- >开始处理
+ 开始处理
+
删除
@@ -78,6 +93,9 @@
+
+
+
@@ -91,6 +109,8 @@ import { getDicts } from "/@/api/admin/dict"
import * as userFaceApi from "/@/api/admin/userFace"
import { ElLoading } from "element-plus"
+const BatchDeal = defineAsyncComponent(() => import("./batchDeal.vue"))
+
const { check_status } = useDict("check_status")
const queryRef = ref()
const showSearch = ref(true)
@@ -98,8 +118,14 @@ const draggableDepTreeRef = ref() // 树组件ref引用
const activeName = ref("2")
const tabItems = ref([{}])
const processDrawerRef = ref()
+const batchDealRef = ref()
const loading = ref()
+// 多选rows
+const selectObjs = ref([]) as any
+// 是否可以多选
+const multiple = ref(true)
+
// 定义表格查询、后台调用的API
const state: BasicTableProps = reactive({
queryForm: {
@@ -141,6 +167,24 @@ const handleClickTabItem = (e: any) => {
getDataList()
}
+// 是否可以多选
+const handleSelectable = (row: any) => {
+ return row.username !== "admin"
+}
+
+// 多选事件
+const handleSelectionChange = (objs: { userId: string; processId: string | null }[]) => {
+ selectObjs.value = objs.map(({ userId, processId }) => ({ userId, processId }))
+ multiple.value = !objs.length
+}
+
+// 批量开始处理
+const doBatchDeal = () => {
+ if (!selectObjs.value.length) return useMessage().warning("流程id不存在")
+ const processIds = selectObjs.value.filter((item: any) => item.processId).map((item: any) => item.processId)
+ batchDealRef.value.openDialog(processIds)
+}
+
// 点击开始处理
const deal = (row: any) => {
if (!row.processId) return useMessage().warning("流程id不存在")