YM
2025-04-14 508fd127fee444ab2ac375a09d63c4690d45c09b
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
{extend name="../../base/view/common/base" /}
 
{block name="style"}
<style type="text/css">
    .panel-num table {width: 100%;}
    .panel-num td {text-align: center; padding: 16px 0; border-left: 1px solid #f1f1f1; position: relative;}
    .panel-num td:nth-child(1) { border-left: none}
    .panel-num .num-title { padding-bottom: 16px; color: #999;}
    .panel-num .blue {font-size: 20px; font-weight: 300;}
    .panel-num td .badge {position: absolute;top: 0; right: 0;}
    .panel-num td .badge span { padding: 2px 4px; font-size: 12px; border-radius: 0 0 0 4px;}
    .dashboard-total td {border-top: 1px solid #f1f1f1}
    .dashboard-logs .layui-timeline-item {padding-bottom: 1px;}
    .info-td { width: 90px; text-align: right;background-color: #fafafa; color: #999; padding: 5px 3px;}
    .info-td {width: 90px; text-align: right;background-color: #fafafa; color: #999; padding: 5px 3px;}
    .layui-card-body .layui-timeline-title {padding-bottom: 0;font-size: 14px; margin-bottom:4px; color:#323232}
    .layui-card-body .layui-timeline-item {padding-bottom: 5px;}
    .layui-short-menu li { text-align: center;}
    .layui-short-menu li .iconfont {display: inline-block; font-weight:600; width: 100%; height: 58px; line-height: 58px; margin-bottom:5px; text-align: center;border-radius: 3px; font-size: 28px; background-color: #F8F8F8; color: #969696; transition: all .3s; -webkit-transition: all .3s;}
    .layui-short-menu li cite {color: #646464;}
    .layui-short-menu li:hover .iconfont{color: #1A75FF; background-color:#F2F8FF;}
    .layui-short-menu li:hover cite {color: #1A75FF;}
    .layui-matter-item li a{display: block; padding: 12px; background-color: #f8f8f8; color: #999; border-radius: 3px; transition: all .3s;-webkit-transition: all .3s;}
    .layui-matter-item li a:hover{background-color:#F2F8FF;}
    .layui-matter-item li cite {font-size: 24px;font-weight: 300;}
    
    .layui-right-bar a{display: inline-block; width: 100%; height: 64px; text-align: center;border-radius: 3px; background-color: #F8F8F8; color: #969696; transition: all .3s; -webkit-transition: all .3s;}
    .layui-right-bar a .iconfont{display: inline-block; font-weight:600; width: 100%; height: 37px; line-height: 39px; text-align: center;font-size: 24px;}
    .layui-right-bar a:hover{color: #1A75FF; background-color:#F2F8FF;}
</style>
{/block}
<!-- 主体 -->
{block name="body"}
<div class="p-page">
<div class="layui-row layui-col-space16">
    <div class="layui-col-md8">
        {volist name="$layout_selected" id="layout"}
        
            {if ( $layout.row == 1) AND ( $layout.name == 'count') }
                {include file="/index/layout_count" /}    
            {/if}
            
            {if ( $layout.row == 1) AND ( $layout.name == 'event') }
                {include file="/index/layout_event" /}    
            {/if}
            
            {if ( $layout.row == 1) AND ( $layout.name == 'note') }
                {include file="/index/layout_note" /}    
            {/if}
            
            {if ( $layout.row == 1) AND ( $layout.name == 'project') }
                {include file="/index/layout_project" /}    
            {/if}
            
            {if ( $layout.row == 1) AND ( $layout.name == 'task') }
                {include file="/index/layout_task" /}    
            {/if}
            
            
            {if ( $layout.row == 1) AND ( $layout.name == 'chartview') }
                {include file="/index/layout_chartview" /}    
            {/if}
            
            {if ( $layout.row == 1) AND ( $layout.name == 'chartyear') }
                {include file="/index/layout_chartyear" /}    
            {/if}
            
        {/volist}
    </div>
    <div class="layui-col-md4">
        {volist name="$layout_selected" id="layout"}    
        
            {if ( $layout.row == 2) AND ( $layout.name == 'fastentry') }
                {include file="/index/layout_fastentry" /}    
            {/if}
            
            {if ( $layout.row == 2) AND ( $layout.name == 'approve') }
                {include file="/index/layout_approve" /}    
            {/if}
            
            {if ( $layout.row == 2) AND ( $layout.name == 'system') }
                {include file="/index/layout_system" /}    
            {/if}
            
            {if ( $layout.row == 2) AND ( $layout.name == 'ranking') }
                {include file="/index/layout_ranking" /}    
            {/if}
            
            {if ( $layout.row == 2) AND ( $layout.name == 'action') }
                {include file="/index/layout_action" /}    
            {/if}
            
        {/volist}
    </div>
</div>
</div>
{/block}
<!-- /主体 -->
 
<!-- 脚本 -->
{block name="script"}
<script src="{__GOUGU__}/third_party/echart/echarts.min.js"></script>
<script>
    function getRange() {
        let today = new Date();
        let tYear = today.getFullYear();
        let tMonth = today.getMonth() + 1;
        let tDate = today.getDate();
        let dateFirst = tYear + "-" + tMonth + "-" + tDate;
        let datelast = (tYear - 1) + "-" + tMonth + "-" + tDate;
        let dataRange = [];
        dataRange.push(dateFirst);
        dataRange.push(datelast);
        return dataRange;
    }
 
    function getDay(archiveCalendar) {
        var today = new Date();
        var dayArray = [];
        for (var i = 0; i < 366; i++) {
            var targetday_milliseconds = today.getTime() - 1000 * 60 * 60 * 24 * i;
            var date = new Date(targetday_milliseconds);
            dayArray.push(retunDay(date,archiveCalendar));
        }
        return dayArray;
    }
 
    function retunDay(day,archiveCalendar) {
        var tYear = day.getFullYear();
        var tMonth = day.getMonth();
        var tDate = day.getDate();
        tMonth = tMonth + 1;
        if (tMonth.toString().length == 1) {
            tMonth = "0" + tMonth;
        }
        if (tDate.toString().length == 1) {
            tDate = "0" + tDate;
        }
        var dateStr = tYear + "-" + tMonth + "-" + tDate;
        var dateArray = [];
        dateArray.push(dateStr);
        if (archiveCalendar[dateStr]) {
            dateArray.push(archiveCalendar[dateStr]);
        }
        else {
            dateArray.push(0);
        }
        return dateArray;
    }
    
    function setHour(num) {
        var str = num + ':00';
        if (num < 10) {
            str = '0' + num + ':00';
        }
        return str;
    }
 
    const moduleInit = ['tool','oaSchedule'];
    function gouguInit() {
        var tool = layui.tool,table = layui.table,work = layui.oaSchedule;
        
        if(typeof layoutNote ==='function'){
            layoutNote(table);
        }
        
        if(typeof layoutProject ==='function'){
            layoutProject(table);
        }
        
        if(typeof layoutTask ==='function'){
            layoutTask(table);
        }
        
        if(typeof layoutChartView ==='function'){
            layoutChartView();
        }
        
        if(typeof layoutChartYear ==='function'){
            layoutChartYear();
        }
        
        if(typeof layoutFastentry ==='function'){
            layoutFastentry(tool,work,table)
        }
        
        if(typeof layoutSystem ==='function'){
            layoutSystem()
        }
        
        if(typeof layoutRaking ==='function'){
            layoutRaking()
        }
        
        if(typeof layoutAction ==='function'){
            layoutAction()
        }    
    }
    
setTimeout(function () {
    window.onresize = function () {
        if(logChart){
            chartView.resize();
        }
        if(myChart){
            myChart.resize();
        }
        if(logChart){
            logChart.resize();
        }
    }
})
</script>
{/block}
<!-- /脚本 -->