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