pages/modal/3201.vue
@@ -132,7 +132,7 @@
  },
  data() {
    return {
     title:'新增',
     title:'3201首页',
      param: {},
     show: true,
     duration:0,
@@ -319,9 +319,9 @@
            if(ret.result){
               $this.$data.param.catalog[index].taskQty=ret.result.obj_list.length;
               // console.log($this.$data.param.catalog[index]);
               var param = JSON.parse(JSON.stringify($this.$data.param));
               $this.$data.param=[];
               $this.$data.param = param;
               var catalog = JSON.parse(JSON.stringify($this.$data.param.catalog));
               $this.$data.param.catalog=[];
               $this.$data.param.catalog=catalog;
            }
         }else{
            uni.showModal({title:"错误2",content:ret.err_msg,showCancel:false,confirmText:"取消"});
@@ -351,8 +351,12 @@
                console.log(data);
               //刷新当前页面
               // location.reload();
               uni.redirectTo({
                  url:'../modal/3201?param='+JSON.stringify($this.$data.param)+"&titlename="+$this.$data.title
               // uni.redirectTo({
               //    url:'../modal/3201?param='+JSON.stringify($this.$data.param)+"&titlename="+$this.$data.title
               // });
               $this.$data.param.catalog.forEach(async (ele,index) => {
                  ele.taskQty=0;
                  await $this.appGetInfo(ele.function_def_id,index);
               });
            }
         },
@@ -390,28 +394,28 @@
       var sql = []
       var seps = [' not in', ' in', '<>', '!=', '<=', '>=', '<', '=', '>', ' like']
       list.forEach(ls => {
           var where = ls.trim().toLowerCase()
         var where = ls.trim()
           if (where.startsWith('(') && where.endsWith(')')) where = where.replace(/^\(/, '').replace(/\)$/, '')
           if (where.includes(' and ')) {
         if (where.toLowerCase().includes(' and ')) {
               // 二级and放在第一级数组中
               where.split(' and ').forEach(li => {
            where.split(/ and /i).forEach(li => {
                   var l = li.trim()
                   if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '')
                   var sep = ''
                   for (var i = 0; i < seps.length; i++) {
                       if (l.includes(seps[i])) {
                  if (l.toLowerCase().includes(seps[i])) {
                           sep = seps[i]
                           break
                       }
                   }
                   if (sep) {
                       var values = l.split(sep)
                  var values = l.split(new RegExp(sep, 'i'))
                       var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '')
                       var value = ''
                       var op = sep.trim()
   
                       if ([' in', ' not in'].includes(sep) && values[1].includes('select ') && values[1].includes(' from ')) {
                           value = l.replace(field, '').replace(/^\s*(in|not in)\s*/, '').trim()
                  if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase().includes('select ') && values[1]?.toLowerCase().includes(' from ')) {
                     value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '').trim()
                           if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '').replace(/\)$/, '').trim()
                       }
                       else {
@@ -426,27 +430,27 @@
                   }
               })
           }
           else if (where.includes(' or ')) {
         else if (where.toLowerCase().includes(' or ')) {
               // 二级or放在第二级同一组数组中
               var s = []
               where.split(' or ').forEach(li => {
            where.split(/ or /i).forEach(li => {
                   var l = li.trim()
                   if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '')
                   var sep = ''
                   for (var i = 0; i < seps.length; i++) {
                       if (l.includes(seps[i])) {
                  if (l.toLowerCase().includes(seps[i])) {
                           sep = seps[i]
                           break
                       }
                   }
                   if (sep) {
                       var values = l.split(sep)
                  var values = l.split(new RegExp(sep, 'i'))
                       var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '')
                       var value = ''
                       var op = sep.trim()
   
                       if ([' in', ' not in'].includes(sep) && values[1].includes('select ') && values[1].includes(' from ')) {
                           value = l.replace(field, '').replace(/^\s*(in|not in)\s*/, '').trim()
                  if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase().includes('select ') && values[1]?.toLowerCase().includes(' from ')) {
                     value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '').trim()
                           if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '').replace(/\)$/, '').trim()
                       }
                       else {
@@ -469,19 +473,19 @@
               if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '')
               var sep = ''
               for (var i = 0; i < seps.length; i++) {
                   if (l.includes(seps[i])) {
               if (l.toLowerCase().includes(seps[i])) {
                       sep = seps[i]
                       break
                   }
               }
               if (sep) {
                   var values = l.split(sep)
               var values = l.split(new RegExp(sep,'i'))
                   var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '')
                   var value = ''
                   var op = sep.trim()
   
                   if ([' in', ' not in'].includes(sep) && values[1].includes('select ') && values[1].includes(' from ')) {
                       value = l.replace(field, '').replace(/^\s*(in|not in)\s*/, '').trim()
               if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase().includes('select ') && values[1]?.toLowerCase().includes(' from ')) {
                  value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '').trim()
                       if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '').replace(/\)$/, '').trim()
                   }
                   else {