cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!doctype html>
<html>
<head>
    [#include "/business/wechat/include/title.html" /]
    [#include "/business/wechat/include/wheader.html" /]
</head>
 
<body>
<header class="kltit"><div class="present"><a href="javascript:saveuser();">确定</a></div><a [#if seltype??&& seltype== 1]href="${base}/ewyw/ewIncident/ewAddIncidentfwt.html"[#else]href="${base}/ewyw/ewIncident/ewIncidentInfoCl.html?orderId=${baseMsg.BUSINESS_ID}"[/#if] ><span></span></a>人员分配</header>
<div class="fixed">
    <section class="wlresponse">
        <a href="#"><p>
            <span>当前类型:</span>
            <label >
                <select name="nodetype" id="nodetype" class="select">
                    [#assign type1 = '']
                    [#if user.kf == 1]
                    [#if type1 == '']
                    [#assign type1 = 'kf']
                    [/#if]
                    <option value="kf">客服人员</option>
                    [/#if]
                    [#if user.sjjl == 1]
                    [#if type1 == '']
                    [#assign type1 = 'ywjl']
                    [/#if]
                    <option value="ywjl">运维经理</option>
                    [/#if]
 
                    [#if user.yx == 1]
                    [#if type1 == '']
                    [#assign type1 = 'yx']
                    [/#if]
                    <option value="yx">一线工程师</option>
                    [/#if]
                    [#if user.ex == 1]
                    [#if type1 == '']
                    [#assign type1 = 'ex']
                    [/#if]
                    <option value="ex">二线工程师</option>
                    [/#if]
                    [#if user.sx == 1]
                    [#if type1 == '']
                    [#assign type1 = 'sx']
                    [/#if]
                    <option value="sx">三线工程师</option>
                    [/#if]
                </select> </label>
        </p></a></section>
    <div class="select-assign">
        <span>当前选择:</span>
        <em  id="treeLabel">
            [#if seluserList?? && seluserList?size > 0]
            [#list seluserList as seluser ]
            [#if seluser.type = 'kf'&& user.kf == 1]
            <i id="${seluser.type}" class="foucs-3" sl="${seluser.id}" [#if seluser.type == type1] [#else]style="display:none;"[/#if]>${seluser.name}</i>
            [/#if]
            [#if seluser.type = 'ywjl'&& user.sjjl == 1]
            <i id="${seluser.type}" class="foucs-3" sl="${seluser.id}" [#if seluser.type == type1]  [#else]style="display:none;"[/#if]>${seluser.name}</i>
            [/#if]
            [#if seluser.type = 'yx'&& user.yx == 1]
            <i id="${seluser.type}" class="foucs-3" sl="${seluser.id}" [#if seluser.type == type1]  [#else]style="display:none;"[/#if]>${seluser.name}</i>
            [/#if]
            [#if seluser.type = 'ex'&& user.ex == 1]
            <i id="${seluser.type}" class="foucs-3" sl="${seluser.id}" [#if seluser.type == type1]  [#else]style="display:none;"[/#if]>${seluser.name}</i>
            [/#if]
            [#if seluser.type = 'sx'&& user.sx == 1]
            <i id="${seluser.type}" class="foucs-3" sl="${seluser.id}" [#if seluser.type == type1]  [#else]style="display:none;"[/#if]>${seluser.name}</i>
            [/#if]
            [/#list]
            [/#if]
        </em>
    </div>
 
    <nav class="kltwo clearfix">
        <div class="kltwowrap3">
            <a href="#" hidefocus="true" class="active">人员</a>
            <a href="#" hidefocus="true">角色 </a>
            <a href="#" hidefocus="true">分组 </a>
        </div>
    </nav>
</div>
[#assign checklabel1 = 1]
[#assign checklabel2 = 1]
[#assign checklabel3 = 1]
<div class="pt66">
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide">
                [#if user.kf == 1]
                <section class="wlresponse namethree class kf" [#if checklabel1 == 1] [#assign checklabel1 = 2] [#else]"[/#if]>
                [#if user.kfry?? && user.kfry?size>0]
                [#list user.kfry as kf]
                <a href="javascript:selectuser('1-${Constants.ROLE_SERVICE}-${kf.ID}-${kf.ZSXM}','${kf.ZSXM}','kf',1);"><p [#if kf.type==1] class="foucs-2" [/#if]> <span>${kf.ZSXM}</span> </p></a>
                [/#list]
                [/#if]
                </section>
                [/#if]
                [#if user.sjjl == 1]
                <section class="wlresponse namethree class ywjl" [#if checklabel1 == 1] [#assign checklabel1 = 2] [#else]"[/#if]>
                [#if user.yczc?? && user.yczc?size>0]
                [#list user.yczc as yc]
                <a href="javascript:selectuser('1-${Constants.ROLE_OPERATION}-${yc.ID}-${yc.ZSXM}','${yc.ZSXM}','ywjl',1);"><p [#if yc.type==1] class="foucs-2"[/#if]> <span>${yc.ZSXM}</span> </p></a>
                [/#list]
                [/#if]
                </section>
                [/#if]
                [#if user.yx == 1]
                <section class="wlresponse namethree class yx" [#if checklabel1 == 1] [#assign checklabel1 = 2] [#else]"[/#if]>
                [#if user.yxgcs?? && user.yxgcs?size>0]
                [#list user.yxgcs as yx]
                <a href="javascript:selectuser('1-${Constants.ROLE_FLINE}-${yx.ID}-${yx.ZSXM}','${yx.ZSXM}','yx',1);"><p [#if yx.type==1 ] class="foucs-2" [/#if]> <span>${yx.ZSXM}</span> </p></a>
                [/#list]
                [/#if]
                </section>
                [/#if]
                [#if user.ex == 1]
                <section class="wlresponse namethree class ex" [#if checklabel1 == 1] [#assign checklabel1 = 2] [#else]"[/#if]>
                [#if user.exgcs?? && user.exgcs?size>0]
                [#list user.exgcs as ex]
                <a href="javascript:selectuser('1-${Constants.ROLE_SLINE}-${ex.ID}-${ex.ZSXM}','${ex.ZSXM}','ex',1);"><p [#if ex.type==1 ] class="foucs-2" [/#if]> <span>${ex.ZSXM}</span> </p></a>
                [/#list]
                [/#if]
                </section>
                [/#if]
                [#if user.sx == 1]
                <section class="wlresponse namethree class sx" [#if checklabel1 == 1] [#assign checklabel1 = 2] [#else]"[/#if]>
                [#if user.sxgcs?? && user.sxgcs?size>0]
                [#list user.sxgcs as sx]
                <a href="javascript:selectuser('1-${Constants.ROLE_TLINE}-${sx.ID}-${sx.ZSXM}','${sx.ZSXM}','sx',1);"><p [#if sx.type==1 ] class="foucs-2" [/#if]> <span>${sx.ZSXM}</span> </p></a>
                [/#list]
                [/#if]
                </section>
                [/#if]
            </div>
            <div class="swiper-slide">
                [#if user.kf == 1]
                <section class="wlresponse namethree class kf" [#if checklabel2 == 1] [#assign checklabel2 = 2] [#else]"[/#if] >
                <a href="javascript:selectuser('3-${Constants.ROLE_SERVICE}-${user.jskfry.ID}-${user.jskfry.ROLENAME}','${user.jskfry.ROLENAME}','kf',3);"> <p ><span>${user.jskfry.ROLENAME}</span></p></a>
                </section>
                [/#if]
                [#if user.sjjl == 1]
                <section class="wlresponse namethree class ywjl" [#if checklabel2 == 1] [#assign checklabel2 = 2] [#else]"[/#if]>
                <a href="javascript:selectuser('3-${Constants.ROLE_SERVICE}-${user.jsyczc.ID}-${user.jsyczc.ROLENAME}','${user.jsyczc.ROLENAME}','ywjl',3);"> <p ><span>${user.jsyczc.ROLENAME}</span></p></a>
                </section>
                [/#if]
                [#if user.yx == 1]
                <section class="wlresponse namethree class yx" [#if checklabel2 == 1] [#assign checklabel2 = 2] [#else]"[/#if]>
                <a href="javascript:selectuser('3-${Constants.ROLE_FLINE}-${user.jsyxgcs.ID}-${user.jsyxgcs.ROLENAME}','${user.jsyxgcs.ROLENAME}','yx',3);"> <p><span>${user.jsyxgcs.ROLENAME}</span></p></a>
                </section>
                [/#if]
                [#if user.ex == 1]
                <section class="wlresponse namethree class ex" [#if checklabel2 == 1] [#assign checklabel2 = 2] [#else]"[/#if]>
                <a href="javascript:selectuser('3-${Constants.ROLE_SLINE}-${user.jsexgcs.ID}-${user.jsexgcs.ROLENAME}','${user.jsexgcs.ROLENAME}','ex',3);"> <p><span>${user.jsexgcs.ROLENAME}</span></p></a>
                </section>
                [/#if]
                [#if user.sx == 1]
                <section class="wlresponse namethree class sx" [#if checklabel2 == 1] [#assign checklabel2 = 2] [#else]"[/#if]>
                <a href="javascript:selectuser('3-${Constants.ROLE_TLINE}-${user.jssxgcs.ID}-${user.jssxgcs.ROLENAME}','${user.jssxgcs.ROLENAME}','sx',3);"> <p><span>${user.jssxgcs.ROLENAME}</span></p></a>
                </section>
                [/#if]
 
 
            </div>
            <div class="swiper-slide">
                [#if user.kf == 1]
                <section class="wlresponse namethree class kf" [#if checklabel3 == 1] [#assign checklabel3 = 2] [#else]"[/#if]>
                [#if user.zkfry?? && user.zkfry?size>0]
                [#list user.zkfry as kf]
                <a href="javascript:selectuser('2-${Constants.ROLE_SERVICE}-${kf.ID}-${kf.GROUPNAME}','${kf.GROUPNAME}','kf',2);"> <p [#if kf.type==1 ] class="foucs-2" [/#if]><span>${kf.GROUPNAME}</span></p></a>
                [/#list]
                [/#if]
                </section>
                [/#if]
                [#if user.sjjl == 1]
                <section class="wlresponse namethree class ywjl" [#if checklabel3 == 1] [#assign checklabel3 = 2] [#else]"[/#if]>
                </section>
                [/#if]
                [#if user.yx == 1]
                <section class="wlresponse namethree class yx" [#if checklabel3 == 1] [#assign checklabel3 = 2] [#else]"[/#if]>
                [#if user.zyxgcs?? && user.zyxgcs?size>0]
                [#list user.zyxgcs as yx]
                <a href="javascript:selectuser('2-${Constants.ROLE_FLINE}-${yx.ID}-${yx.GROUPNAME}','${yx.GROUPNAME}','yx',2);"> <p [#if yx.type==1 ] class="foucs-2" [/#if]><span>${yx.GROUPNAME}</span></p></a>
                [/#list]
                [/#if]
                </section>
                [/#if]
                [#if user.ex == 1]
                <section class="wlresponse namethree class ex" [#if checklabel3 == 1] [#assign checklabel3 = 2] [#else]"[/#if]>
                [#if user.zexgcs?? && user.zexgcs?size>0]
                [#list user.zexgcs as ex]
                <a href="javascript:selectuser('2-${Constants.ROLE_SLINE}-${ex.ID}-${ex.GROUPNAME}','${ex.GROUPNAME}','ex',2);"> <p [#if ex.type==1 ] class="foucs-2" [/#if]><span>${ex.GROUPNAME}</span></p></a>
                [/#list]
                [/#if]
                </section>
                [/#if]
                [#if user.sx == 1]
                <section class="wlresponse namethree class sx" [#if checklabel3 == 1] [#assign checklabel3 = 2] [#else]"[/#if]>
                [#if user.zsxgcs?? && user.zsxgcs?size>0]
                [#list user.zsxgcs as sx]
                <a href="javascript:selectuser('2-${Constants.ROLE_TLINE}-${sx.ID}-${sx.GROUPNAME}','${sx.GROUPNAME}','sx',2);"> <p [#if sx.type==1 ] class="foucs-2" [/#if]><span>${sx.GROUPNAME}</span></p></a>
                [/#list]
                [/#if]
                </section>
                [/#if]
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    /*标签切换:三个*/
    n=$('.kltwowrap3 a').size();
    var wh=100*n+"%";
    $('.kltwowrap3').width(wh);
    var lt=(100/n/3);
    var lt_li=lt+"%";
    $('.kltwowrap3 a').width(lt_li);
    $(".kltwowrap3 a").on('touchstart mousedown',function(e){
        e.preventDefault()
        $(".kltwowrap3 .active").removeClass('active');
        $(this).addClass('active');
        tabsSwiper.slideTo($(this).index());
    });
 
    $(".kltwowrap3 a").click(function(e){
        e.preventDefault();
    });
 
    var tabsSwiper = new Swiper(".swiper-container",{
        setWrapperSize :true,
        onSlideChangeStart: function(sw){
            $(".kltwowrap3 .active").removeClass('active');
            $(".kltwowrap3 a").eq(tabsSwiper.activeIndex).addClass('active');
 
            //sw.width
            var currTab = $(".kltwowrap3 a").eq(tabsSwiper.activeIndex);
            /*if(currTab.width()*sw.activeIndex +10 > sw.width){
             currTab.parent().css("left",-currTab.width()*sw.activeIndex);
             }else{
             currTab.parent().css("left",0);
             }*/
            currTab.parent().css("left",-parseInt(sw.activeIndex/3)*sw.width);
        }
 
 
    });
    var seltype = '${RequestParameters.seltype}';
    $(function(){
        $("#nodetype").change(function(){
            var nodetype = $("#nodetype").val();
            $(".namethree").hide();
            $("."+nodetype).show();
            $("#treeLabel i").hide();
            $("#"+nodetype).show();
 
        })
        $(".swiper-slide p").click(function() {
            $(".foucs-2").removeClass("foucs-2");
            var nodetype = $("#nodetype").val();
            $("."+nodetype+" p").removeClass("foucs-2");
            $(this).toggleClass("foucs-2"); //Remove any "active" class
        });
    })
    function selectuser(id,name,type,flag){
        var alreadySelect = "";
        $("#"+type).remove();
        $("#kf,#ywjl,#yx,#ex,#sx").remove();
        if(flag==2 || flag==3){
            $.ajax({
                type: "POST",
                url:"${base}/ewyw/ewIncident/checkRy.html",
                data:{"id":id,"flag":flag},
                dataType:"json",
                error: function() {
                    window.top.popupTips("操作失败");
                },
                success: function(data) {
                    if(data=="0"){
                        popupTips(name+"没有分配人员信息!");
                    }else{
                        alreadySelect += "<i id='"+type+"' class='foucs-3' sl='"+id+"'>"+name+"</i><input type='hidden' id='choose' value='"+type+"' />";
                        $("#treeLabel").append(alreadySelect);
                    }
                }
            });
        }else{
            alreadySelect += "<i id='"+type+"' class='foucs-3' sl='"+id+"'>"+name+"</i><input type='hidden' id='choose' value='"+type+"' />";
            $("#treeLabel").append(alreadySelect);
        }
    }
    var orderId = '${baseMsg.BUSINESS_ID}';
    var orderType = '${baseMsg.BUSINESSTYPE}';
    function saveuser(){
        var nodetype = $(".foucs-3").val();
        var selectusers = $(".foucs-3").attr("sl");
        $.post("${base}/ewyw/ewIncident/saveuser.html",{"selectusers":selectusers},function(data,textStatus) {
            if(seltype == 1){
                window.location.href = "${base}/ewyw/ewIncident/ewAddIncidentfwt.html?tjtype=1";
            }else{
                window.location.href = "${base}/ewyw/ewIncident/ewIncidentInfoCl.html?tjtype=1&orderId="+orderId;
            }
        });
 
    }
</script>
</body>
</html>