|
|
@@ -234,17 +234,35 @@
|
|
|
<el-tag v-if="scope.row.status === '已发布'" type="success">已发布</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="发布时间" prop="publishTime" align="center">
|
|
|
+ <el-table-column label="发布时间" prop="publishTime" align="center" width="120px">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.publishTime}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="创建时间" prop="createTime" align="center" width="120px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.createTime}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="同步状态" prop="settleStatus" align="center" width="120px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.syncStatus === '失败'" type="danger">失败</el-tag>
|
|
|
+ <el-tag v-if="scope.row.syncStatus === '成功'" type="success">成功</el-tag>
|
|
|
+ <br/>
|
|
|
+ <span>{{ scope.row.syncTime}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!--<el-table-column label="同步时间" prop="publishTime" align="center" width="120px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.syncTime}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>-->
|
|
|
<el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="text-btn-con">
|
|
|
<div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.id)">{{$t("crud.updateBtn")}}</div>
|
|
|
<div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.id)">{{$t("text.delBtn")}}</div>
|
|
|
- <el-button class="default-btn text-btn" :loading="syncVisible" @click.stop="syncHandle(scope.row.id)">同步</el-button>
|
|
|
+ <el-button class="default-btn text-btn" v-if="scope.row.publishPlatform !== '视频号'" :loading="syncVisible" @click.stop="syncHandle(scope.row, scope.$index)">同步</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -302,6 +320,7 @@ export default {
|
|
|
fansNumRange: [],
|
|
|
likeNumRange: [],
|
|
|
commNumRange: [],
|
|
|
+ dataListSelections:[]
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
@@ -316,21 +335,46 @@ export default {
|
|
|
this.getShopList()
|
|
|
},
|
|
|
methods: {
|
|
|
- syncHandle(videoId){
|
|
|
+ handleSyncBatch(){
|
|
|
+ if(this.dataListSelections.length === 0){
|
|
|
+ this.$message.warning("至少选择一条数据")
|
|
|
+ }
|
|
|
+ this.syncVisible = true
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('/promotion/promotionVideo/syncVideoDataBatch'),
|
|
|
+ method: 'POST',
|
|
|
+ data: this.$http.adornData({videoList: this.dataListSelections})
|
|
|
+ }).then(({ data }) => {
|
|
|
+ this.syncVisible = false
|
|
|
+ this.$message({
|
|
|
+ message: this.$i18n.t('publics.operation'),
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ for(let item in data){
|
|
|
+ let index = this.dataList.findIndex(d => d.id === data[item].id)
|
|
|
+ this.$set(this.dataList, index, data[item])
|
|
|
+ }
|
|
|
+ }).catch((error) =>{
|
|
|
+ this.syncVisible = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ syncHandle(row, index){
|
|
|
this.syncVisible = true
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl('/promotion/promotionVideo/syncVideoData'),
|
|
|
method: 'POST',
|
|
|
- data: this.$http.adornData({id: videoId})
|
|
|
+ data: this.$http.adornData({id: row.id})
|
|
|
}).then(({ data }) => {
|
|
|
this.syncVisible = false
|
|
|
this.$message({
|
|
|
message: this.$i18n.t('publics.operation'),
|
|
|
type: 'success',
|
|
|
})
|
|
|
- this.refreshChange()
|
|
|
+ this.$set(this.dataList, index, data);
|
|
|
+ // this.dataList[index] = data
|
|
|
}).catch((error) =>{
|
|
|
this.syncVisible = false
|
|
|
+ this.$set(this.dataList, index, data);
|
|
|
})
|
|
|
},
|
|
|
openUploadDialog(){
|