Commit d212ad7d authored by 涂伟's avatar 涂伟

fix: '继承登录图片上传修改'

parent 6268d2e6
......@@ -384,6 +384,11 @@ const AddModal = props => {
message.error('请选择图标!');
return;
}
if (obj.iconUrl.includes('CityTemp') && obj.iconUrl.includes('图库')) {
obj.iconUrl = obj.iconUrl;
} else {
obj.iconUrl = 'CityTemp\\图库\\' + obj.iconUrl;
}
if (type === 'add') {
AddIntegratedLogin({
systemName: obj.systemName,
......@@ -534,7 +539,15 @@ const AddModal = props => {
// };
// });
if (info.file.response.code === 0) {
setImageUrl(getImg(info.file.response.data));
console.log('触发咯');
if (
info.file.response.data.includes('CityTemp') &&
info.file.response.data.includes('图库')
) {
setImageUrl(getImg(info.file.response.data));
} else {
setImageUrl(getImg('CityTemp\\图库\\' + info.file.response.data));
}
setLoading(false);
} else {
message.error(info.file.response.msg);
......
......@@ -396,6 +396,25 @@ const Integrate = () => {
if (resnew.code === 0) {
setTableData(resnew.data);
setShowSearchStyle(true);
let aa = [];
if (resnew.data.length > 0) {
resnew.data.map((i, j) => {
aa.push(i.SystemName);
resnew.data[j].AccountParamKey = i.AccountParam[0].key;
resnew.data[j].AccountParamValue = i.AccountParam[0].value;
if (resnew.data[j].iconUrl && !resnew.data[j].iconUrl.includes('images')) {
resnew.data[j].showUrl = getImg(resnew.data[j].iconUrl);
} else {
resnew.data[j].showUrl = `${window.location.origin}/${resnew.data[j].iconUrl}`;
}
});
}
console.log(aa);
setKeepSystemName(aa);
console.log(resnew.data);
console.log(resnew.data, 'resnew.dataresnew.dataresnew.data');
setTableData(resnew.data);
} else {
notification.error({
message: '获取失败',
......@@ -406,6 +425,40 @@ const Integrate = () => {
});
};
// const getData = () => {
// setLoading(true);
// GetIntegratedLogin({ isHide: false }).then(resnew => {
// if (resnew.code === 0) {
// console.log(resnew.data);
// let aa = [];
// if (resnew.data.length > 0) {
// resnew.data.map((i, j) => {
// aa.push(i.SystemName);
// resnew.data[j].AccountParamKey = i.AccountParam[0].key;
// resnew.data[j].AccountParamValue = i.AccountParam[0].value;
// if (resnew.data[j].iconUrl && !resnew.data[j].iconUrl.includes('images')) {
// resnew.data[j].showUrl = getImg(resnew.data[j].iconUrl);
// } else {
// resnew.data[j].showUrl = `${window.location.origin}/${resnew.data[j].iconUrl}`;
// }
// });
// }
// console.log(aa);
// setKeepSystemName(aa);
// console.log(resnew.data);
// console.log(resnew.data, 'resnew.dataresnew.dataresnew.data');
// setTableData(resnew.data);
// } else {
// notification.error({
// message: '获取失败',
// description: resnew.msg,
// });
// }
// setLoading(false);
// });
// };
const handleReset = () => {
setSearchWord('');
setShowSearchStyle(false);
......
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