明树Git Lab

Commit 96eee885 authored by zhanghan's avatar zhanghan

页面开发完成

parent 326cd196
......@@ -24,7 +24,7 @@
@size-change="handleSizeChange"
@current-page-change="handleCurrentPageChange"
>
<template #operations="{ row, index }">
<template #operations="{ row }">
<el-button
link
type="primary"
......@@ -32,11 +32,7 @@
@click="previewRecord(row)"
>查看</el-button
>
<el-button
link
type="primary"
size="small"
@click="editRecord(row)"
<el-button link type="primary" size="small" @click="editRecord(row)"
>编辑</el-button
>
<el-button
......@@ -72,37 +68,32 @@ const { proxy } = getCurrentInstance();
let tableData = ref([]);
let tableColumns = ref([
{
prop: "djbh",
prop: "registrationNo",
label: "登记编号",
showOverflowTooltip: true,
},
{
prop: "xmmc",
prop: "projectName",
label: "项目名称",
showOverflowTooltip: true,
},
{
prop: "htbh",
prop: "contractNo",
label: "合同编号",
showOverflowTooltip: true,
},
{
prop: "kklx",
label: "抵扣类型",
width: 100,
},
{
prop: "htje",
prop: "contractAmount",
label: "合同金额",
width: 120,
},
{
prop: "djrq",
prop: "registrationDate",
label: "登记日期",
width: 120,
},
{
prop: "jbr",
prop: "handlerName",
label: "经办人",
width: 100,
},
......@@ -124,48 +115,19 @@ let pageSize = ref(10);
// 获取列表数据
const getProjectData = (params = {}) => {
loading.value = true;
// TODO: 替换为实际的后端接口
// proxy.$post({
// url: "/api/workForHousing/getList",
// data: {
// page: currentPage.value,
// pagesize: pageSize.value,
// ...params,
// },
// callback: (data) => {
// tableData.value = data.rows;
// total.value = data.count;
// loading.value = false;
// },
// });
// 临时模拟数据
setTimeout(() => {
tableData.value = [
{
id: 1,
djbh: "DJ202403001",
xmmc: "某某工程项目",
htbh: "HT202403001",
kklx: "工程款",
htje: "1000000",
djrq: "2024-03-15",
jbr: "张三",
proxy.$post({
url: "/api/project/getGdfList",
data: {
page: currentPage.value,
pagesize: pageSize.value,
...params,
},
{
id: 2,
djbh: "DJ202403002",
xmmc: "另一个工程项目",
htbh: "HT202403002",
kklx: "材料款",
htje: "500000",
djrq: "2024-03-16",
jbr: "李四",
},
];
total.value = 2;
callback: (data) => {
tableData.value = data.rows;
total.value = data.count;
loading.value = false;
}, 500);
},
});
};
// 分页
......@@ -214,21 +176,16 @@ const deleteRecord = (item) => {
type: "warning",
})
.then(() => {
// TODO: 替换为实际的后端接口
// proxy.$post({
// url: "/api/workForHousing/delete",
// data: {
// id: item.id,
// },
// callback: (data) => {
// ElMessage.success("删除成功");
// getProjectData();
// },
// });
// 临时模拟删除
proxy.$post({
url: "/api/project/deleteGdf",
data: {
id: item.id,
},
callback: () => {
ElMessage.success("删除成功");
getProjectData();
},
});
})
.catch(() => {});
};
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment