parent
f380713718
commit
d8d5b3366e
Binary file not shown.
|
@ -48,8 +48,13 @@ public partial class IDIS_RegisterWeaver : FormWeaverResource
|
||||||
data.Handle = handleEdit.Text;
|
data.Handle = handleEdit.Text;
|
||||||
data.Format = field.Type;
|
data.Format = field.Type;
|
||||||
data.Name = field.Name;
|
data.Name = field.Name;
|
||||||
|
data.Value = field.DefaultValue;
|
||||||
|
|
||||||
valueEdit.TextChanged += x => data.Value = x;
|
//valueEdit.TextChanged += x => data.Value = x;
|
||||||
|
valueEdit.TextChanged += newValue =>
|
||||||
|
{
|
||||||
|
data.Value = string.IsNullOrEmpty(newValue) ? field.DefaultValue : newValue;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string GetContent()
|
public override string GetContent()
|
||||||
|
|
|
@ -119,7 +119,6 @@ public partial class IDIS_TemplateWeaver : FormWeaverResource
|
||||||
}
|
}
|
||||||
private void AddFields()
|
private void AddFields()
|
||||||
{
|
{
|
||||||
if (templateBuilder.CurrentTemplate is null) return;
|
|
||||||
var current = templateBuilder.CurrentTemplate.Fields.ToList();
|
var current = templateBuilder.CurrentTemplate.Fields.ToList();
|
||||||
current.Add(new IDIS_TemplateForm()
|
current.Add(new IDIS_TemplateForm()
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,9 +51,10 @@ public partial class IDIS_SearchService : Node
|
||||||
}
|
}
|
||||||
private void Search(string word)
|
private void Search(string word)
|
||||||
{
|
{
|
||||||
|
var rawHandle = word.Split('?').First();
|
||||||
MathNode.ClearChild(searchCandidateContainer);
|
MathNode.ClearChild(searchCandidateContainer);
|
||||||
if (service.Query(word, out IDIS_Query[] queries) is false) return;
|
if (service.Query(word, out IDIS_Query[] queries) is false) return;
|
||||||
if (queries.Length is 1 && queries.First().Handle == word)
|
if (queries.Length is 1 && queries.First().Handle == rawHandle)
|
||||||
{
|
{
|
||||||
QueryIDIS(queries.First());
|
QueryIDIS(queries.First());
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -150,9 +150,49 @@ public class IDIS_DBContext:DbContext
|
||||||
{
|
{
|
||||||
ChangeTracker.DetectChanges();
|
ChangeTracker.DetectChanges();
|
||||||
ChangeTracker.Clear();
|
ChangeTracker.Clear();
|
||||||
queries = Values
|
// queries = Values
|
||||||
.Where(x => x.Handle.Contains(key) || x.CreateUser.Contains(key))
|
// .Where(x => x.Handle.Contains(key) || x.CreateUser.Contains(key))
|
||||||
.Select(x => new IDIS_Query()
|
// .Select(x => new IDIS_Query()
|
||||||
|
// {
|
||||||
|
// Handle = x.Handle,
|
||||||
|
// CreateTime = x.CreateTime,
|
||||||
|
// UpdateTime = x.UpdateTime,
|
||||||
|
// CreateUser = x.CreateUser,
|
||||||
|
// Datas = Datas.Where(data => data.Handle == x.Handle).ToArray(),
|
||||||
|
// References = References.Where(reference => reference.Handle == x.Handle).ToArray()
|
||||||
|
// }).ToArray();
|
||||||
|
// return queries.Any();
|
||||||
|
var _data = Datas.ToList();
|
||||||
|
var _values = Values.ToList();
|
||||||
|
var handleKey = key.Split('?').First();
|
||||||
|
|
||||||
|
var _queries=_values.Where(x => x.Handle.Contains(handleKey) || (string.IsNullOrEmpty(x.CreateUser) is false && x.CreateUser.Contains(handleKey))).ToArray();
|
||||||
|
var searchEnties =new List<KeyValuePair<string, string>>();
|
||||||
|
if (_queries.Any() is false)
|
||||||
|
{
|
||||||
|
queries = Array.Empty<IDIS_Query>();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (key.Contains('?'))
|
||||||
|
{
|
||||||
|
var expression = key.Split("?", 2).Last();
|
||||||
|
foreach (var cmd in expression.Split("&").Where(x=>x.Contains('=')).Where(x=>x.Split('=').Length is 2)) {
|
||||||
|
var split = cmd.Split('=',2);
|
||||||
|
var name = split[0];
|
||||||
|
var value = split[1];
|
||||||
|
searchEnties.Add(new KeyValuePair<string, string>(name,value));
|
||||||
|
var validData = _data.Where(x => x.Name == name && x.Value == value);
|
||||||
|
if (_queries.Any())
|
||||||
|
{
|
||||||
|
validData = validData.Where(x=>_queries.Any(y=>y.Handle==x.Handle));
|
||||||
|
}
|
||||||
|
_queries=_values
|
||||||
|
.Select(x=>validData.Any(y=>x.Handle == y.Handle)?x:null)
|
||||||
|
.Where(x=>x!=null)
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queries = _queries.Select(x => new IDIS_Query()
|
||||||
{
|
{
|
||||||
Handle = x.Handle,
|
Handle = x.Handle,
|
||||||
CreateTime = x.CreateTime,
|
CreateTime = x.CreateTime,
|
||||||
|
@ -161,6 +201,16 @@ public class IDIS_DBContext:DbContext
|
||||||
Datas = Datas.Where(data => data.Handle == x.Handle).ToArray(),
|
Datas = Datas.Where(data => data.Handle == x.Handle).ToArray(),
|
||||||
References = References.Where(reference => reference.Handle == x.Handle).ToArray()
|
References = References.Where(reference => reference.Handle == x.Handle).ToArray()
|
||||||
}).ToArray();
|
}).ToArray();
|
||||||
|
if (searchEnties.Any())
|
||||||
|
{
|
||||||
|
var newQueries = new List<IDIS_Query>();
|
||||||
|
foreach (var query in queries)
|
||||||
|
{
|
||||||
|
query.Datas = query.Datas.Where(x=>searchEnties.Any(y=>y.Key==x.Name&&y.Value==x.Value)).ToArray();
|
||||||
|
newQueries.Add(query);
|
||||||
|
}
|
||||||
|
queries=newQueries.ToArray();
|
||||||
|
}
|
||||||
return queries.Any();
|
return queries.Any();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,7 @@ public partial class 温湿度Reader : Node
|
||||||
if (_modbus is null)
|
if (_modbus is null)
|
||||||
{
|
{
|
||||||
hintsLabel.SetTextAsync("Modbus未初始化");
|
hintsLabel.SetTextAsync("Modbus未初始化");
|
||||||
|
timer.Start();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ script = ExtResource("39_p2ycf")
|
||||||
[sub_resource type="Resource" id="Resource_l4b2n"]
|
[sub_resource type="Resource" id="Resource_l4b2n"]
|
||||||
script = ExtResource("41_48x07")
|
script = ExtResource("41_48x07")
|
||||||
templateResource = SubResource("Resource_0cbl3")
|
templateResource = SubResource("Resource_0cbl3")
|
||||||
addFieldsButtonPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/VBoxContainer3/add_field-button")
|
addFieldsButtonPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/VBoxContainer/ScrollContainer/VBoxContainer/add-button")
|
||||||
templateBuilderPath = NodePath("..")
|
templateBuilderPath = NodePath("..")
|
||||||
templateNameEditPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/VBoxContainer/ScrollContainer/VBoxContainer/TemelateName/MarginContainer/HBoxContainer/templateName-edit")
|
templateNameEditPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/VBoxContainer/ScrollContainer/VBoxContainer/TemelateName/MarginContainer/HBoxContainer/templateName-edit")
|
||||||
saveTemplateNameButtonPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/save_template-button")
|
saveTemplateNameButtonPath = NodePath("../../Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器/HBoxContainer/标识模板-body/save_template-button")
|
||||||
|
@ -1303,7 +1303,6 @@ text = "等待更新中"
|
||||||
fit_content = true
|
fit_content = true
|
||||||
|
|
||||||
[node name="标识模板生成器" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer"]
|
[node name="标识模板生成器" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer"]
|
||||||
visible = false
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="标题栏Template" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器" instance=ExtResource("13_7vm0l")]
|
[node name="标题栏Template" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板生成器" instance=ExtResource("13_7vm0l")]
|
||||||
|
@ -1473,6 +1472,7 @@ layout_mode = 2
|
||||||
text = "保存"
|
text = "保存"
|
||||||
|
|
||||||
[node name="标识模板注册器" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer"]
|
[node name="标识模板注册器" type="VBoxContainer" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer"]
|
||||||
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="标题栏Template" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板注册器" instance=ExtResource("13_7vm0l")]
|
[node name="标题栏Template" parent="Layout/UX Window Service/Horizontal Layout/内容/MarginContainer/标识模板注册器" instance=ExtResource("13_7vm0l")]
|
||||||
|
|
|
@ -93,6 +93,11 @@
|
||||||
- [ ] 给出错误提示和原因
|
- [ ] 给出错误提示和原因
|
||||||
## 更改记录
|
## 更改记录
|
||||||
### 新增issue date:2023年7月18日
|
### 新增issue date:2023年7月18日
|
||||||
|
- [ ] `标识解析`添加模拟搜索,可以通知搜索值来筛选和过滤标识与标识值
|
||||||
|
|
||||||
|
- [ ] `检测软件` 添加异常时的值
|
||||||
|
- [ ] `监测软件` 异常时需要给出明显的提示
|
||||||
|
|
||||||
- [ ] `动画`添加基于`标识节点`连线的标识解析动画
|
- [ ] `动画`添加基于`标识节点`连线的标识解析动画
|
||||||
- [x] `引导`编辑标识模板名称后,需要点击保存
|
- [x] `引导`编辑标识模板名称后,需要点击保存
|
||||||
- [x] `引导`强调在`标识注册`中需要点击刷新按钮
|
- [x] `引导`强调在`标识注册`中需要点击刷新按钮
|
||||||
|
|
Loading…
Reference in New Issue