15 changed files with 2399 additions and 1061 deletions
|
After Width: | Height: | Size: 51 KiB |
@ -0,0 +1,35 @@ |
|||||
|
@import "../../c/config"; |
||||
|
@import "../../c/function"; |
||||
|
@import "./c/common"; |
||||
|
|
||||
|
.g-cpt { |
||||
|
display: flex; |
||||
|
flex-wrap: wrap; |
||||
|
justify-content: space-between; |
||||
|
margin-top: 5px; |
||||
|
} |
||||
|
.m-tb { |
||||
|
width: 33%; |
||||
|
.title { |
||||
|
padding: 10px; |
||||
|
font-size: 22px; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: 800; |
||||
|
color: #ffffff; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
|
||||
|
img { |
||||
|
display: block; |
||||
|
margin-right: 5px; |
||||
|
} |
||||
|
span { |
||||
|
display: block; |
||||
|
} |
||||
|
} |
||||
|
.tb { |
||||
|
height: calc(100vh - 180px); |
||||
|
overflow-y: auto; |
||||
|
@include scrollBar; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,373 @@ |
|||||
|
@import "../../c/config"; |
||||
|
@import "../../c/function"; |
||||
|
@import "./c/common"; |
||||
|
|
||||
|
.m-pop { |
||||
|
@include shield; |
||||
|
background-color: rgba(#000, 0.9); |
||||
|
overflow-y: auto; |
||||
|
|
||||
|
.wrap { |
||||
|
position: relative; |
||||
|
margin: 120px auto; |
||||
|
width: 1020px; |
||||
|
|
||||
|
.title { |
||||
|
padding: 10px; |
||||
|
font-size: 22px; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: 800; |
||||
|
color: #ffffff; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
|
||||
|
img { |
||||
|
display: block; |
||||
|
margin-right: 5px; |
||||
|
} |
||||
|
span { |
||||
|
display: block; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.btn-close { |
||||
|
position: absolute; |
||||
|
top: -15px; |
||||
|
right: -15px; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
.line { |
||||
|
margin: 20px auto; |
||||
|
width: 900px; |
||||
|
height: 1px; |
||||
|
border: 1px dashed #1257c9; |
||||
|
} |
||||
|
|
||||
|
.tabs { |
||||
|
margin-top: 30px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
padding-left: 20px; |
||||
|
padding-left: 58px; |
||||
|
|
||||
|
.tab-btn { |
||||
|
width: 30px; |
||||
|
text-align: center; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
.tab { |
||||
|
margin: 0 5px; |
||||
|
min-width: 76px; |
||||
|
padding: 0 5px; |
||||
|
height: 30px; |
||||
|
background: rgba(255, 255, 255, 0); |
||||
|
border: 1px solid #1257c9; |
||||
|
box-shadow: 0 0 10px 0 inset #1257c9; |
||||
|
border-radius: 2px; |
||||
|
text-align: center; |
||||
|
font-size: 14px; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: 400; |
||||
|
color: #ffffff; |
||||
|
line-height: 30px; |
||||
|
cursor: pointer; |
||||
|
transition: all ease 0.5s; |
||||
|
&.z-on { |
||||
|
background: linear-gradient(90deg, #1a5afd, #009cff); |
||||
|
box-shadow: none; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.m-info { |
||||
|
padding-left: 62px; |
||||
|
font-size: 16px; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: 400; |
||||
|
color: #ffffff; |
||||
|
line-height: 24px; |
||||
|
width: 500px; |
||||
|
|
||||
|
.info-title { |
||||
|
margin-top: 30px; |
||||
|
font-size: 20px; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: bold; |
||||
|
color: #ffffff; |
||||
|
line-height: 30px; |
||||
|
} |
||||
|
.info-content { |
||||
|
margin: 20px 0; |
||||
|
} |
||||
|
.info-pics { |
||||
|
display: flex; |
||||
|
margin: 20px 0; |
||||
|
img { |
||||
|
display: block; |
||||
|
width: 32%; |
||||
|
height: 90px; |
||||
|
margin-right: 9px; |
||||
|
object-fit: cover; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.info-prop { |
||||
|
position: relative; |
||||
|
margin: 10px 0; |
||||
|
display: flex; |
||||
|
padding-left: 15px; |
||||
|
|
||||
|
> span, |
||||
|
> div { |
||||
|
display: block; |
||||
|
max-width: 300px; |
||||
|
} |
||||
|
|
||||
|
&::before { |
||||
|
content: ""; |
||||
|
display: block; |
||||
|
position: absolute; |
||||
|
top: 9px; |
||||
|
left: 0; |
||||
|
width: 7px; |
||||
|
height: 7px; |
||||
|
background: #0c81fe; |
||||
|
border-radius: 3px; |
||||
|
margin-right: 10px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.m-case { |
||||
|
@include scrollBar; |
||||
|
height: 600px; |
||||
|
padding: 20px 0 20px 0; |
||||
|
overflow-y: auto; |
||||
|
} |
||||
|
|
||||
|
.m-row { |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
} |
||||
|
|
||||
|
.m-yanpan { |
||||
|
padding-left: 62px; |
||||
|
padding-right: 0; |
||||
|
min-height: 300px; |
||||
|
} |
||||
|
|
||||
|
.m-hint { |
||||
|
position: relative; |
||||
|
height: 300px; |
||||
|
|
||||
|
// 暂无数据 |
||||
|
img { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
margin: auto; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.m-line { |
||||
|
.stat { |
||||
|
margin: 20px 0 10px; |
||||
|
display: flex; |
||||
|
.stat-item { |
||||
|
width: 33%; |
||||
|
text-align: center; |
||||
|
|
||||
|
div { |
||||
|
font-size: 17px; |
||||
|
font-family: Source Han Serif SC; |
||||
|
font-weight: 500; |
||||
|
color: rgba(#fff, 0.5); |
||||
|
line-height: 24px; |
||||
|
&.z-weak { |
||||
|
font-size: 12px; |
||||
|
font-family: Source Han Serif SC; |
||||
|
font-weight: 500; |
||||
|
color: rgba(#fff, 0.5); |
||||
|
line-height: 24px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.m-tb { |
||||
|
padding-left: 62px; |
||||
|
padding-right: 40px; |
||||
|
} |
||||
|
|
||||
|
.m-pagination { |
||||
|
box-sizing: border-box; |
||||
|
margin-top: 20px; |
||||
|
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; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.m-process { |
||||
|
width: 400px; |
||||
|
|
||||
|
.process-title { |
||||
|
margin-bottom: 25px; |
||||
|
margin-left: -5px; |
||||
|
font-size: 16px; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: bold; |
||||
|
color: #ffffff; |
||||
|
line-height: 18px; |
||||
|
} |
||||
|
|
||||
|
.list { |
||||
|
position: relative; |
||||
|
box-sizing: border-box; |
||||
|
margin-top: 30px/2; |
||||
|
margin-left: 50px/2; |
||||
|
padding: 0 0 0 30px/2; |
||||
|
width: 680px/2; |
||||
|
border-left: 3px solid #0c81fe; |
||||
|
padding-right: 10px; |
||||
|
|
||||
|
&::before { |
||||
|
content: ""; |
||||
|
position: absolute; |
||||
|
z-index: 1; |
||||
|
display: block; |
||||
|
top: -2px/2; |
||||
|
left: -2px/2; |
||||
|
width: 5px/2; |
||||
|
height: 20px/2; |
||||
|
background-color: #ffffff; |
||||
|
} |
||||
|
|
||||
|
.item { |
||||
|
position: relative; |
||||
|
z-index: 2; |
||||
|
margin-bottom: 8px; |
||||
|
padding-bottom: 8px; |
||||
|
font-size: 16px; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: 400; |
||||
|
color: #fefefe; |
||||
|
line-height: 24px; |
||||
|
padding-left: 20px; |
||||
|
padding-top: 1px; |
||||
|
|
||||
|
&::before { |
||||
|
content: ""; |
||||
|
display: block; |
||||
|
position: absolute; |
||||
|
top: -5px; |
||||
|
left: -11px; |
||||
|
width: 18px; |
||||
|
height: 18px; |
||||
|
background: #0c81fe; |
||||
|
border: 4px solid lighten(#0c81fe, 15); |
||||
|
border-radius: 100%; |
||||
|
} |
||||
|
|
||||
|
&.z-on { |
||||
|
&::before { |
||||
|
background: #e08400; |
||||
|
border-color: lighten(#e08400, 15); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
&:last-child { |
||||
|
margin-bottom: 0; |
||||
|
padding-bottom: 0; |
||||
|
border-bottom: none; |
||||
|
} |
||||
|
|
||||
|
.item-row { |
||||
|
margin-top: -10px; |
||||
|
margin-bottom: 10px; |
||||
|
display: flex; |
||||
|
} |
||||
|
|
||||
|
.name { |
||||
|
position: relative; |
||||
|
padding: 0 10px; |
||||
|
font-size: 12px; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: 500; |
||||
|
color: #fefefe; |
||||
|
line-height: 22px; |
||||
|
height: 22px; |
||||
|
border-radius: 10px 0 10px 0; |
||||
|
background-color: #0c81fe; |
||||
|
// background-color: #e08400; |
||||
|
} |
||||
|
|
||||
|
.date { |
||||
|
margin-left: 10px; |
||||
|
font-size: 12px; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: 500; |
||||
|
color: #7ca1d2; |
||||
|
line-height: 25px; |
||||
|
} |
||||
|
|
||||
|
.detail { |
||||
|
@include cs; |
||||
|
font-size: 16px; |
||||
|
line-height: 20px; |
||||
|
margin-bottom: 5px; |
||||
|
display: flex; |
||||
|
|
||||
|
.detail-field { |
||||
|
width: 22%; |
||||
|
text-align: justify; |
||||
|
text-align-last: justify; |
||||
|
} |
||||
|
.detail-value { |
||||
|
width: 78%; |
||||
|
.detail-link { |
||||
|
display: inline; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.attachement-list { |
||||
|
padding-left: 80px; |
||||
|
a { |
||||
|
display: block; |
||||
|
cursor: pointer; |
||||
|
color: #4df0ff; |
||||
|
font-size: 14px; |
||||
|
|
||||
|
i { |
||||
|
color: #fff; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,214 @@ |
|||||
|
<template> |
||||
|
<div class="m-chart"> |
||||
|
<canvas id="myChart" width="400" height="260"></canvas> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import nextTick from "dai-js/tools/nextTick"; |
||||
|
// ios下字体渲染有bug |
||||
|
const fontFamily = "PingFang SC"; |
||||
|
const fontSize = 14; |
||||
|
|
||||
|
let chart; |
||||
|
let srcData = []; |
||||
|
|
||||
|
let textShapeList = []; |
||||
|
const addTextShape = () => { |
||||
|
if (textShapeList.length > 0) { |
||||
|
textShapeList.forEach((item) => { |
||||
|
item.remove(true); |
||||
|
}); |
||||
|
textShapeList = []; |
||||
|
} |
||||
|
// 添加折线上文本 |
||||
|
const canvas = chart.get("canvas"); |
||||
|
const group = canvas.addGroup(); |
||||
|
const shapes = {}; |
||||
|
|
||||
|
function addFn(list) { |
||||
|
const listLength = list.length; |
||||
|
list.forEach(function (obj, index) { |
||||
|
// 避免显示太多,乱七八糟 |
||||
|
if (listLength > 7 && index > 0 && index < listLength - 1) { |
||||
|
if (index % Math.ceil(listLength / 5) != 0) { |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
const offsetX = 6; |
||||
|
const offsetY = 1; |
||||
|
const point = chart.getPosition(obj); |
||||
|
const text = group.addShape("text", { |
||||
|
attrs: { |
||||
|
x: obj.type === "支持" ? point.x + 2 * offsetX : point.x - offsetX, |
||||
|
y: point.y + offsetY, |
||||
|
text: obj.value, |
||||
|
textAlign: "center", |
||||
|
textBaseline: "bottom", |
||||
|
fill: "#333", |
||||
|
fontWeight: 500, |
||||
|
fontFamily, |
||||
|
fontSize, |
||||
|
}, |
||||
|
}); |
||||
|
|
||||
|
textShapeList.push(text); // 缓存该 shape, 便于后续查找 |
||||
|
}); |
||||
|
} |
||||
|
srcData.sort((a, b) => { |
||||
|
return new Date(a.date).getTime() - new Date(b.date).getTime(); |
||||
|
}); |
||||
|
let supData = srcData.filter((item) => item.type == "支持"); |
||||
|
let oppData = srcData.filter((item) => item.type == "反对"); |
||||
|
addFn(supData); |
||||
|
addFn(oppData); |
||||
|
}; |
||||
|
|
||||
|
const iniChart = function (config, srcData) { |
||||
|
chart = new window.F2.Chart({ |
||||
|
id: "myChart", |
||||
|
...config, |
||||
|
}); |
||||
|
|
||||
|
const supColor = "#FFDA0E"; |
||||
|
const oppColor = "#00E5ED"; |
||||
|
|
||||
|
chart.source(srcData, { |
||||
|
date: { |
||||
|
range: [0, 1], |
||||
|
type: "timeCat", |
||||
|
mask: "MM-DD", |
||||
|
}, |
||||
|
value: { |
||||
|
// type: "linear", |
||||
|
}, |
||||
|
}); |
||||
|
// 设置坐标轴 |
||||
|
chart.axis("date", { |
||||
|
line: { |
||||
|
lineWidth: 1, |
||||
|
stroke: "#E7EEEE", |
||||
|
}, |
||||
|
label: { |
||||
|
fontWeight: 500, |
||||
|
fontSize, |
||||
|
fill: "#B5B7BF", |
||||
|
textBaseline: "middle", |
||||
|
}, |
||||
|
labelOffset: 25, |
||||
|
country: { |
||||
|
range: [0.1, 0.9], // 配置 range 范围,使左右两边不留边距 |
||||
|
}, |
||||
|
grid: null, |
||||
|
}); |
||||
|
chart.axis("value", { |
||||
|
line: { |
||||
|
lineWidth: 1, |
||||
|
stroke: "#E7EEEE", |
||||
|
}, |
||||
|
labelOffset: 20, |
||||
|
label: { |
||||
|
fontWeight: 500, |
||||
|
fontSize, |
||||
|
fill: "#B5B7BF", |
||||
|
}, |
||||
|
}); |
||||
|
// 类别标识区 |
||||
|
chart.legend({ |
||||
|
position: "bottom", |
||||
|
align: "center", |
||||
|
offsetY: -30, |
||||
|
custom: true, |
||||
|
nameStyle: { |
||||
|
fill: "#999", |
||||
|
fontWeight: 500, |
||||
|
fontSize, |
||||
|
}, |
||||
|
itemWidth: 150, |
||||
|
wordSpace: 25, |
||||
|
items: [ |
||||
|
{ |
||||
|
name: "支持", |
||||
|
marker(x, y, r, ctx) { |
||||
|
ctx.lineWidth = 10; |
||||
|
ctx.strokeStyle = supColor; |
||||
|
ctx.moveTo(x - r - 15, y); |
||||
|
ctx.lineTo(x + r + 15, y); |
||||
|
ctx.stroke(); |
||||
|
ctx.fill(); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: "反对", |
||||
|
marker(x, y, r, ctx) { |
||||
|
ctx.lineWidth = 10; |
||||
|
ctx.strokeStyle = oppColor; |
||||
|
ctx.moveTo(x - r - 15, y); |
||||
|
ctx.lineTo(x + r + 15, y); |
||||
|
ctx.stroke(); |
||||
|
ctx.fill(); |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
}); |
||||
|
// 添加折线 |
||||
|
chart |
||||
|
.line() |
||||
|
.position("date*value") |
||||
|
.color("type", (type) => { |
||||
|
if (type === "支持") { |
||||
|
return supColor; |
||||
|
} |
||||
|
return oppColor; |
||||
|
}) |
||||
|
.style("type", { |
||||
|
lineWidth: 1, |
||||
|
}) |
||||
|
.animate(); |
||||
|
chart.render(); |
||||
|
|
||||
|
addTextShape(); |
||||
|
|
||||
|
// 注意:需要把chart return 出来 |
||||
|
return chart; |
||||
|
}; |
||||
|
|
||||
|
export default { |
||||
|
name: "chart", |
||||
|
props: { |
||||
|
list: { |
||||
|
type: Array, |
||||
|
default: () => { |
||||
|
return []; |
||||
|
}, |
||||
|
}, |
||||
|
config: { |
||||
|
type: Object, |
||||
|
default: () => { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
iniLoading: false, |
||||
|
}; |
||||
|
}, |
||||
|
watch: { |
||||
|
list(data) { |
||||
|
chart.changeData(data); |
||||
|
srcData = data; |
||||
|
addTextShape(); |
||||
|
}, |
||||
|
}, |
||||
|
async created() { |
||||
|
await nextTick(200); |
||||
|
iniChart(this.config, this.list); |
||||
|
await nextTick(200); |
||||
|
this.iniLoading = true; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,283 @@ |
|||||
|
<template> |
||||
|
<div class="g-cpt"> |
||||
|
<div class="m-tb"> |
||||
|
<cpt-card> |
||||
|
<div class="title"> |
||||
|
<img src="@/assets/img/shuju/title-tip.png" /> |
||||
|
<span>公益达人</span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="tb"> |
||||
|
<cpt-tb |
||||
|
:highlight-top3="true" |
||||
|
:col-list="tb3.colList" |
||||
|
:loading="tb3.loading" |
||||
|
:header="tb3.header" |
||||
|
:list="tb3.list" |
||||
|
></cpt-tb> |
||||
|
</div> |
||||
|
</cpt-card> |
||||
|
</div> |
||||
|
|
||||
|
<div class="m-tb"> |
||||
|
<cpt-card> |
||||
|
<div class="title"> |
||||
|
<img src="@/assets/img/shuju/title-tip.png" /> |
||||
|
<span>党员先锋</span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="tb"> |
||||
|
<cpt-tb |
||||
|
:highlight-top3="true" |
||||
|
:col-list="tb2.colList" |
||||
|
:loading="tb2.loading" |
||||
|
:header="tb2.header" |
||||
|
:list="tb2.list" |
||||
|
></cpt-tb> |
||||
|
</div> |
||||
|
</cpt-card> |
||||
|
</div> |
||||
|
|
||||
|
<div class="m-tb"> |
||||
|
<cpt-card> |
||||
|
<div class="title"> |
||||
|
<img src="@/assets/img/shuju/title-tip.png" /> |
||||
|
<span>动力网格</span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="tb"> |
||||
|
<cpt-tb |
||||
|
:highlight-top3="true" |
||||
|
:col-list="tb1.colList" |
||||
|
:loading="tb1.loading" |
||||
|
:header="tb1.header" |
||||
|
:list="tb1.list" |
||||
|
></cpt-tb> |
||||
|
</div> |
||||
|
</cpt-card> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { Loading } from "element-ui"; //引入Loading服务 |
||||
|
import { requestPost } from "@/js/dai/request"; |
||||
|
import cptCard from "@/views/modules/visual/cpts/card"; |
||||
|
import cptTb from "@/views/modules/visual/cpts/tb"; |
||||
|
|
||||
|
export default { |
||||
|
name: "heart", |
||||
|
data() { |
||||
|
return { |
||||
|
agencyId: "", |
||||
|
areaCode: "", |
||||
|
|
||||
|
// 先进网格/支部 |
||||
|
tb1: { |
||||
|
loading: true, |
||||
|
colList: [ |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "10%", |
||||
|
}, |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "60%", |
||||
|
}, |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "30", |
||||
|
}, |
||||
|
], |
||||
|
header: ["序号", "网格名称", "活力值"], |
||||
|
list: [], |
||||
|
srcList: [], |
||||
|
currentIndex: 0, |
||||
|
}, |
||||
|
|
||||
|
// 先进网格/支部 |
||||
|
tb2: { |
||||
|
loading: true, |
||||
|
colList: [ |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "10%", |
||||
|
}, |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "30%", |
||||
|
}, |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "40%", |
||||
|
}, |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "20", |
||||
|
}, |
||||
|
], |
||||
|
header: ["序号", "党员姓名", "所属网格", "积分总数"], |
||||
|
list: [], |
||||
|
srcList: [], |
||||
|
currentIndex: 0, |
||||
|
}, |
||||
|
|
||||
|
// 先进网格/支部 |
||||
|
tb3: { |
||||
|
loading: true, |
||||
|
colList: [ |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "10%", |
||||
|
}, |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "30%", |
||||
|
}, |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "40%", |
||||
|
}, |
||||
|
{ |
||||
|
align: "center", |
||||
|
width: "20", |
||||
|
}, |
||||
|
], |
||||
|
header: ["序号", "居民姓名", "所属网格", "积分总数"], |
||||
|
list: [], |
||||
|
srcList: [], |
||||
|
currentIndex: 0, |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
props: {}, |
||||
|
|
||||
|
computed: {}, |
||||
|
|
||||
|
components: { |
||||
|
cptCard, |
||||
|
cptTb, |
||||
|
}, |
||||
|
|
||||
|
watch: {}, |
||||
|
|
||||
|
async mounted() { |
||||
|
this.userId = this.uid; |
||||
|
this.getApiData(); |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
handleSearch() {}, |
||||
|
|
||||
|
async getApiData() { |
||||
|
await this.getAgencyInfo(); |
||||
|
this.getTb1(); |
||||
|
this.getTb2(); |
||||
|
this.getTb3(); |
||||
|
}, |
||||
|
|
||||
|
toUserInfo(uid) { |
||||
|
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` }); |
||||
|
}, |
||||
|
|
||||
|
// 获取当前组织信息 |
||||
|
async getAgencyInfo() { |
||||
|
const { data, code, msg } = await requestPost( |
||||
|
"/data/report/screen/agency/agencydetail-multic", |
||||
|
{ |
||||
|
agencyId: this.$store.state.user.agencyId, |
||||
|
} |
||||
|
); |
||||
|
if (msg === "success" && code === 0) { |
||||
|
this.agencyId = data.agencyId; |
||||
|
this.areaCode = data.areaCode; |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
//加载组织数据 |
||||
|
async getTb1() { |
||||
|
const { agencyId, areaCode } = this; |
||||
|
const url = "/data/report/screen/index/advancedbranchrank"; |
||||
|
let params = { |
||||
|
agencyId, |
||||
|
areaCode, |
||||
|
orgType: "agency", |
||||
|
topNum: 50, |
||||
|
}; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params); |
||||
|
this.tb1.loading = false; |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.tb1.list = data.map((item) => { |
||||
|
return [{ type: "index" }, item.name, item.scroe]; |
||||
|
}); |
||||
|
this.tb1.srcList = data; |
||||
|
} else { |
||||
|
this.$message.error(msg); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
//加载组织数据 |
||||
|
async getTb2() { |
||||
|
const { agencyId, areaCode } = this; |
||||
|
const url = "/data/report/screen/user/partypointrank"; |
||||
|
let params = { |
||||
|
orgId: agencyId, |
||||
|
areaCode, |
||||
|
orgType: "agency", |
||||
|
topNum: 50, |
||||
|
}; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params); |
||||
|
this.tb2.loading = false; |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.tb2.list = data.map((item) => { |
||||
|
return [ |
||||
|
{ type: "index" }, |
||||
|
item.userName, |
||||
|
item.gridName, |
||||
|
item.pointTotal, |
||||
|
]; |
||||
|
}); |
||||
|
this.tb2.srcList = data; |
||||
|
} else { |
||||
|
this.$message.error(msg); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
//加载组织数据 |
||||
|
async getTb3() { |
||||
|
const { agencyId, areaCode } = this; |
||||
|
const url = "/data/report/screen/user/userpointrank/withoutpartymember"; |
||||
|
let params = { |
||||
|
orgId: agencyId, |
||||
|
areaCode, |
||||
|
orgType: "agency", |
||||
|
topNum: 50, |
||||
|
}; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params); |
||||
|
this.tb3.loading = false; |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.tb3.list = data.map((item) => { |
||||
|
return [ |
||||
|
{ type: "index" }, |
||||
|
item.userName, |
||||
|
item.gridName, |
||||
|
item.pointTotal, |
||||
|
]; |
||||
|
}); |
||||
|
this.tb3.srcList = data; |
||||
|
} else { |
||||
|
this.$message.error(msg); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" src="@/assets/scss/modules/visual/heart.scss" scoped></style> |
||||
Loading…
Reference in new issue