Browse Source

面包屑

V1.0
jiangyy 3 years ago
parent
commit
0392fa159e
  1. 73
      src/assets/scss/dataBoard/bread.scss
  2. 4
      src/assets/scss/dataBoard/detailBox.scss
  3. 15
      src/assets/scss/dataBoard/listBox.scss
  4. 197
      src/assets/scss/modules/board/listBox.scss
  5. 84
      src/views/dataBoard/cpts/bread.vue
  6. 68
      src/views/dataBoard/cpts/loading.vue
  7. 431
      src/views/dataBoard/cpts/tb.vue
  8. 16
      src/views/modules/visual/basicinfo/houseStatic/houseList.vue
  9. 2
      src/views/modules/visual/basicinfo/houseStatic/houseMore.vue
  10. 38
      src/views/modules/visual/basicinfo/houseStatic/houseStatic.vue
  11. 46
      src/views/modules/visual/basicinfo/peopleList.vue

73
src/assets/scss/dataBoard/bread.scss

@ -0,0 +1,73 @@
.m-bread {
padding: 26px 0 40px 0;
// height: 40px;
// background: rgba(26,149,255,0.15);
.g-bread {
margin: 4px 0;
padding: 8px 16px;
height: 40px;
background: rgba(26,149,255,0.15);;
width: 100%;
/deep/ .el-breadcrumb__item {
line-height: 25px;
font-size: 14px;
}
/deep/ .el-breadcrumb__item .el-breadcrumb__inner {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
}
/deep/ .el-breadcrumb__item:first-child .el-breadcrumb__inner {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
}
.router_parents{
line-height: 25px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
.arrow {
padding: 0 5px;
}
}
.router_child{
line-height: 25px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
}
}
.g-line {
display: flex;
width: 100%;
.line-left {
flex-grow: 0;
flex-shrink: 0;
flex-basis: 16px;
height: 1px;
background: #1a95ff;
}
.line-right {
flex-grow: 1;
flex-shrink: 1;
flex-basis: 0px;
height: 1px;
background: rgba(26, 149, 255, 0.45);
}
}
}

4
src/assets/scss/modules/board/detailBox.scss → src/assets/scss/dataBoard/detailBox.scss

@ -1,5 +1,5 @@
@import "../../c/config";
@import "../../c/function";
@import "../c/config";
@import "../c/function";
// @import "./c/common";

15
src/assets/scss/dataBoard/listBox.scss

@ -0,0 +1,15 @@
.m-listbox-main{
min-height: 100%;
box-sizing: border-box;
margin-left:16px;
.g-listbox{
}
}

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

@ -1,197 +0,0 @@
.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;
}
}

84
src/views/dataBoard/cpts/bread.vue

@ -0,0 +1,84 @@
<template>
<div>
<div class="m-bread">
<div class="g-line">
<div class="line-left"></div>
<div class="line-right"></div>
</div>
<div class="g-bread">
<el-breadcrumb :separator="separator">
<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 class="g-line">
<div class="line-left"></div>
<div class="line-right"></div>
</div>
</div>
</div>
</template>
<script>
import ScreenLoading from "./loading";
import { mapGetters } from 'vuex'
export default {
name: "table",
components: {
ScreenLoading,
},
props: {
//
separator: {
type: String,
default: '/'
},
//
breadList: {
type: Array,
default: () => {
return [];
},
},
},
data () {
return {
pageSize: 10,
pageNo: 1,
};
},
watch: {},
computed: {
...mapGetters(['clientHeight', 'iframeHeight'])
},
mounted () { },
created () { },
methods: {
},
};
</script>
<style
lang="scss"
src="@/assets/scss/dataBoard/bread.scss"
scoped
></style>
<style lang="scss" scoped>
</style>

68
src/views/dataBoard/cpts/loading.vue

@ -0,0 +1,68 @@
<template>
<div class="screen-loading">
<svg width="50px"
height="50px">
<circle cx="25"
cy="25"
r="20"
fill="transparent"
stroke-width="3"
stroke-dasharray="31.415, 31.415"
stroke="#29cdff"
stroke-linecap="round">
<animateTransform attributeName="transform"
type="rotate"
values="0, 25 25;360, 25 25"
dur="1.5s"
repeatCount="indefinite" />
<animate attributeName="stroke"
values="#02bcfe;#3be6cb;#02bcfe"
dur="3s"
repeatCount="indefinite" />
</circle>
<circle cx="25"
cy="25"
r="10"
fill="transparent"
stroke-width="3"
stroke-dasharray="15.7, 15.7"
stroke="#29cdff"
stroke-linecap="round">
<animateTransform attributeName="transform"
type="rotate"
values="360, 25 25;0, 25 25"
dur="1.5s"
repeatCount="indefinite" />
<animate attributeName="stroke"
values="#3be6cb;#02bcfe;#3be6cb"
dur="3s"
repeatCount="indefinite" />
</circle>
</svg>
<div class="loading-tip">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
name: 'DvLoading'
}
</script>
<style lang="scss" scoped>
.screen-loading {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.loading-tip {
font-size: 14px;
color: #fff;
}
}
</style>

431
src/views/dataBoard/cpts/tb.vue

@ -0,0 +1,431 @@
<template>
<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="g-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="g-table-header">
<th class="g-table-header-th"
v-for="item in header"
:key="item">
{{ item }}
</th>
</tr>
</thead>
<!-- <el-scrollbar :style="{height:treeHeight}"
class="g-scrollar"> -->
<tbody v-if="!loading"
class="g-table-body">
<tr class="g-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>
<!-- </el-scrollbar> -->
</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>
<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>
<script>
import ScreenLoading from "./loading";
import { mapGetters } from 'vuex'
export default {
name: "table",
components: {
ScreenLoading,
},
props: {
//true
showTitle: {
type: Boolean,
default: true
},
//
titleName: {
type: String,
default: "列表"
},
//
colList: {
type: Array,
default: () => {
return [
// {
// align: "center",
// width: "50%",
// },
];
},
},
//
header: {
type: Array,
required: false,
default: () => {
return [];
},
},
//
list: {
type: Array,
required: false,
default: () => {
return [];
},
},
//
total: {
type: Number,
default: 0
},
loading: {
type: Boolean,
default: true,
},
highlightTop3: {
type: Boolean,
default: false,
},
},
data () {
return {
pageSize: 10,
pageNo: 1,
};
},
watch: {},
computed: {
treeHeight () {
return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight + 'px' : this.clientHeight - 300 + 'px'
},
treeWidth () {
return document.documentElement.clientWidth
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
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}`,
});
},
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;
width: 100%;
.g-table {
box-sizing: border-box;
width: 100%;
height: 100%;
border: none;
table-layout: fixed;
&-header {
width: 100%;
height: 56px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
line-height: 20px;
&-th {
text-align: left;
border: none;
padding: 18px 5px 18px 24px;
// width: calc(100% / 5);
}
}
&-body {
box-sizing: border-box;
width: 100%;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 20px;
&-tr {
box-sizing: border-box;
width: 100%;
min-height: 56px;
.td {
box-sizing: border-box;
text-align: left;
border: none;
padding: 18px 5px 18px 24px;
> div {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-wrap: normal;
}
a {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #1a95ff;
line-height: 20px;
cursor: pointer;
}
}
}
&-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%;
// }
}
/deep/ .el-scrollbar__wrap {
width: 100% !important;
overflow-x: hidden !important;
}
}
.g-scrollar {
width: 100%;
}
.table-status {
position: relative;
height: 300px;
//
.no-data {
&-img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
}
}
.m-pagination {
box-sizing: border-box;
margin-top: 24px;
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: #ffffff;
border-radius: 2px;
border: 1px solid rgba(26, 149, 255, 0.45);
background: #1a95ff;
}
/deep/ .el-pagination .el-pager li {
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-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>

16
src/views/modules/visual/basicinfo/houseStatic/houseList.vue

@ -1,15 +1,7 @@
<template>
<div class="m-listbox-main">
<div class="g-listbox">
<!-- <cpt-tb column-type=""
ref="table"
:url="tableUrl"
:params="tableParams"
keyword="houseList"
:operations="operations"
:tableHeight="tableHeight"
@handleToHouse="handleToHouse">
</cpt-tb> -->
<cpt-tb :titleName="tableTitle"
:col-list="demand.colList"
:loading="demand.loading"
@ -34,13 +26,13 @@ import { requestPost } from "@/js/dai/request";
import { mapGetters } from "vuex";
import ScreenLoading from "@/views/modules/visual/cpts/loading";
import houseMore from "./houseMore";
import cptTb from "@/views/modules/visual/cpts/tb";
import CTable from '@c/CTable'
import cptTb from "@/views/dataBoard/cpts/tb";
export default {
name: "people-list",
components: {
ScreenLoading, houseMore, cptTb, CTable
ScreenLoading, houseMore, cptTb,
},
data () {
return {

2
src/views/modules/visual/basicinfo/houseStatic/houseMore.vue

@ -127,6 +127,6 @@ export default {
<style
lang="scss"
src="@/assets/scss/modules/board/detailBox.scss"
src="@/assets/scss/dataBoard/detailBox.scss"
scoped
></style>

38
src/views/modules/visual/basicinfo/houseStatic/houseStatic.vue

@ -1,17 +1,28 @@
<template>
<div class="warning-box">
<!-- 组织路由 -->
<div class="div_top">
<div class="router_line"></div>
<div class="div_router">
<div class="m-bread">
<div class="g-line">
<div class="line-left"></div>
<div class="line-right"></div>
</div>
<div class="g-bread">
<span class="router_parents"
v-for="(item,index) in runAgencyArray"
@click="handleClickAgency(index)"
:key="index">{{item.orgName}}<span class="arrow">></span></span>
:key="index">{{item.orgName}}<span class="arrow">/</span></span>
<span class="router_child">{{orgName}}</span>
</div>
<div class="g-line">
<div class="line-left"></div>
<div class="line-right"></div>
</div>
</div>
<!-- 组织路由 -->
<!-- <cpt-bread :separator="'/'"
:breadList="breadList"></cpt-bread> -->
<cpt-card v-if="!showHouseList&&!showPeopleList"
:min-full-screen="true">
<div class="card-title">
@ -242,6 +253,7 @@ import { housePieOption } from './options'
import { userPieOption } from './userOptions'
import houseList from './houseList'
import peopleList from './peopleList'
import cptBread from "@/views/dataBoard/cpts/bread";
import * as echarts from 'echarts';
export default {
@ -252,7 +264,8 @@ export default {
screenEchartsFrame,
ScreenLoading,
houseList,
peopleList
peopleList,
cptBread
},
data () {
return {
@ -322,6 +335,7 @@ export default {
subList: [],
//
breadList: [],
runNum: 0,
runAgencyArray: [],
selUserId: '',
@ -329,6 +343,7 @@ export default {
zoom: null,
parentPolygon: [],
rentType: '',//
type: '',//
showPeopleList: false,
@ -343,6 +358,13 @@ export default {
await this.getApiData()
},
beforeRouteEnter (to, from, next) {
const arr = [{ ...from }, { ...to, meta: { title: '人员列表' } }]
next((vm) => {
vm.breadList = [...arr]
})
},
methods: {
async getApiData () {
this.dataLoading = true
@ -748,3 +770,9 @@ export default {
scoped
></style>
<style
lang="scss"
src="@/assets/scss/dataBoard/bread.scss"
scoped
></style>

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

@ -1,16 +1,28 @@
<template>
<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 }">
{{ item.meta.title }}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<cpt-bread :separator="'/'"
:breadList="breadList"></cpt-bread>
<!-- <div class="m-bread">
<div class="g-line">
<div class="line-left"></div>
<div class="line-right"></div>
</div>
<div class="g-bread">
<el-breadcrumb separator="/">
<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 class="g-line">
<div class="line-left"></div>
<div class="line-right"></div>
</div>
</div> -->
<div>
@ -44,12 +56,13 @@ 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";
import cptTb from "@/views/dataBoard/cpts/tb";
import cptBread from "@/views/dataBoard/cpts/bread";
export default {
name: "people-list",
components: {
People, ScreenLoading, peopleMore, cptTb
People, ScreenLoading, peopleMore, cptTb, cptBread
},
data () {
return {
@ -141,6 +154,7 @@ export default {
this.pageNo = 1
},
beforeRouteEnter (to, from, next) {
const arr = [{ ...from }, { ...to, meta: { title: '人员列表' } }]
next((vm) => {
vm.breadList = [...arr]
@ -216,15 +230,11 @@ export default {
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/basicInfoMain.scss"
scoped
></style>
<style
lang="scss"
src="@/assets/scss/modules/board/listBox.scss"
src="@/assets/scss/dataBoard/listBox.scss"
scoped
></style>

Loading…
Cancel
Save