Commit 02128451 authored by agping's avatar agping

周报

parent 73f1a04e
...@@ -9,13 +9,28 @@ ...@@ -9,13 +9,28 @@
<meta name="Keywords" content="" /> <meta name="Keywords" content="" />
<meta name="Description" content="" /> <meta name="Description" content="" />
</head> </head>
<style>
.top-city-select-area{
position: fixed;
top: 0;
right: 0;
z-index: 101;
height: .88rem;
padding-right: .3rem;
}
</style>
<body style="display: none;"> <body style="display: none;">
<div id="app"> <div id="app">
<header id="header"> <header id="header">
<a class="ps-back" href="javascript:(history.length>1?history.go(-1):window.location='/');"></a> <a class="ps-back" href="javascript:(history.length>1?history.go(-1):window.location='/');"></a>
<h2 id="title">我的周报</h2> <h2 id="title">我的周报</h2>
</header> </header>
<!--总监周报 加城市选择-->
<div class="top-city-select-area flex-center" >
<select @changeCity="changeCity">
<option v-for="(item, index) in dataListCity" :value="item.id">{{item.name}}</option>
</select>
</div>
<div class="header_seat"></div> <div class="header_seat"></div>
<div id="table_area"> <div id="table_area">
......
...@@ -6,12 +6,18 @@ require(['vue', 'css!style/daily_my.css', 'jquery0325', 'common'],function(Vue){ ...@@ -6,12 +6,18 @@ require(['vue', 'css!style/daily_my.css', 'jquery0325', 'common'],function(Vue){
testBtn: null, testBtn: null,
token: localStorage.getItem('token'), token: localStorage.getItem('token'),
dataList: [], dataList: [],
dataListCity:[],
hrefPre: 'weekly_image?imgsrc=' hrefPre: 'weekly_image?imgsrc='
}, },
created: function() { created: function() {
var _this = this; var _this = this;
document.body.style.display = 'block'; document.body.style.display = 'block';
_this.loadMain(); if(localStorage.getItem('userlevel')*1 != 20){//总监周报
_this.getCity();
}else{
_this.loadMain();
}
}, },
methods: { methods: {
loadMain: function(){ loadMain: function(){
...@@ -53,7 +59,81 @@ require(['vue', 'css!style/daily_my.css', 'jquery0325', 'common'],function(Vue){ ...@@ -53,7 +59,81 @@ require(['vue', 'css!style/daily_my.css', 'jquery0325', 'common'],function(Vue){
} }
}); });
} },
getCity: function(){//获取总监的城市
var _this =this;
$.ajax({
type: 'GET',
url: ServerHostTempC + '/broker/getAgentDistrictId',
data: {
'AuthToken': localStorage.getItem('token'),
'phone': localStorage.getItem('userphone')
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {
},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
_this.dataListCity = _data.data;
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('data type error');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('overtime');
};
}
});
},
changeCity: function(){//切换城市
var _this =this;
$.ajax({
type: 'GET',
url: ServerHostTempC + '/broker/getAgentDistrictId',
data: {
'AuthToken': localStorage.getItem('token'),
'phone': localStorage.getItem('userphone')
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {
},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
_this.dataListCity = _data.data;
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('data type error');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('overtime');
};
}
});
},
} }
}); });
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment