Browse Source

Merge pull request 'dev-xjf' (#53) from dev-xjf into master

Reviewed-on: http://120.26.116.243:3000/root/alert-front/pulls/53
YKS
xiaojinfei 2 weeks ago
parent
commit
63a1fe18f2
  1. BIN
      src/assets/111.gif
  2. 3
      src/views/dashboard/demo/components/ParameterInfo.vue
  3. 9
      src/views/dashboard/demo/components/ProjectCard.vue
  4. 4
      src/views/dashboard/demo/components/staticImg.vue
  5. 16
      src/views/dashboard/demo/index.vue

BIN
src/assets/111.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

3
src/views/dashboard/demo/components/ParameterInfo.vue

@ -26,7 +26,6 @@ const [registerTable, { setTableData }] = useTable({
dataSource: [],
rowKey: 'ID',
size: 'small',
immediate: false,
columns: props.data.Columns,
useSearchForm: false,
@ -75,7 +74,7 @@ onBeforeUpdate(async () => {
更多
</a-button>
</template> -->
<BasicTable @register="registerTable">
<BasicTable style="min-height:30vh" @register="registerTable">
<template #threshold="{ record }">
<span>{{ getInterval(record) }}</span>
</template>

9
src/views/dashboard/demo/components/ProjectCard.vue

@ -44,15 +44,16 @@ onMounted(async () => {
</a-button>
</template>
<CardGrid v-for="item in gridData" :key="item.Point" :class="{ 'bg-[#990000] bg-opacity-50': item.ifColor }" class="!h-1/3 !w-full !md:w-1/4">
<CardGrid v-for="item in gridData" :key="item.Point" :class="{ 'bg-[#990000] bg-opacity-50': item.ifColor }" class="flex flex-col items-center justify-center !h-1/3 !w-full !md:w-1/4">
<!-- <Icon :icon="item.icon" :color="item.color" size="30" /> -->
<div class="flex flex-col items-center">
<div class="flex flex-col items-center justify-center">
<div class="text-center text-base">
{{ item.FaultDesc }}
</div>
<div class="text-secondary mt-1 h-10 flex">
<!-- <div class="text-secondary mt-1 h-10 flex">
{{ item.Point }}
</div>
</div> -->
</div>
<!-- <div class="text-secondary flex justify-between">
<span>{{ item.group }}</span>

4
src/views/dashboard/demo/components/staticImg.vue

@ -1,5 +1,6 @@
<script lang="ts" setup>
import { Card, CardGrid } from 'ant-design-vue'
const props = defineProps({
data: {
type: Object,
@ -9,12 +10,13 @@ const props = defineProps({
const imgUrl = getAssetsFile(props.data.path)
// ../assets/imgs
function getAssetsFile(url: string) {
console.log(url)
return new URL(`../../../../assets/${url}`, import.meta.url).href
}
</script>
<template>
<Card class="enter-y !my-1" :title="props.data.Header">
<img class="mx-auto h-50 w-full" :src="imgUrl">
<img class="mx-auto h-70 w-full" :src="imgUrl">
</Card>
</template>

16
src/views/dashboard/demo/index.vue

@ -57,19 +57,19 @@ onBeforeMount(async () => {
<template>
<PageWrapper v-if="id != null && id !== undefined" class="m-1">
<template #headerContent>
<!-- <template #headerContent>
<WorkbenchHeader class="m-1" :data="data" />
</template>
<div class="bg-[#f5f5f5]">
<div class="enter-y h-95 md:flex">
</template> -->
<div class="h-[calc(91vh)] bg-[#f5f5f5]">
<div class="enter-y h-[calc(91vh/2)] md:flex">
<StaticImg class="m-1 w-full md:w-1/4" :loading="loading" :data="data.LeftUp" />
<ProjectCard class="enter-y m-1 w-full md:w-1/2" :loading="loading" :data="data.LeftMidUp" />
<div class="enter-y w-full md:w-1/4">
<DynamicInfo :loading="loading" class="enter-y m-1 h-35 w-full" :data="data.RightMidUp" />
<Operation class="enter-y m-1 h-57 w-full" :loading="loading" :data="data.RightUp" />
<div class="enter-y h-[calc(91vh/2)] w-full md:w-1/4">
<DynamicInfo :loading="loading" class="enter-y m-1 h-[calc(17vh)] w-full" :data="data.RightMidUp" />
<Operation class="enter-y m-1 h-[calc(27vh)] w-full" :loading="loading" :data="data.RightUp" />
</div>
</div>
<div class="enter-y h-98 md:flex">
<div class="enter-y h-[calc(91vh/2)] md:flex">
<StaticImg class="m-1 w-full md:w-1/2" :loading="loading" :data="data.LeftDown" />
<ParameterInfo class="m-1 w-full md:w-1/2" :loading="loading" :data="data.RightDown" />
</div>

Loading…
Cancel
Save