Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_webapp into dev
This commit is contained in:
@@ -116,7 +116,6 @@ export default {
|
|||||||
label: 'girdName',
|
label: 'girdName',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
expandTrigger: 'hover',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -155,7 +154,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
console.log(res.data.records);
|
|
||||||
this.tableData = res.data.records
|
this.tableData = res.data.records
|
||||||
this.page.total = res.data.total
|
this.page.total = res.data.total
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card_list">
|
<div class="card_list">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h2>剩余积分汇总<i class="el-icon-warning-outline"></i></h2>
|
<h2>剩余积分汇总
|
||||||
|
<el-tooltip
|
||||||
|
placement="right"
|
||||||
|
style="width: 240px;"
|
||||||
|
content="截止目前所有网格员剩余可用积分余额的总和">
|
||||||
|
<i class="iconfont iconModal_Warning"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
</h2>
|
||||||
<p class="color1">{{ data.nowIntegral || 0 }}</p>
|
<p class="color1">{{ data.nowIntegral || 0 }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -28,12 +35,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="echertsBox">
|
<div class="echertsBox">
|
||||||
<div class="left_Box">
|
<div class="left_Box">
|
||||||
<div id="chart1" style="height: 300px; width: 100%;"></div>
|
<p>个人积分排行</p>
|
||||||
<ai-empty v-if="false" style="height: 300px;"></ai-empty>
|
<div>
|
||||||
|
<div id="chart1" style="height: 300px; width: 100%;" v-show="userSortListX.length && userSortListY.length"></div>
|
||||||
|
<ai-empty v-show="!userSortListX.length && !userSortListY.length" style="height: 200px; width: 100%;" id="empty"></ai-empty>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right_Box">
|
<div class="right_Box">
|
||||||
<div id="chart2" style="height: 300px; width: 100%;"></div>
|
<p>网格积分排行</p>
|
||||||
<ai-empty v-if="false" style="height: 300px;"></ai-empty>
|
<div>
|
||||||
|
<div id="chart2" style="height: 300px; width: 100%;" v-show="girdSortListX.length && girdSortListY.length"></div>
|
||||||
|
<ai-empty v-show="!girdSortListX.length && !girdSortListY.length" style="height: 200px; width: 100%;" id="empty"></ai-empty>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -43,15 +56,17 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<el-cascader ref="cascader1" v-model="girdId" :options="girdOptions" placeholder="所属网格" size="small"
|
<el-cascader ref="cascader2" v-model="search.girdId" :options="girdOptions" placeholder="所属网格" size="small"
|
||||||
:props="defaultProps" :show-all-levels="false" @change="gridChange"></el-cascader>
|
:props="defaultProps" :show-all-levels="false" clearable @change="gridChangeOpt"></el-cascader>
|
||||||
<!-- <el-date-picker v-model="time" size="small" type="daterange" value-format="yyyy-MM-dd"
|
<ai-select v-model="search.integralType" placeholder="请选择类型" @change="page.current=1, getTableData()"
|
||||||
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
|
:selectList="dict.getDict('integralDetailType')"/>
|
||||||
</el-date-picker> -->
|
<el-date-picker v-model="time" size="small" type="daterange" value-format="yyyy-MM-dd"
|
||||||
|
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="onChange">
|
||||||
|
</el-date-picker>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input size="small" placeholder="请输入居民名称或真实姓名" v-model="search.name" clearable
|
<el-input size="small" placeholder="请输入居民名称或真实姓名" v-model="search.userName" clearable
|
||||||
@clear="page.current = 1, search.name = '', getTableData()" suffix-icon="iconfont iconSearch"
|
@clear="page.current = 1, search.userName = '', getTableData()" suffix-icon="iconfont iconSearch"
|
||||||
v-throttle="() => {(page.current = 1), getTableData();}" />
|
v-throttle="() => {(page.current = 1), getTableData();}" />
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
@@ -75,13 +90,15 @@
|
|||||||
<ai-detail>
|
<ai-detail>
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-wrapper>
|
<ai-wrapper>
|
||||||
<ai-info-item label="户主"/>
|
<ai-info-item label="姓名" :value="details.integralUserName" />
|
||||||
<ai-info-item label="对象"/>
|
<ai-info-item label="所属网格" :value="details.girdName"/>
|
||||||
<ai-info-item label="事件" isLine/>
|
<ai-info-item label="事件" isLine :value="details.eventDesc"/>
|
||||||
<ai-info-item label="时间" isLine/>
|
<ai-info-item label="时间" isLine :value="details.createTime"/>
|
||||||
<ai-info-item label="积分"/>
|
<ai-info-item label="积分">{{ details.integralCalcType==0? '-' : '+' }}{{ details.changeIntegral }}</ai-info-item>
|
||||||
<ai-info-item label="积分余额"/>
|
<ai-info-item label="积分余额" :value="details.nowIntegral"/>
|
||||||
<ai-info-item label="凭证" isLine></ai-info-item>
|
<ai-info-item label="凭证" isLine v-if="fileDownLoad.length">
|
||||||
|
<ai-file-list :fileList="fileDownLoad" style="width: 200px;"></ai-file-list>
|
||||||
|
</ai-info-item>
|
||||||
</ai-wrapper>
|
</ai-wrapper>
|
||||||
</template>
|
</template>
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
@@ -112,23 +129,25 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name: "积分统计",
|
|
||||||
myChart1: null,
|
myChart1: null,
|
||||||
myChart2: null,
|
myChart2: null,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
search: {
|
search: {
|
||||||
current: 1,
|
current: 1,
|
||||||
name: '',
|
userName: '',
|
||||||
girdId: '',
|
girdId: '',
|
||||||
|
integralType: '',
|
||||||
|
startTime: '',
|
||||||
|
endTime: '',
|
||||||
},
|
},
|
||||||
page: {current: 1, size: 10, total: 0},
|
page: {current: 1, size: 10,total: 0,},
|
||||||
girdList: [],
|
girdList: [],
|
||||||
time: '',
|
time: [],
|
||||||
timeCheck: ['昨日','近7天','近30天','自定义'],
|
timeCheck: ['昨日','近7天','近30天','自定义'],
|
||||||
dialog: false,
|
dialog: false,
|
||||||
dialogDate: false,
|
dialogDate: false,
|
||||||
timeList: '',
|
timeList: [],
|
||||||
type: '0',
|
type: '1',
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
data: {},
|
data: {},
|
||||||
@@ -138,8 +157,13 @@ export default {
|
|||||||
label: 'girdName',
|
label: 'girdName',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
expandTrigger: 'hover',
|
},
|
||||||
}
|
details: {},
|
||||||
|
fileDownLoad: [],
|
||||||
|
userSortListX: [],
|
||||||
|
userSortListY: [],
|
||||||
|
girdSortListX: [],
|
||||||
|
girdSortListY: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -165,11 +189,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$dict.load('epidemicDangerousAreaLevel')
|
this.$dict.load('epidemicDangerousAreaLevel').then(() => {
|
||||||
this.getStatistics()
|
this.getStatistics()
|
||||||
this.getGridList()
|
this.getGridList()
|
||||||
this.getRanking()
|
this.getRanking()
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 统计接口
|
// 统计接口
|
||||||
@@ -198,7 +223,14 @@ export default {
|
|||||||
endTime: this.endTime
|
endTime: this.endTime
|
||||||
}
|
}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res);
|
if(res?.data) {
|
||||||
|
this.userSortListX = res.data.userSortList.map(e=> e.userName).reverse();
|
||||||
|
this.userSortListY = res.data.userSortList.map(e=> e.changeIntegral).reverse()
|
||||||
|
this.girdSortListX = res.data.girdSortList.map(e=> e.girdName).reverse();
|
||||||
|
this.girdSortListY = res.data.girdSortList.map(e=> e.changeIntegral).reverse()
|
||||||
|
this.getColEcherts1(this.userSortListX,this.userSortListY)
|
||||||
|
this.getColEcherts2(this.girdSortListX,this.girdSortListY)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 积分明细
|
// 积分明细
|
||||||
@@ -206,11 +238,7 @@ export default {
|
|||||||
this.instance.post('/app/appintegraluser/girdIntegralDetail',null,{
|
this.instance.post('/app/appintegraluser/girdIntegralDetail',null,{
|
||||||
params: {
|
params: {
|
||||||
...this.page,
|
...this.page,
|
||||||
girdId: this.girdIdUser,
|
...this.search,
|
||||||
integralType: this.integralType,
|
|
||||||
startTime: this.startTime,
|
|
||||||
endTime: this.endTime,
|
|
||||||
name: this.search.name,
|
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
@@ -220,15 +248,17 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getColEcherts1() {
|
gridChangeOpt(val) {
|
||||||
|
this.search.girdId = val?.[val.length - 1]
|
||||||
|
this.$refs.cascader2.dropDownVisible = false;
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
|
||||||
|
getColEcherts1(xData,yData) {
|
||||||
let chartDom1 = document.getElementById('chart1');
|
let chartDom1 = document.getElementById('chart1');
|
||||||
chartDom1.style.width = (window.innerWidth - 435) / 2 + "px";
|
chartDom1.style.width = (window.innerWidth - 435) / 2 + "px";
|
||||||
this.myChart1 = echarts.init(chartDom1);
|
this.myChart1 = echarts.init(chartDom1);
|
||||||
this.myChart1.setOption({
|
this.myChart1.setOption({
|
||||||
|
|
||||||
title: {
|
|
||||||
text: '个人积分排行'
|
|
||||||
},
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
@@ -239,7 +269,7 @@ export default {
|
|||||||
left: '16px',
|
left: '16px',
|
||||||
right: '28px',
|
right: '28px',
|
||||||
bottom: '14px',
|
bottom: '14px',
|
||||||
top: '50px',
|
top: '16px',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
@@ -248,7 +278,7 @@ export default {
|
|||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['Brazil', 'Indonesia', 'India', 'China', 'World'],
|
data: xData,
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
@@ -259,7 +289,7 @@ export default {
|
|||||||
|
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: [120, 200, 150, 80, 70,],
|
data: yData,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
@@ -281,14 +311,11 @@ export default {
|
|||||||
}, true);
|
}, true);
|
||||||
window.addEventListener("resize", this.onResize)
|
window.addEventListener("resize", this.onResize)
|
||||||
},
|
},
|
||||||
getColEcherts2() {
|
getColEcherts2(xData,yData) {
|
||||||
let chartDom2 = document.getElementById('chart2');
|
let chartDom2 = document.getElementById('chart2');
|
||||||
chartDom2.style.width = (window.innerWidth - 435) / 2 + "px";
|
chartDom2.style.width = (window.innerWidth - 435) / 2 + "px";
|
||||||
this.myChart2 = echarts.init(chartDom2);
|
this.myChart2 = echarts.init(chartDom2);
|
||||||
this.myChart2.setOption({
|
this.myChart2.setOption({
|
||||||
title: {
|
|
||||||
text: '网格积分排行'
|
|
||||||
},
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
@@ -299,7 +326,7 @@ export default {
|
|||||||
left: '16px',
|
left: '16px',
|
||||||
right: '28px',
|
right: '28px',
|
||||||
bottom: '14px',
|
bottom: '14px',
|
||||||
top: '50px',
|
top: '16px',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
@@ -308,7 +335,7 @@ export default {
|
|||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['Brazil', 'Indonesia', 'India', 'China', 'World'],
|
data: xData,
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
@@ -318,7 +345,7 @@ export default {
|
|||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: [120, 200, 150, 80, 70,],
|
data: yData,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
@@ -396,10 +423,19 @@ export default {
|
|||||||
this.getDetail(id)
|
this.getDetail(id)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onChange(val) {
|
||||||
|
this.search.startTime = val?.[0]
|
||||||
|
this.search.endTime = val?.[1]
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
|
||||||
getDetail(id) {
|
getDetail(id) {
|
||||||
this.instance.post(`/app/appintegraldetail/queryDetailById?id=${id}`).then(res=> {
|
this.instance.post(`/app/appintegraldetail/queryDetailById?id=${id}`).then(res=> {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
console.log(res.data);
|
this.details = res.data
|
||||||
|
if(res.data.enclosure) {
|
||||||
|
this.fileDownLoad = [{ url:res.data.enclosure }]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -412,6 +448,7 @@ export default {
|
|||||||
this.endTime = this.timeList?.[1]
|
this.endTime = this.timeList?.[1]
|
||||||
this.dialogDate = false
|
this.dialogDate = false
|
||||||
this.getStatistics()
|
this.getStatistics()
|
||||||
|
this.getRanking()
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -516,9 +553,11 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
.left_Box {
|
.left_Box {
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
.right_Box {
|
.right_Box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left_Box,
|
.left_Box,
|
||||||
@@ -531,7 +570,10 @@ export default {
|
|||||||
#chart1,
|
#chart1,
|
||||||
#chart2 {
|
#chart2 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 260px;
|
height: 300px;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AiWorkflow from "./AiWorkflow";
|
import AiWorkflow from "./AiWorkflow";
|
||||||
|
import {mapActions} from "vuex"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "add",
|
name: "add",
|
||||||
@@ -55,6 +56,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(['getWorkflowConfigs']),
|
||||||
getDetail() {
|
getDetail() {
|
||||||
let {id} = this.$route.query
|
let {id} = this.$route.query
|
||||||
id && this.instance.post("/app/appworkflowmanage/queryDetailById", null, {
|
id && this.instance.post("/app/appworkflowmanage/queryDetailById", null, {
|
||||||
@@ -78,6 +80,7 @@ export default {
|
|||||||
this.instance.post("/app/appworkflowmanage/addOrUpdate", {...this.form, config}).then(res => {
|
this.instance.post("/app/appworkflowmanage/addOrUpdate", {...this.form, config}).then(res => {
|
||||||
if (res?.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$message.success("提交成功!")
|
this.$message.success("提交成功!")
|
||||||
|
this.getWorkflowConfigs()
|
||||||
this.back()
|
this.back()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,12 +9,11 @@
|
|||||||
@change="page.current=1,getTableData()"/>
|
@change="page.current=1,getTableData()"/>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
|
|
||||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
||||||
<el-table-column slot="options" label="操作" fixed="right" align="center" width="300">
|
<el-table-column slot="options" label="操作" fixed="right" align="center" width="300">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button type="text" @click="showProcess(row.config)">查看进度</el-button>
|
<el-button type="text" @click="showProcess(row.workflowConfig)">查看进度</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
@@ -46,8 +45,9 @@ export default {
|
|||||||
page: {current: 1, size: 10, total: 0},
|
page: {current: 1, size: 10, total: 0},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{prop: "name", label: "流程名称"},
|
{prop: "pid", label: "流程ID"},
|
||||||
{prop: "app", label: "对应应用"}
|
{prop: "bid", label: "业务ID"},
|
||||||
|
{prop: "createUserName", label: "创建者"},
|
||||||
],
|
],
|
||||||
dialog: false,
|
dialog: false,
|
||||||
process: null
|
process: null
|
||||||
@@ -55,7 +55,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getTableData() {
|
getTableData() {
|
||||||
this.instance.post("/app/appworkflowmanage/list", null, {
|
this.instance.post("/app/appworkflowlog/list", null, {
|
||||||
params: {...this.page, ...this.search}
|
params: {...this.page, ...this.search}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
@@ -80,5 +80,6 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.workflowLogs {
|
.workflowLogs {
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ export default {
|
|||||||
detail: ResidentDetail
|
detail: ResidentDetail
|
||||||
})),
|
})),
|
||||||
{label: "居民统计", value: "3", comp: ResidentSta},
|
{label: "居民统计", value: "3", comp: ResidentSta},
|
||||||
{label: "居民档案审核", value: "4", comp: auditList, detail: auditDetail}
|
{label: "居民档案审核", value: "4", comp: auditList, detail: auditDetail, permit: "app_appresident_examine"}
|
||||||
]
|
].filter(e => !e.permit || this.permissions(e.permit))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -202,7 +202,8 @@
|
|||||||
</ai-card>
|
</ai-card>
|
||||||
<tags-manage v-if="currentTab=='0'&&baseInfo.id&&permissions('app_appresidentlabelinfo_detail')" v-bind="$props" :resident-id="baseInfo.id"/>
|
<tags-manage v-if="currentTab=='0'&&baseInfo.id&&permissions('app_appresidentlabelinfo_detail')" v-bind="$props" :resident-id="baseInfo.id"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="资产信息" lazy>
|
<!--暂时用审核的权限码控制,后端没时间加-->
|
||||||
|
<el-tab-pane label="资产信息" lazy v-if="permissions('app_appresident_examine')">
|
||||||
<personal-assets v-if="currentTab==1&&baseInfo.id" :resident-id="baseInfo.id" v-bind="$props"/>
|
<personal-assets v-if="currentTab==1&&baseInfo.id" :resident-id="baseInfo.id" v-bind="$props"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="特殊人群" lazy v-if="hasSpecial">
|
<el-tab-pane label="特殊人群" lazy v-if="hasSpecial">
|
||||||
|
|||||||
4
project/sass/apps.import.json
Normal file
4
project/sass/apps.import.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"AppResident": "居民档案",
|
||||||
|
"AppResidentTags": "标签管理"
|
||||||
|
}
|
||||||
@@ -1,191 +0,0 @@
|
|||||||
<template>
|
|
||||||
<section class="AppResident">
|
|
||||||
<ai-list v-if="!showDetail" isTabs>
|
|
||||||
<ai-title slot="title" title="居民档案"></ai-title>
|
|
||||||
<template #tabs>
|
|
||||||
<el-tabs v-model="activeName">
|
|
||||||
<el-tab-pane v-for="op in tabs" :key="op.value" :name="op.value" :label="op.label">
|
|
||||||
<component v-if="op.value==activeName" :is="op.comp" :areaId="areaId" :active="activeName"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</template>
|
|
||||||
</ai-list>
|
|
||||||
<component v-else :is="detailComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
|
|
||||||
</section>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import {mapState} from "vuex";
|
|
||||||
import localResident from "./localResident";
|
|
||||||
import ListTpl from "./listTpl";
|
|
||||||
import MobileResident from "./mobileResident";
|
|
||||||
import ResidentSta from "./residentSta";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "AppResident",
|
|
||||||
label: "居民档案",
|
|
||||||
props: {
|
|
||||||
instance: Function,
|
|
||||||
dict: Object,
|
|
||||||
permissions: Function,
|
|
||||||
},
|
|
||||||
provide() {
|
|
||||||
return {
|
|
||||||
resident: this
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {ResidentSta, MobileResident, ListTpl, localResident},
|
|
||||||
computed: {
|
|
||||||
...mapState(["user"]),
|
|
||||||
tabs() {
|
|
||||||
let details = {
|
|
||||||
"本地居民": localResident,
|
|
||||||
"流动人员": MobileResident,
|
|
||||||
}
|
|
||||||
return [
|
|
||||||
...this.dict.getDict('residentType').map(e => ({
|
|
||||||
label: e.dictName,
|
|
||||||
value: e.dictValue,
|
|
||||||
comp: ListTpl,
|
|
||||||
detail: details[e.dictName]
|
|
||||||
}))
|
|
||||||
]
|
|
||||||
},
|
|
||||||
hideLevel() {
|
|
||||||
return this.user.info.areaList?.length || 0
|
|
||||||
},
|
|
||||||
showDetail() {
|
|
||||||
this.activeName = this.activeName || this.$route.query?.type || 0
|
|
||||||
return !!this.$route.query?.type || !!this.$route.query?.id
|
|
||||||
},
|
|
||||||
detailComponent() {
|
|
||||||
return this.tabs.find(e => e.value == this.activeName)?.detail || ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
areaId: '',
|
|
||||||
activeName: "0",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.activeName = this.$route.query?.type
|
|
||||||
// this.areaId = JSON.parse(JSON.stringify(this.user.info.areaId))
|
|
||||||
this.dict.load('residentType', "sex", "faithType", "fileStatus",
|
|
||||||
"legality",
|
|
||||||
"education",
|
|
||||||
"maritalStatus",
|
|
||||||
"politicsStatus",
|
|
||||||
"householdName",
|
|
||||||
"nation",
|
|
||||||
"liveReason",
|
|
||||||
"certificateType",
|
|
||||||
"job",
|
|
||||||
"militaryStatus",
|
|
||||||
"householdRelation",
|
|
||||||
"logoutReason",
|
|
||||||
"nation",
|
|
||||||
"registerStatus",
|
|
||||||
"residentTipType",
|
|
||||||
"liveCategory",
|
|
||||||
"livePeriod",
|
|
||||||
"language",
|
|
||||||
"nationality");
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.AppResident {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: rgba(243, 246, 249, 1);
|
|
||||||
|
|
||||||
.iconfont {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-content-box {
|
|
||||||
padding: 16px 0;
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #f3f6f9;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: solid 1px #d8e0e8;
|
|
||||||
padding: 16px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 8px;
|
|
||||||
|
|
||||||
.searchBar {
|
|
||||||
padding: 8px 0;
|
|
||||||
|
|
||||||
.el-col {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: inline-block;
|
|
||||||
width: 100px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 14px;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
border-radius: 2px;
|
|
||||||
border: solid 1px #d0d4dc;
|
|
||||||
border-right: none;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.addClass {
|
|
||||||
height: 64px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dataStatistic {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 16px;
|
|
||||||
padding: 0 16px 16px 16px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.above {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.data-item {
|
|
||||||
width: 32%;
|
|
||||||
height: 380px;
|
|
||||||
background: rgba(255, 255, 255, 1);
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 16px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
p {
|
|
||||||
position: absolute;
|
|
||||||
right: 16px;
|
|
||||||
top: 16px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
span:nth-of-type(1) {
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
|
|
||||||
span:nth-of-type(2) {
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,358 +0,0 @@
|
|||||||
<template>
|
|
||||||
<section class="listTpl">
|
|
||||||
<ai-list isTabs>
|
|
||||||
<template #content>
|
|
||||||
<ai-search-bar>
|
|
||||||
<template #left>
|
|
||||||
<ai-area-get style="width: 180px;" placeholder="请选择地区" :instance="resident.instance" v-model="search.areaId"
|
|
||||||
@select="onAreaChange"/>
|
|
||||||
<ai-select placeholder="档案状态" v-model="search.fileStatus"
|
|
||||||
:selectList="resident.dict.getDict('fileStatus')"
|
|
||||||
@change="page.current=1,refreshTable()"/>
|
|
||||||
<ai-select placeholder="性别" v-model="search.sex"
|
|
||||||
:selectList="resident.dict.getDict('sex')"
|
|
||||||
@change="page.current=1,refreshTable()"/>
|
|
||||||
<ai-select placeholder="文化程度" v-model="search.education"
|
|
||||||
:selectList="resident.dict.getDict('education')"
|
|
||||||
@change="page.current=1,refreshTable()"/>
|
|
||||||
<ai-select placeholder="婚姻状况" v-model="search.maritalStatus"
|
|
||||||
:selectList="resident.dict.getDict('maritalStatus')"
|
|
||||||
@change="page.current=1,refreshTable()"/>
|
|
||||||
<ai-select placeholder="民族" v-model="search.nation"
|
|
||||||
:selectList="resident.dict.getDict('nation')"
|
|
||||||
@change="page.current=1,refreshTable()"/>
|
|
||||||
<el-date-picker
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
v-model="search.birthStart"
|
|
||||||
style="width:250px;border-radius:0;"
|
|
||||||
type="date"
|
|
||||||
size="small"
|
|
||||||
unlink-panels
|
|
||||||
placeholder="选择出生开始日期"
|
|
||||||
@change="page.current=1,refreshTable()"
|
|
||||||
/>
|
|
||||||
<el-date-picker
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
v-model="search.birthEnd"
|
|
||||||
style="width:250px;border-radius:0;"
|
|
||||||
type="date"
|
|
||||||
size="small"
|
|
||||||
placeholder="选择出生结束日期"
|
|
||||||
unlink-panels
|
|
||||||
@change="page.current=1,refreshTable()"
|
|
||||||
/>
|
|
||||||
<el-select
|
|
||||||
v-model="search.politicsStatus"
|
|
||||||
placeholder="政治面貌"
|
|
||||||
size="small"
|
|
||||||
@change="page.current=1,refreshTable()"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="(item,i) in resident.dict.getDict('politicsStatus')"
|
|
||||||
:key="i"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictValue"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select
|
|
||||||
v-model="search.householdName"
|
|
||||||
placeholder="是否户主"
|
|
||||||
size="small"
|
|
||||||
@change="page.current=1,refreshTable()"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="(item,i) in resident.dict.getDict('householdName')"
|
|
||||||
:key="i"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictValue"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select
|
|
||||||
v-model="search.faithType"
|
|
||||||
placeholder="宗教信仰"
|
|
||||||
@change="page.current=1,refreshTable()"
|
|
||||||
size="small"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="(item,i) in resident.dict.getDict('faithType')"
|
|
||||||
:key="i"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictValue"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
<template #right>
|
|
||||||
<el-input
|
|
||||||
size="small"
|
|
||||||
v-model="search.con"
|
|
||||||
placeholder="姓名/身份证/联系方式"
|
|
||||||
@keyup.enter.native="search.current = 1, refreshTable()"
|
|
||||||
@clear="search.current = 1, refreshTable()"
|
|
||||||
clearable
|
|
||||||
suffix-icon="iconfont iconSearch"/>
|
|
||||||
</template>
|
|
||||||
</ai-search-bar>
|
|
||||||
<ai-search-bar>
|
|
||||||
<template #left>
|
|
||||||
<el-button
|
|
||||||
size="small"
|
|
||||||
type="primary"
|
|
||||||
icon="iconfont iconAdd"
|
|
||||||
@click="gotoAdd()"
|
|
||||||
v-if="$permissions('app_appresident_edit')">
|
|
||||||
添加
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
size="small"
|
|
||||||
icon="iconfont iconDelete"
|
|
||||||
:disabled="multipleSelection.length<=0"
|
|
||||||
@click="beforeDelete()"
|
|
||||||
v-if="$permissions('app_appresident_del')">
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
<template #right>
|
|
||||||
<ai-import :instance="resident.instance" :dict="resident.dict" type="appresident" name="居民档案"
|
|
||||||
:importParams="{residentType: active}" @success="refreshTable()">
|
|
||||||
<el-button icon="iconfont iconImport">导入</el-button>
|
|
||||||
</ai-import>
|
|
||||||
<ai-download :instance="resident.instance" :params="params" url="/app/appresident/export"
|
|
||||||
fileName="居民档案"/>
|
|
||||||
</template>
|
|
||||||
</ai-search-bar>
|
|
||||||
|
|
||||||
<ai-table :tableData="tableData" :col-configs="colConfigs" :dict="resident.dict"
|
|
||||||
:total="page.total" :current.sync="page.current" :size.sync="page.size"
|
|
||||||
@getList="refreshTable"
|
|
||||||
@selection-change="handleSelectionChange">
|
|
||||||
<el-table-column slot="idNumber" label="身份证号" show-overflow-tooltip align="center">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<ai-id mode="show" v-model="row.idNumber" :showEyes="false"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column slot="fileStatus" label="档案状态" show-overflow-tooltip align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-if="scope.row.fileStatus==0" style="color:rgba(46,162,34,1);">正常</span>
|
|
||||||
<span v-if="scope.row.fileStatus==1" style="color:rgba(153,153,153,1);">已注销</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column slot="options" label="操作" show-overflow-tooltip align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div class="table-options">
|
|
||||||
<el-button
|
|
||||||
title="详情"
|
|
||||||
type="text"
|
|
||||||
v-if="$permissions('app_appresident_detail')"
|
|
||||||
@click="detailShow(scope.row)">
|
|
||||||
详情
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</ai-table>
|
|
||||||
</template>
|
|
||||||
</ai-list>
|
|
||||||
</section>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {mapState} from "vuex";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "listTpl",
|
|
||||||
inject: ['resident'],
|
|
||||||
props: {
|
|
||||||
active: {default: ""},//人员类型
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(["user"]),
|
|
||||||
params() {
|
|
||||||
let params = {
|
|
||||||
residentType: this.active
|
|
||||||
}
|
|
||||||
//导出搜索条件
|
|
||||||
if (this.deleteIds.length) {
|
|
||||||
params = {
|
|
||||||
...params,
|
|
||||||
areaId: this.search.areaId,
|
|
||||||
ids: this.deleteIds
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
params = {
|
|
||||||
areaId: this.search.areaId,
|
|
||||||
...params,
|
|
||||||
...this.search.search
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return params
|
|
||||||
},
|
|
||||||
colConfigs() {
|
|
||||||
return [
|
|
||||||
{type: "selection"},
|
|
||||||
{label: "姓名", prop: "name", align: "center"},
|
|
||||||
{label: "性别", prop: "sex", dict: 'sex', align: "center"},
|
|
||||||
{slot: "idNumber"},
|
|
||||||
{label: "年龄", prop: "age", align: "center"},
|
|
||||||
{label: "民族", prop: "nation", align: "center", dict: "nation"},
|
|
||||||
{label: "文化程度", prop: "education", align: "center", dict: "education"},
|
|
||||||
{label: "政治面貌", prop: "politicsStatus", align: "center", dict: "politicsStatus"},
|
|
||||||
{slot: "fileStatus"},
|
|
||||||
{slot: "options"}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
page: {current: 1, size: 10, total: 0},
|
|
||||||
search: {
|
|
||||||
fileStatus: "",
|
|
||||||
sex: "",
|
|
||||||
nation: "",
|
|
||||||
education: "",
|
|
||||||
politicsStatus: "",
|
|
||||||
birthStart: "",
|
|
||||||
birthEnd: "",
|
|
||||||
faithType: "",
|
|
||||||
householdName: "",
|
|
||||||
areaId: '',
|
|
||||||
con: "",
|
|
||||||
maritalStatus: ""
|
|
||||||
},
|
|
||||||
style: {},
|
|
||||||
tableData: [],
|
|
||||||
multipleSelection: [],
|
|
||||||
deleteIds: [],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
handleClick() {
|
|
||||||
this.tableData = [];
|
|
||||||
this.multipleSelection = [];
|
|
||||||
this.searchInit()
|
|
||||||
},
|
|
||||||
|
|
||||||
onAreaChange () {
|
|
||||||
this.page.current = 1
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.refreshTable()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
searchInit() {
|
|
||||||
let tempAreaId = this.search.areaId;
|
|
||||||
this.search = {
|
|
||||||
fileStatus: "",
|
|
||||||
sex: "",
|
|
||||||
nation: "",
|
|
||||||
education: "",
|
|
||||||
politicsStatus: "",
|
|
||||||
birth: [],
|
|
||||||
faithType: "",
|
|
||||||
householdName: "",
|
|
||||||
areaId: "",
|
|
||||||
con: "",
|
|
||||||
maritalStatus: ""
|
|
||||||
};
|
|
||||||
this.search.areaId = tempAreaId;
|
|
||||||
this.page = {current: 1, size: 10, total: 0};
|
|
||||||
this.refreshTable()
|
|
||||||
},
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.deleteIds = [];
|
|
||||||
this.multipleSelection = val;
|
|
||||||
this.multipleSelection.forEach(e => {
|
|
||||||
this.deleteIds.push(e.id);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
exportrExcle() {
|
|
||||||
if (this.deleteIds.length == 0) {
|
|
||||||
if (this.search.birth) {
|
|
||||||
this.search.birth = this.search.birth.join(",");
|
|
||||||
}
|
|
||||||
this.resident.instance
|
|
||||||
.post(`/app/appresident/exportAll`, null, {
|
|
||||||
params: {
|
|
||||||
...this.search,
|
|
||||||
...this.page
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
if (res && res.code == 0) {
|
|
||||||
this.$message.success(res.data);
|
|
||||||
if (typeof this.search.birth == "string") {
|
|
||||||
this.search.birth = this.search.birth.split(",");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.resident.instance.post(`/app/appresident/exportByIds`, {
|
|
||||||
ids: this.deleteIds,
|
|
||||||
areaId: this.user.info.areaId
|
|
||||||
}).then(res => {
|
|
||||||
if (res?.code == 0) {
|
|
||||||
this.$message.success(res.data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleSizeChange(val) {
|
|
||||||
this.page.size = val;
|
|
||||||
this.refreshTable()
|
|
||||||
},
|
|
||||||
detailShow(row) {
|
|
||||||
this.$router.push({query: {type: this.active, id: row.id}})
|
|
||||||
},
|
|
||||||
gotoAdd() {
|
|
||||||
this.$router.push({query: {type: this.active}})
|
|
||||||
},
|
|
||||||
refreshTable() {
|
|
||||||
this.resident.instance.post(`/app/appresident/list`, null, {
|
|
||||||
params: {...this.search, ...this.page, residentType: this.active}
|
|
||||||
}).then(res => {
|
|
||||||
if (res?.data) {
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.page.total = res.data.total
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
beforeDelete() {
|
|
||||||
this.$confirm("确定要执行删除操作吗?", {type: "error"})
|
|
||||||
.then(() => {
|
|
||||||
this.deletePersonFn();
|
|
||||||
this.deleteIds = [];
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deletePersonFn() {
|
|
||||||
this.resident.instance.post(`/app/appresident/deleteBody`, {
|
|
||||||
ids: this.deleteIds
|
|
||||||
}).then(res => {
|
|
||||||
if (res && res.code == 0) {
|
|
||||||
this.$message.success("删除成功");
|
|
||||||
if (
|
|
||||||
this.page.current == Math.ceil(this.page.total / this.page.size)
|
|
||||||
) {
|
|
||||||
this.page.total = this.page.total - this.deleteIds.length;
|
|
||||||
this.page.current = Math.ceil(this.page.total / this.page.size);
|
|
||||||
}
|
|
||||||
this.refreshTable();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.refreshTable()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.listTpl {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,445 +0,0 @@
|
|||||||
<template>
|
|
||||||
<section class="residentSta">
|
|
||||||
<div class="dataStatistic">
|
|
||||||
<div class="above">
|
|
||||||
<div class="data-item">
|
|
||||||
<div id="LocalResident" v-if="showStatis"/>
|
|
||||||
<ai-empty v-else/>
|
|
||||||
<h5 v-if="LocalResidentData">
|
|
||||||
更新时间:{{ statisticData.更新时间 }}
|
|
||||||
</h5>
|
|
||||||
</div>
|
|
||||||
<div class="data-item" style="width:66%;">
|
|
||||||
<div id="ResidentDistribution" v-if="showStatis"/>
|
|
||||||
<ai-empty v-else/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="above" style="margin-top:24px;">
|
|
||||||
<div class="data-item">
|
|
||||||
<div id="SexRatio" v-if="showStatis"/>
|
|
||||||
<ai-empty v-else/>
|
|
||||||
<div rightTop><i v-html="'有效数据:'"/> {{ LocalResidentData }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="data-item">
|
|
||||||
<div id="MaritalSta" v-if="showStatis"/>
|
|
||||||
<ai-empty v-else/>
|
|
||||||
<div rightTop><i v-html="'有效数据:'"/>{{ LocalResidentData }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="data-item">
|
|
||||||
<div id="AgeDistribution" v-if="showStatis"/>
|
|
||||||
<ai-empty v-else/>
|
|
||||||
<div rightTop><i v-html="'有效数据:'"/>{{ LocalResidentData }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import * as echarts from 'echarts'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "residentSta",
|
|
||||||
inject: ['resident'],
|
|
||||||
props: {
|
|
||||||
areaId: String
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
LocalResidentData() {
|
|
||||||
return this.statisticData?.总人数 || 0
|
|
||||||
},
|
|
||||||
AgeDistributionData() {
|
|
||||||
return this.statisticData?.年龄层次 || []
|
|
||||||
},
|
|
||||||
MaritalStaData() {
|
|
||||||
return this.statisticData?.婚姻状况 || []
|
|
||||||
},
|
|
||||||
SexRatioData() {
|
|
||||||
return this.statisticData?.男女比例 || []
|
|
||||||
},
|
|
||||||
ResidentDistributionData() {
|
|
||||||
return this.statisticData?.人口分布 || []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
statisticData: {},
|
|
||||||
showStatis: true,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
areaId(v) {
|
|
||||||
v && this.getStaData()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getStaData() {
|
|
||||||
this.resident.instance.post(`/app/appresident/queryCustInfoByAreaId`, null, {
|
|
||||||
params: {
|
|
||||||
areaId: this.areaId
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res?.data) {
|
|
||||||
this.statisticData = res.data;
|
|
||||||
this.showStatis = this.LocalResidentData > 0;
|
|
||||||
this.showLocalResident();
|
|
||||||
this.showSexRatio();
|
|
||||||
this.showAgeDistribution();
|
|
||||||
this.showResidentDistribution();
|
|
||||||
this.showMaritalSta();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
showAgeDistribution() {
|
|
||||||
//年龄分布
|
|
||||||
let myChart = echarts.init(document.getElementById("AgeDistribution"));
|
|
||||||
if (!this.showStatis) {
|
|
||||||
return myChart.dispose();
|
|
||||||
}
|
|
||||||
myChart.setOption({
|
|
||||||
title: {
|
|
||||||
text: "年龄层次统计",
|
|
||||||
subtext: "",
|
|
||||||
x: "left"
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: "item",
|
|
||||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
orient: "vertical",
|
|
||||||
bottom: "bottom",
|
|
||||||
data: this.AgeDistributionData.map(e => e.v1)
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "年龄层次统计",
|
|
||||||
type: "pie",
|
|
||||||
radius: ["40%", "55%"],
|
|
||||||
center: ["50%", "50%"],
|
|
||||||
data: this.AgeDistributionData.map(e => ({value: e.v2 * 1, name: e.v1})),
|
|
||||||
itemStyle: {
|
|
||||||
emphasis: {
|
|
||||||
shadowBlur: 10,
|
|
||||||
shadowOffsetX: 0,
|
|
||||||
shadowColor: "rgba(0, 0, 0, 0.5)"
|
|
||||||
},
|
|
||||||
normal: {
|
|
||||||
color: function (params) {
|
|
||||||
//自定义颜色
|
|
||||||
var colorList = [
|
|
||||||
"#FB3C3C",
|
|
||||||
"#fc5947",
|
|
||||||
"#81E84F",
|
|
||||||
"#3C76FF",
|
|
||||||
"#6995FF",
|
|
||||||
"#FFD500",
|
|
||||||
"#FEF517",
|
|
||||||
"#B1E598",
|
|
||||||
"#81E84F",
|
|
||||||
"#B1E598",
|
|
||||||
"#FEBB8E"
|
|
||||||
];
|
|
||||||
return colorList[params.dataIndex];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
},
|
|
||||||
showLocalResident() {
|
|
||||||
//本地居民
|
|
||||||
let myChart = echarts.init(document.getElementById("LocalResident"));
|
|
||||||
if (!this.showStatis) {
|
|
||||||
return myChart.dispose();
|
|
||||||
}
|
|
||||||
let option = {
|
|
||||||
title: {
|
|
||||||
text: "本地居民",
|
|
||||||
subtext: "",
|
|
||||||
x: "left"
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: "item",
|
|
||||||
formatter: "{a} <br/>{b}: {c} ({d}%)"
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "本地居民",
|
|
||||||
type: "pie",
|
|
||||||
radius: ["50%", "65%"],
|
|
||||||
avoidLabelOverlap: false,
|
|
||||||
label: {
|
|
||||||
normal: {
|
|
||||||
show: true,
|
|
||||||
position: "center",
|
|
||||||
textStyle: {
|
|
||||||
fontSize: "40",
|
|
||||||
fontWeight: "normal",
|
|
||||||
color: "#333333"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
show: true,
|
|
||||||
textStyle: {
|
|
||||||
fontSize: "40",
|
|
||||||
fontWeight: "normal",
|
|
||||||
color: "#333333"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
labelLine: {
|
|
||||||
normal: {
|
|
||||||
show: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: [{value: this.LocalResidentData, name: this.LocalResidentData}],
|
|
||||||
itemStyle: {
|
|
||||||
emphasis: {
|
|
||||||
shadowBlur: 10,
|
|
||||||
shadowOffsetX: 0,
|
|
||||||
shadowColor: "rgba(0, 0, 0, 0.5)"
|
|
||||||
},
|
|
||||||
normal: {
|
|
||||||
color: function (params) {
|
|
||||||
//自定义颜色
|
|
||||||
var colorList = ["#5088FF"];
|
|
||||||
return colorList[params.dataIndex];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
myChart.setOption(option);
|
|
||||||
},
|
|
||||||
showMaritalSta() {
|
|
||||||
//婚姻状况
|
|
||||||
let myChart = echarts.init(document.getElementById("MaritalSta"));
|
|
||||||
if (!this.showStatis) {
|
|
||||||
return myChart.dispose();
|
|
||||||
}
|
|
||||||
let option = {
|
|
||||||
color: [
|
|
||||||
"#FB3C3C",
|
|
||||||
"#FC5947",
|
|
||||||
"#FE8B3F",
|
|
||||||
"#3C76FF",
|
|
||||||
"#6995FF",
|
|
||||||
"#FFD500",
|
|
||||||
"#FEF517",
|
|
||||||
"#B1E598",
|
|
||||||
"#81E84F",
|
|
||||||
"#B1E598",
|
|
||||||
"#FEBB8E"
|
|
||||||
],
|
|
||||||
backgroundColor: "#FFFFFF",
|
|
||||||
title: {
|
|
||||||
text: "婚姻状况统计",
|
|
||||||
x: "left"
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: "item",
|
|
||||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
orient: "vertical",
|
|
||||||
bottom: "bottom",
|
|
||||||
width: "auto",
|
|
||||||
height: 50,
|
|
||||||
data: this.MaritalStaData.map(e => e.v1)
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "婚姻状况",
|
|
||||||
type: "pie",
|
|
||||||
radius: ["40%", "55%"],
|
|
||||||
center: ["50%", "50%"],
|
|
||||||
data: this.MaritalStaData.map(e => ({value: e.v2 * 1, name: e.v1})),
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
myChart.setOption(option);
|
|
||||||
},
|
|
||||||
showResidentDistribution() {
|
|
||||||
//人口分布/居民分布
|
|
||||||
let myChart = echarts.init(document.getElementById("ResidentDistribution"));
|
|
||||||
if (!this.showStatis) {
|
|
||||||
return myChart.dispose();
|
|
||||||
}
|
|
||||||
let option = {
|
|
||||||
title: {
|
|
||||||
text: "人口分布统计",
|
|
||||||
subtext: "",
|
|
||||||
x: "left"
|
|
||||||
},
|
|
||||||
color: ["#5088FF"],
|
|
||||||
tooltip: {
|
|
||||||
trigger: "axis",
|
|
||||||
axisPointer: {
|
|
||||||
// 坐标轴指示器,坐标轴触发有效
|
|
||||||
type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
|
|
||||||
},
|
|
||||||
formatter: "{a} <br/>{b} : {c} "
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: "3%",
|
|
||||||
right: "4%",
|
|
||||||
bottom: "3%",
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: "category",
|
|
||||||
data: this.ResidentDistributionData.map(e => e.name),
|
|
||||||
axisTick: {
|
|
||||||
alignWithLabel: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: "value"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
dataZoom: [
|
|
||||||
{
|
|
||||||
id: "dataZoomX",
|
|
||||||
type: "slider",
|
|
||||||
xAxisIndex: [0],
|
|
||||||
filterMode: "filter"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "人口数量",
|
|
||||||
type: "bar",
|
|
||||||
barWidth: "16",
|
|
||||||
data: this.ResidentDistributionData.map(e => e.v1)
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
myChart.setOption(option);
|
|
||||||
},
|
|
||||||
showSexRatio() {
|
|
||||||
//男女比例
|
|
||||||
let myChart = echarts.init(document.getElementById("SexRatio"));
|
|
||||||
if (!this.showStatis) {
|
|
||||||
return myChart.dispose();
|
|
||||||
}
|
|
||||||
myChart.setOption({
|
|
||||||
title: {
|
|
||||||
text: "男女比例统计",
|
|
||||||
subtext: "",
|
|
||||||
x: "left"
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: "item",
|
|
||||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
orient: "vertical",
|
|
||||||
bottom: "bottom",
|
|
||||||
data: this.SexRatioData.map(e => e.v1)
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "男女比例",
|
|
||||||
type: "pie",
|
|
||||||
radius: ["40%", "55%"],
|
|
||||||
center: ["50%", "50%"],
|
|
||||||
data: this.SexRatioData.map(e => ({value: e.v2 * 1, name: e.v1})),
|
|
||||||
itemStyle: {
|
|
||||||
emphasis: {
|
|
||||||
shadowBlur: 10,
|
|
||||||
shadowOffsetX: 0,
|
|
||||||
shadowColor: "rgba(0, 0, 0, 0.5)"
|
|
||||||
},
|
|
||||||
normal: {
|
|
||||||
color: function (params) {
|
|
||||||
//自定义颜色
|
|
||||||
let colorList = [
|
|
||||||
"#FB3C3C",
|
|
||||||
"#3C76FF",
|
|
||||||
"#3C76FF",
|
|
||||||
"#FC5947",
|
|
||||||
"#6995FF",
|
|
||||||
"#FB3C3C",
|
|
||||||
"#FE8B3F",
|
|
||||||
"#B1E598",
|
|
||||||
"#81E84F",
|
|
||||||
"#FEBB8E"
|
|
||||||
];
|
|
||||||
return colorList[params.dataIndex];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getStaData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.residentSta {
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.dataStatistic {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow-y: auto;
|
|
||||||
padding: 16px 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.above {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.data-item {
|
|
||||||
width: 32%;
|
|
||||||
height: 380px;
|
|
||||||
background: rgba(255, 255, 255, 1);
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 16px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
div[rightTop] {
|
|
||||||
position: absolute;
|
|
||||||
right: 16px;
|
|
||||||
top: 16px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #333;
|
|
||||||
|
|
||||||
& > i {
|
|
||||||
font-style: normal;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& > h5 {
|
|
||||||
width: 100%;
|
|
||||||
color: #999;
|
|
||||||
text-align: center;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#LocalResident, #MaritalSta, #ResidentDistribution, #SexRatio, #AgeDistribution {
|
|
||||||
width: 100%;
|
|
||||||
height: 95%
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user