You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
3.4 KiB

2 years ago
<template>
<div class="Basic-box" ref="basic">
2 years ago
<el-table
:data="tableData"
v-loading="load1"
element-loading-text="加载中..."
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
:height="height"
2 years ago
stripe
style="width: 100%; background-color: transparent"
>
<el-table-column
v-for="(item, index) in tableHeader1"
:key="index"
:prop="item.prop"
:label="item.label"
:width="item.width || ''"
show-overflow-tooltip
align="center"
>
2 years ago
</el-table-column>
</el-table>
<div ref="pagination">
<Pagination
:total="total"
:page="query.current"
:limit="query.size"
@pagination="changeList"
></Pagination>
</div>
2 years ago
</div>
</template>
<script>
2 years ago
import { getDrugChange } from "@/api/largeScreen";
import Pagination from "@/views/components/Pagination";
2 years ago
export default {
2 years ago
name: "Basicbox",
components: { Pagination },
2 years ago
data() {
return {
2 years ago
tableHeader1: [
{
prop: "bgxm",
label: "变更项目",
// width: "100",
},
{
prop: "bgsx",
label: "变更事项",
},
{
prop: "bgsj",
label: "变更时间",
// width: "100",
},
],
// tableHeader2: [
// {
// prop: "bgxm",
// label: "变更内容",
// },
// {
// prop: "bgsj",
// label: "变更时间",
// },
// ],
tableData: [],
query: {
current: 1,
2 years ago
size: 10,
2 years ago
name: "",
2 years ago
},
2 years ago
total: 0,
load1: false,
height: 0,
2 years ago
};
2 years ago
},
2 years ago
created() {},
mounted() {
this.$nextTick(() => {
this.height =
this.$refs.basic.offsetHeight - this.$refs.pagination.offsetHeight;
});
2 years ago
this.getList();
},
methods: {
getList() {
2 years ago
let newRouter = this.$route.query;
this.query.name = newRouter.code;
2 years ago
this.load1 = true;
getDrugChange(this.query).then((res) => {
this.tableData = res.data.records;
this.total = res.data.total;
this.load1 = false;
});
},
changeList(e) {
this.query.current = e.page;
this.query.size = e.limit;
this.getList();
},
},
computed: {},
};
2 years ago
</script>
<style scoped lang='scss'>
.Basic-box {
margin-top: 10px;
max-width: 100%;
height: calc(100% - 41px - 10px);
2 years ago
// padding: 0 11px 11px 11px;
2 years ago
overflow-y: auto;
2 years ago
background-color: transparent;
2 years ago
}
2 years ago
::v-deep .el-table,
.el-table__expanded-cell {
background-color: transparent;
2 years ago
}
::v-deep .el-table th {
2 years ago
background-color: rgba(0, 100, 255, 0.2) !important;
color: #2492ff;
border: none;
2 years ago
}
::v-deep .el-table td {
border: none;
}
::v-deep .el-table::before {
height: 0px;
}
::v-deep .el-table tr {
2 years ago
background-color: transparent !important;
color: #b7d4f5;
2 years ago
}
::v-deep .el-table tbody tr:hover td {
2 years ago
background-color: transparent !important;
2 years ago
}
2 years ago
::v-deep .el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell {
2 years ago
border: none;
}
// 显示的颜色
2 years ago
::v-deep .el-table .el-table__body tr.el-table__row--striped td {
background-color: rgba(0, 50, 150, 0.1) !important;
}
2 years ago
</style>