parent
cea758f976
commit
a2f8765173
@ -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>
|
||||
@ -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>
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in new issue