使用vue开发实现XixunPlayer的功能.
XixunPlayer 查询播放器当前存储的节目
/**
* @Author: 858834013@qq.com
* @Name: getProgramTask
* @Date: 2022-04-26
* @Desc: XixunPlayer 查询播放器当前存储的节目
*/
<template>
<div>
<el-button class="mb20" @click="getdata" size="mini" type="primary">查询播放器当前存储的节目</el-button>
<el-dialog
title="查询播放器当前存储的节目"
:visible.sync="dialogVisible"
width="60%">
<div class="screenshots">
<el-table
:data="data"
stripe
style="width: 100%">
<el-table-column
prop="_id"
label="节目id"
>
</el-table-column>
</el-table>
</div>
</el-dialog>
</div>
</template>
<script>
import { getdata } from '@/api/led/led'
export default {
name: 'getProgramTask',
components: {},
data () {
return {
dialogVisible: false,
name: '',
data: []
}
},
props: {
id: {
type: String,
default () {
return ''
}
}
},
methods: {
getdata () {
var that = this
getdata(that.id, {
type: 'getProgramTask'
}).then(function (res) {
console.log(JSON.parse(res.data))
that.data = JSON.parse(res.data).task.items
that.dialogVisible = true
})
},
}
}
</script>