广告加查看详情

master
许宏杰 1 year ago
parent 8edc6d0631
commit 5721af2bb9

@ -142,6 +142,14 @@
v-hasPermi="['netEwm:poster:edit']" v-hasPermi="['netEwm:poster:edit']"
>修改</el-button >修改</el-button
> >
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleUpdate(scope.row, 'info')"
v-hasPermi="['netEwm:poster:list']"
>查看</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -198,6 +206,35 @@
</div> </div>
</el-dialog> </el-dialog>
<my-table ref="MyTable"></my-table> <my-table ref="MyTable"></my-table>
<!-- 详情弹出层 -->
<el-dialog
title="详情"
:visible.sync="openInfo"
width="800px"
append-to-body
>
<el-descriptions border :column="2">
<el-descriptions-item label="广告名称">{{
form.posterName
}}</el-descriptions-item>
<el-descriptions-item label="有效起始时间">{{
form.startTime
}}</el-descriptions-item>
<el-descriptions-item label="有效结束时间">{{
form.endTime
}}</el-descriptions-item>
</el-descriptions>
<div class="my-info">
<div class="cell-info">广告视频</div>
<div class="info-container">
<video
:src="baseUrl + form.videoPath"
class="avatar"
controls="controls"
></video>
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -217,6 +254,8 @@ export default {
name: "Poster", name: "Poster",
data() { data() {
return { return {
baseUrl: process.env.VUE_APP_BASE_API,
openInfo: false,
// //
loading: true, loading: true,
// //
@ -330,13 +369,17 @@ export default {
this.title = "添加广告"; this.title = "添加广告";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row, type) {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getPoster(id).then((response) => { getPoster(id).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; if (type == "info") {
this.title = "修改广告"; this.openInfo = true;
} else {
this.open = true;
this.title = "修改广告";
}
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */

Loading…
Cancel
Save