|
@@ -6,6 +6,29 @@
|
|
|
团练宝分润
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
+ <el-card header="" style="width:460px" class="myCard">
|
|
|
+ <statistic class="statistic" :cols="0">
|
|
|
+ <statistic-item>
|
|
|
+ <span>
|
|
|
+ 意向机构
|
|
|
+ </span>
|
|
|
+ <span> <count-to :endVal="detail.tenantAgency" :decimals="2" /></span>
|
|
|
+ </statistic-item>
|
|
|
+ <statistic-item>
|
|
|
+ <span>
|
|
|
+ 入驻机构
|
|
|
+
|
|
|
+ </span>
|
|
|
+ <span> <count-to :endVal="detail.preTenant" :decimals="2" /></span>
|
|
|
+ </statistic-item>
|
|
|
+ <statistic-item>
|
|
|
+ <span>
|
|
|
+ 团练包销售数(个月)
|
|
|
+ </span>
|
|
|
+ <span> <count-to :endVal="detail.memberCount" :decimals="2" /></span>
|
|
|
+ </statistic-item>
|
|
|
+ </statistic>
|
|
|
+ </el-card>
|
|
|
<save-form
|
|
|
:inline="true"
|
|
|
:model="searchForm"
|
|
@@ -39,7 +62,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-date-picker
|
|
|
- :clearable="false"
|
|
|
+ :clearable="false"
|
|
|
v-model.trim="searchForm.timer"
|
|
|
style="width: 420px"
|
|
|
type="daterange"
|
|
@@ -84,12 +107,8 @@
|
|
|
prop="tenantName"
|
|
|
label="机构名称"
|
|
|
></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- prop="activeDate"
|
|
|
- label="激活时间"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
+ <el-table-column align="center" prop="activeDate" label="激活时间">
|
|
|
+ <template slot-scope="scope">
|
|
|
{{ scope.row.activeDate | formatTimer }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -123,16 +142,21 @@ import { getToken } from "@/utils/auth";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import { getTimes } from "@/utils";
|
|
|
import load from "@/utils/loading";
|
|
|
-import { getProxyUserList,getProxyDividend } from "./api";
|
|
|
+import { getProxyUserList, getProxyDividend } from "./api";
|
|
|
+import countTo from 'vue-count-to'
|
|
|
export default {
|
|
|
- components: { pagination },
|
|
|
+ components: { pagination , 'count-to': countTo},
|
|
|
data() {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
search: null,
|
|
|
timer: [],
|
|
|
},
|
|
|
-
|
|
|
+ detail:{
|
|
|
+ memberCount:0,
|
|
|
+ preTenant:0,
|
|
|
+ tenantAgency:0
|
|
|
+ },
|
|
|
tableList: [],
|
|
|
organList: [],
|
|
|
rules: {
|
|
@@ -150,15 +174,15 @@ export default {
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
// 获取分部
|
|
|
- this.searchForm.timer = this.getInitDate()
|
|
|
+ this.searchForm.timer = this.getInitDate();
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
this.getProxList();
|
|
|
- this.getList()
|
|
|
+ this.getList();
|
|
|
},
|
|
|
- async getProxList() {
|
|
|
+ async getProxList() {
|
|
|
try {
|
|
|
const res = await getProxyUserList({
|
|
|
page: 1,
|
|
@@ -168,7 +192,7 @@ export default {
|
|
|
this.proxyList = res.data.rows;
|
|
|
} catch (e) {}
|
|
|
},
|
|
|
- async getList() {
|
|
|
+ async getList() {
|
|
|
let { timer, ...rest } = this.searchForm;
|
|
|
let params = {
|
|
|
...rest,
|
|
@@ -176,20 +200,30 @@ export default {
|
|
|
rows: this.rules.limit,
|
|
|
...getTimes(timer, ["startData", "endData"]),
|
|
|
};
|
|
|
- try{
|
|
|
- const res = await getProxyDividend({...params})
|
|
|
- this.tableList = res.data.rows;
|
|
|
- this.rules.total = res.data.total;
|
|
|
- }catch(e){
|
|
|
- console.log(e)
|
|
|
+ try {
|
|
|
+ const res = await getProxyDividend({ ...params });
|
|
|
+ this.tableList = res.data.pageData.rows;
|
|
|
+ this.rules.total = res.data.pageData.total;
|
|
|
+ this.detail = {
|
|
|
+ memberCount:res.data.memberCount,
|
|
|
+ preTenant:res.data.preTenant,
|
|
|
+ tenantAgency:res.data.tenantAgency
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
}
|
|
|
},
|
|
|
search() {
|
|
|
this.rules.page = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
- onReSet() {},
|
|
|
- getInitDate() {
|
|
|
+ onReSet() {
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.searchForm.timer = this.getInitDate();
|
|
|
+ this.search()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getInitDate() {
|
|
|
const end = this.$helpers.dayjs(new Date()).format("YYYY-MM-DD");
|
|
|
const start = this.$helpers
|
|
|
.dayjs(new Date())
|
|
@@ -201,4 +235,10 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang='scss' scoped>
|
|
|
+.myCard {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ /deep/.el-card__body {
|
|
|
+ padding: 0 20px!important;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|