zoukankan      html  css  js  c++  java
  • 前端页面内含外显相关知识

    页面显示:

    对于页面上筛选条件有下拉框加载的,直接下对应显示时加载
    {
                    text : '产品线',
                    dataIndex : 'entorgid',
                    align : 'center',
                    width : 150,
                    renderer:function(value,metaData,record ,rowIndex,colIndex,store,view){
                        if(value != ""){
                            $("#entorgid option").each(function(){
                                   if($(this).val() == value){
                                       value = $(this).text();
                                   }
                               });
                        }
                        return value;
                    }
                }
    要是筛选条件没有对应下拉框,直接设置下拉框然后进行隐藏,当然如果需要显示去调hidden就好
    需要注意的是,title属性是用来存储数据库中该字段的编码。也就是mdp_cmm_dict表CODE
     <select    class="form-control mmp-select hidden" id="crmEntid"
                    name="crmEntid" title="crm_entid"></select>
    页面导出显示:

    有两种方法解决导出的数据内含外显,1)直接关联数据库的字典表 2直接在对应的SQL中进行case when操作显示

    <![CDATA[(    
                    CASE mt.TERMINAL_PROPERTY
                    WHEN 1 THEN
                        '3C连锁门店'
                    WHEN 2 THEN
                        '全国商超门店'
                    WHEN 3 THEN
                        'TOP门店'
                    WHEN 4 THEN
                        '旗舰店'
                    WHEN 5 THEN
                        '其他渠道门店'                
                    else
                       '未知类型'
                    END
                ) ]]>AS TERMINAL_PROPERTY,
  • 相关阅读:
    leetcode 347. Top K Frequent Elements
    581. Shortest Unsorted Continuous Subarray
    leetcode 3. Longest Substring Without Repeating Characters
    leetcode 217. Contains Duplicate、219. Contains Duplicate II、220. Contains Duplicate、287. Find the Duplicate Number 、442. Find All Duplicates in an Array 、448. Find All Numbers Disappeared in an Array
    leetcode 461. Hamming Distance
    leetcode 19. Remove Nth Node From End of List
    leetcode 100. Same Tree、101. Symmetric Tree
    leetcode 171. Excel Sheet Column Number
    leetcode 242. Valid Anagram
    leetcode 326. Power of Three
  • 原文地址:https://www.cnblogs.com/kangds/p/5507163.html
Copyright © 2011-2022 走看看