Commit 2b25312a authored by mayongxin's avatar mayongxin
parents 9b912b9f 507a752b
Pipeline #27668 skipped with stages
......@@ -42,5 +42,5 @@
.deleteItem{
position:relative;
right: -100%;
top: -8rem;
top: -8.6rem;
}
\ No newline at end of file
......@@ -150,15 +150,7 @@ const AddModal = props => {
setLoading(false)
})
}
const layout = {
layout: 'horizontal',
labelCol: {
span: 6,
},
wrapperCol: {
span: 16,
},
};
//选择设备类型
const handleDeviceType = (value) => {
getDeviceCode()
......@@ -261,13 +253,13 @@ const AddModal = props => {
>
<Spin spinning={isloading} delay={300}>
{visible && (
<Form form={form} {...layout} onFinish={onFinish}>
<Form form={form} onFinish={onFinish}>
<Item
label="方案名称"
name="PredictName"
rules={[{ required: true, message: '请输入方案名称' }]}
>
<Input placeholder="请输入任务名称" allowClear />
<Input placeholder="请输入方案名称" allowClear />
</Item>
<Item
label="场景名称"
......@@ -287,49 +279,6 @@ const AddModal = props => {
{deviceType.length ? deviceType.map((item, index) => { return <Select.Option key={index} value={item.DeviceType}>{item.DeviceType}</Select.Option> }) : ''}
</Select>
</Item>
<Item
label="预测维度"
name="PredictType"
rules={[{ required: true, message: '请选择预测维度' }]}
>
<Select onChange={selectPredictType} >
{PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select>
</Item>
{showTime ? <Item
label="维度类别"
name="PredictCycle"
rules={[{ required: true, message: '请选择维度类别' }]}
>
<Select >
{commonType.length ? commonType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select>
</Item> : ''}
<Item
label="预测维度值"
name="PredictCycleValue"
rules={[{ required: true, message: '请输入预测维度值' }]}
>
<Input placeholder="请输入任务名称" allowClear />
</Item>
<Item
label="统计维度"
name="StatisticCycle"
rules={[{ required: true, message: '请选择预测维度' }]}
>
<Select>
{PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select>
</Item>
<Item
label="统计维度值"
name="StatisticCycleValue"
rules={[{ required: true, message: '请选择维度类别' }]}
>
<Input placeholder="请输入任务名称" allowClear />
</Item>
<Item
label="预测间隔"
name="Cycle"
......@@ -337,16 +286,66 @@ const AddModal = props => {
>
<div>
<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}>
<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
label="预测维度"
name="PredictType"
style={{ marginLeft: '0.8rem' }}
rules={[{ required: true, message: '请选择预测维度' }]}
>
<Select onChange={selectPredictType} style={{ width: '8.8rem' }}>
{PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select>
</Item>
{showTime ? <Item
label="维度类别"
name="PredictCycle"
style={{ marginLeft: '0.8rem' }}
rules={[{ required: true, message: '请选择维度类别' }]}
>
<Select style={{ width: '8.8rem' }}>
{commonType.length ? commonType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select>
</Item> : ''}
<Item
label="预测维度值"
style={{ marginLeft: '0.8rem' }}
name="PredictCycleValue"
rules={[{ required: true, message: '请输入预测维度值' }]}
>
<Input placeholder="请输入预测维度值" style={{ width: '12rem' }} allowClear />
</Item>
</Row>
<Row gutter='24' >
<Item
label="统计维度"
style={{ marginLeft: '0.8rem' }}
name="StatisticCycle"
rules={[{ required: true, message: '请选择预测维度' }]}
>
<Select style={{ width: '23.5rem' }}>
{PredictType.length ? PredictType.map((item, index) => { return <Select.Option key={index} value={item}>{item}</Select.Option> }) : ''}
</Select>
</Item>
<Item
label="统计维度值"
style={{ marginLeft: '0.8rem' }}
name="StatisticCycleValue"
rules={[{ required: true, message: '请输入统计维度值' }]}
>
<Input style={{ width: '12rem' }} placeholder="请输入统计维度值" allowClear />
</Item>
</Row>
<Item
label="描述"
name="Remarks"
style={{ marginLeft: '2.4rem' }}
>
<TextArea placeholder="可输入描述信息" rows={4} allowClear />
</Item>
......@@ -390,6 +389,7 @@ const AddModal = props => {
<Col span={12}>
<Item
label="最小值"
style={{ marginLeft: '1.5rem' }}
name={'min' + index}
>
<Input placeholder="请输入最小值" style={{ width: '98%' }} onChange={(value) => inputMin(value, index)} index={index} allowClear />
......@@ -398,6 +398,7 @@ const AddModal = props => {
<Col span={12}>
<Item
label="最大值"
style={{ marginLeft: '1.6rem' }}
name={'max' + index}
>
<Input style={{ width: '98%', marginLeft: '0.4rem' }} placeholder="请输入最大值" onChange={(value) => inputMax(value, index)} index={index} allowClear />
......
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 {
SetServiceConfig, GetAllConfig
......@@ -59,8 +59,8 @@ const AddModal = props => {
const onFinish = value => { };
useEffect(() => {
if(type!=''){
form.setFieldsValue({ schemename: listData[0] });
if (type != '') {
form.setFieldsValue({ ...formObj });
}
}, [visible]);
......@@ -77,7 +77,7 @@ const AddModal = props => {
};
const handleChange = (value) => {
form.setFieldsValue({ schemename: value});
form.setFieldsValue({ schemename: value });
}
return (
......@@ -99,13 +99,44 @@ const AddModal = props => {
{visible && (
<Form form={form} {...layout} onFinish={onFinish}>
<Item
label="方案名"
name="schemename"
rules={[{ required: true, message: '请选择服务名' }]}
label="名"
name="tableName"
rules={[{ required: true, message: '请输入表名' }]}
>
<Select onChange={handleChange}>
{listData.map((item, index) => { return <Option value={item} key={index}>{item}</Option> }) }
</Select>
<Input placeholder="请输入表名" allowClear />
</Item>
<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>
</Form>
)}
......
......@@ -7,7 +7,8 @@ import {
Input,
Button,
Select,
Popconfirm
Popconfirm,
Spin
} from 'antd';
import { PlusCircleOutlined } from '@ant-design/icons';
import PageContainer from '@/components/BasePageContainer';
......@@ -24,7 +25,7 @@ const TableManager = () => {
const [type, setType] = useState(''); // 弹窗类型
const [formObj, setFormObj] = useState({});
const [flag, setFlag] = useState(0); // 弹窗类型
const [treeLoading,setTreeLoading] = useState(true)
const columns = [
{
title: '名称',
......@@ -118,7 +119,7 @@ const TableManager = () => {
type="primary"
size="small"
onClick={() => {
changeDesc(record);
editor(record);
}}
>
编辑字段
......@@ -129,7 +130,7 @@ const TableManager = () => {
okText="确认"
cancelText="取消"
onConfirm={() => {
changeDesc(record);
deleteChart(record);
}}
>
<Button size="small" danger>
......@@ -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 => {
......@@ -163,11 +172,13 @@ const TableManager = () => {
loadTable(text)
}
const loadTable = (keyword)=>{
setTreeLoading(true)
CM_Table_LoadTable({
_version: 9999,
filter:keyword
}).then(
res => {
setTreeLoading(false)
if (res.success == true) {
setTableData(res.root)
}
......@@ -175,6 +186,7 @@ const TableManager = () => {
)
}
return (
<Spin tip="loading..." spinning={treeLoading}>
<PageContainer>
<div className={styles.tablemanager_container}>
<div className={styles.operate_bar}>
......@@ -213,6 +225,7 @@ const TableManager = () => {
formObj={formObj}
/>
</PageContainer>
</Spin>
)
}
......
......@@ -475,7 +475,7 @@ const VectorData = props => {
pagination={{
showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`,
defaultPageSize: 5,
defaultPageSize: 8,
onChange: (value) => {
setWebCurrent(value - 1)
}
......@@ -498,7 +498,7 @@ const VectorData = props => {
pagination={{
showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`,
defaultPageSize: 10,
defaultPageSize: 8,
onChange: (value) => {
setHandCurrent(value - 1)
}
......
......@@ -163,7 +163,7 @@ export const GetMaplayerByTerminalType = 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