Commit 2b25312a authored by mayongxin's avatar mayongxin
parents 9b912b9f 507a752b
Pipeline #27668 skipped with stages
...@@ -42,5 +42,5 @@ ...@@ -42,5 +42,5 @@
.deleteItem{ .deleteItem{
position:relative; position:relative;
right: -100%; right: -100%;
top: -8rem; top: -8.6rem;
} }
\ No newline at end of file
...@@ -150,15 +150,7 @@ const AddModal = props => { ...@@ -150,15 +150,7 @@ const AddModal = props => {
setLoading(false) setLoading(false)
}) })
} }
const layout = {
layout: 'horizontal',
labelCol: {
span: 6,
},
wrapperCol: {
span: 16,
},
};
//选择设备类型 //选择设备类型
const handleDeviceType = (value) => { const handleDeviceType = (value) => {
getDeviceCode() getDeviceCode()
...@@ -261,13 +253,13 @@ const AddModal = props => { ...@@ -261,13 +253,13 @@ const AddModal = props => {
> >
<Spin spinning={isloading} delay={300}> <Spin spinning={isloading} delay={300}>
{visible && ( {visible && (
<Form form={form} {...layout} onFinish={onFinish}> <Form form={form} onFinish={onFinish}>
<Item <Item
label="方案名称" label="方案名称"
name="PredictName" name="PredictName"
rules={[{ required: true, message: '请输入方案名称' }]} rules={[{ required: true, message: '请输入方案名称' }]}
> >
<Input placeholder="请输入任务名称" allowClear /> <Input placeholder="请输入方案名称" allowClear />
</Item> </Item>
<Item <Item
label="场景名称" label="场景名称"
...@@ -287,66 +279,73 @@ const AddModal = props => { ...@@ -287,66 +279,73 @@ const AddModal = props => {
{deviceType.length ? deviceType.map((item, index) => { return <Select.Option key={index} value={item.DeviceType}>{item.DeviceType}</Select.Option> }) : ''} {deviceType.length ? deviceType.map((item, index) => { return <Select.Option key={index} value={item.DeviceType}>{item.DeviceType}</Select.Option> }) : ''}
</Select> </Select>
</Item> </Item>
<Item
label="预测间隔"
name="Cycle"
rules={[{ required: true, message: '请输入预测间隔' }]}
>
<div>
<div className={styles.predict}></div>
<Input style={{ width: '67.2%' }} placeholder="请输入预测间隔" value={CycleValue} onChange={(value) => selectCycleValue(value)} allowClear />
<Select style={{marginLeft:'2rem', width: '28%' }} onChange={handleIntervalType} value={intervalType}>
{timeType.length ? timeType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select>
</div>
</Item>
<Row gutter='24' >
<Item <Item
label="预测维度" label="预测维度"
name="PredictType" name="PredictType"
style={{ marginLeft: '0.8rem' }}
rules={[{ required: true, message: '请选择预测维度' }]} rules={[{ required: true, message: '请选择预测维度' }]}
> >
<Select onChange={selectPredictType} > <Select onChange={selectPredictType} style={{ width: '8.8rem' }}>
{PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''} {PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select> </Select>
</Item> </Item>
{showTime ? <Item {showTime ? <Item
label="维度类别" label="维度类别"
name="PredictCycle" name="PredictCycle"
style={{ marginLeft: '0.8rem' }}
rules={[{ required: true, message: '请选择维度类别' }]} rules={[{ required: true, message: '请选择维度类别' }]}
> >
<Select > <Select style={{ width: '8.8rem' }}>
{commonType.length ? commonType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''} {commonType.length ? commonType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select> </Select>
</Item> : ''} </Item> : ''}
<Item <Item
label="预测维度值" label="预测维度值"
style={{ marginLeft: '0.8rem' }}
name="PredictCycleValue" name="PredictCycleValue"
rules={[{ required: true, message: '请输入预测维度值' }]} rules={[{ required: true, message: '请输入预测维度值' }]}
> >
<Input placeholder="请输入任务名称" allowClear /> <Input placeholder="请输入预测维度值" style={{ width: '12rem' }} allowClear />
</Item> </Item>
</Row>
<Row gutter='24' >
<Item <Item
label="统计维度" label="统计维度"
style={{ marginLeft: '0.8rem' }}
name="StatisticCycle" name="StatisticCycle"
rules={[{ required: true, message: '请选择预测维度' }]} rules={[{ required: true, message: '请选择预测维度' }]}
> >
<Select> <Select style={{ width: '23.5rem' }}>
{PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''} {PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select> </Select>
</Item> </Item>
<Item <Item
label="统计维度值" label="统计维度值"
style={{ marginLeft: '0.8rem' }}
name="StatisticCycleValue" name="StatisticCycleValue"
rules={[{ required: true, message: '请选择维度类别' }]} rules={[{ required: true, message: '请输入统计维度值' }]}
>
<Input placeholder="请输入任务名称" allowClear />
</Item>
<Item
label="预测间隔"
name="Cycle"
rules={[{ required: true, message: '请输入预测间隔' }]}
> >
<div> <Input style={{ width: '12rem' }} placeholder="请输入统计维度值" allowClear />
<div className={styles.predict}></div>
<Input style={{ width: '70%' }} placeholder="请输入预测间隔" value={CycleValue} onChange={(value) => selectCycleValue(value)} allowClear />
<Select style={{ marginLeft: '0.5rem', width: '28%' }} onChange={handleIntervalType} value={intervalType}>
{timeType.length ? timeType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select>
</div>
</Item> </Item>
</Row>
<Item <Item
label="描述" label="描述"
name="Remarks" name="Remarks"
style={{ marginLeft: '2.4rem' }}
> >
<TextArea placeholder="可输入描述信息" rows={4} allowClear /> <TextArea placeholder="可输入描述信息" rows={4} allowClear />
</Item> </Item>
...@@ -390,6 +389,7 @@ const AddModal = props => { ...@@ -390,6 +389,7 @@ const AddModal = props => {
<Col span={12}> <Col span={12}>
<Item <Item
label="最小值" label="最小值"
style={{ marginLeft: '1.5rem' }}
name={'min' + index} name={'min' + index}
> >
<Input placeholder="请输入最小值" style={{ width: '98%' }} onChange={(value) => inputMin(value, index)} index={index} allowClear /> <Input placeholder="请输入最小值" style={{ width: '98%' }} onChange={(value) => inputMin(value, index)} index={index} allowClear />
...@@ -398,6 +398,7 @@ const AddModal = props => { ...@@ -398,6 +398,7 @@ const AddModal = props => {
<Col span={12}> <Col span={12}>
<Item <Item
label="最大值" label="最大值"
style={{ marginLeft: '1.6rem' }}
name={'max' + index} name={'max' + index}
> >
<Input style={{ width: '98%', marginLeft: '0.4rem' }} placeholder="请输入最大值" onChange={(value) => inputMax(value, index)} index={index} allowClear /> <Input style={{ width: '98%', marginLeft: '0.4rem' }} placeholder="请输入最大值" onChange={(value) => inputMax(value, index)} index={index} allowClear />
......
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Form, Modal, Input, Select, AutoComplete, Button, notification } from 'antd'; import { Form, Modal, Input, Select, Radio, notification } from 'antd';
import { import {
SetServiceConfig, GetAllConfig SetServiceConfig, GetAllConfig
...@@ -59,8 +59,8 @@ const AddModal = props => { ...@@ -59,8 +59,8 @@ const AddModal = props => {
const onFinish = value => { }; const onFinish = value => { };
useEffect(() => { useEffect(() => {
if(type!=''){ if (type != '') {
form.setFieldsValue({ schemename: listData[0] }); form.setFieldsValue({ ...formObj });
} }
}, [visible]); }, [visible]);
...@@ -77,7 +77,7 @@ const AddModal = props => { ...@@ -77,7 +77,7 @@ const AddModal = props => {
}; };
const handleChange = (value) => { const handleChange = (value) => {
form.setFieldsValue({ schemename: value}); form.setFieldsValue({ schemename: value });
} }
return ( return (
...@@ -99,13 +99,44 @@ const AddModal = props => { ...@@ -99,13 +99,44 @@ const AddModal = props => {
{visible && ( {visible && (
<Form form={form} {...layout} onFinish={onFinish}> <Form form={form} {...layout} onFinish={onFinish}>
<Item <Item
label="方案名" label="名"
name="schemename" name="tableName"
rules={[{ required: true, message: '请选择服务名' }]} rules={[{ required: true, message: '请输入表名' }]}
> >
<Select onChange={handleChange}> <Input placeholder="请输入表名" allowClear />
{listData.map((item, index) => { return <Option value={item} key={index}>{item}</Option> }) } </Item>
</Select> <Item
label="别名"
name="tableAlias"
rules={[{ required: true, message: '请输入别名' }]}
>
<Input placeholder="请输入别名" allowClear />
</Item>
<Item
label="样式"
name="tableStyle"
rules={[{ required: true, message: '请输入别名' }]}
>
<Radio.Group>
<Radio value='大'>大(3)</Radio>
<Radio value='中'>中(4)</Radio>
<Radio value='小'>小(4)</Radio>
<Radio value='较小'>较小(6)</Radio>
</Radio.Group>
</Item>
<Item
label="模板"
name="officeTmpl"
rules={[{ required: true, message: '请输入别名' }]}
>
<Input placeholder="请输入别名" allowClear />
</Item>
<Item
label="接口"
name="interfaceText"
rules={[{ required: true, message: '请输入别名' }]}
>
<Input placeholder="请输入别名" allowClear />
</Item> </Item>
</Form> </Form>
)} )}
......
...@@ -7,7 +7,8 @@ import { ...@@ -7,7 +7,8 @@ import {
Input, Input,
Button, Button,
Select, Select,
Popconfirm Popconfirm,
Spin
} from 'antd'; } from 'antd';
import { PlusCircleOutlined } from '@ant-design/icons'; import { PlusCircleOutlined } from '@ant-design/icons';
import PageContainer from '@/components/BasePageContainer'; import PageContainer from '@/components/BasePageContainer';
...@@ -24,7 +25,7 @@ const TableManager = () => { ...@@ -24,7 +25,7 @@ const TableManager = () => {
const [type, setType] = useState(''); // 弹窗类型 const [type, setType] = useState(''); // 弹窗类型
const [formObj, setFormObj] = useState({}); const [formObj, setFormObj] = useState({});
const [flag, setFlag] = useState(0); // 弹窗类型 const [flag, setFlag] = useState(0); // 弹窗类型
const [treeLoading,setTreeLoading] = useState(true)
const columns = [ const columns = [
{ {
title: '名称', title: '名称',
...@@ -118,7 +119,7 @@ const TableManager = () => { ...@@ -118,7 +119,7 @@ const TableManager = () => {
type="primary" type="primary"
size="small" size="small"
onClick={() => { onClick={() => {
changeDesc(record); editor(record);
}} }}
> >
编辑字段 编辑字段
...@@ -129,7 +130,7 @@ const TableManager = () => { ...@@ -129,7 +130,7 @@ const TableManager = () => {
okText="确认" okText="确认"
cancelText="取消" cancelText="取消"
onConfirm={() => { onConfirm={() => {
changeDesc(record); deleteChart(record);
}} }}
> >
<Button size="small" danger> <Button size="small" danger>
...@@ -149,7 +150,15 @@ const TableManager = () => { ...@@ -149,7 +150,15 @@ const TableManager = () => {
}, []) }, [])
//修改表名 //修改表名
const changeDesc = () => { const changeDesc = (record) => {
setType('edit');
setFormObj(record);
setVisible(true);
}
const deleteChart =(record)=>{
}
const editor= (record)=>{
} }
const onSubmit = prop => { const onSubmit = prop => {
...@@ -163,11 +172,13 @@ const TableManager = () => { ...@@ -163,11 +172,13 @@ const TableManager = () => {
loadTable(text) loadTable(text)
} }
const loadTable = (keyword)=>{ const loadTable = (keyword)=>{
setTreeLoading(true)
CM_Table_LoadTable({ CM_Table_LoadTable({
_version: 9999, _version: 9999,
filter:keyword filter:keyword
}).then( }).then(
res => { res => {
setTreeLoading(false)
if (res.success == true) { if (res.success == true) {
setTableData(res.root) setTableData(res.root)
} }
...@@ -175,6 +186,7 @@ const TableManager = () => { ...@@ -175,6 +186,7 @@ const TableManager = () => {
) )
} }
return ( return (
<Spin tip="loading..." spinning={treeLoading}>
<PageContainer> <PageContainer>
<div className={styles.tablemanager_container}> <div className={styles.tablemanager_container}>
<div className={styles.operate_bar}> <div className={styles.operate_bar}>
...@@ -213,6 +225,7 @@ const TableManager = () => { ...@@ -213,6 +225,7 @@ const TableManager = () => {
formObj={formObj} formObj={formObj}
/> />
</PageContainer> </PageContainer>
</Spin>
) )
} }
......
...@@ -475,7 +475,7 @@ const VectorData = props => { ...@@ -475,7 +475,7 @@ const VectorData = props => {
pagination={{ pagination={{
showTotal: (total, range) => showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`, `第${range[0]}-${range[1]} 条/共 ${total} 条`,
defaultPageSize: 5, defaultPageSize: 8,
onChange: (value) => { onChange: (value) => {
setWebCurrent(value - 1) setWebCurrent(value - 1)
} }
...@@ -498,7 +498,7 @@ const VectorData = props => { ...@@ -498,7 +498,7 @@ const VectorData = props => {
pagination={{ pagination={{
showTotal: (total, range) => showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`, `第${range[0]}-${range[1]} 条/共 ${total} 条`,
defaultPageSize: 10, defaultPageSize: 8,
onChange: (value) => { onChange: (value) => {
setHandCurrent(value - 1) setHandCurrent(value - 1)
} }
......
...@@ -163,7 +163,7 @@ export const GetMaplayerByTerminalType = query => ...@@ -163,7 +163,7 @@ export const GetMaplayerByTerminalType = query =>
// 获取全部 // 获取全部
export const GettMaplayer = query => export const GettMaplayer = query =>
get(`${PUBLISH_SERVICE}/Maplayer/GettMaplayer`, query); get(`${PUBLISH_SERVICE}/Maplayer/GetMaplayer`, query);
//设置底图数据 //设置底图数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment