Commit 297ab520 authored by shaoan123's avatar shaoan123

删除人工智能模块不需要的代码语句

parent 8add33af
Pipeline #27399 passed with stages
in 19 minutes 9 seconds
...@@ -8,9 +8,7 @@ import AddModal from './AddModal' ...@@ -8,9 +8,7 @@ import AddModal from './AddModal'
const VectorData = props => { const VectorData = props => {
const [treeLoading, setTreeLoading] = useState(false);// 弹窗显示 const [treeLoading, setTreeLoading] = useState(false);// 弹窗显示
const [flag, setFlag] = useState(0); // 更新list const [flag, setFlag] = useState(0); // 更新list
const [loading, setLoading] = useState([]); // 更新状态
const [type, setType] = useState(''); // 弹窗类型 const [type, setType] = useState(''); // 弹窗类型
const [solutionNames, setSolutionNames] = useState('');
const [formObj, setFormObj] = useState({ user: 'admin', password: 'geoserver' }); const [formObj, setFormObj] = useState({ user: 'admin', password: 'geoserver' });
const [tileData, setTileData] = useState([]); // table表格数据 const [tileData, setTileData] = useState([]); // table表格数据
const [visible, setVisible] = useState(false); // 弹窗 const [visible, setVisible] = useState(false); // 弹窗
......
...@@ -8,9 +8,7 @@ import AddModal from './AddModal' ...@@ -8,9 +8,7 @@ import AddModal from './AddModal'
const VectorData = props => { const VectorData = props => {
const [treeLoading, setTreeLoading] = useState(false);// 弹窗显示 const [treeLoading, setTreeLoading] = useState(false);// 弹窗显示
const [flag, setFlag] = useState(0); // 更新list const [flag, setFlag] = useState(0); // 更新list
const [loading, setLoading] = useState([]); // 更新状态
const [type, setType] = useState(''); // 弹窗类型 const [type, setType] = useState(''); // 弹窗类型
const [solutionNames, setSolutionNames] = useState('');
const [formObj, setFormObj] = useState({ user: 'admin', password: 'geoserver' }); const [formObj, setFormObj] = useState({ user: 'admin', password: 'geoserver' });
const [tileData, setTileData] = useState([]); // table表格数据 const [tileData, setTileData] = useState([]); // table表格数据
const [visible, setVisible] = useState(false); // 弹窗 const [visible, setVisible] = useState(false); // 弹窗
......
...@@ -13,8 +13,6 @@ import { ...@@ -13,8 +13,6 @@ import {
addTaskOptions, getPredictInfo, getStrategyInfo, updateTaskOptions addTaskOptions, getPredictInfo, getStrategyInfo, updateTaskOptions
} from '@/services/intelligence/api'; } from '@/services/intelligence/api';
const { RangePicker } = DatePicker;
const { TextArea } = Input; const { TextArea } = Input;
const AddModal = props => { const AddModal = props => {
const { callBackSubmit = () => { }, type, formObj, visible, deviceType } = props; const { callBackSubmit = () => { }, type, formObj, visible, deviceType } = props;
...@@ -22,9 +20,8 @@ const AddModal = props => { ...@@ -22,9 +20,8 @@ const AddModal = props => {
const [isloading, setIsLoading] = useState(false); const [isloading, setIsLoading] = useState(false);
const [urlType, setUrlType] = useState(''); const [urlType, setUrlType] = useState('');
const [scenarioList, setScenarioList] = useState([]); const [scenarioList, setScenarioList] = useState([]);
const [intervalType, setIntervalType] = useState('分钟')
const [Intervals, setIntervals] = useState('') const [Intervals, setIntervals] = useState('')
const [StrategyId, setStrategyId] = useState('') const [StrategyId, setStrategyId] = useState(0)
const [form] = Form.useForm(); const [form] = Form.useForm();
const { Item } = Form; const { Item } = Form;
...@@ -53,6 +50,7 @@ const AddModal = props => { ...@@ -53,6 +50,7 @@ const AddModal = props => {
} }
}); });
}; };
//提示框
const prompt = (type, content) => { const prompt = (type, content) => {
if (type == 'success') { if (type == 'success') {
notification.success({ notification.success({
...@@ -91,9 +89,8 @@ const AddModal = props => { ...@@ -91,9 +89,8 @@ const AddModal = props => {
}, [visible]); }, [visible]);
//选择任务类型
const handleTaskType = (value) => { const handleTaskType = (value) => {
console.log('formObj', formObj);
switch (value) { switch (value) {
case '预测': case '预测':
setUrlType('predict') setUrlType('predict')
...@@ -178,8 +175,8 @@ const AddModal = props => { ...@@ -178,8 +175,8 @@ const AddModal = props => {
{scenarioList.length ? scenarioList.map((item, index) => { return <Select.Option key={index} id={item.ID} value={urlType === 'predict' ? item.PredictName : item.StrategyName}>{urlType === 'predict' ? item.PredictName : item.StrategyName}</Select.Option> }) : ''} {scenarioList.length ? scenarioList.map((item, index) => { return <Select.Option key={index} id={item.ID} value={urlType === 'predict' ? item.PredictName : item.StrategyName}>{urlType === 'predict' ? item.PredictName : item.StrategyName}</Select.Option> }) : ''}
</Select> </Select>
</Item> : <Item </Item> : <Item
label="url" label="ApiUrl"
name="url" name="ApiUrl"
> >
<Input placeholder="请输入URL" allowClear /> <Input placeholder="请输入URL" allowClear />
</Item>} </Item>}
......
import { Space, Table, Button, Popconfirm, notification } from 'antd'; import { Space, Table, Button, Popconfirm, notification ,Spin} from 'antd';
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import styles from './taskScheduling.less' import styles from './taskScheduling.less'
import { import {
...@@ -142,6 +142,7 @@ const VectorData = props => { ...@@ -142,6 +142,7 @@ const VectorData = props => {
return ( return (
<> <>
<Spin tip="loading..." spinning={treeLoading}>
<div className={styles.container}> <div className={styles.container}>
<div className={styles.tileBtn}> <div className={styles.tileBtn}>
<Button type="primary" onClick={() => { <Button type="primary" onClick={() => {
...@@ -174,7 +175,7 @@ const VectorData = props => { ...@@ -174,7 +175,7 @@ const VectorData = props => {
solutionNames={solutionNames} solutionNames={solutionNames}
/> />
</div> </div>
</Spin>
</> </>
) )
} }
......
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