|
@ -115,6 +115,7 @@
|
|
vm.selectLevel = vm.roleLevel;
|
|
vm.selectLevel = vm.roleLevel;
|
|
var userRole = JSON.parse(window.localStorage.getItem("selectedRole"));
|
|
var userRole = JSON.parse(window.localStorage.getItem("selectedRole"));
|
|
vm.curName = vm.selectLevel==4?userRole.name.substring(0,3):userRole.name;
|
|
vm.curName = vm.selectLevel==4?userRole.name.substring(0,3):userRole.name;
|
|
|
|
vm.curCode = userRole.code;
|
|
$("#signYear").find(".c-33").removeClass("active");
|
|
$("#signYear").find(".c-33").removeClass("active");
|
|
$("#signYear").find(".c-33").eq(0).addClass("active");
|
|
$("#signYear").find(".c-33").eq(0).addClass("active");
|
|
$(".div-content .div-item").find(".div-btn").removeClass("active");
|
|
$(".div-content .div-item").find(".div-btn").removeClass("active");
|
|
@ -124,20 +125,36 @@
|
|
},
|
|
},
|
|
confirmClick:function(){
|
|
confirmClick:function(){
|
|
var vm = this;
|
|
var vm = this;
|
|
debugger
|
|
|
|
console.log("area:"+vm.resultCode)
|
|
|
|
console.log("name:"+vm.curName)
|
|
|
|
console.log("level:"+vm.selectLevel)
|
|
|
|
console.log("year:"+$("#signYear .c-33.active").attr("data-val"))
|
|
|
|
//触发刷新
|
|
//触发刷新
|
|
|
|
var lastItem = $(".div-content .div-item .div-btn.active").last().find("a").html();
|
|
|
|
if(lastItem=="全区"){
|
|
|
|
if(vm.roleLevel==3){//区管理员
|
|
|
|
var userRole = JSON.parse(window.localStorage.getItem("selectedRole"));
|
|
|
|
vm.resultCode = vm.curCode || userRole.code;
|
|
|
|
}else{
|
|
|
|
vm.resultCode = $($(".div-content .div-item .div-btn.active").eq(0)).attr("data-id");
|
|
|
|
}
|
|
|
|
vm.selectLevel = 3;
|
|
|
|
}
|
|
|
|
if(lastItem=="全社区"){
|
|
|
|
if($(".div-content .div-item .div-btn.active").length==3){
|
|
|
|
vm.resultCode = $($(".div-content .div-item .div-btn.active").eq(1)).attr("data-id");
|
|
|
|
}
|
|
|
|
vm.resultCode = $($(".div-content .div-item .div-btn.active").eq(0)).attr("data-id");
|
|
|
|
vm.selectLevel = 2;
|
|
|
|
}
|
|
this.$emit('vuedals:close', {
|
|
this.$emit('vuedals:close', {
|
|
areaCode: vm.resultCode==""?vm.curCode:vm.resultCode,
|
|
|
|
|
|
areaCode: vm.resultCode,
|
|
name: vm.curName,
|
|
name: vm.curName,
|
|
level: vm.selectLevel,
|
|
level: vm.selectLevel,
|
|
year: $("#signYear .c-33.active").attr("data-val"),
|
|
year: $("#signYear .c-33.active").attr("data-val"),
|
|
filterHtml:$(".div-content").html(),
|
|
filterHtml:$(".div-content").html(),
|
|
yearHtml:$("#signYear").html()
|
|
yearHtml:$("#signYear").html()
|
|
});
|
|
});
|
|
|
|
// console.log("area:"+vm.resultCode)
|
|
|
|
// console.log("name:"+vm.curName)
|
|
|
|
// console.log("level:"+vm.selectLevel)
|
|
|
|
// console.log("year:"+$("#signYear .c-33.active").attr("data-val"))
|
|
},
|
|
},
|
|
pingData:function(list){
|
|
pingData:function(list){
|
|
var vm = this;
|
|
var vm = this;
|