master_basic
鲁誉程 2 years ago
parent 4ecb424bb5
commit 4a1745a29c

@ -120,6 +120,7 @@ const LeftMenuCom: FC<PageProps> = ({ data }) => {
<div>{item.name}</div> <div>{item.name}</div>
<div className={styles.triangle} style={{ transform: list[index].check ? 'rotate(90deg)' : '' }}></div> <div className={styles.triangle} style={{ transform: list[index].check ? 'rotate(90deg)' : '' }}></div>
</div> </div>
{/* 列表 */} {/* 列表 */}
<div className={styles.item_warp} style={{ display: list[index].check ? 'block' : 'none' }}> <div className={styles.item_warp} style={{ display: list[index].check ? 'block' : 'none' }}>
{ {

@ -125,16 +125,7 @@ export default function Layout() {
if (tabList.length > 0 && !layoutInfo) { if (tabList.length > 0 && !layoutInfo) {
setActiveName(tabList[0].name) setActiveName(tabList[0].name)
let info = MenuType[tabList[0].name]; let info = MenuType[tabList[0].name];
if(isTreeType(info)) return
if (info[0].name == '设备注册') {
for(let i=0; i<treeData.length; i++) {
if (treeData[i].children.length > 0) {
history.push(`/registerManage/deviceRegister/${treeData[i].children[0].key}`)
break;
}
}
return
}
if (info[0].data) { if (info[0].data) {
history.push(`${info[0].data[0].url}`) history.push(`${info[0].data[0].url}`)
@ -144,6 +135,19 @@ export default function Layout() {
} }
}, [selectVal]) }, [selectVal])
// 校验是否是树结构列表
const isTreeType = (info: any) => {
if (info[0].name == '设备注册') {
for(let i=0; i<treeData.length; i++) {
if (treeData[i].children.length > 0) {
history.push(`/registerManage/deviceRegister/${treeData[i].children[0].key}`)
break;
}
}
return true
}
}
return ( return (
<ConfigProvider <ConfigProvider
locale={zhCN} locale={zhCN}
@ -200,12 +204,10 @@ export default function Layout() {
setActive(item.id) setActive(item.id)
setActiveName(item.name) setActiveName(item.name)
if(isTreeType(info)) return
if (info.length == 0 || info[0].data && info[0].data.length == 0) { if (info.length == 0 || info[0].data && info[0].data.length == 0) {
history.push('/construction'); history.push('/construction');
// 暂时屏蔽
// setActive(tabList[0].id)
// setActiveName(tabList[0].name)
// message.info(item.name + '模块正在建设中!')
return return
} }

@ -25,8 +25,8 @@ export default function Page() {
{ title: '席位名称', dataIndex: 'name', key: 'name', align: 'center' } { title: '席位名称', dataIndex: 'name', key: 'name', align: 'center' }
] ]
let inputSty = { width: 220, marginLeft: 16, marginRight: 10 }; let inputSty = { width: 200, marginLeft: 16, marginRight: 10 };
let inputSty1 = { width: 220, marginLeft: 18, marginRight: 10 }; let inputSty1 = { width: 200, marginLeft: 18, marginRight: 10 };
return ( return (
<div> <div>

Loading…
Cancel
Save