mirror of https://github.com/jeecgboot/jeecg-boot
【issues/425】使用online表单开发,代码生成选择vue3原生以后,界面导出的功能不能使用查询条件了--
parent
d81fa1f908
commit
42589cd1dc
|
@ -1,3 +1,4 @@
|
|||
<#include "/common/utils.ftl">
|
||||
<#if po.isQuery=='Y'>
|
||||
<#assign query_flag=true>
|
||||
<#if query_field_no==2>
|
||||
|
@ -13,7 +14,7 @@
|
|||
</#if>
|
||||
<#if po.queryMode=='single'>
|
||||
<#if query_field_no gt 1> </#if><a-col :lg="8">
|
||||
<#if query_field_no gt 1> </#if><a-form-item label="${po.filedComment}">
|
||||
<#if query_field_no gt 1> </#if><a-form-item label="${po.filedComment}" name="${po.fieldName}">
|
||||
<#if po.classType=='sel_search'>
|
||||
<#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}" />
|
||||
<#elseif po.classType=='sel_user'>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<#assign query_flag = false>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<#-- 开始循环 -->
|
||||
<#list columns as po>
|
||||
|
@ -145,7 +145,8 @@
|
|||
import { startProcess } from '/@/api/common/api';
|
||||
</#if>
|
||||
|
||||
const queryParam = ref<any>({});
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
//注册table数据
|
||||
|
@ -161,12 +162,13 @@
|
|||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return Object.assign(params, queryParam.value);
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "${tableVo.ftlDescription}",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
|
@ -294,7 +296,7 @@
|
|||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
|
@ -306,7 +308,7 @@
|
|||
*/
|
||||
function setFieldsValue(map) {
|
||||
Object.keys(map).map((key) => {
|
||||
queryParam.value[key] = map[key];
|
||||
queryParam[key] = map[key];
|
||||
});
|
||||
}
|
||||
</#if>
|
||||
|
@ -318,7 +320,7 @@
|
|||
* @param value
|
||||
*/
|
||||
function handleAreaChange(key, value) {
|
||||
queryParam.value[key] = value.join(',');
|
||||
queryParam[key] = value.join(',');
|
||||
}
|
||||
</#if>
|
||||
|
||||
|
@ -344,7 +346,7 @@
|
|||
* @param value
|
||||
*/
|
||||
function handleFormChange(key, value) {
|
||||
queryParam.value[key] = value;
|
||||
queryParam[key] = value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<#assign query_flag = false>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<#-- 开始循环 -->
|
||||
<#list columns as po>
|
||||
|
@ -150,6 +150,8 @@
|
|||
import { startProcess } from '/@/api/common/api';
|
||||
</#if>
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
//注册model
|
||||
const [registerModal, {openModal}] = useModal();
|
||||
|
@ -166,12 +168,13 @@
|
|||
fixed:'right'
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return Object.assign(params, queryParam.value);
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name:"${tableVo.ftlDescription}",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
|
@ -304,7 +307,7 @@
|
|||
* @param value
|
||||
*/
|
||||
function handleFormChange(key, value) {
|
||||
queryParam.value[key] = value;
|
||||
queryParam[key] = value;
|
||||
}
|
||||
/**
|
||||
* 初始化字典配置
|
||||
|
@ -330,7 +333,6 @@
|
|||
</#if>
|
||||
|
||||
/* ----------------------以下为原生查询需要添加的-------------------------- */
|
||||
const queryParam = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const labelCol = reactive({
|
||||
xs: { span: 24 },
|
||||
|
@ -344,7 +346,7 @@
|
|||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
|
@ -355,7 +357,7 @@
|
|||
*/
|
||||
function setFieldsValue(map) {
|
||||
Object.keys(map).map((key) => {
|
||||
queryParam.value[key] = map[key];
|
||||
queryParam[key] = map[key];
|
||||
});
|
||||
}
|
||||
</#if>
|
||||
|
@ -367,7 +369,7 @@
|
|||
* @param value
|
||||
*/
|
||||
function handleAreaChange(key, value) {
|
||||
queryParam.value[key] = value.join(',');
|
||||
queryParam[key] = value.join(',');
|
||||
}
|
||||
</#if>
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue