Commit 7b2e0976 authored by 沈翠玲's avatar 沈翠玲

第三个看板开发

parent ed85b5a3
...@@ -118,13 +118,13 @@ export default [ ...@@ -118,13 +118,13 @@ export default [
layout: false, layout: false,
component: './kanban/paintingProcessKanban', component: './kanban/paintingProcessKanban',
}, },
// { {
// path: 'productionProgressKanban', path: 'productionProgressKanban',
// name: 'productionProgressKanban', name: 'productionProgressKanban',
// target: '_blank', target: '_blank',
// layout: false, layout: false,
// component: './kanban/ProductionProgress', component: './kanban/ProductionProgress',
// }, },
// { // {
// path: 'materialSynthesisKanban', // path: 'materialSynthesisKanban',
// name: 'materialSynthesisKanban', // name: 'materialSynthesisKanban',
......
...@@ -54,7 +54,11 @@ export default { ...@@ -54,7 +54,11 @@ export default {
'状态': 'สถานะ', '状态': 'สถานะ',
'产线选择': 'การเลือกสายการผลิต', '产线选择': 'การเลือกสายการผลิต',
'日产出': 'นิสสัน', '日产出': 'นิสสัน',
'生产计划看板': 'แผนการผลิต Kanban' '生产计划看板': 'แผนการผลิต Kanban',
'日期': 'วันที่',
'产品': 'ผลิตภัณฑ์',
'计划数': 'จำนวนแผน',
'工序': 'ขั้นตอนการทำงาน'
} }
; ;
\ No newline at end of file
...@@ -54,6 +54,10 @@ export default { ...@@ -54,6 +54,10 @@ export default {
'状态': '状态', '状态': '状态',
'产线选择': '产线选择', '产线选择': '产线选择',
'日产出': '日产出', '日产出': '日产出',
'生产计划看板': '生产计划看板' '生产计划看板': '生产计划看板',
'日期': '日期',
'产品': '产品',
'计划数': '计划数',
'工序': '工序'
}; };
\ No newline at end of file
...@@ -67,6 +67,11 @@ ...@@ -67,6 +67,11 @@
background-image: url('./img/2.png'); background-image: url('./img/2.png');
} }
} }
&:nth-child(3) {
.imgWapper {
background-image: url('./img/3.png');
}
}
} }
.logout { .logout {
position: absolute; position: absolute;
......
...@@ -52,10 +52,15 @@ div.no_right_border { ...@@ -52,10 +52,15 @@ div.no_right_border {
} }
.row_segment1_section1 { .row_segment1_section1 {
width: 132px; width: 132px;
height: auto;
&:extend(.row_section); &:extend(.row_section);
&>div {
display: flex;
align-items: center;
}
} }
.row_segment1_section2 { .row_segment1_section2 {
width: 150px; width: 170px;
&:extend(.row_section); &:extend(.row_section);
} }
.row_segment1_section3 { .row_segment1_section3 {
...@@ -66,23 +71,31 @@ div.no_right_border { ...@@ -66,23 +71,31 @@ div.no_right_border {
width: calc(100% - 132px) !important; width: calc(100% - 132px) !important;
} }
.row_segment1_section4_header { .row_segment1_section4_header {
width: calc(100% - 150px - 100px - 132px); width: calc(100% - 160px - 100px - 132px);
&:extend(.row_section); &:extend(.row_section);
} }
.row_segment1_section4 { .row_segment1_section4 {
width: calc(100% - 150px - 100px); width: calc(100% - 160px - 100px);
&:extend(.row_section); &:extend(.row_section);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.process_item { .process_item {
width: calc(100% / 4) !important; width: calc(100% / 4) !important;
&>div{
border: 1px solid #0ff;
}
} }
.process_value { .process_value {
display: flex; display: flex;
width: 100%; width: 100%;
&>div { &>div {
width: calc(100% / 3) !important; width: calc(100% / 3) !important;
display: flex;
align-items: center;
color: #fff;
justify-content: center;
border: 1px solid #0ff;
} }
} }
...@@ -97,3 +110,13 @@ div.no_right_border { ...@@ -97,3 +110,13 @@ div.no_right_border {
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
} }
.leftWrapper {
height: 100%;
overflow: auto;
-ms-overflow-style: none; /* IE 和 Edge */
scrollbar-width: none; /* Firefox */
}
.leftWrapper::-webkit-scrollbar {
display: none; /* Chrome, Safari 和 Opera */
}
\ No newline at end of file
...@@ -7,6 +7,7 @@ import ProForm, { ...@@ -7,6 +7,7 @@ import ProForm, {
ProFormRadio, ProFormRadio,
ProFormSelect, ProFormSelect,
} from '@ant-design/pro-form'; } from '@ant-design/pro-form';
import { Button } from 'antd';
import type { ProFormInstance } from '@ant-design/pro-form'; import type { ProFormInstance } from '@ant-design/pro-form';
import { queryProductionComprehensKanbanData } from '../../services/api'; import { queryProductionComprehensKanbanData } from '../../services/api';
type KanbanSetting = KANBAN.ProductionComprehens.ProductionComprehensKanbanDataDto; type KanbanSetting = KANBAN.ProductionComprehens.ProductionComprehensKanbanDataDto;
...@@ -38,11 +39,38 @@ export type SettingFormProps = { ...@@ -38,11 +39,38 @@ export type SettingFormProps = {
const SettingForm: React.FC<SettingFormProps> = (props) => { const SettingForm: React.FC<SettingFormProps> = (props) => {
const formRef = useRef<ProFormInstance>(); const formRef = useRef<ProFormInstance>();
const btn = useRef<HTMLButtonElement>(null);
const btn1 = useRef<HTMLButtonElement>(null);
const intl = useIntl(); const intl = useIntl();
const [lineName, setLineName] = useState< const [lineName, setLineName] = useState<
KanbanSetting[] KanbanSetting[]
>([]); >([]);
const [lineNameFocus, setlineNameFocus] = useState(false);
const onPressEnter = (e) => {
setlineNameFocus(true)
};
const onInputKeyDown = (e) => {
const a = document.getElementsByClassName('ant-select-open')
if (e.code === "ArrowDown" && a.length === 0) {
e.preventDefault()
btn.current?.focus()
}
}
const cancelBtn = (e) => {
if (e.code === "ArrowRight") {
btn1.current?.focus()
} else if (e.code === "ArrowUp") {
setlineNameFocus(true)
}
}
const submitBtn = (e) => {
if (e.code === "ArrowLeft") {
btn.current?.focus()
}
}
const onBlurlineName = () => {
setlineNameFocus(false)
}
return ( return (
<DrawerForm <DrawerForm
formRef={formRef} formRef={formRef}
...@@ -52,6 +80,29 @@ const SettingForm: React.FC<SettingFormProps> = (props) => { ...@@ -52,6 +80,29 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
searchConfig: { searchConfig: {
resetText: intl.formatMessage({id: '取消'}), resetText: intl.formatMessage({id: '取消'}),
submitText: intl.formatMessage({id: '确认'}), submitText: intl.formatMessage({id: '确认'}),
},
render: (props1, doms) => {
console.log(props1);
return [
<button
type='button'
key="rest"
ref={btn}
onKeyDown={cancelBtn}
onClick={() => props.onVisibleChange(false)}
>
{intl.formatMessage({id: '取消'})}
</button>,
<button
type='button'
ref={btn1}
key="submit"
onKeyDown={submitBtn}
onClick={() => props1.form?.submit?.()}
>
{intl.formatMessage({id: '确认'})}
</button>,
];
} }
}} }}
visible={props.visible} visible={props.visible}
...@@ -61,6 +112,7 @@ const SettingForm: React.FC<SettingFormProps> = (props) => { ...@@ -61,6 +112,7 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
...props.values ...props.values
}); });
} }
setlineNameFocus(false)
props.onVisibleChange(visible); props.onVisibleChange(visible);
}} }}
onFinish={async (values: FormSettingDto) => { onFinish={async (values: FormSettingDto) => {
...@@ -83,12 +135,14 @@ const SettingForm: React.FC<SettingFormProps> = (props) => { ...@@ -83,12 +135,14 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
required required
width="xl" width="xl"
min={1} min={1}
fieldProps={{ precision: 0 }} fieldProps={{ precision: 0, onPressEnter: onPressEnter }}
/> />
<div >
<ProFormSelect <ProFormSelect
name="lineName" name="lineName"
label={intl.formatMessage({id: '产线选择'})} label={intl.formatMessage({id: '产线选择'})}
required required
fieldProps={{ autoFocus: lineNameFocus, onInputKeyDown: onInputKeyDown, onBlur: () => onBlurlineName }}
width="xl" width="xl"
request={async () => { request={async () => {
const { data } = await queryProductionComprehensKanbanData(); const { data } = await queryProductionComprehensKanbanData();
...@@ -100,7 +154,11 @@ const SettingForm: React.FC<SettingFormProps> = (props) => { ...@@ -100,7 +154,11 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
setLineName(data); setLineName(data);
return data.map((a) => ({ label: a, value: a })); return data.map((a) => ({ label: a, value: a }));
}} }}
/> />
</div>
</DrawerForm> </DrawerForm>
); );
}; };
......
...@@ -60,6 +60,7 @@ const Main: React.FC = () => { ...@@ -60,6 +60,7 @@ const Main: React.FC = () => {
<KanbanStyle <KanbanStyle
headerText={intl.formatMessage({id:'生产计划看板'})} headerText={intl.formatMessage({id:'生产计划看板'})}
subTitle={setting?.lineName} subTitle={setting?.lineName}
headerStyle={{fontSize: '30px'}}
autoResize={setting.autoResize} autoResize={setting.autoResize}
onHeaderClick={() => { onHeaderClick={() => {
setSettingFormVisible(true); setSettingFormVisible(true);
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
} }
.leftheader { .leftheader {
width: 220px; width: 245px;
padding: 26px 0 0 50px; padding: 26px 0 0 25px;
color: #fff; color: #fff;
font-size: 21px; font-size: 21px;
text-align: center; text-align: center;
......
...@@ -7,6 +7,7 @@ import ProForm, { ...@@ -7,6 +7,7 @@ import ProForm, {
ProFormRadio, ProFormRadio,
ProFormSelect, ProFormSelect,
} from '@ant-design/pro-form'; } from '@ant-design/pro-form';
import { Button } from 'antd';
import type { ProFormInstance } from '@ant-design/pro-form'; import type { ProFormInstance } from '@ant-design/pro-form';
import { queryProductionComprehensKanbanData } from '../../services/api'; import { queryProductionComprehensKanbanData } from '../../services/api';
type KanbanSetting = KANBAN.ProductionComprehens.ProductionComprehensKanbanDataDto; type KanbanSetting = KANBAN.ProductionComprehens.ProductionComprehensKanbanDataDto;
...@@ -37,31 +38,39 @@ export type SettingFormProps = { ...@@ -37,31 +38,39 @@ export type SettingFormProps = {
}; };
const SettingForm: React.FC<SettingFormProps> = (props) => { const SettingForm: React.FC<SettingFormProps> = (props) => {
const intervalTimeRef = useRef<HTMLDivElement>(null);
const rowMovingTimeRef = useRef<HTMLDivElement>(null);
const lineNameRef = useRef<HTMLDivElement>(null);
const formRef = useRef<ProFormInstance>(); const formRef = useRef<ProFormInstance>();
const btn = useRef<HTMLButtonElement>(null);
const btn1 = useRef<HTMLButtonElement>(null);
const intl = useIntl(); const intl = useIntl();
const [lineName, setLineName] = useState< const [lineName, setLineName] = useState<
KanbanSetting[] KanbanSetting[]
>([]); >([]);
const handleKeyDown = (e, name) => { const [lineNameFocus, setlineNameFocus] = useState(false);
if (e.key === 'ArrowUp') { const onPressEnter = (e) => {
if(name === 'lineName') { setlineNameFocus(true)
rowMovingTimeRef.current?.children[0].focus()
} else if (name === 'rowMovingTime') {
intervalTimeRef.current?.children[0].focus()
}
// 在这里添加你的增加逻辑
} else if (e.key === 'ArrowDown') {
if(name === 'intervalTime') {
rowMovingTimeRef.current?.children[0].focus()
} else if (name === 'rowMovingTime') {
lineNameRef.current?.children[0].focus()
}
// 在这里添加你的减少逻辑
}
}; };
const onInputKeyDown = (e) => {
const a = document.getElementsByClassName('ant-select-open')
if (e.code === "ArrowDown" && a.length === 0) {
e.preventDefault()
btn.current?.focus()
}
}
const cancelBtn = (e) => {
if (e.code === "ArrowRight") {
btn1.current?.focus()
} else if (e.code === "ArrowUp") {
setlineNameFocus(true)
}
}
const submitBtn = (e) => {
if (e.code === "ArrowLeft") {
btn.current?.focus()
}
}
const onBlurlineName = () => {
setlineNameFocus(false)
}
return ( return (
<DrawerForm <DrawerForm
formRef={formRef} formRef={formRef}
...@@ -71,6 +80,29 @@ const SettingForm: React.FC<SettingFormProps> = (props) => { ...@@ -71,6 +80,29 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
searchConfig: { searchConfig: {
resetText: intl.formatMessage({id: '取消'}), resetText: intl.formatMessage({id: '取消'}),
submitText: intl.formatMessage({id: '确认'}), submitText: intl.formatMessage({id: '确认'}),
},
render: (props1, doms) => {
console.log(props1);
return [
<button
type='button'
key="rest"
ref={btn}
onKeyDown={cancelBtn}
onClick={() => props.onVisibleChange(false)}
>
{intl.formatMessage({id: '取消'})}
</button>,
<button
type='button'
ref={btn1}
key="submit"
onKeyDown={submitBtn}
onClick={() => props1.form?.submit?.()}
>
{intl.formatMessage({id: '确认'})}
</button>,
];
} }
}} }}
visible={props.visible} visible={props.visible}
...@@ -80,6 +112,7 @@ const SettingForm: React.FC<SettingFormProps> = (props) => { ...@@ -80,6 +112,7 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
...props.values ...props.values
}); });
} }
setlineNameFocus(false)
props.onVisibleChange(visible); props.onVisibleChange(visible);
}} }}
onFinish={async (values: FormSettingDto) => { onFinish={async (values: FormSettingDto) => {
...@@ -88,46 +121,44 @@ const SettingForm: React.FC<SettingFormProps> = (props) => { ...@@ -88,46 +121,44 @@ const SettingForm: React.FC<SettingFormProps> = (props) => {
}} }}
> >
<ProFormCheckbox name="autoResize" label={intl.formatMessage({id: '适配窗口'})} width="xl" /> <ProFormCheckbox name="autoResize" label={intl.formatMessage({id: '适配窗口'})} width="xl" />
<div onKeyDown={(e)=>handleKeyDown(e, 'intervalTime')} ref={intervalTimeRef}> <ProFormDigit
<ProFormDigit name="intervalTime"
name="intervalTime" label={intl.formatMessage({id: '刷新时间间隔(秒)'})}
label={intl.formatMessage({id: '刷新时间间隔(秒)'})} required
required width="xl"
width="xl" min={10}
min={10} fieldProps={{ precision: 0 }}
fieldProps={{ precision: 0 }} />
/> <ProFormDigit
</div> name="rowMovingTime"
<div onKeyDown={(e)=>handleKeyDown(e, 'rowMovingTime')} ref={rowMovingTimeRef}> label={intl.formatMessage({id: '内容滚动(秒)'})}
<ProFormDigit required
name="rowMovingTime" width="xl"
label={intl.formatMessage({id: '内容滚动(秒)'})} min={1}
required fieldProps={{ precision: 0, onPressEnter: onPressEnter }}
width="xl" />
min={1} <div >
fieldProps={{ precision: 0 }} <ProFormSelect
/> name="lineName"
</div> label={intl.formatMessage({id: '产线选择'})}
<div onKeyDown={(e)=>handleKeyDown(e, 'lineName')}> required
<ProFormSelect fieldProps={{ autoFocus: lineNameFocus, onInputKeyDown: onInputKeyDown, onBlur: () => onBlurlineName }}
name="lineName" width="xl"
label={intl.formatMessage({id: '产线选择'})} request={async () => {
required const { data } = await queryProductionComprehensKanbanData();
ref={lineNameRef} if (Array.isArray(data)) {
width="xl" data.unshift(intl.formatMessage({
request={async () => { id: '全厂'
const { data } = await queryProductionComprehensKanbanData(); }))
if (Array.isArray(data)) { }
data.unshift(intl.formatMessage({ setLineName(data);
id: '全厂' return data.map((a) => ({ label: a, value: a }));
})) }}
}
setLineName(data);
return data.map((a) => ({ label: a, value: a }));
}}
/> />
</div> </div>
</DrawerForm> </DrawerForm>
); );
}; };
......
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