ps-toolkit-ui 1.8.10 → 1.8.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2875,17 +2875,19 @@
2875
2875
  var _loop_3 = function (r) {
2876
2876
  if (r.table) {
2877
2877
  var options = JSON.parse(JSON.stringify(_this.row.Options));
2878
- console.log(_this.table.permissions);
2879
2878
  console.log(options);
2880
2879
  console.log(option);
2881
- console.log(options.filter(function (x) { return x.ParentId === option.Id; }));
2880
+ console.log(r);
2881
+ var rowOption_1 = options.find(function (x) { return x.ParentId === option.Id && x.Action === r.name; });
2882
+ console.log(options.filter(function (x) { return x.ParentId === rowOption_1.Id; }));
2882
2883
  var p = new PermissionClass();
2883
2884
  p.RelatedId = _this.row.Data.Id;
2884
2885
  p.Area = _this.table.permissions.Area;
2885
2886
  p.Controller = option.Controller;
2886
2887
  p.Action = r.name;
2887
- p.Accesses = options.filter(function (x) { return x.ParentId === option.Id; });
2888
+ p.Accesses = options.filter(function (x) { return x.ParentId === rowOption_1.Id; });
2888
2889
  p.Accesses.forEach(function (x) { return x.Url = x.Url.replace('{action}', r.name.toLowerCase()); });
2890
+ console.log(p);
2889
2891
  r.table.permissions = p;
2890
2892
  if (r.table.form) {
2891
2893
  r.table.form.url = option.Url + 'insert';