From 0ac46331c1829fbca7cc1873f8d143de2e5feee9 Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期二, 20 十一月 2018 09:59:39 +0800 Subject: [PATCH] 修改内容 --- 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