Bläddra i källkod

Merge branch 'dev1.2' of http://192.168.3.207:10080/qmx/datatag into dev1.2

jiaojiao7 4 år sedan
förälder
incheckning
9b61eb5d1a

+ 6 - 92
src/web/templates/client/cuser_rule_edit.html

@@ -852,104 +852,19 @@
                 matchName.length = 0;
                 
                 
-                if (val==4){
+                           if (val==4){
                   s_matchkey_str=o_rules[selectIndex[0]-1]["s_keymatch"]
-                 if (s_matchkey_str){
                 
-                s_matchkey_list=s_matchkey_str.split(",")
-            
-            for (index_ in s_matchkey_list){
-              console.log(index_,s_matchkey_list[index_])
-              //定位button 添加属性
-              $("#btnGroupMatch").find("input").each(function () {
-           
-                      
-                if ( $(this).attr("code") == s_matchkey_list[index_]){
-                  if (matchCode.indexOf(s_matchkey_list[index_])==-1){
-                   $(this).addClass("active-btn-match");
-                   
-                    matchCode.push($(this).attr("code"));
-                   matchName.push($(this).val())
-           }
-                }
-                 
-    });
-              
-          $("#btnGroupMatch2").find("input").each(function () {
-           
-                      
-                if ( $(this).attr("code") == s_matchkey_list[index_]){
-                  if (matchCode.indexOf(s_matchkey_list[index_])==-1){
-                   $(this).addClass("active-btn-match");
-                   
-                    matchCode.push($(this).attr("code"));
-                   matchName.push($(this).val())
-           }
-                }
-                 
-    });
-              
-        
-        
-        
-        
-        
-         }
-             
-                }
-            
-            
-            
-            
-            
-            
-            
-            
                 }else if(val==6){
                    s_matchkey_str=o_rules[selectIndex[0]-1]["s_addkeymatch"]
-                 if (s_matchkey_str){
                 
-                s_matchkey_list=s_matchkey_str.split(",")
-            
-            for (index_ in s_matchkey_list){
-              console.log(index_,s_matchkey_list[index_])
-              //定位button 添加属性
-              $("#btnGroupMatch").find("input").each(function () {
-           
-                      
-                if ( $(this).attr("code") == s_matchkey_list[index_]){
-                  if (matchCode.indexOf(s_matchkey_list[index_])==-1){
-                   $(this).addClass("active-btn-match");
-                   
-                    matchCode.push($(this).attr("code"));
-                   matchName.push($(this).val())
-           }
-                }
-                 
-    });
-        $("#btnGroupMatch2").find("input").each(function () {
-           
-                      
-                if ( $(this).attr("code") == s_matchkey_list[index_]){
-                  if (matchCode.indexOf(s_matchkey_list[index_])==-1){
-                   $(this).addClass("active-btn-match");
-                   
-                    matchCode.push($(this).attr("code"));
-                   matchName.push($(this).val())
-           }
-                }
-                 
-    });
-                     
-          }
-             
-                }
-            
-            
                 }else if(val==8)
                 {
-                                s_matchkey_str=o_rules[selectIndex[0]-1]["s_notkeymatch"]
-                 if (s_matchkey_str){
+                 s_matchkey_str=o_rules[selectIndex[0]-1]["s_notkeymatch"]
+               
+                }
+
+                  if (s_matchkey_str){
                 
                 s_matchkey_list=s_matchkey_str.split(",")
             
@@ -985,7 +900,6 @@
                   
           }
              
-                }
                 }
                 $('#modal-select-match').modal("show");
             }else {

+ 71 - 7
src/web/templates/client/index.html

@@ -38,28 +38,66 @@
                                         </div>
                                         <div class="box-body">
                                             <div class="row">
-                                                <div class="col-sm-3">
+                                             
 
-                                                    <label class="col-sm-5 control-label">客户名称:</label>
+                                                    <label class="col-sm-2 control-label">客户名称</label>
                                                     <div>
 
                                                         <label id="S_name" class="control-label"
                                                                style="margin-left: 15px;font-weight:normal;"></label>
                                                         <!--<input id="pushSwitch" type="checkbox" checked/>-->
-                                                    </div>
+                                                 
                                                 </div>
 
                                             </div>
-
+                                            <div>
+                                      <div class="form-group" style="margin-top:20px;">
+                                                <label class="col-sm-2 control-label">推送设置</label>
+                                                <div class="col-sm-3">
+                                                    <input id="pushSwitch" type="checkbox" checked disabled />
+                                                </div>
+                                                <script>
+                                                    $('#pushSwitch').on('switchChange.bootstrapSwitch', function (event, state) {
+                                                        if (state) {
+                                                            dataMap["i_push"] = 1
+                                                        }else {
+                                                            dataMap["i_push"] = 0
+                                                        }
+                                                    })
+                                                </script>
+                                            </div>
+                                            <div class="form-group" style="margin-top:20px;">
+                                                <label class="col-sm-2 control-label"><span style="color:red;">* </span>推送模式</label>
+                                                <div class="col-sm-3">
+                                                    <select class="form-control" id="pushModelSelect" disabled>
+                                                        <option value=0>全局模式</option>
+                                                        <option value=1>部门模式</option>
+                                                        <option value=2>标签模式</option>
+                                                        <option value=3>部门+标签模式</option>
+                                                        <option value=4>规则模式(不去重)</option>
+                                                    </select>
+                                                </div>
+                                            </div>
+                                            <div class="form-group" style="margin-top:20px;">
+                                                <label class="col-sm-2 control-label"><span style="color:red;">* </span>推送方式</label>
+                                                <div class="col-sm-3">
+                                                    <select class="form-control" id="pushTypeSelect" disabled>
+                                                        <option value=0 code="email">邮箱</option>
+                                                        <option value=1 code="interface">接口</option>
+                                                    </select>
+                                                </div>
+                                            </div>
+                                            </div>
+                                            
                                             <div>
                                                 <div class="row">
-                                                    <div class="col-sm-3">
-                                                        <label class="col-sm-5 control-label" style="margin-top:20px;">邮箱设置:</label>
+                                                 
+                                                        <label class="col-sm-2 control-label" style="margin-top:20px;">邮箱设置</label>
                                                         <button type="button" class="btn btn-primary addMail"
                                                                 style="margin-left: 15px;padding: 2px 12px;margin-top:24px;">
                                                             添加邮箱
                                                         </button>
-                                                    </div>
+                                              
                                                 </div>
                                                 <div class="row" style="margin-top: 8px;margin-left: 16px">
                                                     <div class="col-lg-7 col-md-offset-1" id="mails">
@@ -252,6 +290,27 @@
             // $('#pushDiv').hide()
         }
         tagruleArr = {{.T.tagrule}}
+        $('#pushSwitch').bootstrapSwitch({
+                onText: "开启",
+                offText: "关闭",
+            })
+            if (dataMap.i_push && dataMap.i_push == 1) {
+                $('#pushSwitch').bootstrapSwitch('state', true);
+            }else {
+                $('#pushSwitch').bootstrapSwitch('state', false);
+            }
+            $("#pushModelSelect option").each(function (){
+                if($(this).val()==dataMap.i_pushmodel){
+                    $(this).attr("selected",'selected');
+                }
+            });
+            $('#pushModelSelect').val(dataMap.i_pushmodel)
+            $("#pushTypeSelect option").each(function (){
+                if($(this).val()==dataMap.i_pushtype){
+                    $(this).attr("selected",'selected');
+                }
+            });
+        /*
         if (dataMap.i_push && dataMap.i_push == 1) {
             $('#pushSwitch').html("开启");
         } else {
@@ -281,8 +340,13 @@
         if (dataMap.i_pushtype == 0) {
             $('#pushTypeSelect').html("邮箱");
         } else if (dataMap.i_pushtype && dataMap.i_pushmodel == 1) {
+<<<<<<< HEAD
+           $('#pushTypeSelect').html("接口");
+        } */
+=======
             $('#pushTypeSelect').html("接口");
         }
+>>>>>>> 9c8b9f9702a7bc63727db3c7f7dce2b63d1cb38b
         $('#S_name').html(dataMap.s_name);
         $('#departTable').DataTable({
             "paging": false,

+ 6 - 1
src/web/templates/com/modal.html

@@ -39,7 +39,12 @@
                         </div>
                         <div id="btnGroupMatch"></div>
                         <div id="btnGroupMatch2" style="margin-top: 15px"></div>
-                    </div>
+                        
+                        
+                 
+                   </div>
+                   <span style="color: red">提示:第一行和第二行不能同时选择,第一行可多选</span>
+
                 </div>
                 <div class="modal-footer">
                     <input type="button" onclick="saveMatch()" class="btn btn-primary saveBtn" value="保存">