地图 台账 人员选择 统计

master
lion 3 years ago
parent cea758f976
commit a2f8765173

@ -10,7 +10,7 @@ export function getCounts() {
export function getChartsData(params) {
return request({
url: '/api/admin/get-charts-data',
url: '/api/admin/other/total',
method: 'get',
params: params
})
@ -18,7 +18,7 @@ export function getChartsData(params) {
export function getChartsHome(params) {
return request({
url: '/api/admin/chart/home',
url: '/api/admin/other/home',
method: 'get',
params: params
})

@ -0,0 +1,9 @@
<template>
<router-view/>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,9 @@
<template>
<router-view/>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,9 @@
<template>
<router-view/>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,9 @@
<template>
<router-view/>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,9 @@
<template>
<router-view/>
</template>
<script>
</script>
<style>
</style>

@ -40,20 +40,22 @@
raise: 'raises',
cars: 'fuels',
address: 'starts_addresses',
starts: 'starts_subsidys'
starts: 'starts_subsidys',
reform:'reforms'
},
bookTypeObjs: {
number: '残疾人证台账',
drug: '免费服药台账',
children: '儿童康复台账',
help: '辅具适配台账',
health: '社区康复台账',
student: '优秀学生奖学金台账',
education: '教育专项台账',
raise: '托养台账',
cars: '燃油补贴台账',
address: '创业场地补贴台账',
starts: '创业补贴台账'
number: '残疾人证统计',
drug: '免费服药统计',
children: '儿童康复统计',
help: '辅具适配统计',
health: '社区康复统计',
student: '优秀学生奖学金统计',
education: '教育专项统计',
raise: '托养统计',
cars: '燃油补贴统计',
address: '创业场地补贴统计',
starts: '创业补贴统计',
reform:'无障碍改造统计'
}
}
@ -90,8 +92,6 @@
this.monthY.push(m.total)
}
this.showCharts = true
console.log('res',res)
console.log(this.monthX)
}
},

@ -3,7 +3,11 @@ import { save, show, index } from "@/api/system/baseForm";
import { getparameter } from "@/api/system/dictionary";
import { domMap } from "@/const/inputType";
import { addPropsMap } from "@/const/addProps";
import recordModal from '../component/recordModal.vue'
export default {
components:{
recordModal
},
props: {
formInfo: {
type: Array,
@ -27,6 +31,14 @@ export default {
},
},
[
h("recordModal",
{
ref: "recordModal",
on:{
getRecordInfo:this.getRecordInfo
}
},
""),
h(
"el-form",
{
@ -42,7 +54,6 @@ export default {
(() => {
let dom = [];
this.formInfo.filter(i => i.form_show).forEach((i, index) => {
console.log("i",i)
dom.push(
h(
"el-form-item",
@ -82,10 +93,13 @@ export default {
},
on: {
[this.getEventType(i.edit_input)]: (e) => {
if (i.field) {
if (i.field==='name') {
this.openRecords()
}else{
this.form[i.field] = e;
this.form = Object.assign({}, this.form);
// this.form = Object.assign({}, this.form);
}
},
},
scopedSlots:
@ -150,6 +164,7 @@ export default {
})()
),
h("template", { slot: "footer" }, [
h(
"el-button",
{
@ -199,6 +214,20 @@ export default {
};
},
methods: {
openRecords(){
this.$refs.recordModal.isShow = true
},
getRecordInfo(e){
for(var k in e){
for(var m in this.form){
if(m == k){
this.$set(this.form,m,e[k])
}
}
}
this.$set(this.form,'work_status','待审核')
this.$forceUpdate()
},
findKey(obj, value, compare = (a, b) => a === b) {
return Object.keys(obj).find(k => compare(parseInt(obj[k]), parseInt(value)))
},
@ -341,14 +370,14 @@ export default {
const res = await show({ id: this.id, table_name: this.tableName });
this.$integrateData(this.form, res);
this.form = Object.assign({}, this.form);
console.log("formInfo",this.formInfo)
this.formInfo.forEach((i) => {
if (i && i.edit_input === "file") {
this.file[i.field] = [
{
name: res[i.link_with_name]?.original_name,
url: res[i.link_with_name]?.url,
response: res[i.link_with_name],
name: res[i._relations.link_with_name]?.original_name,
url: res[i._relations.link_with_name]?.url,
response: res[i._relations.link_with_name],
},
];
}

@ -0,0 +1,127 @@
<template>
<div>
<Modal v-model="isShow" title="人员选择" @on-cancel='recordsCancel' @on-ok='recordselect'>
<div class="searchCompanys">
<el-input type="text" @keyup.enter.native="getList" v-model="select.keyword" placeholder="请输入姓名查找"></el-input>
<el-button type="primary" @click="getList"></el-button>
</div>
<Table highlight-row ref="currentRowTable" :columns="columns" :data="list" />
<Page :current="select.page" :total="total" simple
style="padding-top: 14px;display: flex;justify-content: center;" @on-change="pageChange" />
</Modal>
</div>
</template>
<script>
import {
index
} from "@/api/system/baseForm.js"
export default {
data() {
return {
isShow: false,
select: {
keyword: "",
page: 1,
page_size: 10,
tableName: 'records'
},
columns: [{
width: 60,
_isChecked: false,
key: "isSelect",
resizable: true,
render: (h, params) => {
return h('div', [
h('Radio', {
props: {
value: params.row.isSelect
},
on: {
'on-change': (e) => {
this.list.forEach((items) => {
this.$set(items, 'isSelect', false)
});
this.list[params.index].isSelect = e;
}
}
})
])
}
},
{
title: '姓名',
key: 'name',
}, {
title: '所属街道',
key: 'street',
}
],
list: [],
total: 0
}
},
created() {
},
watch:{
isShow(newval){
if(newval){
this.getList()
}else{
this.select = {
keyword: "",
page: 1,
page_size: 10,
tableName: 'records'
}
this.total = 0
this.list = []
}
}
},
methods: {
async getList() {
const res = await index({
page_size: this.select.page_size,
page: this.select.page,
table_name: this.select.tableName,
show_relation: ['admin', 'department'],
filter: [{
"key": "name",
"op": "like",
"value": this.select.keyword
}],
})
this.list = res.data
this.total = res.total
},
recordselect() {
this.list.forEach((items) => {
if (items.isSelect) {
this.$emit('getRecordInfo', items)
this.isShow = false
}
});
},
recordsCancel() {
this.isShow = false
},
pageChange(e) {
this.select.page = e
this.getList()
}
}
}
</script>
<style scoped>
/deep/ .ivu-modal-wrap {
z-index: 9999 !important;
}
/deep/ .ivu-modal-mask {
z-index: 9999 !important
}
</style>

@ -436,13 +436,13 @@ export default {
? getparameter({ id: i._relations.parameter_id },false).then((res) => {
i._params = res.detail;
})
: this.index({
: (i._relations.link_table_name==='uploads'?'':this.index({
table_name: i._relations.link_table_name,
page: 1,
page_size: 9999,
}).then((res) => {
i._params = res.data;
});
}))
}
});
this.form = fields.sort(this.handle('sort'));

@ -1,55 +1,26 @@
<template>
<div>
<div class="boxlist">
<div class="box box1">
<div class="boxtitle">
<span>营业统计</span>
<i class="el-icon-data-line statIcon"></i>
</div>
<div class="bline"></div>
<div class="boxcontentsubtitle">服务金额</div>
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">
{{totaldata.business.server_money_total}}
</div>
<div style="display: flex;justify-content: space-around;">
<div class="boxcontentitem-small">
<span>{{totaldata.business.nurse_money_total}}</span>
<span>护工金额</span>
</div>
<div class="boxcontentitem-small">
<span>{{totaldata.business.remain_money_total}}</span>
<span>留存金额</span>
</div>
</div>
</div>
</div>
</div>
<div class="box box2">
<div class="boxtitle">
<span>人效统计</span>
<span>一户一档</span>
<i class="el-icon-user statIcon"></i>
</div>
<div class="bline"></div>
<div class="boxcontentsubtitle">服务时长</div>
<div class="boxcontentsubtitle">总人数</div>
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">
{{totaldata.person_efficiency.server_time_total}}
分钟
{{totaldata.apply.total}}
</div>
<div style="display: flex;justify-content: space-around;">
<div class="boxcontentitem-small">
<span>{{totaldata.person_efficiency.expect}}</span>
<span> 照护人员数</span>
<span>{{totaldata.apply.today_inc}}</span>
<span>当日新增</span>
</div>
<div class="boxcontentitem-small">
<span>{{totaldata.person_efficiency.act}} </span>
<span>天数</span>
<span>{{totaldata.apply.month_total}}</span>
<span>当月新增</span>
</div>
</div>
</div>
@ -58,55 +29,30 @@
<div class="box box3">
<div class="boxtitle">
<span>客户统计</span>
<span>业务申请</span>
<i class="el-icon-s-custom statIcon"></i>
</div>
<div class="bline"></div>
<div class="boxcontentsubtitle">活跃客户</div>
<div class="boxcontentsubtitle">总业务数</div>
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">
{{totaldata.customer.active}}
{{totaldata.record.total}}
</div>
<div style="display: flex;justify-content: space-around;">
<div class="boxcontentitem-small">
<span>{{totaldata.customer.add}}</span>
<span>新增</span>
<span>{{totaldata.record.today_total}}</span>
<span>当日新增</span>
</div>
<div class="boxcontentitem-small">
<span>{{totaldata.customer.wash}}</span>
<span>流失</span>
<span>{{totaldata.record.month_total}}</span>
<span>当月新增</span>
</div>
</div>
</div>
</div>
</div>
<div class="box box4">
<div class="boxtitle">
<span>订单统计</span>
<i class="el-icon-document statIcon"></i>
</div>
<div class="bline"></div>
<div class="boxcontentsubtitle">服务订单</div>
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">{{totaldata.order.server_total}}
</div>
<div style="display: flex;justify-content: space-around;">
<div class="boxcontentitem-small">
<span>{{totaldata.order.cycle_total}}</span>
<span>周期性订单</span>
</div>
<div class="boxcontentitem-small">
<span>{{totaldata.order.unit_total}}</span>
<span>单次订单</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
@ -123,26 +69,16 @@
type: Object,
default: {
"business": {
"server_money_total": 0,
"nurse_money_total": 0,
"remain_money_total": 0
},
"person_efficiency": {
"server_time_total": "0",
"expect": 0,
"act": 0
},
"customer": {
"active": 0,
"add": 0,
"wash": 0
},
"order": {
"server_total": 0,
"cycle_total": 0,
"unit_total": 0
"apply": {
"month_total": 0,
"today_inc": 0,
"total": 0
},
"record": {
"month_total": 0,
"today_total": 0,
"total": 0
}
}
}
},
@ -193,10 +129,10 @@
.box {
position: relative;
width: 33%;
margin-left: 0.5%;
margin-right: 0.5%;
margin-bottom: 2.375rem;
width: 48%;
margin-left: 1%;
margin-right: 1%;
margin-bottom: 1.375rem;
box-shadow: 0px 8px 15px 0px rgba(212, 84, 32, 0.3100);
border-radius: 8px;
box-sizing: border-box;

@ -1,314 +1,292 @@
<template>
<div>
<iframe src="/admin/#/jsc" frameborder="0" :height="mapHeight" width="100%"></iframe>
<!-- <div class="statistics">
<panel-group :totaldata="list" />
</div>
<div class="chart">
<div class="chartItem" style="margin-right: 1%;">
<div class="chartItemTitle">营业与收入</div>
<div id="col-chart"></div>
</div>
<div class="chartItem" style="margin-left: 1%;">
<div class="chartItemTitle">客户与订单</div>
<div id="line-chart"></div>
</div>
</div> -->
</div>
</template>
<script>
import echarts from "echarts"
import PanelGroup from './components/PanelGroup'
import {
getChartsHome
<template>
<div>
<!-- <iframe src="/admin/#/jsc" frameborder="0" :height="mapHeight" width="100%"></iframe> -->
<div class="statistics">
<panel-group :totaldata="list"/>
</div>
<div class="chart">
<div class="chartItem" style="margin-right: 1%;">
<div class="chartItemTitle">一户一档统计</div>
<div id="col-chart"></div>
</div>
<div class="chartItem" style="margin-left: 1%;">
<div class="chartItemTitle">申请业务统计</div>
<div id="line-chart"></div>
</div>
</div>
</div>
</template>
<script>
import echarts from "echarts"
import PanelGroup from './components/PanelGroup'
import {
getChartsData
} from "../../api/dashboard.js"
export default {
components: {
PanelGroup
},
data() {
return {
col: '',
import {getRecordsCharts,getApplyCharts} from "@/api/book.js";
export default {
components: {
PanelGroup
},
data() {
return {
col: '',
line: '',
business_data: [],
collect_data: [],
list: {},
customerArr: [],
orderArr: [],
chartData: {},
mapHeight:0
}
},
watch: {
chartData(val, newval) {
if (newval){
this.init();
}
}
},
created() {
// this.loadData();
},
mounted() {
this.initHeight()
//this.init()
// window.onresize = () => {
// this.col.resize()
// this.line.resize()
// }
},
destroyed() {
window.onresize = null
},
methods: {
initHeight() {
let winHeight = document.body.clientHeight
this.mapHeight = winHeight - 50 - 20
console.log(winHeight)
},
async loadData() {
await getChartsHome().then((res) => {
console.log(res);
this.list = res.list;
this.chartData = res;
let _business_data = [];
let _collect_data = [];
res.business_data.map(item => {
_business_data.push(item.server_money_total)
_collect_data.push(item.collect_money)
})
this.business_data = _business_data;
this.collect_data = _collect_data;
let _customerArr = [];
let _orderArr = [];
res.order_data.map(item => {
_customerArr.push(item.active_customer)
_orderArr.push(item.order_total)
})
this.customerArr = _customerArr;
this.orderArr = _orderArr;
record_data: {
x:[],
y:[]
},
apply_data: {
x:[],
y:[]
},
list: {},
mapHeight: 0
}
},
watch: {
chartData(val, newval) {
if (newval) {
this.init();
}
}
},
created() {
document.documentElement.style.fontSize = '16px'
this.loadData();
},
mounted() {
this.initHeight()
//this.init()
window.onresize = () => {
this.col.resize()
this.line.resize()
}
},
destroyed() {
window.onresize = null
},
methods: {
initHeight() {
let winHeight = document.body.clientHeight
this.mapHeight = winHeight - 150
console.log(winHeight)
},
async loadData() {
await getChartsData().then((res) => {
this.list = res;
}).catch()
},
init() {
this.col = echarts.init(document.getElementById('col-chart'))
this.col.setOption({
title: {
text: ''
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
position: 'bottom'
},
legend: {},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
yAxis: {
type: 'value',
boundaryGap: [0, 0.01]
},
xAxis: {
type: 'category',
data: ['第一周', '第二周', '第三周', '第四周']
},
series: [{
name: '服务金额',
type: 'bar',
data: this.business_data,
itemStyle: {
normal: {
color: 'rgb(42,182,252)'
},
},
},
{
name: '收款',
type: 'bar',
data: this.collect_data,
itemStyle: {
normal: {
color: 'rgb(34,228,255)'
},
},
}
]
})
this.line = echarts.init(document.getElementById('line-chart'))
this.line.setOption({
title: {
text: ''
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['活跃客户', '服务订单']
},
grid: {
left: '3%',
right: '6%',
bottom: '3%',
containLabel: true
},
toolbox: {
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['第一周', '第二周', '第三周', '第四周']
},
yAxis: {
type: 'value',
},
series: [{
name: '活跃客户',
type: 'line',
stack: 'Total',
data: this.customerArr,
itemStyle: {
normal: {
color: 'rgb(42,182,252)'
},
},
},
{
name: '服务订单',
type: 'line',
stack: 'Total',
data: this.orderArr,
itemStyle: {
normal: {
color: 'rgb(34,228,255)'
},
},
}
]
})
}
},
}
</script>
<style lang="scss" scoped>
.statistics {
display: flex;
margin-top: 20px;
&-title {
padding-left: 6px;
}
&-content {
text-align: center;
font-size: 13px;
&-top {
&__num {
font-weight: 600;
}
&__name {
font-size: 10px;
color: rgb(140, 140, 140);
}
}
&-bottom {
display: flex;
justify-content: space-between;
&-left {
&__num {
font-weight: 600;
}
&__name {
font-size: 10px;
color: rgb(140, 140, 140);
await getRecordsCharts().then((res) => {
for(var k of res){
this.record_data.x.push(k.value)
this.record_data.y.push(k.record_total)
}
}
&-right {
&__num {
font-weight: 600;
}
&__name {
font-size: 10px;
color: rgb(140, 140, 140);
}
}
}
}
&>div {
flex: 1;
margin-right: 20px;
&:last-child {
margin-right: 0;
}
}
}
.chart {
display: flex;
margin-top: 20px;
.chartItem {
width: 49%;
.chartItemTitle {
font-size: 16px;
margin-bottom: 20px;
}
#col-chart {
background: #fff;
border-radius: 10px;
flex: 1;
margin-right: 20px;
padding: 20px;
box-sizing: border-box;
min-height: 400px;
width: 100%;
}
#line-chart {
background: #fff;
border-radius: 10px;
flex: 1;
padding: 20px;
box-sizing: border-box;
min-height: 400px;
}
}
}
}).catch()
await getApplyCharts().then(res => {
for (var k of res) {
this.apply_data.x.push(k.name)
this.apply_data.y.push(k.total)
}
})
this.init()
},
init() {
this.col = echarts.init(document.getElementById('col-chart'))
this.col.setOption({
title: {
text: ''
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
position: 'bottom'
},
legend: {},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
yAxis: {
type: 'value',
boundaryGap: [0, 0.01]
},
xAxis: {
type: 'category',
data: this.record_data.x
},
series: [{
name: '档案数',
type: 'bar',
data: this.record_data.y,
itemStyle: {
normal: {
color: '#147d38'
},
},
}
]
})
this.line = echarts.init(document.getElementById('line-chart'))
this.line.setOption({
title: {
text: ''
},
tooltip: {
trigger: 'axis'
},
legend: {
data: {}
},
grid: {
left: '3%',
right: '6%',
bottom: '3%',
containLabel: true
},
toolbox: {
},
xAxis: {
type: 'category',
boundaryGap: false,
data: this.apply_data.x
},
yAxis: {
type: 'value',
},
series: [{
name: '业务数',
type: 'line',
stack: 'Total',
data: this.apply_data.y,
itemStyle: {
normal: {
color: '#147d38'
},
},
}
]
})
}
},
}
</script>
<style lang="scss" scoped>
.statistics {
display: flex;
margin-top: 20px;
&-title {
padding-left: 6px;
}
&-content {
text-align: center;
font-size: 13px;
&-top {
&__num {
font-weight: 600;
}
&__name {
font-size: 10px;
color: rgb(140, 140, 140);
}
}
&-bottom {
display: flex;
justify-content: space-between;
&-left {
&__num {
font-weight: 600;
}
&__name {
font-size: 10px;
color: rgb(140, 140, 140);
}
}
&-right {
&__num {
font-weight: 600;
}
&__name {
font-size: 10px;
color: rgb(140, 140, 140);
}
}
}
}
&>div {
flex: 1;
margin-right: 20px;
&:last-child {
margin-right: 0;
}
}
}
.chart {
display: flex;
margin-top: 20px;
.chartItem {
width: 49%;
.chartItemTitle {
font-size: 16px;
margin-bottom: 20px;
}
#col-chart {
background: #fff;
border-radius: 10px;
flex: 1;
margin-right: 20px;
padding: 20px;
box-sizing: border-box;
min-height: 400px;
width: 100%;
}
#line-chart {
background: #fff;
border-radius: 10px;
flex: 1;
padding: 20px;
box-sizing: border-box;
min-height: 400px;
}
}
}
</style>

@ -66,7 +66,7 @@
textStyle: {
show: true,
color: this.color[1]
},
}
}
}],
yAxis: [{

@ -22,16 +22,16 @@
},
watch: {
hookToolTip: {
handler(newVal, oldVal) {
let tooltipButton = document.querySelector(".mapsshow" + newVal.data.id)
let that = this
tooltipButton.addEventListener('click', function() {
that.showInfo(newVal.data.id)
})
// hookToolTip: {
// handler(newVal, oldVal) {
// let tooltipButton = document.querySelector(".mapsshow" + newVal.data.id)
// let that = this
// tooltipButton.addEventListener('click', function() {
// that.showInfo(newVal.data.id)
// })
}
},
// }
// },
},
methods: {
showInfo(id) {
@ -109,6 +109,17 @@
}
}
},
regions: [{
name: "指前镇",
itemStyle: {
normal: {
areaColor: "red",
},
emphasis: {
areaColor: "red",
},
},
}],
effect: {
show: true,
@ -119,7 +130,8 @@
markPoint: {
symbol: 'image://' + require('@/assets/logo-mini.png'), //
symbolSize: [28, 49], //
symbolSize: [50, 40], //
symbolOffset: [0, -30],
label: {
position: 'bottom',
color: "#fff",

@ -2,8 +2,9 @@
<div class="jsc">
<div class="jscT">
<img src="../../assets/jsc/logo.png" alt="">
<span @click='todashboard'>进入后台</span>
</div>
<div class="jscB">
<div class="jscB" v-if='showChart'>
<div class="jscL">
<div style="height:40%" class='jscL1'>
<div class='comtitle'>
@ -79,7 +80,7 @@
需求类别分析
</div>
<div class="jscL2chart">
<echartsLine ref="echartsLine2" :lineDataX='needX' :lineDataY='needY'></echartsLine>
<echartsLine ref="echartsLine2" :rotate="60" :lineDataX='needX' :lineDataY='needY'></echartsLine>
</div>
</div>
<div style="height:30%" class='jscR3'>
@ -100,7 +101,10 @@
import echartsMap from "./components/echartsMap.vue";
import echartsLine from "./components/echartsLine.vue";
import echartsPie from "./components/echartsPie.vue";
import CountTo from 'vue-count-to'
import CountTo from 'vue-count-to'
import {
getChartsHome
} from "../../api/dashboard.js"
export default {
components: {
echartsMap,
@ -109,96 +113,80 @@
CountTo
},
data() {
return {
return {
showChart:false,
radiusType1: ['40%', '60%'],
radiusType: '50%',
ageX: ['0-18', '19-35', '35-60', '60以上'],
ageY: [33, 56, 17, 44],
monthX: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
monthY: [5, 6, 7, 8, 9, 10, 12, 5, 6, 7, 8, 9],
needX: ['健康体检', '残疾人补贴', '康复', '托养', '无障碍改造'],
needY: [33, 56, 17, 44, 16],
peopleData: [{
value: 310,
name: '金城镇'
}, {
value: 234,
name: '儒林镇'
}, {
value: 135,
name: '直溪镇'
}, {
value: 548,
name: '朱林镇'
}, {
value: 148,
name: '薛埠镇'
}, {
value: 99,
name: '指前镇'
}, {
value: 58,
name: '东城街道'
}, {
value: 158,
name: '西城街道'
}, {
value: 258,
name: '尧塘街道'
}],
ageX: [],
ageY: [],
monthX: [],
monthY: [],
needX: [],
needY: [],
needNames:{
starts_subsidys:'自主创业',
starts_addresses:'经营场地',
fuels:'燃油补贴',
disabilities:'残疾人证',
educations:'教育专项',
recoveries:"康复设备"
},
peopleData: [],
sexData: [{
value: 335,
value: 0,
text:'man',
name: '男性'
}, {
value: 335,
value: 0,
text:'woman',
name: '女性'
}],
jscMtList: [{
icon: require('../../assets/jsc/iconimg1.jpg'),
text: '今年总数',
num: 100
num: 0
}, {
icon: require('../../assets/jsc/iconimg2.jpg'),
text: '今年新增',
num: 123
num: 0
}, {
icon: require('../../assets/jsc/iconimg3.jpg'),
text: '今年减少',
num: 45
num: 0
}, {
icon: require('../../assets/jsc/iconimg4.jpg'),
text: '今年访视',
num: 99
num: 0
}],
jscL1typeList: [{
icon: require('../../assets/jsc/icon_img1.png'),
text: '视力残疾',
num: 72
text: '视力',
num: 0
}, {
icon: require('../../assets/jsc/icon_img2.png'),
text: '听力残疾',
num: 36
text: '听力',
num: 0
}, {
icon: require('../../assets/jsc/icon_img3.png'),
text: '言语残疾',
num: 56
text: '言语',
num: 0
}, {
icon: require('../../assets/jsc/icon_img4.png'),
text: '肢体残疾',
num: 87
text: '肢体',
num: 0
}, {
icon: require('../../assets/jsc/icon_img5.png'),
text: '智力残疾',
num: 24
text: '智力',
num: 0
}, {
icon: require('../../assets/jsc/icon_img1.png'),
text: '精神残疾',
num: 101
text: '精神',
num: 0
}, {
icon: require('../../assets/jsc/icon_img2.png'),
text: '多重残疾',
num: 18
text: '多重',
num: 0
}]
}
},
@ -213,9 +201,15 @@
that.$refs.echartsLine2.resetCharts()
that.$refs.echartsPie.resetCharts()
that.$refs.echartsPie1.resetCharts()
}
}
this.loadData()
},
methods: {
methods: {
todashboard(){
this.$router.push({
path: '/'
})
},
setRem() {
// 使100px
const baseSize = 100;
@ -224,6 +218,56 @@
const rem = vW * baseVal; // ,font-size
window.$size = rem / 100;
document.documentElement.style.fontSize = rem + "px";
},
loadData(){
getChartsHome().then(res=>{
//
this.jscMtList[0].num = res.total.year_total
this.jscMtList[1].num = res.total.year_total - res.total.lastyear_total
this.jscMtList[2].num = res.total.year_des_total
this.jscMtList[3].num = res.total.year_viewrecords
//
for(var age in res.age_total){
this.ageX.push(age)
this.ageY.push(res.age_total[age])
}
//
for(var need of res.apply){
let names = ''
for (var k in this.needNames){
if(need.table==k){
names = this.needNames[k]
}
}
this.needX.push(names?names:need.name)
this.needY.push(need.total)
}
//
for(var type of res.disability_type){
for(var type1 of this.jscL1typeList){
if(type.value==type1.text){
type1.num = type.total
}
}
}
//
this.sexData[0].value = res.sex_total['man']
this.sexData[1].value = res.sex_total['woman']
//
for(var street of res.street_list){
this.peopleData.push({
name:street.value,
value:street.total
})
}
// 访
for(var view of res.viewrecords){
this.monthX.push(view.month)
this.monthY.push(view.total)
}
this.showChart = true
})
}
},
@ -262,6 +306,9 @@
background: url(../../assets/jsc/headbg.png) no-repeat left bottom;
background-size: 100% auto;
padding: 0 2%;
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.jscT img {
@ -269,6 +316,15 @@
margin-top: 10px
}
.jscT span {
font-size: 20px;
color: #fff;
height: 48px;
line-height: 48px;
color:#b7efff;
cursor: pointer;
}
.jscB {
display: flex;
justify-content: space-between;

@ -111,11 +111,13 @@
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
this.loading = true
this.loading = true
console.log("this.redirect",this.redirect)
// return
this.$store.dispatch('user/login', this.loginForm).then(() => {
this.$router.push({
path: this.redirect || '/'
path: '/admin/jsc'
})
this.loading = false
}).catch(() => {

@ -409,7 +409,8 @@
}
} else {
this.id = ''
this.type = ''
this.type = ''
this.mapform = []
this.$refs['dialog'].reset()
}
},

@ -5,13 +5,21 @@
<lx-header icon="md-apps" text="档案管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="搜索" />
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="搜索姓名" />
<el-select class='street' v-model="select.street" placeholder="请选择" clearable>
<el-option
v-for="item in streetList"
:key="item.value"
:label="item.value"
:value="item.value">
</el-option>
</el-select>
<Button type="primary" @click="getindex"></Button>
<Button icon="ios-add" type="primary" style="margin-left: 10px;"
<Button type="primary" style="margin-left: 10px;"
@click="$refs['addRecord'].isShow = true,$refs['addRecord'].type = 'add'">添加</Button>
<Button icon="ios-add" type="primary" style="margin-left: 10px;"
<Button type="primary" style="margin-left: 10px;"
@click="$refs['imports'].show()">导入</Button>
<Button icon="ios-add" type="primary" style="margin-left: 10px;"
<Button type="primary" style="margin-left: 10px;"
@click="exportExcel(new Date().getTime().toString())">导出</Button>
</div>
</slot>
@ -72,9 +80,10 @@
select: {
pageSize: 10,
pageIndex: 1,
keyword: ""
},
rukuType: '',
keyword: "",
street:''
},
streetList:[],
customForm: {
customFormId: 1,
tableName: "records"
@ -180,6 +189,10 @@
"key": "name",
"op": "like",
"value": this.select.keyword
},{
"key": "street",
"op": "eq",
"value": this.select.street
}],
})
this.list = res.data
@ -298,11 +311,25 @@
},
mounted() {
this.getindex()
this.getField()
this.getField()
getparameter({
number:'streetList'
}).then(res=>{
this.streetList = res.detail
})
}
}
</script>
<style scoped lang="scss">
<style scoped>
.street{
margin-right:10px
}
/deep/ .street .el-input__inner{
height:32px;
}
/deep/ .street .el-select__caret{
line-height: 32px;
}
</style>

@ -1,5 +1,27 @@
<template>
<div v-loading='fullscreenLoading'>
<div style="position: relative;" v-loading='fullscreenLoading'>
<div class='opensearch' @click='openSearch = true' v-if="!openSearch">
查询
</div>
<div class='mapsearch' v-else>
<span class="closeSearch" @click='openSearch = false'>
<i class="el-icon-arrow-right"></i>
</span>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;margin-bottom:10px">
<Input v-model="select.name" style="width: 200px;margin-right: 10px;" placeholder="搜索姓名" />
<el-select class='street' v-model="select.street" placeholder="请选择街道" clearable>
<el-option v-for="item in streetList" :key="item.value" :label="item.value" :value="item.value">
</el-option>
</el-select>
<Button type="primary" @click="getindex"></Button>
</div>
<div>
<Table :width="482" :max-height='280' @on-row-click='movetoperson' :height='280' highlight-row
ref="currentRowTable" :columns="columns" :data="mapList" />
<Page :current="select.page" :total="select.total" size="small" show-total show-elevator
style="padding-top: 14px;display: flex;justify-content: center;" @on-change="pageChange" />
</div>
</div>
<div class="map" id="map" :style="{'height':mapHeight+'px'}"></div>
<div ref='infoWindow' id="infoWindow">
<i @click='closeWin' class="el-icon-close"></i>
@ -13,7 +35,9 @@
</template>
<script>
// zoom,center便
import {
getparameter
} from "@/api/system/dictionary";
import {
index
} from "@/api/system/baseForm.js"
@ -24,18 +48,43 @@
center: [119.597897, 31.723247],
mapHeight: 0,
map: null,
makerList: [],
infoWindow: null,
openData: [],
// markerList: [],
mapList: [],
fullscreenLoading: false
fullscreenLoading: false,
streetList: [],
openSearch: false,
select: {
page_size: 1,
page: 1,
street: '',
name: '',
table_name: 'records',
show_relation: ['admin', 'department'],
total: 0
},
columns: [{
title: '姓名',
key: 'name',
}, {
title: '所属街道',
key: 'street',
}]
}
},
mounted() {
this.initHeight()
getparameter({
number: 'streetList'
}).then(res => {
this.streetList = res.detail
})
this.$nextTick(function() {
this.mapInit()
})
this.getindex()
},
methods: {
@ -66,7 +115,7 @@
avoid: [20, 20, 20, 20],
content: this.$refs.infoWindow,
closeWhenClickMap: true,
offset: new AMap.Pixel(-10, -40)
offset: new AMap.Pixel(-10, -10)
})
},
//
@ -105,9 +154,66 @@
},
//
setMapMarker() {
let makerList = []
this.mapList.forEach((item) => {
var that = this
that.map.remove(that.makerList)
that.makerList = []
// this.map.clearMap();
console.log("this.makerList", this.makerList)
console.log("this.mapList", this.mapList)
let list = this.mapList.map((m) => {
return {
id: m.id, //id
name: m.name, //
reside: m.reside,
// lnglat: [m.lon, m.lat],//
lnglat: [m.longitude, m.latitude], //84
style: 0, //
};
});
// this.$nextTick(() => {
// var mass = new AMap.MassMarks(list, {
// opacity: 0.8,
// zIndex: 111,
// cursor: 'pointer',
// style: {
// url: 'https://webapi.amap.com/images/mass/mass1.png',
// anchor: new AMap.Pixel(6, 6),
// size: new AMap.Size(11, 11),
// zIndex: 999,
// }
// });
// // var marker = new AMap.Marker({
// // content: ' ',
// // map: this.map,
// // });
// mass.on('mouseover', function(e) {
// console.log("e", e)
// that.openData = []
// // marker.setPosition(e.data.lnglat);
// // marker.setLabel({
// // content: e.data.name
// // })
// that.openData.push(e.data)
// that.infoWindow.open(that.map, e.data.lnglat)
// });
// // marker.on('click', (e) => {
// // this.openData = []
// // if (e.target.w.extData === item.id) {
// // this.openData.push(item)
// // }
// // this.infoWindow.open(this.map, e.target.getPosition())
// // }),
// mass.setMap(this.map);
// })
this.mapList.forEach((item, index) => {
//
if (!item.longitude || !item.latitude) {
return
}
let marker = new AMap.Text({
map: this.map,
text: item.name,
@ -128,10 +234,9 @@
}
this.infoWindow.open(this.map, e.target.getPosition())
}),
makerList.push(marker)
this.makerList.push(marker)
});
this.map.add(makerList)
//
this.map.add(this.makerList)
},
closeWin() {
this.infoWindow.close()
@ -144,13 +249,37 @@
}
})
},
pageChange(e) {
this.select.page = e
this.getindex()
},
movetoperson(row, index) {
console.log(row)
this.openData = []
this.openData.push(row)
this.map.panTo([row.longitude, row.latitude])
this.infoWindow.open(this.map, [row.longitude, row.latitude])
},
async getindex() {
this.fullscreenLoading = true;
this.mapList = []
// this.map.remove(this.marker)
let res = await index({
page_size: 99999,
page: 1,
table_name: 'records',
page_size: this.select.page_size,
page: this.select.page,
table_name: this.select.table_name,
show_relation: this.select.show_relation,
filter: [{
"key": "name",
"op": "like",
"value": this.select.name
}, {
"key": "street",
"op": "eq",
"value": this.select.street
}],
})
this.select.total = res.total
let _data = []
let _nolng = [] //
for (var k of res.data) {
@ -159,12 +288,11 @@
} else {
if (k.reside == null || k.reside == '') {
// return
}else{
_nolng.push(k)
} else {
_nolng.push(k)
}
}
}
console.log(_nolng)
}
// return
this.mapList = _data
var geocoder = null
@ -173,23 +301,30 @@
geocoder = new AMap.Geocoder({
city: '常州市' // city adcode citycode
})
for (let k of _nolng) {
_nolng.map((k, index) => {
geocoder.getLocation(k.reside, function(status, result) {
if (status === 'complete' && result.info === 'OK') {
// result
k.longitude = result.geocodes[0].location.lng
k.latitude = result.geocodes[0].location.lat
}
if (index == _nolng.length - 1) {
that.mapList.push(..._nolng)
that.setMapMarker()
that.fullscreenLoading = false;
}
})
}
})
// for (let k of _nolng) {
// }
})
setTimeout(function() {
that.mapList.push(..._nolng)
that.setMapMarker()
that.fullscreenLoading = false;
}, 1000);
// setTimeout(function() {
// that.mapList.push(..._nolng)
// that.setMapMarker()
// that.fullscreenLoading = false;
// }, 5000);
@ -225,4 +360,55 @@
cursor: pointer;
color: #147d38;
}
.opensearch {
position: absolute;
top: 10px;
right: 10px;
z-index: 99;
color: #fff;
width: 50px;
height: 50px;
background: #147d38;
border-radius: 50px;
text-align: center;
line-height: 50px;
cursor: pointer;
font-weight: bold;
}
.mapsearch {
position: absolute;
top: 10px;
right: 10px;
z-index: 99;
background: #fff;
padding: 10px;
}
.closeSearch{
position: absolute;
top: 40%;
left: -20px;
/* border: 1px solid red; */
width: 40px;
height: 40px;
border-radius: 40px 0 0 40px;
text-align: center;
line-height: 40px;
font-size: 22px;
background: #fff;
z-index: 99;
cursor: pointer;
}
.street {
margin-right: 10px
}
/deep/ .street .el-input__inner {
height: 32px;
}
/deep/ .street .el-select__caret {
line-height: 32px;
}
</style>

@ -47,6 +47,28 @@
</el-select>
</div>
</div>
</template>
<template v-slot:uploads>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>附件
</div>
<div class="xy-table-item-content">
<el-upload
class="upload-demo"
style="width: 800px;"
:action="actions"
:data='filedata'
:on-remove="handleRemove"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:on-success="handlesuccess"
:file-list="viewuploadsList">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
</div>
</template>
<template v-slot:infotext>
<div class="xy-table-item">
@ -374,7 +396,10 @@
<script>
import {
getparameter
} from "@/api/system/dictionary";
} from "@/api/system/dictionary";
import {
getToken
} from '@/utils/auth'
import {
save,
index,
@ -398,12 +423,18 @@
mapparams: {
zoom: 11,
},
mapform: [],
mapform: [],
actions:`${process.env.VUE_APP_UPLOAD_API}`,
filedata: {
token: ""
},
viewuploadsList:[],
form: {
viewtext: '',
viewtime: "",
viewscene: "",
viewstatus: '',
viewstatus: '',
uploads:'',
infotext: '',
street:'',
name: '',
@ -449,7 +480,8 @@
}
},
created() {
created() {
this.filedata.token = getToken();
this.getLabel()
},
watch: {
@ -463,7 +495,9 @@
} else {
this.id = ''
this.type = ''
this.person_id = ''
this.person_id = ''
this.mapform = []
this.viewuploadsList = []
this.$refs['dialog'].reset()
}
},
@ -489,6 +523,22 @@
}
}
},
//
handleRemove(file, fileList) {
for (var i = 0; i < this.viewuploadsList.length; i++) {
if (this.viewuploadsList[i].url == file.url) {
this.viewuploadsList.splice(i, 1)
}
}
console.log(this.viewuploadsList,file)
},
handleExceed(files, fileList) {},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${ file.original_name }`);
},
handlesuccess(response, file, fileList) {
this.viewuploadsList = fileList;
},
async getRecordDetail() {
const res = await show({
@ -545,7 +595,8 @@
viewscene: res?.viewscene,
viewstatus: res?.viewstatus,
person_id: res?.person_id,
checkstatus: res?.checkstatus,
checkstatus: res?.checkstatus,
uploads:res?.uploads,
infotext: res?.infotext,
street:res?.street,
name: res?.name,
@ -578,12 +629,33 @@
guardian_telephone: res?.guardian_telephone,
remark: res?.remark,
}
this.mapform = [res.longitude,res.latitude,res.reside]
this.mapform = [res.longitude,res.latitude,res.reside]
for(var m in res.uploads_uploads_id_relation){
if(m=='name'){
res.uploads_uploads_id_relation[m] = res.uploads_uploads_id_relation['original_name']
}
}
this.viewuploadsList.push(res.uploads_uploads_id_relation)
console.log("this.viewuploadsList",this.viewuploadsList,this.form.uploads)
},
submit(val) {
submit(val) {
if(this.viewuploadsList.length>0){
for (var m of this.viewuploadsList) {
if(m.response){
this.form.uploads = m.response.id
}else{
this.form.uploads = m.id
}
}
}else{
this.form.uploads = ''
}
// return
if (this.type === 'add') {
this.form.person_id = this.person_id
this.form.checkstatus = '待审核'

@ -82,7 +82,8 @@
viewtime: "",
viewscene: "",
viewstatus: '',
infotext: '',
infotext: '',
street:res?.street,
name: res?.name,
nation: res?.nation,
sex: res?.sex,
@ -124,7 +125,8 @@
viewstatus: res?.viewstatus,
person_id: res?.person_id,
checkstatus: res?.checkstatus,
infotext: res?.infotext,
infotext: res?.infotext,
street:res?.street,
name: res?.name,
nation: res?.nation,
sex: res?.sex,

@ -7,10 +7,10 @@
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="搜索" />
<Button type="primary" @click="getindex"></Button>
<Button icon="ios-add" type="primary" style="margin-left: 10px;"
<!-- <Button type="primary" style="margin-left: 10px;"
@click="$refs['addViewRecord'].isShow = true,$refs['addViewRecord'].type = 'add'">新增</Button> -->
<Button type="primary" style="margin-left: 10px;"
@click="exportExcel(new Date().getTime().toString())">导出</Button>
<!-- <Button icon="ios-add" type="primary" style="margin-left: 10px;"
@click="$refs['check'].isShow = true,$refs['check'].type = 'add'">添加</Button> -->
<!-- <Button icon="ios-add" type="primary" style="margin-left: 10px;"
@click="$refs['imports'].show()">导入</Button> -->
</div>

Loading…
Cancel
Save