作者 雷海东

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

@@ -45,10 +45,11 @@ export function addAndStart(data) { @@ -45,10 +45,11 @@ export function addAndStart(data) {
45 } 45 }
46 46
47 // 修改【请填写功能名称】 47 // 修改【请填写功能名称】
48 -export function updateContract(data) { 48 +export function updateContract(procDefId,data) {
49 return request({ 49 return request({
50 url: '/system/contract', 50 url: '/system/contract',
51 method: 'put', 51 method: 'put',
  52 + params:{procDefId},
52 data: data 53 data: data
53 }) 54 })
54 } 55 }
@@ -47,6 +47,8 @@ Vue.use(VideoPlayer) @@ -47,6 +47,8 @@ Vue.use(VideoPlayer)
47 saveCurrentTime:'', // 当前播放进度时长 47 saveCurrentTime:'', // 当前播放进度时长
48 isShowSubs: false, 48 isShowSubs: false,
49 recodrTime :null, 49 recodrTime :null,
  50 + lastPausedTime: 0,
  51 + pauseInterval: 10, // 每隔10秒暂停一次
50 playerOptions:{ 52 playerOptions:{
51 playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度 53 playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
52 autoplay: false, //如果true,浏览器准备好时开始回放。 54 autoplay: false, //如果true,浏览器准备好时开始回放。
@@ -92,6 +94,18 @@ Vue.use(VideoPlayer) @@ -92,6 +94,18 @@ Vue.use(VideoPlayer)
92 this.currentTime = item.cache_.currentTime 94 this.currentTime = item.cache_.currentTime
93 this.progress = ((this.currentTime.toFixed(2) / item.cache_.duration.toFixed(2)) * 100).toFixed(2) + '%' 95 this.progress = ((this.currentTime.toFixed(2) / item.cache_.duration.toFixed(2)) * 100).toFixed(2) + '%'
94 // console.log('当前播放进度', item) 96 // console.log('当前播放进度', item)
  97 + // 检查是否需要暂停
  98 + if (this.currentTime - this.lastPausedTime >= this.pauseInterval) {
  99 + let hh=this.$refs.videoPlayer.player; // 暂停视频播放
  100 + hh.pause()
  101 + this.lastPausedTime = this.currentTime; // 更新上次暂停的时间
  102 + }
  103 +
  104 + // 检查视频是否播放完毕
  105 + if (this.currentTime >= item.cache_.duration) {
  106 + // 如果视频播放完毕,重置状态以便下一次播放
  107 + this.lastPausedTime = 0; // 重置上次暂停的时间
  108 + }
95 }, 109 },
96 // 正在拖动 110 // 正在拖动
97 videoSeeking(item) { 111 videoSeeking(item) {
@@ -195,6 +209,9 @@ Vue.use(VideoPlayer) @@ -195,6 +209,9 @@ Vue.use(VideoPlayer)
195 background-color: #f7f9fc !important; 209 background-color: #f7f9fc !important;
196 /* background-color: #d7e4f7 !important; */ 210 /* background-color: #d7e4f7 !important; */
197 } 211 }
  212 + .vjs-progress-control{
  213 + pointer-events: none !important;
  214 + }
198 .vjs-custom-skin > .video-js .vjs-big-play-button { 215 .vjs-custom-skin > .video-js .vjs-big-play-button {
199 width: 70px; 216 width: 70px;
200 border-radius: 50%; 217 border-radius: 50%;
@@ -513,13 +513,13 @@ export default { @@ -513,13 +513,13 @@ export default {
513 if (valid) { 513 if (valid) {
514 this.buttonLoading = true; 514 this.buttonLoading = true;
515 if (this.form.id != null) { 515 if (this.form.id != null) {
516 - updateContract(this.form) 516 + updateContract(this.biangeng.procDefId,this.form)
517 .then((response) => { 517 .then((response) => {
518 this.$modal.msgSuccess("合同变更成功,已重新启动流程"); 518 this.$modal.msgSuccess("合同变更成功,已重新启动流程");
519 this.open = false; 519 this.open = false;
520 this.getList(); 520 this.getList();
521 console.log("变更列表值:", this.biangeng); 521 console.log("变更列表值:", this.biangeng);
522 - this.handleAgain2(this.biangeng); 522 + // this.handleAgain2(this.biangeng);
523 }) 523 })
524 .finally(() => { 524 .finally(() => {
525 this.buttonLoading = false; 525 this.buttonLoading = false;
@@ -604,10 +604,10 @@ export default { @@ -604,10 +604,10 @@ export default {
604 // }); 604 // });
605 // console.log(row); 605 // console.log(row);
606 }, 606 },
607 - handleAgain2(row) {  
608 - console.log(row);  
609 - startProcess(row.procDefId, row).then((res) => {});  
610 - }, 607 + // handleAgain2(row) {
  608 + // console.log(row);
  609 + // startProcess(row.procDefId, row).then((res) => {});
  610 + // },
611 handleEvaluate(row){ 611 handleEvaluate(row){
612 console.log('评价',row) 612 console.log('评价',row)
613 this.title = row.contractName 613 this.title = row.contractName
@@ -438,13 +438,14 @@ export default { @@ -438,13 +438,14 @@ export default {
438 this.$refs["form"].validate((valid) => { 438 this.$refs["form"].validate((valid) => {
439 if (valid) { 439 if (valid) {
440 this.buttonLoading = true; 440 this.buttonLoading = true;
441 - updateContract(this.form) 441 + console.log(this.biangeng.procDefId)
  442 + updateContract(this.biangeng.procDefId,this.form)
442 .then((response) => { 443 .then((response) => {
443 this.$modal.msgSuccess("合同变更成功,已重新启动流程"); 444 this.$modal.msgSuccess("合同变更成功,已重新启动流程");
444 this.open = false; 445 this.open = false;
445 this.getList(); 446 this.getList();
446 console.log("变更列表值:", this.biangeng); 447 console.log("变更列表值:", this.biangeng);
447 - this.handleAgain2(this.biangeng); 448 + // this.handleAgain2(this.biangeng);
448 }) 449 })
449 .finally(() => { 450 .finally(() => {
450 this.buttonLoading = false; 451 this.buttonLoading = false;
@@ -521,10 +522,10 @@ export default { @@ -521,10 +522,10 @@ export default {
521 // }); 522 // });
522 // console.log(row); 523 // console.log(row);
523 }, 524 },
524 - handleAgain2(row) {  
525 - console.log(row);  
526 - startProcess(row.procDefId, row).then((res) => {});  
527 - }, 525 + // handleAgain2(row) {
  526 + // console.log(row);
  527 + // startProcess(row.procDefId, row).then((res) => {});
  528 + // },
528 handleEvaluate(row){ 529 handleEvaluate(row){
529 // console.log('评价',row) 530 // console.log('评价',row)
530 this.title = row.contractName 531 this.title = row.contractName