审查视图

public/themes/simpleboot3/portal/school/school.html 5.2 KB
5  
anyv authored
1 2 3 4 5 6 7 8 9 10 11 12 13
<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>学考无忧-学校管理</title>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/mui.min.css" />
    <link rel="stylesheet" href="__TMPL__/public/assets/css/mui.picker.min.css" />
    <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css" />
    <link rel="stylesheet" href="__TMPL__/public/assets/css/log.css" />
</head>
1  
anyv authored
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
<style>
    .delete_school {
        font-size: 0.32rem;
        color: #333;
        text-align: center;
    }

    .delete_btn {
        display: flex;
        display: -webkit-flex;
        justify-content: space-around;
        align-items: center;
    }

    .tx_maskcancel {
        width: 100%;
        height: 0.8rem;
        background: #f2f2f2;
        border-radius: 0.08rem;
        text-align: center;
        line-height: 0.8rem;
        color: #333;
        font-size: 0.32rem;
        margin-top: 0.4rem;
        margin-right: 0.5rem;
    }
5  
anyv authored
40
1  
anyv authored
41 42 43 44 45 46 47 48 49 50 51 52 53
    .tx_maskYes {
        width: 100%;
        height: 0.8rem;
        background: linear-gradient(338deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
        border-radius: 0.08rem;
        text-align: center;
        line-height: 0.8rem;
        color: white;
        font-size: 0.32rem;
        margin-top: 0.4rem;
        margin-left: 0.5rem;
    }
</style>
5  
anyv authored
54
<body>
1  
anyv authored
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

<!-- 删除弹窗 -->
<div class="tx_mask" onclick="$(this).hide()">
    <div class="tx_maskCon" onclick="zZFun(this)">
        <div class="tx_maskCon2" style="border-radius: 0.1rem;">
            <div class="delete_school">
                是否确定删除?
            </div>
            <!-- 确定 -->
            <div class="delete_btn">
                <div class="tx_maskcancel">取消</div>
                <div class="tx_maskYes">确定</div>
            </div>
        </div>
    </div>
</div>
5  
anyv authored
72 73 74
<div class="log_top_co">
    <!-- 顶部 -->
    <div class=" order_top log_top_co">
anyv authored
75
        <a href="{:url('personalcenter/personal_center')}">
5  
anyv authored
76 77 78 79 80 81 82
            <img src="__TMPL__/public/assets/images/left.png" alt="" />
        </a>
        <p>学校管理</p>
    </div>
</div>
<!-- 学校列表 -->
<div class="log_seven">
2  
anyv authored
83
    <volist name="school" id="val">
anyv authored
84
        <div class="log_seven_list log_seven_list_one shanchu{$val.id}">
2  
anyv authored
85 86 87 88 89 90 91 92
            <div class="log_seven_left">
                <div class="log_seven_left_one">{$val.school}</div>
                <div class="log_seven_left_two">
                    <volist name="val.class" id="vo">
                        <span>{$vo.grade}{$vo.class}班</span>
                    </volist>
                </div>
                <div class="log_secen_left_three">{$val.region}</div>
5  
anyv authored
93
            </div>
2  
anyv authored
94 95
            <div class="log_seven_right">
                <div class="log_seven_right_one">
anyv authored
96
                    <img src="__TMPL__/public/assets/images/87.png" alt="" onclick="school_edit({$val.id})" />
2  
anyv authored
97
                </div>
1  
anyv authored
98
                <div class="log_seven_right_one log_seven_right_two" data-id="{$val.id}" >
2  
anyv authored
99 100
                    <img src="__TMPL__/public/assets/images/86.png" alt="" />
                </div>
5  
anyv authored
101 102
            </div>
        </div>
2  
anyv authored
103 104
    </volist>
5  
anyv authored
105 106 107
</div>
<!-- 按钮 -->
<div class="log_seven_btn">
5  
anyv authored
108
    <a href="{:url('School/add_school')}">
5  
anyv authored
109 110 111 112 113 114 115 116 117 118 119
        <div class="log_seven_btn_contant">
            添加学校
        </div>
    </a>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/mui.min.js"></script>
<script src="__TMPL__/public/assets/js/mui.picker.min.js"></script>
<script src="__TMPL__/public/assets/js/city.data-3.js"></script>
<script>
1  
anyv authored
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

    let index = '';
    var id = '';
    //删除管理地址
    $('.log_seven_right_two').each(function() {

        $(this).click(function() {
            id = $(this).attr('data-id');
            index = $(this).parents(".log_seven_list").index();
            console.log(index)
            $(".tx_mask").css({
                display: "block"
            });
        })
    })
    $(".tx_maskYes").click(function() {
        console.log(index)

        var len = $(".log_seven_list");
        console.log(len)
        for(var i = 0; i < len.length; i++) {
            if(i == index) {
                $(len[i]).remove();
                    $.post("{:url('School/school_del')}",{id:id},function(data){
                        if(data){
                            $('.shanchu'+id).remove();
                        }
                    });
            };
            $(".tx_mask").css({
                display: "none"
anyv authored
151 152
            });
        }
1  
anyv authored
153 154 155 156 157 158 159 160 161
    })
    $(".tx_maskcancel").click(function() {
        $(".tx_mask").css({
            display: "none"
        });
    })

    function zZFun(e) {
        window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
anyv authored
162 163
    }
1  
anyv authored
164 165 166 167 168 169 170


    /**
     *点击删除学校
     */

anyv authored
171 172 173 174 175
    /**
     *点击编辑学习
     */
    function school_edit(id){
        window.location.href = "{:url('School/school_edit')}?id="+id;
2  
anyv authored
176 177 178
    }
</script>
<script>
5  
anyv authored
179
    //删除管理地址
1  
anyv authored
180
5  
anyv authored
181 182 183 184
</script>
</body>

</html>