This commit is contained in:
姚宇浩 2024-08-19 16:54:17 +08:00
commit c47aea47fe
3 changed files with 85 additions and 139 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -114,7 +114,15 @@
<i></i>
<i></i>
</div>
<span class="text" v-if="data.tabelshow">
<div v-if="data.name == '慢性病患者健康管理'" class="mxbRecord">
<div :class="data.first ? 'text_0' : 'text_2'" @click="change(1)">
随访记录
</div>
<div :class="data.first ? 'text_2' : 'text_0'" @click="change(0)">
体检记录
</div>
</div>
<span class="text" v-else-if="data.tabelshow">
<img
v-if="data.first"
src="@/assets/sy-table/sy_details4.png"
@ -190,6 +198,7 @@ import { useRouter, useRoute } from "vue-router";
import tools from "@/utils/tools";
const router = useRouter();
const routers = useRoute();
const mxbtabelshow = ref(true);
const data = reactive({
name: "",
identNo: "",
@ -908,14 +917,19 @@ const formData = reactive({
},
],
column_2: [
{
label: "时间",
property: "sfsj",
width: "120",
},
{
label: "姓名",
property: "fullName",
property: "xm",
width: "90",
},
{
label: "地址",
property: "address",
property: "dz",
},
{
label: "年龄",
@ -924,7 +938,7 @@ const formData = reactive({
},
{
label: "人口标签",
property: "subsidyType",
property: "bq",
},
],
tableData: [
@ -936,127 +950,8 @@ const formData = reactive({
ProcessingMethod: "无需申报",
},
],
resultsList: [
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "高血压",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "高血压",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "高血压",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "高血压",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
{
fullName: "王*",
address: "龙游县东华街道",
age: "13",
IDNumber: "330825****92022011",
subsidyType: "糖尿病",
},
],
resultsList: [],
resultsList1: [],
},
shbz_knxs_TableData: {
url: "",
@ -1509,6 +1404,7 @@ const handlePagination2 = (current) => {
getServiceList(pagination2, 0);
break;
case "慢性病患者健康管理":
getTable1(pagination2);
break;
case "义务教育学生生活补助":
break;
@ -1560,20 +1456,38 @@ const rowState = (row) => {
}
};
const change = () => {
data.first = data.first == 1 ? 0 : 1;
const change = (val) => {
if (data.name == "慢性病患者健康管理") {
if (data.first !== val) {
data.first = val;
console.log(data.first);
}
} else {
data.first = data.first == 1 ? 0 : 1;
}
};
const getTable = async (pagination) => {
await http
const getTable = (pagination) => {
http
.get(
`${pagination.url}?page=${pagination.currentPage}&size=${pagination.pageSize}`
)
.then((res) => {
if (res.code == 200) {
// console.log(mxbtabelshow.value, data.tableData, 111);
data.tableData = res.data;
pagination.total = res.count;
console.log(data.tableData);
}
});
};
const getTable1 = (pagination) => {
http
.get(
`${pagination.url}?page=${pagination.currentPage}&size=${pagination.pageSize}`
)
.then((res) => {
if (res.code == 200) {
data.tableData2 = res.data;
pagination2.total = res.count;
}
});
};
@ -1652,6 +1566,7 @@ const updateFormDataAndTable = (formDataName, tableData) => {
data.column_2 = tableData.column_2;
data.tableData = tableData.resultsList;
data.tableData1 = tableData.tableData;
data.tableData2 = tableData.resultsList1;
pagination1.total = tableData.tableData.length;
handleCurrentChange(1);
};
@ -1666,7 +1581,6 @@ const listAssignment = () => {
updateFormDataAndTable("低保", formData.dbTableData);
data.tableData2 = formData.dbTableData.resultsList;
pagination.url = "/api/ggfwyth/pg/shjzShbz";
getTable(pagination);
break;
case "老年人福利补贴":
@ -1679,8 +1593,11 @@ const listAssignment = () => {
break;
case "慢性病患者健康管理":
updateFormDataAndTable("两慢病患者", formData.lmbhzTableData);
pagination.url = "/api/ggfwyth/pg/ggwsMxb";
// pagination.url = "/api/ggfwyth/pg/ggwsMxb";
pagination.url = "/api/ggfwyth/pg/ggwsMxbFwdx";
pagination2.url = "/api/ggfwyth/pg/ggwsMxbSfjl";
getTable(pagination);
getTable1(pagination2);
break;
case "义务教育学生生活补助":
updateFormDataAndTable("困难学生", formData.shbz_knxs_TableData);
@ -1698,7 +1615,7 @@ const listAssignment = () => {
};
onMounted(() => {
// tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d");
tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d");
if (routers.query.name) {
data.name = routers.query.name;
listAssignment();
@ -2049,7 +1966,36 @@ onMounted(() => {
animation: four 4s linear 3s infinite;
}
}
.mxbRecord {
display: flex;
.text_0 {
font-size: 20px;
font-weight: 500;
color: #ffffff;
font-family: titleNore;
// margin-right: 20px;
padding: 0 10px;
width: 90px;
z-index: 2;
cursor: pointer;
background: radial-gradient(
circle,
rgba(37, 127, 173, 1) 0%,
rgba(37, 127, 173, 0) 100%
);
}
.text_2 {
font-size: 20px;
font-weight: 500;
color: #4787a8;
font-family: titleNore;
// margin-right: 20px;
padding: 0 10px;
width: 90px;
z-index: 2;
cursor: pointer;
}
}
.text {
display: flex;
position: absolute;

View File

@ -669,7 +669,7 @@ const sevenYX = (name) => {
};
onMounted(() => {
// tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d");
tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d");
getData("弱有所扶", "社会救助服务");
sevenYX("弱有众扶");
});