#search manage keyword modify
This commit is contained in:
parent
6da49c1f40
commit
5ff01f8e12
|
@ -1,15 +1,20 @@
|
|||
import React, { PureComponent, Fragment } from 'react';
|
||||
import { connect } from 'dva';
|
||||
import {
|
||||
Row,
|
||||
Col,
|
||||
Card,
|
||||
Form,
|
||||
Input,
|
||||
Button,
|
||||
Modal,
|
||||
message,
|
||||
Divider,
|
||||
Row,
|
||||
Col,
|
||||
Card,
|
||||
Form,
|
||||
Input,
|
||||
Button,
|
||||
Modal,
|
||||
message,
|
||||
Divider,
|
||||
Icon,
|
||||
DatePicker,
|
||||
TimePicker,
|
||||
Select,
|
||||
Popover,
|
||||
} from 'antd';
|
||||
import StandardTable from '@/components/StandardTable';
|
||||
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
|
||||
|
@ -18,6 +23,11 @@ import styles from '../../List/TableList.less';
|
|||
|
||||
const FormItem = Form.Item;
|
||||
const { TextArea } = Input;
|
||||
const fieldLabels = {
|
||||
keyword_type: '关键词分类'
|
||||
|
||||
};
|
||||
|
||||
|
||||
const CreateForm = Form.create()(props => {
|
||||
const { modalVisible, form, handleAdd, handleModalVisible } = props;
|
||||
|
@ -35,65 +45,75 @@ const CreateForm = Form.create()(props => {
|
|||
visible={modalVisible}
|
||||
width={640}
|
||||
onOk={okHandle}
|
||||
onCancel={() => handleModalVisible()}
|
||||
>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="模板名称">
|
||||
onCancel={() => handleModalVisible()}>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="关键词">
|
||||
{form.getFieldDecorator('name', {
|
||||
rules: [{ required: true, message: '请输入至少五个字符的名称!', min: 5 }],
|
||||
})(<Input placeholder="请输入名称" />)}
|
||||
</FormItem>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="模板设置">
|
||||
{form.getFieldDecorator('settings', {
|
||||
rules: [{ required: true }],
|
||||
})(<TextArea
|
||||
style={{ minHeight: 24 }}
|
||||
placeholder="请输入"
|
||||
rows={9}
|
||||
/>)}
|
||||
rules: [{ required: true, message: '请输入至少一个字符的名称!', min: 1 }],
|
||||
})(<Input placeholder="请输入关键词" />)}
|
||||
</FormItem>
|
||||
<Form.Item labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label='关键词分类'>
|
||||
{form.getFieldDecorator('keyword_type', {
|
||||
rules: [{ required: true, message: '请选择关键词类型' }],
|
||||
})(
|
||||
<Select labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} placeholder="请选择关键词类型">
|
||||
<Option value="keyun">敏感词</Option>
|
||||
<Option value="huoyun">提示词</Option>
|
||||
<Option value="xianlu1">同义词</Option>
|
||||
<Option value="xianlu2">过滤词</Option>
|
||||
<Option value="xianlu3">停用词</Option>
|
||||
<Option value="xianlu4">保留词</Option>
|
||||
<Option value="xianlu5">纠错词</Option>
|
||||
<Option value="xianlu6">相关搜索</Option>
|
||||
<Option value="xianlu7">热点词管理</Option>
|
||||
</Select>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Modal>
|
||||
);
|
||||
);
|
||||
});
|
||||
|
||||
const UpdateForm = Form.create()(props => {
|
||||
const { updateModalVisible, handleUpdateModalVisible, handleUpdate,values,form } = props;
|
||||
const { updateModalVisible, handleUpdateModalVisible, handleUpdate,values,form } = props;
|
||||
|
||||
const okHandle = () => {
|
||||
const okHandle = () => {
|
||||
form.validateFields((err, fieldsValue) => {
|
||||
if (err) return;
|
||||
form.resetFields();
|
||||
handleUpdate(fieldsValue);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
title="模板设置"
|
||||
visible={updateModalVisible}
|
||||
width={640}
|
||||
onOk={okHandle}
|
||||
onCancel={() => handleUpdateModalVisible()}
|
||||
>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="模板名称">
|
||||
{form.getFieldDecorator('name', {
|
||||
initialValue: values.name,
|
||||
rules: [{ required: true, message: '请输入至少五个字符的名称!', min: 5 }],
|
||||
})(<Input placeholder="请输入名称" />)}
|
||||
</FormItem>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="模板设置">
|
||||
{form.getFieldDecorator('settings', {
|
||||
initialValue: values.processors,
|
||||
rules: [{ required: true }],
|
||||
})(<TextArea
|
||||
style={{ minHeight: 24 }}
|
||||
placeholder="请输入"
|
||||
rows={9}
|
||||
/>)}
|
||||
return (
|
||||
<Modal destroyOnClose title="新增关键词" visible={updateModalVisible} width={640} onOk={okHandle}
|
||||
onCancel={() => handleUpdateModalVisible()}>
|
||||
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="关键词">
|
||||
{form.getFieldDecorator('keyword', {
|
||||
initialValue: values.nakeywordme,
|
||||
rules: [{ required: true, message: '请输入至少一个字符的名称!', min: 1 }],
|
||||
})(<Input placeholder="请输入关键词" />)}
|
||||
</FormItem>
|
||||
|
||||
<Form.Item labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label={fieldLabels.keyword_type}>
|
||||
{form.getFieldDecorator('keyword_type', {
|
||||
rules: [{ required: true, message: '请选择关键词类型' }],
|
||||
})(
|
||||
<Select placeholder="请选择关键词类型">
|
||||
<Option value="keyun">敏感词</Option>
|
||||
<Option value="huoyun">提示词</Option>
|
||||
<Option value="xianlu">同义词</Option>
|
||||
<Option value="xianlu">过滤词</Option>
|
||||
<Option value="xianlu">停用词</Option>
|
||||
<Option value="xianlu">保留词</Option>
|
||||
<Option value="xianlu">纠错词</Option>
|
||||
<Option value="xianlu">相关搜索</Option>
|
||||
<Option value="xianlu">热点词管理</Option>
|
||||
</Select>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Modal>
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
/* eslint react/no-multi-comp:0 */
|
||||
@connect(({ pipeline, loading }) => ({
|
||||
|
@ -110,111 +130,66 @@ class Common extends PureComponent {
|
|||
formValues: {},
|
||||
updateFormValues: {},
|
||||
};
|
||||
//index template detail example
|
||||
// {
|
||||
// ".ml-state" : {
|
||||
// "order" : 0,
|
||||
// "version" : 7090199,
|
||||
// "index_patterns" : [
|
||||
// ".ml-state*"
|
||||
// ],
|
||||
// "settings" : {
|
||||
// "index" : {
|
||||
// "hidden" : "true",
|
||||
// "lifecycle" : {
|
||||
// "name" : "ml-size-based-ilm-policy",
|
||||
// "rollover_alias" : ".ml-state-write"
|
||||
// },
|
||||
// "auto_expand_replicas" : "0-1"
|
||||
// }
|
||||
// },
|
||||
// "mappings" : {
|
||||
// "_meta" : {
|
||||
// "version" : "7090199"
|
||||
// },
|
||||
// "enabled" : false
|
||||
// },
|
||||
// "aliases" : { }
|
||||
// }
|
||||
// }
|
||||
datasource = `
|
||||
[
|
||||
{
|
||||
"name" : "filebeat-7.9.1",
|
||||
"index_patterns" : "[filebeat-7.9.1-*]",
|
||||
"order" : "1",
|
||||
"version" : null,
|
||||
"composed_of" : ""
|
||||
"keyword" : "验收标准",
|
||||
"type" : "停用词"
|
||||
},
|
||||
{
|
||||
"name" : "apm-7.9.1-span",
|
||||
"index_patterns" : "[apm-7.9.1-span*]",
|
||||
"order" : "2",
|
||||
"version" : null,
|
||||
"composed_of" : ""
|
||||
"keyword" : "桥梁施工技术规范",
|
||||
"type" : "停用词"
|
||||
},{
|
||||
"keyword" : "路规",
|
||||
"type" : "停用词"
|
||||
},{
|
||||
"keyword" : "遂规",
|
||||
"type" : "热点词"
|
||||
},
|
||||
{
|
||||
"name" : ".lists-default",
|
||||
"index_patterns" : "[.lists-default-*]",
|
||||
"order" : "0",
|
||||
"version" : null,
|
||||
"composed_of" : ""
|
||||
"keyword" : "铁路技术管理规则",
|
||||
"type" : "热点词"
|
||||
},{
|
||||
"keyword" : "行车组织规则",
|
||||
"type" : "热点词"
|
||||
},
|
||||
{
|
||||
"name" : ".monitoring-es",
|
||||
"index_patterns" : "[.monitoring-es-7-*]",
|
||||
"order" : "0",
|
||||
"version" : "7000199",
|
||||
"composed_of" : ""
|
||||
},
|
||||
{
|
||||
"name" : ".monitoring-beats",
|
||||
"index_patterns" : "[.monitoring-beats-7-*]",
|
||||
"order" : "0",
|
||||
"version" : "7000199",
|
||||
"composed_of" : ""
|
||||
"keyword" : "铁路交通事故调查处理规则",
|
||||
"type" : "热点词"
|
||||
}]`;
|
||||
|
||||
columns = [
|
||||
{
|
||||
title: '模板名称',
|
||||
dataIndex: 'name',
|
||||
title: '关键词名称',
|
||||
dataIndex: 'keyword',
|
||||
},
|
||||
{
|
||||
title: '模式',
|
||||
dataIndex: 'index_patterns',
|
||||
},
|
||||
{
|
||||
title: 'order',
|
||||
dataIndex: 'order'
|
||||
},
|
||||
{
|
||||
title: '版本',
|
||||
dataIndex: 'version'
|
||||
title: '关键词分类',
|
||||
dataIndex: 'type',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
render: (text, record) => (
|
||||
<Fragment>
|
||||
<a onClick={() => this.handleUpdateModalVisible(true, record)}>设置</a>
|
||||
<Divider type="vertical" />
|
||||
<a onClick={() => this.handleUpdateModalVisible(true, record)}>修改</a>
|
||||
<Divider type="vertical" />
|
||||
<a onClick={() => {
|
||||
this.state.selectedRows.push(record);
|
||||
this.handleDeleteClick();
|
||||
}}>删除</a>
|
||||
</Fragment>
|
||||
),
|
||||
},
|
||||
];
|
||||
}}>删除</a>
|
||||
</Fragment>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
componentDidMount() {
|
||||
componentDidMount() {
|
||||
const { dispatch } = this.props;
|
||||
// dispatch({
|
||||
// type: 'pipeline/fetch',
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
handleStandardTableChange = (pagination, filtersArg, sorter) => {
|
||||
handleStandardTableChange = (pagination, filtersArg, sorter) => {
|
||||
const { dispatch } = this.props;
|
||||
const { formValues } = this.state;
|
||||
|
||||
|
@ -238,9 +213,9 @@ class Common extends PureComponent {
|
|||
type: 'pipeline/fetch',
|
||||
payload: params,
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
handleFormReset = () => {
|
||||
handleFormReset = () => {
|
||||
const { form, dispatch } = this.props;
|
||||
form.resetFields();
|
||||
this.setState({
|
||||
|
@ -250,9 +225,9 @@ class Common extends PureComponent {
|
|||
type: 'pipeline/fetch',
|
||||
payload: {},
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
handleDeleteClick = e => {
|
||||
handleDeleteClick = e => {
|
||||
const { dispatch } = this.props;
|
||||
const { selectedRows } = this.state;
|
||||
|
||||
|
@ -268,15 +243,15 @@ class Common extends PureComponent {
|
|||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
handleSelectRows = rows => {
|
||||
handleSelectRows = rows => {
|
||||
this.setState({
|
||||
selectedRows: rows,
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
handleSearch = e => {
|
||||
handleSearch = e => {
|
||||
e.preventDefault();
|
||||
|
||||
const { dispatch, form } = this.props;
|
||||
|
@ -298,22 +273,22 @@ class Common extends PureComponent {
|
|||
payload: values,
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
handleModalVisible = flag => {
|
||||
handleModalVisible = flag => {
|
||||
this.setState({
|
||||
modalVisible: !!flag,
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
handleUpdateModalVisible = (flag, record) => {
|
||||
handleUpdateModalVisible = (flag, record) => {
|
||||
this.setState({
|
||||
updateModalVisible: !!flag,
|
||||
updateFormValues: record || {},
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
handleAdd = fields => {
|
||||
handleAdd = fields => {
|
||||
const { dispatch } = this.props;
|
||||
dispatch({
|
||||
type: 'pipeline/add',
|
||||
|
@ -326,9 +301,9 @@ class Common extends PureComponent {
|
|||
|
||||
message.success('添加成功');
|
||||
this.handleModalVisible();
|
||||
};
|
||||
};
|
||||
|
||||
handleUpdate = fields => {
|
||||
handleUpdate = fields => {
|
||||
const { dispatch } = this.props;
|
||||
dispatch({
|
||||
type: 'pipeline/update',
|
||||
|
@ -341,18 +316,37 @@ class Common extends PureComponent {
|
|||
|
||||
message.success('修改成功');
|
||||
this.handleUpdateModalVisible();
|
||||
};
|
||||
};
|
||||
|
||||
renderSimpleForm() {
|
||||
renderSimpleForm() {
|
||||
const {
|
||||
form: { getFieldDecorator },
|
||||
} = this.props;
|
||||
return (
|
||||
<Form onSubmit={this.handleSearch} layout="inline">
|
||||
<Row gutter={{ md: 8, lg: 24, xl: 48 }}>
|
||||
<Col lg={6} md={12} sm={24}>
|
||||
<Form.Item label={fieldLabels.keyword_type}>
|
||||
{getFieldDecorator('keyword_type', {
|
||||
rules: [{ required: true, message: '请选择关键词类型' }],
|
||||
})(
|
||||
<Select placeholder="请选择关键词类型">
|
||||
<Option value="keyun">敏感词</Option>
|
||||
<Option value="huoyun">提示词</Option>
|
||||
<Option value="xianlu">同义词</Option>
|
||||
<Option value="xianlu">过滤词</Option>
|
||||
<Option value="xianlu">停用词</Option>
|
||||
<Option value="xianlu">保留词</Option>
|
||||
<Option value="xianlu">纠错词</Option>
|
||||
<Option value="xianlu">相关搜索</Option>
|
||||
<Option value="xianlu">热点词管理</Option>
|
||||
</Select>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col md={8} sm={24}>
|
||||
<FormItem label="模板名称">
|
||||
{getFieldDecorator('name')(<Input placeholder="请输入" />)}
|
||||
<FormItem label="关键词">
|
||||
{getFieldDecorator('name')(<Input placeholder="请输入关键词" />)}
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col md={8} sm={24}>
|
||||
|
@ -367,14 +361,14 @@ class Common extends PureComponent {
|
|||
</Col>
|
||||
</Row>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
renderForm() {
|
||||
renderForm() {
|
||||
return this.renderSimpleForm();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
render() {
|
||||
const data = {
|
||||
list: JSON.parse(this.datasource),
|
||||
pagination: {
|
||||
|
@ -397,7 +391,7 @@ class Common extends PureComponent {
|
|||
<div className={styles.tableListForm}>{this.renderForm()}</div>
|
||||
<div className={styles.tableListOperator}>
|
||||
<Button icon="plus" type="primary" onClick={() => this.handleModalVisible(true)}>
|
||||
新建
|
||||
新增关键词
|
||||
</Button>
|
||||
{selectedRows.length > 0 && (
|
||||
<span>
|
||||
|
@ -426,5 +420,4 @@ class Common extends PureComponent {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Common;
|
||||
|
|
|
@ -10,6 +10,11 @@ import {
|
|||
Modal,
|
||||
message,
|
||||
Divider,
|
||||
Icon,
|
||||
DatePicker,
|
||||
TimePicker,
|
||||
Select,
|
||||
Popover,
|
||||
} from 'antd';
|
||||
import StandardTable from '@/components/StandardTable';
|
||||
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
|
||||
|
@ -18,7 +23,10 @@ import styles from '../../List/TableList.less';
|
|||
|
||||
const FormItem = Form.Item;
|
||||
const { TextArea } = Input;
|
||||
const fieldLabels = {
|
||||
keyword_type: '关键词分类'
|
||||
|
||||
};
|
||||
const CreateForm = Form.create()(props => {
|
||||
const { modalVisible, form, handleAdd, handleModalVisible } = props;
|
||||
const okHandle = () => {
|
||||
|
@ -35,24 +43,25 @@ const CreateForm = Form.create()(props => {
|
|||
visible={modalVisible}
|
||||
width={640}
|
||||
onOk={okHandle}
|
||||
onCancel={() => handleModalVisible()}
|
||||
>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="模板名称">
|
||||
onCancel={() => handleModalVisible()}>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="关键词">
|
||||
{form.getFieldDecorator('name', {
|
||||
rules: [{ required: true, message: '请输入至少五个字符的名称!', min: 5 }],
|
||||
})(<Input placeholder="请输入名称" />)}
|
||||
</FormItem>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="模板设置">
|
||||
{form.getFieldDecorator('settings', {
|
||||
rules: [{ required: true }],
|
||||
})(<TextArea
|
||||
style={{ minHeight: 24 }}
|
||||
placeholder="请输入"
|
||||
rows={9}
|
||||
/>)}
|
||||
</FormItem>
|
||||
rules: [{ required: true, message: '请输入至少一个字符的名称!', min: 1 }],
|
||||
})(<Input placeholder="请输入关键词" />)}
|
||||
</FormItem>
|
||||
<Form.Item labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label='关键词分类'>
|
||||
{form.getFieldDecorator('keyword_type', {
|
||||
rules: [{ required: true, message: '请选择关键词类型' }],
|
||||
})(
|
||||
<Select placeholder="请选择关键词类型">
|
||||
<Option value="keyun">客运</Option>
|
||||
<Option value="huoyun">货运</Option>
|
||||
<Option value="xianlu">线路</Option>
|
||||
</Select>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Modal>
|
||||
);
|
||||
);
|
||||
});
|
||||
|
||||
const UpdateForm = Form.create()(props => {
|
||||
|
@ -67,32 +76,29 @@ const UpdateForm = Form.create()(props => {
|
|||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose
|
||||
title="模板设置"
|
||||
visible={updateModalVisible}
|
||||
width={640}
|
||||
onOk={okHandle}
|
||||
onCancel={() => handleUpdateModalVisible()}
|
||||
>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="模板名称">
|
||||
{form.getFieldDecorator('name', {
|
||||
initialValue: values.name,
|
||||
rules: [{ required: true, message: '请输入至少五个字符的名称!', min: 5 }],
|
||||
})(<Input placeholder="请输入名称" />)}
|
||||
</FormItem>
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="模板设置">
|
||||
{form.getFieldDecorator('settings', {
|
||||
initialValue: values.processors,
|
||||
rules: [{ required: true }],
|
||||
})(<TextArea
|
||||
style={{ minHeight: 24 }}
|
||||
placeholder="请输入"
|
||||
rows={9}
|
||||
/>)}
|
||||
</FormItem>
|
||||
<Modal destroyOnClose title="新增关键词" visible={updateModalVisible} width={640} onOk={okHandle}
|
||||
onCancel={() => handleUpdateModalVisible()}>
|
||||
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="关键词">
|
||||
{form.getFieldDecorator('keyword', {
|
||||
initialValue: values.nakeywordme,
|
||||
rules: [{ required: true, message: '请输入至少一个字符的名称!', min: 1 }],
|
||||
})(<Input placeholder="请输入关键词" />)}
|
||||
</FormItem>
|
||||
|
||||
<Form.Item labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label={fieldLabels.keyword_type}>
|
||||
{form.getFieldDecorator('keyword_type', {
|
||||
rules: [{ required: true, message: '请选择关键词类型' }],
|
||||
})(
|
||||
<Select placeholder="请选择关键词类型">
|
||||
<Option value="keyun">客运</Option>
|
||||
<Option value="huoyun">货运</Option>
|
||||
<Option value="xianlu">线路</Option>
|
||||
</Select>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Modal>
|
||||
);
|
||||
);
|
||||
});
|
||||
|
||||
/* eslint react/no-multi-comp:0 */
|
||||
|
@ -110,93 +116,48 @@ class Professional extends PureComponent {
|
|||
formValues: {},
|
||||
updateFormValues: {},
|
||||
};
|
||||
//index template detail example
|
||||
// {
|
||||
// ".ml-state" : {
|
||||
// "order" : 0,
|
||||
// "version" : 7090199,
|
||||
// "index_patterns" : [
|
||||
// ".ml-state*"
|
||||
// ],
|
||||
// "settings" : {
|
||||
// "index" : {
|
||||
// "hidden" : "true",
|
||||
// "lifecycle" : {
|
||||
// "name" : "ml-size-based-ilm-policy",
|
||||
// "rollover_alias" : ".ml-state-write"
|
||||
// },
|
||||
// "auto_expand_replicas" : "0-1"
|
||||
// }
|
||||
// },
|
||||
// "mappings" : {
|
||||
// "_meta" : {
|
||||
// "version" : "7090199"
|
||||
// },
|
||||
// "enabled" : false
|
||||
// },
|
||||
// "aliases" : { }
|
||||
// }
|
||||
// }
|
||||
datasource = `
|
||||
[
|
||||
{
|
||||
"name" : "filebeat-7.9.1",
|
||||
"index_patterns" : "[filebeat-7.9.1-*]",
|
||||
"order" : "1",
|
||||
"version" : null,
|
||||
"composed_of" : ""
|
||||
"keyword" : "验收标准",
|
||||
"type" : "客运"
|
||||
},
|
||||
{
|
||||
"name" : "apm-7.9.1-span",
|
||||
"index_patterns" : "[apm-7.9.1-span*]",
|
||||
"order" : "2",
|
||||
"version" : null,
|
||||
"composed_of" : ""
|
||||
"keyword" : "桥梁施工技术规范",
|
||||
"type" : "客运"
|
||||
},{
|
||||
"keyword" : "路规",
|
||||
"type" : "客运"
|
||||
},{
|
||||
"keyword" : "遂规",
|
||||
"type" : "客运"
|
||||
},
|
||||
{
|
||||
"name" : ".lists-default",
|
||||
"index_patterns" : "[.lists-default-*]",
|
||||
"order" : "0",
|
||||
"version" : null,
|
||||
"composed_of" : ""
|
||||
"keyword" : "铁路技术管理规则",
|
||||
"type" : "客运"
|
||||
},{
|
||||
"keyword" : "行车组织规则",
|
||||
"type" : "客运"
|
||||
},
|
||||
{
|
||||
"name" : ".monitoring-es",
|
||||
"index_patterns" : "[.monitoring-es-7-*]",
|
||||
"order" : "0",
|
||||
"version" : "7000199",
|
||||
"composed_of" : ""
|
||||
},
|
||||
{
|
||||
"name" : ".monitoring-beats",
|
||||
"index_patterns" : "[.monitoring-beats-7-*]",
|
||||
"order" : "0",
|
||||
"version" : "7000199",
|
||||
"composed_of" : ""
|
||||
"keyword" : "铁路交通事故调查处理规则",
|
||||
"type" : "客运"
|
||||
}]`;
|
||||
|
||||
columns = [
|
||||
{
|
||||
title: '模板名称',
|
||||
dataIndex: 'name',
|
||||
title: '关键词名称',
|
||||
dataIndex: 'keyword',
|
||||
},
|
||||
{
|
||||
title: '模式',
|
||||
dataIndex: 'index_patterns',
|
||||
},
|
||||
{
|
||||
title: 'order',
|
||||
dataIndex: 'order'
|
||||
},
|
||||
{
|
||||
title: '版本',
|
||||
dataIndex: 'version'
|
||||
title: '关键词分类',
|
||||
dataIndex: 'type',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
render: (text, record) => (
|
||||
<Fragment>
|
||||
<a onClick={() => this.handleUpdateModalVisible(true, record)}>设置</a>
|
||||
<a onClick={() => this.handleUpdateModalVisible(true, record)}>修改</a>
|
||||
<Divider type="vertical" />
|
||||
<a onClick={() => {
|
||||
this.state.selectedRows.push(record);
|
||||
|
@ -350,9 +311,22 @@ class Professional extends PureComponent {
|
|||
return (
|
||||
<Form onSubmit={this.handleSearch} layout="inline">
|
||||
<Row gutter={{ md: 8, lg: 24, xl: 48 }}>
|
||||
<Col lg={6} md={12} sm={24}>
|
||||
<Form.Item label={fieldLabels.keyword_type}>
|
||||
{getFieldDecorator('keyword_type', {
|
||||
rules: [{ required: true, message: '请选择关键词类型' }],
|
||||
})(
|
||||
<Select placeholder="请选择关键词类型">
|
||||
<Option value="keyun">客运</Option>
|
||||
<Option value="huoyun">货运</Option>
|
||||
<Option value="xianlu">线路</Option>
|
||||
</Select>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col md={8} sm={24}>
|
||||
<FormItem label="模板名称">
|
||||
{getFieldDecorator('name')(<Input placeholder="请输入" />)}
|
||||
<FormItem label="关键词">
|
||||
{getFieldDecorator('name')(<Input placeholder="请输入关键词" />)}
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col md={8} sm={24}>
|
||||
|
@ -397,7 +371,7 @@ class Professional extends PureComponent {
|
|||
<div className={styles.tableListForm}>{this.renderForm()}</div>
|
||||
<div className={styles.tableListOperator}>
|
||||
<Button icon="plus" type="primary" onClick={() => this.handleModalVisible(true)}>
|
||||
新建
|
||||
新增关键词
|
||||
</Button>
|
||||
{selectedRows.length > 0 && (
|
||||
<span>
|
||||
|
|
Loading…
Reference in New Issue