|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="playerList">
|
|
<div class="playerList">
|
|
- <div class="top">
|
|
|
|
|
|
+ <!-- <div class="top">
|
|
<div class="playBody">
|
|
<div class="playBody">
|
|
<div class="box">
|
|
<div class="box">
|
|
<div
|
|
<div
|
|
@@ -34,7 +34,33 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
|
|
+
|
|
|
|
+ <a-card :bordered="false">
|
|
|
|
+ <a-button @click="addModules" style="margin: 0 0 15px 0" type="primary">新增模板</a-button>
|
|
|
|
+ <div>
|
|
|
|
+ <a-table
|
|
|
|
+ ref="table"
|
|
|
|
+ size="middle"
|
|
|
|
+ bordered
|
|
|
|
+ rowKey="id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :dataSource="dataSource"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ >
|
|
|
|
+ <span slot="action" slot-scope="text, record">
|
|
|
|
+ <a @click="preview(record)">预览</a>
|
|
|
|
+
|
|
|
|
+ <a-divider type="vertical" />
|
|
|
|
+
|
|
|
|
+ <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
|
|
+ <a>删除</a>
|
|
|
|
+ </a-popconfirm>
|
|
|
|
+ </span>
|
|
|
|
+ </a-table>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- table区域-end -->
|
|
|
|
+ </a-card>
|
|
<div class="previewBody" v-if="previewBody">
|
|
<div class="previewBody" v-if="previewBody">
|
|
<div class="content">
|
|
<div class="content">
|
|
<div class="content-inner">
|
|
<div class="content-inner">
|
|
@@ -50,9 +76,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { getAction, postAction } from '../../api/manage'
|
|
import playerList from './playerData'
|
|
import playerList from './playerData'
|
|
-
|
|
|
|
-console.log(playerList)
|
|
|
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -61,13 +87,48 @@ export default {
|
|
previewBody: false,
|
|
previewBody: false,
|
|
playerSrc: '',
|
|
playerSrc: '',
|
|
previewVisible: false,
|
|
previewVisible: false,
|
|
|
|
+ loading: false,
|
|
|
|
+ dataSource: [],
|
|
|
|
+ columns: [
|
|
|
|
+ {
|
|
|
|
+ title: '试玩名称',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'fileName',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '试玩分类',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'fileType',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '上传时间',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'createTime',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '操作',
|
|
|
|
+ dataIndex: 'action',
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: {
|
|
|
|
+ customRender: 'action',
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ ...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
preview(item) {
|
|
preview(item) {
|
|
console.log(item)
|
|
console.log(item)
|
|
- this.previewBody = true
|
|
|
|
- this.playerSrc = item.link
|
|
|
|
|
|
+
|
|
|
|
+ getAction('/shiwan/shiwanFileUpload/selectListByParentId', { id: item.id }).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.previewBody = true
|
|
|
|
+ this.playerSrc = res.result.filter((i) => {
|
|
|
|
+ return i.fileSuffix == 'html'
|
|
|
|
+ })[0].fileUrl
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
closePreview() {
|
|
closePreview() {
|
|
this.previewBody = false
|
|
this.previewBody = false
|
|
@@ -75,6 +136,27 @@ export default {
|
|
handleCancel() {
|
|
handleCancel() {
|
|
this.previewVisible = false
|
|
this.previewVisible = false
|
|
},
|
|
},
|
|
|
|
+ addModules() {},
|
|
|
|
+ handleDelete(item) {
|
|
|
|
+ postAction('/shiwan/shiwanFileUpload/edit', { id: item, fileStatus: '0' }).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.getPlayableList()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getPlayableList() {
|
|
|
|
+ getAction('/shiwan/shiwanFileUpload/list', {
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 1000,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.dataSource = res.result.records
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.getPlayableList()
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|