This commit is contained in:
parent
0496652a10
commit
4ce03b82b5
|
@ -25,6 +25,21 @@
|
|||
>
|
||||
<template v-for="item in data.columns">
|
||||
<el-table-column
|
||||
v-if="item.type == 'slot'"
|
||||
:label="item.label"
|
||||
:prop="item.property"
|
||||
:width="item.width || ''"
|
||||
>
|
||||
<template #default="scope">
|
||||
<!-- 补助类型 -->
|
||||
<div v-if="item.property == 'bzlx'">
|
||||
<div v-if="scope.row.bzlx == '1'">高龄津贴</div>
|
||||
<div v-else>老年人综合能力评估</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-else
|
||||
:label="item.label"
|
||||
:width="item.width || ''"
|
||||
:prop="item.property"
|
||||
|
@ -85,8 +100,7 @@
|
|||
:total="pagination1.total"
|
||||
prev-text="上一页"
|
||||
next-text="下一页"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
@current-change="handlePagination1"
|
||||
v-model:current-page="pagination1.currentPage"
|
||||
/>
|
||||
</div>
|
||||
|
@ -116,6 +130,7 @@
|
|||
@click="change"
|
||||
/>
|
||||
</span>
|
||||
<div v-else class="text_1">未享受对象</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 97.5%; position: relative">
|
||||
|
@ -131,6 +146,21 @@
|
|||
>
|
||||
<template v-for="item in data.column_2">
|
||||
<el-table-column
|
||||
v-if="item.type == 'slot'"
|
||||
:label="item.label"
|
||||
:prop="item.property"
|
||||
:width="item.width || ''"
|
||||
>
|
||||
<template #default="scope">
|
||||
<!-- 补助类型 -->
|
||||
<div v-if="item.property == 'bzlx'">
|
||||
<div v-if="scope.row.bzlx == 1">高龄津贴</div>
|
||||
<div v-else>老年人综合能力评估</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-else
|
||||
:label="item.label"
|
||||
:width="item.width || ''"
|
||||
:prop="item.property"
|
||||
|
@ -144,7 +174,7 @@
|
|||
:total="pagination2.total"
|
||||
prev-text="上一页"
|
||||
next-text="下一页"
|
||||
@current-change="handle2"
|
||||
@current-change="handlePagination2"
|
||||
v-model:current-page="pagination2.currentPage"
|
||||
/>
|
||||
</div>
|
||||
|
@ -161,9 +191,9 @@ const router = useRouter();
|
|||
const routers = useRoute();
|
||||
const data = reactive({
|
||||
name: "",
|
||||
tabelshow: false,
|
||||
tabelshow: true,
|
||||
pagedData: [],
|
||||
first: true,
|
||||
first: 1,
|
||||
columns: [],
|
||||
column_1: [],
|
||||
column_2: [],
|
||||
|
@ -611,12 +641,12 @@ const formData = reactive({
|
|||
columns: [
|
||||
{
|
||||
label: "姓名",
|
||||
property: "fullName",
|
||||
property: "xm",
|
||||
width: "90",
|
||||
},
|
||||
{
|
||||
label: "地址",
|
||||
property: "address",
|
||||
property: "dz",
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
|
@ -625,8 +655,13 @@ const formData = reactive({
|
|||
},
|
||||
{
|
||||
label: "补助类型",
|
||||
property: "subsidyType",
|
||||
property: "bzlx", //补助类型1高龄津贴0老年人综合能力评估
|
||||
type: "slot",
|
||||
},
|
||||
// {
|
||||
// label: "身份证号码",
|
||||
// property: "identNo",
|
||||
// },
|
||||
],
|
||||
column_1: [
|
||||
{
|
||||
|
@ -654,12 +689,12 @@ const formData = reactive({
|
|||
column_2: [
|
||||
{
|
||||
label: "姓名",
|
||||
property: "fullName",
|
||||
property: "xm",
|
||||
width: "90",
|
||||
},
|
||||
{
|
||||
label: "地址",
|
||||
property: "address",
|
||||
property: "dz",
|
||||
},
|
||||
{
|
||||
label: "年龄",
|
||||
|
@ -668,7 +703,8 @@ const formData = reactive({
|
|||
},
|
||||
{
|
||||
label: "补助类型",
|
||||
property: "subsidyType",
|
||||
property: "bzlx", //补助类型1高龄津贴0老年人综合能力评估
|
||||
type: "slot",
|
||||
},
|
||||
],
|
||||
tableData: [
|
||||
|
@ -1414,16 +1450,19 @@ const formData = reactive({
|
|||
});
|
||||
// 表格分页1、2、3
|
||||
const pagination = reactive({
|
||||
url: "",
|
||||
total: 10,
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
});
|
||||
const pagination1 = reactive({
|
||||
url: "",
|
||||
total: 10,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
});
|
||||
const pagination2 = reactive({
|
||||
url: "",
|
||||
total: 10,
|
||||
pageSize: 20,
|
||||
currentPage: 1,
|
||||
|
@ -1432,13 +1471,48 @@ const pagination2 = reactive({
|
|||
const handlePagination = (current) => {
|
||||
// console.log(current,"page1");
|
||||
pagination.currentPage = current;
|
||||
getTable("/api/ggfwyth/pg/lyxsdbrymd", pagination.currentPage);
|
||||
switch (data.name) {
|
||||
case "最低生活保障":
|
||||
getTable(pagination);
|
||||
break;
|
||||
case "老年人福利补贴":
|
||||
getServiceList(pagination, 1);
|
||||
break;
|
||||
case "慢性病患者健康管理":
|
||||
break;
|
||||
case "义务教育学生生活补助":
|
||||
break;
|
||||
case "义务教育学生营养改善计划":
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
const handleSizeChange = (val) => {
|
||||
const handlePagination1 = (val) => {
|
||||
const startIndex = (val - 1) * 10;
|
||||
const endIndex = val * 10;
|
||||
data.pagedData = data.tableData1.slice(startIndex, endIndex);
|
||||
};
|
||||
const handlePagination2 = (current) => {
|
||||
pagination2.currentPage = current;
|
||||
|
||||
switch (data.name) {
|
||||
case "最低生活保障":
|
||||
// getTable(pagination);
|
||||
break;
|
||||
case "老年人福利补贴":
|
||||
getServiceList(pagination2, 0);
|
||||
break;
|
||||
case "慢性病患者健康管理":
|
||||
break;
|
||||
case "义务教育学生生活补助":
|
||||
break;
|
||||
case "义务教育学生营养改善计划":
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
console.log(data.tableData1, val);
|
||||
const startIndex = (val - 1) * 10;
|
||||
|
@ -1481,12 +1555,15 @@ const rowState = (row) => {
|
|||
}
|
||||
};
|
||||
|
||||
const change = (name, index) => {
|
||||
data.first = !data.first;
|
||||
const change = () => {
|
||||
data.first = data.first == 1 ? 0 : 1;
|
||||
console.log(data.first);
|
||||
};
|
||||
const getTable = async (url, currentPage) => {
|
||||
const getTable = async (pagination) => {
|
||||
await http
|
||||
.get(`${url}?page=${currentPage}&size=${pagination.pageSize}`)
|
||||
.get(
|
||||
`${pagination.url}?page=${pagination.currentPage}&size=${pagination.pageSize}`
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
data.tableData = res.data;
|
||||
|
@ -1495,6 +1572,31 @@ const getTable = async (url, currentPage) => {
|
|||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 服务清单
|
||||
* @param {*} pagination - 分页对象,包含当前页码和每页显示的条数和请求的URL地址
|
||||
* @param {number} sfxs - 是否享受,1表示是,0表示否
|
||||
*/
|
||||
const getServiceList = async (pagination, sfxs) => {
|
||||
await http
|
||||
.get(
|
||||
`${pagination.url}?page=${pagination.currentPage}&size=${pagination.pageSize}&sfxs=${sfxs}`
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (sfxs) {
|
||||
data.tableData = res.data;
|
||||
pagination.total = res.count;
|
||||
console.log(data.tableData2);
|
||||
} else {
|
||||
data.tableData2 = res.data;
|
||||
pagination2.total = res.count;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const handleRowClick = (row, column, event) => {
|
||||
// row 是当前行的数据
|
||||
console.log(row);
|
||||
|
@ -1523,13 +1625,18 @@ const listAssignment = () => {
|
|||
case "最低生活保障":
|
||||
updateFormDataAndTable("低保", formData.dbTableData);
|
||||
data.tableData2 = formData.dbTableData.resultsList;
|
||||
getTable("/api/ggfwyth/pg/lyxsdbrymd", pagination.currentPage);
|
||||
pagination.url = "/api/ggfwyth/pg/lyxsdbrymd";
|
||||
getTable(pagination);
|
||||
break;
|
||||
case "老年人福利补贴":
|
||||
data.tabelshow = false;
|
||||
updateFormDataAndTable("户籍老年人", formData.hjlnrTableData);
|
||||
pagination.url = "/api/ggfwyth/pg/lnrfw";
|
||||
pagination2.url = "/api/ggfwyth/pg/lnrfw";
|
||||
getServiceList(pagination, 1);
|
||||
getServiceList(pagination2, 0);
|
||||
break;
|
||||
case "慢性病患者健康管理":
|
||||
data.tabelshow = true;
|
||||
updateFormDataAndTable("两慢病患者", formData.lmbhzTableData);
|
||||
break;
|
||||
case "义务教育学生生活补助":
|
||||
|
@ -1819,6 +1926,7 @@ onMounted(() => {
|
|||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
span {
|
||||
font-size: 23px;
|
||||
font-weight: 500;
|
||||
|
@ -1907,6 +2015,13 @@ onMounted(() => {
|
|||
top: 1px;
|
||||
align-items: center;
|
||||
}
|
||||
.text_1 {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
color: #4787a8;
|
||||
font-family: titleNore;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.gTitle {
|
||||
position: absolute;
|
||||
color: #acd1f1;
|
||||
|
|
|
@ -3376,9 +3376,9 @@ onMounted(async () => {
|
|||
font-size: 16px;
|
||||
line-height: 28px;
|
||||
background: rgba(124, 151, 180, 0.8);
|
||||
// padding: 10px;
|
||||
margin-bottom: 4px;
|
||||
position: relative;
|
||||
// padding: 10px;
|
||||
/* 必须设置 position 属性以便伪元素定位 */
|
||||
// border-radius: 5px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue