| | |
| | | {{# 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>
|
| | |
| | | <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>
|
| | |
| | | <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>
|
| | | {{# } }}
|
| | |
| | |
|
| | | var player;
|
| | | element.on('tab(homeInfoTab)', function(data){
|
| | | if(!player) {
|
| | | var playerName = '基站环境短视频';
|
| | | var tabTxt = $(this).text();
|
| | | if(!player && tabTxt == playerName) {
|
| | | player = new ckplayer(videoObject);
|
| | | }
|
| | | });
|
| | |
| | | })
|
| | | }
|
| | | ,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 + '%');
|
| | | }
|
| | |
| | | var rs = JSON.parse(res.result);
|
| | | if(rs.code == 1) {
|
| | | element.progress('uploadProgress', '上传成功!');
|
| | | getVideoList(sid, gFileName, true);
|
| | | }
|
| | | }
|
| | | });
|
| | |
| | | var videoUrl = createVideosList(videoContainer, rsList, fileName);
|
| | | // 是否更新视频列表
|
| | | if(update) {
|
| | | |
| | | |
| | | }else{
|
| | | videoObject.video = [[videoUrl, 'video/mp4']];
|
| | | //videoObject.video = [[videoUrl, 'video/mp4']];
|
| | | }
|
| | | }else {
|
| | | createVideosList(videoContainer, [], fileName);
|
| | |
| | | }
|
| | |
|
| | | // 激活被选中的视频
|
| | | container.find('.video-item').eq(acIndex).addClass('video-item-active');
|
| | | // container.find('.video-item').eq(acIndex).addClass('video-item-active');
|
| | | // 设置全局的正在播放的视频的名称
|
| | | gFileName = list[acIndex].fileName;
|
| | |
|