Kaynağa Gözat

提交代码

朱鑫波 4 yıl önce
ebeveyn
işleme
5879141c61

+ 213 - 0
src/views/modules/autoLaunch/material-all/material-service.js

@@ -0,0 +1,213 @@
+/**
+ * @file 人群包管理基础服务
+ * @author jiayufei(jiayufei@c-top.com.cn)
+ */
+
+ class AppMarketService {
+    constructor() {}
+
+    // 相关账户的table列表
+    setAcountColumns() {
+        return [
+            {
+                title: '账户名称',
+                dataIndex: 'authName',
+                width: '50%',
+                align: 'center'
+            },
+            {
+                title: '编辑',
+                dataIndex: 'action',
+                scopedSlots: {customRender: 'action'},
+                width: '50%',
+                align: 'center'
+            }
+        ]
+    }
+
+    // 原因的table列表
+    setCauseColumns() {
+        return [
+            {
+                title: '账户名称',
+                dataIndex: 'authName',
+                width: '25%',
+                align: 'center'
+            },
+            {
+                title: '推送结果',
+                dataIndex: 'result',
+                width: '25%',
+                align: 'center'
+            },
+            {
+                title: '失败原因',
+                dataIndex: 'message',
+                width: '25%',
+                align: 'center',
+                customRender(t) {
+                    if(t === 'OK') {
+                        return '-';
+                    }
+                    else {
+                        return t;
+                    }
+                }
+            },
+            {
+                title: '操作',
+                dataIndex: 'action',
+                scopedSlots: {customRender: 'action'},
+                width: '25%',
+                align: 'center'
+            }
+        ]
+    }
+
+    // 相关项目的table列表
+    setDepColumns() {
+        return [
+            {
+                title: '广告组名称',
+                dataIndex: 'unitName',
+                width: '50%',
+                align: 'center'
+            },
+            {
+                title: '所属账户',
+                dataIndex: 'authName',
+                width: '50%',
+                align: 'center'
+            }
+        ]
+    }
+
+    // 状态枚举
+    setPlatform() {
+        return [
+            {
+                label: 0,
+                value: '不限'
+            },
+            {
+                label: 1,
+                value: 'Android'
+            },
+            {
+                label: 2,
+                value: 'IOS'
+            }
+        ]
+    }
+
+    // 上传人去报的校验规则
+    setPersonRules() {
+        return {
+            name: [
+                {required: true, message: '人群包名称不能为空', trigger: 'blur'},
+                {min: 1, max: 20, message: '人群包名称不能超过20个字符', trigger: 'blur'}
+            ],
+            resource: [
+                {required: true, message: '请选择匹配类型', trigger: 'change'}
+            ]
+        }
+    }
+
+    // 人群包类型枚举值
+    setPopulationTypeTasks() {
+        return [
+            {
+                label: 1,
+                value: '上传人群'
+            }, {
+                label: 2,
+                value: '广告人群'
+            }, {
+                label: 3,
+                value: '主题专区'
+            }, {
+                label: 4,
+                value: '逻辑规则'
+            }, {
+                label: 5,
+                value: '人群扩展'
+            }, {
+                label: 6,
+                value: '平台制定'
+            }, {
+                label: 7,
+                value: '定制付费'
+            }, {
+                label: 8,
+                value: '网红粉丝类别'
+            }, {
+                label: 9,
+                value: '内容付费行为'
+            }, {
+                label: 10,
+                value: '移动应用安装'
+            }, {
+                label: 11,
+                value: '快手使用活跃度'
+            }, {
+                label: 12,
+                value: '行业分类'
+            }, {
+                label: 13,
+                value: '商业兴趣'
+            }, {
+                label: 14,
+                value: '固话标签'
+            }, {
+                label: 15,
+                value: '行业偏好'
+            }, {
+                label: 16,
+                value: '第三方标签'
+            }, {
+                label: 17,
+                value: '产品关键词'
+            }, {
+                label: 19,
+                value: '应用渗透率'
+            }, {
+                label: 22,
+                value: '指定网红'
+            }, {
+                label: 23,
+                value: '行业分类'
+            }
+        ]
+    }
+
+    // 匹配类型枚举值
+    setMateTypeTasks() {
+        return [
+            {
+                label: 1,
+                value: 'IMEI'
+            }, {
+                label: 2,
+                value: 'IDFA'
+            }, {
+                label: 3,
+                value: 'IMEI_MD5'
+            }, {
+                label: 4,
+                value: 'IDFA_MD5'
+            }, {
+                label: 5,
+                value: '手机号-MD5'
+            }, {
+                label: 7,
+                value: 'OAID'
+            }, {
+                label: 8,
+                value: 'OAID_MD5'
+            }
+        ]
+    }
+
+}
+
+export default new AppMarketService();

+ 113 - 0
src/views/modules/autoLaunch/material-all/material.less

@@ -0,0 +1,113 @@
+.directional-content {
+    background: #fff;
+    // height: calc(100vh - 137px);
+    padding: 20px;
+    overflow-y: auto;
+    .middle-button {
+        margin: 0 8px;
+    }
+    .control-con-header {
+        margin-bottom: 20px;
+        position: relative;
+        /deep/ .ant-form-inline .ant-form-item > .ant-form-item-control-wrapper, .ant-form-inline .ant-form-item > .ant-form-item-label {
+            width: 200px !important;
+        }
+        .reset-class {
+            margin-right: 10px !important;
+        }
+        .upload-person {
+            position: absolute;
+            right: 10px;
+            top: 0;
+        }
+    }
+    .cause-text-class {
+        cursor: pointer;
+    }
+    .pagin-table-class {
+        display: flex;
+        justify-content: flex-end;
+        margin-top: 20px;
+    }
+    .acount-search-class {
+        width: 200% !important;
+    }
+    .grid-form-type {
+        margin-left: 210px;
+    }
+}
+/deep/ .push-modal {
+    width: 600px !important;
+    .acount-title {
+        display: flex;
+        font-size: 14px;
+        height: 40px;
+        line-height: 40px;
+        .acount-title-left {
+            margin-right: 20px;
+            width: 100px;
+        }
+    }
+    .push-plate {
+        margin-bottom: 20px;
+    }
+}
+.person-modal {
+    width: 500px;
+    /deep/ .ant-form-item {
+        display: flex;
+    }
+    /deep/ .ant-form-item-label {
+        width: 20%;
+    }
+    /deep/ .ant-form-item-control-wrapper {
+        width: 80%;
+    }
+    .acount-search-class {
+        width: 100% !important;
+    }
+    .upload-txt-rules {
+        margin-top: 10px;
+        margin-bottom: 10px;
+        line-height: 1.5;
+    }
+    /deep/ .ant-radio-group {
+        line-height: 30px;
+    }
+}
+/deep/ .cause-modal {
+    width: 600px !important;
+    .cause-modal-table-class {
+        height: 500px;
+        overflow-y: auto;
+    }
+    .pagin-table-class {
+        display: flex;
+        justify-content: flex-end;
+        margin-top: 20px;
+    }
+}
+/deep/ .relax-modal {
+    width: 600px !important;
+    .acount-title {
+        display: flex;
+        font-size: 14px;
+        height: 40px;
+        line-height: 40px;
+        .acount-title-left {
+            margin-right: 20px;
+            width: 100px;
+        }
+    }
+    .push-plate {
+        margin-bottom: 20px;
+    }
+}
+
+.grid-form-item-account {
+    /deep/ .ant-form-item-control {
+        line-height: inherit;
+    }
+}
+
+

+ 145 - 0
src/views/modules/autoLaunch/material-all/material.vue

@@ -0,0 +1,145 @@
+<template>
+  <div>
+    <a-card title="素材管理" style="width: 100%"> 
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline"  :form="form"
+                hide-required-mark :selfUpdate="true" 
+                @submit="handleQueryList">
+                <a-row :gutter="24">
+                     <a-col :md="8" :sm="8" :xxl="6">
+                        <!-- <a-form-item label="项目名称"> -->
+                        <selectTable :projectId.sync="projectId" ref="selectTable" :requireCheck="false"></selectTable>
+                    </a-col>
+                    <a-col :md="8" :sm="8" :xxl="6">
+                        <a-form-item label="唯一编码">
+                            <a-input
+                                v-decorator="['name']" type="text"
+                                placeholder="请输入需要搜索的定向包名称"
+                            />
+                        </a-form-item>
+                    </a-col>
+                    <!--  -->
+                    <a-col :md="8" :sm="8" :xxl="6">
+                        <a-form-item label="素材状态">
+                            <a-select
+                                v-decorator="['status']"
+                                placeholder="请选择"
+                                allow-clear
+                            >
+                                <a-select-option v-for="item in platform" :key="item.label">
+                                    {{ item.value }}
+                                </a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                     <!--  -->
+                    <a-col :md="8" :sm="8" :xxl="6">
+                        <a-form-item label="系统平台">
+                            <a-select
+                                v-decorator="['status']"
+                                placeholder="请选择"
+                                allow-clear
+                            >
+                                <a-select-option v-for="item in platform" :key="item.label">
+                                    {{ item.value }}
+                                </a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="8" :sm="8" :xxl="6">
+                        <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+                            <a-button type="primary" icon="search" @click="handleQueryList">查询</a-button>
+                            <a-button type="primary" @click="handleResetForm" icon="reload" class="middle-button">重置</a-button>
+                            <a-button type="primary" @click="addNewTemplate(null)">新建定向包</a-button>
+                        </span>
+                        
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import selectTable from '@/views/modules/Statistics/components/selectPagination.vue';
+export default {
+    components: {
+        selectTable
+    },
+    data() {
+        return {
+            form:this.$form.createForm(this),
+            projectId: '',
+            dataSource: [],
+            dataLoading: false,
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                //   pageSizeOptions: ['10', '20', '30'],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条"
+                },
+                showQuickJumper: true,
+                showSizeChanger:false,
+                pageSizeOptions: ['10', '30', '50'],
+                total: 0,
+                onChange: (current, pageSize) => {
+                    // 切换分页时的回调,
+                    // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+                    this.ipagination.current = current;
+                    this.ipagination.pageSize= pageSize;
+                    this.handleGetTableList({})
+                }
+            },
+        }
+    },
+    methods: {
+        handleQueryList() {
+            this.ipagination.current = 1;
+            event.preventDefault();
+            const paramsData = this.form.getFieldsValue();
+            this.handleGetTableList(paramsData);
+        },
+        handleResetForm() {
+            this.ipagination.current = 1;
+            this.form.resetFields();
+            this.projectId = undefined;
+            this.handleGetTableList({});
+            this.$refs.selectTable.keyValue = "";
+            this.$refs.selectTable.getData()
+        },
+        handleGetTableList(data) {
+            const paramsData = {
+                templateName: data.name,
+                projectId: this.projectId,
+                platformOs: data.status,
+                pageNo:  this.ipagination.current,
+                pageSize: this.ipagination.pageSize
+            };
+            this.dataSource = []
+            this.dataLoading = true;
+            getAction('/kuaishouProjectVideoGet/list', paramsData).then(result => {
+                this.dataLoading = false;
+                if (result.code === 200) {
+                    this.dataSource = result.result.list || [];
+                    this.ipagination.total = result.result.total || 0;
+                }
+                else {
+                    this.$message.error(result.message);
+                }
+            }).catch(error => {
+                this.dataLoading = false;
+                console.log(error, 'eeee');
+            });
+        },
+    },
+    mounted() {
+        this.handleGetTableList({});
+    },
+}
+</script>
+<style lang="less" scoped>
+    @import "material";
+</style>

+ 2 - 2
vue.config.js

@@ -77,7 +77,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.219:8081', //请求本地 需要jeecg-boot后台项目  赵西安
+        target: 'http://192.168.1.219:8081', //请求本地 需要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后台项目
@@ -88,7 +88,7 @@ module.exports = {
         // target:'http://118.24.244.213:8804',
         // target: 'http://192.168.1.43:8080', // 子安
         // target: 'http://192.168.1.8:8806', // 学超
-       target:'http://139.186.165.84:8806', //测试
+      //  target:'http://139.186.165.84:8806', //测试
         // target:'http://apipre.tjyourong.com.cn', //预生产
 
         ws: false,