1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import dxui from "../../../../dxmodules/dxUi.js";
import viewUtils from "../../viewUtils.js";
import topView from "../../topView.js";
import configView from "../configView.js";
import i18n from "../../i18n.js";
import screen from "../../../screen.js";
const factoryTestView = {};
factoryTestView.init = function () {
    /**************************************************创建屏幕*****************************************************/
    const screenMain = dxui.View.build("factoryTestView", dxui.Utils.LAYER.MAIN);
    factoryTestView.screenMain = screenMain;
    screenMain.scroll(false);
    screenMain.bgColor(0xffffff);
    screenMain.on(dxui.Utils.ENUM.LV_EVENT_SCREEN_LOADED, () => {
        topView.changeTheme(true);
    });
 
    const titleBox = viewUtils.title(
        screenMain,
        configView.screenMain,
        "factoryTestViewTitle",
        "factoryTestView.title"
    );
    titleBox.align(dxui.Utils.ALIGN.TOP_MID, 0, 70);
 
    const factoryTestBox = dxui.View.build("factoryTestBox", screenMain);
    viewUtils._clearStyle(factoryTestBox);
    factoryTestBox.setSize(
        screen.screenSize.width,
        screen.screenSize.height - 140
    );
    factoryTestBox.align(dxui.Utils.ALIGN.TOP_MID, 0, 140);
    factoryTestBox.bgColor(0xf7f7f7);
    factoryTestBox.flexFlow(dxui.Utils.FLEX_FLOW.ROW_WRAP);
    factoryTestBox.flexAlign(
        dxui.Utils.FLEX_ALIGN.CENTER,
        dxui.Utils.FLEX_ALIGN.START,
        dxui.Utils.FLEX_ALIGN.START
    );
    factoryTestBox.obj.lvObjSetStylePadGap(
        10,
        dxui.Utils.ENUM._LV_STYLE_STATE_CMP_SAME
    );
    factoryTestBox.padTop(10);
    factoryTestBox.padBottom(10);
 
    const calibrationBox = dxui.View.build("calibrationBox", factoryTestBox);
    viewUtils._clearStyle(calibrationBox);
    // calibrationBox.align(dxui.Utils.ALIGN.TOP_MID, 0, 150);
    calibrationBox.setSize(560, 76);
    // calibrationBox.bgColor(0xf7f7f7);
    calibrationBox.bgColor(0xffffff);
    calibrationBox.radius(10);
    calibrationBox.on(dxui.Utils.ENUM.LV_EVENT_PRESSED, () => {
        calibrationBox.bgColor(0xeaeaea);
    });
    calibrationBox.on(dxui.Utils.ENUM.LV_EVENT_RELEASED, () => {
        calibrationBox.bgColor(0xffffff);
    });
 
    const titleLbl = dxui.Label.build("calibrationBox" + "Label", calibrationBox);
    titleLbl.dataI18n = "factoryTestView.calibration";
    titleLbl.align(dxui.Utils.ALIGN.LEFT_MID, 20, 0);
    titleLbl.textFont(viewUtils.font(26));
 
    const image = dxui.Image.build(calibrationBox.id + "Image", calibrationBox);
    image.align(dxui.Utils.ALIGN.RIGHT_MID, -15, 0);
    image.source("/app/code/resource/image/right.png");
 
    calibrationBox.on(dxui.Utils.EVENT.CLICK, () => {
        // dxui.loadMain(item.view.screenMain);
        console.log(123);
        
    });
};
 
export default factoryTestView;