lzh
2025-06-24 13c4a636539584ab977fddacfae884b3ec250aee
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
ÿþjson = require("json")
mobox = require("OILua_JavelinExt")
m3 = require("oi_base_mobox")
 
function GenerateViewHTML(strLuaDEID)
    local nRet, strRetInfo
    local autoplay = false
    local strHtmlTitle = "";
    local strHtmlRow = "";
    --[[ ·ƒÖS7h_ ]]
    local strHtmlStyle = GetHtmlStyle();
    --[[    Rf ]]
    local tabTitleList = {"å]MO", "_8^áOo`"}
 
    --[[ Ä~Ç~R T ]]
    --[[ class Yt7h_ ÙÌ‘ Ä~bÿtable-col' .. i .. '    ÿ table-col1 ÿtable-col2 ÿtable-col3 ]]
    for i = 1, #tabTitleList do
        strHtmlTitle = strHtmlTitle .. '<div class="table-col' .. i .. '">' .. tabTitleList[i] .. '</div>'
    end
    -- ·ƒÖSgbLˆ-N„v\ONpenc
    local tabDataList = {}
    local packing_list,packing
    local condition = "S_STATION IN ('A','B') AND S_ERR_MSG IS NOT NULL AND S_ERR_MSG <> ''"
    nRet, packing_list = m3.QueryDataObject(strLuaDEID, "GT_PDA_Station", condition)
    if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "·ƒÖSå]MO_8^áOo`1Y%ÿ" .. packing_list) end
    lua.Debug( strLuaDEID, debug.getinfo(1), "#packing_list", #packing_list )
    if (#packing_list > 0) then
        -- ûm Rň±{å]USáOo`
        for i = 1, #packing_list do
            nRet,packing = m3.ObjAttrStrToLuaObj("GT_PDA_Station", lua.table2str(packing_list[i].attrs))
            if (nRet ~= 0) then lua.Error(strLuaDEID, debug.getinfo(1), "ObjAttrStrToLuaObj1Y%!"..packing) end
            -- if(packing.err_msg ~= '')then
                tabDataList[i] = {
                    station = packing.station,
                    msg = packing.err_msg
                }
            -- end
        end
    -- else
    end
 
    if (#tabDataList > 1) then
        autoplay = true
    end
 
    --[[ Ä~Ç~Lˆpenchtml ]]
    for i = 1, #tabDataList do
        strHtmlRow = strHtmlRow .. '<div class="swiper-slide"><div class="table-row-data">' ..
                         '<div class="table-col1">'..tabDataList[i].station .. '</div>' .. '<div class="table-col2">' ..
                         tabDataList[i].msg .. '</div>' .. '</div></div>'
    end
 
 
    --[[ ;`html ]]
    local strHtml = ' <div class="table92">' .. '<div class="table-head">' .. strHtmlTitle .. '</div>' ..
                        '<div class="table-body"  style="overflow: hidden;"> <div class="swiper-container ycxx1"><div class="swiper-wrapper">' ..
                        strHtmlRow .. '</div></div></div>' .. '</div>'
 
    local action = {}
    action[1] = {
        action_type = "chart",
        value = {
            graphicType = "html",
            title = {
                text = "_8^áOo`",
                align = "left",
                color = "#fff",
                font = "®_oÅ–Ñž",
                fontSize = 18
            },
            swiper = {
                --[[ ¹[hV Tðy Ný€Í‘ Y  Ný€:Nzz swiper-container class —‰cš[ ]]
                containerName = "ycxx1",
                --[[ :_6RSwiper„v½[¦^(px) ÿ"undefined" b  tepe ÿ S_`O„vSwiper(W–Ï…¶r` NRËYSöe(u—_
N0ُ*NÂSpeOOꁐ”^1YHe0ïS¾‹n:NundefinedOُ*NÂSpeàeHe0  ]]
                width = "undefined",
                --[[ :_6RSwiper„vؚ¦^(px) ÿS_`O„vSwiper(W–Ï…¶r` NRËYSöeNRbc¹eT:N‚WôvMb(u—_
N0ُ*NÂSpeOOꁐ”^1YHe0 ]]
                height = 'auto',
                --[[ ’cR¹eT  vertical  ÿ horizontal ]]
                direction = "vertical",
                --[[  Rbc¦^ ÿsSsliderꁨRÑn¨R_ËY0RÓ~_g„vöeô•ÿUSMOms    ÿ ]]
                speed = 2000,
                --[[  loop !j_‚YœgN slidesPerView: 'auto' NwO(u ÿ—‰¾‹n loopedSlides cš[‰ª_¯sÿ͑ Y    ÿ„v{^opGrpeϑ0 ]]
                loop = true,
                -- loopedSlides=10,
                --[[  ¾‹nslider¹[hVý€Y Töe>f:y„vslidespeϑ,tepebauto ]]
                 slidesPerView= 'auto',
                --[[  (WslideKNô•¾‹nݍ»yÿUSMOpx    ÿ0 ]]
                spaceBetween = 10,
                --[[  Øž¤‹Å`µQ NSwiper Ïk!kÑn¨RöeêSÑn¨RN*NSlide ÿv^NOꁨR4TWrapper0_/Tê1u!j_T ÿSwiper O9hncï`'`Ñn¨RïSý€ NbkN<hN NO4T0 ]]
                freeMode = false,
                --[[ ¾‹š[slideNæ]¹Fh„v„˜¾‹OPûyϑÿUSMOpx    ÿ0 ‚Wôv1\LˆN
N¹eݍ»y ]]
                slidesOffsetBefore = 10,
                --[[  ¾‹š[slideNóS¹Fh„v„˜¾‹OPûyϑÿUSMOpx    ÿ0 ‚Wôv1\LˆN N¹eݍ»y ]]
                slidesOffsetAfter = 10,
                --[[/f&TꁨR­d>e ÿtrue —‰cš[ autoplayDelay ]]
                autoplay = autoplay,
                --[[ ­d>eô•”–öeô• ÿUSMOms  ]]
                autoplayDelay = 100
            },
            html = strHtmlStyle .. strHtml
        }
    }
 
    -- Debug( strLuaDEID, debug.getinfo(1), "action! ", action )
 
    nRet, strRetInfo = mobox.setAction(strLuaDEID, json.encode(action))
    if (nRet ~= 0) then
        lua.Error(strLuaDEID, debug.getinfo(1), "setAction1Y%! " .. strRetInfo)
    end
end
 
function GetHtmlStyle()
    return
        '<style>' .. '.table92 {' .. '    border: 2px solid #fff;' .. '    width: 100%;' .. '    height: 100%;' .. '}' ..
            '.table92 .table-head {' .. '    border-bottom: 2px solid #fff;    color: #fff;' .. '}' .. '.table92 .table-head>div {' ..
            '    text-align: center;' .. '    display: inline-block;' .. '    padding: 5px 0px;' ..
            '    font-size: 17px;' .. '    font-weight: 600;' .. '}' .. '.table92 .table-head .table-col1 {' .. '    width: 10%;' ..
            '    border-right: 2px solid;' .. '}' .. '.table92 .table-head .table-col2 {' .. '    width: 90%;border-right: 2px solid;' ..
            '    border-right: 2px solid;' .. '}' ..
          
            '.table92 .table-body .table-row-data{    margin-top: 10px;    width: 100%;} .table92 .table-body .table-row-data>div {' ..
            '    text-align: center;' .. '    display: inline-block;' .. '    padding: 5px 0px;' .. '    color: #fff;' ..
            '}' .. '.table92 .table-row-data .table-col1 {' .. '    width: 10%;' .. '}' .. '.table92 .table-row-data .table-col1>div {' ..
            '    border-radius: 50px;' .. '    width: 92%;' .. '    display: inline-block;' .. '    padding: 5px 1px;' ..
            '    font-size: 12px;' .. '}' .. '.table92 .table-row-data .table-col2 {' .. '    width: 90%;' .. '}' ..
            '</style>'
end