张延森 2 anni fa
parent
commit
1fbf9edc9c

+ 32
- 22
resources/static/css/common.css Vedi File

@@ -177,6 +177,9 @@
177 177
   border: 0;
178 178
   color: #FFFFFF;
179 179
 }
180
+.chart-card.panel .panel-heading .selectGroup select option {
181
+  color: #222;
182
+}
180 183
 .chart-card.panel .panel-heading img {
181 184
   width: 28px;
182 185
   height: 28px;
@@ -342,39 +345,46 @@
342 345
   background: rgba(66, 118, 245, 0.2);
343 346
 }
344 347
 .dashboard-page {
345
-  height: 100%;
346 348
   background-color: #081A48;
349
+  scrollbar-width: none;
350
+  /* firefox */
351
+  -ms-overflow-style: none;
352
+  /* IE 10+ */
347 353
 }
348
-.dashboard-page > div {
349
-  height: 50%;
350
-  overflow: hidden;
354
+.dashboard-page::-webkit-scrollbar {
355
+  display: none;
351 356
 }
352 357
 .dashboard-page .dash-carousel {
353
-  max-width: 1200px;
354
-  margin: 0 auto;
355
-  height: 100%;
356
-}
357
-.dashboard-page .dash-carousel .ratio-static {
358
-  height: 0;
359
-  padding-bottom: 32%;
360
-  position: relative;
358
+  box-sizing: border-box;
359
+  height: 100vh;
360
+  margin: 0;
361 361
   overflow: hidden;
362 362
 }
363
-.dashboard-page .dash-carousel .ratio-static > div {
364
-  position: absolute;
365
-  top: 0;
366
-  left: 0;
367
-  width: 100%;
368
-  height: 100%;
363
+.dashboard-page .dash-carousel .left {
369 364
   background: transparent;
365
+  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.0001) 100%);
366
+  width: 10%;
367
+  box-shadow: none;
368
+}
369
+.dashboard-page .dash-carousel .item {
370
+  height: 100vh;
370 371
 }
371
-.dashboard-page .dash-carousel .ratio-static .left {
372
+.dashboard-page .dash-carousel .item.left {
372 373
   width: auto;
373
-  background: transparent;
374
-  box-shadow: none;
374
+}
375
+.dashboard-page .dash-carousel .item .item-image {
376
+  height: 100%;
377
+  width: 100%;
378
+  background-repeat: no-repeat;
379
+  background-position: center center;
380
+  background-origin: border-box;
381
+  background-size: contain;
382
+}
383
+.dashboard-page .act-list {
384
+  margin: 96px 0;
375 385
 }
376 386
 .dashboard-page .act-list .row {
377
-  height: calc(50% - 64px);
387
+  height: calc(25vh - 64px);
378 388
   padding: 0 80px;
379 389
 }
380 390
 .dashboard-page .act-list .row + .row {

+ 2
- 0
resources/static/css/public.css Vedi File

@@ -2,6 +2,8 @@
2 2
 /* CSS Document */
3 3
 
4 4
 *{padding:0;margin:0;font-family:"微软雅黑";font-size: 16px;font-weight:400;}
5
+html { scrollbar-width: none; -ms-overflow-style: none; }
6
+html::-webkit-scrollbar { display: none; }
5 7
 html,body{ width:100%; height:100%;}
6 8
 body{background:#edf1fa;}
7 9
 

+ 4
- 0
resources/static/less/chart-card.less Vedi File

@@ -119,6 +119,10 @@
119 119
           background: transparent;
120 120
           border: 0;
121 121
           color: #FFFFFF;
122
+
123
+          option {
124
+            color: #222;
125
+          }
122 126
         }
123 127
       }
124 128
 

+ 29
- 26
resources/static/less/ext-page.less Vedi File

@@ -121,47 +121,50 @@
121 121
 }
122 122
 
123 123
 .dashboard-page {
124
-  height: 100%;
125 124
   background-color: #081A48;
125
+  scrollbar-width: none; /* firefox */
126
+  -ms-overflow-style: none; /* IE 10+ */
126 127
 
127
-  & > div {
128
-    height: 50%;
129
-    overflow: hidden;
128
+  &::-webkit-scrollbar {
129
+    display: none;
130 130
   }
131 131
 
132 132
   .dash-carousel {
133
-    max-width: 1200px;
134
-    margin: 0 auto;
135
-    height: 100%;
133
+    box-sizing: border-box;
134
+    // 94 = header height
135
+    height: 100vh;
136
+    margin: 0;
137
+    overflow: hidden;
136 138
 
137
-    .ratio-static {
138
-      height: 0;
139
-      padding-bottom: 32%; // 大约 10:3
140
-      position: relative;
141
-      overflow: hidden;
139
+    .left {
140
+      background: transparent;
141
+      background-image: linear-gradient(to right, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, .0001) 100%);
142
+      width: 10%;
143
+      box-shadow: none;
144
+    }
142 145
 
143
-      & > div {
144
-        position: absolute;
145
-        top: 0;
146
-        left: 0;
147
-        width: 100%;
148
-        height: 100%;
149
-        background: transparent;
146
+    .item {
147
+      &.left {
148
+        width: auto;
150 149
       }
151 150
 
152
-      .left {
153
-        width: auto;
154
-        background: transparent;
155
-        box-shadow: none;
151
+      height: 100vh;
152
+      .item-image {
153
+        height: 100%;
154
+        width: 100%;
155
+        background-repeat: no-repeat;
156
+        background-position: center center;
157
+        background-origin: border-box;
158
+        background-size: contain;
156 159
       }
157 160
     }
158
-
159 161
   }
160 162
   
161
-
162 163
   .act-list {
164
+    margin: 96px 0;
165
+
163 166
     .row {
164
-      height: calc(50% - 64px);
167
+      height: calc(25vh - 64px);
165 168
       padding: 0 80px;
166 169
 
167 170
       & + .row {

+ 1
- 1
resources/templates/main.html Vedi File

@@ -16,7 +16,7 @@
16 16
 body { background-color: #081A48; }
17 17
 </style>
18 18
 </head>
19
-<body>
19
+<body class="main-page">
20 20
 	<div th:replace="main/data::main-data"></div>
21 21
 	<div th:replace="main/dashboard::main-dashboard"></div>
22 22
 </body>

+ 14
- 11
resources/templates/main/dashboard.html Vedi File

@@ -2,11 +2,7 @@
2 2
 <html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
3 3
 <div id="t1" th:fragment="main-dashboard" class="dashboard-page" style="display: none;">
4 4
   <div>
5
-    <div class="dash-carousel">
6
-      <div class="ratio-static">
7
-        
8
-  
9
-    <div id="myNiceCarousel" class="carousel slide">
5
+    <div id="myNiceCarousel" class="dash-carousel carousel slide">
10 6
       <!-- 轮播项目 -->
11 7
       <div class="carousel-inner">
12 8
       </div>
@@ -19,8 +15,6 @@
19 15
         <span class="icon icon-chevron-right"></span>
20 16
       </a>
21 17
     </div>
22
-      </div>
23
-    </div>
24 18
   
25 19
   </div>
26 20
   <div class="act-list">
@@ -183,14 +177,21 @@
183 177
     function loadPage2() {
184 178
       var TH_SERVER = 'http://192.168.89.147:8087/api'
185 179
 
186
-      var itemTpl = [
180
+      var imageTpl = [
187 181
         '<div class="item {active}">',
188
-        '  <img alt="" src="{src}">',
182
+        '  <div class="item-image" style="background-image: url({src});"></div>',
189 183
         '  <div class="carousel-caption">',
190 184
         '    <h3>{title}</h3>',
191 185
         '  </div>',
192 186
         '</div>',
193 187
       ].join('');
188
+      var videoTpl = [
189
+        '<div class="item {active}">',
190
+        '  <div class="item-video">',
191
+        '    <video src="{src}" controls="controls"></video>',
192
+        '  </div>',
193
+        '</div>',
194
+      ].join('');
194 195
 
195 196
       $.ajax({
196 197
         url: TH_SERVER+'/banner?pageNum=1&pageSize=20',
@@ -200,15 +201,17 @@
200 201
           if (list && list.length > 0) {
201 202
             var html = list.map(function(item, index) {
202 203
               var active = index == 0 ? 'active' : '';
203
-              var src = item.image;
204
+              var src = item.type === '1' ? item.image : item.video;
204 205
               var title = item.desc || '';
206
+              var tpl = item.type === '1' ? imageTpl : videoTpl;
205 207
 
206
-              return itemTpl.replace('{active}', active).replace('{src}', src).replace('{title}', title);
208
+              return tpl.replace('{active}', active).replace('{src}', src).replace('{title}', title);
207 209
             }).join('')
208 210
 
209 211
             $("#myNiceCarousel .carousel-inner").children().remove();
210 212
             $("#myNiceCarousel .carousel-inner").append(html);
211 213
             $('#myNiceCarousel').carousel()
214
+            // $('#myNiceCarousel .left').on('click', console.log);
212 215
           }
213 216
         }
214 217
       })

+ 18
- 20
resources/templates/main/data.html Vedi File

@@ -120,27 +120,25 @@
120 120
            dataType : 'json',
121 121
             success : function(data) {
122 122
  
123
-             (function mockData(dt) {
124
-               function rand() {
125
-                 return Math.floor(100 * Math.random() + 10);
126
-               }
123
+            //  (function mockData(dt) {
124
+            //    function rand() {
125
+            //      return Math.floor(100 * Math.random() + 10);
126
+            //    }
127 127
  
128
-               dt.countData.ageArrNum = dt.countData.ageArrNum.split(',').map(rand).join(',')
129
-               dt.countData.devArrNum = dt.countData.devArrNum.split(',').map(rand).join(',')
130
-               dt.countData.guaArrNum = dt.countData.guaArrNum.split(',').map(rand).join(',')
131
-               dt.countData.eduNum = dt.countData.eduNum.split(',').map(rand).join(',')
132
-               dt.countData.guaAbiJson.clzs = rand()
133
-               dt.countData.guaAbiJson.dcztssgynl = rand()
134
-               dt.countData.guaAbiJson.yjdcztssgynl = rand()
135
-               dt.countData.guaAbiJson.yjztssgynl = rand()
136
-               dt.countData.guaAbiJson.ztssgynl = rand()
137
-               dt.countData.guaAbiJson.ztzsgynl = rand()
138
-               dt.yearTask = Object.keys(dt.yearTask).map((key) => {
139
-                 return {[key]: rand()}
140
-               }).reduce((acc, item) => ({ ...acc, ...item }), {})
141
-             })(data)
142
- 
143
-             console.log(data)
128
+            //    dt.countData.ageArrNum = dt.countData.ageArrNum.split(',').map(rand).join(',')
129
+            //    dt.countData.devArrNum = dt.countData.devArrNum.split(',').map(rand).join(',')
130
+            //    dt.countData.guaArrNum = dt.countData.guaArrNum.split(',').map(rand).join(',')
131
+            //    dt.countData.eduNum = dt.countData.eduNum.split(',').map(rand).join(',')
132
+            //    dt.countData.guaAbiJson.clzs = rand()
133
+            //    dt.countData.guaAbiJson.dcztssgynl = rand()
134
+            //    dt.countData.guaAbiJson.yjdcztssgynl = rand()
135
+            //    dt.countData.guaAbiJson.yjztssgynl = rand()
136
+            //    dt.countData.guaAbiJson.ztssgynl = rand()
137
+            //    dt.countData.guaAbiJson.ztzsgynl = rand()
138
+            //    dt.yearTask = Object.keys(dt.yearTask).map((key) => {
139
+            //      return {[key]: rand()}
140
+            //    }).reduce((acc, item) => ({ ...acc, ...item }), {})
141
+            //  })(data)
144 142
  
145 143
               $("#totalTask").text(data.totalTask);
146 144
               $("#totalOrg").text(data.totalOrg);