From f2047d480aa26c96984d383de868176d5cc4bbab Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期三, 17 四月 2024 16:06:25 +0800 Subject: [PATCH] 树查询 --- Source/ProjectWeb/src/api/base/ui.js | 32 +++++++++++++++++++++----------- 1 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Source/ProjectWeb/src/api/base/ui.js b/Source/ProjectWeb/src/api/base/ui.js index 342df1c..bbefe72 100644 --- a/Source/ProjectWeb/src/api/base/ui.js +++ b/Source/ProjectWeb/src/api/base/ui.js @@ -10,26 +10,36 @@ } //UI涓婁笅鏂囧垪琛ㄦ煡璇� -export const getList = (page, limit, params) => { +export const getList = (current, size, params) => { + let formData = new FormData() + for(let key in params){ + formData.append(key.replaceAll('"',''),params[key]) + } + formData.append("page",current) + formData.append("limit",size) return request({ url: '/api/uiDataController/dataGridQuery', method: 'post', - data: { - ...params, - page, - limit, - } + emulateJSON:true, + headers:{"Content-Type": "application/text"}, + data: formData }) } //UI涓婁笅鏂囨爲鏌ヨ -export const getTree = (parentCode, params) => { +export const getTree = (parentOid,parentBtmName, params) => { + let formData = new FormData() + for(let key in params){ + formData.append(key.replaceAll('"',''),params[key]) + } + formData.append("parentOid",parentOid) + formData.append("parentValue",parentOid) + formData.append("parentBtmName",parentBtmName) + formData.append("parentBtmType",parentBtmName) return request({ url: '/api/uiDataController/getDataForTree', method: 'post', - data: { - ...params, - parentCode - } + headers:{"Content-Type": "application/text"}, + data: formData }) } -- Gitblit v1.9.3