完善项目模块页面和对应接口

This commit is contained in:
lcj
2025-03-12 15:55:32 +08:00
parent b8426798e7
commit dfc66e85c9
17 changed files with 502 additions and 463 deletions

View File

@ -62,17 +62,17 @@
<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="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:contractor:edit']"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['project:contractor:remove']"></el-button>
</el-tooltip>
<el-space wrap>
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:contractor:edit']">修改 </el-button>
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['project:contractor: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>
@ -141,7 +141,7 @@ const initFormData: ContractorForm = {
const data = reactive<PageData<ContractorForm, ContractorQuery>>({
form: { ...initFormData },
queryParams: {
pageNum: 1,
current: 1,
pageSize: 10,
name: undefined,
principal: undefined,
@ -162,7 +162,7 @@ const getList = async () => {
loading.value = true;
const res = await listContractor(queryParams.value);
contractorList.value = res.data.records;
total.value = res.total;
total.value = res.data.total;
loading.value = false;
};
@ -180,7 +180,7 @@ const reset = () => {
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
queryParams.value.current = 1;
getList();
};