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
<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <title>领导桌面</title>
[#include "/business/pages/include/static.html" /]
</head>
<body class="service">
[#include "/business/pages/desktop/deskheader.html" /]
[#include "/business/pages/desktop/deskMenuInclude.html" /]
 
<!-- 总体概况 -->
<div  style="height: 400px" class="departmanager_analysis clearfix">
    <div id="satisfactionSurvey"></div>
</div>
    
<div class="programan clearfix">
    <div class="programan_list">
        <div class="programan_listarrow"><a href="javascript:lastStep()"><img id="listTop" src="${common_static}/static/ui/images/zc-icon-164.gif"></a></div>
        <ul id="navigation" class=" programan_listitem">
          [#if cusList??&&cusList?size>0]
          [#list cusList as item]
              [#if item_index<6]
              <li>
              <a id="${item.id}" index="${item_index}" [#if item_index==0]class="focus"[/#if]href="javascript:showCusSurvey('${item.id}');">${item.name}</a>
              </li>
              [/#if]
          [/#list]
          [/#if]
        </ul>
        <div class="programan_listarrow programan_listarrowb"><a href="javascript:nextStep()"><img id="listEnd" [#if cusList??&&cusList?size>6]src="${common_static}/static/ui/images/zc-icon-163-1.gif"[#else]src="${common_static}/static/ui/images/zc-icon-163.gif"[/#if]> </a></div>
    </div>
      
<div class="programan_details">
    <div class="programan_detailscon clearfix">
    <table border="0">
        <tr><td>${Constants.CUSTOMER_CONSTANTS}名称:<font id="p_cus_name"></font></td></tr>
        <tr><td>联系人:<font id="p_cus_contact"></font></td></tr>
        <tr><td>联系方式:<font id="p_cus_phone"></font></td></tr>
        <tr><td>服务开始时间:<font id="p_begin_date"></font></td></tr>
        <tr><td>服务结束时间:<font id="p_end_date"></font></td></tr>
    </table>
     
    <div class="programan_details_graph" >
          <div id="satisCusfactionSurvey"></div>
    </div>
    </div>
</div>
</div>
 
 
<script type="text/javascript">
initSplineStyle();
$(function(){
    //初始化满意度总体概况
    $.post("${base}/business/pages/desktop/getCusSatisfactionSurvey.html",function(data){
        showSurveyChart(data);
    },'json')
    
    //初始化项目满意度走势图
    var selCusId = $("#navigation a.focus").attr("id")
    showCusSurvey(selCusId);
})
 
//显示总体概况
function showSurveyChart(data){
    $('#satisfactionSurvey').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: '满意度概况'
        },
        subtitle: {
            text: ''
        },
        plotOptions: {
            column: {
                pointWidth: 40
            }
        },
        xAxis: {
            categories: data.categories,
            labels: {
                rotation: -45,
                align: 'right'
            }
        },
        yAxis: {
            title: {
                text: '分数'
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }],
            allowDecimals: false,
            min: 0
        },
        tooltip: {
            valueSuffix: '分'
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: '整体得分',
            data: data.series,
            dataLabels: {
                enabled: true,
                rotation: -90,
                color: '#FFFFFF',
                align: 'right',
                x: 4,
                y: 10
            }
        }]
    });
}
 
/**
 * 显示项目满意度概况
 */
function showCusSurvey(cusId){
    $("#navigation a.focus").removeClass("focus");
    $("#"+cusId).addClass("focus");
    $.post("${base}/business/pages/desktop/getCusSatisfactionDetail.html",{"cusId":cusId},function(data){
        showCusSurveyChart(data);
        var cusInfo = data.cusInfo;
        $("#p_cus_name").text(cusInfo.name);
        $("#p_cus_contact").text(cusInfo.contact);
        $("#p_cus_phone").text(cusInfo.phone);
        $("#p_begin_date").text(cusInfo.begin_date);
        $("#p_end_date").text(cusInfo.end_date);
    },'json')
}
 
function showCusSurveyChart(data){
    $('#satisCusfactionSurvey').highcharts({
           chart: {
            type: 'spline',
            height:308 
        },
        title: {
            text: '',
            x: -20 
        },
        xAxis: {
            categories: data.categories
        },
        yAxis: {
            title: {
                text: ''
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }],
            allowDecimals: false,
            min: 0
        },
        tooltip: {
            valueSuffix: '分'
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: data.series
    });
}
 
function lastStep(){
    var lastIndex = $("#navigation a:first").attr("index");
    $.post("${base}/business/pages/desktop/getLastStep.html",{"lastIndex":lastIndex},function(data){
        if(data.length>0){
            $("#listEnd").attr("src","${common_static}/static/ui/images/zc-icon-163-1.gif")
            var htmlStr = "";
            $(data).each(function(){ 
                htmlStr = htmlStr + '<li><a id="'+this.id+'" index="'+this.index+'" href="javascript:showCusSurvey(\''+this.id+'\');">';
                htmlStr= htmlStr + this.name+'</a></li>';
                if(this.flowTop){
                    $("#listTop").attr("src","${common_static}/static/ui/images/zc-icon-164.gif")
                }    
            }); 
            $("#navigation").html(htmlStr);
        }
    },'json');
}
 
function nextStep(){
    var nextIndex = $("#navigation a:last").attr("index");
    $.post("${base}/business/pages/desktop/getNextStep.html",{"nextIndex":nextIndex},function(data){
        if(data.length>0){
            $("#listTop").attr("src","${common_static}/static/ui/images/zc-icon-164-1.gif")
            var htmlStr = "";
            $(data).each(function(){ 
                if(this.flowOver){
                    $("#listEnd").attr("src","${common_static}/static/ui/images/zc-icon-163.gif")
                }
                htmlStr = htmlStr + '<li><a id="'+this.id+'" index="'+this.index+'" href="javascript:showCusSurvey(\''+this.id+'\');">';
                htmlStr= htmlStr + this.name+'</a></li>';
            }); 
            $("#navigation").html(htmlStr);
        }
    },'json');
}
</script>
[#include "/business/pages/include/footer.html" /]
</body>
</html>