解决流程分类,表单配置导出错误的问题

This commit is contained in:
BMJ
2022-11-23 00:37:48 +08:00
parent 040c2efb3c
commit 74f5dc3444
4 changed files with 7 additions and 16 deletions

View File

@@ -53,7 +53,7 @@ public class WfFormController extends BaseController {
*/ */
@SaCheckPermission("workflow:form:export") @SaCheckPermission("workflow:form:export")
@Log(title = "流程表单", businessType = BusinessType.EXPORT) @Log(title = "流程表单", businessType = BusinessType.EXPORT)
@GetMapping("/export") @PostMapping("/export")
public void export(@Validated WfFormBo bo, HttpServletResponse response) { public void export(@Validated WfFormBo bo, HttpServletResponse response) {
List<WfFormVo> list = formService.queryList(bo); List<WfFormVo> list = formService.queryList(bo);
ExcelUtil.exportExcel(list, "流程表单", WfFormVo.class, response); ExcelUtil.exportExcel(list, "流程表单", WfFormVo.class, response);

View File

@@ -50,12 +50,3 @@ export function delForm(formId) {
method: 'delete' method: 'delete'
}) })
} }
// 导出流程表单
export function exportForm(query) {
return request({
url: '/workflow/form/export',
method: 'get',
params: query
})
}

View File

@@ -287,7 +287,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('system/category/export', { this.download('workflow/category/export', {
...this.queryParams ...this.queryParams
}, `category_${new Date().getTime()}.xlsx`) }, `category_${new Date().getTime()}.xlsx`)
} }

View File

@@ -130,7 +130,7 @@
</template> </template>
<script> <script>
import { listForm, getForm, delForm, addForm, updateForm, exportForm } from "@/api/workflow/form"; import { listForm, getForm, delForm, addForm, updateForm } from "@/api/workflow/form";
import Editor from '@/components/Editor'; import Editor from '@/components/Editor';
import Parser from '@/utils/generator/parser' import Parser from '@/utils/generator/parser'
export default { export default {
@@ -287,15 +287,15 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; let _this = this
this.$confirm('是否确认导出所有流程表单数据项?', "警告", { this.$confirm('是否确认导出所有流程表单数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function() { }).then(function() {
return exportForm(queryParams); _this.download('/workflow/form/export', {
}).then(response => { ..._this.queryParams
this.download(response.msg); }, `form_${new Date().getTime()}.xlsx`)
}) })
} }
} }