--[[
|
编码: JX-800-06
|
名称: 总数
|
作者:SGX
|
日期:2025-1-29
|
|
函数: GenerateViewHTML
|
功能:
|
|
更改记录:
|
|
--]]
|
json = require("json")
|
mobox = require("OILua_JavelinExt")
|
m3 = require("oi_base_mobox")
|
|
function GenerateViewHTML(strLuaDEID)
|
local nRet, strRetInfo
|
--[[ 方块1 ]]
|
local strFKTitle1 = "年度入库总量";
|
local strFKData1 = "30000";
|
local strFKBack1 = "#8BC34A";
|
--[[ 方块2 ]]
|
local strFKTitle2 = "年度出库总量";
|
local strFKData2 = "25000";
|
local strFKBack2 = "#FF9800";
|
|
local strHtml = '<div class="table2" style="display: flex; margin: 82px 82px;">' ..
|
'<div style="width: 190px;height: 110px;background: ' .. strFKBack1 ..
|
';border-radius: 7px;padding: 10px;">' .. '<div style="color: #fff;font-size: 15px;">' ..
|
strFKTitle1 .. '</div>' ..
|
'<div style="font-size: 40px;margin: 2px 0px 0px 0px;text-align: center;color: #fff;">' ..
|
strFKData1 .. '</div>' .. '</div>' .. '<div style="margin-left: 59px;width: 190px;height: 110px;background: ' ..
|
strFKBack2 .. ';border-radius: 7px;padding: 10px;">' ..
|
'<div style=" color: #fff;font-size: 15px;">' .. strFKTitle2 .. '</div>' ..
|
'<div style="font-size: 40px;margin: 2px 0px 0px 0px;text-align: center;color: #fff;">' ..
|
strFKData2 .. '</div>' .. '</div>' .. '</div>'
|
local action = {}
|
action[1] = {
|
action_type = "chart",
|
value = {
|
graphicType = "html",
|
title = {
|
text = "总数",
|
align = "center",
|
color = "#000",
|
font = "微软雅黑",
|
fontSize = 16
|
},
|
html = strHtml
|
}
|
}
|
|
nRet, strRetInfo = mobox.setAction(strLuaDEID, lua.table2str(action))
|
if (nRet ~= 0) then
|
lua.Error(strLuaDEID, debug.getinfo(1), "setAction失败! " .. strRetInfo .. ' action = ' .. strAction)
|
end
|
end
|