@@ -1,21 +0,0 @@ | |||
/dist | |||
/node_modules | |||
/unpackage | |||
# MAC隐藏文件 | |||
.DS_Store | |||
# 包管理日志 | |||
npm-debug.log* | |||
yarn-debug.log* | |||
yarn-error.log* | |||
pnpm-debug.log* | |||
# 编辑器配置 | |||
.idea | |||
.vscode | |||
*.suo | |||
*.ntvs* | |||
*.njsproj | |||
*.sln | |||
*.sw? |
@@ -4,11 +4,11 @@ | |||
"configurations": [{ | |||
"default" : | |||
{ | |||
"launchtype" : "remote" | |||
"launchtype" : "local" | |||
}, | |||
"mp-weixin" : | |||
{ | |||
"launchtype" : "remote" | |||
"launchtype" : "local" | |||
}, | |||
"type" : "uniCloud" | |||
} | |||
@@ -1,311 +0,0 @@ | |||
<template> | |||
<view> | |||
</view> | |||
</template> | |||
<script> | |||
//app.js | |||
var config = require("./config"); | |||
export default { | |||
onLaunch: function(options) { | |||
if (wx.canIUse('getUpdateManager')) { | |||
const updateManager = wx.getUpdateManager() | |||
updateManager.onCheckForUpdate(function(res) { | |||
if (res.hasUpdate) { | |||
updateManager.onUpdateReady(function() { | |||
uni.showModal({ | |||
title: '更新提示', | |||
cancelColor: "#999999", | |||
content: '新版本已经准备好,是否重启应用?', | |||
success: function(res) { | |||
if (res.confirm) { | |||
updateManager.applyUpdate() | |||
} | |||
} | |||
}) | |||
}) | |||
updateManager.onUpdateFailed(function() { | |||
uni.showModal({ | |||
title: '已经有新版本了哟~', | |||
cancelColor: "#999999", | |||
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~' | |||
}) | |||
}) | |||
} | |||
}) | |||
} else { | |||
uni.showModal({ | |||
title: '提示', | |||
cancelColor: "#999999", | |||
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' | |||
}) | |||
} | |||
const token = uni.getStorageSync("weapp_session_login_data") | |||
if (typeof token.token != "string") { | |||
return | |||
} | |||
this.$u.get("/user/getUser").then(data => { | |||
uni.setStorageSync("weapp_session_userInfo_data", data) | |||
}) | |||
this.$u.get("/user/getMenu").then(data => { | |||
uni.setStorageSync("weapp_session_Menu_data", data) | |||
}) | |||
wx.setInnerAudioOption({ | |||
obeyMuteSwitch: false | |||
}); | |||
}, | |||
onShow(options) { | |||
const token = uni.getStorageSync("weapp_session_login_data") | |||
if (typeof token.token != "string") { | |||
console.log("没有") | |||
return | |||
}else{ | |||
this.infoscoket() | |||
} | |||
}, | |||
onHide() {}, | |||
methods: { | |||
infoscoket(){ | |||
let pushon=uni.getStorageSync('weapp_session_userInfo_data').loginName | |||
uni.connectSocket({ | |||
url: 'wss://hfju.com/ws?uid='+pushon+'_applets', | |||
header: { | |||
"content-type": "application/json", | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
} | |||
}); | |||
uni.onSocketOpen(function (res) { | |||
console.log('WebSocket连接已打开!'); | |||
}); | |||
uni.onSocketError(function (res) { | |||
console.log('WebSocket连接打开失败,请检查!'); | |||
}); | |||
uni.onSocketMessage(function (res) { | |||
console.log('收到服务器内容:' + res.data); | |||
let cedata=JSON.stringify(res); | |||
let data=JSON.parse(cedata); | |||
let zdata=JSON.parse(data.data) | |||
if(zdata.to=="recCmd"){ | |||
uni.$emit('update',{msg:'页面更新'}) | |||
return | |||
} | |||
uni.showModal({ | |||
title: '提示', | |||
content: zdata.to+'的设备电量过低请检查!', | |||
cancelText: "取消", // 取消按钮的文字 | |||
confirmText: "查看", // 确认按钮文字 | |||
success: function (res) { | |||
if (res.confirm) { | |||
console.log('用户点击确定'); | |||
uni.navigateTo({ | |||
url: `/pages/main/toviewtherecording/index?jump=`+"jump" | |||
}) | |||
} else if (res.cancel) { | |||
console.log('用户点击取消'); | |||
} | |||
} | |||
}); | |||
}); | |||
}, | |||
Closewebsocke(){ | |||
uni.closeSocket(); | |||
uni.onSocketClose(function (res) { | |||
console.log('WebSocket 已关闭!'); | |||
}); | |||
}, | |||
} | |||
}; | |||
</script> | |||
<style> | |||
@import "./app.css"; | |||
</style> | |||
<style lang="scss"> | |||
@import "uview-ui/index.scss"; | |||
/*每个页面公共css */ | |||
//图表样式等 | |||
.single{ | |||
width: 100%; | |||
background: #FFFFFF; | |||
.title{ | |||
width: 100%; | |||
height: 90rpx; | |||
border-bottom: 1rpx solid #E0E0E0; | |||
display: flex; | |||
.title1{ | |||
flex: 2; | |||
font-size: 30rpx; | |||
font-weight: 600; | |||
color: #333333; | |||
line-height: 90rpx; | |||
text-indent: 30rpx; | |||
} | |||
.title3{ | |||
flex: 3; | |||
height: 90rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: flex-end; | |||
.title3-box{ | |||
display: flex; | |||
align-items: center; | |||
width: 25%; | |||
justify-content: center; | |||
.activecltab{ | |||
border-bottom: 2px solid #2671E2; | |||
} | |||
} | |||
} | |||
.title2{ | |||
flex: 3; | |||
height: 90rpx; | |||
display: flex; | |||
align-items: center; | |||
.title2-che{ | |||
width: 178rpx; | |||
height: 48rpx; | |||
background: #FFFFFF; | |||
border-radius: 6rpx; | |||
border: 1px solid #E0E0E0; | |||
line-height: 48rpx; | |||
font-size: 28rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
text-indent: 12rpx; | |||
margin-left: 35rpx; | |||
position: relative; | |||
.righttochoose{ | |||
width: 18rpx; | |||
height: 24rpx; | |||
position: absolute; | |||
top: 12rpx; | |||
right: 12rpx; | |||
} | |||
} | |||
} | |||
} | |||
.swiper-box{ | |||
width: 97%; | |||
margin: 0 auto; | |||
} | |||
.hejibox{ | |||
width: 100%; | |||
height: 80rpx; | |||
display: flex; | |||
.heji{ | |||
width: 50%; | |||
height: 100%; | |||
font-size: 28rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 80rpx; | |||
text-indent: 30rpx; | |||
} | |||
} | |||
.danwei{ | |||
width: 100%; | |||
height: 40rpx; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #999999; | |||
line-height: 40rpx; | |||
text-indent: 30rpx; | |||
} | |||
.uchaserbox{ | |||
width: 100%; | |||
height: 470rpx; | |||
} | |||
.jindu{ | |||
width: 100%; | |||
height: 300rpx; | |||
.jindu-box{ | |||
width: 100%; | |||
padding-left: 30rpx; | |||
padding-right: 30rpx; | |||
.jindu-boxche{ | |||
width: 100%; | |||
height: 46rpx; | |||
display: flex; | |||
align-items: center; | |||
height: 50rpx; | |||
.jindu-name{ | |||
width: 120rpx; | |||
font-size: 28rpx; | |||
color: #666666; | |||
} | |||
.jindu-zxl{ | |||
width: 120rpx; | |||
font-size: 26rpx; | |||
margin-left: 16rpx; | |||
color: #666666; | |||
text-align: center; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
//时间切换的样式 | |||
.boxtittab { | |||
width: 100; | |||
height: 92rpx; | |||
background: #FFFFFF; | |||
border: 1px solid #E0E0E0; | |||
display: flex; | |||
align-items: center; | |||
.tabbox { | |||
flex: 1; | |||
height: 100%; | |||
text-align: center; | |||
line-height: 92rpx; | |||
color: #666666; | |||
font-size: 28rpx; | |||
display: flex; | |||
justify-content: center; | |||
.activecllasscet { | |||
width: 96rpx; | |||
border-bottom: 2px solid #2671E2; | |||
} | |||
} | |||
} | |||
//多个格子的样式 | |||
.boxzonglan { | |||
width: 100%; | |||
min-height: 496rpx; | |||
background: #FFFFFF; | |||
padding: 30rpx 30rpx 30rpx 30rpx; | |||
.zonglantit { | |||
font-size: 30rpx; | |||
color: #333333; | |||
font-family: PingFangSC-Semibold, PingFang SC; | |||
font-weight: 600; | |||
} | |||
.zonglanbox { | |||
width: 100%; | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin-top: 24rpx; | |||
.grid { | |||
width: 50%; | |||
height: 128rpx; | |||
border: 1px solid #E0E0E0; | |||
.audonum { | |||
color: #666666; | |||
text-indent: 40rpx; | |||
font-size: 26rpx; | |||
margin-top: 20rpx; | |||
} | |||
.num { | |||
color: #333333; | |||
text-indent: 40rpx; | |||
font-size: 32rpx; | |||
font-weight: 600; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,155 +0,0 @@ | |||
/**app.wxss**/ | |||
.container { | |||
} | |||
/*小程序*/ | |||
page { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: flex-start; | |||
font-family: PingFangSC-Regular; | |||
} | |||
.placeholder{ | |||
color:#B2B2B2; | |||
} | |||
.navigator-hover { | |||
background-color:transparent; | |||
opacity:1; | |||
} | |||
.item-flex{ | |||
display: flex; | |||
justify-content: space-between; | |||
} | |||
.flex{ | |||
display: flex; | |||
align-items: center; | |||
border-bottom: 1rpx solid #CAD8E9; | |||
} | |||
.no-data{ | |||
display:flex; | |||
flex-direction:column; | |||
justify-content: center; | |||
align-items: center; | |||
font-size: 30rpx; | |||
color: #9CA3AF; | |||
margin-top:150rpx; | |||
} | |||
.no-data image{ | |||
width:100rpx; | |||
height:100rpx; | |||
display:block; | |||
} | |||
.no-data text{ | |||
line-height:42rpx; | |||
margin-top:30rpx; | |||
} | |||
.flxed-btn{ | |||
position: fixed; | |||
bottom: 0; | |||
font-size: 30rpx; | |||
color: #386DB6; | |||
text-align: center; | |||
width:100%; | |||
height:80rpx; | |||
background: #FFFFFF; | |||
align-items:center; | |||
justify-content: center; | |||
box-shadow: 0 -2px 10px 0 rgba(205,205,212,0.50); | |||
} | |||
/*搜索框*/ | |||
.fixed-con{ | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
} | |||
.search{ | |||
align-items: center; | |||
background-color:#fff; | |||
} | |||
.search input,.search .areaInput{ | |||
font-size:28rpx; | |||
color:#999999; | |||
display:flex; | |||
background:#EFEFF4; | |||
border-radius:30px; | |||
width:100%; | |||
height:60rpx; | |||
padding:0 60rpx 0 68rpx; | |||
background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAQAAAACj/OVAAAD/ElEQVR42r2YWWwURxCG1+IyNpe5DZY5hAMIR/AAgpdIiCPAC4d5QDyECCGhCAl4AARywAGDBYRTIgpCQkIOiAeuh/prxru2pUWRATsyIA4DIkHEQQaSEA4vJhyGQQZPzwzbM9u726bnbbq6v6rq6urqDoUSNuRjFcpRR00Uo1Zqpia6QEdoBYaGdDeMwUZcJEv+4R1qeX14lCZYxXA6jnd+MNf3lo6kbWu0D37ESwWYbWsLtkZ7pIwzp9BDdZj4/jImpIQzFuP/uLWq42IsMCabeee7I9+cwkVUQpfi7HxuzEsSZmXwlk8maeSVZp6PasN4De571xPrkovKUg/sGTZEM4NHRLKxGc89o9SRXOSOSlSZA9TGVQ6hGheylWep4Qop5sIdjHZOIsy64RfX2McKezOSjTspuUW+HNcbuiYS3+jC/ZxiXjrmmmNVoGh1PzwTor/Wd0kNeL476sUs/wQmAuwWgk+rB6WeoYxh9EJYWeIrFs51tjoXp5cUaYcANkf7+AmtEPY9QFZ6QM6hJwL5jZ9Dw4pLrRY6IvxwQipQ05Ne2TnTGJw+MDzKcap0c9BCoVGtpmP7hpjxa1n3AaHR95qAO8WMZbLuiNBnqh4gzxUznpIBRUozvtADNCYK4GUZ8D+7u6anJpcOFS69K+t+3d4Z01XrRTvT2/Y5H8mi1N4ULfqA9rmKBzLgI9sBZi89QDNPrOE1GfB3u7titB4gTRLAaGBiM6dpCpr5gckN+0X3D5qAewLPHmOeAF7U5FKxSPyVTJ8s5zTUcR/CGDHbS7ObXITFRl2rAVjqFJp+uW+5EPk33WyD/tQsZlvkt28GoEV4fUua67dPeOthQDFGZUIs5neTULKvwLnk8bYAwareTgrHb4nuE74prQdddxaHc4J1W+cqYstTwVkZOOPMwcsSaZfpFAZkoTR5HO91ja+1MhT87yrwLDrqs4fkY7Pc1rWdEkp5meaIc6xt0DnV8OGRkpeOJhSoaLrBM+gFlSXal5yD3faJ+snd+R6PVLFyrdtKsuhvLvZzDxdisxPdHyCvPT5qrBiuVnPF4rS9ge1Yguk8NjIwPM6Yyd/yLtyOs+qKMQHfef7cRb6KY8fjz6QfTVp528c6m4s9qv6hFAnIopJ4OwOewE5yoctHuzy9t8O5atXlYDpErYlhdNr4Mi4SDntkbirfOZGP1Tjrh0U9r5dHotUJpzyyDaovIu1HDpbiJ1TTLdynJ2hEPcqxOjIiaExDV6r0KHcV/UMd2yLZdMGDvBzu28FIzsE17xL4XsJ1tXCu+/WHLNTpKraD8qz3+a8y1NGNC12H+xtjdqjjmzHZfm/E0tDnaTyjrdbhTaHP17jIfsF7Dw8miq+sdgNuAAAAAElFTkSuQmCC'); | |||
background-size:28rpx; | |||
background-position:28rpx center; | |||
background-repeat:no-repeat; | |||
} | |||
.same-tips{ | |||
position:fixed; | |||
z-index:900; | |||
top:20rpx; | |||
left:50%; | |||
opacity:1; | |||
display:block; | |||
margin-left:-355rpx; | |||
width:710rpx; | |||
height:100rpx; | |||
background:rgba(0,0,0,0.7); | |||
box-shadow:0rpx 3rpx 11rpx 0rpx rgba(0,0,0,0.28); | |||
border-radius:10rpx; | |||
font-size:26rpx; | |||
font-weight:400; | |||
color:#FFFFFF; | |||
line-height:37rpx; | |||
} | |||
.same-tips-con{ | |||
height:100%; | |||
padding:0 46rpx 0 20rpx; | |||
display:flex; | |||
align-items: center; | |||
} | |||
.same-tips-img{ | |||
position:absolute; | |||
right:20rpx; | |||
top:10rpx; | |||
width:30rpx; | |||
height:30rpx; | |||
} | |||
.same-tips-img image{ | |||
width:30rpx; | |||
height:30rpx; | |||
} | |||
.same-tips-show{ | |||
top:-120rpx; | |||
animation: same-tips-show 0.5s linear; | |||
} | |||
.same-tips-show-none{ | |||
top:-120rpx; | |||
} | |||
@keyframes same-tips-show | |||
{ | |||
from { | |||
transform: translateY(100%); | |||
} | |||
to { | |||
transform: translateY(0); | |||
} | |||
} | |||
/*权限 begin*/ | |||
.mod-tip{ | |||
margin-top:313rpx; | |||
} | |||
.mod-tip .mod-tip-images{ | |||
display:block; | |||
width:180rpx; | |||
height:180rpx; | |||
margin:0 auto; | |||
} | |||
.mod-tip .mod-tip-text{ | |||
text-align:center; | |||
font-size:30rpx; | |||
color:#858B9B; | |||
line-height:42rpx; | |||
margin-top:40rpx; | |||
} | |||
/*权限 end*/ | |||
@@ -1,536 +0,0 @@ | |||
<template> | |||
<view name='KXDateTime'> | |||
<text @click="open">{{date?date:placeholder?placeholder:'请选择'}}</text> | |||
<uni-popup ref="popup" type="bottom"> | |||
<view class="but"> | |||
<text @click="close">取消</text> | |||
<text @click="ok">确定</text> | |||
</view> | |||
<picker-view v-if="visible" :indicator-style="indicatorStyle" :value="value" @change="bindChange"> | |||
<picker-view-column> | |||
<view class="item" v-for="(item,index) in years" :key="index">{{item}}年</view> | |||
</picker-view-column> | |||
<picker-view-column> | |||
<view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view> | |||
</picker-view-column> | |||
<picker-view-column> | |||
<view class="item" v-for="(item,index) in days" :key="index">{{item}}日</view> | |||
</picker-view-column> | |||
<picker-view-column> | |||
<view class="item" v-for="(item,index) in hours" :key="index">{{item}}时</view> | |||
</picker-view-column> | |||
<picker-view-column> | |||
<view class="item" v-for="(item,index) in mins" :key="index">{{item}}分</view> | |||
</picker-view-column> | |||
</picker-view> | |||
</uni-popup> | |||
</view> | |||
</template> | |||
<script> | |||
import uniPopup from '../uni-popup/uni-popup.vue' | |||
export default { | |||
name: 'KXDateTime', | |||
components: { | |||
uniPopup | |||
}, | |||
props: { | |||
date: '', | |||
start: '', | |||
end: '', | |||
default: '', | |||
placeholder:'' | |||
}, | |||
data() { | |||
// const date = new Date() | |||
// const years = [] | |||
// const year = date.getFullYear() | |||
// const months = [] | |||
// const month = date.getMonth() + 1 | |||
// const days = [] | |||
// const day = date.getDate() | |||
// const hours = [] | |||
// const hour = date.getHours() | |||
// const mins = [] | |||
// const min = date.getMinutes() | |||
// let start; | |||
// if (this.start) { | |||
// start = this.start.replace(/-/g, "/") | |||
// start = new Date(start); | |||
// } else { | |||
// start = new Date(0); | |||
// } | |||
// let starty = start.getFullYear(); //开始年份 | |||
// let end; | |||
// if (this.end) { | |||
// end = this.end.replace(/-/g, "/") | |||
// end = new Date(end); | |||
// } else { | |||
// end = new Date(); | |||
// } | |||
// let endy = end.getFullYear(); //终止年份 | |||
// for (let i = starty; i <= endy; i++) { | |||
// years.push(i) | |||
// } | |||
let defaultvalue = this.default; | |||
let value = [9999, 99, 99, 99, 99]; | |||
if (defaultvalue == 'end') { | |||
value = [9999, 99, 99, 99, 99] | |||
} else if (defaultvalue == 'start') { | |||
value = [0, 0, 0, 0, 0] | |||
} | |||
return { | |||
title: 'picker-view', | |||
years: [], | |||
year: '', | |||
months: [], | |||
month: '', | |||
days: [], | |||
day: '', | |||
hours: [], | |||
hour: '', | |||
mins: [], | |||
min: '', | |||
value, | |||
valueStr: '', | |||
visible: true, | |||
strYMDHM: '', | |||
indicatorStyle: `height: 80rpx;` | |||
} | |||
}, | |||
methods: { | |||
open() { | |||
let start; | |||
if (this.start) { | |||
start = this.start.replace(/-/g, "/") | |||
start = new Date(start); | |||
} else { | |||
start = new Date(0); | |||
} | |||
let starty = start.getFullYear(); //开始年份 | |||
let end; | |||
if (this.end) { | |||
end = this.end.replace(/-/g, "/") | |||
end = new Date(end); | |||
} else { | |||
end = new Date(); | |||
} | |||
if (start > end) { | |||
uni.showToast({ | |||
title: '时间范围错误!', | |||
icon: 'none', | |||
duration: 2000 | |||
}); | |||
return false | |||
} | |||
this.$forceUpdate(); | |||
if (this.valueStr) { | |||
this.value = JSON.parse(this.valueStr); | |||
setTimeout(this.amend, 100) | |||
this.$refs.popup.open() | |||
} else { | |||
setTimeout(this.amend, 100) | |||
this.$refs.popup.open() | |||
} | |||
}, | |||
close() { | |||
this.$refs.popup.close() | |||
}, | |||
ok() { | |||
let day = this.day < 10 ? '0' + this.day : this.day, | |||
month = this.month < 10 ? '0' + this.month : this.month, | |||
hour = this.hour < 10 ? '0' + this.hour : this.hour, | |||
min = this.min < 10 ? '0' + this.min : this.min | |||
let data = this.year + '-' + month + '-' + day + ' ' + hour + ':' + min; | |||
this.$emit("rundata", data) | |||
this.$refs.popup.close() | |||
}, | |||
bindChange: function(e) { | |||
let val = e.detail.value | |||
this.valueStr = JSON.stringify(val); | |||
this.year = this.years[val[0]] | |||
this.month = this.months[val[1]] | |||
this.day = this.days[val[2]] | |||
this.hour = this.hours[val[3]] | |||
this.min = this.mins[val[4]] | |||
}, | |||
//数据校正 | |||
amend() { | |||
if (this.valueStr) { | |||
let val = JSON.parse(this.valueStr); | |||
this.year = this.years[val[0]] | |||
this.month = this.months[val[1]] | |||
this.day = this.days[val[2]] | |||
this.hour = this.hours[val[3]] | |||
this.min = this.mins[val[4]] | |||
} | |||
let start; | |||
if (this.start) { | |||
start = this.start.replace(/-/g, "/") | |||
start = new Date(start); | |||
} else { | |||
start = new Date(0); | |||
} | |||
let starty = start.getFullYear(); //开始年份 | |||
let startm = start.getMonth() + 1; //开始月份 | |||
let startd = start.getDate(); //开始天 | |||
let starth = start.getHours(); //开始小时 | |||
let startmin = start.getMinutes(); //开始分钟 | |||
let end; | |||
if (this.end) { | |||
end = this.end.replace(/-/g, "/") | |||
end = new Date(end); | |||
} else { | |||
end = new Date(); | |||
} | |||
let endy = end.getFullYear(); //终止年份 | |||
let endm = end.getMonth() + 1; //终止月份 | |||
let endd = end.getDate(); //终止天 | |||
let endh = end.getHours(); //终止小时 | |||
let endmin = end.getMinutes(); //终止分钟 | |||
//如果选择起始年份 | |||
let years = [], | |||
months = [], | |||
days = [], | |||
hours = [], | |||
mins = []; | |||
let month31 = [1, 3, 5, 7, 8, 10, 12], | |||
month30 = [4, 6, 9, 11]; | |||
let daysNum; | |||
for (let i = starty; i <= endy; i++) { | |||
years.push(i) | |||
} | |||
if (month31.indexOf(this.month) > -1) { | |||
daysNum = 31 | |||
} else if (month30.indexOf(this.month) > -1) { | |||
daysNum = 30 | |||
} else { | |||
if (this.year % 4 == 0) { | |||
daysNum = 29 | |||
} else { | |||
daysNum = 28 | |||
} | |||
} | |||
let defaultvalue = this.default; | |||
let defaulty = endy, | |||
defaultm = endm, | |||
defaultd = endd, | |||
defaulth = endh, | |||
defaultmin = endmin; | |||
if (defaultvalue == 'end') { | |||
defaulty = endy; | |||
defaultm = endm; | |||
defaultd = endd; | |||
defaulth = endh; | |||
defaultmin = endmin; | |||
} else if (defaultvalue == 'start') { | |||
defaulty = starty; | |||
defaultm = startm; | |||
defaultd = startd; | |||
defaulth = starth; | |||
defaultmin = startmin; | |||
} | |||
//当数值异常是设施默认 | |||
if (!this.year) { | |||
this.year = defaulty | |||
} | |||
if (!this.month) { | |||
this.month = defaultm | |||
} | |||
if (!this.day) { | |||
this.day = defaultd | |||
} | |||
if (!this.hour && this.hour !== 0) { | |||
this.hour = defaulth | |||
} | |||
if (!this.min && this.min !== 0) { | |||
this.min = defaultmin | |||
} | |||
//判断年份是在起始年 | |||
if (this.year == starty) { | |||
//判断起始年份和终止年份是否相等 | |||
if (starty == endy) { | |||
//如果等,那么月份取两者中间 | |||
for (let i = startm; i <= endm; i++) { | |||
months.push(i) | |||
} | |||
//判断月份是在起始月 | |||
if (this.month == startm) { | |||
//判断起始月和终止月是否相等 | |||
if (startm == endm) { | |||
//如果等,那么天数取两者中间 | |||
for (let i = startd; i <= endd; i++) { | |||
days.push(i) | |||
} | |||
//判断日是在起始日 | |||
if (this.day == startd) { | |||
//判断起始ri和终止日是否相等 | |||
if (startd == endd) { | |||
//如果等,那么小时取两者中间 | |||
for (let i = starth; i <= endh; i++) { | |||
hours.push(i) | |||
} | |||
//判断小时是在起始小时 | |||
if (this.hour == starth) { | |||
//判断起始和终止是否相等 | |||
if (starth == endh) { | |||
//如果等,那么分钟取两者中间 | |||
for (let i = startmin; i <= endmin; i++) { | |||
mins.push(i) | |||
} | |||
} else { | |||
//如果不等,到59 | |||
for (let i = startmin; i <= 59; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
} else { | |||
//判断小时是否在截止小时 | |||
if (this.hour == endh) { | |||
//终止小时取到截止分钟 | |||
for (let i = 0; i <= endmin; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
} | |||
} else { | |||
//如果不等,到23小时 | |||
for (let i = starth; i <= 23; i++) { | |||
hours.push(i) | |||
} | |||
//判断小时是在起始小时 | |||
if (this.hour == starth) { | |||
for (let i = startmin; i <= 59; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
} | |||
} else { | |||
//判断日是否在截止日 | |||
if (this.day == endd) { | |||
//终止日取到截止小时 | |||
for (let i = 0; i <= endh; i++) { | |||
hours.push(i) | |||
} | |||
//判断小时是否在截止小时 | |||
if (this.hour == endh) { | |||
//终止小时取到截止分钟 | |||
for (let i = 0; i <= endmin; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
} | |||
} | |||
} else { | |||
//如果不等, | |||
for (let i = startd; i <= daysNum; i++) { | |||
days.push(i) | |||
} | |||
if (this.day == startd) { | |||
for (let i = starth; i <= 23; i++) { | |||
hours.push(i) | |||
} | |||
//判断小时是在起始小时 | |||
if (this.hour == starth) { | |||
for (let i = startmin; i <= 59; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
} | |||
} | |||
} else { | |||
//判断月份是在终止月 | |||
if (this.month == endm) { | |||
//终止月取到截止天 | |||
for (let i = 1; i <= endd; i++) { | |||
days.push(i) | |||
} | |||
//判断日是否在截止日 | |||
if (this.day == endd) { | |||
//终止日取到截止小时 | |||
for (let i = 0; i <= endh; i++) { | |||
hours.push(i) | |||
} | |||
//判断小时是否在截止小时 | |||
if (this.hour == endh) { | |||
//终止小时取到截止分钟 | |||
for (let i = 0; i <= endmin; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} else { | |||
//如果不等,去开始到12月份 | |||
for (let i = startm; i <= 12; i++) { | |||
months.push(i) | |||
} | |||
//判断月份是在起始月 | |||
if (this.month == startm) { | |||
//是,取天数之后 | |||
for (let i = startd; i <= daysNum; i++) { | |||
days.push(i) | |||
} | |||
//判断日是在起始日 | |||
if (this.day == startd) { | |||
//是,qu起始小时之后 | |||
for (let i = starth; i <= 23; i++) { | |||
hours.push(i) | |||
} | |||
//判断小时是在起始小时 | |||
if (this.hour == starth) { | |||
//是,qu起始分钟之后 | |||
for (let i = startmin; i <= 59; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} else if (this.year == endy) { | |||
//年份中终止年 | |||
//月份取到终止月 | |||
for (let i = 1; i <= endm; i++) { | |||
months.push(i) | |||
} | |||
//判断月份是在终止月 | |||
if (this.month == endm) { | |||
//终止月取到截止天 | |||
for (let i = 1; i <= endd; i++) { | |||
days.push(i) | |||
} | |||
//判断日是否在截止日 | |||
if (this.day == endd) { | |||
//终止日取到截止小时 | |||
for (let i = 0; i <= endh; i++) { | |||
hours.push(i) | |||
} | |||
//判断小时是否在截止小时 | |||
if (this.hour == endh) { | |||
//终止小时取到截止分钟 | |||
for (let i = 0; i <= endmin; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
} | |||
} | |||
} else { | |||
for (let i = 1; i <= 12; i++) { | |||
months.push(i) | |||
} | |||
for (let i = 1; i <= daysNum; i++) { | |||
days.push(i) | |||
} | |||
for (let i = 0; i <= 23; i++) { | |||
hours.push(i) | |||
} | |||
for (let i = 0; i <= 59; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
if (months.length == 0) { | |||
for (let i = 1; i <= 12; i++) { | |||
months.push(i) | |||
} | |||
} | |||
if (days.length == 0) { | |||
for (let i = 1; i <= daysNum; i++) { | |||
days.push(i) | |||
} | |||
} | |||
if (hours.length == 0) { | |||
for (let i = 0; i <= 23; i++) { | |||
hours.push(i) | |||
} | |||
} | |||
if (mins.length == 0) { | |||
for (let i = 0; i <= 59; i++) { | |||
mins.push(i) | |||
} | |||
} | |||
this.years = years; | |||
this.months = months; | |||
this.days = days; | |||
this.hours = hours; | |||
this.mins = mins; | |||
this.$forceUpdate(); | |||
} | |||
}, | |||
watch: { | |||
year() { | |||
this.amend(); | |||
}, | |||
month() { | |||
this.amend(); | |||
}, | |||
day() { | |||
this.amend(); | |||
}, | |||
hour() { | |||
this.amend(); | |||
}, | |||
min() { | |||
this.amend(); | |||
}, | |||
years(n, m) { | |||
if (n.toString() != m.toString()) { | |||
this.amend(); | |||
} | |||
}, | |||
months(n, m) { | |||
if (n.toString() != m.toString()) { | |||
this.amend(); | |||
} | |||
}, | |||
days(n, m) { | |||
if (n.toString() != m.toString()) { | |||
this.amend(); | |||
} | |||
}, | |||
hours(n, m) { | |||
if (n.toString() != m.toString()) { | |||
this.amend(); | |||
} | |||
}, | |||
mins(n, m) { | |||
if (n.toString() != m.toString()) { | |||
this.amend(); | |||
} | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
text { | |||
display: inline-block; | |||
color: $uni-text-color-grey; | |||
} | |||
.but { | |||
background: #fff; | |||
height: 80rpx; | |||
line-height: 80rpx; | |||
padding: 0 30rpx; | |||
border-bottom: 1px solid #f0f0f0; | |||
text-align: left; | |||
text { | |||
display: inline-block; | |||
} | |||
text:last-child { | |||
float: right; | |||
color: $uni-color-primary; | |||
} | |||
} | |||
picker-view { | |||
width: 100%; | |||
background: #fff; | |||
height: 600rpx; | |||
text-align: center; | |||
} | |||
</style> |
@@ -1,57 +0,0 @@ | |||
.zan-loadmore{ | |||
position:fixed; | |||
width:65%; | |||
margin:0 auto; | |||
line-height:20px; | |||
font-size:14px; | |||
text-align:center; | |||
display: block; | |||
vertical-align: middle | |||
} | |||
.zan-loading{ | |||
width:20px; | |||
height:20px; | |||
display:inline-block; | |||
vertical-align:middle; | |||
animation:weuiLoading 1s steps(12,end) infinite; | |||
} | |||
.zan-loadmore .zan-loading{ | |||
margin-right:4px | |||
} | |||
.zan-loadmore__tips{ | |||
display:inline-block; | |||
vertical-align:middle; | |||
height:20px; | |||
line-height:20px; | |||
color:#999 | |||
} | |||
.zan-loadmore--nodata,.zan-loadmore--nomore{ | |||
border-top:1rpx solid #e5e5e5; | |||
} | |||
.zan-loadmore--nodata{ | |||
/* margin-top:40rpx */ | |||
} | |||
.zan-loadmore--nodata .zan-loadmore__tips{ | |||
position:relative; | |||
top:-11px; | |||
padding:0 6px | |||
} | |||
.zan-loadmore--nomore .zan-loadmore__tips{ | |||
position:relative; | |||
top:-11px; | |||
padding:0 6px | |||
} | |||
.zan-loadmore__dot{ | |||
position:absolute; | |||
left:50%; | |||
top:10px; | |||
margin-left:-2px; | |||
margin-top:-2px; | |||
content:" "; | |||
width:4px; | |||
height:4px; | |||
border-radius:50%; | |||
background-color:#e5e5e5; | |||
display:inline-block; | |||
vertical-align:middle; | |||
} |
@@ -1,72 +0,0 @@ | |||
<template> | |||
<view> | |||
<block v-if="mtype==2"> | |||
<view class="zan-loadmore zan-loadmore--nomore" :hidden="hidden"> | |||
<view class="zan-loadmore__tips" :style="'background-color:' + tipcolor"> | |||
<view class="zan-loadmore__dot"></view> | |||
</view> | |||
</view> | |||
</block> | |||
<block v-else-if="mtype==3"> | |||
<view class="zan-loadmore zan-loadmore--nodata" :hidden="hidden"> | |||
<view class="zan-loadmore__tips" :style="'background-color:' + tipcolor">{{ nodata_str}}</view> | |||
</view> | |||
</block> | |||
<block v-else-if="mtype==1"> | |||
<view class="zan-loadmore" :hidden="hidden"> | |||
<image class="zan-loading" src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/loadmore.png"></image> | |||
<view class="zan-loadmore__tips" :style="'background-color:' + tipcolor">加载中...</view> | |||
</view> | |||
</block> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return {}; | |||
}, | |||
components: {}, | |||
props: { | |||
mtype: { | |||
type: Number, | |||
default: 1 | |||
}, | |||
nodata_str: { | |||
type: String, | |||
default: '暂无数据' | |||
}, | |||
hidden: { | |||
type: Boolean, | |||
default: true | |||
}, | |||
tipcolor: { | |||
type: String, | |||
default: "#F5F5F5" | |||
} | |||
}, | |||
watch: { | |||
mtype: function (newVal, oldVal) { | |||
this.setData({ | |||
mtype: newVal | |||
}); | |||
}, | |||
nodata_str: function (newVal, oldVal) { | |||
this.setData({ | |||
nodata_str: newVal | |||
}); | |||
}, | |||
hidden: function (newVal, oldVal) { | |||
this.setData({ | |||
hidden: newVal | |||
}); | |||
} | |||
}, | |||
methods: {} | |||
}; | |||
</script> | |||
<style> | |||
@import "./index.css"; | |||
</style> |
@@ -1,641 +0,0 @@ | |||
<template> | |||
<u-popup closeable :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto" | |||
:safeAreaInsetBottom="safeAreaInsetBottom" @close="close" :z-index="uZIndex" :border-radius="borderRadius" :closeable="closeable"> | |||
<view class="u-calendar"> | |||
<view class="u-calendar__header"> | |||
<view class="u-calendar__header__text" v-if="!$slots['tooltip']"> | |||
{{toolTip}} | |||
</view> | |||
<slot v-else name="tooltip" /> | |||
</view> | |||
<view class="u-calendar__action u-flex u-row-center"> | |||
<view class="u-calendar__action__icon"> | |||
<u-icon v-if="changeYear" name="arrow-left-double" :color="yearArrowColor" @click="changeYearHandler(0)"></u-icon> | |||
</view> | |||
<view class="u-calendar__action__icon"> | |||
<u-icon v-if="changeMonth" name="arrow-left" :color="monthArrowColor" @click="changeMonthHandler(0)"></u-icon> | |||
</view> | |||
<view class="u-calendar__action__text">{{ showTitle }}</view> | |||
<view class="u-calendar__action__icon"> | |||
<u-icon v-if="changeMonth" name="arrow-right" :color="monthArrowColor" @click="changeMonthHandler(1)"></u-icon> | |||
</view> | |||
<view class="u-calendar__action__icon"> | |||
<u-icon v-if="changeYear" name="arrow-right-double" :color="yearArrowColor" @click="changeYearHandler(1)"></u-icon> | |||
</view> | |||
</view> | |||
<view class="u-calendar__week-day"> | |||
<view class="u-calendar__week-day__text" v-for="(item, index) in weekDayZh" :key="index">{{item}}</view> | |||
</view> | |||
<view class="u-calendar__content"> | |||
<!-- 前置空白部分 --> | |||
<block v-for="(item, index) in weekdayArr" :key="index"> | |||
<view class="u-calendar__content__item"></view> | |||
</block> | |||
<view class="u-calendar__content__item" :class="{ | |||
'u-hover-class':openDisAbled(year,month,index+1), | |||
'u-calendar__content--start-date': (mode == 'range' && startDate==`${year}-${month}-${index+1}`) || mode== 'date', | |||
'u-calendar__content--end-date':(mode== 'range' && endDate==`${year}-${month}-${index+1}`) || mode == 'date' | |||
}" :style="{backgroundColor: getColor(index,1)}" v-for="(item, index) in daysArr" :key="index" | |||
@tap="dateClick(index)"> | |||
<view class="u-calendar__content__item__inner" :style="{color: getColor(index,2)}"> | |||
<view>{{ index + 1 }}</view> | |||
</view> | |||
<view class="u-calendar__content__item__tips" :style="{color:activeColor}" v-if="mode== 'range' && startDate==`${year}-${month}-${index+1}` && startDate!=endDate">{{startText}}</view> | |||
<view class="u-calendar__content__item__tips" :style="{color:activeColor}" v-if="mode== 'range' && endDate==`${year}-${month}-${index+1}`">{{endText}}</view> | |||
</view> | |||
<view class="u-calendar__content__bg-month">{{month}}</view> | |||
</view> | |||
<view class="u-calendar__bottom"> | |||
<view class="u-calendar__bottom__choose"> | |||
<text>{{mode == 'date' ? activeDate : startDate}}</text> | |||
<text v-if="endDate">至{{endDate}}</text> | |||
</view> | |||
<view class="u-calendar__bottom__btn"> | |||
<u-button :type="btnType" shape="circle" size="default" @click="btnFix(false)">确定</u-button> | |||
</view> | |||
</view> | |||
</view> | |||
</u-popup> | |||
</template> | |||
<script> | |||
/** | |||
* calendar 日历 | |||
* @description 此组件用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中。 | |||
* @tutorial http://uviewui.com/components/calendar.html | |||
* @property {String} mode 选择日期的模式,date-为单个日期,range-为选择日期范围 | |||
* @property {Boolean} v-model 布尔值变量,用于控制日历的弹出与收起 | |||
* @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false) | |||
* @property {Boolean} change-year 是否显示顶部的切换年份方向的按钮(默认true) | |||
* @property {Boolean} change-month 是否显示顶部的切换月份方向的按钮(默认true) | |||
* @property {String Number} max-year 可切换的最大年份(默认2050) | |||
* @property {String Number} min-year 最小可选日期(默认1950) | |||
* @property {String Number} min-date 可切换的最小年份(默认1950-01-01) | |||
* @property {String Number} max-date 最大可选日期(默认当前日期) | |||
* @property {String Number} 弹窗顶部左右两边的圆角值,单位rpx(默认20) | |||
* @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭日历(默认true) | |||
* @property {String} month-arrow-color 月份切换按钮箭头颜色(默认#606266) | |||
* @property {String} year-arrow-color 年份切换按钮箭头颜色(默认#909399) | |||
* @property {String} color 日期字体的默认颜色(默认#303133) | |||
* @property {String} active-bg-color 起始/结束日期按钮的背景色(默认#2979ff) | |||
* @property {String Number} z-index 弹出时的z-index值(默认10075) | |||
* @property {String} active-color 起始/结束日期按钮的字体颜色(默认#ffffff) | |||
* @property {String} range-bg-color 起始/结束日期之间的区域的背景颜色(默认rgba(41,121,255,0.13)) | |||
* @property {String} range-color 选择范围内字体颜色(默认#2979ff) | |||
* @property {String} start-text 起始日期底部的提示文字(默认 '开始') | |||
* @property {String} end-text 结束日期底部的提示文字(默认 '结束') | |||
* @property {String} btn-type 底部确定按钮的主题(默认 'primary') | |||
* @property {String} toolTip 顶部提示文字,如设置名为tooltip的slot,此参数将失效(默认 '选择日期') | |||
* @property {Boolean} closeable 是否显示右上角的关闭图标(默认true) | |||
* @example <u-calendar v-model="show" :mode="mode"></u-calendar> | |||
*/ | |||
export default { | |||
name: 'u-calendar', | |||
props: { | |||
safeAreaInsetBottom: { | |||
type: Boolean, | |||
default: false | |||
}, | |||
// 是否允许通过点击遮罩关闭Picker | |||
maskCloseAble: { | |||
type: Boolean, | |||
default: true | |||
}, | |||
// 通过双向绑定控制组件的弹出与收起 | |||
value: { | |||
type: Boolean, | |||
default: false | |||
}, | |||
// 弹出的z-index值 | |||
zIndex: { | |||
type: [String, Number], | |||
default: 0 | |||
}, | |||
// 是否允许切换年份 | |||
changeYear: { | |||
type: Boolean, | |||
default: true | |||
}, | |||
// 是否允许切换月份 | |||
changeMonth: { | |||
type: Boolean, | |||
default: true | |||
}, | |||
// date-单个日期选择,range-开始日期+结束日期选择 | |||
mode: { | |||
type: String, | |||
default: 'date' | |||
}, | |||
// 可切换的最大年份 | |||
maxYear: { | |||
type: [Number, String], | |||
default: 2050 | |||
}, | |||
// 可切换的最小年份 | |||
minYear: { | |||
type: [Number, String], | |||
default: 1950 | |||
}, | |||
// 最小可选日期(不在范围内日期禁用不可选) | |||
minDate: { | |||
type: [Number, String], | |||
default: '1950-01-01' | |||
}, | |||
/** | |||
* 最大可选日期 | |||
* 默认最大值为今天,之后的日期不可选 | |||
* 2030-12-31 | |||
* */ | |||
maxDate: { | |||
type: [Number, String], | |||
default: '2030-12-31' | |||
}, | |||
// 弹窗顶部左右两边的圆角值 | |||
borderRadius: { | |||
type: [String, Number], | |||
default: 20 | |||
}, | |||
// 月份切换按钮箭头颜色 | |||
monthArrowColor: { | |||
type: String, | |||
default: '#606266' | |||
}, | |||
// 年份切换按钮箭头颜色 | |||
yearArrowColor: { | |||
type: String, | |||
default: '#909399' | |||
}, | |||
// 默认日期字体颜色 | |||
color: { | |||
type: String, | |||
default: '#303133' | |||
}, | |||
// 选中|起始结束日期背景色 | |||
activeBgColor: { | |||
type: String, | |||
default: '#2979ff' | |||
}, | |||
// 选中|起始结束日期字体颜色 | |||
activeColor: { | |||
type: String, | |||
default: '#ffffff' | |||
}, | |||
// 范围内日期背景色 | |||
rangeBgColor: { | |||
type: String, | |||
default: 'rgba(41,121,255,0.13)' | |||
}, | |||
// 范围内日期字体颜色 | |||
rangeColor: { | |||
type: String, | |||
default: '#2979ff' | |||
}, | |||
// mode=range时生效,起始日期自定义文案 | |||
startText: { | |||
type: String, | |||
default: '开始' | |||
}, | |||
// mode=range时生效,结束日期自定义文案 | |||
endText: { | |||
type: String, | |||
default: '结束' | |||
}, | |||
//按钮样式类型 | |||
btnType: { | |||
type: String, | |||
default: 'primary' | |||
}, | |||
// 当前选中日期带选中效果 | |||
isActiveCurrent: { | |||
type: Boolean, | |||
default: true | |||
}, | |||
// 切换年月是否触发事件 mode=date时生效 | |||
isChange: { | |||
type: Boolean, | |||
default: false | |||
}, | |||
// 是否显示右上角的关闭图标 | |||
closeable: { | |||
type: Boolean, | |||
default: true | |||
}, | |||
// 顶部的提示文字 | |||
toolTip: { | |||
type: String, | |||
default: '选择日期' | |||
} | |||
}, | |||
data() { | |||
return { | |||
// 星期几,值为1-7 | |||
weekday: 1, | |||
weekdayArr:[], | |||
// 当前月有多少天 | |||
days: 0, | |||
daysArr:[], | |||
showTitle: '', | |||
year: 2020, | |||
month: 0, | |||
day: 0, | |||
startYear: 0, | |||
startMonth: 0, | |||
startDay: 0, | |||
endYear: 0, | |||
endMonth: 0, | |||
endDay: 0, | |||
today: '', | |||
activeDate: '', | |||
startDate: '', | |||
endDate: '', | |||
isStart: true, | |||
min: null, | |||
max: null, | |||
weekDayZh: ['日', '一', '二', '三', '四', '五', '六'] | |||
}; | |||
}, | |||
computed: { | |||
dataChange() { | |||
return `${this.mode}-${this.minDate}-${this.maxDate}`; | |||
}, | |||
uZIndex() { | |||
// 如果用户有传递z-index值,优先使用 | |||
return this.zIndex ? this.zIndex : this.$u.zIndex.popup; | |||
} | |||
}, | |||
watch: { | |||
dataChange(val) { | |||
this.init() | |||
} | |||
}, | |||
created() { | |||
this.init() | |||
}, | |||
methods: { | |||
getColor(index, type) { | |||
let color = type == 1 ? '' : this.color; | |||
let day = index + 1 | |||
let date = `${this.year}-${this.month}-${day}` | |||
let timestamp = new Date(date.replace(/\-/g, '/')).getTime(); | |||
let start = this.startDate.replace(/\-/g, '/') | |||
let end = this.endDate.replace(/\-/g, '/') | |||
if ((this.isActiveCurrent && this.activeDate == date) || this.startDate == date || this.endDate == date) { | |||
color = type == 1 ? this.activeBgColor : this.activeColor; | |||
} else if (this.endDate && timestamp > new Date(start).getTime() && timestamp < new Date(end).getTime()) { | |||
color = type == 1 ? this.rangeBgColor : this.rangeColor; | |||
} | |||
return color; | |||
}, | |||
init() { | |||
let now = new Date(); | |||
this.year = now.getFullYear(); | |||
this.month = now.getMonth() + 1; | |||
this.day = now.getDate(); | |||
this.today = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`; | |||
this.activeDate = this.today; | |||
this.min = this.initDate(this.minDate); | |||
this.max = this.initDate(this.maxDate || this.today); | |||
this.startDate = ""; | |||
this.startYear = 0; | |||
this.startMonth = 0; | |||
this.startDay = 0; | |||
this.endYear = 0; | |||
this.endMonth = 0; | |||
this.endDay = 0; | |||
this.endDate = ""; | |||
this.isStart = true; | |||
this.changeData(); | |||
}, | |||
//日期处理 | |||
initDate(date) { | |||
let fdate = date.split('-'); | |||
return { | |||
year: Number(fdate[0] || 1920), | |||
month: Number(fdate[1] || 1), | |||
day: Number(fdate[2] || 1) | |||
} | |||
}, | |||
openDisAbled: function(year, month, day) { | |||
let bool = true; | |||
let date = `${year}/${month}/${day}`; | |||
// let today = this.today.replace(/\-/g, '/'); | |||
let min = `${this.min.year}/${this.min.month}/${this.min.day}`; | |||
let max = `${this.max.year}/${this.max.month}/${this.max.day}`; | |||
let timestamp = new Date(date).getTime(); | |||
if (timestamp >= new Date(min).getTime() && timestamp <= new Date(max).getTime()) { | |||
bool = false; | |||
} | |||
return bool; | |||
}, | |||
generateArray: function(start, end) { | |||
return Array.from(new Array(end + 1).keys()).slice(start); | |||
}, | |||
formatNum: function(num) { | |||
return num < 10 ? '0' + num : num + ''; | |||
}, | |||
//一个月有多少天 | |||
getMonthDay(year, month) { | |||
let days = new Date(year, month, 0).getDate(); | |||
return days; | |||
}, | |||
getWeekday(year, month) { | |||
let date = new Date(`${year}/${month}/01 00:00:00`); | |||
return date.getDay(); | |||
}, | |||
checkRange(year) { | |||
let overstep = false; | |||
if (year < this.minYear || year > this.maxYear) { | |||
uni.showToast({ | |||
title: "日期超出范围啦~", | |||
icon: 'none' | |||
}) | |||
overstep = true; | |||
} | |||
return overstep; | |||
}, | |||
changeMonthHandler(isAdd) { | |||
if (isAdd) { | |||
let month = this.month + 1; | |||
let year = month > 12 ? this.year + 1 : this.year; | |||
if (!this.checkRange(year)) { | |||
this.month = month > 12 ? 1 : month; | |||
this.year = year; | |||
this.changeData(); | |||
} | |||
} else { | |||
let month = this.month - 1; | |||
let year = month < 1 ? this.year - 1 : this.year; | |||
if (!this.checkRange(year)) { | |||
this.month = month < 1 ? 12 : month; | |||
this.year = year; | |||
this.changeData(); | |||
} | |||
} | |||
}, | |||
changeYearHandler(isAdd) { | |||
let year = isAdd ? this.year + 1 : this.year - 1; | |||
if (!this.checkRange(year)) { | |||
this.year = year; | |||
this.changeData(); | |||
} | |||
}, | |||
changeData() { | |||
this.days = this.getMonthDay(this.year, this.month); | |||
this.daysArr=this.generateArray(1,this.days) | |||
this.weekday = this.getWeekday(this.year, this.month); | |||
this.weekdayArr=this.generateArray(1,this.weekday) | |||
this.showTitle = `${this.year}年${this.month}月`; | |||
if (this.isChange && this.mode == 'date') { | |||
this.btnFix(true); | |||
} | |||
}, | |||
dateClick: function(day) { | |||
day += 1; | |||
if (!this.openDisAbled(this.year, this.month, day)) { | |||
this.day = day; | |||
let date = `${this.year}-${this.month}-${day}`; | |||
if (this.mode == 'date') { | |||
this.activeDate = date; | |||
} else { | |||
let compare = new Date(date.replace(/\-/g, '/')).getTime() < new Date(this.startDate.replace(/\-/g, '/')).getTime() | |||
if (this.isStart || compare) { | |||
this.startDate = date; | |||
this.startYear = this.year; | |||
this.startMonth = this.month; | |||
this.startDay = this.day; | |||
this.endYear = 0; | |||
this.endMonth = 0; | |||
this.endDay = 0; | |||
this.endDate = ""; | |||
this.activeDate = ""; | |||
this.isStart = false; | |||
} else { | |||
this.endDate = date; | |||
this.endYear = this.year; | |||
this.endMonth = this.month; | |||
this.endDay = this.day; | |||
this.isStart = true; | |||
} | |||
} | |||
} | |||
}, | |||
close() { | |||
// 修改通过v-model绑定的父组件变量的值为false,从而隐藏日历弹窗 | |||
this.$emit('input', false); | |||
}, | |||
getWeekText(date) { | |||
date = new Date(`${date.replace(/\-/g, '/')} 00:00:00`); | |||
let week = date.getDay(); | |||
return '星期' + ['日', '一', '二', '三', '四', '五', '六'][week]; | |||
}, | |||
btnFix(show) { | |||
if (!show) { | |||
this.close(); | |||
} | |||
if (this.mode == 'date') { | |||
let arr = this.activeDate.split('-') | |||
let year = this.isChange ? this.year : Number(arr[0]); | |||
let month = this.isChange ? this.month : Number(arr[1]); | |||
let day = this.isChange ? this.day : Number(arr[2]); | |||
//当前月有多少天 | |||
let days = this.getMonthDay(year, month); | |||
let result = `${year}-${this.formatNum(month)}-${this.formatNum(day)}`; | |||
let weekText = this.getWeekText(result); | |||
let isToday = false; | |||
if (`${year}-${month}-${day}` == this.today) { | |||
//今天 | |||
isToday = true; | |||
} | |||
this.$emit('change', { | |||
year: year, | |||
month: month, | |||
day: day, | |||
days: days, | |||
result: result, | |||
week: weekText, | |||
isToday: isToday, | |||
// switch: show //是否是切换年月操作 | |||
}); | |||
} else { | |||
if (!this.startDate || !this.endDate) return; | |||
let startMonth = this.formatNum(this.startMonth); | |||
let startDay = this.formatNum(this.startDay); | |||
let startDate = `${this.startYear}-${startMonth}-${startDay}`; | |||
let startWeek = this.getWeekText(startDate) | |||
let endMonth = this.formatNum(this.endMonth); | |||
let endDay = this.formatNum(this.endDay); | |||
let endDate = `${this.endYear}-${endMonth}-${endDay}`; | |||
let endWeek = this.getWeekText(endDate); | |||
this.$emit('change', { | |||
startYear: this.startYear, | |||
startMonth: this.startMonth, | |||
startDay: this.startDay, | |||
startDate: startDate, | |||
startWeek: startWeek, | |||
endYear: this.endYear, | |||
endMonth: this.endMonth, | |||
endDay: this.endDay, | |||
endDate: endDate, | |||
endWeek: endWeek | |||
}); | |||
} | |||
} | |||
} | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
@import "./style.components.scss"; | |||
.u-calendar { | |||
color: $u-content-color; | |||
&__header { | |||
width: 100%; | |||
box-sizing: border-box; | |||
font-size: 30rpx; | |||
background-color: #fff; | |||
color: $u-main-color; | |||
&__text { | |||
margin-top: 30rpx; | |||
padding: 0 60rpx; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
} | |||
&__action { | |||
padding: 40rpx 0 40rpx 0; | |||
&__icon { | |||
margin: 0 16rpx; | |||
} | |||
&__text { | |||
padding: 0 16rpx; | |||
color: $u-main-color; | |||
font-size: 32rpx; | |||
line-height: 32rpx; | |||
font-weight: bold; | |||
} | |||
} | |||
&__week-day { | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
padding: 6px 0; | |||
overflow: hidden; | |||
&__text { | |||
flex: 1; | |||
text-align: center; | |||
} | |||
} | |||
&__content { | |||
width: 100%; | |||
display: flex; | |||
flex-wrap: wrap; | |||
padding: 6px 0; | |||
box-sizing: border-box; | |||
background-color: #fff; | |||
position: relative; | |||
&--end-date { | |||
border-top-right-radius: 8rpx; | |||
border-bottom-right-radius: 8rpx; | |||
} | |||
&--start-date { | |||
border-top-left-radius: 8rpx; | |||
border-bottom-left-radius: 8rpx; | |||
} | |||
&__item { | |||
width: 14.2857%; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
padding: 6px 0; | |||
overflow: hidden; | |||
position: relative; | |||
z-index: 2; | |||
&__inner { | |||
height: 84rpx; | |||
display: -webkit-box; | |||
display: -webkit-flex; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
flex-direction: column; | |||
font-size: 32rpx; | |||
position: relative; | |||
border-radius: 50%; | |||
&__desc { | |||
width: 100%; | |||
font-size: 24rpx; | |||
line-height: 24rpx; | |||
transform: scale(0.75); | |||
transform-origin: center center; | |||
position: absolute; | |||
left: 0; | |||
text-align: center; | |||
bottom: 2rpx; | |||
} | |||
} | |||
&__tips { | |||
width: 100%; | |||
font-size: 24rpx; | |||
line-height: 24rpx; | |||
position: absolute; | |||
left: 0; | |||
transform: scale(0.8); | |||
transform-origin: center center; | |||
text-align: center; | |||
bottom: 8rpx; | |||
z-index: 2; | |||
} | |||
} | |||
&__bg-month { | |||
position: absolute; | |||
font-size: 130px; | |||
line-height: 130px; | |||
left: 50%; | |||
top: 50%; | |||
transform: translate(-50%, -50%); | |||
color: #e4e7ed; | |||
z-index: 1; | |||
} | |||
} | |||
&__bottom { | |||
width: 100%; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
flex-direction: column; | |||
background-color: #fff; | |||
padding: 0 40rpx 30rpx; | |||
box-sizing: border-box; | |||
font-size: 24rpx; | |||
color: $u-tips-color; | |||
&__choose { | |||
height: 50rpx; | |||
} | |||
&__btn { | |||
width: 100%; | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,7 +0,0 @@ | |||
// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错 | |||
@mixin vue-flex($direction: row) { | |||
/* #ifndef APP-NVUE */ | |||
display: flex; | |||
flex-direction: $direction; | |||
/* #endif */ | |||
} |
@@ -1,144 +0,0 @@ | |||
/* components/pickerMultiSelect.wxss */ | |||
page { | |||
height: 100%; | |||
width: 100%; | |||
} | |||
.showPicker { | |||
width: 100%; | |||
height: 80rpx; | |||
line-height: 80rpx; | |||
font-size: 30rpx; | |||
background-color: paleturquoise; | |||
text-align: center; | |||
} | |||
.shade-container { | |||
position: fixed; | |||
height: 100%; | |||
width: 100%; | |||
top: 0; | |||
right: 0; | |||
display: flex; | |||
justify-content: space-around; | |||
background-color: rgba(0, 0, 0, 0.5); | |||
/* transform: translateX(-200%); | |||
transition: all 0.5s ease; */ | |||
/* display: block; */ | |||
z-index: 9999; | |||
} | |||
.hide-container { | |||
/* position: fixed; | |||
height: 100%; | |||
width: 100%; | |||
top: 0; | |||
right: -200%; | |||
z-index: 9999; | |||
display: flex; | |||
justify-content: space-between; | |||
transform: translateX(100%); | |||
transition: all 0.5s ease-in; */ | |||
display: none | |||
} | |||
.left-shade { | |||
width: 30vw; | |||
height: 100%; | |||
} | |||
.right-choose { | |||
width: 70vw; | |||
height: 100%; | |||
background-color: #fff; | |||
padding: 40rpx; | |||
z-index: 12313; | |||
} | |||
.picker-container { | |||
height: calc(100% - 200rpx); | |||
overflow-x: hidden; | |||
overflow-y: scroll; | |||
margin-top: 40rpx; | |||
} | |||
.picker-container::-webkit-scrollbar { | |||
display: none; | |||
} | |||
.picker-item { | |||
width: calc(100% - 8rpx); | |||
height: 50rpx; | |||
line-height: 50rpx; | |||
font-size: 24rpx; | |||
text-align: center; | |||
margin-top: 20rpx; | |||
border: 2rpx solid #eaeaea; | |||
border-radius: 8rpx; | |||
} | |||
.picker-item-choose { | |||
border: 2rpx solid rgb(110, 216, 84); | |||
} | |||
.picker-item:nth-of-type(1) { | |||
margin: 0; | |||
} | |||
.button-container { | |||
width: 100%; | |||
height: 80rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
font-size: 24rpx; | |||
text-align: center; | |||
border-bottom: 2rpx solid #eaeaea; | |||
} | |||
.cancal { | |||
width: 100rpx; | |||
height: 40rpx; | |||
line-height: 40rpx; | |||
border: 2rpx solid #ddd; | |||
border-radius: 8rpx; | |||
} | |||
.sure { | |||
width: 100rpx; | |||
height: 40rpx; | |||
line-height: 40rpx; | |||
border: 2rpx solid rgb(132, 235, 132); | |||
border-radius: 8rpx; | |||
} | |||
.list{ | |||
width: 100%; | |||
padding: 25rpx 0; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
border-bottom: 1px solid #EAF1FF; | |||
box-sizing: border-box | |||
} | |||
.listName{ | |||
font-size:28rpx; | |||
color:rgba(87,99,117,1); | |||
max-width: 500rpx; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
white-space: nowrap; | |||
} | |||
.listName2{ | |||
font-size:28rpx; | |||
color:#BCC0C8; | |||
max-width: 500rpx; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
white-space: nowrap; | |||
margin-right: -360rpx; | |||
} | |||
.listImg{ | |||
width: 14rpx; | |||
height: 26rpx | |||
} |
@@ -1,184 +0,0 @@ | |||
<template> | |||
<view> | |||
<!-- components/pickerMultiSelect.wxml --> | |||
<!-- <view class='showPicker' bindtap='showPicker'>MyPicker</view> --> | |||
<view class="list" @tap="showPickerFun"> | |||
<view class="listName">{{title}}</view> | |||
<view class="listName2">{{value}}</view> | |||
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/qf/more.png" class="listImg"></image> | |||
</view> | |||
<view :class="showPicker ? 'shade-container' : 'hide-container'" v-if="firstShow"> | |||
<view class="left-shade" @tap="hidePicker"></view> | |||
<view class="right-choose"> | |||
<view class="button-container"> | |||
<view class="cancal" @tap="cancal">取消</view> | |||
<view class="sure" @tap="sure">确定</view> | |||
</view> | |||
<view class="picker-container"> | |||
<view v-for="(item, index) in myChooseList" :key="index" :class="'picker-item ' + ( item.flag ? 'picker-item-choose' : '' )" @tap="chooseItem" :data-value="item.value"> | |||
{{ item.label }} | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
// components/pickerMultiSelect.js | |||
export default { | |||
data() { | |||
return { | |||
showPicker: false, | |||
firstShow: false, | |||
myList: this.list, | |||
myChooseList:[], | |||
flag: false | |||
}; | |||
}, | |||
components: {}, | |||
mounted(){ | |||
this.myChooseList=this.chooseList; | |||
}, | |||
props: { | |||
chooseList: { | |||
type: Array | |||
}, | |||
multiple: { | |||
type: Boolean | |||
}, | |||
title: { | |||
type: String | |||
}, | |||
value: { | |||
type: String | |||
}, | |||
list: { | |||
type: Array||String | |||
} | |||
}, | |||
methods: { | |||
// 点击picker元素事件 | |||
chooseItem(e) { | |||
if (this.multiple) { | |||
// 多选事件 | |||
let val = e.target.dataset.value; | |||
let arr = this.myChooseList; | |||
let flag = ''; | |||
let index = null; | |||
for (let i = 0, len = arr.length; i < len; i++) { | |||
if (arr[i].value == val) { | |||
index = i; | |||
flag = `chooseList[${i}].flag`; | |||
} | |||
} | |||
if (!this.myChooseList[index].flag) { | |||
this.setData({ | |||
[flag]: true | |||
}); | |||
} else { | |||
this.setData({ | |||
[flag]: false | |||
}); | |||
} | |||
} else { | |||
// 单选事件 | |||
let val = e.target.dataset.value; | |||
let arr = this.myChooseList; | |||
let flag = ''; | |||
let index = null; | |||
for (let i = 0, len = arr.length; i < len; i++) { | |||
index = i; | |||
flag = `chooseList[${i}].flag`; | |||
if (arr[i].value == val) { | |||
this.setData({ | |||
[flag]: true | |||
}); | |||
} else { | |||
this.setData({ | |||
[flag]: false | |||
}); | |||
} | |||
} | |||
} | |||
}, | |||
// 展示picker | |||
showPickerFun() { | |||
this.myChooseList=this.chooseList | |||
if (!this.firstShow) { | |||
this.setData({ | |||
firstShow: true | |||
}); | |||
} | |||
this.setData({ | |||
showPicker: true | |||
}); // 加载时重新渲染已选择元素 | |||
let arr = this.myChooseList; | |||
let array = this.myList; | |||
let flag = ''; | |||
let index = null; | |||
for (let i = 0, len = arr.length; i < len; i++) { | |||
index = i; | |||
flag = `chooseList[${i}].flag`; | |||
if (!array.includes(arr[i].value)) { | |||
this.setData({ | |||
[flag]: false | |||
}); | |||
} else { | |||
this.setData({ | |||
[flag]: true | |||
}); | |||
} | |||
} | |||
}, | |||
// 隐藏picker | |||
hidePicker() { | |||
this.setData({ | |||
showPicker: false | |||
}); | |||
}, | |||
// 取消按钮事件 | |||
cancal() { | |||
this.hidePicker(); | |||
}, | |||
// 确定按钮事件 | |||
sure() { | |||
var list = []; | |||
for (let item of this.myChooseList) { | |||
if (item.flag) { | |||
list.push(item.value); | |||
} | |||
} | |||
this.setData({ | |||
myList:list | |||
}); | |||
this.hidePicker(); | |||
this.$emit('chooseEvent', { | |||
detail: { | |||
chooseArray: this.myList | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
</script> | |||
<style> | |||
@import "./pickerMultiSelect.css"; | |||
</style> |
@@ -1,263 +0,0 @@ | |||
<template> | |||
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear"> | |||
<uni-transition :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" /> | |||
<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap"> | |||
<view class="uni-popup__wrapper-box" @click.stop="clear"> | |||
<slot /> | |||
</view> | |||
</uni-transition> | |||
</view> | |||
</template> | |||
<script> | |||
import uniTransition from '../uni-transition/uni-transition.vue' | |||
/** | |||
* PopUp 弹出层 | |||
* @description 弹出层组件,为了解决遮罩弹层的问题 | |||
* @tutorial https://ext.dcloud.net.cn/plugin?id=329 | |||
* @property {String} type = [top|center|bottom] 弹出方式 | |||
* @value top 顶部弹出 | |||
* @value center 中间弹出 | |||
* @value bottom 底部弹出 | |||
* @property {Boolean} animation = [ture|false] 是否开启动画 | |||
* @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗 | |||
* @event {Function} change 打开关闭弹窗触发,e={show: false} | |||
*/ | |||
export default { | |||
name: 'UniPopup', | |||
components: { | |||
uniTransition | |||
}, | |||
props: { | |||
// 开启动画 | |||
animation: { | |||
type: Boolean, | |||
default: true | |||
}, | |||
// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层 | |||
type: { | |||
type: String, | |||
default: 'center' | |||
}, | |||
// maskClick | |||
maskClick: { | |||
type: Boolean, | |||
default: true | |||
} | |||
}, | |||
data() { | |||
return { | |||
duration: 300, | |||
ani: [], | |||
showPopup: false, | |||
showTrans: false, | |||
maskClass: { | |||
'position': 'fixed', | |||
'bottom': 0, | |||
'top': 0, | |||
'left': 0, | |||
'right': 0, | |||
'backgroundColor': 'rgba(0, 0, 0, 0.4)' | |||
}, | |||
transClass: { | |||
'position': 'fixed', | |||
'left': 0, | |||
'right': 0, | |||
} | |||
} | |||
}, | |||
watch: { | |||
type: { | |||
handler: function(newVal) { | |||
switch (this.type) { | |||
case 'top': | |||
this.ani = ['slide-top'] | |||
this.transClass = { | |||
'position': 'fixed', | |||
'left': 0, | |||
'right': 0, | |||
} | |||
break | |||
case 'bottom': | |||
this.ani = ['slide-bottom'] | |||
this.transClass = { | |||
'position': 'fixed', | |||
'left': 0, | |||
'right': 0, | |||
'bottom': 0 | |||
} | |||
break | |||
case 'center': | |||
this.ani = ['zoom-out', 'fade'] | |||
this.transClass = { | |||
'position': 'fixed', | |||
/* #ifndef APP-NVUE */ | |||
'display': 'flex', | |||
'flexDirection': 'column', | |||
/* #endif */ | |||
'bottom': 0, | |||
'left': 0, | |||
'right': 0, | |||
'top': 0, | |||
'justifyContent': 'center', | |||
'alignItems': 'center' | |||
} | |||
break | |||
} | |||
}, | |||
immediate: true | |||
} | |||
}, | |||
created() { | |||
if (this.animation) { | |||
this.duration = 300 | |||
} else { | |||
this.duration = 0 | |||
} | |||
}, | |||
methods: { | |||
clear(e) { | |||
// TODO nvue 取消冒泡 | |||
e.stopPropagation() | |||
}, | |||
open() { | |||
this.showPopup = true | |||
this.$nextTick(() => { | |||
clearTimeout(this.timer) | |||
this.timer = setTimeout(() => { | |||
this.showTrans = true | |||
}, 50); | |||
}) | |||
this.$emit('change', { | |||
show: true | |||
}) | |||
}, | |||
close(type) { | |||
this.showTrans = false | |||
this.$nextTick(() => { | |||
clearTimeout(this.timer) | |||
this.timer = setTimeout(() => { | |||
this.$emit('change', { | |||
show: false | |||
}) | |||
this.showPopup = false | |||
}, 300) | |||
}) | |||
}, | |||
onTap() { | |||
if (!this.maskClick) return | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.uni-popup { | |||
position: fixed; | |||
/* #ifdef H5 */ | |||
top: var(--window-top); | |||
/* #endif */ | |||
/* #ifndef H5 */ | |||
top: 0; | |||
/* #endif */ | |||
bottom: 0; | |||
left: 0; | |||
right: 0; | |||
/* #ifndef APP-NVUE */ | |||
z-index: 99; | |||
/* #endif */ | |||
} | |||
.uni-popup__mask { | |||
position: absolute; | |||
top: 0; | |||
bottom: 0; | |||
left: 0; | |||
right: 0; | |||
background-color: $uni-bg-color-mask; | |||
opacity: 0; | |||
} | |||
.mask-ani { | |||
transition-property: opacity; | |||
transition-duration: 0.2s; | |||
} | |||
.uni-top-mask { | |||
opacity: 1; | |||
} | |||
.uni-bottom-mask { | |||
opacity: 1; | |||
} | |||
.uni-center-mask { | |||
opacity: 1; | |||
} | |||
.uni-popup__wrapper { | |||
/* #ifndef APP-NVUE */ | |||
display: block; | |||
/* #endif */ | |||
position: absolute; | |||
} | |||
.top { | |||
top: 0; | |||
left: 0; | |||
right: 0; | |||
transform: translateY(-500px); | |||
} | |||
.bottom { | |||
bottom: 0; | |||
left: 0; | |||
right: 0; | |||
transform: translateY(500px); | |||
} | |||
.center { | |||
/* #ifndef APP-NVUE */ | |||
display: flex; | |||
flex-direction: column; | |||
/* #endif */ | |||
bottom: 0; | |||
left: 0; | |||
right: 0; | |||
top: 0; | |||
justify-content: center; | |||
align-items: center; | |||
transform: scale(1.2); | |||
opacity: 0; | |||
} | |||
.uni-popup__wrapper-box { | |||
/* #ifndef APP-NVUE */ | |||
display: block; | |||
/* #endif */ | |||
position: relative; | |||
} | |||
.content-ani { | |||
// transition: transform 0.3s; | |||
transition-property: transform, opacity; | |||
transition-duration: 0.2s; | |||
} | |||
.uni-top-content { | |||
transform: translateY(0); | |||
} | |||
.uni-bottom-content { | |||
transform: translateY(0); | |||
} | |||
.uni-center-content { | |||
transform: scale(1); | |||
opacity: 1; | |||
} | |||
</style> |
@@ -1,279 +0,0 @@ | |||
<template> | |||
<view v-if="isShow" ref="ani" class="uni-transition" :class="[ani.in]" :style="'transform:' +transform+';'+stylesObject" | |||
@click="change"> | |||
<slot></slot> | |||
</view> | |||
</template> | |||
<script> | |||
// #ifdef APP-NVUE | |||
const animation = uni.requireNativePlugin('animation'); | |||
// #endif | |||
/** | |||
* Transition 过渡动画 | |||
* @description 简单过渡动画组件 | |||
* @tutorial https://ext.dcloud.net.cn/plugin?id=985 | |||
* @property {Boolean} show = [false|true] 控制组件显示或隐藏 | |||
* @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型 | |||
* @value fade 渐隐渐出过渡 | |||
* @value slide-top 由上至下过渡 | |||
* @value slide-right 由右至左过渡 | |||
* @value slide-bottom 由下至上过渡 | |||
* @value slide-left 由左至右过渡 | |||
* @value zoom-in 由小到大过渡 | |||
* @value zoom-out 由大到小过渡 | |||
* @property {Number} duration 过渡动画持续时间 | |||
* @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red` | |||
*/ | |||
export default { | |||
name: 'uniTransition', | |||
props: { | |||
show: { | |||
type: Boolean, | |||
default: false | |||
}, | |||
modeClass: { | |||
type: Array, | |||
default () { | |||
return [] | |||
} | |||
}, | |||
duration: { | |||
type: Number, | |||
default: 300 | |||
}, | |||
styles: { | |||
type: Object, | |||
default () { | |||
return {} | |||
} | |||
} | |||
}, | |||
data() { | |||
return { | |||
isShow: false, | |||
transform: '', | |||
ani: { in: '', | |||
active: '' | |||
} | |||
}; | |||
}, | |||
watch: { | |||
show: { | |||
handler(newVal) { | |||
if (newVal) { | |||
this.open() | |||
} else { | |||
this.close() | |||
} | |||
}, | |||
immediate: true | |||
} | |||
}, | |||
computed: { | |||
stylesObject() { | |||
let styles = { | |||
...this.styles, | |||
'transition-duration': this.duration / 1000 + 's' | |||
} | |||
let transfrom = '' | |||
for (let i in styles) { | |||
let line = this.toLine(i) | |||
transfrom += line + ':' + styles[i] + ';' | |||
} | |||
return transfrom | |||
} | |||
}, | |||
created() { | |||
// this.timer = null | |||
// this.nextTick = (time = 50) => new Promise(resolve => { | |||
// clearTimeout(this.timer) | |||
// this.timer = setTimeout(resolve, time) | |||
// return this.timer | |||
// }); | |||
}, | |||
methods: { | |||
change() { | |||
this.$emit('click', { | |||
detail: this.isShow | |||
}) | |||
}, | |||
open() { | |||
clearTimeout(this.timer) | |||
this.isShow = true | |||
this.transform = '' | |||
this.ani.in = '' | |||
for (let i in this.getTranfrom(false)) { | |||
if (i === 'opacity') { | |||
this.ani.in = 'fade-in' | |||
} else { | |||
this.transform += `${this.getTranfrom(false)[i]} ` | |||
} | |||
} | |||
this.$nextTick(() => { | |||
setTimeout(() => { | |||
this._animation(true) | |||
}, 50) | |||
}) | |||
}, | |||
close(type) { | |||
clearTimeout(this.timer) | |||
this._animation(false) | |||
}, | |||
_animation(type) { | |||
let styles = this.getTranfrom(type) | |||
// #ifdef APP-NVUE | |||
if(!this.$refs['ani']) return | |||
animation.transition(this.$refs['ani'].ref, { | |||
styles, | |||
duration: this.duration, //ms | |||
timingFunction: 'ease', | |||
needLayout: false, | |||
delay: 0 //ms | |||
}, () => { | |||
if (!type) { | |||
this.isShow = false | |||
} | |||
this.$emit('change', { | |||
detail: this.isShow | |||
}) | |||
}) | |||
// #endif | |||
// #ifndef APP-NVUE | |||
this.transform = '' | |||
for (let i in styles) { | |||
if (i === 'opacity') { | |||
this.ani.in = `fade-${type?'out':'in'}` | |||
} else { | |||
this.transform += `${styles[i]} ` | |||
} | |||
} | |||
this.timer = setTimeout(() => { | |||
if (!type) { | |||
this.isShow = false | |||
} | |||
this.$emit('change', { | |||
detail: this.isShow | |||
}) | |||
}, this.duration) | |||
// #endif | |||
}, | |||
getTranfrom(type) { | |||
let styles = { | |||
transform: '' | |||
} | |||
this.modeClass.forEach((mode) => { | |||
switch (mode) { | |||
case 'fade': | |||
styles.opacity = type ? 1 : 0 | |||
break; | |||
case 'slide-top': | |||
styles.transform += `translateY(${type?'0':'-100%'}) ` | |||
break; | |||
case 'slide-right': | |||
styles.transform += `translateX(${type?'0':'100%'}) ` | |||
break; | |||
case 'slide-bottom': | |||
styles.transform += `translateY(${type?'0':'100%'}) ` | |||
break; | |||
case 'slide-left': | |||
styles.transform += `translateX(${type?'0':'-100%'}) ` | |||
break; | |||
case 'zoom-in': | |||
styles.transform += `scale(${type?1:0.8}) ` | |||
break; | |||
case 'zoom-out': | |||
styles.transform += `scale(${type?1:1.2}) ` | |||
break; | |||
} | |||
}) | |||
return styles | |||
}, | |||
_modeClassArr(type) { | |||
let mode = this.modeClass | |||
if (typeof(mode) !== "string") { | |||
let modestr = '' | |||
mode.forEach((item) => { | |||
modestr += (item + '-' + type + ',') | |||
}) | |||
return modestr.substr(0, modestr.length - 1) | |||
} else { | |||
return mode + '-' + type | |||
} | |||
}, | |||
// getEl(el) { | |||
// console.log(el || el.ref || null); | |||
// return el || el.ref || null | |||
// }, | |||
toLine(name) { | |||
return name.replace(/([A-Z])/g, "-$1").toLowerCase(); | |||
} | |||
} | |||
} | |||
</script> | |||
<style> | |||
.uni-transition { | |||
transition-timing-function: ease; | |||
transition-duration: 0.3s; | |||
transition-property: transform, opacity; | |||
} | |||
.fade-in { | |||
opacity: 0; | |||
} | |||
.fade-active { | |||
opacity: 1; | |||
} | |||
.slide-top-in { | |||
/* transition-property: transform, opacity; */ | |||
transform: translateY(-100%); | |||
} | |||
.slide-top-active { | |||
transform: translateY(0); | |||
/* opacity: 1; */ | |||
} | |||
.slide-right-in { | |||
transform: translateX(100%); | |||
} | |||
.slide-right-active { | |||
transform: translateX(0); | |||
} | |||
.slide-bottom-in { | |||
transform: translateY(100%); | |||
} | |||
.slide-bottom-active { | |||
transform: translateY(0); | |||
} | |||
.slide-left-in { | |||
transform: translateX(-100%); | |||
} | |||
.slide-left-active { | |||
transform: translateX(0); | |||
opacity: 1; | |||
} | |||
.zoom-in-in { | |||
transform: scale(0.8); | |||
} | |||
.zoom-out-active { | |||
transform: scale(1); | |||
} | |||
.zoom-out-in { | |||
transform: scale(1.2); | |||
} | |||
</style> |
@@ -1,178 +0,0 @@ | |||
<template> | |||
<view class="verifical-input"> | |||
<input | |||
class="verifical-input-hidden" | |||
type="number" | |||
:maxlength="blockNum" | |||
:focus="isFucus" | |||
hold-keyboard="true" | |||
@input = "changeCodeInput" | |||
v-model="inputCode" | |||
value="" /> | |||
<view class="verifical-input-real"> | |||
<block v-for="(item,index) in blockNum" :key="index"> | |||
<view :class="['real-block',{'block-active':index === activeIndex && codeType == 'block','line-active':index === activeIndex && codeType == 'line','block-arror':errorType},codeType == 'block'?'block-content':'line-content']"> | |||
<text class="real-block-line" v-if="index === activeIndex || (errorType && index === 0)"></text> | |||
<text class="real-block-number">{{inputText[index]}}</text> | |||
</view> | |||
</block> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
props:{ | |||
//验证码个数 | |||
blockNum:{ | |||
type:Number, | |||
default:4 | |||
}, | |||
//验证码类型 | |||
codeType:{ | |||
type:String, | |||
default:'block' | |||
}, | |||
/* isFocus:{ | |||
type:Number, | |||
default:4 | |||
} */ | |||
}, | |||
data() { | |||
return { | |||
activeIndex:0, //激活的方块 | |||
inputText:'', //输入的验证码 | |||
isFucus:true, //是否自动聚焦 | |||
inputCode:'', //输入的值 | |||
errorType:false //错误提示 | |||
} | |||
}, | |||
watch: { | |||
errorType: { | |||
immediate: true, | |||
handler: function(newValue) { | |||
if (newValue === true) { | |||
this.inputText.length = 0; | |||
this.inputCode = ''; | |||
this.isFucus = true; | |||
} | |||
} | |||
} | |||
}, | |||
methods: { | |||
changeCodeInput(event){ | |||
this.errorType = false; | |||
this.inputText = (event.target.value).split(''); | |||
this.activeIndex = this.inputText.length; | |||
if(this.activeIndex == this.blockNum){ | |||
this.isFucus = false; | |||
this.$emit('verificationCode',event.target.value) | |||
} | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
$main-color:blue;/* 主题色 */ | |||
$error-color:red;/* 错误颜色 */ | |||
.flex-row{ | |||
display: flex; | |||
flex-direction: row; | |||
align-items: center; | |||
justify-content: center; | |||
} | |||
.flex-column{ | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
justify-content: center; | |||
} | |||
.verifical-input{ | |||
position: relative; | |||
overflow: hidden; | |||
padding: 0 5px; | |||
.verifical-input-hidden{ | |||
position: absolute; | |||
top:0; | |||
left:-200%; | |||
width: 300%; | |||
height: 100%; | |||
background: none; | |||
color: #FFFFFF; | |||
} | |||
.verifical-input-real{ | |||
width: 100%; | |||
@extend .flex-row; | |||
.real-block{ | |||
width: 100rpx; | |||
height: 100rpx; | |||
margin-right: 20rpx; | |||
&:last-child{ | |||
margin-right: 0; | |||
} | |||
@extend .flex-row; | |||
.real-block-line{ | |||
display: inline-block; | |||
width: 6rpx; | |||
height: 46rpx; | |||
background: #333333; | |||
animation: line 1s infinite ease; | |||
} | |||
.real-block-number{ | |||
font-size: 48rpx; | |||
font-weight: 600; | |||
} | |||
} | |||
.line-content{ | |||
border-bottom: 2rpx solid rgba(187, 187, 187, 100); | |||
} | |||
.block-content{ | |||
border-radius: 12rpx; | |||
border: 2rpx solid rgba(187, 187, 187, 100); | |||
} | |||
.block-active{ | |||
border: 4rpx solid $main-color!important; | |||
} | |||
.line-active{ | |||
border-bottom: 2rpx solid $main-color; | |||
} | |||
} | |||
} | |||
/* 错误弹框 */ | |||
.block-arror{ | |||
border-color: $error-color!important; | |||
animation: error .5s ease; | |||
} | |||
@keyframes line { | |||
0% { | |||
opacity: .9; | |||
}, | |||
50% { | |||
opacity: 0; | |||
}, | |||
100% { | |||
opacity: .9; | |||
} | |||
} | |||
@keyframes error { | |||
0% { | |||
transform: translateX(-5px); | |||
}, | |||
20% { | |||
transform: translateX(5px); | |||
}, | |||
40% { | |||
transform: translateX(-5px); | |||
}, | |||
60% { | |||
transform: translateX(5px); | |||
}, | |||
80% { | |||
transform: translateX(-5px); | |||
}, | |||
100% { | |||
transform: translateX(0); | |||
} | |||
} | |||
</style> |
@@ -1,82 +0,0 @@ | |||
/** | |||
* 小程序配置文件 | |||
*/ | |||
// 此处主机域名修改成腾讯云解决方案分配的域名 | |||
var host = 'http://121.42.63.138:9091/autoSR/api'; // 测试站 | |||
// var host = 'http://192.168.31.163:8080/autoSR/api'; // 长龙 | |||
// var host = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 | |||
// var host = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏 | |||
// var host = 'https://zkgj.quhouse.com/api'; // 质控正式 | |||
// var host = 'https://hfju.com/api'; // 数智正式 | |||
var iMServiceHost = 'https://im.quhouse.com/'; //IM的后端地址正式 | |||
var config = { | |||
service: { | |||
host, | |||
iMServiceHost, | |||
getStage:`${host}/customer/getStage`, | |||
//验证toen | |||
verify:`${host}/user/verify`, | |||
//登录 | |||
login: `${host}/user/login`, | |||
//获取用户信息 | |||
getUser: `${host}/user/getUser`, | |||
//获取权限 | |||
getMenu:`${host}/user/getMenu`, | |||
//发送验证码 | |||
sendCode:`${host}/user/sendCode`, | |||
//验证码校验 | |||
plogin:`${host}/user/plogin`, | |||
//忘记密码 | |||
forgotPassword:`${host}/user/forgotPassword`, | |||
//修改密码 | |||
updatePassword: `${host}/user/resetPwd`, | |||
//修改用户信息 | |||
upload: `${host}/user/update`, | |||
// 上传头像 | |||
uploadHeadImg:`${host}/user/uploadHeadPortrait`, | |||
//分点学习标签 | |||
findSelectedLabel:`${host}/addtodigest/findSelectedLabel`, | |||
//获取全部学习 | |||
findAllZATD:`${host}/addtodigest/findAllZATD`, | |||
//查询点赞列表 | |||
likegetLike:`${host}/like/getLike`, | |||
// 获取评论 | |||
cmmentList:`${host}/comment/list`, | |||
// 新增评论 | |||
saveCmment:`${host}/comment/saveCmment`, | |||
// 新增文件评论 | |||
saveCmmentUpload:`${host}/comment/upload`, | |||
// 点赞 | |||
saveLike:`${host}/like/saveLike`, | |||
// 取消点赞 | |||
cancelLike:`${host}/like/cancelLike`, | |||
//同音转译接口3 | |||
getCorpusAnal: `${host}/corpus/splicAudioPlay`, | |||
//转写内容获取快进时间是第几个文件 | |||
fastForward:`${host}/corpus/fastForward`, | |||
//标记顾问 | |||
markConsultant:`${host}/corpus/markConsultant`, | |||
//同音转译接口 | |||
getSpeechAnalysis: `${host}/cms/mobile/getBytargetId`, | |||
//同音转译接口2 | |||
getCorpusAnalysis: `${host}/corpus/audioPlay`, | |||
//查询设备电量 | |||
findElectricity:`${host}/equipment/findElectricity`, | |||
//首页设备查询 | |||
findEquipmentState:`${host}/cusLvStatistics/findEquipmentState`, | |||
//首页实时统计 | |||
realTimeStatistics:`${host}/cusLvStatistics/realTimeStatistics`, | |||
//首页本周工作 | |||
workThisWeek:`${host}/cusLvStatistics/workThisWeek`, | |||
//查询是否开启选择顾问权限 | |||
getSelfAssignedByHouseId:`${host}/user/getSelfAssignedByHouseId`, | |||
//确认加精 | |||
addATD:`${host}/addtodigest/addATD`, | |||
//取消加精 | |||
delATD:`${host}/addtodigest/delATD`, | |||
} | |||
}; | |||
module.exports = config; |
@@ -1,25 +0,0 @@ | |||
import Vue from 'vue'; | |||
import App from './App'; | |||
import dayjs from './utils/dayjs.min.js' | |||
Vue.config.productionTip = false; | |||
Vue.prototype.$dayjs = dayjs; | |||
// 引入全局uView | |||
import uView from 'uview-ui' | |||
Vue.use(uView); | |||
import http from '@/utils/http.js' | |||
Vue.use(http, app) | |||
App.mpType = 'app'; | |||
const app = new Vue({ | |||
...App | |||
}); | |||
app.$mount(); |
@@ -1,124 +0,0 @@ | |||
{ | |||
"name" : "数智工牌", | |||
"appid" : "__UNI__6CC21FF", | |||
"description" : "智控管家", | |||
"versionName" : "1.1.0", | |||
"versionCode" : "100", | |||
"transformPx" : false, | |||
"app-plus" : { | |||
"usingComponents" : true, | |||
"nvueCompiler" : "uni-app", | |||
"compilerVersion" : 3, | |||
"splashscreen" : { | |||
"alwaysShowBeforeRender" : true, | |||
"waiting" : true, | |||
"autoclose" : true, | |||
"delay" : 0 | |||
}, | |||
"modules" : { | |||
"Push" : {}, | |||
"UIWebview" : {}, | |||
"Webview-x5" : {} | |||
}, | |||
"distribute" : { | |||
"android" : { | |||
"permissions" : [ | |||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", | |||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", | |||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", | |||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", | |||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", | |||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", | |||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", | |||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", | |||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", | |||
"<uses-permission android:name=\"android.permission.CAMERA\"/>", | |||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", | |||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", | |||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", | |||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", | |||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", | |||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", | |||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", | |||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", | |||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", | |||
"<uses-feature android:name=\"android.hardware.camera\"/>", | |||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", | |||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" | |||
], | |||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] | |||
}, | |||
"ios" : { | |||
"idfa" : false | |||
}, | |||
"sdkConfigs" : { | |||
"ad" : {}, | |||
"oauth" : {} | |||
}, | |||
"icons" : { | |||
"android" : { | |||
"hdpi" : "unpackage/res/icons/72x72.png", | |||
"xhdpi" : "unpackage/res/icons/96x96.png", | |||
"xxhdpi" : "unpackage/res/icons/144x144.png", | |||
"xxxhdpi" : "unpackage/res/icons/192x192.png" | |||
}, | |||
"ios" : { | |||
"appstore" : "unpackage/res/icons/1024x1024.png", | |||
"ipad" : { | |||
"app" : "unpackage/res/icons/76x76.png", | |||
"app@2x" : "unpackage/res/icons/152x152.png", | |||
"notification" : "unpackage/res/icons/20x20.png", | |||
"notification@2x" : "unpackage/res/icons/40x40.png", | |||
"proapp@2x" : "unpackage/res/icons/167x167.png", | |||
"settings" : "unpackage/res/icons/29x29.png", | |||
"settings@2x" : "unpackage/res/icons/58x58.png", | |||
"spotlight" : "unpackage/res/icons/40x40.png", | |||
"spotlight@2x" : "unpackage/res/icons/80x80.png" | |||
}, | |||
"iphone" : { | |||
"app@2x" : "unpackage/res/icons/120x120.png", | |||
"app@3x" : "unpackage/res/icons/180x180.png", | |||
"notification@2x" : "unpackage/res/icons/40x40.png", | |||
"notification@3x" : "unpackage/res/icons/60x60.png", | |||
"settings@2x" : "unpackage/res/icons/58x58.png", | |||
"settings@3x" : "unpackage/res/icons/87x87.png", | |||
"spotlight@2x" : "unpackage/res/icons/80x80.png", | |||
"spotlight@3x" : "unpackage/res/icons/120x120.png" | |||
} | |||
} | |||
} | |||
} | |||
}, | |||
"quickapp" : {}, | |||
"mp-weixin" : { | |||
"appid" : "wxe044603515ff2cb5", | |||
"setting" : { | |||
"urlCheck" : false, | |||
"es6" : true, | |||
"postcss" : true, | |||
"minified" : true | |||
}, | |||
"usingComponents" : true, | |||
"permission" : {}, | |||
"plugins" : { | |||
"WechatSI" : { | |||
"version" : "0.3.4", | |||
"provider" : "wx069ba97219f66d99" | |||
} | |||
} | |||
}, | |||
"mp-alipay" : { | |||
"usingComponents" : true | |||
}, | |||
"mp-baidu" : { | |||
"usingComponents" : true | |||
}, | |||
"mp-toutiao" : { | |||
"usingComponents" : true | |||
}, | |||
"h5" : { | |||
"router" : { | |||
"base" : "/pages/login/guide" | |||
} | |||
} | |||
} |
@@ -1,3 +0,0 @@ | |||
{ | |||
"lockfileVersion": 1 | |||
} |
@@ -1,464 +0,0 @@ | |||
{ | |||
"easycom": { | |||
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" | |||
}, | |||
//这个pages里只放这五个页面,新增页面时请对应的放到下面的分包里 | |||
"pages": [{ | |||
"path": "pages/index/guide", | |||
"style": { | |||
"navigationBarBackgroundColor": "#008EF2", | |||
"navigationBarTextStyle": "white", | |||
"navigationStyle": "custom" | |||
} | |||
}, | |||
{ | |||
"path": "pages/index/index", | |||
"style": { | |||
"navigationBarTitleText": "智控管家", | |||
"navigationBarBackgroundColor": "#2671E2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
}, | |||
{ | |||
"path": "pages/index/customer", | |||
"style": { | |||
"navigationBarTitleText": "接待", | |||
"navigationBarBackgroundColor": "#2671E2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
},{ | |||
"path": "pages/index/learning", | |||
"style": { | |||
"navigationBarTitleText": "学习", | |||
"navigationBarBackgroundColor": "#2671E2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
},{ | |||
"path": "pages/index/personal", | |||
"style": { | |||
"navigationBarTitleText": "我的", | |||
"navigationBarBackgroundColor": "#2671E2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
} | |||
], | |||
//这下面是分包 | |||
"subPackages": [ | |||
{ | |||
"root": "pages/login",//登录相关 | |||
"name": "login", | |||
"pages": [ | |||
{ | |||
"path": "index", | |||
"style": { | |||
"navigationBarBackgroundColor": "#008EF2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
}, | |||
{ | |||
"path": "Verification", | |||
"style": { | |||
"navigationBarTitleText": "验证码登录", | |||
"navigationBarBackgroundColor": "#008EF2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
}, | |||
{ | |||
"path": "yinzhongmalogin", | |||
"style": { | |||
"navigationBarTitleText": "验证码登录", | |||
"navigationBarBackgroundColor": "#008EF2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
}, | |||
{ | |||
"path": "Setthepassword", | |||
"style": { | |||
"navigationBarTitleText": "忘记密码", | |||
"navigationBarBackgroundColor": "#008EF2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
}, | |||
{ | |||
"path": "Verifythelogin", | |||
"style": { | |||
"navigationBarTitleText": "验证码验证", | |||
"navigationBarBackgroundColor": "#008EF2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
} | |||
] | |||
}, | |||
{ | |||
"root": "pages/mine",//个人中心 | |||
"name": "mine", | |||
"pages": [ | |||
{ | |||
"path": "details", | |||
"style": { | |||
"navigationBarTitleText": "详情", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "details2", | |||
"style": { | |||
"navigationBarTitleText": "详情", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "ScoringPlaylist", | |||
"style": { | |||
"navigationBarTitleText": "匹配标签", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Myprofile", | |||
"style": { | |||
"navigationBarTitleText": "编辑资料", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "nickname", | |||
"style": { | |||
"navigationBarTitleText": "编辑昵称", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "signature", | |||
"style": { | |||
"navigationBarTitleText": "编辑签名", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Changehepassword", | |||
"style": { | |||
"navigationBarTitleText": "修改密码", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "reception/addreception", | |||
"style": { | |||
"navigationBarTitleText": "新增接待", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "reception/consultant", | |||
"style": { | |||
"navigationBarTitleText": "选择顾问", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "consultanonduty/index", | |||
"style": { | |||
"navigationBarTitleText": "值班顾问", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "equipment/index", | |||
"style": { | |||
"navigationBarTitleText": "设备管理", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
} | |||
] | |||
}, | |||
{ | |||
"root": "pages/learning",//学习 | |||
"name": "learning", | |||
"pages": [ | |||
{ | |||
"path": "Thefulltext/index", | |||
"style": { | |||
"navigationBarTitleText": "全文学习", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Thefulltext/index2", | |||
"style": { | |||
"navigationBarTitleText": "全文学习", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Thefulltext/search", | |||
"style": { | |||
"navigationBarTitleText": "搜索", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Keywordsearch", | |||
"style": { | |||
"navigationBarTitleText": "搜索", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Equinoctiallearning", | |||
"style": { | |||
"navigationBarTitleText": "分点学习", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Equinoctial/index", | |||
"style": { | |||
"navigationBarTitleText": "分点学习", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Equinoctial/index2", | |||
"style": { | |||
"navigationBarTitleText": "分点学习", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
} | |||
] | |||
}, | |||
{ | |||
"root": "pages/center",//中心逻辑的模块都放到这里 | |||
"name": "center", | |||
"pages": [ | |||
{ | |||
"path": "Piabodata/index", | |||
"style": { | |||
"navigationBarTitleText": "销讲数据", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/Groupcontrast", | |||
"style": { | |||
"navigationBarTitleText": "集团对比", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/Theteamcompared", | |||
"style": { | |||
"navigationBarTitleText": "团队对比", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/selectTeam", | |||
"style": { | |||
"navigationBarTitleText": "选择团队", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/selectGroup", | |||
"style": { | |||
"navigationBarTitleText": "选择楼盘", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/Userinsightinto", | |||
"style": { | |||
"navigationBarTitleText": "客户画像", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/TrendAnalysis", | |||
"style": { | |||
"navigationBarTitleText": "趋势分析", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/StaffAnalysis", | |||
"style": { | |||
"navigationBarTitleText": "员工分析", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/Customerportrait/Detailsofthesearch", | |||
"style": { | |||
"navigationBarTitleText": "搜索", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/Customerportrait/Receivedetailabout", | |||
"style": { | |||
"navigationBarTitleText": "详情", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "Piabodata/Customerportrait/Receivingrecords", | |||
"style": { | |||
"navigationBarTitleText": "列表", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "records/index", | |||
"style": { | |||
"navigationBarTitleText": "接待记录", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "records/recordSearch", | |||
"style": { | |||
"navigationBarTitleText": "搜索", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "consumer/index", | |||
"style": { | |||
"navigationBarTitleText": "客户管理", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "consumer/consumerSearch", | |||
"style": { | |||
"navigationBarTitleText": "搜索", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "consumer/consumerDetail", | |||
"style": { | |||
"navigationBarTitleText": "客户详情", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "consumer/remind", | |||
"style": { | |||
"navigationBarTitleText": "添加提醒", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "consumer/edit", | |||
"style": { | |||
"navigationBarTitleText": "编辑客户", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
}, | |||
{ | |||
"path": "consumer/newFollowup/newFollowup", | |||
"style": { | |||
"navigationBarTitleText": "写跟进", | |||
"navigationBarBackgroundColor": "#FFFFFF", | |||
"navigationBarTextStyle": "black" | |||
} | |||
} | |||
] | |||
} | |||
], | |||
"permission": { | |||
"scope.userLocation": { | |||
"desc": "你的位置信息将用于小程序位置接口的效果展示" | |||
} | |||
}, | |||
"networkTimeout": { | |||
"request": 10000, | |||
"downloadFile": 10000 | |||
}, | |||
"debug": false, | |||
"tabBar": { | |||
"color": "#8E8E8E", | |||
"selectedColor": "#1296db", | |||
"borderStyle": "white", | |||
"list": [{ | |||
"pagePath": "pages/index/index", | |||
"iconPath": "/static/images/tabBar/home.png", | |||
"selectedIconPath": "/static/images/tabBar/homeActive.png", | |||
"text": "楼盘" | |||
}, | |||
{ | |||
"pagePath": "pages/index/customer", | |||
"iconPath": "/static/images/tabBar/customer.png", | |||
"selectedIconPath": "/static/images/tabBar/customerActive.png", | |||
"text": "接待" | |||
}, | |||
{ | |||
"pagePath": "pages/index/learning", | |||
"iconPath": "/static/images/tabBar/voice.png", | |||
"selectedIconPath": "/static/images/tabBar/voiceActive.png", | |||
"text": "学习" | |||
}, | |||
{ | |||
"pagePath": "pages/index/personal", | |||
"iconPath": "/static/images/tabBar/user.png", | |||
"selectedIconPath": "/static/images/tabBar/userActive.png", | |||
"text": "个人" | |||
} | |||
] | |||
}, | |||
"sitemapLocation": "sitemap.json", | |||
"globalStyle": { | |||
"backgroundColor": "#F6F6F6", | |||
"backgroundTextStyle": "dark", | |||
"navigationBarBackgroundColor": "#fff", | |||
"navigationBarTitleText": "数智工牌", | |||
"navigationBarTextStyle": "black" | |||
} | |||
} |
@@ -1,178 +0,0 @@ | |||
<template> | |||
<view class="translation"> | |||
<view style="display: flex;width: 100%;height: 100rpx;border-bottom: 1px solid #E0E0E0;"> | |||
<view style="width: 50%;display: flex;align-items: center;justify-content: center;font-size: 30rpx;"> | |||
<view style="line-height: 50rpx;" :class="roleindex == 0 ? 'bosdttom' : ''" @click="tapspagek(0)">画像语义词选择</view> | |||
</view> | |||
<view style="width: 50%;display: flex;align-items: center;justify-content: center;font-size: 30rpx;"> | |||
<view style="line-height: 50rpx;" :class="roleindex == 1 ? 'bosdttom' : ''" @click="tapspagek(1)">关键词输入</view> | |||
</view> | |||
</view> | |||
<view v-if='roleindex==0' style="width: 690rpx;height: 64rpx;margin: 0 auto;margin-top: 30rpx;"> | |||
<view style="display: flex;align-items: center;border-bottom: 1px solid #C9C9C9;height: 80rpx;"> | |||
<view>画像语义词:</view> | |||
<view style="width:70%" @click="oninputtap()"> | |||
<text v-if="Semanticword.length==0">请选择</text> | |||
<text v-else>{{Semanticword}}</text> | |||
</view> | |||
<view> | |||
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/qf/more.png" style="width:12rpx;height:23rpx;margin-left: 16rpx;"> | |||
</view> | |||
</view> | |||
</view> | |||
<view v-if='roleindex==1' style="width: 690rpx;height: 64rpx;margin: 0 auto;margin-top: 30rpx;background: #F2F2F2;border-radius: 32rpx; | |||
display: flex;align-items: center;"> | |||
<view style="width: 10%;height: 64rpx;display: flex;align-items: center;"> | |||
<image style="width: 28rpx;height: 28rpx;margin-left: 30rpx;" src="/static/images/search.png" mode=""></image> | |||
</view> | |||
<view style="width: 90%;height: 64rpx;display: flex;align-items: center;"> | |||
<input type="text" @input="searchinfo" v-model="keyword" placeholder="请输入关键字" | |||
style="width: 100%;color: #999999;font-size: 24rpx;"/> | |||
</view> | |||
</view> | |||
<view style="width: 690rpx;margin: 0 auto;margin-top: 10rpx;"> | |||
<view style="width: 100%;border-bottom: 1px solid #E0E0E0;display: flex;padding-bottom: 10rpx;margin-top: 40rpx;" | |||
v-for="(item,index) in listarr" :key='index' @click="toaidoinfo(item.Content,item.corpusId,item.index)"> | |||
<view style="width: 26rpx;height: 36rpx;margin-top: 4rpx;"> | |||
<image style="width: 26rpx;height: 28rpx;" src="/static/images/testimg.png" mode=""></image> | |||
</view> | |||
<view v-html="item.Content.text" style="color: #666666;font-size: 28rpx;line-height: 36rpx;margin-left: 10rpx;width: 80%;"></view> | |||
<view style="font-size: 28rpx;width: 10%;width: 14%;text-align: right;">{{item.Content.time}}</view> | |||
</view> | |||
</view> | |||
<view v-if="Showhiddenunits"> | |||
<u-select v-model="Showhiddenunits" mode="single-column" :list="selectlist" @confirm="confirm"></u-select> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../../../utils/util.js"); | |||
var config = require("../../../../config"); | |||
export default { | |||
data() { | |||
return { | |||
customerId:'', | |||
listarr:[], | |||
keyword:'', | |||
skpl:'', | |||
roleindex:0, | |||
Showhiddenunits:false, | |||
selectlist:[], | |||
Semanticword:'', | |||
qujian:true | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
this.customerId = options.customerId; | |||
this.statistical() | |||
}, | |||
methods: { | |||
statistical(){ | |||
this.$u.get("/matchKeywords/findCARKeywords", { | |||
customerId: this.customerId | |||
}).then(res => { | |||
res.forEach((item,index)=>{ | |||
if(item.isInterval==0){ | |||
item.label=item.name+item.unit +'-'+ item.endName+item.unit; | |||
item.value=index | |||
}else{ | |||
item.label=item.name; | |||
item.value=index | |||
} | |||
}) | |||
this.selectlist=res; | |||
}) | |||
}, | |||
oninputtap(){ | |||
this.Showhiddenunits=true; | |||
}, | |||
confirm(e) { | |||
let indexs=e[0].value; | |||
this.selectlist.forEach((item,index)=>{ | |||
if(indexs==item.value){ | |||
this.Semanticword=item.name; | |||
this.keyword=item.matchName; | |||
if(item.isInterval==0){ | |||
this.qujian=false; | |||
this.Semanticword=item.name+item.unit+ '-'+ item.endName+item.unit; | |||
}else{ | |||
this.qujian=true; | |||
} | |||
} | |||
}) | |||
this.searchinfo() | |||
}, | |||
tapspagek(i){ | |||
this.roleindex=i; | |||
this.keyword=""; | |||
this.Semanticword=''; | |||
this.qujian=true; | |||
this.listarr=[]; | |||
}, | |||
formatTime(num) { | |||
//格式化时间格式 | |||
num = num.toFixed(0); | |||
let second = num % 60; | |||
if (second < 10) second = '0' + second; | |||
let min = Math.floor(num / 60); | |||
if (min < 10) min = '0' + min; | |||
return min + ":" + second; | |||
}, | |||
searchinfo(){ | |||
if(this.keyword.length==0){ | |||
return | |||
}else{ | |||
let parames={ | |||
keyword:this.keyword, | |||
customerId:this.customerId | |||
} | |||
this.$u.post("/corpus/keyWordsMatching", parames).then(res => { | |||
res.forEach(item=>{ | |||
item.Content=JSON.parse(item.transferContent) | |||
}) | |||
res.forEach(cet=>{ | |||
cet.Content.time=this.formatTime(cet.Content.bg/1000) | |||
if(this.qujian==false){ | |||
cet.Content.text=cet.Content.onebest; | |||
}else{ | |||
cet.Content.text=this.brightKeyword(cet.Content.onebest) | |||
} | |||
}) | |||
this.listarr=res; | |||
}) | |||
} | |||
}, | |||
//替换方法 | |||
brightKeyword(val) { | |||
if (val.indexOf(this.keyword) !== -1) { | |||
return val.replace(this.keyword, `<font style='color: red'>${this.keyword}</font>`); | |||
} else { | |||
return val; | |||
} | |||
}, | |||
//跳转 | |||
toaidoinfo(item,id,index){ | |||
item.customerId=this.customerId; | |||
item.id=id; | |||
item.index=index; | |||
let pages = getCurrentPages() //获取当前页面栈的信息 | |||
let prevPage = pages[pages.length - 2] //获取上一个页面 | |||
prevPage.setData({ //把需要回传的值保存到上一个页面 | |||
info: item | |||
}); | |||
wx.navigateBack({ //然后返回上一个页面 | |||
delta: 1 | |||
}) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.bosdttom{ | |||
border-bottom: 2px solid #2671E2; | |||
} | |||
</style> |
@@ -1,700 +0,0 @@ | |||
<template> | |||
<view class="cenbox"> | |||
<view class="screeningtop"> | |||
<view class="screeningview" @click="clickscreening(1)"> | |||
<view>近一周</view> | |||
<view class="viewimg"> | |||
<image v-if="screeningshow1==false" src="../../../../static/images/down1.png" mode=""></image> | |||
<image v-if="screeningshow1==true" src="../../../../static/images/down2.png" mode=""></image> | |||
</view> | |||
</view> | |||
<view class="screeningview" @click="clickscreening(2)"> | |||
<view>客户</view> | |||
<view class="viewimg"> | |||
<image v-if="screeningshow2==false" src="../../../../static/images/down1.png" mode=""></image> | |||
<image v-if="screeningshow2==true" src="../../../../static/images/down2.png" mode=""></image> | |||
</view> | |||
</view> | |||
<view class="screeningview" @click="clickscreening(3)"> | |||
<view>置业顾问</view> | |||
<view class="viewimg"> | |||
<image v-if="screeningshow3==false" src="../../../../static/images/down1.png" mode=""></image> | |||
<image v-if="screeningshow3==true" src="../../../../static/images/down2.png" mode=""></image> | |||
</view> | |||
</view> | |||
<view style="border: none;" class="screeningview" @click="clickscreening(4)"> | |||
<view>语义词</view> | |||
<view class="viewimg"> | |||
<image v-if="screeningshow4==false" src="../../../../static/images/down1.png" mode=""></image> | |||
<image v-if="screeningshow4==true" src="../../../../static/images/down2.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="zhuti"> | |||
<view v-if="tadelist.length!=0" class="cenforview" v-for="(item,index) in tadelist" :key='index' @click="toinfo(item)"> | |||
<view class="cenfortop"> | |||
<view class="fortopzuo"> | |||
<view class="topzuoimg"> | |||
<image src="../../../../static/images/userorder.png" mode=""></image> | |||
</view> | |||
</view> | |||
<view class="fortopyou"> | |||
<view class="topyouview1"> | |||
<view class="youview1-1">{{item.agentName}}</view> | |||
<view class="youview1-2">接待开始时间:{{item.staTime}}</view> | |||
</view> | |||
<view class="topyouview2">客户姓名:{{item.name}}</view> | |||
</view> | |||
</view> | |||
<view class="cenforbottom"> | |||
<view class="forbottomview"> | |||
<view class="bottomview1">录音时长 (分钟)</view> | |||
<view class="bottomview2">{{item.mm}}分钟</view> | |||
</view> | |||
<view class="forbottomview"> | |||
<view class="bottomview1">需求触达次数</view> | |||
<view class="bottomview2">{{item.total}}次</view> | |||
</view> | |||
<view class="forbottomview" style="border: none;"> | |||
<view class="bottomview1">接访得分</view> | |||
<view class="bottomview2" v-if="item.fraction==null">0分</view> | |||
<view class="bottomview2" v-else>{{item.fraction}}分</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view v-if="tadelist.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;"> | |||
<view style="width: 100%;background: #FFFFFF;padding-top: 200rpx;"> | |||
<view style="width: 100%;text-align: center;"> | |||
<image style="width: 200rpx;height: 200rpx;" src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image> | |||
</view> | |||
<view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 1 --> | |||
<view v-if="screeningshow1==true" class="call_zhezhao" @click="allcancel()"></view> | |||
<view v-if="screeningshow1==true" class="timepick"> | |||
<view class="tiempickbox"> | |||
<view :class="{ timeactive: activetime == 0 }" @click="activetimetab(0)">今日</view> | |||
<view :class="{ timeactive: activetime == 1 }" @click="activetimetab(1)">昨日</view> | |||
<view :class="{ timeactive: activetime == 2 }" @click="activetimetab(2)">近一周</view> | |||
<view :class="{ timeactive: activetime == 3 }" @click="activetimetab(3)">本月</view> | |||
</view> | |||
<view class="tiempickzidingyi" @click="activetimetab(5)"> | |||
<text v-if="Datesicing.length==0">自定义时间:请选择</text> | |||
<text v-else>{{Datesicing}}</text> | |||
</view> | |||
</view> | |||
<!-- 2 --> | |||
<view v-if="screeningshow2==true" class="call_zhezhao" @click="allcancel()"></view> | |||
<view v-if="screeningshow2==true" class="userinput"> | |||
<view class="inputdlex"> | |||
<view class="flexzuo"> | |||
<input class="flexinput" @confirm="searchinfo()" v-model="name" type="text" placeholder="请输入客户名" /> | |||
</view> | |||
<view class="flexyou" @click="searchinfo()">搜索</view> | |||
</view> | |||
</view> | |||
<!-- 3 --> | |||
<view v-if="screeningshow3==true" class="call_zhezhao" @click="allcancel()"></view> | |||
<view v-if="screeningshow3==true" class="userinput"> | |||
<view class="inputdlex"> | |||
<view class="flexzuo"> | |||
<input class="flexinput" @confirm="searchinfo()" v-model="agentName" type="text" placeholder="请输入顾问名" /> | |||
</view> | |||
<view class="flexyou" @click="searchinfo()">搜索</view> | |||
</view> | |||
</view> | |||
<!-- 4 --> | |||
<view v-if="screeningshow4==true" class="call_zhezhao" @click="allcancel()"></view> | |||
<view v-if="screeningshow4==true" class="yuyipick"> | |||
<view class="inputdlex"> | |||
<!-- <view :class="{ timeactive111: keywordsId == item.keywordsId }" @click="semantictap(index)" | |||
v-for="(item,index) in semanticlist" :key="index">{{item.name}}</view> --> | |||
<view :class="{ timeactive111: item.checked }" @click="itemChcek(index)" | |||
v-for="(item,index) in semanticlist" :key="index">{{item.name}}</view> | |||
</view> | |||
<view class="screen-foot"> | |||
<view class="screen-foot-reset" @click="reset"> | |||
重置 | |||
</view> | |||
<view class="screen-foot-sure" @click="screensure"> | |||
确定 | |||
</view> | |||
</view> | |||
</view> | |||
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var util = require("../../../../utils/util.js"); | |||
var config = require("../../../../config"); | |||
export default { | |||
data() { | |||
return { | |||
screeningshow1:false, | |||
screeningshow2:false, | |||
screeningshow3:false, | |||
screeningshow4:false, | |||
activetime:2, | |||
totalTimeShow:false, | |||
Datesicing:'', | |||
Inthemiddletime:'', | |||
starttime:'',//开始时间 | |||
endoftime:'',//结束时间 | |||
keywordsId:'',//选中语义词id | |||
houseId:'',//楼盘id | |||
semanticlist:[],//语义词集合 | |||
name:'', | |||
agentName:'', | |||
pageNum:1, | |||
pageSize:10, | |||
tadelist:[], | |||
totalpage:0, | |||
keywordIds:'' | |||
}; | |||
}, | |||
onLoad(options) { | |||
console.log(options) | |||
if(options.datatype==3){ | |||
this.activetime=5; | |||
this.starttime=options.starttime; | |||
this.endoftime=options.endoftime; | |||
this.Datesicing=this.starttime+'至'+this.endoftime; | |||
}else{ | |||
this.activetime=options.datatype; | |||
this.starttime=''; | |||
this.endoftime=''; | |||
this.Datesicing=''; | |||
} | |||
// this.keywordsId=options.keywordsId | |||
this.keywordIds=options.keywordsId | |||
this.houseId=uni.getStorageSync('buildingID').id; | |||
this.Accesstolevel() | |||
}, | |||
onReachBottom() { | |||
console.log("4444444444444444444") | |||
if (this.totalpage < this.pageNum * this.pageSize) { | |||
return uni.showToast({ | |||
title: "到底了", | |||
}) | |||
} | |||
this.pageNum++; | |||
this.getinit(); | |||
}, | |||
methods: { | |||
toinfo(item){ | |||
uni.navigateTo({ | |||
url: `/pages/center/Piabodata/Customerportrait/Receivedetailabout?customerId=${item.id}` | |||
}) | |||
}, | |||
//搜索 | |||
searchinfo(){ | |||
this.totalpage=0; | |||
this.tadelist=[]; | |||
this.pageNum=1; | |||
this.getinit() | |||
}, | |||
itemChcek(index){ | |||
this.semanticlist[index].checked=!this.semanticlist[index].checked | |||
this.$forceUpdate() | |||
}, | |||
reset(){ | |||
this.semanticlist.map(item=>{ | |||
item.checked=false | |||
}) | |||
this.keywordIds='' | |||
this.$forceUpdate() | |||
this.allcancel() | |||
this.totalpage=0; | |||
this.tadelist=[]; | |||
this.pageNum=1; | |||
this.getinit() | |||
}, | |||
screensure(){ | |||
let arr=[] | |||
this.semanticlist.map(item=>{ | |||
if(item.checked){ | |||
arr.push(item.keywordsId) | |||
} | |||
}) | |||
this.keywordIds=arr.join(',') | |||
// console.log(this.keywordIds) | |||
this.allcancel() | |||
this.totalpage=0; | |||
this.tadelist=[]; | |||
this.pageNum=1; | |||
this.getinit() | |||
}, | |||
//点击三级 | |||
semantictap(index){ | |||
this.keywordsId=this.semanticlist[index].keywordsId; | |||
this.allcancel() | |||
this.totalpage=0; | |||
this.tadelist=[]; | |||
this.pageNum=1; | |||
this.getinit() | |||
}, | |||
//获取列表数据 | |||
getinit(){ | |||
uni.showToast({ | |||
title: '加载中', | |||
icon:'loading', | |||
duration: 1500 | |||
}); | |||
let datatype=''; | |||
if(this.activetime==5){ | |||
var parames={ | |||
pageNum:this.pageNum, | |||
pageSize:this.pageSize, | |||
query:{ | |||
staTime:this.starttime, | |||
endTime:this.endoftime, | |||
time:1, | |||
name:this.name, | |||
agentName:this.agentName, | |||
type:0, | |||
keywordIds:this.keywordIds, | |||
// keywordsId:this.keywordsId, | |||
projectId:this.houseId, | |||
} | |||
} | |||
}else{ | |||
datatype=this.activetime; | |||
var parames={ | |||
pageNum:this.pageNum, | |||
pageSize:this.pageSize, | |||
query:{ | |||
dateType:Number(datatype), | |||
staTime:this.starttime, | |||
endTime:this.endoftime, | |||
time:1, | |||
name:this.name, | |||
agentName:this.agentName, | |||
type:0, | |||
keywordIds:this.keywordIds, | |||
// keywordsId:this.keywordsId, | |||
projectId:this.houseId, | |||
} | |||
} | |||
} | |||
this.$u.post("/matchKeywords/receptionRecord", parames).then(data => { | |||
if(data.results==null){ | |||
console.log("没有") | |||
return | |||
}else{ | |||
this.tadelist=[...this.tadelist, ...data.results]; | |||
this.totalpage=data.totalRecord; | |||
} | |||
}) | |||
}, | |||
//获取三级 | |||
Accesstolevel(){ | |||
let datatype=''; | |||
if(this.activetime==5){ | |||
var parames={ | |||
type:0, | |||
statDateStart:this.starttime, | |||
statDateEnd:this.endoftime, | |||
houseId:this.houseId | |||
} | |||
}else{ | |||
datatype=this.activetime; | |||
var parames={ | |||
type:0, | |||
dateType:Number(datatype), | |||
statDateStart:this.starttime, | |||
statDateEnd:this.endoftime, | |||
houseId:this.houseId | |||
} | |||
} | |||
this.$u.post("/matchKeywords/findKeywords", parames).then(data => { | |||
data.forEach(item=>{ | |||
if(item.isInterval==0){ | |||
item.name=item.name+item.unit+'-'+item.endName+item.unit | |||
} | |||
if(item.keywordsId==this.keywordIds){ | |||
item.checked=true | |||
}else{ | |||
item.checked=false | |||
} | |||
}) | |||
this.semanticlist=data; | |||
this.getinit(); | |||
}) | |||
}, | |||
//遮罩取消 | |||
allcancel(){ | |||
this.screeningshow1=false; | |||
this.screeningshow2=false; | |||
this.screeningshow3=false; | |||
this.screeningshow4=false; | |||
}, | |||
//自定义时间确认 | |||
totalTimeChange(e){ | |||
this.Datesicing=e.startDate+'至'+e.endDate; | |||
this.starttime=e.startDate; | |||
this.endoftime=e.endDate; | |||
this.activetime=this.Inthemiddletime; | |||
this.totalTimeShow=false; | |||
this.tadelist=[] | |||
this.allcancel() | |||
this.Accesstolevel() | |||
}, | |||
//时间选择 | |||
activetimetab(index){ | |||
if(index==5){ | |||
this.Inthemiddletime=index; | |||
this.totalTimeShow=!this.totalTimeShow; | |||
}else{ | |||
this.Datesicing=''; | |||
this.activetime=index; | |||
this.tadelist=[] | |||
this.allcancel() | |||
this.Accesstolevel() | |||
} | |||
}, | |||
//筛选弹框 | |||
clickscreening(i){ | |||
if(i==1){ | |||
this.screeningshow1=!this.screeningshow1; | |||
this.screeningshow2=false; | |||
this.screeningshow3=false; | |||
this.screeningshow4=false; | |||
}else if(i==2){ | |||
this.screeningshow2=!this.screeningshow2; | |||
this.screeningshow1=false; | |||
this.screeningshow3=false; | |||
this.screeningshow4=false; | |||
}else if(i==3){ | |||
this.screeningshow3=!this.screeningshow3; | |||
this.screeningshow2=false; | |||
this.screeningshow1=false; | |||
this.screeningshow4=false; | |||
}else{ | |||
this.screeningshow4=!this.screeningshow4; | |||
this.screeningshow2=false; | |||
this.screeningshow3=false; | |||
this.screeningshow1=false; | |||
} | |||
} | |||
} | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.timeactive111{ | |||
color: #2671E2; | |||
} | |||
*{ | |||
margin:0; | |||
padding:0; | |||
box-sizing:border-box; | |||
} | |||
.cenbox{ | |||
width: 100%; | |||
height: 100%; | |||
background-color: #F8F8F8; | |||
display:flex; | |||
flex-direction:column; | |||
.screeningtop{ | |||
width: 100%; | |||
height: 75rpx; | |||
background-color: #FFFFFF; | |||
border-bottom: 1px solid #E0E0E0; | |||
align-items: center; | |||
display: flex; | |||
align-items: center; | |||
position: relative; | |||
} | |||
.screeningview{ | |||
flex: 1; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
border-right: 1px solid #E0E0E0; | |||
} | |||
.zhuti{ | |||
flex:1; | |||
// soverflow:auto; | |||
} | |||
} | |||
.viewimg{ | |||
width: 20rpx; | |||
height: 100%; | |||
line-height: 72rpx; | |||
margin-left: 10rpx; | |||
image{ | |||
width: 20rpx; | |||
height: 12rpx; | |||
} | |||
} | |||
.cenforview{ | |||
width: 100%; | |||
height: 275rpx; | |||
background: #FFFFFF; | |||
margin-top: 20rpx; | |||
.cenfortop{ | |||
width: 100%; | |||
height: 146rpx; | |||
display: flex; | |||
// border-bottom: 1px solid #E0E0E0; | |||
.fortopzuo{ | |||
width: 16%; | |||
padding-top: 30rpx; | |||
.topzuoimg{ | |||
width: 60rpx; | |||
height: 60rpx; | |||
margin-left: 30rpx; | |||
border-radius: 50%; | |||
image{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
} | |||
} | |||
.fortopyou{ | |||
width: 84%; | |||
height: 146rpx; | |||
.topyouview1{ | |||
width: 100%; | |||
margin-top: 28rpx; | |||
display: flex; | |||
.youview1-1{ | |||
width: 25%; | |||
font-size: 28rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
overflow: hidden; | |||
white-space:nowrap; | |||
text-overflow:ellipsis; | |||
} | |||
.youview1-2{ | |||
width: 75%; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
} | |||
} | |||
.topyouview2{ | |||
width: 100%; | |||
font-size: 28rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
margin-top: 20rpx; | |||
} | |||
} | |||
} | |||
.cenforbottom{ | |||
width: 100%; | |||
height: 128rpx; | |||
display: flex; | |||
align-items: center; | |||
.forbottomview{ | |||
flex: 1; | |||
height: 128rpx; | |||
// border-right: 1px solid #E0E0E0; | |||
.bottomview1{ | |||
width: 100%; | |||
height: 26rpx; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 26rpx; | |||
text-align: center; | |||
margin-top: 24rpx; | |||
} | |||
.bottomview2{ | |||
width: 100%; | |||
height: 30rpx; | |||
font-size: 30rpx; | |||
font-weight: 600; | |||
color: #333333; | |||
line-height: 30rpx; | |||
text-align: center; | |||
margin-top: 24rpx; | |||
} | |||
} | |||
} | |||
} | |||
.timepick{ | |||
width: 100%; | |||
height: 210rpx; | |||
background: #FFFFFF; | |||
position: absolute; | |||
top: 74rpx; | |||
left: 0; | |||
z-index: 20; | |||
.tiempickbox{ | |||
width: 94%; | |||
margin: 0 auto; | |||
height: 56rpx; | |||
display: flex; | |||
align-items: center; | |||
margin-top: 25rpx; | |||
} | |||
.tiempickbox>view:nth-of-type(1){ | |||
width: 156rpx; | |||
height: 56rpx; | |||
border-radius: 4rpx; | |||
text-align: center; | |||
line-height: 56rpx; | |||
font-size: 28rpx; | |||
border: 1px solid #C9C9C9; | |||
} | |||
.tiempickbox>view:nth-of-type(2){ | |||
width: 156rpx; | |||
height: 56rpx; | |||
border-radius: 4rpx; | |||
text-align: center; | |||
line-height: 56rpx; | |||
font-size: 28rpx; | |||
border: 1px solid #C9C9C9; | |||
margin-left: 28rpx; | |||
} | |||
.tiempickbox>view:nth-of-type(3){ | |||
width: 156rpx; | |||
height: 56rpx; | |||
border-radius: 4rpx; | |||
text-align: center; | |||
line-height: 56rpx; | |||
font-size: 28rpx; | |||
border: 1px solid #C9C9C9; | |||
margin-left: 28rpx; | |||
} | |||
.tiempickbox>view:nth-of-type(4){ | |||
width: 156rpx; | |||
height: 56rpx; | |||
border-radius: 4rpx; | |||
text-align: center; | |||
line-height: 56rpx; | |||
font-size: 28rpx; | |||
border: 1px solid #C9C9C9; | |||
margin-left: 28rpx; | |||
} | |||
.tiempickzidingyi{ | |||
width: 94%; | |||
margin: 0 auto; | |||
margin-top: 28rpx; | |||
height: 60rpx; | |||
background: #FFFFFF; | |||
border-radius: 4rpx; | |||
border: 1px solid #C9C9C9; | |||
text-align: center; | |||
line-height: 60rpx; | |||
color: #666666; | |||
} | |||
} | |||
.call_zhezhao { | |||
position: fixed; | |||
width: 100%; | |||
height: 100%; | |||
top: 75rpx; | |||
left: 0rpx; | |||
opacity: 0.5; | |||
background-color: #666666; | |||
z-index: 10; | |||
} | |||
.timeactive{ | |||
color: #FFFFFF; | |||
background-color: #2671E2; | |||
} | |||
.userinput{ | |||
width: 100%; | |||
height: 126rpx; | |||
background: #FFFFFF; | |||
position: absolute; | |||
top: 74rpx; | |||
left: 0; | |||
z-index: 20; | |||
.inputdlex{ | |||
width: 90%; | |||
margin: 0 auto; | |||
height: 56rpx; | |||
display: flex; | |||
align-items: center; | |||
margin-top: 30rpx; | |||
.flexzuo{ | |||
width: 80%; | |||
.flexinput{ | |||
width: 96%; | |||
height: 100%; | |||
border-radius: 20rpx; | |||
border: 1px solid #C9C9C9; | |||
padding-left: 20rpx; | |||
font-size: 24rpx; | |||
} | |||
} | |||
.flexyou{ | |||
width: 20%; | |||
font-size: 28rpx; | |||
color: #2671E2; | |||
text-indent: 28rpx; | |||
} | |||
} | |||
} | |||
.yuyipick{ | |||
width: 100%; | |||
min-height: 300rpx; | |||
max-height: 500rpx; | |||
background: #FFFFFF; | |||
overflow-y: auto; | |||
// padding-bottom: 20rpx; | |||
position: absolute; | |||
top: 74rpx; | |||
left: 0; | |||
z-index: 20; | |||
.inputdlex{ | |||
width: 90%; | |||
margin: 0 auto; | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin-top: 30rpx; | |||
} | |||
.inputdlex view{ | |||
width: 50%; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
text-align: center; | |||
margin-top: 26rpx; | |||
} | |||
} | |||
.screen-foot{ | |||
width: 100%; | |||
height: 88rpx; | |||
display: flex; | |||
margin-top: 20rpx; | |||
border-top: 1px solid #E0E0E0; | |||
.screen-foot-reset{ | |||
width: 50%; | |||
text-align: center; | |||
height: 88rpx; | |||
line-height: 88rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
} | |||
.screen-foot-sure{ | |||
width: 50%; | |||
text-align: center; | |||
line-height: 88rpx; | |||
height: 88rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
background: #2671E2; | |||
} | |||
} | |||
</style> |
@@ -1,469 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<view class="boxtittab"> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 4 }" @click="tabtimetap(4)">近七天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 5 }" @click="tabtimetap(5)">近15天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 6 }" @click="tabtimetap(6)">近30天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1">接待量(TOP10)</view> | |||
</view> | |||
<view class="hejibox"> | |||
<view class="heji">楼盘:{{newTeam1||0}}</view> | |||
<view class="heji">均值:{{newAvg1||0}}</view> | |||
</view> | |||
<view class="jindu"> | |||
<scroll-view style="height: 300rpx;" scroll-y="true" > | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo1" :key="index"> | |||
<view class="jindu-boxche"> | |||
<view class="jindu-name">{{item.name.substring(0, 4)}}</view> | |||
<view style="width: 440rpx;margin-left: 10rpx;"> | |||
<u-line-progress height="24" :show-percent="false" active-color="#FBA448" :percent="item.zxl1"></u-line-progress> | |||
</view> | |||
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1">接待时长(TOP10)</view> | |||
</view> | |||
<view class="hejibox"> | |||
<view class="heji">楼盘:{{newTeam2||0}}</view> | |||
<view class="heji">均值:{{newAvg2||0}}</view> | |||
</view> | |||
<view class="jindu"> | |||
<scroll-view style="height: 300rpx;" scroll-y="true" > | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo2" :key="index"> | |||
<view class="jindu-boxche"> | |||
<view class="jindu-name">{{item.name.substring(0, 4)}}</view> | |||
<view style="width: 440rpx;margin-left: 10rpx;"> | |||
<u-line-progress height="24" :show-percent="false" active-color="#4FC78F" :percent="item.zxl1"></u-line-progress> | |||
</view> | |||
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}</view> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1" style="flex: 1;">销讲执行排名(TOP10)</view> | |||
<!-- <view class="title3" style="flex: 1;"> | |||
<view class="title3-box"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">执行率</view> | |||
</view> | |||
<view class="title3-box"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 1 }">得分</view> | |||
</view> | |||
</view> --> | |||
</view> | |||
<view class="hejibox"> | |||
<view class="heji">楼盘:{{newTeam3||0}}</view> | |||
<view class="heji">均值:{{newAvg3||0}}%</view> | |||
</view> | |||
<view class="jindu"> | |||
<scroll-view style="height: 300rpx;" scroll-y="true" > | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo3" :key="index"> | |||
<view class="jindu-boxche"> | |||
<view class="jindu-name">{{item.name.substring(0, 4)}}</view> | |||
<view style="width: 440rpx;margin-left: 10rpx;"> | |||
<u-line-progress height="24" :show-percent="false" active-color="#9B6BDF" :percent="item.zxl1"></u-line-progress> | |||
</view> | |||
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1" style="flex: 1;">顾问执行排名(TOP10)</view> | |||
<!-- <view class="title3" style="flex: 1;"> | |||
<view class="title3-box"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">执行率</view> | |||
</view> | |||
<view class="title3-box"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 1 }">得分</view> | |||
</view> | |||
</view> --> | |||
</view> | |||
<!-- <view class="hejibox"> | |||
<view class="heji">楼盘:{{newTeam4||0}}</view> | |||
<view class="heji">均值:{{newAvg4||0}}</view> | |||
</view> --> | |||
<view class="jindu"> | |||
<scroll-view style="height: 300rpx;" scroll-y="true" > | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo4" :key="index"> | |||
<view class="jindu-boxche"> | |||
<view class="jindu-name">{{item.name.substring(0, 4)}}</view> | |||
<view style="width: 440rpx;margin-left: 10rpx;"> | |||
<u-line-progress height="24" :show-percent="false" active-color="#9B6BDF" :percent="item.zxl1"></u-line-progress> | |||
</view> | |||
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title" style="padding-right: 30rpx;"> | |||
<view class="title1" style="flex: 1;">销讲能力</view> | |||
<!-- <view class="title2" style="flex: 1;justify-content: flex-end;" @click="Groupcontrast"> | |||
<view class="title2-che">楼盘 | |||
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image> | |||
</view> | |||
</view> --> | |||
<view class="title2" style="flex: 1;justify-content: flex-end;" @click="staffShow=true"> | |||
<view class="title2-che" style="width: auto;"><text style="margin-right: 40rpx;">{{staff.label}}</text> | |||
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- <view class="hejibox"> | |||
<view class="heji">楼盘:50</view> | |||
<view class="heji">均值:25</view> | |||
</view> --> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="radar" | |||
:chartData="chartData" | |||
:canvas2d="true" | |||
canvasId="wangxiaohuaerlingeryilingwuyib88" | |||
background="none" | |||
/> | |||
</view> | |||
</view> | |||
<!-- <view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1">禁忌执行率(TOP10)</view> | |||
</view> | |||
<view class="hejibox"> | |||
<view class="heji">合计:50</view> | |||
<view class="heji">均值:25</view> | |||
</view> | |||
<view class="jindu"> | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index"> | |||
<view class="jindu-boxche"> | |||
<view class="jindu-name">{{item.name.substring(0, 4)}}</view> | |||
<view style="width: 440rpx;margin-left: 10rpx;"> | |||
<u-line-progress height="24" :show-percent="false" active-color="#E6625B" :percent="item.zxl"></u-line-progress> | |||
</view> | |||
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> --> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<!-- <view class="single"> | |||
<view class="title" style="padding-right: 30rpx;"> | |||
<view class="title1" style="flex: 1;">违禁能力(TOP10)</view> | |||
<view class="title2" style="flex: 1;justify-content: flex-end;"> | |||
<view class="title2-che">楼盘 | |||
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="hejibox"> | |||
<view class="heji">合计:50</view> | |||
<view class="heji">均值:25</view> | |||
</view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="radar" | |||
:chartData="chartData" | |||
:canvas2d="true" | |||
canvasId="wangxiaohuaerlingeryilingwuyib89" | |||
background="none" | |||
/> | |||
</view> | |||
</view> --> | |||
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> | |||
<!-- 选择楼盘 --> | |||
<u-select v-model="staffShow" :list="staffList" @confirm="staffSelectCallback" :default-value='selindex'></u-select> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var util = require("../../../utils/util.js"); | |||
var config = require("../../../config"); | |||
export default { | |||
data() { | |||
return { | |||
activeTotal: 4, | |||
activeTotal2: 0, | |||
bocindex:0, | |||
totalTimeShow: false, | |||
// 楼盘id | |||
houseId:'', | |||
staffShow:false, | |||
staffList:[], | |||
lastStartDate:'', | |||
lastEndDate :'', | |||
newTeam1:'', | |||
newAvg1:'', | |||
newTeam2:'', | |||
newAvg2:'', | |||
newTeam3:'', | |||
newAvg3:'', | |||
newTeam4:'', | |||
newAvg4:'', | |||
staff:{ | |||
value:'', | |||
label:'' | |||
}, | |||
newlisttabinfo1:[ | |||
{name:'接待量',zxl:'10'}, | |||
{name:'平均执行率',zxl:'50'}, | |||
{name:'接待客户',zxl:'80'}, | |||
], | |||
newlisttabinfo2:[ | |||
{name:'接待量',zxl:'10'}, | |||
{name:'平均执行率',zxl:'50'}, | |||
{name:'接待客户',zxl:'80'}, | |||
], | |||
newlisttabinfo3:[ | |||
{name:'接待量',zxl:'10'}, | |||
{name:'平均执行率',zxl:'50'}, | |||
{name:'接待客户',zxl:'80'}, | |||
], | |||
newlisttabinfo4:[ | |||
{name:'接待量',zxl:'10'}, | |||
{name:'平均执行率',zxl:'50'}, | |||
{name:'接待客户',zxl:'80'}, | |||
], | |||
chartData:{ | |||
"categories": ["维度1","维度2","维度3","维度4","维度5","维度6"], | |||
"series": [ | |||
{ | |||
"name": "成交量", | |||
"data": [90,110,165,195,187,172] | |||
} | |||
] | |||
} | |||
}; | |||
}, | |||
onLoad() { | |||
let that=this | |||
uni.$on('updateGroup',function(data){ | |||
console.log(data) | |||
that.houseId=data.arr.join(',') | |||
// 获取销奖能力 | |||
that.getPowerList() | |||
}) | |||
this.getSectionList() | |||
}, | |||
methods: { | |||
// 获取部门列表 | |||
getSectionList(){ | |||
this.$u.post('/user/getHouseByToken',) | |||
.then(res=>{ | |||
// console.log(res) | |||
this.staffList=[] | |||
res.map((item,index)=>{ | |||
let obj={} | |||
obj.value=item.id | |||
obj.label=item.propertyName | |||
this.staffList.push(obj) | |||
}) | |||
this.houseId=this.staffList[0].value | |||
this.staff=this.staffList[0] | |||
this.getdata() | |||
// console.log(this.staffList,this.staffList,this.houseId) | |||
}) | |||
}, | |||
//指标执行率分析tab | |||
tapspagek2(index) { | |||
this.bocindex = index; | |||
}, | |||
staffSelectCallback(e){ | |||
this.staff=e[0] | |||
this.houseId=e[0].value | |||
this.getPowerList() | |||
}, | |||
getdata(){ | |||
// 请求接口获取接待量 | |||
this.receptionCountList('1','/cusLvStatistics/groupComparisonReception') | |||
// 接待时长 | |||
this.receptionCountList('2','/cusLvStatistics/groupComparisonReceptionTime') | |||
// 小将排名 | |||
this.receptionCountList('3','/cusLvStatistics/groupComparisonTalkRank') | |||
// 顾问牌名 | |||
this.receptionCountList('4','/cusLvStatistics/groupComparisonTalkRankByConsultant') | |||
// 销奖能力 | |||
this.getPowerList() | |||
}, | |||
//时间切换 | |||
tabtimetap(index) { | |||
if (index == 3) { | |||
this.totalTimeShow = true; | |||
} else { | |||
this.activeTotal = index; | |||
this.lastEndDate='' | |||
this.lastStartDate='' | |||
this.getdata() | |||
// // 获取数据 | |||
// // 团队对比接待量 | |||
// this.receptionCountList(0,1,'/cusLvStatistics/teamAnalysisReception') | |||
// // 团队对比接待时长 | |||
// this.receptionCountList(0,2,'/cusLvStatistics/teamAnalysisReceptionTime') | |||
// /* 销奖执行率 */ | |||
// this.receptionCountList(0,3,'/cusLvStatistics/teamAnalysisExecutionRate') | |||
// // 获取销奖能力 | |||
// this.getPowerList() | |||
} | |||
}, | |||
// 接待时长 | |||
receptionCountList(index,url){ | |||
this.$u.post(url,{ | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
// console.log(res) | |||
let result=res.result | |||
this['newTeam'+index]=res.avg[0] | |||
this['newAvg'+index]=res.avg[1] | |||
// return | |||
// 处理数据 | |||
// 先处理牌名数据,需要进行判断全部还是单个 | |||
// 当为全部时 | |||
this['newlisttabinfo'+index]=[] | |||
// 当选择全部时 | |||
let arr=[] | |||
// 当两个都选择的时候 | |||
result.map(item=>{ | |||
let obj={} | |||
obj.name=item.houseName | |||
obj.zxl=item.data | |||
arr.push(obj) | |||
}) | |||
arr=this.dealData(arr) | |||
this['newlisttabinfo'+index]=arr | |||
}) | |||
}, | |||
// 获取销奖能力 | |||
getPowerList(){ | |||
this.$u.post('/cusLvStatistics/groupComparisonMarketingAbility',{ | |||
houseIds:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
// console.log(res,123) | |||
// 处理数据 | |||
// return | |||
this.chartData={ | |||
categories:[], | |||
series:[] | |||
} | |||
let allobj={ | |||
categories:[], | |||
series:[] | |||
} | |||
res.result.map((item,index)=>{ | |||
let obj={ | |||
name:item[0].houseName, | |||
data:[] | |||
} | |||
item.map(item1=>{ | |||
if(index==0){ | |||
allobj.categories.push(item1.name) | |||
} | |||
obj.data.push(item1.avgExecutionRate) | |||
}) | |||
allobj.series.push(obj) | |||
}) | |||
// console.log(allobj) | |||
this.chartData=allobj | |||
this.$forceUpdate() | |||
}) | |||
}, | |||
//自定义时间 | |||
totalTimeChange(e) { | |||
console.log(e.startDate, e.endDate) | |||
this.activeTotal=3; | |||
this.lastEndDate=e.endDate | |||
this.lastStartDate=e.startDate | |||
this.getdata() | |||
}, | |||
//集团对比 | |||
Groupcontrast(){ | |||
uni.navigateTo({ | |||
url: `/pages/center/Piabodata/selectGroup?ids=${this.houseId}` | |||
}); | |||
}, | |||
// 定义一个公共方法对数据进行处理 | |||
dealData(arr){ | |||
// 获取最大值 | |||
let num=Math.max.apply(Math, arr.map(function (o) { return o.zxl })) //结果:3 | |||
// console.log(num) | |||
if(num>100){ | |||
// 获取最大值的下标 | |||
// let idx=arr.findIndex(item=>item.zxl==num) | |||
// console.log(idx,123) | |||
arr.map(item=>{ | |||
item.zxl1=Math.floor(item.zxl/num*100) | |||
}) | |||
// console.log(arr) | |||
return arr | |||
}else{ | |||
arr.map(item=>{ | |||
item.zxl1=item.zxl | |||
}) | |||
return arr | |||
} | |||
}, | |||
} | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.box { | |||
width: 100%; | |||
height: 100%; | |||
background: #FAFAFA; | |||
padding-bottom: 60rpx; | |||
} | |||
</style> |
@@ -1,608 +0,0 @@ | |||
<template> | |||
<view> | |||
<view class="boxtittab"> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 4 }" @click="tabtimetap(4)">近七天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 5 }" @click="tabtimetap(5)">近15天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 6 }" @click="tabtimetap(6)">近30天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view> | |||
</view> | |||
</view> | |||
<view class="timepick"> | |||
<view class="timepicktime" @click="chiocStaff(0)"> | |||
<view>{{staff1.label}}</view> | |||
<view> | |||
<image class="Underimg" src="../../../static/images/Underimg.png" mode=""></image> | |||
</view> | |||
</view> | |||
<view class="timepickpick"> | |||
<view @click="checkboxChange()" style="width: 40rpx;height:40rpx;border: 1rpx solid #E0E0E0;"> | |||
<image v-if="timepickpickisshow" style="width: 40rpx;height: 40rpx;" src="../../../static/images/xuanzhong.png" mode=""></image> | |||
</view> | |||
<view style="font-size:26rpx;text-indent: 12rpx;">对比</view> | |||
</view> | |||
<view class="timepicktime" v-if="timepickpickisshow" @click="chiocStaff(1)"> | |||
<view>{{staff2.label}}</view> | |||
<view> | |||
<image class="Underimg" src="../../../static/images/Underimg.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1" style="flex: 1;">接待量</view> | |||
</view> | |||
<view class="hejibox"> | |||
<view class="heji">{{staff1.label}}:{{newTeam1||0}}</view> | |||
<view class="heji" v-if="timepickpickisshow">{{staff2.label}}:{{newAvg1||0}}</view> | |||
</view> | |||
<view class="danwei">来访(人)</view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="line" | |||
:chartData="lineOptsect" | |||
background="none" | |||
:ontouch="true" | |||
canvasId="wangxiaohuaerlingeryilingwuyibbb" | |||
:canvas2d="true" | |||
/> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1" style="flex: 1;">录音时长</view> | |||
<view class="title3" style="flex: 1;"> | |||
<!-- <view class="title3-box" style="width: 40%;" @click="tabtimetap1(0)"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">有效录音</view> | |||
</view> | |||
<view class="title3-box" style="width: 40%;"@click="tabtimetap1(1)"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 1 }">录音时长</view> | |||
</view> --> | |||
</view> | |||
</view> | |||
<view class="hejibox"> | |||
<view class="heji">{{staff1.label}}:{{newTeam2||0}}</view> | |||
<view class="heji" v-if="timepickpickisshow">{{staff2.label}}:{{newAvg2||0}}</view> | |||
</view> | |||
<view class="danwei">录音时长</view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="line" | |||
:chartData="lineOptsect1" | |||
background="none" | |||
:ontouch="true" | |||
canvasId="wangxiaouaerlingeryilingwuyibhh" | |||
:canvas2d="true" | |||
/> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1" style="flex: 1;">销讲执行率</view> | |||
<view class="title3" style="flex: 1;"> | |||
<!-- <view class="title3-box" style="width: 40%;" @click="tabtimetap1(0)"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">有效录音</view> | |||
</view> | |||
<view class="title3-box" style="width: 40%;"@click="tabtimetap1(1)"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 1 }">录音时长</view> | |||
</view> --> | |||
</view> | |||
</view> | |||
<view class="hejibox"> | |||
<view class="heji">{{staff1.label}}:{{newTeam3||0}}</view> | |||
<view class="heji" v-if="timepickpickisshow">{{staff2.label}}:{{newAvg3||0}}</view> | |||
</view> | |||
<!-- <view class="danwei">录音时长</view> --> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="line" | |||
:chartData="lineOptsect2" | |||
background="none" | |||
:ontouch="true" | |||
canvasId="wangxiaohuaerlingryilingwuyibhh" | |||
:canvas2d="true" | |||
/> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title" style="padding-right: 30rpx;"> | |||
<view class="title1" style="flex: 1;">销讲能力</view> | |||
</view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="radar" | |||
:chartData="chartData" | |||
:canvas2d="true" | |||
canvasId="wangxiaohuaerlingeryilinwuycsdx" | |||
background="none" | |||
/> | |||
</view> | |||
</view> | |||
<!-- <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> --> | |||
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> | |||
<!-- 选择客户的选择框 --> | |||
<u-select v-model="staffShow" :list="staffList" @confirm="staffSelectCallback" :default-value='selindex'></u-select> | |||
<u-select v-model="staffShow1" :list="staffList1" @confirm="staffSelectCallback" :default-value='selindex'></u-select> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
timepickpickisshow:true, | |||
totalTimeShow: false, | |||
activeTotal:4, | |||
activeTotal2:1, | |||
// 楼盘id | |||
houseId:'', | |||
staffList:[], | |||
staffList1:[], | |||
staffShow:false, | |||
staffShow1:false, | |||
newTeam1:'', | |||
newAvg1:'', | |||
newTeam2:'', | |||
newAvg2:'', | |||
newTeam3:'', | |||
newAvg3:'', | |||
staff1:{ | |||
value:'', | |||
label:'' | |||
}, | |||
staff2:{ | |||
value:'', | |||
label:'平均' | |||
}, | |||
lastStartDate:'', | |||
lastEndDate :'', | |||
selindex:[0], | |||
choseStaffFlag:false, | |||
lineOptsect:{ | |||
"categories": ["2016","2017","2018","2019","2020","2021"], | |||
"series": [ | |||
{ | |||
"name": "成交量1", | |||
"data": [35,8,25,37,4,20] | |||
}, | |||
{ | |||
"name": "成交量2", | |||
"data": [40,18,45,44,10,60] | |||
} | |||
] | |||
}, | |||
lineOptsect1:{ | |||
"categories": ["2016","2017","2018","2019","2020","2021"], | |||
"series": [ | |||
{ | |||
"name": "成交量1", | |||
"data": [35,8,25,37,4,20] | |||
}, | |||
{ | |||
"name": "成交量2", | |||
"data": [40,18,45,44,10,60] | |||
} | |||
] | |||
}, | |||
lineOptsect2:{ | |||
"categories": ["2016","2017","2018","2019","2020","2021"], | |||
"series": [ | |||
{ | |||
"name": "成交量1", | |||
"data": [35,8,25,37,4,20] | |||
}, | |||
{ | |||
"name": "成交量2", | |||
"data": [40,18,45,44,10,60] | |||
} | |||
] | |||
}, | |||
chartData:{ | |||
"categories": ["维度1","维度2","维度3","维度4","维度5","维度6"], | |||
"series": [ | |||
{ | |||
"name": "成交量", | |||
"data": [90,110,165,195,187,172] | |||
} | |||
] | |||
} | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
// 获取楼盘id | |||
this.houseId = uni.getStorageSync('buildingID').id; | |||
// this.buildingname = uni.getStorageSync('buildingID').name; | |||
// 请求接口获取所有置业顾问员工的列表 | |||
this.getStaffList() | |||
}, | |||
methods: { | |||
//是否对比 | |||
checkboxChange(){ | |||
this.timepickpickisshow=!this.timepickpickisshow; | |||
this.staff2.value='' | |||
this.staff2.label='平均' | |||
// this.getreception() | |||
// this.getRecordList() | |||
// this.getAwardList() | |||
// this.getAward() | |||
this.getdata() | |||
}, | |||
// 点击员工对比 | |||
chiocStaff(idx){ | |||
if(idx==0){ | |||
// 当选择了第一个的时候 | |||
this.choseStaffFlag=false | |||
this.staffShow=true | |||
}else{ | |||
this.choseStaffFlag=true | |||
this.staffShow1=true | |||
} | |||
}, | |||
// 获取员工列表 | |||
getStaffList(){ | |||
this.$u.post('/cusLvStatistics/selectAllAccountIdByHouseId',{houseId:this.houseId}) | |||
.then(res=>{ | |||
// console.log(res,'123') | |||
this.staffList=[] | |||
this.staffList1=[] | |||
res.map(item=>{ | |||
let obj={} | |||
obj.value=item.accountId | |||
obj.label=item.name | |||
this.staffList.push(obj) | |||
}) | |||
this.staffList1=[...this.staffList] | |||
this.staffList1.unshift({ | |||
value:'', | |||
label:'平均' | |||
}) | |||
this.staff1=this.staffList[0] | |||
// this.getreception() | |||
// this.getRecordList() | |||
// this.getAwardList() | |||
// this.getAward() | |||
this.getdata() | |||
}) | |||
}, | |||
getdata(){ | |||
this.getreception() | |||
this.getRecordList() | |||
this.getAward() | |||
this.getAwardList() | |||
}, | |||
// 获取接待量数据 | |||
getreception(){ | |||
this.$u.post('/cusLvStatistics/employeeAnalysisReception',{ | |||
userA:this.staff1.value, | |||
userB:this.staff2.value, | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
this.newTeam1=res.avg[0] | |||
this.newAvg1=res.avg[1] | |||
// console.log(res) | |||
let first=res.first | |||
let second=res.second | |||
this.lineOptsect.categories=[] | |||
if(!this.timepickpickisshow){ | |||
this.lineOptsect.series=[ | |||
{ | |||
name:first[0].accountName, | |||
data:[] | |||
} | |||
] | |||
first.map(item=>{ | |||
this.lineOptsect.categories.push(item.statDate.slice(5,10)) | |||
this.lineOptsect.series[0].data.push(item.receptionCount||0) | |||
}) | |||
}else{ | |||
this.lineOptsect.series=[ | |||
{ | |||
name:first[0].accountName, | |||
data:[] | |||
}, | |||
{ | |||
"name": second[0].accountName, | |||
"data": [] | |||
} | |||
] | |||
first.map(item=>{ | |||
this.lineOptsect.categories.push(item.statDate.slice(5,10)) | |||
this.lineOptsect.series[0].data.push(item.receptionCount) | |||
}) | |||
second.map(item=>{ | |||
this.lineOptsect.series[1].data.push(item.receptionCount) | |||
}) | |||
} | |||
// console.log(this.lineOptsect,'1') | |||
}) | |||
}, | |||
// 销奖趋势 | |||
getAward(){ | |||
this.$u.post('/cusLvStatistics/employeeAnalysisExacutiveRate',{ | |||
userA:this.staff1.value, | |||
userB:this.staff2.value, | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
this.newTeam3=res.avg[0] | |||
this.newAvg3=res.avg[1] | |||
// console.log(res) | |||
let first=res.first | |||
let second=res.second | |||
this.lineOptsect2.categories=[] | |||
if(!this.timepickpickisshow){ | |||
this.lineOptsect2.series=[ | |||
{ | |||
name:first[0].accountName, | |||
data:[] | |||
} | |||
] | |||
first.map(item=>{ | |||
// console.log(item) | |||
this.lineOptsect2.categories.push(item.statDate.slice(5,10)) | |||
this.lineOptsect2.series[0].data.push(item.sumFraction) | |||
}) | |||
}else{ | |||
this.lineOptsect2.series=[ | |||
{ | |||
name:first[0].accountName, | |||
data:[] | |||
}, | |||
{ | |||
"name": second[0].accountName, | |||
"data": [] | |||
} | |||
] | |||
first.map(item=>{ | |||
this.lineOptsect2.categories.push(item.statDate.slice(5,10)) | |||
this.lineOptsect2.series[0].data.push(item.sumFraction) | |||
}) | |||
second.map(item=>{ | |||
this.lineOptsect2.series[1].data.push(item.sumFraction) | |||
}) | |||
} | |||
// console.log(this.lineOptsect2,'3') | |||
}) | |||
}, | |||
// 获取有效录音 | |||
async getRecordList(){ | |||
// 当选择有效录音时 | |||
let res=null | |||
if(this.activeTotal2==0){ | |||
res= await this.$u.post('/cusLvStatistics/employeeAnalysisEffectiveRecording',{ | |||
userA:this.staff1.value, | |||
userB:this.staff2.value, | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
}else{ | |||
res= await this.$u.post('/cusLvStatistics/employeeAnalysisRecordingTime',{ | |||
userA:this.staff1.value, | |||
userB:this.staff2.value, | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
} | |||
// console.log(res) | |||
this.newTeam2=res.avg[0] | |||
this.newAvg2=res.avg[1] | |||
let first=res.first | |||
let second=res.second | |||
this.lineOptsect1.categories=[] | |||
if(!this.timepickpickisshow){ | |||
this.lineOptsect1.series=[ | |||
{ | |||
name:first[0].accountName, | |||
data:[] | |||
} | |||
] | |||
first.map(item=>{ | |||
this.lineOptsect1.categories.push(item.statDate.slice(5,10)) | |||
this.lineOptsect1.series[0].data.push(item.sumDuration) | |||
}) | |||
}else{ | |||
this.lineOptsect1.series=[ | |||
{ | |||
name:first[0].accountName, | |||
data:[] | |||
}, | |||
{ | |||
"name": second[0].accountName, | |||
"data": [] | |||
} | |||
] | |||
first.map(item=>{ | |||
this.lineOptsect1.categories.push(item.statDate.slice(5,10)) | |||
this.lineOptsect1.series[0].data.push(item.sumDuration) | |||
}) | |||
second.map(item=>{ | |||
this.lineOptsect1.series[1].data.push(item.sumDuration) | |||
}) | |||
} | |||
// console.log(this.lineOptsect1,'2') | |||
}, | |||
// 获取销奖能力 | |||
getAwardList(){ | |||
this.$u.post('/cusLvStatistics/employeeAnalysisLevel1Fraction',{ | |||
userA:this.staff1.value, | |||
userB:this.staff2.value, | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
// console.log(res) | |||
let first=res.first | |||
let second=res.second | |||
this.chartData.categories=[] | |||
if(!this.timepickpickisshow){ | |||
this.chartData.series=[ | |||
{ | |||
name:first[0].accountName, | |||
data:[] | |||
} | |||
] | |||
first.map(item=>{ | |||
this.chartData.categories.push(item.name) | |||
this.chartData.series[0].data.push(item.avgExecutionRate) | |||
}) | |||
}else{ | |||
this.chartData.series=[ | |||
{ | |||
name:first[0].accountName, | |||
data:[] | |||
}, | |||
{ | |||
"name": second[0].accountName, | |||
"data": [] | |||
} | |||
] | |||
first.map(item=>{ | |||
this.chartData.categories.push(item.name) | |||
this.chartData.series[0].data.push(item.avgExecutionRate) | |||
}) | |||
second.map(item=>{ | |||
this.chartData.series[1].data.push(item.avgExecutionRate) | |||
}) | |||
} | |||
}) | |||
}, | |||
tabtimetap(index){ | |||
if (index == 3) { | |||
this.totalTimeShow = true; | |||
} else { | |||
this.activeTotal = index; | |||
this.lastEndDate='' | |||
this.lastStartDate='' | |||
// 获取数据 | |||
// this.getreception() | |||
// this.getRecordList() | |||
// this.getAwardList() | |||
this.getdata() | |||
} | |||
}, | |||
tabtimetap1(index){ | |||
this.activeTotal2 = index; | |||
// 调用方法 | |||
this.getRecordList() | |||
}, | |||
//自定义时间 | |||
totalTimeChange(e) { | |||
console.log(e.startDate, e.endDate) | |||
this.activeTotal=3; | |||
this.lastEndDate=e.endDate | |||
this.lastStartDate=e.startDate | |||
// 获取数据 | |||
// this.getreception() | |||
// this.getRecordList() | |||
// this.getAwardList() | |||
this.getdata() | |||
}, | |||
staffSelectCallback(e){ | |||
if(this.choseStaffFlag){ | |||
// 第二个客户 | |||
// console.log(e,'第二个') | |||
this.staff2=e[0] | |||
}else{ | |||
// 第一个客户 | |||
// console.log(e,'第一个') | |||
this.staff1=e[0] | |||
} | |||
if(this.staff1.label==this.staff2.label){ | |||
uni.showToast({ | |||
title:'请勿选择重复', | |||
icon:'none' | |||
}) | |||
this.staff2.label='请选择' | |||
// this.staff2.label='平均' | |||
// this.staff2.value='' | |||
return | |||
}else{ | |||
// 获取数据 | |||
// this.getreception() | |||
// this.getRecordList() | |||
// this.getAwardList() | |||
this.getdata() | |||
} | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
// 对比时间切换 | |||
.timepick{ | |||
width: 100%; | |||
height: 90rpx; | |||
display: flex; | |||
align-items: center; | |||
background: #FAFAFA; | |||
} | |||
.timepicktime{ | |||
width: 260rpx; | |||
height: 50rpx; | |||
border: 1rpx solid #E0E0E0; | |||
margin-left: 30rpx; | |||
display: flex; | |||
background: #FFFFFF; | |||
} | |||
.timepicktime>view:nth-of-type(1){ | |||
width: 210rpx; | |||
height: 100%; | |||
line-height: 50rpx; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
text-align: center; | |||
} | |||
.timepicktime>view:nth-of-type(2){ | |||
width: 49rpx; | |||
height: 100%; | |||
// border-left: 1px solid #E0E0E0; | |||
} | |||
.timepickpick{ | |||
width: 110rpx; | |||
height: 50rpx; | |||
margin-left: 30rpx; | |||
display: flex; | |||
align-items: center; | |||
} | |||
.Underimg{ | |||
width: 50rpx; | |||
height:50rpx; | |||
margin-top: -2rpx; | |||
} | |||
</style> |
@@ -1,467 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<view class="boxtittab"> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">今日</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 1 }" @click="tabtimetap(1)">昨日</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 2 }" @click="tabtimetap(2)">近一周</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view> | |||
</view> | |||
</view> | |||
<view class="boxzonglan"> | |||
<view class="zonglantit">客群特征总览</view> | |||
<view class="zonglanbox"> | |||
<view class="grid" v-for="(item,index) in numlist" :key="index" v-if="item.isshow"> | |||
<view class="audonum">{{item.name}}<text v-if="index!=0">触达次数</text></view> | |||
<view class="num">{{item.num}}</view> | |||
</view> | |||
</view> | |||
<view v-if="Afolding==true" class="anclack" @click="anclick(1)">展开 <u-icon style="margin-left: 8rpx;" label-color='#666666' name="arrow-down"></u-icon></view> | |||
<view v-if="Afolding==false" class="anclack" @click="anclick(2)">收起 <u-icon style="margin-left: 8rpx;" label-color='#666666' name="arrow-up"></u-icon></view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="centerfor" v-for="(item,index) in objlist" :key="index"> | |||
<view class="fortit"> | |||
<view class="left"> | |||
<view class="lefti"></view> | |||
<view class="lefttext">{{item.name}}触达排名</view> | |||
</view> | |||
<view class="right"> | |||
<view :class="{ activeclass: item.activeTab == 0 }" @click="charttoswitch(index,0)">表格</view> | |||
<view style="margin-left: 16rpx;" :class="{ activeclass: item.activeTab == 1 }" | |||
@click="charttoswitch(index,1)">饼状图</view> | |||
</view> | |||
</view> | |||
<view v-if="item.activeTab==0" class="tabdada"> | |||
<view class="tabth"> | |||
<view>排名</view> | |||
<view>画像语意词/触达客户</view> | |||
<view>触达占比</view> | |||
<view>沟通记录</view> | |||
</view> | |||
<view v-if="item.total==0" style="color: #999999;width: 100%;height: 500rpx;line-height: 500rpx;text-align: center;" >暂无数据</view> | |||
<view class="tabtd" v-if="item.total!=0" v-for="(chend,i) in item.matchKeywords" :key="i"> | |||
<view> | |||
<image v-if="i==0" class="ranking" src="../../../static/images/ranking1.png" mode=""></image> | |||
<image v-else-if="i==1" class="ranking" src="../../../static/images/ranking2.png" mode=""></image> | |||
<image v-else-if="i==2" class="ranking" src="../../../static/images/ranking3.png" mode=""></image> | |||
<view class="ranking1" v-else>{{i+1}}</view> | |||
</view> | |||
<view>{{chend.name}}({{chend.total}})</view> | |||
<view>{{chend.proportion}}%</view> | |||
<view @click="Toview(item,i)">查看</view> | |||
</view> | |||
</view> | |||
<view v-if="item.activeTab==1" class="tabech"> | |||
<qiun-data-charts | |||
:key="item.id" | |||
type="ring" | |||
:chartData="item.chartData" | |||
:canvas2d="true" | |||
:canvasId="'wangxiaohuahahahahaha'+item.id" | |||
:opts='item.opts' | |||
background="none" /> | |||
</view> | |||
</view> | |||
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> | |||
<u-back-top :scroll-top="scrollTop"></u-back-top> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var util = require("../../../utils/util.js"); | |||
var config = require("../../../config"); | |||
export default { | |||
data() { | |||
return { | |||
scrollTop: 0, | |||
activeTotal: 2, | |||
timeobj:{ | |||
statDateStart:'', | |||
statDateEnd:'' | |||
}, | |||
buildingID:'', | |||
totalTimeShow: false, | |||
activeTab: 0, | |||
numlist:[], | |||
objlist:[], | |||
Afolding:true | |||
}; | |||
}, | |||
onPageScroll(e) { | |||
this.scrollTop = e.scrollTop; | |||
}, | |||
onLoad() { | |||
this.buildingID=uni.getStorageSync('buildingID').id; | |||
this.gitinit() | |||
}, | |||
methods: { | |||
anclick(i){ | |||
console.log(i) | |||
this.Afolding=!this.Afolding; | |||
this.numlist.forEach((citem,index)=>{ | |||
if(index<6){ | |||
citem.isshow=true; | |||
}else{ | |||
citem.isshow=!citem.isshow; | |||
} | |||
}) | |||
this.$forceUpdate() | |||
}, | |||
//获取数据 | |||
gitinit(){ | |||
this.objlist=[]; | |||
this.numlist=[]; | |||
var dateType=''; | |||
if(this.activeTotal==3){ | |||
dateType=null; | |||
}else{ | |||
dateType=this.activeTotal; | |||
} | |||
let parames={ | |||
dateType:dateType, | |||
statDateStart:this.timeobj.statDateStart, | |||
statDateEnd:this.timeobj.statDateEnd, | |||
houseId:this.buildingID | |||
} | |||
this.$u.post("/matchKeywords/findmatchdata", parames).then(data => { | |||
this.numlist.push({ | |||
name:"客户数量", | |||
num:data.total | |||
}) | |||
data.list.forEach((item,index)=>{ | |||
this.numlist.push({ | |||
name:item.name, | |||
num:item.total | |||
}) | |||
item.activeTab=0; | |||
item.opts={ | |||
"title": { | |||
"name": item.total, | |||
"color": '#666666', | |||
"fontSize": 20 | |||
}, | |||
"subtitle": { | |||
"name": '总触达次数', | |||
"color": '#32363D', | |||
"fontSize": 12, | |||
"offsetY": 4 | |||
} | |||
} | |||
item.chartData={ | |||
"categories": [], | |||
"series": [{ | |||
"data": [] | |||
}], | |||
}; | |||
item.matchKeywords.forEach(chend=>{ | |||
item.chartData.series[0].data.push({ | |||
"name":chend.name, | |||
"value": chend.proportion | |||
}) | |||
}) | |||
}) | |||
data.list.forEach(item=>{ | |||
item.matchKeywords.forEach(chend=>{ | |||
if(item.name=="意向面积"){ | |||
chend.name=chend.name+'m²-'+chend.endName+'m²' | |||
} | |||
if(item.name=="购房预算"){ | |||
chend.name=chend.name+'万-'+chend.endName+'万' | |||
} | |||
}) | |||
}) | |||
this.objlist=data.list; | |||
this.Afolding=true; | |||
this.numlist.forEach((citem,index)=>{ | |||
if(index<6){ | |||
citem.isshow=true | |||
}else{ | |||
citem.isshow=false | |||
} | |||
}) | |||
}) | |||
}, | |||
//查看 | |||
Toview(item,i){ | |||
uni.navigateTo({ | |||
url: '/pages/center/Piabodata/Customerportrait/Receivingrecords?datatype='+this.activeTotal+"&keywordsId="+item.matchKeywords[i].keywordsId+"&starttime="+this.timeobj.statDateStart+"&endoftime="+this.timeobj.statDateEnd | |||
}) | |||
}, | |||
//时间切换 | |||
tabtimetap(index) { | |||
if (index == 3) { | |||
this.totalTimeShow = true; | |||
} else { | |||
this.activeTotal = index; | |||
this.gitinit() | |||
} | |||
}, | |||
//自定义时间 | |||
totalTimeChange(e) { | |||
this.timeobj.statDateStart = e.startDate; | |||
this.timeobj.statDateEnd = e.endDate; | |||
this.activeTotal=3; | |||
this.gitinit() | |||
}, | |||
charttoswitch(index,num) { | |||
this.objlist[index].activeTab=num | |||
} | |||
} | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.anclack{ | |||
width: 100%; | |||
height: 78rpx; | |||
text-align: center; | |||
line-height: 78rpx; | |||
font-size: 30rpx; | |||
border: 1rpx solid #E0E0E0; | |||
font-weight: 400; | |||
color: #666666; | |||
} | |||
.box { | |||
width: 100%; | |||
height: 100%; | |||
background: #FAFAFA; | |||
padding-bottom: 60rpx; | |||
} | |||
.boxtittab { | |||
width: 100; | |||
height: 92rpx; | |||
background: #FFFFFF; | |||
border: 1px solid #E0E0E0; | |||
display: flex; | |||
align-items: center; | |||
.tabbox { | |||
flex: 1; | |||
height: 100%; | |||
text-align: center; | |||
line-height: 92rpx; | |||
color: #666666; | |||
font-size: 28rpx; | |||
display: flex; | |||
justify-content: center; | |||
.activecllasscet { | |||
width: 96rpx; | |||
border-bottom: 2px solid #2671E2; | |||
} | |||
} | |||
} | |||
.tabtime { | |||
width: 100%; | |||
height: 50rpx; | |||
text-align: center; | |||
line-height: 50rpx; | |||
font-size: 24rpx; | |||
color: #666666; | |||
} | |||
.boxzonglan { | |||
width: 100%; | |||
min-height: 496rpx; | |||
background: #FFFFFF; | |||
padding: 30rpx 30rpx 30rpx 30rpx; | |||
.zonglantit { | |||
font-size: 30rpx; | |||
color: #333333; | |||
font-family: PingFangSC-Semibold, PingFang SC; | |||
font-weight: 600; | |||
} | |||
.zonglanbox { | |||
width: 100%; | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin-top: 24rpx; | |||
.grid { | |||
width: 50%; | |||
height: 128rpx; | |||
border: 1px solid #E0E0E0; | |||
.audonum { | |||
color: #666666; | |||
text-indent: 40rpx; | |||
font-size: 26rpx; | |||
margin-top: 20rpx; | |||
} | |||
.num { | |||
color: #333333; | |||
text-indent: 40rpx; | |||
font-size: 32rpx; | |||
font-weight: 600; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
} | |||
} | |||
.centerfor { | |||
width: 100%; | |||
height: 686rpx; | |||
background: #FFFFFF; | |||
padding-left: 30rpx; | |||
padding-right: 30rpx; | |||
margin-top: 20rpx; | |||
.fortit { | |||
width: 100%; | |||
height: 86rpx; | |||
display: flex; | |||
border-bottom: 1px solid #E0E0E0; | |||
.left { | |||
width: 70%; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
.lefti { | |||
width: 6rpx; | |||
height: 30rpx; | |||
background: #2671E2; | |||
} | |||
.lefttext { | |||
font-size: 30rpx; | |||
font-family: PingFangSC-Semibold, PingFang SC; | |||
font-weight: 600; | |||
color: #333333; | |||
margin-left: 10rpx; | |||
} | |||
} | |||
.right { | |||
width: 30%; | |||
height: 70rpx; | |||
display: flex; | |||
font-size: 28rpx; | |||
align-items: center; | |||
margin-top: 16rpx; | |||
} | |||
.right view { | |||
width: 92rpx; | |||
height: 50rpx; | |||
text-align: center; | |||
} | |||
} | |||
} | |||
.activeclass { | |||
color: #2671E2; | |||
border-bottom: 2px solid #2671E2; | |||
} | |||
.tabdada { | |||
width: 100%; | |||
height: 580rpx; | |||
overflow-y: auto; | |||
padding-bottom: 20rpx; | |||
} | |||
.tabth { | |||
width: 100%; | |||
height: 28rpx; | |||
display: flex; | |||
font-size: 28rpx; | |||
line-height: 28rpx; | |||
color: #666666; | |||
margin-top: 28rpx; | |||
} | |||
.tabth>view:nth-of-type(1) { | |||
width: 10%; | |||
text-align: center; | |||
} | |||
.tabth>view:nth-of-type(2) { | |||
width: 46%; | |||
text-align: center; | |||
} | |||
.tabth>view:nth-of-type(3) { | |||
width: 22%; | |||
text-align: center; | |||
} | |||
.tabth>view:nth-of-type(4) { | |||
width: 22%; | |||
text-align: center; | |||
} | |||
.tabtd { | |||
width: 100%; | |||
height: 30rpx; | |||
display: flex; | |||
font-size: 26rpx; | |||
line-height: 30rpx; | |||
margin-top: 32rpx; | |||
} | |||
.tabtd>view:nth-of-type(1) { | |||
width: 10%; | |||
text-align: center; | |||
line-height: 30rpx; | |||
} | |||
.tabtd>view:nth-of-type(2) { | |||
width: 46%; | |||
text-align: center; | |||
color: #333333; | |||
} | |||
.tabtd>view:nth-of-type(3) { | |||
width: 22%; | |||
text-align: center; | |||
color: #333333; | |||
} | |||
.tabtd>view:nth-of-type(4) { | |||
width: 22%; | |||
text-align: center; | |||
color: #2671E2; | |||
} | |||
.ranking { | |||
width: 34rpx; | |||
height: 34rpx; | |||
} | |||
.ranking1 { | |||
width: 30rpx; | |||
height: 30rpx; | |||
background: #ECF1FF; | |||
color: #424D64; | |||
font-size: 18rpx; | |||
text-align: center; | |||
line-height: 30rpx; | |||
border-radius: 50%; | |||
margin: 0 auto; | |||
} | |||
.tabech { | |||
width: 100%; | |||
height: 600rpx; | |||
} | |||
</style> |
@@ -1,720 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<view class="boxtittab"> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 4 }" @click="tabtimetap(4)">近七天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 5 }" @click="tabtimetap(5)">近15天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 6 }" @click="tabtimetap(6)">近30天</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="Piabodata-box"> | |||
<view class="Piabodata" @click="toTrendAnalysis()"> | |||
<view class="Piabodata-img"> | |||
<image class="Piabodata-img1" src="../../../static/images/qushi.png" mode=""></image> | |||
</view> | |||
<view class="Piabodata-text">趋势分析</view> | |||
</view> | |||
<view class="Piabodata" @click="toStaffAnalysis()"> | |||
<view class="Piabodata-img"> | |||
<image class="Piabodata-img1" src="../../../static/images/yuangong.png" mode=""></image> | |||
</view> | |||
<view class="Piabodata-text">员工分析</view> | |||
</view> | |||
<view class="Piabodata" @click="toUserinsightinto()"> | |||
<view class="Piabodata-img"> | |||
<image class="Piabodata-img1" src="../../../static/images/yinghu.png" mode=""></image> | |||
</view> | |||
<view class="Piabodata-text">用户洞察</view> | |||
</view> | |||
<view class="Piabodata" @click="Theteamcompared()" v-if="Theteamcomparedisshow"> | |||
<view class="Piabodata-img"> | |||
<image class="Piabodata-img1" src="../../../static/images/tuandui.png" mode=""></image> | |||
</view> | |||
<view class="Piabodata-text">团队对比</view> | |||
</view> | |||
<view class="Piabodata" @click="Groupcontrast()" v-if="Groupcontrastisshow"> | |||
<view class="Piabodata-img"> | |||
<image class="Piabodata-img1" src="../../../static/images/jituan.png" mode=""></image> | |||
</view> | |||
<view class="Piabodata-text">集团对比</view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="boxzonglan" style="min-height: 400rpx;"> | |||
<view class="zonglantit">简报</view> | |||
<view class="zonglanbox"> | |||
<view class="grid" v-for="(item,index) in numlist" :key="index"> | |||
<view class="audonum">{{item.name}}</text></view> | |||
<view class="num">{{item.num}}</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1">接待趋势</view> | |||
</view> | |||
<view class="swiper-box"> | |||
<u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="600" :current="bocindex" @change="tapspagek2()" | |||
inactive-color="#b1b1b1" active-color="#008ef2" :list="newlistoj1" :is-scroll="true"> | |||
</u-tabs-swiper> | |||
</view> | |||
<!-- <view class="hejibox"> | |||
<view class="heji">合计:50</view> | |||
<view class="heji">均值:25</view> | |||
</view> --> | |||
<view class="danwei">{{danwei}} </view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="line" | |||
:chartData="lineOptsect" | |||
background="none" | |||
:ontouch="true" | |||
canvasId="wangxiaohuaerlingilingwuyiba1" | |||
:canvas2d="true" | |||
/> | |||
</view> | |||
</view> | |||
<view class="" v-if="teamFlag"> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title" @click="staffShow1=true"> | |||
<view class="title1">团队接待趋势</view> | |||
<view class="title2"> | |||
<view class="title2-che" style="width: 220rpx;">{{team.label}} | |||
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image> | |||
</view> | |||
<!-- <view class="title2-che">执行率 | |||
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image> | |||
</view> --> | |||
</view> | |||
</view> | |||
<!-- <view class="hejibox"> | |||
<view class="heji">合计:{{allnum||0}}</view> | |||
<view class="heji">均值:{{allavg||0}}</view> | |||
</view> --> | |||
<view class="danwei">单位(%)</view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="line" | |||
:chartData="lineOptsect1" | |||
background="none" | |||
:ontouch="true" | |||
canvasId="wangxiaohuaerlineryiliwuyibao" | |||
:canvas2d="true" | |||
/> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="" v-if="staffFlag"> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1">员工接待趋势</view> | |||
<view class="title2" @click="staffShow=true"> | |||
<view class="title2-che" style="width: 220rpx;">{{staff.label}} | |||
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image> | |||
</view> | |||
<!-- <view class="title2-che">执行率 | |||
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image> | |||
</view> --> | |||
</view> | |||
</view> | |||
<!-- <view class="hejibox"> | |||
<view class="heji">合计:{{allnum1||0}}</view> | |||
<view class="heji">均值:{{allavg1||0}}</view> | |||
</view> --> | |||
<view class="danwei">单位(%)</view> | |||
<view class="uchaserbox"> | |||
<qiun-data-charts | |||
type="line" | |||
:chartData="lineOptsect2" | |||
background="none" | |||
:ontouch="true" | |||
canvasId="wangxiaohuaerlingeryilingwuyibao" | |||
:canvas2d="true" | |||
/> | |||
</view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1">销讲维度执行率</view> | |||
<!-- <view class="title3"> | |||
<view class="title3-box"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 0 }">执行率</view> | |||
</view> | |||
<view class="title3-box"> | |||
<view style="height: 42rpx;" :class="{ activecltab: activeTotal2 == 1 }">得分</view> | |||
</view> | |||
</view> --> | |||
</view> | |||
<!-- <view class="hejibox"> | |||
<view class="heji">合计:50</view> | |||
<view class="heji">均值:25</view> | |||
</view> --> | |||
<view class="jindu" style="margin-top: 20rpx;"> | |||
<scroll-view style="height: 300rpx;" scroll-y="true" > | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo" :key="index"> | |||
<view class="jindu-boxche"> | |||
<view class="jindu-name">{{item.name.substring(0, 4)}}</view> | |||
<view style="width: 440rpx;margin-left: 10rpx;"> | |||
<u-line-progress height="24" :show-percent="false" active-color="#4FC78F" :percent="item.zxl"></u-line-progress> | |||
</view> | |||
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #FAFAFA;"></view> | |||
<view class="single"> | |||
<view class="title"> | |||
<view class="title1">销讲指标执行率</view> | |||
</view> | |||
<view class="swiper-box"> | |||
<u-tabs-swiper ref="tabs" font-size="30" :bold="true" swiper-width="600" :current="bocindex1" @change="tapspagek3" | |||
inactive-color="#b1b1b1" active-color="#008ef2" :list="newlistoj" :is-scroll="true"> | |||
</u-tabs-swiper> | |||
</view> | |||
<view class="jindu"> | |||
<scroll-view style="height: 300rpx;" scroll-y="true" > | |||
<view class="jindu-box" v-for="(item,index) in newlisttabinfo1" :key="index"> | |||
<view class="jindu-boxche"> | |||
<view class="jindu-name">{{item.name.substring(0, 4)}}</view> | |||
<view style="width: 440rpx;margin-left: 10rpx;"> | |||
<u-line-progress height="24" :show-percent="false" active-color="#4FC78F" :percent="item.zxl"></u-line-progress> | |||
</view> | |||
<view class="jindu-zxl">{{item.zxl==null?0:item.zxl}}%</view> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
</view> | |||
</view> | |||
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> | |||
<u-select v-model="staffShow" :list="staffList" @confirm="staffSelectCallback($event,0)" :default-value='selindex'></u-select> | |||
<u-select v-model="staffShow1" :list="teamList" @confirm="staffSelectCallback($event,1)" :default-value='selindex'></u-select> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
// var util = require("../../../utils/util.js"); | |||
var config = require("../../../config"); | |||
export default { | |||
data() { | |||
return { | |||
activeTotal: 4, | |||
activeTotal2: 0, | |||
houseId:'', | |||
timeobj:{ | |||
statDateStart:'', | |||
statDateEnd:'' | |||
}, | |||
// 员工列表 | |||
staffList:[], | |||
// 团队列表 | |||
teamList:[], | |||
staffShow:false, | |||
staff:{ | |||
value:'', | |||
label:'' | |||
}, | |||
team:{ | |||
value:'', | |||
label:'' | |||
}, | |||
teamFlag:true, | |||
bocindex1:0, | |||
staffFlag:true, | |||
staffShow1:false, | |||
lastStartDate:'', | |||
lastEndDate :'', | |||
allnum:'', | |||
allavg:'', | |||
allnum1:'', | |||
allavg1:'', | |||
danwei:'单位(次)', | |||
totalTimeShow: false, | |||
activeTab: 0, | |||
numlist:[ | |||
{name:'接待量',num:'10'}, | |||
{name:'接待客户',num:'10'}, | |||
{name:'平均执行率',num:'10'}, | |||
{name:'接待时长',num:'10'}, | |||
], | |||
lineOptsect:{ | |||
"categories": ["2016","2017","2018","2019","2020","2021"], | |||
"series": [ | |||
{ | |||
"name": "成交量", | |||
"data": [35,8,25,37,4,20] | |||
} | |||
] | |||
}, | |||
lineOptsect1:{ | |||
"categories": [], | |||
"series": [] | |||
}, | |||
lineOptsect2:{ | |||
"categories": ["2016","2017","2018","2019","2020","2021"], | |||
"series": [ | |||
{ | |||
"name": "成交量", | |||
"data": [35,8,25,37,4,20] | |||
} | |||
] | |||
}, | |||
newlistoj:[], | |||
newlistoj1:[ | |||
{name:"接待量",id:1}, | |||
{name:"平均执行率",id:2}, | |||
{name:"接待客户",id:3}, | |||
{name:"录音时长",id:5}, | |||
], | |||
bocindex:0, | |||
newlisttabinfo:[ | |||
{name:'接待量',zxl:'10'}, | |||
{name:'平均执行率',zxl:'50'}, | |||
{name:'接待客户',zxl:'80'}, | |||
], | |||
newlisttabinfo1:[ | |||
{name:'接待量',zxl:'10'}, | |||
{name:'平均执行率',zxl:'50'}, | |||
{name:'接待客户',zxl:'80'}, | |||
], | |||
Theteamcomparedisshow:false, | |||
Groupcontrastisshow:false, | |||
allechar:[], | |||
allList:[] | |||
}; | |||
}, | |||
onShow() { | |||
// 获取楼盘id | |||
this.houseId = uni.getStorageSync('buildingID').id; | |||
// 获取数据看板 | |||
// 获取员工 | |||
this.getStaffList() | |||
// 获取团队 | |||
this.getSectionList() | |||
// 获取团队是否显示权限 | |||
this.queryHaveDept() | |||
// 获取简报 | |||
this.getReport() | |||
// 获取接待趋势 | |||
this.getRtrent() | |||
// 获取维度 | |||
this.getindexZxl() | |||
}, | |||
methods: { | |||
queryHaveDept() { | |||
return new Promise((resolve, reject) => { | |||
this.$u.get("/user/queryHaveDept?houseId="+this.houseId).then(res => { | |||
this.permissions(res) | |||
}) | |||
}) | |||
}, | |||
permissions(res){ | |||
if(res==1){ | |||
this.Theteamcomparedisshow=false; | |||
this.Groupcontrastisshow=false; | |||
return | |||
} | |||
let totle=uni.getStorageSync('weapp_session_userInfo_data').total; | |||
if(totle==1){ | |||
this.Theteamcomparedisshow=true; | |||
this.Groupcontrastisshow=false; | |||
}else{ | |||
this.Theteamcomparedisshow=true; | |||
this.Groupcontrastisshow=true; | |||
} | |||
}, | |||
// 获取员工列表 | |||
getStaffList(){ | |||
this.$u.post('/cusLvStatistics/selectAllAccountIdByHouseId',{houseId:this.houseId}) | |||
.then(res=>{ | |||
// console.log(res,'123') | |||
this.staffList=[] | |||
res.map(item=>{ | |||
let obj={} | |||
obj.value=item.accountId | |||
obj.label=item.name | |||
this.staffList.push(obj) | |||
}) | |||
this.staff=this.staffList[0] | |||
this.getAward() | |||
}) | |||
}, | |||
// 获取接待趋势 | |||
getRtrent(){ | |||
this.$u.post('/cusLvStatistics/receptionTrend',{ | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal, | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
// console.log(res) | |||
this.allechar=res | |||
this.tapspagek2(this.bocindex) | |||
}) | |||
}, | |||
// 销奖维度 | |||
getindexZxl(){ | |||
this.$u.post('/cusLvStatistics/indexZxl',{ | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal, | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
// console.log(res) | |||
// 处理销奖维度执行率 | |||
// this.newlisttabinfo | |||
let arr=[] | |||
this.newlistoj=[] | |||
res.list.map((item,index)=>{ | |||
arr.push({ | |||
name:item.name, | |||
zxl:item.zxl | |||
}) | |||
this.newlistoj.push({ | |||
name:item.name, | |||
id:index | |||
}) | |||
}) | |||
this.newlisttabinfo=arr | |||
this.allList=res.list | |||
this.tapspagek3(this.bocindex1) | |||
}) | |||
}, | |||
// 获取简报 | |||
getReport(){ | |||
this.$u.post('/cusLvStatistics/xiaojiangAnalysis',{ | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal, | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
// 接待量 | |||
this.numlist[0].num=res.receptionCount||0 | |||
// 接待客户 | |||
this.numlist[1].num=res.sumCustomer||0 | |||
// 执行率 | |||
this.numlist[2].num=(res.fraction||0)+'%' | |||
// 录音时长 | |||
this.numlist[3].num=Math.floor(res.sumDuration/60) ||0 | |||
// util.formatSecond()||0 | |||
}) | |||
}, | |||
// 获取团队列表 | |||
getSectionList(){ | |||
this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId',{houseId:this.houseId}) | |||
.then(res=>{ | |||
this.teamList=[] | |||
res.map(item=>{ | |||
let obj={} | |||
obj.value=item.deptId | |||
obj.label=item.deptName | |||
this.teamList.push(obj) | |||
}) | |||
this.team=this.teamList[0] | |||
this.receptionCountList() | |||
}) | |||
}, | |||
// 员工销奖趋势 | |||
getAward(){ | |||
if(this.staffList.length==0){ | |||
this.staffFlag=false | |||
this.$forceUpdate() | |||
return | |||
} | |||
this.$u.post('/cusLvStatistics/employeeAnalysisExacutiveRate',{ | |||
userA:this.staff.value, | |||
userB:'', | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
this.allnum1=res.avg[0] | |||
this.allavg1=res.avg[1] | |||
// console.log(res) | |||
let first=res.first | |||
let second=res.second | |||
this.lineOptsect2.categories=[] | |||
this.lineOptsect2.series=[ | |||
{ | |||
name:first[0].accountName, | |||
data:[] | |||
} | |||
] | |||
first.map(item=>{ | |||
this.lineOptsect2.categories.push(item.statDate.slice(5,10)) | |||
this.lineOptsect2.series[0].data.push(item.sumFraction) | |||
}) | |||
}) | |||
}, | |||
// 团队接待趋势 | |||
receptionCountList(){ | |||
if(this.teamList.length==0){ | |||
this.teamFlag=false | |||
this.$forceUpdate() | |||
return | |||
} | |||
this.$u.post('/cusLvStatistics/teamAnalysisExecutionRate',{ | |||
deptIds:this.team.value, | |||
showRank:1, | |||
houseId:this.houseId, | |||
timeType:this.lastEndDate?null:this.activeTotal+'', | |||
lastEndDate:this.lastEndDate, | |||
lastStartDate:this.lastStartDate | |||
}) | |||
.then(res=>{ | |||
// console.log(res) | |||
let result=res.result | |||
this.allnum=res.avg[0] | |||
this.allavg=res.avg[1] | |||
// 当选择趋势时 | |||
this.lineOptsect1={} | |||
let allobj={ | |||
categories:[], | |||
series:[] | |||
} | |||
// 先处理时间 | |||
// 当选择全部时 | |||
// 当选择只有一个时 | |||
let obj={} | |||
obj.data=[] | |||
obj.name=result[0][0].deptName | |||
result[0].map(item=>{ | |||
allobj.categories.push(item.statDate.slice(5,10)) | |||
obj.data.push(item.data) | |||
}) | |||
allobj.series.push(obj) | |||
this.lineOptsect1=allobj | |||
}) | |||
}, | |||
//时间切换 | |||
tabtimetap(index) { | |||
if (index == 3) { | |||
this.totalTimeShow = true; | |||
} else { | |||
this.activeTotal = index; | |||
this.lastEndDate='' | |||
this.lastStartDate='' | |||
this.getdata() | |||
} | |||
}, | |||
// 获取数据 | |||
getdata(){ | |||
this.receptionCountList() | |||
this.getReport() | |||
this.getRtrent() | |||
this.getindexZxl() | |||
this.getAward() | |||
}, | |||
staffSelectCallback(e,idx){ | |||
if(idx==0){ | |||
this.staff=e[0] | |||
this.getAward() | |||
}else{ | |||
this.team=e[0] | |||
this.receptionCountList() | |||
} | |||
// console.log(e,idx) | |||
}, | |||
//自定义时间 | |||
totalTimeChange(e) { | |||
console.log(e.startDate, e.endDate) | |||
this.activeTotal=3; | |||
this.lastEndDate=e.endDate | |||
this.lastStartDate=e.startDate | |||
this.getdata() | |||
}, | |||
//指标执行率分析tab | |||
tapspagek2(index) { | |||
// console.log(index) | |||
// 对数据进行分析和处理 | |||
// 先处理日期 | |||
let allobj={ | |||
"categories": [], | |||
"series": [ | |||
{ | |||
name:'接待量', | |||
data:[] | |||
} | |||
] | |||
} | |||
if(index==0){ | |||
// 接待量 | |||
this.danwei='单位(次)' | |||
allobj.series[0].name='接待量' | |||
this.allechar.map(item=>{ | |||
allobj.categories.push(item.statDate.slice(5,10)) | |||
allobj.series[0].data.push(item.receptionCount) | |||
}) | |||
}else if(index==1){ | |||
// 平均执行率 | |||
this.danwei='单位(%)' | |||
allobj.series[0].name='平均执行率' | |||
this.allechar.map(item=>{ | |||
allobj.categories.push(item.statDate.slice(5,10)) | |||
allobj.series[0].data.push(item.fraction) | |||
}) | |||
}else if(index==2){ | |||
// 接待客户 | |||
this.danwei='单位(个)' | |||
allobj.series[0].name='接待客户' | |||
this.allechar.map(item=>{ | |||
allobj.categories.push(item.statDate.slice(5,10)) | |||
allobj.series[0].data.push(item.sumCustomer) | |||
}) | |||
}else{ | |||
// 录音时长 | |||
this.danwei='单位(min)' | |||
allobj.series[0].name='录音时长' | |||
this.allechar.map(item=>{ | |||
allobj.categories.push(item.statDate.slice(5,10)) | |||
allobj.series[0].data.push(item.sumDuration) | |||
}) | |||
} | |||
this.bocindex = index; | |||
// console.log(allobj) | |||
// return | |||
this.lineOptsect=allobj | |||
}, | |||
tapspagek3(index){ | |||
let arr=[] | |||
// return | |||
// console.log(index,this.allList[index]) | |||
this.allList[index].children.map(item=>{ | |||
arr.push({ | |||
name:item.name, | |||
zxl:item.zxl | |||
}) | |||
}) | |||
this.newlisttabinfo1=arr | |||
this.bocindex1 = index; | |||
}, | |||
//集团对比 | |||
Groupcontrast(){ | |||
uni.navigateTo({ | |||
url: '/pages/center/Piabodata/Groupcontrast' | |||
}); | |||
}, | |||
//团队对比 | |||
Theteamcompared(){ | |||
if(this.teamList.length==0){ | |||
uni.showToast({ | |||
title:'没有团队呢', | |||
icon:'none' | |||
}) | |||
return | |||
} | |||
uni.navigateTo({ | |||
url: '/pages/center/Piabodata/Theteamcompared' | |||
}); | |||
}, | |||
//用户洞察 | |||
toUserinsightinto(){ | |||
uni.navigateTo({ | |||
url: '/pages/center/Piabodata/Userinsightinto' | |||
}); | |||
}, | |||
//趋势分析 | |||
toTrendAnalysis(){ | |||
uni.navigateTo({ | |||
url: '/pages/center/Piabodata/TrendAnalysis' | |||
}); | |||
}, | |||
//员工分析 | |||
toStaffAnalysis(){ | |||
if(this.staffList.length==0){ | |||
uni.showToast({ | |||
title:'没有团队呢', | |||
icon:'none' | |||
}) | |||
return | |||
} | |||
uni.navigateTo({ | |||
url: '/pages/center/Piabodata/StaffAnalysis' | |||
}); | |||
} | |||
} | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.box { | |||
width: 100%; | |||
height: 100%; | |||
background: #FAFAFA; | |||
padding-bottom: 60rpx; | |||
} | |||
.Piabodata-box{ | |||
width: 100%; | |||
background: #FFFFFF; | |||
display: flex; | |||
flex-wrap: wrap; | |||
padding-bottom: 30rpx; | |||
.Piabodata{ | |||
width: 33.3%; | |||
.Piabodata-img{ | |||
width: 100%; | |||
text-align: center; | |||
.Piabodata-img1{ | |||
width: 134rpx; | |||
height: 134rpx; | |||
} | |||
} | |||
.Piabodata-text{ | |||
width: 100%; | |||
text-align: center; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
margin-top: -10rpx; | |||
} | |||
} | |||
} | |||
.grid:nth-child(1){ | |||
border-right:none ; | |||
border-bottom:none ; | |||
} | |||
.grid:nth-child(2){ | |||
border-bottom:none ; | |||
} | |||
.grid:nth-child(3){ | |||
border-right:none ; | |||
} | |||
</style> |
@@ -1,151 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<!-- 顾问选择 --> | |||
<view class="nextcon"> | |||
最多选择五项 | |||
</view> | |||
<view class="content"> | |||
<scroll-view style="height: 1170rpx;" scroll-y="true" > | |||
<checkbox-group v-model="value" @change="checkboxChange"> | |||
<view v-for="(item,index) in items" :key="index"> | |||
<view class="content-tips"> | |||
<view class="left"> | |||
{{item.propertyName}} | |||
</view> | |||
<view class="right"> | |||
<radio :value="item.id" style="transform:scale(0.8)" color="#2671E2" :checked="item.checked" @click="addclick(index)"></radio> | |||
</view> | |||
</view> | |||
</view> | |||
</checkbox-group> | |||
</scroll-view> | |||
<view class="zhedang"></view> | |||
<view class="btn" @click="goback"> | |||
确定 | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data(){ | |||
return{ | |||
value:[], | |||
items:[], | |||
ids:'' | |||
} | |||
}, | |||
onLoad(e) { | |||
// 获取楼盘id | |||
// console.log(e) | |||
this.ids=e.ids | |||
// this.houseId = uni.getStorageSync('buildingID').id; | |||
this.getSectionList() | |||
}, | |||
methods:{ | |||
checkboxChange (e) { | |||
// console.log(e) | |||
}, | |||
// 获取部门列表 | |||
getSectionList(){ | |||
this.$u.post('/user/getHouseByToken',) | |||
.then(res=>{ | |||
// console.log(res) | |||
res.map((item,index)=>{ | |||
if(index<5){ | |||
item.checked=true | |||
}else{ | |||
item.checked=false | |||
} | |||
}) | |||
this.items=res | |||
// console.log(this.items) | |||
if(this.ids){ | |||
let arr=this.ids.split(',') | |||
this.items.map((item,index)=>{ | |||
let idx=arr.findIndex(item1=>item1==item.id) | |||
if(idx!=-1){ | |||
item.checked=true | |||
}else{ | |||
item.checked=false | |||
} | |||
}) | |||
} | |||
}) | |||
}, | |||
addclick(index){ | |||
this.items[index].checked=!this.items[index].checked | |||
}, | |||
goback(){ | |||
// 循环遍历所有选定的内容 | |||
let arr=[] | |||
this.items.map(item=>{ | |||
if(item.checked){ | |||
arr.push(item.id) | |||
} | |||
}) | |||
uni.$emit('updateGroup',{arr}) | |||
uni.navigateBack() | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box{ | |||
background: #F8F8F8; | |||
width: 100%; | |||
height: 100%; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
// line-height: 30px; | |||
.nextcon{ | |||
height: 78rpx; | |||
background: #F4F8FD; | |||
color: #2671E2; | |||
text-align: center; | |||
line-height: 78rpx; | |||
} | |||
.content-tips{ | |||
display: flex; | |||
justify-content: space-between; | |||
background: #fff; | |||
padding: 0 30rpx; | |||
height: 92rpx; | |||
margin-bottom: 20rpx; | |||
.left{ | |||
display: flex; | |||
// margin-top: 30rpx; | |||
font-weight: 500; | |||
color: #303030; | |||
line-height: 92rpx; | |||
font-size: 30rpx; | |||
} | |||
.right{ | |||
margin: 24rpx 0; | |||
} | |||
} | |||
.btn{ | |||
width: 690rpx; | |||
height: 88rpx; | |||
background: #2671E2; | |||
border-radius: 8rpx; | |||
font-size: 32rpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
line-height: 88rpx; | |||
text-align: center; | |||
position: fixed; | |||
left: 30rpx; | |||
bottom: 80rpx; | |||
} | |||
.zhedang{ | |||
height: 168rpx; | |||
opacity: 0; | |||
} | |||
} | |||
</style> |
@@ -1,150 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<!-- 顾问选择 --> | |||
<view class="nextcon"> | |||
最多选择五项 | |||
</view> | |||
<view class="content"> | |||
<scroll-view style="height: 1170rpx;" scroll-y="true" > | |||
<checkbox-group v-model="value" @change="checkboxChange"> | |||
<view v-for="(item,index) in items" :key="index"> | |||
<view class="content-tips"> | |||
<view class="left"> | |||
{{item.deptName}} | |||
</view> | |||
<view class="right"> | |||
<radio :value="item.deptId" style="transform:scale(0.8)" color="#2671E2" :checked="item.checked" @click="addclick(index)"></radio> | |||
</view> | |||
</view> | |||
</view> | |||
</checkbox-group> | |||
</scroll-view> | |||
<view class="zhedang"></view> | |||
<view class="btn" @click="goback"> | |||
确定 | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data(){ | |||
return{ | |||
value:[], | |||
items:[], | |||
ids:'' | |||
} | |||
}, | |||
onLoad(e) { | |||
// 获取楼盘id | |||
// console.log(e) | |||
this.ids=e.ids | |||
this.houseId = uni.getStorageSync('buildingID').id; | |||
this.getSectionList() | |||
}, | |||
methods:{ | |||
checkboxChange (e) { | |||
// console.log(e) | |||
}, | |||
// 获取部门列表 | |||
getSectionList(){ | |||
this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId',{houseId:this.houseId}) | |||
.then(res=>{ | |||
console.log(res) | |||
res.map((item,index)=>{ | |||
if(index<5){ | |||
item.checked=true | |||
}else{ | |||
item.checked=false | |||
} | |||
}) | |||
this.items=res | |||
if(this.ids){ | |||
let arr=this.ids.split(',') | |||
this.items.map((item,index)=>{ | |||
let idx=arr.findIndex(item1=>item1==item.deptId) | |||
if(idx!=-1){ | |||
item.checked=true | |||
}else{ | |||
item.checked=false | |||
} | |||
}) | |||
} | |||
}) | |||
}, | |||
addclick(index){ | |||
this.items[index].checked=!this.items[index].checked | |||
}, | |||
goback(){ | |||
// 循环遍历所有选定的内容 | |||
let arr=[] | |||
this.items.map(item=>{ | |||
if(item.checked){ | |||
arr.push(item.deptId) | |||
} | |||
}) | |||
uni.$emit('update',{arr}) | |||
uni.navigateBack() | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box{ | |||
background: #F8F8F8; | |||
width: 100%; | |||
height: 100%; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
// line-height: 30px; | |||
.nextcon{ | |||
height: 78rpx; | |||
background: #F4F8FD; | |||
color: #2671E2; | |||
text-align: center; | |||
line-height: 78rpx; | |||
} | |||
.content-tips{ | |||
display: flex; | |||
justify-content: space-between; | |||
background: #fff; | |||
padding: 0 30rpx; | |||
height: 92rpx; | |||
margin-bottom: 20rpx; | |||
.left{ | |||
display: flex; | |||
// margin-top: 30rpx; | |||
font-weight: 500; | |||
color: #303030; | |||
line-height: 92rpx; | |||
font-size: 30rpx; | |||
} | |||
.right{ | |||
margin: 24rpx 0; | |||
} | |||
} | |||
.btn{ | |||
width: 690rpx; | |||
height: 88rpx; | |||
background: #2671E2; | |||
border-radius: 8rpx; | |||
font-size: 32rpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
line-height: 88rpx; | |||
text-align: center; | |||
position: fixed; | |||
left: 30rpx; | |||
bottom: 80rpx; | |||
} | |||
.zhedang{ | |||
height: 168rpx; | |||
opacity: 0; | |||
} | |||
} | |||
</style> |
@@ -1,242 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<view style="width: 690rpx;margin: 0 auto;margin-top: 20rpx;"> | |||
<u-search @search='searchinfo()' :show-action='false' placeholder="请输入" v-model="keyword"></u-search> | |||
</view> | |||
<!-- <view @click="searchinfo()">搜索</view> --> | |||
<view class="content"> | |||
<view class="content-tips" v-for="(item,index) in recordList" :key='index' @click="gotoDetail(item.id)"> | |||
<view class="content-first"> | |||
<view class="left"> | |||
<view v-if="item.level.length==0"></view> | |||
<view class="img" v-else-if="item.level==1">A</view> | |||
<view class="img" v-else-if="item.level==2">B</view> | |||
<view class="img" v-else-if="item.level==3">C</view> | |||
<view class="img" v-else-if="item.level==4">D</view> | |||
<view class="test">{{item.name}}</view> | |||
</view> | |||
</view> | |||
<view class="content-sec"> | |||
<view class="content-sec-lab"> | |||
手机号码:<view class="content-sec-lab1">{{item.phone || '--'}}</view> | |||
</view> | |||
<view class="content-sec-lab"> | |||
客户标签: | |||
<text v-if="item.demand.cusSemanticWordsList==null">暂无</text> | |||
<view v-else class="content-sec-tips" v-for="(che,ind) in item.demand.cusSemanticWordsList" :key='ind'>{{che.name}}</view> | |||
</view> | |||
<view class="content-sec-lab"> | |||
顾问姓名:<view class="content-sec-lab1">{{item.agentName}}</view> | |||
</view> | |||
<view class="content-sec-lab"> | |||
添加时间:<view class="content-sec-lab1">{{item.createTime}}</view> | |||
</view> | |||
<view class="content-sec-num"> | |||
<view class="">{{item.visitRecord || '--'}}次到访</view> | |||
<view class="">{{item.fraction || '0'}}% | {{item.mm || '0'}}<text style="font-size: 24rpx;">min</text></view> | |||
</view> | |||
</view> | |||
<view style="width: 100%;height: 20rpx;background: #F8F8F8;"></view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default{ | |||
data(){ | |||
return{ | |||
keyword:'', | |||
stageList:['未知','到访','意向','定金','成交'], | |||
recordList:[], | |||
nextPage:1, | |||
totalRecord:'', | |||
buildingID:'', | |||
} | |||
}, | |||
onShow() { | |||
this.buildingID = uni.getStorageSync('buildingID').id; | |||
this.nextPage=1; | |||
this.recordList=[]; | |||
}, | |||
onReachBottom() { | |||
if(this.totalRecord==this.nextPage){ | |||
uni.showToast({ | |||
icon:'none', | |||
title: '到底了', | |||
duration: 2000 | |||
}); | |||
return | |||
}else{ | |||
this.nextPage+=1; | |||
this.getMyCustom(); | |||
} | |||
}, | |||
methods:{ | |||
// 客户详情 | |||
gotoDetail(id) { | |||
uni.navigateTo({ | |||
url: `/pages/center/consumer/consumerDetail?id=${id}` | |||
}) | |||
}, | |||
searchinfo(){ | |||
this.nextPage=1; | |||
this.recordList=[]; | |||
this.getMyCustom(); | |||
}, | |||
getMyCustom(){ | |||
var parames = { | |||
pageNum: this.nextPage, | |||
pageSize: 10, | |||
query: { | |||
projectId:this.buildingID, | |||
nameOrPhone:this.keyword | |||
} | |||
}; | |||
this.$u.post("/customer/customerManagement", parames).then(data => { | |||
var list = data.results || []; | |||
list.forEach(item=>{ | |||
if(item.demand.cusSemanticWordsList!=null){ | |||
item.demand.cusSemanticWordsList.forEach(che=>{ | |||
if(che.isInterval==0){ | |||
che.name=che.name+che.unit+'-'+che.endName+che.unit; | |||
} | |||
}) | |||
} | |||
}) | |||
this.recordList = [...this.recordList, ...list]; | |||
this.totalRecord=data.totalPage; | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box { | |||
width: 100%; | |||
height: 100%; | |||
background: #FFFFFF; | |||
} | |||
.content{ | |||
overflow: hidden; | |||
margin-top: 10rpxs; | |||
.content-tips{ | |||
background: #fff; | |||
// box-sizing: border-box; | |||
// margin-bottom: 20rpx; | |||
overflow: hidden; | |||
.content-first{ | |||
padding: 19rpx 30rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
box-sizing: border-box; | |||
// border-top: 1px solid #E0E0E0; | |||
font-weight: 400; | |||
color: #292929; | |||
height: 90rpx; | |||
font-size: 30rpx; | |||
line-height: 30rpx; | |||
.left{ | |||
display: flex; | |||
.img{ | |||
// margin-top: 19rpx; | |||
width: 52rpx; | |||
height: 52rpx; | |||
border: 1px solid #E0E0E0; | |||
border-radius: 50%; | |||
text-align: center; | |||
line-height: 50rpx; | |||
margin-right: 20rpx; | |||
} | |||
.test{ | |||
margin-top: 11rpx; | |||
// margin-left: 20rpx; | |||
font-weight: 500; | |||
color: #333333; | |||
} | |||
} | |||
.right{ | |||
display: flex; | |||
.point{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
background: #2B6EFF; | |||
border-radius: 50%; | |||
margin-right: 9rpx; | |||
margin-top: 20rpx; | |||
} | |||
.test{ | |||
margin-top: 11rpx; | |||
} | |||
} | |||
} | |||
.content-sec{ | |||
border-top: 1px solid #E0E0E0; | |||
padding: 0 30rpx; | |||
padding-bottom: 30rpx; | |||
// height: 270rpx; | |||
position: relative; | |||
.content-sec-lab{ | |||
margin-top: 30rpx; | |||
display: flex; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 46rpx; | |||
.content-sec-lab1{ | |||
color: #333333; | |||
} | |||
.content-sec-tips{ | |||
max-width:160rpx ; | |||
height: 46rpx; | |||
background: #F2F2F2; | |||
border-radius: 6rpx; | |||
text-align: center; | |||
line-height: 26rpx; | |||
overflow: hidden; | |||
text-overflow:ellipsis; | |||
white-space: nowrap; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
margin-right: 20rpx; | |||
box-sizing: border-box; | |||
padding: 10rpx 24rpx; | |||
} | |||
} | |||
.content-sec-num{ | |||
position: absolute; | |||
width: 190rpx; | |||
height: 90rpx; | |||
background: #F4F8FD; | |||
border-radius: 12rpx; | |||
font-weight: 400; | |||
color: #2671E2; | |||
line-height: 45rpx; | |||
bottom: 30rpx; | |||
right: 30rpx; | |||
text-align: center; | |||
} | |||
} | |||
.content-last{ | |||
display: flex; | |||
border-top: 1px solid #E0E0E0; | |||
// padding: 0 30rpx; | |||
height: 78rpx; | |||
.content-last-tab{ | |||
width: 33.4%; | |||
text-align: center; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 78rpx; | |||
border-right: 1px solid #E0E0E0; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,453 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<!-- 编辑 --> | |||
<view class="conmsg"> | |||
<view class="conmsg-title"> | |||
客户信息 | |||
</view> | |||
<view class="conmsg-msg"> | |||
<view class="conmsg-msg-lab"> | |||
<view class="conmsg-msg-lab-1"> | |||
客户姓名 | |||
<view class="star"> | |||
* | |||
</view> | |||
</view> | |||
<view class="conmsg-msg-lab-inp"> | |||
<input type="text" placeholder="请输入客户姓名" placeholder-style="color:#B2B2B2;" v-model="form.name"/> | |||
</view> | |||
</view> | |||
<view class="conmsg-msg-lab"> | |||
<view class="conmsg-msg-lab-1"> | |||
客户性别 | |||
</view> | |||
<view class="conmsg-msg-lab-inp" style="margin-top: 20rpx;"> | |||
<!-- <u-radio-group v-model="form.sex" > | |||
<view style="display: flex;"> | |||
<u-radio name="1" shape='circle'>男</u-radio> | |||
<u-radio name="2" shape='circle'>女</u-radio> | |||
</view> | |||
</u-radio-group> --> | |||
<view style="border: none; display: flex;"> | |||
<view class="sexchose" @click="form.sex=1" :style="{border:form.sex==1?'1px solid #0A6EE9':'1px solid #E0E0E0'}"> | |||
男 | |||
</view> | |||
<view class="sexchose" @click="form.sex=2" :style="{border:form.sex==2?'1px solid #0A6EE9':'1px solid #E0E0E0'}"> | |||
女 | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="conmsg-msg-lab"> | |||
<view class="conmsg-msg-lab-1"> | |||
联系电话 | |||
<view class="star"> | |||
* | |||
</view> | |||
</view> | |||
<view class="conmsg-msg-lab-inp"> | |||
<input :disabled="dataCode!=6" type="number" placeholder="请输入联系电话" placeholder-style="color:#B2B2B2;" maxlength="11" v-model="form.phone"/> | |||
</view> | |||
</view> | |||
<view class="conmsg-msg-lab"> | |||
<view class="conmsg-msg-lab-1"> | |||
微信账号 | |||
</view> | |||
<view class="conmsg-msg-lab-inp"> | |||
<input type="text" placeholder="请输入微信账号" placeholder-style="color:#B2B2B2;" v-model="form.chatNo"/> | |||
</view> | |||
</view> | |||
<view class="conmsg-msg-lab"> | |||
<view class="conmsg-msg-lab-1"> | |||
客户等级 | |||
</view> | |||
<view class="conmsg-msg-lab-inp"> | |||
<input type="text" placeholder="请选择客户等级" @click="levelshow = true" v-model="selectform.level" disabled/> | |||
</view> | |||
<view class="conmsg-msg-lab-img"> | |||
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image> | |||
</view> | |||
</view> | |||
<!-- <view class="conmsg-msg-lab"> | |||
<view class="conmsg-msg-lab-1"> | |||
客户阶段 | |||
</view> | |||
<view class="conmsg-msg-lab-inp"> | |||
<input type="text" placeholder="请选择客户阶段" @click="stageshow = true" v-model="selectform.stage" disabled/> | |||
</view> | |||
<view class="conmsg-msg-lab-img"> | |||
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image> | |||
</view> | |||
</view> --> | |||
<view class="conmsg-msg-lab" style="border: none;"> | |||
<view class="conmsg-msg-lab-1"> | |||
备注内容 | |||
</view> | |||
<view class="conmsg-msg-lab-inp"> | |||
<input type="text" placeholder="请输入备注内容" placeholder-style="color:#B2B2B2;" v-model="form.remarks"/> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="conmsg" v-if="allList.length!=0"> | |||
<view class="conmsg-title"> | |||
客户标签 | |||
</view> | |||
<view class="conmsg-msg"> | |||
<view v-for="(item,index) in allList" :key="index"> | |||
<view class=""> | |||
<view class="conmsg-msg-lab" style="border: none;"> | |||
<view class="conmsg-msg-lab-1"> | |||
{{item.name}} | |||
</view> | |||
</view> | |||
<view class="con-msg-con" :style="{borderBottom:index==allList.length-1?'none':'1px solid #E0E0E0'}"> | |||
<view v-for="(item1,i) in item.children" :key="index" @click="Edittag(item,item1,index,i)" :style="{border:item1.selected==0?'1px solid #0A6EE9':'1px solid #E0E0E0'}" class="chebox" > | |||
{{item1.label}} | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="submit"> | |||
<view class="btn" @click="submit"> | |||
确定 | |||
</view> | |||
</view> | |||
<view class="" style="height: 220rpx;" > | |||
<!-- :style="{marginTop:allList.length!=0?'0':'500rpx'}" --> | |||
</view> | |||
<!-- 客户等级 --> | |||
<u-select v-model="levelshow" :list="levellist" @confirm="levelshowCallback"></u-select> | |||
<!-- 客户阶段 --> | |||
<!-- <u-select v-model="stageshow" :list="stagelist" @confirm="stageshowCallback"></u-select> --> | |||
<!-- 职业需求 --> | |||
<!-- <u-select v-model="demandshow" :list="demandlist" @confirm="demandshowCallback"></u-select> --> | |||
<!-- 意向面积 --> | |||
<!-- <u-select v-model="areashow" :list="arealist" @confirm="areashowCallback"></u-select> --> | |||
<!-- 预算 --> | |||
<!-- <u-select v-model="budgetshow" :list="budgetlist" @confirm="budgetshowCallback"></u-select> --> | |||
<!-- 关注点 --> | |||
<!-- <u-select v-model="fouceshow" :list="foucelist" @confirm="fouceshowCallback"></u-select> --> | |||
<!-- 客户来源 --> | |||
<!-- <u-select v-model="soureshow" :list="sourelist" @confirm="soureshowCallback"></u-select> --> | |||
</view> | |||
</template> | |||
<script> | |||
export default{ | |||
data(){ | |||
return{ | |||
form:{ | |||
name:'', | |||
sex:'1', | |||
phone:'', | |||
chatNo:'', | |||
level:'', | |||
remarks:'', | |||
}, | |||
selectform:{ | |||
level:'', | |||
stage:'', | |||
demand:'', | |||
area:'', | |||
budget:'', | |||
fouce:'', | |||
soure:'', | |||
}, | |||
levelshow:false, | |||
customerId:'', | |||
// 等级 | |||
levellist:[ | |||
{ | |||
value:1, | |||
label:'A' | |||
}, | |||
{ | |||
value:2, | |||
label:'B' | |||
}, | |||
{ | |||
value:3, | |||
label:'C' | |||
}, | |||
{ | |||
value:4, | |||
label:'D' | |||
}, | |||
], | |||
allList:[], | |||
dataCode:'' | |||
// stagelist:[], | |||
// // 置业需求 | |||
// demandlist:[], | |||
// // 意向面积 | |||
// arealist:[], | |||
// // 预算 | |||
// budgetlist:[], | |||
// // 关注点 | |||
// foucelist:[], | |||
// // 客户来源 | |||
// sourelist:[], | |||
} | |||
}, | |||
onLoad(e) { | |||
const { | |||
dataCode | |||
} = uni.getStorageSync("weapp_session_userInfo_data"); | |||
this.dataCode=dataCode | |||
console.log(e) | |||
// 先调用借口查询数据 | |||
this.customerId=e.id | |||
this.getdetail() | |||
}, | |||
methods:{ | |||
Edittag(item,item1,index,i){ | |||
// var selected=''; | |||
// console.log(item,item1,index,i) | |||
// return | |||
if(this.allList[index].children[i].selected==0){ | |||
this.allList[index].children[i].selected=1; | |||
}else{ | |||
this.allList[index].children[i].selected=0; | |||
} | |||
this.$forceUpdate() | |||
// this.$u.post("/matchKeywords/updatePersonalMatchData", { | |||
// carId: this.customerId, | |||
// selected:selected, | |||
// name:chend.name, | |||
// pid:chend.pid, | |||
// level:chend.level, | |||
// endName:chend.endName, | |||
// keywordsId:chend.keywordsId | |||
// }).then(res => { | |||
// }) | |||
}, | |||
sourecheck(index){ | |||
this.sourelist[index].checked=!this.sourelist[index].checked | |||
this.$forceUpdate() | |||
}, | |||
demandcheck(index){ | |||
this.demandlist[index].checked=!this.demandlist[index].checked | |||
this.$forceUpdate() | |||
}, | |||
areacheck(index){ | |||
this.arealist[index].checked=!this.arealist[index].checked | |||
this.$forceUpdate() | |||
}, | |||
levelshowCallback(e){ | |||
this.selectform.level=e[0].label | |||
this.form.level=e[0].value | |||
}, | |||
// 获取用户数据 | |||
getdetail(){ | |||
this.$u.get("customer/findById?",{id:this.customerId}) | |||
.then(res=>{ | |||
// console.log(res) | |||
this.form=res | |||
// 给客户等级赋值 | |||
let idx= this.levellist.findIndex(item=>item.value==res.level) | |||
if(idx!=-1){ | |||
this.selectform.level=this.levellist[idx].label | |||
} | |||
// 获取置业需求 | |||
this.getListByType() | |||
// // 获取意向面积 | |||
// this.getListByType() | |||
// // 获取客户来源 | |||
// this.getListByType() | |||
}) | |||
}, | |||
// 字典表接口 | |||
getListByType(){ | |||
this.$u.get("/matchKeywords/findPersonalMatchData",{customerId:this.customerId}) | |||
.then(res=>{ | |||
// console.log(res) | |||
res.forEach(item1=>{ | |||
item1.children.map(item=>{ | |||
if(item.isInterval==0){ | |||
item.label=item.name+item.unit+'-'+item.endName+item.unit; | |||
}else{ | |||
item.label=item.name | |||
} | |||
item.value=item.id; | |||
}) | |||
}) | |||
// console.log(res) | |||
this.allList=res | |||
// return | |||
}) | |||
}, | |||
// 提交 | |||
submit(){ | |||
let param={} | |||
let str=[] | |||
if(this.form.name==''){ | |||
uni.showToast({ | |||
title:'请输入客户姓名', | |||
icon:'none' | |||
}) | |||
return | |||
} | |||
if(this.form.phone==''){ | |||
uni.showToast({ | |||
title:'请输入手机号', | |||
icon:'none' | |||
}) | |||
return | |||
} | |||
if(!(/^1[3456789]\d{9}$/.test(this.form.phone))){ | |||
uni.showToast({ | |||
title: "请检查手机号码格式", | |||
icon:'none' | |||
}); | |||
// this.form.phone='' | |||
return false; | |||
} | |||
this.allList.map(item=>{ | |||
item.children.map(item1=>{ | |||
if(item1.selected==0){ | |||
str.push(item1.keywordsId) | |||
} | |||
}) | |||
}) | |||
str=str.join(',') | |||
param=this.form | |||
param.keywordIds=str | |||
console.log(param) | |||
// return | |||
this.$u.post("customer/update",param) | |||
.then(res=>{ | |||
// console.log(res) | |||
uni.showToast({ | |||
title:'操作成功', | |||
icon:'none', | |||
success: () => { | |||
uni.navigateBack() | |||
} | |||
}) | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box { | |||
width: 100%; | |||
height: 100%; | |||
background: #F8F8F8; | |||
overflow: hidden; | |||
} | |||
.conmsg{ | |||
background: #FFFFFF; | |||
margin-top: 20rpx; | |||
.conmsg-title{ | |||
height: 92rpx; | |||
line-height: 92rpx; | |||
font-weight: bold; | |||
padding: 0 30rpx; | |||
// font-weight: 500; | |||
color: #303030; | |||
font-size: 32rpx; | |||
border-bottom: 1px solid #E0E0E0; | |||
} | |||
.conmsg-msg{ | |||
padding: 0 30rpx; | |||
.conmsg-msg-lab{ | |||
height: 102rpx; | |||
display: flex; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
border-bottom: 1px solid #E0E0E0; | |||
line-height: 102rpx; | |||
.conmsg-msg-lab-1{ | |||
display: flex; | |||
min-width: 136rpx; | |||
.star{ | |||
color: #E7483C; | |||
line-height: 108rpx; | |||
} | |||
} | |||
.conmsg-msg-lab-inp{ | |||
margin-top: 30rpx; | |||
margin-left: 44rpx; | |||
} | |||
.conmsg-msg-lab-img{ | |||
width: 14rpx; | |||
height: 30rpx; | |||
margin-top: 6rpx; | |||
margin-left: auto; | |||
image{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.submit{ | |||
position: fixed; | |||
bottom: 20rpx; | |||
left: 20rpx; | |||
height: 120rpx; | |||
background: #FFFFFF; | |||
.btn{ | |||
// margin: 60rpx auto; | |||
text-align: center; | |||
width: 690rpx; | |||
height: 88rpx; | |||
background: #2671E2; | |||
border-radius: 8rpx; | |||
font-size: 32tpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
line-height: 88rpx; | |||
} | |||
} | |||
.con-msg-con{ | |||
display: flex; | |||
flex-wrap: wrap; | |||
// justify-content: space-around; | |||
border-bottom: 1px solid #E0E0E0; | |||
padding-bottom: 16rpx; | |||
.chebox{ | |||
// width: 20%; | |||
height: 60rpx; | |||
line-height: 60rpx; | |||
// margin: 10rpx 0; | |||
margin-bottom: 25rpx; | |||
margin-right: 20rpx; | |||
border: 1px solid #E0E0E0; | |||
box-sizing: border-box; | |||
padding: 0 10rpx; | |||
} | |||
} | |||
.sexchose{ | |||
width: 120rpx; | |||
height: 60rpx; | |||
background: #FFFFFF; | |||
border-radius: 4rpx; | |||
border: 1px solid #E0E0E0; | |||
text-align: center; | |||
line-height: 60rpx; | |||
margin-right: 20rpx; | |||
} | |||
</style> |
@@ -1,627 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<view> | |||
<view class="search-box"> | |||
<view class="search" @click="goSearch"> | |||
<view class="search-img"> | |||
<image class="search-img1" src="../../../static/images/search.png" mode=""></image> | |||
</view> | |||
<view class="search-text">输入客户姓名/手机号</view> | |||
</view> | |||
<view class="search-screen" @click="screenshow"> | |||
<image class="search-screen1" src="../../../static/images/screen.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="content"> | |||
<view v-if="recordList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;"> | |||
<view style="width: 100%;padding-top: 200rpx;background: #FFFFFF;"> | |||
<view style="width: 100%;text-align: center;"> | |||
<image style="width: 220rpx;height: 200rpx;" src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image> | |||
</view> | |||
<view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view> | |||
</view> | |||
</view> | |||
<view v-if="recordList.length!=0" class="content-tips" v-for="(item,index) in recordList" :key='index' @click="gotoDetail(item.id)"> | |||
<view class="content-first"> | |||
<view class="left"> | |||
<view v-if="item.level.length==0"></view> | |||
<view class="img" v-else-if="item.level==1">A</view> | |||
<view class="img" v-else-if="item.level==2">B</view> | |||
<view class="img" v-else-if="item.level==3">C</view> | |||
<view class="img" v-else-if="item.level==4">D</view> | |||
<view class="test">{{item.name}}</view> | |||
</view> | |||
<!-- <view class="right"> | |||
<view class="point"></view> | |||
<view class="test">定金</view> | |||
</view> --> | |||
</view> | |||
<view class="content-sec"> | |||
<view class="content-sec-lab"> | |||
手机号码:<view class="content-sec-lab1">{{item.phone || '--'}}</view> | |||
</view> | |||
<view class="content-sec-lab" style="line-height: 46rpx;"> | |||
客户标签: | |||
<text v-if="item.demand.cusSemanticWordsList==null">暂无</text> | |||
<view v-else class="content-sec-tips" v-for="(che,ind) in item.demand.cusSemanticWordsList" :key='ind'>{{che.name}}</view> | |||
</view> | |||
<view class="content-sec-lab"> | |||
顾问姓名:<view class="content-sec-lab1">{{item.agentName}}</view> | |||
</view> | |||
<view class="content-sec-lab"> | |||
添加时间:<view class="content-sec-lab1">{{item.createTime}}</view> | |||
</view> | |||
<view class="content-sec-num"> | |||
<view class="">{{item.visitRecord || '--'}}次到访</view> | |||
<view class="">{{item.fraction || '0'}}% | {{item.mm || '0'}}<text style="font-size: 24rpx;">min</text></view> | |||
</view> | |||
</view> | |||
<view class="content-last" v-if="item.isshow==true"> | |||
<!-- <view class="content-last-tab">添加提醒</view> | |||
<view class="content-last-tab">拨打电话</view> --> | |||
<view class="content-last-tab" @click.stop="gotoFollowUp(item.id)">写跟进</view> | |||
</view> | |||
</view> | |||
</view> | |||
<u-popup v-model="screenShow" mode="top" > | |||
<view class="screen"> | |||
<!-- 顾问选择 --> | |||
<view class="screen-counselor"> | |||
<view class="screen-text"> | |||
所属顾问 | |||
</view> | |||
<view class="screen-sel"> | |||
<u-input v-model="screen.agentIdtext" type="text" placeholder='请选择' @click="selectshow = true" class="screen-inp" disabled /> | |||
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image> | |||
</view> | |||
</view> | |||
<view class="screen-counselor"> | |||
<view class="screen-text"> | |||
客户标签 | |||
</view> | |||
<view class="screen-sel"> | |||
<u-input v-model="screen.cunsumerTips" type="text" placeholder='请选择' @click="selectTipshow = true" class="screen-inp" disabled /> | |||
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image> | |||
</view> | |||
</view> | |||
<!-- 录音标示 --> | |||
<view class="screen-record"> | |||
<view class="screen-record-text"> | |||
客户等级 | |||
</view> | |||
<view class="screen-record-tab"> | |||
<view :class="[screen.record==0?'screen-record-chose':'screen-record-nochose']" @click="recordclick(0)"> | |||
A | |||
</view> | |||
<view :class="[screen.record==1?'screen-record-chose':'screen-record-nochose']" @click="recordclick(1)"> | |||
B | |||
</view> | |||
<view :class="[screen.record==2?'screen-record-chose':'screen-record-nochose']" @click="recordclick(2)"> | |||
C | |||
</view> | |||
<view :class="[screen.record==3?'screen-record-chose':'screen-record-nochose']" @click="recordclick(3)"> | |||
D | |||
</view> | |||
</view> | |||
</view> | |||
<!-- <view class="screen-record"> | |||
<view class="screen-record-text"> | |||
客户阶段 | |||
</view> | |||
<view class="screen-record-tab"> | |||
<view v-for="(item,index) in stageList" :key="index"> | |||
<view :class="[screen.stage==index?'screen-record-chose':'screen-record-nochose']" @click="screen.stage=index" style="width: 120rpx;"> | |||
{{item}} | |||
</view> | |||
</view> | |||
</view> | |||
</view> --> | |||
<view class="screen-record"> | |||
<view class="screen-record-text"> | |||
到访次数 | |||
</view> | |||
<view class="screen-record-tab"> | |||
<view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(1)"> | |||
首次到访 | |||
</view> | |||
<view :class="[screen.visitRecord==2?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(2)"> | |||
第二次 | |||
</view> | |||
<view :class="[screen.visitRecord==3?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(3)"> | |||
第三次 | |||
</view> | |||
<view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(4)"> | |||
三次以上 | |||
</view> | |||
</view> | |||
</view> | |||
<view class="screen-foot"> | |||
<view class="screen-foot-reset" @click="reset"> | |||
重置 | |||
</view> | |||
<view class="screen-foot-sure" @click="screensure"> | |||
确定 | |||
</view> | |||
</view> | |||
</view> | |||
</u-popup> | |||
<!-- 选择顾问的选择框 --> | |||
<u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select> | |||
<!-- 客户标签 --> | |||
<u-select v-model="selectTipshow" :list="findKeywordsList" @confirm="selectCallback"></u-select> | |||
</view> | |||
</template> | |||
<script> | |||
export default{ | |||
data(){ | |||
return{ | |||
value:'', | |||
screenShow:false, | |||
selectshow:false, | |||
selectTipshow:false, | |||
buildingID:'', | |||
screen:{ | |||
agentId:'', | |||
agentIdtext:'', | |||
visitRecord:'', | |||
record:null, | |||
cunsumerTips:'', | |||
cunsumerTipsid:'' | |||
}, | |||
stageList:['未知','到访','意向','定金','成交'], | |||
recordList:[], | |||
nextPage:1, | |||
totalRecord:'', | |||
freeList:[], | |||
userInfo:{}, | |||
findKeywordsList:[], | |||
isnorefresh:'' | |||
} | |||
}, | |||
onLoad(options) { | |||
this.isnorefresh=options.refresh; | |||
}, | |||
onShow() { | |||
if(this.isnorefresh=='refresh'){ | |||
this.buildingID = uni.getStorageSync('buildingID').id; | |||
this.nextPage=1; | |||
this.recordList=[] | |||
this.getMyCustom() | |||
this.getFreeList() | |||
this.getfindKeywordsList() | |||
this.isnorefresh=''; | |||
} | |||
}, | |||
onReachBottom() { | |||
if(this.totalRecord==this.nextPage){ | |||
uni.showToast({ | |||
icon:'none', | |||
title: '到底了', | |||
duration: 2000 | |||
}); | |||
return | |||
}else{ | |||
this.nextPage+=1; | |||
this.getMyCustom(); | |||
} | |||
}, | |||
methods:{ | |||
recordclick(i){ | |||
if(this.screen.record==i){ | |||
this.screen.record=null | |||
}else{ | |||
this.screen.record=i | |||
} | |||
}, | |||
screenvisitRecord(i){ | |||
if(this.screen.visitRecord==i){ | |||
this.screen.visitRecord='' | |||
}else{ | |||
this.screen.visitRecord=i | |||
} | |||
}, | |||
// 客户详情 | |||
gotoDetail(id) { | |||
uni.navigateTo({ | |||
url: `/pages/center/consumer/consumerDetail?id=${id}` | |||
}) | |||
}, | |||
getMyCustom(){ | |||
var parames = { | |||
pageNum: this.nextPage, | |||
pageSize: 10, | |||
query: { | |||
projectId:this.buildingID, | |||
keywordsId:this.screen.cunsumerTipsid, | |||
agentId:this.screen.agentId | |||
} | |||
}; | |||
if (this.screen.visitRecord > 0) { | |||
parames.query.visitRecord = this.screen.visitRecord; | |||
} | |||
if(this.screen.record==0){ | |||
parames.query.levels= ["1"] | |||
}else if(this.screen.record==1){ | |||
parames.query.levels= ["2"] | |||
}else if(this.screen.record==2){ | |||
parames.query.levels= ["3"] | |||
}else if(this.screen.record==3){ | |||
parames.query.levels= ["4"] | |||
}else{ | |||
parames.query.levels='' | |||
} | |||
this.userInfo = uni.getStorageSync('weapp_session_userInfo_data'); | |||
this.$u.post("/customer/customerManagement", parames).then(data => { | |||
var list = data.results || []; | |||
list.forEach(item=>{ | |||
if(this.userInfo.dataCode == 6){ | |||
item.isshow=true; | |||
}else{ | |||
item.isshow=false; | |||
} | |||
}) | |||
list.forEach(item=>{ | |||
if(item.demand.cusSemanticWordsList!=null){ | |||
item.demand.cusSemanticWordsList.forEach(che=>{ | |||
if(che.isInterval==0){ | |||
che.name=che.name+che.unit+'-'+che.endName+che.unit; | |||
} | |||
}) | |||
} | |||
}) | |||
this.recordList = [...this.recordList, ...list]; | |||
this.totalRecord=data.totalPage; | |||
}) | |||
}, | |||
//获取顾问列表 | |||
getFreeList() { | |||
this.freeList=[] | |||
this.$u.get("/zkAgentPool/freeList?itemId="+this.buildingID).then(res => { | |||
this.freeList = res; | |||
this.freeList.forEach(item=>{ | |||
item.label=item.name; | |||
item.value=item.agentId | |||
}) | |||
}) | |||
}, | |||
//获取客户标签 | |||
getfindKeywordsList() { | |||
this.findKeywordsList=[] | |||
this.$u.post("/customer/findKeywords",{houseId:this.buildingID}).then(res => { | |||
res.forEach(item=>{ | |||
if(item.isInterval==0){ | |||
item.label=item.name+item.unit+'-'+item.endName+item.unit; | |||
}else{ | |||
item.label=item.name | |||
} | |||
item.value=item.id; | |||
}) | |||
this.findKeywordsList = res; | |||
}) | |||
}, | |||
// 筛选 | |||
screenshow(){ | |||
this.screenShow=true | |||
}, | |||
//选择顾问 | |||
actionSelectCallback(e){ | |||
this.screen.agentId=e[0].value; | |||
this.screen.agentIdtext=e[0].label; | |||
}, | |||
//选择标签 | |||
selectCallback(e){ | |||
this.screen.cunsumerTips=e[0].label; | |||
this.screen.cunsumerTipsid=e[0].value; | |||
}, | |||
//重置 | |||
reset(){ | |||
this.screen={ | |||
agentId:'', | |||
agentIdtext:'', | |||
visitRecord:'', | |||
record:null, | |||
cunsumerTips:'', | |||
cunsumerTipsid:'' | |||
} | |||
this.nextPage=1; | |||
this.recordList=[]; | |||
this.screenShow=false; | |||
this.getMyCustom(); | |||
}, | |||
//筛选确认 | |||
screensure(){ | |||
this.nextPage=1; | |||
this.recordList=[]; | |||
this.screenShow=false; | |||
this.getMyCustom(); | |||
}, | |||
goSearch(){ | |||
uni.navigateTo({ | |||
url: '/pages/center/consumer/consumerSearch' | |||
}); | |||
}, | |||
gotoFollowUp(id) { | |||
uni.navigateTo({ | |||
url: `/pages/center/consumer/newFollowup/newFollowup?id=${id}` | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box { | |||
width: 100%; | |||
height: 100%; | |||
background: #F8F8F8; | |||
} | |||
.search-box{ | |||
width: 100%; | |||
height: 102rpx; | |||
background: #FFFFFF; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
.search{ | |||
width: 620rpx; | |||
height: 70rpx; | |||
display: flex; | |||
align-items: center; | |||
background: #F8F8F8; | |||
border-radius: 33rpx; | |||
.search-img{ | |||
width: 26rpx; | |||
height: 30rpx; | |||
margin-left: 20rpx; | |||
.search-img1{ | |||
width: 100%; | |||
height: 100%; | |||
margin-top: 2rpx; | |||
} | |||
} | |||
.search-text{ | |||
font-size: 28rpx; | |||
font-weight: 400; | |||
color: #999999; | |||
margin-left:10rpx; | |||
} | |||
} | |||
.search-screen{ | |||
width: 40rpx; | |||
height: 40rpx; | |||
margin-left: 30rpx; | |||
.search-screen1{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
} | |||
} | |||
.content{ | |||
// height: 1000rpx;/ | |||
overflow: hidden; | |||
border-top: 1px solid #E0E0E0; | |||
.content-tips{ | |||
background: #fff; | |||
// box-sizing: border-box; | |||
margin-bottom: 20rpx; | |||
overflow: hidden; | |||
.content-first{ | |||
padding: 19rpx 30rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
box-sizing: border-box; | |||
// border-top: 1px solid #E0E0E0; | |||
font-weight: 400; | |||
color: #292929; | |||
height: 90rpx; | |||
font-size: 30rpx; | |||
line-height: 30rpx; | |||
.left{ | |||
display: flex; | |||
.img{ | |||
// margin-top: 19rpx; | |||
width: 52rpx; | |||
height: 52rpx; | |||
border: 1px solid #E0E0E0; | |||
border-radius: 50%; | |||
text-align: center; | |||
line-height: 50rpx; | |||
margin-right: 20rpx; | |||
} | |||
.test{ | |||
margin-top: 11rpx; | |||
// margin-left: 20rpx; | |||
font-weight: 500; | |||
color: #333333; | |||
} | |||
} | |||
.right{ | |||
display: flex; | |||
.point{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
background: #2B6EFF; | |||
border-radius: 50%; | |||
margin-right: 9rpx; | |||
margin-top: 20rpx; | |||
} | |||
.test{ | |||
margin-top: 11rpx; | |||
} | |||
} | |||
} | |||
.content-sec{ | |||
border-top: 1px solid #E0E0E0; | |||
padding: 0 30rpx; | |||
padding-bottom: 30rpx; | |||
// height: 270rpx; | |||
position: relative; | |||
.content-sec-lab{ | |||
margin-top: 30rpx; | |||
display: flex; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 46rpx; | |||
.content-sec-lab1{ | |||
color: #333333; | |||
} | |||
.content-sec-tips{ | |||
max-width:160rpx ; | |||
height: 46rpx; | |||
background: #F2F2F2; | |||
border-radius: 6rpx; | |||
text-align: center; | |||
line-height: 26rpx; | |||
overflow: hidden; | |||
text-overflow:ellipsis; | |||
white-space: nowrap; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
margin-right: 20rpx; | |||
box-sizing: border-box; | |||
padding: 10rpx 24rpx; | |||
} | |||
} | |||
.content-sec-num{ | |||
position: absolute; | |||
width: 200rpx; | |||
height: 90rpx; | |||
background: #F4F8FD; | |||
border-radius: 12rpx; | |||
font-weight: 400; | |||
color: #2671E2; | |||
line-height: 45rpx; | |||
bottom: 30rpx; | |||
right: 30rpx; | |||
text-align: center; | |||
} | |||
} | |||
.content-last{ | |||
display: flex; | |||
border-top: 1px solid #E0E0E0; | |||
// padding: 0 30rpx; | |||
height: 78rpx; | |||
.content-last-tab{ | |||
width: 33.4%; | |||
text-align: center; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 78rpx; | |||
border-right: 1px solid #E0E0E0; | |||
} | |||
} | |||
} | |||
} | |||
// 这是弹出层 | |||
.screen{ | |||
// box-sizing: border-box; | |||
// padding: 0 30rpx; | |||
.screen-counselor{ | |||
display: flex; | |||
height: 106rpx; | |||
// padding: 40rpx 30rpx 36rpx 30rpx; | |||
padding: 0 30rpx; | |||
box-sizing: border-box; | |||
border-bottom: 1px solid #E0E0E0; | |||
.screen-text{ | |||
margin: 40rpx 0 36rpx 0; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 30rpx; | |||
} | |||
.screen-sel{ | |||
display: flex; | |||
justify-content: space-between; | |||
width: 500rpx; | |||
margin-left: 60rpx; | |||
.screen-sel-img{ | |||
margin: 40rpx 0 36rpx 0; | |||
width: 14rpx; | |||
height: 30rpx; | |||
} | |||
.screen-inp{ | |||
margin-top: 20rpx; | |||
} | |||
} | |||
} | |||
.screen-record{ | |||
height: 192rpx; | |||
// width: 100%; | |||
overflow: hidden; | |||
padding: 0 30rpx; | |||
box-sizing: border-box; | |||
border-bottom: 1px solid #E0E0E0; | |||
.screen-record-text{ | |||
margin-top: 36rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 30rpx; | |||
} | |||
.screen-record-tab{ | |||
margin-top: 30rpx; | |||
display: flex; | |||
// justify-content: space-around; | |||
.screen-record-chose{ | |||
width: 156rpx; | |||
height: 60rpx; | |||
background: #2671E2; | |||
border-radius: 4rpx; | |||
border: 1px solid #2671E2; | |||
text-align: center; | |||
line-height: 60rpx; | |||
margin-right: 22rpx; | |||
color: #FFFFFF; | |||
} | |||
.screen-record-nochose{ | |||
width: 156rpx; | |||
height: 60rpx; | |||
background: #FFFFFF; | |||
border-radius: 4rpx; | |||
border: 1px solid #C9C9C9; | |||
text-align: center; | |||
line-height: 60rpx; | |||
margin-right: 22rpx; | |||
} | |||
} | |||
} | |||
.screen-foot{ | |||
width: 100%; | |||
height: 88rpx; | |||
display: flex; | |||
.screen-foot-reset{ | |||
width: 50%; | |||
text-align: center; | |||
height: 88rpx; | |||
line-height: 88rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
} | |||
.screen-foot-sure{ | |||
width: 50%; | |||
text-align: center; | |||
line-height: 88rpx; | |||
height: 88rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
background: #2671E2; | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,265 +0,0 @@ | |||
/* 新增客户跟进 */ | |||
page { | |||
background: #f9f9f9; | |||
} | |||
.follow_up { | |||
} | |||
/* 最新状态 */ | |||
.follow_up_list { | |||
padding: 0rpx 30rpx 0rpx 30rpx; | |||
box-sizing: border-box; | |||
background: #fff; | |||
overflow: hidden; | |||
margin-bottom: 0rpx; | |||
} | |||
.follow_up_list_title { | |||
display: flex; | |||
align-items: center; | |||
} | |||
.follow_up_list_title image { | |||
width: 19rpx; | |||
height: 18rpx; | |||
display: block; | |||
margin-right: 10rpx; | |||
} | |||
.follow_up_list_title label { | |||
height: 42rpx; | |||
font-size: 30rpx; | |||
font-weight: 600; | |||
color: rgba(51, 51, 51, 1); | |||
line-height: 42rpx; | |||
letter-spacing: 1rpx; | |||
} | |||
.follow_up_list_label { | |||
margin-top: 30rpx; | |||
} | |||
.follow_up_list_label view { | |||
padding: 0rpx 25rpx; | |||
height: 50rpx; | |||
border-radius: 8rpx; | |||
border: 2rpx solid rgba(206, 206, 206, 1); | |||
float: left; | |||
color: rgba(97, 110, 135, 1); | |||
font-size: 26rpx; | |||
line-height: 50rpx; | |||
margin-left: 20rpx; | |||
margin-bottom: 22rpx; | |||
} | |||
.active { | |||
background: rgba(42, 111, 255, 1); | |||
border: 2rpx solid rgba(42, 111, 255, 1) !important; | |||
color: #fff !important; | |||
} | |||
/* 意向级别 */ | |||
.assess-star { | |||
padding: 10rpx 0rpx 0rpx 20rpx; | |||
box-sizing: border-box; | |||
display: flex; | |||
align-items: center; | |||
} | |||
.star-wrap { | |||
display: flex; | |||
align-items: center; | |||
} | |||
.star-item { | |||
display: inline-block; | |||
height: 38rpx; | |||
width: 36rpx; | |||
margin-right: 0rpx; | |||
} | |||
.star-item image { | |||
width: 26rpx; | |||
height: 26rpx; | |||
margin-left: 10rpx; | |||
} | |||
.star-desc { | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: rgba(97, 110, 135, 1); | |||
text-align: center; | |||
height: 44rpx; | |||
margin-left: 27rpx; | |||
line-height: 44rpx; | |||
} | |||
/* 跟进内容 */ | |||
.follow_content { | |||
background: #fff; | |||
padding: 30rpx; | |||
box-sizing: border-box; | |||
position: relative; | |||
} | |||
.follow_content_title { | |||
color: #333; | |||
font-size: 30rpx; | |||
line-height: 42rpx; | |||
} | |||
.follow_content_title em { | |||
color: #a6a6a6; | |||
} | |||
.follow_content_textarea { | |||
padding: 30rpx 20rpx; | |||
box-sizing: border-box; | |||
font-size: 30rpx; | |||
width: 100%; | |||
height: 200rpx; | |||
} | |||
.follow_content .voice{ | |||
width: 100rpx; | |||
margin-left: calc(50% - 50rpx); | |||
z-index: 10000; | |||
} | |||
.place { | |||
color: #a6a6a6; | |||
line-height: 42px; | |||
font-size: 30rpx; | |||
} | |||
.follow_btn { | |||
width: 688rpx; | |||
height: 90rpx; | |||
background: rgba(221, 221, 223, 1); | |||
border-radius: 8rpx; | |||
line-height: 90rpx; | |||
margin: 50rpx auto; | |||
color: #fff; | |||
text-align: center; | |||
font-size: 34rpx; | |||
} | |||
.follow_btn_active { | |||
background: rgba(42, 111, 255, 1); | |||
} | |||
/* 提醒 */ | |||
.tixing{ | |||
width: 100rpx; | |||
height: 50rpx; | |||
text-align: center; | |||
line-height: 50rpx; | |||
float: right; | |||
} | |||
.tixing image{ | |||
width: 26rpx; | |||
height: 30rpx; | |||
display: inline-block; | |||
} | |||
.mask{ | |||
width: 100%; | |||
height: 100%; | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
z-index: 999; | |||
background:rgba(0,0,0,0.61); | |||
} | |||
.time-box{ | |||
position: fixed; | |||
width: 100%; | |||
bottom: 0; | |||
left: 0; | |||
z-index: 9999; | |||
background: #fff; | |||
box-sizing: content-box | |||
} | |||
.time-title{ | |||
float:left; | |||
width:20%; | |||
text-align:center; | |||
color:rgba(51, 51, 51, 1); | |||
} | |||
.time-title-box{ | |||
border-top: 1rpx solid rgba(51, 51, 51, 1); | |||
height: 70rpx; | |||
font-size: 31rpx; | |||
line-height: 70rpx; | |||
color: rgba(51, 51, 51, 1); | |||
} | |||
.picker-text{ | |||
text-align:center; | |||
width: calc(750rpx / 5); | |||
background: #fff; | |||
} | |||
.time-text{ | |||
text-align: center; | |||
color: rgba(51, 51, 51, 1); | |||
height: 90rpx; | |||
font-size: 33rpx; | |||
line-height: 90rpx; | |||
} | |||
.time-sure{ | |||
float: right; | |||
/* margin-right: 20rpx; */ | |||
font-size: 33rpx; | |||
width: 120rpx; | |||
height: 100%; | |||
} | |||
.tixing1 { | |||
width: 26rpx; | |||
height: 32rpx; | |||
display: inline-block; | |||
margin-right: 10rpx; | |||
} | |||
.tixingBox{ | |||
width:750rpx; | |||
height:109rpx; | |||
background:rgba(255,255,255,1); | |||
color:rgba(17, 94, 255, 1); | |||
display: flex; | |||
align-items: center; | |||
line-height: 109rpx; | |||
padding: 0 30rpx; | |||
box-sizing: border-box; | |||
margin-top: 21rpx; | |||
} | |||
.tixing{ | |||
width: 160rpx; | |||
height: 60rpx; | |||
background: rgba(42,111,255,1); | |||
border-radius: 35rpx; | |||
padding: 0 22rpx; | |||
box-sizing: border-box; | |||
display: flex; | |||
justify-content: space-around; | |||
line-height: 60rpx; | |||
font-size: 28rpx; | |||
font-family: PingFangSC-Medium,PingFang SC; | |||
font-weight: 500; | |||
color: rgba(255,255,255,1); | |||
margin-left: 368rpx; | |||
} | |||
.tixing image{ | |||
width: 30rpx; | |||
height: 30rpx; | |||
margin-top: 15rpx; | |||
margin-right: 0; | |||
} | |||
.active1{ | |||
background:#DEDEDE; | |||
} |
@@ -1,299 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<view class="screen"> | |||
<!-- 录音标示 --> | |||
<view class="screen-record"> | |||
<view class="screen-record-text"> | |||
最新状态 | |||
</view> | |||
<view class="screen-record-tab"> | |||
<view v-for="(item,index) in stateList" :key="index"> | |||
<view :class="[screen.state==index?'screen-record-chose':'screen-record-nochose']" @click="screen.state=index"> | |||
{{item.stageName}} | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 录音标示 --> | |||
<view class="screen-record"> | |||
<view class="screen-record-text"> | |||
意向级别 | |||
</view> | |||
<view class="screen-record-tab"> | |||
<view :class="[screen.level==1?'screen-record-chose':'screen-record-nochose']" @click="screen.level=1"> | |||
A | |||
</view> | |||
<view :class="[screen.level==2?'screen-record-chose':'screen-record-nochose']" @click="screen.level=2"> | |||
B | |||
</view> | |||
<view :class="[screen.level==3?'screen-record-chose':'screen-record-nochose']" @click="screen.level=3"> | |||
C | |||
</view> | |||
<view :class="[screen.level==4?'screen-record-chose':'screen-record-nochose']" @click="screen.level=4"> | |||
D | |||
</view> | |||
</view> | |||
</view> | |||
<view class="screen-record" style="height: auto;"> | |||
<view class="screen-record-text" style="margin-bottom: 20rpx;"> | |||
客户类型 | |||
</view> | |||
<!-- <u-search placeholder="请输入搜索" v-model="keyword" :clearabled="true" :show-action="false" @change="search"></u-search> --> | |||
<scroll-view style="height: 180rpx;" scroll-y="true" > | |||
<view class="screen-record-tab" style="flex-wrap: wrap;"> | |||
<view v-for="(item,index) in customerType" :key="index"> | |||
<view :class="[item.check?'screen-record-chose':'screen-record-nochose']" style="margin-bottom: 20rpx;" @click="checkbox(index)"> | |||
{{item.keywords}} | |||
</view> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
</view> | |||
<view class="screen-record"> | |||
<view class="screen-record-text"> | |||
跟进内容 | |||
</view> | |||
<view class="screen-record-tab"> | |||
<input type="text" placeholder="请输入跟进内容" v-model="screen.con"/> | |||
</view> | |||
</view> | |||
<view class="screen-foot"> | |||
<view class="screen-foot-sure" @click="screensure"> | |||
保存 | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default{ | |||
data(){ | |||
return{ | |||
value:'', | |||
screenShow:false, | |||
selectshow:false, | |||
selectTipshow:false, | |||
buildingID:'', | |||
keyword:'', | |||
screen:{ | |||
state:'0', | |||
con:"", | |||
level:'1' | |||
}, | |||
stateList:[], | |||
recordList:[], | |||
nextPage:1, | |||
totalRecord:'', | |||
freeList:[], | |||
customerType:[], | |||
customerId:'' | |||
} | |||
}, | |||
onShow() { | |||
}, | |||
onLoad(e) { | |||
this.customerId=e.id | |||
this.buildingID = uni.getStorageSync('buildingID').id; | |||
this.recordList=[] | |||
// this.getMyCustom() | |||
// this.getFreeList() | |||
this.getNewStatus() | |||
this.getCustomerType(); | |||
}, | |||
methods:{ | |||
//选择顾问 | |||
actionSelectCallback(e){ | |||
this.screen.agentId=e[0].value; | |||
this.screen.agentIdtext=e[0].label; | |||
}, | |||
getCustomerType(){ | |||
this.$u.get("/customer/queryKeyWords").then(res => { | |||
res.map(item=>{ | |||
item.check=false | |||
}) | |||
this.customerType = res; | |||
}) | |||
}, | |||
getNewStatus() { | |||
var that = this; | |||
let premo={ | |||
houseId:uni.getStorageSync('buildingID').id | |||
} | |||
this.$u.post('/customer/getStage',premo) | |||
.then(res=>{ | |||
this.stateList=res | |||
}) | |||
}, | |||
checkbox(idx){ | |||
console.log(idx) | |||
this.customerType[idx].check=!this.customerType[idx].check | |||
}, | |||
search(e){ | |||
console.log(e) | |||
}, | |||
//选择标签 | |||
selectCallback(e){ | |||
console.log(e[0].label) | |||
}, | |||
//筛选确认 | |||
screensure(){ | |||
// 获取选择过的数据 | |||
// let type=[] | |||
let words=[] | |||
this.customerType.map(item=>{ | |||
if(item.check){ | |||
// type.push(item.id) | |||
words.push(item.keywords) | |||
} | |||
}) | |||
if (words.length == 0 ) { | |||
uni.showModal({ | |||
title: '提示', | |||
content: '请选择、类型', | |||
showCancel: false | |||
}); | |||
return; | |||
} | |||
uni.showLoading({ | |||
title: "保存中~", | |||
mask: true | |||
}) | |||
// console.log(type) | |||
let param={ | |||
"stageCode": this.stateList[this.screen.state].stageCode, | |||
"stageName": this.stateList[this.screen.state].stageName, | |||
"remarks": this.screen.con, | |||
words, | |||
// "settingTime":"", | |||
"agentRelationPo": { | |||
"customerId": this.customerId, | |||
"level": this.screen.level, | |||
"state": this.stateList[this.screen.state].id | |||
} | |||
} | |||
this.$u.post('/customer/addZkDailyWorkRecord',param) | |||
.then(res=>{ | |||
// util.showSuccess("提交成功"); | |||
uni.hideLoading(); | |||
uni.navigateBack(); | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box { | |||
width: 100%; | |||
height: 100%; | |||
background: #F8F8F8; | |||
} | |||
.screen{ | |||
// box-sizing: border-box; | |||
// padding: 0 30rpx; | |||
background: #FFFFFF; | |||
.screen-counselor{ | |||
display: flex; | |||
height: 106rpx; | |||
// padding: 40rpx 30rpx 36rpx 30rpx; | |||
padding: 0 30rpx; | |||
box-sizing: border-box; | |||
border-bottom: 1px solid #CCCCCC; | |||
.screen-text{ | |||
margin: 40rpx 0 36rpx 0; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 30rpx; | |||
} | |||
.screen-sel{ | |||
display: flex; | |||
justify-content: space-between; | |||
width: 500rpx; | |||
margin-left: 60rpx; | |||
.screen-sel-img{ | |||
margin: 40rpx 0 36rpx 0; | |||
width: 14rpx; | |||
height: 30rpx; | |||
} | |||
.screen-inp{ | |||
margin-top: 20rpx; | |||
} | |||
} | |||
} | |||
.screen-record{ | |||
height: 192rpx; | |||
// width: 100%; | |||
overflow: hidden; | |||
padding: 0 30rpx; | |||
box-sizing: border-box; | |||
border-bottom: 1px solid #CCCCCC; | |||
.screen-record-text{ | |||
margin-top: 36rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 30rpx; | |||
} | |||
.screen-record-tab{ | |||
margin-top: 30rpx; | |||
display: flex; | |||
// justify-content: space-around; | |||
.screen-record-chose{ | |||
width: 151rpx; | |||
height: 60rpx; | |||
background: #FFFFFF; | |||
border-radius: 4rpx; | |||
border: 1px solid #2671E2; | |||
text-align: center; | |||
line-height: 60rpx; | |||
margin-right: 22rpx; | |||
} | |||
.screen-record-nochose{ | |||
width: 151rpx; | |||
height: 60rpx; | |||
background: #FFFFFF; | |||
border-radius: 4rpx; | |||
border: 1px solid #C9C9C9; | |||
text-align: center; | |||
line-height: 60rpx; | |||
margin-right: 22rpx; | |||
} | |||
} | |||
} | |||
.screen-foot{ | |||
height: 88rpx; | |||
display: flex; | |||
width: 100%; | |||
margin-top: 160rpx; | |||
.screen-foot-reset{ | |||
width: 80%; | |||
text-align: center; | |||
margin: 0 auto; | |||
line-height: 88rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
} | |||
.screen-foot-sure{ | |||
width: 80%; | |||
margin: 0 auto; | |||
text-align: center; | |||
line-height: 88rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
background: #2671E2; | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,225 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<view class="conmsg"> | |||
<view class="conmsg-lab"> | |||
<view class="conmsg-lab-1"> | |||
客户信息 | |||
</view> | |||
<view class="conmsg-lab-2"> | |||
<!-- 李先生/12385945986 --> | |||
{{str}} | |||
</view> | |||
</view> | |||
<view class="conmsg-lab" style="border: none;"> | |||
<view class="conmsg-lab-1"> | |||
提醒时间 | |||
</view> | |||
<view class="conmsg-lab-3"> | |||
<!-- 请选择提醒时间(必填) --> | |||
<KXDateTime :date='date' :end='enddate' :start='startdate' @rundata='kxdatetime' default='start' placeholder='请选择时间'></KXDateTime> | |||
</view> | |||
<view class="conmsg-lab-4"> | |||
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="conent"> | |||
<u-input v-model="value" type="textarea" height="148" :auto-height="true" /> | |||
</view> | |||
<view class="btn" @click="add"> | |||
添加提醒 | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../../utils/util.js"); | |||
import KXDateTime from "@/components/kx-datetime/kx-datetime.vue" | |||
export default{ | |||
data(){ | |||
return{ | |||
str:'', | |||
date: '', | |||
// startdate:new Date().toLocaleDateString()+'00:00', | |||
startdate:'2021-01-01 00:00', | |||
enddate: '2025-12-30 23:59', | |||
code:'', | |||
customerId:'', | |||
value:'', | |||
} | |||
}, | |||
components:{ | |||
KXDateTime | |||
}, | |||
methods:{ | |||
kxdatetime(e) { | |||
console.log(e) | |||
this.date = e | |||
}, | |||
add(){ | |||
// console.log(new Date().toLocaleDateString()) | |||
// return | |||
if(!this.date){ | |||
uni.showToast({ | |||
title:'请选择时间', | |||
icon:'none' | |||
}) | |||
return | |||
} | |||
if(!this.value){ | |||
uni.showToast({ | |||
title:'请填写备注', | |||
icon:'none' | |||
}) | |||
return | |||
} | |||
const that = this; // 检测是否已经授权,有授权直接弹窗,没授权弹出授权 | |||
uni.getSetting({ | |||
withSubscriptions: true, | |||
success(res) { | |||
console.log(res); | |||
if (res && res.subscriptionsSetting && res.subscriptionsSetting.itemSettings && res | |||
.subscriptionsSetting | |||
.itemSettings['cBnJvhkMPHp0ReUiSdpM_Pd2usGeEEW6wx-5s6X4hEI'] == 'accept') { | |||
that.addFlag() | |||
} else { | |||
uni.requestSubscribeMessage({ | |||
tmplIds: ['cBnJvhkMPHp0ReUiSdpM_Pd2usGeEEW6wx-5s6X4hEI'], | |||
success(res) { | |||
that.addFlag() | |||
}, | |||
fail(res) { | |||
console.log(res); | |||
util.showNone("请授权"); | |||
} | |||
}); | |||
} | |||
}, | |||
fail(res) { | |||
console.log(res); | |||
} | |||
}); | |||
}, | |||
addFlag(){ | |||
var that = this; | |||
var params = { | |||
customerId: that.customerId, | |||
orderRemindTime: that.date + ':00', | |||
code: that.code, | |||
remarks:this.value, | |||
OrderRemindDesc:this.value | |||
}; | |||
this.$u.post("/customer/settingTime", params).then(data => { | |||
uni.showToast({ | |||
title: '操作成功' | |||
}); | |||
uni.navigateBack() | |||
// var data = that.orderRemindDate + ':00'; | |||
// var setData = new Date(data).getTime(); | |||
// var newData = new Date().getTime(); | |||
// console.log(setData, newData); | |||
// if (setData < newData) { | |||
// this.setData({ | |||
// overdue: true | |||
// }); | |||
// } else { | |||
// this.setData({ | |||
// overdue: false | |||
// }); | |||
// } | |||
// this.setData({ | |||
// show: false, | |||
// value: [this.year, Number(this.month) - 1, Number(this.day) - 1, this.hour, this | |||
// .minute | |||
// ], | |||
// orderRemindDate1: that.orderRemindDate + ':00' | |||
// }); | |||
}); | |||
}, | |||
}, | |||
onLoad(e) { | |||
// console.log(e) | |||
this.str=e.str | |||
this.customerId=e.customerId||'' | |||
const that = this; | |||
let num=new Date().toLocaleDateString().split('/').join('-')+' '+new Date().getHours()+':'+ new Date().getMinutes() | |||
this.startdate=num | |||
console.log(num) | |||
uni.login({ | |||
success(res) { | |||
if (res.code) { | |||
that.code=res.code | |||
} else { | |||
console.log('登录失败!' + res.errMsg); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box { | |||
width: 100%; | |||
height: 100%; | |||
background: #F8F8F8; | |||
} | |||
.conmsg{ | |||
border-top: 1px solid #E0E0E0; | |||
padding: 0 30rpx; | |||
background: #fff; | |||
height: 208rpx; | |||
.conmsg-lab{ | |||
display: flex; | |||
border-bottom: 1px solid #E0E0E0; | |||
height: 102rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
line-height: 102rpx; | |||
color: #333333; | |||
.conmsg-lab-1{ | |||
margin-right: 60rpx; | |||
} | |||
.conmsg-lab-3{ | |||
color: #B2B2B2; | |||
} | |||
.conmsg-lab-4{ | |||
width: 14rpx; | |||
height: 30rpx; | |||
margin-top: 6rpx; | |||
margin-left: auto; | |||
image{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
} | |||
} | |||
} | |||
.conent{ | |||
margin-top: 20rpx; | |||
min-height: 208rpx; | |||
background: #FFFFFF; | |||
box-sizing: border-box; | |||
padding: 30rpx; | |||
margin-bottom: 20rpx; | |||
} | |||
.btn{ | |||
position: fixed; | |||
width: 690rpx; | |||
height: 88rpx; | |||
background: #2671E2; | |||
border-radius: 8px; | |||
line-height: 88rpx; | |||
text-align: center; | |||
color: #FFFFFF; | |||
bottom: 108rpx; | |||
left: 30rpx; | |||
} | |||
</style> |
@@ -1,608 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<!-- 搜索框点击跳转 --> | |||
<view> | |||
<view class="search-box"> | |||
<view class="search" @click="goSearch"> | |||
<view class="search-img"> | |||
<image class="search-img1" src="../../../static/images/search.png" mode=""></image> | |||
</view> | |||
<view class="search-text">输入客户姓名/手机号</view> | |||
</view> | |||
<view class="search-screen" @click="screenshow"> | |||
<image class="search-screen1" src="../../../static/images/screen.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 选择器 --> | |||
<view class="boxtittab"> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">今日</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 1 }" @click="tabtimetap(1)">昨日</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 2 }" @click="tabtimetap(2)">近一周</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view> | |||
</view> | |||
</view> | |||
<view class="content"> | |||
<view v-if="recordList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;background: #FFFFFF;"> | |||
<view style="width: 100%;padding-top: 200rpx;"> | |||
<view style="width: 100%;text-align: center;"> | |||
<image style="width: 220rpx;height: 200rpx;" src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image> | |||
</view> | |||
<view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view> | |||
</view> | |||
</view> | |||
<view v-if="recordList.length!=0" class="content-tips" v-for="(item,index) in recordList" :key='index' @click="tapThevisiting(item)"> | |||
<view class="content-first"> | |||
<view class="left"> | |||
<!-- <view class="img">{{item.agentName.slice(0,1)}}</view> --> | |||
<view class="name">{{item.agentName}}</view> | |||
<view class="status" v-if="item.replaceReception==1">代接待</view> | |||
</view> | |||
<view class="right"> | |||
<!-- <view class="point"></view> --> | |||
<view v-if="item.markAdvisor==0" class="">未标记</view> | |||
<view v-if="item.markAdvisor==1" class="">已标记</view> | |||
</view> | |||
</view> | |||
<view class="content-sec"> | |||
<view class="left"> | |||
<view class="cus">客户:{{item.name || '--'}} |</view> | |||
<view class="arriveNum">{{item.visitRecord || "--"}}次到访</view> | |||
</view> | |||
<view class="right"> | |||
<!-- {{item.fraction || '0'}}% | {{item.fraction || '0'}}分 --> | |||
{{item.fraction || '0'}}% | |||
</view> | |||
</view> | |||
<view class="content-last"> | |||
{{item.createTime}} | {{item.mm || '0'}} min | |||
</view> | |||
</view> | |||
</view> | |||
<u-popup v-model="screenShow" mode="top" height="590"> | |||
<view class="screen"> | |||
<!-- 顾问选择 --> | |||
<view class="screen-counselor"> | |||
<view class="screen-text"> | |||
所属顾问 | |||
</view> | |||
<view class="screen-sel"> | |||
<u-input v-model="screen.counselorName" type="text" placeholder='请选择' @click="selectshow = true" class="screen-inp" disabled /> | |||
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image> | |||
</view> | |||
</view> | |||
<!-- 录音标示 --> | |||
<!-- <view class="screen-record"> | |||
<view class="screen-record-text">录音标识</view> | |||
<view class="screen-record-tab"> | |||
<view :class="[screen.record==0?'screen-record-chose':'screen-record-nochose']" @click="screen.record=0"> | |||
有效录音 | |||
</view> | |||
<view :class="[screen.record==1?'screen-record-chose':'screen-record-nochose']" @click="screen.record=1"> | |||
无效录音 | |||
</view> | |||
</view> | |||
</view> --> | |||
<view class="screen-record"> | |||
<view class="screen-record-text"> | |||
标记顾问 | |||
</view> | |||
<view class="screen-record-tab"> | |||
<view :class="[screen.markAdvisor==1?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(1)"> | |||
标记 | |||
</view> | |||
<view :class="[screen.markAdvisor==0?'screen-record-chose':'screen-record-nochose']" @click="screenvisitRecord(0)"> | |||
未标记 | |||
</view> | |||
</view> | |||
</view> | |||
<view class="screen-record"> | |||
<view class="screen-record-text"> | |||
到访次数 | |||
</view> | |||
<view class="screen-record-tab"> | |||
<view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']" @click="recordclick(1)"> | |||
首次到访 | |||
</view> | |||
<view :class="[screen.visitRecord==2?'screen-record-chose':'screen-record-nochose']" @click="recordclick(2)"> | |||
第二次 | |||
</view> | |||
<view :class="[screen.visitRecord==3?'screen-record-chose':'screen-record-nochose']" @click="recordclick(3)"> | |||
第三次 | |||
</view> | |||
<view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']" @click="recordclick(4)"> | |||
三次以上 | |||
</view> | |||
</view> | |||
</view> | |||
<view class="screen-foot"> | |||
<view class="screen-foot-reset" @click="reset"> | |||
重置 | |||
</view> | |||
<view class="screen-foot-sure" @click="screensure"> | |||
确定 | |||
</view> | |||
</view> | |||
</view> | |||
</u-popup> | |||
<!-- 选择顾问的选择框 --> | |||
<u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select> | |||
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar> | |||
</view> | |||
</template> | |||
<script> | |||
export default{ | |||
data(){ | |||
return{ | |||
activeTotal: 2, | |||
value:'', | |||
screenShow:false, | |||
selectshow:false, | |||
totalTimeShow: false, | |||
screen:{ | |||
agentId:'',//顾问id | |||
record:'0', | |||
markAdvisor:null, | |||
visitRecord:null | |||
}, | |||
freeList:[],//顾问 | |||
recordList:[], | |||
buildingID:'', | |||
nextPage:1, | |||
totalRecord:"", | |||
staTime:'', | |||
endtime:'', | |||
isnorefresh:'', | |||
} | |||
}, | |||
onLoad(options) { | |||
this.isnorefresh=options.refresh; | |||
}, | |||
onShow() { | |||
if(this.isnorefresh=='refresh'){ | |||
this.buildingID = uni.getStorageSync('buildingID').id; | |||
this.recordList=[]; | |||
this.nextPage=1; | |||
this.getMyCustom() | |||
this.getFreeList(); | |||
this.isnorefresh=''; | |||
} | |||
}, | |||
onReachBottom() { | |||
if(this.totalRecord==this.nextPage){ | |||
uni.showToast({ | |||
icon:'none', | |||
title: '到底了', | |||
duration: 2000 | |||
}); | |||
return | |||
}else{ | |||
this.nextPage+=1; | |||
this.getMyCustom(); | |||
} | |||
}, | |||
methods:{ | |||
tapThevisiting(item) { | |||
if(item.status==0){ | |||
uni.showToast({ | |||
icon: "none", | |||
title: "排队中" | |||
}) | |||
return | |||
}else{ | |||
const parames = { | |||
pageNum: 1, | |||
pageSize: 100, | |||
query: { | |||
customerId: item.id, | |||
} | |||
} | |||
var item={ | |||
bg:0, | |||
customerId:item.id, | |||
} | |||
this.$u.post("/corpus/findByPage", parames).then(res => { | |||
if(res==null){ | |||
uni.showToast({ | |||
icon: "none", | |||
title: "暂无音频" | |||
}) | |||
return | |||
}else{ | |||
let newobj = res[0]; | |||
if(res[0].merge==0){ | |||
uni.navigateTo({ | |||
url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"2"}` | |||
}) | |||
}else{ | |||
uni.navigateTo({ | |||
url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"1"}` | |||
}) | |||
} | |||
} | |||
}) | |||
} | |||
}, | |||
getMyCustom(){ | |||
let dateType=0; | |||
if(this.activeTotal==3){ | |||
dateType=null; | |||
}else{ | |||
dateType=this.activeTotal | |||
} | |||
var parames = { | |||
pageNum: this.nextPage, | |||
pageSize: 10, | |||
query: { | |||
projectId:this.buildingID, | |||
time:1, | |||
staTime:this.staTime, | |||
endtime:this.endtime, | |||
visitRecord:this.screen.visitRecord, | |||
markAdvisor:this.screen.markAdvisor, | |||
dateType:dateType | |||
} | |||
}; | |||
if(this.screen.agentId){ | |||
parames.query.agentId = this.screen.agentId | |||
} | |||
this.$u.post("/customer/findbypage", parames).then(data => { | |||
var list = data.results || []; | |||
this.recordList = [...this.recordList, ...list]; | |||
this.totalRecord=data.totalPage; | |||
}) | |||
}, | |||
//获取顾问列表 | |||
getFreeList() { | |||
this.$u.get("/zkAgentPool/freeList?itemId="+this.buildingID).then(res => { | |||
this.freeList = res; | |||
this.freeList.forEach(item=>{ | |||
item.label=item.name; | |||
item.value=item.agentId | |||
}) | |||
}) | |||
}, | |||
tabtimetap(index){ | |||
if (index == 3) { | |||
this.totalTimeShow = true; | |||
} else { | |||
this.activeTotal = index; | |||
this.staTime=''; | |||
this.endtime=''; | |||
this.nextPage=1; | |||
this.recordList=[]; | |||
this.getMyCustom(); | |||
} | |||
}, | |||
//自定义时间 | |||
totalTimeChange(e) { | |||
this.staTime=e.startDate; | |||
this.endtime=e.endDate; | |||
this.activeTotal=3; | |||
this.nextPage=1; | |||
this.recordList=[]; | |||
this.getMyCustom(); | |||
}, | |||
// 筛选 | |||
screenshow(){ | |||
this.screenShow=true | |||
}, | |||
actionSelectCallback(e){ | |||
this.screen.agentId=e[0].value; | |||
this.screenShow=false; | |||
this.recordList=[]; | |||
this.nextPage=1; | |||
this.getMyCustom(); | |||
}, | |||
reset(){ | |||
this.screen={ | |||
counselorName:'', | |||
record:'0', | |||
markAdvisor:null, | |||
visitRecord:null | |||
} | |||
this.screenShow=false; | |||
this.nextPage=1; | |||
this.recordList=[]; | |||
this.getMyCustom(); | |||
}, | |||
recordclick(i){ | |||
if(this.screen.visitRecord==i){ | |||
this.screen.visitRecord=null | |||
}else{ | |||
this.screen.visitRecord=i | |||
} | |||
}, | |||
screenvisitRecord(i){ | |||
if(this.screen.markAdvisor==i){ | |||
this.screen.markAdvisor=null | |||
}else{ | |||
this.screen.markAdvisor=i | |||
} | |||
}, | |||
screensure(){ | |||
this.screenShow=false; | |||
this.recordList=[]; | |||
this.nextPage=1; | |||
this.getMyCustom(); | |||
}, | |||
goSearch(){ | |||
uni.navigateTo({ | |||
url: '/pages/center/records/recordSearch' | |||
}); | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box { | |||
width: 100%; | |||
height: 100%; | |||
background: #F8F8F8; | |||
} | |||
.search-box{ | |||
width: 100%; | |||
height: 102rpx; | |||
background: #FFFFFF; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
.search{ | |||
width: 620rpx; | |||
height: 70rpx; | |||
display: flex; | |||
align-items: center; | |||
background: #F8F8F8; | |||
border-radius: 33rpx; | |||
.search-img{ | |||
width: 26rpx; | |||
height: 30rpx; | |||
margin-left: 20rpx; | |||
.search-img1{ | |||
width: 100%; | |||
height: 100%; | |||
margin-top: 2rpx; | |||
} | |||
} | |||
.search-text{ | |||
font-size: 28rpx; | |||
font-weight: 400; | |||
color: #999999; | |||
margin-left:10rpx; | |||
} | |||
} | |||
.search-screen{ | |||
width: 40rpx; | |||
height: 40rpx; | |||
margin-left: 30rpx; | |||
.search-screen1{ | |||
width: 100%; | |||
height: 100%; | |||
} | |||
} | |||
} | |||
.content{ | |||
.content-tips{ | |||
background: #fff; | |||
padding: 0 20rpx; | |||
box-sizing: border-box; | |||
overflow: hidden; | |||
margin-top: 20rpx; | |||
.content-first{ | |||
margin-top: 19rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
.left{ | |||
display: flex; | |||
.img{ | |||
width: 52rpx; | |||
height: 52rpx; | |||
background: #FFFFFF; | |||
border: 1px solid #C9C9C9; | |||
border-radius: 50%; | |||
text-align: center; | |||
line-height: 52rpx; | |||
} | |||
.name{ | |||
font-weight: 600; | |||
color: #333333; | |||
// margin-left: 20rpx; | |||
margin-top: 11rpx; | |||
} | |||
.status{ | |||
width: 110rpx; | |||
height: 42rpx; | |||
background: #FFF9F5; | |||
border-radius: 4rpx; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #EC8D49; | |||
line-height: 42rpx; | |||
text-align: center; | |||
margin-left: 19rpx; | |||
margin-top: 11rpx; | |||
} | |||
} | |||
.right{ | |||
display: flex; | |||
margin-top: 11rpx; | |||
.point{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
background: #2B6EFF; | |||
border-radius: 50%; | |||
margin-right: 9rpx; | |||
margin-top: 16rpx; | |||
} | |||
} | |||
} | |||
.content-sec{ | |||
display: flex; | |||
justify-content: space-between; | |||
margin-top: 19rpx; | |||
.left{ | |||
display: flex; | |||
.cus{ | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
// line-height: 30rpx; | |||
} | |||
.arriveNum{ | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
// line-height: 30rpx; | |||
margin-left: 10rpx; | |||
} | |||
} | |||
.right{ | |||
width: 120rpx; | |||
height: 46rpx; | |||
background: #F4F8FD; | |||
border-radius: 6rpx; | |||
text-align: center; | |||
line-height: 46rpx; | |||
font-weight: 400; | |||
color: #2671E2; | |||
} | |||
} | |||
.content-last{ | |||
// margin: 30rpx 0; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 30rpx; | |||
margin-top: 22rpx; | |||
margin-bottom: 30rpx; | |||
} | |||
} | |||
} | |||
// 这是弹出层 | |||
.screen{ | |||
// box-sizing: border-box; | |||
// padding: 0 30rpx; | |||
position:absolute; | |||
.screen-counselor{ | |||
display: flex; | |||
height: 106rpx; | |||
// padding: 40rpx 30rpx 36rpx 30rpx; | |||
padding: 0 30rpx; | |||
box-sizing: border-box; | |||
border-bottom: 1px solid #EEEEEE; | |||
.screen-text{ | |||
margin: 40rpx 0 36rpx 0; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 30rpx; | |||
} | |||
.screen-sel{ | |||
display: flex; | |||
justify-content: space-between; | |||
width: 500rpx; | |||
margin-left: 60rpx; | |||
.screen-sel-img{ | |||
margin: 40rpx 0 36rpx 0; | |||
width: 14rpx; | |||
height: 30rpx; | |||
} | |||
.screen-inp{ | |||
margin-top: 20rpx; | |||
} | |||
} | |||
} | |||
.screen-record{ | |||
height: 192rpx; | |||
// width: 100%; | |||
overflow: hidden; | |||
padding: 0 30rpx; | |||
box-sizing: border-box; | |||
border-bottom: 1px solid #EEEEEE; | |||
.screen-record-text{ | |||
margin-top: 36rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 30rpx; | |||
} | |||
.screen-record-tab{ | |||
margin-top: 30rpx; | |||
display: flex; | |||
// justify-content: space-around; | |||
.screen-record-chose{ | |||
width: 156rpx; | |||
height: 60rpx; | |||
background: #2671E2; | |||
border-radius: 4rpx; | |||
border: 1px solid #2671E2; | |||
text-align: center; | |||
line-height: 60rpx; | |||
margin-right: 22rpx; | |||
color: #FFFFFF; | |||
} | |||
.screen-record-nochose{ | |||
width: 156rpx; | |||
height: 60rpx; | |||
background: #FFFFFF; | |||
border-radius: 4rpx; | |||
border: 1px solid #C9C9C9; | |||
text-align: center; | |||
line-height: 60rpx; | |||
margin-right: 22rpx; | |||
} | |||
} | |||
} | |||
.screen-foot{ | |||
width: 100%; | |||
height: 100rpx; | |||
display: flex; | |||
.screen-foot-reset{ | |||
width: 50%; | |||
text-align: center; | |||
height: 100rpx; | |||
line-height: 100rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
} | |||
.screen-foot-sure{ | |||
width: 50%; | |||
text-align: center; | |||
line-height: 100rpx; | |||
height: 100rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #FFFFFF; | |||
background: #2671E2; | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,239 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<view style="width: 690rpx;margin: 0 auto;margin-top: 20rpx;"> | |||
<u-search @search='searchinfo()' :show-action='false' placeholder="请输入" v-model="keyword"></u-search> | |||
</view> | |||
<!-- <view @click="searchinfo()">搜索</view> --> | |||
<view class="content" style="background: #F8F8F8;"> | |||
<view class="content-tips" v-for="(item,index) in recordList" :key='index' @click="tapThevisiting(item)"> | |||
<view class="content-first"> | |||
<view class="left"> | |||
<!-- <view class="img">{{item.agentName.slice(0,1)}}</view> --> | |||
<view class="name">{{item.agentName}}</view> | |||
<view class="status" v-if="item.replaceReception==1">代接待</view> | |||
</view> | |||
<view class="right"> | |||
<view v-if="item.markAdvisor==0" class="">未标记</view> | |||
<view v-if="item.markAdvisor==1" class="">已标记</view> | |||
</view> | |||
</view> | |||
<view class="content-sec"> | |||
<view class="left"> | |||
<view class="cus">客户:{{item.name || '--'}} |</view> | |||
<view class="arriveNum">{{item.visitRecord || "0"}}次到访</view> | |||
</view> | |||
<view class="right"> | |||
{{item.fraction || '0'}}% | |||
<!-- | {{item.fraction || '0'}}分 --> | |||
</view> | |||
</view> | |||
<view class="content-last"> | |||
{{item.createTime}} | {{item.mm || '0'}}分钟 | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default{ | |||
data(){ | |||
return{ | |||
keyword:'', | |||
recordList:[], | |||
buildingID:'', | |||
nextPage:1, | |||
totalRecord:"", | |||
} | |||
}, | |||
onShow() { | |||
this.buildingID = uni.getStorageSync('buildingID').id; | |||
this.nextPage=1; | |||
this.recordList=[]; | |||
}, | |||
onReachBottom() { | |||
if(this.totalRecord==this.nextPage){ | |||
uni.showToast({ | |||
icon:'none', | |||
title: '到底了', | |||
duration: 2000 | |||
}); | |||
return | |||
}else{ | |||
this.nextPage+=1; | |||
this.getMyCustom(); | |||
} | |||
}, | |||
methods:{ | |||
tapThevisiting(item) { | |||
if(item.status==0){ | |||
uni.showToast({ | |||
icon: "none", | |||
title: "排队中" | |||
}) | |||
return | |||
}else{ | |||
const parames = { | |||
pageNum: 1, | |||
pageSize: 100, | |||
query: { | |||
customerId: item.id, | |||
} | |||
} | |||
var item={ | |||
bg:0, | |||
customerId:item.id, | |||
} | |||
this.$u.post("/corpus/findByPage", parames).then(res => { | |||
if(res==null){ | |||
uni.showToast({ | |||
icon: "none", | |||
title: "暂无音频" | |||
}) | |||
return | |||
}else{ | |||
let newobj = res[0]; | |||
if(res[0].merge==0){ | |||
uni.navigateTo({ | |||
url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"2"}` | |||
}) | |||
}else{ | |||
uni.navigateTo({ | |||
url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"1"}` | |||
}) | |||
} | |||
} | |||
}) | |||
} | |||
}, | |||
searchinfo(){ | |||
this.nextPage=1; | |||
this.recordList=[]; | |||
this.getMyCustom(); | |||
}, | |||
getMyCustom(){ | |||
var parames = { | |||
pageNum: this.nextPage, | |||
pageSize: 10, | |||
query: { | |||
projectId:this.buildingID, | |||
time:1, | |||
nameOrPhone:this.keyword | |||
} | |||
}; | |||
this.$u.post("/customer/findbypage", parames).then(data => { | |||
var list = data.results || []; | |||
this.recordList = [...this.recordList, ...list]; | |||
this.totalRecord=data.totalPage; | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box { | |||
width: 100%; | |||
height: 100vh; | |||
background: #FFFFFF; | |||
} | |||
.content{ | |||
.content-tips{ | |||
background: #fff; | |||
padding: 0 20rpx; | |||
box-sizing: border-box; | |||
overflow: hidden; | |||
margin-top: 20rpx; | |||
.content-first{ | |||
margin-top: 19rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
.left{ | |||
display: flex; | |||
.img{ | |||
width: 52rpx; | |||
height: 52rpx; | |||
background: #FFFFFF; | |||
border: 1px solid #C9C9C9; | |||
border-radius: 50%; | |||
text-align: center; | |||
line-height: 52rpx; | |||
} | |||
.name{ | |||
font-weight: 600; | |||
color: #333333; | |||
// margin-left: 20rpx; | |||
margin-top: 11rpx; | |||
} | |||
.status{ | |||
width: 110rpx; | |||
height: 42rpx; | |||
background: #FFF9F5; | |||
border-radius: 4rpx; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #EC8D49; | |||
line-height: 42rpx; | |||
text-align: center; | |||
margin-left: 19rpx; | |||
margin-top: 11rpx; | |||
} | |||
} | |||
.right{ | |||
display: flex; | |||
margin-top: 11rpx; | |||
.point{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
background: #2B6EFF; | |||
border-radius: 50%; | |||
margin-right: 9rpx; | |||
margin-top: 16rpx; | |||
} | |||
} | |||
} | |||
.content-sec{ | |||
display: flex; | |||
justify-content: space-between; | |||
margin-top: 19rpx; | |||
.left{ | |||
display: flex; | |||
.cus{ | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 30rpx; | |||
} | |||
.arriveNum{ | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
line-height: 30rpx; | |||
margin-left: 10rpx; | |||
} | |||
} | |||
.right{ | |||
width: 120rpx; | |||
height: 46rpx; | |||
background: #F4F8FD; | |||
border-radius: 6rpx; | |||
text-align: center; | |||
line-height: 46rpx; | |||
font-weight: 400; | |||
color: #2671E2; | |||
} | |||
} | |||
.content-last{ | |||
margin: 30rpx 0; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 30rpx; | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,372 +0,0 @@ | |||
<template> | |||
<view class="cented-box"> | |||
<view v-if="waitCustomList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;"> | |||
<view style="width: 100%;padding-top: 200rpx;"> | |||
<view style="width: 100%;text-align: center;"> | |||
<image style="width: 220rpx;height: 200rpx;" src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image> | |||
</view> | |||
<view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view> | |||
</view> | |||
</view> | |||
<view class="customer" v-if="waitCustomList.length!=0" v-for="(item,index) in waitCustomList" :key='index' @click="tapThevisiting(item)"> | |||
<view class="title"> | |||
<view class="zuo"> | |||
<!-- <view class="zuoimg">A</view> --> | |||
<view class="zuoname">{{item.name}}</view> | |||
</view> | |||
<view class="you"> | |||
<view class="youimg1" v-if="item.status!=0"></view> | |||
<view class="youimg1-1" v-if="item.status==0"></view> | |||
<view class="youtext">{{item.status==0?"排队中":item.status==1?"接待中":"已完成"}}</view> | |||
</view> | |||
</view> | |||
<view class="centerbox" v-if="item.status!=0"> | |||
<view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view> | |||
<view class="centerbox-che">开始时间:<text class="shizai">{{item.createTime}}</text></view> | |||
<view class="centerbox-che">顾问姓名:<text class="shizai" style="color: #333333;">{{item.agentName}}</text></view> | |||
<view class="centerbox-che2" v-if="item.status==1"> | |||
<view class="Workcard" v-if="item.status==1&&item.zkEquipmentState.onLine==0">设备状态:<text class="shizai" style="color: #333333;">离线</text></view> | |||
<view class="Workcard" v-if="item.status==1&&item.zkEquipmentState.onLine!=0">工牌电量:<text class="shizai" style="color: #333333;">{{item.zkEquipmentState.electricity}}%</text></view> | |||
<view class="Workcard" v-if="item.status==1&&item.zkEquipmentState.onLine==1">录音状态: | |||
<text v-if="item.zkEquipmentState.audioStatus=='true'" class="shizai" style="color: #333333;">使用中</text> | |||
<text v-if="item.zkEquipmentState.audioStatus=='false'" class="shizai" style="color: #333333;">未使用</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="footer-button" v-if="item.status!=0"> | |||
<view class="footer1" @click.stop="addTime(item)">接待延时</view> | |||
<view class="footer1" @click.stop="assign(item)">重新指派</view> | |||
<view class="footer3" @click.stop="changeEnd(item.id)">结束接待</view> | |||
</view> | |||
<view class="centerbox" v-if="item.status==0"> | |||
<view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view> | |||
</view> | |||
<view class="footer-button" v-if="item.status==0"> | |||
<view class="footer3" @click.stop="assign(item)">指派顾问</view> | |||
</view> | |||
</view> | |||
<image v-if="isAdd == 0 && (dataCode!=6||(dataCode==6&&addAccount==0))" @click="addreception()" class="add" src="/static/images/add.png" mode=""></image> | |||
<image class="add2" @click="reshCustom()" src="https://static.quhouse.com/zhikong_xcx_img/refresh.png" mode=""></image> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
buildingID:'', | |||
waitCustomList:[], | |||
isAdd:'', | |||
dataCode:'', | |||
addAccount:'', | |||
}; | |||
}, | |||
components: {}, | |||
onLoad() {}, | |||
onShow() { | |||
this.buildingID = uni.getStorageSync('buildingID').id; | |||
const { | |||
addAccount, | |||
dataCode | |||
} = uni.getStorageSync("weapp_session_userInfo_data"); | |||
this.addAccount=addAccount; | |||
this.dataCode=dataCode; | |||
this.init() | |||
this.queryHaveDept() | |||
}, | |||
methods: { | |||
reshCustom(){ | |||
this.init() | |||
}, | |||
tapThevisiting(item) { | |||
if(item.status==0){ | |||
uni.showToast({ | |||
icon: "none", | |||
title: "排队中" | |||
}) | |||
return | |||
}else{ | |||
const parames = { | |||
pageNum: 1, | |||
pageSize: 100, | |||
query: { | |||
customerId: item.id, | |||
} | |||
} | |||
var itemsd={ | |||
bg:0, | |||
customerId:item.id, | |||
id:'', | |||
onebest:'' | |||
} | |||
this.$u.post("/corpus/findByPage", parames).then(res => { | |||
if(res){ | |||
let newobj = res[0]; | |||
uni.navigateTo({ | |||
url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(itemsd)}&stateisshow=${"1"}` | |||
}) | |||
}else{ | |||
uni.showToast({ | |||
icon: "none", | |||
title: "暂无音频" | |||
}) | |||
return | |||
} | |||
}) | |||
} | |||
}, | |||
queryHaveDept() { | |||
return new Promise((resolve, reject) => { | |||
this.$u.get("/user/queryHaveDept?houseId="+this.buildingID).then(res => { | |||
this.isAdd=res; | |||
resolve(); | |||
}) | |||
}) | |||
}, | |||
init(){ | |||
this.waitCustomList=[] | |||
let parames={ | |||
itemId:this.buildingID | |||
} | |||
this.$u.post("/customer/reception", parames).then(data => { | |||
this.waitCustomList=data; | |||
}); | |||
}, | |||
//延时接待 | |||
addTime(item) { | |||
uni.showModal({ | |||
content: "确定延长半小时接待时间?", | |||
cancelColor: "#999999", | |||
success: res => { | |||
if (res.confirm) { | |||
this.$u.post("/customer/delayed", { | |||
cusId: item.id | |||
}).then(res => { | |||
uni.showToast({ | |||
icon: "none", | |||
title: "操作成功" | |||
}) | |||
}); | |||
} | |||
} | |||
}) | |||
}, | |||
//结束接待 | |||
changeEnd(id) { | |||
uni.showModal({ | |||
content: "确定更改当前客户接待状态为结束?", | |||
cancelColor: "#999999", | |||
success: res => { | |||
if (res.confirm) { | |||
this.$u.post("/customer/endReception", { | |||
id:id, | |||
houseId:this.buildingID | |||
}).then(res => { | |||
uni.showToast({ | |||
icon: "none", | |||
title: "操作成功" | |||
}) | |||
this.init(); | |||
}); | |||
} | |||
} | |||
}) | |||
}, | |||
//新增接待 | |||
addreception(){ | |||
const { | |||
dataCode,addAccount | |||
} = uni.getStorageSync("weapp_session_userInfo_data"); | |||
if(dataCode==6){ | |||
if(addAccount!=0){ | |||
uni.showToast({ | |||
title: '不允许自建客户!', | |||
duration: 2000 | |||
}); | |||
return | |||
} | |||
if(this.waitCustomList.length==0){ | |||
uni.navigateTo({ | |||
url: '/pages/mine/reception/addreception' | |||
}) | |||
return | |||
}else{ | |||
for(var i=0; i<this.waitCustomList.length; i++){ | |||
if(this.waitCustomList[i].status==1){ | |||
uni.showLoading({ | |||
title: '当前还有未完成的客户项' | |||
}); | |||
setTimeout(function () { | |||
uni.hideLoading(); | |||
}, 1000); | |||
return | |||
}else{ | |||
uni.navigateTo({ | |||
url: '/pages/mine/reception/addreception' | |||
}) | |||
return | |||
} | |||
} | |||
} | |||
}else{ | |||
uni.navigateTo({ | |||
url: '/pages/mine/reception/addreception' | |||
}); | |||
} | |||
}, | |||
assign(item) { | |||
let url = `/pages/mine/reception/consultant?id=${item.id}` | |||
if (item.beforeAgentId) { | |||
url += `&beforeAgentId=${item.beforeAgentId}`; | |||
} | |||
uni.navigateTo({ | |||
url: url | |||
}) | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.cented-box{ | |||
background: #F8F8F8; | |||
width: 100%; | |||
height: 100vh; | |||
padding-bottom: 30rpx; | |||
} | |||
.customer{ | |||
margin-top: 30rpx; | |||
width: 100%; | |||
background: #FFFFFF; | |||
box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3); | |||
.title{ | |||
height: 90rpx; | |||
border-bottom: 1px solid #E0E0E0; | |||
display: flex; | |||
align-items: center; | |||
.zuo{ | |||
width: 80%; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
.zuoimg{ | |||
width: 52rpx; | |||
height: 52rpx; | |||
border-radius: 50%; | |||
border: 1px solid #C9C9C9; | |||
font-size: 30rpx; | |||
color: #292929; | |||
font-weight: 400; | |||
line-height: 52rpx; | |||
text-align: center; | |||
margin-left: 30rpx; | |||
} | |||
.zuoname{ | |||
font-size: 30rpx; | |||
font-weight: 500; | |||
color: #333333; | |||
line-height: 30rpx; | |||
margin-left: 20rpx; | |||
} | |||
} | |||
.you{ | |||
width: 20%; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
.youimg1{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
border-radius: 50%; | |||
background: #2B6EFF; | |||
} | |||
.youimg1-1{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
border-radius: 50%; | |||
background: #F2A269; | |||
} | |||
.youtext{ | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #292929; | |||
line-height: 30rpx; | |||
margin-left: 10rpx; | |||
} | |||
} | |||
} | |||
.centerbox{ | |||
.centerbox-che{ | |||
width: 100%; | |||
margin-top: 30rpx; | |||
height: 30rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 30rpx; | |||
text-indent: 30rpx; | |||
.shizai{ | |||
color: #333333; | |||
} | |||
} | |||
.centerbox-che2{ | |||
width: 100%; | |||
margin-top: 30rpx; | |||
height: 30rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
line-height: 30rpx; | |||
text-indent: 30rpx; | |||
display: flex; | |||
.Workcard{ | |||
width: 50%; | |||
} | |||
} | |||
} | |||
.footer-button{ | |||
margin-top: 30rpx; | |||
width: 100%; | |||
height: 90rpx; | |||
display: flex; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
border-top: 1rpx solid #E0E0E0; | |||
.footer1{ | |||
flex: 1; | |||
text-align: center; | |||
line-height: 90rpx; | |||
border-right: 1rpx solid #E0E0E0; | |||
} | |||
.footer3{ | |||
flex: 1; | |||
text-align: center; | |||
line-height: 90rpx; | |||
} | |||
} | |||
} | |||
.add { | |||
width: 90upx; | |||
height: 90upx; | |||
position: fixed; | |||
bottom: 180upx; | |||
right: 44upx; | |||
} | |||
.add2{ | |||
width: 90upx; | |||
height: 90upx; | |||
position: fixed; | |||
bottom: 60upx; | |||
right: 44upx; | |||
} | |||
</style> |
@@ -1,116 +0,0 @@ | |||
<template> | |||
<view class="full"> | |||
<view class="logo"></view> | |||
<view class="title"> | |||
数智工牌 | |||
</view> | |||
<image class="middle" src="https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/lead_middle.png" | |||
mode="scaleToFill"></image> | |||
<view class="content"> | |||
<view class=""> | |||
1 智能语音转写 | |||
</view> | |||
<view class=""> | |||
2 高效的判客机制 | |||
</view> | |||
<view class=""> | |||
3 全方位的客户跟进 | |||
</view> | |||
<view class=""> | |||
4 专业的经纪管家 | |||
</view> | |||
<view class=""> | |||
5 在线实时沟通 | |||
</view> | |||
</view> | |||
<view @click="bindWxBLogin" class="button"> | |||
立即去登录 | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var config = require("../../config"); | |||
export default { | |||
data() { | |||
return { | |||
}; | |||
}, | |||
onShow: function() { | |||
uni.request({ | |||
url: config.service.verify, | |||
method: "GET", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
success: (data) => { | |||
if (data.data.code == 10000) { | |||
uni.switchTab({ | |||
url: '/pages/index/index' | |||
}); | |||
} | |||
} | |||
}) | |||
}, | |||
onHide: function() {}, | |||
methods: { | |||
bindWxBLogin() { | |||
wx.navigateTo({ | |||
url: '/pages/login/index' | |||
}); | |||
} | |||
} | |||
}; | |||
</script> | |||
<style lang="scss"> | |||
.full { | |||
width: 100vw; | |||
height: 100vh; | |||
position: relative; | |||
background: url("https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/lead_background.png"); | |||
background-size: 100% 100%; | |||
display: flex; | |||
flex-direction: column; | |||
align-items: center; | |||
.logo { | |||
width: 202upx; | |||
height: 202upx; | |||
margin-top: 40rpx | |||
} | |||
.title { | |||
color: #FFFFFF; | |||
font-size: 36upx; | |||
font-weight: 500; | |||
} | |||
.middle { | |||
width: 480upx; | |||
height: 485upx; | |||
margin-top: 34upx; | |||
} | |||
.content { | |||
color: #FFFFFF; | |||
font-size: 28rpx; | |||
line-height: 66rpx; | |||
} | |||
.button { | |||
background: #fff; | |||
border-radius: 76px; | |||
width: 584upx; | |||
height: 100upx; | |||
color: #008EF2; | |||
font-size: 40upx; | |||
line-height: 100upx; | |||
text-align: center; | |||
} | |||
} | |||
</style> |
@@ -1,678 +0,0 @@ | |||
<template> | |||
<view class="cented-box"> | |||
<view class="Switchingbox"> | |||
<view class="Switching1"> | |||
<image class="Switching1-img" src="../../static/images/building.png" mode=""></image> | |||
</view> | |||
<view class="Switching2">楼盘:</view> | |||
<view class="Switching3">{{buildingname}}</view> | |||
<view class="Switching4" v-if="buildingishow" @click="piskbuilding()">切换楼盘</view> | |||
</view> | |||
<view class="title" style="margin-top: 30rpx;" v-if="Myworkcard">我的工牌</view> | |||
<view v-if="Myworkcard"> | |||
<view class="Workcard" v-if="Whetheroffline==true"> | |||
<view class="Workcard-box"> | |||
<view class="Workcardimg"> | |||
<view class="Workcardimg1"> | |||
<view v-if="percentage>20" class="bar" :style="{width : percentage + '%' }"></view> | |||
<view v-if="percentage<20" class="bar1" :style="{width : percentage + '%' }"></view> | |||
</view> | |||
</view> | |||
<view class="Workcardtext">电量:{{percentage}}%</view> | |||
</view> | |||
<view class="Workcard-box"> | |||
<view class="Workcardimg"> | |||
<image v-if="signalDevice==''" class="Workcardimg2" src="../../static/images/signal0.png" | |||
mode=""></image> | |||
<image v-else-if="signalDevice<20 && signalDevice>0" class="Workcardimg2" | |||
src="../../static/images/signal1.png" mode=""></image> | |||
<image v-else-if="signalDevice<50 && signalDevice>20" class="Workcardimg2" | |||
src="../../static/images/signal2.png" mode=""></image> | |||
<image v-else-if="signalDevice<70 && signalDevice>50" class="Workcardimg2" | |||
src="../../static/images/signal3.png" mode=""></image> | |||
<image v-else-if="signalDevice<90 && signalDevice>70" class="Workcardimg2" | |||
src="../../static/images/signal4.png" mode=""></image> | |||
<image v-else-if="signalDevice<=100 && signalDevice>90" class="Workcardimg2" | |||
src="../../static/images/signal5.png" mode=""></image> | |||
</view> | |||
<view class="Workcardtext">信号:{{signalDevicetext}}</view> | |||
</view> | |||
<view class="Workcard-box"> | |||
<view class="Workcardimg"> | |||
<image v-if="audioStatus=='true'" class="Workcardimg3" | |||
src="../../static/images/Thtapedrive1.png" mode=""></image> | |||
<image v-if="audioStatus=='false'" class="Workcardimg3" | |||
src="../../static/images/Thtapedrive2.png" mode=""></image> | |||
</view> | |||
<view v-if="audioStatus=='true'" class="Workcardtext">录音:已开启</view> | |||
<view v-if="audioStatus=='false'" class="Workcardtext">录音:未开启</view> | |||
</view> | |||
</view> | |||
<view class="Workcard" v-if="Whetheroffline==false"> | |||
<view class="Workcard-box"> | |||
<view class="Workcardimg"> | |||
<image class="Workcardimg4" src="../../static/images/offline.png" mode=""></image> | |||
</view> | |||
<view class="Workcardtext">设备离线</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="title" v-if="equipmentisshow">设备</view> | |||
<view class="shebenbox" v-if="equipmentisshow"> | |||
<view class="shebenche"> | |||
<view class="shebenchenum">{{equipmentobj.totalNum || 0}}</view> | |||
<view class="shebenchetext">设备总数</view> | |||
</view> | |||
<view class="shebenche"> | |||
<view class="shebenchenum">{{equipmentobj.onlineNum || 0}}</view> | |||
<view class="shebenchetext">在线</view> | |||
</view> | |||
<view class="shebenche"> | |||
<view class="shebenchenum">{{equipmentobj.activeNum || 0}}</view> | |||
<view class="shebenchetext">活跃</view> | |||
</view> | |||
<view class="shebenche"> | |||
<view class="shebenchenum" style="color: red;">{{equipmentobj.lowPowerNum || 0}}</view> | |||
<view class="shebenchetext">急需充电</view> | |||
</view> | |||
</view> | |||
<view class="title">实时统计</view> | |||
<view class="real-timebox"> | |||
<view class="timebox"> | |||
<view class="real"> | |||
<view class="realnum">{{realtimeobj.receptionCount || 0}}</view> | |||
<view class="realtext">接待量</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum">{{realtimeobj.receivingCustomer || 0}}</view> | |||
<view class="realtext">正在接待</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum">{{realtimeobj.tagCustomer || 0}}</view> | |||
<view class="realtext">未标顾问</view> | |||
</view> | |||
</view> | |||
<view class="timebox"> | |||
<view class="real"> | |||
<view class="realnum">{{realtimeobj.sumDuration || 0}}</view> | |||
<view class="realtext">接待时长</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum">{{realtimeobj.avgDuration|| 0}}</view> | |||
<view class="realtext">平均接待时长</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum">{{realtimeobj.fraction || 0}}%</view> | |||
<view class="realtext">平均执行率</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="title">本周工作</view> | |||
<view class="real-timebox"> | |||
<view class="timebox"> | |||
<view class="real"> | |||
<view class="realnum">{{Thisweekobj.receptionCount || 0}}</view> | |||
<view class="realtext">接待量</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum">{{Thisweekobj.fraction || 0}}%</view> | |||
<view class="realtext">平均执行率</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum">{{Thisweekobj.sumDuration || 0}}</view> | |||
<view class="realtext">录音时长</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum">{{Thisweekobj.avgDuration|| 0}}</view> | |||
<view class="realtext">平均接待时长</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- <view class="real-timebox"> | |||
<view class="timebox"> | |||
<view class="real"> | |||
<view class="realnum"></view> | |||
<view class="realtext">接待量</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum">{{realtimeobj.receivingCustomer || 0}}</view> | |||
<view class="realtext">正在接待</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum"></view> | |||
<view class="realtext">平均执行率</view> | |||
</view> | |||
<view class="real"> | |||
<view class="realnum">{{Thisweekobj.sumDuration || 0}}</view> | |||
<view class="realtext">录音时长</view> | |||
</view> | |||
</view> | |||
</view> --> | |||
<view class="title">常用功能</view> | |||
<view class="commonly-box"> | |||
<view class="commonly" @click="Piabodata(item.name)" v-for="(item,index) in Menulist" :key='index'> | |||
<view class="commonly-img"> | |||
<image v-if="item.name=='客户管理'" class="commonly-img1" src="../../static/images/function1.png" | |||
mode=""></image> | |||
<image v-if="item.name=='接待记录'" class="commonly-img1" src="../../static/images/function2.png" | |||
mode=""></image> | |||
<image v-if="item.name=='销讲数据'" class="commonly-img1" src="../../static/images/function4.png" | |||
mode=""></image> | |||
<image v-if="item.name=='设备管理'" class="commonly-img1" src="../../static/images/function5.png" | |||
mode=""></image> | |||
<image v-if="item.name=='值班顾问'" class="commonly-img1" src="../../static/images/function6.png" | |||
mode=""></image> | |||
</view> | |||
<view class="commonly-text">{{item.name}}</view> | |||
</view> | |||
</view> | |||
<!-- 楼盘切换 --> | |||
<view v-if="Showhiddenunits"> | |||
<u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="lpanlist" | |||
@cancel="cancel" @confirm="confirm"></u-select> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var config = require("../../config"); | |||
export default { | |||
data() { | |||
return { | |||
userInfo: {}, | |||
Showhiddenunits: false, | |||
lpanlist: [], //楼盘列表 | |||
buildingname: '', //楼盘名 | |||
buildingID: '', //楼盘id | |||
buildingishow: false, //是否选择楼盘 | |||
Myworkcard: false, | |||
percentage: '', //设备电量 | |||
Whetheroffline: false, //是否离线 | |||
signalDevice: 0, //信号 | |||
signalDevicetext: "", | |||
audioStatus: false, | |||
equipmentisshow: false, | |||
equipmentobj: { | |||
totalNum: '', | |||
onlineNum: '', | |||
activeNum: '', | |||
lowPowerNum: '', | |||
}, | |||
Menulist: [], | |||
realtimeobj: { | |||
sumCustomer: '', | |||
receivingCustomer: '', | |||
activeCustomer: '', | |||
sumDuration: '', | |||
tagCustomer: '', | |||
fraction: '', | |||
receptionCount:'' | |||
}, | |||
Thisweekobj: { | |||
sumCustomer: '', | |||
receivingCustomer: '', | |||
activeCustomer: '', | |||
sumDuration: '', | |||
tagCustomer: '', | |||
fraction: '', | |||
receptionCount:'' | |||
} | |||
}; | |||
}, | |||
components: {}, | |||
onShow() { | |||
this.userInfo = uni.getStorageSync('weapp_session_userInfo_data'); | |||
this.Menulist = uni.getStorageSync('weapp_session_Menu_data'); | |||
if (this.userInfo.zkProperties.length == 1) { | |||
this.buildingID = uni.getStorageSync('buildingID').id; | |||
this.buildingname = uni.getStorageSync('buildingID').name; | |||
this.buildingishow = false; | |||
} else { | |||
this.buildingishow = true; | |||
this.buildingname = uni.getStorageSync('buildingID').name; | |||
this.buildingID = uni.getStorageSync('buildingID').id; | |||
this.userInfo.zkProperties.forEach(item => { | |||
item.label = item.propertyName; | |||
item.value = item.id | |||
}) | |||
this.lpanlist = this.userInfo.zkProperties | |||
} | |||
if (this.userInfo.dataCode == 6) { | |||
this.Myworkcard = true; | |||
this.equipmentisshow = false; | |||
this.iniodianloang() | |||
} else { | |||
this.equipmentisshow = true; | |||
this.Myworkcard = false; | |||
this.initequipment() | |||
} | |||
this.initworkThisWeek() | |||
this.initrealTimeStatistics() | |||
}, | |||
methods: { | |||
initworkThisWeek() { | |||
uni.request({ | |||
url: config.service.workThisWeek, | |||
method: "POST", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
data: { | |||
houseId: this.buildingID | |||
}, | |||
success: (data) => { | |||
if (data.data.data == null) { | |||
return | |||
} else { | |||
this.Thisweekobj = { | |||
sumCustomer: data.data.data.sumCustomer, | |||
receivingCustomer: data.data.data.receivingCustomer, | |||
activeCustomer: data.data.data.activeCustomer, | |||
sumDuration: Math.floor(data.data.data.sumDuration/60) ||0, | |||
avgDuration: Math.floor(data.data.data.avgDuration/60) ||0, | |||
tagCustomer: data.data.data.tagCustomer, | |||
fraction: data.data.data.fraction, | |||
receptionCount:data.data.data.receptionCount | |||
} | |||
} | |||
} | |||
}) | |||
}, | |||
//实时统计 | |||
initrealTimeStatistics() { | |||
uni.request({ | |||
url: config.service.realTimeStatistics, | |||
method: "POST", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
data: { | |||
houseId: this.buildingID | |||
}, | |||
success: (data) => { | |||
if (data.data.data == null) { | |||
return | |||
} else { | |||
this.realtimeobj = { | |||
sumCustomer: data.data.data.sumCustomer, | |||
receivingCustomer: data.data.data.receivingCustomer, | |||
activeCustomer: data.data.data.activeCustomer, | |||
sumDuration:Math.floor(data.data.data.sumDuration/60) || 0, | |||
avgDuration: Math.floor(data.data.data.avgDuration/60) ||0, | |||
tagCustomer: data.data.data.tagCustomer, | |||
fraction: data.data.data.fraction, | |||
receptionCount:data.data.data.receptionCount | |||
} | |||
} | |||
} | |||
}) | |||
}, | |||
//设备 | |||
initequipment() { | |||
uni.request({ | |||
url: config.service.findEquipmentState, | |||
method: "POST", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
data: { | |||
propertyId: this.buildingID | |||
}, | |||
success: (data) => { | |||
if (data.data.data == null) { | |||
return | |||
} else { | |||
this.equipmentobj = { | |||
totalNum: data.data.data.totalNum, | |||
onlineNum: data.data.data.onlineNum, | |||
activeNum: data.data.data.activeNum, | |||
lowPowerNum: data.data.data.lowPowerNum, | |||
} | |||
} | |||
} | |||
}) | |||
}, | |||
//我的工牌 | |||
iniodianloang() { | |||
uni.request({ | |||
url: config.service.findElectricity, | |||
method: "POST", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
data: {}, | |||
success: (data) => { | |||
if (data.data.data == null) { | |||
return | |||
} else { | |||
if (data.data.data > 100) { | |||
this.percentage = 100; | |||
} else { | |||
if (data.data.data.onLine == 0) { | |||
this.Whetheroffline = false; | |||
} else { | |||
this.Whetheroffline = true; | |||
this.percentage = data.data.data.electricity; | |||
this.signalDevice = data.data.data.signalDevice / 1; | |||
console.log(this.signalDevice) | |||
this.audioStatus = data.data.data.audioStatus; | |||
if (this.signalDevice > 80) { | |||
this.signalDevicetext = '高'; | |||
} else { | |||
if (this.signalDevice == 0) { | |||
this.signalDevicetext = '无'; | |||
} else { | |||
this.signalDevicetext = '低'; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}) | |||
}, | |||
//选择楼盘弹框 | |||
piskbuilding() { | |||
this.Showhiddenunits = true; | |||
}, | |||
// 楼盘选择确认 | |||
confirm(e) { | |||
this.buildingname = e[0].label; | |||
this.buildingID = e[0].value; | |||
let lopan = { | |||
id: e[0].value, | |||
name: e[0].label | |||
} | |||
uni.setStorageSync("buildingID", lopan); //楼盘id写入缓存 | |||
this.initworkThisWeek() | |||
this.initrealTimeStatistics() | |||
}, | |||
// 楼盘选择取消 | |||
cancel() { | |||
this.Showhiddenunits = false; | |||
}, | |||
Piabodata(item) { | |||
if (item == '销讲数据') { | |||
uni.navigateTo({ | |||
url: '/pages/center/Piabodata/index' | |||
}); | |||
} else if (item == '接待记录') { | |||
uni.navigateTo({ | |||
url: '/pages/center/records/index?refresh='+'refresh' | |||
}); | |||
} else if (item == '值班顾问') { | |||
uni.navigateTo({ | |||
url: '/pages/mine/consultanonduty/index' | |||
}); | |||
} else if (item == '设备管理') { | |||
uni.navigateTo({ | |||
url: '/pages/mine/equipment/index' | |||
}); | |||
} else { | |||
uni.navigateTo({ | |||
url: '/pages/center/consumer/index?refresh='+'refresh' | |||
}); | |||
} | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.cented-box { | |||
padding: 30rpx; | |||
background: #F8F8F8; | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.Switchingbox { | |||
width: 100%; | |||
height: 44rpx; | |||
display: flex; | |||
align-items: center; | |||
.Switching1 { | |||
width: 44rpx; | |||
height: 44rpx; | |||
.Switching1-img { | |||
width: 44rpx; | |||
height: 44rpx; | |||
} | |||
} | |||
.Switching2 { | |||
margin-left: 12rpx; | |||
font-size: 32rpx; | |||
color: #303030; | |||
font-weight: 500; | |||
} | |||
.Switching3 { | |||
width: calc(100% - 280rpx); | |||
font-size: 32rpx; | |||
color: #303030; | |||
font-weight: 500; | |||
} | |||
.Switching4 { | |||
width: 112rpx; | |||
font-size: 28rpx; | |||
color: #303030; | |||
font-weight: 400; | |||
text-align: right; | |||
text-decoration: underline | |||
} | |||
} | |||
.Workcard { | |||
width: 100%; | |||
background: #FFFFFF; | |||
height: 154rpx; | |||
box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3); | |||
border-radius: 12rpx; | |||
display: flex; | |||
.Workcard-box { | |||
flex: 1; | |||
height: 100%; | |||
.Workcardimg { | |||
width: 100%; | |||
display: flex; | |||
justify-content: center; | |||
margin-top: 42rpx; | |||
.Workcardimg1 { | |||
width: 64rpx; | |||
height: 36rpx; | |||
background-image: url(../../static/images/battery.png); | |||
background-size: 100% 100%; | |||
padding: 8rpx; | |||
.bar { | |||
background-color: #43CD80; | |||
height: 100%; | |||
border-radius: 4rpx; | |||
} | |||
.bar1 { | |||
background-color: red; | |||
height: 100%; | |||
border-radius: 4rpx; | |||
} | |||
} | |||
.Workcardimg2 { | |||
width: 56rpx; | |||
height: 36rpx; | |||
} | |||
.Workcardimg3 { | |||
width: 34rpx; | |||
height: 36rpx; | |||
} | |||
.Workcardimg4 { | |||
width: 50rpx; | |||
height: 40rpx; | |||
} | |||
} | |||
.Workcardtext { | |||
width: 100%; | |||
text-align: center; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
margin-top: 20rpx; | |||
} | |||
} | |||
} | |||
.title { | |||
width: 100%; | |||
height: 30rpx; | |||
font-size: 30rpx; | |||
font-weight: 600; | |||
color: #333333; | |||
margin-top: 40rpx; | |||
margin-bottom: 24rpx; | |||
} | |||
.shebenbox { | |||
width: 100%; | |||
height: 156rpx; | |||
background: #FFFFFF; | |||
box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3); | |||
border-radius: 12rpx; | |||
display: flex; | |||
.shebenche { | |||
width: 25%; | |||
height: 100%; | |||
.shebenchenum { | |||
width: 100%; | |||
font-size: 36rpx; | |||
font-weight: 600; | |||
color: #333333; | |||
text-align: center; | |||
margin-top: 28rpx; | |||
} | |||
.shebenchetext { | |||
width: 100%; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
text-align: center; | |||
margin-top: 24rpx; | |||
} | |||
} | |||
} | |||
.real-timebox { | |||
width: 100%; | |||
background: #FFFFFF; | |||
box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3); | |||
border-radius: 12rpx; | |||
padding-bottom: 36rpx; | |||
.timebox { | |||
width: 100%; | |||
display: flex; | |||
.real { | |||
flex: 1; | |||
height: 100%; | |||
.realnum { | |||
width: 100%; | |||
font-size: 36rpx; | |||
font-weight: 600; | |||
color: #333333; | |||
text-align: center; | |||
margin-top: 36rpx; | |||
} | |||
.realtext { | |||
width: 100%; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #666666; | |||
text-align: center; | |||
margin-top: 24rpx; | |||
} | |||
} | |||
} | |||
} | |||
.commonly-box { | |||
width: 100%; | |||
background: #FFFFFF; | |||
box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3); | |||
border-radius: 12rpx; | |||
display: flex; | |||
flex-wrap: wrap; | |||
padding-bottom: 36rpx; | |||
.commonly { | |||
width: 25%; | |||
margin-top: 36rpx; | |||
.commonly-img { | |||
width: 100%; | |||
height: 68rpx; | |||
text-align: center; | |||
.commonly-img1 { | |||
width: 68rpx; | |||
height: 68rpx; | |||
border-radius: 50%; | |||
} | |||
} | |||
.commonly-text { | |||
width: 100%; | |||
text-align: center; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
margin-top: 16rpx; | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,587 +0,0 @@ | |||
<template> | |||
<view class="main"> | |||
<view class="tab-box"> | |||
<view class="tab-item-wrap"> | |||
<view v-for="(item, index) in tablist" :key="index" | |||
:class="activeClass == index ? 'bottom' : ''" @tap="clocktab(index, item.id)"> | |||
{{ item.name }} | |||
<view class="bottomLine" v-if="activeClass == index"></view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="cented" v-if="activeClass==0"> | |||
<view class="ceninfo" v-for="(item,index) in alllist" @click="quclick(item)" :key="index"> | |||
<view class="infoview"> | |||
<view class="infozuo"> | |||
<view class="infozuochiud1">{{item.jbaName}}</view> | |||
<view class="infozuochiud2">置业顾问</view> | |||
</view> | |||
<view class="infoyou"> | |||
<view class="infoyouchiud2" >去学习</view> | |||
</view> | |||
</view> | |||
<view class="footerinfo"> | |||
<view class="footerinfozuo">{{item.assignedTime}}</view> | |||
<view class="footerinfoyou"></view> | |||
</view> | |||
<view class="footicon"> | |||
<view class="icon"> | |||
<image class="Piabodata-img1" src="../../static/images/studyhot.png" mode=""></image> | |||
<!-- 浏览量 --> | |||
{{item.pageviews}} | |||
</view> | |||
<view class="icon"> | |||
<image class="Piabodata-img1" src="../../static/images/viewstudy.png" mode=""></image> | |||
<!-- 热度 --> | |||
{{item.heat}} | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="biaoqianview" v-if="activeClass==1"> | |||
<view class="boxintention"> | |||
<view class="title">分点标签列表</view> | |||
<view class="boxcenten" v-for="(item,index) in equinoctial" :key="index" @click="routerclick(item)"> | |||
<view class="boxcenteninfotext">{{item.name}}</view> | |||
<view class="boxcenteninfoimg"><u-icon size="20px" name="arrow-right"></u-icon></view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var config = require("../../config"); | |||
var util = require("@/utils/util.js"); | |||
export default { | |||
data() { | |||
return { | |||
tablist:[ | |||
{name:"全文"}, | |||
{name:"分点"} | |||
], | |||
activeClass:0, | |||
equinoctial:[], | |||
alllist:[], | |||
buildingID:'' | |||
}; | |||
}, | |||
onShow(){ | |||
var i=uni.getStorageSync('fendianindex') | |||
this.buildingID=uni.getStorageSync('buildingID').id; | |||
this.clocktab(i) | |||
}, | |||
methods: { | |||
//全部学习跳转 | |||
quclick(item){ | |||
const parames = { | |||
pageNum: 1, | |||
pageSize: 100, | |||
query: { | |||
customerId: item.carId, | |||
} | |||
} | |||
var cet={ | |||
bg:0, | |||
customerId:item.id, | |||
id:'' | |||
} | |||
this.$u.post("/corpus/findByPage", parames).then(res => { | |||
var newobj = res[0]; | |||
if(res[0].merge==0){ | |||
uni.navigateTo({ | |||
url: `/pages/learning/Thefulltext/index2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(cet)}&stateisshow=${"2"}` | |||
}) | |||
}else{ | |||
uni.navigateTo({ | |||
url: `/pages/learning/Thefulltext/index?customerId=${newobj.customerId}` | |||
}) | |||
} | |||
}) | |||
}, | |||
//分点学习跳转 | |||
routerclick(item){ | |||
uni.navigateTo({ | |||
url: "/pages/learning/Equinoctiallearning?id="+item.marketingId+"&biaoqian="+item.name | |||
}) | |||
}, | |||
// tab切换 | |||
clocktab(index) { | |||
this.activeClass = index; | |||
if(this.activeClass==0){ | |||
uni.setStorageSync("fendianindex", 0); //写入缓存 | |||
this.ceninit() | |||
}else{ | |||
uni.setStorageSync("fendianindex", 1); //写入缓存 | |||
this.infoinit() | |||
} | |||
}, | |||
ceninit(){ | |||
let infoobj={ | |||
"pageNum":1, | |||
"pageSize":100, | |||
"query":{ | |||
"status":0, | |||
'itemId':this.buildingID, | |||
} | |||
} | |||
uni.request({ | |||
url: config.service.findAllZATD, | |||
method:"POST", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
data:infoobj, | |||
success: (data) => { | |||
if(data.data.code==10000){ | |||
this.alllist=data.data.data.results | |||
}else{ | |||
uni.showToast({ | |||
title: data.data.message, | |||
duration: 2000 | |||
}); | |||
} | |||
} | |||
}) | |||
}, | |||
infoinit(){ | |||
let obj={ | |||
itemId:this.buildingID | |||
} | |||
uni.request({ | |||
url: config.service.findSelectedLabel, | |||
method:"POST", | |||
data:obj, | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
success: (data) => { | |||
if(data.data.code==10000){ | |||
this.equinoctial=data.data.data | |||
}else{ | |||
uni.showToast({ | |||
title: data.data.message, | |||
duration: 2000 | |||
}); | |||
} | |||
} | |||
}) | |||
} | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.main { | |||
background: #F1F1F1;; | |||
min-height: 100vh; | |||
} | |||
.tab-box { | |||
height: auto; | |||
overflow: auto; | |||
width: 100%; | |||
.tab-item-wrap { | |||
height: 100rpx; | |||
width: 80%; | |||
margin: 0 auto; | |||
line-height: 100rpx; | |||
display: flex; | |||
justify-content: space-around; | |||
font-size: 36rpx; | |||
color: #959dad; | |||
} | |||
} | |||
.bottom { | |||
color: #008EF2; | |||
position: relative; | |||
} | |||
.bottomLine { | |||
position: absolute; | |||
width: 96rpx; | |||
height: 6rpx; | |||
top: 80rpx; | |||
background-color: #298dff; | |||
border-radius: 8rpx 8rpx 0rpx 0rpx; | |||
left: -13rpx; | |||
} | |||
.cented{ | |||
width: 100%; | |||
padding-top: 14rpx; | |||
.ceninfo{ | |||
width: 690rpx; | |||
// height: 160rpx; | |||
background: #FFFFFF; | |||
border-radius: 8rpx; | |||
margin: 0 auto; | |||
margin-top: 20rpx; | |||
padding-top: 23rpx; | |||
position: relative; | |||
.infoview{ | |||
width: 100%; | |||
height: 64rpx; | |||
display: flex; | |||
.infozuo{ | |||
width: 454rpx; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
.infozuochiud1{ | |||
font-size: 36rpx; | |||
font-weight: 600; | |||
color: #0C0C0C; | |||
text-indent: 28rpx; | |||
} | |||
.infozuochiud2{ | |||
width: 113rpx; | |||
height: 42rpx; | |||
border-radius: 5rpx; | |||
margin-left: 19rpx; | |||
border: 1px solid #008EF2; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #008EF2; | |||
line-height: 42rpx; | |||
text-align: center; | |||
} | |||
} | |||
.infoyou{ | |||
width:236rpx; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
.infoyouchiud1{ | |||
display: block; | |||
width: 64rpx; | |||
height: 64rpx; | |||
border-radius: 50%; | |||
} | |||
.infoyouchiud2{ | |||
width: 133rpx; | |||
height: 56rpx; | |||
background: #008EF2; | |||
border-radius: 8rpx; | |||
text-align: center; | |||
color: #FFFFFF; | |||
font-size: 30rpx; | |||
line-height: 56rpx; | |||
margin-left: 80rpx; | |||
} | |||
} | |||
} | |||
.footerinfo{ | |||
width: 100%; | |||
height: 42rpx; | |||
display: flex; | |||
margin-top: 14rpx; | |||
.footerinfozuo{ | |||
width: 454rpx; | |||
font-size: 30rpx; | |||
color: #0C0C0C; | |||
line-height: 42rpx; | |||
margin-left: 26rpx; | |||
} | |||
.footerinfoyou{ | |||
width: 236rpx; | |||
font-size: 24rpx; | |||
color: #999999; | |||
line-height: 42rpx; | |||
text-indent: 42rpx; | |||
} | |||
} | |||
.dingwei{ | |||
width: 100%; | |||
height: 60rpx; | |||
border: 1px solid red; | |||
position: absolute; | |||
top: 160rpx; | |||
left: 0rpx; | |||
} | |||
} | |||
} | |||
.biaoqianview{ | |||
width: 100%; | |||
.boxintention { | |||
width: 690rpx; | |||
margin: 0 auto; | |||
.title { | |||
font-size: 36upx; | |||
color: #333333; | |||
position: relative; | |||
display: flex; | |||
align-items: center; | |||
padding-left: 19upx; | |||
&:before { | |||
content: ''; | |||
position: absolute; | |||
left: 0; | |||
height: 30upx; | |||
width: 9upx; | |||
background: #008ef2; | |||
border-radius: 5rpx; | |||
} | |||
} | |||
.boxcenten{ | |||
width: 100%; | |||
height: 100rpx; | |||
background: #FFFFFF; | |||
border-radius: 8rpx; | |||
margin-top: 22rpx; | |||
display: flex; | |||
.boxcenteninfotext{ | |||
width: 90%; | |||
height: 100%; | |||
text-indent: 20rpx; | |||
line-height: 100rpx; | |||
font-size: 30rpx; | |||
color: #0C0C0C; | |||
} | |||
.boxcenteninfoimg{ | |||
width: 10%; | |||
height: 100%; | |||
line-height: 100rpx; | |||
} | |||
} | |||
} | |||
} | |||
.footicon{ | |||
display: flex; | |||
align-items: center; | |||
margin-top: 30rpx; | |||
padding:20rpx; | |||
flex-direction: row-reverse; | |||
.icon{ | |||
margin-left: 20rpx; | |||
} | |||
image{ | |||
width: 36rpx; | |||
height: 36rpx; | |||
margin-right: 20rpx; | |||
vertical-align: -7rpx; | |||
} | |||
} | |||
</style> | |||
<!-- <template> | |||
<view class="cented-box"> | |||
<view class="search-box"> | |||
<view class="search"> | |||
<view class="search-img"> | |||
<image class="search-img1" src="../../static/images/search.png" mode=""></image> | |||
</view> | |||
<view class="search-text">输入话术关键字</view> | |||
</view> | |||
</view> | |||
<view class="caseid-box"> | |||
<view class="caseid"> | |||
<image class="caseid-img1" src="../../static/images/good.png" mode=""></image> | |||
<view class="caseid-text">优秀案例</view> | |||
</view> | |||
<view class="caseid"> | |||
<image class="caseid-img1" src="../../static/images/problem.png" mode=""></image> | |||
<view class="caseid-text">问题库</view> | |||
</view> | |||
<view class="caseid"> | |||
<image class="caseid-img1" src="../../static/images/reverse.png" mode=""></image> | |||
<view class="caseid-text">反面案例</view> | |||
</view> | |||
</view> | |||
<view class="Pinspeak">销讲话术</view> | |||
<view class="chented"> | |||
<view class="title"> | |||
<view class="title1"></view> | |||
<view class="titletext">逼单话术</view> | |||
<view class="titleimg"> | |||
<image class="titleimg1" src="../../static/images/arrow.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="chented"> | |||
<view class="title" style="border: none;"> | |||
<view class="title1"></view> | |||
<view class="titletext">品牌介绍</view> | |||
</view> | |||
<view class="chented-for"> | |||
<view class="chented-che">2021销售额</view> | |||
<view class="chented-che">2021销售额</view> | |||
<view class="chented-che">2021销售额</view> | |||
<view class="chented-che">2021销售额</view> | |||
</view> | |||
</view> | |||
<view class="chented"> | |||
<view class="title" style="border: none;"> | |||
<view class="title1"></view> | |||
<view class="titletext">品牌介绍</view> | |||
</view> | |||
<view class="chented-for"> | |||
<view class="chented-che">2021销售额</view> | |||
<view class="chented-che">2021销售额</view> | |||
<view class="chented-che">2021销售额</view> | |||
<view class="chented-che">2021销售额</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return {}; | |||
}, | |||
components: {}, | |||
onLoad() {}, | |||
onShow() {}, | |||
methods: { | |||
}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.cented-box{ | |||
background: #F8F8F8; | |||
width: 100%; | |||
height: 100%; | |||
} | |||
.search-box{ | |||
width: 100%; | |||
height: 102rpx; | |||
background: #FFFFFF; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
.search{ | |||
width: 690rpx; | |||
height: 70rpx; | |||
display: flex; | |||
align-items: center; | |||
background: #F8F8F8; | |||
border-radius: 33rpx; | |||
.search-img{ | |||
width: 26rpx; | |||
height: 30rpx; | |||
margin-left: 20rpx; | |||
.search-img1{ | |||
width: 100%; | |||
height: 100%; | |||
margin-top: 2rpx; | |||
} | |||
} | |||
.search-text{ | |||
font-size: 28rpx; | |||
font-weight: 400; | |||
color: #999999; | |||
margin-left:10rpx; | |||
} | |||
} | |||
} | |||
.caseid-box{ | |||
width: 100%; | |||
height: 204rpx; | |||
margin-top: 10rpx; | |||
background: #FFFFFF; | |||
display: flex; | |||
.caseid{ | |||
flex: 1; | |||
height: 100%; | |||
text-align: center; | |||
margin-top: 13rpx; | |||
.caseid-img1{ | |||
width: 134rpx; | |||
height: 134rpx; | |||
} | |||
.caseid-text{ | |||
width: 100%; | |||
text-align: center; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
} | |||
} | |||
} | |||
.Pinspeak{ | |||
width: 100%; | |||
height: 92rpx; | |||
border-bottom: 1rpx solid #E0E0E0; | |||
font-size: 32rpx; | |||
font-weight: 600; | |||
color: #333333; | |||
text-indent: 30rpx; | |||
line-height: 92rpx; | |||
background: #FFFFFF; | |||
margin-top: 20rpx; | |||
} | |||
.chented{ | |||
width: 100%; | |||
padding-left: 30rpx; | |||
padding-right: 30rpx; | |||
background-color: #FFFFFF; | |||
.title{ | |||
width: 100%; | |||
height: 90rpx; | |||
border-bottom: 1rpx solid #E0E0E0; | |||
display: flex; | |||
align-items: center; | |||
.title1{ | |||
width: 6rpx; | |||
height: 30rpx; | |||
background: #2671E2; | |||
} | |||
.titletext{ | |||
width: 90%; | |||
height: 30rpx; | |||
font-size: 30rpx; | |||
font-weight: 600; | |||
color: #333333; | |||
line-height: 30rpx; | |||
text-indent: 10rpx; | |||
} | |||
.titleimg{ | |||
width: 8%; | |||
text-align: right; | |||
.titleimg1{ | |||
width: 14rpx; | |||
height: 30rpx; | |||
} | |||
} | |||
} | |||
.chented-for{ | |||
width: 100%; | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin-top: -20rpx; | |||
border-bottom: 1rpx solid #E0E0E0; | |||
padding-bottom: 30rpx; | |||
.chented-che{ | |||
width: 210rpx; | |||
height: 60rpx; | |||
background: #FFFFFF; | |||
border-radius: 4rpx; | |||
border: 1px solid #C9C9C9; | |||
text-align: center; | |||
line-height: 60rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
margin-right: 20rpx; | |||
margin-top: 20rpx; | |||
} | |||
} | |||
} | |||
</style> | |||
--> |
@@ -1,198 +0,0 @@ | |||
<template> | |||
<view class="main"> | |||
<view class="backTop"></view> | |||
<!-- 头部开始 --> | |||
<view class="header box"> | |||
<view class="header-zuo"> | |||
<u-avatar | |||
:src="photo?photo:'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/zkgj/headPicture.png'" | |||
size="148"></u-avatar> | |||
</view> | |||
<view class="header-you"> | |||
<view class="userName">{{name}}</view> | |||
<view class="mobile">{{mobile}}</view> | |||
</view> | |||
</view> | |||
<view class="settingGroup box"> | |||
<navigator class="line" url="/pages/mine/Myprofile"> | |||
<view class="title"> | |||
<image src="/static/images/setting.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | |||
编辑资料 | |||
</view> | |||
<view class="right"> | |||
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | |||
</view> | |||
</navigator> | |||
<view class="line" @click="phone"> | |||
<view class="title"> | |||
<image src="/static/images/Customer.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | |||
客服电话 | |||
</view> | |||
<view class="right"> | |||
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | |||
</view> | |||
</view> | |||
<view class="line" @click="Changehepassword"> | |||
<view class="title"> | |||
<image src="/static/images/password.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | |||
修改密码 | |||
</view> | |||
<view class="right"> | |||
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | |||
</view> | |||
</view> | |||
<view class="line" @click="logout" style="border: none;"> | |||
<view class="title"> | |||
<image src="/static/images/exit.png" style="width: 36rpx;height: 36rpx;" mode=""></image> | |||
退出登录 | |||
</view> | |||
<view class="right"> | |||
<image src="/static/images/arrow.png" style="width: 18rpx;height: 32rpx;" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
export default { | |||
data() { | |||
return { | |||
name: "", | |||
photo: "", | |||
mobile: "", | |||
}; | |||
}, | |||
onShow: function() { | |||
var userInfos = uni.getStorageSync('weapp_session_userInfo_data'); | |||
this.name = userInfos.name, | |||
this.photo = userInfos.picUrl, | |||
this.mobile = userInfos.loginName | |||
}, | |||
methods: { | |||
//拨打电话 | |||
phone() { | |||
wx.makePhoneCall({ | |||
phoneNumber: '4008191707,8888' //仅为示例,并非真实的电话号码 | |||
}) | |||
}, | |||
//修改密码 | |||
Changehepassword() { | |||
uni.navigateTo({ | |||
url: '/pages/mine/Changehepassword' | |||
}); | |||
}, | |||
//退出 | |||
logout() { | |||
uni.showModal({ | |||
title: '提示', | |||
content: '确定要退出?', | |||
cancelColor: "#999999", | |||
showCancel: true, | |||
success(res) { | |||
if (res.confirm) { | |||
app.Closewebsocke() | |||
uni.clearStorageSync(); //清除缓存 | |||
uni.showToast({ | |||
icon: "none", | |||
title: "退出成功" | |||
}) | |||
uni.reLaunch({ | |||
url: '/pages/login/index' | |||
}); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.main { | |||
padding: 0 30rpx; | |||
background: #F8F8F8; | |||
display: flex; | |||
flex-direction: column; | |||
min-height: 100vh; | |||
padding-bottom: 40rpx; | |||
.backTop { | |||
background: #2671E2; | |||
position: absolute; | |||
left: 0; | |||
top: 0; | |||
width: 750rpx; | |||
height: 171rpx; | |||
} | |||
.box { | |||
background: #ffffff; | |||
} | |||
} | |||
.header { | |||
z-index: 2; | |||
width: 100%; | |||
height: 212rpx; | |||
border-radius: 12rpx; | |||
margin-top: 42rpx; | |||
display: flex; | |||
.header-zuo { | |||
width: 148rpx; | |||
height: 148rpx; | |||
margin-top: 32rpx; | |||
margin-left: 30rpx; | |||
} | |||
.header-you { | |||
margin-left: 20rpx; | |||
.userName { | |||
font-size: 36rpx; | |||
font-weight: 500; | |||
color: #303030; | |||
margin-top: 56rpx; | |||
} | |||
.mobile { | |||
font-size: 30rpx; | |||
color: #BDBDBD; | |||
margin-top: 20rpx; | |||
} | |||
} | |||
} | |||
.settingGroup { | |||
box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3); | |||
border-radius: 12rpx; | |||
margin-top: 30rpx; | |||
color: #333333; | |||
font-size: 30rpx; | |||
display: flex; | |||
flex-direction: column; | |||
.line { | |||
height: 118rpx; | |||
border-bottom: 1rpx solid #EEEEEE; | |||
margin: 0 38rpx 0 30rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
.title { | |||
display: flex; | |||
align-items: center; | |||
width: 190rpx; | |||
justify-content: space-between; | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,222 +0,0 @@ | |||
<template> | |||
<view class="main"> | |||
<view class="cented"> | |||
<view class="ceninfo" v-for="(item,index) in alllist" :key="index"> | |||
<view class="infoview"> | |||
<view class="infozuo"> | |||
<view class="infozuochiud1">{{item.jbaName}}</view> | |||
<view class="infozuochiud2">置业顾问</view> | |||
</view> | |||
<view class="infoyou"> | |||
<view class="infoyouchiud2" @click="quclick(item)">去学习</view> | |||
</view> | |||
</view> | |||
<view class="footerinfo"> | |||
<view class="footerinfozuo">{{item.assignedTime}}</view> | |||
<view class="footerinfoyou"></view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var config = require("../../config"); | |||
var util = require("../../utils/util.js"); | |||
export default { | |||
data() { | |||
return { | |||
alllist: [], | |||
id: "", | |||
biaoqian:"" | |||
}; | |||
}, | |||
onLoad(options) { | |||
this.id = options.id; | |||
this.biaoqian=options.biaoqian | |||
this.ceninit() | |||
}, | |||
methods: { | |||
quclick(item) { | |||
const parames = { | |||
pageNum: 1, | |||
pageSize: 100, | |||
query: { | |||
whetherFinish: 1, | |||
customerId: item.carId, | |||
id:item.startFile | |||
} | |||
} | |||
var cet={ | |||
bg:0, | |||
customerId:item.id, | |||
id:'' | |||
} | |||
this.$u.post("/corpus/fendianFindByPage", parames).then(res => { | |||
var newobj = res[0]; | |||
if(res[0].merge==0){ | |||
uni.navigateTo({ | |||
url: `/pages/learning/Equinoctial/index2?customerId=${newobj.customerId}&biaoqian=${this.biaoqian}&startTime=${item.startTime}&startFile=${item.startFile}` | |||
}) | |||
}else{ | |||
uni.navigateTo({ | |||
url: `/pages/learning/Equinoctial/index?customerId=${newobj.customerId}&biaoqian=${this.biaoqian}&startTime=${item.startTime}&startFile=${item.startFile}` | |||
}) | |||
} | |||
}) | |||
}, | |||
ceninit() { | |||
let itemid=uni.getStorageSync('buildingID').id; | |||
let infoobj = { | |||
"pageNum": 1, | |||
"pageSize": 100, | |||
"query": { | |||
"status": 1, | |||
"marketingId": this.id, | |||
"itemId":itemid | |||
} | |||
} | |||
uni.request({ | |||
url: config.service.findAllZATD, | |||
method: "POST", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
data: infoobj, | |||
success: (data) => { | |||
console.log(data.data.data.results, "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"); | |||
if (data.data.code == 10000) { | |||
this.alllist = data.data.data.results | |||
} else { | |||
uni.showToast({ | |||
title: data.data.message, | |||
duration: 2000 | |||
}); | |||
} | |||
} | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.main { | |||
background: #F1F1F1; | |||
; | |||
min-height: 100vh; | |||
padding-top: 30rpx; | |||
} | |||
.cented { | |||
width: 100%; | |||
padding-top: 14rpx; | |||
.ceninfo { | |||
width: 690rpx; | |||
height: 160rpx; | |||
background: #FFFFFF; | |||
border-radius: 8rpx; | |||
margin: 0 auto; | |||
padding-top: 23rpx; | |||
position: relative; | |||
margin-top: 20rpx; | |||
.infoview { | |||
width: 100%; | |||
height: 64rpx; | |||
display: flex; | |||
.infozuo { | |||
width: 454rpx; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
.infozuochiud1 { | |||
font-size: 36rpx; | |||
font-weight: 600; | |||
color: #0C0C0C; | |||
text-indent: 28rpx; | |||
} | |||
.infozuochiud2 { | |||
width: 113rpx; | |||
height: 42rpx; | |||
border-radius: 5rpx; | |||
margin-left: 19rpx; | |||
border: 1px solid #008EF2; | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #008EF2; | |||
line-height: 42rpx; | |||
text-align: center; | |||
} | |||
} | |||
.infoyou { | |||
width: 236rpx; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
.infoyouchiud1 { | |||
display: block; | |||
width: 64rpx; | |||
height: 64rpx; | |||
border-radius: 50%; | |||
} | |||
.infoyouchiud2 { | |||
width: 133rpx; | |||
height: 56rpx; | |||
background: #008EF2; | |||
border-radius: 8rpx; | |||
text-align: center; | |||
color: #FFFFFF; | |||
font-size: 30rpx; | |||
line-height: 56rpx; | |||
margin-left: 80rpx; | |||
} | |||
} | |||
} | |||
.footerinfo { | |||
width: 100%; | |||
height: 42rpx; | |||
display: flex; | |||
margin-top: 14rpx; | |||
.footerinfozuo { | |||
width: 454rpx; | |||
font-size: 30rpx; | |||
color: #0C0C0C; | |||
line-height: 42rpx; | |||
margin-left: 26rpx; | |||
} | |||
.footerinfoyou { | |||
width: 236rpx; | |||
font-size: 24rpx; | |||
color: #999999; | |||
line-height: 42rpx; | |||
text-indent: 42rpx; | |||
} | |||
} | |||
.dingwei { | |||
width: 100%; | |||
height: 60rpx; | |||
border: 1px solid red; | |||
position: absolute; | |||
top: 160rpx; | |||
left: 0rpx; | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,139 +0,0 @@ | |||
<template> | |||
<view class="translation"> | |||
<view style="width: 690rpx;height: 64rpx;margin: 0 auto;margin-top: 30rpx;background: #F2F2F2;border-radius: 32rpx; | |||
display: flex;align-items: center;"> | |||
<view style="width: 10%;height: 64rpx;display: flex;align-items: center;"> | |||
<image style="width: 28rpx;height: 28rpx;margin-left: 30rpx;" src="/static/images/search.png" mode=""></image> | |||
</view> | |||
<view style="width: 90%;height: 64rpx;display: flex;align-items: center;"> | |||
<input type="text" @input="searchinfo" :disabled="disabled" v-model="keyword" placeholder="请输入关键字" | |||
style="width: 100%;color: #999999;font-size: 24rpx;"/> | |||
</view> | |||
</view> | |||
<view style="width: 690rpx;margin: 0 auto;margin-top: 10rpx;"> | |||
<view style="width: 100%;border-bottom: 1px solid #E0E0E0;display: flex;padding-bottom: 10rpx;margin-top: 40rpx;" | |||
v-for="(item,index) in listarr" :key='index' @click="toaidoinfo(item.Content,item.corpusId,item.index)"> | |||
<view style="width: 26rpx;height: 36rpx;margin-top: 4rpx;"> | |||
<image style="width: 26rpx;height: 28rpx;" src="../../static/images/testimg.png" mode=""></image> | |||
</view> | |||
<view v-html="item.Content.text" style="color: #666666;font-size: 28rpx;line-height: 36rpx;margin-left: 10rpx;width: 80%;"></view> | |||
<view style="font-size: 28rpx;width: 10%;width: 14%;text-align: right;">{{item.Content.time}}</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
export default { | |||
data() { | |||
return { | |||
customerId:'', | |||
listarr:[], | |||
keyword:'', | |||
skpl:'', | |||
disabled:false | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
this.customerId = options.customerId; | |||
this.keyword=options.keyword; | |||
this.skpl=options.skpl; | |||
if(this.skpl==2){ | |||
this.searchinfo() | |||
this.disabled=true; | |||
}else{ | |||
this.disabled=false; | |||
} | |||
}, | |||
methods: { | |||
formatTime(num) { | |||
//格式化时间格式 | |||
num = num.toFixed(0); | |||
let second = num % 60; | |||
if (second < 10) second = '0' + second; | |||
let min = Math.floor(num / 60); | |||
if (min < 10) min = '0' + min; | |||
return min + ":" + second; | |||
}, | |||
searchinfo(){ | |||
if(this.keyword.length==0){ | |||
return | |||
}else{ | |||
let parames={ | |||
keyword:this.keyword, | |||
customerId:this.customerId | |||
} | |||
this.$u.post("/corpus/keyWordsMatching", parames).then(res => { | |||
res.forEach(item=>{ | |||
item.Content=JSON.parse(item.transferContent) | |||
}) | |||
res.forEach(cet=>{ | |||
cet.Content.time=this.formatTime(cet.Content.bg/1000) | |||
cet.Content.text=this.brightKeyword(cet.Content.onebest) | |||
}) | |||
this.listarr=res; | |||
}) | |||
} | |||
}, | |||
//替换方法 | |||
brightKeyword(val) { | |||
if (val.indexOf(this.keyword) !== -1) { | |||
return val.replace(this.keyword, `<font style='color: red'>${this.keyword}</font>`); | |||
} else { | |||
return val; | |||
} | |||
}, | |||
//跳转 | |||
toaidoinfo(item,id,index){ | |||
item.customerId=this.customerId; | |||
item.id=id; | |||
item.index=index; | |||
if(this.skpl==2){ | |||
this.infostust(item) | |||
}else{ | |||
let pages = getCurrentPages() //获取当前页面栈的信息 | |||
let prevPage = pages[pages.length - 2] //获取上一个页面 | |||
prevPage.setData({ //把需要回传的值保存到上一个页面 | |||
info: item | |||
}); | |||
wx.navigateBack({ //然后返回上一个页面 | |||
delta: 1 | |||
}) | |||
} | |||
}, | |||
//只有一条的时候 | |||
infostust(item){ | |||
console.log("zobudao") | |||
let d = JSON.parse(JSON.stringify([item])) | |||
d[0].onebest="" | |||
const parames = { | |||
pageNum: 1, | |||
pageSize: 100, | |||
query: { | |||
customerId: this.customerId, | |||
} | |||
} | |||
this.$u.post("/corpus/findByPage", parames).then(res => { | |||
if(res[0].merge==0){ | |||
let newobj = res[0]; | |||
uni.navigateTo({ | |||
url: `/pages/main/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}` | |||
}) | |||
}else{ | |||
let newobj = res[0]; | |||
uni.navigateTo({ | |||
url: `/pages/main/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}` | |||
}) | |||
} | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
</style> |
@@ -1,99 +0,0 @@ | |||
<template> | |||
<view class="translation"> | |||
<view style="width: 690rpx;margin: 0 auto;margin-top: 10rpx;"> | |||
<view style="width: 100%;border-bottom: 1px solid #E0E0E0;display: flex;padding-bottom: 10rpx;margin-top: 40rpx;" | |||
v-for="(item,index) in listarr" :key='index' @click="toaidoinfo(item.Content,item.corpusId,item.index)"> | |||
<view style="width: 26rpx;height: 36rpx;margin-top: 4rpx;"> | |||
<image style="width: 26rpx;height: 28rpx;" src="../../../static/images/testimg.png" mode=""></image> | |||
</view> | |||
<view v-html="item.Content.onebest" style="color: #666666;font-size: 28rpx;line-height: 36rpx;margin-left: 10rpx;width: 80%;"></view> | |||
<view style="font-size: 28rpx;width: 10%;width: 14%;text-align: right;">{{item.Content.time}}</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../../utils/util.js"); | |||
var config = require("../../../config"); | |||
export default { | |||
data() { | |||
return { | |||
customerId:'', | |||
listarr:[], | |||
id:'', | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
this.customerId = options.customerId; | |||
this.id=options.id; | |||
this.searchinfo() | |||
}, | |||
methods: { | |||
formatTime(num) { | |||
//格式化时间格式 | |||
num = num.toFixed(0); | |||
let second = num % 60; | |||
if (second < 10) second = '0' + second; | |||
let min = Math.floor(num / 60); | |||
if (min < 10) min = '0' + min; | |||
return min + ":" + second; | |||
}, | |||
//搜索 | |||
searchinfo(){ | |||
let parames={ | |||
marketingId:this.id, | |||
customerId:this.customerId | |||
} | |||
this.$u.post("/corpus/pinWordMatching", parames).then(res => { | |||
res.forEach(item=>{ | |||
item.Content=JSON.parse(item.transferContent) | |||
}) | |||
res.forEach(cet=>{ | |||
cet.Content.time=this.formatTime(cet.Content.bg/1000) | |||
}) | |||
this.listarr=res; | |||
}) | |||
}, | |||
//跳转 | |||
toaidoinfo(item,id,index){ | |||
item.customerId=this.customerId; | |||
item.id=id; | |||
item.index=index; | |||
this.infostust(item) | |||
}, | |||
//只有一条的时候 | |||
infostust(item){ | |||
console.log("zobudao") | |||
let d = JSON.parse(JSON.stringify([item])) | |||
d[0].onebest="" | |||
const parames = { | |||
pageNum: 1, | |||
pageSize: 100, | |||
query: { | |||
customerId: this.customerId, | |||
} | |||
} | |||
this.$u.post("/corpus/findByPage", parames).then(res => { | |||
if(res[0].merge==0){ | |||
let newobj = res[0]; | |||
uni.navigateTo({ | |||
url: `/pages/main/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}` | |||
}) | |||
}else{ | |||
let newobj = res[0]; | |||
uni.navigateTo({ | |||
url: `/pages/main/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}` | |||
}) | |||
} | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
</style> |
@@ -1,140 +0,0 @@ | |||
<template> | |||
<view class="translation"> | |||
<view style="width: 690rpx;height: 64rpx;margin: 0 auto;margin-top: 30rpx;background: #F2F2F2;border-radius: 32rpx; | |||
display: flex;align-items: center;"> | |||
<view style="width: 10%;height: 64rpx;display: flex;align-items: center;"> | |||
<image style="width: 28rpx;height: 28rpx;margin-left: 30rpx;" src="/static/images/search.png" mode=""></image> | |||
</view> | |||
<view style="width: 90%;height: 64rpx;display: flex;align-items: center;"> | |||
<input type="text" @input="searchinfo" :disabled="disabled" v-model="keyword" placeholder="请输入关键字" | |||
style="width: 100%;color: #999999;font-size: 24rpx;"/> | |||
</view> | |||
</view> | |||
<view style="width: 690rpx;margin: 0 auto;margin-top: 10rpx;"> | |||
<view style="width: 100%;border-bottom: 1px solid #E0E0E0;display: flex;padding-bottom: 10rpx;margin-top: 40rpx;" | |||
v-for="(item,index) in listarr" :key='index' @click="toaidoinfo(item.Content,item.corpusId,item.index)"> | |||
<view style="width: 26rpx;height: 36rpx;margin-top: 4rpx;"> | |||
<image style="width: 26rpx;height: 28rpx;" src="/static/images/testimg.png" mode=""></image> | |||
</view> | |||
<view v-html="item.Content.text" style="color: #666666;font-size: 28rpx;line-height: 36rpx;margin-left: 10rpx;width: 80%;"></view> | |||
<view style="font-size: 28rpx;width: 10%;width: 14%;text-align: right;">{{item.Content.time}}</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../../utils/util.js"); | |||
var config = require("../../../config"); | |||
export default { | |||
data() { | |||
return { | |||
customerId:'', | |||
listarr:[], | |||
keyword:'', | |||
skpl:'', | |||
disabled:false | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
this.customerId = options.customerId; | |||
this.keyword=options.keyword; | |||
this.skpl=options.skpl; | |||
}, | |||
methods: { | |||
formatTime(num) { | |||
//格式化时间格式 | |||
num = num.toFixed(0); | |||
let second = num % 60; | |||
if (second < 10) second = '0' + second; | |||
let min = Math.floor(num / 60); | |||
if (min < 10) min = '0' + min; | |||
return min + ":" + second; | |||
}, | |||
searchinfo(){ | |||
if(this.keyword.length==0){ | |||
return | |||
}else{ | |||
let parames={ | |||
keyword:this.keyword, | |||
customerId:this.customerId | |||
} | |||
this.$u.post("/corpus/keyWordsMatching", parames).then(res => { | |||
res.forEach(item=>{ | |||
item.Content=JSON.parse(item.transferContent) | |||
}) | |||
res.forEach(cet=>{ | |||
cet.Content.time=this.formatTime(cet.Content.bg/1000) | |||
cet.Content.text=this.brightKeyword(cet.Content.onebest) | |||
}) | |||
this.listarr=res; | |||
}) | |||
} | |||
}, | |||
//替换方法 | |||
brightKeyword(val) { | |||
if (val.indexOf(this.keyword) !== -1) { | |||
return val.replace(this.keyword, `<font style='color: red'>${this.keyword}</font>`); | |||
} else { | |||
return val; | |||
} | |||
}, | |||
//跳转 | |||
toaidoinfo(item,id,index){ | |||
item.customerId=this.customerId; | |||
item.id=id; | |||
item.index=index; | |||
if(this.skpl==2){ | |||
this.infostust(item) | |||
}else{ | |||
let pages = getCurrentPages() //获取当前页面栈的信息 | |||
let prevPage = pages[pages.length - 2] //获取上一个页面 | |||
prevPage.setData({ //把需要回传的值保存到上一个页面 | |||
info: item | |||
}); | |||
wx.navigateBack({ //然后返回上一个页面 | |||
delta: 1 | |||
}) | |||
} | |||
}, | |||
//只有一条的时候 | |||
infostust(item){ | |||
let d = JSON.parse(JSON.stringify([item])) | |||
var itemobjhh={ | |||
bg:d[0].bg, | |||
customerId:d[0].customerId, | |||
id:'', | |||
onebest:d[0].onebest, | |||
} | |||
const parames = { | |||
pageNum: 1, | |||
pageSize: 100, | |||
query: { | |||
customerId: this.customerId, | |||
} | |||
} | |||
console.log(item) | |||
this.$u.post("/corpus/findByPage", parames).then(res => { | |||
if(res[0].merge==0){ | |||
let newobj = res[0]; | |||
uni.navigateTo({ | |||
url: `/pages/learning/Thefulltext/index2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(itemobjhh)}&stateisshow=${'2'}` | |||
}) | |||
}else{ | |||
let newobj = res[0]; | |||
uni.navigateTo({ | |||
url: `/pages/learning/Thefulltext/index?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(itemobjhh)}&stateisshow=${'2'}` | |||
}) | |||
} | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
</style> |
@@ -1,347 +0,0 @@ | |||
<template> | |||
<view> | |||
<view class="input"> | |||
<view class="zcasfdasf">设置密码</view> | |||
<view class="tejHdgasd">设置密码后,就可以使用手机号码与密码登录了~</view> | |||
<view style="margin-top:60rpx" class="cwjs-cells item-flex"> | |||
<view class="cwjs-item center"> | |||
<input class="cwjs-item cwjs-input" v-model="username" password="true" placeholder="请设置6~12位的登录密码" | |||
placeholder-style='color:#AAAAAA' maxlength="12" /> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="button" @tap="bindWxBLogin">确认</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
var app = getApp(); | |||
var WXB_SESSION_LOGIN_DATA = 'weapp_session_login_data'; | |||
export default { | |||
data() { | |||
return { | |||
username: '', //获取到的密码 | |||
phone: '' | |||
} | |||
}, | |||
onLoad: function(options) { | |||
this.phone = options.username | |||
}, | |||
methods: { | |||
bindWxBLogin() { | |||
if (this.username.length < 6) { | |||
util.showNone("密码小于6位,请重试"); | |||
return false; | |||
} else { | |||
var loginParams = { | |||
name: this.phone, //手机号 | |||
newPassword: this.username, //密码 | |||
} | |||
uni.request({ | |||
url: config.service.forgotPassword, | |||
header: { | |||
'content-type': 'application/json' | |||
}, | |||
data: loginParams, | |||
method: "POST", | |||
success: function(result) { | |||
if (result.data.code == 10000) { | |||
uni.reLaunch({ | |||
url: '/pages/login/index', | |||
}) | |||
} else { | |||
util.showNone(result.data.message); | |||
return false; | |||
} | |||
} | |||
}) | |||
} | |||
} | |||
} | |||
}; | |||
</script> | |||
<style lang="scss"> | |||
.cwjs-logo { | |||
display: block; | |||
width: 219rpx; | |||
height: 158rpx; | |||
margin: 54rpx auto 66rpx; | |||
} | |||
.cwjs-tips { | |||
font-size: 24rpx; | |||
padding: 80rpx 0; | |||
color: #8a8a8a; | |||
} | |||
.cwjs-form { | |||
position: relative; | |||
margin: 0; | |||
background-color: #fff; | |||
border-radius: 10px; | |||
padding: 20rpx 40rpx 113rpx; | |||
} | |||
.zcasfdasf { | |||
height: 48rpx; | |||
font-size: 48rpx; | |||
font-weight: 400; | |||
color: #303030; | |||
line-height: 48rpx; | |||
margin-top: 80rpx; | |||
} | |||
.tejHdgasd { | |||
height: 28rpx; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #303030; | |||
line-height: 28rpx; | |||
margin-top: 28rpx; | |||
} | |||
.cwjs-cells { | |||
width: 600rpx; | |||
display: flex; | |||
flex-direction: row; | |||
justify-content: space-between; | |||
align-items: center; | |||
margin: 0 auto; | |||
height: 88rpx; | |||
overflow: hidden; | |||
border-bottom: 1rpx solid #BFC7D3; | |||
position: relative; | |||
} | |||
.center { | |||
flex: 1; | |||
display: flex; | |||
} | |||
.texteasda { | |||
height: 88rpx; | |||
line-height: 88rpx; | |||
font-size: 28rpx; | |||
color: #000; | |||
} | |||
.cwjs-input { | |||
width: 100%; | |||
height: 88rpx; | |||
line-height: 88rpx; | |||
font-size: 28rpx; | |||
color: #000; | |||
} | |||
.images { | |||
display: block; | |||
width: 40rpx; | |||
height: 21rpx; | |||
margin-right: 30rpx; | |||
margin-top: 33.5rpx; | |||
} | |||
.mod-btn { | |||
position: absolute; | |||
bottom: -80rpx; | |||
left: 50%; | |||
margin-left: -80rpx; | |||
} | |||
.mod-btn .button { | |||
width: 160rpx; | |||
height: 160rpx; | |||
background: linear-gradient(180deg, rgba(116, 197, 230, 1) 0%, rgba(64, 147, 201, 1) 100%); | |||
border: 10rpx solid rgba(255, 255, 255, 1); | |||
border-radius: 100%; | |||
font-size: 36rpx; | |||
color: #fff; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
.mod-btn .button::after { | |||
content: "" | |||
} | |||
.retPassword { | |||
display: inline; | |||
width: auto; | |||
font-size: 28rpx; | |||
color: rgba(64, 147, 201, 1); | |||
line-height: 40rpx; | |||
float: right; | |||
} | |||
.retPassword:active { | |||
background-color: #fff; | |||
} | |||
.appliyAdmin { | |||
position: absolute; | |||
left: 50%; | |||
margin-left: -57rpx; | |||
bottom: 100rpx; | |||
width: 114rpx; | |||
font-size: 28rpx; | |||
color: rgba(255, 255, 255, 1); | |||
line-height: 40rpx; | |||
} | |||
/* 头部 */ | |||
.head { | |||
width: 750rpx; | |||
height: 355rpx; | |||
} | |||
.background { | |||
width: 750rpx; | |||
height: 400rpx; | |||
position: absolute; | |||
top: -3rpx; | |||
left: 0; | |||
} | |||
.logo { | |||
width: 123rpx; | |||
height: 107rpx; | |||
display: block; | |||
position: absolute; | |||
top: 84rpx; | |||
left: 313.5rpx; | |||
} | |||
.head text { | |||
font-size: 34rpx; | |||
font-family: PingFangSC-Medium, PingFang SC; | |||
font-weight: 500; | |||
color: #2343BD; | |||
position: absolute; | |||
top: 222rpx; | |||
left: 203rpx; | |||
} | |||
/* 输入框 */ | |||
.input { | |||
width: 100%; | |||
height: auto; | |||
padding: 0 90rpx; | |||
box-sizing: border-box; | |||
} | |||
.logo_input { | |||
width: 34rpx; | |||
height: 38rpx; | |||
position: absolute; | |||
top: 25rpx; | |||
left: 0; | |||
} | |||
/* 登录 */ | |||
.button { | |||
width: 603rpx; | |||
height: 89rpx; | |||
background: rgba(72, 149, 255, 1); | |||
box-shadow: 0rpx 2rpx 14rpx 0rpx rgba(151, 192, 255, 1); | |||
border-radius: 45rpx; | |||
text-align: center; | |||
line-height: 89rpx; | |||
color: #fff; | |||
margin: 0 auto; | |||
margin-top: 239rpx; | |||
font-size: 34rpx; | |||
} | |||
.footer { | |||
width: 100%; | |||
height: 157rpx; | |||
position: absolute; | |||
bottom: 0; | |||
left: 0; | |||
} | |||
.agreeBox { | |||
/* text-align: center; */ | |||
/* width: 450rpx; */ | |||
/* padding-left: 145rpx; */ | |||
font-size: 28rpx; | |||
color: #88909E; | |||
margin: 0 auto; | |||
margin-top: 30rpx; | |||
position: relative; | |||
display: flex; | |||
} | |||
checkbox { | |||
transform: scale(0.5); | |||
} | |||
checkbox-group { | |||
display: inline; | |||
} | |||
navigator { | |||
display: inline | |||
} | |||
.agreeBox image { | |||
width: 26rpx; | |||
height: 26rpx; | |||
display: block; | |||
position: absolute; | |||
top: 9rpx; | |||
left: 18rpx; | |||
margin-right: 19rpx; | |||
} | |||
.imagesBox { | |||
width: 80rpx; | |||
height: 88rpx; | |||
} | |||
.chooseBox { | |||
width: 60rpx; | |||
height: 60rpx; | |||
} | |||
.login { | |||
text-decoration: underline; | |||
text-align: center; | |||
margin-top: 40px; | |||
color: #88909E; | |||
font-size: 28rpx; | |||
} | |||
.textbox { | |||
width: 569rpx; | |||
display: flex; | |||
margin-top: 40rpx; | |||
} | |||
.textbox-1 { | |||
width: 30%; | |||
font-size: 30rpx; | |||
color: #999999; | |||
} | |||
.textbox-11 { | |||
width: 30%; | |||
text-align: right; | |||
font-size: 30rpx; | |||
color: #999999; | |||
} | |||
.textbox-2 { | |||
width: 40%; | |||
} | |||
</style> |
@@ -1,347 +0,0 @@ | |||
<template> | |||
<view> | |||
<view class="head"> | |||
<text>智能高效客户管理平台</text> | |||
</view> | |||
<view class="input"> | |||
<view class="cwjs-cells item-flex"> | |||
<view class="cwjs-item center"> | |||
<input type="text" v-model="username" placeholder="请输入手机号码" maxlength="11" | |||
placeholder-style='color:#AAAAAA' /> | |||
</view> | |||
</view> | |||
<view class="textbox"> | |||
<view class="textbox-1" @tap="bindVerification">密码登录</view> | |||
<view class="textbox-2"></view> | |||
<view class="textbox-11"></view> | |||
</view> | |||
</view> | |||
<view class="button" @tap="bindWxBLogin">获取验证码</view> | |||
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/login/footer.png" class="footer"> | |||
</image> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
var app = getApp(); | |||
export default { | |||
data() { | |||
return { | |||
username: '', | |||
role: '' | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
this.role=options.role; | |||
}, | |||
methods: { | |||
//账号密码登录 | |||
bindVerification() { | |||
uni.navigateTo({ | |||
url: '/pages/login/index', | |||
}) | |||
}, | |||
//获取验证码 | |||
bindWxBLogin: function(e) { | |||
if (!(/^1[34578]\d{9}$/.test(this.username))) { | |||
util.showNone("手机号码错误"); | |||
this.username=''; | |||
return false; | |||
} else { | |||
uni.request({ | |||
url: config.service.sendCode + "?mobile=" + this.username, | |||
method: "GET", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
success: (data) => { | |||
console.log(data) | |||
// 成功地响应会话信息 | |||
if (data.data.code == 10000) { | |||
util.showSuccess('发送成功'); | |||
if(this.role==1){ | |||
uni.navigateTo({ | |||
url: '/pages/login/yinzhongmalogin?username=' + this.username + | |||
'&role=' + this.role, | |||
}) | |||
}else{ | |||
uni.navigateTo({ | |||
url: '/pages/login/Verifythelogin?username=' + this.username + | |||
'&role=' + this.role, | |||
}) | |||
} | |||
// 没有正确响应会话信息 | |||
} else { | |||
util.showNone(data.data.message); | |||
return false; | |||
} | |||
}, | |||
}) | |||
} | |||
}, | |||
} | |||
}; | |||
</script> | |||
<style lang="scss"> | |||
.cwjs-logo { | |||
display: block; | |||
width: 219rpx; | |||
height: 158rpx; | |||
margin: 54rpx auto 66rpx; | |||
} | |||
.cwjs-tips { | |||
font-size: 24rpx; | |||
padding: 80rpx 0; | |||
color: #8a8a8a; | |||
} | |||
.cwjs-form { | |||
position: relative; | |||
margin: 0; | |||
background-color: #fff; | |||
border-radius: 10px; | |||
padding: 20rpx 40rpx 113rpx; | |||
} | |||
.cwjs-cells { | |||
width: 569rpx; | |||
display: flex; | |||
flex-direction: row; | |||
justify-content: space-between; | |||
align-items: center; | |||
margin: 0 auto; | |||
height: 88rpx; | |||
overflow: hidden; | |||
border-bottom: 1rpx solid #BFC7D3; | |||
position: relative; | |||
} | |||
.center { | |||
flex: 1; | |||
} | |||
.cwjs-input { | |||
height: 48rpx; | |||
line-height: 48rpx; | |||
padding: 23rpx 23rpx 23rpx 78rpx; | |||
font-size: 28rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
color: #000; | |||
} | |||
.images { | |||
display: block; | |||
width: 40rpx; | |||
height: 21rpx; | |||
margin-right: 30rpx; | |||
margin-top: 33.5rpx; | |||
} | |||
.mod-btn { | |||
position: absolute; | |||
bottom: -80rpx; | |||
left: 50%; | |||
margin-left: -80rpx; | |||
} | |||
.mod-btn .button { | |||
width: 160rpx; | |||
height: 160rpx; | |||
background: linear-gradient(180deg, rgba(116, 197, 230, 1) 0%, rgba(64, 147, 201, 1) 100%); | |||
border: 10rpx solid rgba(255, 255, 255, 1); | |||
border-radius: 100%; | |||
font-size: 36rpx; | |||
color: #fff; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
.mod-btn .button::after { | |||
content: "" | |||
} | |||
.retPassword { | |||
display: inline; | |||
width: auto; | |||
font-size: 28rpx; | |||
color: rgba(64, 147, 201, 1); | |||
line-height: 40rpx; | |||
float: right; | |||
} | |||
.retPassword:active { | |||
background-color: #fff; | |||
} | |||
.appliyAdmin { | |||
position: absolute; | |||
left: 50%; | |||
margin-left: -57rpx; | |||
bottom: 100rpx; | |||
width: 114rpx; | |||
font-size: 28rpx; | |||
color: rgba(255, 255, 255, 1); | |||
line-height: 40rpx; | |||
} | |||
/* 头部 */ | |||
.head { | |||
width: 750rpx; | |||
height: 410rpx; | |||
background-image: url(https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/background.png); | |||
background-size: 100vw auto; | |||
background-repeat: no-repeat; | |||
} | |||
.background { | |||
width: 750rpx; | |||
height: 400rpx; | |||
position: absolute; | |||
top: -3rpx; | |||
left: 0; | |||
} | |||
.logo { | |||
width: 248upx; | |||
height: 248upx; | |||
display: block; | |||
position: absolute; | |||
top: 134rpx; | |||
left: 240.5rpx; | |||
} | |||
.head text { | |||
font-size: 34rpx; | |||
font-family: PingFangSC-Medium, PingFang SC; | |||
font-weight: 500; | |||
color: #008EF2; | |||
position: absolute; | |||
top: 300rpx; | |||
width: 100%; | |||
text-align: center; | |||
} | |||
/* 输入框 */ | |||
.input { | |||
width: 100%; | |||
height: auto; | |||
padding: 0 105rpx; | |||
box-sizing: border-box; | |||
} | |||
.logo_input { | |||
width: 34rpx; | |||
height: 38rpx; | |||
position: absolute; | |||
top: 25rpx; | |||
left: 0; | |||
} | |||
/* 登录 */ | |||
.button { | |||
width: 603rpx; | |||
height: 89rpx; | |||
background: rgba(72, 149, 255, 1); | |||
box-shadow: 0rpx 2rpx 14rpx 0rpx rgba(151, 192, 255, 1); | |||
border-radius: 45rpx; | |||
text-align: center; | |||
line-height: 89rpx; | |||
color: #fff; | |||
margin: 0 auto; | |||
margin-top: 239rpx; | |||
font-size: 34rpx; | |||
} | |||
.footer { | |||
width: 100%; | |||
height: 157rpx; | |||
position: absolute; | |||
bottom: 0; | |||
left: 0; | |||
} | |||
.agreeBox { | |||
/* text-align: center; */ | |||
/* width: 450rpx; */ | |||
/* padding-left: 145rpx; */ | |||
font-size: 28rpx; | |||
color: #88909E; | |||
margin: 0 auto; | |||
margin-top: 30rpx; | |||
position: relative; | |||
display: flex; | |||
margin-left: 83upx; | |||
} | |||
checkbox { | |||
transform: scale(0.5); | |||
} | |||
checkbox-group { | |||
display: inline; | |||
} | |||
navigator { | |||
display: inline | |||
} | |||
.agreeBox image { | |||
width: 26rpx; | |||
height: 26rpx; | |||
display: block; | |||
position: absolute; | |||
top: 9rpx; | |||
left: 18rpx; | |||
margin-right: 19rpx; | |||
} | |||
.imagesBox { | |||
width: 80rpx; | |||
height: 88rpx; | |||
} | |||
.chooseBox { | |||
width: 60rpx; | |||
height: 60rpx; | |||
} | |||
.login { | |||
text-decoration: underline; | |||
text-align: center; | |||
margin-top: 40px; | |||
color: #88909E; | |||
font-size: 28rpx; | |||
} | |||
.textbox { | |||
width: 569rpx; | |||
display: flex; | |||
margin-top: 40rpx; | |||
} | |||
.textbox-1 { | |||
width: 30%; | |||
font-size: 30rpx; | |||
color: #999999; | |||
} | |||
.textbox-11 { | |||
width: 30%; | |||
text-align: right; | |||
font-size: 30rpx; | |||
color: #999999; | |||
} | |||
.textbox-2 { | |||
width: 40%; | |||
} | |||
</style> |
@@ -1,238 +0,0 @@ | |||
<template> | |||
<view class="content"> | |||
<view class="sadsadasdasdsadasd">智能高效客户管理平台</view> | |||
<view class="sction"> | |||
<view class="mama"> | |||
<view class="mamaz"> | |||
<input type="text" v-model="msg" maxlength="4" placeholder="请输入验证码" placeholder-class="input-class" class="input" /> | |||
</view> | |||
<view class="mamay"> | |||
<view class="sada" v-if="sendAuthCode" style="font-size: 35rpx;" @click="getAuthCode">获取验证码</view> | |||
<text class="sada" v-if="!sendAuthCode"> | |||
重新发送 | |||
<text>({{ auth_time }})</text> | |||
</text> | |||
</view> | |||
</view> | |||
<view class="login-btn" :style="{ background: msg == '' ? '#F2F2F2' : '#2B6EFF' }" @click="denglu"><text | |||
class="">确认</text></view> | |||
<view class="code-login" @click="passwordlogin"><text>密码登录</text></view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
var app = getApp(); | |||
export default { | |||
data() { | |||
return { | |||
sendAuthCode: true, | |||
auth_time: 0, | |||
msg: '', | |||
phonecet: '', | |||
role:'' | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
var phonese = options.username; | |||
var phonexxz = phonese.substring(0, 3) + '****' + phonese.substring(7); | |||
this.phone = phonexxz, | |||
this.phonecet = options.username, | |||
this.role = options.role | |||
this.sendAuthCode = false; | |||
this.auth_time = 60; | |||
var auth_timetimer = setInterval(() => { | |||
this.auth_time--; | |||
if (this.auth_time <= 0) { | |||
this.sendAuthCode = true; | |||
clearInterval(auth_timetimer); | |||
} | |||
}, 1000); | |||
}, | |||
methods: { | |||
//跳转密码登录页面 | |||
passwordlogin() { | |||
uni.reLaunch()({ | |||
url: '/pages/login/index', | |||
}) | |||
}, | |||
//获取验证码 | |||
getAuthCode() { | |||
this.sendAuthCode = false; | |||
this.auth_time = 60; | |||
var auth_timetimer = setInterval(() => { | |||
this.auth_time--; | |||
if (this.auth_time <= 0) { | |||
this.sendAuthCode = true; | |||
clearInterval(auth_timetimer); | |||
} | |||
}, 1000); | |||
}, | |||
//登录 | |||
denglu() { | |||
if (this.msg=='') { | |||
uni.showToast({ | |||
title: '验证码不能为空', | |||
icon: 'none' | |||
}); | |||
return | |||
} | |||
if (this.msg.length == 4) { | |||
uni.navigateTo({ | |||
url: '/pages/login/Setthepassword?username='+'18655732363', | |||
}) | |||
} else { | |||
uni.showToast({ | |||
title: '验证码位数不正确', | |||
icon: 'none' | |||
}); | |||
} | |||
}, | |||
} | |||
}; | |||
</script> | |||
<style> | |||
.mama { | |||
width: 620rpx; | |||
display: flex; | |||
border-bottom: 1px solid #E1E1E1; | |||
margin: 60rpx auto; | |||
} | |||
.sadsadasdasdsadasd { | |||
font-size: 34rpx; | |||
font-family: PingFangSC-Medium, PingFang SC; | |||
font-weight: 500; | |||
color: #008EF2; | |||
width: 100%; | |||
text-align: center; | |||
padding-top: 340rpx; | |||
} | |||
.mamaz { | |||
width: 50%; | |||
height: 90rpx; | |||
} | |||
.mamay { | |||
width: 50%; | |||
height: 90rpx; | |||
} | |||
.input { | |||
width: 350rpx; | |||
color: #78DFB0; | |||
height: 100%; | |||
line-height: 90rpx; | |||
font-size: 17px; | |||
color: #171717; | |||
} | |||
.sada { | |||
width: 70%; | |||
line-height: 90rpx; | |||
color: #2B6EFF; | |||
text-align: right; | |||
font-size: 35rpx; | |||
margin-left: 100rpx; | |||
display: block; | |||
} | |||
.content { | |||
margin: 0; | |||
padding: 0; | |||
background-image: url(https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/background.png); | |||
background-size: 100vw auto; | |||
background-repeat: no-repeat; | |||
} | |||
.login-text { | |||
font-size: 60rpx; | |||
font-family: PingFang SC; | |||
font-weight: 500; | |||
color: rgba(23, 23, 23, 1); | |||
letter-spacing: 8rpx; | |||
margin-left: 75rpx; | |||
font-weight: bold; | |||
} | |||
.login-input { | |||
border-bottom: 1px solid #e1e1e1; | |||
color: #c9cac9; | |||
margin: 98rpx 64rpx 200rpx 75rpx; | |||
font-size: 17px; | |||
} | |||
.login-btn { | |||
margin: 0 auto; | |||
margin-top: 240rpx; | |||
width: 567rpx; | |||
height: 86rpx; | |||
border-radius: 2em; | |||
font-size: 17px; | |||
font-weight: bold; | |||
border: none; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
color: #ffffff; | |||
} | |||
.code-login { | |||
display: flex; | |||
justify-content: center; | |||
margin-top: 40rpx; | |||
color: #D6D7D6; | |||
margin-bottom: 200rpx; | |||
font-size: 30rpx; | |||
} | |||
.log-box { | |||
display: flex; | |||
flex-direction: row; | |||
justify-content: center; | |||
align-items: center; | |||
font-size: 28rpx; | |||
color: #bfc0bf; | |||
margin-bottom: 65rpx; | |||
} | |||
.hengx { | |||
margin: 0 20rpx 0 20rpx; | |||
height: 2rpx; | |||
width: 232rpx; | |||
background: #e1e1e1; | |||
} | |||
.wechat { | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
width: 93rpx; | |||
height: 93rpx; | |||
background: rgba(255, 255, 255, 1); | |||
box-shadow: 0px 10rpx 30rpx rgba(120, 223, 176, 0.22); | |||
border-radius: 50%; | |||
margin: 0 auto; | |||
} | |||
.btn-get { | |||
width: 250rpx; | |||
font-size: 17px; | |||
color: #c9cac9; | |||
position: relative; | |||
top: -290rpx; | |||
right: -450rpx; | |||
} | |||
.input-class { | |||
color: #D6D7D6; | |||
font-size: 17px; | |||
letter-spacing: 1rpx; | |||
} | |||
</style> |
@@ -1,418 +0,0 @@ | |||
<template> | |||
<view> | |||
<view class="head"> | |||
<text>智能高效客户管理平台</text> | |||
</view> | |||
<view class="input"> | |||
<view class="cwjs-cells item-flex"> | |||
<view class="cwjs-item center"> | |||
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/user.png" class="logo_input"> | |||
</image> | |||
<input class="cwjs-item cwjs-input" v-model="username" placeholder="请输入账号名" type="number" maxlength="11" placeholder-style="color:#AAAAAA"></input> | |||
</view> | |||
</view> | |||
<view class="cwjs-cells item-flex" style="margin-top:13rpx;"> | |||
<view class="cwjs-item center"> | |||
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/lock.png" class="logo_input"> | |||
</image> | |||
<input class="cwjs-item cwjs-input" placeholder="请输入密码" placeholder-style="color:#AAAAAA" type="password" v-model="password" maxlength="16" v-if="passwordType"></input> | |||
<input class="cwjs-item cwjs-input" placeholder="请输入密码" placeholder-style="color:#AAAAAA" maxlength="16" v-model="password" v-else></input> | |||
</view> | |||
<view class="imagesBox" @tap="changeBindPassword"> | |||
<image | |||
:src="'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/login/' + (passwordType==true?'close_eyes.png':'open_eyes.png')" | |||
class="images" mode="scaleToFill"></image> | |||
</view> | |||
</view> | |||
<view class="textbox"> | |||
<view class="textbox-1" @tap="bindVerification">验证码登录</view> | |||
<view class="textbox-2"></view> | |||
<view class="textbox-11" @tap="bindpassword">忘记密码</view> | |||
</view> | |||
</view> | |||
<view class="button" @tap="bindWxBLogin">登录</view> | |||
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/login/footer.png" class="footer"> | |||
</image> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
var app = getApp(); | |||
var WXB_SESSION_LOGIN_DATA = 'weapp_session_login_data'; | |||
export default { | |||
data() { | |||
return { | |||
username: '', | |||
//获取到的用户名的值 | |||
password: '', | |||
//获取到的密码栏中的值 | |||
passwordType: true, | |||
agreeChecked: true | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
uni.hideToast(); | |||
}, | |||
methods: { | |||
//验证码登录 | |||
bindVerification() { | |||
uni.navigateTo({ | |||
url: '/pages/login/Verification?role=1', | |||
}) | |||
}, | |||
//忘记密码 | |||
bindpassword() { | |||
uni.navigateTo({ | |||
url: '/pages/login/Verification?role=2', | |||
}) | |||
}, | |||
//密码选择 | |||
changeBindPassword: function(e) { | |||
this.passwordType=!this.passwordType; | |||
}, | |||
//登录 | |||
bindWxBLogin: function(e) { | |||
util.showBusy('正在登录...'); | |||
var that = this; | |||
if (this.username == '') { | |||
util.showNone("请输入账号名"); | |||
return false; | |||
} | |||
if (this.password == '') { | |||
util.showNone("请输入密码"); | |||
return false; | |||
} | |||
var loginParams = { | |||
loginName: this.username, | |||
password: this.password | |||
}; | |||
// 请求服务器登录地址,获得会话信息 | |||
uni.request({ | |||
url: config.service.login, | |||
header: { | |||
'content-type': 'application/json' | |||
}, | |||
method: "POST", | |||
data: loginParams, | |||
success: function(result) { | |||
var data = result.data; //console.log("登陆信息", data); | |||
if (data && data.code == 10000) { | |||
var res = data.data; | |||
if (res) { | |||
var data = { | |||
'token': res | |||
}; | |||
uni.setStorageSync(WXB_SESSION_LOGIN_DATA, data); //写入缓存 | |||
that.getMenu() | |||
that.getUser(); | |||
util.showSuccess('登录成功'); | |||
} else { | |||
util.showNone("账号名或密码错误,请重试"); | |||
return false; | |||
} | |||
// 没有正确响应会话信息 | |||
} else { | |||
util.showNone(data.message); | |||
return false; | |||
} | |||
}, | |||
// 响应错误 | |||
fail: function(loginResponseError) { | |||
util.showNone("网络异常,请重试"); | |||
return false; | |||
} | |||
}); | |||
}, | |||
getUser(){ | |||
util.getRequestPromise(config.service.getUser, {}, false, "GET").then(data => { | |||
if (data.zkProperties) { | |||
} else { | |||
data.zkProperties = [{ | |||
id: "", | |||
propertyName: '' | |||
}] | |||
} | |||
let lopan = { | |||
id: data.zkProperties[0].id, | |||
name: data.zkProperties[0].propertyName | |||
} | |||
uni.setStorageSync("fendianindex", 0); //写入缓存 | |||
uni.setStorageSync("weapp_session_userInfo_data", data); //写入缓存 | |||
uni.setStorageSync("buildingID", lopan); //楼盘id写入缓存 | |||
uni.switchTab({ | |||
url: '/pages/index/index' | |||
}); | |||
}); | |||
}, | |||
getMenu(){ | |||
this.$u.get("/user/getMenu").then(data => { | |||
uni.setStorageSync("weapp_session_Menu_data", data) | |||
}) | |||
} | |||
} | |||
}; | |||
</script> | |||
<style lang="scss"> | |||
.cwjs-logo { | |||
display: block; | |||
width: 219rpx; | |||
height: 158rpx; | |||
margin: 54rpx auto 66rpx; | |||
} | |||
.cwjs-tips { | |||
font-size: 24rpx; | |||
padding: 80rpx 0; | |||
color: #8a8a8a; | |||
} | |||
.cwjs-form { | |||
position: relative; | |||
margin: 0; | |||
background-color: #fff; | |||
border-radius: 10px; | |||
padding: 20rpx 40rpx 113rpx; | |||
} | |||
.cwjs-cells { | |||
width: 569rpx; | |||
display: flex; | |||
flex-direction: row; | |||
justify-content: space-between; | |||
align-items: center; | |||
margin: 0 auto; | |||
height: 88rpx; | |||
overflow: hidden; | |||
border-bottom: 1rpx solid #BFC7D3; | |||
position: relative; | |||
} | |||
.center { | |||
flex: 1; | |||
} | |||
.cwjs-input { | |||
height: 48rpx; | |||
line-height: 48rpx; | |||
padding: 23rpx 23rpx 23rpx 78rpx; | |||
font-size: 28rpx; | |||
font-family: PingFangSC-Regular, PingFang SC; | |||
color: #000; | |||
} | |||
.images { | |||
display: block; | |||
width: 40rpx; | |||
height: 21rpx; | |||
margin-right: 30rpx; | |||
margin-top: 33.5rpx; | |||
} | |||
.mod-btn { | |||
position: absolute; | |||
bottom: -80rpx; | |||
left: 50%; | |||
margin-left: -80rpx; | |||
} | |||
.mod-btn .button { | |||
width: 160rpx; | |||
height: 160rpx; | |||
background: linear-gradient(180deg, rgba(116, 197, 230, 1) 0%, rgba(64, 147, 201, 1) 100%); | |||
border: 10rpx solid rgba(255, 255, 255, 1); | |||
border-radius: 100%; | |||
font-size: 36rpx; | |||
color: #fff; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
.mod-btn .button::after { | |||
content: "" | |||
} | |||
.retPassword { | |||
display: inline; | |||
width: auto; | |||
font-size: 28rpx; | |||
color: rgba(64, 147, 201, 1); | |||
line-height: 40rpx; | |||
float: right; | |||
} | |||
.retPassword:active { | |||
background-color: #fff; | |||
} | |||
.appliyAdmin { | |||
position: absolute; | |||
left: 50%; | |||
margin-left: -57rpx; | |||
bottom: 100rpx; | |||
width: 114rpx; | |||
font-size: 28rpx; | |||
color: rgba(255, 255, 255, 1); | |||
line-height: 40rpx; | |||
} | |||
/* 头部 */ | |||
.head { | |||
width: 750rpx; | |||
height: 410rpx; | |||
background-image: url(https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/background.png); | |||
background-size: 100vw auto; | |||
background-repeat: no-repeat; | |||
} | |||
.background { | |||
width: 750rpx; | |||
height: 400rpx; | |||
position: absolute; | |||
top: -3rpx; | |||
left: 0; | |||
} | |||
.logo { | |||
width: 248upx; | |||
height: 248upx; | |||
display: block; | |||
position: absolute; | |||
top: 134rpx; | |||
left: 240.5rpx; | |||
} | |||
.head text { | |||
font-size: 34rpx; | |||
font-family: PingFangSC-Medium, PingFang SC; | |||
font-weight: 500; | |||
color: #008EF2; | |||
position: absolute; | |||
top: 353rpx; | |||
width: 100%; | |||
text-align: center; | |||
} | |||
/* 输入框 */ | |||
.input { | |||
width: 100%; | |||
height: auto; | |||
padding: 0 105rpx; | |||
box-sizing: border-box; | |||
} | |||
.logo_input { | |||
width: 34rpx; | |||
height: 38rpx; | |||
position: absolute; | |||
top: 25rpx; | |||
left: 0; | |||
} | |||
/* 登录 */ | |||
.button { | |||
width: 603rpx; | |||
height: 89rpx; | |||
background: rgba(72, 149, 255, 1); | |||
box-shadow: 0rpx 2rpx 14rpx 0rpx rgba(151, 192, 255, 1); | |||
border-radius: 45rpx; | |||
text-align: center; | |||
line-height: 89rpx; | |||
color: #fff; | |||
margin: 0 auto; | |||
margin-top: 239rpx; | |||
font-size: 34rpx; | |||
} | |||
.footer { | |||
width: 100%; | |||
height: 157rpx; | |||
position: absolute; | |||
bottom: 0; | |||
left: 0; | |||
} | |||
.agreeBox { | |||
/* text-align: center; */ | |||
/* width: 450rpx; */ | |||
/* padding-left: 145rpx; */ | |||
font-size: 28rpx; | |||
color: #88909E; | |||
margin: 0 auto; | |||
margin-top: 30rpx; | |||
position: relative; | |||
display: flex; | |||
margin-left: 83upx; | |||
} | |||
checkbox { | |||
transform: scale(0.5); | |||
} | |||
checkbox-group { | |||
display: inline; | |||
} | |||
navigator { | |||
display: inline | |||
} | |||
.agreeBox image { | |||
width: 26rpx; | |||
height: 26rpx; | |||
display: block; | |||
position: absolute; | |||
top: 9rpx; | |||
left: 18rpx; | |||
margin-right: 19rpx; | |||
} | |||
.imagesBox { | |||
width: 80rpx; | |||
height: 88rpx; | |||
} | |||
.chooseBox { | |||
width: 60rpx; | |||
height: 60rpx; | |||
} | |||
.login { | |||
text-decoration: underline; | |||
text-align: center; | |||
margin-top: 40px; | |||
color: #88909E; | |||
font-size: 28rpx; | |||
} | |||
.textbox { | |||
width: 569rpx; | |||
display: flex; | |||
margin-top: 40rpx; | |||
} | |||
.textbox-1 { | |||
width: 30%; | |||
font-size: 30rpx; | |||
color: #999999; | |||
} | |||
.textbox-11 { | |||
width: 30%; | |||
text-align: right; | |||
font-size: 30rpx; | |||
color: #999999; | |||
} | |||
.textbox-2 { | |||
width: 40%; | |||
} | |||
</style> |
@@ -1,308 +0,0 @@ | |||
<template> | |||
<view class="content"> | |||
<view class="sadsadasdasdsadasd">智能高效客户管理平台</view> | |||
<view class="sction"> | |||
<view class="mama"> | |||
<view class="mamaz"> | |||
<input type="text" v-model="msg" maxlength="4" placeholder="请输入验证码" placeholder-class="input-class" class="input" /> | |||
</view> | |||
<view class="mamay"> | |||
<view class="sada" v-if="sendAuthCode" style="font-size: 35rpx;" @click="getAuthCode">获取验证码</view> | |||
<text class="sada" v-if="!sendAuthCode"> | |||
重新发送 | |||
<text>({{ auth_time }})</text> | |||
</text> | |||
</view> | |||
</view> | |||
<view class="login-btn" :style="{ background: msg == '' ? '#F2F2F2' : '#2B6EFF' }" @click="denglu"><text | |||
class="">登录</text></view> | |||
<view class="code-login" @click="passwordlogin"><text>密码登录</text></view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
var app = getApp(); | |||
var WXB_SESSION_LOGIN_DATA = 'weapp_session_login_data'; | |||
export default { | |||
data() { | |||
return { | |||
sendAuthCode: true, | |||
auth_time: 0, | |||
msg: '', | |||
phonecet: '', | |||
role:'' | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
var phonese = options.username; | |||
var phonexxz = phonese.substring(0, 3) + '****' + phonese.substring(7); | |||
this.phone = phonexxz, | |||
this.phonecet = options.username, | |||
this.role = options.role | |||
this.sendAuthCode = false; | |||
this.auth_time = 60; | |||
var auth_timetimer = setInterval(() => { | |||
this.auth_time--; | |||
if (this.auth_time <= 0) { | |||
this.sendAuthCode = true; | |||
clearInterval(auth_timetimer); | |||
} | |||
}, 1000); | |||
}, | |||
methods: { | |||
//跳转密码登录页面 | |||
passwordlogin() { | |||
uni.reLaunch()({ | |||
url: '/pages/login/index', | |||
}) | |||
}, | |||
//获取验证码 | |||
getAuthCode() { | |||
uni.request({ | |||
url: config.service.sendCode + "?mobile=" + this.phonecet, | |||
method: "GET", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
success: (data) => { | |||
console.log(data) | |||
// 成功地响应会话信息 | |||
if (data.data.code == 10000) { | |||
util.showSuccess('发送成功'); | |||
this.sendAuthCode = false; | |||
this.auth_time = 60; | |||
var auth_timetimer = setInterval(() => { | |||
this.auth_time--; | |||
if (this.auth_time <= 0) { | |||
this.sendAuthCode = true; | |||
clearInterval(auth_timetimer); | |||
} | |||
}, 1000); | |||
} else { | |||
util.showNone(data.data.message); | |||
return false; | |||
} | |||
}, | |||
}) | |||
}, | |||
//登录 | |||
denglu() { | |||
if (this.msg=='') { | |||
uni.showToast({ | |||
title: '验证码不能为空', | |||
icon: 'none' | |||
}); | |||
return | |||
} | |||
if (this.msg.length == 4) { | |||
let porme = { | |||
loginName: this.phonecet, | |||
password: this.msg | |||
} | |||
uni.request({ | |||
url: config.service.plogin, | |||
method: "POST", | |||
data: porme, | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
success: (data) => { | |||
// 成功地响应会话信息 | |||
if (data.data.code == 10000) { | |||
util.showSuccess('登录成功'); | |||
var token = { | |||
'token': data.data.data | |||
}; | |||
uni.setStorageSync(WXB_SESSION_LOGIN_DATA, token); //写入缓存 | |||
this.getMenu() | |||
this.getUser() | |||
} else { | |||
util.showNone(data.data.message); | |||
return false; | |||
} | |||
}, | |||
}) | |||
} else { | |||
uni.showToast({ | |||
title: '验证码位数不正确', | |||
icon: 'none' | |||
}); | |||
} | |||
}, | |||
getMenu(){ | |||
this.$u.get("/user/getMenu").then(data => { | |||
uni.setStorageSync("weapp_session_Menu_data", data) | |||
}) | |||
}, | |||
getUser(){ | |||
util.getRequestPromise(config.service.getUser, {}, false, "GET").then(data => { | |||
if (data.zkProperties) { | |||
} else { | |||
data.zkProperties = [{ | |||
id: "", | |||
propertyName: '' | |||
}] | |||
} | |||
let lopan = { | |||
id: data.zkProperties[0].id, | |||
name: data.zkProperties[0].propertyName | |||
} | |||
uni.setStorageSync("fendianindex", 0); //写入缓存 | |||
uni.setStorageSync("weapp_session_userInfo_data", data); //写入缓存 | |||
uni.setStorageSync("buildingID", lopan); //楼盘id写入缓存 | |||
uni.switchTab({ | |||
url: '/pages/index/index' | |||
}); | |||
}); | |||
} | |||
} | |||
}; | |||
</script> | |||
<style> | |||
.mama { | |||
width: 620rpx; | |||
display: flex; | |||
border-bottom: 1px solid #E1E1E1; | |||
margin: 60rpx auto; | |||
} | |||
.sadsadasdasdsadasd { | |||
font-size: 34rpx; | |||
font-family: PingFangSC-Medium, PingFang SC; | |||
font-weight: 500; | |||
color: #008EF2; | |||
width: 100%; | |||
text-align: center; | |||
padding-top: 340rpx; | |||
} | |||
.mamaz { | |||
width: 50%; | |||
height: 90rpx; | |||
} | |||
.mamay { | |||
width: 50%; | |||
height: 90rpx; | |||
} | |||
.input { | |||
width: 350rpx; | |||
color: #78DFB0; | |||
height: 100%; | |||
line-height: 90rpx; | |||
font-size: 17px; | |||
color: #171717; | |||
} | |||
.sada { | |||
width: 70%; | |||
line-height: 90rpx; | |||
color: #2B6EFF; | |||
text-align: right; | |||
font-size: 35rpx; | |||
margin-left: 100rpx; | |||
display: block; | |||
} | |||
.content { | |||
margin: 0; | |||
padding: 0; | |||
background-image: url(https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/background.png); | |||
background-size: 100vw auto; | |||
background-repeat: no-repeat; | |||
} | |||
.login-text { | |||
font-size: 60rpx; | |||
font-family: PingFang SC; | |||
font-weight: 500; | |||
color: rgba(23, 23, 23, 1); | |||
letter-spacing: 8rpx; | |||
margin-left: 75rpx; | |||
font-weight: bold; | |||
} | |||
.login-input { | |||
border-bottom: 1px solid #e1e1e1; | |||
color: #c9cac9; | |||
margin: 98rpx 64rpx 200rpx 75rpx; | |||
font-size: 17px; | |||
} | |||
.login-btn { | |||
margin: 0 auto; | |||
margin-top: 240rpx; | |||
width: 567rpx; | |||
height: 86rpx; | |||
border-radius: 2em; | |||
font-size: 17px; | |||
font-weight: bold; | |||
border: none; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
color: #ffffff; | |||
} | |||
.code-login { | |||
display: flex; | |||
justify-content: center; | |||
margin-top: 40rpx; | |||
color: #D6D7D6; | |||
margin-bottom: 200rpx; | |||
font-size: 30rpx; | |||
} | |||
.log-box { | |||
display: flex; | |||
flex-direction: row; | |||
justify-content: center; | |||
align-items: center; | |||
font-size: 28rpx; | |||
color: #bfc0bf; | |||
margin-bottom: 65rpx; | |||
} | |||
.hengx { | |||
margin: 0 20rpx 0 20rpx; | |||
height: 2rpx; | |||
width: 232rpx; | |||
background: #e1e1e1; | |||
} | |||
.wechat { | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
width: 93rpx; | |||
height: 93rpx; | |||
background: rgba(255, 255, 255, 1); | |||
box-shadow: 0px 10rpx 30rpx rgba(120, 223, 176, 0.22); | |||
border-radius: 50%; | |||
margin: 0 auto; | |||
} | |||
.btn-get { | |||
width: 250rpx; | |||
font-size: 17px; | |||
color: #c9cac9; | |||
position: relative; | |||
top: -290rpx; | |||
right: -450rpx; | |||
} | |||
.input-class { | |||
color: #D6D7D6; | |||
font-size: 17px; | |||
letter-spacing: 1rpx; | |||
} | |||
</style> |
@@ -1,141 +0,0 @@ | |||
<template> | |||
<view style="background: #F8F8F8;width: 100%;height: 100vh;"> | |||
<view class="inpText" style="margin-top: 20rpx;"> | |||
<view class="inpTextBox"> | |||
<view class="inpTextLable"> | |||
<view class="inpTextName">原密码</view> | |||
</view> | |||
<input placeholder="请输入原密码" placeholder-class="inpTextBox" class="inpTextBox1" maxlength="12" | |||
v-model="password" type="text"></input> | |||
</view> | |||
</view> | |||
<view class="inpText"> | |||
<view class="inpTextBox"> | |||
<view class="inpTextLable"> | |||
<view class="inpTextName">新密码</view> | |||
</view> | |||
<input placeholder="请输入6-12位新密码" placeholder-class="inpTextBox" class="inpTextBox1" maxlength="12" | |||
v-model="newPassword" type="password"></input> | |||
</view> | |||
</view> | |||
<view class="inpText" > | |||
<view class="inpTextBox" style="border: none;"> | |||
<view class="inpTextLable"> | |||
<view class="inpTextName">确认密码</view> | |||
</view> | |||
<input placeholder="请确认密码" placeholder-class="inpTextBox" class="inpTextBox1" maxlength="12" | |||
v-model="queryPassword" type="password"></input> | |||
</view> | |||
</view> | |||
<button class="save" @tap="savePassword">保存</button> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
export default { | |||
data() { | |||
return { | |||
password: "", | |||
newPassword: "", | |||
queryPassword: "" | |||
}; | |||
}, | |||
methods: { | |||
// 修改密码 | |||
savePassword() { | |||
if (this.newPassword == "" || this.queryPassword == "" || this.password == "") { | |||
uni.showModal({ | |||
cancelColor: "#999999", | |||
title: '提示', | |||
content: '输入框不能为空', | |||
showCancel: false | |||
}); | |||
} else if (this.newPassword.length < 6) { | |||
uni.showModal({ | |||
cancelColor: "#999999", | |||
title: '提示', | |||
content: '新密码不能小于6位', | |||
showCancel: false | |||
}); | |||
} else if (this.newPassword == this.queryPassword) { | |||
var params = { | |||
oldPassword: this.password, | |||
newPassword: this.newPassword, | |||
qPassword: this.queryPassword | |||
}; | |||
util.getRequestPromise(config.service.updatePassword, params).then(data => { | |||
uni.clearStorage(); | |||
uni.navigateTo({ | |||
url: '/pages/login/index' | |||
}); | |||
}); | |||
} else { | |||
uni.showModal({ | |||
title: '提示', | |||
cancelColor: "#999999", | |||
content: '两次密码不一致', | |||
showCancel: false | |||
}); | |||
} | |||
} | |||
} | |||
}; | |||
</script> | |||
<style> | |||
.inpText { | |||
width: 100%; | |||
box-sizing: border-box; | |||
padding: 0 20rpx; | |||
background-color: #FFFFFF; | |||
} | |||
.inpTextBox { | |||
color: #BBBFC8; | |||
text-align: left; | |||
border-bottom: 1px solid #EEEEEE; | |||
display: -webkit-box; | |||
display: -webkit-flex; | |||
display: flex; | |||
-webkit-box-align: center; | |||
-webkit-align-items: center; | |||
align-items: center; | |||
height: 109rpx; | |||
} | |||
.inpTextLable { | |||
width: 155rpx; | |||
display: flex; | |||
align-items: center; | |||
} | |||
.inpTextName { | |||
color: #020F28; | |||
font-size: 32rpx; | |||
} | |||
.inpTextBox1 { | |||
width: 410rpx; | |||
font-size: 32rpx; | |||
padding: 0 20rpx; | |||
box-sizing: border-box; | |||
color: #333; | |||
} | |||
.save { | |||
width: 640rpx; | |||
height: 87rpx; | |||
text-align: center; | |||
line-height: 87rpx; | |||
color: #fff; | |||
font-size: 32rpx; | |||
background: #0A6EE9; | |||
margin: 0 auto; | |||
margin-top: 120rpx; | |||
} | |||
</style> |
@@ -1,169 +0,0 @@ | |||
<template> | |||
<view> | |||
<view class="setBox"> | |||
<view class="setList" @tap="setHead" style="height: 140rpx;line-height: 120rpx;"> | |||
<text style="font-size: 30rpx;color: #333333;">头像</text> | |||
<image src="/static/images/arrow.png" class="more"> | |||
</image> | |||
<image | |||
:src="picUrl||'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/zkgj/headPicture.png'" | |||
class="headPicture"></image> | |||
</view> | |||
<view> | |||
<navigator class="setList" :url="'/pages/mine/nickname?userName=' + name + '&imgSrc=' + imgSrc"> | |||
<text style="font-size: 30rpx;color: #333333;">昵称</text> | |||
<image src="/static/images/arrow.png" class="more"></image> | |||
<text class="userName">{{name||"暂无昵称"}}</text> | |||
</navigator> | |||
<navigator class="setList" url="/pages/mine/signature"> | |||
<text style="font-size: 30rpx;color: #333333;">签名</text> | |||
<image src="/static/images/arrow.png" class="more"></image> | |||
<text class="userName">{{personalProfile||"暂无签名"}}</text> | |||
</navigator> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
export default { | |||
data() { | |||
return { | |||
userInfo: {}, | |||
picUrl: "", | |||
name: "", | |||
personalProfile: "" | |||
}; | |||
}, | |||
onShow: function() { | |||
const userInfo = uni.getStorageSync("weapp_session_userInfo_data"); | |||
this.userInfo = userInfo; | |||
this.picUrl = userInfo.picUrl; | |||
this.name = userInfo.name; | |||
this.personalProfile = userInfo.personalProfile; | |||
}, | |||
methods: { | |||
// 图片上传 | |||
setHead: function() { | |||
var _this = this; | |||
uni.chooseImage({ | |||
count: 1, | |||
sizeType: ['original', 'compressed'], | |||
// original 原图,compressed 压缩图,默认二者都有 | |||
sourceType: ['album', 'camera'], | |||
// album 从相册选图,camera 使用相机,默认二者都有 | |||
success: function(res) { | |||
// success | |||
_this.imgSrc = res.tempFilePaths; //图片路径 | |||
_this.uploadimg(); | |||
}, | |||
fail: function() { // fail | |||
}, | |||
complete: function() { // complete | |||
} | |||
}); | |||
}, | |||
//上传图片至服务器 | |||
uploadimg: function() { | |||
var that = this; //获取本地用户信息 | |||
const tempFilePaths = that.imgSrc; | |||
if (tempFilePaths.length < 1) { | |||
util.showNone("请上传图片"); | |||
return false; | |||
} | |||
console.log(tempFilePaths); | |||
uni.uploadFile({ | |||
url: config.service.uploadHeadImg, | |||
header: { | |||
"Access-Token": uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
filePath: tempFilePaths[0], | |||
name: 'file', | |||
success(res) { | |||
console.log(res); | |||
const result = JSON.parse(res.data); | |||
if (result.code == 10000) { | |||
console.log(result.data); | |||
that.picUrl = result.data; | |||
that.userInfo.picUrl = result.data; | |||
uni.setStorageSync("weapp_session_userInfo_data", that.userInfo); | |||
util.showSuccess('修改成功'); | |||
} else { | |||
util.showNone(result.message != '' ? result.message : '操作失败,请重新尝试'); | |||
return false; | |||
} | |||
}, | |||
fail(err) { | |||
console.log(err); | |||
} | |||
});; | |||
} | |||
} | |||
}; | |||
</script> | |||
<style> | |||
page { | |||
width: 100%; | |||
height: 100%; | |||
background: #fff; | |||
} | |||
.setBox { | |||
padding-top: 20rpx; | |||
padding-left: 30rpx; | |||
padding-right: 30rpx; | |||
} | |||
.setList { | |||
width: 100%; | |||
height: 100rpx; | |||
background: #fff; | |||
box-sizing: border-box; | |||
line-height: 100rpx; | |||
border-bottom: 1rpx solid #EEEEEE; | |||
} | |||
.headPicture { | |||
border-radius: 50%; | |||
width: 100rpx; | |||
height: 100rpx; | |||
float: right; | |||
object-fit: cover; | |||
-o-object-fit: cover; | |||
border: 1rpx solid #ccc; | |||
} | |||
.userName { | |||
float: right; | |||
} | |||
.more { | |||
width: 18rpx; | |||
height: 32rpx; | |||
float: right; | |||
margin-top: 32rpx; | |||
margin-left: 20rpx; | |||
} | |||
.save { | |||
width: 100%; | |||
height: 87rpx; | |||
text-align: center; | |||
line-height: 87rpx; | |||
color: #fff; | |||
font-size: 32rpx; | |||
background: #0A6EE9; | |||
margin: 32rpx auto 36rpx; | |||
} | |||
</style> |
@@ -1,99 +0,0 @@ | |||
<template> | |||
<view class="translation"> | |||
<view style="width: 690rpx;margin: 0 auto;margin-top: 10rpx;"> | |||
<view style="width: 100%;border-bottom: 1px solid #E0E0E0;display: flex;padding-bottom: 10rpx;margin-top: 40rpx;" | |||
v-for="(item,index) in listarr" :key='index' @click="toaidoinfo(item.Content,item.corpusId,item.index)"> | |||
<view style="width: 26rpx;height: 36rpx;margin-top: 4rpx;"> | |||
<image style="width: 26rpx;height: 28rpx;" src="../../static/images/testimg.png" mode=""></image> | |||
</view> | |||
<view v-html="item.Content.onebest" style="color: #666666;font-size: 28rpx;line-height: 36rpx;margin-left: 10rpx;width: 80%;"></view> | |||
<view style="font-size: 28rpx;width: 10%;width: 14%;text-align: right;">{{item.Content.time}}</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
export default { | |||
data() { | |||
return { | |||
customerId:'', | |||
listarr:[], | |||
id:'', | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
this.customerId = options.customerId; | |||
this.id=options.id; | |||
this.searchinfo() | |||
}, | |||
methods: { | |||
formatTime(num) { | |||
//格式化时间格式 | |||
num = num.toFixed(0); | |||
let second = num % 60; | |||
if (second < 10) second = '0' + second; | |||
let min = Math.floor(num / 60); | |||
if (min < 10) min = '0' + min; | |||
return min + ":" + second; | |||
}, | |||
//搜索 | |||
searchinfo(){ | |||
let parames={ | |||
marketingId:this.id, | |||
customerId:this.customerId | |||
} | |||
this.$u.post("/corpus/pinWordMatching", parames).then(res => { | |||
res.forEach(item=>{ | |||
item.Content=JSON.parse(item.transferContent) | |||
}) | |||
res.forEach(cet=>{ | |||
cet.Content.time=this.formatTime(cet.Content.bg/1000) | |||
}) | |||
this.listarr=res; | |||
}) | |||
}, | |||
//跳转 | |||
toaidoinfo(item,id,index){ | |||
item.customerId=this.customerId; | |||
item.id=id; | |||
item.index=index; | |||
this.infostust(item) | |||
}, | |||
//只有一条的时候 | |||
infostust(item){ | |||
console.log("zobudao") | |||
let d = JSON.parse(JSON.stringify([item])) | |||
d[0].onebest="" | |||
const parames = { | |||
pageNum: 1, | |||
pageSize: 100, | |||
query: { | |||
customerId: this.customerId, | |||
} | |||
} | |||
this.$u.post("/corpus/findByPage", parames).then(res => { | |||
if(res[0].merge==0){ | |||
let newobj = res[0]; | |||
uni.navigateTo({ | |||
url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}` | |||
}) | |||
}else{ | |||
let newobj = res[0]; | |||
uni.navigateTo({ | |||
url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(d[0])}&stateisshow=${'2'}` | |||
}) | |||
} | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
</style> |
@@ -1,232 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<!-- 顾问选择 --> | |||
<view class="nextcon"> | |||
下一位接待顾问:{{agentList[0].name||'没有下一位了'}} | |||
</view> | |||
<view class="tab"> | |||
<!-- <view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">全部</view> | |||
</view> --> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 1 }" @click="tabtimetap(1)">排队顾问</view> | |||
</view> | |||
<view class="tabbox"> | |||
<view :class="{ activecllasscet: activeTotal == 2 }" @click="tabtimetap(2)">暂停顾问</view> | |||
</view> | |||
</view> | |||
<view class="content"> | |||
<view v-if="activeAgentList.length>0"> | |||
<view v-for="(item,index) in activeAgentList" :key="index"> | |||
<view class="content-tips"> | |||
<view class="top"> | |||
<view class="tit"> | |||
<view class="img"> | |||
{{item.name.slice(0,1)}} | |||
</view> | |||
<view class="test"> | |||
{{item.name}} | |||
</view> | |||
</view> | |||
<!-- <view class="state"> | |||
<view class="point" v-if="activeTotal==1"></view> | |||
{{activeTotal==1?'接待中':'空闲'}} | |||
</view> --> | |||
</view> | |||
<view class="reception"> | |||
<view class="" style="line-height: 50rpx;"> | |||
今日接待:<test class="num">{{item.receiveNum||0}}</test> | |||
</view> | |||
<view class="btn" @click="changeAgentStatus(item.agentId)"> | |||
{{activeTotal==1?'暂停':'恢复'}} | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="nolist" v-else> | |||
暂无数据 | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data(){ | |||
return{ | |||
value:"", | |||
activeTotal: 1, | |||
agentList:[], | |||
pausedAgentList:[], | |||
houseId:'' | |||
} | |||
}, | |||
onLoad() { | |||
this.houseId = uni.getStorageSync('buildingID').id; | |||
this.changeAgentListShow() | |||
this.changePausedAgentListShow() | |||
}, | |||
computed: { | |||
activeAgentList() { | |||
return this.activeTotal == 1 ? this.agentList : this.pausedAgentList | |||
}, | |||
}, | |||
methods:{ | |||
tabtimetap(idx){ | |||
// console.log(idx) | |||
this.activeTotal=idx | |||
}, | |||
changeAgentListShow() { | |||
this.$u.get("/zkAgentPool/nextFreeAgent?itemId="+this.houseId).then(res => { | |||
this.agentList = res; | |||
}) | |||
}, | |||
// 获取暂停的经纪人列表 | |||
changePausedAgentListShow() { | |||
this.$u.get("/zkAgentPool/stopAgentList?itemId="+this.houseId).then(res => { | |||
this.pausedAgentList = res; | |||
}) | |||
}, | |||
changeAgentStatus(id) { | |||
let content = ""; | |||
if (this.activeTotal == 1) { | |||
content = "确定当前顾问暂停接待?"; | |||
} else { | |||
content = "确定取消暂停?"; | |||
} | |||
uni.showModal({ | |||
content, | |||
cancelColor: "#999999", | |||
success: res => { | |||
if (res.confirm) { | |||
this.$u.get("/zkAgentPool/update", { | |||
agentId: id, | |||
status: this.activeTotal == 1 ? 2 : 0 | |||
}).then(res => { | |||
uni.showToast({ | |||
icon: "none", | |||
title: "操作成功", | |||
}) | |||
this.changeAgentListShow() | |||
this.changePausedAgentListShow() | |||
}) | |||
} | |||
}, | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.box{ | |||
background: #F8F8F8; | |||
width: 100%; | |||
height: 100vh; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
// line-height: 30px; | |||
.tab{ | |||
height: 88rpx; | |||
border-bottom: 1px solid #E0E0E0; | |||
background: #FFFFFF; | |||
display: flex; | |||
align-items: center; | |||
.tabbox { | |||
flex: 1; | |||
height: 100%; | |||
text-align: center; | |||
line-height: 92rpx; | |||
color: #666666; | |||
font-size: 28rpx; | |||
display: flex; | |||
justify-content: center; | |||
.activecllasscet { | |||
border-bottom: 2px solid #2671E2; | |||
color: #2671E2; | |||
font-weight: 600; | |||
} | |||
} | |||
} | |||
.nextcon{ | |||
height: 78rpx; | |||
background: #F4F8FD; | |||
color: #2671E2; | |||
text-align: center; | |||
line-height: 78rpx; | |||
} | |||
.content-tips{ | |||
background: #fff; | |||
padding: 0 30rpx; | |||
height: 168rpx; | |||
margin-bottom: 20rpx; | |||
overflow: hidden; | |||
.top{ | |||
margin-top: 19rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
.tit{ | |||
height: 52rpx; | |||
display: flex; | |||
.img{ | |||
width: 52rpx; | |||
height: 52rpx; | |||
border-radius: 50%; | |||
line-height: 47rpx; | |||
text-align: center; | |||
background: #FFFFFF; | |||
border: 1px solid #C9C9C9; | |||
margin-right: 20rpx; | |||
} | |||
.test{ | |||
font-weight: 600; | |||
color: #333333; | |||
margin-top: 6rpx; | |||
} | |||
} | |||
.state{ | |||
display: flex; | |||
.point{ | |||
width: 12rpx; | |||
height: 12rpx; | |||
background: #2B6EFF; | |||
border-radius: 50%; | |||
margin-right: 9rpx; | |||
margin-top: 16rpx; | |||
} | |||
} | |||
} | |||
.reception{ | |||
display: flex; | |||
font-weight: 400; | |||
width: 100%; | |||
margin-top: 28rpx; | |||
justify-content: space-between; | |||
color: #666666; | |||
line-height: 30rpx; | |||
.btn{ | |||
width: 100rpx; | |||
height: 48rpx; | |||
background: #FFFFFF; | |||
border-radius: 4rpx; | |||
border: 1px solid #C9C9C9; | |||
text-align: center; | |||
line-height: 48rpx; | |||
color: #333333; | |||
font-size: 28rpx; | |||
} | |||
} | |||
} | |||
} | |||
.nolist{ | |||
text-align: center; | |||
height: 300rpx; | |||
color: #CCCCCC; | |||
line-height: 300rpx; | |||
} | |||
</style> |
@@ -1,453 +0,0 @@ | |||
<template> | |||
<view class="cented"> | |||
<!-- <view class="infoinputbox"> | |||
<input type="text" v-model="imei" placeholder="请输入设备编号或领用人进行搜索" class="infoinput" /> | |||
<view class="dingweiinfo" @click="shecs()"> | |||
<image class="sehoimg" src="../../../static/images/newimg/search.png" mode=""></image> | |||
</view> | |||
</view> --> | |||
<view style="width: 690rpx;margin: 0 auto;margin-top: 20rpx;"> | |||
<u-search @search='shecs()' placeholder="请输入设备编号或领用人进行搜索" v-model="imei"></u-search> | |||
</view> | |||
<view class="tab-box"> | |||
<view class="tab-item-wrap"> | |||
<view v-for="(item, index) in tablist" :key="index" :class="activeClass == index ? 'bottom' : ''" @tap="clocktab(index)"> | |||
{{item.names}}( {{item.num}} ) | |||
<view class="bottomLine" v-if="activeClass == index"></view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="infoet"> | |||
<view class="infoviewbox" v-for="(item,index) in newListdata" :key="index"> | |||
<view class="infobox1"> | |||
<view class="box1-zuo">领用人:{{item.accName}}</view> | |||
<view class="box1-you"> | |||
<view class="you1" v-if="item.electricity>20"> | |||
<view class="youimg" :style="{ height: item.electricity + '%' }"></view> | |||
</view> | |||
<view class="you11" v-if="item.electricity<20"> | |||
<view class="youimg" :style="{ height: item.electricity + '%' }"></view> | |||
</view> | |||
<view class="you2">电量: | |||
<text v-if="item.electricity>20">{{item.electricity}}%</text> | |||
<text v-if="item.electricity<20" style="color: red;">{{item.electricity}}%</text> | |||
</view> | |||
<view class="you3"> | |||
<image v-if="item.signalDevice==''" class="youimg" src="../../../static/images/newimg/xinhao0.png" mode=""></image> | |||
<image v-if="item.signalDevice<20 && item.signalDevice>0" class="youimg" src="../../../static/images/newimg/xinhao1.png" mode=""></image> | |||
<image v-if="item.signalDevice<50 && item.signalDevice>20" class="youimg" src="../../../static/images/newimg/xinhao2.png" mode=""></image> | |||
<image v-if="item.signalDevice<70 && item.signalDevice>50" class="youimg" src="../../../static/images/newimg/xinhao3.png" mode=""></image> | |||
<image v-if="item.signalDevice<90 && item.signalDevice>70" class="youimg" src="../../../static/images/newimg/xinhao4.png" mode=""></image> | |||
<image v-if="item.signalDevice<=100 && item.signalDevice>90" class="youimg" src="../../../static/images/newimg/xinhao5.png" mode=""></image> | |||
</view> | |||
<view class="you4" v-if="item.signalDevice=='' ">信号:0</view> | |||
<view class="you4" v-else>信号:{{item.signalDevice}}</view> | |||
</view> | |||
</view> | |||
<view class="infobox2"> | |||
<view class="box2-zuo">设备编号</view> | |||
<view class="box2-you">{{item.imei}}</view> | |||
</view> | |||
<view class="infobox2"> | |||
<view class="box2-zuo">录音状态</view> | |||
<view class="box2-you" v-if="item.audioStatus=='false'">关闭</view> | |||
<view class="box2-you" v-if="item.audioStatus=='true'">开启</view> | |||
<view class="box2-you" v-if="item.audioStatus=='' ">关闭</view> | |||
</view> | |||
<view class="infobox2"> | |||
<view class="box2-zuo">上传状态</view> | |||
<view class="box2-you" v-if="item.audioUploadStatus=='false'">无上传</view> | |||
<view class="box2-you" v-if="item.audioUploadStatus=='true'">上传中</view> | |||
<view class="box2-you" v-if="item.audioUploadStatus=='' ">无上传</view> | |||
</view> | |||
<view class="infobox2"> | |||
<view class="box2-zuo">更新时间</view> | |||
<view class="box2-you">{{item.updateTime}}</view> | |||
</view> | |||
<view class="infobox2" v-if="activeClass==1"> | |||
<view class="box2-zuo">最后使用时间</view> | |||
<view class="box2-you" style="font-size: 28rpx;color: red;">{{item.updateTime | formatDate}}</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var util = require("../../../utils/util.js"); | |||
export default { | |||
data() { | |||
return { | |||
tablist: [{ | |||
names: "在线数量", | |||
num: "0" | |||
}, | |||
{ | |||
names: "离线数量", | |||
num: "0" | |||
}, | |||
{ | |||
names: "低电量设备", | |||
num: "0" | |||
} | |||
], | |||
activeClass: 0, | |||
pageNum:1, | |||
pageSize:20, | |||
imei:"", | |||
orgcode:"", | |||
onLine:1, | |||
newListdata:[], | |||
buildingID:'', | |||
electricity:'', | |||
jump:'' | |||
}; | |||
}, | |||
onReachBottom() { | |||
this.pageNum +=1; | |||
this.init() | |||
}, | |||
onLoad(options) { | |||
this.jump=options.jump; | |||
if(this.jump=="jump"){ | |||
this.activeClass=2; | |||
this.electricity=20; | |||
} | |||
this.init() | |||
}, | |||
filters: { | |||
formatDate: (dateTimeStamp) => { | |||
var newDate = new Date(dateTimeStamp.replace(/-/g, '/')).getTime(); | |||
var minute = 1000 * 60; | |||
var hour = minute * 60; | |||
var day = hour * 24; | |||
var halfamonth = day * 15; | |||
var month = day * 30; | |||
var now = new Date().getTime(); | |||
var diffValue = now - newDate; | |||
if(diffValue < 0){return;} | |||
var monthC =diffValue/month; | |||
var weekC =diffValue/(7*day); | |||
var dayC =diffValue/day; | |||
var hourC =diffValue/hour; | |||
var minC =diffValue/minute; | |||
var result = ''; | |||
if(weekC>=1){ | |||
result= "1周前"; | |||
}else if(dayC>=1){ | |||
result=""+ parseInt(dayC) +"天前"; | |||
} else if(hourC>=1){ | |||
result=""+ parseInt(hourC) +"小时前"; | |||
} | |||
else if(minC>=1){ | |||
result=""+ parseInt(minC) +"分钟前"; | |||
}else{ | |||
result="刚刚"; | |||
} | |||
return result; | |||
} | |||
}, | |||
methods: { | |||
shecs(){ | |||
this.newListdata=[] | |||
this.pageNum=1; | |||
this.pageSize=5; | |||
this.init() | |||
}, | |||
// tab | |||
clocktab(index) { | |||
this.newListdata=[] | |||
this.pageNum=1; | |||
this.pageSize=5; | |||
this.activeClass = index; | |||
if(this.activeClass==0){ | |||
this.onLine=1; | |||
this.electricity=''; | |||
}else if(this.activeClass==1){ | |||
this.onLine=0; | |||
this.electricity=''; | |||
}else{ | |||
this.onLine=1; | |||
this.electricity=20; | |||
} | |||
this.init() | |||
}, | |||
init(){ | |||
this.buildingID=uni.getStorageSync('buildingID').id; | |||
const parames = { | |||
pageNum: this.pageNum, | |||
pageSize: this.pageSize, | |||
query:{ | |||
imei:this.imei, | |||
onLine:this.onLine, | |||
propertyId:this.buildingID, | |||
electricity:this.electricity, | |||
orderType:1 | |||
} | |||
} | |||
this.$u.post("/equipment/apiFindByPage", parames).then(res => { | |||
this.tablist[0].num=res.eqOnLineCount | |||
this.tablist[1].num=res.eqOffLineCount | |||
this.tablist[2].num=res.lowElectricityCount | |||
if(res.obj.list.results==null){ | |||
if (this.pageNum == 1){ | |||
return | |||
}else{ | |||
uni.showToast({ | |||
title: '已经到底了!', | |||
duration: 2000 | |||
}); | |||
} | |||
}else{ | |||
res.obj.list.results.forEach(item=>{ | |||
if(this.activeClass==1){ | |||
item.signalDevice=0 | |||
} | |||
if(item.electricity==''){ | |||
item.electricity=0 | |||
} | |||
if(item.electricity>100){ | |||
item.electricity=100 | |||
} | |||
let num=this.ascformatDate(item.updateTime) | |||
if(num>12){ | |||
item.electricity=0 | |||
} | |||
}) | |||
if (this.pageNum == 1) { | |||
this.newListdata=res.obj.list.results | |||
} else { | |||
this.newListdata = [...this.newListdata, ...res.obj.list.results]; | |||
} | |||
} | |||
}) | |||
}, | |||
ascformatDate(dateTimeStamp){ | |||
let newDate = new Date(dateTimeStamp.replace(/-/g, '/')).getTime(); | |||
let minute = 1000 * 60; | |||
let hour = minute * 60; | |||
let day = hour * 24; | |||
let halfamonth = day * 15; | |||
let month = day * 30; | |||
let now = new Date().getTime(); | |||
let diffValue = now - newDate; | |||
let result =diffValue/hour; | |||
return result; | |||
} | |||
}, | |||
} | |||
</script> | |||
<style lang="scss"> | |||
.cented { | |||
width: 100%; | |||
height: 100vh; | |||
background: #FFFFFF; | |||
} | |||
// .infoinputbox { | |||
// width: 100%; | |||
// height: 61rpx; | |||
// position: relative; | |||
// .infoinput { | |||
// width: 690rpx; | |||
// height: 61rpx; | |||
// background: #DEDEDE; | |||
// border-radius: 31rpx; | |||
// margin: 0 auto; | |||
// color: #999999; | |||
// font-size: 26rpx; | |||
// padding-left: 20rpx; | |||
// } | |||
// .dingweiinfo { | |||
// width: 40rpx; | |||
// height: 61rpx; | |||
// background-color: #DEDEDE; | |||
// position: absolute; | |||
// top: 0rpx; | |||
// left: 660rpx; | |||
// display: flex; | |||
// align-items: center; | |||
// z-index: 1000; | |||
// .sehoimg { | |||
// display: block; | |||
// width: 40rpx; | |||
// height: 40rpx; | |||
// } | |||
// } | |||
// } | |||
.tab-box { | |||
width: 100%; | |||
.tab-item-wrap { | |||
height: 88rpx; | |||
line-height: 88rpx; | |||
display: flex; | |||
justify-content: space-around; | |||
font-size: 4vw; | |||
background: linear-gradient(180deg, #e5e5e5, #e5e5e5, rgba(229, 229, 229, 0)) bottom left no-repeat; | |||
background-size: 100% 1px; | |||
color: #959dad; | |||
} | |||
} | |||
.bottom { | |||
color: #209fff; | |||
position: relative; | |||
} | |||
.bottomLine { | |||
position: absolute; | |||
width: 156rpx; | |||
height: 6rpx; | |||
top: 80rpx; | |||
background-color: #298dff; | |||
border-radius: 8rpx 8rpx 0rpx 0rpx; | |||
left: 16rpx; | |||
} | |||
.infoet { | |||
width: 100%; | |||
.infoviewbox { | |||
width: 690rpx; | |||
padding-bottom: 20rpx; | |||
background: #FFFFFF; | |||
box-shadow: 0px 0px 8rpx 6rpx rgba(0, 0, 0, 0.06); | |||
border-radius: 20rpx; | |||
margin: 0 auto; | |||
margin-top: 20rpx; | |||
.infobox1 { | |||
width: 652rpx; | |||
height: 88rpx; | |||
border-bottom: 1rpx solid #D9D9D9; | |||
margin: 0 auto; | |||
display: flex; | |||
.box1-zuo { | |||
width: 50%; | |||
height: 100%; | |||
font-size: 30rpx; | |||
color: #333333; | |||
line-height: 88rpx; | |||
} | |||
.box1-you { | |||
width: 50%; | |||
height: 100%; | |||
display: flex; | |||
align-items: center; | |||
.you1 { | |||
width: 20rpx; | |||
height: 28rpx; | |||
margin-left: 32rpx; | |||
background-image: url(../../../static/images/newimg/dianliang.png); | |||
background-size: 100% 100%; | |||
display: flex; | |||
flex-direction: column-reverse; | |||
.youimg { | |||
width: 100%; | |||
background-color: #333333; | |||
} | |||
} | |||
.you11 { | |||
width: 20rpx; | |||
height: 28rpx; | |||
margin-left: 32rpx; | |||
background-image: url(../../../static/images/newimg/dianliang456.png); | |||
background-size: 100% 100%; | |||
display: flex; | |||
flex-direction: column-reverse; | |||
.youimg { | |||
width: 100%; | |||
background-color: red; | |||
} | |||
} | |||
.you2 { | |||
width: 114rpx; | |||
height: 30rpx; | |||
// border: 1rpx solid red; | |||
font-size: 20rpx; | |||
color: #333333; | |||
margin-left: 6rpx; | |||
} | |||
.you22 { | |||
width: 114rpx; | |||
height: 30rpx; | |||
// border: 1rpx solid red; | |||
font-size: 20rpx; | |||
color: red; | |||
margin-left: 6rpx; | |||
} | |||
.you3 { | |||
width: 30rpx; | |||
height: 28rpx; | |||
margin-left: 16rpx; | |||
.youimg { | |||
display: block; | |||
width: 30rpx; | |||
height: 28rpx; | |||
} | |||
} | |||
.you4 { | |||
width: 100rpx; | |||
height: 30rpx; | |||
// border: 1rpx solid red; | |||
font-size: 20rpx; | |||
color: #333333; | |||
margin-left: 6rpx; | |||
} | |||
} | |||
} | |||
.infobox2 { | |||
width: 652rpx; | |||
height: 33rpx; | |||
margin: 0 auto; | |||
display: flex; | |||
margin-top: 19rpx; | |||
.box2-zuo { | |||
width: 40%; | |||
height: 100%; | |||
line-height: 33rpx; | |||
font-size: 24rpx; | |||
color: #333333; | |||
text-indent: 6rpx; | |||
} | |||
.box2-you { | |||
width: 60%; | |||
height: 100%; | |||
line-height: 33rpx; | |||
font-size: 24rpx; | |||
color: #333333; | |||
text-indent: 30rpx; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,104 +0,0 @@ | |||
<template> | |||
<view class="bocx"> | |||
<view class="box-che"> | |||
<input class="box-input" v-model="name" placeholder-class="inpTextBox" type="text" placeholder="请输入" maxlength="5" /> | |||
</view> | |||
<view class="nic">请输入昵称 (不超过5个字)</view> | |||
<view class="cev" @tap="saveName">保存</view> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
export default { | |||
data() { | |||
return { | |||
name: "", | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
var userInfos = uni.getStorageSync('weapp_session_userInfo_data'); | |||
this.name=userInfos.name; | |||
}, | |||
methods: { | |||
// 保存昵称 | |||
saveName() { | |||
//获取本地用户信息 | |||
var userInfos = uni.getStorageSync('weapp_session_userInfo_data'); | |||
if (this.name == "") { | |||
uni.showModal({ | |||
title: '提示', | |||
content: '昵称不能为空', | |||
showCancel: false | |||
}); | |||
} else { | |||
util.getRequestPromise(config.service.upload, { | |||
name: this.name | |||
}).then(data => { | |||
userInfos.name = this.name; | |||
uni.setStorageSync('weapp_session_userInfo_data', userInfos); //写入缓存 | |||
uni.navigateBack({ | |||
delta: 1 | |||
}); | |||
}); | |||
} | |||
} | |||
} | |||
}; | |||
</script> | |||
<style> | |||
.bocx{ | |||
width: 100%; | |||
height: 100vh; | |||
background-color: #F8F8F8; | |||
} | |||
.box-che{ | |||
width: 100%; | |||
height: 102rpx; | |||
background: #FFFFFF; | |||
margin-top: 20rpx; | |||
} | |||
.box-input{ | |||
width: 90%; | |||
height: 100%; | |||
line-height: 102rpx; | |||
border: none; | |||
margin-left: 30rpx; | |||
font-size: 30rpx; | |||
color: #303030; | |||
} | |||
.nic{ | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #999999; | |||
line-height: 24rpx; | |||
margin-left: 30rpx; | |||
margin-top: 20rpx; | |||
} | |||
.inpTextBox { | |||
width: 90%; | |||
height: 100%; | |||
line-height: 102rpx; | |||
border: none; | |||
font-size: 30rpx; | |||
color: #303030; | |||
} | |||
.cev{ | |||
width: 690rpx; | |||
height: 88rpx; | |||
background: #2671E2; | |||
border-radius: 8rpx; | |||
text-align: center; | |||
line-height: 88rpx; | |||
color: #FFFFFF; | |||
font-size: 30rpx; | |||
margin: 0 auto; | |||
margin-top: 220rpx; | |||
} | |||
</style> |
@@ -1,392 +0,0 @@ | |||
<template> | |||
<view class="cented-box"> | |||
<view class="Pinspeak">客户信息</view> | |||
<view class="chented"> | |||
<view class="title"> | |||
<view class="titletext">客户姓名</view> | |||
<view class="titletext2"> | |||
<input class="titletext-input" style="color: #333333;" v-model="parames.name" placeholder-class="titletext-input" placeholder-style="color:#B2B2B2;" type="text" placeholder="请输入客户姓名(必填)" /> | |||
</view> | |||
<view class="titleimg"> | |||
<!-- <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> --> | |||
</view> | |||
</view> | |||
<view class="title"> | |||
<view class="titletext">客户性别</view> | |||
<view class="titletext2 displayclick" style="display: flex;align-items: center;padding-left: 10rpx;"> | |||
<view class="sexRadio" @click="changeSex(1)" :class="{active:parames.sex == 1}">男士</view> | |||
<view class="sexRadio" @click="changeSex(2)" :class="{active:parames.sex == 2}">女士</view> | |||
</view> | |||
</view> | |||
<view class="title"> | |||
<view class="titletext">联系电话</view> | |||
<view class="titletext2"> | |||
<input class="titletext-input" style="color: #333333;" v-model="parames.phone" placeholder-class="titletext-input" placeholder-style="color:#B2B2B2;" type="text" placeholder="请输入联系电话" /> | |||
</view> | |||
</view> | |||
<view class="title"> | |||
<view class="titletext">接待人数</view> | |||
<view class="titletext2" style="display: flex;align-items: center;justify-content: space-around;"> | |||
<view class="num" v-for="i in 6" :key="i" :class="{active:parames.howMany == i+1}" | |||
@click="changeHowMany(i+1)"> | |||
{{i + 1}} | |||
</view> | |||
</view> | |||
</view> | |||
<view class="title" style="border: none;" @click="Buildingselection()"> | |||
<view class="titletext">客户来源</view> | |||
<view class="titletext2" style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 90rpx;padding-left: 10rpx;"> | |||
<!-- {{parames.sourceName||'请选择客户来源'}} --> | |||
<text v-if="parames.sourceName" style="color: #333333;">{{parames.sourceName}}</text> | |||
<text v-else>请选择客户来源</text> | |||
</view> | |||
<view class="titleimg"> | |||
<image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="Pinspeak" v-if="shifoinfo==0">顾问</view> | |||
<view class="chented" v-if="shifoinfo==0" @click="clickShowhid()"> | |||
<view class="title" style="border: none;"> | |||
<view class="titletext">接待顾问</view> | |||
<view class="titletext2" style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 90rpx;padding-left: 10rpx;"> | |||
<!-- {{text || '请选择接待顾问'}} --> | |||
<text v-if="text" style="color: #333333;">{{text}}</text> | |||
<text v-else>请选择接待顾问</text> | |||
</view> | |||
<view class="titleimg"> | |||
<image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="clive" @click="save">确定</view> | |||
<view v-if="Showhiddenunits"> | |||
<u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list" @cancel="cancel" @confirm="confirm"></u-select> | |||
</view> | |||
<view v-if="Showhid"> | |||
<u-select :mask-close-able="false" v-model="Showhid" mode="single-column" :list="freeList" @cancel="cancel1" @confirm="confirm1"></u-select> | |||
</view> | |||
<u-modal v-model="show" :mask-close-able="true" :title="'代接待提醒'" :confirm-text="confirmtext" :cancel-text='canceltext' @cancel="confirmA" @confirm="confirmB" :show-cancel-button='true' :content="content"></u-modal> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var config = require("../../../config"); | |||
export default { | |||
data() { | |||
return { | |||
Showhiddenunits:false, | |||
list: [ | |||
{label: '自然到访',value:'自然到访'}, | |||
{label: '渠道推荐',value:'渠道推荐'}, | |||
], | |||
parames: { | |||
name: '', | |||
// 性别1男 2女 | |||
sex: 1, | |||
phone: '', | |||
source: null, | |||
sourceName: null, | |||
howMany: 1, | |||
agentId:null, | |||
projectId:'', | |||
replaceReception:0 | |||
}, | |||
shifoinfo:0, | |||
freeList:[], | |||
Showhid:false, | |||
text:null, | |||
show:false, | |||
content: '东临碣石,以观沧海', | |||
confirmtext:'1',//确认文字 | |||
canceltext:'2',//取消文字 | |||
daitiReceptionobj:{} | |||
}; | |||
}, | |||
onShow: function() { | |||
this.parames.projectId=uni.getStorageSync('buildingID').id; | |||
this.init() | |||
this.getFreeList(); | |||
}, | |||
methods: { | |||
//取消 | |||
confirmA(){ | |||
if(this.daitiReceptionobj.assign!=null){ | |||
this.parames.agentId=this.daitiReceptionobj.assign.accountId; | |||
this.baochunfun() | |||
}else{ | |||
uni.showToast({ | |||
icon: "none", | |||
title: "【"+this.daitiReceptionobj.owner.name+"】正在接待中" | |||
}) | |||
return; | |||
} | |||
}, | |||
// 确认 | |||
confirmB(){ | |||
this.parames.agentId=this.daitiReceptionobj.replacement.accountId; | |||
this.parames.replaceReception=1; | |||
this.baochunfun() | |||
}, | |||
save() { | |||
if (this.parames.name.length==0) { | |||
uni.showToast({ | |||
icon: "none", | |||
title: "客户姓名不能为空" | |||
}) | |||
return; | |||
} | |||
if (this.parames.phone && !this.$u.test.mobile(this.parames.phone)) { | |||
uni.showToast({ | |||
icon: "none", | |||
title: "手机号码格式不正确" | |||
}) | |||
return; | |||
} | |||
const that = this; | |||
this.$u.post("customer/daitiReception", { | |||
phone: that.parames.phone, | |||
projectId: that.parames.projectId, | |||
agentId:that.parames.agentId | |||
}).then(res => { | |||
if(res.unchecked==0){ | |||
that.baochunfun() | |||
}else{ | |||
if(res.zs==0){ | |||
that.parames.agentId=res.assign.accountId; | |||
that.baochunfun() | |||
}else{ | |||
if(res.assign==null&&res.replacement==null){ | |||
that.baochunfun() | |||
}else{ | |||
if(res.assign==null){ | |||
that.daitiReceptionobj=res; | |||
that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?" | |||
that.confirmtext=res.replacement.name +"代接代",//确认文字 | |||
that.canceltext=res.owner.name +'接待',//取消文字 | |||
that.show=true; | |||
}else{ | |||
that.daitiReceptionobj=res; | |||
that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?" | |||
that.confirmtext=res.replacement.name +"代接代",//确认文字 | |||
that.canceltext=res.assign.name +'接待',//取消文字 | |||
that.show=true; | |||
} | |||
} | |||
} | |||
} | |||
}) | |||
}, | |||
baochunfun(){ | |||
const { | |||
dataCode | |||
} = uni.getStorageSync("weapp_session_userInfo_data"); | |||
if(this.parames.phone.length==0){ | |||
this.parames.phone=null | |||
} | |||
uni.showLoading({ | |||
title: "保存中", | |||
mask: true | |||
}) | |||
if (dataCode == 6) { | |||
this.$u.post("/customer/gwAdd", this.parames).then(res => { | |||
uni.hideLoading(); | |||
uni.showToast({ | |||
icon: "none", | |||
title: "保存成功" | |||
}) | |||
uni.navigateBack() | |||
}) | |||
} else { | |||
this.$u.post("/customer/add", this.parames).then(res => { | |||
uni.hideLoading(); | |||
uni.showToast({ | |||
icon: "none", | |||
title: "保存成功" | |||
}) | |||
uni.navigateBack() | |||
}) | |||
} | |||
}, | |||
changeSex(sex) { | |||
this.parames.sex = sex; | |||
}, | |||
changeHowMany(num) { | |||
this.parames.howMany = num; | |||
}, | |||
clickShowhid(){ | |||
if(this.freeList.length==0){ | |||
uni.showToast({ | |||
icon:'none', | |||
title: '当前无可用排班顾问', | |||
duration: 2000 | |||
}); | |||
}else{ | |||
this.Showhid=true; | |||
} | |||
}, | |||
cancel1(){ | |||
this.Showhid=false; | |||
}, | |||
confirm1(e) { | |||
this.text=e[0].label; | |||
this.parames.agentId=e[0].value; | |||
this.Showhid=false; | |||
}, | |||
Buildingselection(){ | |||
this.Showhiddenunits=true; | |||
}, | |||
cancel(){ | |||
this.Showhiddenunits=false; | |||
}, | |||
confirm(e) { | |||
this.parames.sourceName=e[0].value; | |||
this.Showhiddenunits=false; | |||
}, | |||
init(){ | |||
uni.request({ | |||
url: config.service.getSelfAssignedByHouseId+"?houseId="+this.parames.projectId, | |||
method: "GET", | |||
header: { | |||
'content-type': 'application/json', | |||
'Access-Token': uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
success: (data) => { | |||
if(data.data.code==10000){ | |||
this.shifoinfo=data.data.data.selfAssigned | |||
} | |||
} | |||
}) | |||
}, | |||
//获取顾问列表 | |||
getFreeList() { | |||
this.$u.get("/zkAgentPool/freeList?itemId="+this.parames.projectId).then(res => { | |||
this.freeList = res; | |||
this.freeList.forEach(item=>{ | |||
item.label=item.name; | |||
item.value=item.agentId | |||
}) | |||
}) | |||
}, | |||
} | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.sexRadio{ | |||
color: #BFBFBF; | |||
border: 1rpx solid #BFBFBF; | |||
font-size: 24upx; | |||
width: 100rpx; | |||
height: 43rpx; | |||
text-align: center; | |||
line-height: 40rpx; | |||
&:last-child { | |||
margin-left: 20rpx; | |||
} | |||
&.active { | |||
color: #2B6FFF; | |||
border-color: #2B6FFF; | |||
} | |||
} | |||
.num { | |||
width: 50rpx; | |||
height: 50rpx; | |||
background: rgba(43, 110, 253, 0.1); | |||
color: #2B6EFD; | |||
font-size: 30rpx; | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
&.active { | |||
background: #2B6EFD; | |||
color: #FFFFFF; | |||
} | |||
} | |||
.cented-box{ | |||
background: #F8F8F8; | |||
width: 100%; | |||
height: 100vh; | |||
} | |||
.Pinspeak{ | |||
width: 100%; | |||
height: 92rpx; | |||
border-bottom: 1rpx solid #E0E0E0; | |||
font-size: 32rpx; | |||
font-weight: bold; | |||
color: #333333; | |||
text-indent: 30rpx; | |||
line-height: 92rpx; | |||
background: #FFFFFF; | |||
margin-top: 20rpx; | |||
padding-left: 10rpx; | |||
} | |||
.chented{ | |||
width: 100%; | |||
padding-left: 30rpx; | |||
padding-right: 30rpx; | |||
background-color: #FFFFFF; | |||
.title{ | |||
width: 100%; | |||
height: 90rpx; | |||
border-bottom: 1rpx solid #E0E0E0; | |||
display: flex; | |||
align-items: center; | |||
.titletext{ | |||
width: 21%; | |||
height: 90rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 90rpx; | |||
text-indent: 10rpx; | |||
} | |||
.titletext2{ | |||
width: 71%; | |||
height: 90rpx; | |||
} | |||
.titletext-input{ | |||
width: 100%; | |||
height: 90rpx; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #B2B2B2; | |||
line-height: 90rpx; | |||
padding-left: 10rpx; | |||
} | |||
.titleimg{ | |||
width: 8%; | |||
text-align: right; | |||
.titleimg1{ | |||
width: 16rpx; | |||
height: 36rpx; | |||
} | |||
} | |||
} | |||
} | |||
.clive{ | |||
width: 690rpx; | |||
height: 88rpx; | |||
background: #2671E2; | |||
text-align: center; | |||
line-height: 88rpx; | |||
color: #FFFFFF; | |||
border-radius: 8rpx; | |||
margin: 0 auto; | |||
margin-top: 300rpx; | |||
font-size: 32rpx; | |||
} | |||
</style> |
@@ -1,257 +0,0 @@ | |||
<template> | |||
<view class="box"> | |||
<!-- 顾问选择 --> | |||
<view class="nextcon"> | |||
下一位接待顾问:{{textcdhSKJ}} | |||
</view> | |||
<view class="content" style="padding-bottom: 200rpx;"> | |||
<radio-group @change="radioChange"> | |||
<view v-for="(item,index) in freeList" :key="index" class="content-tips"> | |||
<view class="left"> | |||
<view class="img"> | |||
{{item.name.slice(0,1)}} | |||
</view> | |||
<view class="text"> | |||
<view class="name"> | |||
{{item.name}} | |||
</view> | |||
<view class="num"> | |||
今日接待: {{item.todayNum}} | |||
</view> | |||
</view> | |||
</view> | |||
<view class="right"> | |||
<radio :value="item.agentId" :checked="index == current" style="transform:scale(0.9)" | |||
color="#2671E2"></radio> | |||
</view> | |||
</view> | |||
</radio-group> | |||
</view> | |||
<view class="empty" v-if="freeList.length == 0"> | |||
<image class="image" src="@/static/images/customerEmpty.png" mode=""></image> | |||
<view class="tips"> | |||
暂无空闲顾问 | |||
</view> | |||
</view> | |||
<view class="save" @click="save" :class="{active:chosedAgentId}"> | |||
保存 | |||
</view> | |||
<u-modal v-model="show" :mask-close-able="true" :title="'代接待提醒'" :confirm-text="confirmtext" :cancel-text='canceltext' @cancel="confirmA" @confirm="confirmB" :show-cancel-button='true' :content="content"></u-modal> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
customerId: '', | |||
buildingID: '', | |||
freeList: [], | |||
current: null, | |||
chosedAgentId: '', | |||
textcdhSKJ: '', | |||
show:false, | |||
content: '东临碣石,以观沧海', | |||
confirmtext:'1',//确认文字 | |||
canceltext:'2',//取消文字 | |||
daitiReceptionobj:{}, | |||
replaceReception:0 | |||
} | |||
}, | |||
onLoad(option) { | |||
this.customerId = option.id; | |||
}, | |||
onShow() { | |||
this.buildingID = uni.getStorageSync('buildingID').id; | |||
this.getFreeList(); | |||
}, | |||
methods: { | |||
//取消 | |||
confirmA(){ | |||
if(this.daitiReceptionobj.assign!=null){ | |||
this.baochunfun() | |||
}else{ | |||
uni.showToast({ | |||
icon: "none", | |||
title: "【"+this.daitiReceptionobj.owner.name+"】正在接待中" | |||
}) | |||
return; | |||
} | |||
}, | |||
// 确认 | |||
confirmB(){ | |||
this.replaceReception=1; | |||
this.baochunfun() | |||
}, | |||
save() { | |||
console.log(this.chosedAgentId) | |||
if (!this.chosedAgentId) { | |||
uni.showToast({ | |||
icon: "none", | |||
title: "未选择指派顾问" | |||
}) | |||
return | |||
} | |||
const that = this; | |||
this.$u.post("customer/daitiReception", { | |||
agentId: that.chosedAgentId, | |||
id: that.customerId | |||
}).then(res => { | |||
if(res.unchecked==0){ | |||
that.baochunfun() | |||
}else{ | |||
if(res.zs==0){ | |||
that.baochunfun() | |||
}else{ | |||
if(res.assign==null&&res.replacement==null){ | |||
that.baochunfun() | |||
}else{ | |||
if(res.assign==null){ | |||
that.daitiReceptionobj=res; | |||
that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?" | |||
that.confirmtext=res.replacement.name +"代接代",//确认文字 | |||
that.canceltext=res.owner.name +'接待',//取消文字 | |||
that.show=true; | |||
}else{ | |||
that.daitiReceptionobj=res; | |||
that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?" | |||
that.confirmtext=res.replacement.name +"代接代",//确认文字 | |||
that.canceltext=res.assign.name +'接待',//取消文字 | |||
that.show=true; | |||
} | |||
} | |||
} | |||
} | |||
}); | |||
}, | |||
baochunfun(){ | |||
uni.showLoading({ | |||
title: "保存中", | |||
mask: true | |||
}) | |||
const that = this; | |||
this.$u.post("customer/assign", { | |||
agentId: that.chosedAgentId, | |||
id: that.customerId, | |||
replaceReception:this.replaceReception | |||
}).then(res => { | |||
uni.showToast({ | |||
icon: "none", | |||
title: "分配成功" | |||
}) | |||
uni.navigateBack(); | |||
uni.hideLoading(); | |||
}); | |||
}, | |||
getFreeList() { | |||
this.$u.get("/zkAgentPool/freeList?itemId=" + this.buildingID).then(res => { | |||
if (res.length == 0) { | |||
this.freeList = [] | |||
} else { | |||
this.freeList = res; | |||
this.textcdhSKJ = res[0].name | |||
} | |||
}) | |||
}, | |||
radioChange: function(evt) { | |||
this.chosedAgentId = ''; | |||
this.chosedAgentId = evt.detail.value; | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.empty { | |||
flex: 1; | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
.image { | |||
width: 478upx; | |||
height: 478upx; | |||
} | |||
.tips { | |||
font-size: 36upx; | |||
color: #242424; | |||
line-height: 1; | |||
margin-top: 50upx; | |||
} | |||
} | |||
.save { | |||
position: fixed; | |||
width: calc(100vw - 60upx); | |||
bottom: 50upx; | |||
left: 30rpx; | |||
color: #FFFFFF; | |||
font-size: 30upx; | |||
height: 98upx; | |||
border-radius: 8upx; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
background: rgba(42, 111, 255, 1); | |||
} | |||
.box { | |||
background: #F8F8F8; | |||
width: 100%; | |||
height: 100%; | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
// line-height: 30px; | |||
.nextcon { | |||
height: 78rpx; | |||
background: #F4F8FD; | |||
color: #2671E2; | |||
text-align: center; | |||
line-height: 78rpx; | |||
} | |||
.content-tips { | |||
display: flex; | |||
justify-content: space-between; | |||
background: #fff; | |||
padding: 0 30rpx; | |||
height: 148rpx; | |||
margin-bottom: 20rpx; | |||
.left { | |||
display: flex; | |||
margin-top: 30rpx; | |||
.img { | |||
width: 72rpx; | |||
height: 72rpx; | |||
background: #FFFFFF; | |||
border: 1px solid #C9C9C9; | |||
line-height: 64rpx; | |||
text-align: center; | |||
border-radius: 50%; | |||
margin-right: 20rpx; | |||
} | |||
.text { | |||
.name { | |||
margin-top: 4rpx; | |||
font-weight: 600; | |||
color: #333333; | |||
line-height: 30rpx; | |||
margin-bottom: 24rpx; | |||
} | |||
} | |||
} | |||
.right { | |||
margin: 54rpx 0; | |||
} | |||
} | |||
} | |||
</style> |
@@ -1,102 +0,0 @@ | |||
<template> | |||
<view class="bocx"> | |||
<view class="box-che"> | |||
<input v-model="name" class="box-input" placeholder-class="inpTextBox" type="text" placeholder="请输入" maxlength="15" /> | |||
</view> | |||
<view class="nic">请输入签名 (不超过15个字)</view> | |||
<view class="cev" @click="saveName()">保存</view> | |||
</view> | |||
</template> | |||
<script> | |||
var app = getApp(); | |||
var util = require("../../utils/util.js"); | |||
var config = require("../../config"); | |||
export default { | |||
data() { | |||
return { | |||
name: "", | |||
}; | |||
}, | |||
onLoad: function(options) { | |||
var userInfos = uni.getStorageSync('weapp_session_userInfo_data'); | |||
this.name=userInfos.personalProfile; | |||
}, | |||
methods: { | |||
saveName() { | |||
var userInfos = uni.getStorageSync('weapp_session_userInfo_data'); | |||
if (this.name == "") { | |||
uni.showModal({ | |||
title: '提示', | |||
content: '签名不能为空', | |||
showCancel: false | |||
}); | |||
} else { | |||
util.getRequestPromise(config.service.upload, { | |||
personalProfile: this.name | |||
}).then(data => { | |||
userInfos.personalProfile = this.name; | |||
uni.setStorageSync('weapp_session_userInfo_data', userInfos); //写入缓存 | |||
uni.navigateBack({ | |||
delta: 1 | |||
}); | |||
}); | |||
} | |||
} | |||
} | |||
}; | |||
</script> | |||
<style> | |||
.bocx{ | |||
width: 100%; | |||
height: 100vh; | |||
background-color: #F8F8F8; | |||
} | |||
.box-che{ | |||
width: 100%; | |||
height: 102rpx; | |||
background: #FFFFFF; | |||
margin-top: 20rpx; | |||
} | |||
.box-input{ | |||
width: 90%; | |||
height: 100%; | |||
line-height: 102rpx; | |||
border: none; | |||
margin-left: 30rpx; | |||
font-size: 30rpx; | |||
color: #303030; | |||
} | |||
.nic{ | |||
font-size: 24rpx; | |||
font-weight: 400; | |||
color: #999999; | |||
line-height: 24rpx; | |||
margin-left: 30rpx; | |||
margin-top: 20rpx; | |||
} | |||
.inpTextBox { | |||
width: 90%; | |||
height: 100%; | |||
line-height: 102rpx; | |||
border: none; | |||
font-size: 30rpx; | |||
color: #B2B2B2; | |||
} | |||
.cev{ | |||
width: 690rpx; | |||
height: 88rpx; | |||
background: #2671E2; | |||
border-radius: 8rpx; | |||
text-align: center; | |||
line-height: 88rpx; | |||
color: #FFFFFF; | |||
font-size: 30rpx; | |||
margin: 0 auto; | |||
margin-top: 220rpx; | |||
} | |||
</style> |
@@ -1,7 +0,0 @@ | |||
{ | |||
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", | |||
"rules": [{ | |||
"action": "allow", | |||
"page": "*" | |||
}] | |||
} |