This commit is contained in:
duanxiaohai 2024-08-02 17:11:06 +08:00
parent 0f2b4e4bb3
commit e3abee404c
1 changed files with 24 additions and 21 deletions

View File

@ -64,7 +64,7 @@
class="my-tag-item" class="my-tag-item"
v-for="item in dataMyTag.myTag" v-for="item in dataMyTag.myTag"
:key="item" :key="item"
@click="onClickTag(item)" @click="item.show ? onClickTag(item) : ''"
:class="item.show ? 'my-tag-item_active' : ''" :class="item.show ? 'my-tag-item_active' : ''"
> >
<p> <p>
@ -246,77 +246,77 @@ const dataMyTag = reactive({
{ {
name: "低保", name: "低保",
jkName: "dbao", jkName: "dbao",
show: false, show: 0,
}, },
{ {
name: "低边", name: "低边",
jkName: "dbian", jkName: "dbian",
show: false, show: 0,
}, },
{ {
name: "特困", name: "特困",
jkName: "tk", jkName: "tk",
show: false, show: 0,
}, },
{ {
name: "残疾人", name: "残疾人",
jkName: "", jkName: "",
show: false, show: 0,
}, },
{ {
name: "退役军人", name: "退役军人",
jkName: "tyjr", jkName: "tyjr",
show: false, show: 0,
}, },
{ {
name: "留守", name: "留守",
jkName: "jzzt", jkName: "jzzt",
show: false, show: 0,
}, },
{ {
name: "困境儿童", name: "困境儿童",
jkName: "kjet", jkName: "kjet",
show: false, show: 0,
}, },
{ {
name: "医保支出万元以上", name: "医保支出万元以上",
jkName: "", jkName: "",
show: false, show: 0,
}, },
{ {
name: "残疾", name: "残疾",
jkName: "cj", jkName: "cj",
show: false, show: 0,
}, },
{ {
name: "高血压", name: "高血压",
jkName: "gxy", jkName: "gxy",
show: false, show: 0,
}, },
{ {
name: "糖尿病", name: "糖尿病",
jkName: "tnb", jkName: "tnb",
show: false, show: 0,
}, },
{ {
name: "高血脂", name: "高血脂",
jkName: "", jkName: "",
show: false, show: 0,
}, },
{ {
name: "高血糖", name: "高血糖",
jkName: "", jkName: "",
show: false, show: 0,
}, },
{ {
name: "其他疾病", name: "其他疾病",
jkName: "", jkName: "",
show: false, show: 0,
}, },
{ {
name: "大病住院", name: "大病住院",
jkName: "", jkName: "",
show: false, show: 0,
}, },
], ],
}); });
@ -402,11 +402,13 @@ const getData = (nm, identNo) => {
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
baseInfo.value = res.data; baseInfo.value = res.data;
dataMyTag.myTag.map((item) => {
item.show = res.data[item.jkName];
console.log(res.data[item.jkName],555);
});
dataMyTag.myTag.map((item) => {
if (res.data[item.jkName]) {
item.show = Number(res.data[item.jkName]);
}
});
// console.log(dataMyTag.myTag, 555);
} }
}); });
}; };
@ -645,7 +647,7 @@ onMounted(() => {
font-style: normal; font-style: normal;
margin-right: 10px; margin-right: 10px;
margin-bottom: 20px; margin-bottom: 20px;
cursor: pointer; cursor: not-allowed;
// &:hover { // &:hover {
// background: rgba(0, 158, 255, 0.38); // background: rgba(0, 158, 255, 0.38);
@ -656,6 +658,7 @@ onMounted(() => {
.my-tag-item_active { .my-tag-item_active {
background: rgba(0, 158, 255, 0.38); background: rgba(0, 158, 255, 0.38);
box-shadow: inset 0px 0px 11px 0px rgba(255, 255, 255, 0.5); box-shadow: inset 0px 0px 11px 0px rgba(255, 255, 255, 0.5);
cursor: pointer;
} }
} }