1
luxiaotao1123
2021-10-29 686b0de3a8959ebad5a5ce5ee71e70e190b04611
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
    <title>PDA首页</title>
    <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="../../static/js/common.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
        }
 
        html {
            height: 100%;
            /*line-height: 1.5;*/
        }
 
        body {
            height: 100%;
            /*overflow: hidden;*/
        }
 
        /* 导航 */
        .nav {
            background-color: #fff; /*todo*/
            color: #000;
            list-style-type: none;
            position: fixed;
            width: 100%;
            overflow: hidden;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1)
        }
 
        .nav li {
            float: left;
            border-right: 1px solid #f1f1f1; /*todo*/
        }
 
        .nav li a {
            font-size: 20px;
            letter-spacing: 1px;
            display: block;
            text-decoration: none;
            padding: 3px 10px;
            text-align: center;
            /*transform:scale(1.5);*/
            /*-webkit-transform:scale(1.5);*/
            /*-moz-transform:scale(1.5);*/
        }
 
        .nav li a:hover {
            color: #000;
        }
 
        .nav-unselect {
            color: blue;
        }
 
        .nav-select {
            background-color: #f1f1f1; /*todo*/
            color: blue;
        }
 
        /* 主体 */
        #content {
            /*padding-top: 32px;*/
            width: 100%;
            height: 100%;
        }
 
        iframe {
            border-width: 0;
        }
 
        td {
            color: white;
            background-image: linear-gradient(to top, #09203f 0%, #537895 100%);
            /*background-color: rgba(204,204,204,.6);*/
            border-radius: 8px;
            text-align: center;
            vertical-align: middle;
            height: 80px;
            font-size: 24px;
        }
        .nav-font-size {
            font-size: 18px;
        }
    </style>
</head>
<body>
 
<!-- 导航菜单 -->
<table id="navList" style="width: 100%; border-color: #e6e6e6;" border="0" cellspacing="2">
    <tr>
        <td>
            <div id="combAgv" onclick="nav(this.id)" class="nav-font-size">小车组托入库</div>
        </td>
        <td>
            <div id="combProAgv" onclick="nav(this.id)" class="nav-font-size">小车关联组托</div>
        </td>
    </tr>
    <tr>
        <td>
            <div id="comb" onclick="nav(this.id)" class="nav-font-size">立库组托入库</div>
        </td>
        <td>
            <div id="combPro" onclick="nav(this.id)" style="font-size: 15px">立库任务单入库</div>
        </td>
    </tr>
    <tr>
        <td>
            <div id="locNormalIn1" onclick="nav(this.id)" class="nav-font-size">平仓材料入库</div>
        </td>
        <td>
            <div id="locNormalOut1" onclick="nav(this.id)" class="nav-font-size">平仓材料出库</div>
        </td>
    </tr>
    <tr>
        <td>
            <div id="locNormalIn" onclick="nav(this.id)" class="nav-font-size">平仓成品入库</div>
        </td>
        <td>
            <div id="locNormalOut" onclick="nav(this.id)" class="nav-font-size">平仓成品出库</div>
        </td>
    </tr>
</table>
 
<!-- 主体内容 -->
<iframe id="content" src=""></iframe>
 
 
</body>
<script>
    $(function(){
        $.ajax({
            url: baseUrl+"/user/roleId/auth",
            headers: {'token': localStorage.getItem('token')},
            method: 'GET',
            success: function (res) {
                if (res.code === 200){
                    console.log(res)
                    if (res.data.code === 'a') {
                        $("#combAgv").parent().hide();
                        $("#combProAgv").parent().hide();
                        $("#comb").parent().hide();
                        $("#combPro").parent().hide();
                        $("#locNormalIn").parent().hide();
                        $("#locNormalOut").parent().hide();
                    } else if (res.data.code === 'b') {
                        $("#locNormalIn1").parent().hide();
                        $("#locNormalOut1").parent().hide();
                        $("#locNormalIn").parent().hide();
                        $("#locNormalOut").parent().hide();
                    } else if (res.data.code === 'c') {
                        $("#combAgv").parent().hide();
                        $("#combProAgv").parent().hide();
                        $("#comb").parent().hide();
                        $("#combPro").parent().hide();
                        $("#locNormalIn1").parent().hide();
                        $("#locNormalOut1").parent().hide();
                    }
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                }else {
                    layer.msg(res.msg, {icon: 2});
                }
            }
        })
    });
 
    // 导航栏
    function nav(id) {
//        $('.nav-select').attr("class", "nav-unselect");
//        $('#' + id).attr("class", "nav-select");
 
        if (id === 'locNormalIn1') {
            $('#content').attr("src", "locNormalIn.html?areaType=1");
        } else if (id === 'locNormalOut1') {
            $('#content').attr("src", "locNormalOut.html?areaType=1");
        } else {
            $('#content').attr("src", id + ".html");
        }
        $('#navList').css('display', 'none');
        $('#content').css('display', 'block');
    }
 
    function backIndex() {
        $('#navList').css('display', 'inline-table');
        $('#content').css('display', 'none');
    }
</script>
</html>