|
@ -65,8 +65,8 @@ |
|
|
<el-col class="step_1">第二步:选择内容</el-col> |
|
|
<el-col class="step_1">第二步:选择内容</el-col> |
|
|
<el-col class="step_form"> |
|
|
<el-col class="step_form"> |
|
|
<div class="step_select"> |
|
|
<div class="step_select"> |
|
|
<div>已选内容: 0</div> |
|
|
|
|
|
<div>内容总时长:0.00s</div> |
|
|
|
|
|
|
|
|
<div>已选内容: {{ selectTotal }}</div> |
|
|
|
|
|
<div>内容总时长:{{ selectTotalTime }}s</div> |
|
|
<div>添加BGM:<el-button class="step_select_audio" type="primary" round @click="selectAudioCont(0,-1)">选择文件</el-button> |
|
|
<div>添加BGM:<el-button class="step_select_audio" type="primary" round @click="selectAudioCont(0,-1)">选择文件</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -207,7 +207,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" round @click="listEditVisible = false">保 存</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" round @click="saveEdit">保 存</el-button> |
|
|
<el-button round @click="listEditVisible = false">取 消</el-button> |
|
|
<el-button round @click="listEditVisible = false">取 消</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
@ -394,7 +394,10 @@ export default { |
|
|
activeItemIndex: 0, |
|
|
activeItemIndex: 0, |
|
|
release_id: null, // 发布编辑 |
|
|
release_id: null, // 发布编辑 |
|
|
releaseInfo: null, |
|
|
releaseInfo: null, |
|
|
isEditMaterial: [] |
|
|
|
|
|
|
|
|
isEditMaterial: [], |
|
|
|
|
|
selectTotal: 0, |
|
|
|
|
|
selectTotalTime: 0.00, |
|
|
|
|
|
selectEditD: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
@ -408,6 +411,7 @@ export default { |
|
|
created() { |
|
|
created() { |
|
|
this.selectedMaterial = [] |
|
|
this.selectedMaterial = [] |
|
|
this.selectedMaterial = JSON.parse(localStorage.getItem('selectedMaterial')) |
|
|
this.selectedMaterial = JSON.parse(localStorage.getItem('selectedMaterial')) |
|
|
|
|
|
this.getSelectTotal() |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
if (this.$route.path === '/release') { |
|
|
if (this.$route.path === '/release') { |
|
@ -423,6 +427,26 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
getSelectTotal() { |
|
|
|
|
|
if (this.selectedMaterial) { |
|
|
|
|
|
const result = [] |
|
|
|
|
|
this.selectedMaterial.some(item => { |
|
|
|
|
|
if (item.material_type == 0) { |
|
|
|
|
|
if (item.showAudioName && item.showAudioUrl) { |
|
|
|
|
|
result.push(item) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.selectTotal = this.selectedMaterial.length + result.length |
|
|
|
|
|
console.log(this.selectedMaterial) |
|
|
|
|
|
console.log(this.selectedMaterial.length) |
|
|
|
|
|
console.log(result.length) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
saveEdit() { |
|
|
|
|
|
this.listEditVisible = false |
|
|
|
|
|
this.getSelectTotal() |
|
|
|
|
|
}, |
|
|
// 编辑带来 release_id |
|
|
// 编辑带来 release_id |
|
|
editRelease() { |
|
|
editRelease() { |
|
|
const release_id = JSON.parse(localStorage.getItem('releaseId')) |
|
|
const release_id = JSON.parse(localStorage.getItem('releaseId')) |
|
@ -468,6 +492,7 @@ export default { |
|
|
FetchFindMaterialById(params).then(res => { |
|
|
FetchFindMaterialById(params).then(res => { |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
this.selectedMaterial = res.data |
|
|
this.selectedMaterial = res.data |
|
|
|
|
|
|
|
|
// 判断拿ranking来排序 |
|
|
// 判断拿ranking来排序 |
|
|
this.selectedMaterial.filter((item, index) => { |
|
|
this.selectedMaterial.filter((item, index) => { |
|
|
this.isEditMaterial.some(items => { |
|
|
this.isEditMaterial.some(items => { |
|
@ -483,10 +508,11 @@ export default { |
|
|
item.showTime = this.isEditMaterial[index].duration |
|
|
item.showTime = this.isEditMaterial[index].duration |
|
|
item.showAnimation = this.isEditMaterial[index].effect |
|
|
item.showAnimation = this.isEditMaterial[index].effect |
|
|
item.showAnimationName = this.animationData[item.showAnimation].name |
|
|
item.showAnimationName = this.animationData[item.showAnimation].name |
|
|
item.showAudioUrl = this.isEditMaterial[index].bgm_path |
|
|
|
|
|
|
|
|
item.showAudioUrl = this.isEditMaterial[index].bgm_url |
|
|
item.showAudioName = this.isEditMaterial[index].bgm_name |
|
|
item.showAudioName = this.isEditMaterial[index].bgm_name |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
this.getSelectTotal() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
// 设备list |
|
|
// 设备list |
|
@ -793,6 +819,7 @@ export default { |
|
|
this.selectedMaterial = [] |
|
|
this.selectedMaterial = [] |
|
|
this.selectedMaterial.push(this.audioListData[index]) |
|
|
this.selectedMaterial.push(this.audioListData[index]) |
|
|
} |
|
|
} |
|
|
|
|
|
this.getSelectTotal() |
|
|
// localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) |
|
|
// localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) |
|
|
} else { |
|
|
} else { |
|
|
this.selectedEditData[this.thisEditIndex].showAudioName = this.audioListData[index].material_name |
|
|
this.selectedEditData[this.thisEditIndex].showAudioName = this.audioListData[index].material_name |
|
@ -891,6 +918,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) |
|
|
// localStorage.setItem('selectedMaterial', JSON.stringify(this.selectedMaterial)) |
|
|
|
|
|
this.getSelectTotal() |
|
|
this.mulitText = '多选' |
|
|
this.mulitText = '多选' |
|
|
}, |
|
|
}, |
|
|
// 素材选择 - 取消按钮 |
|
|
// 素材选择 - 取消按钮 |
|
|