13693261870
2024-04-02 2a1b873b4b78b508d5d53c57992e734c56619df8
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
/** layui-v2.4.5 MIT License By https://www.layui.com */ ;
var indexPage = window.location.href.lastIndexOf("/") + 1;
var url = window.location.href.substring(0, indexPage);
layui.define("jquery", function (t) {
    "use strict";
    var a = layui.$,
        i = (layui.hint(), layui.device()),
        e = "element",
        l = "layui-this",
        n = "layui-show",
        s = function() {
            this.config = {}
        };
    s.prototype.set = function(t) {
        var i = this;
        return a.extend(!0, i.config, t), i
    }, s.prototype.on = function(t, a) {
        return layui.onevent.call(this, e, t, a)
    }, s.prototype.tabAdd = function(t, i) {
        var e = ".layui-tab-title",
            l = a(".layui-tab[lay-filter=" + t + "]"),
            n = l.children(e),
            s = n.children(".layui-tab-bar"),
            o = l.children(".layui-tab-content"),
            r = '<li lay-id="' + (i.id || "") + '"' + (i.attr ? ' lay-attr="' + i.attr + '"' : "") + ">" + (i.title ||
                "unnaming") + "</li>";
        return s[0] ? s.before(r) : n.append(r), o.append('<div class="layui-tab-item">' + (i.content || "") + "</div>"),
            f.hideTabMore(!0), f.tabAuto(), this
    }, s.prototype.tabDelete = function(t, i) {
        var e = ".layui-tab-title",
            l = a(".layui-tab[lay-filter=" + t + "]"),
            n = l.children(e),
            s = n.find('>li[lay-id="' + i + '"]');
        return f.tabDelete(null, s), this
    }, s.prototype.tabChange = function(t, i) {
        var e = ".layui-tab-title",
            l = a(".layui-tab[lay-filter=" + t + "]"),
            n = l.children(e),
            s = n.find('>li[lay-id="' + i + '"]');
        return f.tabClick.call(s[0], null, null, s), this
    }, s.prototype.tab = function(t) {
        t = t || {}, b.on("click", t.headerElem, function(i) {
            var e = a(this).index();
            f.tabClick.call(this, i, e, null, t)
        })
    }, s.prototype.progress = function(t, i) {
        var e = "layui-progress",
            l = a("." + e + "[lay-filter=" + t + "]"),
            n = l.find("." + e + "-bar"),
            s = n.find("." + e + "-text");
        return n.css("width", i), s.text(i), this
    };
    var o = ".layui-nav",
        r = "layui-nav-item",
        c = "layui-nav-bar",
        u = "layui-nav-tree",
        d = "layui-nav-child",
        y = "layui-nav-more",
        h = "layui-anim layui-anim-upbit",
        f = {
            tabClick: function(t, i, s, o) {
                o = o || {};
                var r = s || a(this),
                    i = i || r.parent().children("li").index(r),
                    c = o.headerElem ? r.parent() : r.parents(".layui-tab").eq(0),
                    u = o.bodyElem ? a(o.bodyElem) : c.children(".layui-tab-content").children(".layui-tab-item"),
                    d = r.find("a"),
                    y = c.attr("lay-filter");
                "javascript:;" !== d.attr("href") && "_blank" === d.attr("target") || (r.addClass(l).siblings().removeClass(l),
                    u.eq(i).addClass(n).siblings().removeClass(n)), layui.event.call(this, e, "tab(" + y + ")", {
                    elem: c,
                    index: i
                })
            },
            tabDelete: function(t, i) {
                var n = i || a(this).parent(),
                    s = n.index(),
                    o = n.parents(".layui-tab").eq(0),
                    r = o.children(".layui-tab-content").children(".layui-tab-item"),
                    c = o.attr("lay-filter");
                n.hasClass(l) && (n.next()[0] ? f.tabClick.call(n.next()[0], null, s + 1) : n.prev()[0] && f.tabClick.call(n.prev()[
                    0], null, s - 1)), n.remove(), r.eq(s).remove(), setTimeout(function() {
                    f.tabAuto()
                }, 50), layui.event.call(this, e, "tabDelete(" + c + ")", {
                    elem: o,
                    index: s
                })
            },
            tabAuto: function() {
                var t = "layui-tab-more",
                    e = "layui-tab-bar",
                    l = "layui-tab-close",
                    n = this;
                a(".layui-tab").each(function() {
                    var s = a(this),
                        o = s.children(".layui-tab-title"),
                        r = (s.children(".layui-tab-content").children(".layui-tab-item"), 'lay-stope="tabmore"'),
                        c = a('<span class="layui-unselect layui-tab-bar" ' + r + "><i " + r +
                            ' class="layui-icon">&#xe61a;</i></span>');
                    if (n === window && 8 != i.ie && f.hideTabMore(!0), s.attr("lay-allowClose") && o.find("li").each(function() {
                            var t = a(this);
                            if (!t.find("." + l)[0]) {
                                var i = a('<i class="layui-icon layui-unselect ' + l + '">&#x1006;</i>');
                                i.on("click", f.tabDelete), t.append(i)
                            }
                        }), "string" != typeof s.attr("lay-unauto"))
                        if (o.prop("scrollWidth") > o.outerWidth() + 1) {
                            if (o.find("." + e)[0]) return;
                            o.append(c), s.attr("overflow", ""), c.on("click", function(a) {
                                o[this.title ? "removeClass" : "addClass"](t), this.title = this.title ? "" : "收缩"
                            })
                        } else o.find("." + e).remove(), s.removeAttr("overflow")
                })
            },
            hideTabMore: function (t) {
                var i = a(".layui-tab-title");
                t !== !0 && "tabmore" === a(t.target).attr("lay-stope") || (i.removeClass("layui-tab-more"), i.find(
                    ".layui-tab-bar").attr("title", ""));
                
 
            },
            clickThis: function() {
                var t = a(this),
                    i = t.parents(o),
                    n = i.attr("lay-filter"),
                    s = t.parent(),
                    c = t.siblings("." + d),
                    y = "string" == typeof s.attr("lay-unselect");
                "javascript:;" !== t.attr("href") && "_blank" === t.attr("target") || y || c[0] || (i.find("." + l).removeClass(
                    l), s.addClass(l)), i.hasClass(u) && (c.removeClass(h), c[0] && (s["none" === c.css("display") ? "addClass" :
                    "removeClass"](r + "ed"), "all" === i.attr("lay-shrink") && s.siblings().removeClass(r + "ed"))), layui.event.call(
                    this, e, "nav(" + n + ")", t)
            },
            collapse: function () {
                var t = a(this),
                    i = t.find(".layui-colla-icon"),
                    bImg=t.find("img"),
                    l = t.siblings(".layui-colla-content"),
                    s = t.parents(".layui-collapse").eq(0),
                    o = s.attr("lay-filter"),
                    r = "none" === l.css("display");
                if ("string" == typeof s.attr("lay-accordion")) {
                    var c = s.children(".layui-colla-item").children("." + n);
                    //修改过了
                    c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),
                    c.removeClass(n)
                }
                if (r) {
                    bImg.attr("src", url + "img/减号.png");
                } else {
                    bImg.attr("src", url + "img/加号.png");
                    
                }
                l[r ? "addClass" : "removeClass"](n),
                i.html(r ? "" : ""),
                //bImg.attr(r ? "-" : "+"),
                layui.event.call(this, e, "collapse(" +
                    o + ")", {
                        title: t,
                        content: l,
                        show: r
                    })
            }
        };
    s.prototype.init = function(t, e) {
        var l = function() {
                return e ? '[lay-filter="' + e + '"]' : ""
            }(),
            s = {
                tab: function() {
                    f.tabAuto.call({})
                },
                nav: function() {
                    var t = 200,
                        e = {},
                        s = {},
                        p = {},
                        b = function(l, o, r) {
                            var c = a(this),
                                f = c.find("." + d);
                            o.hasClass(u) ? l.css({
                                top: c.position().top,
                                height: c.children("a").outerHeight(),
                                opacity: 1
                            }) : (f.addClass(h), l.css({
                                    left: c.position().left + parseFloat(c.css("marginLeft")),
                                    top: c.position().top + c.height() - l.height()
                                }), e[r] = setTimeout(function() {
                                    l.css({
                                        width: c.width(),
                                        opacity: 1
                                    })
                                }, i.ie && i.ie < 10 ? 0 : t), clearTimeout(p[r]), "block" === f.css("display") && clearTimeout(s[r]), s[r] =
                                setTimeout(function() {
                                    f.addClass(n), c.find("." + y).addClass(y + "d")
                                }, 300))
                        };
                    a(o + l).each(function(i) {
                        var l = a(this),
                            o = a('<span class="' + c + '"></span>'),
                            h = l.find("." + r);
                        l.find("." + c)[0] || (l.append(o), h.on("mouseenter", function() {
                            b.call(this, o, l, i)
                        }).on("mouseleave", function() {
                            l.hasClass(u) || (clearTimeout(s[i]), s[i] = setTimeout(function() {
                                l.find("." + d).removeClass(n), l.find("." + y).removeClass(y + "d")
                            }, 300))
                        }), l.on("mouseleave", function() {
                            clearTimeout(e[i]), p[i] = setTimeout(function() {
                                l.hasClass(u) ? o.css({
                                    height: 0,
                                    top: o.position().top + o.height() / 2,
                                    opacity: 0
                                }) : o.css({
                                    width: 0,
                                    left: o.position().left + o.width() / 2,
                                    opacity: 0
                                })
                            }, t)
                        })), h.find("a").each(function() {
                            var t = a(this),
                                i = (t.parent(), t.siblings("." + d));
                            i[0] && !t.children("." + y)[0] && t.append('<span class="' + y + '"></span>'), t.off("click", f.clickThis)
                                .on("click", f.clickThis)
                        })
                    })
                },
                breadcrumb: function() {
                    var t = ".layui-breadcrumb";
                    a(t + l).each(function() {
                        var t = a(this),
                            i = "lay-separator",
                            e = t.attr(i) || "/",
                            l = t.find("a");
                        l.next("span[" + i + "]")[0] || (l.each(function(t) {
                            t !== l.length - 1 && a(this).after("<span " + i + ">" + e + "</span>")
                        }), t.css("visibility", "visible"))
                    })
                },
                progress: function() {
                    var t = "layui-progress";
                    a("." + t + l).each(function() {
                        var i = a(this),
                            e = i.find(".layui-progress-bar"),
                            l = e.attr("lay-percent");
                        e.css("width", function() {
                            return /^.+\/.+$/.test(l) ? 100 * new Function("return " + l)() + "%" : l
                        }()), i.attr("lay-showPercent") && setTimeout(function() {
                            e.html('<span class="' + t + '-text">' + l + "</span>")
                        }, 350)
                    })
                },
                collapse: function() {
                    var t = "layui-collapse";
                    a("." + t + l).each(function() {
                        var t = a(this).find(".layui-colla-item");
                        t.each(function() {
                            var t = a(this),
                                i = t.find(".layui-colla-title"),
                                e = t.find(".layui-colla-content"),
                                l = "none" === e.css("display");
                                //修改
                            i.find(".layui-colla-icon").remove(), i.append('<i class="layui-icon layui-colla-icon">' + (l ?
                                "" : "") + "</i>"), i.off("click", f.collapse).on("click", f.collapse);
 
                        })
                    })
                }
            };
        return s[t] ? s[t]() : layui.each(s, function(t, a) {
            a()
        })
    }, s.prototype.render = s.prototype.init;
    var p = new s,
        b = a(document);
    p.render();
    var v = ".layui-tab-title li";
    b.on("click", v, f.tabClick), b.on("click", f.hideTabMore), a(window).on("resize", f.tabAuto), t(e, p)
});