|
|
|
@ -42,16 +42,69 @@
|
|
|
|
|
letMenuIndex:0,//左侧已选择的一级菜单索引
|
|
|
|
|
towLevelIndexPath:-1,//左侧已选择的二级菜单索引
|
|
|
|
|
openList:["0"],//默认展开的菜单
|
|
|
|
|
menu_code:"001002027",
|
|
|
|
|
purview_id:1437,
|
|
|
|
|
// menu_code:"",
|
|
|
|
|
// purview_id:"",
|
|
|
|
|
// menu_code:"001002027",
|
|
|
|
|
// purview_id:1437,
|
|
|
|
|
crmData:[],
|
|
|
|
|
menu_code:"",
|
|
|
|
|
purview_id:"",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted:function(){
|
|
|
|
|
this.$bus.on("menuChang",this.onMenuChange)
|
|
|
|
|
this.getMenu()
|
|
|
|
|
},
|
|
|
|
|
beforeDestroy:function(){
|
|
|
|
|
this.$bus.off("menuChang",this.onMenuChange)
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
onMenuChange:function(){
|
|
|
|
|
this.copyData = _.cloneDeep(this.crmData);
|
|
|
|
|
this.deleteOperateData(this.copyData)//删除操作节点
|
|
|
|
|
let param = {
|
|
|
|
|
org_id:this.BaseConfig.person_info_my.bureau_id,
|
|
|
|
|
system_id:10,
|
|
|
|
|
person_id:BaseConfig.userInfo.person_id_cookie
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.InterfaceConfig.callInterface([{
|
|
|
|
|
url:"intellioa/teacher/informationManagement/getSystemFunctionList",
|
|
|
|
|
method:"get",
|
|
|
|
|
params:param,
|
|
|
|
|
isTestLogin:true
|
|
|
|
|
}],(result)=>{
|
|
|
|
|
let data = result[0].data;
|
|
|
|
|
if (data.code === 2000){
|
|
|
|
|
this.copyData.forEach((menu,index)=>{
|
|
|
|
|
if (menu.id === "teacherInfoManagement" || menu.id === "infoUpload"){
|
|
|
|
|
menu.children = [];
|
|
|
|
|
if (data.data.all_form_list && data.data.all_form_list.length > 0){//有启用的表单
|
|
|
|
|
data.data.all_form_list.forEach((item)=>{
|
|
|
|
|
menu.children.push({purview_id:item.form_id,purview_name:item.form_name,parentId:menu.id,var3:"",data_num_type:item.data_num_type})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}else if (menu.id === "teacherInfoSearch" && OfficeMenuConfig.menuIsExist(["teacherInfoSearch","categorySummary"]) &&
|
|
|
|
|
!OfficeMenuConfig.menuIsExist(["teacherInfoSearch","categorySummary"],"orgRange")){
|
|
|
|
|
if (!data.data.view_form_list || data.data.view_form_list.length === 0){//没有本人具有查看权限的表单
|
|
|
|
|
menu.children.splice(menu.children.findIndex((child)=>{return child.id === "categorySummary"}),1)
|
|
|
|
|
if (menu.children.length === 0){
|
|
|
|
|
this.copyData.splice(index,1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (data.data.check_form_list && data.data.check_form_list.length > 0){//有审核权限得表单
|
|
|
|
|
let menu = {purview_id:"teacherInfoApprove",purview_name:"教师信息审批",parentId:"",var3:"",icon_css:"operate-edit1",id:"teacherInfoApprove",children:[]}
|
|
|
|
|
data.data.check_form_list.forEach((item)=>{
|
|
|
|
|
menu.children.push({purview_id:item.form_id,purview_name:item.form_name,parentId:menu.id,var3:"",data_num_type:item.data_num_type})
|
|
|
|
|
})
|
|
|
|
|
this.copyData.push(menu)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.leftMenu = this.copyData;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getMenu:function () {
|
|
|
|
|
if (this.purview_id === "" && this.menu_code === ""){
|
|
|
|
|
this.purview_id = StaticParams.getUrlParamsByName(window.location.href,"purview_id");
|
|
|
|
@ -61,6 +114,7 @@
|
|
|
|
|
OfficeMenuConfig.initMenu({purview_id:this.purview_id,menu_code:this.menu_code},this.menuDataHandle,2)
|
|
|
|
|
},
|
|
|
|
|
menuDataHandle:function (data) {
|
|
|
|
|
this.crmData = data;
|
|
|
|
|
this.copyData = _.cloneDeep(data);
|
|
|
|
|
this.deleteOperateData(this.copyData)//删除操作节点
|
|
|
|
|
let param = {
|
|
|
|
|