public ActionResult Index() { string ControllerUrl = "/api/SYS/SYS_DEPT/"; var viewModel = new { Permission = new//权限 { a_list = Model_SYS_MENU.HasPermission("SYS", "SYS_DEPT", "List", Common.HttpMethod.Post), a_add = Model_SYS_MENU.HasPermission("SYS", "SYS_DEPT", "Add", Common.HttpMethod.Post), a_edit = Model_SYS_MENU.HasPermission("SYS", "SYS_DEPT", "Edit", Common.HttpMethod.Get), a_del = Model_SYS_MENU.HasPermission("SYS", "SYS_DEPT", "Del", Common.HttpMethod.Get), a_excelin = oc.CurrentUser.USER_NAME == "sxsh"?true:false //a_excelout = Model_SYS_MENU.HasPermission("SYS", "SYS_DEPT", "List", Common.HttpMethod.Post) }, resx = new { listTitle = "您没有【查看部门】权限", addTitle = "您没有【新增部门】权限", editTitle = "您没有【编辑部门】权限!", deleteTitle = "您没有【删除部门】权限!" }, urls = new//请求URL { save = ControllerUrl + "Save", list = ControllerUrl + "List", edit = ControllerUrl + "Edit", del = ControllerUrl + "Del", //writexls = ControllerUrl + "WirteExcel", readxls = ControllerUrl + "ReadXls", dataGgridName = "data_grid", //列表ID dataGgridType = "treegrid", //列表类型 dataAddName = "data_add", //增加窗口 //titleName="sss", dataFormName = "DataForm", //提交表单 }, searchForm = new VIEW_SYS_DEPT() //查询 { }, addForm = new VIEW_SYS_DEPT() { //添加修改 }, extForm = new //扩展类 { extA = Model_SYS_DEPT.GetMyORGNoGQTree(oc.CurrentUser.SYS_DEPT.DEPT_CODE, oc.CurrentUser.SYS_DEPT.PARENT_CODE), //部门列表 extB = new List <EasyUIComBoBoxNode>() { new EasyUIComBoBoxNode() { id = "0", text = "单位" }, new EasyUIComBoBoxNode() { id = "1", text = "部门" } } } }; return(View(viewModel)); }
public List <Model.ModelExt.EasyUITreeNode> GetMyORGNoGQTree(VIEW_SYS_DEPT data) { return(Model_SYS_DEPT.GetMyORGNoGQTree(oc.CurrentUser.SYS_DEPT.DEPT_CODE, oc.CurrentUser.SYS_DEPT.PARENT_CODE));//部门列表 }