This commit is contained in:
姚宇浩 2024-05-29 11:00:07 +08:00
parent 0594060e1d
commit 031205d207
1 changed files with 83 additions and 27 deletions

View File

@ -1,7 +1,13 @@
<template>
<div class="dialogPage">
<el-dialog v-model="dialogShow" width="80vw" :show-close="false" center :close-on-click-modal="false"
:close-on-press-escape="false">
<el-dialog
v-model="dialogShow"
width="80vw"
:show-close="false"
center
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<template #header="{ close, titleId, titleClass }">
<div class="my-header">
<el-icon size="26" color="#fff" @click="closeDialog">
@ -14,15 +20,32 @@
<div class="bo">
<div class="title">
<div class="title_top">
<img src="@/assets/images/table_l.png" alt="" style="margin-right:10px;" />
<img
src="@/assets/images/table_l.png"
alt=""
style="margin-right: 10px"
/>
<div class="name">{{ title }}详情</div>
<img src="@/assets/images/table_r.png" alt="" style="margin-left:10px;" />
<img
src="@/assets/images/table_r.png"
alt=""
style="margin-left: 10px"
/>
</div>
<img class="title_botton" src="@/assets/images/table_c.png" alt="" />
<img
class="title_botton"
src="@/assets/images/table_c.png"
alt=""
/>
</div>
</div>
<div style="width: 100%; height: calc(100% - 110px);">
<el-table :data="data.tableData" height="100%" :header-cell-style="{ background: '#008FCD' }">
<div style="width: 100%; height: calc(100% - 110px)">
<el-table
:data="data.tableData"
height="100%"
:header-cell-style="{ background: '#008FCD' }"
:key="tableKey"
>
<!-- <el-table-column
v-for="(item, index) in data.columns"
:key="index"
@ -32,22 +55,45 @@
align="center"
/> -->
<template v-for="item in data.columns">
<el-table-column :key="item.label" v-if="item.type === 'slot'" :width="item.width" :label="item.label"
:property="item.property" align="center">
<el-table-column
:key="item.label"
v-if="item.type === 'slot'"
:width="item.width"
:label="item.label"
:property="item.property"
align="center"
>
<template #default="scope">
<slot :name="item.property" :currentCol="item" :currentData="scope.row"></slot>
<slot
:name="item.property"
:currentCol="item"
:currentData="scope.row"
></slot>
</template>
</el-table-column>
<el-table-column :key="item.label" :property="item.property" :label="item.label" :width="item.width"
align="center" v-else />
<el-table-column
:key="item.label"
:property="item.property"
:label="item.label"
:width="item.width"
align="center"
v-else
/>
</template>
</el-table>
</div>
<div class="pagePart">
<el-pagination background layout="prev, pager, next" :page-size="pagination.pageSize"
:total="pagination.total" prev-text="上一页" next-text="下一页" @current-change="handle"
v-model:current-page="pagination.currentPage" />
<el-pagination
background
layout="prev, pager, next"
:page-size="pagination.pageSize"
:total="pagination.total"
prev-text="上一页"
next-text="下一页"
@current-change="handle"
v-model:current-page="pagination.currentPage"
/>
</div>
</div>
</el-dialog>
@ -61,9 +107,9 @@ import {
onBeforeMount,
defineProps,
watch,
nextTick,
} from "vue";
import { CircleCloseFilled } from "@element-plus/icons-vue";
const props = defineProps({
dialogShow: {
type: Boolean,
@ -106,7 +152,9 @@ const data = reactive({
});
const gridData = [];
//
const tableKey = ref(Math.random())
//
watch(
() => props.dialogShow,
(newVal, oldVal) => {
@ -119,6 +167,7 @@ watch(
() => props.tableData,
(newVal, oldVal) => {
data.tableData = props.tableData;
tableKey.value = Math.random()
}
);
// 使
@ -151,18 +200,25 @@ const handle = (current) => {
.tabelPart {
height: 80vh;
padding: 16px;
background: linear-gradient(270deg,
background: linear-gradient(
270deg,
rgba(0, 77, 131, 0.69) 0%,
rgba(0, 51, 83, 0.77) 50%,
rgba(0, 77, 131, 0.74) 100%),
radial-gradient(66% 40% at 50% 0%,
rgba(0, 77, 131, 0.74) 100%
),
radial-gradient(
66% 40% at 50% 0%,
rgba(1, 150, 243, 0.55) 0%,
rgba(0, 116, 255, 0) 100%);
rgba(0, 116, 255, 0) 100%
);
box-shadow: inset 0px 0px 56px 0px rgba(100, 191, 255, 0.5);
border: 2px solid;
border-image: linear-gradient(180deg,
border-image: linear-gradient(
180deg,
rgba(21, 150, 255, 1),
rgba(0, 157, 227, 0)) 2 2;
rgba(0, 157, 227, 0)
)
2 2;
:deep(.el-table) {
--el-table-bg-color: none;