|
@@ -6,6 +6,44 @@
|
|
|
{{include "com/modal.html"}}
|
|
|
<script src="/time/js/angular.min.js"></script>
|
|
|
<script src="/time/js/wui-date.js"></script>
|
|
|
+<style>
|
|
|
+ mark {
|
|
|
+ background-color: #00ff90;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ mark1 {
|
|
|
+ background-color: red;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .insertexactRule-form .division-line ,.editexactRule-form .division-line{
|
|
|
+ display: inline-block !important;
|
|
|
+ }
|
|
|
+ .insertexactRule-form .form-group,.editexactRule-form .form-group{
|
|
|
+ display: block;
|
|
|
+ margin-bottom: 1px !important;
|
|
|
+ }
|
|
|
+ .insertexactRule-form .form-group label,.editexactRule-form .form-group label{
|
|
|
+ padding-top: 8px;
|
|
|
+ }
|
|
|
+ .insertexactRule-form .form-group .col-sm-8,.editexactRule-form .form-group .col-sm-8 {
|
|
|
+ margin-bottom: 5px;
|
|
|
+ }
|
|
|
+ .modal-header {
|
|
|
+ border-bottom-color: #fff;
|
|
|
+ padding-bottom: 0px !important;
|
|
|
+ }
|
|
|
+ #addExactRuleButton a {
|
|
|
+ cursor:pointer;
|
|
|
+ }
|
|
|
+ .insertexactRule-form , .editexactRule-form{
|
|
|
+ padding: 10px 10px 0px 10px;
|
|
|
+ }
|
|
|
+ #editExactRuleButton a {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+</style>
|
|
|
<div class="content-wrapper">
|
|
|
<section class="content-header">
|
|
|
<h1> 编辑客户规则
|
|
@@ -435,24 +473,50 @@
|
|
|
<div class="tab-pane" id="tab_3">
|
|
|
<div class="box box-primary">
|
|
|
<div class="box-header with-border">
|
|
|
- <div class="form-group">
|
|
|
- <div class="col-sm-6">
|
|
|
- <textarea name="" id="exactRule" cols="30" rows="10" placeholder="请输入精准筛选规则" style="width: 100%"></textarea>
|
|
|
- </div>
|
|
|
- <div class="col-sm-6">
|
|
|
- 编写规则说明:<br/>
|
|
|
- 1.应用场景:可根据该篇公告标题或全文,匹配的“关键词分组”个数,确定是否推送该篇公告。<br/>
|
|
|
- 2.规则释义:<br/>
|
|
|
- (1)查找范围:title→公告标题,content→公告全文;not为不包含的关系;<br/>
|
|
|
- (2)查找值:关键词分组名;<br/>
|
|
|
- (3)查找范围和查找值用“_”连接;<br/>
|
|
|
- (3)查找条件:数量条件可用>=<;and→且关系,or→或关系;1组条件用()。<br/>
|
|
|
- 3.规则示例(分组名为A和B):(title_A>0 and not content_B) or title_B>4 or (content_A and content_B>1) ,即该篇公告标题包含关键词分组A且公告全文文不包含关键词分组B时即推送,或该篇公告全文包含4个关键词分组B时即推送,或该篇公告全文包含关键词分组A2个及以上且关键词分组B2个及以上时即推送
|
|
|
- </div>
|
|
|
+ <div class="col-sm-10">
|
|
|
+ <h5>说明:可根据公告匹配的“关键词分组”个数,确定是否推送该简公告;符合以下其中1条规则即推送</h5>
|
|
|
</div>
|
|
|
+ <div class="col-sm-2">
|
|
|
+ <button class="btn btn-twitter btn-sm" style="float: right;margin-top: 4px;margin-right: 10px"
|
|
|
+ onclick="addExactRuleShow()"><i class="fa fa-fw fa-file-text fa-lg"></i>新增
|
|
|
+ </button> </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <table id="exactRuleTable" class="table table-bordered">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>编号</th>
|
|
|
+ <th>关键词分组匹配条件</th>
|
|
|
+
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ </table>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- <div class="tab-pane" id="tab_3">-->
|
|
|
+<!-- <div class="box box-primary">-->
|
|
|
+<!-- <div class="box-header with-border">-->
|
|
|
+<!-- <div class="form-group">-->
|
|
|
+<!-- <div class="col-sm-6">-->
|
|
|
+<!-- <textarea name="" id="exactRule" cols="30" rows="10" placeholder="请输入精准筛选规则" style="width: 100%"></textarea>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div class="col-sm-6">-->
|
|
|
+<!-- 编写规则说明:<br/>-->
|
|
|
+<!-- 1.应用场景:可根据该篇公告标题或全文,匹配的“关键词分组”个数,确定是否推送该篇公告。<br/>-->
|
|
|
+<!-- 2.规则释义:<br/>-->
|
|
|
+<!-- (1)查找范围:title→公告标题,content→公告全文;not为不包含的关系;<br/>-->
|
|
|
+<!-- (2)查找值:关键词分组名;<br/>-->
|
|
|
+<!-- (3)查找范围和查找值用“_”连接;<br/>-->
|
|
|
+<!-- (3)查找条件:数量条件可用>=<;and→且关系,or→或关系;1组条件用()。<br/>-->
|
|
|
+<!-- 3.规则示例(分组名为A和B):(title_A>0 and not content_B) or title_B>4 or (content_A and content_B>1) ,即该篇公告标题包含关键词分组A且公告全文文不包含关键词分组B时即推送,或该篇公告全文包含4个关键词分组B时即推送,或该篇公告全文包含关键词分组A2个及以上且关键词分组B2个及以上时即推送-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -492,6 +556,7 @@
|
|
|
var selectIndex = []; //选中的编号
|
|
|
var setValue = 0; // 4: 关键词匹配方式,6:附加词匹配方式,8:排除词匹配方式,9:采购单位,10:公告行业, 2:全局采购单位类型, 3:全局公告行业
|
|
|
var state = 1;
|
|
|
+ var exactRuleTableArr =[];// 临时数组 用于存放规则字符串转换后的数据
|
|
|
var user_id = getParam("id");
|
|
|
var hid = getParam("hid");
|
|
|
var rid = getParam("rid");
|
|
@@ -879,6 +944,42 @@
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
+ exactRuleTableArr = exactRuleStrToArr( dataMap["s_exactRule"])
|
|
|
+ // 精准筛选规则表格
|
|
|
+ $('#exactRuleTable').DataTable({
|
|
|
+ "paging": false,
|
|
|
+ "lengthChange": false,
|
|
|
+ "searching": false,
|
|
|
+ "ordering": false,
|
|
|
+ "info": true,
|
|
|
+ "autoWidth": false,
|
|
|
+ "language": {
|
|
|
+ "url": "/dist/js/dataTables.chinese.lang"
|
|
|
+ },
|
|
|
+ "fnDrawCallback": function () {
|
|
|
+ this.api().column(0).nodes().each(function (cell, i) {
|
|
|
+ cell.innerHTML = i + 1;
|
|
|
+ });
|
|
|
+ this.api().column(2).nodes().each(function (cell, i) {
|
|
|
+ cell.innerHTML = '<div>' +
|
|
|
+ '<a onclick="editExacRuleClick(\'' + i + '\')" >编辑</a>  ' +
|
|
|
+ '<a onclick="delExacRuleClick(\'' + i + '\')" >删除</a>  ' +
|
|
|
+ '</div>';
|
|
|
+ });
|
|
|
+ },
|
|
|
+ "data": exactRuleTableArr,
|
|
|
+ "columns": [
|
|
|
+ {"data": null},
|
|
|
+ {
|
|
|
+ "data": function (row) {
|
|
|
+ return exactRuleDataFormat(row)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "data": null
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
$('#province').selectpicker({
|
|
@@ -1736,7 +1837,7 @@
|
|
|
dataMap["hid"] = hid;
|
|
|
dataMap["rid"] = rid;
|
|
|
dataMap["s_depart_name"] = $("#departmentName").val();
|
|
|
- dataMap["s_exactRule"] = $('#exactRule').val();
|
|
|
+ dataMap["s_exactRule"] = exactRuleArrToStr()
|
|
|
$.ajax({
|
|
|
url: "/service/historyRule/edit",
|
|
|
type: 'POST',
|
|
@@ -2426,4 +2527,282 @@
|
|
|
})
|
|
|
}
|
|
|
//分组管理
|
|
|
+ var ruleGroupList = new Array()
|
|
|
+ // 精准筛选规则-新增按钮点击方法
|
|
|
+ function addExactRuleShow(){
|
|
|
+ // 判断是否设置关键词
|
|
|
+ // 判断是否设置关键词匹配方式
|
|
|
+ // debugger
|
|
|
+ // 判断是否设置关键词
|
|
|
+ if (o_rules.length===0) {
|
|
|
+ showTip("请先设置关键词")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 判断是否设置关键词匹配方式
|
|
|
+ if (!hasMatchWay()){
|
|
|
+ showTip("请先设置关键词匹配方式")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //初始化
|
|
|
+ $("#insertexactRule").html("");
|
|
|
+ $("#addExactRuleButton").show();
|
|
|
+ // 新增精准筛选规则弹框
|
|
|
+ // 请求分组列表接口获取数据
|
|
|
+ ruleHtmlFunc("insert-class","","#insertexactRule")
|
|
|
+ $("#modal-add-exactRule").modal("show");
|
|
|
+ }
|
|
|
+ // 精准筛选规则-新增页面 +新增按钮
|
|
|
+ function addExactRule(){
|
|
|
+ ruleHtmlFunc("insert-class","","#insertexactRule")
|
|
|
+ if ($('.exact-rule-class').length > 3){
|
|
|
+ $("#addExactRuleButton").hide()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 精准筛选规则-新增精准匹配规则保存按钮点击事件
|
|
|
+ function add_exactRule_save(){
|
|
|
+ // 获取值
|
|
|
+ let ruleArr = [];
|
|
|
+ let checkObj = {};
|
|
|
+ let formList = $("#insertexactRule .insertexactRule-form");
|
|
|
+ formList.each(function() {
|
|
|
+ var groupName = $(this).find('select[name="groupSelect"]').val();
|
|
|
+ var count = $(this).find('input[name="count"]').val();
|
|
|
+ var matchWayValue = $(this).find('select[name="matchWay"]').val();
|
|
|
+ if (groupName===""||matchWayValue.length===0||count===""){
|
|
|
+ // todo
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ for (let j = 0; j < matchWayValue.length; j++) {
|
|
|
+ let rule = {
|
|
|
+ "group":groupName,"match_way":matchWayValue[j],"count":count
|
|
|
+ }
|
|
|
+ if(checkObj[groupName+"_"+count+"_"+matchWayValue[j]]){
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ checkObj[groupName+"_"+count+"_"+matchWayValue[j]] = matchWayValue[j]
|
|
|
+ ruleArr.push(rule)
|
|
|
+ }
|
|
|
+ console.log(matchWayValue);
|
|
|
+ });
|
|
|
+ if (ruleArr.length===0){
|
|
|
+ showMsg("规则已存在!")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 保存到exactRuleTableArr 临时数组
|
|
|
+ exactRuleTableArr.push(ruleArr)
|
|
|
+ $('#exactRuleTable').dataTable().fnClearTable();
|
|
|
+ $('#exactRuleTable').dataTable().fnAddData(exactRuleTableArr);
|
|
|
+ if (exactRuleTableArr.length == 0) {
|
|
|
+ $('#exactRuleTable').dataTable().fnClearTable();
|
|
|
+ }
|
|
|
+ $("#modal-add-exactRule").modal("hide");
|
|
|
+
|
|
|
+ }
|
|
|
+ // 精准筛选规则-临时数组转换成规则字符串
|
|
|
+ // [[{"group":"A","match_way":"content","count":5},{},{}],[]]
|
|
|
+ // (title_A>0 and content_B>8) or title_B>4 or (content_A>7 and content_B>1)
|
|
|
+ function exactRuleArrToStr(){
|
|
|
+ let ruleStrArr = []
|
|
|
+ for (let i = 0; i < exactRuleTableArr.length; i++) {
|
|
|
+ let rulesArr = [];
|
|
|
+ for (let j = 0; j < exactRuleTableArr[i].length; j++) {
|
|
|
+ let count =exactRuleTableArr[i][j].count-1
|
|
|
+ let group = exactRuleTableArr[i][j].group
|
|
|
+ let match_way = exactRuleTableArr[i][j].match_way
|
|
|
+ let rule = match_way+"_"+group+">"+count
|
|
|
+ rulesArr.push(rule)
|
|
|
+ }
|
|
|
+ if (rulesArr.length>1){ // 拼接小括号
|
|
|
+ ruleStrArr.push("("+rulesArr.join(" and ")+")")
|
|
|
+ }else {
|
|
|
+ if (rulesArr.length>0){
|
|
|
+ ruleStrArr.push(rulesArr[0])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ruleStrArr.join(" or ")
|
|
|
+ }
|
|
|
+ // (title_A>0 and content_B>8) or title_B>4 or (content_A>7 and content_B>1)
|
|
|
+ // 精准筛选规则-规则字符串转换成临时数组 仅支持这种格式 (title_A>0 and content_B>8) or title_B>4 or (content_A>7 and content_B>1)
|
|
|
+ // 分组名称不要包含公式中的符号 : 下划线、>、()、or、and
|
|
|
+ function exactRuleStrToArr( exactRuleStr) {
|
|
|
+ if (exactRuleStr===undefined||exactRuleStr===""){
|
|
|
+ return []
|
|
|
+ }
|
|
|
+ let exactRuleTableArrTmp = []
|
|
|
+ // let exactRuleStr = "(title_A>0 and content_B>8) or title_B>4 or (content_A>7 and content_B>1)"
|
|
|
+ let exactRuleList = exactRuleStr.split(" or ") // 分割成单条规则
|
|
|
+ for (let i=0; i< exactRuleList.length; i++) {
|
|
|
+ let exactRuleTmp = exactRuleList[i]
|
|
|
+ let rulesArr = [];
|
|
|
+ if (exactRuleTmp.startsWith("(")) {
|
|
|
+ exactRuleTmp = exactRuleTmp.slice(1, -1) //去掉首尾的括号
|
|
|
+ }
|
|
|
+ let singleRuleArr = exactRuleTmp.split(" and ") // 分割单条规则中的数据
|
|
|
+ for (let j=0;j<singleRuleArr.length;j++) {
|
|
|
+ let singleRule =singleRuleArr[j]
|
|
|
+ // 匹配方式
|
|
|
+ let singleRuleSplit = singleRule.split("_")
|
|
|
+ if (singleRuleSplit.length<2){
|
|
|
+ console.log("singleRuleSplit 长度不够",singleRuleSplit)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let matchWay = singleRuleSplit[0] // 第一位是匹配方式
|
|
|
+ // 然后接着分割出分组名称和次数 使用 _
|
|
|
+ let singleRuleSplit2 = singleRuleSplit[1].split(">")
|
|
|
+ if (singleRuleSplit2.length<2){
|
|
|
+ console.log("singleRuleSplit2 长度不够",singleRuleSplit2)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let groupName = singleRuleSplit2[0]
|
|
|
+ let count = singleRuleSplit2[1]
|
|
|
+ // 次数 次数这里要+1 因为展示框里用的是>= 公式里面用的是>
|
|
|
+ let rule = {
|
|
|
+ "group":groupName,"match_way":matchWay,"count":parseInt(count)+1
|
|
|
+ }
|
|
|
+ rulesArr.push(rule)
|
|
|
+ }
|
|
|
+ exactRuleTableArrTmp.push(rulesArr)
|
|
|
+ }
|
|
|
+ return exactRuleTableArrTmp;
|
|
|
+ }
|
|
|
+ var editexactRuleId = 0;
|
|
|
+ const matchWayMap = {
|
|
|
+ "title":"标题匹配",
|
|
|
+ "content":"全文匹配"
|
|
|
+ }
|
|
|
+ // 规则数组转换列表字符串
|
|
|
+ function exactRuleDataFormat(contentArr ){
|
|
|
+ // keyArr 定义数组 维持最后有序
|
|
|
+ let keyArr = []
|
|
|
+ // 合并 标题正文 如果
|
|
|
+ let tmpDict = {}
|
|
|
+ for (let i = 0; i < contentArr.length; i++) {
|
|
|
+ let keyGroupCount = contentArr[i].group+"_"+ contentArr[i].count
|
|
|
+ if (tmpDict.hasOwnProperty(keyGroupCount)){
|
|
|
+ tmpDict[keyGroupCount].match_way.add(matchWayMap[contentArr[i].match_way])
|
|
|
+ }else {
|
|
|
+ let set = new Set();
|
|
|
+ tmpDict[keyGroupCount] = {
|
|
|
+ "group":contentArr[i].group,"match_way":set.add(matchWayMap[contentArr[i].match_way]),"count":contentArr[i].count
|
|
|
+ }
|
|
|
+ keyArr.push(keyGroupCount)
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let str = ""
|
|
|
+ for (let tmpDictKey in keyArr) {
|
|
|
+ str += "关键词分组:"+tmpDict[keyArr[tmpDictKey]].group+",出现次数>="+tmpDict[keyArr[tmpDictKey]].count+",匹配方式:"+Array.from(tmpDict[keyArr[tmpDictKey]].match_way).join(",")+";"
|
|
|
+ }
|
|
|
+ return str
|
|
|
+ }
|
|
|
+ // 删除 点击事件
|
|
|
+ function delExacRuleClick(index) {
|
|
|
+ index = parseInt(index)
|
|
|
+ showConfirm("确定删除?", function () {
|
|
|
+ exactRuleTableArr = $.grep(exactRuleTableArr,function (n,i) {
|
|
|
+ return i!==index
|
|
|
+ })
|
|
|
+ $('#exactRuleTable').dataTable().fnClearTable();
|
|
|
+ $('#exactRuleTable').dataTable().fnAddData(exactRuleTableArr);
|
|
|
+ if (exactRuleTableArr.length == 0) {
|
|
|
+ $('#exactRuleTable').dataTable().fnClearTable();
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ function showGroupListData(){
|
|
|
+ $.ajax({
|
|
|
+ url: "/service/cuser/groupList",
|
|
|
+ type: "post",
|
|
|
+ data: {"id": dataMap.rid},
|
|
|
+ async: false,
|
|
|
+ success: function (r) {
|
|
|
+ if (r.data) {
|
|
|
+ ruleGroupList=r.data;
|
|
|
+ }
|
|
|
+ }})
|
|
|
+ }
|
|
|
+ // 编辑点击事件
|
|
|
+ function editExacRuleClick(index){
|
|
|
+ $("#editexactRule").html("");
|
|
|
+ $("#editExactRuleButton").show();
|
|
|
+ editexactRuleId = index;
|
|
|
+ // 铺数据
|
|
|
+ let contentArr = exactRuleTableArr[index]
|
|
|
+ // keyArr 定义数组 维持最后有序
|
|
|
+ let keyArr = []
|
|
|
+ // 合并 标题正文
|
|
|
+ let tmpDict = {}
|
|
|
+ for (let i = 0; i < contentArr.length; i++) {
|
|
|
+ let keyGroupCount = contentArr[i].group+"_"+ contentArr[i].count
|
|
|
+ if (tmpDict.hasOwnProperty(keyGroupCount)){
|
|
|
+ tmpDict[keyGroupCount].match_way.add(contentArr[i].match_way)
|
|
|
+ }else {
|
|
|
+ let set = new Set();
|
|
|
+ tmpDict[keyGroupCount] = {
|
|
|
+ "group":contentArr[i].group,"match_way":set.add(contentArr[i].match_way),"count":contentArr[i].count
|
|
|
+ }
|
|
|
+ keyArr.push(keyGroupCount)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let i = 0; i < keyArr.length; i++) {
|
|
|
+ var keyGroup = tmpDict[keyArr[i]].group;
|
|
|
+ var count = tmpDict[keyArr[i]].count;
|
|
|
+ var matchWay = tmpDict[keyArr[i]].match_way;
|
|
|
+ ruleHtmlFunc("edit-class",keyArr[i],"#editexactRule");
|
|
|
+ $('#editexactRule .'+keyArr[i]+' select[name=groupSelect]').selectpicker('val',keyGroup);
|
|
|
+ $('#editexactRule .'+keyArr[i]+' input[name=count]').val(count);
|
|
|
+ let matchWayArr = Array.from(matchWay);
|
|
|
+ $('#editexactRule .'+keyArr[i]+' select[name=matchWay]').val("").trigger("change").selectpicker('val',matchWayArr);
|
|
|
+ }
|
|
|
+ $("#modal-edit-exactRule").modal("show");
|
|
|
+ }
|
|
|
+ // 编辑保存
|
|
|
+ function edit_exactRule_save(){
|
|
|
+ // let index = $("#editexactRuleId").text()
|
|
|
+ // 获取数
|
|
|
+ let ruleArr = []
|
|
|
+ let formList = $("#editexactRule .editexactRule-form")
|
|
|
+ formList.each(function() {
|
|
|
+ var groupName = $(this).find('select[name="groupSelect"]').val();
|
|
|
+ var count = $(this).find('input[name="count"]').val();
|
|
|
+ var matchWayValue = $(this).find('select[name="matchWay"]').val();
|
|
|
+ if (groupName===""||matchWayValue.length===0||count===""){
|
|
|
+ // todo
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ for (let j = 0; j < matchWayValue.length; j++) {
|
|
|
+ let rule = {
|
|
|
+ "group":groupName,"match_way":matchWayValue[j],"count":count
|
|
|
+ }
|
|
|
+ ruleArr.push(rule)
|
|
|
+ }
|
|
|
+ console.log(matchWayValue);
|
|
|
+ });
|
|
|
+ // 保存到exactRuleTableArr 临时数组
|
|
|
+ exactRuleTableArr[editexactRuleId] = ruleArr
|
|
|
+ $('#exactRuleTable').dataTable().fnClearTable();
|
|
|
+ $('#exactRuleTable').dataTable().fnAddData(exactRuleTableArr);
|
|
|
+ if (exactRuleTableArr.length === 0) {
|
|
|
+ $('#exactRuleTable').dataTable().fnClearTable();
|
|
|
+ }
|
|
|
+ $("#modal-edit-exactRule").modal("hide");
|
|
|
+ }
|
|
|
+ // 精准筛选规则-编辑页面 +新增按钮
|
|
|
+ function editExactRule(){
|
|
|
+ ruleHtmlFunc("edit-class","","#editexactRule")
|
|
|
+ if ($('.edit-class').length > 3){
|
|
|
+ $("#editExactRuleButton").hide();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 判断是否设置匹配方式
|
|
|
+ function hasMatchWay() {
|
|
|
+ for (let i = 0; i < o_rules.length; i++) {
|
|
|
+ if (o_rules[i]["s_keymatch"]!=""&&o_rules[i]["s_keymatch"]!=undefined){
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
</script>
|