This commit is contained in:
parent
a2ef05323d
commit
158a2f5aea
|
@ -3,7 +3,7 @@ import { ElMessage } from "element-plus";
|
|||
import tools from "@/utils/tools";
|
||||
import router from "../router";
|
||||
|
||||
axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/'
|
||||
// axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/'
|
||||
axios.defaults.timeout = 120000;
|
||||
|
||||
// HTTP request 拦截器
|
||||
|
@ -38,7 +38,6 @@ axios.interceptors.response.use(
|
|||
const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
||||
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;";
|
||||
}
|
||||
|
||||
router.replace({
|
||||
path: "/guide",
|
||||
});
|
||||
|
|
|
@ -12,63 +12,177 @@
|
|||
<div class="line" v-if="chooseTitle == item.id"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select" v-if="chooseTitle != '1'">
|
||||
<div class="select_item">
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
style="width: 100%"
|
||||
placeholder="姓名查询"
|
||||
clearable
|
||||
class="input-with-select"
|
||||
>
|
||||
<template #append>
|
||||
<el-button :icon="Search" @click="searchT('name')" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="select_item">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="search.date"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="searchT('date')"
|
||||
<div v-if="chooseTitle == '1'">
|
||||
<el-table
|
||||
:data="data.tableData"
|
||||
stripe
|
||||
border
|
||||
max-height="80vh"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="index" label="序号" width="50" />
|
||||
<el-table-column prop="xm" label="姓名" width="60" />
|
||||
<el-table-column prop="sfzhm" label="身份证" />
|
||||
<el-table-column prop="jzzh" label="救助证号" />
|
||||
<el-table-column prop="sjhm" label="联系电话" />
|
||||
<el-table-column prop="xzjd" label="乡镇(街道)" />
|
||||
<el-table-column prop="csq" label="村社" />
|
||||
<el-table-column prop="dz" label="地址" />
|
||||
<el-table-column prop="jzrq" label="救助日期" />
|
||||
</el-table>
|
||||
<div class="pagePart">
|
||||
<el-pagination
|
||||
size="small"
|
||||
class="mt-4"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:page-size="data.pagination.pageSize"
|
||||
:total="data.pagination.total"
|
||||
:current-page="data.pagination.current"
|
||||
@current-change="handlePagination"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="chooseTitle == '2'">
|
||||
<div class="select">
|
||||
<div class="select_item">
|
||||
<el-input
|
||||
v-model="search1.name"
|
||||
style="width: 100%"
|
||||
placeholder="姓名查询"
|
||||
clearable
|
||||
class="input-with-select"
|
||||
>
|
||||
<template #append>
|
||||
<el-button :icon="Search" @click="searchT('name')" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="select_item">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="search1.date"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="searchT('date')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="data.tableData1"
|
||||
stripe
|
||||
border
|
||||
max-height="74vh"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="index" label="序号" width="50" />
|
||||
<el-table-column prop="ahap0016" label="申请人" width="70" />
|
||||
<el-table-column prop="ahap0015" label="身份证" />
|
||||
<el-table-column prop="ahax0003" label="救助证号" />
|
||||
<el-table-column prop="ahax0004" label="申请救助" />
|
||||
<el-table-column prop="ahax0011" label="银行账号" />
|
||||
<el-table-column prop="azdf0005" label="家庭总人口" width="50" />
|
||||
<el-table-column prop="azdf0011" label="手机号码" />
|
||||
<el-table-column prop="bhax0003" label="用电户号" />
|
||||
<el-table-column prop="bhax0004" label="减免地址" />
|
||||
<el-table-column prop="bhax0005" label="低保类别" />
|
||||
<el-table-column prop="bhax0008" label="致贫原因" />
|
||||
<el-table-column prop="bhax0009" label="是否申请电力减免" />
|
||||
<el-table-column prop="bhax0011" label="水费户号" />
|
||||
<el-table-column prop="bhax0012" label="燃气户号" />
|
||||
<el-table-column prop="bhax0013" label="有线电视户号" />
|
||||
<el-table-column prop="bhax0033" label="救助日期" />
|
||||
<el-table-column prop="bhax0035" label="低保类型" />
|
||||
</el-table>
|
||||
<div class="pagePart">
|
||||
<el-pagination
|
||||
size="small"
|
||||
class="mt-4"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:page-size="data.pagination1.pageSize"
|
||||
:total="data.pagination1.total"
|
||||
:current-page="data.pagination1.current"
|
||||
@current-change="handlePagination1"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="chooseTitle == '3'">
|
||||
<div class="select">
|
||||
<div class="select_item">
|
||||
<el-input
|
||||
v-model="search1.name"
|
||||
style="width: 100%"
|
||||
placeholder="姓名查询"
|
||||
clearable
|
||||
class="input-with-select"
|
||||
>
|
||||
<template #append>
|
||||
<el-button :icon="Search" @click="searchT1('name')" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="select_item">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="search1.date"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="searchT1('date')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="data.tableData"
|
||||
stripe
|
||||
border
|
||||
max-height="80vh"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="index" label="序号" width="50" />
|
||||
<el-table-column prop="xm" label="姓名" width="60" />
|
||||
<el-table-column prop="sfzhm" label="身份证" />
|
||||
<el-table-column prop="jzzh" label="救助证号" />
|
||||
<el-table-column prop="sjhm" label="联系电话" />
|
||||
<el-table-column prop="xzjd" label="乡镇(街道)" />
|
||||
<el-table-column prop="csq" label="村社" />
|
||||
<el-table-column prop="dz" label="地址" />
|
||||
<el-table-column prop="jzrq" label="救助日期" />
|
||||
</el-table>
|
||||
<div class="pagePart">
|
||||
<el-pagination
|
||||
size="small"
|
||||
class="mt-4"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:page-size="data.pagination.pageSize"
|
||||
:total="data.pagination.total"
|
||||
:current-page="data.pagination.current"
|
||||
@current-change="handlePagination"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="data.tableData"
|
||||
stripe
|
||||
border
|
||||
max-height="100vh"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="index" label="序号" width="50" />
|
||||
<el-table-column prop="xm" label="姓名" width="60" />
|
||||
<el-table-column prop="sfzhm" label="身份证" />
|
||||
<el-table-column prop="jzzh" label="救助证号" />
|
||||
<el-table-column prop="sjhm" label="联系电话" />
|
||||
<el-table-column prop="xzjd" label="乡镇(街道)" />
|
||||
<el-table-column prop="csq" label="村社" />
|
||||
<el-table-column prop="dz" label="地址" />
|
||||
<el-table-column prop="jzrq" label="救助日期" />
|
||||
<!-- <el-table-column prop="nl" label="年龄" width="60" /> -->
|
||||
<!-- <el-table-column prop="bq" label="人口标签" /> -->
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, reactive } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import http from "@/utils/request.js";
|
||||
import { Search } from "@element-plus/icons-vue";
|
||||
const router = useRouter();
|
||||
const routers = useRoute();
|
||||
const chooseTitle = ref(1);
|
||||
const search = reactive({
|
||||
const search1 = reactive({
|
||||
name: "",
|
||||
date: "",
|
||||
});
|
||||
const search2 = reactive({
|
||||
name: "",
|
||||
date: "",
|
||||
});
|
||||
|
@ -88,11 +202,17 @@ const titleList = reactive([
|
|||
},
|
||||
]);
|
||||
const data = reactive({
|
||||
code: "",
|
||||
xh: "",
|
||||
bm: "",
|
||||
pagination: {
|
||||
current: 1,
|
||||
pageSize: 200,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
},
|
||||
pagination1: {
|
||||
current: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
},
|
||||
columns: [
|
||||
|
@ -121,6 +241,7 @@ const data = reactive({
|
|||
},
|
||||
],
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
});
|
||||
|
||||
//节流
|
||||
|
@ -136,42 +257,113 @@ const throttle = (func, limit) => {
|
|||
|
||||
const searchT = (val) => {
|
||||
console.log(val);
|
||||
|
||||
if (val == "name") {
|
||||
console.log(search);
|
||||
getRegisteredDB();
|
||||
} else {
|
||||
if (search.date == null) {
|
||||
if (search1.date == null) {
|
||||
throttle(getDate, 50);
|
||||
} else {
|
||||
getRegisteredDB();
|
||||
console.log(search);
|
||||
}
|
||||
}
|
||||
};
|
||||
const searchT1 = (val) => {
|
||||
console.log(val);
|
||||
// if (val == "name") {
|
||||
// getRegisteredDB();
|
||||
// } else {
|
||||
// if (search1.date == null) {
|
||||
// throttle(getDate, 50);
|
||||
// } else {
|
||||
// console.log(search);
|
||||
// }
|
||||
// }
|
||||
};
|
||||
const onTypel = (val) => {
|
||||
console.log("选择",val);
|
||||
chooseTitle.value = val.id;
|
||||
if (val.id == 1) {
|
||||
|
||||
}else{
|
||||
data.tableData = []
|
||||
personDetails();
|
||||
} else if (val.id == 2) {
|
||||
data.tableData = [];
|
||||
getRegisteredDB();
|
||||
} else if (val.id == 3) {
|
||||
data.tableData = [];
|
||||
}
|
||||
};
|
||||
const getDate = () => {
|
||||
console.log("未选择时间");
|
||||
};
|
||||
const personDetails = () => {
|
||||
http.get(`/api/ggfwyth/pg/wxsbmRyxx/${data.xh}/${data.bm}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// console.log(res.data);
|
||||
data.tableData = res.data;
|
||||
} else {
|
||||
ElMessage.warning({
|
||||
message: res.message,
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const getRegisteredDB = () => {
|
||||
http
|
||||
.get(
|
||||
`/api/ggfwyth/pg/zcdbry?size=${data.pagination1.pageSize}&page=${data.pagination1.current}&name=${search1.name}&jzrq=${search1.date}`
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
// console.log(res.data);
|
||||
data.tableData1 = res.data;
|
||||
data.pagination1.total = res.count;
|
||||
const currentPage = data.pagination1.current; // 当前页数
|
||||
const pageSize = data.pagination1.pageSize; // 每页显示的条数
|
||||
|
||||
data.tableData1 = res.data.map((item) => {
|
||||
// 提取 bhax0033 中的日期部分
|
||||
if (item.bhax0033) {
|
||||
item.bhax0033 = item.bhax0033.split("T")[0]; // 截取日期部分
|
||||
}
|
||||
return item;
|
||||
});
|
||||
// 为每条数据添加 index 属性,叠加当前页的偏移量
|
||||
res.data.forEach((item, index) => {
|
||||
item.index = index + 1 + (currentPage - 1) * pageSize;
|
||||
});
|
||||
} else {
|
||||
ElMessage.warning({
|
||||
message: res.message,
|
||||
});
|
||||
// router.replace({
|
||||
// path: "/error/403",
|
||||
// });
|
||||
}
|
||||
});
|
||||
};
|
||||
const personDetails = () => {
|
||||
http
|
||||
.get(
|
||||
`/api/ggfwyth/pg/wxsbmRyxx/${data.xh}/${data.bm}?size=${data.pagination.pageSize}&page=${data.pagination.current}`
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
// console.log(res.data);
|
||||
data.tableData = res.data;
|
||||
data.pagination.total = res.count;
|
||||
|
||||
const currentPage = data.pagination.current; // 当前页数
|
||||
const pageSize = data.pagination.pageSize; // 每页显示的条数
|
||||
// 为每条数据添加 index 属性,叠加当前页的偏移量
|
||||
res.data.forEach((item, index) => {
|
||||
item.index = index + 1 + (currentPage - 1) * pageSize;
|
||||
});
|
||||
} else {
|
||||
ElMessage.warning({
|
||||
message: res.message,
|
||||
});
|
||||
router.replace({
|
||||
path: "/error/403",
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const handlePagination = (currentPage) => {
|
||||
data.pagination.current = currentPage;
|
||||
personDetails();
|
||||
};
|
||||
const handlePagination1 = (currentPage) => {
|
||||
data.pagination1.current = currentPage;
|
||||
getRegisteredDB();
|
||||
};
|
||||
onMounted(() => {
|
||||
// data.tableData = JSON.parse(routers.query.personDetails);
|
||||
data.xh = routers.query.xh;
|
||||
|
@ -228,6 +420,13 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
.pagePart {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 8px;
|
||||
}
|
||||
:deep(.el-input-group__append button.el-button) {
|
||||
background-color: #0091ff;
|
||||
color: #fff;
|
||||
|
|
|
@ -554,6 +554,8 @@ onMounted(() => {});
|
|||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
// position: absolute;
|
||||
|
||||
&_item {
|
||||
width: 45%;
|
||||
display: flex;
|
||||
|
|
|
@ -15,8 +15,8 @@ export default defineConfig({
|
|||
// 第一个代理
|
||||
"/api": {
|
||||
// 匹配到啥来进行方向代理
|
||||
target: "http://10.0.0.7:8095/", //刘进
|
||||
// target: "https://jzzf.longyou.gov.cn:998/", //线上
|
||||
// target: "http://10.0.0.7:8095/", //刘进
|
||||
target: "https://jzzf.longyou.gov.cn:998/", //线上
|
||||
// target: "http://220.191.238.50:996/", //线上
|
||||
// target: "https://zzdyyfb.dsjj.qz.gov.cn/web/mgop/gov-open/zj/2002428903/reserved/", //线上
|
||||
changeOrigin: true, //是否支持跨域
|
||||
|
|
Loading…
Reference in New Issue