This commit is contained in:
lcw
2025-09-15 12:18:30 +08:00
393 changed files with 73 additions and 125347 deletions

View File

@ -19,12 +19,12 @@
<span class="tag">{{ item.yjBt }}</span>
</div>
<div class="info-item flex">
<span class="label">性别</span>
<dict-tag
<span class="label">性别{{ IdCard(item.yjRysfzh, 'all').sex }}</span>
<!-- <dict-tag
:options="D_BZ_XB"
:value="IdCard(item.yjRysfzh, 3)"
:value="IdCard(item.yjRysfzh, 'all').sex"
:tag="false"
></dict-tag>
></dict-tag> -->
</div>
<div class="info-item">
<span class="label">相似度</span>

View File

@ -21,14 +21,13 @@ const vehicleChartRef = ref(null);
const personChartRef = ref(null);
let vehicleChart = null;
let personChart = null;
const createChartOption = (data, colors) => {
const createChartOption = (data, colors, total) => {
return {
title: {
text: "100",
text: `${total}`,
subtext: "总数",
left: "20%",
top: "center",
left: 'center',
top: 'center', //top待调整
textStyle: {
color: "#fff",
fontSize: 24,
@ -43,9 +42,9 @@ const createChartOption = (data, colors) => {
trigger: "item"
},
legend: {
orient: "vertical",
left: "60%",
top: "center",
orient: "horizontal",
top: 0,
bottom: '50px',
textStyle: {
color: "#fff",
rich: {
@ -71,14 +70,14 @@ const createChartOption = (data, colors) => {
},
formatter: (name) => {
const item = data.find((d) => d.name === name);
return `${name} ${item.value} {${item.colorType}|(${item.value}%)}`;
return `${name} ${item.value}`;
}
},
series: [
{
type: "pie",
radius: ["55%", "70%"],
center: ["28%", "50%"],
center: ["50%", "55%"],
data: data.map((item) => ({
...item,
itemStyle: {
@ -100,7 +99,7 @@ const createChartOption = (data, colors) => {
{
type: "pie",
radius: ["65%", "85%"],
center: ["28%", "50%"],
center: ["50%", "55%"],
data: data.map((item) => ({
...item,
itemStyle: {
@ -128,13 +127,20 @@ const randomHexColor = () => {
};
const initCharts = async () => {
let clTotal = 0;
let ryTotal = 0;
vehicleChart = echarts.init(vehicleChartRef.value);
personChart = echarts.init(personChartRef.value);
const colors = ["#00f0ff", "#0066ff", "#ff9900", "#00cc66"];
// 车辆预警数据
const res = await jczgetYjbqtj({ yjLx: 1 });
const res2 = await jczgetYjbqtj({ yjLx: 2 });
console.log(res);
console.log(res, 'res');
console.log(res2, 'res2');
clTotal = res2.map((el) => el.sl).reduce((accumulator, currentValue) => accumulator + currentValue, 0);
ryTotal = res.map((el) => el.sl).reduce((accumulator, currentValue) => accumulator + currentValue, 0);
console.log(clTotal, 'clTotal');
const vehicleData = res.map((item) => {
const color = randomHexColor();
const color2 = randomHexColor();
@ -147,37 +153,6 @@ const initCharts = async () => {
};
});
// [
// {
// value: 25,
// name: "盗窃车辆",
// colorType: "blue",
// color: ["#00f0ff", "#00a0cc"],
// color1: [choseRbgb("#00f0ff", 0.3), choseRbgb("#00a0cc", 0.3)]
// },
// {
// value: 30,
// name: "车牌与车辆不符",
// colorType: "lightBlue",
// color: ["#0066ff", "#0044cc"],
// color1: [choseRbgb("#0066ff", 0.3), choseRbgb("#0044cc", 0.3)]
// },
// {
// value: 17,
// name: "车辆超高",
// colorType: "orange",
// color: ["#ff9900", "#cc7a00"],
// color1: [choseRbgb("#ff9900", 0.3), choseRbgb("#cc7a00", 0.3)]
// },
// {
// value: 28,
// name: "车辆超限",
// colorType: "green",
// color: ["#00cc66", "#009944"],
// color1: [choseRbgb("#00cc66", 0.3), choseRbgb("#009944", 0.3)]
// }
// ];
// 人员预警数据
const personData = res2.map((item) => {
const color = randomHexColor();
@ -220,8 +195,8 @@ const initCharts = async () => {
// color1: [choseRbgb("#00cc66", 0.3), choseRbgb("#009944", 0.3)]
// }
// ];
vehicleChart.setOption(createChartOption(vehicleData, colors));
personChart.setOption(createChartOption(personData, colors));
vehicleChart.setOption(createChartOption(vehicleData, colors, ryTotal));
personChart.setOption(createChartOption(personData, colors, clTotal));
};
const handleResize = () => {
@ -253,7 +228,7 @@ onUnmounted(() => {
.section-title {
font-size: 18px;
margin-bottom: 20px;
// margin-bottom: 20px;
position: relative;
padding-left: 12px;
background: linear-gradient(0deg, #59a6f4 0%, #ffffff 90%);

View File

@ -5,10 +5,10 @@
<div class="f18 pl104">{{ hour + ":" + minute + ":" + second }}</div>
</div>
<div class="title absolute" @click="goPath">{{ props.title }}</div>
<div class="wd absolute">
<!-- <div class="wd absolute">
<el-icon size="25px" style="top: 6px" color="#86C8EB"><Sunny /></el-icon>
<span> 温度 1~7°C </span>
</div>
</div> -->
<div class="zbbb" v-if="query" @click="show = true">值班报备</div>
</div>
<el-dialog v-model="show" title="Shipping address">

View File

@ -18,7 +18,7 @@ function redirectAuth() {
setItem("SSOTOKEN", token)
handleLogin({ token: token});
} else {
window.location.href = `http://155.240.22.102:40992`;
window.location.href = `http://155.240.22.188:9020`;
}
}