This commit is contained in:
parent
0594060e1d
commit
031205d207
|
@ -1,7 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="dialogPage">
|
<div class="dialogPage">
|
||||||
<el-dialog v-model="dialogShow" width="80vw" :show-close="false" center :close-on-click-modal="false"
|
<el-dialog
|
||||||
:close-on-press-escape="false">
|
v-model="dialogShow"
|
||||||
|
width="80vw"
|
||||||
|
:show-close="false"
|
||||||
|
center
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
>
|
||||||
<template #header="{ close, titleId, titleClass }">
|
<template #header="{ close, titleId, titleClass }">
|
||||||
<div class="my-header">
|
<div class="my-header">
|
||||||
<el-icon size="26" color="#fff" @click="closeDialog">
|
<el-icon size="26" color="#fff" @click="closeDialog">
|
||||||
|
@ -14,15 +20,32 @@
|
||||||
<div class="bo">
|
<div class="bo">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="title_top">
|
<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>
|
<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>
|
</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>
|
</div>
|
||||||
<div style="width: 100%; height: calc(100% - 110px);">
|
<div style="width: 100%; height: calc(100% - 110px)">
|
||||||
<el-table :data="data.tableData" height="100%" :header-cell-style="{ background: '#008FCD' }">
|
<el-table
|
||||||
|
:data="data.tableData"
|
||||||
|
height="100%"
|
||||||
|
:header-cell-style="{ background: '#008FCD' }"
|
||||||
|
:key="tableKey"
|
||||||
|
>
|
||||||
<!-- <el-table-column
|
<!-- <el-table-column
|
||||||
v-for="(item, index) in data.columns"
|
v-for="(item, index) in data.columns"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -32,22 +55,45 @@
|
||||||
align="center"
|
align="center"
|
||||||
/> -->
|
/> -->
|
||||||
<template v-for="item in data.columns">
|
<template v-for="item in data.columns">
|
||||||
<el-table-column :key="item.label" v-if="item.type === 'slot'" :width="item.width" :label="item.label"
|
<el-table-column
|
||||||
:property="item.property" align="center">
|
:key="item.label"
|
||||||
|
v-if="item.type === 'slot'"
|
||||||
|
:width="item.width"
|
||||||
|
:label="item.label"
|
||||||
|
:property="item.property"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<slot :name="item.property" :currentCol="item" :currentData="scope.row"></slot>
|
<slot
|
||||||
|
:name="item.property"
|
||||||
|
:currentCol="item"
|
||||||
|
:currentData="scope.row"
|
||||||
|
></slot>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :key="item.label" :property="item.property" :label="item.label" :width="item.width"
|
<el-table-column
|
||||||
align="center" v-else />
|
:key="item.label"
|
||||||
|
:property="item.property"
|
||||||
|
:label="item.label"
|
||||||
|
:width="item.width"
|
||||||
|
align="center"
|
||||||
|
v-else
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pagePart">
|
<div class="pagePart">
|
||||||
<el-pagination background layout="prev, pager, next" :page-size="pagination.pageSize"
|
<el-pagination
|
||||||
:total="pagination.total" prev-text="上一页" next-text="下一页" @current-change="handle"
|
background
|
||||||
v-model:current-page="pagination.currentPage" />
|
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>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -61,9 +107,9 @@ import {
|
||||||
onBeforeMount,
|
onBeforeMount,
|
||||||
defineProps,
|
defineProps,
|
||||||
watch,
|
watch,
|
||||||
|
nextTick,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { CircleCloseFilled } from "@element-plus/icons-vue";
|
import { CircleCloseFilled } from "@element-plus/icons-vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -106,7 +152,9 @@ const data = reactive({
|
||||||
});
|
});
|
||||||
|
|
||||||
const gridData = [];
|
const gridData = [];
|
||||||
|
//切换页数后置顶
|
||||||
|
const tableKey = ref(Math.random())
|
||||||
|
// 监听
|
||||||
watch(
|
watch(
|
||||||
() => props.dialogShow,
|
() => props.dialogShow,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
|
@ -116,10 +164,11 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
watch(
|
watch(
|
||||||
() => props.tableData,
|
() => props.tableData,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
data.tableData = props.tableData;
|
data.tableData = props.tableData;
|
||||||
}
|
tableKey.value = Math.random()
|
||||||
|
}
|
||||||
);
|
);
|
||||||
// 使用生命钩子
|
// 使用生命钩子
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -151,18 +200,25 @@ const handle = (current) => {
|
||||||
.tabelPart {
|
.tabelPart {
|
||||||
height: 80vh;
|
height: 80vh;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
background: linear-gradient(270deg,
|
background: linear-gradient(
|
||||||
|
270deg,
|
||||||
rgba(0, 77, 131, 0.69) 0%,
|
rgba(0, 77, 131, 0.69) 0%,
|
||||||
rgba(0, 51, 83, 0.77) 50%,
|
rgba(0, 51, 83, 0.77) 50%,
|
||||||
rgba(0, 77, 131, 0.74) 100%),
|
rgba(0, 77, 131, 0.74) 100%
|
||||||
radial-gradient(66% 40% at 50% 0%,
|
),
|
||||||
|
radial-gradient(
|
||||||
|
66% 40% at 50% 0%,
|
||||||
rgba(1, 150, 243, 0.55) 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);
|
box-shadow: inset 0px 0px 56px 0px rgba(100, 191, 255, 0.5);
|
||||||
border: 2px solid;
|
border: 2px solid;
|
||||||
border-image: linear-gradient(180deg,
|
border-image: linear-gradient(
|
||||||
|
180deg,
|
||||||
rgba(21, 150, 255, 1),
|
rgba(21, 150, 255, 1),
|
||||||
rgba(0, 157, 227, 0)) 2 2;
|
rgba(0, 157, 227, 0)
|
||||||
|
)
|
||||||
|
2 2;
|
||||||
|
|
||||||
:deep(.el-table) {
|
:deep(.el-table) {
|
||||||
--el-table-bg-color: none;
|
--el-table-bg-color: none;
|
||||||
|
|
Loading…
Reference in New Issue