Commit 98ab8fb4 authored by 皮倩雯's avatar 皮倩雯

fix: '定时任务优化'

parent 3171cdf1
Pipeline #83428 passed with stages
......@@ -1214,7 +1214,20 @@ const AddModal = props => {
</Col>
<Col span={24}>
<Item
label="设备条件"
label={
<div className={styles.labelItem}>
<Tooltip title="请使用SQL条件进行配置">
<InfoCircleOutlined
style={{
color: 'rgb(24, 144, 255)',
marginLeft: '5px',
marginRight: '3px',
}}
/>
</Tooltip>
设备条件
</div>
}
name="filterCondition"
labelCol={{ span: 5 }}
rules={[
......
......@@ -381,51 +381,14 @@ const OptionEditModal = props => {
<Input placeholder="" disabled />
</Item>
</Col>
<Col span={24}>
{/* <Col span={24}>
<Item
label={
<div style={{ display: 'flex', alignItems: 'center' }}>
{/* <Tooltip title={`存在${summaryValue}个外部字段`}>
<InfoCircleOutlined
style={{
color: 'red',
display: summaryIsShow,
}}
/>
</Tooltip> */}
<span>卡片字段</span>
</div>
}
// name="CarField"
labelCol={{ span: 5 }}
// rules={[
// {
// validator: (rule, value) => {
// console.log(checkedList1);
// let aa = form.getFieldValue().SummaryFields;
// let bb = [];
// console.log(aa.split(','));
// aa.split(',').map(i => {
// if (i != '') {
// bb.push(i);
// }
// });
// console.log(bb);
// if (aa == '') {
// return Promise.reject('摘要字段必选');
// }
// if (bb.length < 1 || aa.split(',').length > 5) {
// return Promise.reject('最少配置一个字段,最多配置五个字段');
// }
// return Promise.resolve();
// },
// },
// {
// required: true,
// message: '请选择摘要字段',
// },
// ]}
>
<div style={{ display: 'flex' }}>
<Form.Item name="CarField" style={{ marginBottom: 0, width: '100%' }}>
......@@ -439,7 +402,7 @@ const OptionEditModal = props => {
/>
</div>
</Item>
</Col>
</Col> */}
<Col span={24}>
<Item
label={
......
......@@ -2,7 +2,8 @@
/* eslint-disable prefer-destructuring */
/* eslint-disable no-else-return */
// 基础信息配置
import { Form, Radio, Select, Row, Col, Switch } from 'antd';
import { Form, Radio, Select, Row, Col, Switch, Tooltip } from 'antd';
import { EditOutlined, InfoCircleOutlined } from '@ant-design/icons';
import React, { useEffect, useRef, useState } from 'react';
import styles from './BaseTimeConfig.less';
......@@ -765,7 +766,20 @@ const BaseConfig = (props, ref) => {
<Form.Item
labelCol={{ span: 5 }}
name="zqms"
label="周期模式"
label={
<div style={{ display: 'flex', alignItems: 'center' }}>
<Tooltip title="当类型为扫码巡检时,此时的周期配置为消息提醒的时间周期">
<InfoCircleOutlined
style={{
color: 'rgb(24, 144, 255)',
marginLeft: '5px',
marginRight: '3px',
}}
/>
</Tooltip>
周期模式
</div>
}
initialValue={Unit}
rules={[
{
......
......@@ -14,6 +14,7 @@ import {
Select,
message,
notification,
Checkbox,
} from 'antd';
import { EditOutlined, InfoCircleOutlined } from '@ant-design/icons';
import moment from 'moment';
......@@ -137,7 +138,7 @@ const AddModal = props => {
setExeTime(moment().format('YYYY-MM-DD 00:00:00'));
setIsType('重复执行');
changeLoopMode('ByLoop');
setIsUse(true);
setIsUse(false);
setInterval(1);
setLoop_unit('Hour');
}
......@@ -274,8 +275,8 @@ const AddModal = props => {
day_of_week: '',
});
};
const onChange = val => {
setIsUse(val);
const onChange = e => {
setIsUse(e.target.checked);
};
const handleExe = e => {
let obj = form.getFieldValue();
......@@ -580,12 +581,7 @@ const AddModal = props => {
</div>
</Item>
<Item label="禁用此计划" style={{ color: '#f00' }} name="is_enable">
<Switch
checkedChildren="是"
unCheckedChildren="否"
checked={isUse}
onChange={onChange}
/>
<Checkbox checked={isUse} onChange={onChange} />
</Item>
</Form>
</div>
......
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