Ver Fonte

修改头条视频素材

朱鑫波 há 3 anos atrás
pai
commit
a650a52ac8

+ 27 - 0
src/mixins/JeecgListMixin.js

@@ -94,6 +94,7 @@ export const JeecgListMixin = {
         }
     },
     async loadData(arg) {
+      this.cancel()
       this.spinning= true
       this.dataSource = []
       if (!this.url.list) {
@@ -114,6 +115,32 @@ export const JeecgListMixin = {
       if(params.stateDate){
         params.stateDate = moment(params.stateDate).format('YYYY-MM-DD')
       }
+
+      if(params.videoStatus == 0){
+        params.syncKuaishou = null
+        params.syncBytedance = null
+      }else if(params.videoStatus == 1){
+        params.syncKuaishou = 1
+        params.syncBytedance = 1
+      }else if(params.videoStatus == '2'){
+        params.syncKuaishou = 1
+        params.syncBytedance = null
+      }else if(params.videoStatus == 3){
+        params.syncKuaishou = null
+        params.syncBytedance = 1
+      }else if(params.videoStatus == 4){
+        params.syncKuaishou = 2
+        params.syncBytedance = null
+      }else if(params.videoStatus == 5){
+        params.syncKuaishou = null
+        params.syncBytedance = 2
+      }else if(params.videoStatus == 6){
+        params.syncKuaishou = 2
+        params.syncBytedance = 2
+      }else{
+        params.syncKuaishou = null
+        params.syncBytedance = null
+      }
       // if(params.endDate){
       //   params.endDate = moment(params.endDate).format('YYYY-MM-DD')
       // }

+ 1 - 0
src/mixins/videoMaterialMixin.js

@@ -94,6 +94,7 @@
          }
      },
      async loadData(arg) {
+       this.cancel()
        this.spinning= true
        this.dataSource = []
        if (!this.url.list) {

+ 186 - 4
src/views/modules/creative-copywrit/creative-copywrit.vue

@@ -383,6 +383,7 @@
                             </a-select>
                         </a-form-item>
                     </a-col>
+                    
                     <a-col :md="8" :sm="8">
                         <a-form-item label="编导">
                             <a-select
@@ -401,6 +402,33 @@
                             </a-select>
                         </a-form-item>
                     </a-col>
+                    <a-col :md="8" :sm="8" v-if="active == '1'">
+                        <a-form-item label="状态">
+                            <a-select v-model="queryParam.videoStatus">
+                                <a-select-option :value="0">
+                                    不限
+                                </a-select-option>
+                                <a-select-option :value="1">
+                                    未推送
+                                </a-select-option>
+                                <a-select-option :value="2">
+                                    未推送到快手
+                                </a-select-option>
+                                <a-select-option :value="3">
+                                    未推送到头条 
+                                </a-select-option>
+                                <a-select-option :value="4">
+                                    推送到快手
+                                </a-select-option>
+                                <a-select-option :value="5">
+                                    推送到头条
+                                </a-select-option>
+                                <a-select-option :value="6">
+                                    已推送到快手&头条 
+                                </a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
                     <a-col :md="8" :sm="8">
                         <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
                             <a-button type="primary" @click="handleSubmit" icon="search">查询</a-button>
@@ -535,7 +563,7 @@
                                     </template>
                                     <img
                                         style="width: 30px; height: 30px"
-                                        v-if="items.kuaishouVideoIsUp == 1"
+                                        v-if="items.syncKuaishou == 2"
                                         :style="{ filter: items.kuaishouEffiType == 1 ? 'grayscale(0%)' : 'grayscale(100%)' }"
                                         src="@/views/modules/material/kuaishou.jpg"
                                     />
@@ -545,13 +573,13 @@
                                     <span>{{ items.toutiaoEffiType == 1 ? '抖音有效视频' : '已经同步到抖音平台' }}</span>
                                     </template>
                                     <img
-                                        v-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 1"
+                                        v-if="items.syncBytedance == 2 && items.toutiaoEffiType == 1"
                                         style="width: 30px; height: 30px; margin-left: 5px"
                                         src="@/views/modules/material/douyin.jpg"
                                         alt
                                     />
                                     <img
-                                        v-else-if="items.toutiaoVideoIsUp == 1 && items.toutiaoEffiType == 0"
+                                        v-else-if="items.syncBytedance == 2 && items.toutiaoEffiType == 0"
                                         style="width: 30px; height: 30px; margin-left: 5px"
                                         src="@/views/modules/material/douyinhui.jpg"
                                         alt
@@ -678,6 +706,7 @@
                                         </a-menu-item>
                                     </a-menu>
                                 </a-dropdown>
+                                <a v-show="active === '1'" style="margin-right: 20px" @click="handleRecord(items)">同步记录</a>
                                 <a-checkbox :value="items.id" style="float: right" v-show="active == '0' || active == '1'"></a-checkbox>
                                 <br />
                                 {{ items.createTime }}
@@ -1714,6 +1743,42 @@
                 </div>
             </div>
         </a-modal>
+        <a-modal v-model="showDataListVisible" title="信息" :footer="null">
+            <div v-if="showDataList">
+                <p v-for="(item, index) in showDataList" :key="index">
+                    素材:{{item.materialName}},{{item.message}};
+                    <br/>
+                    同步账户:{{item.ids.join()}}
+                </p>
+            </div>
+            
+        </a-modal>
+        <a-modal
+        v-if="recordDetailVisible"
+        title="素材同步记录"
+        :width="750"
+        :visible="recordDetailVisible"
+        dialog-class="usage-details-modal change-face-modal change-list-modal-show"
+        :footer="null"
+        @cancel="handleRecordCancel"
+        >
+            <div style="overflow: hidden;">	
+                <a-table
+                class="face-right-table"
+                ref="table"
+                size="middle"
+                bordered
+                :columns="recordColumns"
+                :dataSource="recordData"
+                :pagination="recordIpagination"
+                :loading="toutiaoMateriaLoading"
+                >
+                    <span slot="createTime" slot-scope="text">
+                        {{text}}
+                    </span>
+                </a-table>
+            </div>
+        </a-modal>
     </a-card>
 </template>
 <script>
@@ -1912,6 +1977,8 @@ export default {
             checkArr: [],
             checkAll: false,
             checkArrImage: [],
+            showDataList:[],
+            showDataListVisible: false,
             checkAllImage: false,
             showUrl: '',
             showUrlWater: '',
@@ -1942,7 +2009,81 @@ export default {
             waterLoading: false,
             videoTag: [],
             videoVisibleChange: '',
-            modalShowBatchList: []
+            modalShowBatchList: [],
+            recordDetailVisible:false,
+            recordSignature: null,
+            toutiaoMateriaLoading:false,
+            recordColumns:[
+                {
+                        title: '项目',
+                        align: 'center',
+                        dataIndex: 'projectName'
+                    },
+                    {
+                        title: '账户Id',
+                        align: 'center',
+                        dataIndex: 'userId',
+                customRender: function (text, records) {
+                if(records.mediaId == '1' || records.mediaId == '3') {
+                    return records.accountId
+                }else if(records.mediaId == '2' || records.mediaId == '4') {
+                    return records.userId
+                }else {
+                    return text
+                }
+                }
+                    },
+                    {
+                        title: '媒体',
+                        align: 'center',
+                        dataIndex: 'mediaId',
+                        customRender: function (text) {
+                if (text == '1' || text == '3') {
+                    return '头条'
+                } else if (text == '2' || text == '4') {
+                    return '快手'
+                } else {
+                    return text
+                }
+                }
+                    },
+                    {
+                        title: '同步人',
+                        align: 'center',
+                        dataIndex: 'userName'
+                    },
+            {
+                        title: '同步时间',
+                        align: 'center',
+                        dataIndex: 'createTime',
+                scopedSlots: { customRender: 'createTime' },
+                    },
+                    {
+                        title: '结果',
+                        align: 'center',
+                        dataIndex: 'remarks'
+                    }
+            ],
+            recordData:[],
+            recordIpagination: {
+            current: 1,
+            pageSize: 10,
+            //   pageSizeOptions: ['10', '20', '30'],
+            showTotal: (total, range) => {
+                return range[0] + "-" + range[1] + " 共" + total + "条"
+            },
+            showQuickJumper: true,
+            // showSizeChanger:true,
+            // pageSizeOptions: ['10', '30', '50'],
+            total: 0,
+            onChange: (current, pageSize) => {
+                // 切换分页时的回调,
+                // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+                this.recordIpagination.current = current;
+                this.recordIpagination.pageSize= pageSize;
+                this.handleGetRecordDetail(this.recordSignature)
+            }
+            },
         };
     },
     filters: {
@@ -2086,6 +2227,39 @@ export default {
     },
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
+        handleRecordCancel(){
+            this.recordDetailVisible = false;
+        },
+        handleRecord(data){
+            this.handleGetRecordDetail(data.code);
+            this.recordSignature = data.code;
+            this.recordDetailVisible = true;
+            this.toutiaoMateriaLoading = true;
+            this.kuaishouMateriaLoading = true;
+        },
+        handleGetRecordDetail(id) {
+            // 测试code '7b676546bfb50f1b992d44bd479a1536'
+            var params = {}
+            params.signature = id
+            params.pageNo = this.recordIpagination.current
+            params.pageSize = this.recordIpagination.pageSize
+            getAction('/ctop/materialUpload/uploadDetail', params).then(result => {
+                if (result.success) {
+                
+                    // 头条处理数据
+                    this.recordData = result.result.list || []
+                    this.recordIpagination.total = result.result.total || 0
+                }
+                else {
+                    this.$message.error(result.message);
+                }
+            }).catch(error => {
+                console.log(error, 'eeee');
+            }).finally(() => {
+                this.toutiaoMateriaLoading = false;
+                this.kuaishouMateriaLoading = false;
+            });
+        },
         handleBudgetCancel() {
             this.defaultSolganTitle = 'test';
             this.defaultSolganStatus = 'input';
@@ -3085,10 +3259,18 @@ export default {
             params.mediaId = this.mediaId;
             params.materialArray = JSON.stringify(this.checkArr);
             params.accountArray = JSON.stringify(data);
+            params.loginId = this.userInfo().id
+            params.userName = this.userInfo().realname
             postAction('/ctop/materialUpload/uploadAccount', params).then(res => {
                 if (res.code === 0) {
                     this.checkArr = [];
                     this.checkAll = false;
+                    if(res.data){
+                        this.showDataList = res.data
+                        this.showDataListVisible = true
+                    }else{
+                        this.$message.success(res.message)
+                    }
                 }
             });
         },

+ 4 - 1
src/views/modules/material/accountCheck.vue

@@ -12,7 +12,7 @@
 </style>
 <template>
   <div>
-    <a-modal title="账户选择" v-model="showEdit" @ok="handleOk" @cancel="close" width="80%">
+    <a-modal title="账户选择" v-model="showEdit" @ok="handleOk" @cancel="close" width="80%" :confirm-loading="confirmLoading">
       <!-- <a-checkbox :indeterminate="indeterminate" @change="onCheckAllChange" :checked="checkAll">全选</a-checkbox>
       <br />
       <a-checkbox-group :options="showList" v-model="dataValue" class="checked-account" @change="onChange" /> -->
@@ -51,6 +51,7 @@ export default {
       autoExpandParent: true,
       selectedKeys: [],
       treeData:[],
+      confirmLoading:false,
     }
   },
   watch: {
@@ -73,6 +74,7 @@ export default {
       this.selectedKeys = selectedKeys
     },
     handleOk(e) {
+      this.confirmLoading = true
 	  let defaultData = this.checkedKeys.filter(item => item.toString().indexOf('-') === -1);
       this.showEdit = false
       this.$emit('synchro', defaultData)
@@ -101,6 +103,7 @@ export default {
       this.checkAll = this.dataValue.length === this.showList.length
     },
     getData(url, item) {
+       this.confirmLoading = false
       this.showEdit = true
       this.dataList = []
       this.showList = null

+ 4 - 2
src/views/modules/material/accountCheckBytedance.vue

@@ -82,7 +82,7 @@
 </style>
 <template>
   <div class="select-project">
-    <a-modal title="账户选择" v-model="showEdit" @ok="handleOk" @cancel="close" width="80%">
+    <a-modal title="账户选择" v-model="showEdit" @ok="handleOk" @cancel="close" width="80%" :confirm-loading="confirmLoading">
       <!-- <span style="margin-bottom:15px">是否同步快手主页</span> -->
       <div class="row-item">
         <div class="hint-item"></div>
@@ -162,6 +162,7 @@ export default {
     valueConsistsOf: 'LEAF_PRIORITY',
     options: [],
     showLoading: 'loading...',
+    confirmLoading:false
   }),
   props: {
     //是否多选
@@ -210,7 +211,7 @@ export default {
       console.log(this.$refs.tree.getCheckedKeys())
     },
     handleOk(e) {
-      console.log(e)
+      this.confirmLoading = true
       var data = this.$refs.tree.getCheckedKeys()
       var dataArr = data.map(item=>{
         return {
@@ -302,6 +303,7 @@ export default {
     getParticipateList(productId) {d:
       //我参与的
       //   toutiaoParticipateList
+      this.confirmLoading = false
       this.showEdit = true
       getAction('/ctop/userAllocation/getUserIdListByProductId', {
         productId: productId,

+ 2 - 2
vue.config.js

@@ -97,7 +97,7 @@ module.exports = {
       '/jeecg-boot': {
         // target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.1.3:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        target: 'http://192.168.1.3:7001', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        // target: 'http://192.168.1.3:7001', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.62:7001', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.6.162:9806', //请求本地 需要jeecg-boot后台项目  祚云
@@ -108,7 +108,7 @@ module.exports = {
         // target: 'http://192.168.1.219:7701', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
-        // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+        target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目