Commit c433a2f7 by 夏新然

交接

1 parent a68e0eb1
......@@ -60,7 +60,21 @@
backgroundColor: '#fff',
color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"],
tooltip:{
renderMode:'richText'
padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
},
grid: {
left:uni.upx2px(76.08),
......
......@@ -59,7 +59,21 @@
},
color: ['#3BB8FF', '#87D14B', '#6784E3'],
tooltip:{
renderMode:'richText'
padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
},
grid: {
left:uni.upx2px(76.08),
......
......@@ -60,7 +60,21 @@
backgroundColor: '#fff',
color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"],
tooltip:{
renderMode:'richText'
padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
},
grid: {
left:uni.upx2px(76.08),
......@@ -173,7 +187,7 @@
legendObj.icon="emptyCircle"
option.legend.data.push(legendObj);
item.symbol="emptyCircle";
item.symbolSize=uni.upx2px(12.7)
item.symbolSize=uni.upx2px(18.7)
})
}
option.xAxis.data =JSON.parse(JSON.stringify(this.chartData.xaxis.data));
......
......@@ -61,7 +61,21 @@
backgroundColor: '#fff',
color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"],
tooltip:{
renderMode:'richText'
padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
},
grid: {
left:uni.upx2px(76.08),
......@@ -136,7 +150,6 @@
},
series:this.chartData.series
}
if(this.chartData.series.length>1){
this.chartData.series.forEach((item,index)=>{
var legendObj = {};
if(index<2){
......@@ -147,19 +160,20 @@
legendObj.name = item.name;
legendObj.icon="emptyCircle"
option.legend.data.push(legendObj);
item.areaStyle={
color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: option.color[index]
}, {
offset: 1,
color: '#fff'
}])
if(this.chartData.series.length>1){
item.areaStyle={
color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: option.color[index]
}, {
offset: 1,
color: '#fff'
}])
}
}
item.symbol="emptyCircle";
item.symbolSize=uni.upx2px(12.7)
item.symbolSize=uni.upx2px(18.7)
})
}
if(this.chartData.xaxis.data){
option.xAxis.data = this.chartData.xaxis.data;
}else{
......
......@@ -94,7 +94,21 @@
backgroundColor: '#fff',
color: ["#0069FF", "#3BB8FF", "#6784e3", "#ff9631", "#ffc62e","#7460ee","#eb6100"],
tooltip:{
renderMode:'richText'
padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
},
grid: {
left:uni.upx2px(76.08),
......@@ -168,7 +182,6 @@
},
series:this.chartData.series
}
if(this.chartData.series.length>1){
this.chartData.series.forEach((item,index)=>{
var legendObj = {};
if(index<2){
......@@ -179,19 +192,21 @@
legendObj.name = item.name;
legendObj.icon="emptyCircle"
option.legend.data.push(legendObj);
item.areaStyle={
color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: option.color[index]
}, {
offset: 1,
color: '#fff'
}])
if(this.chartData.series.length>1){
item.areaStyle={
color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: option.color[index]
}, {
offset: 1,
color: '#fff'
}])
}
}
item.symbol="emptyCircle";
item.symbolSize=uni.upx2px(12.7)
item.symbolSize=uni.upx2px(18.7)
})
}
console.log(option)
option.xAxis.data = this.chartData.xaxis.data;
// myChart.clear();
setTimeout(() => {
......
......@@ -58,7 +58,21 @@
}
},
tooltip:{
renderMode:'richText'
padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
},
color: ["#3BB8FF", "#FFC62E", "#87D14B", "#FFC62E", "#FF9631"],
grid: {
......
......@@ -59,7 +59,21 @@
}
},
tooltip:{
renderMode:'richText'
padding:[5,15],
position: function(pos, params, dom, rect, size){
var obj={};
if(pos[0]+size.contentSize[0]>size.viewSize[0]){
obj['right']=size.viewSize[0]-pos[0]
}else{
obj['left']=pos[0]
}
if(pos[1]+size.contentSize[1]>size.viewSize[1]){
obj['bottom']=size.viewSize[1]-pos[1]
}else{
obj['top']=pos[1]
}
return obj;
},
},
grid: {
left:uni.upx2px(76.08),
......
......@@ -116,7 +116,7 @@
a1=currentYear[0];
}
var from='',to='';
var year =1999+a1;
var year =new Date().getFullYear()-15+a1;
from=year+'-01-01';
to=year+'-12-31';
this.date=from+','+to;
......
......@@ -941,7 +941,7 @@
this.handleWeek2Confirm(item)
},
handleDayConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var day =item[2].index+1;
month=month>9?month:'0'+month;
......@@ -952,14 +952,17 @@
key:'selectDate',
data:this.date
})
var arr=[];
item.forEach(res=>{
arr.push(res.index)
})
uni.setStorage({
key:'currentDay',
data:JSON.stringify(item)
data:JSON.stringify(arr)
})
console.log(item)
},
handleWeekConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
month=month>9?month:'0'+month;
var d = new Date();
......@@ -1012,7 +1015,7 @@
})
},
handleWeek2Confirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
month=month>9?month:'0'+month;
var d = new Date();
......@@ -1065,7 +1068,7 @@
})
},
handleMonthConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1;
......@@ -1097,7 +1100,7 @@
},
handleYearConfirm(item){
var from='',to='';
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01';
to=year+'-12-31';
this.date=from+','+to;
......
......@@ -129,7 +129,7 @@
a1=currentYear[0];
}
var from='',to='';
var year =1999+a1;
var year =new Date().getFullYear()-15+a1;
from=year+'-01-01';
to=year+'-12-31';
this.date=from+','+to;
......
......@@ -116,7 +116,7 @@
a2=currentWeek[1];
a3=currentWeek[2];
}
var year =1999+a1;
var year =new Date().getFullYear()-15+a1;
var month=a2+1;
month=month>9?month:'0'+month;
var d = new Date();
......
......@@ -115,7 +115,7 @@
a2=currentWeek[1];
a3=currentWeek[2];
}
var year =1999+a1;
var year =new Date().getFullYear()-15+a1;
var month=a2+1;
month=month>9?month:'0'+month;
var d = new Date();
......
......@@ -294,7 +294,7 @@
}
})
uni.getStorage({
key:'orgIds',
key:'accountId',
success:(res)=>{
this.orgIds=res.data;
}
......@@ -340,7 +340,7 @@
}
},
handleDayConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var day =item[2].index+1;
month=month>9?month:'0'+month;
......@@ -351,7 +351,7 @@
this.getReportKey();
},
handleWeekConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
month=month>9?month:'0'+month;
var d = new Date();
......@@ -399,7 +399,7 @@
this.getReportKey();
},
handleMonthConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1;
......@@ -426,7 +426,7 @@
},
handleYearConfirm(item){
var from='',to='';
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01';
to=year+'-12-31';
this.reportType='month';
......
......@@ -345,7 +345,7 @@
},
methods: {
handleDayConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var day =item[2].index+1;
month=month>9?month:'0'+month;
......@@ -356,7 +356,7 @@
this.getReportKey();
},
handleWeekConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
month=month>9?month:'0'+month;
var d = new Date();
......@@ -404,7 +404,7 @@
this.getReportKey();
},
handleMonthConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1;
......@@ -431,7 +431,7 @@
},
handleYearConfirm(item){
var from='',to='';
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01';
to=year+'-12-31';
this.reportType='month';
......
......@@ -3,7 +3,7 @@
<accountindex v-if="type=='account'"></accountindex>
<mallindex v-else-if="type=='mall'"></mallindex>
<floorindex v-else-if="type=='floor'"></floorindex>
<zoneindex v-else-if="type=='zone'"></zoneindex>
<zoneindex v-else-if="type=='shop'"></zoneindex>
</view>
</template>
......
......@@ -300,12 +300,6 @@
}
})
uni.getStorage({
key:'orgIds',
success:(res)=>{
this.orgIds=res.data;
}
})
uni.getStorage({
key:'orgName',
success:(res)=>{
this.title=res.data;
......@@ -332,12 +326,50 @@
})
},
mounted(){
this.getReportKey();
this.initFresh();
uni.getStorage({
key:'orgIds',
success:(res)=>{
this.orgIds=res.data;
this.getReportKey();
this.initFresh();
},
complete:(res)=>{
if(!res.data){
uni.getStorage({
key:'accountId',
success:(res)=>{
uni.request({
url: window.url + '/malls',
data:{
accountId:res.data,
status:1,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success:(res) =>{
if(res.data.data[0]){
this.orgIds=res.data.data[0].id;
uni.setStorage({
key:'orgIds',
data:this.orgIds
})
this.getReportKey();
this.initFresh();
}
}
})
}
})
}
}
})
},
methods: {
handleDayConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var day =item[2].index+1;
month=month>9?month:'0'+month;
......@@ -348,7 +380,7 @@
this.getReportKey();
},
handleWeekConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
month=month>9?month:'0'+month;
var d = new Date();
......@@ -396,7 +428,7 @@
this.getReportKey();
},
handleMonthConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1;
......@@ -423,7 +455,7 @@
},
handleYearConfirm(item){
var from='',to='';
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01';
to=year+'-12-31';
this.reportType='month';
......
......@@ -72,14 +72,20 @@
data:id
})
if(id==this.id){
uni.setStorage({
key:'type',
data:'account'
})
uni.setStorage({
key:'orgName',
data:this.accountName
uni.getStorage({
key:'homes',
success:(res)=>{
uni.setStorage({
key:'type',
data:res.data
})
uni.setStorage({
key:'orgName',
data:this.accountName
})
}
})
}else{
uni.setStorage({
key:'type',
......
......@@ -340,7 +340,7 @@
},
methods: {
handleDayConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var day =item[2].index+1;
month=month>9?month:'0'+month;
......@@ -351,7 +351,7 @@
this.getReportKey();
},
handleWeekConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
month=month>9?month:'0'+month;
var d = new Date();
......@@ -399,7 +399,7 @@
this.getReportKey();
},
handleMonthConfirm(item){
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
var month=item[1].index+1;
var currentYear=new Date().getFullYear();
var currentMonth=new Date().getMonth()+1;
......@@ -426,7 +426,7 @@
},
handleYearConfirm(item){
var from='',to='';
var year =1999+item[0].index;
var year =new Date().getFullYear()-15+item[0].index;
from=year+'-01-01';
to=year+'-12-31';
this.reportType='month';
......
......@@ -67,18 +67,25 @@
console.log(e);
},
selectStore(id,name){
uni.setStorage({
key:'orgIds',
data:id
})
if(id==this.id&&name=='all'){
uni.setStorage({
key:'type',
data:'account'
})
uni.setStorage({
key:'orgName',
data:this.accountName
uni.getStorage({
key:'homes',
success:(res)=>{
if(res.data=='account'){
uni.setStorage({
key:'orgIds',
data:id
})
}
uni.setStorage({
key:'type',
data:res.data
})
uni.setStorage({
key:'orgName',
data:this.accountName
})
}
})
}else{
uni.setStorage({
......@@ -89,6 +96,10 @@
key:'orgName',
data:name
})
uni.setStorage({
key:'orgIds',
data:id
})
}
uni.reLaunch({
url:this.url,
......
......@@ -71,7 +71,9 @@
getDate(){
var dayData=[];
var obj={};
for(var i=1999;i<2020;i++){
var lastyears=new Date().getFullYear()+4;
var firtyears=new Date().getFullYear()-15;
for(var i=firtyears;i<lastyears;i++){
obj={
'value':i+'年',
'children':[]
......@@ -112,7 +114,9 @@
var weekData=[];
var currentWeek=[];
var currentDay=[];
for(var i=1999;i<2020;i++){
var lastyears=new Date().getFullYear()+4;
var firtyears=new Date().getFullYear()-15;
for(var i=firtyears;i<lastyears;i++){
yearArr.push(i+'年')
}
yearData.push(yearArr)
......@@ -133,7 +137,7 @@
const date = new Date();
var year = date.getFullYear();
var yearIndex=year-1999
var yearIndex=year-firtyears;
currentYear.push(yearIndex);
var monthIndex = date.getMonth();
......@@ -189,6 +193,18 @@
if(item.children){
this.constructorData(item.children)
}
if(item.name=='home'){
if(item.children[0]){
uni.setStorage({
key:'homes',
data:item.children[0].name
})
uni.setStorage({
key:'type',
data:item.children[0].name
})
}
}
this.list.push({name:item.name})
})
},
......@@ -309,7 +325,7 @@
method:'GET',
success:(res) =>{
this.constructorData(res.data.menu_tree)
localStorage.setItem('menus',JSON.stringify(this.list))
localStorage.setItem('menus',JSON.stringify(this.list));
uni.request({
url: window.url + "/accounts",
data:{
......@@ -369,14 +385,6 @@
key:'accountId',
data:data.data.user.accountId
})
uni.setStorage({
key:'orgIds',
data:data.data.user.accountId
})
uni.setStorage({
key:'type',
data:'account'
})
}else{
uni.showToast({
icon:'none',
......@@ -441,12 +449,14 @@
top: 16.3upx;
}
.userInput{
position: relative;
display: inline-block;
font-size: 30.79upx;
top: 9.05upx;
left:54.34upx;
}
.pwdInput{
position: relative;
display: inline-block;
font-size: 30.79upx;
top: 9.05upx;
......
......@@ -70,7 +70,8 @@
//window.parent.childToParent();
var chanid = localStorage.getItem('channelId');
//var chanid='FL00179K07:1';
var serveip = "store.keliuyun.com";
// var serveip = "47.94.37.10:39401";
var serveip = "video.keliuyun.com"
var account = "storeVideo";
var pwd = "Vion2019";
var tk = ""; // 用来保存登录时获取的token,并作为申请预览时的url附带参数
......@@ -162,7 +163,7 @@
};
// ajax post方式发送请求
ajaxPost(localStorage.getItem('url')+"../../../../webapi/login",param,function(res){
ajaxPost("https://"+ serveip +":18443/webapi/login",param,function(res){
if (res.ret == 0) {
tk = res.tk
} else{
......@@ -176,23 +177,17 @@
"chan_serial": chanid // 获取预览的url接口,只需要通道id一个参数
};
// ajax post方式发送请求
ajaxPost(localStorage.getItem('url')+"../../../../webapi/v4/preview/view?tk="+tk,param,function(res){
ajaxPost("https://"+ serveip +":18443/webapi/v4/preview/view?tk="+tk,param,function(res){
console.log(JSON.stringify(res));
if (res.ret == 0) {
// if(location.protocol=='https:'){
liveUrl = res.view_context.replace("ws://","wss://").replace('47.94.37.10:39401/live/ws','store.keliuyun.com/wss')
// }else {
// liveUrl = res.view_context.replace("ws://","wss://").replace('47.94.37.10:39401/live/ws','store.keliuyun.com/wss')
// }
liveUrl = res.view_context.replace("ws://","wss://").replace(":39401",":18443")
liveUrl = liveUrl.replace("127.0.0.1", "video.keliuyun.com")
player.start(liveUrl)
} else{
console.log(res.msg)
}
});
}
}
</script>
</html>
\ 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!