dai 3 years ago
parent
commit
7ba5e66d07
  1. BIN
      src/assets/images/index/list-logo.png
  2. 197
      src/assets/scss/modules/board/listBox.scss
  3. 186
      src/assets/scss/modules/board/searchPerson copy.scss
  4. 1017
      src/views/modules/visual/basicinfo/basicInfoMain-备份.vue
  5. 258
      src/views/modules/visual/basicinfo/peopleList copy.vue
  6. 252
      src/views/modules/visual/basicinfo/peopleList.vue
  7. 263
      src/views/modules/visual/cpts/tb copy.vue
  8. 370
      src/views/modules/visual/cpts/tb.vue

BIN
src/assets/images/index/list-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

197
src/assets/scss/modules/board/listBox.scss

@ -0,0 +1,197 @@
.m-listbox-main{
min-height: 100%;
box-sizing: border-box;
margin-left:16px;
.g-listbox{
}
}
.div_search_list {
margin: 44px auto;
text-align: center;
width: 750px;
height: 53px;
background: #01106800;
border-radius: 8px;
display: flex;
justify-content: flex-end;
.icon {
display: flex;
align-items: center;
margin-left: 29px;
margin-top: 16px;
> img {
width: 24px;
height: 24px;
}
}
.btn {
text-align: center;
flex: 0 0 113px;
height: 53px;
background: #0082fb;
border-radius: 0px 8px 8px 0px;
font-size: 22px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 53px;
background: linear-gradient(90deg, #1a5afd, #26c4ff);
}
.btn:hover {
cursor: pointer;
}
}
.list_box1 {
margin: 76px auto 0;
box-sizing: border-box;
width: 80%;
// width: 1421px;
// height: calc(88vh - 200px);
height: 485px;
color: #fff;
background: url("../../../img/modules/visual/warning-box.png") no-repeat center;
background-size: 100% 100%;
}
.info_tip {
padding: 20px 0 0 19px;
display: flex;
> img {
height: 34px;
width: 46px;
}
.tip_title {
line-height: 34px;
margin-left: 7px;
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
color: #ffffff;
}
}
.warning-table {
margin: 21px 24px auto 24px;
box-sizing: border-box;
// height: 100%;
.table {
width: 100%;
height: 100%;
&-header {
width: 100%;
height: 50px;
display: flex;
justify-content: space-around;
align-items: center;
background: rgba(8, 37, 134, 0.85);
font-size: 16px;
font-weight: 400;
color: #ffffff;
}
&-body {
box-sizing: border-box;
width: 100%;
height: calc(100% - 50px);
font-size: 18px;
font-weight: 400;
color: #ffffff;
&-tr {
width: 100%;
height: 50px;
// height: calc(100% / 5);
// padding: 10px auto;
display: flex;
justify-content: space-around;
align-items: center;
.btn_detail:hover {
cursor: pointer;
}
}
&-tr:nth-child(2n) {
background: rgba(16, 75, 164, 0.24);
}
&-tr:hover {
background: url("../../../img/modules/visual/hover-bac.png") no-repeat center;
background-size: 100% 100%;
}
}
&-status {
margin-top: 20px;
.no-data {
display: flex;
justify-content: center;
}
}
}
}
.td {
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
// width: calc(100% / 5);
}
.td1 {
width: calc(100% / 10);
}
.td2 {
width: calc(100% / 6);
}
.td3 {
width: calc(100% / 4);
}
.pagination {
box-sizing: border-box;
padding-right: 180px;
padding-bottom: 20px;
margin-top: 40px;
width: 100%;
height: 40px;
display: flex;
justify-content: flex-end;
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background: #0266d1;
color: #000d3f;
}
/deep/ .el-pagination .el-pager li {
background: #002e74;
}
/deep/ .el-pagination .btn-prev {
background: #002e74;
}
/deep/ .el-pagination .btn-next {
background: #002e74;
}
}

186
src/assets/scss/modules/board/searchPerson copy.scss

@ -0,0 +1,186 @@
.div_people_search {
min-height: 100%;
box-sizing: border-box;
}
.div_search_list {
margin: 44px auto;
text-align: center;
width: 750px;
height: 53px;
background: #01106800;
border-radius: 8px;
display: flex;
justify-content: flex-end;
.icon {
display: flex;
align-items: center;
margin-left: 29px;
margin-top: 16px;
> img {
width: 24px;
height: 24px;
}
}
.btn {
text-align: center;
flex: 0 0 113px;
height: 53px;
background: #0082fb;
border-radius: 0px 8px 8px 0px;
font-size: 22px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 53px;
background: linear-gradient(90deg, #1a5afd, #26c4ff);
}
.btn:hover {
cursor: pointer;
}
}
.list_box {
margin: 76px auto 0;
box-sizing: border-box;
width: 80%;
// width: 1421px;
// height: calc(88vh - 200px);
height: 485px;
color: #fff;
background: url("../../../img/modules/visual/warning-box.png") no-repeat center;
background-size: 100% 100%;
}
.info_tip {
padding: 20px 0 0 19px;
display: flex;
> img {
height: 34px;
width: 46px;
}
.tip_title {
line-height: 34px;
margin-left: 7px;
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
color: #ffffff;
}
}
.warning-table {
margin: 21px 24px auto 24px;
box-sizing: border-box;
// height: 100%;
.table {
width: 100%;
height: 100%;
&-header {
width: 100%;
height: 50px;
display: flex;
justify-content: space-around;
align-items: center;
background: rgba(8, 37, 134, 0.85);
font-size: 16px;
font-weight: 400;
color: #ffffff;
}
&-body {
box-sizing: border-box;
width: 100%;
height: calc(100% - 50px);
font-size: 18px;
font-weight: 400;
color: #ffffff;
&-tr {
width: 100%;
height: 50px;
// height: calc(100% / 5);
// padding: 10px auto;
display: flex;
justify-content: space-around;
align-items: center;
.btn_detail:hover {
cursor: pointer;
}
}
&-tr:nth-child(2n) {
background: rgba(16, 75, 164, 0.24);
}
&-tr:hover {
background: url("../../../img/modules/visual/hover-bac.png") no-repeat center;
background-size: 100% 100%;
}
}
&-status {
margin-top: 20px;
.no-data {
display: flex;
justify-content: center;
}
}
}
}
.td {
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
// width: calc(100% / 5);
}
.td1 {
width: calc(100% / 10);
}
.td2 {
width: calc(100% / 6);
}
.td3 {
width: calc(100% / 4);
}
.pagination {
box-sizing: border-box;
padding-right: 180px;
padding-bottom: 20px;
margin-top: 40px;
width: 100%;
height: 40px;
display: flex;
justify-content: flex-end;
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background: #0266d1;
color: #000d3f;
}
/deep/ .el-pagination .el-pager li {
background: #002e74;
}
/deep/ .el-pagination .btn-prev {
background: #002e74;
}
/deep/ .el-pagination .btn-next {
background: #002e74;
}
}

1017
src/views/modules/visual/basicinfo/basicInfoMain-备份.vue

File diff suppressed because it is too large

258
src/views/modules/visual/basicinfo/peopleList copy.vue

@ -0,0 +1,258 @@
<template>
<div class="div_people_search">
<!-- 组织路由 -->
<div class="div_top g-bread">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item v-for="item in breadList"
:key="item.path"
:to="{ path: item.path }">
{{ item.meta.title }}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div>
<div class="list_box">
<div class="info_tip">
<img src="../../../../assets/img/shuju/title-tip.png"
alt />
<div class="tip_title">{{tableTitle}}</div>
</div>
<div class="warning-table">
<div class="table">
<div class="table-header">
<div class="td td1">序号</div>
<div class="td td1">姓名</div>
<div class="td td3">所属网格</div>
<div class="td td3">所属房屋</div>
<div class="td td2">手机</div>
<div class="td td3">身份证</div>
<div class="td td1">性别</div>
<div class="td td2">出生日期</div>
<div class="td td1">操作</div>
</div>
<div v-if="!loading && tableData.length> 0"
class="table-body">
<div class="table-body-tr"
v-for="(item,index) in tableData"
:key='index'>
<div class="td td1">{{item.sort}} </div>
<div class="td td1">{{item.name}} </div>
<div class="td td3">{{item.gridName}} </div>
<div class="td td3">{{item.neighborHoodName + item.buildNum}} </div>
<!-- <div class="td td1">{{item.buildNum}} </div> -->
<div class="td td2">{{item.mobile}} </div>
<div class="td td3">{{item.idCard}} </div>
<div class="td td1">{{item.gender}} </div>
<div class="td td2">{{item.birthday}} </div>
<div @click="handelToPeople(item)"
class="td td1 btn_detail">{{'查看'}} </div>
</div>
</div>
<div class="table-status"
v-if="loading">
<screen-loading>加载中</screen-loading>
</div>
<div class="table-status"
v-if="tableData.length == 0 && !loading">
<div class="no-data">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
</div>
<div class="pagination">
<el-pagination hide-on-single-page
background
layout="prev, pager, next, total"
:current-page="pageNo"
:page-size="pageSize"
:total="total"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
</div>
</div>
<!-- <people v-if="orgLevel==='people'"
:uid="selUserId"
ref="ref_people"></people> -->
<people-more v-show="showedMoreInfo"
v-if="info.userId"
:userId="info.userId"
:gridName="info.gridName"
@close="showedMoreInfo = false" />
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import People from "./people";
import ScreenLoading from "@/views/modules/visual/cpts/loading";
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
export default {
name: "people-list",
components: {
People, ScreenLoading, peopleMore
},
data () {
return {
showedMoreInfo: false,
tableTitle: '党员',
loading: false,
headerList: [],
tableData: [],
searchName: '',
pageSize: 10,
pageNo: 1,
total: 0,
orgLevel: 'search',
orgId: '',
selUserId: '',
//
runNum: 0,
runAgencyArray: [],
info: {},
breadList: []
};
},
activated () {
this.searchName = ''
this.tableData = []
const { columnName, label, id, level } = this.$route.query
this.orgLevel = level
this.orgId = id
this.searchName = columnName
this.tableTitle = label
this.loadList(id, level)
},
deactivated () {
this.orgLevel = ''
this.orgId = ''
this.pageNo = 1
},
beforeRouteEnter (to, from, next) {
const arr = [{ ...from }, { ...to, meta: { title: '人员列表' } }]
next((vm) => {
vm.breadList = [...arr]
})
},
methods: {
handleSearch () {
},
async loadList (id, level) {
this.loading = true
const url = "/epmetuser/icresiuser/searchbycategory"
let params = {
columnName: this.searchName,
id,
level,
pageSize: this.pageSize,
pageNo: this.pageNo
}
const { data, code, msg } = await requestPost(url, params)
this.loading = false
if (code === 0) {
this.total = data.total
this.tableData = data.list
} else {
this.$message.error(msg)
}
},
//
handelToPeople (item) {
// this.toSubAgency('people', this.tableData[index].userId)
this.info = { ...item }
this.showedMoreInfo = true
},
pageCurrentChangeHandle (val) {
this.pageNo = val
this.loadList(this.orgId, this.orgLevel)
},
},
destroyed () {
console.log("我已经离开了!");
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/basicInfoMain.scss"
scoped
></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/searchPerson.scss"
scoped
></style>
<style lang="scss" scoped>
.div_search_list {
.el-input__inner[WarningColor="warning"] {
border-radius: 8px 0 0 8px;
height: 53px;
background-color: #01106800;
border: 2px solid #0082fb;
padding-left: 70px;
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
}
}
.list_box {
width: 100%;
height: 780px;
margin: 0 auto;
}
.warning-table {
height: 640px;
}
.pagination {
padding-right: 0;
margin-top: 0;
text-align: right;
}
.g-bread {
padding: 10px 10px 15px;
::v-deep .el-breadcrumb__item {
font-size: 16px;
.el-breadcrumb__inner {
color: #fff;
}
}
::v-deep .el-breadcrumb__item:first-child {
.el-breadcrumb__inner {
color: #a0c3d9;
}
}
}
</style>

252
src/views/modules/visual/basicinfo/peopleList.vue

@ -1,93 +1,40 @@
<template>
<div class="div_people_search">
<div class="m-listbox-main">
<!-- 组织路由 -->
<div class="div_top g-bread">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item v-for="item in breadList" :key="item.path" :to="{ path: item.path }">
<el-breadcrumb-item v-for="item in breadList"
:key="item.path"
:to="{ path: item.path }">
{{ item.meta.title }}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div>
<div class="list_box">
<div class="info_tip">
<img src="../../../../assets/img/shuju/title-tip.png"
alt />
<div class="tip_title">{{tableTitle}}</div>
</div>
<div class="warning-table">
<div class="table">
<div class="table-header">
<div class="td td1">序号</div>
<div class="td td1">姓名</div>
<div class="td td3">所属网格</div>
<div class="td td3">所属房屋</div>
<div class="td td2">手机</div>
<div class="td td3">身份证</div>
<div class="td td1">性别</div>
<div class="td td2">出生日期</div>
<div class="td td1">操作</div>
</div>
<div v-if="!loading && tableData.length> 0"
class="table-body">
<div class="table-body-tr"
v-for="(item,index) in tableData"
:key='index'>
<div class="td td1">{{item.sort}} </div>
<div class="td td1">{{item.name}} </div>
<div class="td td3">{{item.gridName}} </div>
<div class="td td3">{{item.neighborHoodName + item.buildNum}} </div>
<!-- <div class="td td1">{{item.buildNum}} </div> -->
<div class="td td2">{{item.mobile}} </div>
<div class="td td3">{{item.idCard}} </div>
<div class="td td1">{{item.gender}} </div>
<div class="td td2">{{item.birthday}} </div>
<div @click="handelToPeople(item)"
class="td td1 btn_detail">{{'查看'}} </div>
</div>
</div>
<div class="table-status"
v-if="loading">
<screen-loading>加载中</screen-loading>
</div>
<div class="table-status"
v-if="tableData.length == 0 && !loading">
<div class="no-data">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
</div>
<div class="pagination">
<el-pagination hide-on-single-page background
layout="prev, pager, next, total"
:current-page="pageNo"
:page-size="pageSize"
:total="total"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
<div class="g-listbox">
<cpt-tb :titleName="'居民列表'"
:col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
:total="total"
@handleSizeChange="handleSizeChange"
@handlePageNoChange="handlePageNoChange"
@operate="toEventInfo"></cpt-tb>
</div>
</div>
<!-- <people v-if="orgLevel==='people'"
:uid="selUserId"
ref="ref_people"></people> -->
<people-more v-show="showedMoreInfo"
v-if="info.userId"
:userId="info.userId"
:gridName="info.gridName"
@close="showedMoreInfo = false" />
v-if="info.userId"
:userId="info.userId"
:gridName="info.gridName"
@close="showedMoreInfo = false" />
</div>
</template>
@ -97,37 +44,88 @@ import { requestPost } from "@/js/dai/request";
import People from "./people";
import ScreenLoading from "@/views/modules/visual/cpts/loading";
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
import cptTb from "@/views/modules/visual/cpts/tb";
export default {
name: "people-list",
components: {
People, ScreenLoading, peopleMore
People, ScreenLoading, peopleMore, cptTb
},
data () {
return {
showedMoreInfo: false,
tableTitle: '党员',
loading: false,
headerList: [],
tableData: [],
searchName: '',
orgLevel: 'search',
orgId: '',
pageSize: 10,
pageNo: 1,
total: 0,
orgLevel: 'search',
orgId: '',
selUserId: '',
//
runNum: 0,
runAgencyArray: [],
info: {},
breadList: []
breadList: [],
demand: {
loading: true,
colList: [
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "8%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "7%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "10%",
},
],
header: [
"序号",
"姓名",
"所属网格",
"所属房屋",
"手机",
"身份证",
"性别",
"出生日期",
"操作",
],
list: [],
},
};
},
activated () {
this.searchName = ''
this.tableData = []
const { columnName, label, id, level } = this.$route.query
this.orgLevel = level
this.orgId = id
@ -136,40 +134,72 @@ export default {
this.loadList(id, level)
},
deactivated() {
deactivated () {
this.orgLevel = ''
this.orgId = ''
this.pageNo = 1
},
beforeRouteEnter(to, from, next) {
const arr = [ {...from }, { ...to, meta: { title: '人员列表'}}]
next((vm) =>{
vm.breadList = [ ...arr ]
beforeRouteEnter (to, from, next) {
const arr = [{ ...from }, { ...to, meta: { title: '人员列表' } }]
next((vm) => {
vm.breadList = [...arr]
})
},
methods: {
handleSearch () {
},
toEventInfo () {
},
handlePageNoChange (pageNo) {
this.pageNo = pageNo
this.loadList(this.orgId, this.orgLevel)
},
handleSizeChange (pageSize) {
this.pageSize = pageSize
this.loadList(this.orgId, this.orgLevel)
},
async loadList (id, level) {
this.loading = true
this.demand.loading = true;
const url = "/epmetuser/icresiuser/searchbycategory"
let params = {
columnName: this.searchName,
id,
level,
pageNo: this.pageNo,
pageSize: this.pageSize,
pageNo: this.pageNo
}
const { data, code, msg } = await requestPost(url, params)
this.loading = false
this.demand.loading = false;
if (code === 0) {
this.total = data.total
this.tableData = data.list
this.demand.total = data.total;
this.demand.list = data.list.map((item, index) => {
return [
index + 1,
item.name ? item.name : "--",
item.gridName ? item.gridName : "--",
item.neighborHoodName + item.buildNum ? item.neighborHoodName + item.buildNum : "--",
item.mobile ? item.mobile : "--",
item.idCard ? item.idCard : "--",
item.gender ? item.gender : "--",
item.birthday ? item.birthday : "--",
{ type: "operate", list: ["查看"] },
];
});
} else {
this.$message.error(msg)
}
@ -177,7 +207,7 @@ export default {
//
handelToPeople (item) {
// this.toSubAgency('people', this.tableData[index].userId)
this.info = { ...item }
this.showedMoreInfo = true
},
@ -205,7 +235,7 @@ export default {
<style
lang="scss"
src="@/assets/scss/modules/visual/searchPerson.scss"
src="@/assets/scss/modules/board/listBox.scss"
scoped
></style>
@ -230,26 +260,24 @@ export default {
height: 780px;
margin: 0 auto;
}
.warning-table {
height: 640px;
}
.pagination {
padding-right: 0;
margin-top: 0;
text-align: right;
}
.g-bread {
padding: 10px 10px 15px;
::v-deep .el-breadcrumb__item {
font-size: 16px;
.el-breadcrumb__inner {
color: #fff;
}
padding: 10px 10px 15px;
::v-deep .el-breadcrumb__item {
font-size: 16px;
.el-breadcrumb__inner {
color: #fff;
}
::v-deep .el-breadcrumb__item:first-child {
.el-breadcrumb__inner {
color: #a0c3d9;
}
}
::v-deep .el-breadcrumb__item:first-child {
.el-breadcrumb__inner {
color: #a0c3d9;
}
}
}
</style>

263
src/views/modules/visual/cpts/tb copy.vue

@ -0,0 +1,263 @@
<template>
<div class="m-table">
<table class="table"
border="0"
cellspacing="0"
cellpadding="0">
<col :align="item.align"
:width="item.width"
:key="'col' + index"
v-for="(item, index) in colList" />
<thead>
<tr class="table-header">
<th class="table-header-th"
v-for="item in header"
:key="item">
{{ item }}
</th>
</tr>
</thead>
<tbody class="table-body">
<tr class="table-body-tr"
v-for="(value, index) in list"
:key="index"
@click="handleClickRow(index)">
<td class="td"
v-for="(item, indexs) in value"
:key="indexs">
<div v-if="typeof item === 'string' || typeof item === 'number'"
:title="item">
{{ item }}
</div>
<div v-if="typeof item === 'object' && item.type === 'img'">
<!-- <span>{{ item.type+ item.src}}</span> -->
<img style="width: 18px; height: 18px"
:src="item.src"
alt="" />
</div>
<div v-if="typeof item === 'object' && item && item.type == 'index'">
<img v-if="highlightTop3 && index == 0"
src="@/assets/img/shuju/top/1.png"
alt="" />
<img v-else-if="highlightTop3 && index == 1"
src="@/assets/img/shuju/top/2.png"
alt="" />
<img v-else-if="highlightTop3 && index == 2"
src="@/assets/img/shuju/top/3.png"
alt="" />
<span v-else>{{ index + 1 }}</span>
</div>
<a v-else-if="
typeof item === 'object' && item && item.type == 'operate'
"
v-for="btn in item.list"
:key="'operate' + index + btn"
@click.stop="handleClickBtn(index, btn)">{{ btn }}</a>
<a v-else-if="
typeof item === 'object' && item && item.type == 'people'
"
@click="handleClickPeople(item)">{{ item.name }}</a>
</td>
</tr>
</tbody>
</table>
<div class="table-status"
v-if="loading">
<screen-loading>加载中</screen-loading>
</div>
<div class="table-status"
v-if="list.length == 0 && !loading">
<div class="no-data">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
</template>
<script>
import ScreenLoading from "./loading";
export default {
name: "table",
components: {
ScreenLoading,
},
props: {
colList: {
type: Array,
default: () => {
return [
// {
// align: "center",
// width: "50%",
// },
];
},
},
header: {
type: Array,
required: false,
default: () => {
return [
// "", "", ""
];
},
},
list: {
type: Array,
required: false,
default: () => {
return [
// [
// 1,
// "",
// {
// type: "operate",
// list: [""],
// },
// ],
// [
// 2,
// "",
// {
// type: "operate",
// list: [""],
// },
// ],
];
},
},
loading: {
type: Boolean,
default: true,
},
highlightTop3: {
type: Boolean,
default: false,
},
},
data () {
return {};
},
watch: {},
mounted () { },
created () { },
methods: {
//
handleClickRow (index) {
this.$emit("handleClickRow", index);
},
handleClickBtn (index, type) {
this.$emit("operate", index, type);
},
handleClickPeople (item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${item.uid}`,
});
},
},
};
</script>
<style lang="scss" scoped>
.m-table {
.table {
box-sizing: border-box;
width: 100%;
height: 100%;
border: none;
table-layout: fixed;
&-header {
width: 100%;
height: 50px;
background: rgba(8, 37, 134, 0.85);
font-size: 16px;
font-weight: 400;
color: #ffffff;
line-height: 50px;
&-th {
text-align: center;
border: none;
font-weight: normal;
// width: calc(100% / 5);
}
}
&-body {
box-sizing: border-box;
width: 100%;
font-size: 18px;
font-weight: 400;
color: #ffffff;
line-height: 40px;
&-tr {
box-sizing: border-box;
width: 100%;
min-height: 50px;
.td {
box-sizing: border-box;
text-align: center;
border: none;
padding: 10px 5px;
> div {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-wrap: normal;
}
a {
font-size: 18px;
font-weight: 400;
color: #e4dc00;
position: relative;
cursor: pointer;
}
}
}
&-tr:nth-child(2n) {
background: rgba(16, 75, 164, 0.24);
}
&-tr:hover {
background: url("../../../../assets/img/modules/visual/hover-bac.png")
no-repeat center;
background-size: 100% 100%;
}
}
}
.table-status {
position: relative;
height: 300px;
//
.no-data {
&-img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
}
}
</style>

370
src/views/modules/visual/cpts/tb.vue

@ -1,83 +1,111 @@
<template>
<div class="m-table">
<table class="table"
border="0"
cellspacing="0"
cellpadding="0">
<col :align="item.align"
:width="item.width"
:key="'col' + index"
v-for="(item, index) in colList" />
<thead>
<tr class="table-header">
<th class="table-header-th"
v-for="item in header"
:key="item">
{{ item }}
</th>
</tr>
</thead>
<tbody class="table-body">
<tr class="table-body-tr"
v-for="(value, index) in list"
:key="index"
@click="handleClickRow(index)">
<td class="td"
v-for="(item, indexs) in value"
:key="indexs">
<div v-if="typeof item === 'string' || typeof item === 'number'"
:title="item">
<div>
<div v-if="showTitle"
class="m-title">
<img class="title_img"
src="@/assets/images/index/list-logo.png"
alt />
<div class="tip_title">{{titleName}}</div>
<div class="title_line"></div>
</div>
<div class="m-table">
<table class="table"
border="0"
cellspacing="0"
cellpadding="0">
<col :align="item.align"
:width="item.width"
:key="'col' + index"
v-for="(item, index) in colList" />
<thead>
<tr class="table-header">
<th class="table-header-th"
v-for="item in header"
:key="item">
{{ item }}
</div>
<div v-if="typeof item === 'object' && item.type === 'img'">
<!-- <span>{{ item.type+ item.src}}</span> -->
<img style="width: 18px; height: 18px"
:src="item.src"
alt="" />
</div>
<div v-if="typeof item === 'object' && item && item.type == 'index'">
<img v-if="highlightTop3 && index == 0"
src="@/assets/img/shuju/top/1.png"
alt="" />
<img v-else-if="highlightTop3 && index == 1"
src="@/assets/img/shuju/top/2.png"
alt="" />
<img v-else-if="highlightTop3 && index == 2"
src="@/assets/img/shuju/top/3.png"
alt="" />
<span v-else>{{ index + 1 }}</span>
</div>
<a v-else-if="
</th>
</tr>
</thead>
<tbody class="table-body">
<tr class="table-body-tr"
v-for="(value, index) in list"
:key="index"
@click="handleClickRow(index)">
<td class="td"
v-for="(item, indexs) in value"
:key="indexs">
<div v-if="typeof item === 'string' || typeof item === 'number'"
:title="item">
{{ item }}
</div>
<div v-if="typeof item === 'object' && item.type === 'img'">
<!-- <span>{{ item.type+ item.src}}</span> -->
<img style="width: 18px; height: 18px"
:src="item.src"
alt="" />
</div>
<div v-if="typeof item === 'object' && item && item.type == 'index'">
<img v-if="highlightTop3 && index == 0"
src="@/assets/img/shuju/top/1.png"
alt="" />
<img v-else-if="highlightTop3 && index == 1"
src="@/assets/img/shuju/top/2.png"
alt="" />
<img v-else-if="highlightTop3 && index == 2"
src="@/assets/img/shuju/top/3.png"
alt="" />
<span v-else>{{ index + 1 }}</span>
</div>
<a v-else-if="
typeof item === 'object' && item && item.type == 'operate'
"
v-for="btn in item.list"
:key="'operate' + index + btn"
@click.stop="handleClickBtn(index, btn)">{{ btn }}</a>
<a v-else-if="
v-for="btn in item.list"
:key="'operate' + index + btn"
@click.stop="handleClickBtn(index, btn)">{{ btn }}</a>
<a v-else-if="
typeof item === 'object' && item && item.type == 'people'
"
@click="handleClickPeople(item)">{{ item.name }}</a>
</td>
</tr>
</tbody>
</table>
<div class="table-status"
v-if="loading">
<screen-loading>加载中</screen-loading>
</div>
@click="handleClickPeople(item)">{{ item.name }}</a>
</td>
</tr>
</tbody>
</table>
<div class="table-status"
v-if="loading">
<screen-loading>加载中</screen-loading>
</div>
<div class="table-status"
v-if="list.length == 0 && !loading">
<div class="no-data">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
<div class="table-status"
v-if="list.length == 0 && !loading">
<div class="no-data">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
<div class="m-pagination">
<el-pagination :current-page="pageNo"
:page-size="pageSize"
background
:total="total"
layout="total">
</el-pagination>
<el-pagination :current-page="pageNo"
:page-size="pageSize"
background
:total="total"
layout="prev, pager, next, jumper, sizes"
@current-change="handlePageNoChange"
@size-change="handleSizeChange">
</el-pagination>
</div>
</div>
</template>
@ -90,6 +118,17 @@ export default {
ScreenLoading,
},
props: {
//true
showTitle: {
type: Boolean,
default: true
},
//
titleName: {
type: String,
default: "列表"
},
//
colList: {
type: Array,
default: () => {
@ -101,39 +140,27 @@ export default {
];
},
},
//
header: {
type: Array,
required: false,
default: () => {
return [
// "", "", ""
];
return [];
},
},
//
list: {
type: Array,
required: false,
default: () => {
return [
// [
// 1,
// "",
// {
// type: "operate",
// list: [""],
// },
// ],
// [
// 2,
// "",
// {
// type: "operate",
// list: [""],
// },
// ],
];
return [];
},
},
//
total: {
type: Number,
default: 0
},
loading: {
type: Boolean,
default: true,
@ -144,7 +171,11 @@ export default {
},
},
data () {
return {};
return {
pageSize: 10,
pageNo: 1,
};
},
watch: {},
@ -165,12 +196,50 @@ export default {
path: `/main-shuju/visual-basicinfo-people/${item.uid}`,
});
},
handlePageNoChange (val) {
this.$emit("handlePageNoChange", val);
},
handleSizeChange (val) {
this.$emit("handleSizeChange", val);
},
},
};
</script>
<style lang="scss" scoped>
.m-title {
display: flex;
align-items: center;
// margin-left: 24px;
.title_img {
width: 17px;
height: 17px;
}
.tip_title {
margin-left: 8px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 22px;
}
.title_line {
margin-left: 8px;
width: 244px;
height: 1px;
background: linear-gradient(
270deg,
rgba(55, 198, 255, 0.1) 0%,
#1995ff 100%
);
}
}
.m-table {
margin-top: 9px;
.table {
box-sizing: border-box;
width: 100%;
@ -180,17 +249,17 @@ export default {
&-header {
width: 100%;
height: 50px;
background: rgba(8, 37, 134, 0.85);
font-size: 16px;
height: 56px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 50px;
color: rgba(255, 255, 255, 0.65);
line-height: 20px;
&-th {
text-align: center;
text-align: left;
border: none;
font-weight: normal;
padding: 18px 5px 18px 24px;
// width: calc(100% / 5);
}
}
@ -198,21 +267,22 @@ export default {
&-body {
box-sizing: border-box;
width: 100%;
font-size: 18px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 40px;
line-height: 20px;
&-tr {
box-sizing: border-box;
width: 100%;
min-height: 50px;
min-height: 56px;
.td {
box-sizing: border-box;
text-align: center;
text-align: left;
border: none;
padding: 10px 5px;
padding: 18px 5px 18px 24px;
> div {
overflow: hidden;
@ -222,24 +292,25 @@ export default {
}
a {
font-size: 18px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #e4dc00;
position: relative;
color: #1a95ff;
line-height: 20px;
cursor: pointer;
}
}
}
&-tr:nth-child(2n) {
background: rgba(16, 75, 164, 0.24);
&-tr:nth-child(2n-1) {
background: rgba(26, 149, 255, 0.15);
}
&-tr:hover {
background: url("../../../../assets/img/modules/visual/hover-bac.png")
no-repeat center;
background-size: 100% 100%;
}
// &-tr:hover {
// background: url("../../../../assets/img/modules/visual/hover-bac.png")
// no-repeat center;
// background-size: 100% 100%;
// }
}
}
@ -260,4 +331,73 @@ export default {
}
}
}
.m-pagination {
box-sizing: border-box;
margin-top: 20px;
width: 100%;
height: 40px;
display: flex;
justify-content: space-between;
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
border-radius: 2px;
border: 1px solid rgba(26, 149, 255, 0.45);
background: #00023a;
}
/deep/ .el-pagination .el-pager li {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
border-radius: 2px;
border: 1px solid rgba(26, 149, 255, 0.45);
background: #1a95ff;
}
/deep/ .el-pagination .btn-prev {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
border-radius: 2px;
border: 1px solid rgba(26, 149, 255, 0.45);
background: #00023a;
}
/deep/ .el-pagination .btn-next {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
border-radius: 2px;
border: 1px solid rgba(26, 149, 255, 0.45);
background: #00023a;
}
/deep/ .el-pagination__editor.el-input .el-input__inner {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
border-radius: 2px;
border: 1px solid rgba(26, 149, 255, 0.45);
background: #00023a;
}
/deep/ .el-pagination .el-select .el-input .el-input__inner {
margin-left: 14px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
border-radius: 2px;
border: 1px solid rgba(26, 149, 255, 0.45);
background: #00023a;
}
}
</style>

Loading…
Cancel
Save