Parcourir la source

协销机构画像

zhengjinyi il y a 2 ans
Parent
commit
342a82ad4b

+ 44 - 20
pages/seller/club/club-portrait.vue

@@ -8,7 +8,7 @@
 			:loadingType="5"
 		></tui-skeleton>
 		<template v-else>
-<!-- 			<view class="charts-navbar" id="topBar">
+			<!-- <view class="charts-navbar" id="topBar">
 				<view
 					class="nav-item tui-skeleton-fillet"
 					v-for="(nav, index) in navBarList"
@@ -26,15 +26,31 @@
 				</view>
 				<!-- 订单 -->
 				<view class="charts-box charts-box1" id="charts-box1">
-					<echartOrder ref="echartOrder" :clubId="clubInfo.clubId" v-if="isRequest" />
+					<echartOrder
+						ref="echartOrder"
+						:clubId="clubInfo.clubId"
+						:totalAmount="totalData.orderTotalAmount"
+						:totalNum="totalData.orderTotal"
+						v-if="isRequest"
+					/>
 				</view>
 				<!-- 关键词 -->
 				<view class="charts-box charts-box2" id="charts-box2">
-					<echartKeyword ref="echartKeyword" :clubId="clubInfo.clubId" v-if="isRequest" />
+					<echartKeyword
+						ref="echartKeyword"
+						:clubId="clubInfo.clubId"
+						:totalNum="totalData.totalKeywords"
+						v-if="isRequest"
+					/>
 				</view>
 				<!-- 咨询记录 -->
 				<view class="charts-box charts-box3" id="charts-box3">
-					<echartContact ref="echartContact" :clubId="clubInfo.clubId" v-if="isRequest" />
+					<echartContact
+						ref="echartContact"
+						:clubId="clubInfo.clubId"
+						:totalNum="totalData.remarksTotal"
+						v-if="isRequest"
+					/>
 				</view>
 				<!-- 访问记录 -->
 				<view class="charts-box charts-box4" id="charts-box4">
@@ -78,7 +94,13 @@ export default {
 			],
 			tabCurrentIndex: 0,
 			anchorList: [], // 锚点元素节点信息
-			anchorStatus: [0, 0, 0, 0, 0] // 分别代表5个锚点区域的开关 0:关  1:开
+			anchorStatus: [0, 0, 0, 0, 0], // 分别代表5个锚点区域的开关 0:关  1:开
+			totalData: {
+				orderTotalAmount: 0, // 订单总金额
+				orderTotal: 0, // 订单总量
+				remarksTotal: 0, // 所有咨询记录条数
+				totalKeywords: 0 // 所有关键词条数
+			}
 		}
 	},
 	onLoad(option) {
@@ -91,19 +113,23 @@ export default {
 		}, 2000)
 	},
 	methods: {
-		getClubInfo(userId) {
+		async getClubInfo(userId) {
 			//获取机构信息
-			this.UserService.OrganizationUpdateModifyInfo({ userId: userId })
-				.then(response => {
-					this.clubInfo = response.data.club
-					setTimeout(() => {
-						this.skeletonShow = false
-						this.isRequest = true
-					}, 1000)
-				})
-				.catch(error => {
-					console.log(error)
-				})
+			try {
+				const clubRes = await this.UserService.OrganizationUpdateModifyInfo({ userId: userId })
+				this.clubInfo =  clubRes.data.club
+				const tialRes = await this.UserService.userClubInitial({ clubId: this.clubInfo.clubId })
+				this.totalData.orderTotal = tialRes.data.orderTotal
+				this.totalData.orderTotalAmount = tialRes.data.orderTotalAmount
+				this.totalData.remarksTotal = tialRes.data.remarksTotal
+				this.totalData.totalKeywords = tialRes.data.totalKeywords
+				setTimeout(() => {
+					this.skeletonShow = false
+					this.isRequest = true
+				}, 1000)
+			} catch (error) {
+				console.log(error)
+			}
 		},
 		tabChange(index) {
 			this.tabCurrentIndex = index
@@ -182,7 +208,6 @@ page {
 	height: auto;
 	box-sizing: border-box;
 	padding: 24rpx;
-	// padding-top: 122rpx;
 }
 .charts-navbar {
 	width: 100%;
@@ -195,7 +220,6 @@ page {
 	top: 0;
 	left: 0;
 	z-index: 9999999;
-	display: none;
 	.nav-item {
 		display: flex;
 		flex: 1;
@@ -360,7 +384,7 @@ page {
 					.input-text {
 						display: block;
 						height: 56rpx;
-						font-size: 26rpx;
+						font-size: 24rpx;
 						color: #666666;
 					}
 					.icon-riqi {

+ 7 - 4
pages/seller/club/components/echart-contact.vue

@@ -6,7 +6,7 @@
 		</view>
 		<view class="echart-search">
 			<view class="echart-search-text">
-				<view class="search-text">所有:<text>{{ contactData.remarksTotal }}条</text></view>
+				<view class="search-text">所有:<text>{{ remarksTotal }}条</text></view>
 				<view class="search-text">当前范围:<text>{{ contactData.remarksScopeNum }}条</text></view>
 			</view>
 			<view class="echart-search-date">
@@ -72,17 +72,21 @@ export default {
 		clubId:{
 			type:Number,
 			default:0
+		},
+		totalNum:{
+			type:Number,
+			default:0
 		}
 	},
 	data() {
 		return {
 			isEmpty:false,
 			current: 0,
+			remarksTotal:0,
 			contactChartData:null,
 			contactData:{
 			    startTime: '',
 			    endTime: '',
-			    remarksTotal:0,
 			    remarksScopeNum:0
 			},
 			params:{
@@ -141,6 +145,7 @@ export default {
 	},
 	created() {
 		this.params.clubId = this.clubId
+		this.remarksTotal = this.totalNum
 		this.userClubPortrait(2)
 	},
 	methods: {
@@ -160,8 +165,6 @@ export default {
 			try {
 				const res = await this.UserService.userClubPortrait(this.params)
 				const data = res.data
-				console.log('data',data)
-				this.contactData.remarksTotal = data.portrait.remarksTotal
 				this.contactData.remarksScopeNum = data.portrait.remarksScopeNum
 				this.contactData.startTime = this.params.startTime = data.portrait.startTime
 				this.contactData.endTime = this.params.endTime = data.portrait.endTime

+ 2 - 2
pages/seller/club/components/echart-info.vue

@@ -7,7 +7,7 @@
 		</view>
 		<view class="echart-main clearfix" @click="handleClubInfo">
 			<view class="echart-text">
-				<text class="label">联系人:</text>{{ data.linkMan }}
+				<text class="label">联系人:</text>{{ data.linkMan ? data.linkMan :'无' }}
 			</view>
 			<view class="echart-text">
 				<text class="label">手机号:</text>{{ data.contractMobile }}
@@ -21,7 +21,7 @@
 			<view class="echart-text" v-if="data.provincialAddress">
 				<text class="label">地址:</text>{{ data.provincialAddress }}
 			</view>
-			<view class="echart-text">
+			<view class="echart-text" v-if="data.addTime">
 				<text class="label">注册时间:</text> {{ data.addTime }}
 			</view>
 			<view class="echart-next">详情></view>

+ 7 - 4
pages/seller/club/components/echart-keyword.vue

@@ -7,7 +7,7 @@
 		<view class="echart-search">
 			<view class="echart-search-text">
 				<view class="search-text"
-					>所有:<text>{{ keyWordData.totalKeywords }}条</text></view
+					>所有:<text>{{ totalKeywords }}条</text></view
 				>
 				<view class="search-text"
 					>当前范围:<text>{{ keyWordData.keyWordsScopeNum }}条</text></view
@@ -76,17 +76,21 @@ export default {
 		clubId:{
 			type:Number,
 			default:0
+		},
+		totalNum:{
+			type:Number,
+			default:0
 		}
 	},
 	data() {
 		return {
 			isEmpty:false,
 			current: 0,
+			totalKeywords:0,
 			keyWordChartData: null,
 			keyWordData: {
 				startTime: '',
 				endTime: '',
-				totalKeywords: 0,
 				keyWordsScopeNum: 0
 			},
 			params:{
@@ -145,6 +149,7 @@ export default {
 	},
 	created() {
 		this.params.clubId = this.clubId
+		this.totalKeywords = this.totalNum
 		this.userClubPortrait(1)
 	},
 	methods: {
@@ -164,8 +169,6 @@ export default {
 			try {
 				const res = await this.UserService.userClubPortrait(this.params)
 				const data = res.data
-				console.log('data',data)
-				this.keyWordData.totalKeywords = data.portrait.totalKeywords
 				this.keyWordData.keyWordsScopeNum = data.portrait.keyWordsScopeNum
 				this.keyWordData.startTime = this.params.startTime = data.portrait.startTime
 				this.keyWordData.endTime = this.params.endTime = data.portrait.endTime

+ 24 - 17
pages/seller/club/components/echart-order.vue

@@ -5,7 +5,7 @@
 		</view>
 		<view class="echart-search">
 			<view class="echart-search-text">
-				<view class="search-text">所有:<text>¥{{ orderData.orderTotalAmount }}({{ orderData.orderTotal }}个)</text></view>
+				<view class="search-text">所有:<text>¥{{ orderTotalAmount }}({{ orderTotal }}个)</text></view>
 				<view class="search-text">当前范围:<text>¥{{ orderData.orderScopeTotalFee }}({{ orderData.orderScopeNum }}个)</text></view>
 			</view>
 			<view class="echart-search-date">
@@ -71,6 +71,14 @@ export default {
 		clubId:{
 			type:Number,
 			default:0
+		},
+		totalAmount:{
+			type:Number,
+			default:0
+		},
+		totalNum:{
+			type:Number,
+			default:0
 		}
 	},
 	data() {
@@ -78,13 +86,13 @@ export default {
 			isEmpty:false,
 			current: 0,
 			orderChartData:null,
+			orderTotal:0,
+			orderTotalAmount:0, 
 			orderData:{
 			    startTime: '',
 			    endTime: '',
-			    orderTotal:0,
 			    orderScopeNum:0,
-				orderTotalAmount:0,
-				orderScopeTotalFee:0
+				orderScopeTotalFee:0,
 			},
 			params:{
 			    clubId:0,//  机构id
@@ -95,7 +103,7 @@ export default {
 			},
 			opts: {
 				timing: 'easeOut',
-				duration: 1000,
+				duration: 50,
 				rotate: false,
 				rotateLock: false,
 				color: [
@@ -128,38 +136,36 @@ export default {
 					backgroundColor: 'rgba(0,0,0,0)',
 					borderColor: 'rgba(0,0,0,0)',
 					borderWidth: 0,
-					fontSize: 13,
+					fontSize: 12,
 					fontColor: '#666666',
 					hiddenColor: '#CECECE',
 					itemGap: 10
 				},
 				title: {
 					name: '订单总量',
-					fontSize: 15,
+					fontSize: 12,
 					color: '#666666',
 					offsetX: 0,
 					offsetY: 0
 				},
 				subtitle: {
 					name: '70%',
-					fontSize: 25,
+					fontSize: 12,
 					color: '#7cb5ec',
 					offsetX: 0,
 					offsetY: 0
 				},
 				extra: {
-					ring: {
-						ringWidth: 30,
+					pie:{
 						activeOpacity: 0.5,
 						activeRadius: 10,
 						offsetAngle: 0,
 						labelWidth: 15,
 						border: true,
 						borderWidth: 3,
-						borderColor: '#FFFFFF',
-						centerColor: '#FFFFFF',
-						customRadius: 0,
-						linearType: 'none'
+						borderColor: "#FFFFFF",
+						customRadius: 60,
+						linearType: "none"
 					},
 					tooltip: {
 						showBox: true,
@@ -175,7 +181,7 @@ export default {
 						dashLength: 4,
 						gridColor: '#CCCCCC',
 						boxPadding: 3,
-						fontSize: 13,
+						fontSize: 12,
 						lineHeight: 20,
 						fontColor: '#FFFFFF',
 						legendShow: true,
@@ -194,6 +200,9 @@ export default {
 	},
 	created() {
 		this.params.clubId = this.clubId
+		console.log('orderTotal',this.orderTotal)
+		this.orderTotal = this.totalNum
+		this.orderTotalAmount = this.totalAmount
 		this.userClubPortrait(0)
 	},
 	methods: {
@@ -211,9 +220,7 @@ export default {
 			try {
 				const res = await this.UserService.userClubPortrait(this.params)
 				const data = res.data
-				this.orderData.orderTotal = data.portrait.orderTotal
 				this.orderData.orderScopeNum = data.portrait.orderScopeNum
-				this.orderData.orderTotalAmount = data.portrait.orderTotalAmount
 				this.orderData.orderScopeTotalFee = data.portrait.orderScopeTotalFee
 				this.orderData.startTime = this.params.startTime = data.portrait.startTime
 				this.orderData.endTime = this.params.endTime = data.portrait.endTime

+ 0 - 1
pages/seller/club/components/echart-service.vue

@@ -154,7 +154,6 @@ export default {
 			try {
 				const res = await this.UserService.userClubPortrait(this.params)
 				const data = res.data
-				console.log('data',data)
 				this.serviceData.startTime = this.params.startTime = data.portrait.startTime
 				this.serviceData.endTime = this.params.endTime = data.portrait.endTime
 				if(data.pageType){

+ 6 - 0
pages/seller/club/list.vue

@@ -850,6 +850,7 @@ page,
 				text-align: center;
 				float: left;
 				position: relative;
+				
 				&:nth-child(1) {
 					&:before {
 						content: '';
@@ -927,6 +928,11 @@ page,
 						}
 					}
 				}
+				&.none{
+					&::before{
+						background-color: #f7f7f7 !important;
+					}
+				}
 				.iconfont {
 					font-size: 30rpx;
 					color: #333333;

+ 10 - 0
services/user.service.js

@@ -930,5 +930,15 @@ export default class UserService {
 	        isLoading: false,
 	    }) 
     }
+    /**
+	 *@机构画像查所有
+	 */
+    userClubInitial(data = {}) {
+	    return this.AjaxService.get({
+	        url: '/user/club/clubInitial',
+	        data,
+	        isLoading: false,
+	    }) 
+    }
 	 
 }