作者 雷海东

合同变更重启流程、视频播放禁止拖拽进度条、定时暂停

... ... @@ -45,10 +45,11 @@ export function addAndStart(data) {
}
// 修改【请填写功能名称】
export function updateContract(data) {
export function updateContract(procDefId,data) {
return request({
url: '/system/contract',
method: 'put',
params:{procDefId},
data: data
})
}
... ...
... ... @@ -47,6 +47,8 @@ Vue.use(VideoPlayer)
saveCurrentTime:'', // 当前播放进度时长
isShowSubs: false,
recodrTime :null,
lastPausedTime: 0,
pauseInterval: 10, // 每隔10秒暂停一次
playerOptions:{
playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
autoplay: false, //如果true,浏览器准备好时开始回放。
... ... @@ -92,6 +94,18 @@ Vue.use(VideoPlayer)
this.currentTime = item.cache_.currentTime
this.progress = ((this.currentTime.toFixed(2) / item.cache_.duration.toFixed(2)) * 100).toFixed(2) + '%'
// console.log('当前播放进度', item)
// 检查是否需要暂停
if (this.currentTime - this.lastPausedTime >= this.pauseInterval) {
let hh=this.$refs.videoPlayer.player; // 暂停视频播放
hh.pause()
this.lastPausedTime = this.currentTime; // 更新上次暂停的时间
}
// 检查视频是否播放完毕
if (this.currentTime >= item.cache_.duration) {
// 如果视频播放完毕,重置状态以便下一次播放
this.lastPausedTime = 0; // 重置上次暂停的时间
}
},
// 正在拖动
videoSeeking(item) {
... ... @@ -195,6 +209,9 @@ Vue.use(VideoPlayer)
background-color: #f7f9fc !important;
/* background-color: #d7e4f7 !important; */
}
.vjs-progress-control{
pointer-events: none !important;
}
.vjs-custom-skin > .video-js .vjs-big-play-button {
width: 70px;
border-radius: 50%;
... ...
... ... @@ -513,13 +513,13 @@ export default {
if (valid) {
this.buttonLoading = true;
if (this.form.id != null) {
updateContract(this.form)
updateContract(this.biangeng.procDefId,this.form)
.then((response) => {
this.$modal.msgSuccess("合同变更成功,已重新启动流程");
this.open = false;
this.getList();
console.log("变更列表值:", this.biangeng);
this.handleAgain2(this.biangeng);
// this.handleAgain2(this.biangeng);
})
.finally(() => {
this.buttonLoading = false;
... ... @@ -604,10 +604,10 @@ export default {
// });
// console.log(row);
},
handleAgain2(row) {
console.log(row);
startProcess(row.procDefId, row).then((res) => {});
},
// handleAgain2(row) {
// console.log(row);
// startProcess(row.procDefId, row).then((res) => {});
// },
handleEvaluate(row){
console.log('评价',row)
this.title = row.contractName
... ...
... ... @@ -438,13 +438,14 @@ export default {
this.$refs["form"].validate((valid) => {
if (valid) {
this.buttonLoading = true;
updateContract(this.form)
console.log(this.biangeng.procDefId)
updateContract(this.biangeng.procDefId,this.form)
.then((response) => {
this.$modal.msgSuccess("合同变更成功,已重新启动流程");
this.open = false;
this.getList();
console.log("变更列表值:", this.biangeng);
this.handleAgain2(this.biangeng);
// this.handleAgain2(this.biangeng);
})
.finally(() => {
this.buttonLoading = false;
... ... @@ -521,10 +522,10 @@ export default {
// });
// console.log(row);
},
handleAgain2(row) {
console.log(row);
startProcess(row.procDefId, row).then((res) => {});
},
// handleAgain2(row) {
// console.log(row);
// startProcess(row.procDefId, row).then((res) => {});
// },
handleEvaluate(row){
// console.log('评价',row)
this.title = row.contractName
... ...