提交 bb4d1f54 authored 作者: liujiaxing's avatar liujiaxing

提交图表问题

上级 da6185af
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<h3 class="section-title">{{ props.slogan }}</h3> <h3 class="section-title">{{ props.slogan }}</h3>
<div class="divider-line"></div> <div class="divider-line"></div>
</div> </div>
<!-- 标题文本 -->
<div class="hot-title"> <div class="hot-title">
<div class="hot-title-text">{{ props.title }}</div> <div class="hot-title-text">{{ props.title }}</div>
<div class="hot-title-enlarge"> <div class="hot-title-enlarge">
...@@ -56,6 +57,7 @@ const props = defineProps({ ...@@ -56,6 +57,7 @@ const props = defineProps({
}) })
console.log(props.data, '热力图数据')
console.log(props.legendName[0], 'props.legendName') console.log(props.legendName[0], 'props.legendName')
const componentProps = ref({}) const componentProps = ref({})
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
</svg> </svg>
</div> </div>
</div> </div>
<!-- 核心数据指标 --> <!-- 核心数据指标 判断一个图表中是否有多个曲线-->
<div class="container"> <!-- <div class="container" v-if="!props.lineArray">
<div class="flex-box flex-left"> <div class="flex-box flex-left">
<instantCurve :idName="`instant-left-${props.allIdName}`" :data="props.data[0]" <instantCurve :idName="`instant-left-${props.allIdName}`" :data="props.data[0]"
:legendName="props.legendName[0]" :propsDate="componentProps"></instantCurve> :legendName="props.legendName[0]" :propsDate="componentProps"></instantCurve>
...@@ -30,7 +30,15 @@ ...@@ -30,7 +30,15 @@
<instantCurve :idName="`instant-right-${props.allIdName}`" :data="props.data[1]" color="#6ffcba" <instantCurve :idName="`instant-right-${props.allIdName}`" :data="props.data[1]" color="#6ffcba"
:legendName="props.legendName[1]" :isShowDetail="true"></instantCurve> :legendName="props.legendName[1]" :isShowDetail="true"></instantCurve>
</div> </div>
</div> -->
<div class="container" v-if="props.lineArray">
<div>5555</div>
<div class="flex-box">
<instantCurve :lineArray="props.lineArray" :data="props.data" :legendName="props.legendName"
:propsDate="componentProps" :color="colorList"></instantCurve>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -58,11 +66,16 @@ const props = defineProps({ ...@@ -58,11 +66,16 @@ const props = defineProps({
zoomHeight: { zoomHeight: {
type: String, type: String,
default: null default: null
},
lineArray: {
type: Boolean,
default: false
} }
}); });
const colorList = ["#6ffcba", "#5470c6"]//同一个图标中不同曲线的颜色设置
setTimeout(() => {
console.log('瞬时值曲线', props.data) console.log('瞬时值曲线', props.lineArray)
}, 2000);
const componentProps = ref({}) const componentProps = ref({})
</script> </script>
......
<template> <template>
<!-- 大屏配置-模版列表 -->
<div class="templateCase_right_content"> <div class="templateCase_right_content">
<!-- 模版名称修改 -->
<div class="templateCase_right_content_header"> <div class="templateCase_right_content_header">
<div class="templateCase_right_content_header_item"> <div class="templateCase_right_content_header_item">
<!-- <span>模板名称</span> -->
<input ref="inputRef" class="templateName" v-model="templateName" :disabled="!isEdit"></input> <input ref="inputRef" class="templateName" v-model="templateName" :disabled="!isEdit"></input>
<img src="@/assets/images/headers/case_header.png" alt="" title="编辑" <img src="@/assets/images/headers/case_header.png" alt="" title="编辑"
style="width: 20px; height: 20px;cursor: pointer;" @click="handleEdit"> style="width: 20px; height: 20px;cursor: pointer;" @click="handleEdit">
......
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
<div class="equipment-content"> <div class="equipment-content">
<!-- 下拉选择器区域 --> <!-- 下拉选择器区域 -->
<div class="selector-container"> <div class="selector-container">
<div class="selector-item"> <div class="selector-item">
<label class="selector-label">{{ keliSelector.label }}</label> <label class="selector-label">{{ keliSelector.label }}</label>
<div class="custom-select"> <div class="custom-select">
...@@ -80,24 +79,25 @@ ...@@ -80,24 +79,25 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 弹框中展示两种 -->
<div class="content-item" style="height: 480px;"> <div class="content-item" style="height: 480px;">
<!-- <KeepAlive> --> <!-- <KeepAlive> -->
<component :is="currentComponent1" :data="[capacityData, trafficData]" :title="titles[0]" slogan="容量/流量" <component :is="currentComponent1" :data="[capacityData, trafficData]" :title="titles[0]" slogan="容量/流量"
:legendName="['链路层容量', '用户实际流量']"> :legendName="['链路层容量', '用户实际流量']" :lineArray="true">
</component> </component>
<!-- </KeepAlive> --> <!-- </KeepAlive> -->
<!-- <KeepAlive> --> <!-- <KeepAlive> -->
<component :is="currentComponent2" :data="[availabilityData, actualAvailabilityData]" :title="titles[1]" <component :is="currentComponent2" :data="[availabilityData, actualAvailabilityData]" :title="titles[1]"
slogan="可用性" :legendName="['规划可用性', '实际可用性']"> slogan="可用性" :legendName="['规划可用性', '实际可用性']" :lineArray="false">
</component> </component>
<!-- </KeepAlive> --> <!-- </KeepAlive> -->
<!-- <KeepAlive> --> <!-- <KeepAlive> -->
<component :is="currentComponent3" :data="[delayData, lossRateData]" :title="titles[2]" slogan="网络时延/丢包" <component :is="currentComponent3" :data="[delayData, lossRateData]" :title="titles[2]" slogan="网络时延/丢包"
:legendName="['搜星时延', '丢包率']"> :legendName="['搜星时延', '丢包率']" :lineArray="true">
</component> </component>
<!-- </KeepAlive> --> <!-- </KeepAlive> -->
...@@ -256,6 +256,8 @@ const handleDelete = () => { ...@@ -256,6 +256,8 @@ const handleDelete = () => {
}) })
return return
} }
console.log(currentSettingConfig.value, '删除信息', templateCaseList.value);
ElMessageBox.confirm( ElMessageBox.confirm(
`您确定删除 [${currentSettingConfig.value.templateName}] ?`, `您确定删除 [${currentSettingConfig.value.templateName}] ?`,
'Warning', 'Warning',
...@@ -266,6 +268,15 @@ const handleDelete = () => { ...@@ -266,6 +268,15 @@ const handleDelete = () => {
} }
) )
.then(async () => { .then(async () => {
//判断是新加的模版还是接口返回的模版
if (currentSettingConfig.value.templateAdd) {
templateCaseList.value = templateCaseList.value.filter(it => it.templateId != currentSettingConfig.value.templateId)
ElMessage({
type: 'success',
message: '删除成功',
})
return
}
const ret = await templateDel({ const ret = await templateDel({
templateId: currentSettingConfig.value.templateId // 模板id templateId: currentSettingConfig.value.templateId // 模板id
}) })
...@@ -432,7 +443,7 @@ const childrenOnChange = (item) => { ...@@ -432,7 +443,7 @@ const childrenOnChange = (item) => {
} }
watch(() => keliSelector.value.value, keliOnChange) watch(() => keliSelector.value.value, keliOnChange)
// 模版列表--确认
const handleApply = async () => { const handleApply = async () => {
let ret = null let ret = null
Loading.show() Loading.show()
...@@ -692,7 +703,7 @@ const calculateConfig = (selectedTemplate = currentSettingConfig.value) => { ...@@ -692,7 +703,7 @@ const calculateConfig = (selectedTemplate = currentSettingConfig.value) => {
} }
.logo_right { .logo_right {
width: 70%; width: 80%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -774,6 +785,7 @@ const calculateConfig = (selectedTemplate = currentSettingConfig.value) => { ...@@ -774,6 +785,7 @@ const calculateConfig = (selectedTemplate = currentSettingConfig.value) => {
border-radius: 8px; border-radius: 8px;
padding: 5px 15px; padding: 5px 15px;
} }
.equipment-content { .equipment-content {
height: 600px; height: 600px;
} }
...@@ -1096,4 +1108,13 @@ const calculateConfig = (selectedTemplate = currentSettingConfig.value) => { ...@@ -1096,4 +1108,13 @@ const calculateConfig = (selectedTemplate = currentSettingConfig.value) => {
.select-dropdown::-webkit-scrollbar-thumb:hover { .select-dropdown::-webkit-scrollbar-thumb:hover {
background: #64748b; background: #64748b;
} }
/* 下拉框禁止和正常的文字颜色 */
:deep(.custom-select .el-select__wrapper) .el-select__placeholder {
color: #ffffff;
}
:deep(.custom-select .el-select__wrapper.is-disabled) .el-select__placeholder {
color: #cccccc91 !important;
}
</style> </style>
\ No newline at end of file
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
</div> </div>
</div> </div>
<el-dialog v-model="screenConfigeDialogVisible" :destroy-on-close="false" :modal="false" :show-close="false" <el-dialog v-model="screenConfigeDialogVisible" :destroy-on-close="false" modal-class="dialogModel" :modal="true"
:before-close="handleScreenConfigeClose" :show-close="false" :before-close="handleScreenConfigeClose"
style="background-color: rgba(0, 0, 0,0);padding: 0;margin: 0;z-index: 999;"> style="background-color: rgba(0, 0, 0,0);padding: 0;margin: 0;z-index: 999;">
<screenConfige @handleScreenConfigeClose="handleScreenConfigeClose"></screenConfige> <screenConfige @handleScreenConfigeClose="handleScreenConfigeClose"></screenConfige>
<!-- <div style="width: 100px;height: 100px;background-color: blueviolet;"></div> --> <!-- <div style="width: 100px;height: 100px;background-color: blueviolet;"></div> -->
...@@ -586,6 +586,31 @@ const initChartData = async () => { ...@@ -586,6 +586,31 @@ const initChartData = async () => {
color: rgba(255, 255, 255, 0.8); color: rgba(255, 255, 255, 0.8);
} }
/* 弹框遮罩层 */
:deep().dialogModel {
background-color: rgba(0, 0, 0, 0.8);
}
:deep().dashboard-container {
border: 1px solid #cccccc2a;
}
:deep().dashboard-container::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
/* 透明边框 */
border-image: linear-gradient(to right, #263347, #3e73cc, #263347) 1;
/* 渐变边框 */
z-index: -1;
/* 确保伪元素在内容之下 */
}
/* 响应式设计 */ /* 响应式设计 */
@media (max-width: 1440px) { @media (max-width: 1440px) {
.platform-title { .platform-title {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论