|
@@ -0,0 +1,131 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <van-nav-bar
|
|
|
+ @click-left="onClickLeft"
|
|
|
+ @click-right="onClickRight"
|
|
|
+ style="background-color: #1989fa"
|
|
|
+ >
|
|
|
+ <template #title>
|
|
|
+ <van-col style="color: #ffffff">客户</van-col>
|
|
|
+ </template>
|
|
|
+ <template #left>
|
|
|
+ <i
|
|
|
+ class="fa fa-arrow-circle-left"
|
|
|
+ aria-hidden="true"
|
|
|
+ style="color: #ffffff; font-size: 18px"
|
|
|
+ ></i>
|
|
|
+ </template>
|
|
|
+ <template #right>
|
|
|
+ <van-icon name="replay" size="18" color="#ffffff" />
|
|
|
+ </template>
|
|
|
+ </van-nav-bar>
|
|
|
+
|
|
|
+ <van-list
|
|
|
+ v-model="loading"
|
|
|
+ :finished="finished"
|
|
|
+ finished-text="已显示所有数据"
|
|
|
+ @load="GetSaClientSummary"
|
|
|
+ >
|
|
|
+ <van-cell
|
|
|
+ v-for="item in getData"
|
|
|
+ :key="item.saleState"
|
|
|
+ :title="item.saleState+'客户'"
|
|
|
+ :value="item.clientCount"
|
|
|
+ border
|
|
|
+ is-link
|
|
|
+ title-class="title1"
|
|
|
+ value-class="value1"
|
|
|
+ size="large"
|
|
|
+ @click="click1($event, item.saleState)"
|
|
|
+ >
|
|
|
+ <template #icon>
|
|
|
+ <i class="fa fa-heart size" aria-hidden="true" v-if="item.saleState=='问询'" style="color:red;"></i>
|
|
|
+ <i class="fa fa-plane size" aria-hidden="true" v-if="item.saleState=='认筹'"></i>
|
|
|
+ <i class="fa fa-sort-alpha-desc size" aria-hidden="true" v-if="item.saleState=='排号'" style="color:green;"></i>
|
|
|
+ <i class="fa fa-bars size" aria-hidden="true" v-if="item.saleState=='预订'" style="color:orange;"></i>
|
|
|
+ <i class="fa fa-sellsy size" aria-hidden="true" v-if="item.saleState=='认购'" style="color:#ff6600;"></i>
|
|
|
+ <i class="fa fa-list-alt size" aria-hidden="true" v-if="item.saleState=='签约'" style="color:#ff6600;"></i>
|
|
|
+ <i class="fa fa-product-hunt size" aria-hidden="true" v-if="item.saleState=='公共'" style="color:blue;"></i>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ </van-list>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { GetSaClientSummary } from "@/common/api/loginApi.js";
|
|
|
+export default {
|
|
|
+ name: "login",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ data: [],
|
|
|
+ loading: false,
|
|
|
+ finished: false,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created: function () {
|
|
|
+ console.info("created");
|
|
|
+ //console.info(this.$util);
|
|
|
+ this.$util.persistLogin(this);
|
|
|
+ },
|
|
|
+ computed:{ //计算属性
|
|
|
+ getData:function(){
|
|
|
+ var arr=this.data.filter(function(item){
|
|
|
+ return item.visible==0;
|
|
|
+ });
|
|
|
+ console.info('arr',arr);
|
|
|
+ return arr;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ GetSaClientSummary: function () {
|
|
|
+ var that = this;
|
|
|
+ var data = {
|
|
|
+ userCode: that.$store.state.data.userCode,
|
|
|
+ projectId: that.$store.state.projectId
|
|
|
+
|
|
|
+ };
|
|
|
+ console.info("data", data);
|
|
|
+ GetSaClientSummary(data).then((res) => {
|
|
|
+ console.info("GetSaClientSummary", res);
|
|
|
+ if (!res.result) {
|
|
|
+ that.$toast(res.msg);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ res.data.forEach(function (item, index, array) {
|
|
|
+ that.$set(that.data, index, item);
|
|
|
+ });
|
|
|
+ that.loading = false;
|
|
|
+ that.finished = true;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 行选择点击跳转
|
|
|
+ click1: function (event, saleState) {
|
|
|
+ //console.info("click1 event", event);
|
|
|
+ this.$router.push({path:'/getsaclientsummarylist',query:{saleState:saleState}});
|
|
|
+ },
|
|
|
+ onClickLeft() {
|
|
|
+ // this.$toast('返回')
|
|
|
+ console.info("left");
|
|
|
+ this.$router.go(-1);
|
|
|
+ },
|
|
|
+ onClickRight() {
|
|
|
+ this.$router.go(0);
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
|
+<style scoped>
|
|
|
+.title1 {
|
|
|
+ color: #999;
|
|
|
+}
|
|
|
+.value1 {
|
|
|
+ color: #999;
|
|
|
+ font-size: 18px;
|
|
|
+}
|
|
|
+.size{
|
|
|
+ font-size:16px;
|
|
|
+}
|
|
|
+</style>
|