fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean
This commit is contained in:
@@ -46,7 +46,7 @@ type MainForm struct {
|
||||
rbInch *vcl.TRadioButton
|
||||
autoStartChk *vcl.TCheckBox
|
||||
|
||||
// 模�B:工�信�
|
||||
// 模块B:工单信息
|
||||
workOrderNoLabel *vcl.TLabel
|
||||
workOrderNoEdit *vcl.TEdit
|
||||
queryBtn *vcl.TButton
|
||||
@@ -59,11 +59,11 @@ type MainForm struct {
|
||||
timeLabel *vcl.TLabel
|
||||
timeValue *vcl.TLabel
|
||||
|
||||
// 模�C:仪表盘显示�
|
||||
// 模块C:仪表盘显示区
|
||||
rows []itemRow
|
||||
currentType string
|
||||
|
||||
// 模�D:�作与数��
|
||||
// 模块D:操作与数据区
|
||||
bottomLabel *vcl.TLabel
|
||||
workpieceNoEdit *vcl.TEdit
|
||||
filterBtn *vcl.TButton
|
||||
@@ -72,7 +72,7 @@ type MainForm struct {
|
||||
submitBtn *vcl.TButton
|
||||
histView *vcl.TListView
|
||||
|
||||
// 定时�
|
||||
// 定时器
|
||||
reconnT *vcl.TTimer
|
||||
|
||||
// 当前工单信息
|
||||
@@ -101,15 +101,15 @@ const (
|
||||
topRowH int32 = 44
|
||||
)
|
||||
|
||||
var squareItemDefs = []string{"�弧��径 B"}
|
||||
var circleItemDefs = []string{"���直径 A", "���轮廓�B", "����置 C"}
|
||||
var squareItemDefs = []string{"① 弧面半径 B"}
|
||||
var circleItemDefs = []string{"① 球面直径 A", "② 球面轮廓度 B", "③ 球面位置 C"}
|
||||
|
||||
func (f *MainForm) OnFormCreate(sender vcl.IObject) {
|
||||
f.cfg = injectedCfg
|
||||
f.apiClient = api.NewClient(f.cfg.APIURL)
|
||||
f.collector = app.NewCollector(squareItemDefs)
|
||||
|
||||
f.SetCaption("7315-2 �分尺采�)
|
||||
f.SetCaption("7315-2 千分尺采集")
|
||||
f.SetWidth(1280)
|
||||
f.SetHeight(720)
|
||||
f.SetPosition(types.PoScreenCenter)
|
||||
@@ -207,7 +207,7 @@ func (f *MainForm) initModuleA() {
|
||||
f.autoStartChk.SetParent(f)
|
||||
f.autoStartChk.SetLeft(740)
|
||||
f.autoStartChk.SetTop(12)
|
||||
f.autoStartChk.SetCaption("开机��)
|
||||
f.autoStartChk.SetCaption("开机启动")
|
||||
f.autoStartChk.Font().SetSize(14)
|
||||
f.autoStartChk.SetChecked(autostart.IsEnabled(injectedAppName))
|
||||
f.autoStartChk.SetOnClick(f.onAutoStartToggle)
|
||||
@@ -218,7 +218,7 @@ func (f *MainForm) initModuleB() {
|
||||
f.workOrderNoLabel.SetParent(f)
|
||||
f.workOrderNoLabel.SetLeft(16)
|
||||
f.workOrderNoLabel.SetTop(60)
|
||||
f.workOrderNoLabel.SetCaption("工��")
|
||||
f.workOrderNoLabel.SetCaption("工单号:")
|
||||
f.workOrderNoLabel.Font().SetSize(16)
|
||||
|
||||
f.workOrderNoEdit = vcl.NewEdit(f)
|
||||
@@ -278,7 +278,7 @@ func (f *MainForm) initModuleB() {
|
||||
f.statusLabel2.SetParent(f)
|
||||
f.statusLabel2.SetLeft(868)
|
||||
f.statusLabel2.SetTop(60)
|
||||
f.statusLabel2.SetCaption("状�")
|
||||
f.statusLabel2.SetCaption("状态:")
|
||||
f.statusLabel2.Font().SetSize(14)
|
||||
|
||||
f.statusValue = vcl.NewLabel(f)
|
||||
@@ -377,7 +377,7 @@ func (f *MainForm) initModuleC(workpieceType string) {
|
||||
func (f *MainForm) initModuleD() {
|
||||
f.bottomLabel = vcl.NewLabel(f)
|
||||
f.bottomLabel.SetParent(f)
|
||||
f.bottomLabel.SetCaption("�列� - 末帧: -")
|
||||
f.bottomLabel.SetCaption("序列号: - 末帧: -")
|
||||
f.bottomLabel.Font().SetSize(12)
|
||||
|
||||
f.workpieceNoEdit = vcl.NewEdit(f)
|
||||
@@ -440,13 +440,13 @@ func (f *MainForm) refreshHistoryColumns() {
|
||||
}
|
||||
|
||||
if f.currentType == "circle" {
|
||||
cols := []string{"时间", "工��, "工件�, "分类", "��直径 A", "��轮廓�B", "���置 C"}
|
||||
cols := []string{"时间", "工单号", "工件号", "分类", "球面直径 A", "球面轮廓度 B", "球面位置 C"}
|
||||
for _, c := range cols {
|
||||
col := f.histView.Columns().Add()
|
||||
col.SetCaption(c)
|
||||
}
|
||||
} else {
|
||||
cols := []string{"时间", "工��, "工件�, "分类", "弧��径 B"}
|
||||
cols := []string{"时间", "工单号", "工件号", "分类", "弧面半径 B"}
|
||||
for _, c := range cols {
|
||||
col := f.histView.Columns().Add()
|
||||
col.SetCaption(c)
|
||||
@@ -478,12 +478,12 @@ func (f *MainForm) onUnitChange(sender vcl.IObject) {
|
||||
func (f *MainForm) onAutoStartToggle(sender vcl.IObject) {
|
||||
if f.autoStartChk.Checked() {
|
||||
if err := autostart.Enable(injectedAppName); err != nil {
|
||||
vcl.ShowMessage("设置开机�动失� " + err.Error())
|
||||
vcl.ShowMessage("设置开机启动失败: " + err.Error())
|
||||
f.autoStartChk.SetChecked(false)
|
||||
}
|
||||
} else {
|
||||
if err := autostart.Disable(injectedAppName); err != nil {
|
||||
vcl.ShowMessage("�消开机�动失� " + err.Error())
|
||||
vcl.ShowMessage("取消开机启动失败: " + err.Error())
|
||||
f.autoStartChk.SetChecked(true)
|
||||
}
|
||||
}
|
||||
@@ -598,7 +598,7 @@ func formatTime(s string) string {
|
||||
func (f *MainForm) onExport(sender vcl.IObject) {
|
||||
items := f.histView.Items()
|
||||
if items.Count() == 0 {
|
||||
vcl.ShowMessage("没有数��导�)
|
||||
vcl.ShowMessage("没有数据可导出")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -612,9 +612,9 @@ func (f *MainForm) onExport(sender vcl.IObject) {
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
header := "时间,工��工件�分类"
|
||||
header := "时间,工单号,工件号,分类"
|
||||
if f.currentType == "circle" {
|
||||
header += ",��直径 A,��轮廓�B,���置 C"
|
||||
header += ",球面直径 A,球面轮廓度 B,球面位置 C"
|
||||
} else {
|
||||
header += ",弧面半径 B"
|
||||
}
|
||||
@@ -691,7 +691,7 @@ func (f *MainForm) onClear(sender vcl.IObject) {
|
||||
func (f *MainForm) onSubmit(sender vcl.IObject) {
|
||||
workOrderNo := f.workOrderNoEdit.Text()
|
||||
if workOrderNo == "" {
|
||||
vcl.ShowMessage("请先输入工��)
|
||||
vcl.ShowMessage("请先输入工单号")
|
||||
return
|
||||
}
|
||||
if f.currentWorkOrder == nil {
|
||||
@@ -706,7 +706,7 @@ func (f *MainForm) onSubmit(sender vcl.IObject) {
|
||||
}
|
||||
|
||||
if !f.collector.AllFilled() {
|
||||
vcl.ShowMessage("请完�所有测�)
|
||||
vcl.ShowMessage("请完成所有测量")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -866,9 +866,9 @@ func (f *MainForm) refreshRows() {
|
||||
}
|
||||
sn, seq := f.collector.Serial()
|
||||
if sn == 0 {
|
||||
f.bottomLabel.SetCaption("�列� - 末帧: -")
|
||||
f.bottomLabel.SetCaption("序列号: - 末帧: -")
|
||||
} else {
|
||||
f.bottomLabel.SetCaption(fmt.Sprintf("�列� %d 末帧 seq=%d %s",
|
||||
f.bottomLabel.SetCaption(fmt.Sprintf("序列号: %d 末帧 seq=%d %s",
|
||||
sn, seq, time.Now().Format("15:04:05")))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user