Commit a9ba22cf authored by 皮倩雯's avatar 皮倩雯

fix: '维保模板增加SQL过滤'

parent 55f5a357
Pipeline #83079 passed with stages
......@@ -1212,6 +1212,32 @@ const AddModal = props => {
</TreeSelect>
</Item>
</Col>
<Col span={24}>
<Item
label="设备条件"
name="filterCondition"
labelCol={{ span: 5 }}
rules={[
{
validator: (rule, value) => {
let filterValue = form.getFieldsValue().filterCondition;
if (filterValue) {
if (
filterValue.substring(0, 3) !== 'and' &&
filterValue.substring(0, 3) !== 'AND'
) {
return Promise.reject('请以and开头');
}
return Promise.resolve();
}
return Promise.resolve();
},
},
]}
>
<Input placeholder="例如:and 泵房品牌='熊猫'(SQL表达式)" />
</Item>
</Col>
{form.getFieldsValue().accountName ? (
<Col span={24}>
<Item
......@@ -1479,32 +1505,7 @@ const AddModal = props => {
/>
</Item>
</Col>
<Col span={24}>
<Item
label="SQL过滤"
name="filterCondition"
labelCol={{ span: 5 }}
rules={[
{
validator: (rule, value) => {
let filterValue = form.getFieldsValue().filterCondition;
if (filterValue) {
if (
filterValue.substring(0, 3) !== 'and' &&
filterValue.substring(0, 3) !== 'AND'
) {
return Promise.reject('请以and开头');
}
return Promise.resolve();
}
return Promise.resolve();
},
},
]}
>
<Input placeholder="例如:and 泵房品牌='熊猫'(SQL表达式)" />
</Item>
</Col> */}
*/}
<Col span={24}>
<div className={styles.titleIcon}>
<div className={styles.icon} />
......
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