孕吐严重是什么原因| 切洋葱为什么会流泪| 白带什么样| 乳腺增生是什么意思| 什么茶叶降血压最好| 属猪适合佩戴什么饰品| 211大学是什么意思| 9月8号是什么星座| 脚气是什么样的图片| 类风湿吃什么药好| 类风湿因子高是什么原因| 贞操锁是什么| rds医学上什么意思| 10月11是什么星座| 割礼是什么| 火加同念什么| 媒婆是什么意思| 肚脐眼周围疼吃什么药| b超是查什么的| 仗剑走天涯什么意思| 局灶癌变是什么意思| 眼睛干涩发痒用什么药| allin什么意思| 龟头炎用什么软膏| 为什么拔罐肩膀最黑| 喉咙痛不能吃什么东西| 不成敬意是什么意思| 咖啡渣子有什么用途| 倾尽所有什么意思| 婚姻是爱情的坟墓是什么意思| 脑梗有什么症状| 再三的意思是什么| 一生一世是什么生肖| 打磨工为什么没人干| 字号是什么意思| 什么叫做绝对值| 为什么会有床虱| 小孩几天不大便是什么原因怎么办| 杨梅不能和什么一起吃| 什么症状要查心肌酶| 藩台是什么官| 冠状动脉ct检查什么| 氯化钾主治什么病| 管医院的是什么部门| 什么的树丛| 每日家情思睡昏昏什么意思| 皮赘用什么药膏去除| 缺钾吃什么水果| usim卡是什么卡| 能戒烟的男人什么性格| 什么病不能吃茄子| h型高血压是什么意思| 吃什么水果对身体好| 早上9点半是什么时辰| 右束支传导阻滞是什么意思| 婴儿什么时候开始说话| 一什么黑板| 路由器坏了有什么症状| crab是什么意思| 乙肝45阳性什么意思| 尿路感染为什么会尿血| 吃什么能降低尿蛋白| 上火喉咙痛吃什么药| 肺肿瘤吃什么好| 党什么时候成立| 小孩摇头是什么原因| esd是什么| 新五行属什么| 冬瓜什么时候成熟| 冷冻液是什么| max是什么意思| 为什么男怕招风耳| 什么情况要打破伤风| 荷花是什么季节开放的| 拉肚子是什么原因引起的怎么办| 啄木鸟为什么不会脑震荡| 黄色五行属什么| 传教士是什么意思| 969368是什么电话| 老人手抖是什么原因| 前列腺增生是什么意思| 女人出黄汗是什么原因| 宫颈管搔刮术是什么| 刮宫是什么| 嗓子有黄痰是什么原因| 血小板低是什么意思| 胆囊炎吃什么中成药| 老花镜是什么镜| 为什么会手抖| 大学院长是什么级别| 5月5是什么星座| 分贝是什么意思| 三本是什么学历| 小孩晚上睡觉磨牙是什么原因| 泾渭分明是什么意思| 969368是什么电话| 淋巴细胞高是什么意思| wa是什么意思| 皮肤感染吃什么消炎药| 甲鱼和什么不能一起吃| 当兵有什么好处| 可甜可盐什么意思| 鼻子旁边的痣代表什么| 摸头是什么意思| 大骨头炖什么好吃| 眼屎多什么原因| 小孩抵抗力差吃什么提高免疫力| 跑步机cal是什么意思| 摸不到心跳是什么情况| 安乃近是什么药| 2000年出生属什么| 三国演义是什么朝代| 1310是什么意思| 牙疼吃什么药止疼最快| 脚底发烫是什么原因| 老实是什么意思| 上海居住证积分有什么用| 在什么情况下需要做肠镜| omega是什么牌子的手表| 女人长期做俯卧撑有什么效果| 彩宝是什么| 晚上夜尿多是什么原因| 汕头有什么好玩的地方| 求人办事送什么礼物好| 什么是扬州瘦马| 58什么意思| art是什么| 梦到手机丢了什么预兆| 波涛澎湃是什么意思| 枸杞子泡茶喝有什么好处| 汗味酸臭是什么原因| 怀不上孕做什么检查| 医院点痣挂什么科| 什么是超纤皮| 红薯叶不能和什么一起吃| 燕麦片热量高为什么还能减肥| omega是什么牌子的手表| 上海市长什么级别| 吃东西就打嗝是什么原因| 祸不单行是什么意思| 日加立念什么字| 前位子宫和后位子宫有什么区别| 宝宝积食吃什么药| 七月二十号是什么星座| 梦见蘑菇是什么预兆| 粘膜慢性炎是什么病| 一元硬币是什么材质| 奢靡是什么意思| 嫂嫂是什么意思| 嘴唇干燥是什么原因引起的| 个性是什么意思| 梦见牙齿掉光了是什么征兆| 小孩吃什么可以长高| 指疣是什么病| 尿道口流脓什么病| 肌肉酸痛是什么原因| 母亲ab型父亲o型孩子什么血型| 淋巴细胞减少说明什么| 磷是什么| 阴虱是什么原因引起的| 每天喝牛奶有什么好处| 鼻塞流清鼻涕吃什么药| 0点是什么时辰| 孕酮低吃什么补得快| 孔子姓什么名什么| 机警是什么意思| 重庆市长是什么级别| 不停的打嗝是什么原因| 青岛啤酒节是什么时候| 阿米巴是什么意思| 大脚骨疼是什么原因| 广州属于什么气候| 狗狗咳嗽吃什么药好得快| 阑尾炎手术后吃什么好| 新疆人是什么人种| 什么叫高血脂| 药品经营与管理学什么| 鼻子老流鼻涕是什么原因引起| 暂住证办理需要什么材料| 寒咳嗽吃什么药止咳效果好| 胎儿右侧脉络丛囊肿是什么意思| 乙酉是什么意思| 备考是什么意思| 意见是什么意思| 男士补肾吃什么| 阴唇是什么颜色| 梦见红薯是什么意思| 脚冰凉吃什么药| 铁扇公主是什么妖精| 两颗星是什么军衔| 腹泻是什么原因引起的| 干咳吃什么食物好| 肝火旺会出现什么症状| 心脏支架和搭桥有什么区别| 烂苹果气味的是什么病| 等边三角形又叫什么三角形| 屋上土是什么意思| 仙人跳什么意思| 七月四号是什么星座| 打板是什么意思| 脾围是什么意思| 风声鹤唳什么意思| gap什么意思| 针眼是什么样子的图片| 山东人为什么那么高| 时柱亡神是什么意思| 一天什么时候最热| 猪血炒什么好吃| 碱是什么| 一元硬币是什么材质| 雌二醇测定是什么检查| 台阶是什么意思| 五月26日是什么星座| 2003年属什么| 里正相当于现在什么官| 男人断眉代表什么| 属羊的跟什么属相犯冲| 桦树茸有什么作用| 扑朔迷离什么意思| 不明原因腹痛挂什么科| 恩惠是什么意思| 哥字五行属什么| 眼睛无神呆滞什么原因| 孙武和孙膑是什么关系| 山竹有什么功效和作用| 保释金是什么意思| 宇五行属性是什么| 5.11什么星座| 清一色是什么意思| 西安有什么好吃的特产| 吹空调流鼻涕吃什么药| 胰岛素抵抗有什么症状| 健康管理是干什么的| 酒后第二天吃什么| fabric是什么面料| 医保报销需要什么材料| 6月24日什么星座| 上腹疼是什么原因| 水加人念什么| 教导是什么意思| 神机妙算是什么生肖| 1.7号是什么星座| 辅酶q10什么时候吃| 半夏微凉是什么意思| reading是什么意思| 淋巴结反应性增生是什么意思| 9月25是什么星座| 幽门螺旋杆菌阳性吃什么药| 胃疼吃什么止痛药| 从未是什么意思| 1994属什么生肖| ivory是什么意思| 男女接吻有什么好处| 海鲜中毒有什么反应| 猛犸象什么时候灭绝的| 的确良是什么面料| 小孩抽多动症吃什么药最好| 为什么会肚子疼| 银消病用什么药效果最好| 手心为什么老出汗| 印劫是什么意思| vd是什么| 女人喝什么调节内分泌| 彼岸花什么时候开花| 百度Jump to content

省水利厅副巡视员游祖勇到连城检查水利项目建设工作

From Wikipedia
百度 人民币国际化或是降杠杆有效办法从实际操作来看,李伏安认为,公开地方政府和企业债务数据或许是降杠杆的一个有效方法。

Documentation for this module may be created at Module:Infobox/doc

--
-- This module implements {{Infobox}}
--
 
local p = {}
 
local HtmlBuilder = require('Module:HtmlBuilder')
 
local args = {}
local origArgs
local root
 
local function union(t1, t2)
    -- Returns the union of the values of two tables, as a sequence.
    local vals = {}
    for k, v in pairs(t1) do
        vals[v] = true
    end
    for k, v in pairs(t2) do
        vals[v] = true
    end
    local ret = {}
    for k, v in pairs(vals) do
        table.insert(ret, k)
    end
    return ret
end

local function getArgNums(prefix)
    -- Returns a table containing the numbers of the arguments that exist
    -- for the specified prefix. For example, if the prefix was 'data', and
    -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.
    local nums = {}
    for k, v in pairs(args) do
        local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')
        if num then table.insert(nums, tonumber(num)) end
    end
    table.sort(nums)
    return nums
end

local function addRow(rowArgs)
    -- Adds a row to the infobox, with either a header cell
    -- or a label/data cell combination.
    if rowArgs.header then
        root
            .tag('tr')
                .addClass(rowArgs.rowclass)
                .attr('id', rowArgs.rowid)
                .tag('th')
                    .attr('colspan', 2)
                    .attr('id', rowArgs.headerid)
                    .addClass(rowArgs.class)
                    .addClass(args.headerclass)
                    .css('text-align', 'center')
                    .cssText(args.headerstyle)
                    .wikitext(rowArgs.header)
    elseif rowArgs.data then
        local row = root.tag('tr')
        row.addClass(rowArgs.rowclass)
        row.attr('id', rowArgs.rowid)
        if rowArgs.label then
            row
                .tag('th')
                    .attr('scope', 'row')
                    .attr('id', rowArgs.labelid)
                    .css('text-align', 'left')
                    .cssText(args.labelstyle)
                    .wikitext(rowArgs.label)
                    .done()
        end
        
        local dataCell = row.tag('td')
        if not rowArgs.label then 
            dataCell
                .attr('colspan', 2)
                .css('text-align', 'center') 
        end
        dataCell
            .attr('id', rowArgs.dataid)
            .addClass(rowArgs.class)
            .cssText(rowArgs.datastyle)
            .newline()
            .wikitext(rowArgs.data)
    end
end

local function renderTitle()
    if not args.title then return end

    root
        .tag('caption')
            .addClass(args.titleclass)
            .cssText(args.titlestyle)
            .wikitext(args.title)
end

local function renderAboveRow()
    if not args.above then return end
    
    root
        .tag('tr')
            .tag('th')
                .attr('colspan', 2)
                .addClass(args.aboveclass)
                .css('text-align', 'center')
                .css('font-size', '125%')
                .css('font-weight', 'bold')
                .cssText(args.abovestyle)
                .wikitext(args.above)
end

local function renderBelowRow()
    if not args.below then return end
    
    root
        .tag('tr')
            .tag('td')
                .attr('colspan', '2')
                .addClass(args.belowclass)
                .css('text-align', 'center')
                .cssText(args.belowstyle)
                .newline()
                .wikitext(args.below)
end

local function renderSubheaders()
    if args.subheader then
        args.subheader1 = args.subheader
    end
    if args.subheaderrowclass then
        args.subheaderrowclass1 = args.subheaderrowclass
    end
    local subheadernums = getArgNums('subheader')
    for k, num in ipairs(subheadernums) do
        addRow({
            data = args['subheader' .. tostring(num)],
            datastyle = args.subheaderstyle or args['subheaderstyle' .. tostring(num)],
            class = args.subheaderclass,
            rowclass = args['subheaderrowclass' .. tostring(num)]
        })
    end
end

local function renderImages()
    if args.image then
        args.image1 = args.image
    end
    if args.caption then
        args.caption1 = args.caption
    end
    local imagenums = getArgNums('image')
    for k, num in ipairs(imagenums) do
        local caption = args['caption' .. tostring(num)]
        local data = HtmlBuilder.create().wikitext(args['image' .. tostring(num)])
        if caption then
            data
                .tag('div')
                    .cssText(args.captionstyle)
                    .wikitext(caption)
        end
        addRow({
            data = tostring(data),
            datastyle = args.imagestyle,
            class = args.imageclass,
            rowclass = args['imagerowclass' .. tostring(num)]
        })
    end
end

local function renderRows()
    -- Gets the union of the header and data argument numbers,
    -- and renders them all in order using addRow.
    local rownums = union(getArgNums('header'), getArgNums('data'))
    table.sort(rownums)
    for k, num in ipairs(rownums) do
        addRow({
            header = args['header' .. tostring(num)],
            label = args['label' .. tostring(num)],
            data = args['data' .. tostring(num)],
            datastyle = args.datastyle,
            class = args['class' .. tostring(num)],
            rowclass = args['rowclass' .. tostring(num)],
            dataid = args['dataid' .. tostring(num)],
            labelid = args['labelid' .. tostring(num)],
            headerid = args['headerid' .. tostring(num)],
            rowid = args['rowid' .. tostring(num)]
        })
    end
end

local function renderNavBar()
    if not args.name then return end
    
    root
        .tag('tr')
            .tag('td')
                .attr('colspan', '2')
                .css('text-align', 'right')
                .wikitext(mw.getCurrentFrame():expandTemplate({ 
                    title = 'navbar', 
                    args = { args.name, mini = 1 }
                }))
end

local function renderItalicTitle()
    local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])
    if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
        root.wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))
    end
end

local function renderTrackingCategories()
    if args.decat ~= 'yes' then
        if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then
            root.wikitext('[[Category:Articles which use infobox templates with no data rows]]')
        end
        if args.child == 'yes' and args.title then
            root.wikitext('[[Category:Articles which use embedded infobox templates with the title parameter]]')
        end
    end
end

local function _infobox()
    -- Specify the overall layout of the infobox, with special settings
    -- if the infobox is used as a 'child' inside another infobox.
    if args.child ~= 'yes' then
        root = HtmlBuilder.create('table')
        
        root
            .addClass('infobox')
            .addClass(args.bodyclass)
            .attr('cellspacing', 3)
            .css('border-spacing', '3px')
            
            if args.subbox == 'yes' then
                root
                    .css('padding', '0')
                    .css('border', 'none')
                    .css('margin', '-3px')
                    .css('width', 'auto')
                    .css('min-width', '100%')
                    .css('font-size', '100%')
                    .css('clear', 'none')
                    .css('float', 'none')
                    .css('background-color', 'transparent')
            else
                root
                    .css('width', '22em')
            end
        root
            .cssText(args.bodystyle)
    
        renderTitle()
        renderAboveRow()
    else
        root = HtmlBuilder.create()
        
        root
            .wikitext(args.title)
    end

    renderSubheaders()
    renderImages() 
    renderRows() 
    renderBelowRow()  
    renderNavBar()
    renderItalicTitle()
    renderTrackingCategories()
    
    return tostring(root)
end

local function preprocessSingleArg(argName)
    -- If the argument exists and isn't blank, add it to the argument table.
    -- Blank arguments are treated as nil to match the behaviour of ParserFunctions.
    if origArgs[argName] and origArgs[argName] ~= '' then
        args[argName] = origArgs[argName]
    end
end

local function preprocessArgs(prefixTable, step)
    -- Assign the parameters with the given prefixes to the args table, in order, in batches
    -- of the step size specified. This is to prevent references etc. from appearing in the
    -- wrong order. The prefixTable should be an array containing tables, each of which has
    -- two possible fields, a "prefix" string and a "depend" table. The function always parses
    -- parameters containing the "prefix" string, but only parses parameters in the "depend"
    -- table if the prefix parameter is present and non-blank.
    if type(prefixTable) ~= 'table' then
        error("Non-table value detected for the prefix table", 2)
    end
    if type(step) ~= 'number' then
        error("Invalid step value detected", 2)
    end
    
    -- Get arguments without a number suffix, and check for bad input.
    for i,v in ipairs(prefixTable) do
        if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then
            error('Invalid input detected to preprocessArgs prefix table', 2)
        end
        preprocessSingleArg(v.prefix)
        -- Only parse the depend parameter if the prefix parameter is present and not blank.
        if args[v.prefix] and v.depend then
            for j, dependValue in ipairs(v.depend) do
                if type(dependValue) ~= 'string' then
                    error('Invalid "depend" parameter value detected in preprocessArgs')
                end
                preprocessSingleArg(dependValue)
            end
        end
    end

    -- Get arguments with number suffixes.
    local a = 1 -- Counter variable.
    local moreArgumentsExist = true
    while moreArgumentsExist == true do
        moreArgumentsExist = false
        for i = a, a + step - 1 do
            for j,v in ipairs(prefixTable) do
                local prefixArgName = v.prefix .. tostring(i)
                if origArgs[prefixArgName] then
                    moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.
                    preprocessSingleArg(prefixArgName)
                end
                -- Process the depend table if the prefix argument is present and not blank, or
                -- we are processing "prefix1" and "prefix" is present and not blank, and
                -- if the depend table is present.
                if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then
                    for j,dependValue in ipairs(v.depend) do
                        local dependArgName = dependValue .. tostring(i)
                        preprocessSingleArg(dependArgName)
                    end
                end
            end
        end
        a = a + step
    end
end
 
function p.infobox(frame)
    -- If called via #invoke, use the args passed into the invoking template.
    -- Otherwise, for testing purposes, assume args are being passed directly in.
    if frame == mw.getCurrentFrame() then
        origArgs = frame:getParent().args
    else
        origArgs = frame
    end
    
    -- Parse the data parameters in the same order that the old {{infobox}} did, so that
    -- references etc. will display in the expected places. Parameters that depend on
    -- another parameter are only processed if that parameter is present, to avoid
    -- phantom references appearing in article reference lists.
    preprocessSingleArg('child')
    preprocessSingleArg('bodyclass')
    preprocessSingleArg('subbox')
    preprocessSingleArg('bodystyle')
    preprocessSingleArg('title')
    preprocessSingleArg('titleclass')
    preprocessSingleArg('titlestyle')
    preprocessSingleArg('above')
    preprocessSingleArg('aboveclass')
    preprocessSingleArg('abovestyle')
    preprocessArgs({
        {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}}
    }, 10)
    preprocessSingleArg('subheaderstyle')
    preprocessSingleArg('subheaderclass')
    preprocessArgs({
        {prefix = 'image', depend = {'caption', 'imagerowclass'}}
    }, 10)
    preprocessSingleArg('captionstyle')
    preprocessSingleArg('imagestyle')
    preprocessSingleArg('imageclass')
    preprocessArgs({
        {prefix = 'header'},
        {prefix = 'data', depend = {'label'}},
        {prefix = 'rowclass'},
        {prefix = 'class'},
        {prefix = 'dataid'},
        {prefix = 'labelid'},
        {prefix = 'headerid'},
        {prefix = 'rowid'}
    }, 50)
    preprocessSingleArg('headerclass')
    preprocessSingleArg('headerstyle')
    preprocessSingleArg('labelstyle')
    preprocessSingleArg('datastyle')
    preprocessSingleArg('below')
    preprocessSingleArg('belowclass')
    preprocessSingleArg('belowstyle')
    preprocessSingleArg('name')
    args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent
    preprocessSingleArg('decat')
 
    return _infobox()
end
 
return p
桑叶泡水喝有什么功效 宝宝发烧手脚冰凉是什么原因 诛心是什么意思 脚气泡脚用什么泡最好 血糖高对身体有什么危害
减肥可以吃什么菜 尖嘴鱼叫什么鱼 查转氨酶挂什么科 est.是什么意思 香菜什么时候种植最好
中年危机是什么意思 定妆喷雾什么时候用 手心为什么老出汗 憔悴是什么意思 八七年属什么的
什么时候补钙最佳时间 为什么会长黑头 大便的颜色代表什么 peaches是什么意思 c反应蛋白是什么意思
龙日冲狗煞南是什么意思hcv9jop6ns3r.cn 送礼送什么水果hcv7jop7ns3r.cn 什么是转基因hcv9jop6ns3r.cn 南北杏和什么煲汤止咳化痰hcv7jop9ns5r.cn 莫欺少年穷是什么意思hcv9jop2ns4r.cn
什么是埋线双眼皮hcv7jop4ns7r.cn 牙龈肿痛吃什么药最见效chuanglingweilai.com 石英岩质玉是什么玉hcv8jop5ns5r.cn 断层是什么意思hcv8jop1ns9r.cn 幼儿园什么时候放暑假hcv9jop5ns5r.cn
煲排骨汤放什么材料好jasonfriends.com 已售罄是什么意思hcv9jop5ns1r.cn 金钱草长什么样hcv9jop2ns3r.cn 得了甲亢都有什么症状hcv9jop3ns5r.cn 普洱在云南什么位置hcv8jop5ns1r.cn
滑肠是什么意思0735v.com 脂肪肝吃什么好hlguo.com 1992年是什么年hcv8jop2ns6r.cn 箱变是什么hcv7jop6ns0r.cn 回族不能吃什么肉hcv8jop7ns3r.cn
百度