|
|
@@ -1,74 +1,75 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <third-register></third-register>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
<basic-container>
|
|
|
- <el-col :span="24">
|
|
|
- <avue-form :option="agentInfo.accountInfo.option" v-model="agentInfo.accountInfo.agentData">
|
|
|
- <template slot-scope="scope" slot="avatar">
|
|
|
- <avue-avatar :size="50" shape="circle" icon="el-icon-circle-plus-outline"
|
|
|
- :src="agentInfo.accountInfo.agentData.avatar"
|
|
|
- style="border: 1px solid #eee"/>
|
|
|
- <span class="mallName">{{ agentInfo.accountInfo.agentData.accountName }}</span>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope" slot="totalBalance">
|
|
|
- <span>{{ agentInfo.accountInfo.agentData.totalBalance }} 元</span>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope" slot="availableValance">
|
|
|
- <span>{{ agentInfo.accountInfo.agentData.availableValance }} 元</span>
|
|
|
- </template>
|
|
|
- </avue-form>
|
|
|
- </el-col>
|
|
|
+ <avue-form :option="agentInfo.accountInfo.option" v-model="agentInfo.accountInfo.agentData">
|
|
|
+ <template slot-scope="scope" slot="avatar">
|
|
|
+ <avue-avatar :size="50" shape="circle" icon="el-icon-circle-plus-outline"
|
|
|
+ :src="agentInfo.accountInfo.agentData.avatar"
|
|
|
+ style="border: 1px solid #eee"/>
|
|
|
+ <span class="mallName">{{ agentInfo.accountInfo.agentData.accountName }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="totalBalance">
|
|
|
+ <span>{{ agentInfo.accountInfo.agentData.totalBalance }} 元</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="availableValance">
|
|
|
+ <span>{{ agentInfo.accountInfo.agentData.availableValance }} 元</span>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
</basic-container>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <basic-container>
|
|
|
- <el-card class="box-card">
|
|
|
- <avue-data-panel :option="optionTotal"></avue-data-panel>
|
|
|
- </el-card>
|
|
|
- <div style="margin-top: 30px;">
|
|
|
- <h3>今日新增</h3>
|
|
|
- <avue-data-display :option="optionToday"></avue-data-display>
|
|
|
- </div>
|
|
|
- <div style="margin-top: 30px;">
|
|
|
- <h3>新增趋势
|
|
|
- <el-date-picker
|
|
|
- size="mini"
|
|
|
- :picker-options="tenantAddTrend.pickerOptions"
|
|
|
- v-model="tenantAddTrend.time"
|
|
|
- type="month"
|
|
|
- @change="getTenantAddTrend"
|
|
|
- value-format="yyyy-MM"
|
|
|
- placeholder="选择月"
|
|
|
- style="float: right">
|
|
|
- </el-date-picker>
|
|
|
- </h3>
|
|
|
- <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
|
|
|
- </div>
|
|
|
- <div style="margin-top: 30px;">
|
|
|
- <h3>代理账单
|
|
|
- <el-date-picker
|
|
|
- size="mini"
|
|
|
- :picker-options="tenantPlatformBills.pickerOptions"
|
|
|
- v-model="tenantPlatformBills.time"
|
|
|
- type="month"
|
|
|
- @change="getTenantPlatformBills"
|
|
|
- value-format="yyyy-MM"
|
|
|
- placeholder="选择月"
|
|
|
- style="float: right">
|
|
|
- </el-date-picker>
|
|
|
- </h3>
|
|
|
- <div ref="tenantPlatformBills" style="height: 500px;width: 100%"></div>
|
|
|
- </div>
|
|
|
- </basic-container>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <basic-container>
|
|
|
+ <avue-data-panel :option="optionTotal"></avue-data-panel>
|
|
|
+ </basic-container>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <basic-container>
|
|
|
+ <div>
|
|
|
+ <h3>今日新增</h3>
|
|
|
+ <avue-data-display :option="optionToday"></avue-data-display>
|
|
|
+ </div>
|
|
|
+ </basic-container>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <basic-container>
|
|
|
+ <div>
|
|
|
+ <h3>新增趋势
|
|
|
+ <el-date-picker
|
|
|
+ size="mini"
|
|
|
+ :picker-options="tenantAddTrend.pickerOptions"
|
|
|
+ v-model="tenantAddTrend.time"
|
|
|
+ type="month"
|
|
|
+ @change="getTenantAddTrend"
|
|
|
+ value-format="yyyy-MM"
|
|
|
+ placeholder="选择月"
|
|
|
+ style="float: right">
|
|
|
+ </el-date-picker>
|
|
|
+ </h3>
|
|
|
+ <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
|
|
|
+ </div>
|
|
|
+ </basic-container>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <basic-container>
|
|
|
+ <div>
|
|
|
+ <h3>代理账单
|
|
|
+ <el-date-picker
|
|
|
+ size="mini"
|
|
|
+ :picker-options="tenantPlatformBills.pickerOptions"
|
|
|
+ v-model="tenantPlatformBills.time"
|
|
|
+ type="month"
|
|
|
+ @change="getTenantPlatformBills"
|
|
|
+ value-format="yyyy-MM"
|
|
|
+ placeholder="选择月"
|
|
|
+ style="float: right">
|
|
|
+ </el-date-picker>
|
|
|
+ </h3>
|
|
|
+ <div ref="tenantPlatformBills" style="height: 500px;width: 100%"></div>
|
|
|
+ </div>
|
|
|
+ </basic-container>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</template>
|
|
|
<script>
|
|
|
import moment from "moment";
|
|
|
@@ -190,7 +191,7 @@ export default {
|
|
|
['trend'],
|
|
|
['商户新增'],
|
|
|
],
|
|
|
- path: [ "/ldt_agent/agentrecord"]
|
|
|
+ path: ["/ldt_agent/agentrecord"]
|
|
|
},
|
|
|
xAxis: {type: 'category'},
|
|
|
yAxis: {gridIndex: 0, splitNumber: 2},
|
|
|
@@ -271,12 +272,12 @@ export default {
|
|
|
this.getTenantPlatformBills();
|
|
|
},
|
|
|
//删除数组的某个元素
|
|
|
- deleteArrayByObj(arr,attrName,...value){
|
|
|
- value.forEach(ele=>{
|
|
|
- for (let i = 0;i < arr.length; i++){
|
|
|
+ deleteArrayByObj(arr, attrName, ...value) {
|
|
|
+ value.forEach(ele => {
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
const column = arr[i];
|
|
|
- if (ele === column[attrName]){
|
|
|
- arr.splice(i,1);
|
|
|
+ if (ele === column[attrName]) {
|
|
|
+ arr.splice(i, 1);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -285,22 +286,22 @@ export default {
|
|
|
getTenantCensusCount() {
|
|
|
//获取租户数量
|
|
|
getAgentTenantCensusCount().then(res => {
|
|
|
- this.setArrayObjAttrByObj(this.optionTotal.data,"title","商店总数","count",res.data.data.shopCount);
|
|
|
- this.setArrayObjAttrByObj(this.optionTotal.data,"title","收入总额","count",res.data.data.incomeTotal);
|
|
|
+ this.setArrayObjAttrByObj(this.optionTotal.data, "title", "商店总数", "count", res.data.data.shopCount);
|
|
|
+ this.setArrayObjAttrByObj(this.optionTotal.data, "title", "收入总额", "count", res.data.data.incomeTotal);
|
|
|
});
|
|
|
},
|
|
|
//获取租户当日数据统计
|
|
|
getTenantTodayCensusCount() {
|
|
|
//获取租户数量
|
|
|
getAgentTenantTodayCensusCount().then(res => {
|
|
|
- this.setArrayObjAttrByObj(this.optionToday.data,"title","新增商户","count",res.data.data.shopCount);
|
|
|
- this.setArrayObjAttrByObj(this.optionToday.data,"title","今日收入","count",res.data.data.incomeTotal);
|
|
|
+ this.setArrayObjAttrByObj(this.optionToday.data, "title", "新增商户", "count", res.data.data.shopCount);
|
|
|
+ this.setArrayObjAttrByObj(this.optionToday.data, "title", "今日收入", "count", res.data.data.incomeTotal);
|
|
|
});
|
|
|
},
|
|
|
//设置数组对象属性值
|
|
|
- setArrayObjAttrByObj(arr,attrName,attrValue,key,value){
|
|
|
- arr.forEach(ele=>{
|
|
|
- if(ele[attrName]===attrValue){
|
|
|
+ setArrayObjAttrByObj(arr, attrName, attrValue, key, value) {
|
|
|
+ arr.forEach(ele => {
|
|
|
+ if (ele[attrName] === attrValue) {
|
|
|
ele[key] = value;
|
|
|
return;
|
|
|
}
|
|
|
@@ -314,7 +315,7 @@ export default {
|
|
|
time: time.format("yyyy-MM-DD HH:mm:ss")
|
|
|
}).then(res => {
|
|
|
//清空内容
|
|
|
- for(let i=0;i<this.tenantAddTrend.option.dataset.source.length;i++){
|
|
|
+ for (let i = 0; i < this.tenantAddTrend.option.dataset.source.length; i++) {
|
|
|
this.tenantAddTrend.option.dataset.source[i].splice(1);
|
|
|
}
|
|
|
|
|
|
@@ -329,7 +330,7 @@ export default {
|
|
|
|
|
|
//添加Y坐标
|
|
|
//添加商户新增
|
|
|
- this.setAddTrend(res.data.data.shopAddCount,date,"商户新增");
|
|
|
+ this.setAddTrend(res.data.data.shopAddCount, date, "商户新增");
|
|
|
|
|
|
//加上一天
|
|
|
time.add(1, 'days');
|
|
|
@@ -376,7 +377,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//设置趋势
|
|
|
- setAddTrend(arr,date,attrName){
|
|
|
+ setAddTrend(arr, date, attrName) {
|
|
|
//添加Y坐标
|
|
|
let count = 0;
|
|
|
//添加用户新增
|
|
|
@@ -385,8 +386,8 @@ export default {
|
|
|
count = ele.count;
|
|
|
}
|
|
|
});
|
|
|
- this.tenantAddTrend.option.dataset.source.forEach(ele=>{
|
|
|
- if(ele[0]===attrName){
|
|
|
+ this.tenantAddTrend.option.dataset.source.forEach(ele => {
|
|
|
+ if (ele[0] === attrName) {
|
|
|
ele.push(count);
|
|
|
}
|
|
|
});
|