update 增加了查询分析详情页的文件
This commit is contained in:
1
web-react/.env.development
Normal file
1
web-react/.env.development
Normal file
@@ -0,0 +1 @@
|
||||
REACT_APP_BASE_URL=http://localhost:5566/
|
||||
1
web-react/.env.production
Normal file
1
web-react/.env.production
Normal file
@@ -0,0 +1 @@
|
||||
REACT_APP_BASE_URL=http://118.178.224.202:90/
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -24,7 +24,7 @@
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>React App</title>
|
||||
<title>宽易科技</title>
|
||||
<script src="https://webapi.amap.com/maps?v=2.0&key=c6a4832b8afbde0361b36630a3fc5bdc&plugin=Map3D,AMap.DistrictSearch,AMap.Geocoder,AMap.AutoComplete,AMap.PlaceSearch"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -17,7 +17,7 @@ import { message as Message, notification } from 'antd'
|
||||
|
||||
const STATUS = status
|
||||
|
||||
axios.defaults.baseURL = '/api'
|
||||
axios.defaults.baseURL = process.env.NODE_ENV === 'development' ? '/api' : process.env.REACT_APP_BASE_URL
|
||||
|
||||
const initInstance = (options) => {
|
||||
const instance = axios
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const urls = {
|
||||
houseQueryPage: ['/houseQuery/page', 'post'],
|
||||
houseQueryDetail: ['/houseQuery/detail', 'get'],
|
||||
}
|
||||
|
||||
export default urls
|
||||
@@ -78,28 +78,26 @@ function renderItem(data) {
|
||||
}
|
||||
|
||||
function renderCheckbox(data) {
|
||||
return (
|
||||
const grid = (
|
||||
<label className="ant-card-grid ant-card-grid-hoverable">
|
||||
<Popover
|
||||
placement="topLeft"
|
||||
content={data.remark || <span className="text-normal">没有说明</span>}
|
||||
>
|
||||
<Checkbox
|
||||
value={data.id}
|
||||
checked={data.checked}
|
||||
onChange={e => this.onChange(e, data)}
|
||||
>
|
||||
{data.title}
|
||||
</Checkbox>
|
||||
{data.visibleParent && data.type == 2 && (
|
||||
<Tooltip placement="bottom" title="选中此项才会显示菜单">
|
||||
<AntIcon type="eye" style={{ color: '#1890ff' }} className="mr-xxs" />
|
||||
</Tooltip>
|
||||
)}
|
||||
<div className="text-gray">{data.permission}</div>
|
||||
</Popover>
|
||||
<Checkbox value={data.id} checked={data.checked} onChange={e => this.onChange(e, data)}>
|
||||
{data.title}
|
||||
</Checkbox>
|
||||
{data.visibleParent && data.type == 2 && (
|
||||
<Tooltip placement="bottom" title="选中此项才会显示菜单">
|
||||
<AntIcon type="eye" style={{ color: '#1890ff' }} className="mr-xxs" />
|
||||
</Tooltip>
|
||||
)}
|
||||
<div className="text-gray">{data.permission}</div>
|
||||
</label>
|
||||
)
|
||||
return data.remark ? (
|
||||
<Popover placement="topLeft" content={data.remark}>
|
||||
{grid}
|
||||
</Popover>
|
||||
) : (
|
||||
grid
|
||||
)
|
||||
}
|
||||
|
||||
export default class AuthorityView extends Component {
|
||||
|
||||
35
web-react/src/pages/business/house/query/detail.jsx
Normal file
35
web-react/src/pages/business/house/query/detail.jsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Card } from 'antd'
|
||||
import Container from 'components/container'
|
||||
import { api } from 'common/api'
|
||||
import ReactJson from 'react-json-view'
|
||||
|
||||
export default class detail extends Component {
|
||||
state = {
|
||||
loading: false,
|
||||
record: null,
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// 获取详细数据
|
||||
const { id } = this.props.param
|
||||
if (id) {
|
||||
api.houseQueryDetail({ id }).then(({ data }) => {
|
||||
this.setState({
|
||||
record: data,
|
||||
loading: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Container>
|
||||
<Card>
|
||||
<ReactJson src={this.state.record} />
|
||||
</Card>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,14 @@ import {
|
||||
Row,
|
||||
Tag,
|
||||
} from 'antd'
|
||||
import { AntIcon, Auth, Container, InputNumberRange, QueryTable } from 'components'
|
||||
import {
|
||||
AntIcon,
|
||||
Auth,
|
||||
Container,
|
||||
InputNumberRange,
|
||||
QueryTable,
|
||||
QueryTableActions,
|
||||
} from 'components'
|
||||
import { api } from 'common/api'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { first, isEqual, last } from 'lodash'
|
||||
@@ -46,6 +53,9 @@ const authName = 'houseQuery'
|
||||
export default class index extends Component {
|
||||
state = {
|
||||
codes: {
|
||||
houseStatus: [],
|
||||
houseType: [],
|
||||
houseIndustry: [],
|
||||
houseUsedStatus: [],
|
||||
housePropertyRights: [],
|
||||
landAttribute: [],
|
||||
@@ -95,10 +105,11 @@ export default class index extends Component {
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: '任务截止时间',
|
||||
dataIndex: 'endTime',
|
||||
title: '建档状态',
|
||||
dataIndex: 'state',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
width: 100,
|
||||
render: text => this.bindCodeValue(text, 'house_status'),
|
||||
},
|
||||
]
|
||||
|
||||
@@ -109,7 +120,22 @@ export default class index extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
const flag = auth({ [authName]: [['edit'], ['delete']] })
|
||||
const flag = auth({ [authName]: 'detail' })
|
||||
|
||||
if (flag) {
|
||||
this.columns.push({
|
||||
title: '操作',
|
||||
width: 150,
|
||||
dataIndex: 'actions',
|
||||
render: (text, record) => (
|
||||
<QueryTableActions>
|
||||
<Auth auth={{ [authName]: 'detail' }}>
|
||||
<a onClick={() => this.onOpen(record.id)}>查看</a>
|
||||
</Auth>
|
||||
</QueryTableActions>
|
||||
),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,6 +158,9 @@ export default class index extends Component {
|
||||
const { onLoading, onLoadData } = this.table.current
|
||||
onLoading()
|
||||
getDictData(
|
||||
'house_status',
|
||||
'house_type',
|
||||
'house_industry',
|
||||
'house_used_status',
|
||||
'house_property_rights',
|
||||
'land_attribute',
|
||||
@@ -198,8 +227,12 @@ export default class index extends Component {
|
||||
* @param {*} modal
|
||||
* @param {*} id
|
||||
*/
|
||||
onOpen(modal, id) {
|
||||
modal.current.open({ id })
|
||||
onOpen(id) {
|
||||
window.openContentWindow({
|
||||
title: '房屋详情',
|
||||
path: 'business/house/query/detail',
|
||||
param: { id },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,14 +28,7 @@ const authName = 'houseTask'
|
||||
export default class index extends Component {
|
||||
state = {
|
||||
codes: {
|
||||
status: [
|
||||
{ code: -1, value: '审核退回' },
|
||||
{ code: 0, value: '待处理' },
|
||||
{ code: 1, value: '暂存' },
|
||||
{ code: 2, value: '待提交' },
|
||||
{ code: 3, value: '审核中' },
|
||||
{ code: 6, value: '审核通过' },
|
||||
],
|
||||
houseStatus: [],
|
||||
houseType: [],
|
||||
houseIndustry: [],
|
||||
},
|
||||
@@ -92,7 +85,7 @@ export default class index extends Component {
|
||||
dataIndex: 'state',
|
||||
sorter: true,
|
||||
width: 100,
|
||||
render: text => this.bindCodeValue(text, 'status'),
|
||||
render: text => this.bindCodeValue(text, 'house_status'),
|
||||
},
|
||||
]
|
||||
|
||||
@@ -146,7 +139,7 @@ export default class index extends Component {
|
||||
componentDidMount() {
|
||||
const { onLoading, onLoadData } = this.table.current
|
||||
onLoading()
|
||||
getDictData('house_type', 'house_industry').then(codes => {
|
||||
getDictData('house_status', 'house_type', 'house_industry').then(codes => {
|
||||
this.setState({ codes: { ...this.state.codes, ...codes } }, () => {
|
||||
onLoadData()
|
||||
})
|
||||
@@ -295,8 +288,8 @@ export default class index extends Component {
|
||||
<Form.Item label="建档状态" name="state">
|
||||
<Select allowClear className="w-150" placeholder="建档状态">
|
||||
<Select.Option value="">全部</Select.Option>
|
||||
{codes.status.map(item => (
|
||||
<Select.Option key={item.code} value={item.code}>
|
||||
{codes.houseStatus.map(item => (
|
||||
<Select.Option key={item.code} value={+item.code}>
|
||||
{item.value}
|
||||
</Select.Option>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user