Explorar o código

素材库修改-提测

朱鑫波 %!s(int64=3) %!d(string=hai) anos
pai
achega
ac5a04a8c0
Modificáronse 1 ficheiros con 186 adicións e 59 borrados
  1. 186 59
      src/views/modules/material/videoMaterial.vue

+ 186 - 59
src/views/modules/material/videoMaterial.vue

@@ -647,7 +647,7 @@ a {
                         </template>
                         <img
                           style="width: 30px; height: 30px"
-                          v-if="items.syncKuaishou == 1"
+                          v-if="items.syncKuaishou == 2"
                           :style="{ filter: items.kuaishouEffiType == 1 ? 'grayscale(0%)' : 'grayscale(100%)' }"
                           src="./kuaishou.jpg"
                         />
@@ -657,13 +657,13 @@ a {
                           <span>{{ items.toutiaoEffiType == 1 ? '抖音有效视频' : '已经同步到抖音平台' }}</span>
                         </template>
                         <img
-                          v-if="items.syncBytedance == 1 && items.toutiaoEffiType == 1"
+                          v-if="items.syncBytedance == 2 && items.toutiaoEffiType == 1"
                           style="width: 30px; height: 30px; margin-left: 5px"
                           src="./douyin.jpg"
                           alt
                         />
                         <img
-                          v-else-if="items.syncBytedance == 1 && items.toutiaoEffiType == 0"
+                          v-else-if="items.syncBytedance == 2 && items.toutiaoEffiType == 0"
                           style="width: 30px; height: 30px; margin-left: 5px"
                           src="./douyinhui.jpg"
                           alt
@@ -856,9 +856,12 @@ a {
                         <a-menu-item key="6"  v-show="active !== '1'"  v-if="items.userId == userInfo().id">
                           <a href="javascript:;" style="margin-right: 20px" @click="editMaterialName(items)">修改素材名称</a>
                         </a-menu-item>
+                        <a-menu-item key="7" v-show="active === '0' || active === '1'">
+                          <a href="javascript:;" @click="handleUsageDetails(items)">使用详情</a>
+                        </a-menu-item>
                       </a-menu>
                     </a-dropdown>
-					          <a v-show="active === '0' || active === '1'" style="margin-right: 20px" @click="handleUsageDetails(items)">使用详情</a>
+					          <a v-show="active === '0' || active === '1'" style="margin-right: 20px" @click="handleRecord(items)">同步记录</a>
                     <a-checkbox :value="items.id" style="float: right" v-show="active == '1'"></a-checkbox>
                     <br />
                     {{ items.createTime }}
@@ -1214,13 +1217,13 @@ a {
                   style="width: 100%"
                 ></el-cascader>
               </a-form-model-item>
-              <a-form-model-item label="基调标签" 
+              <a-form-model-item label="创新素材" 
               :prop="'urlListData.'+index+'.modTagList'"  
               :label-col="{ span: 4 }" 
               :wrapper-col="{ span: 14 }"
                 :rules="{
                 required: true,
-                message: '基调标签必选',
+                message: '创新素材必选',
                 trigger: 'blur',
               }">
                   <a-switch v-model="items.materialInnovate"/>
@@ -2238,6 +2241,30 @@ a {
       </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"
+        >
+        </a-table>
+      </div>
+    </a-modal>
+    
+    <a-modal
           v-if="rejectReasonStatus"
           title="审核拒绝原因"
       :width="750"
@@ -2379,7 +2406,74 @@ export default {
 		materiaModalType: '2',
 		materialUseDetailList: {},
 		usageDetailsStatus: false,
-      ruleForm:{
+    recordDetailVisible:false,
+    recordSignature: null,
+    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: '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)
+      }
+    },
+    ruleForm:{
         projectId:'',
         urlList:[],
         urlListData:[]
@@ -2759,58 +2853,91 @@ export default {
 		  this.rejectReasonList = data.refuseInfo.refuseDetail.split('@#');
 		  this.rejectReasonStatus = true;
 	  },
-	materiaDataSizeChange(current, pageSize) {
-		this.materiaDataToutiao = [];
-        this.defaultCurrentToutiao = current;
-        const defaultData = this.materialUseDetailList['byteDance'];
-        this.materiaDataToutiao = [...defaultData.slice(10 * current - 10, 10 * current)];
-	},
-	materiaDataSizeChangeKuaishou(current, pageSize) {
-		this.materiaDataKuaishou = [];
-        this.defaultCurrentKuaishou = current;
-        const defaultData = this.materialUseDetailList['kuaishou'];
-        this.materiaDataKuaishou = [...defaultData.slice(10 * current - 10, 10 * current)];
-	},
-	handleProfitModalnCancel() {
-		this.materialUseDetailList = {};
-		this.materiaDataToutiao = [];
-		this.materiaDataTotalToutiao = 0;
-		this.defaultCurrentToutiao = 1;
-		this.materiaDataKuaishou = [];
-		this.materiaDataTotalKuaishou = 0;
-		this.defaultCurrentKuaishou = 1;
-		this.materiaModalType = '2';
-		this.usageDetailsStatus = false;
-	},
-	handleUsageDetails(data) {
-		this.handleGetMaterialUseDetail(data.code);
-		this.usageDetailsStatus = true;
-		this.toutiaoMateriaLoading = true;
-		this.kuaishouMateriaLoading = true;
-	},
-	handleGetMaterialUseDetail(id) {
-		// 测试code '7b676546bfb50f1b992d44bd479a1536'
-		getAction('/materialUse/getMaterialUseDetail', {code: id}).then(result => {
-			if (result.success) {
-				const defaultData = result.result;
-				this.materialUseDetailList = defaultData;
-				// 头条处理数据
-				this.materiaDataToutiao = defaultData['byteDance'] ? defaultData['byteDance'].slice(0, 10) : [];
-				this.materiaDataTotalToutiao = defaultData['byteDance'] ? defaultData['byteDance'].length : 0;
-				// 快手处理数据 
-				this.materiaDataKuaishou = defaultData['kuaishou'] ? defaultData['kuaishou'].slice(0, 10) : [];
-				this.materiaDataTotalKuaishou = defaultData['kuaishou'] ? defaultData['kuaishou'].length : 0;
-			}
-			else {
-				this.$message.error(result.message);
-			}
-		}).catch(error => {
-			console.log(error, 'eeee');
-		}).finally(() => {
-			this.toutiaoMateriaLoading = false;
-			this.kuaishouMateriaLoading = false;
-		});
-	},
+    materiaDataSizeChange(current, pageSize) {
+      this.materiaDataToutiao = [];
+          this.defaultCurrentToutiao = current;
+          const defaultData = this.materialUseDetailList['byteDance'];
+          this.materiaDataToutiao = [...defaultData.slice(10 * current - 10, 10 * current)];
+    },
+    materiaDataSizeChangeKuaishou(current, pageSize) {
+      this.materiaDataKuaishou = [];
+          this.defaultCurrentKuaishou = current;
+          const defaultData = this.materialUseDetailList['kuaishou'];
+          this.materiaDataKuaishou = [...defaultData.slice(10 * current - 10, 10 * current)];
+    },
+    handleProfitModalnCancel() {
+      this.materialUseDetailList = {};
+      this.materiaDataToutiao = [];
+      this.materiaDataTotalToutiao = 0;
+      this.defaultCurrentToutiao = 1;
+      this.materiaDataKuaishou = [];
+      this.materiaDataTotalKuaishou = 0;
+      this.defaultCurrentKuaishou = 1;
+      this.materiaModalType = '2';
+      this.usageDetailsStatus = false;
+    },
+    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;
+      });
+    },
+    handleUsageDetails(data) {
+      this.handleGetMaterialUseDetail(data.code);
+      this.usageDetailsStatus = true;
+      this.toutiaoMateriaLoading = true;
+      this.kuaishouMateriaLoading = true;
+    },
+    handleGetMaterialUseDetail(id) {
+      // 测试code '7b676546bfb50f1b992d44bd479a1536'
+      getAction('/materialUse/getMaterialUseDetail', {code: id}).then(result => {
+        if (result.success) {
+          const defaultData = result.result;
+          this.materialUseDetailList = defaultData;
+          // 头条处理数据
+          this.materiaDataToutiao = defaultData['byteDance'] ? defaultData['byteDance'].slice(0, 10) : [];
+          this.materiaDataTotalToutiao = defaultData['byteDance'] ? defaultData['byteDance'].length : 0;
+          // 快手处理数据 
+          this.materiaDataKuaishou = defaultData['kuaishou'] ? defaultData['kuaishou'].slice(0, 10) : [];
+          this.materiaDataTotalKuaishou = defaultData['kuaishou'] ? defaultData['kuaishou'].length : 0;
+        }
+        else {
+          this.$message.error(result.message);
+        }
+      }).catch(error => {
+        console.log(error, 'eeee');
+      }).finally(() => {
+        this.toutiaoMateriaLoading = false;
+        this.kuaishouMateriaLoading = false;
+      });
+    },
     ruleFormFile(file){
       var bmf = new BMF()
       var that = this