Browse Source

Merge branch 'dev-shuju' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-shuju

shibei_master
13176889840 4 years ago
parent
commit
c9e1edee9e
  1. 4
      public/index.html
  2. BIN
      src/assets/img/shuju/sight.png
  3. 35
      src/assets/scss/modules/visual/heart.scss
  4. 326
      src/assets/scss/modules/visual/incident-info.scss
  5. 8
      src/router/index.js
  6. 581
      src/views/modules/visual/basicinfo/cpts/incident-info.vue
  7. 32
      src/views/modules/visual/basicinfo/people.vue
  8. 15
      src/views/modules/visual/cpts/tb.vue
  9. 283
      src/views/modules/visual/heart/index.vue

4
public/index.html

@ -36,8 +36,8 @@
<!-- 开发环境 -->
<% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
<script>
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.140/api'
window.SITE_CONFIG['apiURL'] = 'https://epmet-test.elinkservice.cn/api'
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.140/api'
// window.SITE_CONFIG['apiURL'] = 'https://epmet-test.elinkservice.cn/api'
// window.SITE_CONFIG['apiURL'] = 'http://118.190.150.119:41080/api'
// window.SITE_CONFIG['apiURL'] = 'https://epmet-dev.elinkservice.cn/api'
</script>

BIN
src/assets/img/shuju/sight.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

35
src/assets/scss/modules/visual/heart.scss

@ -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;
}
}

326
src/assets/scss/modules/visual/incident-info.scss

@ -0,0 +1,326 @@
@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: 1000px;
.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: 400px;
padding: 20px 0 20px 0;
overflow-y: auto;
}
.m-row {
display: flex;
justify-content: space-between;
}
.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;
}
}
}
}
}
}

8
src/router/index.js

@ -316,6 +316,14 @@ router.beforeEach((to, from, next) => {
},
],
},
{
icon: "icon-setting",
id: "2221321fefefaewfa123",
name: "初心互助",
url: "visual/heart/index",
children: [
],
},
];
fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]);
// next({ ...to, replace: true })

581
src/views/modules/visual/basicinfo/cpts/incident-info.vue

@ -4,62 +4,35 @@
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>更多信息</span>
<span>事件详情</span>
</div>
<div class="btn-close" @click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div
:key="'fieldSubList' + index"
v-for="(fieldSubList, index) in fieldList"
>
<div class="list">
<div class="item" v-if="index == 0">
<span class="item-field">所属网格</span>
<span>{{ gridName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属小区</span>
<span>{{ xiaoquName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属楼宇</span>
<span>{{ louName }}-{{ danyuanName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属家庭</span>
<span>{{ homeName }}</span>
</div>
<div class="item" :key="field.itemId" v-for="field in fieldSubList">
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
info[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
info[field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
info[field.columnName] == null ? "--" : info[field.columnName]
}}</span>
</div>
<div class="m-info">
<div class="info-title">事件内容</div>
<div class="info-content">{{ info.eventContent }}</div>
<div class="info-pics">
<img :src="src" :key="src" v-for="src in info.eventImgs" />
</div>
<div class="info-prop">
<span>提交时间</span>
<span>{{ info.eventTime }}</span>
</div>
<div class="info-prop">
<span>报事人</span>
<span>{{ info.eventPeopleName }}</span>
</div>
<div class="info-prop">
<span>所属网格</span>
<span>{{ info.gridName }}</span>
</div>
<div class="info-prop">
<span>提报给</span>
<span>{{ info.eventPerson.join("、") || "--" }}</span>
</div>
<div class="line"></div>
</div>
<div class="tabs">
@ -89,81 +62,107 @@
</div>
</div>
<div
:key="'group' + index"
v-show="groupIndex % groupList.length == index"
v-for="(group, index) in groupList"
>
<div v-if="group.tableName == 'ic_resi_demand' && Array.isArray(allInfo.ic_resi_demand) && allInfo.ic_resi_demand.length>0">
<div
class="list"
:key="'ic_resi_demand' + infoIndex"
v-for="(infoItem, infoIndex) in allInfo.ic_resi_demand"
>
<div
class="item"
:key="field.itemId"
v-for="field in group.itemList"
>
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
infoItem[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
infoItem[field.columnName],
field.itemType
)
}}</span
>
<div class="m-case">
<div class="m-tb" v-if="groupIndex == 1">
<cpt-tb
:col-list="comment.colList"
:loading="comment.loading"
:header="comment.header"
:list="comment.list"
></cpt-tb>
</div>
<span v-else>{{
infoItem[field.columnName] == null
? "--"
: infoItem[field.columnName]
}}</span>
<div class="m-row" v-if="groupIndex == 2">
<div class="m-info">
<div class="info-prop">
<span>项目标题</span>
<span>{{ projectInfo.projectTitle }}</span>
</div>
<div class="info-prop">
<span>项目方案</span>
<span>{{ projectInfo.projectTitle }}</span>
</div>
<div class="info-prop">
<span>内部备注</span>
<span>{{ projectInfo.internalRemark || "--" }}</span>
</div>
<div class="info-prop">
<span>当前处理部门</span>
<span>{{ projectInfo.departmentNameList.join("、") }}</span>
</div>
<div class="info-prop">
<span>分类</span>
<div>
<div :key="item" v-for="item in projectCate">
{{ item.name }}
</div>
</div>
</div>
<div class="info-prop">
<span>标签</span>
<div>
<div :key="item" v-for="item in projectTag">
{{ item.name }}
</div>
</div>
</div>
</div>
</div>
<div class="list" v-else>
<div
class="item"
:key="field.itemId"
v-for="field in group.itemList"
>
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: getOptionLabel(
field.options,
allInfo[group.tableName][0][field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: allInfo[group.tableName][0][field.columnName]
}}</span>
<div class="m-process" v-if="projectProcess.length > 0">
<div class="process-title">处理进展</div>
<div class="list">
<div
class="item"
:class="index === 0 ? 'z-on' : ''"
:key="item.processId"
v-for="(item, index) in projectProcess"
>
<div class="item-row">
<div class="name">{{ item.processName }}</div>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div
class="detail"
v-if="item.processName != '转项目' && item.publicReply"
>
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.publicReply }}</fold-text>
</div>
</div>
<div
class="detail"
v-if="item.processName != '转项目' && item.internalRemark"
>
<div class="detail-field">内部备注</div>
<div class="detail-value">
<fold-text :row="3">{{ item.internalRemark }}</fold-text>
</div>
</div>
<div class="detail">
<div class="attachement-list">
<a
:href="att.url"
target="_blank"
:key="att.url"
v-for="att in item.internalFile"
>
<i class="el-icon-folder-opened"></i>
{{ att.name }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@ -175,15 +174,13 @@
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import { requestPost } from "@/js/dai/request";
import cptTb from "@/views/modules/visual/cpts/tb";
import dateFormat from "dai-js/tools/dateFormat";
export default {
name: "demandInfo",
props: {
userId: {
type: String,
default: "",
},
gridName: {
resiEventId: {
type: String,
default: "",
},
@ -191,94 +188,92 @@ export default {
components: {
cptCard,
cptTb,
},
data() {
return {
fieldList: [],
groupList: [],
groupList: [
{ label: "研判分析" },
{ label: "查看回复" },
{ label: "查看项目" },
],
groupIndex: 0,
startGroupIndex: 0,
info: {},
allInfo: {},
xiaoquList: [],
louList: [],
danyuanList: [],
homeList: [],
info: {
eventTime: "",
eventContent: "",
eventAddress: "",
gridName: "",
isClosed: true,
isResolve: true,
isRollback: true,
eventImgs: [],
eventPerson: [],
eventOrg: [],
eventPeopleName: "",
projectInfo: {
projectId: "",
operationName: "",
operationTime: "",
projectDeclare: "",
},
},
comment: {
loading: true,
colList: [
{
align: "center",
width: "20%",
},
{
align: "center",
width: "30%",
},
{
align: "left",
width: "50%",
},
],
header: ["回复者", "回复时间", "回复内容"],
list: [],
},
projectProcess: [],
projectInfo: {
backGround: "",
departmentList: [
// { departmentName: "-", staffList: [""] },
],
departmentNameList: [],
internalRemark: "",
isSend: false,
locateAddress: "",
locateDimension: "",
locateLongitude: "",
origin: "",
originId: "",
platformIds: [],
processable: false,
projectId: "",
projectStatus: "pending",
projectTitle: "",
publicReply: "",
returnable: false,
},
projectCate: [],
projectTag: [],
};
},
computed: {
xiaoquName() {
const {
xiaoquList,
info: { VILLAGE_ID },
} = this;
if (Array.isArray(xiaoquList) && xiaoquList.length > 0 && VILLAGE_ID) {
let item = xiaoquList.find((item) => item.value == VILLAGE_ID);
if (item) {
return item.label;
}
}
return "";
},
louName() {
const {
louList,
info: { BUILD_ID },
} = this;
if (Array.isArray(louList) && louList.length > 0 && BUILD_ID) {
let item = louList.find((item) => item.value == BUILD_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
homeName() {
const {
homeList,
info: { HOME_ID },
} = this;
if (Array.isArray(homeList) && homeList.length > 0 && HOME_ID) {
let item = homeList.find((item) => item.value == HOME_ID);
if (item) {
return item.label;
}
}
return "";
},
},
computed: {},
watch: {
userId() {
resiEventId() {
this.getApiData();
},
},
@ -309,121 +304,40 @@ export default {
},
async getApiData() {
await this.getField();
this.getComment();
await this.getInfo();
this.getXiaoquList();
this.getLouList();
this.getDanyuanList();
this.getHomeList();
},
getOptionLabel(options, value, type = "") {
if (Array.isArray(options)) {
let valueArr = value.split(",");
if (type == "cascader") {
if (valueArr.length > 0) {
let level1 = options.find((item) => item.value == valueArr[0]);
if (level1) {
if (valueArr.length > 1 && level1.children) {
let level2 = level1.children.find(
(item) => item.value == valueArr[1]
);
if (level2) {
return level1.label + "-" + level2.label;
}
}
return level1.label;
}
}
} else {
return valueArr
.map((val) => {
let item = options.find((item) => item.value == val);
if (item && item.label) {
return item.label;
}
return "--";
})
.join("、");
}
}
return "--";
this.getProjectProcess();
this.getProjectInfo();
this.getProjectCate();
},
//
async getField() {
const url = "/oper/customize/icform/getcustomerform";
async getInfo() {
const url = "/gov/project/resievent/eventdetail-icdata";
const { data, code, msg } = await requestPost(url, {
dynamic: true,
formCode: "resi_base_info",
resiEventId: this.resiEventId,
});
if (code === 0) {
this.groupList = data.groupList;
this.fieldList = (function (arr) {
let col = [];
let ele = [];
for (let i = 0; i < arr.length; i++) {
let item = arr[i];
if (item.itemType == "divider" || i == arr.length - 1) {
col.push([...ele]);
ele = [];
} else {
ele.push(item);
}
}
return col;
})(data.itemList);
this.fieldList.forEach((subList, index) => {
subList.forEach(async (item, subIndex) => {
if (item.optionSourceType == "remote" && item.optionSourceValue) {
this.fieldList[index][subIndex].options = await this.getOptions(
item.optionSourceValue
);
}
});
});
this.info = data;
} else {
this.$message.error(msg);
}
},
//
async getInfo() {
const url = "/epmetuser/icresiuser/detail";
async getComment() {
const url = "/gov/project/resieventreply/list";
const { data, code, msg } = await requestPost(url, {
icResiUserId: this.userId,
formCode: "resi_base_info",
resiEventId: this.resiEventId,
});
this.comment.loading = false;
if (code === 0) {
this.info = data.ic_resi_user[0];
this.allInfo = data;
this.fieldList.forEach((subList, index) => {
subList.forEach((item, subIndex) => {
if (
item.itemType == "radio" &&
item.childGroup &&
this.allInfo[item.tableName] &&
this.allInfo[item.tableName][0][item.columnName] == "1"
) {
this.groupList = [...this.groupList, item.childGroup];
}
});
});
console.log("1111111111111111111111111", this.groupList);
this.groupList.forEach((subList, index) => {
subList.itemList.forEach(async (item, subIndex) => {
if (item.optionSourceType == "remote" && item.optionSourceValue) {
this.groupList[index].itemList[subIndex].options =
await this.getOptions(item.optionSourceValue);
}
});
this.comment.list = data.map((item) => {
return [item.replyName, item.replyTime, item.replyContent];
});
} else {
this.$message.error(msg);
@ -431,67 +345,60 @@ export default {
},
//
async getOptions(url) {
if (!url) return [];
const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
return data;
} else {
return [];
}
},
async getXiaoquList() {
const url = "/gov/org/icneighborhood/neighborhoodoption";
async getProjectProcess() {
const {
info: { projectInfo },
} = this;
if (!projectInfo || !projectInfo.projectId) return;
const url = "/gov/project/trace/processlist-v2";
const { data, code, msg } = await requestPost(url, {
agencyId: this.info.AGENCY_ID,
gridId: this.info.GRID_ID,
projectId: projectInfo.projectId,
});
if (code === 0) {
this.xiaoquList = data;
this.projectProcess = data.map((item) => {
item.processTime = dateFormat(new Date(item.processTime * 1000), "yyyy-MM-dd hh:mm");
return item;
});
} else {
this.$message.error(msg);
}
},
async getLouList() {
const url = "/gov/org/icbuilding/buildingoption";
const { data, code, msg } = await requestPost(url, {
neighborHoodId: this.info.VILLAGE_ID,
});
if (code === 0) {
this.louList = data;
} else {
this.$message.error(msg);
}
},
async getDanyuanList() {
const url = "/gov/org/icbuildingunit/unitoption";
//
async getProjectInfo() {
const {
info: { projectInfo },
} = this;
if (!projectInfo || !projectInfo.projectId) return;
const url = "/gov/project/trace/projectdetail";
const { data, code, msg } = await requestPost(url, {
buildingId: this.info.BUILD_ID,
projectId: projectInfo.projectId,
});
if (code === 0) {
this.danyuanList = data;
this.projectInfo = data;
} else {
this.$message.error(msg);
}
},
async getHomeList() {
const url = "/gov/org/ichouse/houseoption";
async getProjectCate() {
const {
info: { projectInfo },
} = this;
if (!projectInfo || !projectInfo.projectId) return;
const url = "/gov/project/projectcategory/categorytaglist";
const { data, code, msg } = await requestPost(url, {
unitId: this.info.UNIT_ID,
projectId: projectInfo.projectId,
});
if (code === 0) {
this.homeList = data;
this.projectCate = data.categoryList;
this.projectTag = data.tagList;
} else {
this.$message.error(msg);
}
@ -500,4 +407,8 @@ export default {
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/incident-info.scss"
scoped
></style>

32
src/views/modules/visual/basicinfo/people.vue

@ -375,8 +375,8 @@
v-for="(item, index) in topic.list"
@click="handleClickTopic(index)"
>
<div class="item-title">{{ item.eventContent }}</div>
<div class="item-date">{{ item.reportTime }}</div>
<div class="item-title">{{ item.topicContent }}</div>
<div class="item-date">{{ item.releaseTime }}</div>
</div>
</div>
@ -449,9 +449,8 @@
<incident-info
v-show="incident.showedInfo"
v-if="userId"
:userId="userId"
:gridName="info.gridName"
v-if="incident.list.length > 0"
:resiEventId="incident.list[incident.currentIndex].resiEventId"
@close="incident.showedInfo = false"
/>
@ -485,7 +484,7 @@ export default {
userId: "",
info: {
epmetUserId: "",
epmetUserIdList: [],
financialSituation: { monthlyIncome: "", retirementAmount: "" },
gridName: "",
houseInfo: [],
@ -594,7 +593,7 @@ export default {
cptTb,
demandInfo,
incidentInfo,
topicInfo
topicInfo,
},
watch: {
@ -676,8 +675,8 @@ export default {
async getDemandData() {
const url = "/heart/userdemand/mydemand";
let params = {
epmetUserId: this.info.epmetUserId,
userId: this.userId,
epmetUserIdList: this.info.epmetUserIdList,
icResiUserId: this.userId,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
};
@ -715,10 +714,9 @@ export default {
//
async getIncidentData() {
const url =
"http://yapi.elinkservice.cn/mock/245/gov/project/resievent/pageuserreported";
const url = "/gov/project/resievent/pageuserreported";
let params = {
epmetUserId: this.info.epmetUserId,
epmetUserIdList: this.info.epmetUserIdList,
userId: this.userId,
pageNo: this.incident.pageNo,
pageSize: this.incident.pageSize,
@ -747,10 +745,9 @@ export default {
//
async getTopicData() {
const url =
"http://yapi.elinkservice.cn/mock/245/gov/project/resievent/pageuserreported";
const url = "/data/aggregator/resigroup/pageusertopic";
let params = {
epmetUserId: this.info.epmetUserId,
epmetUserIdList: this.info.epmetUserIdList,
userId: this.userId,
pageNo: this.topic.pageNo,
pageSize: this.topic.pageSize,
@ -779,10 +776,9 @@ export default {
//
async getPointData() {
const url =
"http://yapi.elinkservice.cn/mock/245/point/resi/point/pageuserpoint";
const url = "/point/resi/point/pageuserpoint";
let params = {
epmetUserId: this.info.epmetUserId,
epmetUserIdList: this.info.epmetUserIdList,
userId: this.userId,
pageNo: this.point.pageNo,
pageSize: this.point.pageSize,

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

@ -21,9 +21,12 @@
<span v-if="typeof item === 'string' || typeof item === 'number'">{{
item
}}</span>
<span v-if="typeof item === 'object' && item.type == 'index'">{{
index + 1
}}</span>
<div v-if="typeof item === 'object' && 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.type == 'operate'"
v-for="btn in item.list"
@ -43,7 +46,7 @@
<div class="table-status" v-if="list.length == 0 && !loading">
<div class="no-data">
<img
src="../../../../assets/img/modules/visual/noData.png"
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
@ -109,6 +112,10 @@ export default {
type: Boolean,
default: true,
},
highlightTop3: {
type: Boolean,
default: false,
},
},
data() {
return {};

283
src/views/modules/visual/heart/index.vue

@ -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…
Cancel
Save