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

fix: '形态时间选择器'

parent 8cd0fed4
Pipeline #53564 waiting for manual action with stages
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
...@@ -28,8 +28,10 @@ import { ...@@ -28,8 +28,10 @@ import {
Col, Col,
Row, Row,
TreeSelect, TreeSelect,
Image,
} from 'antd'; } from 'antd';
import AllImage from '@/assets/images/title/All.png';
import partImage from '@/assets/images/title/part.png';
import { import {
getField, getField,
loadTableFields, loadTableFields,
...@@ -39,7 +41,12 @@ import { ...@@ -39,7 +41,12 @@ import {
} from '@/services/tablemanager/tablemanager'; } from '@/services/tablemanager/tablemanager';
import styles from './index.less'; import styles from './index.less';
import VerifyModal from './VerifyModal'; import VerifyModal from './VerifyModal';
import { PlusSquareOutlined, UnorderedListOutlined, FontColorsOutlined } from '@ant-design/icons'; import {
PlusSquareOutlined,
UnorderedListOutlined,
FontColorsOutlined,
InfoCircleOutlined,
} from '@ant-design/icons';
import Tree from '@/components/ExpendableTree'; import Tree from '@/components/ExpendableTree';
const AddModal = props => { const AddModal = props => {
const { const {
...@@ -60,51 +67,9 @@ const AddModal = props => { ...@@ -60,51 +67,9 @@ const AddModal = props => {
const [verification, setVerification] = useState([]); const [verification, setVerification] = useState([]);
const [Shape, setShape] = useState(''); const [Shape, setShape] = useState('');
const [treeSelectValue, setTreeSelectValue] = useState(undefined); const [treeSelectValue, setTreeSelectValue] = useState(undefined);
const [characteristics, setCharacteristics] = useState([ const [pep, setPep] = useState(false);
'文本', const [cho, setCho] = useState(false);
'数值', const [flag, setFlag] = useState(false);
'唯一值文本',
'多行文本',
'编码',
'地址',
'本人部门',
'本人姓名',
'本人ID',
'选择器',
'搜索选择器',
'值选择器',
'值复选器',
'业务选择器',
'可编辑值选择器',
'平铺值选择器',
'站点选择器',
'人员选择器',
// '人员选择器新',
'城市选择器',
'台账选择器',
'部门选择器',
'附件',
'可预览附件',
'图片',
'可预览图片',
'录音',
'视频',
'日期时间',
'日期',
'日期月份',
'日期年份',
'日期周',
'时分秒',
'设备选择',
'坐标控件',
'区域控件',
'路径控件',
'智能抄表',
'二维码识别',
'设备二维码',
'位置坐标',
'富文本',
]);
const [characteristics1, setCharacteristics1] = useState([ const [characteristics1, setCharacteristics1] = useState([
{ {
...@@ -168,6 +133,7 @@ const AddModal = props => { ...@@ -168,6 +133,7 @@ const AddModal = props => {
const [formObj, setFormObj] = useState({ rule: [], numerical: '' }); const [formObj, setFormObj] = useState({ rule: [], numerical: '' });
const [characterValue, setCharacterValue] = useState(''); const [characterValue, setCharacterValue] = useState('');
const [show, setShow] = useState('block'); const [show, setShow] = useState('block');
const [hide, setHide] = useState(false);
const [pramData, setPramData] = useState({ const [pramData, setPramData] = useState({
Unit: '', Unit: '',
ExceptionEvent: '', ExceptionEvent: '',
...@@ -192,10 +158,13 @@ const AddModal = props => { ...@@ -192,10 +158,13 @@ const AddModal = props => {
const [radio1, setRadio1] = useState(''); const [radio1, setRadio1] = useState('');
const [radio3, setRadio3] = useState(''); const [radio3, setRadio3] = useState('');
const [detail, setDetail] = useState(''); const [detail, setDetail] = useState('');
const [checkboxAll1, setCheckboxAll1] = useState('');
const [checkboxAllID1, setCheckboxAllID1] = useState('');
const { TextArea } = Input; const { TextArea } = Input;
const [form] = Form.useForm(); const [form] = Form.useForm();
const { Item } = Form; const { Item } = Form;
const { TreeNode } = TreeSelect; const { TreeNode } = TreeSelect;
const [timeData, setTimeData] = useState('');
// 提交 // 提交
const onSubmit = () => { const onSubmit = () => {
// 不切换树 // 不切换树
...@@ -260,6 +229,14 @@ const AddModal = props => { ...@@ -260,6 +229,14 @@ const AddModal = props => {
? `${obj.tableName}.${obj.fieldName}` ? `${obj.tableName}.${obj.fieldName}`
: `${obj.tableName}`; : `${obj.tableName}`;
break; break;
case '站点选择器':
console.log(obj);
console.log(obj.pepole);
console.log(obj.choose);
console.log(pep);
console.log(cho);
data[0].Config = pep ? `本人${cho ? '' : '.n'}` : `全部${cho ? '' : '.n'}`;
break;
case '业务选择器': case '业务选择器':
if (obj.fieldName.endsWith('.n')) { if (obj.fieldName.endsWith('.n')) {
data[0].Config = obj.fieldName data[0].Config = obj.fieldName
...@@ -293,28 +270,54 @@ const AddModal = props => { ...@@ -293,28 +270,54 @@ const AddModal = props => {
data[0].Config = `${data[0].Config}?${obj.filterName}='${obj.filterValue}'`; data[0].Config = `${data[0].Config}?${obj.filterName}='${obj.filterValue}'`;
} }
break; break;
// case '人员选择器':
// if (radio1 == '全部') {
// if (radio3 == '全部ID') {
// if (obj.ConfigName) {
// let str =
// radio == 0 ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部ID` : `全部ID.n`;
// data[0].Config = str;
// }
// } else {
// if (obj.ConfigName) {
// let str = radio == 0 ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部` : `全部.n`;
// data[0].Config = str;
// }
// }
// } else {
// let str = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
// console.log(str);
// data[0].Config = str;
// }
// break;
case '人员选择器': case '人员选择器':
if (radio1 == '全部') { if (checkboxAll1 == true) {
if (radio3 == '全部ID') { if (checkboxAllID1 == true) {
if (obj.ConfigName) { if (obj.ConfigName) {
let str = let str = cho ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`;
radio == 0 ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`;
data[0].Config = str; data[0].Config = str;
} else { } else {
let str = radio == 0 ? `全部ID` : `全部ID.n`; let str = cho ? `全部ID` : `全部ID.n`;
data[0].Config = str; data[0].Config = str;
} }
} else { } else {
if (obj.ConfigName) { if (obj.ConfigName) {
let str = radio == 0 ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`; let str = cho ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`;
data[0].Config = str; data[0].Config = str;
} else { } else {
let str = radio == 0 ? `全部` : `全部.n`; let str = cho ? `全部` : `全部.n`;
data[0].Config = str; data[0].Config = str;
} }
} }
} else { } else {
let str = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`; let str = cho ? `${obj.Config}` : `${obj.Config}.n`;
console.log(str); console.log(str);
data[0].Config = str; data[0].Config = str;
} }
...@@ -425,6 +428,31 @@ const AddModal = props => { ...@@ -425,6 +428,31 @@ const AddModal = props => {
prefix: code[1] === 'undefined' ? '' : code[1], prefix: code[1] === 'undefined' ? '' : code[1],
}); });
break; break;
case '站点选择器':
let site = res[0].data.root.Config.split('.');
console.log(site[1]);
if (site[0] == '本人') {
if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: true, choose: false });
setPep(true);
setCho(false);
} else {
form.setFieldsValue({ pepole: true, choose: true });
setPep(true);
setCho(true);
}
} else {
if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: false, choose: false });
setPep(false);
setCho(false);
} else {
form.setFieldsValue({ pepole: false, choose: true });
setPep(false);
setCho(true);
}
}
break;
case '平铺值选择器': case '平铺值选择器':
case '搜索选择器': case '搜索选择器':
let data = res[0].data.root.Config.split('.'); let data = res[0].data.root.Config.split('.');
...@@ -511,63 +539,124 @@ const AddModal = props => { ...@@ -511,63 +539,124 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
// case '人员选择器':
// let pepole = res[0].data.root.Config.split('.');
// console.log(pepole);
// form.setFieldsValue({ ShowConfig: res[0].data.root.Config });
// if (pepole[0] == '全部') {
// setRadio1('全部');
// setRadio3('0');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else if (pepole[0] == '全部ID') {
// setRadio1('全部');
// setRadio3('全部ID');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else {
// setRadio1('0');
// setRadio3('0');
// form.setFieldsValue({
// All: '0',
// AllID: '0',
// Config: pepole[0],
// });
// }
// if (res[0].data.root.Config.endsWith('.n')) {
// console.log(111);
// form.setFieldsValue({ check: 1 });
// setRadio(1);
// } else {
// console.log(222);
// form.setFieldsValue({ check: 0 });
// setRadio(0);
// }
// break;
case '人员选择器': case '人员选择器':
let pepole = res[0].data.root.Config.split('.'); let pepole = res[0].data.root.Config.split('.');
console.log(pepole); console.log(pepole);
form.setFieldsValue({ ShowConfig: res[0].data.root.Config }); form.setFieldsValue({ ShowConfig: res[0].data.root.Config });
if (pepole[0] == '全部') { if (pepole[0] == '全部') {
setRadio1('全部'); setHide(false);
setRadio3('0'); setFlag(true);
setCheckboxAll1(true);
if (pepole[1] != 'n') { if (pepole[1] != 'n') {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '0', AllID1: false,
// Config: pepole[0],
ConfigName: pepole[1], ConfigName: pepole[1],
}); });
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '0', AllID1: false,
// Config: pepole[0],
ConfigName: '', ConfigName: '',
}); });
} }
} else if (pepole[0] == '全部ID') { } else if (pepole[0] == '全部ID') {
setRadio1('全部'); setHide(false);
setRadio3('全部ID'); setFlag(true);
setCheckboxAll1(true);
setCheckboxAllID1(true);
if (pepole[1] != 'n') { if (pepole[1] != 'n') {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '全部ID', AllID1: true,
// Config: pepole[0],
ConfigName: pepole[1], ConfigName: pepole[1],
}); });
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '全部ID', AllID1: true,
// Config: pepole[0],
ConfigName: '', ConfigName: '',
}); });
} }
} else { } else {
setRadio1('0'); setCheckboxAll1(false);
setRadio3('0'); setCheckboxAllID1(false);
setHide(true);
setFlag(false);
form.setFieldsValue({ form.setFieldsValue({
All: '0', All1: false,
AllID: '0', AllID1: false,
Config: pepole[0], Config: pepole[0],
}); });
} }
if (res[0].data.root.Config.endsWith('.n')) { if (res[0].data.root.Config.endsWith('.n')) {
console.log(111); console.log(1212);
form.setFieldsValue({ check: 1 }); form.setFieldsValue({ choose: false });
setRadio(1); setCho(false);
} else { } else {
console.log(222); console.log(3434);
form.setFieldsValue({ check: 0 }); form.setFieldsValue({ choose: true });
setRadio(0); setCho(true);
} }
break; break;
} }
...@@ -729,21 +818,46 @@ const AddModal = props => { ...@@ -729,21 +818,46 @@ const AddModal = props => {
return tempObj; return tempObj;
}; };
const handleCharacteristics = value => { const handleCharacteristics = value => {
form.setFieldsValue({ if (
Config: '', value == '日期' ||
tableName: '', value == '日期时间' ||
fieldName: '', value == '日期月份' ||
filterName: '', value == '日期年份' ||
filterValue: '', value == '日期周' ||
standingBook: '', value == '时分秒'
check: 0, ) {
AllID: '0', console.log(123);
All: '0', form.setFieldsValue({ Config: '默认为当前时间' });
ShowConfig: '', setTimeData('默认为当前时间');
}); } else {
form.setFieldsValue({
Config: '',
ConfigName: '',
tableName: '',
fieldName: '',
filterName: '',
filterValue: '',
standingBook: '',
check: 0,
AllID: '0',
All: '0',
AllID1: '',
All1: '',
ShowConfig: '',
pepole: '',
choose: '',
});
}
setRadio(0); setRadio(0);
setRadio3('0'); setRadio3('0');
setRadio1('0'); setRadio1('0');
setPep('');
setCho('');
setCheckboxAll1('');
setCheckboxAllID1('');
setFlag(false);
setHide(true);
console.log(value); console.log(value);
if (value == '文本') { if (value == '文本') {
setDetail('输入内容将显示在前端输入框提示信息中'); setDetail('输入内容将显示在前端输入框提示信息中');
...@@ -775,8 +889,6 @@ const AddModal = props => { ...@@ -775,8 +889,6 @@ const AddModal = props => {
value == '视频' value == '视频'
) { ) {
form.setFieldsValue({ RowSpan: 6 }); form.setFieldsValue({ RowSpan: 6 });
} else if (value == '站点选择器') {
form.setFieldsValue({ Config: '全局.n' });
} else { } else {
if (pramData.RowSpan) { if (pramData.RowSpan) {
form.setFieldsValue({ RowSpan: pramData.RowSpan }); form.setFieldsValue({ RowSpan: pramData.RowSpan });
...@@ -1001,6 +1113,47 @@ const AddModal = props => { ...@@ -1001,6 +1113,47 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
case '站点选择器':
console.log(aa.Config);
let site = aa.Config.split('.');
console.log(site[1]);
if (site[0] == '本人') {
if (aa.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: true, choose: false });
setPep(true);
setCho(false);
} else {
form.setFieldsValue({ pepole: true, choose: true });
setPep(true);
setCho(true);
}
} else {
if (aa.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: false, choose: false });
setPep(false);
setCho(false);
} else {
form.setFieldsValue({ pepole: false, choose: true });
setPep(false);
setCho(true);
}
}
break;
case '部门选择器':
let department = aa.Config;
console.log(department);
if (department == '.n') {
form.setFieldsValue({
check: 1,
});
setRadio(1);
} else {
form.setFieldsValue({
check: 0,
});
setRadio(0);
}
break;
case '台账选择器': case '台账选择器':
let book = aa.Config.split('.'); let book = aa.Config.split('.');
let ad = book[1].split('?'); let ad = book[1].split('?');
...@@ -1028,60 +1181,118 @@ const AddModal = props => { ...@@ -1028,60 +1181,118 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
// case '人员选择器':
// let pepole = aa.Config.split('.');
// // form.setFieldsValue({ ShowConfig: pepole });
// if (pepole[0] == '全部') {
// setRadio1('全部');
// setRadio3('0');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// ConfigName: '',
// });
// }
// } else if (pepole[0] == '全部ID') {
// setRadio1('全部');
// setRadio3('全部ID');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// ConfigName: '',
// });
// }
// } else {
// setRadio1('0');
// setRadio3('0');
// form.setFieldsValue({
// All: '0',
// AllID: '0',
// Config: pepole[0],
// });
// }
// if (aa.Config.endsWith('.n')) {
// form.setFieldsValue({
// check: 1,
// });
// setRadio(1);
// } else {
// form.setFieldsValue({
// check: 0,
// });
// setRadio(0);
// }
// break;
case '人员选择器': case '人员选择器':
let pepole = aa.Config.split('.'); let pepole = aa.Config.split('.');
// form.setFieldsValue({ ShowConfig: pepole }); console.log(pepole);
form.setFieldsValue({ ShowConfig: aa.Config });
if (pepole[0] == '全部') { if (pepole[0] == '全部') {
setRadio1('全部'); setHide(false);
setRadio3('0'); setFlag(true);
setCheckboxAll1(true);
if (pepole[1] != 'n') { if (pepole[1] != 'n') {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '0', AllID1: false,
ConfigName: pepole[1], ConfigName: pepole[1],
}); });
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '0', AllID1: false,
ConfigName: '', ConfigName: '',
}); });
} }
} else if (pepole[0] == '全部ID') { } else if (pepole[0] == '全部ID') {
setRadio1('全部'); setHide(false);
setRadio3('全部ID'); setFlag(true);
setCheckboxAll1(true);
setCheckboxAllID1(true);
if (pepole[1] != 'n') { if (pepole[1] != 'n') {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '全部ID', AllID1: true,
ConfigName: pepole[1], ConfigName: pepole[1],
}); });
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '全部ID', AllID1: true,
ConfigName: '', ConfigName: '',
}); });
} }
} else { } else {
setRadio1('0'); setCheckboxAll1(false);
setRadio3('0'); setCheckboxAllID1(false);
setHide(true);
setFlag(false);
form.setFieldsValue({ form.setFieldsValue({
All: '0', All1: false,
AllID: '0', AllID1: false,
Config: pepole[0], Config: pepole[0],
}); });
} }
if (aa.Config.endsWith('.n')) { if (aa.Config.endsWith('.n')) {
form.setFieldsValue({ form.setFieldsValue({ choose: false });
check: 1, setCho(false);
});
setRadio(1);
} else { } else {
form.setFieldsValue({ form.setFieldsValue({ choose: true });
check: 0, setCho(true);
});
setRadio(0);
} }
break; break;
} }
...@@ -1155,6 +1366,32 @@ const AddModal = props => { ...@@ -1155,6 +1366,32 @@ const AddModal = props => {
fieldName: arr[1] || '', fieldName: arr[1] || '',
}); });
break; break;
case '站点选择器':
let site = res[0].data.root.Config.split('.');
console.log(res[0].data.root.Config);
console.log(site[1]);
if (site[0] == '本人') {
if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: true, choose: false });
setPep(true);
setCho(false);
} else {
form.setFieldsValue({ pepole: true, choose: true });
setPep(true);
setCho(true);
}
} else {
if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: false, choose: false });
setPep(false);
setCho(false);
} else {
form.setFieldsValue({ pepole: false, choose: true });
setPep(false);
setCho(true);
}
}
break;
case '业务选择器': case '业务选择器':
let list = res[0].data.root.Config.split('.'); let list = res[0].data.root.Config.split('.');
console.log(list); console.log(list);
...@@ -1174,6 +1411,21 @@ const AddModal = props => { ...@@ -1174,6 +1411,21 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
case '部门选择器':
let department = res[0].data.root.Config;
console.log(department);
if (department == '.n') {
form.setFieldsValue({
check: 1,
});
setRadio(1);
} else {
form.setFieldsValue({
check: 0,
});
setRadio(0);
}
break;
case '台账选择器': case '台账选择器':
let book = res[0].data.root.Config.split('.'); let book = res[0].data.root.Config.split('.');
let ab = book[1].split('?'); let ab = book[1].split('?');
...@@ -1201,65 +1453,123 @@ const AddModal = props => { ...@@ -1201,65 +1453,123 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
// case '人员选择器':
// let pepole = res[0].data.root.Config.split('.');
// // form.setFieldsValue({ ShowConfig: pepole });
// console.log(pepole);
// if (pepole[0] == '全部') {
// setRadio1('全部');
// setRadio3('全部');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '0',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else if (pepole[0] == '全部ID') {
// setRadio1('全部');
// setRadio3('全部ID');
// if (pepole[1] != 'n') {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: pepole[1],
// });
// } else {
// form.setFieldsValue({
// All: '全部',
// AllID: '全部ID',
// // Config: pepole[0],
// ConfigName: '',
// });
// }
// } else {
// setRadio1('0');
// setRadio3('0');
// form.setFieldsValue({
// All: '0',
// AllID: '0',
// Config: pepole[0],
// });
// }
// if (res[0].data.root.Config.endsWith('.n')) {
// form.setFieldsValue({
// check: 1,
// });
// setRadio(1);
// } else {
// form.setFieldsValue({
// check: 0,
// });
// setRadio(0);
// }
// break;
case '人员选择器': case '人员选择器':
let pepole = res[0].data.root.Config.split('.'); let pepole = res[0].data.root.Config.split('.');
// form.setFieldsValue({ ShowConfig: pepole });
console.log(pepole); console.log(pepole);
form.setFieldsValue({ ShowConfig: res[0].data.root.Config });
if (pepole[0] == '全部') { if (pepole[0] == '全部') {
setRadio1('全部'); setHide(false);
setRadio3('全部'); setFlag(true);
setCheckboxAll1(true);
if (pepole[1] != 'n') { if (pepole[1] != 'n') {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '0', AllID1: false,
// Config: pepole[0],
ConfigName: pepole[1], ConfigName: pepole[1],
}); });
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '0', AllID1: false,
// Config: pepole[0],
ConfigName: '', ConfigName: '',
}); });
} }
} else if (pepole[0] == '全部ID') { } else if (pepole[0] == '全部ID') {
setRadio1('全部'); setHide(false);
setRadio3('全部ID'); setFlag(true);
setCheckboxAll1(true);
setCheckboxAllID1(true);
if (pepole[1] != 'n') { if (pepole[1] != 'n') {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '全部ID', AllID1: true,
// Config: pepole[0],
ConfigName: pepole[1], ConfigName: pepole[1],
}); });
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
All: '全部', All1: true,
AllID: '全部ID', AllID1: true,
// Config: pepole[0],
ConfigName: '', ConfigName: '',
}); });
} }
} else { } else {
setRadio1('0'); setCheckboxAll1(false);
setRadio3('0'); setCheckboxAllID1(false);
setHide(true);
setFlag(false);
form.setFieldsValue({ form.setFieldsValue({
All: '0', All1: false,
AllID: '0', AllID1: false,
Config: pepole[0], Config: pepole[0],
}); });
} }
if (res[0].data.root.Config.endsWith('.n')) { if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ form.setFieldsValue({ choose: true });
check: 1, setCho(true);
});
setRadio(1);
} else { } else {
form.setFieldsValue({ form.setFieldsValue({ choose: false });
check: 0, setCho(false);
});
setRadio(0);
} }
break; break;
} }
...@@ -1327,6 +1637,9 @@ const AddModal = props => { ...@@ -1327,6 +1637,9 @@ const AddModal = props => {
? `${obj.tableName}.${obj.fieldName}` ? `${obj.tableName}.${obj.fieldName}`
: `${obj.tableName}`; : `${obj.tableName}`;
break; break;
case '站点选择器':
data[0].Config = pep ? `本人${cho ? '' : '.n'}` : `全部${cho ? '' : '.n'}`;
break;
case '业务选择器': case '业务选择器':
if (obj.fieldName.endsWith('.n')) { if (obj.fieldName.endsWith('.n')) {
data[0].Config = obj.fieldName data[0].Config = obj.fieldName
...@@ -1343,6 +1656,13 @@ const AddModal = props => { ...@@ -1343,6 +1656,13 @@ const AddModal = props => {
} }
} }
break; break;
case '部门选择器':
if (obj.check == 0) {
data[0].Config = '';
} else {
data[0].Config = '.n';
}
break;
case '台账选择器': case '台账选择器':
if (obj.fieldName.endsWith('.n')) { if (obj.fieldName.endsWith('.n')) {
data[0].Config = `${obj.standingBook}.${obj.fieldName}`; data[0].Config = `${obj.standingBook}.${obj.fieldName}`;
...@@ -1360,33 +1680,59 @@ const AddModal = props => { ...@@ -1360,33 +1680,59 @@ const AddModal = props => {
data[0].Config = `${data[0].Config}?${obj.filterName}='${obj.filterValue}'`; data[0].Config = `${data[0].Config}?${obj.filterName}='${obj.filterValue}'`;
} }
break; break;
// case '人员选择器':
// console.log(obj.ConfigName);
// console.log(form.getFieldValue().ConfigName);
// console.log(radio1);
// console.log(radio3);
// console.log(form.getFieldValue().All);
// console.log(form.getFieldValue().AllID);
// if (radio1 == '全部') {
// if (radio3 == '全部ID') {
// if (obj.ConfigName) {
// let str = radio == 0 ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部ID` : `全部ID.n`;
// data[0].Config = str;
// }
// } else {
// if (obj.ConfigName) {
// let str = radio == 0 ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`;
// data[0].Config = str;
// } else {
// let str = radio == 0 ? `全部` : `全部.n`;
// data[0].Config = str;
// }
// }
// } else {
// let str = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
// console.log(str);
// data[0].Config = str;
// }
// break;
case '人员选择器': case '人员选择器':
console.log(obj.ConfigName); if (checkboxAll1 == true) {
console.log(form.getFieldValue().ConfigName); if (checkboxAllID1 == true) {
console.log(radio1);
console.log(radio3);
console.log(form.getFieldValue().All);
console.log(form.getFieldValue().AllID);
if (radio1 == '全部') {
if (radio3 == '全部ID') {
if (obj.ConfigName) { if (obj.ConfigName) {
let str = radio == 0 ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`; let str = cho ? `全部ID.${obj.ConfigName}` : `全部ID.${obj.ConfigName}.n`;
data[0].Config = str; data[0].Config = str;
} else { } else {
let str = radio == 0 ? `全部ID` : `全部ID.n`; let str = cho ? `全部ID` : `全部ID.n`;
data[0].Config = str; data[0].Config = str;
} }
} else { } else {
if (obj.ConfigName) { if (obj.ConfigName) {
let str = radio == 0 ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`; let str = cho ? `全部.${obj.ConfigName}` : `全部.${obj.ConfigName}.n`;
data[0].Config = str; data[0].Config = str;
} else { } else {
let str = radio == 0 ? `全部` : `全部.n`; let str = cho ? `全部` : `全部.n`;
data[0].Config = str; data[0].Config = str;
} }
} }
} else { } else {
let str = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`; let str = cho ? `${obj.Config}` : `${obj.Config}.n`;
console.log(str); console.log(str);
data[0].Config = str; data[0].Config = str;
} }
...@@ -1415,17 +1761,31 @@ const AddModal = props => { ...@@ -1415,17 +1761,31 @@ const AddModal = props => {
} }
} }
form.setFieldsValue({ form.setFieldsValue({
Config: '',
ConfigName: '',
tableName: '', tableName: '',
fieldName: '', fieldName: '',
standingBook: '',
filterName: '', filterName: '',
filterValue: '', filterValue: '',
ConfigName: '', standingBook: '',
check: '', check: 0,
AllID: '0',
All: '0',
AllID1: '',
All1: '',
ShowConfig: '', ShowConfig: '',
All: '', pepole: '',
AllID: '', choose: '',
}); });
setRadio(0);
setRadio3('0');
setRadio1('0');
setPep('');
setCho('');
setCheckboxAll1('');
setCheckboxAllID1('');
setFlag(false);
setHide(true);
if (i == 1.14) { if (i == 1.14) {
console.log(valueData); console.log(valueData);
UpdateFields(valueData).then(res => { UpdateFields(valueData).then(res => {
...@@ -1456,6 +1816,11 @@ const AddModal = props => { ...@@ -1456,6 +1816,11 @@ const AddModal = props => {
setValue1(); setValue1();
}; };
const timeDataOnVChange = e => {
console.log(e.target.value);
setTimeData(e.target.value);
};
const inputOnChange = e => { const inputOnChange = e => {
setValue1(); setValue1();
}; };
...@@ -1465,12 +1830,6 @@ const AddModal = props => { ...@@ -1465,12 +1830,6 @@ const AddModal = props => {
}; };
const onChange3 = e => { const onChange3 = e => {
// if (e.target.value == '全部ID') {
// form.setFieldsValue({ Config: '全部ID' });
// }
// if (e.target.value == '0' && radio1 == '全部') {
// form.setFieldsValue({ Config: '全部' });
// }
setRadio3(e.target.value); setRadio3(e.target.value);
setValue1(); setValue1();
}; };
...@@ -1481,11 +1840,6 @@ const AddModal = props => { ...@@ -1481,11 +1840,6 @@ const AddModal = props => {
console.log(aa); console.log(aa);
console.log(bb); console.log(bb);
if (e.target.value == '全部') { if (e.target.value == '全部') {
// if (radio3 == '全部ID') {
// form.setFieldsValue({ Config: '全部ID' });
// } else {
// form.setFieldsValue({ Config: '全部' });
// }
form.setFieldsValue({ ConfigName: bb }); form.setFieldsValue({ ConfigName: bb });
} else { } else {
form.setFieldsValue({ Config: aa, AllID: '0' }); form.setFieldsValue({ Config: aa, AllID: '0' });
...@@ -1501,43 +1855,33 @@ const AddModal = props => { ...@@ -1501,43 +1855,33 @@ const AddModal = props => {
let cc = form.getFieldsValue().All; let cc = form.getFieldsValue().All;
let dd = form.getFieldsValue().AllID; let dd = form.getFieldsValue().AllID;
let ff = form.getFieldsValue().check; let ff = form.getFieldsValue().check;
console.log(aa);
console.log(bb);
console.log(ff);
if (cc == '全部') { if (cc == '全部') {
if (dd == '全部ID') { if (dd == '全部ID') {
if (bb) { if (bb) {
if (ff == 1) { if (ff == 1) {
console.log(1);
form.setFieldsValue({ ShowConfig: `全部ID.${bb}.n` }); form.setFieldsValue({ ShowConfig: `全部ID.${bb}.n` });
} else { } else {
console.log(2);
form.setFieldsValue({ ShowConfig: `全部ID.${bb}` }); form.setFieldsValue({ ShowConfig: `全部ID.${bb}` });
} }
} else { } else {
if (ff == 1) { if (ff == 1) {
console.log(3);
form.setFieldsValue({ ShowConfig: `全部ID.n` }); form.setFieldsValue({ ShowConfig: `全部ID.n` });
} else { } else {
console.log(4);
form.setFieldsValue({ ShowConfig: `全部ID` }); form.setFieldsValue({ ShowConfig: `全部ID` });
} }
} }
} else { } else {
if (bb) { if (bb) {
if (ff == 1) { if (ff == 1) {
console.log(5);
form.setFieldsValue({ ShowConfig: `全部.${bb}.n` }); form.setFieldsValue({ ShowConfig: `全部.${bb}.n` });
} else { } else {
console.log(6);
form.setFieldsValue({ ShowConfig: `全部.${bb}` }); form.setFieldsValue({ ShowConfig: `全部.${bb}` });
} }
} else { } else {
if (ff == 1) { if (ff == 1) {
console.log(7);
form.setFieldsValue({ ShowConfig: `全部.n` }); form.setFieldsValue({ ShowConfig: `全部.n` });
} else { } else {
console.log(8);
form.setFieldsValue({ ShowConfig: `全部` }); form.setFieldsValue({ ShowConfig: `全部` });
} }
} }
...@@ -1545,18 +1889,14 @@ const AddModal = props => { ...@@ -1545,18 +1889,14 @@ const AddModal = props => {
} else { } else {
if (aa) { if (aa) {
if (ff == 1) { if (ff == 1) {
console.log(9);
form.setFieldsValue({ ShowConfig: `${aa}.n` }); form.setFieldsValue({ ShowConfig: `${aa}.n` });
} else { } else {
console.log(10);
form.setFieldsValue({ ShowConfig: `${aa}` }); form.setFieldsValue({ ShowConfig: `${aa}` });
} }
} else { } else {
if (ff == 1) { if (ff == 1) {
console.log(11);
form.setFieldsValue({ ShowConfig: `.n` }); form.setFieldsValue({ ShowConfig: `.n` });
} else { } else {
console.log(12);
form.setFieldsValue({ ShowConfig: '' }); form.setFieldsValue({ ShowConfig: '' });
} }
} }
...@@ -1569,46 +1909,32 @@ const AddModal = props => { ...@@ -1569,46 +1909,32 @@ const AddModal = props => {
let cc = form.getFieldsValue().All; let cc = form.getFieldsValue().All;
let dd = form.getFieldsValue().AllID; let dd = form.getFieldsValue().AllID;
let ff = form.getFieldsValue().check; let ff = form.getFieldsValue().check;
console.log(valueData);
console.log(aa);
console.log(bb);
console.log(ff);
console.log(cc);
console.log(dd);
if (cc == '全部') { if (cc == '全部') {
if (dd == '全部ID') { if (dd == '全部ID') {
if (aa) { if (aa) {
if (ff == 1) { if (ff == 1) {
console.log(1);
form.setFieldsValue({ ShowConfig: `全部ID.${aa}.n` }); form.setFieldsValue({ ShowConfig: `全部ID.${aa}.n` });
} else { } else {
console.log(2);
form.setFieldsValue({ ShowConfig: `全部ID.${aa}` }); form.setFieldsValue({ ShowConfig: `全部ID.${aa}` });
} }
} else { } else {
if (ff == 1) { if (ff == 1) {
console.log(3);
form.setFieldsValue({ ShowConfig: `全部ID.n` }); form.setFieldsValue({ ShowConfig: `全部ID.n` });
} else { } else {
console.log(4);
form.setFieldsValue({ ShowConfig: `全部ID` }); form.setFieldsValue({ ShowConfig: `全部ID` });
} }
} }
} else { } else {
if (aa) { if (aa) {
if (ff == 1) { if (ff == 1) {
console.log(5);
form.setFieldsValue({ ShowConfig: `全部.${aa}.n` }); form.setFieldsValue({ ShowConfig: `全部.${aa}.n` });
} else { } else {
console.log(6);
form.setFieldsValue({ ShowConfig: `全部.${aa}` }); form.setFieldsValue({ ShowConfig: `全部.${aa}` });
} }
} else { } else {
if (ff == 1) { if (ff == 1) {
console.log(7);
form.setFieldsValue({ ShowConfig: `全部.n` }); form.setFieldsValue({ ShowConfig: `全部.n` });
} else { } else {
console.log(8);
form.setFieldsValue({ ShowConfig: `全部` }); form.setFieldsValue({ ShowConfig: `全部` });
} }
} }
...@@ -1616,18 +1942,14 @@ const AddModal = props => { ...@@ -1616,18 +1942,14 @@ const AddModal = props => {
} else { } else {
if (bb) { if (bb) {
if (ff == 1) { if (ff == 1) {
console.log(9);
form.setFieldsValue({ ShowConfig: `${bb}.n` }); form.setFieldsValue({ ShowConfig: `${bb}.n` });
} else { } else {
console.log(10);
form.setFieldsValue({ ShowConfig: `${bb}` }); form.setFieldsValue({ ShowConfig: `${bb}` });
} }
} else { } else {
if (ff == 1) { if (ff == 1) {
console.log(11);
form.setFieldsValue({ ShowConfig: `.n` }); form.setFieldsValue({ ShowConfig: `.n` });
} else { } else {
console.log(12);
form.setFieldsValue({ ShowConfig: '' }); form.setFieldsValue({ ShowConfig: '' });
} }
} }
...@@ -1644,6 +1966,42 @@ const AddModal = props => { ...@@ -1644,6 +1966,42 @@ const AddModal = props => {
); );
}; };
const changePepole = e => {
console.log(e.target.value);
console.log(e.target.checked);
setPep(e.target.checked);
};
const changeChoose = e => {
console.log(e.target.value);
console.log(e.target.checked);
setCho(e.target.checked);
};
const changeAll1 = e => {
let aa = form.getFieldsValue().ConfigName;
let bb = form.getFieldsValue().Config;
setCheckboxAll1(e.target.checked);
if (e.target.checked == true) {
if (bb) {
form.setFieldsValue({ ConfigName: bb });
}
setHide(false);
setFlag(true);
} else {
if (aa) {
form.setFieldsValue({ Config: aa });
}
setHide(true);
setFlag(false);
setCheckboxAllID1(false);
}
};
const changeAllID1 = e => {
setCheckboxAllID1(e.target.checked);
};
return ( return (
<> <>
<Drawer <Drawer
...@@ -1771,7 +2129,8 @@ const AddModal = props => { ...@@ -1771,7 +2129,8 @@ const AddModal = props => {
</div> </div>
</Item> </Item>
</Col> </Col>
<Col span={6}> <Col span={1} />
<Col span={5}>
<Item label="单位" name="Unit" labelCol={{ span: 7 }}> <Item label="单位" name="Unit" labelCol={{ span: 7 }}>
<Input style={{ width: '95%' }} placeholder="" /> <Input style={{ width: '95%' }} placeholder="" />
</Item> </Item>
...@@ -1869,12 +2228,7 @@ const AddModal = props => { ...@@ -1869,12 +2228,7 @@ const AddModal = props => {
placeholder="用英文逗号分隔自定义的值,勾选,可设置初始值" placeholder="用英文逗号分隔自定义的值,勾选,可设置初始值"
/> />
</Item> </Item>
<Item <Item colon={false} name="check" label="配置:" labelCol={{ span: 3 }}>
colon={false}
name="check"
label="形态功能:"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}> <Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio> <Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio> <Radio value={1}>多选</Radio>
...@@ -1952,12 +2306,7 @@ const AddModal = props => { ...@@ -1952,12 +2306,7 @@ const AddModal = props => {
</Item> </Item>
</Col> </Col>
</Row> </Row>
<Item <Item colon={false} name="check" label="配置:" labelCol={{ span: 3 }}>
colon={false}
name="check"
label="形态功能:"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}> <Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio> <Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio> <Radio value={1}>多选</Radio>
...@@ -1976,7 +2325,7 @@ const AddModal = props => { ...@@ -1976,7 +2325,7 @@ const AddModal = props => {
> >
<TextArea <TextArea
allowClear allowClear
style={{ width: '92%' }} style={{ width: '93%' }}
placeholder="请输入数据字典名称" placeholder="请输入数据字典名称"
/> />
</Item> </Item>
...@@ -1988,7 +2337,7 @@ const AddModal = props => { ...@@ -1988,7 +2337,7 @@ const AddModal = props => {
<Item <Item
label="数据字典名称" label="数据字典名称"
name="Config" name="Config"
labelCol={{ span: 5 }} labelCol={{ span: 7 }}
// rules={[{ required: true, message: '请输入数据字典名称' }]} // rules={[{ required: true, message: '请输入数据字典名称' }]}
> >
<Input <Input
...@@ -1997,12 +2346,7 @@ const AddModal = props => { ...@@ -1997,12 +2346,7 @@ const AddModal = props => {
placeholder="请输入数据字典名称" placeholder="请输入数据字典名称"
/> />
</Item> </Item>
<Item <Item colon={false} name="check" label="配置:" labelCol={{ span: 7 }}>
colon={false}
name="check"
label="形态功能:"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}> <Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio> <Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio> <Radio value={1}>多选</Radio>
...@@ -2013,12 +2357,7 @@ const AddModal = props => { ...@@ -2013,12 +2357,7 @@ const AddModal = props => {
case '部门选择器': case '部门选择器':
return ( return (
<> <>
<Item <Item colon={false} name="check" label="配置:" labelCol={{ span: 3 }}>
colon={false}
name="check"
label="形态功能:"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}> <Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio> <Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio> <Radio value={1}>多选</Radio>
...@@ -2029,12 +2368,23 @@ const AddModal = props => { ...@@ -2029,12 +2368,23 @@ const AddModal = props => {
case '站点选择器': case '站点选择器':
return ( return (
<Item <Item
label="配置"
name="Config" name="Config"
labelCol={{ span: 3 }} labelCol={{ span: 3 }}
rules={[{ required: true, message: '选择配置' }]} label={
<div>
<Tooltip title="默认全局多选">
<InfoCircleOutlined
style={{
color: 'rgb(24 144 255)',
marginRight: '2px',
}}
/>
</Tooltip>
<span>配置</span>
</div>
}
> >
<Select {/* <Select
placeholder="默认为全局.n即全局多选,.n为多选(全局时勾选由问题)" placeholder="默认为全局.n即全局多选,.n为多选(全局时勾选由问题)"
style={{ width: '93%' }} style={{ width: '93%' }}
> >
...@@ -2042,7 +2392,29 @@ const AddModal = props => { ...@@ -2042,7 +2392,29 @@ const AddModal = props => {
<Select.Option value="全局">全局</Select.Option> <Select.Option value="全局">全局</Select.Option>
<Select.Option value="本人.n">本人(多选)</Select.Option> <Select.Option value="本人.n">本人(多选)</Select.Option>
<Select.Option value="本人">本人</Select.Option> <Select.Option value="本人">本人</Select.Option>
</Select> </Select> */}
<div style={{ display: 'inline-block' }}>
<Item name="pepole" style={{ marginBottom: '0' }}>
<Checkbox
checked={pep}
onChange={changePepole}
style={{ marginBottom: '0' }}
>
本人
</Checkbox>
</Item>
</div>
<div style={{ display: 'inline-block' }}>
<Item name="choose" style={{ marginBottom: '0' }}>
<Checkbox
checked={cho}
onChange={changeChoose}
style={{ marginBottom: '0' }}
>
单选
</Checkbox>
</Item>
</div>
</Item> </Item>
); );
case '台账选择器': case '台账选择器':
...@@ -2063,32 +2435,30 @@ const AddModal = props => { ...@@ -2063,32 +2435,30 @@ const AddModal = props => {
<Item <Item
label="字段名" label="字段名"
name="fieldName" name="fieldName"
labelCol={{ span: 6 }} labelCol={{ span: 5 }}
rules={[{ required: true, message: '请输入字段名' }]} rules={[{ required: true, message: '请输入字段名' }]}
> >
<Input style={{ width: '85%' }} placeholder="请输入字段名" /> <Input style={{ width: '85%' }} placeholder="请输入字段名" />
</Item> </Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Item label="台账过滤条件" name="filterName" labelCol={{ span: 9 }}> <Item label="台账过滤" name="filterName" labelCol={{ span: 6 }}>
<Input style={{ width: '94%' }} placeholder="请输入字段名" /> <Input style={{ width: '95%' }} placeholder="请输入字段名" />
</Item> </Item>
</Col> </Col>
<Col span={3}> <Col span={2}>
<span style={{ marginLeft: '25px' }}>=</span> <span style={{ marginLeft: '20px' }}>=</span>
</Col> </Col>
<Col span={9}> <Col span={9}>
<Item name="filterValue" labelCol={{ span: 5 }}> <Item name="filterValue">
<Input style={{ width: '85%' }} placeholder="请输入过滤条件" /> <Input
style={{ width: '89%', marginLeft: '12px' }}
placeholder="请输入过滤条件"
/>
</Item> </Item>
</Col> </Col>
</Row> </Row>
<Item <Item colon={false} name="check" label="配置:" labelCol={{ span: 3 }}>
colon={false}
name="check"
label="形态功能:"
labelCol={{ span: 3 }}
>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}> <Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio> <Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio> <Radio value={1}>多选</Radio>
...@@ -2099,13 +2469,13 @@ const AddModal = props => { ...@@ -2099,13 +2469,13 @@ const AddModal = props => {
case '人员选择器': case '人员选择器':
return ( return (
<> <>
<Item colon={false} label="全部:" name="All" labelCol={{ span: 3 }}> {/* <Item colon={false} label="全部:" name="All" labelCol={{ span: 3 }}>
<Radio.Group onChange={onChange1} value={radio1}> <Radio.Group onChange={onChange1} value={radio1}>
<Radio value="0">否</Radio> <Radio value="0">否</Radio>
<Radio value="全部">是</Radio> <Radio value="全部">是</Radio>
</Radio.Group> </Radio.Group>
</Item> </Item> */}
{(() => { {/* {(() => {
switch (radio1) { switch (radio1) {
case '全部': case '全部':
return ( return (
...@@ -2132,25 +2502,7 @@ const AddModal = props => { ...@@ -2132,25 +2502,7 @@ const AddModal = props => {
<Radio value={1}>多选</Radio> <Radio value={1}>多选</Radio>
</Radio.Group> </Radio.Group>
</Item> </Item>
{/* <Row> */}
{/* <Col span={10}>
<Item
label="配置"
name="Config"
labelCol={{ span: 7 }}
rules={[
{ required: true, message: '请输入全部或全部ID' },
]}
>
<Input
allowClear
style={{ width: '100%' }}
placeholder="请输入输入全部或全部ID"
/>
</Item>
</Col> */}
{/* <Col span={1} /> */}
{/* <Col span={18}> */}
<Item <Item
label="角色或机构名称" label="角色或机构名称"
name="ConfigName" name="ConfigName"
...@@ -2174,8 +2526,6 @@ const AddModal = props => { ...@@ -2174,8 +2526,6 @@ const AddModal = props => {
onChange={inputOnChange} onChange={inputOnChange}
/> />
</Item> </Item>
{/* </Col>
</Row> */}
<Item label="配置" name="ShowConfig" labelCol={{ span: 5 }}> <Item label="配置" name="ShowConfig" labelCol={{ span: 5 }}>
<Input allowClear style={{ width: '92%' }} disabled /> <Input allowClear style={{ width: '92%' }} disabled />
...@@ -2229,47 +2579,200 @@ const AddModal = props => { ...@@ -2229,47 +2579,200 @@ const AddModal = props => {
</> </>
); );
} }
})()} */}
<Item
labelCol={{ span: 3 }}
label={
<div>
<Tooltip
title={
<>
<span>默认非全部,展示形式为下拉框</span>
<Image width={200} src={partImage} />
</>
}
>
<InfoCircleOutlined
style={{
color: 'rgb(24 144 255)',
marginRight: '5px',
}}
/>
</Tooltip>
<span>配置</span>
</div>
}
>
<Tooltip
title={
<>
<span>全部,展示形式为弹窗</span>
<Image width={200} src={AllImage} />
</>
}
>
<InfoCircleOutlined
style={{
color: 'rgb(24 144 255)',
marginRight: '5px',
}}
/>
</Tooltip>
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="All1" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAll1}
onChange={changeAll1}
style={{ marginBottom: '0' }}
>
弹窗
</Checkbox>
</Item>
</div>
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="AllID1" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
disabled={hide}
>
存储ID
</Checkbox>
</Item>
</div>
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="choose" style={{ marginBottom: '0' }}>
<Checkbox
checked={cho}
onChange={changeChoose}
style={{ marginBottom: '0' }}
>
单选
</Checkbox>
</Item>
</div>
{/* <div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="department" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
disabled={hide}
>
展示部门
</Checkbox>
</Item>
</div> */}
</Item>
{(() => {
switch (flag) {
case true:
return (
<>
<Item
label="角色|机构"
name="ConfigName"
labelCol={{ span: 3 }}
rules={[
{
validator: (rule, value) => {
let str = /[.]/g;
if (str.test(form.getFieldValue().ConfigName)) {
return Promise.reject('.作为分隔符,请勿输入');
}
return Promise.resolve();
},
},
]}
>
<Input
allowClear
style={{ width: '93%' }}
placeholder="请输入角色或机构名称"
onChange={inputOnChange}
/>
</Item>
</>
);
case false:
return (
<>
<Item
label="角色|机构"
name="Config"
labelCol={{ span: 3 }}
rules={[
{
required: true,
message: '请输入角色或机构名称',
},
{
validator: (rule, value) => {
let str = /[.]/g;
if (str.test(form.getFieldValue().Config)) {
return Promise.reject('.作为分隔符,请勿输入');
}
return Promise.resolve();
},
},
]}
>
<Input
allowClear
style={{ width: '93%' }}
placeholder="请输入角色或机构名称"
onChange={inputOnchange}
/>
</Item>
</>
);
}
})()} })()}
</> </>
); );
// case '日期时间':
// case '日期': case '日期时间':
// case '日期月份': case '日期':
// case '日期年份': case '日期月份':
// case '日期周': case '日期年份':
// case '时分秒': case '日期周':
// return ( case '时分秒':
// <Item label="选项" name="Config" labelCol={{ span: 3 }}> return (
// <Radio.Group style={{ marginTop: '0.3rem' }}> <Item label="选项" name="Config" labelCol={{ span: 3 }}>
// <Radio <Radio.Group
// value="默认为空" style={{ marginTop: '0.3rem' }}
// defaultChecked value={timeData}
// style={{ width: '18rem', marginBottom: '0.5rem' }} onChange={timeDataOnVChange}
// > >
// 默认为空 <Radio
// </Radio> value="默认为空"
// <Radio value="">默认为当前时间</Radio> style={{ width: '18rem', marginBottom: '0.5rem' }}
// <Radio value="不可选择" style={{ width: '18rem' }}> >
// 锁定为当前时间(通过用户点击刷新) 默认为空
// </Radio> </Radio>
// <Radio value="不超过当前时间">不超过当前时间</Radio> <Radio value="默认为当前时间">默认为当前时间</Radio>
// </Radio.Group> <Radio value="不可选择" style={{ width: '18rem' }}>
// </Item> 锁定为当前时间
// ); </Radio>
// case '坐标控件': <Radio value="不超过当前时间">不超过当前时间</Radio>
// return ( </Radio.Group>
// <Item label="选项" name="Config" labelCol={{ span: 3 }}> </Item>
// <div> );
// <Checkbox case '坐标控件':
// value="当前坐标" return (
// style={{ marginRight: '0.2rem' }} <Item label="选项" name="Config" labelCol={{ span: 3 }}>
// checked={pramData.coordinates} <div>
// onChange={e => onChangeReady(e, 'coordinates')} <Checkbox
// /> value="当前坐标"
// 锁定为当前位置坐标 style={{ marginRight: '0.2rem' }}
// </div> checked={pramData.coordinates}
// </Item> onChange={e => onChangeReady(e, 'coordinates')}
// ); />
锁定为当前位置坐标
</div>
</Item>
);
case '位置坐标': case '位置坐标':
return ( return (
<Item label="字段名称" name="Config" labelCol={{ span: 3 }}> <Item label="字段名称" name="Config" labelCol={{ span: 3 }}>
...@@ -2290,14 +2793,7 @@ const AddModal = props => { ...@@ -2290,14 +2793,7 @@ const AddModal = props => {
case '可预览图片': case '可预览图片':
case '录音': case '录音':
case '视频': case '视频':
case '日期':
case '日期时间':
case '日期月份':
case '日期年份':
case '日期周':
case '时分秒':
case '设备选择': case '设备选择':
case '坐标控件':
case '区域控件': case '区域控件':
case '路径控件': case '路径控件':
case '智能抄表': case '智能抄表':
...@@ -2318,7 +2814,7 @@ const AddModal = props => { ...@@ -2318,7 +2814,7 @@ const AddModal = props => {
<Item label="预设值" labelCol={{ span: 3 }}> <Item label="预设值" labelCol={{ span: 3 }}>
{/* <div className={styles.listEvent}> */} {/* <div className={styles.listEvent}> */}
<Row> <Row>
<Col span={11}> <Col span={10}>
<Input <Input
// style={{ width: '41%', height: '1.8rem' }} // style={{ width: '41%', height: '1.8rem' }}
value={pramData.Preset} value={pramData.Preset}
...@@ -2327,7 +2823,7 @@ const AddModal = props => { ...@@ -2327,7 +2823,7 @@ const AddModal = props => {
allowClear allowClear
/> />
</Col> </Col>
<Col span={10}> <Col span={13}>
<Item <Item
style={{ marginLeft: '1rem' }} style={{ marginLeft: '1rem' }}
label="验证" label="验证"
...@@ -2337,7 +2833,7 @@ const AddModal = props => { ...@@ -2337,7 +2833,7 @@ const AddModal = props => {
<Input style={{ width: '92%' }} placeholder="" allowClear /> <Input style={{ width: '92%' }} placeholder="" allowClear />
</Item> </Item>
</Col> </Col>
<Col span={3}> <Col span={1}>
<Tooltip title="选择验证规则"> <Tooltip title="选择验证规则">
<PlusSquareOutlined <PlusSquareOutlined
onClick={() => { onClick={() => {
...@@ -2347,6 +2843,7 @@ const AddModal = props => { ...@@ -2347,6 +2843,7 @@ const AddModal = props => {
fontSize: '24px', fontSize: '24px',
color: '#1890FF', color: '#1890FF',
marginTop: '8px', marginTop: '8px',
marginLeft: '-10px',
}} }}
/> />
</Tooltip> </Tooltip>
......
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