xinyb
2024-06-15 fdd73a906963f31abb59d81c10cc163eab47404a
提交 | 用户 | age
45dcf7 1 <%@ page import="com.yc.sdk.shopping.util.SettingKey" %>
X 2 <%@ page import="com.yc.utils.SessionKey" %><%--
3   Created by IntelliJ IDEA.
4   User: xinyb_
5   Date: 2022-01-22
6   Time: 10:41
7   To change this template use File | Settings | File Templates.
8 --%>
9 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
10 <%
11     String url = SettingKey.getHostUrl(request);
12     String id = request.getParameter("id");
13 %>
14 <html>
15 <head>
16     <title>大图标控件界面</title>
17     <link href="<%=url%>/layui/css/layui.css" rel="stylesheet">
18     <style>
19         .item {
20             width: 42px;
21             height: 42px;
22             float: left;
23             margin: 5px;
24         }
25
26         .item:hover {
27             width: 40px;
28             height: 40px;
29             border: 1px dashed;
30             cursor: pointer;
31             background-color: #FFFFBB;
32             border-radius: 5px;
33         }
34
35         .item img {
36             width: 40px;
37             height: 40px;
38         }
39         .layui-tab-item{
40             height: calc(100% - 100px);
41             overflow: auto;
42         }
43         .layui-tab-item::-webkit-scrollbar-thumb{
44             /*-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);*/
45             background-color: #b6b5b5;
46             border-radius: 5px;
47         }
48         /*定义滚动条宽高及背景,宽高分别对应横竖滚动条的尺寸*/
49         .layui-tab-item::-webkit-scrollbar {
50             width: 10px; /*对垂直流动条有效*/
51             border-radius: 5px;
52             background-color: #e3e1e1;
53         }
54     </style>
55 </head>
56 <body>
57 <div style="margin: 10px" id="IconDiv">
58     <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
59         <ul class="layui-tab-title" id="Icon">
60             <li class="layui-this">{{icons.length}}个图标</li>
61         </ul>
62         <div class="layui-tab-content">
63             <div class="layui-tab-item layui-show">
64                 <div v-for="(ico,index) in icons" class="item" @click="open($event)" :data-v="ico">
65                     <img :src="ico">
66                 </div>
67             </div>
68         </div>
69     </div>
70 </div>
71 </body>
72 <script src="<%=url%>/help/js/JQuery-3.6.0.js"></script>
73 <script src="<%=url%>/layui/layui.js"></script>
74 <script src="<%=url%>/help/js/vue.js"></script>
75 <script>
76     var layer;
77     var vm = new Vue({
78         el: '#IconDiv',
79         data: {
80             id:"<%=id%>",
81             icons: []
82         }, mounted: function () {//渲染后加载
83             let p=window.parent.panMain[window.parent.panIndex];
84             let path="";
85             if(p){
86                 path=p.panInfo['<%=id%>'].initValue;
87             }else{
88                 layer.alert("获取不到设置的初始值!");
89                 return;
90             }
91             $.post("/bigIcon/pathName.do", {"pathName": path}, function (res) {
92                 if (res != null && res.code == 0) {
93                     vm.icons = res.data;
94                 } else {
95                     layer.alert(res.msg);
96                 }
97             });
98         },methods:{
99             open:function (event) {
100                 let e=event.currentTarget;
101                 window.parent.$("#"+vm.id).val($(e).data("v"));
102                 window.parent.$("#"+vm.id+"-img44").attr("src",$(e).data("v"));
103                 window.parent.panMain[window.parent.panIndex].isChange=1;
104                 window.parent.layer.closeAll();
105             }
106         }
107     });
108     layui.use(['layer', 'element', 'table'], function () {
109         layer = layui.layer;
110     });
111 </script>
112 </html>