Browse Source

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

shibei_master
jiangyy 4 years ago
parent
commit
d577cde859
  1. 503
      src/views/modules/visual/basicinfo/cpts/demand-info.vue
  2. 8
      src/views/modules/visual/basicinfo/people.vue
  3. 69
      src/views/modules/visual/communityParty/community.vue
  4. 109
      src/views/modules/visual/communityParty/dialogInfo.vue
  5. 38
      src/views/modules/visual/communityParty/party.vue
  6. 3
      src/views/modules/visual/components/screen-table/index.vue
  7. 18
      src/views/modules/visual/cpts/analyse.vue
  8. 614
      src/views/modules/visual/measure/dialogInfo.vue
  9. 443
      src/views/modules/visual/measure/service.vue
  10. 150
      src/views/modules/visual/measure/volunteer.vue
  11. 20
      src/views/pages/login.vue

503
src/views/modules/visual/basicinfo/cpts/demand-info.vue

@ -1,503 +0,0 @@
<template>
<div class="m-pop">
<div class="wrap">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<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>
<div class="line"></div>
</div>
<div class="tabs">
<div
class="tab-btn"
@click="subStartGroupIndex"
v-if="groupList.length > 9"
>
<img src="@/assets/img/shuju/people/arrow-double-left.png" />
</div>
<div
v-show="index >= startGroupIndex && index < startGroupIndex + 9"
class="tab"
:class="groupIndex % groupList.length == index ? 'z-on' : ''"
:key="'tab' + index"
@click="groupIndex = index"
v-for="(item, index) in groupList"
>
{{ item.label }}
</div>
<div
class="tab-btn"
@click="addStartGroupIndex"
v-if="groupList.length > 9"
>
<img src="@/assets/img/shuju/people/arrow-double-right.png" />
</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
>
<span v-else>{{
infoItem[field.columnName] == null
? "--"
: infoItem[field.columnName]
}}</span>
</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>
</div>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import { requestPost } from "@/js/dai/request";
export default {
name: "demandInfo",
props: {
userId: {
type: String,
default: "",
},
gridName: {
type: String,
default: "",
},
},
components: {
cptCard,
},
data() {
return {
fieldList: [],
groupList: [],
groupIndex: 0,
startGroupIndex: 0,
info: {},
allInfo: {},
xiaoquList: [],
louList: [],
danyuanList: [],
homeList: [],
};
},
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 "";
},
},
watch: {
userId() {
this.getApiData();
},
},
mounted() {
this.getApiData();
},
methods: {
addStartGroupIndex() {
const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) {
this.startGroupIndex = startGroupIndex + 1;
} else {
this.startGroupIndex = groupList.length - 9;
}
},
subStartGroupIndex() {
const { startGroupIndex, groupList } = this;
if (startGroupIndex > 0) {
this.startGroupIndex = startGroupIndex - 1;
} else {
this.startGroupIndex = 0;
}
},
handleClose() {
this.$emit("close");
},
async getApiData() {
await this.getField();
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 "--";
},
//
async getField() {
const url = "/oper/customize/icform/getcustomerform";
const { data, code, msg } = await requestPost(url, {
dynamic: true,
formCode: "resi_base_info",
});
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
);
}
});
});
} else {
this.$message.error(msg);
}
},
//
async getInfo() {
const url = "/epmetuser/icresiuser/detail";
const { data, code, msg } = await requestPost(url, {
icResiUserId: this.userId,
formCode: "resi_base_info",
});
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);
}
});
});
} else {
this.$message.error(msg);
}
},
//
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";
const { data, code, msg } = await requestPost(url, {
agencyId: this.info.AGENCY_ID,
gridId: this.info.GRID_ID,
});
if (code === 0) {
this.xiaoquList = data;
} 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";
const { data, code, msg } = await requestPost(url, {
buildingId: this.info.BUILD_ID,
});
if (code === 0) {
this.danyuanList = data;
} else {
this.$message.error(msg);
}
},
async getHomeList() {
const url = "/gov/org/ichouse/houseoption";
const { data, code, msg } = await requestPost(url, {
unitId: this.info.UNIT_ID,
});
if (code === 0) {
this.homeList = data;
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style>

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

@ -440,10 +440,10 @@
</div>
<demand-info
v-show="showedDemandInfo"
v-if="userId"
v-if="demand.list.length > 0 && showedDemandInfo"
:userId="userId"
:gridName="info.gridName"
queryOrigin="personal-data"
:demandId="demand.srcList[demand.currentIndex].demandRecId"
@close="showedDemandInfo = false"
/>
@ -470,7 +470,7 @@ import { Loading } from "element-ui"; //引入Loading服务
import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
import demandInfo from "@/views/modules/visual/basicinfo/cpts/demand-info";
import demandInfo from "@/views/modules/visual/measure/dialogInfo";
import incidentInfo from "@/views/modules/visual/basicinfo/cpts/incident-info";
import topicInfo from "@/views/modules/visual/basicinfo/cpts/topic-info";
import cptTb from "@/views/modules/visual/cpts/tb";

69
src/views/modules/visual/communityParty/community.vue

@ -31,8 +31,8 @@
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
value-format="yyyy-MM-dd HH:mm:ss"
@change="handleSelectChange"
@clear="handleSelectChange">
:default-time="['00:00:00', '23:59:59']"
>
</el-date-picker>
</div>
</div>
@ -73,8 +73,8 @@
<div class="box-wr">
<div class="box-left box-left-w400">
<div v-for="item in partyItem"
:key="item.value"
<div v-for="(item, index) in partyItem"
:key="index"
class="box-left-item">
<div class="box-label">{{ item.label }}</div>
<div class="box-num"
@ -90,8 +90,8 @@
:showIconLayer="true"></screen-map>
</div>
<div class="map-tips">
<div v-for="item in partyItem"
:key="item.value"
<div v-for="(item, index) in partyItem"
:key="index"
class="map-tips-item">
<div class="map-tips-icon">
<img :src="item.icon" />
@ -103,7 +103,7 @@
</div>
</cpt-card>
<dialog-info v-show="showedMoreInfo"
<dialog-info v-show="showedMoreInfo" :info="detailInfo"
@close="showedMoreInfo = false" />
</div>
</template>
@ -225,6 +225,7 @@ export default {
longitude: 120.379455,
}
],
detailInfo: {}
};
},
async mounted () {
@ -238,6 +239,12 @@ export default {
await this.getWorkUserInfo()
await this.getMapUnitList()
},
watch: {
timeRange(val) {
console.log('val-www', val)
this.getList();
}
},
methods: {
//
@ -251,15 +258,20 @@ export default {
pageSize: this.pageSize,
pageNo: this.pageNo,
serviceMatter: this.serviceMatter,
startTime: this.timeRange.length > 0 && this.timeRange[0] || '',
endTime: this.timeRange.length > 0 && this.timeRange[1] || ''
startTime: this.timeRange && this.timeRange[0] || '',
endTime: this.timeRange && this.timeRange[1] || ''
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.total = data.total
this.tableData = data.list
this.tableData = data.list.map((item, index) => {
return {
...item,
index: index + 1
}
})
} else {
this.$message.error(msg)
}
@ -325,11 +337,11 @@ export default {
this.$message.error(msg)
}
},
async getDetail () {
async getDetail (id) {
const url = "/heart/icpartyactivity/detail"
let params = {
id: this.agencyId
id: id
}
const { data, code, msg } = await requestPost(url, params)
@ -340,6 +352,7 @@ export default {
this.$message.error(msg)
}
},
async loadUnit () {
const url = "/heart/icresidemanddict/subcodelist"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
@ -472,8 +485,11 @@ export default {
clickProject (feature) {
console.log('标注信息', feature.values_.properties)
},
handleLook(val) {
async handleLook(val) {
this.detailId = val.id
await this.getDetail(val.id)
this.showedMoreInfo = true
},
handleSelectChange () {
@ -506,6 +522,33 @@ export default {
.card-wr:last-child {
margin-left: 20px;
}
::v-deep .table-body {
overflow: auto;
&::-webkit-scrollbar {
width: 8px;
// background: linear-gradient(270deg, #0063FE, #0095FF);
}
&::-webkit-scrollbar-corner,
/* 滚动条角落 */
&::-webkit-scrollbar-thumb,
&::-webkit-scrollbar-track { /*滚动条的轨道*/
border-radius: 4px;
}
&::-webkit-scrollbar-corner,
&::-webkit-scrollbar-track {
/* 滚动条轨道 */
background: rgba(12, 129, 254, .24);
// box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5);
}
&::-webkit-scrollbar-thumb {
/* 滚动条手柄 */
background: linear-gradient(270deg, #0063FE, #0095FF);
}
}
}
.card-title {
display: flex;

109
src/views/modules/visual/communityParty/dialogInfo.vue

@ -4,77 +4,62 @@
<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 class="list-title">需求内容</div>
<!-- <div class="list-title">需求内容</div> -->
<div class="list-wr">
<div class="list">
<div class="item-desc">
<!-- <span class="item-field">所属网格</span> -->
<!-- <div class="item-desc">
<span>市北区同德花园小区物业管理服务公司的同志每天对该小区 公共部位喷洒消毒液进行消毒为杀灭新型冠状病毒近几 天以来市北区</span>
</div>
</div> -->
<div class="item">
<span class="item-field">所属网格</span>
<span>哈哈哈</span>
<span class="item-field">服务事项</span>
<span>{{ info.serviceMatterName }}</span>
</div>
<div class="item">
<span class="item-field">需求类型</span>
<span>的是法撒旦法</span>
<span class="item-field">单位名称</span>
<span>{{ info.unitName }}</span>
</div>
<div class="item">
<span class="item-field">需求状态</span>
<span>第三方士大夫</span>
<span class="item-field">活动标题</span>
<span>{{ info.title }}</span>
</div>
<div class="item">
<span class="item-field">上报类型</span>
<span>撒打发斯蒂芬</span>
<span class="item-field">活动内容</span>
<span class="item-content" v-html="info.content"></span>
</div>
<div class="item">
<span class="item-field"> </span>
<span>撒打发斯蒂芬</span>
<span class="item-field">服务人数</span>
<span>{{ info.peopleCount }}</span>
</div>
<div class="item">
<span class="item-field">上报人联系方式</span>
<span>撒打发斯蒂芬</span>
<span class="item-field">活动时间</span>
<span>{{ info.activityTime }}</span>
</div>
<div class="item">
<span class="item-field">上报时间</span>
<span>2021-09-17 12:52</span>
<span class="item-field">活动坐标</span>
<span>经度{{ info.latitude }} <br />
纬度{{ info.longitude }}</span>
</div>
<div class="item">
<span class="item-field">服务时间</span>
<span>2021-09-17 12:52</span>
<span class="item-field">活动地址</span>
<span>{{ info.address }}</span>
</div>
</div>
<div class="list">
<div class="item">
<span class="item-field">服务方</span>
<span>哈哈哈</span>
</div>
<div class="item">
<span class="item-field">实际服务时间</span>
<span>2021-09-17 12:52 <br/>
2021-09-17 17:52</span>
</div>
<div class="item">
<span class="item-field">完成情况</span>
<span>第三方士大夫</span>
</div>
<div class="item">
<span class="item-field">评价</span>
<span>
<el-rate :value="4" disabled></el-rate>
</span>
<span class="item-field">活动结果</span>
<span class="item-content" v-html="info.result"></span>
</div>
</div>
</div>
<div class="tabs">
<!-- <div class="tabs">
<div
class="tab-btn"
>
@ -95,7 +80,7 @@
<div style="padding: 30px 0;">
<analyse :single-list="demandList" :single-title="'需求上报'" :more-title="'事件上报'" :user-list="userLists"
:user-name="userName" :has-event="false" :more-list="eventList" />
</div>
</div> -->
</cpt-card>
@ -119,6 +104,7 @@ export default {
type: String,
default: "",
},
info: Object
},
components: {
@ -132,7 +118,7 @@ export default {
groupList: [],
groupIndex: 0,
startGroupIndex: 0,
info: {},
// info: {},
allInfo: {},
xiaoquList: [],
@ -371,6 +357,46 @@ export default {
margin-bottom: 15px;
font-size: 16px;
cursor: pointer;
.item-field {
// width: 100px;
flex-shrink: 0;
}
.item-content {
width: 100%;
max-height: 420px;
overflow-y: auto;
&::-webkit-scrollbar {
width: 8px;
// background: linear-gradient(270deg, #0063FE, #0095FF);
}
&::-webkit-scrollbar-corner,
/* 滚动条角落 */
&::-webkit-scrollbar-thumb,
&::-webkit-scrollbar-track { /*滚动条的轨道*/
border-radius: 4px;
}
&::-webkit-scrollbar-corner,
&::-webkit-scrollbar-track {
/* 滚动条轨道 */
background: rgba(12, 129, 254, .24);
// box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5);
}
&::-webkit-scrollbar-thumb {
/* 滚动条手柄 */
background: linear-gradient(270deg, #0063FE, #0095FF);
}
}
::v-deep p {
margin: 0;
img {
width: 100%;
height: 100%;
}
}
}
.item-desc {
font-size: 16px;
@ -392,4 +418,5 @@ export default {
padding: 0 32px;
}
</style>

38
src/views/modules/visual/communityParty/party.vue

@ -39,7 +39,7 @@
</div>
<div class="echarts-tips echarts-tips-wd50">
<div class="tips-lists">
<div v-for="item in ageItem" :key="item.value" class="tips-items">
<div v-for="(item, index) in ageItem" :key="index" class="tips-items">
<div class="tips-items-title" :class="'tips-items-title' + item.value">
{{ item.name }}
</div>
@ -155,7 +155,10 @@ export default {
tableData: [
// [1,'','','2',''],
],
noInit: false,
selectAgency: null,
ageTotalCount: 0,
eduTotalCount: 0,
propTree: [],
value2: '',
visibleLoading: true,
@ -319,6 +322,7 @@ export default {
this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
this.noInit = true
// option && this.$refs.pieChart.setOption(option);
},
@ -448,8 +452,10 @@ export default {
},
clickAgePie (seriesIndex) {
let _code = ''
this.ageItem.forEach((element, index) => {
if (index === seriesIndex) {
_code = element.code
element.label = {
show: true,
@ -461,7 +467,7 @@ export default {
}
};
console.log('zlcm')
console.log('zlcm', element)
} else {
element.label = {
show: false,
@ -478,14 +484,23 @@ export default {
}
});
this.pieAgeOptions.title.text = this.ageTotalCount
this.pieAgeOptions.series[1].data = this.ageItem
// this.$refs.pieChart.hideLoading()
this.$refs.ageChart.setOption(this.pieAgeOptions)
if (this.noInit) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getAgeList(_arr[0], orgType, _code)
}
this.noInit = true
},
clickEduPie (seriesIndex) {
let _code = ''
this.eduItem.forEach((element, index) => {
if (index === seriesIndex) {
_code = element.code
element.label = {
show: true,
@ -514,9 +529,18 @@ export default {
}
});
this.pieEduOptions.title.text = this.eduTotalCount
this.pieEduOptions.series[1].data = this.eduItem
// this.$refs.pieChart.hideLoading()
this.$refs.eduChart.setOption(this.pieEduOptions)
if (this.noInit) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getEduList(_arr[0], orgType, _code)
}
this.noInit = true
},
async getAgeCount(orgId, orgType) {
@ -533,6 +557,9 @@ export default {
name: item.label
}
})
data.forEach(item => {
this.ageTotalCount += Number(item.value)
})
this.initAgeCharts()
} else {
}
@ -551,11 +578,15 @@ export default {
name: item.label
}
})
data.forEach(item => {
this.eduTotalCount += Number(item.value)
})
this.initEduCharts()
} else {
}
},
async getAgeList(orgId, orgType, _code) {
this.visibleLoading = true
const url = "/epmetuser/icresiuser/partymemberagelist";
let params = {
@ -575,7 +606,9 @@ export default {
})
this.ageTotal = data.total
} else {
this.$message.error(msg)
}
// if (_code == 0 || _code) this.noInit = true
this.visibleLoading = false
},
async getEduList(orgId, orgType, _code) {
@ -597,6 +630,7 @@ export default {
})
this.total = data.total
} else {
this.$message.error(msg)
}
},
async getAgencyList(node, resolve) {

3
src/views/modules/visual/components/screen-table/index.vue

@ -251,6 +251,9 @@ export default {
text-align: center;
width: calc(100% / 5);
cursor: pointer;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.more {
font-size: 18px;
font-weight: 400;

18
src/views/modules/visual/cpts/analyse.vue

@ -134,7 +134,8 @@
class="analys-up analys-down" src="../../../../assets/img/shuju/measure/down-right.png" />
</div>
<div class="analys-col list-wr" :class="tempList.length > 2 && 'analys-col-wr' || 'analys-single'">
<div class="analys-col list-wr" :class="tempList.length > 2 && 'analys-col-wr' || 'analys-single'"
:style="'padding-top:' + (tempList.length - 3) * 190 + 'px;'">
<div class="cate-list">
<div v-for="(item, index) in tempList" :key="index" class="cate-row">
@ -446,9 +447,13 @@ export default {
// line-height: 15px;
background: #0C5CFE;
border-radius: 2px;
&-pending {
&-pending, &-canceled {
background: rgba(224, 84, 0, 1);
}
&-assigned, &-have_order {
background: rgba(9, 163, 125, 1);
}
}
.item-content {
font-size: 14px;
@ -474,6 +479,11 @@ export default {
.list {
height: 235px;
}
.cate-list {
.cate-row {
margin-bottom: 0;
}
}
}
.analys-col-posi {
// .analys-up, .analys-down {
@ -505,8 +515,8 @@ export default {
.list-wr::-webkit-scrollbar-corner,
/* 滚动条角落 */
.list::-webkit-scrollbar-thumb,
.scroll-container::-webkit-scrollbar-track { /*滚动条的轨道*/
.list-wr::-webkit-scrollbar-thumb,
.list-wr::-webkit-scrollbar-track { /*滚动条的轨道*/
border-radius: 4px;
}

614
src/views/modules/visual/measure/dialogInfo.vue

@ -0,0 +1,614 @@
<template>
<div class="m-pop">
<div class="wrap">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>需求详情</span>
</div>
<div class="btn-close" @click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="list-title">需求内容</div>
<div class="list-wr">
<div class="list">
<div class="item-desc">
<!-- <span class="item-field">所属网格</span> -->
<span>{{ info.content }}</span>
</div>
<div class="item">
<span class="item-field">所属网格</span>
<span>{{ info.gridName }}</span>
</div>
<div class="item">
<span class="item-field">需求类型</span>
<span>{{ info.categoryName }}</span>
</div>
<div class="item">
<span class="item-field">需求状态</span>
<span>{{ info.statusName }}</span>
</div>
<div class="item">
<span class="item-field">上报类型</span>
<span>{{ info.reportTypeName }}</span>
</div>
<div class="item">
<span class="item-field"> </span>
<span>{{ info.reportUserName }}</span>
</div>
<div class="item">
<span class="item-field">上报人联系方式</span>
<span>{{ info.reportUserMobile }}</span>
</div>
<div class="item">
<span class="item-field">上报时间</span>
<span>{{ info.reportTime }}</span>
</div>
<div class="item">
<span class="item-field">服务时间</span>
<span>{{ info.wantServiceTime }}</span>
</div>
</div>
<div class="list">
<div class="item">
<span class="item-field">服务方</span>
<span>{{ info.serviceShowName }}</span>
</div>
<div class="item">
<span class="item-field">实际服务时间</span>
<span v-if="info.serviceStartTime">{{ info.serviceStartTime }} <br/>
{{ info.serviceEndTime }}</span>
</div>
<div class="item">
<span class="item-field">完成情况</span>
<span>{{ info.finishResult == 'resolved' ? '已解决' : '未解决' }} <br /> {{ info.finishDesc }}</span>
</div>
<div class="item">
<span class="item-field">评价</span>
<span>
<el-rate :value="info.score" disabled></el-rate>
</span>
</div>
</div>
</div>
<div class="tabs">
<div
class="tab-btn"
>
<img src="@/assets/img/shuju/people/arrow-double-left.png" />
</div>
<div
class="tab z-on"
>
研判分析
</div>
<div
class="tab-btn"
>
<img src="@/assets/img/shuju/people/arrow-double-right.png" />
</div>
</div>
<div style="padding: 30px 0;">
<analyse
v-if="!loading"
:single-list="demandList"
:single-title="'需求上报'"
:more-title="'事件上报'"
:user-list="userLists"
:user-name="info.demandUserName"
:has-event="false"
:more-list="eventList"
@project="handleToProject"
@user="handleToUser"
/>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import analyse from '../cpts/analyse.vue'
import { requestPost } from "@/js/dai/request";
export default {
name: "dialogInfo",
props: {
userId: {
type: String,
default: "",
},
demandId: String,
queryOrigin: String
// info: Object,
},
components: {
cptCard,
analyse
},
data() {
return {
loading: false,
info: {},
demandList: [
// {
// categoryName: '',
// categoryCode: '1',
// showItem: false,
// projectList: [
// {
// title: '',
// status: 'closed',
// projectId: '1'
// },
// {
// title: '',
// status: 'closed',
// projectId: '2'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=3'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=4'
// },
// {
// title: '',
// status: 'closed',
// projectId: '5'
// },
// {
// title: '',
// status: 'closed',
// projectId: '6'
// }
// ]
// },
// {
// categoryName: '',
// categoryCode: '1',
// showItem: false,
// projectList: [
// {
// title: '',
// status: 'closed',
// projectId: '1'
// },
// {
// title: '',
// status: 'closed',
// projectId: '2'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=3'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=4'
// },
// {
// title: '',
// status: 'closed',
// projectId: '5'
// },
// {
// title: '',
// status: 'closed',
// projectId: '6'
// }
// ]
// },
// {
// categoryName: '',
// categoryCode: '1',
// showItem: false,
// projectList: [
// {
// title: '',
// status: 'closed',
// projectId: '1'
// },
// {
// title: '',
// status: 'closed',
// projectId: '2'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=3'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=4'
// },
// {
// title: '',
// status: 'closed',
// projectId: '5'
// },
// {
// title: '',
// status: 'closed',
// projectId: '6'
// }
// ]
// },
// {
// categoryName: '',
// categoryCode: '1',
// showItem: false,
// projectList: [
// {
// title: '',
// status: 'closed',
// projectId: '1'
// },
// {
// title: '',
// status: 'closed',
// projectId: '2'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=3'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=4'
// },
// {
// title: '',
// status: 'closed',
// projectId: '5'
// },
// {
// title: '',
// status: 'closed',
// projectId: '6'
// }
// ]
// },
// {
// categoryName: '',
// categoryCode: '1',
// showItem: false,
// projectList: [
// {
// title: '',
// status: 'closed',
// projectId: '1'
// },
// {
// title: '',
// status: 'closed',
// projectId: '2'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=3'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=4'
// },
// {
// title: '',
// status: 'closed',
// projectId: '5'
// },
// {
// title: '',
// status: 'closed',
// projectId: '6'
// }
// ]
// },
// {
// categoryName: '',
// categoryCode: '1',
// showItem: false,
// projectList: [
// {
// title: '',
// status: 'closed',
// projectId: '1'
// },
// {
// title: '',
// status: 'closed',
// projectId: '2'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=3'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=4'
// },
// {
// title: '',
// status: 'closed',
// projectId: '5'
// },
// {
// title: '',
// status: 'closed',
// projectId: '6'
// }
// ]
// },
// {
// categoryName: '',
// categoryCode: '1',
// showItem: false,
// projectList: [
// {
// title: '',
// status: 'closed',
// projectId: '1'
// },
// {
// title: '',
// status: 'closed',
// projectId: '2'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=3'
// },
// {
// title: '',
// status: 'closed',
// projectId: '1=4'
// },
// {
// title: '',
// status: 'closed',
// projectId: '5'
// },
// {
// title: '',
// status: 'closed',
// projectId: '6'
// }
// ]
// }
],
userLists: [
{
homeId: '1',
icUserId: '1',
icUserName: '沾上干'
},
{
homeId: '2',
icUserId: '2',
icUserName: '李四'
},
{
homeId: '3',
icUserId: '3',
icUserName: '王五哈哈'
}
],
userName: '王亚男哈',
eventList: [
{
categoryName: '辨明服务',
categoryCode: '1',
projectList: [
{
title: '不知道写了什么哈哈哈',
status: 'closed',
projectId: '1'
},
{
title: '罗里吧嗦写了什么哈哈哈',
status: 'closed',
projectId: '2'
},
{
title: '胡说八道写了什么哈哈哈',
status: 'closed',
projectId: '1=3'
},
{
title: '费眼飞鱼不知道写了什么哈哈哈',
status: 'closed',
projectId: '1=4'
},
{
title: '狗屁不通不知道写了什么哈哈哈',
status: 'closed',
projectId: '5'
},
{
title: '啦啦啦不知道写了什么哈哈哈',
status: 'closed',
projectId: '6'
}
]
},
{
categoryName: '水煮鱼辨明服务辨明服务',
categoryCode: '4',
projectList: [
{
title: '熟煮雨不知道写了什么哈哈哈',
status: 'pending',
projectId: '4'
}
]
},
{
categoryName: '开心麻花',
categoryCode: '2',
projectList: [
{
title: '不知道开心麻花写了什么哈哈哈',
status: 'closed',
projectId: '1'
}
]
},
{
categoryName: '酸菜鱼',
categoryCode: '3',
projectList: [
{
title: '不知道酸菜鱼写了什么哈哈哈',
status: 'pending',
projectId: '3'
}
]
}
],
};
},
async mounted() {
await this.getInfo(this.demandId)
},
methods: {
handleClose() {
this.$emit("close");
},
async getInfo(demandId) {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/heart/userdemand/demandDetail'
let params = {
demandRecId: demandId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
// console.log('data-org----dict', data)
this.info = data
this.getAnalyse()
} else {
this.$message.error(msg)
}
},
async getAnalyse() {
// const url = "/gov/org/customeragency/staffinagencylist";
this.loading = true
const url = '/heart/userdemand/demand-research-analysis'
let params = {
firstCategoryCode: this.info.firstCategoryCode,
icResiUserId: this.info.demandUserId,
epmetUserIdList: [this.info.epmetUserId],
queryOrigin: this.queryOrigin
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
console.log('data-org----a', data)
this.userLists = data.houseUserList.map(item => {
return {
...item,
icUserId: item.icResiUserId
}
})
this.demandList = data.demandData.map(item => {
return {
...item,
showItem: true,
categoryName: item.firstCategoryName,
categoryCode: item.firstCategoryCode,
projectList: item.demandList.map(n => {
return {
...n,
title: n.content,
status: n.status,
statusName: n.statusName,
projectId: n.demandRecId
}
})
}
})
console.log('demandList-dd', this.demandList)
} else {
this.$message.error(msg)
}
this.loading = false
},
handleToProject(val) {
console.log('val---v', val)
this.getInfo(val.projectId)
},
handleToUser(val) {
console.log('val-uuu', val)
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${val.icUserId}`,
});
}
}
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style>
<style lang="scss" scoped>
.m-pop {
.wrap {
.list {
display: block;
width: 50%;
.item {
display: flex;
width: 100%;
box-sizing: border-box;
margin-top: 0;
margin-bottom: 15px;
font-size: 16px;
cursor: pointer;
}
.item-desc {
font-size: 16px;
margin-bottom: 10px;
line-height: 24px;
}
}
}
.list-title {
width: 100%;
box-sizing: border-box;
padding: 20px 0 10px 62px;
font-size: 20px;
cursor: pointer;
}
}
.list-wr {
display: flex;
padding: 0 32px;
}
</style>

443
src/views/modules/visual/measure/service.vue

@ -4,26 +4,31 @@
<div class="card-title">
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
全部网格<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>黄金糕</el-dropdown-item>
<el-dropdown-item>狮子头</el-dropdown-item>
<el-dropdown-item>螺蛳粉</el-dropdown-item>
<el-dropdown-item>双皮奶</el-dropdown-item>
<el-dropdown-item>蚵仔煎</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-cascader
v-model="selectAgency"
:options="propTree"
:props="{ checkStrictly: true }"
:show-all-levels="false"
clearable
@change="handleCascader">
</el-cascader>
</div>
<div class="title-time">
<div class="title-time-label">选择时间</div>
<div class="">
<el-date-picker
<div class="second-select">
<!-- <el-date-picker
v-model="value2"
type="month"
placeholder="选择月">
</el-date-picker> -->
<el-date-picker v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
</div>
@ -117,6 +122,7 @@
:headerList="headerList"
:tableData="tableData"
:visibleLoading="visibleLoading"
@look="handleLook"
></screen-table>
<div class="pagination">
<el-pagination
@ -132,6 +138,12 @@
</div>
</div>
</cpt-card>
<dialog-info
v-if="showedMoreInfo"
:demandId="detailInfo.demandRecId"
:query-origin="'demand-analysis'"
@close="showedMoreInfo = false"
/>
</div>
</template>
@ -140,6 +152,7 @@ import { requestPost } from "@/js/dai/request";
import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
import dialogInfo from './dialogInfo'
import * as echarts from 'echarts';
export default {
@ -147,41 +160,60 @@ export default {
components: {
cptCard,
screenTable,
dialogInfo
},
data() {
return {
showedMoreInfo: false,
warningList: [],
headerList: [
{ title: "序号", coulmn: 'index' },
{ title: "需求类型", coulmn: 'gridName' },
{ title: "具体内容", coulmn: 'buildingName' },
{ title: "上报情况", coulmn: 'neighborhoodName' },
{ title: "上报人", coulmn: 'residentNames' },
{ title: "上报时间", coulmn: 'residentNames' },
{ title: "是否认领", coulmn: 'residentNames' },
{ title: "认领方", coulmn: 'residentNames' },
{ title: "认领时间", coulmn: 'residentNames' }
{ title: "状态", coulmn: 'statusName' },
{ title: "所属网格", coulmn: 'gridName' },
{ title: "需求类型", coulmn: 'categoryName' },
{ title: "需求内容", coulmn: 'content' },
{ title: "上报类型", coulmn: 'reportTypeName' },
{ title: "上报人", coulmn: 'reportUserName' },
{ title: "上报时间", coulmn: 'reportTime' },
{ title: "需求人", coulmn: 'gridName' },
{ title: "服务方", coulmn: 'serviceName' },
{ title: "服务时间", coulmn: 'wantServiceTime' },
],
categoryList: {},
timeRange: '',
tableData: [
// [1,'','','2',''],
],
reportDict: [],
selectAgency: '',
propTree: [],
value2: '',
visibleLoading: true,
pageNo: 1,
pageSize: 10,
total: 0,
activeIndex: 0,
activeLevel: "1",
detailInfo: {}
};
},
watch: {
timeRange(val) {
console.log('val-www', val)
if (!val) return false
this.handleCascader(this.selectAgency)
}
},
async mounted() {
this.initTime()
await nextTick(100);
this.initCharts()
await this.getAgencyList()
await this.getDict()
this.getServicePie(this.$store.state.user.agencyId, 'agency')
// this.initCharts()
// this.initChartType()
this.getBuildingwarnlist();
// this.getServiceList(this.$store.state.user.agencyId, 'agency');
},
methods: {
initCharts() {
initCharts(xData, yData) {
const eId = document.getElementById('echartsBox')
let _charts = echarts.init(eId)
@ -191,6 +223,38 @@ export default {
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
},
backgroundColor: 'transprant',
borderColor: 'transprant',
textStyle: {
color: '#fff'
},
formatter: params => {
let res;
let arr = []
let total = 0
const xName = params[0].axisValue
this.categoryList.forEach(item => {
if (item.categoryName === xName) {
arr = item.detail
total = item.total
}
})
let title = `<div style='margin-bottom: 10px;'><span>${xName}分类需求</span>${total}个</div>`
let desc = ''
let unit = '个'
arr.forEach(item => {
if (item.legendCode == 'volunteer') unit = '名'
else unit = '个'
if (item.legendCode == 'unfinished') {
desc += `<div><span>尚有 ${item.serviceDemandTotal} 个需求未完成</span></div>`
}else {
desc += `<div><span>共 ${item.totalService} ${unit} ${item.legendName} 完成需求 ${item.serviceDemandTotal} 个</span></div>`
}
})
res= title + desc
return res
}
},
legend: {
@ -209,9 +273,13 @@ export default {
xAxis: {
type: 'category',
axisLabel: {
color: '#fff'
color: '#fff',
interval: 0
},
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
axisTick: {
interval: 0
},
data: xData
},
yAxis: {
type: 'value',
@ -223,61 +291,34 @@ export default {
},
// axisLine: false
},
series: [
{
name: '区域化党建单位',
type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [320, 302, 301, 334, 390, 330, 320]
},
{
name: '社会组织',
type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '社区自组织',
type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '志愿者',
type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [150, 212, 201, 154, 190, 330, 410]
},
{
name: '未完成',
series: yData
};
option && _charts.setOption(option);
_charts.on('click', params => {
this.clickBar(params)
})
},
async getServicePie(orgId, orgType) {
const url = "/heart/userdemand/category-analysis";
let params = {
orgId,
orgType,
startDateId: this.timeRange && this.timeRange[0] || '',
endDateId: this.timeRange && this.timeRange[1] || ''
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
console.log('pie-data', data)
const { categoryList, legend } = data
this.categoryList = categoryList
let xData = categoryList.map(item => item.categoryName)
let yData = []
yData = legend.map(item => {
return {
name: item.legendName,
type: 'bar',
stack: 'total',
// barWidth: 20,
@ -287,68 +328,172 @@ export default {
emphasis: {
focus: 'series'
},
data: [820, 832, 901, 934, 1290, 1330, 1320]
data: categoryList.map(n => n.total)
}
]
};
option && _charts.setOption(option);
},
onClickList(index, level) {
this.activeIndex = index;
this.activeLevel = level;
this.pageNo = 1;
this.getUserwarnlist();
})
this.initCharts(xData, yData)
this.getServiceList(orgId, orgType, data.categoryList[0].categoryCode)
} else {
}
this.visibleLoading = false;
},
//
async getUserwarnlist() {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
async getServiceList(orgId, orgType, _code) {
const url = "/heart/userdemand/pagelist-analysis";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
orgId,
orgType,
pageNo: this.pageNo,
pageSize: this.pageSize,
categoryCode: _code || '',
startDateId: this.timeRange && this.timeRange[0] || '',
endDateId: this.timeRange && this.timeRange[1] || ''
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
tableData = data.list.map((item, index) => {
const status = {
pending: '待处理',
canceled: '已取消',
assigned: '已派单',
have_order: '已接单',
finished: '已完成',
}
// const type = {
// volunteer: '',
// social_org: '',
// community_org: '',
// party_unit: '',
// }
this.tableData = data.list.map((item, index) => {
return {
...item,
index: index + 1,
residentNames: item.residentNames || "暂无"
statusName: status[item.status],
reportTypeName: this.reportDict.filter(n => n.value === item.reportType)[0].label,
index: index + 1
}
});
this.tableData = tableData;
this.total = data.total;
})
this.total = data.total
} else {
}
this.visibleLoading = false;
},
async getAgencyList() {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/gov/org/customeragency/agencygridtree'
// let params = {
// agencyId: this.$store.state.user.agencyId,
// };
const { data, code, msg } = await requestPost(url);
if (code === 0) {
console.log('data-org----o', data)
this.selectAgency = [`${data.agencyId}-${data.level}`]
let arr = []
arr.push(data)
this.propTree = arr && this.getTreeData(arr)
} else {
this.$message.error(msg)
}
},
//
async getBuildingwarnlist() {
const url = "/epmetuser/statsresiwarn/buildingwarnlist";
async getDict() {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/sys/dict/data/dictlist'
let params = {
agencyId: this.$store.state.user.agencyId,
dictType: 'user_demand_report_type',
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.warningList = data;
this.visibleLoading = false;
this.getUserwarnlist();
console.log('data-org----dict', data)
this.reportDict = data
} else {
this.$message.error(msg)
}
},
getTreeData(data){
if (!Array.isArray(data)) return []
let arr = data.map(item => {
let _item = {}
if (item.subAgencyList) {
if (item.subAgencyList.length === 0) {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: undefined
}
} else _item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: this.getTreeData(item.subAgencyList)}
} else {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
}
}
return _item
})
return arr
},
initTime() {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
console.log('time-rtt', this.timeFormat(start), this.timeFormat(end))
this.timeRange = [this.timeFormat(start), this.timeFormat(end)]
},
timeFormat(date) {
if (!date || typeof date === 'string') {
return false
}
var y = date.getFullYear() //
var m = date.getMonth() + 1 //
if (m < 10) m = '0' + m
var d = date.getDate() //
if (d < 10) d = '0' + d
return y + '-' + m + '-' + d
},
clickBar(params) {
console.log('params---p', params)
let code = ''
this.categoryList.forEach(item => {
if (item.categoryName == params.name) code = item.categoryCode
})
if (code) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServiceList(_arr[0], orgType, code)
}
},
async handleLook(val) {
// this.detailId = val.id
this.detailInfo = val
// await this.getDetail(val.id)
this.showedMoreInfo = true
},
handleCascader(val) {
console.log('val-vvv', val)
if (val.length > 0) {
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServicePie(_arr[0], orgType)
}
},
pageSizeChangeHandleNew(val) {
this.pageNo = 1;
this.pageSize = val;
this.handleCascader(this.selectAgency)
},
pageCurrentChangeHandleNew(val) {
this.pageNo = val;
this.getUserwarnlist();
this.handleCascader(this.selectAgency)
},
},
};
@ -413,7 +558,67 @@ export default {
}
}
.title-label {
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 20px;
font-weight: 800;
color: #fff;
background: transparent;
border: 0;
}
.el-icon-arrow-down::before {
content: "\e790";
}
}
}
}
.second-select {
margin: 0 10px 0 0;
::v-deep .el-input {
width: 180px;
height: 36px;
.el-input__inner {
height: 100%;
padding: 0 10px;
color: #fff;
line-height: 36px;
background: #06186d;
border: 1px solid #1a64cc;
}
.el-icon-arrow-up:before {
content: "\e78f";
}
// .el-select__caret:before {
// content: '\E790'
// }
}
::v-deep .el-date-editor {
width: 360px;
position: relative;
background: #06186d;
border: 1px solid #1a64cc;
.el-range-input {
color: #fff;
background: #06186d;
}
.el-range-separator {
color: #fff;
}
.el-range__icon {
position: absolute;
right: 5px;
// float: right;
}
.el-input__prefix {
left: unset;
right: 5px;
}
}
}
.card-echart {
display: flex;
margin-top: 40px;

150
src/views/modules/visual/measure/volunteer.vue

@ -14,13 +14,13 @@
<div class="card-count">
<div class="card-count-item">
<div class="card-count-content">
<div class="card-count-num">6500</div>
<div class="card-count-num">{{ vInfo.partyTotal || 0 }}</div>
<div class="card-count-label">党员数量</div>
</div>
</div>
<div class="card-count-item">
<div class="card-count-content">
<div class="card-count-num">6500</div>
<div class="card-count-num">{{ vInfo.resiTotal || 0 }}</div>
<div class="card-count-label">居民数量</div>
</div>
</div>
@ -40,13 +40,13 @@
<div class="card-count">
<div class="card-count-item">
<div class="card-count-content">
<div class="card-count-num">6500</div>
<div class="card-count-num">{{ vInfo.partyServiceTotal || 0 }}</div>
<div class="card-count-label">党员数量</div>
</div>
</div>
<div class="card-count-item">
<div class="card-count-content">
<div class="card-count-num">6500</div>
<div class="card-count-num">{{ vInfo.resiServiceTotal || 0 }}</div>
<div class="card-count-label">居民数量</div>
</div>
</div>
@ -152,19 +152,24 @@ export default {
require('../../../../assets/img/shuju/volunteer8.png'),//
require('../../../../assets/img/shuju/volunteer9.png'),//
],
vPersonal: [],
vCount: [],
vpTotal: 0,
vcTotal: 0,
vInfo: {}
};
},
async mounted () {
await nextTick(100);
this.initCharts()
this.initCount()
this.getBuildingwarnlist();
this.getPie()
// this.initCharts()
// this.initCount()
await this.getWorkUserInfo()
await this.getMapUnitList()
},
methods: {
initCharts () {
initCharts (total, data) {
const eId = document.getElementById('echartService')
let _charts = echarts.init(eId)
let option = {
@ -180,7 +185,7 @@ export default {
}
},
title: {
text: '12000', //80%
text: total, //80%
subtext: '志愿者总数',
left: "center",
top: "center",
@ -213,29 +218,14 @@ export default {
}
},
data: [
{
value: 104,
name: '党员',
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
},
{
value: 735,
name: '居民',
itemStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}
]
data: data
}
]
}
option && _charts.setOption(option);
},
initCount () {
initCount (total, data) {
const eId = document.getElementById('echartCount')
let _charts = echarts.init(eId)
let option = {
@ -251,7 +241,7 @@ export default {
}
},
title: {
text: '12000', //80%
text: total, //80%
subtext: '志愿者服务总数',
left: "center",
top: "center",
@ -287,82 +277,65 @@ export default {
}
},
data: [
{
value: 1048,
name: '党员',
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
},
{
value: 735,
name: '居民',
itemStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}
]
data: data
}
]
}
option && _charts.setOption(option);
},
onClickList (index, level) {
this.activeIndex = index;
this.activeLevel = level;
this.pageNo = 1;
this.getUserwarnlist();
},
//
async getUserwarnlist () {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
pageNo: this.pageNo,
pageSize: this.pageSize,
};
const { data, code, msg } = await requestPost(url, params);
async getPie () {
const url = "/data/report/heart/demand/volunteer/service";
// let params = {
// agencyId: this.$store.state.user.agencyId,
// };
const { data, code, msg } = await requestPost(url);
if (code === 0) {
tableData = data.list.map((item, index) => {
return {
...item,
index: index + 1,
residentNames: item.residentNames || "暂无"
console.log('data-ddd', data)
this.vInfo = data
const arr = [{
name: '党员数量',
value: data.partyTotal,
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
});
this.tableData = tableData;
this.total = data.total;
}, {
name: '居民数量',
value: data.resiTotal,
itemStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}]
const arr1 = [{
name: '党员数量',
value: data.partyServiceTotal,
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
}, {
name: '居民数量',
value: data.resiServiceTotal,
temStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}]
this.vPersonal = [ ...arr ]
this.vCount = [ ...arr1 ]
this.vpTotal = data.volunteerTotal
this.vcTotal = data.serviceTotal
this.initCharts(data.volunteerTotal, arr)
this.initCount(data.serviceTotal, arr1)
} else {
this.$message.error(msg)
}
},
//
async getBuildingwarnlist () {
const url = "/epmetuser/statsresiwarn/buildingwarnlist";
let params = {
agencyId: this.$store.state.user.agencyId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.warningList = data;
this.visibleLoading = false;
this.getUserwarnlist();
} else {
}
},
pageSizeChangeHandleNew (val) {
this.pageNo = 1;
this.pageSize = val;
},
pageCurrentChangeHandleNew (val) {
this.pageNo = val;
this.getUserwarnlist();
},
//
@ -595,7 +568,7 @@ export default {
.map-tips {
width: 700px;
display: flex;
justify-content: start;
// justify-content: start;
flex-wrap: wrap;
padding-top: 10px;
padding-bottom: 20px;
@ -623,13 +596,14 @@ export default {
}
.card-wr-map {
height: calc(100vh - 110px);
height: calc(100vh - 150px);
text-align: center;
.card-map {
margin-top: 10px;
width: 100%;
height: calc(100vh - 295px);
// height: calc(100vh - 285px);
height: calc(100vh - 315px);
.map {
width: 100%;

20
src/views/pages/login.vue

@ -182,6 +182,26 @@ export default {
const params = {
phone: this.dataForm.phone
}
// this.$http
// .post(url, params).then(({ data })=> {
// console.log('res--comll', data)
// if (data.data.length === 0) {
// //
// this.$message.error('')
// this.endLoading()
// } else if (data.data.length === 1) {
// this.selectCustomer(data.data[0])
// } else {
// this.endLoading()
// this.diaVisible = true
// this.$nextTick(() => {
// this.tableData = data.data
// })
// }
// }).catch((err) => {
// this.endLoading()
// this.$message.error(err)
// })
window.app.ajax.post(
url,
params,

Loading…
Cancel
Save