明树Git Lab

Commit 96eee885 authored by zhanghan's avatar zhanghan

页面开发完成

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