@@ -1,3 +1,4 @@ | |||
.vs | |||
obj | |||
bin | |||
Properties |
@@ -6,7 +6,7 @@ | |||
export default { | |||
dev: { | |||
'/api/': { | |||
target: 'http://localhost:5001', | |||
target: 'http://localhost:5002', | |||
pathRewrite: { | |||
'/api': '/api' | |||
}, | |||
@@ -15,12 +15,12 @@ export default { | |||
}, | |||
pre: { | |||
'/api/': { | |||
target: 'http://localhost:5000', | |||
changeOrigin: true, | |||
secure: false, | |||
pathRewrite: { | |||
'/api': '' | |||
}, | |||
target: 'http://localhost:5002', | |||
changeOrigin: true, | |||
secure: false, | |||
pathRewrite: { | |||
'/api': '' | |||
}, | |||
}, | |||
}, | |||
}, | |||
}; |
@@ -1,6 +1,5 @@ | |||
export default [ | |||
{ path: '/user', layout: false, routes: [{ path: '/user/login', component: './user/login' }] }, | |||
<<<<<<< HEAD | |||
// { path: '/', icon: 'SmileOutlined', component: './welcome', name: '数据看板' }, | |||
// { | |||
// icon: 'SettingOutlined', | |||
@@ -21,19 +20,19 @@ | |||
// path: '/wmx/deviceProduct', | |||
// component: './deviceProductInfo/index', | |||
// }, | |||
// ] | |||
// }, | |||
{ | |||
path: '/kep', icon: 'SettingOutlined', name: '大屏数据', | |||
routes: [ { | |||
name: '数据看板', | |||
path: '/kep/datav', | |||
routes: [{ | |||
name: '数据看板', | |||
path: '/kep/datav', | |||
component: './kep/datav', | |||
}, | |||
{ | |||
name: '报警限制', | |||
path: '/kep/alarmLimit', | |||
name: '报警限制', | |||
path: '/kep/alarmLimit', | |||
component: './kep/alarmLimit', | |||
} | |||
] | |||
@@ -48,7 +47,7 @@ | |||
// { path: '/base/dict',name:'数据字典',component:'./dict/index'} | |||
// ] | |||
// }, | |||
// { | |||
// path: '/line', icon: 'SettingOutlined', name: '产线管理', | |||
// routes: [ | |||
@@ -87,7 +86,6 @@ | |||
// { path: '/report/material', name: '原料统计', component: './report/material' }, | |||
// ] | |||
// }, | |||
======= | |||
{ path: '/', icon: 'SmileOutlined', component: './welcome', name: '数据看板' }, | |||
{ | |||
icon: 'SettingOutlined', | |||
@@ -111,16 +109,15 @@ | |||
] | |||
}, | |||
{ | |||
path: '/kep', icon: 'SettingOutlined', name: '大屏数据', | |||
routes: [{ | |||
name: '数据看板', | |||
path: '/kep', | |||
component: './kep', | |||
}, | |||
] | |||
}, | |||
// { | |||
// path: '/kep', icon: 'SettingOutlined', name: '大屏数据', | |||
// routes: [{ | |||
// name: '数据看板', | |||
// path: '/kep', | |||
// component: './kep', | |||
// }, | |||
// ] | |||
// }, | |||
{ | |||
path: '/base', icon: 'SettingOutlined', name: '基础数据管理', | |||
routes: [{ path: '/base/deviceinfo', name: '设备管理', component: './deviceInfo/index' }, | |||
@@ -171,7 +168,6 @@ | |||
{ path: '/report/material', name: '原料统计', component: './report/material' }, | |||
] | |||
}, | |||
>>>>>>> 6f4b2f1df49c81e7fad80144116bbcedd9567b2e | |||
{ path: '*', layout: false, component: './404' }, | |||
]; |
@@ -6,10 +6,6 @@ | |||
</head> | |||
<body> | |||
<div id="root"></div> | |||
<<<<<<< HEAD | |||
<script src="/umi.21356be0.js"></script> | |||
======= | |||
<script src="/umi.eeba41ac.js"></script> | |||
>>>>>>> 6f4b2f1df49c81e7fad80144116bbcedd9567b2e | |||
<script src="/umi.65cd7f67.js"></script> | |||
</body></html> |
@@ -1 +0,0 @@ | |||
#data-view{width:100%;height:100%;background-color:#030409;color:#fff}#data-view #dv-full-screen-container{background-image:url(./static/bg.9a80c9d4.png);background-size:100% 100%;box-shadow:0 0 3px #00f;display:flex;flex-direction:column}#data-view #dv-full-screen-container #chart_title{padding:10;color:"#04b2f7";font-size:"18px";font-weight:"bold"}#data-view .head_title{text-align:center;position:relative}#data-view .head_title_txt{position:absolute;top:15px;font-size:24px;right:46%}#data-view .g2-tooltip-title{color:#fff}#data-view .g2-html-annotation{font-size:14px} |
@@ -2,15 +2,47 @@ import { request } from '@umijs/max'; | |||
export default { | |||
//列表 | |||
List() { | |||
return request('/api/kepdata/getlist', { | |||
Getdatavalarmlimitpage(params) { | |||
return request('/api/kepdata/getdatavalarmlimitlist', { | |||
method: 'POST', | |||
data: { | |||
...params | |||
} | |||
}); | |||
}, | |||
Adddatavalarmlimit(params) { | |||
return request('/api/kepdata/adddatavalarmlimit', { | |||
method: 'POST', | |||
data: { | |||
...params | |||
} | |||
}); | |||
}, | |||
DeleteKep() { | |||
return request('/api/kepdata/deletekep', { | |||
method: 'Get', | |||
Updatedatavalarmlimit(params) { | |||
return request('/api/kepdata/updatedatavalarmlimit', { | |||
method: 'POST', | |||
data: { | |||
...params | |||
} | |||
}); | |||
}, | |||
} | |||
Del(parms) { | |||
return request(`/api/kepdata/deldatavalarmlimitlist/`+parms, { | |||
method: 'POST', | |||
}); | |||
}, | |||
getdatavData() { | |||
return request(`/api/kepdata/getdatavlist`, { | |||
method: 'GET', | |||
}); | |||
}, | |||
getlogs() { | |||
return request(`/api/kepdata/getlogs`, { | |||
method: 'GET', | |||
}); | |||
} | |||
} | |||
@@ -184,33 +184,17 @@ const Index = () => { | |||
}; | |||
}, | |||
}, | |||
// { | |||
// title: '步骤', | |||
// dataIndex: 'sort', | |||
// valueType: 'text', | |||
// tooltip: "步骤不可重复", | |||
// ellipsis: true, | |||
// formItemProps: () => { | |||
// return { | |||
// rules: [{ required: true, message: '此项为必填项' }] | |||
// // , | |||
// // () => ({ | |||
// // validator(_, value) { | |||
// // if (!materiallist[rowIndex]) { | |||
// // if (!materiallist.find(x => x.sort === value)) { | |||
// // return Promise.resolve(); | |||
// // } | |||
// // } else { | |||
// // if (materiallist.filter(x => x.sort === value && x.id !== materiallist[rowIndex].id).length < 1) { | |||
// // return Promise.resolve(); | |||
// // } | |||
// // } | |||
// // return Promise.reject(new Error('已存在步骤!')); | |||
// // }, | |||
// // }) | |||
// }; | |||
// }, | |||
// }, | |||
{ | |||
title: '重量误差(±)', | |||
dataIndex: 'errorWeight', | |||
valueType: 'text', | |||
ellipsis: true, | |||
formItemProps: () => { | |||
return { | |||
rules: [{ required: true, message: '此项为必填项' }], | |||
}; | |||
}, | |||
}, | |||
{ | |||
title: '操作', | |||
valueType: 'option', | |||
@@ -20,9 +20,9 @@ const Login: React.FC = () => { | |||
setIsLoading(true); | |||
const md5_str = md5(params.pwd); | |||
params.pwd = md5_str; | |||
userApi.Login(params).then((response: MyResponse.Content)=>{ | |||
userApi.Login(params).then((response: MyResponse.Content) => { | |||
setIsLoading(false); | |||
if (response.statusCode===200) { | |||
if (response.statusCode === 200) { | |||
refresh(); | |||
history.push('/'); | |||
message.success('登录成功!'); | |||
@@ -30,63 +30,63 @@ const Login: React.FC = () => { | |||
setIsLoading(false); | |||
message.error(response.errors || '登录失败!'); | |||
} | |||
}).catch(()=>{ | |||
}).catch(() => { | |||
setIsLoading(false); | |||
}) | |||
}) | |||
}; | |||
return ( | |||
<div className={styles.container}> | |||
<div className={styles.content}> | |||
<div className={styles.login_box}> | |||
<div className={styles.login_header}> | |||
{/* <div className={styles.login_logo}> | |||
<div className={styles.login_header}> | |||
{/* <div className={styles.login_logo}> | |||
<img src={LogoImg}></img> | |||
</div> */} | |||
<div className={styles.login_logo_name}></div> | |||
</div> | |||
<div className={styles.login_input}> | |||
<div className={styles.login_logo_name}>控管理系统</div> | |||
<Divider/> | |||
<Form name="basic" onFinish={onUserLogin} > | |||
<Form.Item name="account" style={{width:'90%'}} rules={[{ required: true, message: '请输入用户名!' }]}> | |||
<Input | |||
bordered={false} | |||
size="large" | |||
prefix={<UserOutlined color='white' />} | |||
placeholder="请输入用户名!" | |||
className={styles.from_Input} | |||
allowClear | |||
/> | |||
</Form.Item> | |||
<Divider/> | |||
<Form.Item name="pwd" style={{width:'90%'}} rules={[{ required: true, message: '请输入密码!' }]}> | |||
<Input.Password | |||
bordered={false} | |||
size="large" | |||
prefix={<LockOutlined color='white' />} | |||
placeholder="请输入密码!" | |||
className={styles.from_Input} | |||
allowClear | |||
/> | |||
</Form.Item> | |||
<Divider/> | |||
<Form.Item style={{height:'80px',width:'90%'}}> | |||
<Button | |||
type="primary" | |||
htmlType="submit" | |||
style={{ width: '90%' }} | |||
icon={isLoading ? <LoadingOutlined /> : null} | |||
> | |||
登录 | |||
</Button> | |||
</Form.Item> | |||
</Form> | |||
</div> | |||
<div className={styles.login_logo_name}></div> | |||
</div> | |||
<div className={styles.login_input}> | |||
<div className={styles.login_logo_name}>中控管理系统</div> | |||
<Divider /> | |||
<Form name="basic" onFinish={onUserLogin} > | |||
<Form.Item name="account" style={{ width: '90%' }} rules={[{ required: true, message: '请输入用户名!' }]}> | |||
<Input | |||
bordered={false} | |||
size="large" | |||
prefix={<UserOutlined color='white' />} | |||
placeholder="请输入用户名!" | |||
className={styles.from_Input} | |||
allowClear | |||
/> | |||
</Form.Item> | |||
<Divider /> | |||
<Form.Item name="pwd" style={{ width: '90%' }} rules={[{ required: true, message: '请输入密码!' }]}> | |||
<Input.Password | |||
bordered={false} | |||
size="large" | |||
prefix={<LockOutlined color='white' />} | |||
placeholder="请输入密码!" | |||
className={styles.from_Input} | |||
allowClear | |||
/> | |||
</Form.Item> | |||
<Divider /> | |||
<Form.Item style={{ height: '80px', width: '90%' }}> | |||
<Button | |||
type="primary" | |||
htmlType="submit" | |||
style={{ width: '90%' }} | |||
icon={isLoading ? <LoadingOutlined /> : null} | |||
> | |||
登录 | |||
</Button> | |||
</Form.Item> | |||
</Form> | |||
</div> | |||
</div> | |||
</div> | |||
<Footer /> | |||