Browse Source

自动投放 1.4

jiayufei 4 năm trước cách đây
mục cha
commit
51902cec63

+ 66 - 34
src/views/modules/account-config/components/configuration-modal.vue

@@ -101,7 +101,7 @@
                         allow-clear
                         placeholder="请输入广告组名称"
                     />
-                    <!-- <div>
+                    <div>
                         <a-tag
                             v-for="item in campaignTags"
                             :key="item"
@@ -110,7 +110,7 @@
                         >
                             + {{ item }}
                         </a-tag>
-                    </div> -->
+                    </div>
                 </a-form-model-item>
                 <a-form-model-item label="广告计划名称" prop="adName">
                     <a-input
@@ -393,7 +393,11 @@
                             </a-radio-group>
                         </a-form-model-item>
                         <a-form-model-item v-if="configForm.customPerson === 'a'" label="定向逻辑">
-                            <a-radio-group v-model="configForm.adRetargetingTagsType" button-style="solid" @change="handleDirectionalLogic">
+                            <a-radio-group
+                                v-model="configForm.adRetargetingTagsType"
+                                button-style="solid"
+                                @change="handleDirectionalLogic"
+                            >
                                 <a-radio-button value="1">定向</a-radio-button>
                                 <a-radio-button value="2">排除</a-radio-button>
                                 <a-radio-button value="3">同时定向排除</a-radio-button>
@@ -1388,7 +1392,7 @@ export default {
             urlResult: '',
             createOptions: [],
             campaignTags: ['序号', '日期'],
-            adNameTags: ['出价方式', '素材名称', '日期', '创意方式'],
+            adNameTags: ['序号', '出价方式', '素材名称', '日期', '创意方式'],
             fieldNames: {
                 label: 'industryName',
                 value: 'industryId',
@@ -1974,29 +1978,30 @@ export default {
         },
         handleSelectPackageTabs(e) {
             if (this.modalTitle === 'add') {
-                if (e === 'add') {
-                    this.configForm.adAudiencePackageId = undefined;
-                    this.packageMessageDetail = [];
-                }
-                else if (e === 'choice') {
-                    this.configForm.adDistrict = 'NONE';
-                    this.listArr = [];
-                    this.configForm.adLocationType = 'HOME';
-                    this.configForm.adGender = 'NONE';
-                    this.configForm.adSelectAge = ['NONE'];
-                    this.configForm.customPerson = 'NONE';
-                    this.configForm.updateGetingInclude = [];
-                    this.configForm.adRetargetingTagsInclude = '';
-                    this.configForm.adRetargetingTagsExclude = '';
-                    this.configForm.updateGetingExclude = [];
-                    this.configForm.adRetargetingTagsType = '';
-                    this.configForm.adPlatform = 'NONE';
-                    this.configForm.adDeviceSelectType = ['NONE'];
-                    this.configForm.adAndroidVersion = 'NONE';
-                    this.configForm.adSelectAc = ['NONE'];
-                    this.configForm.adHideIfExists = '0';
-                    this.configForm.adAutoExtendEnabled = '0';
-                }
+                // if (e === 'add') {
+                //     this.configForm.adAudiencePackageId = undefined;
+                //     this.packageMessageDetail = [];
+                // }
+                // else if (e === 'choice') {
+                //     this.configForm.adDistrict = 'NONE';
+                //     this.listArr = [];
+                //     this.configForm.adLocationType = 'HOME';
+                //     this.configForm.adGender = 'NONE';
+                //     this.configForm.adSelectAge = ['NONE'];
+                //     this.configForm.customPerson = 'NONE';
+                //     this.configForm.updateGetingInclude = [];
+                //     this.configForm.adRetargetingTagsInclude = '';
+                //     this.configForm.adRetargetingTagsExclude = '';
+                //     this.configForm.updateGetingExclude = [];
+                //     this.configForm.adRetargetingTagsType = '';
+                //     this.configForm.adSuperiorPopularityType = 'NONE';
+                //     this.configForm.adPlatform = 'NONE';
+                //     this.configForm.adDeviceSelectType = ['NONE'];
+                //     this.configForm.adAndroidVersion = 'NONE';
+                //     this.configForm.adSelectAc = ['NONE'];
+                //     this.configForm.adHideIfExists = '0';
+                //     this.configForm.adAutoExtendEnabled = '0';
+                // }
             }
         },
         handleCustomPerson(e) {
@@ -2900,8 +2905,35 @@ export default {
         },
         handleRelaxSure() {
             let paramsFormData = this.configForm;
-            if (this.configForm.adDistrict === 'CITY') {
-                if (!this.configForm.adSelectCity.length) {
+            if (paramsFormData.adDirectionalFlag === 'add') {
+                paramsFormData.adAudiencePackageId = null;
+                this.packageMessageDetail = [];
+            }
+            else if (paramsFormData.adDirectionalFlag === 'choice') {
+                paramsFormData.adDistrict = 'NONE';
+                this.listArr = [];
+                paramsFormData.adLocationType = 'HOME';
+                paramsFormData.adGender = 'NONE';
+                paramsFormData.adSelectAge = ['NONE'];
+                paramsFormData.customPerson = 'NONE';
+                paramsFormData.updateGetingInclude = [];
+                paramsFormData.adRetargetingTagsInclude = '';
+                paramsFormData.adRetargetingTagsExclude = '';
+                paramsFormData.updateGetingExclude = [];
+                paramsFormData.adRetargetingTagsType = '';
+                paramsFormData.adSuperiorPopularityType = 'NONE';
+                paramsFormData.adPlatform = 'NONE';
+                paramsFormData.adInterestActionMode = 'UNLIMITED';
+                paramsFormData.adDeviceSelectType = ['NONE'];
+                paramsFormData.adAndroidVersion = 'NONE';
+                paramsFormData.adHideIfConverted = 'NO_EXCLUDE';
+                paramsFormData.adSelectAc = ['NONE'];
+                paramsFormData.adHideIfExists = '0';
+                paramsFormData.adAutoExtendEnabled = '0';
+                this.adAutoExtendList = [];
+            }
+            if (paramsFormData.adDistrict === 'CITY') {
+                if (!paramsFormData.adSelectCity.length) {
                     this.$message.error('请选择省市');
                     return;
                 }
@@ -2912,7 +2944,7 @@ export default {
             else {
                 paramsFormData.adDeliveryRange = '';
             }
-            if (this.configForm.adDirectionalFlag === 'choice' && !this.configForm.adAudiencePackageId) {
+            if (paramsFormData.adDirectionalFlag === 'choice' && !paramsFormData.adAudiencePackageId) {
                 this.$message.error('请选择已有定向包');
                 return;
             }
@@ -2934,11 +2966,11 @@ export default {
                 this.$message.error('请选择可开放定向');
                 return;
             }
-            if (this.configForm.adScheduleType === 'SCHEDULE_START_END' && !this.configForm.launchDateRange.length) {
+            if (paramsFormData.adScheduleType === 'SCHEDULE_START_END' && !paramsFormData.launchDateRange.length) {
                 this.$message.error('请选择投放时间');
                 return;
             }
-            if (this.configForm.launchTimeInterval === 'a' && this.configForm.scheduleTimeData === str) {
+            if (paramsFormData.launchTimeInterval === 'a' && paramsFormData.scheduleTimeData === str) {
                 this.$message.error('请选择投放时段');
                 return;
             }
@@ -2946,7 +2978,7 @@ export default {
                 this.$message.error('请上传图片');
                 return;
             }
-            if (this.isTAwemeStatus && !this.configForm.defaultFormList.length) {
+            if (this.isTAwemeStatus && !paramsFormData.defaultFormList.length) {
                 this.$message.error('请添加卖点');
                 return;
             }
@@ -2957,7 +2989,7 @@ export default {
             if (this.campaignStatus) {
                 return;
             }
-            if (this.configForm.adBudget < this.configForm.adCpaBid) {
+            if (paramsFormData.adBudget < paramsFormData.adCpaBid) {
                 this.isAdCpaBidBlur = true;
                 this.adCpaBidBlurTxt = '出价不能大于预算';
                 return;

+ 2 - 2
src/views/modules/copy-library/copy-library-server.js

@@ -6,5 +6,5 @@
 // export const urlAcount = 'http://118.24.244.213:8080'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
 // export const urlAcount = 'http://192.168.1.43:8080'; // 子安
-// export const urlAcount = 'http://139.186.165.84:8080'; // 测试
-export const urlAcount = 'http://192.168.1.8:8080'; // 学超
+export const urlAcount = 'http://139.186.165.84:8080'; // 测试
+// export const urlAcount = 'http://192.168.1.8:8080'; // 学超

+ 11 - 0
src/views/modules/user-manage-operation/user-manage-operation-server.js

@@ -0,0 +1,11 @@
+/**
+ * @file 账户配置API
+ * @author jiayufei
+ */
+
+//  export const urlAcount = 'http://118.24.244.213:8080'; // 线上
+ // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
+ // export const urlAcount = 'http://192.168.1.43:8080'; // 子安
+ export const urlAcount = 'http://139.186.165.84:8080'; // 测试
+//  export const urlAcount = 'http://192.168.1.8:8080'; // 学超
+ 

+ 288 - 0
src/views/modules/user-manage-operation/user-manage-operation.vue

@@ -0,0 +1,288 @@
+<template>
+  <a-card class="user-manage-operation" :bordered="false">
+    <div class="table-page-search-wrapper">
+		<a-form layout="inline">
+			<a-row :gutter="24">
+				<a-col :md="6" :sm="12">
+					<a-form-item label="账号">
+						<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>
+					</a-form-item>
+				</a-col>
+				<a-col :md="6" :sm="12">
+					<a-form-item label="姓名">
+						<a-input placeholder="请输入姓名查询" v-model="queryParam.realname"></a-input>
+					</a-form-item>
+				</a-col>
+				<a-col :md="6" :sm="12">
+					<a-form-item label="汇报上级">
+						<a-input placeholder="请输入姓名查询" v-model="queryParam.leaderName"></a-input>
+					</a-form-item>
+				</a-col>
+				<a-col :md="6" :sm="12">
+					<a-form-item label="用户角色">
+						<a-input placeholder="请输入用户角色" v-model="queryParam.roleName"></a-input>
+					</a-form-item>
+				</a-col>
+				<a-col :md="6" :sm="12">
+					<a-form-item label="部门分配">
+						<a-tree-select
+							style="width: 100%"
+							:dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
+							:treeData="treeData"
+							v-model="queryParam.departId"
+							placeholder="无"
+						>
+						</a-tree-select>
+					</a-form-item>
+				</a-col>
+				<a-col :md="6" :sm="8">
+					<a-form-item label="邮箱">
+						<a-input placeholder="请输入邮箱查询" v-model="queryParam.email"></a-input>
+					</a-form-item>
+				</a-col>
+				<a-col :md="6" :sm="8">
+					<a-form-item label="状态">
+						<a-select v-model="queryParam.status" placeholder="请选择用户状态查询">
+							<a-select-option value="1">正常</a-select-option>
+							<a-select-option value="2">冻结</a-select-option>
+						</a-select>
+					</a-form-item>
+				</a-col>
+				<a-col :md="6" :sm="8">
+					<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+						<a-button type="primary" @click="handleSearchQuery" icon="search">查询</a-button>
+						<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+					</span>
+				</a-col>
+			</a-row>
+		</a-form>
+    </div>
+    <div>
+		<a-table
+			ref="table"
+			bordered
+			size="middle"
+			:columns="columns"
+			:dataSource="dataSource"
+			:pagination="false"
+			:loading="controlLoading"
+		>
+			<template slot="avatarslot" slot-scope="text, record">
+				<div class="anty-img-wrap">
+					<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
+				</div>
+			</template>
+			<template slot="leaderName" slot-scope="text, record">
+				<span>{{ text ? text : '-' }}</span>
+			</template>
+			<template slot="sex" slot-scope="text, record">
+				<span>{{ text ? (text == 1 ? '男' : '女') : '未填写' }}</span>
+			</template>
+			<template slot="status" slot-scope="text, record">
+				<span>{{ text ? (text == 1 ? '正常' : '冻结') : '未填写' }}</span>
+			</template>
+			<template slot="departName" slot-scope="text, record">
+				<span>{{ text ? text : '-' }}</span>
+			</template>
+				<span slot="action" slot-scope="text, record">
+				<a @click="handleEdit(record)">编辑</a>
+			</span>
+		</a-table>
+		<a-pagination
+			class="pagin-table-class"
+			:total="totalAll"
+			:show-total="total => `共 ${totalAll} 条`"
+			size="small"
+			show-size-changer
+			show-quick-jumper
+			@change="onShowSizeChange"
+			@showSizeChange="onShowSizeChange"
+		/>
+    </div>
+    <user-modal ref="modalForm" @ok="handleModalFormOk"></user-modal>
+  </a-card>
+</template>
+<script>
+import UserModal from '@/views/system/modules/UserModal';
+
+import {mapGetters} from 'vuex';
+import {queryIdTree} from '@/api/api';
+import {getAction} from '@/api/manage';
+import {urlAcount} from './user-manage-operation-server.js';
+export default {
+    name: 'user-manage-operation',
+    components: {
+      	UserModal
+    },
+    data() {
+		return {
+			controlLoading: false,
+			dataSource: [],
+			totalAll: 0,
+			tablePag: {
+				page: 1, 
+				size: 10
+			},
+			description: '这是用户管理页面',
+			treeData: [],
+			queryParam: {},
+			columns: [
+				{
+					title: '用户账号',
+					align: 'center',
+					dataIndex: 'username',
+					width: 120
+				},
+				{
+					title: '真实姓名',
+					align: 'center',
+					width: 100,
+					dataIndex: 'realname'
+				},
+				{
+					title: '头像',
+					align: 'center',
+					width: 120,
+					dataIndex: 'avatar',
+					scopedSlots: { customRender: 'avatarslot' }
+				},
+				{
+					title: '性别',
+					align: 'center',
+					width: 80,
+					dataIndex: 'sex',
+					scopedSlots: { customRender: 'sex' },
+					sorter: true
+				},
+				{
+					title: '手机号码',
+					align: 'center',
+					width: 100,
+					dataIndex: 'phone'
+				},
+				{
+					title: '邮箱',
+					align: 'center',
+					dataIndex: 'email'
+				},
+				{
+					title: '汇报上级',
+					align: 'center',
+					dataIndex: 'leaderName',
+					scopedSlots: {customRender: 'leaderName'}
+				},
+				{
+					title: '所属部门',
+					align: 'center',
+					dataIndex: 'departName',
+					scopedSlots: {customRender: 'departName'}
+				},
+				{
+					title: '用户角色',
+					align: 'center',
+					dataIndex: 'roleName',
+					scopedSlots: {customRender: 'roleName'}
+				},
+				{
+					title: '状态',
+					align: 'center',
+					width: 80,
+					dataIndex: 'status',
+					scopedSlots: {customRender: 'status'}
+				},
+				{
+					title: '操作',
+					dataIndex: 'action',
+					scopedSlots: {customRender: 'action'},
+					align: 'center',
+					width: 170
+				}
+			]
+		}
+    },
+    created() {
+		this.$nextTick(() => {
+			this.loadTreeData();
+		});
+    },
+	mounted() {
+		this.handleGetDataInit();
+	},
+    methods: {
+		...mapGetters(['userInfo']),
+		searchReset() {
+			this.queryParam = {};
+			this.handleGetDataInit();
+		},
+		handleEdit(record, sign) {
+			this.$refs.modalForm.edit(record, sign);
+			this.$refs.modalForm.title = "编辑";
+			this.$refs.modalForm.disableSubmit = false;
+		},
+		handleSearchQuery() {
+			this.tablePag = {
+                page: 1,
+                size: 10
+            };
+			this.handleGetDataInit();
+		},
+		handleModalFormOk() {
+			this.tablePag = {
+                page: 1,
+                size: 10
+            };
+			this.handleGetDataInit();
+		},
+		handleGetDataInit() {
+			this.controlLoading = true;
+			const paramsData = this.queryParam;
+			paramsData.id = this.userInfo().id;
+			paramsData.pageNo = this.tablePag.page;
+      		paramsData.pageSize = this.tablePag.size;
+            getAction(urlAcount + '/bytedance-api/sys/user/listV2', paramsData).then(result => {
+                if (result.code === 200) {
+					this.controlLoading = false;
+					this.dataSource = result.result.list;
+					this.totalAll =  result.result.total;
+                }
+                else {
+                    this.$message.error(result.message);
+                }
+            }).catch(error => {
+                console.log(error, 'eeee');
+            });
+        },
+		onShowSizeChange(current, pageSize) {
+            this.tablePag = {
+                page: current,
+                size: pageSize
+            };
+            this.handleGetDataInit();
+        },
+		loadTreeData() {
+			queryIdTree().then(res => {
+				if (res.success) {
+					this.treeData = [];
+					for (let i = 0; i < res.result.length; i++) {
+						let temp = res.result[i];
+						this.treeData.push(temp);
+					}
+				}
+			});
+		},
+		getAvatarView(avatar) {
+			return window._CONFIG['domianURL'] + '/sys/common/view' + '/' + avatar;
+		}
+    }
+};
+</script>
+<style lang="less" scoped>
+	@import '~@assets/less/common.less';
+	.user-manage-operation {
+		.pagin-table-class {
+			display: flex;
+			justify-content: flex-end;
+			margin-top: 20px;
+		}
+	}
+</style>

+ 2 - 2
vue.config.js

@@ -87,8 +87,8 @@ module.exports = {
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目 
         // target:'http://118.24.244.213:8804',
         // target: 'http://192.168.1.43:8806', // 子安
-        target: 'http://192.168.1.8:8806', // 学超
-      //  target:'http://139.186.165.84:8806', //测试
+        // target: 'http://192.168.1.8:8806', // 学超
+       target:'http://139.186.165.84:8806', //测试
         // target:'http://apipre.tjyourong.com.cn', //预生产
 
         ws: false,