|
@@ -185,7 +185,7 @@
|
|
|
id="keyword_txt"></textarea></div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
- <label class="col-sm-2 control-label">附件词</label>
|
|
|
+ <label class="col-sm-2 control-label">附加词</label>
|
|
|
<div class="col-sm-10">
|
|
|
<textarea class="form-control" style="max-width: 100%" placeholder="输入附件词"
|
|
|
id="addword_txt"></textarea></div>
|
|
@@ -260,133 +260,205 @@
|
|
|
|
|
|
<!-- 通用标签modal -->
|
|
|
<div class="modal fade" id="modal-comrule" tabindex="-1" role="dialog" aria-hidden="true">
|
|
|
- <div class="modal-dialog" style="width: 80%">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
- <div class="edit-form">
|
|
|
- <div class="edit-info">
|
|
|
- <span class="info"><i class="fa fa-fw fa-tags fa-lg"></i>通用标签</span>
|
|
|
- <button class="btn btn-sm btn-success" style="margin-left:12px;margin-top: -3px;" onclick="addcomrule()"><i class="fa fa-fw fa-check-square fa-lg"></i>新增标签
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="content">
|
|
|
- <table id="comrule" class="table table-bordered" style="white-space: nowrap;width:100%">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>编号</th>
|
|
|
- <th><input type="checkbox" id="selrow" onclick="selectrow(this)"/></th>
|
|
|
- <th>标签名称</th>
|
|
|
- <th>附加词类型</th>
|
|
|
- <th>排除词类型</th>
|
|
|
- <th>创建时间</th>
|
|
|
- <th>创建人</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div><!-- /.modal -->
|
|
|
+ <div class="modal-dialog" style="width: 80%">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <div class="modal-header">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
+ <div class="edit-form">
|
|
|
+ <div class="edit-info">
|
|
|
+ <span class="info"><i class="fa fa-fw fa-tags fa-lg"></i>通用标签</span>
|
|
|
+ <button class="btn btn-sm btn-success" style="margin-left:12px;margin-top: -3px;"
|
|
|
+ onclick="addcomrule()"><i class="fa fa-fw fa-check-square fa-lg"></i>新增标签
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="content">
|
|
|
+ <table id="comrule" class="table table-bordered">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>编号</th>
|
|
|
+ <th><input type="checkbox" id="selrow" onclick="selectrow(this)"/></th>
|
|
|
+ <th>标签名称</th>
|
|
|
+ <th>附加词类型</th>
|
|
|
+ <th>排除词类型</th>
|
|
|
+ <th>采购单位行业</th>
|
|
|
+ <th>公告行业</th>
|
|
|
+ <th>创建时间</th>
|
|
|
+ <th>创建人</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div><!-- /.modal -->
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
- //通用标签列表
|
|
|
- function importcomrule(){
|
|
|
- comruletable=$('#comrule').DataTable({
|
|
|
- "destroy": true,
|
|
|
- "paging": true,
|
|
|
- "lengthChange": false,
|
|
|
- "searching": true,
|
|
|
- "ordering": false,
|
|
|
- "info": true,
|
|
|
- "autoWidth": false,
|
|
|
- "serverSide": true,
|
|
|
- "ajax": {
|
|
|
- url: "/service/common_rule/list",
|
|
|
- type: "post",
|
|
|
- data: {},
|
|
|
- },
|
|
|
- "language": {
|
|
|
- "url": "/dist/js/dataTables.chinese.lang"
|
|
|
- },
|
|
|
- "fnDrawCallback": function () {
|
|
|
- $("ul.pagination").prepend(" 转到第 <input type='text' id='changePage_comrule' style='width:20px;'> 页 <a type='text' href='javascript:void(0);' id='dataTable-comrule' style='text-align:center'>GO</a>");
|
|
|
- $('#dataTable-comrule').click(function (e) {
|
|
|
- var redirectpage = 0
|
|
|
- if ($("#changePage_comrule").val() && $("#changePage_comrule").val() > 0) {
|
|
|
- var redirectpage = $("#changePage_comrule").val() - 1;
|
|
|
- }
|
|
|
- comruletable.page(redirectpage).draw(false);
|
|
|
- });
|
|
|
- this.api().column(0).nodes().each(function (cell, i) {
|
|
|
- cell.innerHTML = i + 1;
|
|
|
- });
|
|
|
- },
|
|
|
- "columns": [
|
|
|
- {"data": null, width: "1%"},
|
|
|
- {"data": "_id", width: "1%", render: function(val,a,row) {
|
|
|
- return "<input type='checkbox' value='"+val+"' addkeytype='"+row.i_globaladdkeytype+"' notkeytype='"+row.i_globalnotkeytype+"' style='text-align: center'/>"
|
|
|
- }},
|
|
|
- {"data": "s_tagname"},
|
|
|
- {"data": "i_globaladdkeytype"},
|
|
|
- {"data": "i_globalnotkeytype"},
|
|
|
- {"data": "i_createtime", render: function (val) {
|
|
|
- var dt = new Date()
|
|
|
- dt.setTime(parseInt(val) * 1000)
|
|
|
- return dt.format("yyyy-MM-dd hh:mm:ss")
|
|
|
- }},
|
|
|
- {"data": "s_createuser"}
|
|
|
- ]
|
|
|
- })
|
|
|
- $("#modal-comrule").modal("show");
|
|
|
- }
|
|
|
-
|
|
|
- //新增通用标签
|
|
|
- function addcomrule(){
|
|
|
- var ids=[];
|
|
|
- var type1map={};
|
|
|
- var type2map={};
|
|
|
- //在编辑追加的时候考虑在编标签和通用标签匹配方式类型的一致性
|
|
|
- //if(dataMap.i_globaladdkeytype != undefined){
|
|
|
- // type1map[dataMap.i_globaladdkeytype+""] =true;
|
|
|
- //}else if(dataMap.i_globalnotkeytype != undefined){
|
|
|
- // type2map[dataMap.i_globalnotkeytype+""] =true;
|
|
|
- //}
|
|
|
- $("#comrule_wrapper td input[type=checkbox]").each(function(){
|
|
|
- if($(this).prop("checked")){
|
|
|
- ids.push($(this).val());
|
|
|
- var type1 = $(this).attr("addkeytype");
|
|
|
- type1map[type1] =true;
|
|
|
- var type2 = $(this).attr("notkeytype");
|
|
|
- type2map[type2] =true;
|
|
|
- }
|
|
|
- });
|
|
|
- if(Object.keys(type1map).length ==2){
|
|
|
- alert("附加词类型不完全一致")
|
|
|
- return
|
|
|
- }else if(Object.keys(type2map).length == 2){
|
|
|
- alert("排除词类型不完全一致")
|
|
|
- return
|
|
|
+ //通用标签列表
|
|
|
+ function importcomrule() {
|
|
|
+ comruletable = $('#comrule').DataTable({
|
|
|
+ "destroy": true,
|
|
|
+ "paging": true,
|
|
|
+ "lengthChange": false,
|
|
|
+ "searching": true,
|
|
|
+ "ordering": false,
|
|
|
+ "info": true,
|
|
|
+ "autoWidth": false,
|
|
|
+ "serverSide": true,
|
|
|
+ "ajax": {
|
|
|
+ url: "/service/common_rule/list",
|
|
|
+ type: "post",
|
|
|
+ data: {},
|
|
|
+ },
|
|
|
+ "language": {
|
|
|
+ "url": "/dist/js/dataTables.chinese.lang"
|
|
|
+ },
|
|
|
+ "fnDrawCallback": function () {
|
|
|
+ $("ul.pagination").prepend(" 转到第 <input type='text' id='changePage_comrule' style='width:20px;'> 页 <a type='text' href='javascript:void(0);' id='dataTable-comrule' style='text-align:center'>GO</a>");
|
|
|
+ $('#dataTable-comrule').click(function (e) {
|
|
|
+ var redirectpage = 0
|
|
|
+ if ($("#changePage_comrule").val() && $("#changePage_comrule").val() > 0) {
|
|
|
+ var redirectpage = $("#changePage_comrule").val() - 1;
|
|
|
+ }
|
|
|
+ comruletable.page(redirectpage).draw(false);
|
|
|
+ });
|
|
|
+ this.api().column(0).nodes().each(function (cell, i) {
|
|
|
+ cell.innerHTML = i + 1;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ "columns": [
|
|
|
+ {"data": null},
|
|
|
+ {"data": "_id", width: "1%", render: function (val, a, row) {
|
|
|
+ return "<input type='checkbox' value='" + val + "' addkeytype='" + row.i_globaladdkeytype + "' notkeytype='" + row.i_globalnotkeytype + "' style='text-align: center'/>"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {"data": "s_tagname"},
|
|
|
+ {"data": "i_globaladdkeytype"},
|
|
|
+ {"data": "i_globalnotkeytype"},
|
|
|
+ {"data": "s_globalbuyerclass", render: function (val) {
|
|
|
+ if (val && val != "") {
|
|
|
+ return val
|
|
|
+ } else {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ }, width: "18%"},
|
|
|
+ {"data": function (row) {
|
|
|
+ if (row.s_globaltopscopeclass && row.s_globaltopscopeclass != "") {
|
|
|
+ return row.s_globaltopscopeclass
|
|
|
+ } else if (row.s_globalsubscopeclass && row.s_globalsubscopeclass != "") {
|
|
|
+ return row.s_globalsubscopeclass
|
|
|
+ } else {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ }, width: "18%"},
|
|
|
+ {"data": "i_createtime", render: function (val) {
|
|
|
+ var dt = new Date();
|
|
|
+ dt.setTime(parseInt(val) * 1000);
|
|
|
+ return dt.format("yyyy-MM-dd")
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {"data": "s_createuser"}
|
|
|
+ ],
|
|
|
+ "columnDefs": [{
|
|
|
+ "targets": [5],
|
|
|
+ "render": function (data, type, full, meta) {
|
|
|
+ if (data && data.length > 24) {
|
|
|
+ return "<a title='" + data + "' href='#' style='text-decoration: none;'>" + data.trim().substr(0, 24) + "..." + "</a>";
|
|
|
+ } else if (data == undefined) {
|
|
|
+ return ""
|
|
|
+ } else {
|
|
|
+ return data
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ "targets": [6],
|
|
|
+ "render": function (data, type, full, meta) {
|
|
|
+ if (data && data.length > 24) {
|
|
|
+ return "<a title='" + data + "' href='#' style='text-decoration: none;'>" + data.trim().substr(0, 24) + "..." + "</a>";
|
|
|
+ } else if (data == undefined) {
|
|
|
+ return ""
|
|
|
+ } else {
|
|
|
+ return data
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ });
|
|
|
+ $("#modal-comrule").modal("show");
|
|
|
}
|
|
|
- if(ids.length > 0){
|
|
|
- showConfirm("确定新增标签?", function() {
|
|
|
- $.post("/service/rule/importcomrule",{"ids":ids.join(","),"tagid":dataMap._id},function(d){
|
|
|
- if(d&&d.rep){
|
|
|
- $("#modal-comrule").modal("hide");
|
|
|
- addcomdata(d);
|
|
|
- }else{
|
|
|
- showTip("新增失败",1000);
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- }else{
|
|
|
- alert("请选中标签!");
|
|
|
+
|
|
|
+ //新增通用标签
|
|
|
+ function addcomrule() {
|
|
|
+ var ids = [];
|
|
|
+ var type1map = {};
|
|
|
+ var type2map = {};
|
|
|
+ var buyerArr = [];
|
|
|
+ var topScopeArr = [];
|
|
|
+ var subScopeArr = [];
|
|
|
+ var table = $('#comrule').dataTable();
|
|
|
+ var nTrs = table.fnGetNodes();
|
|
|
+ for (var i = 0; i < nTrs.length; i++) {
|
|
|
+ if ($(nTrs[i].childNodes[1]).find("input").prop("checked")) {
|
|
|
+ ids.push(table.fnGetData(nTrs[i])._id);
|
|
|
+ var type1 = table.fnGetData(nTrs[i]).i_globaladdkeytype;
|
|
|
+ type1map[type1] = true;
|
|
|
+ var type2 = table.fnGetData(nTrs[i]).i_globalnotkeytype;
|
|
|
+ type2map[type2] = true;
|
|
|
+
|
|
|
+ buyerArr.push(table.fnGetData(nTrs[i]).s_globalbuyerclass);
|
|
|
+ topScopeArr.push(table.fnGetData(nTrs[i]).s_globaltopscopeclass);
|
|
|
+ subScopeArr.push(table.fnGetData(nTrs[i]).s_globalsubscopeclass);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (buyerArr.length > 0) {
|
|
|
+ if (buyerArr.some(function (value, index) {
|
|
|
+ return value !== buyerArr[0];
|
|
|
+ })) {
|
|
|
+ alert("采购单位行业不一致");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (topScopeArr.length > 0) {
|
|
|
+ if (topScopeArr.some(function (value, index) {
|
|
|
+ return value !== topScopeArr[0];
|
|
|
+ })) {
|
|
|
+ alert("公告行业不一致");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }else if (subScopeArr.length > 0) {
|
|
|
+ if (subScopeArr.some(function (value, index) {
|
|
|
+ return value !== subScopeArr[0];
|
|
|
+ })) {
|
|
|
+ alert("公告行业不一致");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (Object.keys(type1map).length == 2) {
|
|
|
+ alert("附加词类型不完全一致");
|
|
|
+ return
|
|
|
+ } else if (Object.keys(type2map).length == 2) {
|
|
|
+ alert("排除词类型不完全一致");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (ids.length > 0) {
|
|
|
+ showConfirm("确定新增标签?", function () {
|
|
|
+ $.post("/service/rule/importcomrule", {"ids": ids.join(","), "tagid": dataMap._id}, function (d) {
|
|
|
+ if (d && d.rep) {
|
|
|
+ $("#modal-comrule").modal("hide");
|
|
|
+ addcomdata(d);
|
|
|
+ } else {
|
|
|
+ showTip("新增失败", 1000);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ alert("请选中标签!");
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+
|
|
|
//选择器
|
|
|
function selectrow(me) {
|
|
|
var sel = $(me);
|
|
@@ -413,123 +485,123 @@
|
|
|
function cancelModel1() {
|
|
|
$('#modal-add-keyword').modal('hide')
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//追加通用标签数据
|
|
|
- function addcomdata(d){
|
|
|
- /*
|
|
|
- //province赋值
|
|
|
- if(d.data.s_area != undefined){
|
|
|
- $("#province").find("option").each(function(){
|
|
|
- if(d.data.s_area.indexOf($(this).val()) != -1){
|
|
|
- $(this).attr("selected",true);
|
|
|
- }
|
|
|
- })
|
|
|
- $("#province").selectpicker("refresh");//刷新select框
|
|
|
- dataMap.s_area = d.data.s_area;
|
|
|
- }
|
|
|
- //city赋值
|
|
|
- if(d.data.s_city != undefined){
|
|
|
- $("#city").find("option").each(function(){
|
|
|
- if(d.data.s_city.indexOf($(this).val()) != -1){
|
|
|
- $(this).attr("selected",true);
|
|
|
- }
|
|
|
- })
|
|
|
- $("#city").selectpicker("refresh");//刷新select框
|
|
|
- dataMap.s_city = d.data.s_city;
|
|
|
- }
|
|
|
- //district赋值
|
|
|
- if(d.data.s_district != undefined){
|
|
|
- $("#district").find("option").each(function(){
|
|
|
- if(d.data.s_district.indexOf($(this).val()) != -1){
|
|
|
- $(this).attr("selected",true);
|
|
|
- }
|
|
|
- })
|
|
|
- $("#district").selectpicker("refresh");//刷新select框
|
|
|
- dataMap.s_district = d.data.s_district;
|
|
|
- }
|
|
|
- //一级公告类别赋值
|
|
|
- if(d.data.s_toptype != undefined){
|
|
|
- $("#topTypeSelect").find("option").each(function(){
|
|
|
- if(d.data.s_toptype.indexOf($(this).val()) != -1){
|
|
|
- $(this).attr("selected",true);
|
|
|
- }
|
|
|
- })
|
|
|
- $("#topTypeSelect").selectpicker("refresh");//刷新select框
|
|
|
- dataMap.s_toptype = d.data.s_toptype;
|
|
|
- }
|
|
|
- //二级公告类别赋值
|
|
|
- if(d.data.s_subtype != undefined){
|
|
|
- $("#subTypeSelect").find("option").each(function(){
|
|
|
- if(d.data.s_subtype.indexOf($(this).val()) != -1){
|
|
|
- $(this).attr("selected",true);
|
|
|
- }
|
|
|
- })
|
|
|
- $("#subTypeSelect").selectpicker("refresh");//刷新select框
|
|
|
- dataMap.s_subtype = d.data.s_subtype;
|
|
|
- }
|
|
|
- //选择字段
|
|
|
- if(d.data.s_existfields != undefined){
|
|
|
- $("#existFieldSelect").find("option").each(function(){
|
|
|
- if(d.data.s_existfields.indexOf($(this).val()) != -1){
|
|
|
- $(this).attr("selected",true);
|
|
|
- }
|
|
|
- })
|
|
|
- $("#existFieldSelect").selectpicker("refresh");//刷新select框
|
|
|
- dataMap.s_existfields = d.data.s_existfields;
|
|
|
- }
|
|
|
- */
|
|
|
- //全局附加词
|
|
|
- if(d.data.s_globaladdkey != undefined){
|
|
|
- $("#g_addkey").val(d.data.s_globaladdkey);
|
|
|
- dataMap.s_globaladdkey = d.data.s_globaladdkey;
|
|
|
- }
|
|
|
- //全局附加词匹配方式
|
|
|
- if(d.data.s_globaladdkeymatch != undefined){
|
|
|
- var v ="";
|
|
|
- var s_globaladdkeymatchArr = d.data.s_globaladdkeymatch.split(",")
|
|
|
- for(var i in s_globaladdkeymatchArr){
|
|
|
- var code = s_globaladdkeymatchArr[i];
|
|
|
- if(i == 0){
|
|
|
- v = matchTypeMap2[code];
|
|
|
- }else{
|
|
|
- v = v+","+matchTypeMap2[code];
|
|
|
- }
|
|
|
+ function addcomdata(d) {
|
|
|
+ /*
|
|
|
+ //province赋值
|
|
|
+ if(d.data.s_area != undefined){
|
|
|
+ $("#province").find("option").each(function(){
|
|
|
+ if(d.data.s_area.indexOf($(this).val()) != -1){
|
|
|
+ $(this).attr("selected",true);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $("#province").selectpicker("refresh");//刷新select框
|
|
|
+ dataMap.s_area = d.data.s_area;
|
|
|
+ }
|
|
|
+ //city赋值
|
|
|
+ if(d.data.s_city != undefined){
|
|
|
+ $("#city").find("option").each(function(){
|
|
|
+ if(d.data.s_city.indexOf($(this).val()) != -1){
|
|
|
+ $(this).attr("selected",true);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $("#city").selectpicker("refresh");//刷新select框
|
|
|
+ dataMap.s_city = d.data.s_city;
|
|
|
+ }
|
|
|
+ //district赋值
|
|
|
+ if(d.data.s_district != undefined){
|
|
|
+ $("#district").find("option").each(function(){
|
|
|
+ if(d.data.s_district.indexOf($(this).val()) != -1){
|
|
|
+ $(this).attr("selected",true);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $("#district").selectpicker("refresh");//刷新select框
|
|
|
+ dataMap.s_district = d.data.s_district;
|
|
|
+ }
|
|
|
+ //一级公告类别赋值
|
|
|
+ if(d.data.s_toptype != undefined){
|
|
|
+ $("#topTypeSelect").find("option").each(function(){
|
|
|
+ if(d.data.s_toptype.indexOf($(this).val()) != -1){
|
|
|
+ $(this).attr("selected",true);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $("#topTypeSelect").selectpicker("refresh");//刷新select框
|
|
|
+ dataMap.s_toptype = d.data.s_toptype;
|
|
|
+ }
|
|
|
+ //二级公告类别赋值
|
|
|
+ if(d.data.s_subtype != undefined){
|
|
|
+ $("#subTypeSelect").find("option").each(function(){
|
|
|
+ if(d.data.s_subtype.indexOf($(this).val()) != -1){
|
|
|
+ $(this).attr("selected",true);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $("#subTypeSelect").selectpicker("refresh");//刷新select框
|
|
|
+ dataMap.s_subtype = d.data.s_subtype;
|
|
|
+ }
|
|
|
+ //选择字段
|
|
|
+ if(d.data.s_existfields != undefined){
|
|
|
+ $("#existFieldSelect").find("option").each(function(){
|
|
|
+ if(d.data.s_existfields.indexOf($(this).val()) != -1){
|
|
|
+ $(this).attr("selected",true);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $("#existFieldSelect").selectpicker("refresh");//刷新select框
|
|
|
+ dataMap.s_existfields = d.data.s_existfields;
|
|
|
+ }
|
|
|
+ */
|
|
|
+ //全局附加词
|
|
|
+ if (d.data.s_globaladdkey != undefined) {
|
|
|
+ $("#g_addkey").val(d.data.s_globaladdkey);
|
|
|
+ dataMap.s_globaladdkey = d.data.s_globaladdkey;
|
|
|
+ }
|
|
|
+ //全局附加词匹配方式
|
|
|
+ if (d.data.s_globaladdkeymatch != undefined) {
|
|
|
+ var v = "";
|
|
|
+ var s_globaladdkeymatchArr = d.data.s_globaladdkeymatch.split(",")
|
|
|
+ for (var i in s_globaladdkeymatchArr) {
|
|
|
+ var code = s_globaladdkeymatchArr[i];
|
|
|
+ if (i == 0) {
|
|
|
+ v = matchTypeMap2[code];
|
|
|
+ } else {
|
|
|
+ v = v + "," + matchTypeMap2[code];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#s_addkeymatch").val(v);
|
|
|
+ }
|
|
|
+ //全局排除词
|
|
|
+ if (d.data.s_globalnotkey != undefined) {
|
|
|
+ $("#g_notkey").val(d.data.s_globalnotkey);
|
|
|
+ dataMap.s_globalnotkey = d.data.s_globalnotkey;
|
|
|
+ }
|
|
|
+ //全局排除词匹配方式
|
|
|
+ if (d.data.s_globalnotkeymatch != undefined) {
|
|
|
+ var v = "";
|
|
|
+ var s_globalnotkeymatchArr = d.data.s_globalnotkeymatch.split(",")
|
|
|
+ for (var i in s_globalnotkeymatchArr) {
|
|
|
+ var code = s_globalnotkeymatchArr[i];
|
|
|
+ if (i == 0) {
|
|
|
+ v = matchTypeMap2[code];
|
|
|
+ } else {
|
|
|
+ v = v + "," + matchTypeMap2[code];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#s_notkeymatch").val(v);
|
|
|
+ dataMap.s_globalnotkeymatch = d.data.s_globalnotkeymatch;
|
|
|
+ }
|
|
|
+ //采购单位行业
|
|
|
+ if (d.data.s_globalbuyerclass != undefined) {
|
|
|
+ $("#s_buyerclass").val(d.data.s_globalbuyerclass);
|
|
|
+ dataMap.s_globalbuyerclass = d.data.s_globalbuyerclass;
|
|
|
}
|
|
|
- $("#s_addkeymatch").val(v);
|
|
|
- }
|
|
|
- //全局排除词
|
|
|
- if(d.data.s_globalnotkey != undefined){
|
|
|
- $("#g_notkey").val(d.data.s_globalnotkey);
|
|
|
- dataMap.s_globalnotkey = d.data.s_globalnotkey;
|
|
|
- }
|
|
|
- //全局排除词匹配方式
|
|
|
- if(d.data.s_globalnotkeymatch != undefined){
|
|
|
- var v ="";
|
|
|
- var s_globalnotkeymatchArr = d.data.s_globalnotkeymatch.split(",")
|
|
|
- for(var i in s_globalnotkeymatchArr){
|
|
|
- var code = s_globalnotkeymatchArr[i];
|
|
|
- if(i == 0){
|
|
|
- v = matchTypeMap2[code];
|
|
|
- }else{
|
|
|
- v = v+","+matchTypeMap2[code];
|
|
|
- }
|
|
|
+ //公告行业
|
|
|
+ if (d.data.s_globalsubscopeclass != undefined) {
|
|
|
+ $("#s_scopeclass").val(d.data.s_globalsubscopeclass);
|
|
|
+ dataMap.s_globalsubscopeclass = d.data.s_globalsubscopeclass;
|
|
|
}
|
|
|
- $("#s_notkeymatch").val(v);
|
|
|
- dataMap.s_globalnotkeymatch = d.data.s_globalnotkeymatch;
|
|
|
- }
|
|
|
- //采购单位行业
|
|
|
- if(d.data.s_globalbuyerclass != undefined){
|
|
|
- $("#s_buyerclass").val(d.data.s_globalbuyerclass);
|
|
|
- dataMap.s_globalbuyerclass = d.data.s_globalbuyerclass;
|
|
|
- }
|
|
|
- //公告行业
|
|
|
- if(d.data.s_globalsubscopeclass != undefined){
|
|
|
- $("#s_scopeclass").val(d.data.s_globalsubscopeclass);
|
|
|
- dataMap.s_globalsubscopeclass = d.data.s_globalsubscopeclass;
|
|
|
- }
|
|
|
- //关键词规则
|
|
|
- $('#keywords').dataTable().fnClearTable();
|
|
|
- $('#keywords').dataTable().fnAddData(d.data.o_rules);
|
|
|
- o_rules = d.data.o_rules;
|
|
|
+ //关键词规则
|
|
|
+ $('#keywords').dataTable().fnClearTable();
|
|
|
+ $('#keywords').dataTable().fnAddData(d.data.o_rules);
|
|
|
+ o_rules = d.data.o_rules;
|
|
|
}
|
|
|
</script>
|