update 去除所有dic前缀

This commit is contained in:
2021-06-23 14:08:38 +08:00
parent 02c16da121
commit 3734dda2db
13 changed files with 181 additions and 176 deletions

View File

@@ -30,8 +30,8 @@ const name = '房屋编码'
export default class index extends Component {
state = {
codes: {
dicHouseType: [],
dicHouseIndustry: [],
houseType: [],
houseIndustry: [],
},
options: {
@@ -62,10 +62,8 @@ export default class index extends Component {
sorter: true,
width: 150,
render: (text, record) =>
this.bindCodeValue(text, 'dic_house_type') +
(text === 2
? `(${this.bindCodeValue(record.industry, 'dic_house_industry')})`
: ''),
this.bindCodeValue(text, 'house_type') +
(text === 2 ? `(${this.bindCodeValue(record.industry, 'house_industry')})` : ''),
},
{
title: '地址',
@@ -133,7 +131,7 @@ export default class index extends Component {
componentDidMount() {
const { onLoading, onLoadData } = this.table.current
onLoading()
getDictData('dic_house_type', 'dic_house_industry').then(async res => {
getDictData('house_type', 'house_industry').then(async res => {
const { data } = await api.getAreaTree()
this.setState(
{
@@ -303,7 +301,7 @@ export default class index extends Component {
<Form.Item label="房屋性质" name="type">
<Radio.Group buttonStyle="solid">
<Radio.Button value="">全部</Radio.Button>
{codes.dicHouseType.map(item => (
{codes.houseType.map(item => (
<Radio.Button key={item.code} value={item.code}>
{item.value}
</Radio.Button>
@@ -317,7 +315,7 @@ export default class index extends Component {
className="w-150"
placeholder="请选择行业"
>
{codes.dicHouseIndustry.map(item => (
{codes.houseIndustry.map(item => (
<Select.Option key={item.code} value={item.code}>
{item.value}
</Select.Option>