123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- @{
- ViewBag.Title = "Home";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @using MES.Production.Service;
- @using Central.Control.Domain;
- @using Ant.Service.Common;
- @using Ant.Service.Common.Enums;
- <script type="text/javascript">
- function iFrameHeight() {
- var ifm = document.getElementById("DeployBase");
- var subWeb = document.frames ? document.frames["DeployBase"].document : ifm.contentDocument;
- if (ifm != null && subWeb != null) {
- ifm.height = subWeb.body.scrollHeight + 30;
- }
- }
- </script>
- <link href="/Content/themes/css/admin/metroStyle.css" rel="stylesheet" type="text/css" />
- <!-- box star -->
- <div class="row pt10 animated fadeInUp">
- <div class="col-lg-3 col-sm-3 pr0">
- <div class="ibox float-e-margins">
- <div class="ibox-title">
- <select id="sel-system" class="form-control" style="float: left; margin-top: -8px; background-color: #1ab394; color:#ffffff !important; font-size:16px;">
- @{
- var systemlist = ViewData["system"] as List<SYS_SYSTEM>;
- if(systemlist!=null && systemlist.Count>0)
- {
- foreach (var item in systemlist)
- {
- <option value="@item.ID">@item.NAME</option>
- }
- }
- }
- </select>
- </div>
- <div class="ibox-content" style="padding: 15px 10px 20px 10px;">
- <div class="zTreeDemoBackground left">
- <ul id="treeDemo" class="ztree"></ul>
- </div>
- </div>
- </div>
- </div>
- <div class="col-lg-9 col-sm-9 animated fadeInRight" style="width:80%;padding-left:0px;">
- <iframe src="/Sys/Permission/Index" width="100%" style="position:static;left:-22in;top:-11in;" id="DeployBase" name="DeployBase" frameborder="0" scrolling="auto" onload="iFrameHeight()" allowtransparency="true"></iframe>
- </div>
- </div>
- <!-- box end -->
- @section scripts{
- <script type="text/javascript" src="/Content/js/admin/jquery.ztree.core-3.5.js"></script>
- <script type="text/javascript">
- var setting = {
- check: {
- enable: true
- },
- data: {
- simpleData: {
- enable: true,
- idKey: "id",
- pIdKey: "pId"
- }
- },
- callback: {
- onCheck: onCheck
- }
- };
- function onCheck(e, treeId, treeNode) {
- var treeObj = $.fn.zTree.getZTreeObj("treeDemo"),
- nodes = treeObj.getCheckedNodes(true),
- v = "";
- for (var i = 0; i < nodes.length; i++) {
- v += nodes[i].name + ",";
- alert(nodes[i].id); //获取选中节点的值
- }
- }
- function ShowMenu() {
- $.post("/Sys/Module/GetTree", { sysId: $('#sel-system').val() }, function (res) {
- if (res.Status == "y")
- $.fn.zTree.init($("#treeDemo"), setting, res.Data);
- else {
- }
- }, "json");
- }
- $(function () {
- var H = $(window).height();
- $("#DeployBase").css({ 'height': H - 20 });
- ShowMenu();
- $('#DeployBase').css('height', '');
- });
- $('#sel-system').change(function () {
- ShowMenu();
- });
- </script>
- }
|