Pārlūkot izejas kodu

1、推广管理

huangmp 2 gadi atpakaļ
vecāks
revīzija
271c903a22
1 mainītis faili ar 33 papildinājumiem un 16 dzēšanām
  1. 33 16
      src/views/modules/promotion/promotionVideo.vue

+ 33 - 16
src/views/modules/promotion/promotionVideo.vue

@@ -93,25 +93,25 @@
           row-class-name="table-row"
           style="width: 100%">
           <!-- 视频ID -->
-          <el-table-column label="视频ID" prop="id" align="center">
+          <el-table-column label="视频ID" prop="id" align="center" width="70px">
             <template slot-scope="scope">
               <span>{{ scope.row.id}}</span>
             </template>
           </el-table-column>
           <!-- 推广人名称 -->
-          <el-table-column label="推广人" prop="tgUserName" align="center">
+          <el-table-column label="推广人" prop="tgUserName" align="center" width="70px">
             <template slot-scope="scope">
               <span>{{ scope.row.tgUserName}}</span>
             </template>
           </el-table-column>
           <!-- 店铺名称 -->
-          <el-table-column label="店铺" prop="shopName" align="center">
+          <el-table-column label="店铺" prop="shopName" align="center" width="80px">
             <template slot-scope="scope">
               <span>{{ scope.row.shopName}}</span>
             </template>
           </el-table-column>
           <!-- 博主ID -->
-          <el-table-column label="博主" prop="upId" align="center" width="150px">
+          <el-table-column label="博主" prop="upId" align="center" width="170px">
             <template slot-scope="scope">
               <span>{{ scope.row.upId}}</span>
               <br/>
@@ -119,12 +119,12 @@
             </template>
           </el-table-column>
           <!-- 粉丝数 -->
-          <el-table-column label="粉丝数" prop="fansNum" align="center">
+          <el-table-column label="粉丝数" prop="fansNum" align="center" width="70px">
             <template slot-scope="scope">
               <span>{{ scope.row.fansNum}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="点赞数" prop="likeNum" align="center">
+          <el-table-column label="点赞数" prop="likeNum" align="center" width="70px">
             <template slot-scope="scope">
               <span>{{ scope.row.likeNum}}</span>
             </template>
@@ -142,7 +142,7 @@
             </template>
           </el-table-column>-->
           <!-- 评论数 -->
-          <el-table-column label="评论数" prop="commNum" align="center">
+          <el-table-column label="评论数" prop="commNum" align="center" width="70px">
             <template slot-scope="scope">
               <span>{{ scope.row.commNum}}</span>
             </template>
@@ -162,13 +162,13 @@
           <!-- 总点赞数 -->
 
           <!-- 总播放数 -->
-          <el-table-column label="播放数" prop="playNum" align="center">
+          <el-table-column label="播放数" prop="playNum" align="center" width="70px">
             <template slot-scope="scope">
               <span>{{ scope.row.playNum}}</span>
             </template>
           </el-table-column>
           <!-- 发布平台 -->
-          <el-table-column label="发布平台" prop="publishPlatform" align="center">
+          <el-table-column label="发布平台" prop="publishPlatform" align="center" width="80px">
             <template slot-scope="scope">
               <span>{{ scope.row.publishPlatform}}</span>
             </template>
@@ -184,7 +184,7 @@
             </template>
           </el-table-column>
           <!-- 是否付费,0寄拍,1付费 -->
-          <el-table-column label="寄拍/付费" prop="payType" align="center">
+          <el-table-column label="寄拍/付费" prop="payType" align="center" width="80px">
             <template slot-scope="scope">
               <el-tag v-if="scope.row.payType === '付费'" type="danger">付费:{{scope.row.payAmt}}</el-tag>
               <el-tag v-if="scope.row.payType === '寄拍'" type="primary">寄拍:{{scope.row.payAmt}}</el-tag>
@@ -196,13 +196,13 @@
             </template>
           </el-table-column>-->
           <!-- 结算状态 -->
-          <el-table-column label="结算状态" prop="settleStatus" align="center">
+          <el-table-column label="结算状态" prop="settleStatus" align="center" width="90px">
             <template slot-scope="scope">
               <el-tag v-if="scope.row.settleStatus === '待结算'" type="danger">待结算</el-tag>
               <el-tag v-if="scope.row.settleStatus === '已结算'" type="success">已结算</el-tag>
             </template>
           </el-table-column>
-          <el-table-column label="发布状态" prop="status" align="center">
+          <el-table-column label="发布状态" prop="status" align="center" width="90px">
             <template slot-scope="scope">
               <el-tag v-if="scope.row.status === '待发布'" type="warning">待发布</el-tag>
               <el-tag v-if="scope.row.status === '已发布'" type="success">已发布</el-tag>
@@ -216,10 +216,9 @@
           <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>
+                <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>
                 </div>
             </template>
           </el-table-column>
@@ -259,6 +258,7 @@ export default {
         currentPage: 1, // 当前页数
         pageSize: 10 // 每页显示多少条
       },
+      syncVisible: false,
       shopId: this.$store.state.user.shopId,
       searchForm: {}, // 搜索
       dataListLoading: false,
@@ -290,6 +290,23 @@ export default {
     this.getShopList()
   },
   methods: {
+    syncHandle(videoId){
+      this.syncVisible = true
+      this.$http({
+        url: this.$http.adornUrl('/promotion/promotionVideo/syncVideoData'),
+        method: 'POST',
+        data: this.$http.adornData({id: videoId})
+      }).then(({ data }) => {
+        this.syncVisible = false
+        this.$message({
+          message: this.$i18n.t('publics.operation'),
+          type: 'success',
+        })
+        this.refreshChange()
+      }).catch((error) =>{
+        this.syncVisible = false
+      })
+    },
     openUploadDialog(){
       this.uploadVisible = true
       this.$nextTick(() => {