Commit c18cb7e7 authored by shaoan123's avatar shaoan123

优化登录界面提示

parent e2292fa3
Pipeline #31299 passed with stages
...@@ -287,7 +287,7 @@ const AddModal = props => { ...@@ -287,7 +287,7 @@ const AddModal = props => {
<div> <div>
<div className={styles.predict}></div> <div className={styles.predict}></div>
<Input style={{ width: '67.2%' }} placeholder="请输入预测间隔" value={CycleValue} onChange={(value) => selectCycleValue(value)} allowClear /> <Input style={{ width: '67.2%' }} placeholder="请输入预测间隔" value={CycleValue} onChange={(value) => selectCycleValue(value)} allowClear />
<Select style={{marginLeft:'1.5rem', width: '28.5%' }} onChange={handleIntervalType} value={intervalType}> <Select style={{marginLeft:'1.5rem', width: '29%' }} onChange={handleIntervalType} value={intervalType}>
{timeType.length ? timeType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''} {timeType.length ? timeType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select> </Select>
</div> </div>
...@@ -299,7 +299,7 @@ const AddModal = props => { ...@@ -299,7 +299,7 @@ const AddModal = props => {
style={{ marginLeft: '0.8rem' }} style={{ marginLeft: '0.8rem' }}
rules={[{ required: true, message: '请选择预测维度' }]} rules={[{ required: true, message: '请选择预测维度' }]}
> >
<Select onChange={selectPredictType} style={{ width: '6rem' }}> <Select onChange={selectPredictType} style={{ width: '8.4rem' }}>
{PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''} {PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select> </Select>
</Item> </Item>
...@@ -309,7 +309,7 @@ const AddModal = props => { ...@@ -309,7 +309,7 @@ const AddModal = props => {
style={{ marginLeft: '0.8rem' }} style={{ marginLeft: '0.8rem' }}
rules={[{ required: true, message: '请选择维度类别' }]} rules={[{ required: true, message: '请选择维度类别' }]}
> >
<Select style={{ width: '6rem' }}> <Select style={{ width: '9rem' }}>
{commonType.length ? commonType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''} {commonType.length ? commonType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select> </Select>
</Item> : ''} </Item> : ''}
...@@ -319,7 +319,7 @@ const AddModal = props => { ...@@ -319,7 +319,7 @@ const AddModal = props => {
name="PredictCycleValue" name="PredictCycleValue"
rules={[{ required: true, message: '请输入预测维度值' }]} rules={[{ required: true, message: '请输入预测维度值' }]}
> >
<Input placeholder="请输入预测维度值" style={{ width: '9.4rem' }} allowClear /> <Input placeholder="请输入预测维度值" style={{ width: '12rem' }} allowClear />
</Item> </Item>
</Row> </Row>
<Row gutter='24' > <Row gutter='24' >
...@@ -329,7 +329,7 @@ const AddModal = props => { ...@@ -329,7 +329,7 @@ const AddModal = props => {
name="StatisticCycle" name="StatisticCycle"
rules={[{ required: true, message: '请选择预测维度' }]} rules={[{ required: true, message: '请选择预测维度' }]}
> >
<Select style={{ width: '16rem' }}> <Select style={{ width: '18rem' }}>
{PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''} {PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select> </Select>
</Item> </Item>
...@@ -339,7 +339,7 @@ const AddModal = props => { ...@@ -339,7 +339,7 @@ const AddModal = props => {
name="StatisticCycleValue" name="StatisticCycleValue"
rules={[{ required: true, message: '请输入统计维度值' }]} rules={[{ required: true, message: '请输入统计维度值' }]}
> >
<Input style={{ width: '12rem' }} placeholder="请输入统计维度值" allowClear /> <Input style={{ width: '17.2rem' }} placeholder="请输入统计维度值" allowClear />
</Item> </Item>
</Row> </Row>
<Item <Item
......
...@@ -43,10 +43,11 @@ const Login = props => { ...@@ -43,10 +43,11 @@ const Login = props => {
OMSLogin(loginName, password, 'CivManage') OMSLogin(loginName, password, 'CivManage')
.then(result => { .then(result => {
const { const {
data: { pass, userMode, token },
msg, msg,
} = result; } = result;
if (pass === true) {
if (result.data && result.data.pass) {
const { userMode, token } = result.data
localStorage.setItem('token', token?.access_token || ''); localStorage.setItem('token', token?.access_token || '');
setUserMode(userMode); setUserMode(userMode);
setLoginName(loginName); setLoginName(loginName);
......
...@@ -4,79 +4,79 @@ import { CITY_SERVICE, get, PUBLISH_SERVICE, post, postForm } from '../index'; ...@@ -4,79 +4,79 @@ import { CITY_SERVICE, get, PUBLISH_SERVICE, post, postForm } from '../index';
//获取任务列表 //获取任务列表
export const taskOptionsList = () => export const taskOptionsList = () =>
get(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/TaskOptionsList`); get(`/PandaCore/OMS/AIConfig/TaskOptionsList`);
//获取设备类型 //获取设备类型
export const getIotDeviceType = () => export const getIotDeviceType = () =>
get(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/GetIotDeviceType`); get(`/PandaCore/OMS/AIConfig/GetIotDeviceType`);
//获取场景列表 //获取场景列表
export const algorithmList = () => export const algorithmList = () =>
get(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/AlgorithmList`); get(`/PandaCore/OMS/AIConfig/AlgorithmList`);
//获取设备列表 //获取设备列表
export const getEquipmentInfo = (query) => export const getEquipmentInfo = (query) =>
get(`${CITY_SERVICE}/IOTPlatform.svc/AcrossTable/GetEquipmentInfo?equipType=${query}`); get(`/PandaCore/GCK/Device/DeviceTree?equipType=${query}`);
//获取指标列表 //获取指标列表
export const getQutaList = (query) => export const getQutaList = (query) =>
get(`${CITY_SERVICE}/IOTPlatform.svc/AcrossTable/GetQutaList?AcountName=${query.accountName}&&AddrSchemeID=${query.AddrSchemeID}`); get(`/PandaCore/GCK/Device/GetQuotaList?AcountName=${query.accountName}&&AddrSchemeID=${query.AddrSchemeID}`);
//获取场景列表 //获取场景列表
export const getSceneNameInfo = () => export const getSceneNameInfo = () =>
get(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/GetSceneNameInfo`); get(`/PandaCore/OMS/AIConfig/GetSceneNameInfo`);
//任务添加 //任务添加
export const addTaskOptions = (params) => export const addTaskOptions = (params) =>
post(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/AddTaskOptions`, params); post(`/PandaCore/OMS/AIConfig/AddTaskOptions`, params);
//任务编辑 //任务编辑
export const updateTaskOptions = (params) => export const updateTaskOptions = (params) =>
post(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/UpdateTaskOptions`, params); post(`/PandaCore/OMS/AIConfig/UpdateTaskOptions`, params);
//任务删除 //任务删除
export const deleteTaskOptions = (params) => export const deleteTaskOptions = (params) =>
post(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/DeleteTaskOptions`, params); post(`/PandaCore/OMS/AIConfig/DeleteTaskOptions`, params);
//预测列表 //预测列表
export const getPredictInfo = () => export const getPredictInfo = () =>
get(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/GetPredictInfo`); get(`/PandaCore/OMS/AIConfig/GetPredictInfo`);
//预测新增 //预测新增
export const addPredictOptions = (params) => export const addPredictOptions = (params) =>
post(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/AddPredictOptions`, params); post(`/PandaCore/OMS/AIConfig/AddPredictOptions`, params);
//预测编辑 //预测编辑
export const editPredictOptions = (params) => export const editPredictOptions = (params) =>
post(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/EditPredictOptions`, params); post(`/PandaCore/OMS/AIConfig/EditPredictOptions`, params);
//预测删除 //预测删除
export const deletePredictOptions = (params) => export const deletePredictOptions = (params) =>
post(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/DeletePredictOptions?PredictID=${params}`); post(`/PandaCore/OMS/AIConfig/DeletePredictOptions?PredictID=${params}`);
//策略下发列表 //策略下发列表
export const getStrategyInfo = () => export const getStrategyInfo = () =>
get(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/GetStrategyInfo`); get(`/PandaCore/OMS/AIConfig/GetStrategyInfo`);
//策略下发增加 //策略下发增加
export const addStrategyOptions = (params) => export const addStrategyOptions = (params) =>
post(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/AddStrategyOptions`, params); post(`/PandaCore/OMS/AIConfig/AddStrategyOptions`, params);
//策略下发编辑 //策略下发编辑
export const editStrategyOptions = (params) => export const editStrategyOptions = (params) =>
post(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/EditStrategyOptions`, params); post(`/PandaCore/OMS/AIConfig/EditStrategyOptions`, params);
//策略下发删除 //策略下发删除
export const deleteStrategyOptions = (params) => export const deleteStrategyOptions = (params) =>
post(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/DeleteStrategyOptions?StrategyId=${params}`); post(`/PandaCore/OMS​/AIConfig​/DeleteStrategyOptions?StrategyId=${params}`);
//获取预测设备 //获取预测设备
export const getPredictDevice = (params) => export const getPredictDevice = (params) =>
get(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/GetPredictDevice?DeviceType=${params}`); get(`/PandaCore/OMS/AIConfig/GetPredictDevice?DeviceType=${params}`);
//获取预测指标 //获取预测指标
export const getPredictDevicePoint = (params) => export const getPredictDevicePoint = (params) =>
get(`${CITY_SERVICE}/IOTPlatform.svc/WaterAge/GetPredictDevicePoint?DeviceType=${params.deviceType}&DeviceCode=${params.DeviceCode}`); get(`/PandaCore/OMS/AIConfig/GetPredictDevicePoint?DeviceType=${params.deviceType}&DeviceCode=${params.DeviceCode}`);
\ No newline at end of file \ No newline at end of file
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