提交 187776ab 编写于 作者: W wq1234wq

前端修改,挂载类型,复制失败修正

上级 367611dd
......@@ -195,10 +195,14 @@ export class CustomerlistComponent implements OnInit {
delete(id: string) {
this.http.delete('api/Customers/' + id, {}).subscribe(
() => {
next => {
this.msg.info('用户已删除')
this.getData();
},
() => {},
error => {
this.msg.warning('用户删除失败')
},
() => {},
);
}
......
......@@ -65,7 +65,11 @@ export class UserlistComponent implements OnInit {
},
{
acl: 10,
text: '删除',
text: '删除',pop: {
title: '确认删除用户?',
okType: 'danger',
icon: 'warning',
},
click: (item: any) => {
this.delete(item.id);
},
......@@ -131,12 +135,17 @@ export class UserlistComponent implements OnInit {
reset() {}
delete(id: string) {
this.http.delete('/api/Tenants/' + id, {}).subscribe(
() => {
this.msg.info('户已删除');
this.http.delete('api/Account/' + id, {}).subscribe(
next => {
this.msg.info('户已删除');
this.getData();
},
() => {},
error=> {
this.msg.warning('用户删除失败');
this.getData();
},
() => {},
);
}
......
......@@ -193,11 +193,14 @@ namespace IoTSharp.Controllers
newrule.ExecutableCode = rule.ExecutableCode;
newrule.RuleDesc = flowRule.RuleDesc;
newrule.RuleStatus = 1;
newrule.MountType = flowRule.MountType;
newrule.MountType = rule.MountType;
newrule.ParentRuleId = rule.RuleId;
newrule.CreateId = new Guid();
newrule.SubVersion = rule.SubVersion + 0.01;
newrule.Runner = rule.Runner;
newrule.Customer = await _context.Customer.SingleOrDefaultAsync(c => c.Id == profile.Comstomer);
newrule.Tenant = await _context.Tenant.SingleOrDefaultAsync(c => c.Id == profile.Tenant);
newrule.Creator = profile.Id.ToString();
_context.FlowRules.Add(newrule);
await _context.SaveChangesAsync();
......
......@@ -107,7 +107,7 @@ namespace IoTSharp.Handlers
{
obj.TryAdd(kv.Key, kv.Value);
});
await RunRules(msg.DeviceId, obj, MountType.Telemetry);
await RunRules(msg.DeviceId, obj, MountType.Attribute);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册