后台前端修改
This commit is contained in:
parent
f720ccea0f
commit
97dd13a2d1
@ -19,7 +19,8 @@
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
@ -32,7 +33,6 @@
|
||||
:disabled="dataListSelections.length <= 0"
|
||||
>批量删除</el-button
|
||||
>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
@ -118,8 +118,18 @@
|
||||
label="文件"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.type == 2" type="text" @click="openVideo(scope.row.media[0])">点击预览</el-button>
|
||||
<el-button v-if="scope.row.type == 1 && scope.row.media[0]" type="text" @click="openPic(scope.row.media)">点击查看</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type == 2"
|
||||
type="text"
|
||||
@click="openVideo(scope.row.media[0])"
|
||||
>点击预览</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.type == 1 && scope.row.media[0]"
|
||||
type="text"
|
||||
@click="openPic(scope.row.media)"
|
||||
>点击查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -187,13 +197,15 @@
|
||||
label="操作"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.status==1 || scope.row.status==2"
|
||||
<el-button
|
||||
v-if="scope.row.status == 1 || scope.row.status == 2"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="statusHandle(scope.row.id)"
|
||||
>上架</el-button
|
||||
>
|
||||
<el-button v-if="scope.row.status==0"
|
||||
<el-button
|
||||
v-if="scope.row.status == 0"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="statusDownHandle(scope.row.id)"
|
||||
@ -261,7 +273,11 @@
|
||||
<div class="images">
|
||||
<div v-for="(item, index) in media" :key="index" class="image-middle">
|
||||
<el-card shadow="hover" :body-style="{ padding: '10px' }">
|
||||
<img :src="media[index]" class="image" @click="goPic(media[index])"/>
|
||||
<img
|
||||
:src="media[index]"
|
||||
class="image"
|
||||
@click="goPic(media[index])"
|
||||
/>
|
||||
<div style="text-align: center; padding-top: 12px">
|
||||
<span>图{{ index + 1 }}</span>
|
||||
</div>
|
||||
@ -286,7 +302,7 @@ export default {
|
||||
return {
|
||||
dataForm: {
|
||||
key: "",
|
||||
status:'',
|
||||
status: "",
|
||||
},
|
||||
dataList: [],
|
||||
pageIndex: 1,
|
||||
@ -299,16 +315,20 @@ export default {
|
||||
dialogVisible2: false,
|
||||
videoUrl: "",
|
||||
media: [],
|
||||
options: [{
|
||||
options: [
|
||||
{
|
||||
value: 0,
|
||||
label: '正常'
|
||||
}, {
|
||||
label: "正常",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '待审核'
|
||||
}, {
|
||||
label: "待审核",
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已下架'
|
||||
}],
|
||||
label: "已下架",
|
||||
},
|
||||
],
|
||||
// value: ''
|
||||
};
|
||||
},
|
||||
@ -320,8 +340,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
this.dataForm.key='';
|
||||
this.dataForm.status='';
|
||||
this.dataForm.key = "";
|
||||
this.dataForm.status = "";
|
||||
this.pageIndex = 1;
|
||||
this.pageSize = 10;
|
||||
this.getDataList();
|
||||
@ -336,7 +356,7 @@ export default {
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
key: this.dataForm.key,
|
||||
status:this.dataForm.status
|
||||
status: this.dataForm.status,
|
||||
}),
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
@ -479,11 +499,11 @@ export default {
|
||||
});
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
this.$confirm("确认关闭?")
|
||||
.then((_) => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
.catch((_) => {});
|
||||
},
|
||||
openVideo(url) {
|
||||
this.dialogVisible = true;
|
||||
@ -494,11 +514,9 @@ export default {
|
||||
this.media = media;
|
||||
},
|
||||
goPic(url) {
|
||||
console.log('==>',url);
|
||||
console.log("==>", url);
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -530,5 +548,4 @@ export default {
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user