| | |
| | | private readonly ILiaotianService _liaotianService; |
| | | private readonly IUserService _userService; |
| | | private readonly ISimService _simService; |
| | | private readonly IPltPageService _pltPageService; |
| | | |
| | | public SimController(ILogger<SimController> logger, IUserService userService, ILiaotianService liaotianService,ISimService simService) |
| | | public SimController(ILogger<SimController> logger, IUserService userService, ILiaotianService liaotianService,ISimService simService |
| | | , IPltPageService pltPageService) |
| | | { |
| | | _logger = logger; |
| | | _liaotianService = liaotianService; |
| | | _userService = userService; |
| | | _simService = simService; |
| | | _pltPageService = pltPageService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | public IActionResult Index() |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | List<ActionEntity> actionlist = new List<ActionEntity>(); |
| | | ActionEntity actionEntity = new ActionEntity(); |
| | | actionEntity.OpenType = 0; |
| | |
| | | actionEntity.ActionName = "查询"; |
| | | actionlist.Add(actionEntity); |
| | | |
| | | ActionEntity actionEntity1 = new ActionEntity(); |
| | | actionEntity1.OpenType = 0; |
| | | actionEntity1.ActionUrl = ""; |
| | | actionEntity1.ActionFun = "UnBind"; |
| | | actionEntity1.PageIco = "fa fa-remove"; |
| | | actionEntity1.ActionName = "批量解除绑定"; |
| | | actionlist.Add(actionEntity1); |
| | | |
| | | //ActionEntity actionEntity1 = new ActionEntity(); |
| | | //actionEntity1.OpenType = 0; |
| | | //actionEntity1.ActionUrl = ""; |
| | | //actionEntity1.ActionFun = "UnBind"; |
| | | //actionEntity1.PageIco = "fa fa-remove"; |
| | | //actionEntity1.ActionName = "批量解除绑定"; |
| | | //actionlist.Add(actionEntity1); |
| | | var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/Sim/Index/"); |
| | | var pageEntities1 = pageEntities.Where(x => x.PageMethod == "01").ToList(); |
| | | foreach (var pageEntity in pageEntities1) |
| | | { |
| | | ActionEntity actionEntity1 = new ActionEntity(); |
| | | actionEntity1.OpenType = pageEntity.OpenType; |
| | | actionEntity1.ActionUrl = ""; |
| | | actionEntity1.ActionFun = pageEntity.PageShortcut; |
| | | actionEntity1.PageIco = pageEntity.PageIco; |
| | | actionEntity1.ActionName = pageEntity.PageName; |
| | | actionlist.Add(actionEntity1); |
| | | } |
| | | ViewData["ActionInfo"] = actionlist; |
| | | return View(); |
| | | } |
| | |
| | | /// <returns></returns> |
| | | public IActionResult Edit(string id) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | var pageEntities = _pltPageService.GetUserPage(curentuser.Id, "/Sim/Index/"); |
| | | var pageEntities2 = pageEntities.Where(x => x.PageMethod == "02").ToList(); |
| | | ViewData["ActionInfo2"] = pageEntities2; |
| | | |
| | | ViewBag.CardPro = _liaotianService.GetSYScode("t_sim_bind", "cardpro"); |
| | | ViewData["users"] = _userService.GetList(); |
| | | SimBindView dto = new SimBindView(); |