Commit b50e5b48 by yemin

增加鼓风机运维界面

parent 5827952b
......@@ -90,3 +90,31 @@ export const getUnbindKeyboardResult = entity =>
url: `/devices/${entity.deviceCode}/keyboard/unbinding`,
params: entity,
});
// 获取鼓风机到期时间
export const getDuration = entity =>
fetch({
url: `/devices/${entity.deviceCode}/duration`,
params: entity,
});
// 清楚鼓风机剩余时长
export const cleanDuration = entity =>
fetch({
url: `/devices/${entity.deviceCode}/${entity.side}/duration/clean`,
method: 'post',
params: entity,
});
// 延长剩余时长
export const delayedDuration = entity =>
fetch({
url: `/devices/${entity.deviceCode}/${entity.side}/duration/add/${entity.day}`,
method: 'post',
params: entity,
});
// 缩短剩余时长
export const reduceDuration = entity =>
fetch({
url: `/devices/${entity.deviceCode}/${entity.side}/duration/reduce/${entity.day}`,
method: 'post',
params: entity,
});
export const APP_ID = 'wxf5912b79bba23663';
export const SERVER_URL = 'http://ex-dev-blower-manager.168cad.top';
//export const SERVER_URL = 'http://127.0.0.1:8080';
export default {
APP_ID,
......
......@@ -8,6 +8,7 @@ import Login from './Login/index';
import Equipment from './EquipmentContent/index';
import EquipmentTest from './Equipment/EquipmentTest';
import BindEquipment from './BindEquipment';
import EquipmentSpecialArea from './Equipment/EquipmentSpecialArea';
import NoMatch from './NoMatch';
function App() {
......@@ -38,6 +39,10 @@ function App() {
path='/EquipmentTest'
render={props => <EquipmentTest {...props} setTitle={setTitle} />}
/>
<Route
path='/EquipmentSpecialArea'
render={props => <EquipmentSpecialArea {...props} setTitle={setTitle} />}
/>
<Route component={NoMatch} />
</Switch>
</UserProvider>
......
.Equipment {
flex: 1;
background:rgba(255, 255, 255, 1) url('../../images/Login/login_bg@2x.png') no-repeat;
background-size: contain;
background-position-y: -750px;
overflow-y: auto;
.inputBox {
display: flex;
width: 500px;
margin: 45px auto 0;
}
/* .inputInner {
composes: listItem from '../Login/style.css';
} */
/* .input {
composes: listInput from '../Login/style.css';
} */
.inputIcon {
width: 24px;
height: 28px;
margin: 26px 10px 0 20px;
}
.inputText {
font-size: 26px;
color: #444;
flex: 1;
line-height: 80px;
}
.btnBox {
width: 500px;
margin: 86px auto 0;
background-color: #fff;
box-shadow: 0 0 5px rgba(43, 43, 43, 0.3);
display: flex;
flex-wrap: wrap;
position: relative;
}
.testBtnBox {
height: 250px;
justify-content: center;
}
.boxB,
.boxBv,
.testBoxBs {
position: absolute;
background-color: #ebebeb;
}
.boxBs,
.testBoxBs {
width: 2px;
height: 440px;
left: 249px;
top: 30px;
}
.testBoxBs {
height: 190px;
}
.boxBv {
width: 440px;
height: 2px;
left: 30px;
top: 249px;
}
.linkItem {
box-sizing: border-box;
width: 250px;
height: 250px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #444;
font-size: 26px;
position: relative;
}
.linkItem:nth-child(odd),
.linkItem:nth-child(even) {
border-bottom: 1px solid #ebebeb;
}
.linkItem:nth-child(odd) {
border-right: 1px solid #ebebeb;
}
.linkIcon {
width: 60px;
height: 60px;
margin-bottom: 20px;
}
.scan {
display: flex;
justify-content: center;
align-items: center;
height: 80px;
line-height: 80px;
margin-left: 10px;
font-size: 24px;
padding: 0 24px;
}
.scanicon {
width: 45px;
height: 45px;
}
.scontent {
width: 100%;
margin-top: 70px;
// padding-left: 10px;
// padding-right: 10px;
}
.scontentCol {
// width: 100%;
margin-top: 10px;
margin-bottom: 10px;
}
.button{
margin-left: 10px;
margin-right: 10px;
}
.button1{
margin-top: 20px;
margin-bottom: 60px;
}
.button2{
margin-top: 40px;
}
.my-radio .am-radio {
padding: 2.5px;
border: 1px solid #ccc;
border-radius: 50%;
margin-right: 5px;
}
}
\ No newline at end of file
......@@ -85,6 +85,7 @@ export class Index extends React.Component {
// console.log(res);
const data = res.data;
const { accountCategory } = data;
const { isSpecialArea } = data;
const { history } = this.props;
updateUserInfo({
...data,
......@@ -97,6 +98,15 @@ export class Index extends React.Component {
},
});
const location =
// {
// pathname: '/EquipmentSpecialArea',
// state: data,
// };
isSpecialArea === 1
? {
pathname: '/EquipmentSpecialArea',
state: data,
} :
accountCategory === 1
? {
pathname: '/BindEquipment',
......
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