Commit a9586508 by Sxy

fix: 优化看板

parent e08c3b32
...@@ -24,6 +24,15 @@ class StatisticsCtl extends CtlBase { ...@@ -24,6 +24,15 @@ class StatisticsCtl extends CtlBase {
} }
} }
// 获取 pathName
async getPathName(pobj, qobj, req) {
try {
const rs = await this.service.getPathName(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
// 需求渠道分析 // 需求渠道分析
async getStatisticsByUappId(pobj, qobj, req) { async getStatisticsByUappId(pobj, qobj, req) {
try { try {
......
...@@ -7,6 +7,9 @@ class StatisticsService { ...@@ -7,6 +7,9 @@ class StatisticsService {
async getAllProducts(pobj) { async getAllProducts(pobj) {
return ToQiFuTong.getAllProducts(); return ToQiFuTong.getAllProducts();
} }
async getPathName(pobj) {
return ToQiFuTong.getPathName();
}
async getStatisticsByUappId(pobj) { async getStatisticsByUappId(pobj) {
const data = await ToQiFuTong.getStatisticsByUappId({ const data = await ToQiFuTong.getStatisticsByUappId({
start: pobj.start, start: pobj.start,
...@@ -24,7 +27,7 @@ class StatisticsService { ...@@ -24,7 +27,7 @@ class StatisticsService {
const data = await ToQiFuTong.getOrderStatisticsByUappId({ const data = await ToQiFuTong.getOrderStatisticsByUappId({
start: pobj.start, start: pobj.start,
end: pobj.end, end: pobj.end,
type_code: pobj.type_code, pathName: pobj.type_code,
status: pobj.status status: pobj.status
}); });
const dates = ToQiFuTong.getAllDate(pobj.start, pobj.end); const dates = ToQiFuTong.getAllDate(pobj.start, pobj.end);
...@@ -82,12 +85,12 @@ class StatisticsService { ...@@ -82,12 +85,12 @@ class StatisticsService {
result.push({ result.push({
uapp_id: info.uapp_id ? info.uapp_id.toString() : "", uapp_id: info.uapp_id ? info.uapp_id.toString() : "",
count: info.count, count: info.count,
type_code: val.type_code type_code: val.pathName
}) })
} }
productList.push({ productList.push({
count: productCount, count: productCount,
type_code: val.type_code type_code: val.pathName
}) })
} }
productList = productList.sort(function (a, b) { return a.count - b.count }); productList = productList.sort(function (a, b) { return a.count - b.count });
...@@ -180,7 +183,7 @@ class StatisticsService { ...@@ -180,7 +183,7 @@ class StatisticsService {
endNow: pobj.endNow, endNow: pobj.endNow,
startLast: pobj.startLast, startLast: pobj.startLast,
endLast: pobj.endLast, endLast: pobj.endLast,
type_code: pobj.type_code, pathName: pobj.type_code,
uapp_id: pobj.uapp_id uapp_id: pobj.uapp_id
}); });
return { return {
...@@ -201,6 +204,7 @@ class StatisticsService { ...@@ -201,6 +204,7 @@ class StatisticsService {
uapp_id: pobj.uapp_id, uapp_id: pobj.uapp_id,
type_code: pobj.type_code, type_code: pobj.type_code,
type_name: pobj.type_code, type_name: pobj.type_code,
pathName: pobj.type_code,
pageIndex: pobj.pageNum || 1, pageIndex: pobj.pageNum || 1,
pageSize: pobj.pageSize || 10, pageSize: pobj.pageSize || 10,
listType: pobj.listType, listType: pobj.listType,
......
...@@ -58,9 +58,9 @@ class BaseClient { ...@@ -58,9 +58,9 @@ class BaseClient {
async postRequest(url, data, headers = {}) { async postRequest(url, data, headers = {}) {
try { try {
// console.log(` ${url} : 请求信息 ------- `); console.log(` ${url} : 请求信息 ------- `);
// console.log(JSON.stringify(data)) console.log(JSON.stringify(data))
// console.log(JSON.stringify(headers)) console.log(JSON.stringify(headers))
let result = await axios.post(`${url}`, data, { let result = await axios.post(`${url}`, data, {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
...@@ -68,8 +68,8 @@ class BaseClient { ...@@ -68,8 +68,8 @@ class BaseClient {
} }
}); });
result = result.data; result = result.data;
// console.log(` ${url} : 返回信息 ------- `); console.log(` ${url} : 返回信息 ------- `);
// console.log(result); console.log(result);
if (result.status === 0) { if (result.status === 0) {
return result.data return result.data
} else { } else {
...@@ -98,6 +98,14 @@ class BaseClient { ...@@ -98,6 +98,14 @@ class BaseClient {
}); });
return data; return data;
} }
async getPathName() {
const data = await this.pushQiFuTong('/web/opaction/order/springBoard', {
"actionType": "getPathName",
"actionBody": {
}
});
return data;
}
async getNeedProductType() { async getNeedProductType() {
const data = await this.pushQiFuTong('/web/action/opNeed/springBoard', { const data = await this.pushQiFuTong('/web/action/opNeed/springBoard', {
"actionType": "getNeedProductType", "actionType": "getNeedProductType",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment