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
<!-- 人员分派显示页面 -->
[#if nodeTemplateId == Constants.HEALTH_DISPATCH]
    <button type="button" id="button" class="add" onclick="addCi();" ><span>添加巡检配置</span></button>
    [#if ciList??&&ciList?size>0]
    
       [#list ciList as item]
               <section class="worklist clearfix" id="${item.CIID}">
               <h2>
                       <div class="deletes">
                           <a href="javascript:zbEdit('${item.CIID}');"><em class="edit"></em></a>
                           <a href="javascript:remove('${item.CIID}');"><em class="deletes"></em></a>
                       </div>
                   ${item.SEARCHCODE}
               </h2>
               <div class="worklistcon clearfix">
                       <input type="hidden" value="${item.CIID}" class="flag" />
                       <div class="itemDiv${item.CIID}" style="display:none;">
                           [#if item.children??]
                               [#list item.children as ci_item]${ci_item.item_id}-[/#list]
                           [/#if]
                       </div> 
                   <span class="relaicon"></span>
                   <p>配置名称:${item.CINAME}</p>
                   <p>分类名称:${item.CATENAME}</p>
                   <p>存放位置:${item.POSITION}</p>
               </div>
           </section>
       [/#list]
    
    [#else]
       <div class="nodate"><span>无巡检配置</span></div>
    [/#if]
[#else]
    <!-- 工程师处理,结果审核显示页面 -->
    [#if nodeList??&&nodeList?size>0]
           [#list nodeList as ci]
            <div class="inspection-box">
              <div class="inspection-bg">
                  <span [#if nodeTemplateId == Constants.HEALTH_PATROL] onclick="bz('${ci.id}');" [#elseif nodeTemplateId == Constants.HEALTH_APPROVE] onclick="bzDetail('${ci.id}');" [/#if]>备注</span>
                  ${ci.text}
              </div>
              [#if ci.children??&&ci.children?size>0]
                  [#list ci.children as item]
                      <a>
                          <p class="no-next">
                              <span>${item.ITEM_NAME}</span>
                              <label>
                                  [#if nodeTemplateId == Constants.HEALTH_PATROL]
                                    <em onclick="xj('${item.id}');">巡检</em>
                                [#elseif nodeTemplateId == Constants.HEALTH_APPROVE]
                                    <em onclick="xjDetail('${item.id}');">明细</em>
                                [/#if]
                            </label>
                        </p>
                   </a>
                  [/#list]
              [/#if]
            </div>
        [/#list]
    [#else]
       <div class="nodate"><span>无巡检配置</span></div>
    [/#if]
[/#if]
 
<script type="text/javascript">
    function addCi(){
        var ciIds = '';
        var jsonList=[];
        var $hidden = $(".flag");
        if($hidden.size() > 0){
            $hidden.each(function(){
                ciIds += (ciIds?',':'') + $(this).val();
                var itemJson={};
                var item=$.trim($(this).next().html());
                itemJson["itemId"]=item;
                jsonList.push(itemJson);
            });
        }
        var items=JSON.stringify(jsonList);
        window.location.href = "${base}/ewyw/ewHealth/ewAddCiDialog.html?customerId=${info.customer_id}&subCustomerId=${info.sub_customer_id}&flowId=${info.flow_id}&orderId=${orderId}&ciIds="+ciIds+"&items="+items;
    }
    
    function remove(id){
        $("#"+id).remove();
    }
    
    //指标配置
    function zbEdit(id){
        /*
        var jsonList=[];
        var $hidden = $(".flag");
        if($hidden.size() > 0){
            $hidden.each(function(){
                var itemJson={};
                var item=$.trim($(this).next().html());
                itemJson["itemId"]=item;
                jsonList.push(itemJson);
            });
        }
        var items=JSON.stringify(jsonList);*/
        var selectId = "itemDiv"+id;
        var selectedItem = $.trim($("."+selectId).html());
        window.location.href = "${base}/ewyw/ewHealth/ewSelectItem.html?cusId=${info.customer_id}&subCustomerId=${info.sub_customer_id}&orderId=${orderId}&id="+id+"&selectedItem="+selectedItem;
    }
    
    //备注及详情
    function bz(patrolCiId){
        window.location.href = "${base}/ewyw/ewHealth/ewHealthCiPatrol.html?orderId=${orderId}&patrolCiId="+patrolCiId;
    }
    function bzDetail(patrolCiId){
        window.location.href = "${base}/ewyw/ewHealth/ewHealthCiPatrolRead.html?patrolCiId="+patrolCiId;
    }
    //指标巡检及详情
    function xj(patrolItemId){
        window.location.href = "${base}/ewyw/ewHealth/ewHealthItemPatrol.html?orderId=${orderId}&patrolItemId="+patrolItemId;
    }
    function xjDetail(patrolItemId){
        window.location.href = "${base}/ewyw/ewHealth/ewHealthItemPatrolRead.html?patrolItemId="+patrolItemId;
    }
</script>