Browse Source

master 快手视频报表 修改时间 控件

jiayufei 3 years ago
parent
commit
df577c1fb4

+ 2 - 2
src/utils/request.js

@@ -19,8 +19,8 @@ else if (process.env.NODE_ENV === 'debug') {
 }
 else if (process.env.NODE_ENV === 'production') {
 	// axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot'; // 预生产
-    // axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
-	axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
+    axios.defaults.baseURL = 'http://gateway.tjyourong.com.cn/jeecg-boot';//测试
+	// axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot'; // 生产环境
 }
 const service = axios.create({
 	// baseURL: '/jeecg-boot', // api base_url

+ 240 - 13
src/views/modules/material/videoMaterial.vue

@@ -1,4 +1,7 @@
 <style lang="scss">
+/deep/ .usage-details-modal {
+	width: 750px !important;
+}
 .is-disabled .el-checkbox__inner {
   display: none !important;
 }
@@ -814,8 +817,8 @@ a {
                         </a-menu-item>
                       </a-menu>
                     </a-dropdown>
+					<a v-show="active === '0' || active === '1'" style="margin-right: 20px" @click="handleUsageDetails(items)">使用详情</a>
                     <a-checkbox :value="items.id" style="float: right" v-show="active == '1'"></a-checkbox>
-
                     <br />
                     {{ items.createTime }}
                   </span>
@@ -2012,13 +2015,13 @@ a {
     <accountCheckBytedance ref="accountCheckBytedance" @synchro="implement" />
     <permission-modal ref="modalForm" @ok="modalFormOkElse"></permission-modal>
     <!-- 换脸模块 -->
-		<change-face
-			:status="faceTypeStatus"
-			:defaultList="faceChangeList"
-			@closeface="handleFaceCloseModal"
-			@sureface="handleFaceSureModal"
-		>
-		</change-face>
+	<change-face
+		:status="faceTypeStatus"
+		:defaultList="faceChangeList"
+		@closeface="handleFaceCloseModal"
+		@sureface="handleFaceSureModal"
+	>
+	</change-face>
     <a-modal
         v-if="faceShowStatus"
         title="换脸操作"
@@ -2070,6 +2073,90 @@ a {
           @showSizeChange="onShowSizeChange"
       />
     </a-modal>
+	<a-modal
+        v-if="usageDetailsStatus"
+        title="使用详情"
+		:width="750"
+        :visible="usageDetailsStatus"
+        dialog-class="usage-details-modal change-face-modal change-list-modal-show"
+		:footer="null"
+		@cancel="handleProfitModalnCancel"
+    >
+		<div>
+			<a-tabs v-model="materiaModalType" @change="handleMateriaTabsChange">
+				<a-tab-pane key="1" tab="头条">
+					<a-table
+						class="face-right-table"
+						ref="table"
+						size="middle"
+						bordered
+						:columns="materiaColumnsToutiao"
+						:dataSource="materiaDataToutiao"
+						:pagination="false"
+						:loading="toutiaoMateriaLoading"
+					>
+						<span slot="accountStatus" slot-scope="text">
+							<span>{{ text === 0 ? '投放中' : '已暂停' }}</span>
+						</span>
+					</a-table>
+					<a-pagination
+						class="pagin-table-class"
+						:total="materiaDataTotalToutiao"
+						:show-total="total => `共 ${materiaDataTotalToutiao} 条`"
+						size="small"
+						:current="defaultCurrentToutiao"
+						:defaultPageSize="10"
+						@change="materiaDataSizeChange"
+						@showSizeChange="materiaDataSizeChange"
+					/>
+				</a-tab-pane>
+				<a-tab-pane key="2" tab="快手">
+					<a-table
+						class="face-right-table"
+						ref="table"
+						size="middle"
+						bordered
+						:columns="materiaColumnsKuaishou"
+						:dataSource="materiaDataKuaishou"
+						:pagination="false"
+						:loading="kuaishouMateriaLoading"
+					>
+						<span slot="accountStatus" slot-scope="text">
+							<span>{{ text === 0 ? '投放中' : '已暂停' }}</span>
+						</span>
+						<span slot="refuseCount" slot-scope="text, record">
+							<span>{{ record.refuseInfo.refuseCount }}</span>
+						</span>
+						<span slot="refuseDetail" slot-scope="text, record">
+							<a :disabled="!record.refuseInfo.refuseDetail" @click="handleRejectReason(record)">拒绝原因</a>
+						</span>
+					</a-table>
+					<a-pagination
+						class="pagin-table-class"
+						:total="materiaDataTotalKuaishou"
+						:show-total="total => `共 ${materiaDataTotalKuaishou} 条`"
+						size="small"
+						:current="defaultCurrentKuaishou"
+						:defaultPageSize="10"
+						@change="materiaDataSizeChangeKuaishou"
+						@showSizeChange="materiaDataSizeChangeKuaishou"
+					/>
+				</a-tab-pane>
+			</a-tabs>
+		</div>
+    </a-modal>
+	<a-modal
+        v-if="rejectReasonStatus"
+        title="审核拒绝原因"
+		:width="750"
+        :visible="rejectReasonStatus"
+		:footer="null"
+		@cancel="handleRejectReasonCancel"
+    >
+		<div>
+			<p v-for="(item, index) in rejectReasonList" :key="index + 1">{{index + 1}}:{{ item }}</p>
+		</div>
+	</a-modal>
   </a-card>
 </template>
 
@@ -2107,9 +2194,88 @@ export default {
     selectTableProject,
     changeFace
   },
-
   data() {
     return {
+		rejectReasonStatus: false,
+		defaultCurrentKuaishou: 1,
+		materiaDataTotalKuaishou: 0,
+		kuaishouMateriaLoading: false,
+		materiaDataKuaishou: [],
+		materiaColumnsKuaishou: [
+			{
+				title: '账户ID',
+				align: 'center',
+				dataIndex: 'accountId'
+			},
+			{
+				title: '账户状态',
+				align: 'center',
+				dataIndex: 'accountStatus',
+				scopedSlots: {customRender: 'accountStatus'}
+			},
+			{
+				title: '视频ID',
+				align: 'center',
+				dataIndex: 'photoId'
+			},
+			{
+				title: '关联创意总数(自定义创意)',
+				align: 'center',
+				dataIndex: 'relationCount'
+			},
+			{
+				title: '账户所属人',
+				align: 'center',
+				dataIndex: 'userName'
+			},
+			{
+				title: '审核拒绝创意数',
+				align: 'center',
+				dataIndex: 'refuseCount',
+				scopedSlots: {customRender: 'refuseCount'}
+			},
+			{
+				title: '审核拒绝原因',
+				align: 'center',
+				dataIndex: 'refuseDetail',
+				scopedSlots: {customRender: 'refuseDetail'}
+			},
+		],
+		toutiaoMateriaLoading: false,
+		defaultCurrentToutiao: 1,
+		materiaDataTotalToutiao: 0,
+		materiaDataToutiao: [],
+		materiaColumnsToutiao: [
+			{
+				title: '账户ID',
+				align: 'center',
+				dataIndex: 'accountId'
+			},
+			{
+				title: '素材ID',
+				align: 'center',
+				dataIndex: 'materialId'
+			},
+			{
+				title: '素材关联创意数',
+				align: 'center',
+				dataIndex: 'relationCount'
+			},
+			{
+				title: '账户归属人',
+				align: 'center',
+				dataIndex: 'userName'
+			},
+			{
+				title: '账户状态',
+				align: 'center',
+				dataIndex: 'accountStatus',
+				scopedSlots: {customRender: 'accountStatus'}
+			}
+		],
+		materiaModalType: '1',
+		materialUseDetailList: {},
+		usageDetailsStatus: false,
       ruleForm:{
         projectId:'',
         urlList:[],
@@ -2473,10 +2639,71 @@ export default {
     }
   },
   methods: {
-            //     :checkFile="ruleFormFile"
-            // :value.sync="ruleForm.urlList"
-            // @overUpload="ruleFormOverUpload"
-            // @removeUpload="ruleFormRemoveUpload"
+	  handleMateriaTabsChange(e) {
+		  const defaultData = this.materialUseDetailList;
+		  this.defaultCurrentToutiao = 1;
+		  this.materiaDataToutiao = defaultData['byteDance'] ? defaultData['byteDance'].slice(0, 10) : [];
+		  this.defaultCurrentKuaishou = 1;
+		  this.materiaDataKuaishou = defaultData['kuaishou'] ? defaultData['kuaishou'].slice(0, 10) : [];
+	  },
+	  handleRejectReasonCancel() {
+		this.rejectReasonStatus = false;
+	  },
+	  handleRejectReason(data) {
+		  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.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;
+		});
+	},
     ruleFormFile(file){
       var bmf = new BMF()
       var that = this

+ 2 - 2
src/views/modules/policy-management/policy-management-server.js

@@ -3,9 +3,9 @@
  * @author jiayufei
  */
 
- export const urlAcount = 'http://api.tjyourong.com.cn'; // 线上
+//  export const urlAcount = 'http://api.tjyourong.com.cn'; // 线上
 //  export const urlAcount = 'http://gateway.tjyourong.com.cn'; // 测试
-//  export const urlAcount = 'http://192.168.1.43:9999'; // 子安
+ export const urlAcount = 'http://192.168.1.43:9999'; // 子安
 //  export const urlAcount = 'http://gateway.tjyourong.com.cn'; // 测试
 //  export const urlAcount = 'http://192.168.1.8:9999'; // 学超