Browse Source

fangwuguanli

V1.0
jiangyy 3 years ago
parent
commit
1ede52cddb
  1. BIN
      src/assets/images/shuju/renfang/rkfx-bg-sel.png
  2. BIN
      src/assets/images/shuju/renfang/rkfx-bg.png
  3. 269
      src/views/dataBoard/renfang/cpts/rkfx.vue
  4. 32
      src/views/dataBoard/renfang/cpts/rkfxPieOption.js
  5. 4
      src/views/modules/base/community/buildForm.vue
  6. 4
      src/views/modules/base/community/buildTable.vue
  7. 33
      src/views/modules/base/community/communityForm.vue
  8. 4
      src/views/modules/base/community/communityTable.vue
  9. 4
      src/views/modules/base/community/roomForm.vue
  10. 6
      src/views/modules/base/community/roomTable.vue

BIN
src/assets/images/shuju/renfang/rkfx-bg-sel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

BIN
src/assets/images/shuju/renfang/rkfx-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

269
src/views/dataBoard/renfang/cpts/rkfx.vue

@ -1,14 +1,38 @@
<template>
<div class="rkyj-main">
<div class="title">
<div>预警居民类别</div>
<div>黄色预警(5-10)<img class="img"
src="@/assets/images/shuju/renfang/remark.png"
alt /></div>
<div>红色预警(10人以上)<img class="img"
src="@/assets/images/shuju/renfang/remark.png"
alt /></div>
<div class="list">
<div v-for="(dataitem,index) in listData"
:key="index"
:class="['item',{'item-sel':dataitem.sel}]"
@click="selItem(dataitem,index)">
{{dataitem.name}}
</div>
</div>
<div class="pie-main">
<div class="legend">
<div class="legend-row">
<div class="sexblue">男性</div>
<div class="content">
<div class="num">15632</div>
<div class="unit"></div>
</div>
</div>
<div class="legend-row">
<div class="sexyellow">女性</div>
<div class="content">
<div class="num">142632</div>
<div class="unit"></div>
</div>
</div>
</div>
<div class="pie">
<screen-echarts-frame @myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
</div>
</div>
</div>
@ -16,6 +40,8 @@
<script>
import { requestPost } from "@/js/dai/request";
import screenEchartsFrame from "@/views/dataBoard/cpts/screen-echarts-frame/index";
import { pieOption } from './rkfxPieOption.js'
export default {
props: {
@ -26,100 +52,211 @@ export default {
},
data () {
return {
showNoData: false,
timer: null,
pieChart: '',
pieOption: {},
pieInitState: false,
pieData: [],
listData: [
{
type: '低保人员',
yellow: 200,
red: 5,
name: '性别',
sel: true
},
{
name: '户籍',
sel: false
},
{
type: '失业人员',
yellow: 2,
red: 500,
name: '入户状况',
sel: false
},
{
type: '老年人',
yellow: 2000,
red: 5,
name: '年龄',
sel: false
},
{
type: '空巢老人',
yellow: 2,
red: 5,
name: '志愿者类别',
sel: false
},
{
type: '大病',
yellow: 2,
red: 5,
name: '党员文化程度',
sel: false
},
{
type: '慢病',
yellow: 2,
red: 5,
name: '下级人口分布',
sel: false
},
]
}
},
mounted () { },
methods: {},
components: {
screenEchartsFrame
},
mounted () {
this.getPie()
},
methods: {
selItem (selItem, selIndex) {
this.listData.forEach((element, index) => {
if (index === selIndex) {
element.sel = true
} else {
element.sel = false
}
});
},
pieInitOk () {
this.pieInitState = true
},
getPie () {
if (this.pieInitState) {
this.getPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
//
async getPieChart () {
this.$refs.pieChart.clear()
// this.$refs.pieChart.showLoading()
// pieChart
this.pieOption = pieOption()
//
this.pieData = [
{ value: 40, name: 'rose 1' },
{ value: 38, name: 'rose 2' },
]
this.pieOption.series[0].data = this.pieData;
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
},
},
};
</script>
<style lang="scss" scoped>
.rkyj-main {
.title {
margin: 24px 0 24px 24px;
.list {
margin-top: 8px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
.item {
margin-top: 8px;
background-image: url(../../../../assets/images/shuju/renfang/rkfx-bg.png);
background-size: cover;
flex: 0 0 117px;
.img {
margin-left: 4px;
width: 15px;
height: 15px;
height: 32px;
margin-right: 2px;
text-align: center;
align-items: center;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 32px;
cursor: pointer;
}
}
.list {
/deep/ .el-scrollbar__wrap {
// width: 100% !important;
overflow-x: hidden !important;
.item-sel {
background-image: url(../../../../assets/images/shuju/renfang/rkfx-bg-sel.png);
background-size: cover;
}
.g-scrollar {
// width: 100%;
height: 168px;
.item {
padding: 12px 20px 12px 24px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
}
.pie-main {
display: flex;
justify-content: space-between;
margin-left: 25px;
.legend {
// flex: 0 0 140px;
margin-top: 40px;
.legend-row {
margin-top: 15px;
display: flex;
justify-content: space-between;
align-items: center;
.item-title {
flex: 0 0 60px;
.sexblue {
position: relative;
margin-left: 5px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
line-height: 17px;
&::before {
content: "";
position: absolute;
top: 4px;
left: -15px;
width: 8px;
height: 8px;
background: #1a95ff;
}
}
.sexyellow {
position: relative;
margin-left: 5px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
line-height: 17px;
.item-num {
flex: 0 0 100px;
// text-align: right;
.img {
width: 32px;
height: 32px;
margin-right: 8px;
&::before {
content: "";
position: absolute;
top: 4px;
left: -15px;
width: 8px;
height: 8px;
background: #ff6138;
}
}
.content {
margin-left: 24px;
display: flex;
align-items: flex-end;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
}
.num {
font-size: 20px;
}
.unit {
margin-left: 5px;
font-size: 14px;
}
}
.item:nth-child(1) {
background: rgba(26, 149, 255, 0.15);
}
}
.pie {
margin-top: 32px;
flex: 0 0 280px;
height: 270px;
}
}
}

32
src/views/dataBoard/renfang/cpts/rkfxPieOption.js

@ -0,0 +1,32 @@
import * as echarts from 'echarts'
export function pieOption() {
const center = ["50%", "170px"];
return {
color: ['#1A95FF', '#FF6138'],
series: [
{
name: 'Nightingale Chart',
type: 'pie',
radius: [40, 130],
center: ['50%', '50%'],
roseType: 'area',
itemStyle: {
borderRadius: 1
},
label:{
normal:{
position:'inner',
show:true,
formatter:'{d}%',
fontSize:24,
color: "#FFFFFF",
}
},
data: [
]
}
]
};
}

4
src/views/modules/base/community/buildForm.vue

@ -285,9 +285,9 @@ export default {
let url = ''
if (this.formType === 'add') {
url = '/gov/org/building/buildingadd'
url = '/actual/base/communityBuilding/saveCommunityBuilding'
} else {
url = '/gov/org/building/buildingupdate'
url = '/actual/base/communityBuilding/updateCommunityBuilding'
this.dataForm.buildingId = this.buildingId
}

4
src/views/modules/base/community/buildTable.vue

@ -599,7 +599,7 @@ export default {
ids.push(element.buildingId)
});
const url = "/gov/org/house/delete"
const url = "/actual/base/communityHouse/deleteCommunityInfoByIds"
let params = {
type: 'building',
@ -629,7 +629,7 @@ export default {
},
async deleteBuild (row) {
const url = "/gov/org/building/buildingdel"
const url = "/actual/base/communityBuilding/deleteBuilding"
let params = {
buildingId: row.buildingId

33
src/views/modules/base/community/communityForm.vue

@ -20,7 +20,8 @@
v-model="dataForm.gridId"
placeholder="请选择"
clearable>
<el-option v-for="item in gridList"
<el-option v-for="(item,index) in gridList"
@click.native="handleSelGrid(index)"
:key="item.gridId"
:label="item.gridName"
:value="item.gridId">
@ -38,6 +39,16 @@
v-model="dataForm.neighborHoodName">
</el-input>
</el-form-item>
<el-form-item label="居民区类型"
prop="quartersType"
style="display: block">
<el-radio-group v-model="quartersType">
<el-radio :label="'0'">小区</el-radio>
<el-radio :label="'1'">片区</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="小区编码"
prop="coding"
style="display: block">
@ -213,11 +224,13 @@ export default {
btnDisable: false,
neighborHoodId: '', //ID
quartersType: '0',
dataForm: {
neighborHoodName: '', // 50
agencyId: '', // ID
agencyName: '',
gridId: '', //ID
gridName: '',
propertyId: '', //
address: '', //
remark: '', //500
@ -226,7 +239,8 @@ export default {
latitude: '', //
realBuilding: 0,
coding: '',
sysCoding: ''
sysCoding: '',
quartersType: ''// 01
},
propertyFormShow: false,
@ -244,6 +258,9 @@ export default {
},
methods: {
handleSelGrid (index) {
this.dataForm.gridName = this.gridList[index].gridName
},
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
@ -253,6 +270,7 @@ export default {
this.dataForm = JSON.parse(JSON.stringify(row))
this.dataForm.neighborHoodId = this.dataForm.id
this.neighborHoodId = this.dataForm.neighborHoodId
this.quartersType = this.dataForm.quartersType
} else {
this.dataForm.latitude = latitude
@ -301,7 +319,7 @@ export default {
let { msg, data } = await map.getAddress(lat, lng);
if (msg == "success") {
debugger
this.dataForm.address = data.address
this.searchValue = data.address
this.searchOptions = []
@ -421,6 +439,7 @@ export default {
setTimeout(() => {
this.btnDisable = false
}, 10000)
this.dataForm.quartersType = this.quartersType
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
@ -504,11 +523,13 @@ export default {
this.searchOptions = []
this.resultList = []
this.neighborHoodId = '' //ID
this.quartersType = '1'
this.dataForm = {
neighborHoodName: '', // 50
agencyId: '', // ID
agencyName: '',
gridId: '', //ID
gridName: '',
propertyId: '', //
address: '', //
remark: '', //500
@ -517,7 +538,8 @@ export default {
latitude: '', //
realBuilding: 0,
coding: '',
sysCoding: ''
sysCoding: '',
quartersType: ''
}
this.propertyFormShow = false
},
@ -549,6 +571,9 @@ export default {
trigger: 'blur'
}
],
quartersType: [
{ required: true, message: '居民区类型不能为空', trigger: 'blur' }
],
agencyId: [
{ required: true, message: '所属组织不能为空', trigger: 'blur' }
],

4
src/views/modules/base/community/communityTable.vue

@ -677,7 +677,7 @@ export default {
ids.push(element.neighborHoodId)
});
const url = "/gov/org/house/delete"
const url = "/actual/base/communityHouse/deleteCommunityInfoByIds"
let params = {
type: 'neighborHood',
@ -706,7 +706,7 @@ export default {
}
},
async deleteCommunity (row) {
const url = "/gov/org/neighborhood/neighborhooddel"
const url = "/actual/base/communityQuarters/deleteQuarters"
let params = {
neighborHoodId: row.neighborHoodId

4
src/views/modules/base/community/roomForm.vue

@ -358,9 +358,9 @@ export default {
let url = ''
if (this.formType === 'add') {
url = '/gov/org/house/houseadd'
url = '/actual/base/communityHouse/saveCommunityHouse'
} else {
url = '/gov/org/house/houseupdate'
url = '/actual/base/communityHouse/updateCommunityHouse'
this.dataForm.houseId = this.houseId
}

6
src/views/modules/base/community/roomTable.vue

@ -522,7 +522,7 @@ export default {
houseId: this.houseId,
};
const url = "/gov/org/house/houselist";
const url = "/actual/base/communityHouse/listHouses";
const { data, code, msg } = await requestPost(url, params);
@ -656,7 +656,7 @@ export default {
ids.push(element.houseId);
});
const url = "/gov/org/house/delete";
const url = "/actual/base/communityHouse/deleteCommunityInfoByIds";
let params = {
type: "house",
@ -686,7 +686,7 @@ export default {
},
async deleteRoom (row) {
const url = "/gov/org/house/housedel";
const url = "/actual/base/communityHouse/deleteHouse";
let params = {
houseId: row.houseId,

Loading…
Cancel
Save