完善项目模块页面和对应接口
This commit is contained in:
@ -23,13 +23,13 @@
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['project:projectTeam:add']"> 新增 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['project:projectTeam:edit']"
|
||||
>修改
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['project:projectTeam:edit']">
|
||||
修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['project:projectTeam:remove']"
|
||||
>删除
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['project:projectTeam:remove']">
|
||||
删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -43,23 +43,25 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||
<el-table-column label="班组名称" align="center" prop="teamName" />
|
||||
<el-table-column label="范围内打卡" align="center" prop="isClockIn" />
|
||||
<el-table-column label="打卡范围" align="center" prop="isClockIn">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="team_clock_type" :value="scope.row.isClockIn" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="班组成员" placement="top">
|
||||
<el-button link type="primary" icon="User" @click="handleUserList(scope.row)"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:projectTeam:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['project:projectTeam:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-space wrap>
|
||||
<el-button link type="primary" icon="User" @click="handleUserList(scope.row)">班组成员</el-button>
|
||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:projectTeam:edit']"> 修改 </el-button>
|
||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['project:projectTeam:remove']">
|
||||
删除
|
||||
</el-button>
|
||||
</el-space>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.current" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改项目班组对话框 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
@ -81,7 +83,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<user-list-dialog ref="userListVisible" :row="currentRow" />
|
||||
<user-list-dialog ref="userListVisible" :projectTeamVo="currentRow" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -92,7 +94,7 @@ import { useUserStoreHook } from '@/store/modules/user';
|
||||
import UserListDialog from '@/views/project/projectTeam/component/UserListDialog.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const { team_clock_type } = toRefs<any>(proxy?.useDict('team_clock_type'));
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
@ -106,7 +108,13 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const userListVisible = ref();
|
||||
const currentRow = ref<ProjectTeamVO>();
|
||||
const currentRow = ref<ProjectTeamVO>({
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
teamName: undefined,
|
||||
isClockIn: undefined,
|
||||
remark: undefined
|
||||
});
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const projectTeamFormRef = ref<ElFormInstance>();
|
||||
@ -126,8 +134,10 @@ const initFormData: ProjectTeamForm = {
|
||||
const data = reactive<PageData<ProjectTeamForm, ProjectTeamQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
sortField: 'createTime',
|
||||
sortOrder: 'descend',
|
||||
projectId: currentProject.value.id,
|
||||
teamName: undefined,
|
||||
isClockIn: undefined,
|
||||
@ -164,7 +174,7 @@ const reset = () => {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
queryParams.value.current = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user