|
@@ -6,7 +6,7 @@
|
|
|
<div class="search-bar" style="width:100%;display:flex">
|
|
|
<span style="line-height:35px;margin-left:15px">账户选择:</span>
|
|
|
<treeselect :appId.sync="appId" :multiple="false" />
|
|
|
- <a-button type="primary" style="margin-left:10px" @click="addUser">搜索</a-button>
|
|
|
+ <a-button type="primary" style="margin-left:10px" @click="(ipagination.current=1);addUser()">搜索</a-button>
|
|
|
</div>
|
|
|
</a-row>
|
|
|
</a-row>
|
|
@@ -16,16 +16,12 @@
|
|
|
<div style="display:flex;margin:0 0 20px 0">
|
|
|
<a-input placeholder="请输出要查找的创意名称" style="width:300px;" v-model="keyWord" />
|
|
|
<a-button type="primary" style="margin-left:10px" @click="addUserKey">搜索</a-button>
|
|
|
+ <a-button type="primary" style="margin-left:10px" @click="clickAgain" v-if="selectedRowKeys.length>0">一键重提
|
|
|
+ </a-button>
|
|
|
</div>
|
|
|
|
|
|
- <a-table
|
|
|
- :columns="columns"
|
|
|
- :dataSource="dataList"
|
|
|
- bordered
|
|
|
- :loading="loading"
|
|
|
- size="middle"
|
|
|
- :pagination="ipagination"
|
|
|
- >
|
|
|
+ <a-table :columns="columns" :dataSource="dataList" bordered :loading="loading" size="middle"
|
|
|
+ :pagination="ipagination" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
|
|
<div slot="videoUrl" slot-scope="videoUrl">
|
|
|
<video class="video" :src="videoUrl" controls="controls" style="height:200px;width:112.5px">
|
|
|
您的浏览器不支持 video 标签。
|
|
@@ -50,197 +46,261 @@
|
|
|
</a-card>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- <a-modal
|
|
|
- :title="editTitle"
|
|
|
- :visible="visible"
|
|
|
- @ok="handleOk"
|
|
|
- :confirmLoading="confirmLoading"
|
|
|
- @cancel="handleCancel"
|
|
|
- >
|
|
|
+ <a-modal :title="editTitle" :visible="visible" @ok="handleOk" :confirmLoading="confirmLoading"
|
|
|
+ @cancel="handleCancel">
|
|
|
<a-textarea v-model="editWord" autosize />
|
|
|
</a-modal>
|
|
|
+ <!-- <a-modal v-model="visible" title="错误信息" onOk="handleOk" :footer="null">
|
|
|
+ <div v-if="visibleData">
|
|
|
+ 修改条数:{{ visibleData.totalCount }} 失败条数:{{
|
|
|
+ visibleData.failCount
|
|
|
+ }}
|
|
|
+ <div style="margin-top:20px">
|
|
|
+ <p v-for="(item, index) of visibleData.failInfo" :key="index">
|
|
|
+ <span>名称:{{ item.campaignName?item.campaignName:item.unitName }}</span><br />
|
|
|
+ <span>错误信息:{{ item.message }}</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-modal> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import moment from 'moment'
|
|
|
-import { getRefuseCreative, updateCreative, selectByCreateName } from '@api/statistics'
|
|
|
-import axios from 'axios'
|
|
|
-import EditableCell from './components/EditableCell'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
-
|
|
|
-import Treeselect from './components/Treeselect.vue'
|
|
|
+ import moment from 'moment'
|
|
|
+ import {
|
|
|
+ getRefuseCreative,
|
|
|
+ updateCreative,
|
|
|
+ selectByCreateName
|
|
|
+ } from '@api/statistics'
|
|
|
+ import axios from 'axios'
|
|
|
+ import EditableCell from './components/EditableCell'
|
|
|
+ import {
|
|
|
+ mapGetters
|
|
|
+ } from 'vuex'
|
|
|
+ import {
|
|
|
+ deleteAction,
|
|
|
+ getAction,
|
|
|
+ postAction
|
|
|
+ } from '@/api/manage'
|
|
|
+ import Treeselect from './components/Treeselect.vue'
|
|
|
|
|
|
-import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
|
|
|
-const columns = [
|
|
|
- {
|
|
|
- title: '账号Id',
|
|
|
- dataIndex: 'accountId',
|
|
|
- key: 'accountId',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '计划Id',
|
|
|
- dataIndex: 'campaignId',
|
|
|
- key: 'campaignId',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '广告组id',
|
|
|
- dataIndex: 'unitId',
|
|
|
- key: 'unitId',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '创意id',
|
|
|
- dataIndex: 'creativeId',
|
|
|
- key: 'photoClick',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '创意名称',
|
|
|
- dataIndex: 'creativeName',
|
|
|
- key: 'creativeName',
|
|
|
- align: 'left',
|
|
|
- scopedSlots: { customRender: 'creativeName' }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '视频',
|
|
|
- dataIndex: 'videoUrl',
|
|
|
- key: 'videoUrl',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'videoUrl' }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '封面',
|
|
|
- dataIndex: 'coverUrl',
|
|
|
- key: 'coverUrl',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'coverUrl' }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '拒绝原因',
|
|
|
- dataIndex: 'reviewDetail',
|
|
|
- key: 'reviewDetail',
|
|
|
- align: 'left'
|
|
|
- },
|
|
|
+ import {
|
|
|
+ stopOtherVideo,
|
|
|
+ closeAllVideoFun
|
|
|
+ } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
|
|
|
+ const columns = [{
|
|
|
+ title: '账号Id',
|
|
|
+ dataIndex: 'accountId',
|
|
|
+ key: 'accountId',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '计划Id',
|
|
|
+ dataIndex: 'campaignId',
|
|
|
+ key: 'campaignId',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '广告组id',
|
|
|
+ dataIndex: 'unitId',
|
|
|
+ key: 'unitId',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '创意id',
|
|
|
+ dataIndex: 'creativeId',
|
|
|
+ key: 'photoClick',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '创意名称',
|
|
|
+ dataIndex: 'creativeName',
|
|
|
+ key: 'creativeName',
|
|
|
+ align: 'left',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'creativeName'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '视频',
|
|
|
+ dataIndex: 'videoUrl',
|
|
|
+ key: 'videoUrl',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'videoUrl'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '封面',
|
|
|
+ dataIndex: 'coverUrl',
|
|
|
+ key: 'coverUrl',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'coverUrl'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '拒绝原因',
|
|
|
+ dataIndex: 'reviewDetail',
|
|
|
+ key: 'reviewDetail',
|
|
|
+ align: 'left'
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- title: '广告语',
|
|
|
- dataIndex: 'description',
|
|
|
- key: 'description',
|
|
|
- align: 'left',
|
|
|
- scopedSlots: { customRender: 'description' }
|
|
|
- }
|
|
|
-]
|
|
|
+ {
|
|
|
+ title: '广告语',
|
|
|
+ dataIndex: 'description',
|
|
|
+ key: 'description',
|
|
|
+ align: 'left',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'description'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
|
|
|
-export default {
|
|
|
- name: 'refuse-data',
|
|
|
- components: {
|
|
|
- EditableCell,
|
|
|
- Treeselect
|
|
|
- },
|
|
|
+ export default {
|
|
|
+ name: 'refuse-data',
|
|
|
+ components: {
|
|
|
+ EditableCell,
|
|
|
+ Treeselect
|
|
|
+ },
|
|
|
|
|
|
- data: function() {
|
|
|
- return {
|
|
|
- title: '被拒创意列表',
|
|
|
- appId: null,
|
|
|
- loading: false,
|
|
|
- columns,
|
|
|
- dataList: [],
|
|
|
- keyWord: '',
|
|
|
- editTitle: '',
|
|
|
- confirmLoading: false,
|
|
|
- visible: false,
|
|
|
- editWord: '',
|
|
|
- nowData: null,
|
|
|
- ipagination: {
|
|
|
- current: 1,
|
|
|
- pageSize: 10,
|
|
|
- showTotal: (total, range) => {
|
|
|
- return range[0] + '-' + range[1] + ' 共' + total + '条'
|
|
|
- },
|
|
|
- showQuickJumper: true,
|
|
|
- // showSizeChanger: true,
|
|
|
- total: 0,
|
|
|
- onChange: current => {
|
|
|
- // 切换分页时的回调,
|
|
|
- // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
|
|
|
- this.ipagination.current = current
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ title: '被拒创意列表',
|
|
|
+ appId: null,
|
|
|
+ loading: false,
|
|
|
+ columns,
|
|
|
+ dataList: [],
|
|
|
+ keyWord: '',
|
|
|
+ editTitle: '',
|
|
|
+ confirmLoading: false,
|
|
|
+ visible: false,
|
|
|
+ editWord: '',
|
|
|
+ nowData: null,
|
|
|
+ selectedRowKeys: [],
|
|
|
+ selectedRowKeysValue: [],
|
|
|
+ ipagination: {
|
|
|
+ current: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ showTotal: (total, range) => {
|
|
|
+ return range[0] + '-' + range[1] + ' 共' + total + '条'
|
|
|
+ },
|
|
|
+ showQuickJumper: true,
|
|
|
+ // showSizeChanger: true,
|
|
|
+ total: 0,
|
|
|
+ onChange: current => {
|
|
|
+ // 切换分页时的回调,
|
|
|
+ // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
|
|
|
+ this.ipagination.current = current
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ this.selectedRowKeysValue = []
|
|
|
+ this.addUser()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- filters: {},
|
|
|
- methods: {
|
|
|
- handleOk(e) {
|
|
|
- this.confirmLoading = true
|
|
|
- var params = {}
|
|
|
- params.accountId = this.nowData.accountId
|
|
|
- params.campaignId = this.nowData.campaignId
|
|
|
- params.unitId = this.nowData.unitId
|
|
|
- params.creativeId = this.nowData.creativeId
|
|
|
- params.creativeName = this.editTitle == '创意名称修改' ? this.editWord : this.nowData.creativeName
|
|
|
- params.description = this.editTitle == '广告语修改' ? this.editWord : this.nowData.description
|
|
|
- updateCreative(params).then(res => {
|
|
|
- if (res.code == 0) {
|
|
|
- this.addUser()
|
|
|
- this.visible = false
|
|
|
- this.confirmLoading = false
|
|
|
- } else {
|
|
|
- this.$message.error(res.message)
|
|
|
- this.visible = false
|
|
|
- this.confirmLoading = false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- handleCancel(e) {
|
|
|
- this.visible = false
|
|
|
},
|
|
|
- onCellChange(item, dataIndex) {
|
|
|
- this.editWord = item[dataIndex]
|
|
|
- this.editTitle = dataIndex == 'creativeName' ? '创意名称修改' : '广告语修改'
|
|
|
- this.nowData = item
|
|
|
- this.visible = true
|
|
|
+ filters: {},
|
|
|
+ watch: {
|
|
|
+ appId(n, o) {
|
|
|
+ console.log(n, o)
|
|
|
+ if (n != o) {
|
|
|
+ this.ipagination.current = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- moment,
|
|
|
- ...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
- addUser() {
|
|
|
- this.loading = true
|
|
|
- var params = {}
|
|
|
- params.accountId = this.appId + ''
|
|
|
- if (this.appId) {
|
|
|
- getRefuseCreative(params).then(res => {
|
|
|
+ methods: {
|
|
|
+ clickAgain() {
|
|
|
+ var params = {}
|
|
|
+ params.accountId = this.appId + ''
|
|
|
+ params.creativeArr = this.selectedRowKeysValue
|
|
|
+ postAction('/MaterialRefuse/batchUpdateCreative', params).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.selectedRowKeysValue = []
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ this.addUser()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onSelectChange(selectedRowKeys, selectionRows) {
|
|
|
+ this.selectedRowKeys = selectedRowKeys
|
|
|
+ this.selectedRowKeysValue = selectionRows.map(item => {
|
|
|
+ return {
|
|
|
+ description: item.description,
|
|
|
+ creativeId: item.creativeId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // this.selectedRowKeysValue.length > 0 ? this.selectedRowKeysValue :
|
|
|
+ },
|
|
|
+ handleOk(e) {
|
|
|
+ this.confirmLoading = true
|
|
|
+ var params = {}
|
|
|
+ params.accountId = this.nowData.accountId
|
|
|
+ params.campaignId = this.nowData.campaignId
|
|
|
+ params.unitId = this.nowData.unitId
|
|
|
+ params.creativeId = this.nowData.creativeId
|
|
|
+ params.creativeName = this.editTitle == '创意名称修改' ? this.editWord : this.nowData.creativeName
|
|
|
+ params.description = this.editTitle == '广告语修改' ? this.editWord : this.nowData.description
|
|
|
+ updateCreative(params).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
- this.dataList = res.data.map((v, index) => {
|
|
|
- return {
|
|
|
- ...v,
|
|
|
- key: index
|
|
|
- }
|
|
|
- })
|
|
|
- this.list = this.dataList
|
|
|
- this.loading = false
|
|
|
- this.ipagination.total = this.dataList.length
|
|
|
+ this.addUser()
|
|
|
+ this.visible = false
|
|
|
+ this.confirmLoading = false
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ this.visible = false
|
|
|
+ this.confirmLoading = false
|
|
|
}
|
|
|
})
|
|
|
- } else {
|
|
|
- this.$message.error('请选择账户')
|
|
|
+ },
|
|
|
+ handleCancel(e) {
|
|
|
+ this.visible = false
|
|
|
+ },
|
|
|
+ onCellChange(item, dataIndex) {
|
|
|
+ this.editWord = item[dataIndex]
|
|
|
+ this.editTitle = dataIndex == 'creativeName' ? '创意名称修改' : '广告语修改'
|
|
|
+ this.nowData = item
|
|
|
+ this.visible = true
|
|
|
+ },
|
|
|
+ moment,
|
|
|
+ ...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
+ addUser() {
|
|
|
+ this.loading = true
|
|
|
+ var params = {}
|
|
|
+ params.accountId = this.appId + ''
|
|
|
+ params.pageSize = this.ipagination.pageSize
|
|
|
+ params.pageNo = this.ipagination.current
|
|
|
+ if (this.appId) {
|
|
|
+ getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.dataList = res.result.records.map((v, index) => {
|
|
|
+ return {
|
|
|
+ ...v,
|
|
|
+ key: index
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.list = this.dataList
|
|
|
+ this.loading = false
|
|
|
+ this.ipagination.total = res.result.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('请选择账户')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ addUserKey() {
|
|
|
+ this.dataList = this.list.filter(item => {
|
|
|
+ return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- addUserKey() {
|
|
|
- this.dataList = this.list.filter(item => {
|
|
|
- return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
|
|
|
- })
|
|
|
+ watch: {},
|
|
|
+ distoryed() {},
|
|
|
+ updated() {
|
|
|
+ stopOtherVideo()
|
|
|
+ },
|
|
|
+ mounted: function () {
|
|
|
+ this.$nextTick(() => {})
|
|
|
}
|
|
|
- },
|
|
|
- watch: {},
|
|
|
- distoryed() {},
|
|
|
- updated() {
|
|
|
- stopOtherVideo()
|
|
|
- },
|
|
|
- mounted: function() {
|
|
|
- this.$nextTick(() => {
|
|
|
- })
|
|
|
}
|
|
|
-}
|
|
|
-</script>
|
|
|
+</script>
|