| | |
| | | </FormItem> |
| | | </Col> |
| | | <Col span="12"> |
| | | <FormItem label="权重:" :label-width="80"> |
| | | <InputNumber v-model="uploadVideoForm.weight" :min="0" :step="0.1" placeholder="请输入权重"></InputNumber> |
| | | </FormItem> |
| | | </Col> |
| | | <Col span="12"> |
| | | <FormItem label="上传类型:" :label-width="80" prpo="videoContentType"> |
| | | <Select v-model="uploadVideoForm.videoContentType" style="width:200px"> |
| | | <Option value="img">图片</Option> |
| | |
| | | </Col> |
| | | </Row> |
| | | <Row :gutter="24"> |
| | | <Col span="24"> |
| | | <FormItem label="选中商品" :label-width="80"> |
| | | </FormItem> |
| | | </Col> |
| | | </Row> |
| | | <Row :gutter="24"> |
| | | <Col span="12"> |
| | | <FormItem label="商品列表" :label-width="80"> |
| | | <Input v-model="searchGoodsForm.keyword" style="width:200px" @on-change="searchGoodsList"></Input> |
| | |
| | | :title="playVideoTitle" |
| | | width="800" |
| | | :mask-closable="false" |
| | | @close="playVideoClose" |
| | | @on-cancel="playVideoClose" |
| | | > |
| | | <div class="video-warp"> |
| | | <video :src="playVideoUrl" autoplay controls style="width: 768px;height: 432px"/> |
| | | </div> |
| | | <div slot="footer"> |
| | | <Button type="text" @click="playVideoClose">关闭</Button> |
| | | <Button type="text" @click="playVideoClose">关闭1</Button> |
| | | </div> |
| | | </Modal> |
| | | |
| | |
| | | </Row> |
| | | </Col> |
| | | </Row> |
| | | |
| | | </Form-item> |
| | | <Form-item v-if="detail.videoContentType === 'img'" :label-width="0"> |
| | | <div style="display: flex;flex-direction: row;flex-wrap: wrap"> |
| | |
| | | <Button type="success" size="small" style="margin-right: 5px" v-else-if="row.status === '0'" |
| | | @click="videoUp(row)">上架 |
| | | </Button> |
| | | <!-- 添加删除按钮 --> |
| | | <Button type="error" size="small" style="margin-right: 5px" v-if="row.status === '0'" |
| | | @click="deleteVideo(row)">删除 |
| | | </Button> |
| | | <Button type="error" size="small" style="margin-right: 5px" |
| | | @click="openComment(row)"> |
| | | 查看评论 |
| | |
| | | <Col> |
| | | <FormItem :label-width="70" label="开始时间:" prop="startTime"> |
| | | <DatePicker |
| | | :v-model="commentForm.startTime" |
| | | v-model="commentForm.startTime" |
| | | type="datetime" |
| | | placeholder="选择开始时间" |
| | | style="width: 120px" |
| | |
| | | <Col> |
| | | <FormItem :label-width="70" label="结束时间:" prop="endTime"> |
| | | <DatePicker |
| | | :v-model="commentForm.endTime" |
| | | v-model="commentForm.endTime" |
| | | type="datetime" |
| | | placeholder="选择结束时间" |
| | | style="width: 120px" |
| | |
| | | </Form> |
| | | |
| | | <div slot="footer"> |
| | | <Button type="text" @click="closeVideoDown">关闭</Button> |
| | | <Button type="primary" @click="videoDown">确认</Button> |
| | | <Button type="text" @click="closeComment">关闭</Button> |
| | | </div> |
| | | <Table |
| | | :loading="commentLoading" |
| | |
| | | show-sizer |
| | | ></Page> |
| | | </Row> |
| | | <div slot="footer"> |
| | | |
| | | </div> |
| | | </Modal> |
| | | |
| | | <Modal |
| | |
| | | publish, |
| | | updatePublish, |
| | | getCommentPage, |
| | | removeById |
| | | removeById, |
| | | deleteVideoById |
| | | } from "@/api/video"; |
| | | import {getVideoTagList, recommend, videoGoodsEsPage} from "@/api/videoTag"; |
| | | import {addPrizeNum} from "@/api/activity-prize"; |
| | | import {getFilePreview, getSts} from "@/api/file"; |
| | | import Editor from '@/components/editor/index.vue' |
| | | import GoodsExpandRow from '@/views/video/GoodsExpandRow' |
| | |
| | | showListImages: [], |
| | | tags: [], |
| | | fileInfo: {}, |
| | | goodsList: [] |
| | | |
| | | goodsList: [], |
| | | weight: 0 // 添加权重字段,默认值为0 |
| | | }, |
| | | videoDownForm: { |
| | | id: '', |
| | |
| | | this.getTags('') |
| | | }, |
| | | methods: { |
| | | closeComment(){ |
| | | this.showVideoComment = false |
| | | }, |
| | | commentChangePage(page) { |
| | | this.commentForm.pageNumber = page |
| | | this.commentPage() |
| | |
| | | this.commentPage() |
| | | }, |
| | | commentPage(){ |
| | | //转换为字符串 |
| | | let startTime = this.formatDate(this.commentForm.startTime); |
| | | let endTime = this.formatDate(this.commentForm.endTime); |
| | | let from = {...this.commentForm}; |
| | | from.startTime = startTime; |
| | | from.endTime = endTime; |
| | | this.commentLoading = true; |
| | | getCommentPage(this.commentForm).then(res =>{ |
| | | getCommentPage(from).then(res =>{ |
| | | this.commentLoading = false; |
| | | if (res.code === 200){ |
| | | this.commentData = res.data; |
| | |
| | | // this.selectCount = selection.length |
| | | }, |
| | | openComment(row){ |
| | | this.$refs.commentForm.resetFields(); |
| | | console.log(row) |
| | | this.commentForm.videoId = row.id; |
| | | this.showVideoComment = true; |
| | |
| | | showListImages: [], |
| | | tags: [], |
| | | fileInfo: {}, |
| | | goodsList: [] |
| | | goodsList: [], |
| | | weight: 0 // 添加权重字段,默认值为0 |
| | | } |
| | | |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | this.uploadVideoForm = row |
| | | // 保留原有的row数据,但要确保weight字段存在 |
| | | this.uploadVideoForm = Object.assign(this.uploadVideoForm, row); |
| | | // 确保weight字段有默认值 |
| | | if (this.uploadVideoForm.weight === undefined || this.uploadVideoForm.weight === null) { |
| | | this.uploadVideoForm.weight = 0; |
| | | } |
| | | console.log("打印值",this.uploadVideoForm) |
| | | this.uploadVideoForm.fileInfo= {}; |
| | | this.uploadVideoForm.videoImgs = JSON.parse(this.uploadVideoForm.videoImgs) |
| | |
| | | this.upLoadVideoShow = false; |
| | | }, |
| | | submitVideoUpload() { |
| | | console.log(this.uploadVideoForm.coverUrl) |
| | | if (this.uploadVideoForm.coverUrl === null || this.uploadVideoForm.coverUrl === undefined) { |
| | | this.$Message.error('标题不能为空'); |
| | | return; |
| | | } |
| | | // if (this.uploadVideoForm.coverUrl === null || this.uploadVideoForm.coverUrl === undefined) { |
| | | // this.$Message.error('封面不能为空'); |
| | | // return; |
| | | // } |
| | | this.uploadVideoForm.goodsList = this.uploadVideoForm.goodsList.filter(item => { |
| | | return item.goodsNum > 0; |
| | | }) |
| | |
| | | showListImages: [], |
| | | tags: [], |
| | | fileInfo: {}, |
| | | goodsList: [] |
| | | goodsList: [], |
| | | weight: 0 // 添加权重字段,默认值为0 |
| | | } |
| | | recommend({ |
| | | searchType: "HOT" |
| | |
| | | console.log(this.auditingForm, "sb") |
| | | this.$refs.auditingForm.validate((valid) => { |
| | | if (valid) { |
| | | let currentVideoId = this.auditingForm.id |
| | | auditingVideo(this.auditingForm).then(res => { |
| | | this.$Message.success("审核完成") |
| | | this.closeAuditing() |
| | | this.getDataList() |
| | | let param = { |
| | | addType:"USER_PUBLISH_EXAMINE", |
| | | userId:this.detail.authorId, |
| | | extend:"" |
| | | } |
| | | param.extend = JSON.stringify({ |
| | | videoId:currentVideoId |
| | | }) |
| | | addPrizeNum(param) |
| | | }) |
| | | } |
| | | }) |
| | |
| | | this.searchGoodsForm.pageSize = v; |
| | | this.getGoodsDataList(); |
| | | }, |
| | | // 添加删除视频方法 |
| | | deleteVideo(row) { |
| | | this.$Modal.confirm({ |
| | | title: "操作确认", |
| | | content: "您确认要删除视频【 " + row.title + "】吗? 删除后将无法恢复!", |
| | | loading: true, |
| | | onOk: () => { |
| | | deleteVideoById(row.id).then(res => { |
| | | this.$Modal.remove(); |
| | | if (res.code === 200) { |
| | | this.$Message.success("视频删除成功"); |
| | | this.getDataList(); |
| | | } else { |
| | | this.$Message.error(res.msg || "删除失败"); |
| | | } |
| | | }).catch(err => { |
| | | this.$Modal.remove(); |
| | | this.$Message.error("删除失败"); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |