Commit 77762b4b authored by 皮倩雯's avatar 皮倩雯

fix: '人员选择器,站点选择器,部门选择器,本人部门,本人站点增加ID存储配置,去掉本人ID形态'

parent 29ab91c6
Pipeline #66743 passed with stages
......@@ -101,7 +101,7 @@ const AddModal = props => {
'数值',
'地址',
'设备二维码',
'本人ID',
// '本人ID',
'富文本',
'编码',
],
......@@ -215,7 +215,7 @@ const AddModal = props => {
console.log(e);
setFieldshineChecked(e);
setCho(false);
form.setFieldsValue({fieldName:''})
form.setFieldsValue({ fieldName: '' });
};
const onChangeView = e => {
setView(e.target.checked);
......@@ -274,6 +274,20 @@ const AddModal = props => {
];
console.log(data);
switch (Shape) {
case '本人部门':
if (checkboxAllID1 == true) {
data[0].Config = `ID存储`;
} else {
data[0].Config = '';
}
break;
case '本人姓名':
if (checkboxAllID1 == true) {
data[0].Config = `ID存储`;
} else {
data[0].Config = '';
}
break;
case '编码':
data[0].Config = `${obj.code}.${obj.prefix ? obj.prefix : ''}`;
break;
......@@ -306,10 +320,10 @@ const AddModal = props => {
}
break;
case '部门选择器':
if (obj.check == 0) {
data[0].Config = '';
if (checkboxAllID1 == true) {
data[0].Config = cho ? `.n+ID存储` : `+ID存储`;
} else {
data[0].Config = '.n';
data[0].Config = cho ? `.n` : '';
}
break;
case '唯一值文本':
......@@ -318,12 +332,13 @@ const AddModal = props => {
: `${obj.tableName}`;
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' : ''}`;
if (checkboxAllID1 == true) {
data[0].Config = pep
? `本人${cho ? '.n' : ''}+ID存储`
: `全部${cho ? '.n' : ''}+ID存储`;
} else {
data[0].Config = pep ? `本人${cho ? '.n' : ''}` : `全部${cho ? '.n' : ''}`;
}
break;
case '业务选择器':
if (obj.fieldName.endsWith('.n')) {
......@@ -403,10 +418,12 @@ const AddModal = props => {
if (popeleShape == '分组模态') {
if (checkboxAllID1 == true) {
if (obj.ConfigName) {
let str = cho ? `全部ID.${obj.ConfigName}.n` : `全部ID.${obj.ConfigName}`;
let str = cho
? `全部.${obj.ConfigName}.n+ID存储`
: `全部.${obj.ConfigName}+ID存储`;
data[0].Config = str;
} else {
let str = cho ? `全部ID.n` : `全部ID`;
let str = cho ? `全部.n+ID存储` : `全部+ID存储`;
data[0].Config = str;
}
} else if (obj.ConfigName) {
......@@ -417,17 +434,31 @@ const AddModal = props => {
data[0].Config = str;
}
} else if (popeleShape == '下拉框') {
let str = cho ? `${obj.Config}.n` : `${obj.Config}`;
console.log(str);
data[0].Config = str;
} else if (popeleShape == '树形模态') {
if (gl) {
let str = cho ? `tree.多选|站点` : `tree.单选|站点`;
if (checkboxAllID1 == true) {
let str = cho ? `${obj.Config}.n+ID存储` : `${obj.Config}+ID存储`;
data[0].Config = str;
} else {
let str = cho ? `tree.多选|非站点` : `tree.单选|非站点`;
let str = cho ? `${obj.Config}.n` : `${obj.Config}`;
data[0].Config = str;
}
} else if (popeleShape == '树形模态') {
if (gl) {
if (checkboxAllID1 == true) {
let str = cho ? `tree.多选|站点+ID存储` : `tree.单选|站点+ID存储`;
data[0].Config = str;
} else {
let str = cho ? `tree.多选|站点` : `tree.单选|站点`;
data[0].Config = str;
}
} else {
if (checkboxAllID1 == true) {
let str = cho ? `tree.多选|非站点+ID存储` : `tree.单选|非站点+ID存储`;
data[0].Config = str;
} else {
let str = cho ? `tree.多选|非站点` : `tree.单选|非站点`;
data[0].Config = str;
}
}
}
break;
default:
......@@ -599,7 +630,7 @@ const AddModal = props => {
'数值',
'地址',
'设备二维码',
'本人ID',
// '本人ID',
'富文本',
'编码',
],
......@@ -717,28 +748,57 @@ const AddModal = props => {
prefix: code[1] === 'undefined' ? '' : code[1],
});
break;
case '本人部门':
let depart = res[0].data.root.Config;
form.setFieldsValue({ AllID1: depart ? true : false });
setCheckboxAllID1(depart ? true : false);
break;
case '本人姓名':
let name = res[0].data.root.Config;
form.setFieldsValue({ AllID1: name ? true : false });
setCheckboxAllID1(name ? true : false);
break;
case '站点选择器':
let site = res[0].data.root.Config.split('.');
console.log(site[1]);
let siteId = res[0].data.root.Config.split('+');
let site = siteId[0].split('.');
if (site[0] == '本人') {
if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: true, choose: true });
if (res[0].data.root.Config.indexOf('.n') !== -1) {
form.setFieldsValue({
pepole: true,
choose: true,
AllID1: siteId[1] ? true : false,
});
setPep(true);
setCho(true);
} else {
form.setFieldsValue({ pepole: true, choose: false });
form.setFieldsValue({
pepole: true,
choose: false,
AllID1: siteId[1] ? true : false,
});
setPep(true);
setCho(false);
}
} else if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: false, choose: true });
setPep(false);
setCho(true);
} else {
form.setFieldsValue({ pepole: false, choose: false });
setPep(false);
setCho(false);
} else if (site[0] == '全部') {
if (res[0].data.root.Config.indexOf('.n') !== -1) {
form.setFieldsValue({
pepole: false,
choose: true,
AllID1: siteId[1] ? true : false,
});
setPep(false);
setCho(true);
} else {
form.setFieldsValue({
pepole: false,
choose: false,
AllID1: siteId[1] ? true : false,
});
setPep(false);
setCho(false);
}
}
setCheckboxAllID1(siteId[1] ? true : false);
break;
case '搜索选择器':
let data = res[0].data.root.Config.split('.');
......@@ -809,19 +869,15 @@ const AddModal = props => {
}
break;
case '部门选择器':
let department = res[0].data.root.Config;
console.log(department);
if (department == '.n') {
form.setFieldsValue({
check: 1,
});
setRadio(1);
let department = res[0].data.root.Config.split('+');
if (department[0] == '.n') {
form.setFieldsValue({ choose: true, AllID1: department[1] ? true : false });
setCho(true);
} else {
form.setFieldsValue({
check: 0,
});
setRadio(0);
form.setFieldsValue({ choose: false, AllID1: department[1] ? true : false });
setCho(false);
}
setCheckboxAllID1(department[1] ? true : false);
break;
case '台账选择器':
let book = res[0].data.root.Config.split('.');
......@@ -955,56 +1011,31 @@ const AddModal = props => {
break;
case '人员选择器':
let pepole = res[0].data.root.Config.split('.');
console.log(pepole);
let id = res[0].data.root.Config.split('+');
form.setFieldsValue({ ShowConfig: res[0].data.root.Config });
if (pepole[0] == '全部') {
setHide(false);
setFlag(true);
setCheckboxAll1(true);
if (pepole[1] != 'n') {
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: false,
ConfigName: pepole[1],
});
} else {
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: false,
ConfigName: '',
});
}
if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ choose: true });
setCho(true);
} else {
form.setFieldsValue({ choose: false });
setCho(false);
}
setPopeleShape('分组模态');
} else if (pepole[0] == '全部ID') {
setHide(false);
setFlag(true);
setCheckboxAll1(true);
setCheckboxAllID1(true);
if (pepole[1] != 'n') {
if (pepole[1] && pepole[1] != 'n') {
let aa = pepole[1].split('+');
console.log(aa);
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: true,
ConfigName: pepole[1],
AllID1: id[1] ? true : false,
ConfigName: aa[0] !== 'n' ? aa[0] : '',
});
} else {
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
ConfigName: '',
});
}
if (res[0].data.root.Config.endsWith('.n')) {
setCheckboxAllID1(id[1] ? true : false);
if (res[0].data.root.Config.indexOf('.n') !== -1) {
form.setFieldsValue({ choose: true });
setCho(true);
} else {
......@@ -1014,16 +1045,16 @@ const AddModal = props => {
setPopeleShape('分组模态');
} else if (pepole[0] == 'tree') {
setCheckboxAll1(false);
setCheckboxAllID1(false);
setHide(true);
setFlag(1);
let tree = pepole[1].split('|');
let treeId = tree[1].split('+');
if (tree[0] == '多选') {
if (tree[1] == '站点') {
if (treeId[0] == '站点') {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: true,
choose: true,
});
......@@ -1033,18 +1064,18 @@ const AddModal = props => {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: false,
choose: true,
});
setGl(false);
setCho(true);
}
} else if (tree[1] == '站点') {
} else if (treeId[0] == '站点') {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: true,
choose: false,
});
......@@ -1054,26 +1085,28 @@ const AddModal = props => {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: false,
choose: false,
});
setGl(false);
setCho(false);
}
setCheckboxAllID1(id[1] ? true : false);
setPopeleShape('树形模态');
} else {
setCheckboxAll1(false);
setCheckboxAllID1(false);
setCheckboxAllID1(id[1] ? true : false);
setHide(true);
setFlag(false);
let aa = pepole[0].split('+');
form.setFieldsValue({
All1: false,
PeShape: '下拉框',
AllID1: false,
Config: pepole[0],
AllID1: id[1] ? true : false,
Config: aa[0],
});
if (res[0].data.root.Config.endsWith('.n')) {
if (res[0].data.root.Config.indexOf('.n') !== -1) {
form.setFieldsValue({ choose: true });
setCho(true);
} else {
......@@ -1576,7 +1609,7 @@ const AddModal = props => {
'数值',
'地址',
'设备二维码',
'本人ID',
// '本人ID',
'富文本',
'编码',
],
......@@ -1777,6 +1810,16 @@ const AddModal = props => {
prefix: code[1] === 'undefined' ? '' : code[1],
});
break;
case '本人部门':
let depart = aa.Config;
form.setFieldsValue({ AllID1: depart ? true : false });
setCheckboxAllID1(depart ? true : false);
break;
case '本人姓名':
let name = aa.Config;
form.setFieldsValue({ AllID1: name ? true : false });
setCheckboxAllID1(name ? true : false);
break;
case '搜索选择器':
let data = aa.Config.split('.');
form.setFieldsValue({
......@@ -1841,42 +1884,57 @@ const AddModal = props => {
}
break;
case '站点选择器':
let site = aa.Config.split('.');
let siteId = aa.Config.split('+');
let site = siteId[0].split('.');
if (site[0] == '本人') {
if (aa.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: true, choose: true });
if (aa.Config.indexOf('.n') !== -1) {
form.setFieldsValue({
pepole: true,
choose: true,
AllID1: siteId[1] ? true : false,
});
setPep(true);
setCho(true);
} else {
form.setFieldsValue({ pepole: true, choose: false });
form.setFieldsValue({
pepole: true,
choose: false,
AllID1: siteId[1] ? true : false,
});
setPep(true);
setCho(false);
}
} else if (aa.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: false, choose: true });
setPep(false);
setCho(true);
} else {
form.setFieldsValue({ pepole: false, choose: false });
setPep(false);
setCho(false);
} else if (site[0] == '全部') {
if (aa.Config.indexOf('.n') !== -1) {
form.setFieldsValue({
pepole: false,
choose: true,
AllID1: siteId[1] ? true : false,
});
setPep(false);
setCho(true);
} else {
form.setFieldsValue({
pepole: false,
choose: false,
AllID1: siteId[1] ? true : false,
});
setPep(false);
setCho(false);
}
}
setCheckboxAllID1(siteId[1] ? true : false);
break;
case '部门选择器':
let department = aa.Config;
if (department == '.n') {
form.setFieldsValue({
check: 1,
});
setRadio(1);
let department = aa.Config.split('+');
if (department[0] == '.n') {
form.setFieldsValue({ choose: true, AllID1: department[1] ? true : false });
setCho(true);
} else {
form.setFieldsValue({
check: 0,
});
setRadio(0);
form.setFieldsValue({ choose: false, AllID1: department[1] ? true : false });
setCho(false);
}
setCheckboxAllID1(department[1] ? true : false);
break;
case '关联表单':
let data11 = JSON.parse(aa.Config);
......@@ -2010,56 +2068,31 @@ const AddModal = props => {
break;
case '人员选择器':
let pepole = aa.Config.split('.');
console.log(pepole);
let id = aa.Config.split('+');
form.setFieldsValue({ ShowConfig: aa.Config });
if (pepole[0] == '全部') {
setHide(false);
setFlag(true);
setCheckboxAll1(true);
if (pepole[1] != 'n') {
if (pepole[1] && pepole[1] != 'n') {
let config = pepole[1].split('+');
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: false,
ConfigName: pepole[1],
AllID1: id[1] ? true : false,
ConfigName: config[0] !== 'n' ? config[0] : '',
});
} else {
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: false,
AllID1: id[1] ? true : false,
ConfigName: '',
});
}
if (aa.endsWith('.n')) {
form.setFieldsValue({ choose: true });
setCho(true);
} else {
form.setFieldsValue({ choose: false });
setCho(false);
}
setPopeleShape('分组模态');
} else if (pepole[0] == '全部ID') {
setHide(false);
setFlag(true);
setCheckboxAll1(true);
setCheckboxAllID1(true);
if (pepole[1] != 'n') {
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: true,
ConfigName: pepole[1],
});
} else {
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: true,
ConfigName: '',
});
}
if (aa.Config.endsWith('.n')) {
setCheckboxAllID1(id[1] ? true : false);
if (aa.Config.indexOf('.n') !== -1) {
form.setFieldsValue({ choose: true });
setCho(true);
} else {
......@@ -2069,16 +2102,16 @@ const AddModal = props => {
setPopeleShape('分组模态');
} else if (pepole[0] == 'tree') {
setCheckboxAll1(false);
setCheckboxAllID1(false);
setHide(true);
setFlag(1);
let tree = pepole[1].split('|');
let treeId = tree[1].split('+');
if (tree[0] == '多选') {
if (tree[1] == '站点') {
if (treeId[0] == '站点') {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: true,
choose: true,
});
......@@ -2088,18 +2121,18 @@ const AddModal = props => {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: false,
choose: true,
});
setGl(false);
setCho(true);
}
} else if (tree[1] == '站点') {
} else if (treeId[0] == '站点') {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: true,
choose: false,
});
......@@ -2109,26 +2142,28 @@ const AddModal = props => {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: false,
choose: false,
});
setGl(false);
setCho(false);
}
setCheckboxAllID1(id[1] ? true : false);
setPopeleShape('树形模态');
} else {
setCheckboxAll1(false);
setCheckboxAllID1(false);
setCheckboxAllID1(id[1] ? true : false);
setHide(true);
setFlag(false);
let aaa = pepole[0].split('+');
form.setFieldsValue({
All1: false,
PeShape: '下拉框',
AllID1: false,
Config: pepole[0],
AllID1: id[1] ? true : false,
Config: aaa[0],
});
if (aa.Config.endsWith('.n')) {
if (aa.Config.indexOf('.n') !== -1) {
form.setFieldsValue({ choose: true });
setCho(true);
} else {
......@@ -2263,7 +2298,16 @@ const AddModal = props => {
prefix: code[1] === 'undefined' ? '' : code[1],
});
break;
case '本人部门':
let depart = res[0].data.root.Config;
form.setFieldsValue({ AllID1: depart ? true : false });
setCheckboxAllID1(depart ? true : false);
break;
case '本人姓名':
let name = res[0].data.root.Config;
form.setFieldsValue({ AllID1: name ? true : false });
setCheckboxAllID1(name ? true : false);
break;
case '搜索选择器':
let data = res[0].data.root.Config.split('.');
form.setFieldsValue({
......@@ -2310,27 +2354,46 @@ const AddModal = props => {
});
break;
case '站点选择器':
let site = res[0].data.root.Config.split('.');
let siteId = res[0].data.root.Config.split('+');
let site = siteId[0].split('.');
if (site[0] == '本人') {
if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: true, choose: true });
if (res[0].data.root.Config.indexOf('.n') !== -1) {
form.setFieldsValue({
pepole: true,
choose: true,
AllID1: siteId[1] ? true : false,
});
setPep(true);
setCho(true);
} else {
form.setFieldsValue({ pepole: true, choose: false });
form.setFieldsValue({
pepole: true,
choose: false,
AllID1: siteId[1] ? true : false,
});
setPep(true);
setCho(false);
}
} else if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ pepole: false, choose: true });
setPep(false);
setCho(true);
} else {
form.setFieldsValue({ pepole: false, choose: false });
setPep(false);
setCho(false);
} else if (site[0] == '全部') {
if (res[0].data.root.Config.indexOf('.n') !== -1) {
form.setFieldsValue({
pepole: false,
choose: true,
AllID1: siteId[1] ? true : false,
});
setPep(false);
setCho(true);
} else {
form.setFieldsValue({
pepole: false,
choose: false,
AllID1: siteId[1] ? true : false,
});
setPep(false);
setCho(false);
}
}
setCheckboxAllID1(siteId[1] ? true : false);
break;
case '业务选择器':
let list = res[0].data.root.Config.split('.');
......@@ -2352,19 +2415,15 @@ const AddModal = props => {
}
break;
case '部门选择器':
let department = res[0].data.root.Config;
if (department == '.n') {
form.setFieldsValue({
check: 1,
});
setRadio(1);
let department = res[0].data.root.Config.split('+');
if (department[0] == '.n') {
form.setFieldsValue({ choose: true, AllID1: department[1] ? true : false });
setCho(true);
} else {
form.setFieldsValue({
check: 0,
});
setRadio(0);
form.setFieldsValue({ choose: false, AllID1: department[1] ? true : false });
setCho(false);
}
setCheckboxAllID1(department[1] ? true : false);
break;
case '关联表单':
......@@ -2504,56 +2563,30 @@ const AddModal = props => {
break;
case '人员选择器':
let pepole = res[0].data.root.Config.split('.');
let id = res[0].data.root.Config.split('+');
form.setFieldsValue({ ShowConfig: res[0].data.root.Config });
if (pepole[0] == '全部') {
setHide(false);
setFlag(true);
setCheckboxAll1(true);
if (pepole[1] != 'n') {
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: false,
ConfigName: pepole[1],
});
} else {
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: false,
ConfigName: '',
});
}
if (res[0].data.root.Config.endsWith('.n')) {
form.setFieldsValue({ choose: true });
setCho(true);
} else {
form.setFieldsValue({ choose: false });
setCho(false);
}
setPopeleShape('分组模态');
} else if (pepole[0] == '全部ID') {
setHide(false);
setFlag(true);
setCheckboxAll1(true);
setCheckboxAllID1(true);
if (pepole[1] != 'n') {
if (pepole[1] && pepole[1] != 'n') {
let aa = pepole[1].split('+');
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: true,
ConfigName: pepole[1],
AllID1: id[1] ? true : false,
ConfigName: aa[0] !== 'n' ? aa[0] : '',
});
} else {
form.setFieldsValue({
PeShape: '分组模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
ConfigName: '',
});
}
if (res[0].data.root.Config.endsWith('.n')) {
setCheckboxAllID1(id[1] ? true : false);
if (res[0].data.root.Config.indexOf('.n') !== -1) {
form.setFieldsValue({ choose: true });
setCho(true);
} else {
......@@ -2563,16 +2596,16 @@ const AddModal = props => {
setPopeleShape('分组模态');
} else if (pepole[0] == 'tree') {
setCheckboxAll1(false);
setCheckboxAllID1(false);
setHide(true);
setFlag(1);
let tree = pepole[1].split('|');
let treeId = tree[1].split('+');
if (tree[0] == '多选') {
if (tree[1] == '站点') {
if (treeId[0] == '站点') {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: true,
choose: true,
});
......@@ -2582,18 +2615,18 @@ const AddModal = props => {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: false,
choose: true,
});
setGl(false);
setCho(true);
}
} else if (tree[1] == '站点') {
} else if (treeId[0] == '站点') {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: true,
choose: false,
});
......@@ -2603,26 +2636,28 @@ const AddModal = props => {
form.setFieldsValue({
PeShape: '树形模态',
All1: true,
AllID1: true,
AllID1: id[1] ? true : false,
guolv: false,
choose: false,
});
setGl(false);
setCho(false);
}
setCheckboxAllID1(id[1] ? true : false);
setPopeleShape('树形模态');
} else {
setCheckboxAll1(false);
setCheckboxAllID1(false);
setCheckboxAllID1(id[1] ? true : false);
setHide(true);
setFlag(false);
let aa = pepole[0].split('+');
form.setFieldsValue({
All1: false,
PeShape: '下拉框',
AllID1: false,
Config: pepole[0],
AllID1: id[1] ? true : false,
Config: aa[0],
});
if (res[0].data.root.Config.endsWith('.n')) {
if (res[0].data.root.Config.indexOf('.n') !== -1) {
form.setFieldsValue({ choose: true });
setCho(true);
} else {
......@@ -2710,6 +2745,20 @@ const AddModal = props => {
}
switch (Shape) {
case '本人部门':
if (checkboxAllID1 == true) {
data[0].Config = `ID存储`;
} else {
data[0].Config = '';
}
break;
case '本人姓名':
if (checkboxAllID1 == true) {
data[0].Config = `ID存储`;
} else {
data[0].Config = '';
}
break;
case '编码':
data[0].Config = `${obj.code}.${obj.prefix ? obj.prefix : ''}`;
break;
......@@ -2735,7 +2784,13 @@ const AddModal = props => {
: `${obj.tableName}`;
break;
case '站点选择器':
data[0].Config = pep ? `本人${cho ? '.n' : ''}` : `全部${cho ? '.n' : ''}`;
if (checkboxAllID1 == true) {
data[0].Config = pep
? `本人${cho ? '.n' : ''}+ID存储`
: `全部${cho ? '.n' : ''}+ID存储`;
} else {
data[0].Config = pep ? `本人${cho ? '.n' : ''}` : `全部${cho ? '.n' : ''}`;
}
break;
case '业务选择器':
if (obj.fieldName.endsWith('.n')) {
......@@ -2752,10 +2807,10 @@ const AddModal = props => {
}
break;
case '部门选择器':
if (obj.check == 0) {
data[0].Config = '';
if (checkboxAllID1 == true) {
data[0].Config = cho ? `.n+ID存储` : `+ID存储`;
} else {
data[0].Config = '.n';
data[0].Config = cho ? `.n` : '';
}
break;
case '台账选择器':
......@@ -2839,10 +2894,12 @@ const AddModal = props => {
if (popeleShape == '分组模态') {
if (checkboxAllID1 == true) {
if (obj.ConfigName) {
let str = cho ? `全部ID.${obj.ConfigName}.n` : `全部ID.${obj.ConfigName}`;
let str = cho
? `全部.${obj.ConfigName}.n+ID存储`
: `全部.${obj.ConfigName}+ID存储`;
data[0].Config = str;
} else {
let str = cho ? `全部ID.n` : `全部ID`;
let str = cho ? `全部.n+ID存储` : `全部+ID存储`;
data[0].Config = str;
}
} else if (obj.ConfigName) {
......@@ -2853,17 +2910,31 @@ const AddModal = props => {
data[0].Config = str;
}
} else if (popeleShape == '下拉框') {
let str = cho ? `${obj.Config}.n` : `${obj.Config}`;
data[0].Config = str;
} else if (popeleShape == '树形模态') {
if (gl) {
let str = cho ? `tree.多选|站点` : `tree.单选|站点`;
if (checkboxAllID1 == true) {
let str = cho ? `${obj.Config}.n+ID存储` : `${obj.Config}+ID存储`;
data[0].Config = str;
} else {
let str = cho ? `tree.多选|非站点` : `tree.单选|非站点`;
let str = cho ? `${obj.Config}.n` : `${obj.Config}`;
data[0].Config = str;
}
} else if (popeleShape == '树形模态') {
if (gl) {
if (checkboxAllID1 == true) {
let str = cho ? `tree.多选|站点+ID存储` : `tree.单选|站点+ID存储`;
data[0].Config = str;
} else {
let str = cho ? `tree.多选|站点` : `tree.单选|站点`;
data[0].Config = str;
}
} else {
if (checkboxAllID1 == true) {
let str = cho ? `tree.多选|非站点+ID存储` : `tree.单选|非站点+ID存储`;
data[0].Config = str;
} else {
let str = cho ? `tree.多选|非站点` : `tree.单选|非站点`;
data[0].Config = str;
}
}
}
break;
default:
......@@ -3195,11 +3266,11 @@ const AddModal = props => {
// }
setHide(true);
setFlag(false);
setCheckboxAllID1(false);
// setCheckboxAllID1(false);
} else if (e.target.value == '树形模态') {
setHide(true);
setFlag(1);
setCheckboxAllID1(false);
// setCheckboxAllID1(false);
}
};
......@@ -3648,14 +3719,30 @@ const AddModal = props => {
);
case '部门选择器':
return (
<>
<Item colon={false} name="check" label="配置:" labelCol={{ span: 4 }}>
<Radio.Group onChange={onChange2} value={radio} defaultValue={chee}>
<Radio value={0}>单选</Radio>
<Radio value={1}>多选</Radio>
</Radio.Group>
</Item>
</>
<Item name="Config" labelCol={{ span: 4 }} label="配置">
<div style={{ display: 'inline-block' }}>
<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="AllID1" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
>
ID存储
</Checkbox>
</Item>
</div>
</Item>
);
case '站点选择器':
return (
......@@ -3671,7 +3758,18 @@ const AddModal = props => {
</Checkbox>
</Item>
</div>
{/* <div style={{ display: 'inline-block' }}>
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="AllID1" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
>
ID存储
</Checkbox>
</Item>
</div>
<div style={{ display: 'inline-block' }}>
<Item name="choose" style={{ marginBottom: '0' }}>
<Checkbox
checked={cho}
......@@ -3681,7 +3779,7 @@ const AddModal = props => {
多选
</Checkbox>
</Item>
</div> */}
</div>
</Item>
);
case '关联表单':
......@@ -4267,18 +4365,18 @@ const AddModal = props => {
</Checkbox>
</Item>
</div>
{/* <div style={{ display: 'inline-block', marginRight: '10px' }}>
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="AllID1" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
disabled={hide}
// disabled={hide}
>
ID存储
</Checkbox>
</Item>
</div> */}
</div>
</Item>
{(() => {
switch (flag) {
......@@ -4400,6 +4498,38 @@ const AddModal = props => {
</div>
</Item>
);
case '本人姓名':
return (
<Item name="Config" labelCol={{ span: 4 }} label="配置">
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="AllID1" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
>
ID存储
</Checkbox>
</Item>
</div>
</Item>
);
case '本人部门':
return (
<Item name="Config" labelCol={{ span: 4 }} label="配置">
<div style={{ display: 'inline-block', marginRight: '10px' }}>
<Item name="AllID1" style={{ marginBottom: '0' }}>
<Checkbox
checked={checkboxAllID1}
onChange={changeAllID1}
style={{ marginBottom: '0' }}
>
ID存储
</Checkbox>
</Item>
</div>
</Item>
);
// case '位置坐标':
// return (
// <Item label="字段名称" name="Config" labelCol={{ span: 4 }}>
......@@ -4409,9 +4539,6 @@ const AddModal = props => {
case '视频':
case '录音':
case '地址':
case '本人部门':
case '本人姓名':
case '本人ID':
case '城市选择器':
case '设备选择':
case '区域控件':
......
......@@ -187,10 +187,10 @@ const maintenance = () => {
width: 80,
align: 'center',
render: record => {
if (record == '是') {
return <Tag color="success">{record}</Tag>;
if (record === '是') {
return <Tag color="success"></Tag>;
} else {
return <Tag color="processing">{record}</Tag>;
return <Tag color="processing"></Tag>;
}
},
},
......
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