liuxiaolu 6 年 前
コミット
f80e0d3cf9
1 ファイル変更5 行追加2 行削除
  1. 5 2
      src/web/staticres/dataExport/js/conditions_order.js

+ 5 - 2
src/web/staticres/dataExport/js/conditions_order.js

@@ -85,8 +85,9 @@ $(document).on('click','.delete-close>i',function () {
 })
 /*移除delBox*/
 function removeDelBox(select) {
+  $("#area-del").find("div[data-arr='selectArea'][data-val='全国']").remove();
   if(select=="全国"){
-    $("#area-del").empty();
+    $("#area-del").html("");
   }else if (select=="全省"){
 
   }else{
@@ -95,10 +96,12 @@ function removeDelBox(select) {
 }
 /* 添加可删除标签 */
 function addDelBox(str,box,arr,template){
+  // removeDelBox(str);
   // console.log('--template,arr--', template,arr)
   arr = arr || 'selectArea'
   var tempKey = arr ? 'data-arr="'+arr+'"' : ''
-  template = template || '<div '+tempKey+' class="delete-close">'+str+'<i class="iconfont icon-guanbi"></i></div>'
+  var dataVal = 'data-val="'+str+'"';
+  template = template || '<div '+tempKey+' class="delete-close" '+dataVal+'>'+str+'<i class="iconfont icon-guanbi"></i></div>'
   var tempArr = window[arr]
   if(!Array.isArray(tempArr)) {
     window[arr] = []