Pārlūkot izejas kodu

新版渠道号提测

朱鑫波 3 gadi atpakaļ
vecāks
revīzija
fac8ae3322

+ 2 - 2
src/utils/request.js

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

+ 981 - 0
src/views/modules/autoLaunch/channelManage/channelAdmin/components/channelList.vue

@@ -0,0 +1,981 @@
+<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>
+@import 'channelManage';
+</style>
+<template>
+    <div class="channelManage config-project">
+        <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">
+                        <a-col :md="8" :sm="8" :xxl="6">
+                            <!-- <a-form-item label="项目名称"> -->
+                            <selectTable :projectId.sync="productId" ref="selectTable"></selectTable>
+                        </a-col>
+
+                        <a-col :md="8" :sm="8" :xxl="6">
+                            <selectTableProject
+                                :projectId.sync="projectId"
+                                :productId="productId"
+                                ref="selectTableProject"
+                            ></selectTableProject>
+                        </a-col>
+                        <!--  -->
+                        <a-col :md="8" :sm="8" :xxl="6">
+                            <a-form-item label="账户ID">
+                                <a-input placeholder="请输入账户ID" v-decorator="['accountId']"></a-input>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="8" :sm="8" :xxl="6">
+                            <a-form-item label="状态">
+                                <a-select
+                                    v-decorator="['state', { initialValue: '' }]"
+                                    placeholder="请选择"
+                                    allow-clear
+                                >
+                                    <a-select-option :value="''">不限</a-select-option>
+                                    <a-select-option :value="0">无效</a-select-option>
+                                    <a-select-option :value="1">有效</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" icon="plus" @click="addNewChannel">新建渠道号</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="state" slot-scope="text, record">
+                            <a-switch :checked="text == 1" @change="onChangeStatus(text, record, 'state')" />
+                        </span>
+                        <span slot="usageLevel" slot-scope="text, record">
+                            {{ text == 'account' ? '账户' : text == 'plan' ? '计划' : text == 'group' ? '组' : '-' }}
+                        </span>
+                        <span slot="action" slot-scope="text, records">
+                            <a @click="editNewChannelElse(records)">编辑</a>
+                            <a-divider type="vertical" />
+                            <a @click="addNewChannelElse(records)">添加渠道号</a>
+                            <a-divider type="vertical" />
+                            <a @click="toDetailList(records)">查看详情</a>
+                        </span>
+                    </a-table>
+                    <a-pagination
+                        size="small"
+                        :showTotal="ipagination.showTotal"
+                        style="float: right;margin-top:10px"
+                        v-if="dataSource.length > 0"
+                        showQuickJumper
+                        show-size-changer
+                        :pageSize.sync="ipagination.pageSize"
+                        :total="ipagination.total"
+                        v-model="ipagination.current"
+                        @change="getDataSource"
+                        @showSizeChange="getDataSource"
+                    />
+                </div>
+            </a-col>
+        </a-row>
+
+        <a-modal
+            title="修改渠道号"
+            :width="1000"
+            ref="modal"
+            :visible="visibleDownLoad"
+            @ok="handleOkImport"
+            @cancel="
+                visibleDownLoad = false
+                cancel()
+            "
+            okText="提交"
+            :confirmLoading="downLoading"
+        >
+            <span style="color:red"
+                >注意:页面字段均为非必填项,填写哪项修改哪个字段,不填写不做修改!修改的内容为该账户下所有开启的渠道号!</span
+            >
+            <a-form :form="formDownLoad" v-if="editData">
+                <a-form-item
+                    label="使用层级"
+                    :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+                    :wrapperCol="{ xs: { span: 24 }, sm: { span: 19 } }"
+                    class="require-class"
+                >
+                    <a-radio-group
+                        disabled
+                        button-style="solid"
+                        v-decorator="[
+                            'usageLevel',
+                            {
+                                rules: [{ required: true, message: '使用层级必选' }],
+                                initialValue: editData.usageLevel
+                            }
+                        ]"
+                    >
+                        <a-radio-button value="account">账户</a-radio-button>
+                        <a-radio-button value="plan">计划</a-radio-button>
+                        <a-radio-button value="group">组</a-radio-button>
+                    </a-radio-group>
+                </a-form-item>
+                <a-form-item
+                    label="调起链接"
+                    :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+                    :wrapperCol="{ xs: { span: 24 }, sm: { span: 19 } }"
+                >
+                    <a-input v-decorator="['schemaUri']" allow-clear id="schemaUri" />
+                    <a-tag color="#2db7f5" @click="getChangeAll('渠道号', 'formDownLoad', 'schemaUri')">+渠道号</a-tag>
+                    <a-tag color="#2db7f5" @click="getChangeAll('编号', 'formDownLoad', 'schemaUri')">+编号</a-tag>
+                </a-form-item>
+                <a-form-item
+                    label="第三方点击监测链接"
+                    :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+                    :wrapperCol="{ xs: { span: 24 }, sm: { span: 19 } }"
+                >
+                    <a-input
+                        v-decorator="[
+                            'clickTrackUrl',
+                            {
+                                rules: [{ validator: handleConfirmValueOkUndefind }]
+                            }
+                        ]"
+                        allow-clear
+                        id="clickTrackUrl"
+                    />
+                    <a-tag color="#2db7f5" @click="getChangeAll('渠道号', 'formDownLoad', 'clickTrackUrl')"
+                        >+渠道号</a-tag
+                    >
+                    <a-tag color="#2db7f5" @click="getChangeAll('编号', 'formDownLoad', 'clickTrackUrl')">+编号</a-tag>
+                </a-form-item>
+                <a-form-item
+                    label="第三方actionBar监测链接"
+                    :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
+                    :wrapperCol="{ xs: { span: 24 }, sm: { span: 19 } }"
+                >
+                    <a-input
+                        v-decorator="[
+                            'actionbarClickUrl',
+                            {
+                                rules: [{ validator: handleConfirmValueOkUndefind }]
+                            }
+                        ]"
+                        allow-clear
+                        id="actionbarClickUrl"
+                    />
+                    <a-tag color="#2db7f5" @click="getChangeAll('渠道号', 'formDownLoad', 'actionbarClickUrl')"
+                        >+渠道号</a-tag
+                    >
+                    <a-tag color="#2db7f5" @click="getChangeAll('编号', 'formDownLoad', 'actionbarClickUrl')"
+                        >+编号</a-tag
+                    >
+                </a-form-item>
+            </a-form>
+        </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 { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import selectTable from '@/views/modules/material/comment/selectTable.vue'
+import selectTableProject from '@/views/modules/Statistics/components/selectPagination.vue'
+import qs from 'qs'
+import { mapGetters } from 'vuex'
+import Vue from 'vue'
+import { ACCESS_TOKEN } from '@/store/mutation-types'
+import $ from 'jquery'
+const fileSuffix = ['xlsx', 'xls', 'zip']
+let TTcolumns = [
+    {
+        title: '状态',
+        dataIndex: 'state',
+        scopedSlots: { customRender: 'state' },
+        align: 'center',
+        key: 'state'
+    },
+    {
+        title: '产品名称',
+        dataIndex: 'productName',
+        scopedSlots: { customRender: 'productName' },
+        align: 'center',
+        key: 'productName'
+    },
+    {
+        title: '项目名称',
+        dataIndex: 'projectName',
+        scopedSlots: { customRender: 'projectName' },
+        align: 'center',
+        key: 'projectName'
+    },
+    {
+        title: '账户名称',
+        dataIndex: 'authName',
+        scopedSlots: { customRender: 'authName' },
+        align: 'center',
+        key: 'authName'
+    },
+    {
+        title: '账户ID',
+        dataIndex: 'accountId',
+        scopedSlots: { customRender: 'accountId' },
+        align: 'center',
+        key: 'accountId'
+    },
+    {
+        title: '渠道号创建人',
+        dataIndex: 'realname',
+        scopedSlots: { customRender: 'realname' },
+        align: 'center',
+        key: 'realname'
+    },
+
+    {
+        title: '创建时间(最新创建时间)',
+        dataIndex: 'stateDate',
+        scopedSlots: { customRender: 'stateDate' },
+        align: 'center',
+        key: 'stateDate'
+    },
+    {
+        title: '使用层级',
+        dataIndex: 'usageLevel',
+        scopedSlots: { customRender: 'usageLevel' },
+        align: 'center',
+        key: 'usageLevel'
+    },
+
+    {
+        title: '操作',
+        dataIndex: 'action',
+        scopedSlots: { customRender: 'action' },
+        align: 'center',
+        key: 'action'
+    }
+]
+
+export default {
+    components: {
+        ACol,
+        ARow,
+        selectTable,
+        selectTableProject
+    },
+
+    data() {
+        return {
+            tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
+            fileList: [],
+            dataFile: null,
+            loadDisabled: false,
+            productId: '',
+            projectId: '',
+            accountId: '',
+            visibleChannel: false,
+            visibleDownLoad: false,
+            editData: null,
+            downLoading: false,
+            fileUrl: '',
+            projectIdDownLoad: '',
+            productIdDownLoad: '',
+            channelType: 'a',
+            createType: '1',
+            typeAccountId: null,
+            typeProjectId: null,
+            indexAll: 0,
+            spinning: false,
+            form: this.$form.createForm(this),
+            formDownLoad: this.$form.createForm(this),
+            exportloading: false,
+            dateRange: [moment().subtract(1, 'weeks'), moment()],
+            noImg: require('@/assets/noImg.png'),
+            validationRules: {
+                bid: [
+                    {
+                        required: true,
+                        message: '出价信息必须填写'
+                        // validator: this.validateBid,
+                    }
+                ]
+            },
+            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
+                }
+            },
+            value: 'valid',
+            KSaccountList: [],
+            TTaccountList: [],
+
+            KSdesignList: [],
+            TTdesignList: [],
+
+            operateDisabled: false,
+            duration: 1000,
+            //treeselect的参数
+            treeValue: [],
+            treeData: [],
+
+            type: 3,
+
+            operate: '',
+            designList: [],
+
+            tabKey: 1,
+
+            loading: false,
+            columns: [...TTcolumns],
+            dataSource: [],
+
+            tableTab: 1,
+
+            newPlan: 0,
+            effectPlan: 0,
+
+            openOptions: false,
+
+            target: 'createTime',
+            order: 'descend',
+            dataLoading: false,
+            url: '/channel/channelManagementHome',
+            modifyPriceVisible: false,
+            modifyPriceLoading: false,
+            modifyPriceDetail: null,
+            accountVisible: false,
+            againLoading: false,
+            accountProjectDetail: null,
+            accountProjectList: []
+        }
+    },
+    methods: {
+        moment,
+        handleConfirmValueOkUndefind(rule, value, callback) {
+            if (!!!value) {
+                callback()
+            } else if (/(http|https):\/\/([\w.]+\/?)\S*/.test(value)) {
+                callback()
+            } else {
+                callback('链接开头为http://或https://')
+            }
+        },
+        getChangeAll(type, form, field) {
+            var node = document.getElementById(field)
+            var v = ''
+            if (field == 'channelName' || field == 'channelCode') {
+                v = '-{{' + type + '}}-'
+            } else {
+                v = '{{' + type + '}}'
+            }
+
+            if (document.selection) {
+                //IE
+                node.focus()
+                var sel = document.selection.createRange()
+                sel.text = v
+                sel.select()
+                if (field == 'channelName') {
+                    this[form].setFieldsValue({ channelName: sel.text })
+                } else if (field == 'channelCode') {
+                    this[form].setFieldsValue({ channelCode: sel.text })
+                } else if (field == 'schemaUri') {
+                    this[form].setFieldsValue({ schemaUri: sel.text })
+                } else if (field == 'clickTrackUrl') {
+                    this[form].setFieldsValue({ clickTrackUrl: sel.text })
+                } else if (field == 'actionbarClickUrl') {
+                    this[form].setFieldsValue({ actionbarClickUrl: sel.text })
+                }
+            } else if (node.selectionStart || node.selectionStart == '0') {
+                //MOZILLA/GOOGLE
+                var startPos = node.selectionStart
+                var endPos = node.selectionEnd
+                var restoreTop = node.scrollTop
+                node.value = node.value.substring(0, startPos) + v + node.value.substring(endPos, node.value.length)
+                if (restoreTop > 0) {
+                    node.scrollTop = restoreTop
+                }
+                if (field == 'channelName') {
+                    this[form].setFieldsValue({ channelName: node.value })
+                } else if (field == 'channelCode') {
+                    this[form].setFieldsValue({ channelCode: node.value })
+                } else if (field == 'schemaUri') {
+                    this[form].setFieldsValue({ schemaUri: node.value })
+                } else if (field == 'clickTrackUrl') {
+                    this[form].setFieldsValue({ clickTrackUrl: node.value })
+                } else if (field == 'actionbarClickUrl') {
+                    this[form].setFieldsValue({ actionbarClickUrl: node.value })
+                }
+                node.focus()
+                node.selectionStart = startPos + v.length
+                node.selectionEnd = startPos + v.length
+                // this.channelName = node.value
+            } else {
+                //OTHER
+                node.value += v
+                // console.log(node.value)
+                if (field == 'channelName') {
+                    this[form].setFieldsValue({ channelName: node.value })
+                } else if (field == 'channelCode') {
+                    this[form].setFieldsValue({ channelCode: node.value })
+                } else if (field == 'schemaUri') {
+                    this[form].setFieldsValue({ schemaUri: node.value })
+                } else if (field == 'clickTrackUrl') {
+                    this[form].setFieldsValue({ clickTrackUrl: node.value })
+                } else if (field == 'actionbarClickUrl') {
+                    this[form].setFieldsValue({ actionbarClickUrl: node.value })
+                }
+                node.focus()
+                // this.channelName = node.value
+            }
+        },
+        onChangeStatus(text, rescord, type) {
+            let status = text === 0 ? 1 : 0
+            let url = ''
+            let params = {}
+            params.accountId = rescord.accountId
+            params.state = status
+            url = '/channel/updateAccountChannelState'
+            this.getAction(url, params).then(res => {
+                if (res.success) {
+                    const paramsData = this.form.getFieldsValue()
+                    this.handleGetTableList(paramsData)
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+        },
+        overUpload(file) {},
+        handleChange() {
+            this.loadDisabled = false
+            this.$message.success('文件导入成功')
+        },
+        beforeUpload(file) {
+            // this.cosUpload(file)
+            // if (process.env.NODE_ENV == 'development') {
+            //   this.uploadAction = `/jeecg-boot/kuaishouAppPackage/importAppExcel?projectId=${this.projectId}&platform=${
+            //     this.appType == 'ios' ? +this.platform + 2 : +this.platform
+            //   }&imageUrl=${this.fileUrl}`
+            // } else if (process.env.NODE_ENV == 'debug') {
+            // } else if (process.env.NODE_ENV == 'production') {
+            //   this.uploadAction = `${this.axios.defaults.baseURL}/kuaishouAppPackage/importAppExcel?projectId=${
+            //     this.projectId
+            //   }&platform=${this.appType == 'ios' ? +this.platform + 2 : +this.platform}&imageUrl=${this.fileUrl}`
+            // }
+            // this.dataFile = file
+            this.dataFile = $('.fileUpload')
+                .eq(0)
+                .find('input')[0].files[0]
+            this.loadDisabled = true
+            const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
+            const fileName = file.name
+            const fileStrArr = fileName.split('.')
+            const suffix = fileStrArr[fileStrArr.length - 1]
+
+            let result = fileSuffix.some(item => {
+                return item === suffix
+            })
+
+            if (!result) {
+                this.$message.error('不支持该文件类型')
+                this.loadDisabled = false
+                return Promise.reject()
+            }
+        },
+        ...mapGetters(['userInfo']),
+        toDetailList(item) {
+            if (item.accountId == '') {
+                localStorage.removeItem('channelInfoAccountId')
+                localStorage.setItem('channelInfoProjectId', item.projectId)
+                this.$router.push({ path: '/autoLaunch/channelDetailList' })
+            } else {
+                localStorage.removeItem('channelInfoProjectId')
+                localStorage.setItem('channelInfoAccountId', item.accountId)
+                this.$router.push({ path: '/autoLaunch/channelDetailList' })
+            }
+        },
+
+        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()
+            }
+        },
+        editNewChannelElse(item) {
+            this.visibleDownLoad = true
+            this.editData = item
+        },
+        addNewChannelElse(item) {
+            // this.createType = item.createType
+            // this.typeAccountId = item.accountId
+            // this.typeProjectId = item.projectId
+            // this.visibleChannel = true
+
+            localStorage.removeItem('channelInfo')
+            this.$router.push({ path: '/autoLaunch/createChannelIndex?accountId=' + item.accountId })
+            // var createTypeData = { createType: this.createType, accountId: item.accountId, projectId: item.projectId }
+            // localStorage.setItem('createTypeData', JSON.stringify(createTypeData))
+            // this.$router.push({ path: '/autoLaunch/createChannel' })
+        },
+        handleOk() {
+            if (this.channelType == 'a') {
+                this.createType = '1'
+                var createTypeData = {
+                    createType: this.createType,
+                    accountId: this.typeAccountId,
+                    projectId: this.typeProjectId
+                }
+                localStorage.setItem('createTypeData', JSON.stringify(createTypeData))
+                this.$router.push({ path: '/autoLaunch/createChannel' })
+            } else if (this.channelType == 'b') {
+                this.createType = '2'
+                this.visibleDownLoad = true
+            } else if (this.channelType == 'c') {
+                this.createType = '3'
+                var createTypeData = {
+                    createType: this.createType,
+                    accountId: this.typeAccountId,
+                    projectId: this.typeProjectId
+                }
+                localStorage.setItem('createTypeData', JSON.stringify(createTypeData))
+                this.$router.push({ path: '/autoLaunch/createChannel' })
+            }
+            this.handleCancel()
+        },
+        handleOkImport() {
+            this.formDownLoad.validateFields((err, values) => {
+                if (!err) {
+                    this.downLoading = true
+                    var params = { ...values }
+                    params.accountId = this.editData.accountId
+                    params.userId = this.userInfo().id
+                    this.getAction('/channel/updateChannels', params).then(res => {
+                        this.downLoading = false
+                        if (res.success) {
+                            this.visibleDownLoad = false
+                            const paramsData = this.form.getFieldsValue()
+                            this.handleGetTableList(paramsData)
+                        }
+                    })
+                }
+            })
+        },
+        handleOkDownLoad() {
+            if (!!this.projectIdDownLoad && !!this.productIdDownLoad) {
+                let params = {}
+                params.productId = this.productIdDownLoad
+                params.projectId = this.projectIdDownLoad
+                params.userId = this.userInfo().id
+                downFile('/channel/exportChannelTemplate', params).then(res => {
+                    let blob = new Blob([res], {
+                        type: 'application/vnd.openxmlformats-officedocument.spre1adsheetml.sheet'
+                    })
+                    let downloadElement = document.createElement('a')
+                    let href = window.URL.createObjectURL(blob) //创建下载的链接
+                    downloadElement.href = href
+                    downloadElement.download = '渠道号模板.xlsx' //下载后文件名
+                    document.body.appendChild(downloadElement)
+                    downloadElement.click() //点击下载
+                    document.body.removeChild(downloadElement) //下载完成移除元素
+                    window.URL.revokeObjectURL(href) //释放掉blob对象
+                })
+            } else {
+                this.$message.error('请选择产品和项目')
+            }
+        },
+        handleCancel() {
+            this.channelType = 'a'
+            this.visibleChannel = false
+            this.typeAccountId = null
+            this.typeProjectId = null
+        },
+        addNewChannel() {
+            // this.visibleChannel = true
+            // localStorage.setItem('createTypeData', JSON.stringify(createTypeData))
+            localStorage.removeItem('channelInfo')
+            this.$router.push({ path: '/autoLaunch/createChannelIndex' })
+        },
+        getDataSource(current, pageSize) {
+            // 切换分页时的回调,
+            // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            this.ipagination.current = current
+            this.ipagination.pageSize = pageSize
+            const paramsData = this.form.getFieldsValue()
+            this.handleGetTableList(paramsData)
+        },
+        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.$refs.selectTable.keyValue = ''
+            this.$refs.selectTable.getData()
+            this.$refs.selectTableProject.keyValue = ''
+            this.$refs.selectTableProject.getData()
+            const paramsData = this.form.getFieldsValue()
+            this.handleGetTableList(paramsData)
+        },
+        handleGetTableList(data) {
+            let paramsData = {
+                productId: this.productId,
+                projectId: this.projectId,
+                accountId: data.accountId,
+                state: data.state,
+                pageNo: this.ipagination.current,
+                pageSize: this.ipagination.pageSize,
+                userId: this.userInfo().id
+            }
+            this.dataSource = []
+            this.dataLoading = true
+            this.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
+                        // result.result.total
+                    } else {
+                        this.$message.error(result.message)
+                    }
+                })
+                .catch(error => {
+                    this.dataLoading = false
+                    console.log(error, 'eeee')
+                })
+        },
+        getAccountNoProject() {
+            this.projectId = undefined
+            const paramsData = this.form.getFieldsValue()
+            this.handleGetTableList(paramsData)
+        },
+        disabledDate(current) {
+            // Can not select days before today and today
+            return current && current > moment().endOf('day')
+        },
+        dateChange(date, dateString) {
+            // console.log(date,dateString)
+        },
+
+        filterOption(input, option) {
+            // console.log(input, option)
+            return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        },
+        operateChange(value) {
+            console.log(value)
+            if (value) {
+                this.accountDisabled = true
+                this.accountId = ''
+            } else {
+                this.accountDisabled = false
+            }
+        },
+
+        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'
+                })
+            }
+        },
+
+        // 获取所有运营
+        getAllOperator(key) {
+            let url = '/sys/user/getAllUserListV1'
+            this.designList = []
+
+            getAction(url, {}).then(res => {
+                if (res.success) {
+                    this.designList = res.result
+                }
+            })
+        }
+    },
+    watch: {
+        productId: function(n, o) {
+            if (n != '') {
+                this.$refs.selectTableProject.keyValue = ''
+                this.$refs.selectTableProject.getData(n)
+            }
+        },
+        productIdDownLoad: function(n, o) {
+            if (n != '') {
+                this.$refs.selectTableProjectDownLoad.keyValue = ''
+                this.$refs.selectTableProjectDownLoad.getData(n)
+            }
+        }
+    },
+    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)
+        this.getAllOperator()
+    },
+    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>

+ 59 - 0
src/views/modules/autoLaunch/channelManage/channelAdmin/components/channelManage.less

@@ -0,0 +1,59 @@
+.channelManage {
+    .middle-button {
+        margin: 0 8px;
+    }
+    .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;
+    }
+}
+.channel-modal-content {
+    width: 100%;
+    height: 300px;
+    display: flex;
+    flex-direction: column;
+    .channel-modal-content-button {
+        width: 100%;
+        height: 100%;
+        margin: 10px;
+        display: flex;
+        align-items: center;
+        .introduce{
+            margin-left: 10px;
+        }
+
+    }
+}

+ 331 - 0
src/views/modules/autoLaunch/channelManage/channelAdmin/components/checkCreat.vue

@@ -0,0 +1,331 @@
+<style scoped lang="scss">
+.flex-main {
+    display: flex;
+    margin-bottom: 10px;
+    p {
+        color: black;
+        font-weight: 600;
+        overflow: hidden; //超出的文本隐藏
+        text-overflow: ellipsis; //溢出用省略号显示
+        white-space: nowrap; //溢出不换行
+    }
+}
+.config-check {
+    width: 100%;
+    display: flex;
+    .config-check-one {
+        width: 250px;
+        height: 125px;
+        border: 1px solid #f2f2f2;
+        padding: 20px;
+        display: flex;
+        margin-right: 15px;
+        border-radius: 10px;
+        cursor: pointer;
+
+        .config-check-one-left {
+            width: 70%;
+            height: 100%;
+        }
+        .config-check-one-right {
+            width: 30%;
+            height: 100%;
+            position: relative;
+        }
+    }
+    .config-check-active {
+        border-color: rgb(38, 122, 251) !important;
+    }
+}
+::v-deep .check-else .vue-treeselect__control {
+    line-height: 20px !important;
+}
+::v-deep .check-else .ant-form-item-control {
+    height: auto !important;
+    line-height: 20px !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="formProject">
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="选择渠道号的创建方式">
+                                        <div class="config-check">
+                                            <div
+                                                class="config-check-one "
+                                                :class="{ 'config-check-active': mode == 1 }"
+                                                @click="checkMode(1)"
+                                            >
+                                                <div class="config-check-one-left">
+                                                    <h3 style="font-weight: bold;">系统生成</h3>
+                                                    <p style="line-height: 20px;">适用于渠道号比较固定客户和产品</p>
+                                                </div>
+                                                <div class="config-check-one-right">
+                                                    <img
+                                                        src="./images/system.png"
+                                                        style="width:100%;height:auto;position:absolute;top:20%"
+                                                        alt=""
+                                                    />
+                                                </div>
+                                            </div>
+                                            <div
+                                                class="config-check-one"
+                                                :class="{ 'config-check-active': mode == 2 }"
+                                                @click="checkMode(2)"
+                                            >
+                                                <div class="config-check-one-left">
+                                                    <h3 style="font-weight: bold;">文件上传</h3>
+                                                    <p style="line-height: 20px;">适用于渠道号无明显规律的产品</p>
+                                                </div>
+                                                <div class="config-check-one-right">
+                                                    <img
+                                                        src="./images/upload.png"
+                                                        style="width:100%;height:auto;position:absolute;top:20%"
+                                                        alt=""
+                                                    />
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <div v-if="mode == 1">
+                                <a-row :gutter="16">
+                                    <a-col :span="16">
+                                        <a-form-item label="使用范围">
+                                            <a-radio-group
+                                                button-style="solid"
+                                                v-decorator="[
+                                                    'usageRange',
+                                                    {
+                                                        rules: [{ required: true, message: '使用范围必选' }],
+                                                        initialValue: 2
+                                                    }
+                                                ]"
+                                            >
+                                                <a-radio-button :value="2">项目</a-radio-button>
+                                                <a-radio-button :value="1">账户</a-radio-button>
+                                            </a-radio-group>
+                                        </a-form-item>
+                                    </a-col>
+                                </a-row>
+                                <a-row
+                                    :gutter="16"
+                                    v-if="getFormData('usageRange') == 2 || getFormData('usageRange') == undefined"
+                                    class="check-else"
+                                >
+                                    <a-col :span="16">
+                                        <a-form-item label="选择项目">
+                                            <Treeselect
+                                                style="width:600px"
+                                                v-decorator="[
+                                                    'projectId',
+                                                    {
+                                                        rules: [{ required: true, message: '项目必选' }]
+                                                    }
+                                                ]"
+                                            />
+                                        </a-form-item>
+                                    </a-col>
+                                </a-row>
+                                <a-row :gutter="16" v-else class="check-else">
+                                    <a-col :span="16">
+                                        <a-form-item label="选择账户">
+                                            <treeSelectAccount
+                                                style="width:600px"
+                                                :appId="getFormData('accountId')"
+                                                v-decorator="[
+                                                    'accountId',
+                                                    {
+                                                        rules: [{ required: true, message: '账户必选' }]
+                                                    }
+                                                ]"
+                                            />
+                                        </a-form-item>
+                                    </a-col>
+                                </a-row>
+                            </div>
+                            <!-- <selectTable :projectId.sync="productIdDownLoad" ref="selectTableDownLoad"></selectTable>
+            <selectTableProject
+                :projectId.sync="projectIdDownLoad"
+                :productId="productIdDownLoad"
+                ref="selectTableProjectDownLoad"
+            ></selectTableProject> -->
+                            <div v-else-if="mode == 2">
+                                <a-row :gutter="16" class="check-else">
+                                    <a-col :span="16">
+                                        <!-- <a-form-item label="选择项目">
+                                            <Treeselect
+                                                style="width:600px"
+                                                v-decorator="[
+                                                    'projectId',
+                                                    {
+                                                        rules: [{ required: true, message: '项目必选' }]
+                                                    }
+                                                ]"
+                                            />
+                                        </a-form-item> -->
+                                        <selectTable
+                                            :projectId.sync="productId"
+                                            ref="selectTableDownLoad"
+                                            :labelCol="formItemLayout.labelCol"
+                                        ></selectTable>
+                                    </a-col>
+                                </a-row>
+                                <a-row :gutter="16" class="check-else">
+                                    <a-col :span="16">
+                                        <selectTableProject
+                                            :projectId.sync="projectId"
+                                            :productId="productId"
+                                            ref="selectTableProjectDownLoad"
+                                            :labelCol="formItemLayout.labelCol"
+                                        ></selectTableProject>
+                                    </a-col>
+                                </a-row>
+                            </div>
+                        </a-form>
+                    </a-card>
+                </a-col>
+            </a-row>
+        </div>
+        <div style="width:100%;display:flex;    justify-content: flex-end;">
+            <a-button type="default" style="margin-right: 15px" @click="goBack">取消</a-button>
+            <a-button type="primary" style="margin-right: 15px" @click="saveHandler" :loading="saveLoading"
+                >下一步</a-button
+            >
+        </div>
+    </div>
+</template>
+
+<script>
+// import EditableCell from './editablCell'
+// import lookPreviewVue from './lookPreview.vue'
+import Treeselect from '../../components/treeSelectProject.vue'
+import treeSelectAccount from '../../components/treeSelectAccount.vue'
+import selectTable from '@/views/modules/material/comment/selectTable.vue'
+import selectTableProject from '@/views/modules/Statistics/components/selectPagination.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: {
+        Treeselect,
+        treeSelectAccount,
+        selectTable,
+        selectTableProject
+    },
+    data() {
+        return {
+            formProject: this.$form.createForm(this), //选择项目表单
+            saveLoading: false,
+            mode: 1,
+            productId: '',
+            projectId: '',
+            formItemLayout: {
+                labelCol: { span: 6 },
+                wrapperCol: { span: 16 }
+            },
+            tailFormItemLayout: {
+                wrapperCol: {
+                    sm: {
+                        span: 18,
+                        offset: 6
+                    }
+                }
+            }
+        }
+    },
+    computed: {},
+    watch: {
+        productId: function(n, o) {
+            if (n != '') {
+                this.$refs.selectTableProjectDownLoad.keyValue = ''
+                this.$refs.selectTableProjectDownLoad.getData(n)
+            }
+        }
+    },
+    mounted() {
+        if (this.$route) {
+            let editRecordId = this.$route.query.accountId
+            if (editRecordId) {
+                this.$nextTick(() => {
+                    this.formProject.setFieldsValue({ usageRange: 1 })
+                    setTimeout(() => {
+                        this.formProject.setFieldsValue({ accountId: Number(editRecordId) })
+                        this.accountId = Number(editRecordId)
+                    }, 100)
+                })
+            }
+        }
+    },
+    filters: {},
+    methods: {
+        saveHandler() {
+            let params = {}
+
+            if (this.mode == 1) {
+                this.formProject.validateFields((err, values) => {
+                    if (!err) {
+                        params.usageRange = values.usageRange
+                        if (values.usageRange == 2) {
+                            params.projectId = values.projectId
+                        } else if (values.usageRange == 1) {
+                            params.accountId = values.accountId
+                        }
+                        params.createType = '1'
+                        localStorage.setItem('channelInfo', JSON.stringify(params))
+                        this.$emit('nextStep')
+                    } else {
+                        return
+                    }
+                })
+            } else if (this.mode == 2) {
+                if (!!this.productId || !!this.projectId) {
+                    params.projectId = this.projectId
+                    params.productId = this.productId
+                    params.projectName = this.$refs.selectTableProjectDownLoad.keyValue
+                    params.createType = '2'
+                    localStorage.setItem('channelInfo', JSON.stringify(params))
+                    this.$emit('nextStep')
+                } else {
+                    this.$message.error('创建方式为文件上传,请选择产品名称和项目名称')
+                    return
+                }
+            }
+        },
+        goBack() {
+            this.$router.replace('/autoLaunch/channelManage')
+            
+            this.$bus.$emit('remove', '/autoLaunch/createChannelIndex')
+            this.$bus.$emit('remove', '/autoLaunch/createChannelIndex?accountId='+this.$route.query.accountId)
+        },
+        checkMode(key) {
+            this.mode = key
+            this.productId = ''
+            this.projectId = ''
+        },
+        //获取表单的某一个属性值
+        getFormData(className) {
+            return this.formProject.getFieldValue(className)
+        }
+    }
+}
+</script>

BIN
src/views/modules/autoLaunch/channelManage/channelAdmin/components/images/system.png


BIN
src/views/modules/autoLaunch/channelManage/channelAdmin/components/images/upload.png


+ 307 - 0
src/views/modules/autoLaunch/channelManage/channelAdmin/components/uploadChannel.vue

@@ -0,0 +1,307 @@
+<style scoped lang="scss">
+::v-deep.ant-form-item {
+    margin-bottom: 10px !important;
+}
+.flex-main {
+    display: flex;
+    margin-bottom: 10px;
+    p {
+        color: black;
+        font-weight: 600;
+        overflow: hidden; //超出的文本隐藏
+        text-overflow: ellipsis; //溢出用省略号显示
+        white-space: nowrap; //溢出不换行
+    }
+}
+.config-check {
+    width: 100%;
+    display: flex;
+    .config-check-one {
+        width: 250px;
+        height: 125px;
+        border: 1px solid #f2f2f2;
+        padding: 20px;
+        display: flex;
+        margin-right: 15px;
+        border-radius: 10px;
+        cursor: pointer;
+
+        .config-check-one-left {
+            width: 70%;
+            height: 100%;
+        }
+        .config-check-one-right {
+            width: 30%;
+            height: 100%;
+            position: relative;
+        }
+    }
+    .config-check-active {
+        border-color: rgb(38, 122, 251) !important;
+    }
+}
+::v-deep .check-else .vue-treeselect__control {
+    line-height: 20px !important;
+}
+::v-deep .check-else .ant-form-item-control {
+    height: auto !important;
+    line-height: 20px !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="formProject">
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="项目名称">
+                                        <span v-if="createTypeData.projectName">{{ createTypeData.projectName }}</span>
+                                        <span v-else>-</span>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item v-bind="tailFormItemLayout">
+                                        <a-button type="primary" @click="handleOkDownLoad">导出渠道号模板</a-button>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="操作系统">
+                                        <a-radio-group
+                                            button-style="solid"
+                                            v-decorator="[
+                                                'plam_os',
+                                                {
+                                                    rules: [{ required: true, message: '是否关联单品必选' }],
+                                                    initialValue: 1
+                                                }
+                                            ]"
+                                        >
+                                            <a-radio-button :value="1">安卓</a-radio-button>
+                                            <a-radio-button :value="0" disabled>IOS</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="上传图标">
+                                        <uploadFile
+                                            :value.sync="fileUrl"
+                                            :multiple="false"
+                                            :fileCount="1"
+                                            uploadType="image"
+                                            @overUpload="overUpload"
+                                            :size="100"
+                                        ></uploadFile>
+                                        <p class="upload-txt-rules">
+                                            文件格式:支持上传png/jpg/jpeg图片,尺寸450*450,小于100kb
+                                        </p>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                            <a-row :gutter="16">
+                                <a-col :span="16">
+                                    <a-form-item label="上传文件" class="require-class fileUpload" id="fileUpload">
+                                        <a-upload
+                                            name="file"
+                                            :multiple="false"
+                                            :headers="tokenHeader"
+                                            :file-list="fileList"
+                                            :showUploadList="false"
+                                            :beforeUpload="beforeUpload"
+                                            @change="handleChange"
+                                            style="margin-right: 20px"
+                                        >
+                                            <a-button :disabled="fileUrl == ''">
+                                                <a-icon type="upload" />
+                                                {{ loadDisabled ? '上传中,请稍后' : '文件上传' }}
+                                            </a-button>
+                                        </a-upload>
+                                    </a-form-item>
+                                </a-col>
+                            </a-row>
+                        </a-form>
+                    </a-card>
+                </a-col>
+            </a-row>
+        </div>
+        <div style="width:100%;display:flex;    justify-content: flex-end;">
+            <a-button type="default" style="margin-right: 15px" @click="goBack">取消</a-button>
+            <a-button type="primary" style="margin-right: 15px" @click="saveHandler" :loading="saveLoading"
+                >确定</a-button
+            >
+        </div>
+    </div>
+</template>
+
+<script>
+// import EditableCell from './editablCell'
+// import lookPreviewVue from './lookPreview.vue'
+import Treeselect from '../../components/treeSelectProject.vue'
+import treeSelectAccount from '../../components/treeSelectAccount.vue'
+import selectTable from '@/views/modules/material/comment/selectTable.vue'
+import selectTableProject from '@/views/modules/Statistics/components/selectPagination.vue'
+
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
+import { mapGetters } from 'vuex'
+import uploadFile from '../../components/uploadFile.vue'
+
+import Vue from 'vue'
+import { ACCESS_TOKEN } from '@/store/mutation-types'
+import $ from 'jquery'
+const fileSuffix = ['xlsx', 'xls', 'zip']
+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: {
+        Treeselect,
+        treeSelectAccount,
+        selectTable,
+        selectTableProject,
+        uploadFile
+    },
+    data() {
+        return {
+            formProject: this.$form.createForm(this), //选择项目表单
+            saveLoading: false,
+            mode: 1,
+            productId: '',
+            projectId: '',
+            formItemLayout: {
+                labelCol: { span: 6 },
+                wrapperCol: { span: 16 }
+            },
+            tailFormItemLayout: {
+                wrapperCol: {
+                    sm: {
+                        span: 16,
+                        offset: 6
+                    }
+                }
+            },
+            createTypeData: { createType: '1', projectId: null, projectName: null },
+            loadDisabled: false,
+            fileUrl: '',
+            tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
+            fileList: [],
+            dataFile: null
+        }
+    },
+    computed: {},
+    watch: {},
+    mounted() {
+        this.$nextTick(() => {
+            this.createTypeData = JSON.parse(localStorage.getItem('channelInfo'))
+        })
+    },
+    filters: {},
+    methods: {
+        ...mapGetters(['userInfo']),
+        saveHandler() {
+            if (!!this.fileUrl) {
+                this.saveLoading = true
+                if (this.dataFile) {
+                    let formData = new FormData()
+                    formData.append('file', this.dataFile)
+                    formData.append('imageUrl', this.fileUrl)
+
+                    postAction('/channel/importChannelExcel', formData).then(res => {
+                        this.saveLoading = false
+                        if (res.code === 200) {
+                            this.$message.success(res.message)
+                            localStorage.removeItem('channelInfo')
+                            this.$router.replace('/autoLaunch/channelAdmin')
+                            this.$bus.$emit('remove', '/autoLaunch/createChannelIndex')
+                            this.$bus.$emit(
+                                'remove',
+                                '/autoLaunch/createChannelIndex?accountId=' + this.$route.query.accountId
+                            )
+                        } else {
+                            this.$message.error(res.message)
+                        }
+                    })
+                } else {
+                    this.$message.error('请上传文件')
+                }
+
+                return
+            }
+        },
+        goBack() {
+            localStorage.removeItem('channelInfo')
+            this.$router.replace('/autoLaunch/channelAdmin')
+            this.$bus.$emit('remove', '/autoLaunch/createChannelIndex')
+            this.$bus.$emit('remove', '/autoLaunch/createChannelIndex?accountId=' + this.$route.query.accountId)
+        },
+        //获取表单的某一个属性值
+        getFormData(className) {
+            return this.formProject.getFieldValue(className)
+        },
+        handleOkDownLoad() {
+            let params = {}
+            params.productId = this.createTypeData.productId
+            params.projectId = this.createTypeData.projectId
+            params.userId = this.userInfo().id
+            downFile('/channel/exportChannelTemplate', params).then(res => {
+                let blob = new Blob([res], {
+                    type: 'application/vnd.openxmlformats-officedocument.spre1adsheetml.sheet'
+                })
+                let downloadElement = document.createElement('a')
+                let href = window.URL.createObjectURL(blob) //创建下载的链接
+                downloadElement.href = href
+                downloadElement.download = '渠道号模板.xlsx' //下载后文件名
+                document.body.appendChild(downloadElement)
+                downloadElement.click() //点击下载
+                document.body.removeChild(downloadElement) //下载完成移除元素
+                window.URL.revokeObjectURL(href) //释放掉blob对象
+            })
+        },
+        overUpload(file) {},
+        handleChange() {
+            this.loadDisabled = false
+            this.$message.success('文件导入成功')
+        },
+        beforeUpload(file) {
+            this.dataFile = $('.fileUpload')
+                .eq(0)
+                .find('input')[0].files[0]
+            this.loadDisabled = true
+            const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
+            const fileName = file.name
+            const fileStrArr = fileName.split('.')
+            const suffix = fileStrArr[fileStrArr.length - 1]
+
+            let result = fileSuffix.some(item => {
+                return item === suffix
+            })
+
+            if (!result) {
+                this.$message.error('不支持该文件类型')
+                this.loadDisabled = false
+                return Promise.reject()
+            }
+        }
+    }
+}
+</script>

+ 80 - 0
src/views/modules/autoLaunch/channelManage/channelAdmin/createChannelIndex.vue

@@ -0,0 +1,80 @@
+<template>
+    <a-card :bordered="false">
+        <a-steps class="steps" :current="currentTab">
+            <a-step title="基础信息" />
+            <a-step title="渠道号" />
+        </a-steps>
+        <div class="content">
+            <step1 v-if="currentTab === 0" @nextStep="nextStep" ref="step" />
+            <step2 v-if="currentTab === 1" />
+            <step3 v-if="currentTab === 2" />
+        </div>
+    </a-card>
+</template>
+
+<script>
+import Step1 from './components/checkCreat'
+import Step2 from '../createChannel'
+import Step3 from './components/uploadChannel'
+export default {
+    name: 'StepForm',
+    components: {
+        Step1,
+        Step2,
+        Step3
+    },
+    data() {
+        return {
+            currentTab: 0,
+
+            // form
+            form: null,
+            campaignId: null,
+            formComponent: null
+        }
+    },
+    methods: {
+        // handler
+        nextStep() {
+            // if (this.currentTab < 2) {
+            //     this.currentTab += 1
+            // }
+            if (JSON.parse(localStorage.getItem('channelInfo')).createType == '1') {
+                this.currentTab = 1
+            } else {
+                this.currentTab = 2
+            }
+        },
+        prevStep() {
+            if (this.currentTab > 0) {
+                this.currentTab -= 1
+            }
+        },
+        finish() {
+            this.currentTab = 0
+        },
+        remove(key) {
+            this.$emit('removeTab', key)
+        }
+    },
+    watch: {},
+    mounted() {
+        if (localStorage.getItem('channelInfo')) {
+            if (JSON.parse(localStorage.getItem('channelInfo')).createType == '1') {
+                this.currentTab = 1
+            } else {
+                this.currentTab = 2
+            }
+        } else {
+            this.currentTab = 0
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.steps {
+    max-width: 750px;
+    margin: 16px auto;
+}
+</style>

+ 252 - 0
src/views/modules/autoLaunch/channelManage/channelAdmin/index.vue

@@ -0,0 +1,252 @@
+<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;
+}
+.card-person-drawer {
+    width: 100%;
+    height: 90%;
+    overflow: hidden;
+    padding: 10px 0px;
+    display: flex;
+    flex-wrap: wrap;
+    margin-right: -10px;
+    justify-content: space-between;
+    ::v-deep .ant-card-body {
+        padding: 0;
+    }
+    ::v-deep .ant-card-head {
+        padding: 0 5px;
+    }
+    .card-item {
+        width: calc(25% - 10px);
+        margin-bottom: 10px;
+        float: left;
+    }
+    .card-item-else {
+        width: calc(20% - 10px);
+        margin-bottom: 10px;
+        float: left;
+    }
+}
+</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 8px;
+}
+.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="channelList" tab="渠道号"> </a-tab-pane>
+                <a-tab-pane key="2" tab="单品" disabled> </a-tab-pane>
+                <!-- <a-button slot="tabBarExtraContent" type="primary" @click="newCreat(null)">
+                    创建渠道号
+                </a-button> -->
+            </a-tabs>
+        </div>
+        <component v-bind:is="currentTabComponent"></component>
+
+    </div>
+</template>
+
+<script>
+import moment from 'moment'
+
+let KScolumns = []
+
+export default {
+    components: {
+        channelList: () => import('./components/channelList'),
+    },
+
+    data() {
+        return {
+            currentTabComponent: 'channelList',
+  
+            tabKey: 'channelList',
+
+        }
+    },
+    methods: {
+        moment,
+
+        // 快手头条的切换
+        tabChange(key) {
+            this.currentTabComponent = key;
+        },
+
+    },
+    watch: {
+
+    },
+    computed: {
+      
+    },
+    mounted() {
+       
+    },
+    activated: function() {},
+
+    filters: {
+        
+    }
+}
+</script>

+ 45 - 38
src/views/modules/autoLaunch/channelManage/channelDetailList.vue

@@ -157,7 +157,10 @@
                         </a-col>
                     </a-row>
                 </a-form>
-                <a-row :gutter="24">
+                <a-tag closable @close="closeLog">
+                    {{accountId}}
+                </a-tag>
+                <!-- <a-row :gutter="24">
                     <a-col :md="8" :sm="8" :xxl="6">
                         <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
                             <a-button type="primary" @click="visibleAddItem = true">添加单品</a-button>
@@ -170,7 +173,7 @@
                             >
                         </span>
                     </a-col>
-                </a-row>
+                </a-row> -->
             </div>
         </a-card>
 
@@ -498,42 +501,42 @@ let TTcolumns = [
         align: 'center',
         key: 'usageLevel'
     },
-    {
-        title: '使用次数',
-        dataIndex: 'usageTimes',
-        scopedSlots: { customRender: 'usageTimes' },
-        align: 'center',
-        key: 'usageTimes'
-    },
-    {
-        title: '是否循环',
-        dataIndex: 'isCycle',
-        customRender: function(text) {
-            if (text == 1) {
-                return '是'
-            } else if (text == 0) {
-                return '否'
-            } else {
-                return text
-            }
-        },
-        align: 'center',
-        key: 'isCycle'
-    },
-    {
-        title: '循环次数',
-        dataIndex: 'cycleTimes',
-        scopedSlots: { customRender: 'cycleTimes' },
-        align: 'center',
-        key: 'cycleTimes'
-    },
-    {
-        title: '当前已循环次数',
-        dataIndex: 'haveCycleTimes',
-        scopedSlots: { customRender: 'haveCycleTimes' },
-        align: 'center',
-        key: 'haveCycleTimes'
-    },
+    // {
+    //     title: '使用次数',
+    //     dataIndex: 'usageTimes',
+    //     scopedSlots: { customRender: 'usageTimes' },
+    //     align: 'center',
+    //     key: 'usageTimes'
+    // },
+    // {
+    //     title: '是否循环',
+    //     dataIndex: 'isCycle',
+    //     customRender: function(text) {
+    //         if (text == 1) {
+    //             return '是'
+    //         } else if (text == 0) {
+    //             return '否'
+    //         } else {
+    //             return text
+    //         }
+    //     },
+    //     align: 'center',
+    //     key: 'isCycle'
+    // },
+    // {
+    //     title: '循环次数',
+    //     dataIndex: 'cycleTimes',
+    //     scopedSlots: { customRender: 'cycleTimes' },
+    //     align: 'center',
+    //     key: 'cycleTimes'
+    // },
+    // {
+    //     title: '当前已循环次数',
+    //     dataIndex: 'haveCycleTimes',
+    //     scopedSlots: { customRender: 'haveCycleTimes' },
+    //     align: 'center',
+    //     key: 'haveCycleTimes'
+    // },
     {
         title: '使用明细',
         dataIndex: 'action',
@@ -761,6 +764,10 @@ export default {
     },
     methods: {
         moment,
+        closeLog(){
+            this.$router.replace('/autoLaunch/channelAdmin')
+            this.$bus.$emit('remove', '/autoLaunch/channelDetailList')
+        },
         deleteIcon(event) {
             event.stopPropagation()
         },

+ 3 - 5
src/views/modules/autoLaunch/channelManage/components/treeSelectAccount.vue

@@ -10,9 +10,9 @@
             :disable-branch-nodes="!multiple"
             :disable-fuzzy-matching="true"
             :options="options"
+            v-model="selectedVal"
             :load-options="loadOptions"
             placeholder="请选择项目以及账户"
-            v-model="selectedVal"
             :value-consists-of="valueConsistsOf"
             :auto-load-root-options="false"
             @select="update"
@@ -67,7 +67,7 @@ export default {
         },
         appId: {
             default() {
-                return ''
+                return undefined
             }
         },
         //判断媒体类型
@@ -104,10 +104,9 @@ export default {
     computed: {
         selectedVal: {
             get: function() {
-                return this.value
+                return this.appId
             },
             set: function(val) {
-                console.log(val)
                 this.$emit('input', val)
                 this.$emit('change', val)
             }
@@ -192,7 +191,6 @@ export default {
             params.userId = this.userInfo().id
             postAction(this.reqUrl, params).then(res => {
                 if (res.success) {
-                    console.log(res)
                     this.options = res.result.map(item => {
                         return {
                             id: item.productId + 'productId',

+ 0 - 1
src/views/modules/autoLaunch/channelManage/components/treeSelectProject.vue

@@ -193,7 +193,6 @@ export default {
             params.userId = this.userInfo().id
             postAction(this.reqUrl, params).then(res => {
                 if (res.success) {
-                    console.log(res)
                     this.options = res.result.map(item => {
                         return {
                             id: item.productId + 'productId',

+ 60 - 132
src/views/modules/autoLaunch/channelManage/createChannel.vue

@@ -1,4 +1,7 @@
 <style scoped lang="scss">
+::v-deep.ant-form-item {
+    margin-bottom: 10px !important;
+}
 ::v-deep.vue-treeselect__control {
     line-height: 36px !important;
 }
@@ -217,80 +220,7 @@ li.chouzhen.first:before {
                     <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="formProject">
-                                <a-row
-                                    :gutter="16"
-                                    v-if="createTypeData && !!!createTypeData.accountId && !!!createTypeData.projectId"
-                                >
-                                    <a-col :span="16">
-                                        <a-form-item label="使用范围">
-                                            <a-radio-group
-                                                button-style="solid"
-                                                v-decorator="[
-                                                    'usageRange',
-                                                    {
-                                                        rules: [{ required: true, message: '使用范围必选' }],
-                                                        initialValue: 2
-                                                    }
-                                                ]"
-                                            >
-                                                <a-radio-button :value="2">项目</a-radio-button>
-                                                <a-radio-button :value="1">账户</a-radio-button>
-                                            </a-radio-group>
-                                        </a-form-item>
-                                    </a-col>
-                                </a-row>
-                                <a-row
-                                    :gutter="16"
-                                    v-if="getFormData('usageRange') == 2 || getFormData('usageRange') == undefined"
-                                >
-                                    <a-col :span="16">
-                                        <a-form-item
-                                            :label="
-                                                createTypeData && !!!createTypeData.accountId
-                                                    ? !!!createTypeData.projectId
-                                                        ? '选择项目'
-                                                        : '项目ID'
-                                                    : '账户ID'
-                                            "
-                                        >
-                                            <Treeselect
-                                                style="width:600px"
-                                                v-decorator="[
-                                                    'projectId',
-                                                    {
-                                                        rules: [{ required: true, message: '项目必选' }]
-                                                    }
-                                                ]"
-                                                v-if="
-                                                    createTypeData &&
-                                                        !!!createTypeData.accountId &&
-                                                        !!!createTypeData.projectId
-                                                "
-                                            />
-                                            <span v-else>{{
-                                                createTypeData.accountId
-                                                    ? createTypeData.accountId
-                                                    : createTypeData.projectId
-                                            }}</span>
-                                        </a-form-item>
-                                    </a-col>
-                                </a-row>
-                                <a-row :gutter="16" v-else>
-                                    <a-col :span="16">
-                                        <a-form-item label="选择账户">
-                                            <treeSelectAccount
-                                                style="width:600px"
-                                                v-decorator="[
-                                                    'accountId',
-                                                    {
-                                                        rules: [{ required: true, message: '账户必选' }]
-                                                    }
-                                                ]"
-                                            />
-                                        </a-form-item>
-                                    </a-col>
-                                </a-row>
-                                <a-row :gutter="16" v-if="createTypeData && createTypeData.createType == '1'">
+                                <a-row :gutter="16">
                                     <a-col :span="16">
                                         <a-form-item label="编号位数">
                                             <a-select
@@ -315,62 +245,19 @@ li.chouzhen.first:before {
                                 <a-row :gutter="16" v-if="createTypeData && createTypeData.createType == '1'">
                                     <a-col :span="16">
                                         <a-form-item label="编号">
-                                            <a-input-number
-                                                v-decorator="[
-                                                    'numberMin',
-                                                    {
-                                                        rules: [
-                                                            {
-                                                                required: true,
-                                                                message: '请输入正确的编号',
-                                                                validator: numberMinCheck
-                                                            }
-                                                        ]
-                                                    }
-                                                ]"
-                                                :precision="0"
-                                                :min="1"
-                                                :max="
-                                                    getFormData('numberLength') == 0
-                                                        ? 999999
-                                                        : getFormData('numberLength') == 3
-                                                        ? 999
-                                                        : getFormData('numberLength') == 4
-                                                        ? 9999
-                                                        : getFormData('numberLength') == 5
-                                                        ? 99999
-                                                        : 999999
-                                                "
-                                            />
-                                            ~
-                                            <a-input-number
+                                            <a-input
+                                                style="width:300px"
                                                 v-decorator="[
-                                                    'numberMax',
+                                                    'numberValue',
                                                     {
                                                         rules: [
-                                                            {
-                                                                required: true,
-                                                                message: '编号位数限制12312'
-                                                            }
+                                                            { required: true, message: ' ' },
+                                                            { validator: cpaBidValid }
                                                         ]
                                                     }
                                                 ]"
-                                                @change="numberMaxCheck"
-                                                @blur="numberMaxCheck"
-                                                :precision="0"
-                                                :min="1"
-                                                :max="
-                                                    getFormData('numberLength') == 0
-                                                        ? 999999
-                                                        : getFormData('numberLength') == 3
-                                                        ? 999
-                                                        : getFormData('numberLength') == 4
-                                                        ? 9999
-                                                        : getFormData('numberLength') == 5
-                                                        ? 99999
-                                                        : 999999
-                                                "
-                                            />
+                                            >
+                                            </a-input>
                                         </a-form-item>
                                     </a-col>
                                 </a-row>
@@ -513,6 +400,7 @@ li.chouzhen.first:before {
                                     <a-col :span="16">
                                         <a-form-item label="是否关联单品">
                                             <a-radio-group
+                                                disabled
                                                 button-style="solid"
                                                 v-decorator="[
                                                     'isHaveItem',
@@ -532,6 +420,7 @@ li.chouzhen.first:before {
                                     <a-col :span="16">
                                         <a-form-item label="使用层级">
                                             <a-radio-group
+                                                disabled
                                                 button-style="solid"
                                                 v-decorator="[
                                                     'usageLevel',
@@ -552,6 +441,7 @@ li.chouzhen.first:before {
                                     <a-col :span="16">
                                         <a-form-item label="是否循环使用">
                                             <a-radio-group
+                                                disabled
                                                 button-style="solid"
                                                 v-decorator="[
                                                     'isCycle',
@@ -567,7 +457,7 @@ li.chouzhen.first:before {
                                         </a-form-item>
                                     </a-col>
                                 </a-row>
-                                <a-row
+                                <!-- <a-row
                                     :gutter="16"
                                     v-if="getFormData('isCycle') == 1 || getFormData('isCycle') == undefined"
                                 >
@@ -591,7 +481,7 @@ li.chouzhen.first:before {
                                             />
                                         </a-form-item>
                                     </a-col>
-                                </a-row>
+                                </a-row> -->
                             </a-form>
                         </a-card>
                     </a-col>
@@ -723,7 +613,7 @@ export default {
     watch: {},
     mounted() {
         this.$nextTick(function() {
-            this.createTypeData = JSON.parse(localStorage.getItem('createTypeData'))
+            this.createTypeData = JSON.parse(localStorage.getItem('channelInfo'))
             window.addEventListener('scroll', this.onScroll)
             const that = this
             window.onresize = () => {
@@ -738,6 +628,28 @@ export default {
     methods: {
         moment,
         ...mapGetters(['userInfo']),
+        cpaBidValid(rule, value, callback) {
+            let z = /-/g
+            let a = /\//g
+            let d = /\./g
+            if (value === '' || value === undefined || value === 0  || value === '0') {
+                callback('编号必须填写')
+            } else if (value.match(d)) {
+                callback('请填写正确编号')
+            } else if (value.match(a)) {
+                callback('请填写正确编号')
+            } else if (value.match(z)&&value.match(z).length > 1) {
+                callback('请填写正确编号')
+            } else if (value.startsWith('-') || value.endsWith('-')) {
+                callback('请填写正确编号')
+            } else if (value.match(/[^0-9+-\/]/g)) {
+                callback('请填写正确编号')
+            } else if (/^[0-9]/g.test(value)) {
+                callback()
+            } else {
+                callback()
+            }
+        },
         getDataAll(form) {
             this.newAppFormData = form
         },
@@ -839,8 +751,11 @@ export default {
             }
         },
         goBack() {
+            localStorage.removeItem('channelInfo')
             this.$router.replace('/autoLaunch/channelManage')
-            this.$bus.$emit('remove', '/autoLaunch/createChannel')
+            this.$bus.$emit('remove', '/autoLaunch/createChannelIndex')
+
+            this.$bus.$emit('remove', '/autoLaunch/createChannelIndex?accountId=' + this.$route.query.accountId)
         },
         saveHandler() {
             this.formProject.validateFields((err, values) => {
@@ -850,11 +765,19 @@ export default {
                         var params = { ...values, ...this.newAppFormData }
                         params.userId = this.userInfo().id
                         params.createType = this.createTypeData.createType
-                        if (this.createTypeData && !!this.createTypeData.accountId) {
+                        let numberValueArr = params.numberValue.split('-')
+                        if (numberValueArr.length > 1) {
+                            if (numberValueArr[0] > numberValueArr[1]) {
+                                this.$message.error('编号填写错误')
+                                return
+                            }
+                        }
+
+                        if (this.createTypeData && this.createTypeData.usageRange == '1') {
                             params.usageRange = 1
                             params.projectId = null
                             params.accountId = this.createTypeData.accountId
-                        } else if (this.createTypeData && !!this.createTypeData.projectId) {
+                        } else if (this.createTypeData && this.createTypeData.usageRange == '2') {
                             params.usageRange = 2
                             params.projectId = this.createTypeData.projectId
                             params.accountId = null
@@ -866,8 +789,13 @@ export default {
                         postAction(url, params).then(res => {
                             this.saveLoading = false
                             if (res.success) {
-                                this.$router.replace('/autoLaunch/channelManage')
-                                this.$bus.$emit('remove', '/autoLaunch/createChannel')
+                                localStorage.removeItem('channelInfo')
+                                this.$router.replace('/autoLaunch/channelAdmin')
+                                this.$bus.$emit('remove', '/autoLaunch/createChannelIndex')
+                                this.$bus.$emit(
+                                    'remove',
+                                    '/autoLaunch/createChannelIndex?accountId=' + this.$route.query.accountId
+                                )
                             } else {
                                 this.$message.error(res.message)
                             }

+ 0 - 1
src/views/modules/material/accountCheckBytedance.vue

@@ -310,7 +310,6 @@ export default {
         userId: this.userInfo().id
       }).then((res) => {
         if (res.code == 0) {
-          console.log(res)
           this.options = res.result.map((item) => {
             return {
               id: item.accountId+'@'+item.userId+'@'+item.userName,

+ 2 - 2
vue.config.js

@@ -105,7 +105,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.59:7001', //请求本地 需要jeecg-boot后台项目  赵西安
+        target: 'http://192.168.1.59:7701', //请求本地 需要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后台项目
@@ -119,7 +119,7 @@ module.exports = {
         // target:'http://gateway.tjyourong.com.cn', //测试
         // target:'http://apipre.tjyourong.com.cn', //预生产
         // target: 'http://192.168.1.134:7001', //请求本地 需要jeecg-boot后台项目  周泽宇
-        target:'http://192.168.0.195:9999/',
+        // target:'http://192.168.0.195:9999/',
         // target:'http://gateway.tjyourong.com.cn/',//测试
 
         ws: false,