From 2d186e743eb24fd44fba02e2146e55273a66f153 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 12 十一月 2025 17:53:47 +0800
Subject: [PATCH] feat: 1.3.0.2
---
src/views/EmploymentManage/TaskManageList.vue | 121 ++++++++++++++++++----------------------
1 files changed, 54 insertions(+), 67 deletions(-)
diff --git a/src/views/EmploymentManage/TaskManageList.vue b/src/views/EmploymentManage/TaskManageList.vue
index e015140..14aeb74 100644
--- a/src/views/EmploymentManage/TaskManageList.vue
+++ b/src/views/EmploymentManage/TaskManageList.vue
@@ -36,25 +36,27 @@
<SearchInput
v-model="extraParamState.keywords"
style="width: 260px"
- placeholder="浠诲姟鍚嶇О"
+ placeholder="浠诲姟鍚嶇О/瀹㈡埛"
@on-click-search="getList"
>
</SearchInput>
</QueryFilterItem>
</template>
<template #btn>
- <!-- <el-button @click="goAddOrEdit()" type="primary">鍙戝竷</el-button> -->
+ <el-button
+ v-if="checkSubModuleItemShow('pageButton', 'addBtn')"
+ @click="goAddOrEdit()"
+ type="primary"
+ >鍙戝竷</el-button
+ >
</template>
</ProTableQueryFilterBar>
- <ProTableV2
- v-bind="proTableProps"
- :columns="EmploymentManageColumns"
- :operationBtns="operationBtns"
- >
+ <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns">
<template #userCount="{ row }">
- <el-button link type="primary" @click="goSignList(row)">{{
+ <el-button v-if="row.isInternal" link type="primary" @click="goSignList(row)">{{
row.userCount || 0
}}</el-button>
+ <span v-else>{{ row.userCount || 0 }}</span>
</template>
</ProTableV2>
</AppContainer>
@@ -87,70 +89,55 @@
name: 'TaskManageList',
});
-const operationBtns = defineOperationBtns([
- // {
- // data: {
- // enCode: 'editBtn',
- // name: '缂栬緫',
- // },
- // emits: {
- // onClick: (role) => goAddOrEdit(role),
- // },
- // extraProps: {
- // hide: (row: API.GetTaskInfosQueryResultItem) => row.status === EnumTaskStatus.Complete,
- // },
- // },
- {
- data: {
- enCode: 'detailBtn',
- name: '璇︽儏',
+const operationBtnMap: Record<string, OperationBtnType> = {
+ editBtn: {
+ emits: {
+ onClick: (role) => goAddOrEdit(role),
},
+ extraProps: {
+ hide: (row: API.GetTaskInfosQueryResultItem) =>
+ row.status === EnumTaskStatus.Complete || !row.isInternal,
+ },
+ },
+ detailBtn: {
emits: {
onClick: (row: API.GetTaskInfosQueryResultItem) => goDetail(row),
},
},
- // {
- // data: {
- // enCode: 'publishBtn',
- // name: '鍙戝竷',
- // },
- // emits: {
- // onClick: (row: API.GetTaskInfosQueryResultItem) =>
- // setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess),
- // },
- // extraProps: {
- // hide: (row: API.GetTaskInfosQueryResultItem) =>
- // row.releaseStatus === EnumTaskReleaseStatus.InProcess,
- // },
- // },
- // {
- // data: {
- // enCode: 'unPublishBtn',
- // name: '鍋滄鍙戝竷',
- // },
- // emits: {
- // onClick: (row: API.GetTaskInfosQueryResultItem) =>
- // setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped),
- // },
- // extraProps: {
- // hide: (row: API.GetTaskInfosQueryResultItem) =>
- // row.releaseStatus === EnumTaskReleaseStatus.Stopped,
- // },
- // },
- // {
- // data: {
- // enCode: 'arrangeBtn',
- // name: '瀹夋帓',
- // },
- // emits: {
- // onClick: (row: API.GetTaskInfosQueryResultItem) => handleArrange(row),
- // },
- // extraProps: {
- // hide: (row: API.GetTaskInfosQueryResultItem) =>
- // row.releaseStatus === EnumTaskReleaseStatus.Stopped,
- // },
- // },
-]);
+ publishBtn: {
+ emits: {
+ onClick: (row: API.GetTaskInfosQueryResultItem) =>
+ setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess),
+ },
+ extraProps: {
+ hide: (row: API.GetTaskInfosQueryResultItem) =>
+ row.releaseStatus === EnumTaskReleaseStatus.InProcess || !row.isInternal,
+ },
+ },
+ unPublishBtn: {
+ emits: {
+ onClick: (row: API.GetTaskInfosQueryResultItem) =>
+ setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped),
+ },
+ extraProps: {
+ hide: (row: API.GetTaskInfosQueryResultItem) =>
+ row.releaseStatus === EnumTaskReleaseStatus.Stopped || !row.isInternal,
+ },
+ },
+ arrangeBtn: {
+ emits: {
+ onClick: (row: API.GetTaskInfosQueryResultItem) => handleArrange(row),
+ },
+ extraProps: {
+ hide: (row: API.GetTaskInfosQueryResultItem) =>
+ row.releaseStatus === EnumTaskReleaseStatus.Stopped || !row.isInternal,
+ },
+ },
+};
+
+const { checkSubModuleItemShow, column, operationBtns } = useAccess({
+ operationBtnMap,
+});
const router = useRouter();
--
Gitblit v1.9.1