zj_wfl_graphics_sub.lview 2.89 KB
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <model-query fetchAll="true" model="zjwfl.zj_wfl_graphics" rootPath="graphics_record"/>
        <model-query fetchAll="true" model="zjwfl.zj_wfl_graphics_detail_view" rootPath="graphics_detail_list"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
        
        	
            function nodeRenderer(record, type, config) {
                
                var arrive_date = record.get('arrive_date');
                var dispose_date = record.get('dispose_date');
                var dispose_user = record.get('dispose_user');
                var action_type = String(record.get('action_type'));
                
                
                if(Ext.isEmpty(action_type))
                {
                    arrive_date = '未到达';
                    dispose_user = '未审批';
                    dispose_date = '未审批';
                }
                else
                {
                    if(action_type=='1')
                    {
	                    dispose_date = '处理中';
                    }
                }
                
                if(Ext.isEmpty(dispose_user))
                {
                    dispose_user='';
                }
                if(Ext.isEmpty(dispose_date))
                {
                    dispose_date='';
                }
                if(Ext.isEmpty(arrive_date))
                {
                    arrive_date='未到达';
                }
                
                if (type == 'rect' || type == 'diamond') {
                    config.info = '到达时间:' + arrive_date + '\n处理时间:' + dispose_date+'\n处理人:'+dispose_user;
                    return get_fillColor(action_type);
                }
                
                if(type=='oval')
                {
                    if (record.get('table_id') == -1 || record.get('table_id') == 0) {
                        
                    }
                    else
                    {
                        config.info = '到达时间:' + arrive_date + '\n结束时间:' + dispose_date;
                    	return get_fillColor(action_type);
                    }
                }
                else if (type == 'zLine')
                {
                    
                }
            }
            
            ]]></script>
        <a:dataSets>
            <a:dataSet id="graphic_sub_ds">
                <a:datas dataSource="/model/graphics_detail_list"/>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:graphic bindTarget="graphic_sub_ds" height="${/model/graphics_record/record/@height}" renderer="nodeRenderer" style="border:1px solid #ccc" width="${/model/graphics_record/record/@width}"/>
        </a:screenBody>
    </a:view>
</a:screen>