This commit is contained in:
duanxiaohai 2024-10-18 13:53:29 +08:00
parent b4f6b4b05a
commit 660cf9e0ad
6 changed files with 614 additions and 416 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -40,11 +40,11 @@
/> />
</div> </div>
</div> </div>
<div style="width: 100%; height: calc(100% - 110px)" > <div style="width: 100%; height: calc(100% - 110px)">
<div style="border: 1px solid #5284b0"> <div style="border: 1px solid #5284b0">
<el-table <el-table
:data="data.tableData" :data="data.tableData"
height='500px' height="500px"
:header-cell-style="{ background: 'rgba(0, 143, 205, 0.63)' }" :header-cell-style="{ background: 'rgba(0, 143, 205, 0.63)' }"
@row-click="handleRowClick" @row-click="handleRowClick"
stripe stripe
@ -57,8 +57,7 @@
:width="item.width || ''" :width="item.width || ''"
:align="item.align || 'center'" :align="item.align || 'center'"
> >
<template #default="scope"> <template #default="scope"> </template>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-else v-else
@ -75,9 +74,9 @@
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script setup> <script setup>
import { import {
onMounted, onMounted,
onBeforeMount, onBeforeMount,
reactive, reactive,
@ -86,15 +85,15 @@
defineProps, defineProps,
watch, watch,
nextTick, nextTick,
} from "vue"; } from "vue";
import { CircleCloseFilled } from "@element-plus/icons-vue"; import { CircleCloseFilled } from "@element-plus/icons-vue";
import { useRouter, useRoute } from "vue-router"; import { useRouter, useRoute } from "vue-router";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import http from "@/utils/request.js"; import http from "@/utils/request.js";
const router = useRouter(); const router = useRouter();
const routers = useRoute(); const routers = useRoute();
const props = defineProps({ const props = defineProps({
dialogShow: { dialogShow: {
type: Boolean, type: Boolean,
default: () => { default: () => {
@ -126,71 +125,78 @@
return ""; return "";
}, },
}, },
}); });
const emit = defineEmits(["close",'showList']); const emit = defineEmits(["close", "showList"]);
const handleRowClick = (row, column, event) => { const handleRowClick = (row, column, event) => {
emit("showList", row); emit("showList", row);
}; };
// //
const dialogShow = ref(); const dialogShow = ref();
const data = reactive({ const data = reactive({
title: "", title: "",
columns: [], columns: [],
tableData: [], tableData: [],
}); });
const gridData = [];
const gridData = []; //
// //
// watch(
watch(
() => props.dialogShow, () => props.dialogShow,
(newVal, oldVal) => { (newVal, oldVal) => {
dialogShow.value = newVal; dialogShow.value = newVal;
} }
); );
watch( watch(
() => props.tableData, () => props.tableData,
(newVal, oldVal) => { (newVal, oldVal) => {
data.tableData = props.tableData;
data.tableData = data.tableData.map(item => {
if (item.sendTime) {
const [date, time] = item.sendTime.split('T'); //
item.sendTime = `${date} ${time.slice(0, 5)}`; //
} }
); return item;
});
console.log(555, props.tableData);
}
);
// 使 // 使
onMounted(() => { onMounted(() => {
dialogShow.value = props.dialogShow; dialogShow.value = props.dialogShow;
data.title = props.title; data.title = props.title;
data.columns = props.columns; data.columns = props.columns;
}); data.tableData = props.tableData;
});
const closeDialog = () => { const closeDialog = () => {
dialogShow.value = false; dialogShow.value = false;
emit("close"); emit("close");
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(.el-dialog) { :deep(.el-dialog) {
--el-dialog-bg-color: none; --el-dialog-bg-color: none;
--el-dialog-width: 76% !important; --el-dialog-width: 76% !important;
} }
.my-header { .my-header {
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
} }
// .backgroundVirtual { // .backgroundVirtual {
// position: absolute; // position: absolute;
// top: 0; // top: 0;
// width: 100%; // width: 100%;
// height: 79px; // height: 79px;
// box-shadow: inset 0px 0px 55px 0px rgba(173, 221, 255, 1); // box-shadow: inset 0px 0px 55px 0px rgba(173, 221, 255, 1);
// z-index: 99; // z-index: 99;
// } // }
.tabelPart { .tabelPart {
height: 600px; height: 600px;
padding: 16px 110px 32px 110px; padding: 16px 110px 32px 110px;
background: linear-gradient( background: linear-gradient(
@ -382,6 +388,5 @@
// :deep(.el-table th) { // :deep(.el-table th) {
// text-align: center; // text-align: center;
// } // }
} }
</style> </style>

View File

@ -49,28 +49,47 @@
" "
> >
<div class="item"> <div class="item">
<div class="item_title">概况模型</div> <div class="item_title">
<div class="yd_title">
<span>概况模型</span>
<div class="semi-circle-shadow"></div>
<div class="animate-border">
<i></i>
<i></i>
</div>
</div>
</div>
<div class="item_content">{{ data.content.bz }}</div> <div class="item_content">{{ data.content.bz }}</div>
</div> </div>
<div class="item" style="margin-top: 20px"> <div class="item" style="margin-top: 20px">
<div class="item_title">详情描述</div> <div class="item_title">
<div class="yd_title">
<span>详情描述</span>
<div class="semi-circle-shadow"></div>
<div class="animate-border">
<i></i>
<i></i>
</div>
</div>
</div>
<div class="item_content item_contents"> <div class="item_content item_contents">
<div class="item_content_item"> <div class="item_content_item">
<div class="item_content_item_title">输入</div> <div class="item_content_item_title">输入:</div>
<div <div
class="item_content_item_content" class="item_content_item_content"
v-html="formatContent(data.content.srsj)" v-html="formatContent(data.content.srsj)"
></div> ></div>
</div> </div>
<div class="item_content_item"> <div class="item_content_item">
<div class="item_content_item_title">对比逻辑</div> <div class="item_content_item_title">对比逻辑:</div>
<div <div
class="item_content_item_content" class="item_content_item_content"
v-html="formatContent(data.content.bdlj)" v-html="formatContent(data.content.bdlj)"
></div> ></div>
</div> </div>
<div class="item_content_item"> <div class="item_content_item">
<div class="item_content_item_title">输出</div> <div class="item_content_item_title">输出:</div>
<div <div
class="item_content_item_content" class="item_content_item_content"
v-html="formatContent(data.content.scjg)" v-html="formatContent(data.content.scjg)"
@ -284,10 +303,15 @@ const handle = (current) => {
margin-bottom: 20px; margin-bottom: 20px;
box-sizing: border-box; box-sizing: border-box;
.item_content_item_title { .item_content_item_title {
width: 100px;
height: 30px;
line-height: 30px;
text-align: center;
background-color: #3287d2;
font-weight: 600; font-weight: 600;
font-size: 17px; font-size: 17px;
width: 100px;
margin-right: 10px; margin-right: 10px;
padding: 0 8px;
} }
.item_content_item_content { .item_content_item_content {
width: calc(100% - 110px); width: calc(100% - 110px);
@ -304,4 +328,168 @@ const handle = (current) => {
display: none; /* Chrome Safari */ display: none; /* Chrome Safari */
} }
} }
.yd_title {
box-sizing: border-box;
width: 98%;
height: 31px;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
justify-content: space-between;
span {
font-size: 23px;
font-weight: 500;
font-family: titleNore;
margin-left: 20px;
color: #fff;
position: relative;
z-index: 1;
width: 500px;
overflow: hidden; /* 超出一行文字自动隐藏 */
text-overflow: ellipsis; /*文字隐藏后添加省略号*/
white-space: nowrap;
}
/* 利用伪元素和两个i元素产生4条线 */
.animate-border {
position: absolute;
top: 0px;
width: 100%;
height: 100%;
&::before,
&::after {
content: "";
position: absolute;
width: 100%;
height: 2px;
}
i {
position: absolute;
display: inline-block;
height: 100%;
width: 2px;
}
&::before {
top: 0;
left: -100%;
background-image: linear-gradient(
90deg,
transparent,
#03e9f4,
transparent
);
animation: one 4s linear infinite;
}
i:nth-child(1) {
top: -100%;
right: 0;
background-image: linear-gradient(
180deg,
transparent,
#03e9f4,
transparent
);
/* 动画名称 动画持续时间 动画渲染函数 动画延迟时间 动画执行次数 */
animation: two 4s linear 1s infinite;
}
&::after {
bottom: 0;
right: -100%;
background-image: linear-gradient(
-90deg,
transparent,
#03e9f4,
transparent
);
animation: three 4s linear 2s infinite;
}
i:nth-child(2) {
bottom: -100%;
left: 0;
background-image: linear-gradient(
360deg,
transparent,
#03e9f4,
transparent
);
animation: four 4s linear 3s infinite;
}
}
.semi-circle-shadow {
position: absolute;
bottom: -5px;
left: -24px;
width: 22%;
height: 20px;
background: radial-gradient(
circle,
rgba(37, 127, 173, 1) 0%,
rgba(37, 127, 173, 0) 70%
);
border-radius: 50%;
z-index: 0;
}
}
.yd_title::before {
content: "";
width: 4px;
height: 4px;
background-color: rgba(0, 229, 255, 1);
border-radius: 50%;
position: absolute;
left: 0;
margin-left: 3px;
z-index: 2;
}
.yd_title::after {
content: "";
width: 90%;
height: 1px;
background: linear-gradient(to right, #257fad, rgba(37, 127, 173, 0));
position: absolute;
bottom: 0;
left: 0;
z-index: 0;
}
@keyframes one {
0% {
left: -100%;
}
50%,
100% {
left: 100%;
}
}
@keyframes two {
0% {
top: -100%;
}
50%,
100% {
top: 100%;
}
}
@keyframes three {
0% {
right: -100%;
}
50%,
100% {
right: 100%;
}
}
@keyframes four {
0% {
bottom: -100%;
}
50%,
100% {
bottom: 100%;
}
}
</style> </style>

View File

@ -32,12 +32,13 @@ const getOption = () => {
data.option = { data.option = {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
formatter: "{b0}<br />{a1}:{c1} <br />{a3}:{c3}", formatter: "{b0}<br />{a1}:{c1}",
// formatter: "{b0}<br />{a1}:{c1} <br />{a3}:{c3}",
}, },
legend: { legend: {
data: ["招生数", "报名数"], data: ["招生数", "报名数"],
top: "6%", top: "6%",
right: "35%", // right: "35%",
textStyle: { textStyle: {
fontSize: 16, fontSize: 16,
color: "#ffffff", color: "#ffffff",
@ -125,7 +126,7 @@ const getOption = () => {
symbolPosition: "end", symbolPosition: "end",
data: data.zss, data: data.zss,
symbol: "diamond", symbol: "diamond",
symbolOffset: ["-65%", "-50%"], symbolOffset: ["0%", "-50%"],
symbolSize: [20, 10], symbolSize: [20, 10],
itemStyle: { itemStyle: {
borderColor: "#2fffa4", borderColor: "#2fffa4",
@ -160,49 +161,49 @@ const getOption = () => {
}, },
}, },
}, },
{ // {
z: 2, // z: 2,
name: "上部1", // name: "1",
type: "pictorialBar", // type: "pictorialBar",
symbolPosition: "end", // symbolPosition: "end",
data: data.bms, // data: data.bms,
symbol: "diamond", // symbol: "diamond",
symbolOffset: ["62%", "-50%"], // symbolOffset: ["62%", "-50%"],
symbolSize: [20, 10], // symbolSize: [20, 10],
itemStyle: { // itemStyle: {
borderColor: "#32ffee", // borderColor: "#32ffee",
color: "rgba(23, 237, 255, 1)", // color: "rgba(23, 237, 255, 1)",
}, // },
}, // },
{ // {
z: 2, // z: 2,
name: "报名数", // name: "",
type: "bar", // type: "bar",
barGap: 0.3 /*多个并排柱子设置柱子之间的间距*/, // barGap: 0.3 /**/,
data: data.bms, // data: data.bms,
barWidth: "30%", // barWidth: "30%",
label: { // label: {
show: true, // show: true,
color: "#ffffff", // color: "#ffffff",
position: "top", // position: "top",
}, // },
itemStyle: { // itemStyle: {
color: { // color: {
type: "linear", // type: "linear",
x: 0, // x: 0,
x2: 1, // x2: 1,
y: 0, // y: 0,
y2: 0, // y2: 0,
colorStops: [ // colorStops: [
{ offset: 0, color: "rgba(23, 237, 255, .7)" }, // { offset: 0, color: "rgba(23, 237, 255, .7)" },
{ offset: 0.5, color: "rgba(23, 237, 255, .7)" }, // { offset: 0.5, color: "rgba(23, 237, 255, .7)" },
{ offset: 0.5, color: "rgba(23, 237, 255, .3)" }, // { offset: 0.5, color: "rgba(23, 237, 255, .3)" },
{ offset: 1, color: "rgba(23, 237, 255, .5)" }, // { offset: 1, color: "rgba(23, 237, 255, .5)" },
], // ],
}, // },
}, // },
}, // },
{ {
type: "bar", type: "bar",
xAxisIndex: 1, xAxisIndex: 1,

View File

@ -33,6 +33,7 @@
<div class="pagePart"> <div class="pagePart">
<el-pagination <el-pagination
size="small" size="small"
:pager-count="5"
class="mt-4" class="mt-4"
background background
layout="prev, pager, next" layout="prev, pager, next"
@ -102,6 +103,7 @@
class="mt-4" class="mt-4"
background background
layout="prev, pager, next" layout="prev, pager, next"
:pager-count="5"
:page-size="data.pagination1.pageSize" :page-size="data.pagination1.pageSize"
:total="data.pagination1.total" :total="data.pagination1.total"
:current-page="data.pagination1.current" :current-page="data.pagination1.current"
@ -261,13 +263,15 @@ const searchT = (val) => {
getRegisteredDB(); getRegisteredDB();
} else { } else {
if (search1.date == null) { if (search1.date == null) {
throttle(getDate, 50); search1.date = "";
throttle(getRegisteredDB, 50);
} else { } else {
getRegisteredDB(); getRegisteredDB();
console.log(search); console.log(search);
} }
} }
}; };
const searchT1 = (val) => { const searchT1 = (val) => {
// console.log(val); // console.log(val);
// if (val == "name") { // if (val == "name") {

View File

@ -448,7 +448,7 @@ const push = reactive({
columns: [ columns: [
{ {
label: "序号", label: "序号",
property: "xm", property: "index",
width: "90", width: "90",
}, },
{ {