四零语境后端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
9.9 KiB

1 month ago
  1. <#include "/common/utils.ftl">
  2. <#-- update-begin---author:chenrui ---date:20240108 for:[issues/5755]vue代码不加入逻辑删除字段---------- -->
  3. <#if po.isQuery=='Y' && po.fieldName !='delFlag'>
  4. <#-- update-end---author:chenrui ---date:20240108 for:[issues/5755]vue代码不加入逻辑删除字段---------- -->
  5. <#assign query_flag=true>
  6. <#if query_field_no==2>
  7. <template v-if="toggleSearchStatus">
  8. </#if>
  9. <#assign query_field_dictCode="">
  10. <#if po.dictTable?default("")?trim?length gt 1>
  11. <#assign need_select_tag = true>
  12. <#assign need_multi = true>
  13. <#assign query_field_dictCode="${po.dictTable},${po.dictText},${po.dictField}">
  14. <#elseif po.dictField?default("")?trim?length gt 1>
  15. <#assign need_select_tag = true>
  16. <#assign need_multi = true>
  17. <#assign query_field_dictCode="${po.dictField}">
  18. </#if>
  19. <#if po.queryMode=='single'>
  20. <#if query_field_no gt 1> </#if><a-col :lg="6">
  21. <#if query_field_no gt 1> </#if><a-form-item name="${autoStringSuffixForModel(po)}">
  22. <#if query_field_no gt 1> </#if><template #label><span title="${po.filedComment}"><#if po.filedComment?default("")?trim?length gt 4>${po.filedComment?substring(0,4)}<#else>${po.filedComment}</#if></span></template>
  23. <#if po.classType=='sel_search'>
  24. <#if query_field_no gt 1> </#if><j-search-select placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" dict="${po.dictTable},${po.dictText},${po.dictField}" allow-clear />
  25. <#elseif po.classType=='sel_user'>
  26. <#-- update-begin---author:chenrui ---date:20240102 for:[issue/#5711]修复用户选择组件在生成代码后变成部门用户选择组件---------- -->
  27. <#if query_field_no gt 1> </#if><j-select-user placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" @change="(value)=>handleFormJoinChange('${po.fieldName}',value)" allow-clear />
  28. <#-- update-end---author:chenrui ---date:20240102 for:[issue/#5711]修复用户选择组件在生成代码后变成部门用户选择组件---------- -->
  29. <#elseif po.classType=='switch'>
  30. <#if query_field_no gt 1> </#if><j-switch placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" <#if po.dictField!= 'is_open'>:options="${po.dictField}"</#if> query />
  31. <#elseif po.classType=='sel_depart'>
  32. <#if query_field_no gt 1> </#if><j-select-dept placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" checkStrictly allow-clear />
  33. <#elseif po.classType=='list_multi'>
  34. <#if query_field_no gt 1> </#if><j-select-multiple placeholder="请选择${po.filedComment}" dictCode="${query_field_dictCode?default("")}" v-model:value="queryParam.${po.fieldName}" allow-clear />
  35. <#elseif po.classType=='cat_tree'>
  36. <#if query_field_no gt 1> </#if><j-category-select placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" pcode="${po.dictField?default("")}" @change="(value) => handleFormChange('${po.fieldName}', value)" allow-clear />
  37. <#elseif po.classType=='date'>
  38. <#if query_field_no gt 1> </#if><a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择${po.filedComment}" <#if po.extendParams?exists && po.extendParams.picker?exists>picker="${po.extendParams.picker}"</#if> v-model:value="queryParam.${po.fieldName}" allow-clear />
  39. <#elseif po.classType=='datetime'>
  40. <#if query_field_no gt 1> </#if><a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" allow-clear />
  41. <#elseif po.classType=='time'>
  42. <#if query_field_no gt 1> </#if><time-picker valueFormat="HH:mm:ss" placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" allow-clear />
  43. <#elseif po.classType=='pca'>
  44. <#if query_field_no gt 1> </#if><j-area-linkage v-model:value="queryParam.${po.fieldName}" placeholder="请选择${po.filedComment}" saveCode="region" @change="(value)=>handleFormJoinChange('${po.fieldName}',value)" allow-clear />
  45. <#elseif po.classType=='sel_tree'>
  46. <#if query_field_no gt 1> </#if><j-tree-select v-model:value="queryParam.${po.fieldName}" placeholder="请选择${po.filedComment}" <#if po.dictText??><#if po.dictText?split(',')[2]?? && po.dictText?split(',')[0]??>dict="${po.dictTable},${po.dictText?split(',')[2]},${po.dictText?split(',')[0]}" <#elseif po.dictText?split(',')[1]??>pidField:"${po.dictText?split(',')[1]}", <#elseif po.dictText?split(',')[3]??>hasChildField:"${po.dictText?split(',')[3]}"</#if> </#if>pidValue="${po.dictField}" allow-clear />
  47. <#elseif po.classType=='popup'>
  48. <#assign sourceFields = po.dictField?default("")?trim?split(",")/>
  49. <#assign targetFields = po.dictText?default("")?trim?split(",")/>
  50. <#if query_field_no gt 1> </#if><j-popup
  51. <#if query_field_no gt 1> </#if>placeholder="请选择${po.filedComment}"
  52. <#if query_field_no gt 1> </#if>v-model:value="queryParam.${po.fieldName}"
  53. <#if query_field_no gt 1> </#if>code="${po.dictTable}"
  54. <#if query_field_no gt 1> </#if>:fieldConfig="[
  55. <#list sourceFields as fieldName>
  56. <#if query_field_no gt 1> </#if>{ source: '${fieldName}', target: '${dashedToCamel(targetFields[fieldName_index])}' },
  57. </#list>
  58. <#if query_field_no gt 1> </#if>]"
  59. <#if query_field_no gt 1> </#if>:multi="${po.extendParams.popupMulti?c}"
  60. <#if query_field_no gt 1> </#if>:setFieldsValue="setFieldsValue" allow-clear />
  61. <#elseif po.classType=='popup_dict'>
  62. <#if query_field_no gt 1> </#if><j-popup-dict
  63. <#if query_field_no gt 1> </#if>placeholder="请选择${po.filedComment}"
  64. <#if query_field_no gt 1> </#if>v-model:value="queryParam.${po.fieldName}"
  65. <#if query_field_no gt 1> </#if>dictCode="${po.dictTable},${po.dictText},${po.dictField}"
  66. <#if query_field_no gt 1> </#if>:multi="${po.extendParams.popupMulti?c}"
  67. <#if query_field_no gt 1> </#if><#if po.readonly=='Y'>disabled</#if> />
  68. <#elseif po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'>
  69. <#-- ---------------------------下拉或是单选 判断数据字典是表字典还是普通字典------------------------------- -->
  70. <#if po.dictTable?default("")?trim?length gt 1>
  71. <#if query_field_no gt 1> </#if><j-select-multiple placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" dictCode="${po.dictTable},${po.dictText},${po.dictField}" allow-clear />
  72. <#elseif po.dictField?default("")?trim?length gt 1>
  73. <#if query_field_no gt 1> </#if><j-select-multiple placeholder="请选择${po.filedComment}" v-model:value="queryParam.${po.fieldName}" dictCode="${po.dictField}" allow-clear />
  74. <#else>
  75. <#if query_field_no gt 1> </#if><a-input placeholder="请输入${po.filedComment}" v-model:value="queryParam.${po.fieldName}" allow-clear ></a-input>
  76. </#if>
  77. <#elseif po.fieldDbType=='int' || po.fieldDbType=='double' || po.fieldDbType=='BigDecimal'>
  78. <#if query_field_no gt 1> </#if><a-input-number placeholder="请输入${po.filedComment}" v-model:value="queryParam.${po.fieldName}"></a-input-number>
  79. <#else>
  80. <#if query_field_no gt 1> </#if><a-input placeholder="请输入${po.filedComment}" v-model:value="queryParam.${autoStringSuffixForModel(po)}" allow-clear ></a-input>
  81. </#if>
  82. <#if query_field_no gt 1> </#if></a-form-item>
  83. <#if query_field_no gt 1> </#if></a-col>
  84. <#elseif po.queryMode=='like'>
  85. <#if query_field_no gt 1> </#if><a-col :lg="6">
  86. <#if query_field_no gt 1> </#if><a-form-item name="${autoStringSuffixForModel(po)}">
  87. <#if query_field_no gt 1> </#if><template #label><span title="${po.filedComment}"><#if po.filedComment?default("")?trim?length gt 4>${po.filedComment?substring(0,4)}<#else>${po.filedComment}</#if></span></template>
  88. <#if query_field_no gt 1> </#if><JInput v-model:value="queryParam.${po.fieldName}"/>
  89. <#if query_field_no gt 1> </#if></a-form-item>
  90. <#if query_field_no gt 1> </#if></a-col>
  91. <#else>
  92. <#if query_field_no gt 1> </#if><a-col :lg="6">
  93. <#if query_field_no gt 1> </#if><a-form-item name="${autoStringSuffixForModel(po)}">
  94. <#if query_field_no gt 1> </#if><template #label><span title="${po.filedComment}"><#if po.filedComment?default("")?trim?length gt 4>${po.filedComment?substring(0,4)}<#else>${po.filedComment}</#if></span></template>
  95. <#if po.classType=='date'>
  96. <#if query_field_no gt 1> </#if><a-range-picker value-format="YYYY-MM-DD" <#if po.extendParams?exists && po.extendParams.picker?exists>picker="${po.extendParams.picker}"</#if> v-model:value="queryParam.${po.fieldName}" class="query-group-cust"/>
  97. <#elseif po.classType=='time'>
  98. <#if query_field_no gt 1> </#if><a-time-range-picker value-format="HH:mm:ss" v-model:value="queryParam.${po.fieldName}" class="query-group-cust" />
  99. <#elseif po.classType=='datetime'>
  100. <#if query_field_no gt 1> </#if><a-range-picker showTime value-format="YYYY-MM-DD HH:mm:ss" v-model:value="queryParam.${po.fieldName}" class="query-group-cust"/>
  101. <#else>
  102. <#if query_field_no gt 1> </#if><JRangeNumber v-model:value="queryParam.${po.fieldName}" class="query-group-cust"></JRangeNumber>
  103. </#if>
  104. <#if query_field_no gt 1> </#if></a-form-item>
  105. <#if query_field_no gt 1> </#if></a-col>
  106. </#if>
  107. <#assign query_field_no=query_field_no+1>
  108. </#if>