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

fix: '权限配置关联站点允许为空'

parent 3e068430
Pipeline #82587 passed with stages
...@@ -165,28 +165,27 @@ const VectorData = props => { ...@@ -165,28 +165,27 @@ const VectorData = props => {
const onPushSubmit = value => { const onPushSubmit = value => {
console.log(value, 'value'); console.log(value, 'value');
setAddVisible(false); setAddVisible(false);
if (value.length) {
let query = { let query = {
schemename: record.schemename, schemename: record.schemename,
terminalType: record.isStatus, terminalType: record.isStatus,
isBaseMap: false, isBaseMap: false,
jsonCfg: JSON.stringify({ jsonCfg: JSON.stringify({
roles: value.join(','), roles: value.join(','),
}), }),
}; };
SetServiceConfig(query) SetServiceConfig(query)
.then(res => { .then(res => {
if (res.code == '0') { if (res.code == '0') {
prompt('success', '关联角色成功'); prompt('success', '关联角色成功');
setFlag(flag + 1); setFlag(flag + 1);
} else { } else {
prompt('fail', '关联角色失败'); prompt('fail', '关联角色失败');
} }
}) })
.catch(err => { .catch(err => {
prompt('fail', '网络请求失败'); prompt('fail', '网络请求失败');
}); });
}
}; };
const rolCallBack = useCallback(list => { const rolCallBack = useCallback(list => {
let strList = []; let strList = [];
......
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