This commit is contained in:
parent
c9f0f539f1
commit
b79bf26ca6
|
@ -125,11 +125,43 @@
|
|||
<div v-if="data.name == '老年人福利补贴'" class="lampState">
|
||||
<div>
|
||||
<img
|
||||
v-for="n in 9"
|
||||
:key="n"
|
||||
:src="lampImages[n]"
|
||||
@click="lampScreen(n)"
|
||||
:class="{ selected: selectedLamp == n }"
|
||||
:src="
|
||||
selectedLamp1.green
|
||||
? lampImages[7]
|
||||
: selectedLamp == 1
|
||||
? lampImages[1]
|
||||
: lampImages[4]
|
||||
"
|
||||
:style="{
|
||||
cursor: selectedLamp1.green ? 'not-allowed' : 'pointer',
|
||||
}"
|
||||
@click="selectedLamp1.green ? null : lampScreen(1)"
|
||||
/>
|
||||
<img
|
||||
:src="
|
||||
selectedLamp1.red
|
||||
? lampImages[8]
|
||||
: selectedLamp == 2
|
||||
? lampImages[2]
|
||||
: lampImages[5]
|
||||
"
|
||||
:style="{
|
||||
cursor: selectedLamp1.red ? 'not-allowed' : 'pointer',
|
||||
}"
|
||||
@click="selectedLamp1.red ? null : lampScreen(2)"
|
||||
/>
|
||||
<img
|
||||
:src="
|
||||
selectedLamp1.yellow
|
||||
? lampImages[9]
|
||||
: selectedLamp == 3
|
||||
? lampImages[3]
|
||||
: lampImages[6]
|
||||
"
|
||||
:style="{
|
||||
cursor: selectedLamp1.yellow ? 'not-allowed' : 'pointer',
|
||||
}"
|
||||
@click="selectedLamp1.yellow ? null : lampScreen(3)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -175,7 +207,7 @@
|
|||
<template #default="scope">
|
||||
<!-- 状态 -->
|
||||
<div v-if="item.property == 'zt'">
|
||||
<div v-for="index in 9" :key="index">
|
||||
<div v-for="index in 3" :key="index">
|
||||
<img
|
||||
style="width: 30px; height: 30px"
|
||||
v-if="scope.row.zt == index"
|
||||
|
@ -220,13 +252,13 @@ import { useRouter, useRoute } from "vue-router";
|
|||
import { ElMessage } from "element-plus";
|
||||
import tools from "@/utils/tools";
|
||||
import lamp1 from "../assets/sy-table/lampGreen1.png";
|
||||
import lamp2 from "../assets/sy-table/lampGreen2.png";
|
||||
import lamp3 from "../assets/sy-table/lampGreen3.png";
|
||||
import lamp4 from "../assets/sy-table/lampRed1.png";
|
||||
import lamp2 from "../assets/sy-table/lampRed1.png";
|
||||
import lamp3 from "../assets/sy-table/lampYellow1.png";
|
||||
import lamp4 from "../assets/sy-table/lampGreen2.png";
|
||||
import lamp5 from "../assets/sy-table/lampRed2.png";
|
||||
import lamp6 from "../assets/sy-table/lampRed3.png";
|
||||
import lamp7 from "../assets/sy-table/lampYellow1.png";
|
||||
import lamp8 from "../assets/sy-table/lampYellow2.png";
|
||||
import lamp6 from "../assets/sy-table/lampYellow2.png";
|
||||
import lamp7 from "../assets/sy-table/lampGreen3.png";
|
||||
import lamp8 from "../assets/sy-table/lampRed3.png";
|
||||
import lamp9 from "../assets/sy-table/lampYellow3.png";
|
||||
const router = useRouter();
|
||||
const routers = useRoute();
|
||||
|
@ -906,57 +938,57 @@ const formData = reactive({
|
|||
bzlx: "2",
|
||||
},
|
||||
|
||||
{
|
||||
xm: "罗*华",
|
||||
zt: 3,
|
||||
dz: "浙江省龙游县龙*****号",
|
||||
age: "87",
|
||||
bzlx: "1",
|
||||
},
|
||||
{
|
||||
xm: "罗*华",
|
||||
zt: 3,
|
||||
dz: "浙江省龙游县龙*****号",
|
||||
age: "87",
|
||||
bzlx: "1",
|
||||
},
|
||||
{
|
||||
xm: "罗*华",
|
||||
zt: 3,
|
||||
dz: "浙江省龙游县龙*****号",
|
||||
age: "87",
|
||||
bzlx: "1",
|
||||
},
|
||||
{
|
||||
xm: "罗*华",
|
||||
zt: 3,
|
||||
dz: "浙江省龙游县龙*****号",
|
||||
age: "87",
|
||||
bzlx: "1",
|
||||
},
|
||||
{
|
||||
xm: "罗*华",
|
||||
zt: 3,
|
||||
dz: "浙江省龙游县龙*****号",
|
||||
age: "87",
|
||||
bzlx: "1",
|
||||
},
|
||||
// {
|
||||
// xm: "罗*华",
|
||||
// zt: 3,
|
||||
// dz: "浙江省龙游县龙*****号",
|
||||
// age: "87",
|
||||
// bzlx: "1",
|
||||
// },
|
||||
// {
|
||||
// xm: "罗*华",
|
||||
// zt: 3,
|
||||
// dz: "浙江省龙游县龙*****号",
|
||||
// age: "87",
|
||||
// bzlx: "1",
|
||||
// },
|
||||
// {
|
||||
// xm: "罗*华",
|
||||
// zt: 3,
|
||||
// dz: "浙江省龙游县龙*****号",
|
||||
// age: "87",
|
||||
// bzlx: "1",
|
||||
// },
|
||||
// {
|
||||
// xm: "罗*华",
|
||||
// zt: 3,
|
||||
// dz: "浙江省龙游县龙*****号",
|
||||
// age: "87",
|
||||
// bzlx: "1",
|
||||
// },
|
||||
// {
|
||||
// xm: "罗*华",
|
||||
// zt: 3,
|
||||
// dz: "浙江省龙游县龙*****号",
|
||||
// age: "87",
|
||||
// bzlx: "1",
|
||||
// },
|
||||
|
||||
{
|
||||
xm: "罗*华",
|
||||
zt: 3,
|
||||
dz: "浙江省龙游县龙*****号",
|
||||
age: "87",
|
||||
bzlx: "1",
|
||||
},
|
||||
// {
|
||||
// xm: "罗*华",
|
||||
// zt: 3,
|
||||
// dz: "浙江省龙游县龙*****号",
|
||||
// age: "87",
|
||||
// bzlx: "1",
|
||||
// },
|
||||
|
||||
{
|
||||
xm: "罗*华",
|
||||
zt: 3,
|
||||
dz: "浙江省龙游县龙*****号",
|
||||
age: "87",
|
||||
bzlx: "1",
|
||||
},
|
||||
// {
|
||||
// xm: "罗*华",
|
||||
// zt: 3,
|
||||
// dz: "浙江省龙游县龙*****号",
|
||||
// age: "87",
|
||||
// bzlx: "1",
|
||||
// },
|
||||
{
|
||||
xm: "周*田",
|
||||
zt: 4,
|
||||
|
@ -1901,13 +1933,31 @@ const lampImages = {
|
|||
9: lamp9,
|
||||
};
|
||||
const selectedLamp = ref(null);
|
||||
const selectedLamp1 = reactive({
|
||||
green: false,
|
||||
red: false,
|
||||
yellow: false,
|
||||
});
|
||||
const lampScreen = (val) => {
|
||||
if (selectedLamp.value === val) {
|
||||
return;
|
||||
}
|
||||
selectedLamp.value = val;
|
||||
const filteredData = formData.hjlnrTableData.tableData2.filter(
|
||||
(element) => element.zt === val
|
||||
);
|
||||
data.tableData2 = filteredData;
|
||||
// console.log(val, data.tableData2);
|
||||
|
||||
selectedLamp1.green = !formData.hjlnrTableData.tableData2.some(
|
||||
(element) => element.zt === 1
|
||||
);
|
||||
selectedLamp1.red = !formData.hjlnrTableData.tableData2.some(
|
||||
(element) => element.zt === 2
|
||||
);
|
||||
selectedLamp1.yellow = !formData.hjlnrTableData.tableData2.some(
|
||||
(element) => element.zt === 3
|
||||
);
|
||||
console.log(111, selectedLamp1, val);
|
||||
};
|
||||
|
||||
const getTable = (pagination) => {
|
||||
|
@ -2528,11 +2578,11 @@ onMounted(() => {
|
|||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
.selected {
|
||||
border-radius: 50%;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
// .selected {
|
||||
// border-radius: 50%;
|
||||
// background-color: rgba(255, 255, 255, 0.3);
|
||||
// box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
|
||||
// }
|
||||
}
|
||||
.yd_title::before {
|
||||
content: "";
|
||||
|
|
Loading…
Reference in New Issue