update 深色地图, 从内页打开菜单
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
background-color: @component-background;
|
||||
|
||||
@box-shadow-focused: 0 0 0 2px fade(@primary-color, 50%);
|
||||
@control-background: darken(@white, 95%) !important;
|
||||
@control-background: darken(@white, 80%) !important;
|
||||
&::before,
|
||||
&::after {
|
||||
content: none;
|
||||
|
||||
@@ -20,6 +20,9 @@ import getDictData from 'util/dic'
|
||||
import { api } from 'common/api'
|
||||
import { CITY } from 'util/global'
|
||||
import auth from 'components/authorized/handler'
|
||||
import store from 'store'
|
||||
|
||||
const { getState } = store
|
||||
|
||||
const initialValues = {
|
||||
type: 1,
|
||||
@@ -47,6 +50,10 @@ export default class form extends Component {
|
||||
showIndustry: false,
|
||||
}
|
||||
|
||||
theme = getState('layout').theme
|
||||
|
||||
nav = getState('nav').nav
|
||||
|
||||
// 表单实例
|
||||
form = React.createRef()
|
||||
|
||||
@@ -69,6 +76,8 @@ export default class form extends Component {
|
||||
this.fillData({
|
||||
record: this.props.record,
|
||||
})
|
||||
|
||||
console.log(this.nav)
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
@@ -188,6 +197,7 @@ export default class form extends Component {
|
||||
mask,
|
||||
zoom: 12,
|
||||
center: result.geocodes[0].location,
|
||||
mapStyle: `amap://styles/${this.theme}`,
|
||||
})
|
||||
|
||||
this.map.on('click', e => {
|
||||
@@ -540,7 +550,15 @@ export default class form extends Component {
|
||||
<Auth auth="houseProjectInfo:page">
|
||||
<Col>
|
||||
<Button.Group>
|
||||
<Button>项目管理</Button>
|
||||
<Button
|
||||
onClick={() =>
|
||||
window.openContentWindowByMenuName(
|
||||
'bs_house_project_manage'
|
||||
)
|
||||
}
|
||||
>
|
||||
项目管理
|
||||
</Button>
|
||||
<Tooltip
|
||||
placement="top"
|
||||
title="重新加载项目列表"
|
||||
@@ -651,7 +669,15 @@ export default class form extends Component {
|
||||
<Auth auth="houseZone:page">
|
||||
<Col>
|
||||
<Button.Group>
|
||||
<Button>片区管理</Button>
|
||||
<Button
|
||||
onClick={() =>
|
||||
window.openContentWindowByMenuName(
|
||||
'bs_house_zone_manage'
|
||||
)
|
||||
}
|
||||
>
|
||||
片区管理
|
||||
</Button>
|
||||
<Tooltip placement="top" title="重新加载片区列表">
|
||||
<Button
|
||||
icon={<AntIcon type="reload" />}
|
||||
|
||||
@@ -19,7 +19,7 @@ import moment from 'moment'
|
||||
import { CITY } from 'util/global'
|
||||
import store from 'store'
|
||||
|
||||
const { dispatch } = store
|
||||
const { getState, dispatch } = store
|
||||
|
||||
const layout = {
|
||||
labelCol: { flex: '150px' },
|
||||
@@ -45,6 +45,8 @@ export default class building extends Component {
|
||||
|
||||
showMap: false,
|
||||
showKeepWarmMaterialText: false,
|
||||
|
||||
theme: getState('layout').theme,
|
||||
}
|
||||
|
||||
form = React.createRef()
|
||||
@@ -233,6 +235,7 @@ export default class building extends Component {
|
||||
mask,
|
||||
zoom: 12,
|
||||
center: result.geocodes[0].location,
|
||||
mapStyle: `amap://styles/${this.state.theme}`,
|
||||
})
|
||||
|
||||
this.map.on('click', e => {
|
||||
|
||||
@@ -18,6 +18,10 @@ export default class index extends Component {
|
||||
})
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.openContentWindowByMenuName = this.onOpenContentWindowByMenuName
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.unsubscribe()
|
||||
}
|
||||
@@ -49,6 +53,25 @@ export default class index extends Component {
|
||||
)
|
||||
}
|
||||
|
||||
onOpenContentWindowByMenuName = name => {
|
||||
for (const item of this.state.nav) {
|
||||
for (const menu of item.menu) {
|
||||
if (menu.name === name) {
|
||||
this.onOpenContentWindow(menu)
|
||||
return
|
||||
}
|
||||
if (menu.children) {
|
||||
for (const child of menu.children) {
|
||||
if (child.name === name) {
|
||||
this.onOpenContentWindow(child)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onOpenContentWindow = menu => {
|
||||
const { id, meta, component, link, redirect, openType } = menu
|
||||
|
||||
|
||||
Reference in New Issue
Block a user