فهرست منبع

新建分支work-earlyWarning

朱鑫波 3 سال پیش
والد
کامیت
da7d1e8bf3

+ 673 - 0
src/views/modules/earlyWarningRules/accountClear/createClear.vue

@@ -0,0 +1,673 @@
+<style scoped lang="scss">
+/deep/.display-none-selset {
+    display: none !important;
+}
+.step-jump {
+    /deep/ table tr td {
+        border-bottom: 0px;
+    }
+}
+.bottom-to-one {
+    /deep/ .ant-form-item {
+        margin-bottom: 0;
+    }
+}
+.target-person-add-button {
+    margin-left: 15px;
+}
+.card-person {
+    width: 300px;
+    /deep/.ant-card-body {
+        padding: 0px;
+    }
+    /deep/.ant-card-head {
+        padding: 0px 10px;
+    }
+    .card-main-case {
+        height: 250px;
+        overflow: auto;
+        padding: 0 5px;
+    }
+}
+.card-person-drawer {
+    width: 100%;
+    height: 90%;
+    overflow: hidden;
+    padding: 10px 0px;
+    display: flex;
+    flex-wrap: wrap;
+    margin-right: -10px;
+    justify-content: space-between;
+    .card-item {
+        width: calc(33% - 10px);
+        margin-bottom: 10px;
+        float: left;
+    }
+    .card-item-else {
+        width: calc(20% - 10px);
+        margin-bottom: 10px;
+        float: left;
+    }
+}
+.showShare {
+    position: relative;
+}
+.share {
+    display: none;
+}
+.showShare:hover .share {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.chouzhen {
+    border-style: solid;
+    border-width: 1px;
+    border-color: #e4e4e4;
+    width: calc(20% - 10px);
+    padding: 10px;
+    margin-right: 10px;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+    background: #fff;
+    position: relative;
+    z-index: 99;
+    float: left;
+}
+
+li.chouzhen.first:before {
+    font-size: 12px;
+    content: '首帧';
+    position: absolute;
+    top: 7px;
+    left: 5px;
+    width: 36px;
+    height: 20px;
+    color: rgb(255, 255, 255);
+    line-height: 20px;
+    text-align: center;
+    background: rgba(0, 0, 0, 0.5);
+    border-radius: 2px;
+    z-index: 1000;
+}
+.display-none-selset {
+    display: none !important;
+}
+.logo {
+    padding-left: 24px;
+    img {
+        height: 32px !important;
+    }
+    .name {
+        font-size: 14px;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #ced2d9;
+        // line-height: 22px;
+        margin-left: 20px;
+        padding-left: 21px;
+        position: relative;
+    }
+    .name::before {
+        content: '';
+        width: 1px;
+        height: 18px;
+        background: rgba(255, 255, 255, 0.31);
+        position: absolute;
+        left: 0;
+        top: 50%;
+        margin-top: -9px;
+    }
+}
+.chartBox {
+    .chartBody {
+        display: flex;
+        justify-content: space-around;
+        flex-wrap: wrap;
+    }
+    .search-box {
+        margin-bottom: 20px;
+    }
+}
+
+/deep/ .ant-descriptions-item-content {
+    font-weight: bold;
+}
+
+.info-detail {
+    /deep/ table tr td {
+        border: 0;
+    }
+    /deep/ .ant-descriptions-item-label {
+        color: darkgray;
+        // min-width: 30px;
+        white-space: nowrap;
+    }
+}
+.flex-main {
+    display: flex;
+    margin-bottom: 10px;
+    p {
+        color: black;
+        font-weight: 600;
+        overflow: hidden; //超出的文本隐藏
+        text-overflow: ellipsis; //溢出用省略号显示
+        white-space: nowrap; //溢出不换行
+    }
+}
+</style>
+<style lang="scss">
+.hide-checkbox .ant-table-thead .ant-table-selection {
+    display: none;
+}
+.new-batch .ant-card-head-title {
+    font-weight: 700;
+}
+// .new-batch textarea {
+//   resize: none;
+//   border: none;
+//   outline: 0;
+//   box-shadow: none;
+// }
+.create-info .ant-form-item {
+    margin-bottom: 0 !important;
+}
+.fengmian .ant-checkbox-wrapper:first-child {
+    margin-left: 8px;
+}
+@media screen and (max-width: 1200px) {
+    // 这里写对应要修改的样式如:
+    .new-batch .el-step__title {
+        font-size: 12px;
+    }
+}
+.line-height-one .ant-form-item-control {
+    line-height: inherit;
+}
+.creat-all-info .ant-form-item-control {
+    width: 60%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+.config-new-batch {
+    .display-none-selset {
+        display: none !important;
+    }
+    .ant-btn-danger {
+        background-color: #ff4d4f !important;
+    }
+}
+</style>
+<template>
+    <div ref="questionnaireBox" class="new-batch config-new-batch">
+        <div class="chartBox">
+            <a-row :gutter="20">
+                <a-col :sm="24" style="margin-bottom: 20px; z-index: 10" id="container">
+                    <a-card class="search-box step-jump">
+                        <a-form layout="horizontal" v-bind="formItemLayout" :form="formOptimize">
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="模板名称">
+                                        <a-input
+                                            :disabled="$route.query.preview == 'true'"
+                                            v-decorator="[
+                                                'templateName',
+                                                {
+                                                    rules: [
+                                                        { required: true, message: ' ' },
+                                                        { validator: templateNameValid }
+                                                    ]
+                                                }
+                                            ]"
+                                        >
+                                        </a-input>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="清理时间范围">
+                                        <a-select
+                                            :disabled="$route.query.preview == 'true'"
+                                            v-decorator="[
+                                                'cleanTime',
+                                                {
+                                                    rules: [{ required: true, message: '清理时间范围必选' }],
+                                                    initialValue: '1'
+                                                }
+                                            ]"
+                                        >
+                                            <a-select-option value="1">最近一天</a-select-option>
+                                            <a-select-option value="3">最近三天</a-select-option>
+                                            <a-select-option value="7">最近七天</a-select-option>
+                                            <a-select-option value="15">最近十五天</a-select-option>
+                                        </a-select>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="优化目标">
+                                        <a-select
+                                            :disabled="$route.query.preview == 'true'"
+                                            showSearch
+                                            allowClear
+                                            mode="multiple"
+                                            v-decorator="[
+                                                'optimizationObjective',
+                                                {
+                                                    rules: [{ required: true, message: '优化目标必选' }],
+                                                    initialValue: ['activation']
+                                                }
+                                            ]"
+                                        >
+                                            <a-select-option value="bclick">行为数</a-select-option>
+                                            <a-select-option value="activation">激活</a-select-option>
+                                            <a-select-option value="formSize">表单提交</a-select-option>
+                                            <a-select-option value="pay">付费</a-select-option>
+                                            <a-select-option value="roi">首日ROI</a-select-option>
+                                            <a-select-option value="evocativeApplication">唤起应用</a-select-option>
+                                            <a-select-option value="effectiveClues">使用有效线索</a-select-option>
+                                            <a-select-option value="creditApp">授信App</a-select-option>
+                                            <a-select-option value="creditGrant">授信落地页</a-select-option>
+                                            <a-select-option value="ordersSubmitted">订单提交</a-select-option>
+                                            <a-select-option value="finishedPieceApp">App完件数</a-select-option>
+                                            <a-select-option value="finishedPieceGrant">落地页完件数</a-select-option>
+                                            <a-select-option value="registered">注册优化目标</a-select-option>
+                                        </a-select>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="累计消耗">
+                                        <span style="width: 15%;display: inline-block;">小于等于</span>
+                                        <a-input-number
+                                            :disabled="$route.query.preview == 'true'"
+                                            v-decorator="[
+                                                'charge',
+                                                {
+                                                    rules: [
+                                                        {
+                                                            required: true,
+                                                            message: '累计消耗必填'
+                                                        }
+                                                    ],
+                                                    initialValue: 100
+                                                }
+                                            ]"
+                                            :min="0"
+                                            :precision="0"
+                                            style="width: 60%"
+                                        />
+                                        元
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="累计转化数">
+                                        <span style="width: 15%;display: inline-block;">小于等于</span>
+
+                                        <a-input-number
+                                            :disabled="$route.query.preview == 'true'"
+                                            v-decorator="[
+                                                'conversion',
+                                                {
+                                                    rules: [
+                                                        {
+                                                            required: true,
+                                                            message: '累计转化数必填'
+                                                        }
+                                                    ],
+                                                    initialValue: 2
+                                                }
+                                            ]"
+                                            :min="0"
+                                            :precision="0"
+                                            style="width: 60%"
+                                        />
+                                        个
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="推广组状态">
+                                        <a-select
+                                            :disabled="$route.query.preview == 'true'"
+                                            v-decorator="[
+                                                'promotionGroupStatus',
+                                                {
+                                                    rules: [{ required: true, message: '推广组状态必选' }],
+                                                    initialValue: '1'
+                                                }
+                                            ]"
+                                            @change="checkStatus"
+                                        >
+                                            <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>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <!-- { rules: [{ validator: deepBidValid }] } -->
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="执行操作类型">
+                                        <a-radio-group
+                                            :disabled="$route.query.preview == 'true'"
+                                            button-style="solid"
+                                            v-decorator="[
+                                                'performOperations',
+                                                {
+                                                    rules: [{ required: true, message: '执行操作类型必选' }],
+                                                    initialValue: '3'
+                                                }
+                                            ]"
+                                        >
+                                            <a-radio-button value="3">删除</a-radio-button>
+                                            <a-radio-button
+                                                value="2"
+                                                :disabled="getFormData('formOptimize', 'promotionGroupStatus') != '1'"
+                                                >暂停</a-radio-button
+                                            >
+                                        </a-radio-group>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="执行操作时间">
+                                        每天上午10点以后执行
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                        </a-form>
+                    </a-card>
+                    <div
+                        style="display: flex; justify-content: flex-end; margin-bottom: 100px"
+                        v-if="$route.query.preview != 'true'"
+                    >
+                        <div>
+                            <a-button
+                                type="primary"
+                                style="margin-right: 15px"
+                                @click="handleSubmit"
+                                :loading="sumbitLoading"
+                                :disabled="disabled"
+                            >
+                                创建
+                            </a-button>
+                            <a-button @click="clearAllData"> 取消 </a-button>
+                        </div>
+                    </div>
+                </a-col>
+            </a-row>
+        </div>
+    </div>
+</template>
+
+<script>
+//   import UserMenu from '../tools/UserMenu'
+//   import SMenu from '../menu/'
+import Logo from '@/components/tools/Logo.vue'
+import pick from 'lodash.pick'
+import { mixin } from '@/utils/mixin.js'
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+import moment from 'moment'
+import selectCheckAll from '@/components/formComponents/toutiaoTime'
+import checkBoxGroup from '@/components/formComponents/checkBoxGroup'
+import uploadFile from '@/components/uploadFileMd5Push.vue'
+import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+import selectTable from '@/views/modules/Statistics/components/selectPagination.vue'
+import { mapGetters } from 'vuex'
+// import lookPreviewVue from './lookPreview.vue'
+function tqFun(qcArr1) {
+    var tempArr = []
+    function bbFun(qcArr) {
+        for (var i = 0; i < qcArr.length; i++) {
+            if (qcArr[i] instanceof Array) {
+                bbFun(qcArr[i])
+            } else {
+                tempArr.push(qcArr[i])
+            }
+        }
+        return tempArr
+    }
+    return bbFun(qcArr1)
+}
+
+export default {
+    name: 'GlobalHeader',
+    components: {
+        //   UserMenu,
+        //   SMenu,
+        Logo,
+        Treeselect,
+        selectCheckAll,
+        checkBoxGroup,
+        uploadFile,
+        selectTable
+    },
+    data() {
+        return {
+            formOptimize: this.$form.createForm(this), //优化目标表单
+            sumbitLoading: false,
+            formItemLayout: {
+                labelCol: { span: 4 },
+                wrapperCol: { span: 16 }
+            },
+            formDrawerItemLayout: {
+                labelCol: { span: 5 },
+                wrapperCol: { span: 19 }
+            },
+            tailFormItemLayout: {
+                wrapperCol: {
+                    sm: {
+                        span: 20,
+                        offset: 4
+                    }
+                }
+            },
+            tailFormItemLayoutElse: {
+                wrapperCol: {
+                    sm: {
+                        span: 20,
+                        offset: 1
+                    }
+                }
+            },
+            tailFormDrawerItemLayout: {
+                wrapperCol: {
+                    sm: {
+                        span: 19,
+                        offset: 5
+                    }
+                }
+            },
+            disabled: false
+        }
+    },
+    computed: {},
+    watch: {},
+    mounted() {
+        this.$nextTick(function() {
+            if (this.$route.query.id) {
+                this.getAction('/accountClean/previewTemplate', { templateId: this.$route.query.id }).then(res => {
+                    if (res.success) {
+                        let data = res.result
+                        data.optimizationObjective = data.optimizationObjective.split(',')
+                        this.formOptimize.setFieldsValue(
+                            pick(
+                                data,
+                                'templateName',
+                                'cleanTime',
+                                'optimizationObjective',
+                                'charge',
+                                'conversion',
+                                'promotionGroupStatus',
+                                'performOperations'
+                            )
+                        )
+                    }
+                })
+            } else {
+                this.formOptimize.setFieldsValue({
+                    promotionGroupStatus: '1'
+                })
+            }
+        })
+    },
+    filters: {},
+    methods: {
+        moment,
+        templateNameValid(rule, value, callback) {
+            if (value === '' || value === undefined || value === 0 || value === '0') {
+                callback('模板名称必须填写')
+            } else {
+                let params = {}
+                params.templateName = value
+                if (this.$route.query.id) {
+                    params.id = this.$route.query.id
+                    callback()
+                } else {
+                    this.getAction('/accountClean/getTemplateNameSize', params).then(res => {
+                        if (res.success) {
+                            if (res.result > 0) {
+                                callback('模板名称重复')
+                            } else {
+                                callback()
+                            }
+                        }
+                    })
+                }
+            }
+        },
+        ...mapGetters(['userInfo']),
+        getFormData(form, className) {
+            return this[form].getFieldValue(className)
+        },
+        handleSubmit() {
+            // /accountClean/createTemplate
+            this.formOptimize.validateFields((err, values) => {
+                if (!err) {
+                    this.sumbitLoading = true
+                    let params = { ...values }
+                    params.optimizationObjective = params.optimizationObjective.join()
+                    params.createId = this.userInfo().id
+                    params.createUser = this.userInfo().username
+                    console.log(this.userInfo())
+                    if (this.$route.query.id) {
+                        params.id = this.$route.query.id
+                        this.postDataAction('/accountClean/updateTemplate', params).then(res => {
+                            this.sumbitLoading = false
+                            if (res.success) {
+                                this.$router.replace('/earlyWarningRules/accountClear')
+                                this.$bus.$emit('remove', `/earlyWarningRules/createClear?id=${this.$route.query.id}`)
+                            } else {
+                                this.$message.error(res.message)
+                            }
+                        })
+                    } else {
+                        this.postDataAction('/accountClean/createTemplate', params).then(res => {
+                            this.sumbitLoading = false
+                            if (res.success) {
+                                this.$router.replace('/earlyWarningRules/accountClear')
+                                this.$bus.$emit('remove', '/earlyWarningRules/createClear')
+                            } else {
+                                this.$message.error(res.message)
+                            }
+                        })
+                    }
+                } else {
+                }
+            })
+        },
+        checkStatus(e) {
+            // if (e != '1') {
+            this.formOptimize.setFieldsValue({
+                performOperations: '3'
+            })
+            // }else{
+            //      this.formOptimize.setFieldsValue({
+            //         performOperations: undefined
+            //     })
+            // }
+        },
+        clearAllData() {
+            if (this.$route.query.id) {
+                this.$router.replace('/earlyWarningRules/accountClear')
+                this.$bus.$emit('remove', `/earlyWarningRules/createClear?id=${this.$route.query.id}`)
+            } else {
+                this.$router.replace('/earlyWarningRules/accountClear')
+                this.$bus.$emit('remove', '/earlyWarningRules/createClear')
+            }
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+/* update_begin author:scott date:20190220 for: 缩小首页布局顶部的高度*/
+
+$height: 59px;
+.layout .header .user-wrapper .action .anticon,
+.layout .top-nav-header-index .user-wrapper .action .anticon {
+    color: #999;
+}
+.layout .header .user-wrapper .action .anticon,
+.layout .top-nav-header-index .user-wrapper .action .anticon {
+    color: #999;
+}
+.layout {
+    .top-nav-header-index {
+        .header-index-wide {
+            margin-left: 10px;
+
+            .ant-menu.ant-menu-horizontal {
+                height: $height;
+                line-height: $height;
+            }
+        }
+
+        .trigger {
+            line-height: 48px;
+            font-size: 17px;
+            &:hover {
+                background: rgba(0, 0, 0, 0.05);
+            }
+        }
+    }
+
+    .header {
+        z-index: 2;
+        color: #999;
+        height: $height;
+        background-color: #1890ff;
+        transition: background 300ms;
+
+        /* dark 样式 */
+        &.dark {
+            color: #000000;
+            box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
+            background-color: white !important;
+        }
+    }
+
+    .header,
+    .top-nav-header-index {
+        &.dark .trigger:hover {
+            background: rgba(0, 0, 0, 0.05);
+        }
+    }
+}
+
+.ant-layout-header {
+    height: $height;
+    line-height: $height;
+}
+</style>

+ 972 - 0
src/views/modules/earlyWarningRules/accountClear/index.vue

@@ -0,0 +1,972 @@
+<style lang="scss" scoped>
+.search-bar {
+    display: flex;
+    align-items: center;
+}
+.search-box p {
+    display: inline-block;
+    border: 1px solid #f2f2f2;
+    border-radius: 5px;
+    margin-right: 10px;
+    padding: 5px 10px;
+    cursor: pointer;
+}
+</style>
+<style scoped>
+.showNumBox {
+    margin: 10px 0;
+}
+.showNumBox .ant-card-body {
+    display: flex;
+    justify-content: center;
+}
+.showNumBox p,
+.showNumBox span {
+    text-align: center;
+    line-height: 40px;
+    font-size: 30px;
+    font-weight: 600;
+    color: red;
+    margin: 0;
+}
+.search-box .ant-card-body {
+    padding: 5px 15px;
+}
+.showNumBox .ant-card-body .styleElse {
+    line-height: 60px;
+    height: 40px;
+    font-size: 16px;
+    font-weight: 400;
+    margin-left: 10px;
+}
+.ant-modal-wrap .yincang .ant-modal-content .ant-modal-footer {
+    display: none !important;
+}
+.yincang .ant-col-6 p {
+    text-align: left;
+    color: red;
+    font-size: 16px;
+    font-weight: 500;
+}
+.ant-table-thead div {
+    font-weight: 700;
+}
+.tool-tip {
+    position: absolute;
+    top: 65px;
+    right: 10px;
+}
+</style>
+<style lang="less" scoped>
+.ant-card-head .ant-tabs-bar {
+    padding: 0;
+}
+.search-box .ant-card-body {
+    padding: 5px 15px;
+}
+.search-box {
+    padding: 15px 10px;
+}
+.search-box p {
+    display: inline-block;
+    border: 1px solid #f2f2f2;
+    border-radius: 5px;
+    margin-right: 10px;
+    padding: 5px 10px;
+    cursor: pointer;
+}
+.statistics .ant-col-6 .ant-card-body .styleElse {
+    line-height: 60px;
+    height: 40px;
+    font-size: 16px;
+    font-weight: 400;
+    margin-left: 10px;
+}
+.ant-modal-wrap .yincang .ant-modal-content .ant-modal-footer {
+    display: none !important;
+}
+.yincang .ant-col-6 p {
+    text-align: left;
+    color: red;
+    font-size: 16px;
+    font-weight: 500;
+}
+.ant-table-thead div {
+    font-weight: 700;
+}
+.tool-tip {
+    position: absolute;
+    top: 65px;
+    right: 10px;
+}
+.statistics {
+    .ant-card-bordered {
+        border: none;
+    }
+    .ant-card-head .ant-tabs {
+        clear: both;
+        margin-bottom: -13px;
+        color: rgba(0, 0, 0, 0.65);
+        font-weight: normal;
+        font-size: 14px;
+    }
+    .duibi {
+        position: absolute;
+        right: 24px;
+        top: 15px;
+    }
+    p {
+        margin-bottom: 0;
+    }
+}
+</style>
+
+<style lang="less" scoped>
+.middle-button {
+    margin: 0 10px;
+}
+.newPlanStatic {
+    .divider {
+        height: 62px;
+    }
+    .showNumBox {
+        background: white;
+        overflow: hidden;
+        margin: 15px 0;
+        padding: 30px 0;
+        text-align: center;
+        .ant-card-body {
+            padding-top: 0;
+        }
+        .title {
+            font-size: 14px;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #999999;
+            line-height: 22px;
+            display: inline-block;
+        }
+    }
+    .tabbody {
+        background: white;
+        padding: 0 24px;
+        margin-bottom: 15px;
+        .ant-tabs-bar {
+            margin: 0;
+        }
+    }
+    .chartBox {
+        background: white;
+        padding: 20px 0;
+    }
+    .tableBody {
+        background: white;
+        padding: 20px;
+    }
+}
+</style>
+<template>
+    <div class="newPlanStatic config-project">
+        <div class="tabbody">
+            <a-tabs v-model="tabKey" @change="tabChange">
+                <a-tab-pane :key="1" tab="清理模板列表"> </a-tab-pane>
+                <a-tab-pane :key="2" tab="我的清理模板"> </a-tab-pane>
+                <!-- <a-button slot="tabBarExtraContent" type="primary" @click="getHistroy(null)">
+                    历史记录查询
+                </a-button> -->
+            </a-tabs>
+        </div>
+        <a-card>
+            <div class="table-page-search-wrapper">
+                <a-form layout="inline" :form="form" hide-required-mark :selfUpdate="true" @submit="handleQueryList">
+                    <a-row :gutter="24" v-if="tabKey === 1">
+                        <a-col :md="8" :sm="8" :xxl="6">
+                            <a-form-item label="模板名称">
+                                <a-input
+                                    v-decorator="['templateName']"
+                                    type="text"
+                                    placeholder="请输入需要搜索的模板名称"
+                                />
+                            </a-form-item>
+                            <!-- <selectTable :projectId.sync="projectIdAll" ref="selectTable"></selectTable> -->
+                        </a-col>
+
+                        <a-col :md="8" :sm="8" :xxl="6">
+                            <a-form-item label="创建人">
+                                <a-input
+                                    v-decorator="['createUser']"
+                                    type="text"
+                                    placeholder="请输入创建模板的账号归属人名字"
+                                />
+                            </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="newCreat(null)">
+                                    新建清理模板
+                                </a-button>
+                            </span>
+                        </a-col>
+                    </a-row>
+                    <a-row :gutter="24" v-else>
+                        <a-col :md="8" :sm="8" :xxl="6">
+                            <a-form-item label="账户名称">
+                                <Treeselect
+                                    :appId.sync="accountId"
+                                    :multiple="false"
+                                    request="2,4"
+                                    ref="treeSelect"
+                                    style="width:100%"
+                                />
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="8" :sm="8" :xxl="6">
+                            <a-form-item label="绑定人">
+                                <a-input v-decorator="['userName']" type="text" placeholder="请输入绑定的运营名称" />
+                            </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
+                                >
+                            </span>
+                        </a-col>
+                    </a-row>
+                </a-form>
+            </div>
+        </a-card>
+
+        <a-row style="margin-bottom:15px;margin-top:12px">
+            <a-col :span="24">
+                <div class="tableBody" style="min-height:200px;padding-bottom: 50px">
+                    <a-table
+                        :columns="columns"
+                        :dataSource="dataSource"
+                        :pagination="false"
+                        :loading="dataLoading"
+                        bordered
+                        @change="tableChange"
+                        size="middle"
+                        style="word-break: break-all;font-size:16px;font-weight:600"
+                        id="outTable"
+                        ref="accountTable"
+                    >
+                        <span slot="action" slot-scope="text, record">
+                            <a @click="newCreat(record.id, 'preview')">预览</a>
+                            <a-divider type="vertical" />
+                            <a @click="matchingAccount(record)">推送</a>
+                            <a-divider type="vertical" />
+                            <a @click="newCreat(record.id, 'edit')">编辑</a>
+                        </span>
+                        <span slot="actionTwo" slot-scope="text, record">
+                            <a @click="removeTemplate(record)">删除清理模板</a>
+                            <a-divider type="vertical" />
+                            <a @click="getHistroy(record)">历史记录查询</a>
+                        </span>
+                        <span slot="status" slot-scope="text, record">
+                            <a-switch
+                                :checked="text == '0'"
+                                @change="onChangeStatus(text, record, 'status')"
+                                :loading="spinning"
+                                v-if="record.projectName !== '-'"
+                            />
+                        </span>
+                    </a-table>
+                    <a-pagination
+                        size="small"
+                        :showTotal="ipagination.showTotal"
+                        style="float: right;margin-top:10px"
+                        v-if="dataSource.length > 0"
+                        showQuickJumper
+                        :pageSize.sync="ipagination.pageSize"
+                        :total="ipagination.total"
+                        v-model="ipagination.current"
+                        @change="getDataSource"
+                    />
+                </div>
+            </a-col>
+        </a-row>
+
+        <a-modal
+            title="推送账户选择"
+            :width="800"
+            v-if="accountVisible"
+            :visible="accountVisible"
+            @cancel="
+                accountVisible = false
+                accountIdPush = ''
+            "
+            dialog-class="push-modal"
+            @ok="handleOkPrice"
+            :confirm-loading="modifyPriceLoading"
+        >
+            <div v-if="accountProjectDetail" style="display:flex">
+                <span>请选择账户:</span>
+                <Treeselect
+                    :appId.sync="accountIdPush"
+                    :multiple="false"
+                    request="2,4"
+                    ref="treeSelect"
+                    style="width:80%;position: relative;top: -5px;"
+                />
+            </div>
+        </a-modal>
+        <a-modal
+            title="推送组清理记录"
+            :width="800"
+            v-if="unitVisible"
+            :visible="unitVisible"
+            @cancel="unitVisible = false"
+            dialog-class="push-modal"
+            :footer="null"
+        >
+            <a-table
+                :columns="historyColumns"
+                :dataSource="historyList"
+                :pagination="ipaginationHistory"
+                bordered
+                size="middle"
+                style="word-break: break-all;font-size:16px;font-weight:600"
+            >
+                <span slot="authStatus" slot-scope="text">
+                    {{ text === 0 ? '失败' : '成功' }}
+                </span>
+            </a-table>
+        </a-modal>
+    </div>
+</template>
+
+<script>
+import ARow from 'ant-design-vue/es/grid/Row'
+import ACol from 'ant-design-vue/es/grid/Col'
+import moment from 'moment'
+import selectTable from '@/views/modules/Statistics/components/selectPagination.vue'
+import { getKsAccountReport, getKsDetail, getReportList } from '@api/video.js'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import { mapGetters } from 'vuex'
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+import qs from 'qs'
+
+let TTcolumns = [
+    {
+        title: '模板id',
+        dataIndex: 'id',
+        scopedSlots: { customRender: 'id' },
+        align: 'center',
+        key: 'id'
+    },
+    {
+        title: '模板名称',
+        dataIndex: 'templateName',
+        scopedSlots: { customRender: 'templateName' },
+        align: 'center',
+        key: 'templateName'
+    },
+    {
+        title: '应用媒体',
+        dataIndex: 'appliedMedia',
+        scopedSlots: { customRender: 'appliedMedia' },
+        align: 'center',
+        key: 'appliedMedia'
+    },
+
+    {
+        title: '创建人',
+        dataIndex: 'createUser',
+        scopedSlots: { customRender: 'createUser' },
+        align: 'center',
+        key: 'createUser'
+    },
+    {
+        title: '操作',
+        dataIndex: 'action',
+        scopedSlots: { customRender: 'action' },
+        align: 'center',
+        key: 'action'
+    }
+]
+
+let KScolumns = [
+    {
+        title: '开关',
+        dataIndex: 'status',
+        scopedSlots: { customRender: 'status' },
+        align: 'center',
+        key: 'status'
+    },
+    {
+        title: '模板id',
+        dataIndex: 'id',
+        scopedSlots: { customRender: 'id' },
+        align: 'center',
+        key: 'id'
+    },
+    {
+        title: '模板名称',
+        dataIndex: 'templateName',
+        scopedSlots: { customRender: 'templateName' },
+        align: 'center',
+        key: 'templateName'
+    },
+
+    {
+        title: '应用媒体',
+        dataIndex: 'appliedMedia',
+        scopedSlots: { customRender: 'appliedMedia' },
+        align: 'center',
+        key: 'appliedMedia'
+    },
+    {
+        title: '账户名称',
+        dataIndex: 'accountName',
+        scopedSlots: { customRender: 'accountName' },
+        align: 'center',
+        key: 'accountName'
+    },
+    {
+        title: '账户ID',
+        dataIndex: 'accountId',
+        scopedSlots: { customRender: 'accountId' },
+        align: 'center',
+        key: 'accountId'
+    },
+    {
+        title: '账户状态',
+        dataIndex: 'accountStatus',
+        customRender(t) {
+            if (t == 0) {
+                return '启用'
+            } else {
+                return '停用'
+            }
+        },
+        align: 'center',
+        key: 'accountStatus'
+    },
+    {
+        title: '运营名称',
+        dataIndex: 'userName',
+        scopedSlots: { customRender: 'userName' },
+        align: 'center',
+        key: 'userName'
+    },
+    {
+        title: '操作',
+        dataIndex: 'actionTwo',
+        scopedSlots: { customRender: 'actionTwo' },
+        align: 'center',
+        key: 'actionTwo'
+    }
+]
+
+export default {
+    components: {
+        ACol,
+        ARow,
+        selectTable,
+        Treeselect
+    },
+
+    data() {
+        return {
+            indexAll: 0,
+            accountIdPush: '',
+            spinning: false,
+            form: this.$form.createForm(this),
+            priceForm: this.$form.createForm(this),
+            exportloading: false,
+            accountId: null,
+            noImg: require('@/assets/noImg.png'),
+            ipagination: {
+                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.ipagination.current = current
+                    this.ipagination.pageSize = pageSize
+                }
+            },
+            ipaginationHistory: {
+                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.ipaginationHistory.current = current
+                    this.ipaginationHistory.pageSize = pageSize
+                    this.getHistroy({ userId: this.userName, id: this.accountIdSearch })
+                }
+            },
+            historyColumns: [
+                {
+                    title: '账户id',
+                    dataIndex: 'accountId',
+                    scopedSlots: { customRender: 'accountId' },
+                    align: 'center',
+                    key: 'accountId'
+                },
+                {
+                    title: '运营名称',
+                    dataIndex: 'userName',
+                    scopedSlots: { customRender: 'userName' },
+                    align: 'center',
+                    key: 'userName'
+                },
+                {
+                    title: '操作类型',
+                    dataIndex: 'operationType',
+                    customRender(t) {
+                        if (t == 1) {
+                            return '删除'
+                        } else {
+                            return '暂停'
+                        }
+                    },
+                    align: 'center',
+                    key: 'operationType'
+                },
+
+                {
+                    title: '操作时间',
+                    dataIndex: 'createTime',
+                    scopedSlots: { customRender: 'createTime' },
+                    align: 'center',
+                    key: 'createTime'
+                },
+                {
+                    title: '执行信息',
+                    dataIndex: 'executiveInformation',
+                    scopedSlots: { customRender: 'executiveInformation' },
+                    align: 'center',
+                    key: 'executiveInformation'
+                }
+            ],
+            value: 'valid',
+
+            operateDisabled: false,
+            duration: 1000,
+            //treeselect的参数
+            treeValue: [],
+            treeData: [],
+
+            type: 3,
+
+            operate: '',
+
+            tabKey: 1,
+
+            loading: false,
+            TTcolumns,
+            KScolumns,
+            columns: [...TTcolumns],
+            dataSource: [],
+
+            tableTab: 1,
+
+            newPlan: 0,
+            effectPlan: 0,
+
+            openOptions: false,
+
+            dataLoading: false,
+            url: '/accountClean/getTemplateList',
+            modifyPriceVisible: false,
+            modifyPriceLoading: false,
+            modifyPriceDetail: null,
+            accountVisible: false,
+            againLoading: false,
+            accountProjectDetail: null,
+            userName: null,
+            accountIdSearch: null,
+            historyList: [],
+            unitVisible: false
+        }
+    },
+    methods: {
+        moment,
+        ...mapGetters(['userInfo']),
+        getHistroy(item) {
+            this.unitVisible = true
+            this.userName = item.userId
+            this.accountIdSearch = item.id
+            let params = {}
+            params.userId = this.userInfo().id
+            params.templateId = item.id
+            params.pageNum = this.ipaginationHistory.current
+            params.pageSize = this.ipaginationHistory.pageSize
+
+            this.getAction('/accountClean/getCleanUpLog', params).then(res => {
+                if (res.success) {
+                    this.historyList = res.result.list
+                    this.ipaginationHistory.total = res.result.total
+                }
+            })
+        },
+        removeTemplate(item) {
+            let that = this
+            this.$confirm({
+                title: '删除提示',
+                content: '当前删除会解除此账户绑定模板,确定删除吗?',
+                onOk() {
+                    getAction('/accountClean/removeBinding', { templateId: item.id, accountId: item.accountId })
+                        .then(result => {
+                            if (result.success) {
+                                const paramsData = that.form.getFieldsValue()
+                                that.handleGetTableList(paramsData)
+
+                                that.$message.success('删除成功')
+                            } else {
+                                that.$message.error(result.message)
+                            }
+                        })
+                        .catch(error => {
+                            console.log(error, 'eeee')
+                        })
+                }
+            })
+        },
+        newCreat(id, type) {
+            if (id) {
+                if (type == 'edit') {
+                    this.$router.push({
+                        path: '/earlyWarningRules/createClear?id=' + id
+                    })
+                } else {
+                    this.$router.push({
+                        path: '/earlyWarningRules/createClear?preview=true&&id=' + id
+                    })
+                }
+            } else {
+                // window.open('/creat-material-test', '_blank')
+                this.$router.push({
+                    path: '/earlyWarningRules/createClear'
+                })
+            }
+        },
+        editPrice(item) {
+            getAction('/kuaishouProjectStrategy/queryBidInfo', { id: item.id }).then(res => {
+                if (res.success) {
+                    this.modifyPriceVisible = true
+                    this.modifyPriceDetail = { ...res.result, projectName: item.projectName, id: item.id }
+                    console.log(this.modifyPriceDetail)
+                    this.$nextTick(() => {
+                        let cpaBid = ''
+                        let changeBid = res.result.bidType === 2 ? res.result.bid : res.result.cpaBid
+                        if ((changeBid + '').includes('/')) {
+                            let bidArr = changeBid.split('/')
+                            for (let index = 0; index < bidArr.length; index++) {
+                                bidArr[index] = bidArr[index] / 1000
+                            }
+                            cpaBid = bidArr.join('/')
+                        } else if ((changeBid + '').includes('-')) {
+                            let bidArr = changeBid.split('-')
+                            for (let index = 0; index < bidArr.length; index++) {
+                                bidArr[index] = bidArr[index] / 1000
+                            }
+                            cpaBid = bidArr.join('-')
+                        } else {
+                            cpaBid = changeBid / 1000
+                        }
+
+                        let deepConversionBid = undefined
+                        if (res.result.deepConversionBid && res.result.deepConversionBid != '') {
+                            if ((res.result.deepConversionBid + '').includes('/')) {
+                                let bidArr = res.result.deepConversionBid.split('/')
+                                for (let index = 0; index < bidArr.length; index++) {
+                                    bidArr[index] = bidArr[index] / 1000
+                                }
+                                deepConversionBid = bidArr.join('/')
+                            } else if ((res.result.deepConversionBid + '').includes('-')) {
+                                let bidArr = res.result.deepConversionBid.split('-')
+                                for (let index = 0; index < bidArr.length; index++) {
+                                    bidArr[index] = bidArr[index] / 1000
+                                }
+                                deepConversionBid = bidArr.join('-')
+                            } else {
+                                deepConversionBid = res.result.deepConversionBid / 1000
+                            }
+                        }
+
+                        this.priceForm.setFieldsValue({
+                            cpaBid: cpaBid,
+                            deepConversionBid: deepConversionBid
+                        })
+                    })
+                }
+            })
+        },
+        handleOkPrice() {
+            this.modifyPriceLoading = true
+            let params = {}
+            params.templateId = this.accountProjectDetail.id
+            params.accountId = this.accountIdPush
+            this.getAction('/accountClean/pushTemplate', params).then(res => {
+                this.modifyPriceLoading = false
+                if (res.success) {
+                    this.accountVisible = false
+                    this.accountIdPush = ''
+
+                    if (res.message != '推送成功') {
+                        this.$message.error(res.message)
+                    } else {
+                        this.$message.success(res.message)
+                    }
+                } else {
+                }
+            })
+        },
+        cpaBidValid(rule, value, callback) {
+            let z = /-/g
+            let a = /\//g
+            let d = /\./g
+            if (value === '' || value === undefined) {
+                callback('出价必须填写')
+            } else if (value.startsWith('.') || value.endsWith('.')) {
+                callback('请填写正确出价')
+            } else if (value.startsWith('-') || value.endsWith('-')) {
+                callback('请填写正确出价')
+            } else if (value.match(a) && value.match(z)) {
+                callback('不允许出现除"-"和"/"之外的所有字符,并且二者不可同时出现')
+            } else if (value.match(/[^0-9+-\/]/g)) {
+                callback('请填写正确出价')
+            } else {
+                callback()
+            }
+        },
+        btKeyUp(e) {
+            //没有显示‘破折号’和 '.' 需要的可以手动加上
+            // this.priceForm.setFieldsValue({
+            //     cpaBid: e.target.value.replace(/[^0-9+-\/]/g, '')
+            // })
+            // (
+            //         /[\u4e00-\u9fa5/\s+/]|[`~!@#$%^&*() \+ =<>?"{}|, \/ ;' \\ [ \] ·~!@#¥%……&*()—— \+ ={}|《》?:“”【】、;‘’,。、]/g,
+            //         ''
+            //     )
+        },
+        getData(className) {
+            return this.priceForm.getFieldValue(className)
+        },
+        matchingAccount(item) {
+            this.accountVisible = true
+            this.accountProjectDetail = { id: item.id }
+        },
+        getDataSource(current, pageSize) {
+            // 切换分页时的回调,
+            // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            this.ipagination.current = current
+            this.ipagination.pageSize = pageSize
+            const paramsData = this.form.getFieldsValue()
+            this.handleGetTableList(paramsData)
+        },
+        onChangeStatus(text, record, type) {
+            let status = text === '0' ? '1' : '0'
+            let url = '/accountClean/updateTemplateStatus'
+            let params = {}
+            params.templateId = record.id
+            params.status = status
+            this.getAction(url, params).then(res => {
+                if (res.success) {
+                    const paramsData = this.form.getFieldsValue()
+                    this.handleGetTableList(paramsData)
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+        },
+        handleQueryList(event) {
+            this.ipagination.current = 1
+            event.preventDefault()
+            const paramsData = this.form.getFieldsValue()
+            this.handleGetTableList(paramsData)
+        },
+        handleResetForm() {
+            this.ipagination.current = 1
+            this.form.resetFields()
+            this.accountId = ''
+            const paramsData = this.form.getFieldsValue()
+            this.handleGetTableList(paramsData)
+        },
+        handleGetTableList(data) {
+            let paramsData = {
+                ...data,
+                pageNum: this.ipagination.current,
+                pageSize: this.ipagination.pageSize,
+                userId: this.userInfo().id,
+                accountId: this.accountId
+            }
+            this.dataSource = []
+            this.dataLoading = true
+            getAction(this.url, 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')
+                })
+        },
+        disabledDate(current) {
+            // Can not select days before today and today
+            return current && current > moment().endOf('day')
+        },
+
+        filterOption(input, option) {
+            // console.log(input, option)
+            return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        },
+
+        // 快手头条的切换
+        tabChange(key) {
+            this.ipagination.current = 1
+            this.columns = this.tabKey == 1 ? [...TTcolumns] : [...KScolumns]
+            this.url = this.tabKey == 1 ? '/accountClean/getTemplateList' : '/accountClean/getMyselfTemplateList'
+            this.target = this.tabKey == 1 ? 'createTime' : 'statDate'
+            this.accountId = ''
+            const paramsData = this.form.getFieldsValue()
+            this.handleGetTableList(paramsData)
+        },
+
+        tableChange(pagination, filters, sorter, { currentDataSource }) {
+            this.ipagination.current = pagination.current
+            this.ipagination.pageSize = pagination.pageSize
+            if (sorter.order) {
+                this.order = sorter.order ? sorter.order : 'descend'
+                this.target = sorter.columnKey
+                const paramsData = this.form.getFieldsValue()
+                this.handleGetTableList({
+                    ...paramsData,
+                    target: sorter.columnKey,
+                    order: sorter.order ? sorter.order : 'descend'
+                })
+            }
+        }
+    },
+    watch: {},
+    computed: {
+        newDate() {
+            var myDate = new Date()
+            myDate.getYear() //获取当前年份(2位)
+            var n = myDate.getFullYear() //获取完整的年份(4位,1970-????)
+            var m = myDate.getMonth() //获取当前月份(0-11,0代表1月)
+            var d = myDate.getDate() //获取当前日(1-31)
+            var day = myDate.getHours()
+            return day
+        }
+    },
+    mounted() {
+        const paramsData = this.form.getFieldsValue()
+        this.handleGetTableList(paramsData)
+    },
+    activated: function() {},
+
+    filters: {
+        toPercentage(val) {
+            if (typeof val != 'string') {
+                return (val * 100).toFixed(2) + '%'
+            } else {
+                return val
+            }
+        },
+        //保留两位小数并且变成货币格式
+        decimalsHandle(val) {
+            if (val && typeof val != 'string') {
+                if (val >= 0) {
+                    val = parseFloat(val).toFixed(2)
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+
+                    let str0 = str[0].split('').reverse()
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+
+                    return handleResult + '.' + str[1]
+                } else {
+                    val = parseFloat(val).toFixed(2)
+                    let numberStr = val.toString()
+                    let str = numberStr.split('.')
+
+                    let str0 = str[0]
+                        .substr(1)
+                        .split('')
+                        .reverse()
+                    for (let i = 0; i < str0.length; i++) {
+                        if ((i + 1) % 4 === 0) {
+                            str0.splice(i, 0, ',')
+                        }
+                    }
+                    str0.reverse()
+                    let handleResult = ''
+                    for (let j = 0; j < str0.length; j++) {
+                        handleResult += str0[j]
+                    }
+
+                    return '-' + handleResult + '.' + str[1]
+                }
+            } else if (typeof val == 'string') {
+                return val
+            } else {
+                return 0
+            }
+        },
+        //变成货币格式
+        formatCurrency(val) {
+            if (val) {
+                let numberStr = val.toString()
+                let str = numberStr.split('').reverse()
+                for (let i = 0; i < str.length; i++) {
+                    if ((i + 1) % 4 === 0) {
+                        str.splice(i, 0, ',')
+                    }
+                }
+                str.reverse()
+                let handleResult = ''
+                for (let j = 0; j < str.length; j++) {
+                    handleResult += str[j]
+                }
+                return handleResult
+            } else {
+                return '-'
+            }
+        }
+    }
+}
+</script>