diff --git a/index.html b/index.html
index 4a82a3d..91057ba 100644
--- a/index.html
+++ b/index.html
@@ -5,7 +5,7 @@
-
@@ -122,19 +343,19 @@
background: 'rgba(231, 233, 235, 1)',
color: 'black',
}"
- >
-
-
-
-
-
+ >
+
+
+
+
-
-
-
-
-
+
@@ -142,8 +363,19 @@
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -370,7 +413,7 @@ const search2 = reactive({
date: "",
});
-const titleList = reactive([
+var titleList = reactive([
{
title: "服务项目(未完成)",
id: 1,
@@ -396,6 +439,7 @@ const data = reactive({
code: "",
xh: "",
bm: "",
+ url:"",
pagination: {
current: 1,
pageSize: 20,
@@ -439,7 +483,189 @@ const data = reactive({
tableData: [],
tableData1: [],
});
-
+//页面配置(输入框还未配置)
+/**
+ * @col 为每个标题对应的表格配置
+ */
+const columnsList = reactive({
+ 最低生活保障: {
+ titleList: [
+ {
+ title: "服务项目(未完成)",
+ id: 1,
+ col:'columns',
+ url:'/api/ggfwyth/pg/wxsbmRyxx'
+ },
+ {
+ title: "在册低保户",
+ id: 2,
+ col:'columns',
+ url:'/api/ggfwyth/pg/wxsbmRyxx'
+ },
+ {
+ title: "在册低保人员",
+ id: 3,
+ col:'columns2',
+ url:'/api/ggfwyth/pg/zcdbry'
+ },
+ {
+ title: "新增低保人员",
+ id: 4,
+ col:'columns',
+ url:'/api/ggfwyth/pg/wxsbmRyxx'
+ },
+ {
+ title: "退出低保人员",
+ id: 5,
+ col:'columns',
+ url:'/api/ggfwyth/pg/wxsbmRyxx'
+ },
+ ],
+ columns: [
+ {
+ label: "序号",
+ property: "index",
+ width: "60",
+ fixed:'left'
+ },
+ {
+ label: "姓名",
+ property: "xm",
+ width: "70",
+ fixed:'left'
+ },
+ {
+ label: "身份证",
+ property: "sfzhm",
+ width: "170",
+
+ },
+ {
+ label: "低保证号",
+ property: "jzzh",
+ width: "210",
+ },
+ {
+ label: "联系电话",
+ property: "sjhm",
+ width: "120",
+ },
+ {
+ label: "乡镇(街道)",
+ property: "xzjd",
+ width: "100",
+ },
+ {
+ label: "村社",
+ property: "csq",
+ width: "100",
+ },
+ {
+ label: "地址",
+ property: "dz",
+ },
+ {
+ label: "救助日期",
+ property: "jzrq",
+ width: "100",
+ },
+ ],
+ columns2: [
+ {
+ label: "序号",
+ property: "index",
+ width: "60",
+ fixed:'left'
+ },
+ {
+ label: "姓名",
+ property: "ahap0016",
+ width: "70",
+ fixed:'left'
+ },
+ {
+ label: "身份证",
+ property: "ahap0015",
+ width: "170",
+
+ },
+ {
+ label: "低保证号",
+ property: "ahax0003",
+ width: "210",
+ },
+ {
+ label: "联系电话",
+ property: "azdf0011",
+ width: "170",
+ },
+ {
+ label: "乡镇(街道)",
+ property: "xzjd",
+ width: "100",
+ },
+ {
+ label: "村社",
+ property: "csq",
+ width: "100",
+ },
+ {
+ label: "地址",
+ property: "dz",
+ },
+ {
+ label: "救助日期",
+ property: "bhax0033",
+ width: "100",
+ },
+ ],
+ },
+ 职工医疗保险: {
+ titleList: [
+ {
+ title: "服务项目(未完成)",
+ id: 1,
+ col:'columns',
+ },
+ ],
+ columns: [
+ {
+ label: "序号",
+ property: "index",
+ width: "60",
+ },
+ {
+ label: "姓名",
+ property: "xm",
+ width: "70",
+ },
+ {
+ label: "身份证",
+ property: "sfzhm",
+ width: "170",
+ },
+ {
+ label: "联系电话",
+ property: "sjhm",
+ width: "120",
+ },
+ {
+ label: "乡镇(街道)",
+ property: "xzjd",
+ width: "100",
+ },
+ {
+ label: "村社",
+ property: "cs",
+ width: "100",
+ },
+ {
+ label: "地址",
+ property: "dz",
+ },
+ ],
+ },
+});
//节流
var timer;
const throttle = (func, limit) => {
@@ -476,7 +702,11 @@ const searchT1 = (val) => {
// }
};
const onTypel = (val) => {
+ //切换时,直接更换表头和url,重置分页器
chooseTitle.value = val.id;
+ data.columns=columnsList['最低生活保障'][val.col];
+ data.url=val.url;
+ data.pagination.current=1;
if (val.id == 1) {
personDetails();
} else if (val.id == 3) {
@@ -506,14 +736,14 @@ const confirmEvent = (index, row) => {
const getRegisteredDB = () => {
http
.get(
- `/api/ggfwyth/pg/zcdbry?size=${data.pagination1.pageSize}&page=${data.pagination1.current}&name=${search1.name}&startTime=${search1.date}&endTime=${search1.date1}`
+ `${data.url}?size=${data.pagination.pageSize}&page=${data.pagination.current}&name=${search1.name}&startTime=${search1.date}&endTime=${search1.date1}`
)
.then((res) => {
if (res.code == 200) {
data.tableData1 = res.data;
- data.pagination1.total = res.count;
- const currentPage = data.pagination1.current; // 当前页数
- const pageSize = data.pagination1.pageSize; // 每页显示的条数
+ data.pagination.total = res.count;
+ const currentPage = data.pagination.current; // 当前页数
+ const pageSize = data.pagination.pageSize; // 每页显示的条数
data.tableData1 = res.data.map((item) => {
// 提取 bhax0033 中的日期部分
@@ -536,7 +766,7 @@ const getRegisteredDB = () => {
const personDetails = () => {
http
.get(
- `/api/ggfwyth/pg/wxsbmRyxx/${data.xh}/${data.bm}?size=${data.pagination.pageSize}&page=${data.pagination.current}`
+ `${data.url}/${data.xh}/${data.bm}?size=${data.pagination.pageSize}&page=${data.pagination.current}`
)
.then((res) => {
if (res.code == 200) {
@@ -548,6 +778,8 @@ const personDetails = () => {
res.data.forEach((item, index) => {
item.index = index + 1 + (currentPage - 1) * pageSize;
});
+ console.log(2222222222,data.tableData);
+
} else {
ElMessage.warning({
message: res.message,
@@ -563,13 +795,16 @@ const handlePagination = (currentPage) => {
personDetails();
};
const handlePagination1 = (currentPage) => {
- data.pagination1.current = currentPage;
+ data.pagination.current = currentPage;
getRegisteredDB();
};
onMounted(() => {
// data.tableData = JSON.parse(routers.query.personDetails);
data.xh = routers.query.xh;
data.bm = routers.query.bm;
+ data.columns=columnsList['最低生活保障'][columnsList['最低生活保障'].titleList[0].col];
+ data.url=columnsList['最低生活保障'].titleList[0].url;
+ titleList=columnsList['最低生活保障'].titleList;
personDetails();
});