Commit 4b95c1e8 by 夏新然

客流统计页面完成

1 parent 9fc83ede
<template>
<view class="circleBarchart">
<div :id='bindId' class="chart"></div>
</view>
</template>
<script>
export default {
data () {
return {
yMax:0
}
},
mounted() {
},
watch:{
bindId:function(newValue,oldValue){
},
chartData:{
handler(newValue,oldValue){
this.drawCircleBarChart();
},
deep:true
},
},
props:{
bindId:{
type:String,
default:''
},
chartData: {
type: Object,
default: function(){
return {}
}
}
},
methods: {
drawCircleBarChart() {
var yMax=0;
let myChart = {};
let chartDom = document.getElementById(this.bindId);
myChart = this.echarts.init(chartDom);
myChart.showLoading('default', {
text: '',
color: '#409eff'
});
var option = {
title:{
show:true,
text:this.chartData.title,
left: uni.upx2px(18.11),
top: uni.upx2px(10.86),
textStyle: {
fontWeight: "normal",
fontSize: uni.upx2px(25.4),
color: '#4A4A4A'
}
},
color: ['#3BB8FF', '#87D14B', '#6784E3'],
tooltip:{
renderMode:'richText'
},
grid: {
left:uni.upx2px(76.08),
right: uni.upx2px(28.98),
top: uni.upx2px(83.33),
bottom: uni.upx2px(9.05)+uni.upx2px(21.74)+12+uni.upx2px(21.74)+12
},
animation: false,
yAxis: {
minInterval :1,
name:'人次',
type: 'value',
nameRotate: 1,
splitLine: {
lineStyle: {
color: '#EBEBEB'
}
},
axisLine: {
lineStyle: {
color: '#888'
}
},
axisTick: {
show: false
},
axisLabel: {
fontSize: uni.upx2px(21.74),
color: '#666',
formatter:function(value){
if(value>yMax){
yMax=value;
}
return value
}
}
},
xAxis: {
splitLine: {
show: false
},
axisLine: {
lineStyle: {
color: '#888'
}
},
axisTick: {
show: false
},
axisLabel: {
fontSize: uni.upx2px(21.74),
color: '#666'
},
data: []
},
legend : {
orient: "horizontal",
x: "center",
textStyle: {
fontSize: uni.upx2px(21.74),
color:'rgba(74,74,74,1)'
},
itemWidth: uni.upx2px(12.7),
itemHeight: uni.upx2px(12.7),
itemGap: uni.upx2px(5.62),
bottom: uni.upx2px(9.05),
data: [],
selected:{}
},
series:JSON.parse(JSON.stringify(this.chartData.series))
}
if(!option.series) return;
let seriesObj = {}, seriesData = [], totalData = [];
try {
seriesData = this.chartData.xaxis.data.map(item => {
return {
name: item,
data: []
}
});
if(option.series.length > 0) {
for(let i = 0; i < option.series.length; i++) {
option.xAxis.data.push(option.series[i].name);
for(let j = 0; j < option.series[i].data.length; j++) {
seriesObj[this.chartData.xaxis.data[j]] = option.series[i].data[j];
for(let k in seriesObj) {
if(seriesData[j].name == k) {
seriesData[j].data.push(seriesObj[k])
}
}
seriesObj = {};
}
}
}
for(let i = 0; i < seriesData.length; i++) {
seriesData[i].itemStyle = {
normal: {
barBorderRadius: 7
}
};
seriesData[i].type = 'bar';
seriesData[i].barWidth = 14;
option.legend.data.push({
name: seriesData[i].name,
icon: 'circle'
});
}
seriesData.forEach(item => {
item.data.forEach((k, i) => {
if(totalData[i]) {
totalData[i] += k;
} else {
totalData[i] = k;
}
})
})
option.series = seriesData;
if(!option.series.length) {
option.graphic = {
type: 'text',
left: 'center',
top: 'middle',
z: 100,
style: {
fill: '#333',
text: '暂无数据',
}
}
// option.xAxis.data = [];
myChart.clear();
setTimeout(() => {
myChart.hideLoading();
myChart.setOption(option);
}, 500);
}
} catch (error) {}
// myChart.clear();
setTimeout(() => {
myChart.hideLoading();
}, 500);
myChart.setOption(option);
// option.grid.left=uni.upx2px(String(yMax).length*uni.upx2px(21.74))+uni.upx2px(18.11)
console.log(yMax)
option.grid.left=uni.upx2px(18.11)+15+String(yMax).length*uni.upx2px(9.05)
myChart.setOption(option);
}
}
}
</script>
<style>
.chart{
width:706.52upx;
height:634.05upx;
margin: 0 auto;
background: #FFFFFF;
margin-bottom: 18.2upx;
border-radius:7.24upx;
overflow: hidden;
}
</style>
<template>
<view class="timechart">
<div :id='bindId' class="chart"></div>
</view>
</template>
<script>
export default {
data () {
return {
yMax:0
}
},
mounted() {
},
watch:{
bindId:function(newValue,oldValue){
},
chartData:{
handler(newValue,oldValue){
this.drawTimeChart();
},
deep:true
},
},
props:{
bindId:{
type:String,
default:''
},
chartData: {
type: Object,
default: function(){
return {}
}
}
},
methods: {
drawTimeChart() {
var yMax=0;
let myChart = {};
let chartDom = document.getElementById(this.bindId);
myChart = this.echarts.init(chartDom);
myChart.showLoading('default', {
text: '',
color: '#409eff'
});
let yAxisData = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
var option = {
title:{
show:true,
text:this.chartData.title,
left: uni.upx2px(18.11),
top: uni.upx2px(10.86),
textStyle: {
fontWeight: "normal",
fontSize: uni.upx2px(25.4),
color: '#4A4A4A'
}
},
tooltip:{
renderMode:'richText'
},
grid: {
left:uni.upx2px(76.08),
right: uni.upx2px(28.98),
top: uni.upx2px(83.33),
bottom: uni.upx2px(9.05)+uni.upx2px(21.74)+12+uni.upx2px(21.74)+12
},
animation: false,
yAxis: {
type: 'category',
splitArea: {
show: true
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: '#535353'
}
},
data: yAxisData
},
xAxis: {
type: 'category',
data: [],
nameTextStyle: {
color: '#444',
fontSize: uni.upx2px(21.74)
},
axisLabel: {
width: 140
},
splitArea: {
show: true
},
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: '#535353'
}
}
},
visualMap: {
min: 0,
max: 20,
calculable: true,
orient: 'horizontal',
left: 'left',
itemWidth: 15,
color: ['#0068FF', '#fff'],
},
legend : {
orient: "horizontal",
x: "center",
textStyle: {
fontSize: uni.upx2px(21.74),
color:'rgba(74,74,74,1)'
},
itemWidth: uni.upx2px(12.7),
itemHeight: uni.upx2px(12.7),
itemGap: uni.upx2px(5.62),
bottom: uni.upx2px(9.05),
data: [],
selected:{}
},
series:JSON.parse(JSON.stringify(this.chartData.series))
}
if(!option.series) return;
try {
option.xAxis.data = this.chartData.xaxis.data;
} catch (error) { }
if(option.series.length > 0) {
let seriesData = [], yIndex = null;
let maxArr = [], onedimen = [], maxNum = null;
for(let i = 0, len = option.series.length; i < len; i++) {
option.series[i].type = 'heatmap';
option.series[i].itemStyle = {
emphasis: {
shadowBlur: 10,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
};
option.series[i].label = {
normal: {
show: true,
color: '#444'
}
};
}
// 处理series data
option.series.forEach((item, index) => {
yIndex = getIndex(item.name, yAxisData);
maxArr.push(item.data);
for(let i = 0; i < item.data.length; i++) {
seriesData.push([parseInt(yIndex), i, item.data[i]]);
}
});
try {
onedimen = maxArr.join(',').split(',');
maxNum = Math.max.apply(null, onedimen);
} catch (error) {
console.log('heatmap max value', error.message)
}
option.visualMap.max = maxNum;
seriesData = seriesData.map(function (item) {
return [item[1], item[0], item[2] || '-'];
});
for(let i in option.series) {
option.series[i].data = [];
option.series[i].data = seriesData.splice(0, option.xAxis.data.length);
}
// 获取在Y轴的值
function getIndex (val, arr) {
for(let i in arr) {
if(val == arr[i]) {
return i;
}
}
}
} else {
option.graphic = {
type: 'text',
left: 'center',
top: 'middle',
z: 100,
style: {
fill: '#444',
text:'暂无数据',
font: '14px '
}
}
option.visualMap.show = false;
option.yAxis.data = [];
// option.grid.height = 670;
myChart.clear();
setTimeout(() => {
myChart.hideLoading();
myChart.setOption(option);
}, 500);
}
// myChart.clear();
setTimeout(() => {
myChart.hideLoading();
}, 500);
myChart.setOption(option);
console.log('option', JSON.stringify(option))
// option.grid.left=uni.upx2px(String(yMax).length*uni.upx2px(21.74))+uni.upx2px(18.11)
// option.grid.left=uni.upx2px(18.11)+15+String(yMax).length*uni.upx2px(9.05)
// myChart.setOption(option);
}
}
}
</script>
<style>
.chart{
width:706.52upx;
height:634.05upx;
margin: 0 auto;
background: #FFFFFF;
margin-bottom: 18.2upx;
border-radius:7.24upx;
overflow: hidden;
}
</style>
......@@ -45,6 +45,11 @@
"navigationBarTitleText": "多选出入口列表"
}
}, {
"path": "pages/list/oneGateList",
"style": {
"navigationBarTitleText": "单选出入口列表"
}
}, {
"path": "pages/list/moreFloorList",
"style": {
"navigationBarTitleText": "多选楼层列表"
......@@ -59,12 +64,27 @@
"style": {
"navigationBarTitleText": "多选店铺列表"
}
},{
"path": "pages/list/oneStoreList",
"style": {
"navigationBarTitleText": "单选店铺列表"
}
},{
"path": "pages/list/objList",
"style": {
"navigationBarTitleText": "对象列表"
}
}, {
"path": "pages/list/floorList",
"style": {
"navigationBarTitleText": "门店列表"
}
},{
"path": "pages/list/eventList",
"style": {
"navigationBarTitleText": "活动列表"
}
},{
"path": "pages/analysis/staticReport/staticDayReport",
"style": {
"navigationBarTitleText": "基础统计"
......@@ -100,9 +120,39 @@
"navigationBarTitleText": "排行榜统计"
}
},{
"path": "pages/analysis/staticReport/staticWeekReport",
"path": "pages/analysis/yoyReport/yoyDayReport",
"style": {
"navigationBarTitleText": "基础统计周"
"navigationBarTitleText": "同环比对比日"
}
},{
"path": "pages/analysis/yoyReport/yoyWeekReport",
"style": {
"navigationBarTitleText": "同环比对比周"
}
},{
"path": "pages/analysis/yoyReport/yoyMonthReport",
"style": {
"navigationBarTitleText": "同环比对比月"
}
},{
"path": "pages/analysis/yoyReport/yoyYearReport",
"style": {
"navigationBarTitleText": "同环比对比年"
}
},{
"path": "pages/analysis/timeFlowReport/timeFlowReport",
"style": {
"navigationBarTitleText": "时段客流分布"
}
},{
"path": "pages/analysis/holidayReport/holidayReport",
"style": {
"navigationBarTitleText": "节假日活动对比"
}
},{
"path": "pages/analysis/actObjReport/actObjReport",
"style": {
"navigationBarTitleText": "同节日对象对比"
}
},{
"path": "pages/analysis/condition",
......
<template>
<div>
<headerComp :leftImgSrc="leftImg" :title="titleStr" :rightImgSrc="rightImg" @leftClick="backFun" @rightClick="conditionFun"></headerComp>
<div style="height: 18.11upx;"></div>
<linechart :chart-data="chartData.HolidayNear" bind-id='HolidayNear'></linechart>
<circlebar :chart-data="chartData.HolidayEffect" bind-id='HolidayEffect'></circlebar>
<linechart :chart-data="chartData.HolidayHourDetail" bind-id='HolidayHourDetail'></linechart>
</div>
</template>
<script>
import headerComp from '../../../components/header'
import backArrow from '../../../static/header/backArrow.png'
import other from '../../../static/header/other.png'
import circlebar from '../../../components/circleBarChart'
import linechart from '../../../components/lineChart'
export default{
data(){
return{
titleStr:'节假日活动对比',
leftImg:backArrow,
rightImg:other,
atoken:'',
keyArr:[],
chartIds:'',
reportType:'mall',
accountId:[],
orgIds:'',
date:'',
isDay:true,
isHour:false,
isMin:false,
chartData:{},
gateId:[],
floorId:[],
storeId:[]
}
},
onLoad: function (option) {
if(option.types){
this.reportType=option.types;
}
uni.getStorage({
key:'atoken',
success:(res)=>{
this.atoken=res.data;
}
})
uni.getStorage({
key:'accountList',
success:(res)=>{
if(res.data){
var list=JSON.parse(res.data);
list.forEach((item,index)=>{
if(index==0){
this.accountId.push(item.id)
}
})
}
}
})
uni.getStorage({
key:'selectAccountIdArr',
success:(res)=> {
this.accountId=JSON.parse(res.data);
},
complete: (res) => {
}
})
uni.getStorage({
key:'selectGateIdArr',
success:(res)=> {
this.gateId=JSON.parse(res.data);
},
complete: (res) => {
}
})
uni.getStorage({
key:'selectFloorIdArr',
success:(res)=> {
this.floorId=JSON.parse(res.data);
},
complete: (res) => {
}
})
uni.getStorage({
key:'selectStoreIdArr',
success:(res)=> {
this.storeId=JSON.parse(res.data);
},
complete: (res) => {
}
})
var currentYear=[]
uni.getStorage({
key:'currentYear',
success:(res)=> {
currentYear=JSON.parse(res.data);
},
complete: (res) => {
}
})
var a1=0;
if(currentYear[0].index){
a1=currentYear[0].index;
}else{
a1=currentYear[0];
}
var from='',to='';
var year =1999+a1;
from=year+'-01-01';
to=year+'-12-31';
this.date=from+','+to;
uni.getStorage({
key:'selectDate',
success:(res)=> {
if(res.data.indexOf(',')!=-1){
this.date=res.data;
}else{
uni.setStorage({
key:'selectDate',
data:this.date
})
}
},
complete: (res) => {
}
})
this.getReportKey();
},
computed: {
i18n() {
return this.$t("index")
}
},
components:{
headerComp,circlebar,linechart
},
methods: {
backFun(){
uni.reLaunch({
url:"../index",
})
},
conditionFun(){
uni.setStorage({
key:'backUrl',
data:7
})
uni.navigateTo({
url:'../condition'
})
},
getReportKey(){
var report='holidayObject';
this.keyArr=['HolidayNear','HolidayEffect','HolidayHourDetail'];
uni.showLoading({
title: '加载中'
});
uni.request({
url:window.url+'/reportCharts',
data:{
report:report,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success:(res) =>{
this.chartIds='';
res.data.data.forEach(item=>{
if(this.keyArr.indexOf(item.key)!='-1'){
this.chartIds+=item.id+','
}
})
this.chartIds=this.chartIds.substring(0,this.chartIds.length-1);
this.getChartData();
}
})
},
getChartData(){
this.orgIds=''
var data={}
var holidayEventId='';
uni.getStorage({
key:'eventIdArr',
success:(res)=> {
holidayEventId=JSON.parse(res.data)[0];
},
complete: (res) => {
}
})
this.accountId.forEach(item=>{
this.orgIds+=item+','
})
this.orgIds=this.orgIds.substring(0,this.orgIds.length-1);
if(holidayEventId==''){
uni.request({
url:window.url+'/events/getEvent',
data:{
mallId: this.orgIds,
year: this.date.split(',')[0],
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success:(res) =>{
holidayEventId=res.data.data[0].id;
var url=window.url+'/report/holidayObject/mall';
if(this.reportType=='mall'){
url=window.url+'/report/holidayObject/mall';
data={
orgIds:this.orgIds,
chartIds:this.chartIds,
date:this.date.split(',')[0],
holidayEventId:holidayEventId,
kpiType:'TRAFFIC',
_t:Date.parse(new Date())/1000
}
}
uni.request({
url:url,
header: {
'Authorization': this.atoken //自定义请求头信息
},
data:data,
method:'GET',
success:(res) =>{
uni.hideLoading()
var datas=res.data.data;
this.chartData=datas.body;
}
})
}
})
}else{
var url=window.url+'/report/holidayObject/mall';
if(this.reportType=='mall'){
url=window.url+'/report/holidayObject/mall';
data={
orgIds:this.orgIds,
chartIds:this.chartIds,
date:this.date.split(',')[0],
holidayEventId:holidayEventId,
kpiType:'TRAFFIC',
_t:Date.parse(new Date())/1000
}
}
uni.request({
url:url,
header: {
'Authorization': this.atoken //自定义请求头信息
},
data:data,
method:'GET',
success:(res) =>{
uni.hideLoading()
var datas=res.data.data;
this.chartData=datas.body;
}
})
}
}
},
}
</script>
<style>
.selectBox{
width: 646.73upx;
height: 61.59upx;
font-size:21.74upx;
line-height: 61.59upx;
display: flex;
flex-direction: row;
margin: 0 auto;
margin-bottom: 18.11upx;
}
.sItem{
flex: 1;
background:#FFFFFF;
text-align: center;
cursor: pointer;
border-right:1px solid #DBDBDB ;
}
.sItem:last-of-type{
border-right:none
}
.checkedItem{
background: #0069FF;
color: #FFFFFF;
border: #0069FF;
}
</style>
<template>
<div>
<headerComp :leftImgSrc="leftImg" :title="titleStr" :rightImgSrc="rightImg" @leftClick="backFun" @rightClick="conditionFun"></headerComp>
<div style="height: 18.11upx;"></div>
<v-table v-if="columns2.length>0"
is-horizontal-resize
style="width:100%;margin-bottom: 16.3upx;"
:columns="columns2"
:table-data="tableData2"
row-hover-color="#eee"
row-click-color="#edf7ff"
:height='500'
></v-table>
<circlebar :chart-data="chartData.HolidayEffect" bind-id='HolidayEffect'></circlebar>
<v-table v-if="columns.length>0"
is-horizontal-resize
style="width:100%"
:columns="columns"
:table-data="tableData"
row-hover-color="#eee"
row-click-color="#edf7ff"
:height='500'
></v-table>
</div>
</template>
<script>
import headerComp from '../../../components/header'
import backArrow from '../../../static/header/backArrow.png'
import other from '../../../static/header/other.png'
import circlebar from '../../../components/circleBarChart'
export default{
data(){
return{
titleStr:'节假日活动对比',
leftImg:backArrow,
rightImg:other,
atoken:'',
keyArr:[],
chartIds:'',
reportType:'mall',
accountId:[],
orgIds:'',
date:'',
isDay:true,
isHour:false,
isMin:false,
chartDatas:{},
chartDatas2:{},
chartData:{},
tableData:[],
tableData2:[],
columns:[],
columns2:[],
gateId:[],
floorId:[],
storeId:[]
}
},
onLoad: function (option) {
if(option.types){
this.reportType=option.types;
}
uni.getStorage({
key:'atoken',
success:(res)=>{
this.atoken=res.data;
}
})
uni.getStorage({
key:'accountList',
success:(res)=>{
if(res.data){
var list=JSON.parse(res.data);
list.forEach((item,index)=>{
if(index==0){
this.accountId.push(item.id)
}
})
}
}
})
uni.getStorage({
key:'selectAccountIdArr',
success:(res)=> {
this.accountId=JSON.parse(res.data);
},
complete: (res) => {
}
})
uni.getStorage({
key:'selectGateIdArr',
success:(res)=> {
this.gateId=JSON.parse(res.data);
},
complete: (res) => {
}
})
uni.getStorage({
key:'selectFloorIdArr',
success:(res)=> {
this.floorId=JSON.parse(res.data);
},
complete: (res) => {
}
})
uni.getStorage({
key:'selectStoreIdArr',
success:(res)=> {
this.storeId=JSON.parse(res.data);
},
complete: (res) => {
}
})
var currentYear=[]
uni.getStorage({
key:'currentYear',
success:(res)=> {
currentYear=JSON.parse(res.data);
},
complete: (res) => {
}
})
var a1=0;
if(currentYear[0].index){
a1=currentYear[0].index;
}else{
a1=currentYear[0];
}
var from='',to='';
var year =1999+a1;
from=year+'-01-01';
to=year+'-12-31';
this.date=from+','+to;
uni.getStorage({
key:'selectDate',
success:(res)=> {
if(res.data.indexOf(',')!=-1){
this.date=res.data;
}else{
uni.setStorage({
key:'selectDate',
data:this.date
})
}
},
complete: (res) => {
}
})
this.getReportKey();
},
computed: {
i18n() {
return this.$t("index")
}
},
components:{
headerComp,circlebar
},
methods: {
backFun(){
uni.reLaunch({
url:"../index",
})
},
conditionFun(){
uni.setStorage({
key:'backUrl',
data:6
})
uni.navigateTo({
url:'../condition'
})
},
getReportKey(){
var report='holidayeEvent';
this.keyArr=['HolidayEvent','HolidayDetail','HolidayEffect'];
uni.showLoading({
title: '加载中'
});
uni.request({
url:window.url+'/reportCharts',
data:{
report:report,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success:(res) =>{
this.chartIds='';
res.data.data.forEach(item=>{
if(this.keyArr.indexOf(item.key)!='-1'){
this.chartIds+=item.id+','
}
})
this.chartIds=this.chartIds.substring(0,this.chartIds.length-1);
this.getChartData();
}
})
},
setTabelData(){
this.columns=[];
this.tableData=[];
this.chartDatas.xaxis.data.forEach((item,index)=>{
if(index==0){
this.columns.push( {field: item, title:item, width: 100, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
}else{
this.columns.push( {field: item, title:item, width: 80, titleAlign: 'center',columnAlign:'center',isResize:true})
}
})
this.chartDatas.series.forEach((item,index)=>{
var obj={}
item.data.forEach((item,index)=>{
obj[this.chartDatas.xaxis.data[index]]=item;
})
this.tableData.push(obj)
})
this.columns2=[];
this.tableData2=[];
this.chartDatas2.xaxis.data.forEach((item,index)=>{
if(index==0){
this.columns2.push( {field: item, title:item, width: 100, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
}else{
this.columns2.push( {field: item, title:item, width: 80, titleAlign: 'center',columnAlign:'center',isResize:true})
}
})
this.chartDatas2.series.forEach((item,index)=>{
var obj={}
item.data.forEach((item,index)=>{
obj[this.chartDatas2.xaxis.data[index]]=item;
})
this.tableData2.push(obj)
})
},
getChartData(){
this.orgIds=''
var data={}
var url=window.url+'/report/holidayeEvent/mall';
if(this.reportType=='mall'){
this.orgIds=this.accountId[0]
url=window.url+'/report/holidayeEvent/mall';
data={
orgIds:this.orgIds,
startDate:this.date.split(',')[0],
endDate:this.date.split(',')[1],
chartIds:this.chartIds,
kpiType:'TRAFFIC',
_t:Date.parse(new Date())/1000
}
}
uni.request({
url:url,
header: {
'Authorization': this.atoken //自定义请求头信息
},
data:data,
method:'GET',
success:(res) =>{
uni.hideLoading()
var datas=res.data.data;
this.chartData=datas.body;
this.chartDatas=datas.body.HolidayDetail;
this.chartDatas2=datas.body.HolidayEvent
this.setTabelData()
}
})
}
},
}
</script>
<style>
.selectBox{
width: 646.73upx;
height: 61.59upx;
font-size:21.74upx;
line-height: 61.59upx;
display: flex;
flex-direction: row;
margin: 0 auto;
margin-bottom: 18.11upx;
}
.sItem{
flex: 1;
background:#FFFFFF;
text-align: center;
cursor: pointer;
border-right:1px solid #DBDBDB ;
}
.sItem:last-of-type{
border-right:none
}
.checkedItem{
background: #0069FF;
color: #FFFFFF;
border: #0069FF;
}
</style>
......@@ -2,7 +2,7 @@
<div>
<headerComp :title="titleStr"></headerComp>
<div class="listBox">
<view class="itemBox" v-for="item in listData" @tap="goReport(item.src)">
<view class="itemBox" v-for="item in listData" @tap="goReport(item.src,item.showList)">
<img class="icons" :src="item.iconSrc"/>
<span class="texts">{{item.text}}</span>
<img class="arrows" :src="item.rArrow" alt=""/>
......@@ -38,17 +38,306 @@
text:"基础统计",
iconSrc:baseIcon,
rArrow:arrow,
src:'staticReport/staticDayReport'
src:'staticReport/staticDayReport',
showList:{
gateTab:true,
mall:{
obj:false,
oneMall:false,
moreMall:true,
event:false
},
gate:{
obj:false,
oneMall:true,
moreMall:false,
oneGate:false,
moreGate:true
},
floor:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:false,
moreFloor:true
},
area:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false,
oneStore:false,
moreStore:true
},
date:{
day:true,
week:true,
month:true,
year:true
}
}
},{
text:"进出客流对比",
iconSrc:inout,
rArrow:arrow,
src:'inoutReport/inoutDayReport'
src:'inoutReport/inoutDayReport',
showList:{
gateTab:true,
mall:{
obj:false,
oneMall:false,
moreMall:true,
event:false
},
gate:{
obj:false,
oneMall:true,
moreMall:false,
oneGate:false,
moreGate:true
},
floor:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:false,
moreFloor:true
},
area:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false,
oneStore:false,
moreStore:true
},
date:{
day:true,
week:false,
month:false,
year:false
}
}
},{
text:"排行榜统计",
iconSrc:rank,
rArrow:arrow,
src:'rankReport/rankDayReport'
src:'rankReport/rankDayReport',
showList:{
gateTab:true,
mall:{
obj:false,
oneMall:false,
moreMall:true,
event:false
},
gate:{
obj:false,
oneMall:true,
moreMall:false,
oneGate:false,
moreGate:true
},
floor:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:false,
moreFloor:true
},
area:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false,
oneStore:false,
moreStore:true
},
date:{
day:true,
week:true,
month:true,
year:true
}
}
},{
text:"同环比分析",
iconSrc:yoy,
rArrow:arrow,
src:'yoyReport/yoyDayReport',
showList:{
gateTab:true,
mall:{
obj:true,
oneMall:true,
moreMall:false,
event:false
},
gate:{
obj:true,
oneMall:true,
moreMall:false,
oneGate:true,
moreGate:false
},
floor:{
obj:true,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false
},
area:{
obj:true,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false,
oneStore:true,
moreStore:false
},
date:{
day:true,
week:true,
month:true,
year:true
}
}
},
{
text:"时段客流分布",
iconSrc:timeFlow,
rArrow:arrow,
src:'timeFlowReport/timeFlowReport',
showList:{
gateTab:true,
mall:{
obj:false,
oneMall:true,
moreMall:false,
event:false
},
gate:{
obj:false,
oneMall:true,
moreMall:false,
oneGate:true,
moreGate:false
},
floor:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false
},
area:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false,
oneStore:true,
moreStore:false
},
date:{
day:false,
week:true,
month:true,
year:true
}
}
},
{
text:"节假日活动对比",
iconSrc:active,
rArrow:arrow,
src:'holidayReport/holidayReport',
showList:{
gateTab:false,
mall:{
obj:false,
oneMall:true,
moreMall:false,
event:false
},
gate:{
obj:false,
oneMall:true,
moreMall:false,
oneGate:true,
moreGate:false
},
floor:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false
},
area:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false,
oneStore:true,
moreStore:false
},
date:{
day:false,
week:false,
month:false,
year:true
}
}
},
{
text:"同节日对象对比",
iconSrc:identical,
rArrow:arrow,
src:'actObjReport/actObjReport',
showList:{
gateTab:false,
mall:{
obj:false,
oneMall:false,
moreMall:true,
event:true
},
gate:{
obj:false,
oneMall:true,
moreMall:false,
oneGate:false,
moreGate:true
},
floor:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:false,
moreFloor:true
},
area:{
obj:false,
oneMall:true,
moreMall:false,
oneFloor:true,
moreFloor:false,
oneStore:false,
moreStore:true
},
date:{
day:false,
week:false,
month:false,
year:true
}
}
}
// ,{
// text:"同环比分析",
......@@ -59,10 +348,6 @@
// iconSrc:mainStore,
// rArrow:arrow
// },{
// text:"时段客流分布",
// iconSrc:timeFlow,
// rArrow:arrow
// },{
// text:"周中周末对比分析",
// iconSrc:week,
// rArrow:arrow
......@@ -71,14 +356,6 @@
// iconSrc:weather,
// rArrow:arrow
// },{
// text:"节假日活动对比",
// iconSrc:active,
// rArrow:arrow
// },{
// text:"同节日对象对比",
// iconSrc:identical,
// rArrow:arrow
// },{
// text:"进店率统计",
// iconSrc:storeRate,
// rArrow:arrow
......@@ -91,6 +368,12 @@
}
},
onLoad: function (option) {
uni.removeStorage({
key: 'showList',
success: function (res) {
console.log('success');
}
});
this.initDate();
},
computed: {
......@@ -102,7 +385,11 @@
headerComp
},
methods: {
goReport(url){
goReport(url,list){
uni.setStorage({
key:'showList',
data:JSON.stringify(list)
})
uni.navigateTo({
url:url,
animationType: 'slide-in-right',
......
......@@ -160,10 +160,6 @@
key:'backUrl',
data:2
})
uni.setStorage({
key:'allShow',
data:'false'
})
uni.navigateTo({
url:'../condition'
})
......@@ -206,14 +202,14 @@
this.chartDatas.xaxis.data.forEach((item,index)=>{
if(index==0){
oneArr.push({fields:[item],title:item,titleAlign:'center',rowspan:2})
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
this.columns.push( {field: item, title:item, width: 100, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
}else{
var headArr=eval(item);
oneArr.push({fields:[headArr[0]+headArr[1],headArr[0]+headArr[2]],title:headArr[0],titleAlign:'center',colspan:2});
twoArr.push( {fields: [headArr[0]+headArr[1]], title:headArr[1], width: 20, titleAlign: 'center'})
twoArr.push( {fields: [headArr[0]+headArr[2]], title:headArr[2], width: 20, titleAlign: 'center'})
this.columns.push( {field: headArr[0]+headArr[1], title:headArr[1], width: 20, titleAlign: 'center',columnAlign:'center',isResize:true})
this.columns.push( {field: headArr[0]+headArr[2], title:headArr[2], width: 20, titleAlign: 'center',columnAlign:'center',isResize:true})
this.columns.push( {field: headArr[0]+headArr[1], title:headArr[1], width: 60, titleAlign: 'center',columnAlign:'center',isResize:true})
this.columns.push( {field: headArr[0]+headArr[2], title:headArr[2], width: 60, titleAlign: 'center',columnAlign:'center',isResize:true})
}
})
this.titleRows.push(oneArr)
......
......@@ -173,10 +173,6 @@
key:'backUrl',
data:3
})
uni.setStorage({
key:'allShow',
data:'true'
})
uni.navigateTo({
url:'../condition'
})
......
......@@ -173,10 +173,6 @@
key:'backUrl',
data:3
})
uni.setStorage({
key:'allShow',
data:'true'
})
uni.navigateTo({
url:'../condition'
})
......@@ -213,18 +209,16 @@
setTabelData(){
this.columns=[];
this.tableData=[];
this.columns.push({field: '名称', title:'名称', width: 20, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
this.chartDatas.xaxis.data.forEach((item,index)=>{
if(index==0){
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
}else{
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true})
}
})
this.chartDatas.series.forEach((item,index)=>{
var obj={}
item.data.forEach((item,index)=>{
obj[this.chartDatas.xaxis.data[index]]=item;
})
obj['名称']=item.name;
this.tableData.push(obj)
})
},
......
......@@ -173,10 +173,6 @@
key:'backUrl',
data:1
})
uni.setStorage({
key:'allShow',
data:'true'
})
uni.navigateTo({
url:'../condition'
})
......@@ -215,9 +211,9 @@
this.tableData=[];
this.chartDatas.xaxis.data.forEach((item,index)=>{
if(index==0){
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
this.columns.push( {field: item, title:item, width: 100, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
}else{
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true})
this.columns.push( {field: item, title:item, width: 80, titleAlign: 'center',columnAlign:'center',isResize:true})
}
})
this.chartDatas.series.forEach((item,index)=>{
......@@ -242,6 +238,7 @@
orgIds:this.orgIds,
date:this.date,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='gate'){
......@@ -254,6 +251,7 @@
orgIds:this.orgIds,
date:this.date,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='floor'){
......@@ -266,6 +264,7 @@
orgIds:this.orgIds,
date:this.date,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='area'){
......@@ -278,6 +277,7 @@
orgIds:this.orgIds,
date:this.date,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}
......
......@@ -173,10 +173,6 @@
key:'backUrl',
data:1
})
uni.setStorage({
key:'allShow',
data:'true'
})
uni.navigateTo({
url:'../condition'
})
......@@ -215,9 +211,9 @@
this.tableData=[];
this.chartDatas.xaxis.data.forEach((item,index)=>{
if(index==0){
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
this.columns.push( {field: item, title:item, width: 100, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
}else{
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true})
this.columns.push( {field: item, title:item, width: 80, titleAlign: 'center',columnAlign:'center',isResize:true})
}
})
console.log(JSON.stringify(this.columns))
......@@ -246,6 +242,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='gate'){
......@@ -261,6 +258,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='floor'){
......@@ -276,6 +274,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='area'){
......@@ -291,6 +290,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}
......
......@@ -173,10 +173,6 @@
key:'backUrl',
data:1
})
uni.setStorage({
key:'allShow',
data:'true'
})
uni.navigateTo({
url:'../condition'
})
......@@ -215,9 +211,9 @@
this.tableData=[];
this.chartDatas.xaxis.data.forEach((item,index)=>{
if(index==0){
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
this.columns.push( {field: item, title:item, width: 100, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
}else{
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true})
this.columns.push( {field: item, title:item, width: 80, titleAlign: 'center',columnAlign:'center',isResize:true})
}
})
console.log(JSON.stringify(this.columns))
......@@ -246,6 +242,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='gate'){
......@@ -261,6 +258,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='floor'){
......@@ -276,6 +274,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='area'){
......@@ -291,6 +290,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}
......
......@@ -173,10 +173,6 @@
key:'backUrl',
data:1
})
uni.setStorage({
key:'allShow',
data:'true'
})
uni.navigateTo({
url:'../condition'
})
......@@ -215,9 +211,9 @@
this.tableData=[];
this.chartDatas.xaxis.data.forEach((item,index)=>{
if(index==0){
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
this.columns.push( {field: item, title:item, width: 100, titleAlign: 'center',columnAlign:'center',isResize:true,isFrozen: true})
}else{
this.columns.push( {field: item, title:item, width: 20, titleAlign: 'center',columnAlign:'center',isResize:true})
this.columns.push( {field: item, title:item, width: 80, titleAlign: 'center',columnAlign:'center',isResize:true})
}
})
console.log(JSON.stringify(this.columns))
......@@ -246,6 +242,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='gate'){
......@@ -261,6 +258,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='floor'){
......@@ -276,6 +274,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='area'){
......@@ -291,6 +290,7 @@
startDate:startDate,
endDate: endDate,
chartIds:this.chartIds,
option:'TAB_TABLE',
_t:Date.parse(new Date())/1000
}
}
......
<template>
<div>
<headerComp :leftImgSrc="leftImg" :title="titleStr" :rightImgSrc="rightImg" @leftClick="backFun" @rightClick="conditionFun"></headerComp>
<div style="height: 18.11upx;"></div>
<timechart :chart-data="chartDatas.TimeThermodynamic" bind-id='TimeThermodynamic'></timechart>
</div>
</template>
<script>
import headerComp from '../../../components/header'
import backArrow from '../../../static/header/backArrow.png'
import other from '../../../static/header/other.png'
import tables from '../../../components/table'
import timechart from '../../../components/timeChart'
export default{
data(){
return{
titleStr:'时段客流分布',
leftImg:backArrow,
rightImg:other,
atoken:'',
keyArr:[],
chartIds:'',
reportType:'mall',
accountId:[],
orgIds:'',
date:'',
isDay:true,
isHour:false,
isMin:false,
chartDatas:{},
gateId:[],
floorId:[],
storeId:[],
objId:'one'
}
},
onLoad: function (option) {
if(option.types){
this.reportType=option.types;
}
uni.getStorage({
key:'objId',
success:(res)=>{
this.objId=JSON.parse(res.data)[0];
console.log(this.objId)
}
})
uni.getStorage({
key:'atoken',
success:(res)=>{
this.atoken=res.data;
}
})
uni.getStorage({
key:'accountList',
success:(res)=>{
if(res.data){
var list=JSON.parse(res.data);
list.forEach((item,index)=>{
if(index==0){
this.accountId.push(item.id)
}
})
}
}
})
uni.getStorage({
key:'selectAccountIdArr',
success:(res)=> {
this.accountId=JSON.parse(res.data);
},
complete: (res) => {
}
})
uni.getStorage({
key:'selectGateIdArr',
success:(res)=> {
this.gateId=JSON.parse(res.data);
},
complete: (res) => {
}
})
uni.getStorage({
key:'selectFloorIdArr',
success:(res)=> {
this.floorId=JSON.parse(res.data);
},
complete: (res) => {
}
})
uni.getStorage({
key:'selectStoreIdArr',
success:(res)=> {
this.storeId=JSON.parse(res.data);
},
complete: (res) => {
}
})
var currentWeek=[]
uni.getStorage({
key:'currentWeek',
success:(res)=> {
currentWeek=JSON.parse(res.data);
},
complete: (res) => {
}
})
var a1=0,a2=0,a3=0;
if(currentWeek[0].index){
a1=currentWeek[0].index;
a2=currentWeek[1].index;
a3=currentWeek[2].index;
}else{
a1=currentWeek[0];
a2=currentWeek[1];
a3=currentWeek[2];
}
var year =1999+a1;
var month=a2+1;
month=month>9?month:'0'+month;
var d = new Date();
// 该月第一天
d.setFullYear(year, month-1, 1);
var w1 = d.getDay();
// 该月天数
d.setFullYear(year, month, 0);
var dd = d.getDate();
// 第一个周一
let week1;
//当月第一周有几天
week1=7 - w1+1;
var from='',to='';
if(a3==0){
from=year+"-"+month+"-01";
var toDay=week1>9?week1:'0'+week1;
to=year+'-'+month+'-'+toDay
}else{
var fromDay=week1+7*(a3-1)+1;
var toDay=week1+7*a3;
if(fromDay>dd){
for(var i=(a3-1);i>=0;i--){
fromDay=week1+7*(i-1);
toDay=week1+7*i;
if(fromDay<=dd){
if(toDay>dd){
toDay=dd;
}
break;
}
}
}else if(fromDay<=dd&&toDay>dd){
toDay=dd;
}
fromDay=fromDay>9?fromDay:'0'+fromDay;
toDay=toDay>9?toDay:'0'+toDay;
from=year+"-"+month+"-"+fromDay;
to=year+"-"+month+"-"+toDay;
}
this.date=from+','+to;
uni.getStorage({
key:'selectDate',
success:(res)=> {
if(res.data.indexOf(',')!=-1){
this.date=res.data;
}else{
console.log(this.date)
uni.setStorage({
key:'selectDate',
data:this.date
})
}
},
complete: (res) => {
}
})
this.getReportKey();
},
computed: {
i18n() {
return this.$t("index")
}
},
components:{
headerComp,tables,timechart
},
methods: {
backFun(){
uni.reLaunch({
url:"../index",
})
},
conditionFun(){
uni.setStorage({
key:'backUrl',
data:5
})
uni.navigateTo({
url:'../condition'
})
},
getReportKey(){
var report='TimeThermodynamic';
this.keyArr=['TimeThermodynamic'];
uni.showLoading({
title: '加载中'
});
uni.request({
url:window.url+'/reportCharts',
data:{
report:report,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success:(res) =>{
this.chartIds='';
res.data.data.forEach(item=>{
if(this.keyArr.indexOf(item.key)!='-1'){
this.chartIds+=item.id+','
}
})
this.chartIds=this.chartIds.substring(0,this.chartIds.length-1);
this.getChartData();
}
})
},
getChartData(){
this.orgIds=''
var data={}
var url=window.url+'/report/thermodynamic/mall';
var startDate='';
var endDate='';
startDate=this.date.split(',')[0];
endDate=this.date.split(',')[1];
if(this.reportType=='mall'){
this.orgIds=this.accountId[0];
url=window.url+'/report/thermodynamic/mall';
data={
orgIds:this.orgIds,
startDate:startDate,
endDate:endDate,
chartIds:this.chartIds,
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='gate'){
this.orgIds=this.gateId[0];
url=window.url+'/report/thermodynamic/gate';
data={
orgIds:this.orgIds,
startDate:startDate,
endDate:endDate,
chartIds:this.chartIds,
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='floor'){
this.floorId.forEach(item=>{
this.orgIds+=item+','
})
this.orgIds=this.orgIds.substring(0,this.orgIds.length-1)
url=window.url+'/report/thermodynamic/floor';
data={
orgIds:this.orgIds,
startDate:startDate,
endDate:endDate,
chartIds:this.chartIds,
_t:Date.parse(new Date())/1000
}
}else if(this.reportType=='area'){
this.storeId.forEach(item=>{
this.orgIds+=item+','
})
this.orgIds=this.orgIds.substring(0,this.orgIds.length-1)
url=window.url+'/report/thermodynamic/zone';
data={
orgIds:this.orgIds,
startDate:startDate,
endDate:endDate,
chartIds:this.chartIds,
_t:Date.parse(new Date())/1000
}
}
uni.request({
url:url,
header: {
'Authorization': this.atoken //自定义请求头信息
},
data:data,
method:'GET',
success:(res) =>{
uni.hideLoading()
var datas=res.data.data;
this.chartDatas=datas.body;
}
})
}
},
}
</script>
<style>
.selectBox{
width: 646.73upx;
height: 61.59upx;
font-size:21.74upx;
line-height: 61.59upx;
display: flex;
flex-direction: row;
margin: 0 auto;
margin-bottom: 18.11upx;
}
.sItem{
flex: 1;
background:#FFFFFF;
text-align: center;
cursor: pointer;
border-right:1px solid #DBDBDB ;
}
.sItem:last-of-type{
border-right:none
}
.checkedItem{
background: #0069FF;
color: #FFFFFF;
border: #0069FF;
}
</style>
<template>
<view>
<headerComp :leftImgSrc="leftSrc" @leftClick="backClick" :title="titleStr"></headerComp>
<searchBox @handleEvent="searchFun"></searchBox>
<view class="list">
<view class="listItem" @tap="itemFun(item)" v-for="item in list">
<text>{{item.name}}</text>
</view>
</view>
<!-- <uni-list>
<uni-list-item :title="this.$t('index').allStore" @click="selectStore(id)"></uni-list-item>
<uni-list-item :title="item.name" @click="selectStore(item.id,item.name)" v-for="item in list"></uni-list-item>
</uni-list> -->
</view>
</template>
<script>
import headerComp from '../../components/header'
import searchBox from '../../components/search'
export default{
data(){
return{
aa:"aa",
leftSrc:'../../static/header/backArrow.png',
titleStr:this.$t('index').storeSelect,
id:'',
atoken:'',
list:[],
allList:[],
accountName:'',
url:'',
selectSrc:'../../static/list/select.png',
unSelectSrc:'../../static/list/unselect.png',
selectIdArr:[],
selectNameArr:[],
type:'',
showList:{}
}
},
onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
// this.atoken=option.atoken;
// this.id=option.accountId;
this.url=option.url;
this.type=option.type;
uni.getStorage({
key:'showList',
success:(res)=>{
this.showList=JSON.parse(res.data)
}
})
uni.getStorage({
key:'accountName',
success:(res)=>{
this.accountName=res.data;
}
})
uni.getStorage({
key:'accountId',
success:(res)=>{
this.id=res.data;
}
})
uni.getStorage({
key:'atoken',
success:(res)=>{
this.atoken=res.data;
}
})
this.getListData();
},
computed: {
i18n(){
return this.$t('index')
}
},
components:{
headerComp,searchBox
},
methods: {
searchFun(val){
this.list=[];
this.allList.forEach(item=>{
if(item.name.indexOf(val)!=-1){
this.list.push(item)
}
})
},
itemFun(item){
this.selectIdArr=[];
this.selectNameArr=[]
this.selectNameArr.push(item.name)
this.selectIdArr.push(item.id)
this.confirmFun();
},
confirmFun(){
uni.setStorage({
key:'eventIdArr',
data:JSON.stringify(this.selectIdArr)
})
uni.setStorage({
key:'eventNameArr',
data:JSON.stringify(this.selectNameArr)
})
uni.reLaunch({
url:this.url+'?type='+this.type,
})
},
getListData(){
var mallid='';
var year=''
uni.getStorage({
key:"selectAccountIdArr",
success: (res) => {
mallid=JSON.parse(res.data)[0];
}
})
uni.getStorage({
key:"selectDate",
success: (res) => {
year=res.data.split(',')[0];
}
})
uni.request({
url:window.url+'/events/getEvent',
data:{
mallId:mallid,
year:year,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success:(res) =>{
this.allList=JSON.parse(JSON.stringify(res.data.data));
this.list=JSON.parse(JSON.stringify(res.data.data));
}
})
},
backClick() {
uni.navigateBack({
delta:1
})
}
},
}
</script>
<style>
.listItem{
border-bottom: 1px solid #979797;
height: 72.46upx;
line-height: 72.46upx;
font-size: 25.37upx;
background: #FFFFFF;
position: relative;
}
.listItem>image{
width: 28.99upx;
height: 28.99upx;
position: absolute;
top:23.55upx;
left: 25.36upx;
}
.listItem text{
margin-left: 77.89upx;
}
</style>
<template>
<view>
<headerComp :leftImgSrc="leftSrc" @leftClick="backClick" :title="titleStr"></headerComp>
<searchBox @handleEvent="searchFun"></searchBox>
<view class="list">
<view class="listItem" @tap="itemFun(item)" v-for="item in list">
<text>{{item.name}}</text>
</view>
</view>
<!-- <uni-list>
<uni-list-item :title="this.$t('index').allStore" @click="selectStore(id)"></uni-list-item>
<uni-list-item :title="item.name" @click="selectStore(item.id,item.name)" v-for="item in list"></uni-list-item>
</uni-list> -->
</view>
</template>
<script>
import headerComp from '../../components/header'
import searchBox from '../../components/search'
export default{
data(){
return{
aa:"aa",
leftSrc:'../../static/header/backArrow.png',
titleStr:'选择对象',
id:'',
atoken:'',
list:[],
allList:[],
accountName:'',
url:'',
selectSrc:'../../static/list/select.png',
unSelectSrc:'../../static/list/unselect.png',
selectIdArr:[],
selectNameArr:[],
type:''
}
},
onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
// this.atoken=option.atoken;
// this.id=option.accountId;
this.url=option.url;
this.type=option.type;
this.getListData();
},
computed: {
i18n(){
return this.$t('index')
}
},
components:{
headerComp,searchBox
},
methods: {
searchFun(val){
this.list=[];
this.allList.forEach(item=>{
if(item.name.indexOf(val)!=-1){
this.list.push(item)
}
})
},
itemFun(item){
this.selectIdArr=[];
this.selectNameArr=[]
this.selectNameArr.push(item.name)
this.selectIdArr.push(item.id)
this.confirmFun();
},
confirmFun(){
uni.setStorage({
key:'objId',
data:JSON.stringify(this.selectIdArr)
})
uni.setStorage({
key:'objName',
data:JSON.stringify(this.selectNameArr)
})
uni.reLaunch({
url:this.url+'?type='+this.type,
})
},
getListData(){
this.allList=[{
name:"单对象",
id:"one"
},{
name:"多对象",
id:"more"
}];
this.list=[{
name:"单对象",
id:"one"
},{
name:"多对象",
id:"more"
}];
},
backClick() {
uni.navigateBack({
delta:1
})
}
},
}
</script>
<style>
.listItem{
border-bottom: 1px solid #979797;
height: 72.46upx;
line-height: 72.46upx;
font-size: 25.37upx;
background: #FFFFFF;
position: relative;
}
.listItem>image{
width: 28.99upx;
height: 28.99upx;
position: absolute;
top:23.55upx;
left: 25.36upx;
}
.listItem text{
margin-left: 77.89upx;
}
</style>
......@@ -34,7 +34,8 @@
unSelectSrc:'../../static/list/unselect.png',
selectIdArr:[],
selectNameArr:[],
type:''
type:'',
showList:{}
}
},
onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
......@@ -43,6 +44,12 @@
this.url=option.url;
this.type=option.type;
uni.getStorage({
key:'showList',
success:(res)=>{
this.showList=JSON.parse(res.data)
}
})
uni.getStorage({
key:'accountName',
success:(res)=>{
this.accountName=res.data;
......@@ -106,14 +113,6 @@
})
},
getListData(){
uni.getStorage({
key:'accountList',
success:(res)=>{
this.allList=JSON.parse(res.data);
this.list=JSON.parse(res.data);
}
})
var mallid='';
uni.getStorage({
key:"selectAccountIdArr",
......@@ -135,16 +134,17 @@
method:'GET',
success:(res) =>{
this.allList=JSON.parse(JSON.stringify(res.data.data));
this.list=JSON.parse(JSON.stringify(res.data.data));
if(!this.showList['floor']['obj']){
this.allList.unshift({
name:'全部',
id:'all'
})
this.list=JSON.parse(JSON.stringify(res.data.data));
this.list.unshift({
name:'全部',
id:'all'
})
}
}
})
},
backClick() {
......
<template>
<view>
<headerComp :leftImgSrc="leftSrc" @leftClick="backClick" :title="titleStr"></headerComp>
<searchBox @handleEvent="searchFun"></searchBox>
<view class="list">
<view class="listItem" @tap="itemFun(item)" v-for="item in list">
<text>{{item.name}}</text>
</view>
</view>
<!-- <uni-list>
<uni-list-item :title="this.$t('index').allStore" @click="selectStore(id)"></uni-list-item>
<uni-list-item :title="item.name" @click="selectStore(item.id,item.name)" v-for="item in list"></uni-list-item>
</uni-list> -->
</view>
</template>
<script>
import headerComp from '../../components/header'
import searchBox from '../../components/search'
export default{
data(){
return{
aa:"aa",
leftSrc:'../../static/header/backArrow.png',
titleStr:this.$t('index').storeSelect,
id:'',
atoken:'',
list:[],
allList:[],
accountName:'',
url:'',
selectSrc:'../../static/list/select.png',
unSelectSrc:'../../static/list/unselect.png',
selectIdArr:[],
selectNameArr:[],
type:''
}
},
onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
// this.atoken=option.atoken;
// this.id=option.accountId;
this.url=option.url;
this.type=option.type;
uni.getStorage({
key:'accountName',
success:(res)=>{
this.accountName=res.data;
}
})
uni.getStorage({
key:'accountId',
success:(res)=>{
this.id=res.data;
}
})
uni.getStorage({
key:'atoken',
success:(res)=>{
this.atoken=res.data;
}
})
this.getListData();
},
computed: {
i18n(){
return this.$t('index')
}
},
components:{
headerComp,searchBox
},
methods: {
searchFun(val){
this.list=[];
this.allList.forEach(item=>{
if(item.name.indexOf(val)!=-1){
this.list.push(item)
}
})
},
itemFun(item){
this.selectIdArr=[];
this.selectNameArr=[]
this.selectNameArr.push(item.name)
this.selectIdArr.push(item.id)
this.confirmFun();
},
confirmFun(){
uni.removeStorage({
key: 'selectStoreNameArr',
success: function (res) {
console.log('success');
}
});
uni.setStorage({
key:'selectGateIdArr',
data:JSON.stringify(this.selectIdArr)
})
uni.setStorage({
key:'selectGateNameArr',
data:JSON.stringify(this.selectNameArr)
})
uni.reLaunch({
url:this.url+'?type='+this.type,
})
},
getListData(){
uni.getStorage({
key:'accountList',
success:(res)=>{
this.allList=JSON.parse(res.data);
this.list=JSON.parse(res.data);
}
})
var mallid='';
uni.getStorage({
key:"selectAccountIdArr",
success: (res) => {
mallid=JSON.parse(res.data)[0];
}
})
uni.request({
url:window.url+'/gates',
data:{
accountId: this.id,
mallId:mallid,
status: 1,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success:(res) =>{
this.allList=JSON.parse(JSON.stringify(res.data.data));
this.list=JSON.parse(JSON.stringify(res.data.data));
if(!this.showList['gate']['obj']){
this.allList.unshift({
name:'全部',
})
this.list.unshift({
name:'全部',
id:'all'
})
}
}
})
},
backClick() {
uni.navigateBack({
delta:1
})
}
},
}
</script>
<style>
.listItem{
border-bottom: 1px solid #979797;
height: 72.46upx;
line-height: 72.46upx;
font-size: 25.37upx;
background: #FFFFFF;
position: relative;
}
.listItem>image{
width: 28.99upx;
height: 28.99upx;
position: absolute;
top:23.55upx;
left: 25.36upx;
}
.listItem text{
margin-left: 77.89upx;
}
</style>
<template>
<view>
<headerComp :leftImgSrc="leftSrc" @leftClick="backClick" :title="titleStr"></headerComp>
<searchBox @handleEvent="searchFun"></searchBox>
<view class="list">
<view class="listItem" @tap="itemFun(item)" v-for="item in list">
<text>{{item.name}}</text>
</view>
</view>
<!-- <uni-list>
<uni-list-item :title="this.$t('index').allStore" @click="selectStore(id)"></uni-list-item>
<uni-list-item :title="item.name" @click="selectStore(item.id,item.name)" v-for="item in list"></uni-list-item>
</uni-list> -->
</view>
</template>
<script>
import headerComp from '../../components/header'
import searchBox from '../../components/search'
export default{
data(){
return{
aa:"aa",
leftSrc:'../../static/header/backArrow.png',
titleStr:this.$t('index').storeSelect,
id:'',
atoken:'',
list:[],
allList:[],
accountName:'',
url:'',
selectSrc:'../../static/list/select.png',
unSelectSrc:'../../static/list/unselect.png',
selectIdArr:[],
selectNameArr:[],
type:'',
showList:{}
}
},
onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
// this.atoken=option.atoken;
// this.id=option.accountId;
this.url=option.url;
this.type=option.type;
uni.getStorage({
key:'showList',
success:(res)=>{
this.showList=JSON.parse(res.data)
}
})
uni.getStorage({
key:'accountName',
success:(res)=>{
this.accountName=res.data;
}
})
uni.getStorage({
key:'accountId',
success:(res)=>{
this.id=res.data;
}
})
uni.getStorage({
key:'atoken',
success:(res)=>{
this.atoken=res.data;
}
})
this.getListData();
},
computed: {
i18n(){
return this.$t('index')
}
},
components:{
headerComp,searchBox
},
methods: {
searchFun(val){
this.list=[];
this.allList.forEach(item=>{
if(item.name.indexOf(val)!=-1){
this.list.push(item)
}
})
},
itemFun(item){
this.selectIdArr=[];
this.selectNameArr=[]
this.selectNameArr.push(item.name)
this.selectIdArr.push(item.id)
this.confirmFun();
},
confirmFun(){
uni.setStorage({
key:'selectStoreIdArr',
data:JSON.stringify(this.selectIdArr)
})
uni.setStorage({
key:'selectStoreNameArr',
data:JSON.stringify(this.selectNameArr)
})
uni.reLaunch({
url:this.url+'?type='+this.type,
})
},
getListData(){
uni.getStorage({
key:'accountList',
success:(res)=>{
this.allList=JSON.parse(res.data);
this.list=JSON.parse(res.data);
}
})
var mallid='';
uni.getStorage({
key:"selectAccountIdArr",
success: (res) => {
mallid=JSON.parse(res.data)[0];
}
})
var floorid='';
uni.getStorage({
key:"selectFloorIdArr",
success: (res) => {
floorid=JSON.parse(res.data)[0];
}
})
uni.request({
url:window.url+'/zones',
data:{
accountId: this.id,
mallId:mallid,
floorId:floorid,
status: 1,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success:(res) =>{
this.allList=JSON.parse(JSON.stringify(res.data.data));
this.list=JSON.parse(JSON.stringify(res.data.data));
}
})
},
backClick() {
uni.navigateBack({
delta:1
})
}
},
}
</script>
<style>
.listItem{
border-bottom: 1px solid #979797;
height: 72.46upx;
line-height: 72.46upx;
font-size: 25.37upx;
background: #FFFFFF;
position: relative;
}
.listItem>image{
width: 28.99upx;
height: 28.99upx;
position: absolute;
top:23.55upx;
left: 25.36upx;
}
.listItem text{
margin-left: 77.89upx;
}
</style>
......@@ -29,6 +29,20 @@
}
},
onLoad() {
console.log('aaa')
uni.getStorage({
key:'user',
success: (res) => {
console.log(res)
this.username=res.data;
}
})
uni.getStorage({
key:'pwd',
success: (res) => {
this.password=res.data;
}
})
this.getDate()
this.dateArr()
},
......@@ -183,16 +197,34 @@
password:this.password
},
method:'POST',
success(res) {
success:(res)=> {
uni.hideLoading();
var data=res.data;
if(data.code==200){
Object.keys(window.localStorage).forEach(item => {
if(item!='user'&&item!='pwd'){
uni.removeStorage({
key: item,
success: function (res) {
}
});
}
})
uni.setStorage({
key:'user',
data:this.username
})
uni.setStorage({
key:'pwd',
data:this.password
})
this.atoken=data.data.atoken;
this.id=data.data.user.accountId
uni.request({
url:window.url+'/malls',
data:{
accountId:this.id,
status:1,
_t:Date.parse(new Date())/1000
},
header: {
......
......@@ -61,7 +61,13 @@
},
clearCache() {
Object.keys(window.localStorage).forEach(item => {
window.localStorage.removeItem(item)
if(item!='user'&&item!='pwd'){
uni.removeStorage({
key: item,
success: function (res) {
}
});
}
})
}
},
......
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>智慧商业6.0</title><link rel=stylesheet href=https://unpkg.com/vue-easytable/umd/css/index.css><script src=https://unpkg.com/vue/dist/vue.js></script><script src=https://unpkg.com/vue-easytable/umd/js/index.js></script><script src=static/common.js></script><script>document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})</script><link rel=stylesheet href=/appweb/static/index.css><link href=/appweb/static/js/pages-analysis-condition.c6bad10e.js rel=prefetch><link href=/appweb/static/js/pages-analysis-index.58b5238c.js rel=prefetch><link href=/appweb/static/js/pages-analysis-inoutReport-inoutDayReport.d77c4e32.js rel=prefetch><link href=/appweb/static/js/pages-analysis-rankReport-rankDayReport.06c1c5aa.js rel=prefetch><link href=/appweb/static/js/pages-analysis-rankReport-rankWeekReport.273c4132.js rel=prefetch><link href=/appweb/static/js/pages-analysis-staticReport-staticDayReport.9787e524.js rel=prefetch><link href=/appweb/static/js/pages-analysis-staticReport-staticMonthReport.9cc82807.js rel=prefetch><link href=/appweb/static/js/pages-analysis-staticReport-staticWeekReport.cc1b9218.js rel=prefetch><link href=/appweb/static/js/pages-analysis-staticReport-staticYearReport.8892aab3.js rel=prefetch><link href=/appweb/static/js/pages-index-index.411e1229.js rel=prefetch><link href=/appweb/static/js/pages-list-floorList.b8902ab3.js rel=prefetch><link href=/appweb/static/js/pages-list-floorList~pages-list-mallList.f83c189c.js rel=prefetch><link href=/appweb/static/js/pages-list-mallList.eff90261.js rel=prefetch><link href=/appweb/static/js/pages-list-moreFloorList.6aed2968.js rel=prefetch><link href=/appweb/static/js/pages-list-moreGateList.ade2178b.js rel=prefetch><link href=/appweb/static/js/pages-list-moreMallList.7753462d.js rel=prefetch><link href=/appweb/static/js/pages-list-moreStoreList.80136219.js rel=prefetch><link href=/appweb/static/js/pages-list-oneFloorList.6bfb7f76.js rel=prefetch><link href=/appweb/static/js/pages-list-oneMallList.95181e70.js rel=prefetch><link href=/appweb/static/js/pages-login-login.e654a8cd.js rel=prefetch><link href=/appweb/static/js/pages-passenger-index.36b2f28d.js rel=prefetch><link href=/appweb/static/js/pages-profile-index.5daf406b.js rel=prefetch><link href=/appweb/static/js/chunk-vendors.895813db.js rel=preload as=script><link href=/appweb/static/js/index.f6621918.js rel=preload as=script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/appweb/static/js/chunk-vendors.895813db.js></script><script src=/appweb/static/js/index.f6621918.js></script></body></html>
\ No newline at end of file
})</script><link rel=stylesheet href=/appweb/static/index.css><link href=/appweb/static/js/pages-analysis-condition.e9bd80f2.js rel=prefetch><link href=/appweb/static/js/pages-analysis-index.58b5238c.js rel=prefetch><link href=/appweb/static/js/pages-analysis-inoutReport-inoutDayReport.d77c4e32.js rel=prefetch><link href=/appweb/static/js/pages-analysis-rankReport-rankDayReport.06c1c5aa.js rel=prefetch><link href=/appweb/static/js/pages-analysis-rankReport-rankWeekReport.273c4132.js rel=prefetch><link href=/appweb/static/js/pages-analysis-staticReport-staticDayReport.9787e524.js rel=prefetch><link href=/appweb/static/js/pages-analysis-staticReport-staticMonthReport.9cc82807.js rel=prefetch><link href=/appweb/static/js/pages-analysis-staticReport-staticWeekReport.cc1b9218.js rel=prefetch><link href=/appweb/static/js/pages-analysis-staticReport-staticYearReport.8892aab3.js rel=prefetch><link href=/appweb/static/js/pages-index-index.411e1229.js rel=prefetch><link href=/appweb/static/js/pages-list-floorList.b8902ab3.js rel=prefetch><link href=/appweb/static/js/pages-list-floorList~pages-list-mallList.f83c189c.js rel=prefetch><link href=/appweb/static/js/pages-list-mallList.eff90261.js rel=prefetch><link href=/appweb/static/js/pages-list-moreFloorList.6aed2968.js rel=prefetch><link href=/appweb/static/js/pages-list-moreGateList.ade2178b.js rel=prefetch><link href=/appweb/static/js/pages-list-moreMallList.7753462d.js rel=prefetch><link href=/appweb/static/js/pages-list-moreStoreList.80136219.js rel=prefetch><link href=/appweb/static/js/pages-list-oneFloorList.6bfb7f76.js rel=prefetch><link href=/appweb/static/js/pages-list-oneMallList.95181e70.js rel=prefetch><link href=/appweb/static/js/pages-login-login.e654a8cd.js rel=prefetch><link href=/appweb/static/js/pages-passenger-index.36b2f28d.js rel=prefetch><link href=/appweb/static/js/pages-profile-index.aded5936.js rel=prefetch><link href=/appweb/static/js/chunk-vendors.895813db.js rel=preload as=script><link href=/appweb/static/js/index.fb66af39.js rel=preload as=script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/appweb/static/js/chunk-vendors.895813db.js></script><script src=/appweb/static/js/index.fb66af39.js></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-profile-index"],{2205:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{navheight:0}},created:function(){var t=this;uni.getStorage({key:"statusBarH",success:function(e){e.data&&(t.navheight=e.data)}})},props:{leftText:{type:String,default:""},rightText:{type:String,default:""},leftImgSrc:{type:String,default:""},rightImgSrc:{type:String,default:""},title:{type:String,default:""}},methods:{rClick:function(){this.$emit("rightClick")},lClick:function(){this.$emit("leftClick")}}};e.default=a},"291b":function(t,e,i){"use strict";i.r(e);var a=i("3955"),n=i.n(a);for(var o in a)"default"!==o&&function(t){i.d(e,t,function(){return a[t]})}(o);e["default"]=n.a},3595:function(t,e,i){e=t.exports=i("2350")(!1),e.push([t.i,".indexNav[data-v-fc06f43a]{height:%?77.89?%;line-height:%?77.89?%;text-align:center;background:#0069ff;position:fixed;font-size:%?33?%;color:#fff;width:100%;z-index:9}.blanks[data-v-fc06f43a]{height:%?77.89?%}.left[data-v-fc06f43a]{float:left;font-size:%?25.37?%;display:inline-block;height:%?77.89?%;line-height:%?77.89?%;padding-left:%?23.55?%}.right[data-v-fc06f43a]{position:absolute;font-size:%?25.37?%;display:inline-block;height:%?77.89?%;line-height:%?77.89?%;right:%?21.73?%}.lImg[data-v-fc06f43a]{width:%?12.68?%;height:%?23.55?%;float:left;position:relative;top:%?27.17?%}.rImg[data-v-fc06f43a]{width:%?28.98?%;height:%?28.98?%;top:%?27.17?%;right:%?18.12?%;position:absolute}",""])},3955:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(i("ce42")),n=r(i("d448")),o=r(i("a718"));function r(t){return t&&t.__esModule?t:{default:t}}var l={onLoad:function(t){console.log(t)},components:{headerComp:a.default},data:function(){return{titleStr:"我的",backArrow:n.default,rArrow:o.default}},methods:{switchConnect:function(){this.$message.confirm('<div class="dialog-content" style="color: #333; font-size: 17px;text-align: center;">确认切换该服务器地址?</div>',function(t,e){},[{className:"dialog-btn",label:"取消",callback:function(t,e){return!0}},{className:"dialog-btn",label:"确定",callback:function(t,e){console.log(t,e)}}],"提示")},logoutHandle:function(){Object.keys(window.localStorage).forEach(function(t){window.localStorage.removeItem(t)}),uni.reLaunch({url:"../login/login"})}}};e.default=l},4407:function(t,e,i){"use strict";i.r(e);var a=i("2205"),n=i.n(a);for(var o in a)"default"!==o&&function(t){i.d(e,t,function(){return a[t]})}(o);e["default"]=n.a},"4d4a":function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",[i("headerComp",{attrs:{title:t.titleStr}}),i("v-uni-view",{staticStyle:{height:"25.36upx"}}),i("v-uni-view",{staticClass:"profile-item",on:{click:function(e){e=t.$handleEvent(e),t.switchConnect(e)}}},[i("span",{staticClass:"texts"},[t._v("切换服务器地址")]),i("img",{staticClass:"arrows",attrs:{src:t.rArrow,alt:""}})]),i("v-uni-view",{staticClass:"profile-item"},[i("span",{staticClass:"texts"},[t._v("修改密码")]),i("img",{staticClass:"arrows",attrs:{src:t.rArrow,alt:""}})]),i("v-uni-view",{staticClass:"logout"},[i("v-uni-button",{staticClass:"primary logout-btn",attrs:{type:"primary"},on:{click:function(e){e=t.$handleEvent(e),t.logoutHandle(e)}}},[t._v("退出登录")])],1)],1)},n=[];i.d(e,"a",function(){return a}),i.d(e,"b",function(){return n})},"7cd4":function(t,e,i){"use strict";var a=i("9f6a"),n=i.n(a);n.a},8192:function(t,e,i){e=t.exports=i("2350")(!1),e.push([t.i,".profile-item[data-v-0738b88a]{background:#fff;position:relative}.texts[data-v-0738b88a]{display:block;height:%?90.57?%;line-height:%?90.57?%;margin-left:%?23.55?%;font-size:%?28.98?%;color:#333;border-bottom:%?1.81?% solid hsla(0,0%,59.2%,.2);-webkit-box-sizing:border-box;box-sizing:border-box}.profile-item:last-of-type .texts[data-v-0738b88a]{border-bottom:none}.arrows[data-v-0738b88a]{width:%?14.49?%;height:%?25.36?%;position:absolute;right:%?23.55?%;top:%?32.6?%}.logout[data-v-0738b88a]{margin-top:%?255.43?%;padding:0 %?41.66?%}.logout-btn[data-v-0738b88a]{background-color:rgba(0,0,0,0);border:1px solid #0069ff;color:#0069ff;border-radius:%?41.66?%}",""])},"9f6a":function(t,e,i){var a=i("3595");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("5f4529cb",a,!0,{sourceMap:!1,shadowMode:!1})},a718:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAcCAYAAAEfNg+MAAAABGdBTUEAALGPC/xhBQAAArNJREFUOBGNlE1rE1EUhpPJJNqotRAXwZjPRREEF4KCiNDWagt24UKwC/+Bf0qwKGKhYBULLkRXKoIiiFJtPpqEpIYoSZAYYojPmeSMd5o0eGFyPt73vOfm3Dvjy+fzd3y6stls3/H7/X7Ql8vlZhQZYx2yWyEET2BWuECxWJxyA/RfmiyLIAhaMJOyi2ckv0vSrwjJB+zxuq0JglW/33/RiaVDoVA44wbQU8oUwS1hYL+5ScMxm7xAdw7dSjqdPmlwvC5KG0PFH4K4CiYNpQDEPyMEgEMAvwWwLOtcKpV67yjUarVjrVarKUAwGJyNx+NfxZflp18DOw1wCqDsZM0fISAbNXOmL9OepnelXC7HTUB96zhLgk6ns8s4MwqotSKRSDMcDh+VRK/X26HdaQXFSgtfNBr9xQSnxKfdZ67AWfFleQYFGEKhI4Bt2+cTicQ7D0EASDakrvgM65LTQgJdtJIRr0kMeW1Egbk8ArvJ08hkMjMeAuAmwAoqdY78BL7PvWOAz4kXefYA3ck6CoCvAC7zlJD1TFQO6w3ABWRzVI5OUkCe7XEg+X/HLQFrm2NfGHvsA3zk16J1kuzbITLb7XZLDDLLkxphj0m4Yxreyqdw5M/qKg135N5QBdS6ApqQbwG7eEwsI9W1FwgEriSTyU+aUDsioADHLC/QOvGK5uQAea7Ky+Tm1DnIIhRE6D64XA9dDYSWOZnXB+5AmWoRknf9LvFtzSGS+y8Bim2+yvewq1qMbXHdlyYKUBCi8CH2hhbS9ScDvSYvk+TGCrDVw2AbFC5rIbbGkS5yyT4aOa9AtVo90m63n1A4pyQ6VvAXGNgXzZnW2UG9Xp9uNptbFA4+2QPGLlud5+yzZsF+3892pXBJATruhEKh+VgsVtTcJGtTsCmdsR8g3mKr1UkF+7G/C+1UeAo9hYIAAAAASUVORK5CYII="},b409:function(t,e,i){var a=i("8192");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("dda60c1e",a,!0,{sourceMap:!1,shadowMode:!1})},c1c7:function(t,e,i){"use strict";var a=i("b409"),n=i.n(a);n.a},ce42:function(t,e,i){"use strict";i.r(e);var a=i("f0fa"),n=i("4407");for(var o in n)"default"!==o&&function(t){i.d(e,t,function(){return n[t]})}(o);i("7cd4");var r=i("2877"),l=Object(r["a"])(n["default"],a["a"],a["b"],!1,null,"fc06f43a",null);e["default"]=l.exports},d448:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAaCAYAAAHwCF3KAAAABGdBTUEAALGPC/xhBQAAANtJREFUOBHtVDsOwjAMDTvXoUdiZWBB4lIcgp25B2DvxmjeM7HlBEeCAQkkLLV23nt2nE9byosmInPBa1E9AvHEfuCS2SUxaOSR0Bis53twcxnoNZ4jgRVfBOB2jNUIKGOAeRCPggbQE3wiUrCqOTtNO4iVPAb5nmjU7YSSWy9rAcpPbAC2MUw9gA8QbKI1nRpztWgdgTxTkJIEv0hwHTbZE2iaW8ubQsvvdUyCKCYwsT2sKGb8Gwn5mSdrOWE9ZuMvpU+sG8GvRy9RrfAvILJPfxLZBtomwh/wXO6bsa0ZxbdJWQAAAABJRU5ErkJggg=="},ef6f:function(t,e,i){"use strict";i.r(e);var a=i("4d4a"),n=i("291b");for(var o in n)"default"!==o&&function(t){i.d(e,t,function(){return n[t]})}(o);i("c1c7");var r=i("2877"),l=Object(r["a"])(n["default"],a["a"],a["b"],!1,null,"0738b88a",null);e["default"]=l.exports},f0fa:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",[i("div",{style:{height:t.navheight+"px",background:"#0069FF"}}),i("v-uni-view",{staticClass:"indexNav"},[i("v-uni-text",{staticClass:"left",on:{click:function(e){e=t.$handleEvent(e),t.lClick(e)}}},[t._v(t._s(t.leftText))]),i("v-uni-image",{staticClass:"lImg",attrs:{src:t.leftImgSrc},on:{click:function(e){e=t.$handleEvent(e),t.lClick(e)}}}),t._v(t._s(t.title)),i("span",{staticClass:"right",on:{click:function(e){e=t.$handleEvent(e),t.rClick(e)}}},[t._v(t._s(t.rightText))]),i("v-uni-image",{staticClass:"rImg",attrs:{src:t.rightImgSrc},on:{click:function(e){e=t.$handleEvent(e),t.rClick(e)}}})],1),i("v-uni-view",{staticClass:"blanks"})],1)},n=[];i.d(e,"a",function(){return a}),i.d(e,"b",function(){return n})}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-profile-index"],{2205:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{navheight:0}},created:function(){var t=this;uni.getStorage({key:"statusBarH",success:function(e){e.data&&(t.navheight=e.data)}})},props:{leftText:{type:String,default:""},rightText:{type:String,default:""},leftImgSrc:{type:String,default:""},rightImgSrc:{type:String,default:""},title:{type:String,default:""}},methods:{rClick:function(){this.$emit("rightClick")},lClick:function(){this.$emit("leftClick")}}};e.default=a},"291b":function(t,e,i){"use strict";i.r(e);var a=i("3955"),n=i.n(a);for(var o in a)"default"!==o&&function(t){i.d(e,t,function(){return a[t]})}(o);e["default"]=n.a},3595:function(t,e,i){e=t.exports=i("2350")(!1),e.push([t.i,".indexNav[data-v-fc06f43a]{height:%?77.89?%;line-height:%?77.89?%;text-align:center;background:#0069ff;position:fixed;font-size:%?33?%;color:#fff;width:100%;z-index:9}.blanks[data-v-fc06f43a]{height:%?77.89?%}.left[data-v-fc06f43a]{float:left;font-size:%?25.37?%;display:inline-block;height:%?77.89?%;line-height:%?77.89?%;padding-left:%?23.55?%}.right[data-v-fc06f43a]{position:absolute;font-size:%?25.37?%;display:inline-block;height:%?77.89?%;line-height:%?77.89?%;right:%?21.73?%}.lImg[data-v-fc06f43a]{width:%?12.68?%;height:%?23.55?%;float:left;position:relative;top:%?27.17?%}.rImg[data-v-fc06f43a]{width:%?28.98?%;height:%?28.98?%;top:%?27.17?%;right:%?18.12?%;position:absolute}",""])},3955:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(i("ce42")),n=r(i("d448")),o=r(i("a718"));function r(t){return t&&t.__esModule?t:{default:t}}var l={onLoad:function(t){console.log(t)},components:{headerComp:a.default},data:function(){return{titleStr:"我的",backArrow:n.default,rArrow:o.default}},methods:{switchConnect:function(){this.$message.confirm('<div class="dialog-content" style="color: #333; font-size: 17px;text-align: center;">确认切换该服务器地址?</div>',function(t,e){},[{className:"dialog-btn",label:"取消",callback:function(t,e){return!0}},{className:"dialog-btn",label:"确定",callback:function(t,e){this.clearCache(),model.switchConnectType()}}],"提示")},logoutHandle:function(){this.clearCache(),uni.reLaunch({url:"../login/login"})},clearCache:function(){Object.keys(window.localStorage).forEach(function(t){window.localStorage.removeItem(t)})}}};e.default=l},4407:function(t,e,i){"use strict";i.r(e);var a=i("2205"),n=i.n(a);for(var o in a)"default"!==o&&function(t){i.d(e,t,function(){return a[t]})}(o);e["default"]=n.a},"5f28":function(t,e,i){e=t.exports=i("2350")(!1),e.push([t.i,".profile-item[data-v-ba6e4802]{background:#fff;position:relative}.texts[data-v-ba6e4802]{display:block;height:%?90.57?%;line-height:%?90.57?%;margin-left:%?23.55?%;font-size:%?28.98?%;color:#333;border-bottom:%?1.81?% solid hsla(0,0%,59.2%,.2);-webkit-box-sizing:border-box;box-sizing:border-box}.profile-item:last-of-type .texts[data-v-ba6e4802]{border-bottom:none}.arrows[data-v-ba6e4802]{width:%?14.49?%;height:%?25.36?%;position:absolute;right:%?23.55?%;top:%?32.6?%}.logout[data-v-ba6e4802]{margin-top:%?255.43?%;padding:0 %?41.66?%}.logout-btn[data-v-ba6e4802]{background-color:rgba(0,0,0,0);border:1px solid #0069ff;color:#0069ff;border-radius:%?41.66?%}",""])},"7cd4":function(t,e,i){"use strict";var a=i("9f6a"),n=i.n(a);n.a},"7f7d":function(t,e,i){var a=i("5f28");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("79402f48",a,!0,{sourceMap:!1,shadowMode:!1})},"9f6a":function(t,e,i){var a=i("3595");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("5f4529cb",a,!0,{sourceMap:!1,shadowMode:!1})},a718:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAcCAYAAAEfNg+MAAAABGdBTUEAALGPC/xhBQAAArNJREFUOBGNlE1rE1EUhpPJJNqotRAXwZjPRREEF4KCiNDWagt24UKwC/+Bf0qwKGKhYBULLkRXKoIiiFJtPpqEpIYoSZAYYojPmeSMd5o0eGFyPt73vOfm3Dvjy+fzd3y6stls3/H7/X7Ql8vlZhQZYx2yWyEET2BWuECxWJxyA/RfmiyLIAhaMJOyi2ckv0vSrwjJB+zxuq0JglW/33/RiaVDoVA44wbQU8oUwS1hYL+5ScMxm7xAdw7dSjqdPmlwvC5KG0PFH4K4CiYNpQDEPyMEgEMAvwWwLOtcKpV67yjUarVjrVarKUAwGJyNx+NfxZflp18DOw1wCqDsZM0fISAbNXOmL9OepnelXC7HTUB96zhLgk6ns8s4MwqotSKRSDMcDh+VRK/X26HdaQXFSgtfNBr9xQSnxKfdZ67AWfFleQYFGEKhI4Bt2+cTicQ7D0EASDakrvgM65LTQgJdtJIRr0kMeW1Egbk8ArvJ08hkMjMeAuAmwAoqdY78BL7PvWOAz4kXefYA3ck6CoCvAC7zlJD1TFQO6w3ABWRzVI5OUkCe7XEg+X/HLQFrm2NfGHvsA3zk16J1kuzbITLb7XZLDDLLkxphj0m4Yxreyqdw5M/qKg135N5QBdS6ApqQbwG7eEwsI9W1FwgEriSTyU+aUDsioADHLC/QOvGK5uQAea7Ky+Tm1DnIIhRE6D64XA9dDYSWOZnXB+5AmWoRknf9LvFtzSGS+y8Bim2+yvewq1qMbXHdlyYKUBCi8CH2hhbS9ScDvSYvk+TGCrDVw2AbFC5rIbbGkS5yyT4aOa9AtVo90m63n1A4pyQ6VvAXGNgXzZnW2UG9Xp9uNptbFA4+2QPGLlud5+yzZsF+3892pXBJATruhEKh+VgsVtTcJGtTsCmdsR8g3mKr1UkF+7G/C+1UeAo9hYIAAAAASUVORK5CYII="},ce42:function(t,e,i){"use strict";i.r(e);var a=i("f0fa"),n=i("4407");for(var o in n)"default"!==o&&function(t){i.d(e,t,function(){return n[t]})}(o);i("7cd4");var r=i("2877"),l=Object(r["a"])(n["default"],a["a"],a["b"],!1,null,"fc06f43a",null);e["default"]=l.exports},d448:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAaCAYAAAHwCF3KAAAABGdBTUEAALGPC/xhBQAAANtJREFUOBHtVDsOwjAMDTvXoUdiZWBB4lIcgp25B2DvxmjeM7HlBEeCAQkkLLV23nt2nE9byosmInPBa1E9AvHEfuCS2SUxaOSR0Bis53twcxnoNZ4jgRVfBOB2jNUIKGOAeRCPggbQE3wiUrCqOTtNO4iVPAb5nmjU7YSSWy9rAcpPbAC2MUw9gA8QbKI1nRpztWgdgTxTkJIEv0hwHTbZE2iaW8ubQsvvdUyCKCYwsT2sKGb8Gwn5mSdrOWE9ZuMvpU+sG8GvRy9RrfAvILJPfxLZBtomwh/wXO6bsa0ZxbdJWQAAAABJRU5ErkJggg=="},ef6f:function(t,e,i){"use strict";i.r(e);var a=i("fe3d"),n=i("291b");for(var o in n)"default"!==o&&function(t){i.d(e,t,function(){return n[t]})}(o);i("ef74");var r=i("2877"),l=Object(r["a"])(n["default"],a["a"],a["b"],!1,null,"ba6e4802",null);e["default"]=l.exports},ef74:function(t,e,i){"use strict";var a=i("7f7d"),n=i.n(a);n.a},f0fa:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",[i("div",{style:{height:t.navheight+"px",background:"#0069FF"}}),i("v-uni-view",{staticClass:"indexNav"},[i("v-uni-text",{staticClass:"left",on:{click:function(e){e=t.$handleEvent(e),t.lClick(e)}}},[t._v(t._s(t.leftText))]),i("v-uni-image",{staticClass:"lImg",attrs:{src:t.leftImgSrc},on:{click:function(e){e=t.$handleEvent(e),t.lClick(e)}}}),t._v(t._s(t.title)),i("span",{staticClass:"right",on:{click:function(e){e=t.$handleEvent(e),t.rClick(e)}}},[t._v(t._s(t.rightText))]),i("v-uni-image",{staticClass:"rImg",attrs:{src:t.rightImgSrc},on:{click:function(e){e=t.$handleEvent(e),t.rClick(e)}}})],1),i("v-uni-view",{staticClass:"blanks"})],1)},n=[];i.d(e,"a",function(){return a}),i.d(e,"b",function(){return n})},fe3d:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",[i("headerComp",{attrs:{title:t.titleStr}}),i("v-uni-view",{staticStyle:{height:"25.36upx"}}),i("v-uni-view",{staticClass:"profile-item",on:{click:function(e){e=t.$handleEvent(e),t.switchConnect(e)}}},[i("span",{staticClass:"texts"},[t._v("切换服务器地址")]),i("img",{staticClass:"arrows",attrs:{src:t.rArrow,alt:""}})]),i("v-uni-view",{staticClass:"profile-item"},[i("span",{staticClass:"texts"},[t._v("修改密码")]),i("img",{staticClass:"arrows",attrs:{src:t.rArrow,alt:""}})]),i("v-uni-view",{staticClass:"logout"},[i("v-uni-button",{staticClass:"primary logout-btn",attrs:{type:"primary"},on:{click:function(e){e=t.$handleEvent(e),t.logoutHandle(e)}}},[t._v("退出登录")])],1)],1)},n=[];i.d(e,"a",function(){return a}),i.d(e,"b",function(){return n})}}]);
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!