schangxiang@126.com
2025-05-20 36fc063fec47f54b4cc3eedd5ddb85a5ac5c6cd8
高级查询过滤优化了,不再用这种方式了
已修改2个文件
27 ■■■■ 文件已修改
Weben_CMS专用代码生成器/Code/Generate/Web/Controllers/EntityModeQueryDrawer_Generate.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Weben_CMS专用代码生成器/Code/Templete/Web/Controllers/EntityModeQueryDrawer模板.txt 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Weben_CMSרÓôúÂëÉú³ÉÆ÷/Code/Generate/Web/Controllers/EntityModeQueryDrawer_Generate.cs
@@ -35,9 +35,10 @@
            attrString += StructStrHelper.GetVueFormOptionsStrForPageAddFormAttributes_Query_Clear(newColumnNameList, param);
            str = str.Replace("$Save_PageAddFormAttributes_Query_Clear$", attrString);
            attrString = "";
            attrString += StructStrHelper.GetVueFormOptionsStrForPageAddFormAttributes_Query_Clear_HighSelect(newColumnNameList, param);
            str = str.Replace("$Save_PageAddFormAttributes_Query_Clear_HighSelect$", attrString);
            //高级查询过滤优化了,不再用这种方式了
            //attrString = "";
            //attrString += StructStrHelper.GetVueFormOptionsStrForPageAddFormAttributes_Query_Clear_HighSelect(newColumnNameList, param);
            //str = str.Replace("$Save_PageAddFormAttributes_Query_Clear_HighSelect$", attrString);
            attrString = "";
            attrString += StructStrHelper.GetVueFormOptionsStrForCommonQueryEnumForFrom(param.ColumnNameList, param);
Weben_CMSרÓôúÂëÉú³ÉÆ÷/Code/Templete/Web/Controllers/EntityModeQueryDrawerÄ£°å.txt
@@ -122,9 +122,23 @@
  /** 
   * é‡ç½®å…¬å…±select查询 
   */ 
  const onResetForHighSelect = async () => {
    $Save_PageAddFormAttributes_Query_Clear_HighSelect$
  }
  const onResetForHighSelect = () => {
      // éåŽ†æ‰€æœ‰è¡¨å•å­—æ®µ
      formItems.forEach(item => {
        // æ£€æŸ¥å­—段是否有高级查询的过滤模式配置
        if (item.highSelectAttrs && item.highSelectAttrs.prop) {
          const filterModeProp = item.highSelectAttrs.prop;
          const options = item.highSelectAttrs.options || [];
          // å¦‚果存在选项,则设置为第一个选项的值
          if (options.length > 0) {
            // å‡è®¾é€‰é¡¹æ ¼å¼ä¸º { value, label } æˆ–类似结构
            const firstValue = options[0].value !== undefined ? options[0].value : options[0];
            formData.value[filterModeProp] = firstValue;
          }
        }
      });
  }
  /**
   * é‡ç½®æŸ¥è¯¢
   */