This commit is contained in:
duanxiaohai 2024-11-13 17:27:47 +08:00
parent abf7531d5a
commit 40f4661cac
2 changed files with 20 additions and 1 deletions

View File

@ -2,7 +2,7 @@ import axios from "axios";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import tools from "@/utils/tools"; import tools from "@/utils/tools";
import router from "../router"; 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; axios.defaults.timeout = 120000;
// HTTP request 拦截器 // HTTP request 拦截器

View File

@ -253,6 +253,25 @@ const getData = () => {
if (res.code == 200) { if (res.code == 200) {
data.tableData = res.data; data.tableData = res.data;
pagination.total = res.count; pagination.total = res.count;
function maskName(name) {
if (name.length === 2) {
// *
return name[0] + "*";
} else if (name.length > 2) {
//
return (
name[0] + "*".repeat(name.length - 2) + name[name.length - 1]
);
}
return name; //
}
data.tableData = data.tableData.map((item) => {
return {
...item,
xm: maskName(item.xm),
};
});
} else { } else {
ElMessage.warning({ message: res.message }); ElMessage.warning({ message: res.message });
} }