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

fix: '新增形态关联表单'

parent 361898fc
Pipeline #62917 passed with stages
...@@ -30,6 +30,7 @@ import { ...@@ -30,6 +30,7 @@ import {
Row, Row,
TreeSelect, TreeSelect,
Image, Image,
Switch,
} from 'antd'; } from 'antd';
import AllImage from '@/assets/images/title/All.png'; import AllImage from '@/assets/images/title/All.png';
import TreeImage from '@/assets/images/title/Tree.png'; import TreeImage from '@/assets/images/title/Tree.png';
...@@ -41,14 +42,16 @@ import { ...@@ -41,14 +42,16 @@ import {
LoadEventType, LoadEventType,
UpdateFields, UpdateFields,
} from '@/services/tablemanager/tablemanager'; } from '@/services/tablemanager/tablemanager';
import styles from './index.less';
import VerifyModal from './VerifyModal';
import { import {
PlusSquareOutlined, PlusSquareOutlined,
UnorderedListOutlined, UnorderedListOutlined,
FontColorsOutlined, FontColorsOutlined,
InfoCircleOutlined, InfoCircleOutlined,
MinusCircleOutlined,
PlusOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import styles from './index.less';
import VerifyModal from './VerifyModal';
import Tree from '@/components/ExpendableTree'; import Tree from '@/components/ExpendableTree';
import Things from '../../../../../assets/images/icons/时间.svg'; import Things from '../../../../../assets/images/icons/时间.svg';
const AddModal = props => { const AddModal = props => {
...@@ -112,7 +115,7 @@ const AddModal = props => { ...@@ -112,7 +115,7 @@ const AddModal = props => {
{ {
name: '附件类', name: '附件类',
ID: 2, ID: 2,
children: ['附件', '图片', '录音', '视频'], children: ['附件', '图片', '录音', '视频'],
}, },
{ {
name: '时间类', name: '时间类',
...@@ -129,6 +132,11 @@ const AddModal = props => { ...@@ -129,6 +132,11 @@ const AddModal = props => {
// ID: 5, // ID: 5,
// children: ['智能抄表'], // children: ['智能抄表'],
// }, // },
{
name: '高级控件',
ID: 5,
children: ['关联表单'],
},
]); ]);
const [visible, setVisible] = useState(false); // 弹窗 const [visible, setVisible] = useState(false); // 弹窗
const [isShow, setIsShow] = useState(false); // 弹窗 const [isShow, setIsShow] = useState(false); // 弹窗
...@@ -150,7 +158,6 @@ const AddModal = props => { ...@@ -150,7 +158,6 @@ const AddModal = props => {
picture: '', picture: '',
must: '', must: '',
coordinates: '', coordinates: '',
}); });
const [currentSelectOrg, setCurrentSelectOrg] = useState([]); const [currentSelectOrg, setCurrentSelectOrg] = useState([]);
const [checkedList, setCheckedList] = useState([]); // 选中的复选框内容 const [checkedList, setCheckedList] = useState([]); // 选中的复选框内容
...@@ -180,22 +187,28 @@ const AddModal = props => { ...@@ -180,22 +187,28 @@ const AddModal = props => {
const [preView, setPreView] = useState(true); const [preView, setPreView] = useState(true);
const [viewMuise, setViewMuise] = useState(true); const [viewMuise, setViewMuise] = useState(true);
const [preViewVideo, setPreViewVideo] = useState(true); const [preViewVideo, setPreViewVideo] = useState(true);
const [visibleChecked, setVisibleChecked] = useState(true);
const [formAdd] = Form.useForm();
const onChangeView = e =>{ const change = e => {
setView(e.target.checked) console.log(e);
} setVisibleChecked(e);
};
const onChangeView = e => {
setView(e.target.checked);
};
const onChangePreView = e =>{ const onChangePreView = e => {
setPreView(e.target.checked) setPreView(e.target.checked);
} };
const onChangePreViewMuise = e =>{ const onChangePreViewMuise = e => {
setViewMuise(e.target.checked) setViewMuise(e.target.checked);
} };
const onChangePreViewVideo = e =>{ const onChangePreViewVideo = e => {
setPreViewVideo(e.target.checked) setPreViewVideo(e.target.checked);
} };
// 提交 // 提交
const onSubmit = () => { const onSubmit = () => {
...@@ -212,7 +225,7 @@ const AddModal = props => { ...@@ -212,7 +225,7 @@ const AddModal = props => {
} else { } else {
aa = 0; aa = 0;
} }
console.log(Shape) console.log(Shape);
let data = [ let data = [
{ {
Unit: obj.Unit || '', Unit: obj.Unit || '',
...@@ -249,28 +262,23 @@ const AddModal = props => { ...@@ -249,28 +262,23 @@ const AddModal = props => {
data[0].Preset = pramData.picture ? '拍照相册' : ''; data[0].Preset = pramData.picture ? '拍照相册' : '';
data[0].ValidationRule = pramData.must ? 'required' : ''; data[0].ValidationRule = pramData.must ? 'required' : '';
break; break;
case '值选择器': case '值选择器':
if (obj.Config.endsWith('.n')) { if (obj.Config.endsWith('.n')) {
data[0].Config = obj.Config; data[0].Config = obj.Config;
} else { } else if (radiostyle == 1) {
if(radiostyle==1){ // 平铺值选择器
// 平铺值选择器 data[0].Config = cho ? `${obj.Config}.n` : `${obj.Config}`;
data[0].Config = cho ? `${obj.Config}.n` : `${obj.Config}`; } else {
}else{ data[0].Config = obj.Config;
data[0].Config=obj.Config }
}
}
break; break;
case '搜索选择器': case '搜索选择器':
if (obj.Config.endsWith('.n')) { if (obj.Config.endsWith('.n')) {
data[0].Config = obj.Config; data[0].Config = obj.Config;
} else { } else {
// 平铺值选择器
// 平铺值选择器 data[0].Config = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
data[0].Config = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
} }
break; break;
case '部门选择器': case '部门选择器':
...@@ -298,34 +306,49 @@ const AddModal = props => { ...@@ -298,34 +306,49 @@ const AddModal = props => {
data[0].Config = obj.fieldName data[0].Config = obj.fieldName
? `${obj.tableName}.${obj.fieldName}` ? `${obj.tableName}.${obj.fieldName}`
: `${obj.tableName}`; : `${obj.tableName}`;
} else if (obj.fieldName) {
data[0].Config =
radio == 0
? `${obj.tableName}.${obj.fieldName}`
: `${obj.tableName}.${obj.fieldName}.n`;
} else { } else {
if (obj.fieldName) { data[0].Config = radio == 0 ? `${obj.tableName}` : `${obj.tableName}.n`;
data[0].Config =
radio == 0
? `${obj.tableName}.${obj.fieldName}`
: `${obj.tableName}.${obj.fieldName}.n`;
} else {
data[0].Config = radio == 0 ? `${obj.tableName}` : `${obj.tableName}.n`;
}
} }
break; 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}`;
} else if (obj.fieldName) {
data[0].Config =
radio == 0
? `${obj.standingBook}.${obj.fieldName}`
: `${obj.standingBook}.${obj.fieldName}.n`;
} else { } else {
if (obj.fieldName) { data[0].Config = radio == 0 ? `${obj.standingBook}` : `${obj.standingBook}.n`;
data[0].Config =
radio == 0
? `${obj.standingBook}.${obj.fieldName}`
: `${obj.standingBook}.${obj.fieldName}.n`;
} else {
data[0].Config = radio == 0 ? `${obj.standingBook}` : `${obj.standingBook}.n`;
}
} }
if (obj.filterName) { if (obj.filterName) {
data[0].Config = `${data[0].Config}?${obj.filterName}`; data[0].Config = `${data[0].Config}?${obj.filterName}`;
} }
break; break;
case '关联表单':
let aalist = {};
let arrlist = {};
aalist.台账名称 = obj.standingBook;
arrlist.key = obj.workOrder;
arrlist.value = obj.eventOrder;
aalist.默认显示 = visibleChecked || false;
aalist.控制规则 = obj.configName;
console.log(formAdd.getFieldValue('parmars'))
let lii = [];
if(formAdd.getFieldValue('parmars')){
lii = [...formAdd.getFieldValue('parmars')]
}
console.log(lii);
lii.push(arrlist);
aalist.映射字段 = lii;
data[0].Config = JSON.stringify(aalist);
break;
case '选择器': case '选择器':
if (cse) { if (cse) {
let str = cho let str = cho
...@@ -348,14 +371,12 @@ const AddModal = props => { ...@@ -348,14 +371,12 @@ const AddModal = props => {
let str = cho ? `全部ID.n` : `全部ID`; let str = cho ? `全部ID.n` : `全部ID`;
data[0].Config = str; data[0].Config = str;
} }
} else if (obj.ConfigName) {
let str = cho ? `全部.${obj.ConfigName}.n` : `全部.${obj.ConfigName}`;
data[0].Config = str;
} else { } else {
if (obj.ConfigName) { let str = cho ? `全部.n` : `全部`;
let str = cho ? `全部.${obj.ConfigName}.n` : `全部.${obj.ConfigName}`; data[0].Config = str;
data[0].Config = str;
} else {
let str = cho ? `全部.n` : `全部`;
data[0].Config = str;
}
} }
} else if (popeleShape == '下拉框') { } else if (popeleShape == '下拉框') {
let str = cho ? `${obj.Config}.n` : `${obj.Config}`; let str = cho ? `${obj.Config}.n` : `${obj.Config}`;
...@@ -375,32 +396,32 @@ const AddModal = props => { ...@@ -375,32 +396,32 @@ const AddModal = props => {
data[0].Config = obj.Config; data[0].Config = obj.Config;
} }
console.log(data); console.log(data);
if(Shape=='图片'){ if (Shape == '图片') {
if(view){ if (view) {
data[0].Shape='可预览图片' data[0].Shape = '可预览图片';
}else{ } else {
data[0].Shape='图片' data[0].Shape = '图片';
} }
} }
if(Shape=='附件'){ if (Shape == '附件') {
if(preView){ if (preView) {
data[0].Shape='可预览附件' data[0].Shape = '可预览附件';
}else{ } else {
data[0].Shape='附件' data[0].Shape = '附件';
} }
} }
if(Shape=='值选择器'){ if (Shape == '值选择器') {
if(radiostyle==0){ if (radiostyle == 0) {
if(!cho){ if (!cho) {
data[0].Shape='值选择器' data[0].Shape = '值选择器';
}else{ } else {
data[0].Shape='值复选器' data[0].Shape = '值复选器';
} }
}else{ } else {
data[0].Shape='平铺值选择器' data[0].Shape = '平铺值选择器';
} }
} }
console.log(data) console.log(data);
UpdateFields(data).then(res => { UpdateFields(data).then(res => {
setLoading(false); setLoading(false);
if (res.msg === 'Ok' || res.msg === '') { if (res.msg === 'Ok' || res.msg === '') {
...@@ -465,63 +486,72 @@ const AddModal = props => { ...@@ -465,63 +486,72 @@ const AddModal = props => {
setSynchronization(false); setSynchronization(false);
} }
console.log(res[0].data.root.Shape); console.log(res[0].data.root.Shape);
if(res[0].data.root.StoreType=='datetime'){ if (res[0].data.root.StoreType == 'datetime') {
setCharacteristics1([{ setCharacteristics1([
name: '时间类', {
ID: 3, name: '时间类',
children: ['日期时间', '日期', '日期月份', '日期年份', '日期周', '时分秒'], ID: 3,
}]) children: ['日期时间', '日期', '日期月份', '日期年份', '日期周', '时分秒'],
}else{ },
setCharacteristics1([{ ]);
name: '文本类', } else {
ID: 0, setCharacteristics1([
children: [ {
'文本', name: '文本类',
'唯一值文本', ID: 0,
'多行文本', children: [
'本人部门', '文本',
'本人姓名', '唯一值文本',
'数值', '多行文本',
'地址', '本人部门',
'设备二维码', '本人姓名',
'本人ID', '数值',
'富文本', '地址',
'编码', '设备二维码',
], '本人ID',
}, '富文本',
{ '编码',
name: '选择器类', ],
ID: 1, },
children: [ {
'选择器', name: '选择器类',
'搜索选择器', ID: 1,
'值选择器', children: [
'可编辑值选择器', '选择器',
'站点选择器', '搜索选择器',
'人员选择器', '值选择器',
'城市选择器', '可编辑值选择器',
'台账选择器', '站点选择器',
'业务选择器', '人员选择器',
'部门选择器', '城市选择器',
], '台账选择器',
}, '业务选择器',
{ '部门选择器',
name: '附件类', ],
ID: 2, },
children: ['附件', '图片', '录音', '视频'], {
}, name: '附件类',
{ ID: 2,
name: '时间类', children: ['附件', '图片', '录音', '视频'],
ID: 3, },
children: ['日期时间', '日期', '日期月份', '日期年份', '日期周', '时分秒'], {
}, name: '时间类',
{ ID: 3,
name: '地图类', children: ['日期时间', '日期', '日期月份', '日期年份', '日期周', '时分秒'],
ID: 4, },
children: ['坐标控件', '设备选择', '区域控件', '路径控件', '位置坐标'], {
}]) name: '地图类',
ID: 4,
children: ['坐标控件', '设备选择', '区域控件', '路径控件', '位置坐标'],
},
{
name: '高级控件',
ID: 5,
children: ['关联表单'],
},
]);
} }
if (res[0].data.root.Shape == '文本') { if (res[0].data.root.Shape == '文本') {
setDetail('输入内容将显示在前端输入框提示信息中'); setDetail('输入内容将显示在前端输入框提示信息中');
} else if (res[0].data.root.Shape == '多行文本') { } else if (res[0].data.root.Shape == '多行文本') {
...@@ -545,10 +575,10 @@ const AddModal = props => { ...@@ -545,10 +575,10 @@ const AddModal = props => {
setDetail(''); setDetail('');
} }
let coordinates = false, let coordinates = false;
picture = false, let picture = false;
must = false; let must = false;
switch (res[0].data.root.Shape) { switch (res[0].data.root.Shape) {
case '坐标控件': case '坐标控件':
res[0].data.root.Config === '当前坐标' res[0].data.root.Config === '当前坐标'
...@@ -582,13 +612,13 @@ const AddModal = props => { ...@@ -582,13 +612,13 @@ const AddModal = props => {
case '图片': case '图片':
// res[0].data.root.Config === '拍照相册' ? (picture = true) : (picture = false); // res[0].data.root.Config === '拍照相册' ? (picture = true) : (picture = false);
res[0].data.root.Preset === '拍照相册' ? (picture = true) : (picture = false); res[0].data.root.Preset === '拍照相册' ? (picture = true) : (picture = false);
res[0].data.root.ValidationRule === 'required' ? (must = true) : (must = false); res[0].data.root.ValidationRule === 'required' ? (must = true) : (must = false);
break; break;
case '可预览图片': case '可预览图片':
// res[0].data.root.Config === '拍照相册' ? (picture = true) : (picture = false); // res[0].data.root.Config === '拍照相册' ? (picture = true) : (picture = false);
res[0].data.root.Preset === '拍照相册' ? (picture = true) : (picture = false); res[0].data.root.Preset === '拍照相册' ? (picture = true) : (picture = false);
res[0].data.root.ValidationRule === 'required' ? (must = true) : (must = false); res[0].data.root.ValidationRule === 'required' ? (must = true) : (must = false);
break; break;
case '编码': case '编码':
let code = res[0].data.root.Config.split('.'); let code = res[0].data.root.Config.split('.');
form.setFieldsValue({ form.setFieldsValue({
...@@ -609,16 +639,14 @@ const AddModal = props => { ...@@ -609,16 +639,14 @@ const AddModal = props => {
setPep(true); setPep(true);
setCho(false); setCho(false);
} }
} else if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: false, choose: true });
setPep(false);
setCho(true);
} else { } else {
if (res[0].data.root.Config.endsWith('.n')) { form.setFieldsValue({ pepole: false, choose: false });
form.setFieldsValue({ pepole: false, choose: true }); setPep(false);
setPep(false); setCho(false);
setCho(true);
} else {
form.setFieldsValue({ pepole: false, choose: false });
setPep(false);
setCho(false);
}
} }
break; break;
case '搜索选择器': case '搜索选择器':
...@@ -638,31 +666,31 @@ const AddModal = props => { ...@@ -638,31 +666,31 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
case '平铺值选择器': case '平铺值选择器':
let dataa = res[0].data.root.Config.split('.'); let dataa = res[0].data.root.Config.split('.');
form.setFieldsValue({ form.setFieldsValue({
Config: dataa[0] || '', Config: dataa[0] || '',
}); });
if (res[0].data.root.Config.endsWith('.n')) { if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ form.setFieldsValue({
check: 1, check: 1,
choose: true choose: true,
}); });
setCho(true) setCho(true);
setRadio(1); setRadio(1);
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
check: 0, check: 0,
choose:false choose: false,
}); });
setCho(false) setCho(false);
setRadio(0); setRadio(0);
} }
form.setFieldsValue({ form.setFieldsValue({
style: 1, style: 1,
}); });
setRadiostyle(1); setRadiostyle(1);
break; break;
case '唯一值文本': case '唯一值文本':
let arr = res[0].data.root.Config.split('.'); let arr = res[0].data.root.Config.split('.');
form.setFieldsValue({ form.setFieldsValue({
...@@ -731,6 +759,24 @@ const AddModal = props => { ...@@ -731,6 +759,24 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
case '关联表单':
let data11 = JSON.parse(res[0].data.root.Config);
form.setFieldsValue({
standingBook: data11.台账名称,
workOrder: data11.映射字段[data11.映射字段.length-1].key,
eventOrder: data11.映射字段[data11.映射字段.length-1].value,
configName: data11.控制规则,
});
let gg = [...data11.映射字段];
let a11=[]
gg.length>0&&gg.map((i,j)=>{
if(j!==gg.length-1){
a11.push(i)
}
})
formAdd.setFieldsValue({ parmars: a11 });
setVisibleChecked(data11.默认显示);
break;
case '选择器': case '选择器':
let sele = res[0].data.root.Config.split('.'); let sele = res[0].data.root.Config.split('.');
console.log(sele[0]); console.log(sele[0]);
...@@ -845,28 +891,26 @@ const AddModal = props => { ...@@ -845,28 +891,26 @@ const AddModal = props => {
setGl(false); setGl(false);
setCho(true); setCho(true);
} }
} else if (tree[1] == '站点') {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
guolv: true,
choose: false,
});
setGl(true);
setCho(false);
} else { } else {
if (tree[1] == '站点') { form.setFieldsValue({
form.setFieldsValue({ PeShape: '树形模态',
PeShape: '树形模态', All1: true,
All1: true, AllID1: true,
AllID1: true, guolv: false,
guolv: true, choose: false,
choose: false, });
}); setGl(false);
setGl(true); setCho(false);
setCho(false);
} else {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
guolv: false,
choose: false,
});
setGl(false);
setCho(false);
}
} }
setPopeleShape('树形模态'); setPopeleShape('树形模态');
} else { } else {
...@@ -892,45 +936,50 @@ const AddModal = props => { ...@@ -892,45 +936,50 @@ const AddModal = props => {
break; break;
} }
if(res[0].data.root.Shape=='可预览图片'){ if (res[0].data.root.Shape == '可预览图片') {
setView(true); setView(true);
}else if(res[0].data.root.Shape=='图片'){ } else if (res[0].data.root.Shape == '图片') {
setView(false); setView(false);
}else if(res[0].data.root.Shape=='可预览附件'){ } else if (res[0].data.root.Shape == '可预览附件') {
setPreView(true); setPreView(true);
}else if(res[0].data.root.Shape=='附件'){ } else if (res[0].data.root.Shape == '附件') {
setPreView(false); setPreView(false);
}else if(res[0].data.root.Shape=='值选择器'){ } else if (res[0].data.root.Shape == '值选择器') {
setRadiostyle(0); setRadiostyle(0);
setCho(false) setCho(false);
form.setFieldsValue({style:0, choose:false}) form.setFieldsValue({ style: 0, choose: false });
}else if(res[0].data.root.Shape=='值复选器'){ } else if (res[0].data.root.Shape == '值复选器') {
setRadiostyle(0); setRadiostyle(0);
setCho(true) setCho(true);
form.setFieldsValue({style:0, choose: true}) form.setFieldsValue({ style: 0, choose: true });
} }
if(res[0].data.root.Shape=='可预览图片'){ if (res[0].data.root.Shape == '可预览图片') {
setShape('图片') setShape('图片');
}else if(res[0].data.root.Shape=='可预览附件'){ } else if (res[0].data.root.Shape == '可预览附件') {
setShape('附件') setShape('附件');
}else if(res[0].data.root.Shape=='平铺值选择器'){ } else if (res[0].data.root.Shape == '平铺值选择器') {
setShape('值选择器') setShape('值选择器');
}else if(res[0].data.root.Shape=='值复选器'){ } else if (res[0].data.root.Shape == '值复选器') {
setShape('值选择器') setShape('值选择器');
}else { } else {
setShape(res[0].data.root.Shape) setShape(res[0].data.root.Shape);
} }
if(!res[0].data.root.Shape){ if (!res[0].data.root.Shape) {
console.log(1111) console.log(1111);
if(res[0].data.root.StoreType=='datetime'){ if (res[0].data.root.StoreType == 'datetime') {
setShape('日期时间'); setShape('日期时间');
}else if(res[0].data.root.StoreType=='int'||res[0].data.root.StoreType=='float'||res[0].data.root.StoreType=='bigint'||res[0].data.root.StoreType=='int'=='decimal'){ } else if (
res[0].data.root.StoreType == 'int' ||
res[0].data.root.StoreType == 'float' ||
res[0].data.root.StoreType == 'bigint' ||
(res[0].data.root.StoreType == 'int') == 'decimal'
) {
setShape('数值'); setShape('数值');
}else{ } else {
console.log(1111122222) console.log(1111122222);
setShape('文本'); setShape('文本');
} }
} }
...@@ -996,7 +1045,7 @@ const AddModal = props => { ...@@ -996,7 +1045,7 @@ const AddModal = props => {
setCharacterValue(prop.str); setCharacterValue(prop.str);
} }
}; };
const add = aa => { const add1 = aa => {
let obj = form.getFieldsValue(); let obj = form.getFieldsValue();
let data = { numerical: '', rule: [] }; let data = { numerical: '', rule: [] };
console.log(obj.ValidationRule, 'ValidationRule'); console.log(obj.ValidationRule, 'ValidationRule');
...@@ -1127,8 +1176,13 @@ const AddModal = props => { ...@@ -1127,8 +1176,13 @@ const AddModal = props => {
Association: '', Association: '',
farter: '', farter: '',
farterData: '', farterData: '',
workOrder: '',
eventOrder: '',
configName: '',
}); });
} }
formAdd.resetFields()
setVisibleChecked(true);
setView(true); setView(true);
setPreView(true); setPreView(true);
setViewMuise(true); setViewMuise(true);
...@@ -1262,7 +1316,7 @@ const AddModal = props => { ...@@ -1262,7 +1316,7 @@ const AddModal = props => {
const mapTree = org => { const mapTree = org => {
const haveChildren = Array.isArray(org.children) && org.children.length > 0; const haveChildren = Array.isArray(org.children) && org.children.length > 0;
if(org.storeType=='datetime'){ if (org.storeType == 'datetime') {
return { return {
title: ( title: (
<span className={styles.titleText}> <span className={styles.titleText}>
...@@ -1280,86 +1334,92 @@ const AddModal = props => { ...@@ -1280,86 +1334,92 @@ const AddModal = props => {
org, org,
}; };
} }
return { return {
title: ( title: (
<span className={styles.titleText}> <span className={styles.titleText}>
{org.children ? ( {org.children ? (
<UnorderedListOutlined style={{ color: '#1890FF' }} /> <UnorderedListOutlined style={{ color: '#1890FF' }} />
) : ( ) : (
<FontColorsOutlined style={{ color: '#1890FF' }} /> <FontColorsOutlined style={{ color: '#1890FF' }} />
)} )}
<span style={{ marginLeft: '5px' }}>{org.name}</span> <span style={{ marginLeft: '5px' }}>{org.name}</span>
</span> </span>
), ),
key: org.ID, key: org.ID,
// 判断它是否存在子集,若果存在就进行再次进行遍历操作,知道不存在子集便对其他的元素进行操作 // 判断它是否存在子集,若果存在就进行再次进行遍历操作,知道不存在子集便对其他的元素进行操作
children: haveChildren ? org.children.map(i => mapTree(i)) : [], children: haveChildren ? org.children.map(i => mapTree(i)) : [],
org, org,
}; };
}; };
const onSelect = (i, e) => { const onSelect = (i, e) => {
console.log(i) console.log(i);
console.log(e) console.log(e);
if(e.node.org.storeType&&e.node.org.storeType=='datetime'){ if (e.node.org.storeType && e.node.org.storeType == 'datetime') {
setCharacteristics1([{ setCharacteristics1([
name: '时间类', {
ID: 3, name: '时间类',
children: ['日期时间', '日期', '日期月份', '日期年份', '日期周', '时分秒'], ID: 3,
}]) children: ['日期时间', '日期', '日期月份', '日期年份', '日期周', '时分秒'],
}else if(e.node.org.storeType&&e.node.org.storeType!='datetime'){ },
setCharacteristics1([{ ]);
name: '文本类', } else if (e.node.org.storeType && e.node.org.storeType != 'datetime') {
ID: 0, setCharacteristics1([
children: [ {
'文本', name: '文本类',
'唯一值文本', ID: 0,
'多行文本', children: [
'本人部门', '文本',
'本人姓名', '唯一值文本',
'数值', '多行文本',
'地址', '本人部门',
'设备二维码', '本人姓名',
'本人ID', '数值',
'富文本', '地址',
'编码', '设备二维码',
], '本人ID',
}, '富文本',
{ '编码',
name: '选择器类', ],
ID: 1, },
children: [ {
'选择器', name: '选择器类',
'搜索选择器', ID: 1,
'值选择器', children: [
'可编辑值选择器', '选择器',
'站点选择器', '搜索选择器',
'人员选择器', '值选择器',
'城市选择器', '可编辑值选择器',
'台账选择器', '站点选择器',
'业务选择器', '人员选择器',
'部门选择器', '城市选择器',
], '台账选择器',
}, '业务选择器',
{ '部门选择器',
name: '附件类', ],
ID: 2, },
children: ['附件', '图片', '录音', '视频'], {
}, name: '附件类',
{ ID: 2,
name: '时间类', children: ['附件', '图片', '录音', '视频'],
ID: 3, },
children: ['日期时间', '日期', '日期月份', '日期年份', '日期周', '时分秒'], {
}, name: '时间类',
{ ID: 3,
name: '地图类', children: ['日期时间', '日期', '日期月份', '日期年份', '日期周', '时分秒'],
ID: 4, },
children: ['坐标控件', '设备选择', '区域控件', '路径控件', '位置坐标'], {
}]) name: '地图类',
ID: 4,
children: ['坐标控件', '设备选择', '区域控件', '路径控件', '位置坐标'],
},
{
name: '高级控件',
ID: 5,
children: ['关联表单'],
},
]);
} }
if(e && !e.node.org.children){ if (e && !e.node.org.children) {
setKeep(e); setKeep(e);
if (e.node) { if (e.node) {
setCurrentSelectOrg(e.node.org.ID); setCurrentSelectOrg(e.node.org.ID);
...@@ -1379,54 +1439,59 @@ const AddModal = props => { ...@@ -1379,54 +1439,59 @@ const AddModal = props => {
valueData.map(i => { valueData.map(i => {
bb.push(i.ID.toString()); bb.push(i.ID.toString());
}); });
console.log(valueData) console.log(valueData);
console.log(bb) console.log(bb);
console.log(e.node.org.ID) console.log(e.node.org.ID);
if (bb.indexOf(e.node.org.ID) != -1) { if (bb.indexOf(e.node.org.ID) != -1) {
let aa = valueData.find(i => i.ID == e.node.org.ID); let aa = valueData.find(i => i.ID == e.node.org.ID);
Promise.all([req1, req2, req3]).then(res => { Promise.all([req1, req2, req3]).then(res => {
res[1].msg === 'Ok' && setFieldName(res[1].data.root); res[1].msg === 'Ok' && setFieldName(res[1].data.root);
res[2].msg === 'Ok' && setEventList(res[2].data.root); res[2].msg === 'Ok' && setEventList(res[2].data.root);
if (res[0].msg === 'Ok') { if (res[0].msg === 'Ok') {
console.log(aa) console.log(aa);
if(aa.Shape=='可预览图片'){ if (aa.Shape == '可预览图片') {
setView(true); setView(true);
}else if(aa.Shape=='图片'){ } else if (aa.Shape == '图片') {
setView(false) setView(false);
}else if(aa.Shape=='可预览附件'){ } else if (aa.Shape == '可预览附件') {
setPreView(true); setPreView(true);
}else if(aa.Shape=='附件'){ } else if (aa.Shape == '附件') {
setPreView(false) setPreView(false);
}else if(aa.Shape=='值选择器'){ } else if (aa.Shape == '值选择器') {
setRadiostyle(0); setRadiostyle(0);
setCho(false); setCho(false);
form.setFieldsValue({style:0,choose:false}) form.setFieldsValue({ style: 0, choose: false });
}else if(aa.Shape=='值复选器'){ } else if (aa.Shape == '值复选器') {
setRadiostyle(0); setRadiostyle(0);
setCho(true); setCho(true);
form.setFieldsValue({style:0,choose:true}) form.setFieldsValue({ style: 0, choose: true });
} }
if(aa.Shape=='可预览图片'){ if (aa.Shape == '可预览图片') {
setShape('图片'); setShape('图片');
}else if(aa.Shape=='可预览附件'){ } else if (aa.Shape == '可预览附件') {
setShape('附件') setShape('附件');
}else if(aa.Shape=='平铺值选择器'){ } else if (aa.Shape == '平铺值选择器') {
setShape('值选择器') setShape('值选择器');
}else if(aa.Shape=='值复选器'){ } else if (aa.Shape == '值复选器') {
setShape('值选择器') setShape('值选择器');
}else{ } else {
setShape(aa.Shape); setShape(aa.Shape);
} }
console.log(aa) console.log(aa);
if(aa.Shape){ if (!aa.Shape) {
console.log(1111) console.log(1111);
if(aa.StoreType=='datetime'){ if (aa.StoreType == 'datetime') {
setShape('日期时间'); setShape('日期时间');
}else if(aa.StoreType=='int'||aa.StoreType=='float'||aa.StoreType=='bigint'||aa.StoreType=='int'=='decimal'){ } else if (
aa.StoreType == 'int' ||
aa.StoreType == 'float' ||
aa.StoreType == 'bigint' ||
(aa.StoreType == 'int') == 'decimal'
) {
setShape('数值'); setShape('数值');
}else{ } else {
console.log(1111122222) console.log(1111122222);
setShape('文本'); setShape('文本');
} }
} }
...@@ -1447,7 +1512,7 @@ const AddModal = props => { ...@@ -1447,7 +1512,7 @@ const AddModal = props => {
form.setFieldsValue({ SyncEvent: false }); form.setFieldsValue({ SyncEvent: false });
setSynchronization(false); setSynchronization(false);
} }
if (aa.Shape == '文本') { if (aa.Shape == '文本') {
setDetail('输入内容将显示在前端输入框提示信息中'); setDetail('输入内容将显示在前端输入框提示信息中');
} else if (aa.Shape == '多行文本') { } else if (aa.Shape == '多行文本') {
...@@ -1467,10 +1532,10 @@ const AddModal = props => { ...@@ -1467,10 +1532,10 @@ const AddModal = props => {
} else { } else {
setDetail(''); setDetail('');
} }
let coordinates = false, let coordinates = false;
picture = false, let picture = false;
must = false; let must = false;
switch (aa.Shape) { switch (aa.Shape) {
case '坐标控件': case '坐标控件':
aa.Config === '当前坐标' ? (coordinates = true) : (coordinates = false); aa.Config === '当前坐标' ? (coordinates = true) : (coordinates = false);
...@@ -1530,26 +1595,26 @@ const AddModal = props => { ...@@ -1530,26 +1595,26 @@ const AddModal = props => {
} }
break; break;
case '平铺值选择器': case '平铺值选择器':
let dataa = aa.Config.split('.'); let dataa = aa.Config.split('.');
form.setFieldsValue({ form.setFieldsValue({
Config: dataa[0] || '', Config: dataa[0] || '',
}); });
if (aa.Config.endsWith('.n')) { if (aa.Config.endsWith('.n')) {
form.setFieldsValue({ form.setFieldsValue({
choose:true, choose: true,
}); });
setCho(true) setCho(true);
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
choose: false, choose: false,
}); });
setCho(false); setCho(false);
} }
form.setFieldsValue({ form.setFieldsValue({
style: 1, style: 1,
}); });
setRadiostyle(1) setRadiostyle(1);
break; break;
case '唯一值文本': case '唯一值文本':
let arr = aa.Config.split('.'); let arr = aa.Config.split('.');
form.setFieldsValue({ form.setFieldsValue({
...@@ -1576,9 +1641,8 @@ const AddModal = props => { ...@@ -1576,9 +1641,8 @@ const AddModal = props => {
} }
break; break;
case '站点选择器': case '站点选择器':
let site = aa.Config.split('.'); let site = aa.Config.split('.');
if (site[0] == '本人') { if (site[0] == '本人') {
if (aa.Config.endsWith('.n')) { if (aa.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: true, choose: true }); form.setFieldsValue({ pepole: true, choose: true });
...@@ -1589,21 +1653,19 @@ const AddModal = props => { ...@@ -1589,21 +1653,19 @@ const AddModal = props => {
setPep(true); setPep(true);
setCho(false); setCho(false);
} }
} else if (aa.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: false, choose: true });
setPep(false);
setCho(true);
} else { } else {
if (aa.Config.endsWith('.n')) { form.setFieldsValue({ pepole: false, choose: false });
form.setFieldsValue({ pepole: false, choose: true }); setPep(false);
setPep(false); setCho(false);
setCho(true);
} else {
form.setFieldsValue({ pepole: false, choose: false });
setPep(false);
setCho(false);
}
} }
break; break;
case '部门选择器': case '部门选择器':
let department = aa.Config; let department = aa.Config;
if (department == '.n') { if (department == '.n') {
form.setFieldsValue({ form.setFieldsValue({
check: 1, check: 1,
...@@ -1616,6 +1678,24 @@ const AddModal = props => { ...@@ -1616,6 +1678,24 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
case '关联表单':
let data11 = JSON.parse(aa.Config);
form.setFieldsValue({
standingBook: data11.台账名称,
workOrder: data11.映射字段[data11.映射字段.length-1].key,
eventOrder: data11.映射字段[data11.映射字段.length-1].value,
configName: data11.控制规则,
});
let gg = [...data11.映射字段];
let a11=[]
gg.length>0&&gg.map((i,j)=>{
if(j!==gg.length-1){
a11.push(i)
}
})
formAdd.setFieldsValue({ parmars: a11 });
setVisibleChecked(data11.默认显示);
break;
case '台账选择器': case '台账选择器':
let book = aa.Config.split('.'); let book = aa.Config.split('.');
let ad = book[1].split('?'); let ad = book[1].split('?');
...@@ -1644,7 +1724,6 @@ const AddModal = props => { ...@@ -1644,7 +1724,6 @@ const AddModal = props => {
} }
break; break;
case '选择器': case '选择器':
let sele = aa.Config.split('.'); let sele = aa.Config.split('.');
if (sele[1] && sele[1] != 'n') { if (sele[1] && sele[1] != 'n') {
form.setFieldsValue({ form.setFieldsValue({
...@@ -1654,7 +1733,6 @@ const AddModal = props => { ...@@ -1654,7 +1733,6 @@ const AddModal = props => {
}); });
setCse(true); setCse(true);
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
Association: false, Association: false,
Config: sele[0], Config: sele[0],
...@@ -1671,7 +1749,7 @@ const AddModal = props => { ...@@ -1671,7 +1749,7 @@ const AddModal = props => {
break; break;
case '人员选择器': case '人员选择器':
let pepole = aa.Config.split('.'); let pepole = aa.Config.split('.');
form.setFieldsValue({ ShowConfig: aa.Config }); form.setFieldsValue({ ShowConfig: aa.Config });
if (pepole[0] == '全部') { if (pepole[0] == '全部') {
setHide(false); setHide(false);
...@@ -1756,28 +1834,26 @@ const AddModal = props => { ...@@ -1756,28 +1834,26 @@ const AddModal = props => {
setGl(false); setGl(false);
setCho(true); setCho(true);
} }
} else if (tree[1] == '站点') {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
guolv: true,
choose: false,
});
setGl(true);
setCho(false);
} else { } else {
if (tree[1] == '站点') { form.setFieldsValue({
form.setFieldsValue({ PeShape: '树形模态',
PeShape: '树形模态', All1: true,
All1: true, AllID1: true,
AllID1: true, guolv: false,
guolv: true, choose: false,
choose: false, });
}); setGl(false);
setGl(true); setCho(false);
setCho(false);
} else {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
guolv: false,
choose: false,
});
setGl(false);
setCho(false);
}
} }
setPopeleShape('树形模态'); setPopeleShape('树形模态');
} else { } else {
...@@ -1800,13 +1876,13 @@ const AddModal = props => { ...@@ -1800,13 +1876,13 @@ const AddModal = props => {
} }
setPopeleShape('下拉框'); setPopeleShape('下拉框');
} }
break; break;
} }
setValue1(); setValue1();
setPramData({ ...aa, coordinates, must, picture }); setPramData({ ...aa, coordinates, must, picture });
let index = res[2].data.root.find(item => item.Name == aa.ExceptionEvent); let index = res[2].data.root.find(item => item.Name == aa.ExceptionEvent);
getFieldData(index.TableName); getFieldData(index.TableName);
} }
}); });
...@@ -1816,46 +1892,49 @@ const AddModal = props => { ...@@ -1816,46 +1892,49 @@ const AddModal = props => {
res[2].msg === 'Ok' && setEventList(res[2].data.root); res[2].msg === 'Ok' && setEventList(res[2].data.root);
if (res[0].msg === 'Ok') { if (res[0].msg === 'Ok') {
console.log(res[0].data.root.Shape); console.log(res[0].data.root.Shape);
if(res[0].data.root.Shape=='可预览图片'){ if (res[0].data.root.Shape == '可预览图片') {
setView(true) setView(true);
}else if(res[0].data.root.Shape=='图片'){ } else if (res[0].data.root.Shape == '图片') {
setView(false) setView(false);
}else if(res[0].data.root.Shape=='可预览附件'){ } else if (res[0].data.root.Shape == '可预览附件') {
setPreView(true) setPreView(true);
}else if(res[0].data.root.Shape=='附件'){ } else if (res[0].data.root.Shape == '附件') {
setPreView(false) setPreView(false);
}else if(res[0].data.root.Shape=='值选择器'){ } else if (res[0].data.root.Shape == '值选择器') {
setRadiostyle(0); setRadiostyle(0);
setCho(false) setCho(false);
form.setFieldsValue({check:0,style:0,choose:false}) form.setFieldsValue({ check: 0, style: 0, choose: false });
}else if(res[0].data.root.Shape=='值复选器'){ } else if (res[0].data.root.Shape == '值复选器') {
setRadiostyle(0); setRadiostyle(0);
setCho(true) setCho(true);
form.setFieldsValue({check:1,style:0,choose:true}) form.setFieldsValue({ check: 1, style: 0, choose: true });
} }
if(res[0].data.root.Shape=='可预览图片'){ if (res[0].data.root.Shape == '可预览图片') {
setShape('图片'); setShape('图片');
}else if(res[0].data.root.Shape=='可预览附件'){ } else if (res[0].data.root.Shape == '可预览附件') {
setShape('附件'); setShape('附件');
} } else if (res[0].data.root.Shape == '平铺值选择器') {
else if(res[0].data.root.Shape=='平铺值选择器'){
setShape('值选择器'); setShape('值选择器');
}else if(res[0].data.root.Shape=='值复选器'){ } else if (res[0].data.root.Shape == '值复选器') {
setShape('值选择器'); setShape('值选择器');
}else{ } else {
setShape(res[0].data.root.Shape) setShape(res[0].data.root.Shape);
} }
console.log(res[0].data.root) console.log(res[0].data.root);
if(!res[0].data.root.Shape){ if (!res[0].data.root.Shape) {
console.log(1111) console.log(1111);
if(res[0].data.root.StoreType=='datetime'){ if (res[0].data.root.StoreType == 'datetime') {
setShape('日期时间'); setShape('日期时间');
}else if(res[0].data.root.StoreType=='int'||res[0].data.root.StoreType=='float'||res[0].data.root.StoreType=='bigint'||res[0].data.root.StoreType=='int'=='decimal'){ } else if (
res[0].data.root.StoreType == 'int' ||
res[0].data.root.StoreType == 'float' ||
res[0].data.root.StoreType == 'bigint' ||
(res[0].data.root.StoreType == 'int') == 'decimal'
) {
setShape('数值'); setShape('数值');
}else{ } else {
console.log(1111122222)
setShape('文本'); setShape('文本');
} }
} }
...@@ -1876,11 +1955,10 @@ const AddModal = props => { ...@@ -1876,11 +1955,10 @@ const AddModal = props => {
form.setFieldsValue({ SyncEvent: false }); form.setFieldsValue({ SyncEvent: false });
setSynchronization(false); setSynchronization(false);
} }
let coordinates = false;
let coordinates = false, let picture = false;
picture = false, let must = false;
must = false;
switch (res[0].data.root.Shape) { switch (res[0].data.root.Shape) {
case '坐标控件': case '坐标控件':
res[0].data.root.Config === '当前坐标' res[0].data.root.Config === '当前坐标'
...@@ -1924,7 +2002,7 @@ const AddModal = props => { ...@@ -1924,7 +2002,7 @@ const AddModal = props => {
prefix: code[1] === 'undefined' ? '' : code[1], prefix: code[1] === 'undefined' ? '' : code[1],
}); });
break; break;
case '搜索选择器': case '搜索选择器':
let data = res[0].data.root.Config.split('.'); let data = res[0].data.root.Config.split('.');
form.setFieldsValue({ form.setFieldsValue({
...@@ -1942,27 +2020,27 @@ const AddModal = props => { ...@@ -1942,27 +2020,27 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
case '平铺值选择器': case '平铺值选择器':
let dataa = res[0].data.root.Config.split('.'); let dataa = res[0].data.root.Config.split('.');
form.setFieldsValue({ form.setFieldsValue({
Config: dataa[0] || '', Config: dataa[0] || '',
}); });
if (res[0].data.root.Config.endsWith('.n')) { if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ form.setFieldsValue({
choose:true choose: true,
}); });
setCho(true) setCho(true);
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
choose:false choose: false,
}); });
setCho(false); setCho(false);
} }
form.setFieldsValue({ form.setFieldsValue({
style: 1, style: 1,
}); });
setRadiostyle(1) setRadiostyle(1);
break; break;
case '唯一值文本': case '唯一值文本':
let arr = res[0].data.root.Config.split('.'); let arr = res[0].data.root.Config.split('.');
form.setFieldsValue({ form.setFieldsValue({
...@@ -1972,7 +2050,7 @@ const AddModal = props => { ...@@ -1972,7 +2050,7 @@ const AddModal = props => {
break; break;
case '站点选择器': case '站点选择器':
let site = res[0].data.root.Config.split('.'); let site = res[0].data.root.Config.split('.');
if (site[0] == '本人') { if (site[0] == '本人') {
if (res[0].data.root.Config.endsWith('.n')) { if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: true, choose: true }); form.setFieldsValue({ pepole: true, choose: true });
...@@ -1983,21 +2061,19 @@ const AddModal = props => { ...@@ -1983,21 +2061,19 @@ const AddModal = props => {
setPep(true); setPep(true);
setCho(false); setCho(false);
} }
} else if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: false, choose: true });
setPep(false);
setCho(true);
} else { } else {
if (res[0].data.root.Config.endsWith('.n')) { form.setFieldsValue({ pepole: false, choose: false });
form.setFieldsValue({ pepole: false, choose: true }); setPep(false);
setPep(false); setCho(false);
setCho(true);
} else {
form.setFieldsValue({ pepole: false, choose: false });
setPep(false);
setCho(false);
}
} }
break; break;
case '业务选择器': case '业务选择器':
let list = res[0].data.root.Config.split('.'); let list = res[0].data.root.Config.split('.');
form.setFieldsValue({ form.setFieldsValue({
tableName: list[0] || '', tableName: list[0] || '',
fieldName: list[1] || '', fieldName: list[1] || '',
...@@ -2016,7 +2092,7 @@ const AddModal = props => { ...@@ -2016,7 +2092,7 @@ const AddModal = props => {
break; break;
case '部门选择器': case '部门选择器':
let department = res[0].data.root.Config; let department = res[0].data.root.Config;
if (department == '.n') { if (department == '.n') {
form.setFieldsValue({ form.setFieldsValue({
check: 1, check: 1,
...@@ -2029,6 +2105,25 @@ const AddModal = props => { ...@@ -2029,6 +2105,25 @@ const AddModal = props => {
setRadio(0); setRadio(0);
} }
break; break;
case '关联表单':
let data11 = JSON.parse(res[0].data.root.Config);
form.setFieldsValue({
standingBook: data11.台账名称,
workOrder: data11.映射字段[data11.映射字段.length-1].key,
eventOrder: data11.映射字段[data11.映射字段.length-1].value,
configName: data11.控制规则,
});
let gg = [...data11.映射字段];
let a11=[]
gg.length>0&&gg.map((i,j)=>{
if(j!==gg.length-1){
a11.push(i)
}
})
formAdd.setFieldsValue({ parmars: a11 });
setVisibleChecked(data11.默认显示);
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('?');
...@@ -2066,7 +2161,6 @@ const AddModal = props => { ...@@ -2066,7 +2161,6 @@ const AddModal = props => {
}); });
setCse(true); setCse(true);
} else { } else {
form.setFieldsValue({ form.setFieldsValue({
Association: false, Association: false,
Config: sele[0], Config: sele[0],
...@@ -2083,7 +2177,7 @@ const AddModal = props => { ...@@ -2083,7 +2177,7 @@ const AddModal = props => {
break; break;
case '人员选择器': case '人员选择器':
let pepole = res[0].data.root.Config.split('.'); let pepole = res[0].data.root.Config.split('.');
form.setFieldsValue({ ShowConfig: res[0].data.root.Config }); form.setFieldsValue({ ShowConfig: res[0].data.root.Config });
if (pepole[0] == '全部') { if (pepole[0] == '全部') {
setHide(false); setHide(false);
...@@ -2168,28 +2262,26 @@ const AddModal = props => { ...@@ -2168,28 +2262,26 @@ const AddModal = props => {
setGl(false); setGl(false);
setCho(true); setCho(true);
} }
} else if (tree[1] == '站点') {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
guolv: true,
choose: false,
});
setGl(true);
setCho(false);
} else { } else {
if (tree[1] == '站点') { form.setFieldsValue({
form.setFieldsValue({ PeShape: '树形模态',
PeShape: '树形模态', All1: true,
All1: true, AllID1: true,
AllID1: true, guolv: false,
guolv: true, choose: false,
choose: false, });
}); setGl(false);
setGl(true); setCho(false);
setCho(false);
} else {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
guolv: false,
choose: false,
});
setGl(false);
setCho(false);
}
} }
setPopeleShape('树形模态'); setPopeleShape('树形模态');
} else { } else {
...@@ -2216,17 +2308,18 @@ const AddModal = props => { ...@@ -2216,17 +2308,18 @@ const AddModal = props => {
} }
setValue1(); setValue1();
setPramData({ ...res[0].data.root, coordinates, must, picture }); setPramData({ ...res[0].data.root, coordinates, must, picture });
let index = res[2].data.root.find(item => item.Name == res[0].data.root.ExceptionEvent); let index = res[2].data.root.find(
item => item.Name == res[0].data.root.ExceptionEvent,
);
getFieldData(index.TableName); getFieldData(index.TableName);
} }
}); });
} }
} }
} }
form.validateFields().then(validate => {
form.validateFields().then(validate => {
if (validate) { if (validate) {
setLoading(true); setLoading(true);
let obj = form.getFieldsValue(); let obj = form.getFieldsValue();
...@@ -2236,7 +2329,7 @@ const AddModal = props => { ...@@ -2236,7 +2329,7 @@ const AddModal = props => {
} else { } else {
aa = 0; aa = 0;
} }
console.log(obj) console.log(obj);
let data = [ let data = [
{ {
Unit: obj.Unit || '', Unit: obj.Unit || '',
...@@ -2259,34 +2352,33 @@ const AddModal = props => { ...@@ -2259,34 +2352,33 @@ const AddModal = props => {
ExceptionEventFields: characterValue, ExceptionEventFields: characterValue,
}, },
]; ];
console.log(Shape) console.log(Shape);
if(Shape=='图片'){ if (Shape == '图片') {
if(view){ if (view) {
data[0].Shape='可预览图片' data[0].Shape = '可预览图片';
}else{ } else {
data[0].Shape='图片' data[0].Shape = '图片';
} }
} }
if(Shape=='附件'){ if (Shape == '附件') {
if(preView){ if (preView) {
data[0].Shape='可预览附件' data[0].Shape = '可预览附件';
}else{ } else {
data[0].Shape='附件' data[0].Shape = '附件';
} }
} }
if(Shape=='值选择器'){ if (Shape == '值选择器') {
if(radiostyle==0){ if (radiostyle == 0) {
if(!cho){ if (!cho) {
data[0].Shape='值选择器' data[0].Shape = '值选择器';
}else{ } else {
data[0].Shape='值复选器' data[0].Shape = '值复选器';
} }
}else{ } else {
data[0].Shape='平铺值选择器' data[0].Shape = '平铺值选择器';
} }
} }
switch (Shape) { switch (Shape) {
case '编码': case '编码':
...@@ -2305,10 +2397,7 @@ const AddModal = props => { ...@@ -2305,10 +2397,7 @@ const AddModal = props => {
if (obj.Config.endsWith('.n')) { if (obj.Config.endsWith('.n')) {
data[0].Config = obj.Config; data[0].Config = obj.Config;
} else { } else {
data[0].Config = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
data[0].Config = radio == 0 ? `${obj.Config}` : `${obj.Config}.n`;
} }
break; break;
case '唯一值文本': case '唯一值文本':
...@@ -2324,15 +2413,13 @@ const AddModal = props => { ...@@ -2324,15 +2413,13 @@ const AddModal = props => {
data[0].Config = obj.fieldName data[0].Config = obj.fieldName
? `${obj.tableName}.${obj.fieldName}` ? `${obj.tableName}.${obj.fieldName}`
: `${obj.tableName}`; : `${obj.tableName}`;
} else if (obj.fieldName) {
data[0].Config =
radio == 0
? `${obj.tableName}.${obj.fieldName}`
: `${obj.tableName}.${obj.fieldName}.n`;
} else { } else {
if (obj.fieldName) { data[0].Config = radio == 0 ? `${obj.tableName}` : `${obj.tableName}.n`;
data[0].Config =
radio == 0
? `${obj.tableName}.${obj.fieldName}`
: `${obj.tableName}.${obj.fieldName}.n`;
} else {
data[0].Config = radio == 0 ? `${obj.tableName}` : `${obj.tableName}.n`;
}
} }
break; break;
case '部门选择器': case '部门选择器':
...@@ -2345,20 +2432,35 @@ const AddModal = props => { ...@@ -2345,20 +2432,35 @@ const AddModal = props => {
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}`;
} else if (obj.fieldName) {
data[0].Config =
radio == 0
? `${obj.standingBook}.${obj.fieldName}`
: `${obj.standingBook}.${obj.fieldName}.n`;
} else { } else {
if (obj.fieldName) { data[0].Config = radio == 0 ? `${obj.standingBook}` : `${obj.standingBook}.n`;
data[0].Config =
radio == 0
? `${obj.standingBook}.${obj.fieldName}`
: `${obj.standingBook}.${obj.fieldName}.n`;
} else {
data[0].Config = radio == 0 ? `${obj.standingBook}` : `${obj.standingBook}.n`;
}
} }
if (obj.filterName) { if (obj.filterName) {
data[0].Config = `${data[0].Config}?${obj.filterName}`; data[0].Config = `${data[0].Config}?${obj.filterName}`;
} }
break; break;
case '关联表单':
let aalist = {};
let arrlist = {};
aalist.台账名称 = obj.standingBook;
arrlist.key = obj.workOrder;
arrlist.value = obj.eventOrder;
aalist.默认显示 = visibleChecked || false;
aalist.控制规则 = obj.configName;
let lii = [];
if(formAdd.getFieldValue('parmars')){
lii = [...formAdd.getFieldValue('parmars')]
}
console.log(lii);
lii.push(arrlist);
aalist.映射字段 = lii;
data[0].Config = JSON.stringify(aalist);
break;
case '选择器': case '选择器':
if (cse) { if (cse) {
let str = cho let str = cho
...@@ -2370,18 +2472,15 @@ const AddModal = props => { ...@@ -2370,18 +2472,15 @@ const AddModal = props => {
data[0].Config = str; data[0].Config = str;
} }
break; break;
case '值选择器': case '值选择器':
if (obj.Config.endsWith('.n')) { if (obj.Config.endsWith('.n')) {
data[0].Config = obj.Config; data[0].Config = obj.Config;
} else { } else if (radiostyle == 1) {
if(radiostyle==1){ // 平铺值选择器
// 平铺值选择器 data[0].Config = cho ? `${obj.Config}.n` : `${obj.Config}`;
data[0].Config = cho ? `${obj.Config}.n` : `${obj.Config}`; } else {
}else{ data[0].Config = obj.Config;
data[0].Config=obj.Config }
}
}
break; break;
case '人员选择器': case '人员选择器':
if (popeleShape == '分组模态') { if (popeleShape == '分组模态') {
...@@ -2393,18 +2492,16 @@ const AddModal = props => { ...@@ -2393,18 +2492,16 @@ const AddModal = props => {
let str = cho ? `全部ID.n` : `全部ID`; let str = cho ? `全部ID.n` : `全部ID`;
data[0].Config = str; data[0].Config = str;
} }
} else if (obj.ConfigName) {
let str = cho ? `全部.${obj.ConfigName}.n` : `全部.${obj.ConfigName}`;
data[0].Config = str;
} else { } else {
if (obj.ConfigName) { let str = cho ? `全部.n` : `全部`;
let str = cho ? `全部.${obj.ConfigName}.n` : `全部.${obj.ConfigName}`; data[0].Config = str;
data[0].Config = str;
} else {
let str = cho ? `全部.n` : `全部`;
data[0].Config = str;
}
} }
} else if (popeleShape == '下拉框') { } else if (popeleShape == '下拉框') {
let str = cho ? `${obj.Config}.n` : `${obj.Config}`; let str = cho ? `${obj.Config}.n` : `${obj.Config}`;
data[0].Config = str; data[0].Config = str;
} else if (popeleShape == '树形模态') { } else if (popeleShape == '树形模态') {
if (gl) { if (gl) {
...@@ -2419,32 +2516,32 @@ const AddModal = props => { ...@@ -2419,32 +2516,32 @@ const AddModal = props => {
default: default:
data[0].Config = obj.Config; data[0].Config = obj.Config;
} }
console.log(data[0]) console.log(data[0]);
let aadata = valueData; let aadata = valueData;
console.log(keepTreeFirst) console.log(keepTreeFirst);
// if (keepTreeFirst.indexOf(e.node.org.name) == -1) { // if (keepTreeFirst.indexOf(e.node.org.name) == -1) {
if (aadata.length > 0) { if (aadata.length > 0) {
let aa = []; let aa = [];
aadata.map(i => { aadata.map(i => {
aa.push(i.ID); aa.push(i.ID);
});
if (aa.indexOf(data[0].ID) != -1) {
aadata.map((i, j) => {
if (i.ID == data[0].ID) {
aadata[j] = data[0];
}
}); });
if (aa.indexOf(data[0].ID) != -1) {
aadata.map((i, j) => {
if (i.ID == data[0].ID) {
aadata[j] = data[0];
}
});
} else {
aadata.push(data[0]);
}
} else { } else {
aadata.push(data[0]); aadata.push(data[0]);
} }
} else {
aadata.push(data[0]);
}
// } // }
console.log(valueData) console.log(valueData);
console.log(aadata) console.log(aadata);
setValueData(aadata) setValueData(aadata);
form.setFieldsValue({ form.setFieldsValue({
Association: '', Association: '',
Config: '', Config: '',
...@@ -2467,7 +2564,11 @@ const AddModal = props => { ...@@ -2467,7 +2564,11 @@ const AddModal = props => {
PeShape: '', PeShape: '',
farter: '', farter: '',
farterData: '', farterData: '',
workOrder: '',
eventOrder: '',
configName: '',
}); });
setVisibleChecked(true);
setCse(''); setCse('');
setPopeleShape(''); setPopeleShape('');
setRadio(0); setRadio(0);
...@@ -2513,9 +2614,9 @@ const AddModal = props => { ...@@ -2513,9 +2614,9 @@ const AddModal = props => {
setValue1(); setValue1();
}; };
const onChangestyle = e =>{ const onChangestyle = e => {
setRadiostyle(e.target.value); setRadiostyle(e.target.value);
} };
const timeDataOnVChange = e => { const timeDataOnVChange = e => {
console.log(e.target.value); console.log(e.target.value);
...@@ -2565,42 +2666,32 @@ const AddModal = props => { ...@@ -2565,42 +2666,32 @@ const AddModal = props => {
} else { } else {
form.setFieldsValue({ ShowConfig: `全部ID.${bb}` }); form.setFieldsValue({ ShowConfig: `全部ID.${bb}` });
} }
} else if (ff == 1) {
form.setFieldsValue({ ShowConfig: `全部ID.n` });
} else { } else {
if (ff == 1) { form.setFieldsValue({ ShowConfig: `全部ID` });
form.setFieldsValue({ ShowConfig: `全部ID.n` });
} else {
form.setFieldsValue({ ShowConfig: `全部ID` });
}
} }
} else { } else if (bb) {
if (bb) {
if (ff == 1) {
form.setFieldsValue({ ShowConfig: `全部.${bb}.n` });
} else {
form.setFieldsValue({ ShowConfig: `全部.${bb}` });
}
} else {
if (ff == 1) {
form.setFieldsValue({ ShowConfig: `全部.n` });
} else {
form.setFieldsValue({ ShowConfig: `全部` });
}
}
}
} else {
if (aa) {
if (ff == 1) { if (ff == 1) {
form.setFieldsValue({ ShowConfig: `${aa}.n` }); form.setFieldsValue({ ShowConfig: `全部.${bb}.n` });
} else { } else {
form.setFieldsValue({ ShowConfig: `${aa}` }); form.setFieldsValue({ ShowConfig: `全部.${bb}` });
} }
} else if (ff == 1) {
form.setFieldsValue({ ShowConfig: `全部.n` });
} else { } else {
if (ff == 1) { form.setFieldsValue({ ShowConfig: `全部` });
form.setFieldsValue({ ShowConfig: `.n` }); }
} else { } else if (aa) {
form.setFieldsValue({ ShowConfig: '' }); if (ff == 1) {
} form.setFieldsValue({ ShowConfig: `${aa}.n` });
} else {
form.setFieldsValue({ ShowConfig: `${aa}` });
} }
} else if (ff == 1) {
form.setFieldsValue({ ShowConfig: `.n` });
} else {
form.setFieldsValue({ ShowConfig: '' });
} }
}; };
...@@ -2618,46 +2709,37 @@ const AddModal = props => { ...@@ -2618,46 +2709,37 @@ const AddModal = props => {
} else { } else {
form.setFieldsValue({ ShowConfig: `全部ID.${aa}` }); form.setFieldsValue({ ShowConfig: `全部ID.${aa}` });
} }
} else if (ff == 1) {
form.setFieldsValue({ ShowConfig: `全部ID.n` });
} else { } else {
if (ff == 1) { form.setFieldsValue({ ShowConfig: `全部ID` });
form.setFieldsValue({ ShowConfig: `全部ID.n` });
} else {
form.setFieldsValue({ ShowConfig: `全部ID` });
}
} }
} else { } else if (aa) {
if (aa) {
if (ff == 1) {
form.setFieldsValue({ ShowConfig: `全部.${aa}.n` });
} else {
form.setFieldsValue({ ShowConfig: `全部.${aa}` });
}
} else {
if (ff == 1) {
form.setFieldsValue({ ShowConfig: `全部.n` });
} else {
form.setFieldsValue({ ShowConfig: `全部` });
}
}
}
} else {
if (bb) {
if (ff == 1) { if (ff == 1) {
form.setFieldsValue({ ShowConfig: `${bb}.n` }); form.setFieldsValue({ ShowConfig: `全部.${aa}.n` });
} else { } else {
form.setFieldsValue({ ShowConfig: `${bb}` }); form.setFieldsValue({ ShowConfig: `全部.${aa}` });
} }
} else if (ff == 1) {
form.setFieldsValue({ ShowConfig: `全部.n` });
} else { } else {
if (ff == 1) { form.setFieldsValue({ ShowConfig: `全部` });
form.setFieldsValue({ ShowConfig: `.n` });
} else {
form.setFieldsValue({ ShowConfig: '' });
}
} }
} else if (bb) {
if (ff == 1) {
form.setFieldsValue({ ShowConfig: `${bb}.n` });
} else {
form.setFieldsValue({ ShowConfig: `${bb}` });
}
} else if (ff == 1) {
form.setFieldsValue({ ShowConfig: `.n` });
} else {
form.setFieldsValue({ ShowConfig: '' });
} }
}; };
const mapTreeSelect = org => org.children ? ( const mapTreeSelect = org =>
org.children ? (
<TreeNode value={org.name} title={org.name} disabled> <TreeNode value={org.name} title={org.name} disabled>
{org.children.map(item => mapTreeSelect(item))} {org.children.map(item => mapTreeSelect(item))}
</TreeNode> </TreeNode>
...@@ -2825,27 +2907,24 @@ const AddModal = props => { ...@@ -2825,27 +2907,24 @@ const AddModal = props => {
<Row> <Row>
{/* <Col span={1} /> */} {/* <Col span={1} /> */}
<Col span={16}> <Col span={16}>
<Item label="形态" labelCol={{ span: 6 }}> <Item label="形态" labelCol={{ span: 6 }}>
<TreeSelect
<TreeSelect style={{ width: '95%' }}
style={{ width: '95%' }} value={Shape}
value={Shape} onChange={handleCharacteristics}
onChange={handleCharacteristics} showSearch
showSearch dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} placeholder="请选择表名 "
placeholder="请选择表名 " allowClear
allowClear treeDefaultExpandAll
treeDefaultExpandAll showCheckedStrategy
showCheckedStrategy >
> {characteristics1 ? (
{characteristics1 ? ( characteristics1.map(i => mapTreeSelect(i))
characteristics1.map(i => mapTreeSelect(i)) ) : (
) : ( <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} /> )}
)} </TreeSelect>
</TreeSelect>
</Item> </Item>
</Col> </Col>
...@@ -2939,8 +3018,17 @@ const AddModal = props => { ...@@ -2939,8 +3018,17 @@ const AddModal = props => {
placeholder="用英文逗号分隔自定义的值,勾选,可设置初始值" placeholder="用英文逗号分隔自定义的值,勾选,可设置初始值"
/> />
</Item> </Item>
<Item colon={false} name="style" label="交互方式:" labelCol={{ span: 4 }}> <Item
<Radio.Group onChange={onChangestyle} value={radiostyle} defaultValue={cheestyle}> colon={false}
name="style"
label="交互方式:"
labelCol={{ span: 4 }}
>
<Radio.Group
onChange={onChangestyle}
value={radiostyle}
defaultValue={cheestyle}
>
<Radio value={0}>下拉框</Radio> <Radio value={0}>下拉框</Radio>
<Radio value={1}>平铺</Radio> <Radio value={1}>平铺</Radio>
</Radio.Group> </Radio.Group>
...@@ -2951,15 +3039,15 @@ const AddModal = props => { ...@@ -2951,15 +3039,15 @@ const AddModal = props => {
<Radio value={1}>多选</Radio> <Radio value={1}>多选</Radio>
</Radio.Group> </Radio.Group>
</Item> */} </Item> */}
<Item name="choose" label="配置:" labelCol={{ span: 4 }} > <Item name="choose" label="配置:" labelCol={{ span: 4 }}>
<Checkbox <Checkbox
checked={cho} checked={cho}
onChange={changeChoose} onChange={changeChoose}
style={{ marginBottom: '0' }} style={{ marginBottom: '0' }}
> >
多选 多选
</Checkbox> </Checkbox>
</Item> </Item>
</> </>
); );
case '图片': case '图片':
...@@ -2967,8 +3055,7 @@ const AddModal = props => { ...@@ -2967,8 +3055,7 @@ const AddModal = props => {
return ( return (
<Item name="ReadOnly" label="配置" labelCol={{ span: 4 }}> <Item name="ReadOnly" label="配置" labelCol={{ span: 4 }}>
<div> <div>
<Checkbox <Checkbox checked={view} onChange={onChangeView}>
checked={view} onChange={onChangeView}>
可预览 可预览
</Checkbox> </Checkbox>
<Checkbox <Checkbox
...@@ -2986,20 +3073,17 @@ const AddModal = props => { ...@@ -2986,20 +3073,17 @@ const AddModal = props => {
</div> </div>
</Item> </Item>
); );
case '附件': case '附件':
case '可预览附件': case '可预览附件':
return ( return (
<Item label="配置" labelCol={{ span: 4 }}> <Item label="配置" labelCol={{ span: 4 }}>
<div> <div>
<Checkbox <Checkbox checked={preView} onChange={onChangePreView}>
checked={preView} 可预览
onChange={onChangePreView} </Checkbox>
> </div>
可预览 </Item>
</Checkbox> );
</div>
</Item>
);
case '唯一值文本': case '唯一值文本':
return ( return (
<Row> <Row>
...@@ -3180,6 +3264,144 @@ const AddModal = props => { ...@@ -3180,6 +3264,144 @@ const AddModal = props => {
</div> </div>
</Item> </Item>
); );
case '关联表单':
return (
<>
<Item
label="台账名"
name="standingBook"
labelCol={{ span: 4 }}
rules={[{ required: true, message: '请选择台账名' }]}
>
<Select showSearch>
{keepStandingBook
? keepStandingBook.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
: ''}
</Select>
</Item>
{/* <Item
label="映射字段"
name="workOrder"
rules={[{ required: true, message: '请填写映射字段' }]}
labelCol={{ span: 4 }}
>
<Input placeholder="示例:工单编号:工单编号,事件编号:事件编号" />
</Item> */}
<Item label={<><span style={{color:'red', fontSize:'17px',marginRight:'5px', marginTop:'3px'}}>*</span><span>映射字段</span></>} labelCol={{ span: 4 }}>
<Row>
<Col span={11}>
<Item
name="workOrder"
rules={[{ required: true, message: '请输入映射名' }]}
style={{ marginBottom:0}}
>
<Input placeholder="请输入映射名" />
</Item>
</Col>
<Col span={11}>
<Item
name="eventOrder"
rules={[{ required: true, message: '请输入映射值' }]}
style={{ marginBottom:0}}
>
<Input placeholder="请输入映射值" style={{marginLeft:'41px', width:'189px'}}/>
</Item>
</Col>
</Row>
</Item>
<Form name="form" form={formAdd} labelCol={{ span: 7 }}>
<Form.List name="parmars">
{(fields, { add, remove }) => (
<>
{fields.map(({ key, name, fieldKey, ...restField }) => (
<Space
key={key}
style={{
display: 'flex',
marginBottom: '5px',
justifyContent: 'center',
}}
align="baseline"
>
<Form.Item
{...restField}
style={{ marginBottom: '5px' }}
name={[name, 'key']}
fieldKey={[fieldKey, 'key']}
validateTrigger={['onChange', 'onBlur']}
rules={[
{ required: true, message: '请填写映射名' },
// {
// validator: () => {
// // 验证参数名不能重复
// const allKey = form
// .getFieldsValue()
// .parmars.map(item => (item ? item.key : ''));
// const repeatKey = new Set(allKey);
// if (repeatKey.size !== allKey.length) {
// return Promise.reject(new Error('参数名重复'));
// }
// return Promise.resolve();
// },
// },
]}
>
<Input placeholder="请填写映射名" style={{ width:'227px', marginLeft:'98px'}}/>
</Form.Item>
<Form.Item
{...restField}
style={{ marginBottom: '5px' }}
name={[name, 'value']}
fieldKey={[fieldKey, 'value']}
rules={[{ required: true, message: '请填写映射值'}]}
>
<Input placeholder="请填写映射值" style={{ width:'188px', marginLeft:'32px'}}/>
</Form.Item>
<MinusCircleOutlined
onClick={() => remove(name)}
style={{ marginLeft: '10px', fontSize: '20px' }}
/>
</Space>
))}
<Form.Item>
<Button
style={{ width: '494px', marginLeft: '100px' }}
type="dashed"
onClick={() => add()}
block
icon={<PlusOutlined />}
>
添加映射
</Button>
</Form.Item>
</>
)}
</Form.List>
</Form>
<Item label="默认显示" labelCol={{ span: 4 }}>
<Switch
checkedChildren="是"
unCheckedChildren="否"
checked={visibleChecked}
onChange={change}
// style={{ marginLeft: '35px' }}
/>
</Item>
<Item
label="控制规则"
name="configName"
labelCol={{ span: 4 }}
rules={[{ required: true, message: '请输入控制规则' }]}
>
<TextArea placeholder="示例:部门='研发一部'{表名.是否缴费} = ‘是’ and {表名.缴费金额} > 1000" />
</Item>
</>
);
case '台账选择器': case '台账选择器':
return ( return (
<> <>
...@@ -3189,7 +3411,7 @@ const AddModal = props => { ...@@ -3189,7 +3411,7 @@ const AddModal = props => {
label="台账名" label="台账名"
name="standingBook" name="standingBook"
labelCol={{ span: 6 }} labelCol={{ span: 6 }}
rules={[{ required: true, message: '请输入台账名' }]} rules={[{ required: true, message: '请选择台账名' }]}
> >
<Select showSearch style={{ width: '95%' }}> <Select showSearch style={{ width: '95%' }}>
{keepStandingBook {keepStandingBook
...@@ -3480,50 +3702,49 @@ const AddModal = props => { ...@@ -3480,50 +3702,49 @@ const AddModal = props => {
{Shape === '图片' || Shape === '可预览图片' ? ( {Shape === '图片' || Shape === '可预览图片' ? (
'' ''
) : ( ) : (
<Item labelCol={{ span: 4 }}> <Item labelCol={{ span: 4 }}>
{/* <div className={styles.listEvent}> */} {/* <div className={styles.listEvent}> */}
<Row> <Row>
<Col span={12}> <Col span={12}>
<Item label="预设值" labelCol={{ span: 8 }}> <Item label="预设值" labelCol={{ span: 8 }}>
<Input <Input
// style={{ width: '41%', height: '1.8rem' }} // style={{ width: '41%', height: '1.8rem' }}
value={pramData.Preset} value={pramData.Preset}
onChange={e => handleInput(e, 'Preset')} onChange={e => handleInput(e, 'Preset')}
placeholder="" placeholder=""
allowClear allowClear
/> />
</Item> </Item>
</Col> </Col>
<Col span={11}> <Col span={11}>
<Item <Item
style={{ marginLeft: '1rem' }} style={{ marginLeft: '1rem' }}
label="验证" label="验证"
labelCol={{ span: 7 }} labelCol={{ span: 7 }}
name="ValidationRule" name="ValidationRule"
> >
<Input style={{ width: '92%' }} placeholder="" allowClear /> <Input style={{ width: '92%' }} placeholder="" allowClear />
</Item> </Item>
</Col> </Col>
<Col span={1}> <Col span={1}>
<Tooltip title="选择验证规则"> <Tooltip title="选择验证规则">
<PlusSquareOutlined <PlusSquareOutlined
onClick={() => { onClick={() => {
add('rule'); add1('rule');
}} }}
style={{ style={{
fontSize: '24px', fontSize: '24px',
color: '#1890FF', color: '#1890FF',
marginTop: '8px', marginTop: '8px',
marginLeft: '-3px', marginLeft: '-3px',
}} }}
/> />
</Tooltip> </Tooltip>
</Col> </Col>
</Row> </Row>
</Item> </Item>
)} )}
{/* <Item label="异常值"> {/* <Item label="异常值">
<div className={styles.listEvent}> <div className={styles.listEvent}>
<Input <Input
......
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