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
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
</head>
 
<body>
<header class="kltit">
    <a [#if RequestParameters.fwt??&& RequestParameters.fwt== 1]href="${base}/ewyw/ewIncident/ewAddIncidentfwt.html"[#elseif RequestParameters.wt??&& RequestParameters.wt== 1]href="${base}/ewyw/ewQuestion/ewAddQuestion.html"[#else]href="${base}/ewyw/ewIncident/ewAddIncident.html"[/#if] ><span></span></a>修改SLA等级
</header>
<section class="wlresponse">
    <p>
        <span>优先级</span>
         <label>
        [#if eventPri?? && eventPri?size > 0]
        <select id="priority_id" name="priority_id" class="select">
        [#list eventPri as pri]
           <option value="${pri.DATAKEY}" [#if resultMap.priority_id?? && resultMap.priority_id == pri.DATAKEY]selected[/#if]>${pri.DATAVALUE}</option>
        [/#list]  
        </select>
        [/#if]
         </label>
    </p>
    <p>
        <span>影响度</span>
         <label>
        [#if eventDg?? && eventDg?size > 0]
        <select id="influence_id" name="influence_id" class="select">
        [#list eventDg as dg]
           <option value="${dg.DATAKEY}" [#if resultMap.influence_id?? && resultMap.influence_id == dg.DATAKEY]selected[/#if]>${dg.DATAVALUE}</option>
        [/#list]  
        </select>
        [/#if]
         </label>
    </p>
    <p>
        <span>服务等级</span>
        <label>
            <em class="org" id="levelName">${resultMap.levelName}</em><br />
            <em class="responseicon"></em>响应时间:<u class="org" id="responseTime">${resultMap.responseTime}</u><br />
            <em class="responseicon"></em>解决时间:<u class="org" id="resovleTime">${resultMap.resovleTime}</u>
            <input type="hidden" id="slaId" name="sla_id" value="${resultMap.levelId}" />
               <input type="hidden" id="slaName" name="sla_name" value="${resultMap.levelName}" />
               <input type="hidden" id="request_answer_time" name="request_answer_time" value="${resultMap.request_answer_time}"/>
               <input type="hidden" id="request_deal_time" name="request_deal_time" value="${resultMap.request_deal_time}"/> 
        </label>
    </p>
    <button class="bluebtn bluebtnsmal2" onclick="savelevel()" >确定</button>
</section>
 
<script type="text/javascript">
var fwt = '${RequestParameters.fwt}';
var wt = '${RequestParameters.wt}';
$(function() {
   $('#priority_id,#influence_id').change(function(){
            var priority_id = $("#priority_id").val();
            var influence_id = $("#influence_id").val();
            var serivceListId = '${serivceListId}';
            var customer_id = '${customerId}';
            if(!$.util.isEmpty(priority_id) && !$.util.isEmpty(influence_id) && !$.util.isEmpty(serivceListId) && !$.util.isEmpty(customer_id)) {
                $.post("${base}/ewyw/ewIncident/queryLevel.html",{"priority_id":priority_id,"influence_id":influence_id,"serivceListId":serivceListId,"customer_id":customer_id},function(data,textStatus) {
                        if(data.levelId) {
                            $("#slaId").val(data.levelId);
                        }
                        if(data.levelName) {
                            $("#slaName").val(data.levelName);
                            $("#levelName").text(data.levelName);
                        }
                        
                        if(data.responseTime) {
                            $("#request_answer_time").val(data.responseTime);
                            $("#responseTime").text(data.responseTime+"分钟");
                        }
                        
                        if(data.resolveTime) {
                            $("#request_deal_time").val(data.resolveTime);
                            $("#resovleTime").text(data.resolveTime+"小时");
                        }
                        $("#level").show();
                },"json")
            }
   
   })
    
})
$(function(){
    var priority_id = $("#priority_id").val();
            var influence_id = $("#influence_id").val();
            var serivceListId = '${serivceListId}';
            var customer_id = '${customerId}';
            if(!$.util.isEmpty(priority_id) && !$.util.isEmpty(influence_id) && !$.util.isEmpty(serivceListId) && !$.util.isEmpty(customer_id)) {
                $.post("${base}/ewyw/ewIncident/queryLevel.html",{"priority_id":priority_id,"influence_id":influence_id,"serivceListId":serivceListId,"customer_id":customer_id},function(data,textStatus) {
                        if(data.levelId) {
                            $("#slaId").val(data.levelId);
                        }
                        if(data.levelName) {
                            $("#slaName").val(data.levelName);
                            $("#levelName").text(data.levelName);
                        }
                        
                        if(data.responseTime) {
                            $("#request_answer_time").val(data.responseTime);
                            $("#responseTime").text(data.responseTime+"分钟");
                        }
                        
                        if(data.resolveTime) {
                            $("#request_deal_time").val(data.resolveTime);
                            $("#resovleTime").text(data.resolveTime+"小时");
                        }
                        $("#level").show();
                },"json")
            }
});
function savelevel(){
    var priority_id = $("#priority_id").val();
    var influence_id = $("#influence_id").val();
    var slaId = $("#slaId").val();
    var slaName = $("#slaName").val();
    var request_answer_time = $("#request_answer_time").val();
    var request_deal_time = $("#request_deal_time").val();
    $.post("${base}/ewyw/ewIncident/savelevel.html",{"priority_id":priority_id,"influence_id":influence_id,"slaId":slaId,"slaName":slaName,"request_answer_time":request_answer_time,"request_deal_time":request_deal_time,"wt":wt,"fwt":fwt},function(data,textStatus) {
        if(fwt == 1){
           window.location.href = "${base}/ewyw/ewIncident/ewAddIncidentfwt.html";
        }else if(fwt==2){
            window.location.href = "${base}/ewyw/ewzc/ewzcAdd.html";
        }else{
           if(wt == 1){
              window.location.href = "${base}/ewyw/ewQuestion/ewAddQuestion.html";
           }else{
              window.location.href = "${base}/ewyw/ewIncident/ewAddIncident.html";
           }
        }
    });
                  
}
</script>
</body>
</html>