Skip to content

Commit

Permalink
1、节目制作,滚动文字的持续时间bug并将其加入到预览中,以及预览时左到右不能无缝连接的bug。
Browse files Browse the repository at this point in the history
2、解决编辑节目时无法点击文本进行编辑,以及部分图片无法还原。
3、资源管理上传功能加入点击确认后清除上传列表功能。
  • Loading branch information
gorkys committed Feb 9, 2018
1 parent ff59d94 commit 9141906
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 49 deletions.
13 changes: 6 additions & 7 deletions src/components/Log/operatingLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,7 @@
<template slot="prepend">操作人</template>
</el-input>
</div>
<div style="width:200px;">
<el-input placeholder="请输入内容" v-model="input3">
<template slot="prepend">操作时间</template>
</el-input>
</div>
<el-button>搜索</el-button>
<el-button @click="search">搜索</el-button>
</div>
<div class="control">
<a><i class="el-icon-download"></i>导出为</a>
Expand Down Expand Up @@ -130,7 +125,8 @@
pageCount: 11, //每页显示数目
pageNo: 1, //当前页
total: 0, //总数目
logs: []
logs: [],
operator:'' //操作人
}
},
components: {
Expand Down Expand Up @@ -169,6 +165,9 @@
this.pageNo = val;
this.getUserLog()
}, //分页
search(){
}
}
}
</script>
4 changes: 1 addition & 3 deletions src/components/Program/auditList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
<div style="z-index: 10;position: absolute;display: flex;justify-content: flex-start;align-items: center" v-if="item.type=='scroll'"
:style="{color:item.scrollColor,fontSize:item.scrollFontSize + 'px',fontFamily:item.scrollFontFamily}">
<vue-marquee :BGOpacity="item.scrollBGTransparency" :open="openScroll" :BGColor="item.scrollBGColor"
:fontOpacity="item.scrollTransparency" :speed="item.scrollSpeed"
:fontOpacity="item.scrollTransparency" :speed="item.scrollSpeed" :Duration="item.scrollDuration"
:direction="item.scrollDirection" :content="item.url"></vue-marquee>
</div>
<!--视频图片-->
Expand Down Expand Up @@ -398,8 +398,6 @@
}
}
}
_this.items
debugger
} else {
this.$message({
message: '错误编码:' + response.data.code + ',错误类型:' + response.data.infor + '',
Expand Down
4 changes: 1 addition & 3 deletions src/components/Program/releaseMng.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<div style="z-index: 10;position: absolute;display: flex;justify-content: flex-start;align-items: center" v-if="item.type=='scroll'"
:style="{color:item.scrollColor,fontSize:item.scrollFontSize + 'px',fontFamily:item.scrollFontFamily}">
<vue-marquee :BGOpacity="item.scrollBGTransparency" :open="openScroll" :BGColor="item.scrollBGColor"
:fontOpacity="item.scrollTransparency" :speed="item.scrollSpeed"
:fontOpacity="item.scrollTransparency" :speed="item.scrollSpeed" :Duration="item.scrollDuration"
:direction="item.scrollDirection" :content="item.url"></vue-marquee>
</div>
<!--视频图片-->
Expand Down Expand Up @@ -392,8 +392,6 @@
}
}
}
_this.items
debugger
} else {
this.$message({
message: '错误编码:' + response.data.code + ',错误类型:' + response.data.infor + '',
Expand Down
9 changes: 7 additions & 2 deletions src/components/Resource/resource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
<el-upload
class="upload-demo"
drag
ref="upload"
:data="data"
:action=" baseURL + 'resource/upload'"
:accept="accept"
Expand All @@ -248,7 +249,7 @@
<div class="el-upload__tip" slot="tip">上传说明:{{directions}}</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialog = false">确 定</el-button>
<el-button type="primary" @click="uploadCon">确 定</el-button>
</span>
</el-dialog> <!--上传-->
<el-dialog
Expand Down Expand Up @@ -390,7 +391,11 @@
upload() {
this.title = this.treeName.slice(0, 2);
this.dialog = true
},
}, //打开上传对话框
uploadCon(){
this.$refs.upload.clearFiles(); //清除上传List
this.dialog = false
}, //上传确认
beforeUp: function (file) {
if (this.accept.indexOf(file.type.slice(0, 4)) == -1) {
this.$message({
Expand Down
73 changes: 49 additions & 24 deletions src/components/Template/programMack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@
</el-col>
<el-col :span="6">
<el-form-item label="持续时间" size="mini">
<el-time-picker
v-model="form.scrollDuration"
placeholder="任意时间点">
</el-time-picker>
<el-tooltip placement="top">
<div slot="content">单位为秒(s),0秒为持续滚动。<br/>建议设定为0秒。</div>
<el-input-number size="mini" v-model="form.scrollDuration"></el-input-number>
</el-tooltip>
</el-form-item>
</el-col>
</el-row>
Expand Down Expand Up @@ -428,6 +428,7 @@
:style="{color:form.scrollColor,fontSize:form.scrollFontSize + 'px',fontFamily:form.scrollFontFamily}">
<vue-marquee :BGOpacity="form.scrollBGTransparency" :open="openScroll" :BGColor="form.scrollBGColor"
:fontOpacity="form.scrollTransparency" :speed="form.scrollSpeed"
:Duration="form.scrollDuration"
:direction="form.scrollDirection" :content="form.scrollContent"></vue-marquee>
</div>
<div :name="item.type" :id="item.id">
Expand Down Expand Up @@ -687,7 +688,7 @@
], //滚动速度列表
scrollBGTransparency: 1, //背景透明度
scrollBGTransparencys: [], //透明度列表
scrollDuration: '0', //持续时间
scrollDuration: '', //持续时间
},
activeName: '', //当前激活的区域块标签
Expand Down Expand Up @@ -737,9 +738,9 @@
}
}, //window中移动事件
handleUp() {
setTimeout(()=>{
setTimeout(() => {
$('.move>img').attr({'src': '', 'id': '', 'name': '', 'type': ''});
},10);//移动到对应位置才能填充图片
}, 10);//移动到对应位置才能填充图片
$('.move').css({'display': 'none', 'left': '0px', 'top': '0px'});
}, //window中松开事件
Expand Down Expand Up @@ -836,6 +837,28 @@
_this.proId = program.id;
_this.groupId = program.groupId;
program.proItems.forEach(item => {
if (item.scrollColor != null && item.scrollColor != '' && item.scrollColor != undefined) {
_this.form.scrollBGTransparency = item.scrollBGTransparency;
_this.form.scrollColor = item.scrollColor;
_this.form.scrollDirection = item.scrollDirection;
_this.form.scrollDuration = item.scrollDuration;
_this.form.scrollFontFamily = item.scrollFontFamily;
_this.form.scrollFontSize = item.scrollFontSize;
_this.form.scrollFontTransparency = item.scrollFontTransparency;
_this.form.scrollSpeed = item.scrollSpeed;
_this.form.scrollBGColor = item.scrollBGColor;
_this.form.scrollContent = item.url;
} //滚动文字还原
if (item.font != null && item.font != '' && item.font != undefined) {
_this.txtContent = item.url;
_this.font = item.font;
_this.fontSize = item.fontSize;
_this.fontColor = item.fontColor;
_this.align = item.align;
_this.bold = item.bold;
_this.italic = item.italic;
_this.underline = item.underline;
} //静态文本还原
_this.res.push({name: item.resId, itemsId: item.itemsId, url: item.url, thumbnail: item.thumbnail})
});
_this.getTemplate()
Expand Down Expand Up @@ -865,20 +888,6 @@
this.isDown = false;
$('.move').css({'display': 'none', 'left': '0px', 'top': '0px'})
});
//还原节目资源
if (this.$route.query.type == 1) {
if (document.getElementById('edit') != null && document.getElementById('edit').children != null) {
let edit = document.getElementById('edit').children;
for (let item of this.res) {
for (let i = 0; i < edit.length; i++) {
if (item.itemsId == edit[i].getAttribute('name')) {
if (item.thumbnail == null) return false;
edit[i].children[0].innerHTML = "<img name='" + item.url + "' id='" + item.name + "' src='" + item.thumbnail + "'>"
}
}
}
}
}
//为文本与动态文本绑定编辑事件
$('.txt').on('click', function () {
Expand Down Expand Up @@ -911,7 +920,23 @@
});
$('.vdr').on('click', function () {
_this.activeName = $(this).attr('area-name')
})
});
//还原节目资源
if (this.$route.query.type == 1) {
if (document.getElementById('edit') != null && document.getElementById('edit').children != null) {
let edit = document.getElementById('edit').children;
for (let item of this.res) {
for (let i = 0; i < edit.length; i++) {
if (item.itemsId == edit[i].getAttribute('name')) {
if (item.thumbnail != null) { //缩略图为空的情况只有文字
edit[i].children[0].innerHTML = "<img name='" + item.url + "' id='" + item.name + "' src='" + item.thumbnail + "'>"
}
}
}
}
}
}
})
} else {
_this.$message({
Expand Down Expand Up @@ -1055,7 +1080,7 @@
if (response.data.code == '0000') {
if (type == 'release') {
_this.$router.push({path: '/release', query: {name: _this.proName}})
}else {
} else {
_this.$message({message: '保存成功,2秒后自动返回...', showClose: true, center: true, type: 'success'});
setTimeout(() => {
_this.$router.push({path: '/programList'})
Expand Down Expand Up @@ -1123,7 +1148,7 @@
if (_this.proPreview.height == '720') _this.PP = 0.7;
if (_this.proPreview.height == '1280') _this.PP = 0.6;
if (_this.proPreview.height == '1920') _this.PP = 0.4;
if (_this.proPreview.height== '200') this.PP = 0.5;
if (_this.proPreview.height == '200') this.PP = 0.5;
/*取节目资源地址*/
for (let item of items) {
Expand Down
7 changes: 4 additions & 3 deletions src/components/Terminal/activeCode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@
this.$confirm('确定将选定的激活码导出为压缩包?', '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(()=>{
this.$http({
}).then(()=> {
/* this.$http({
method: 'get',
url: 'activate/export?ids=' + ids,
withCredentials: true,
Expand All @@ -385,8 +385,9 @@
type: 'error'
});
}
})
})*/
})
}, //导出激活码
unbundled(){
let ids = this.rowId.map(item => item.id).join(' ');
Expand Down
23 changes: 17 additions & 6 deletions src/components/common/Marquee.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
BGOpacity: {
default: 1,
type: Number
},
Duration: {
default: 1,
type: Number
}
},
mounted: function () {
Expand All @@ -84,10 +88,17 @@
_this.$nextTick(() => {
if (_this.open) {
let speed;
if (_this.speed == 0) speed = 80;
if (_this.speed == 1) speed = 40;
if (_this.speed == 2) speed = 5;
if (_this.speed === 0) speed = 80;
if (_this.speed === 1) speed = 40;
if (_this.speed === 2) speed = 5;
let duration = _this.Duration * 1000 / speed; //由时间计算出需要滚动的次数
let i=0;
_this.int = setInterval(() => {
i++; //记录滚动次数
if(duration===i) { //当滚动次数与所需滚动次数相等时停止滚动
clearInterval(_this.int);
return false
}
let parentWidth = _this.$refs.parent.clientWidth; //父容器的宽度
let parentLeft = _this.$refs.parent.offsetLeft; //父容器的边界
let parent = parentWidth + parentLeft;
Expand All @@ -97,14 +108,14 @@
_this.height = _this.$refs.target.clientHeight;
let target = targetWidth + targetLeft;
_this.target = targetWidth;
if (_this.direction == 1) {
if (_this.direction === 1) {
if (parentLeft <= target) {
_this.right++
} else {
_this.right = -targetWidth
}
} else {
if (target <= parent) {
if (targetLeft <= parent) {
_this.left++
} else {
_this.left = -targetWidth
Expand All @@ -113,7 +124,7 @@
}, speed);
} else {
clearInterval(_this.int);
_this.direction == 1 ? _this.right = -_this.target : _this.left = -_this.target
_this.direction === 1 ? _this.right = -_this.target : _this.left = -_this.target
}
}
)
Expand Down
1 change: 1 addition & 0 deletions src/components/common/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
},
mounted() {
if (this.name != null) {
debugger
this.int = setInterval(() => {
this.$http({
method: 'get',
Expand Down
1 change: 0 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const i18n = new VueI18n({
en: require('@/components/common/lang/en'),
}
});
debugger
/* eslint-disable no-new */
new Vue({
el: '#app',
Expand Down

0 comments on commit 9141906

Please sign in to comment.