diff --git a/src/pages/push/batchingpush/index.jsx b/src/pages/push/batchingpush/index.jsx index 905a902..88c8829 100644 --- a/src/pages/push/batchingpush/index.jsx +++ b/src/pages/push/batchingpush/index.jsx @@ -76,14 +76,18 @@ const goodspush = () => { }, { - title: '下发数据', - dataIndex: 'type', + title: '下发状态', + dataIndex: 'status', ellipsis: true, valueEnum: { - 2: { - text: '物料', + 0: { + text: '成功', + status: 'Success', }, - + 1: { + text: '失败', + status: 'Processing', + }, }, }, { diff --git a/src/pages/push/batchingpush/services.js b/src/pages/push/batchingpush/services.js index 26ef687..b48874c 100644 --- a/src/pages/push/batchingpush/services.js +++ b/src/pages/push/batchingpush/services.js @@ -1,4 +1,5 @@ import { request } from 'umi'; +import { getDataBaseUrl } from '@/global_data'; export async function GetDevicePushRecodePage(data) { return request(`/saasstore/api/devicepushrecode/page`, { method: 'POST', @@ -24,13 +25,13 @@ export async function GetDevicePushRecodePage(data) { }); } export async function GetDeviceList() { - return request(`/saasbase/api/device/list`, { + return request(getDataBaseUrl()+`/api/device/list`, { method: 'GET', }); } export async function GetBatchingPage(data) { - return request(`/saasbase/api/batching/getpage`, { + return request(getDataBaseUrl()+`/api/batching/getpage`, { method: 'Post', data: data, // params: { ...params }, diff --git a/src/pages/push/goodspush/index.jsx b/src/pages/push/goodspush/index.jsx index 53e5257..aabb2fb 100644 --- a/src/pages/push/goodspush/index.jsx +++ b/src/pages/push/goodspush/index.jsx @@ -76,14 +76,18 @@ const goodspush = () => { }, { - title: '下发数据', - dataIndex: 'type', + title: '下发状态', + dataIndex: 'status', ellipsis: true, valueEnum: { - 1: { - text: '商品', + 0: { + text: '成功', + status: 'Success', }, - + 1: { + text: '失败', + status: 'Processing', + }, }, }, { diff --git a/src/pages/push/goodspush/services.js b/src/pages/push/goodspush/services.js index 4af60f4..bd58fed 100644 --- a/src/pages/push/goodspush/services.js +++ b/src/pages/push/goodspush/services.js @@ -1,4 +1,5 @@ import { request } from 'umi'; +import { getDataBaseUrl } from '@/global_data'; export async function GetDevicePushRecodePage(data) { return request(`/saasstore/api/devicepushrecode/page`, { method: 'POST', @@ -24,12 +25,12 @@ export async function GetDevicePushRecodePage(data) { }); } export async function GetDeviceList() { - return request(`/saasbase/api/device/list`, { + return request(getDataBaseUrl()+`/api/device/list`, { method: 'GET', }); } export async function GetGoodsTypeTree(params) { - return request('​/saasbase/api​/goodstype/tree', { + return request(getDataBaseUrl()+'​/api​/goodstype/tree', { method: 'GET', data: { ...params, @@ -37,7 +38,7 @@ export async function GetDevicePushRecodePage(data) { }); } export async function GetGoodsPage(data) { - return request(`/saasbase/api/goods/page`, { + return request(getDataBaseUrl()+`/api/goods/page`, { method: 'Post', data: data, // params: { ...params }, diff --git a/src/pages/push/technologypush/components/PushFrom.jsx b/src/pages/push/technologypush/components/PushFrom.jsx index e4f8369..411f23f 100644 --- a/src/pages/push/technologypush/components/PushFrom.jsx +++ b/src/pages/push/technologypush/components/PushFrom.jsx @@ -19,10 +19,13 @@ const PushFrom = (props) => { console.log(props.values) GetDeviceList().then((r)=>{ setDeviceInfo(r.data) + if(r.data.length>0){ var data=r.data.map(x=>{ - return {value:x.id,label:x.name} + return {value:x.id,label:x.name} }) setdeviceData(data) + } + }) GetGoodsTypeTree().then((r) => { setTreeData(r.data); diff --git a/src/pages/push/technologypush/index.jsx b/src/pages/push/technologypush/index.jsx index 84b2295..17c6f44 100644 --- a/src/pages/push/technologypush/index.jsx +++ b/src/pages/push/technologypush/index.jsx @@ -76,13 +76,18 @@ const goodspush = () => { }, { - title: '下发数据', - dataIndex: 'type', + title: '下发状态', + dataIndex: 'status', ellipsis: true, valueEnum: { - 4: { - text: '工艺', + 0: { + text: '成功', + status: 'Success', }, + 1: { + text: '失败', + status: 'Processing', + }, }, }, { diff --git a/src/pages/push/technologypush/services.js b/src/pages/push/technologypush/services.js index 4af60f4..bd58fed 100644 --- a/src/pages/push/technologypush/services.js +++ b/src/pages/push/technologypush/services.js @@ -1,4 +1,5 @@ import { request } from 'umi'; +import { getDataBaseUrl } from '@/global_data'; export async function GetDevicePushRecodePage(data) { return request(`/saasstore/api/devicepushrecode/page`, { method: 'POST', @@ -24,12 +25,12 @@ export async function GetDevicePushRecodePage(data) { }); } export async function GetDeviceList() { - return request(`/saasbase/api/device/list`, { + return request(getDataBaseUrl()+`/api/device/list`, { method: 'GET', }); } export async function GetGoodsTypeTree(params) { - return request('​/saasbase/api​/goodstype/tree', { + return request(getDataBaseUrl()+'​/api​/goodstype/tree', { method: 'GET', data: { ...params, @@ -37,7 +38,7 @@ export async function GetDevicePushRecodePage(data) { }); } export async function GetGoodsPage(data) { - return request(`/saasbase/api/goods/page`, { + return request(getDataBaseUrl()+`/api/goods/page`, { method: 'Post', data: data, // params: { ...params },