From cf762ff3a5b53aba5c44f296926c077e83518967 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@192.168.10.23>
Date: 星期二, 20 十一月 2018 10:03:16 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://whyccjj@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw

---
 gx_tieta/WebRoot/iframe/homeinfo.html |   81 ++++++++++++++++++++++++++++++++--------
 1 files changed, 65 insertions(+), 16 deletions(-)

diff --git a/gx_tieta/WebRoot/iframe/homeinfo.html b/gx_tieta/WebRoot/iframe/homeinfo.html
index abe495d..4872a8b 100644
--- a/gx_tieta/WebRoot/iframe/homeinfo.html
+++ b/gx_tieta/WebRoot/iframe/homeinfo.html
@@ -44,7 +44,7 @@
             {{# layui.each(d.tabc, function(index, item){ }}
                 {{# if(item.type == 'group'){ }}
                 <div class="layui-tab-item {{ item.cshow }}">
-                    <table class="hdw-tbl">
+                    <table class="hdw-tbl mrb8">
                         <thead>
                             <tr>
                                 <th style="width:30%">鍙傛暟鍚嶇О</th>
@@ -108,12 +108,16 @@
                                 <td>璐熻矗浜�</td>
                                 <td>{{ item.content.person }}</td>
                             </tr>
+							<tr>
+                                <td>瀹夎浜哄憳</td>
+                                <td>{{ item.content.install_user }}</td>
+                            </tr>
                         </tbody>
                     </table>
                 </div>
                 {{# }else if(item.type == 'home'){ }}
                 <div class="layui-tab-item {{ item.cshow }}">
-                    <table class="hdw-tbl">
+                    <table class="hdw-tbl mrb8">
                         <thead>
                             <tr>
                                 <th style="width:30%">鍙傛暟鍚嶇О</th>
@@ -297,17 +301,32 @@
 							<br>
 							<div class="layui-form mrl8">
 								<div class="layui-form-item">
-								<button type="button" class="layui-btn" id="test5"><i class="layui-icon"> </i>閫夋嫨涓婁紶瑙嗛</button>
-								<div class="layui-input-inline">
-      								<input type="text" name="title" autocomplete="off" placeholder="璇疯緭鍏ヨ棰戝悕绉�" class="layui-input">
-    							</div>
+									<button type="button" class="layui-btn" id="test5"><i class="layui-icon"> </i>閫夋嫨涓婁紶瑙嗛</button>
+									<div class="layui-input-inline">
+      									<input type="text" name="title" autocomplete="off" placeholder="璇疯緭鍏ヨ棰戝悕绉�" class="layui-input">
+    								</div>
+								</div>
 							</div>
-						</div>
-						<div class="layui-progress layui-progress-big mrl8 mrr8" lay-showPercent="yes" lay-filter="uploadProgress">
-  							<div class="layui-progress-bar layui-bg-blue" lay-percent="0%"></div>
-						</div>
-						<div class="bottom-btn">
-							<button type="button" class="layui-btn layui-btn-normal" id="upload">纭涓婁紶</button>
+							<div class="layui-upload">
+		       					<div class="layui-upload-list">
+		       						<table class="layui-table">
+		       							<thead>
+						        			<tr>
+							        			<th>鏂囦欢鍚�</th>
+							        			<th>澶у皬</th>
+												<th>鎿嶄綔</th>
+						      				</tr>
+					      			</thead>
+					      			<tbody id="videoInfoTbl"></tbody>
+		       						</table>
+		       					</div>
+		       				</div>
+							<div class="layui-progress layui-progress-big mrl8 mrr8" lay-showPercent="yes" lay-filter="uploadProgress">
+  								<div class="layui-progress-bar layui-bg-blue" lay-percent="0%"></div>
+							</div>
+							<div class="bottom-btn">
+								<button type="button" class="layui-btn layui-btn-normal" id="upload">纭涓婁紶</button>
+							</div>
 						</div>
 					</div>
 				{{# } }}
@@ -345,7 +364,9 @@
 			
 			var player;
 			element.on('tab(homeInfoTab)', function(data){
-				if(!player) {
+				var playerName = '鍩虹珯鐜鐭棰�';
+				var tabTxt = $(this).text();
+				if(!player && tabTxt == playerName) {
 					player = new ckplayer(videoObject);
 				}
 			});
@@ -389,6 +410,33 @@
                     })
                 }
                 ,accept: 'video' //瑙嗛
+                ,choose: function(obj) {
+                	
+                	var files = this.files = obj.pushFile();
+                	console.log(files);
+                	videoInfoTbl.text('');
+                	// 閬嶅巻
+                	Object.keys(files).forEach(function(key) {
+                		var file = files[key];
+                		console.log(file);
+                		var tr = $(['<tr id="upload-'+ key +'">'
+				          ,'<td>'+ file.name +'</td>'
+				          ,'<td>'+ (file.size/1014).toFixed(1) +'kb</td>'
+				          ,'<td>'
+				            ,'<button class="layui-btn layui-btn-xs layui-btn-danger imgs-delete">鍒犻櫎</button>'
+				          ,'</td>'
+				        ,'</tr>'].join(''));
+				        
+				        //鍒犻櫎
+				        tr.find('.imgs-delete').on('click', function(){
+				          delete files[key]; //鍒犻櫎瀵瑰簲鐨勬枃浠�
+				          tr.remove();
+				          uploadVideo.config.elem.next()[0].value = ''; //娓呯┖ input file 鍊硷紝浠ュ厤鍒犻櫎鍚庡嚭鐜板悓鍚嶆枃浠朵笉鍙��
+				        });
+				        
+				        videoInfoTbl.append(tr);
+                	});
+                }
                 ,progress: function(e , percent) {
 					element.progress('uploadProgress',percent  + '%');
 				}
@@ -396,6 +444,7 @@
                 	var rs = JSON.parse(res.result);
                 	if(rs.code == 1) {
                 		element.progress('uploadProgress', '涓婁紶鎴愬姛锛�');
+                		getVideoList(sid, gFileName, true);
                 	}
                 }
             });
@@ -441,9 +490,9 @@
            					var videoUrl = createVideosList(videoContainer, rsList, fileName);
            					// 鏄惁鏇存柊瑙嗛鍒楄〃
            					if(update) {
-           					
+           						
            					}else{
-           						videoObject.video = [[videoUrl, 'video/mp4']];
+           						//videoObject.video = [[videoUrl, 'video/mp4']];
            					}
            				}else {
            					createVideosList(videoContainer, [], fileName);
@@ -478,7 +527,7 @@
            		}
            		
            		// 婵�娲昏閫変腑鐨勮棰�
-           		container.find('.video-item').eq(acIndex).addClass('video-item-active');
+           		// container.find('.video-item').eq(acIndex).addClass('video-item-active');
            		// 璁剧疆鍏ㄥ眬鐨勬鍦ㄦ挱鏀剧殑瑙嗛鐨勫悕绉�
            		gFileName = list[acIndex].fileName;
            		

--
Gitblit v1.9.1