This commit is contained in:
duanxiaohai 2024-11-07 12:03:29 +08:00
parent bc1042a7a7
commit a11fa7618e
1 changed files with 35 additions and 1 deletions

View File

@ -501,7 +501,7 @@ const sfType = reactive({
});
const tableType = reactive({
url: `/api/ggfwyth/pg/fwjgqdxq`,
url1: `/api/ggfwyth/pg/spypqyxq`,//
url1: `/api/ggfwyth/pg/spypqyxq`, //
title: "服务详情",
name: "",
typeId: "",
@ -610,10 +610,44 @@ const showList = (val) => {
message: `该服务内容暂无推送记录!`,
});
} else {
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; //
}
function maskYwfzr(ywfzr) {
//
if (ywfzr.includes("")) {
//
return ywfzr.replace(/([^]+[^,]+)/g, (match) => {
const parts = match.split(""); //
const maskedNames = parts[1]
.split(",")
.map((name) => maskName(name.trim()))
.join(", "); //
return `${parts[0]}${maskedNames}`; //
});
} else {
//
return ywfzr
.split(",")
.map((name) => maskName(name.trim()))
.join(", ");
}
}
push.data = push.data.map((item, index1) => {
return {
...item,
index: index1 + 1,
xm: maskYwfzr(item.xm),
adminName: maskYwfzr(item.adminName),
};
});
dialogShowPush.value = true;