|
@@ -168,8 +168,6 @@ export const formSchema: FormSchema[] = [
|
|
|
return !values.appId;
|
|
|
},
|
|
|
dynamicRules: ({ values, model }) => {
|
|
|
- console.log('values:', values);
|
|
|
-
|
|
|
return [
|
|
|
{
|
|
|
required: true,
|
|
@@ -179,12 +177,10 @@ export const formSchema: FormSchema[] = [
|
|
|
}
|
|
|
|
|
|
if (values) {
|
|
|
- // console.log('values:', values.appId);
|
|
|
- // if (!values.appId) {
|
|
|
- // return Promise.reject('请先选择应用');
|
|
|
- // }
|
|
|
+
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- isRoleExist({ id: model.id, roleCode: value, appId: model.appId })
|
|
|
+ const appId = Array.isArray(model.appId) ? model.appId[0] : model.appId;
|
|
|
+ isRoleExist({ id: model.id, roleCode: value, appId:appId })
|
|
|
.then((res) => {
|
|
|
res.success ? resolve() : reject(res.message || '校验失败');
|
|
|
})
|