朱鑫波 3 年之前
父節點
當前提交
d7b5ab99cd

+ 1 - 1
src/views/modules/autoLaunch/trusteeship/index.vue

@@ -735,7 +735,7 @@ export default {
                 if (res.success) {
                     this.$message.success(res.message)
                     this.tongbuLoading = false
-                    postAction('/hosting/kuaishouHostingTemplate/getVideoList', {
+                    this.getAction('/hosting/kuaishouHostingTemplate/getVideoList', {
                         id: this.ipaginationVideo.id,
                         accountId: this.ipaginationVideo.accountId,
                         pageSize: this.ipaginationVideo.pageSize,

+ 1 - 1
src/views/modules/autoLaunchRevision/autoLaunchList.vue

@@ -446,7 +446,7 @@ export default {
             record.spin = true
 
             let status = text == 1 ? 0 : 1
-            this.postDataAction(`/auto/aiKuaishouAccountAutoStrategy/edit`, {
+            this.postDataAction(`/auto/aiKuaishouAccountAutoStrategy/updateState`, {
                 id: record.id,
                 status
             }).then(res => {

+ 8 - 8
src/views/modules/autoLaunchRevision/components/targetedPopulation.vue

@@ -886,8 +886,8 @@ export default {
                     this.selectedRowKeys = n.population ? n.population : []
                     this.selectedRowKeysNo = n.excludePopulation ? n.excludePopulation : []
                     this.optionsAll = n.appIds ? (typeof n.appIds == 'string' ? JSON.parse(n.appIds) : n.appIds) : []
-                    n.behavior = typeof n.behavior === 'string' ? JSON.parse(n.behavior) : n.behavior
-                    n.interest = typeof n.interest === 'string' ? JSON.parse(n.interest) : n.interest
+                    // n.behavior = typeof n.behavior === 'string' ? JSON.parse(n.behavior) : n.behavior
+                    // n.interest = typeof n.interest === 'string' ? JSON.parse(n.interest) : n.interest
                     this.$nextTick(() => {
                         this.formAll.setFieldsValue(
                             pick(n, [
@@ -904,14 +904,14 @@ export default {
                                 'devicePrice',
                                 'businessInterest',
                                 'filterConvertedLevel',
-                                'timeType',
-                                'strengthType',
-                                'sceneType'
+                                // 'timeType',
+                                // 'strengthType',
+                                // 'sceneType'
                             ])
                         )
-                        setTimeout(() => {
-                            this.formAll.setFieldsValue(pick(n, ['behavior', 'interest']))
-                        }, 100)
+                        // setTimeout(() => {
+                        //     this.formAll.setFieldsValue(pick(n, ['behavior', 'interest']))
+                        // }, 100)
                     })
                 } else {
                     this.formAll.resetFields()

+ 10 - 9
src/views/modules/autoLaunchRevision/components/templateModal.vue

@@ -181,10 +181,10 @@ export default {
                     this.populationData.agesRange = dataJson.agesRange ? JSON.parse(dataJson.agesRange) : []
                     this.populationData.devicePrice = dataJson.devicePrice ? dataJson.devicePrice : null
 
-                    this.populationData.behavior = dataJson.label
-                    this.populationData.interest = dataJson.interestLabel
+                    // this.populationData.behavior = dataJson.label
+                    // this.populationData.interest = dataJson.interestLabel
 
-                    this.populationData.sceneType = dataJson.sceneType ? JSON.parse(dataJson.sceneType) : []
+                    // this.populationData.sceneType = dataJson.sceneType ? JSON.parse(dataJson.sceneType) : []
                     this.populationData.allForm = {}
                     var population = dataJson.population ? JSON.parse(dataJson.population) : null
                     var excludePopulation = dataJson.excludePopulation ? JSON.parse(dataJson.excludePopulation) : null
@@ -258,7 +258,7 @@ export default {
                     this.populationData.allForm.noAgeBreak = dataJson.noAgeBreak + ''
                     this.populationData.allForm.noGenderBreak = dataJson.noGenderBreak + ''
                     this.populationData.allForm.noAreaBreak = dataJson.noAreaBreak + ''
-                    this.populationData.allForm.behaviorInterest = dataJson.label && dataJson.label != '[]' ? '1' : '0'
+                    // this.populationData.allForm.behaviorInterest = dataJson.label && dataJson.label != '[]' ? '1' : '0'
                     this.populationData.allForm.checkArr =
                         this.populationData.allForm.appType == '2' ? JSON.parse(dataJson.appIds) : []
                     this.populationData.projectId = dataJson.projectId + ''
@@ -297,8 +297,8 @@ export default {
                                     targetName: values.templateName,
                                     accountId: this.accountId
                                 }
-                                params.label = params.behavior ? JSON.stringify(params.behavior) : '[]'
-                                params.interestLabel = params.interest ? JSON.stringify(params.interest) : '[]'
+                                // params.label = params.behavior ? JSON.stringify(params.behavior) : '[]'
+                                // params.interestLabel = params.interest ? JSON.stringify(params.interest) : '[]'
                                 if (this.type == 'add') {
                                     postAction('/auto/aiKuaishouAccountAutoTarget/addLocalTarget', params).then(res => {
                                         if (res.success) {
@@ -314,12 +314,13 @@ export default {
                                     params.id = this.templateId
                                     postAction('/auto/aiKuaishouAccountAutoTarget/updateLocalTarget', params).then(
                                         res => {
-                                            this.visible = false
+                                            this.loading = false
                                             if (res.success) {
-                                                this.loading = false
+                                                this.visible = false
+                                                
                                                 this.$emit('getData')
                                             } else {
-                                                this.loading = false
+                                                // this.loading = false
                                                 this.$message.error(res.message)
                                             }
                                         }

+ 364 - 221
src/views/modules/autoLaunchRevision/createLaunch.vue

@@ -1,4 +1,7 @@
 <style scoped lang="scss">
+::v-deep.import-padding-top .ant-modal-body {
+    padding-top: 10px;
+}
 ::v-deep.vue-treeselect__control {
     line-height: 20px !important;
 }
@@ -262,6 +265,7 @@ li.chouzhen.first:before {
                                             style="display: inline-block;position: relative;margin-left: 0px;width:100%"
                                             :limit="1"
                                             :disabled="!!$route.query.id"
+                                            @change="changeAccount"
                                         />
                                     </a-form-item>
                                 </a-col>
@@ -270,6 +274,7 @@ li.chouzhen.first:before {
                                 <a-col :span="16">
                                     <a-form-item label="营销目标">
                                         <a-radio-group
+                                            :disabled="!!$route.query.id"
                                             button-style="solid"
                                             v-decorator="[
                                                 'campaignType',
@@ -432,6 +437,109 @@ li.chouzhen.first:before {
                         </a-form>
                     </a-card>
 
+                    <a-card class="search-box step-jump" title="目标应用">
+                        <a-button
+                            type="primary"
+                            slot="extra"
+                            @click="targetAppEdit"
+                            :disabled="!getFormData('formProject', 'accountId')"
+                            >编辑</a-button
+                        >
+                        <a-row :gutter="16" class="bottom-to-one">
+                            <a-col :span="16">
+                                <a-form-item label="" v-bind="tailFormItemLayout">
+                                    <a-descriptions>
+                                        <a-descriptions-item label="系统平台">
+                                            {{
+                                                appDetail && appDetail.platformOs
+                                                    ? appDetail.platformOs === 1
+                                                        ? 'Android'
+                                                        : 'IOS'
+                                                    : '-'
+                                            }}
+                                        </a-descriptions-item>
+                                        <a-descriptions-item label="单/多应用">
+                                            {{ multipleBidData.length > 1 ? '多应用' : '单应用' }}
+                                        </a-descriptions-item>
+                                        <a-descriptions-item label="应用数量">
+                                            {{ multipleBidData.length }}
+                                        </a-descriptions-item>
+
+                                        <a-descriptions-item label="是否使用渠道号">
+                                            {{ appDetail && appDetail.useChannel ? '是' : '否' }}
+                                        </a-descriptions-item>
+                                        <a-descriptions-item
+                                            label="渠道号作用纬度"
+                                            v-if="
+                                                appDetail &&
+                                                    appDetail.useChannel &&
+                                                    channelData &&
+                                                    channelData.channel.usageLevel
+                                            "
+                                        >
+                                            {{
+                                                channelData.channel.usageLevel == 'account'
+                                                    ? '账户'
+                                                    : channelData.channel.usageLevel == 'plan'
+                                                    ? '计划'
+                                                    : '组'
+                                            }}
+                                        </a-descriptions-item>
+                                        <a-descriptions-item
+                                            label="是否使用单品"
+                                            v-if="
+                                                appDetail &&
+                                                    appDetail.useChannel &&
+                                                    channelData &&
+                                                    channelData.channel.isHaveItem
+                                            "
+                                        >
+                                            {{ channelData.channel.isHaveItem == 1 ? '是' : '否' }}
+                                        </a-descriptions-item>
+
+                                        <a-descriptions-item label="调起链接">
+                                            {{ appDetail && appDetail.schemaUri ? appDetail.schemaUri : '无' }}
+                                        </a-descriptions-item>
+                                        <a-descriptions-item label="转化跟踪" v-if="convertId && !convert">
+                                            {{ convertId.label }}
+                                        </a-descriptions-item>
+                                        <a-descriptions-item label="优先从系统应用商店下载">
+                                            {{ appDetail && appDetail.useAppMarket ? '是' : '否' }}
+                                        </a-descriptions-item>
+                                    </a-descriptions>
+                                </a-form-item>
+                            </a-col>
+                        </a-row>
+                        <a-row :gutter="16" v-for="(item, index) in multipleBidData" :key="index">
+                            <a-col :span="16" v-if="!appDetail.useChannel">
+                                <a-form-item :label="'应用' + (index + 1)" v-bind="formItemLayout">
+                                    <a-collapse expand-icon-position="right">
+                                        <a-collapse-panel key="1" :header="item.appName">
+                                            <a-descriptions>
+                                                <a-descriptions-item label="应用标识" :span="3">
+                                                    {{ item.appVersion }}
+                                                </a-descriptions-item>
+                                                <a-descriptions-item label="第三方点击监测链接" :span="3">
+                                                    {{ !!item.clickTrackUrl ? item.clickTrackUrl : '-' }}
+                                                </a-descriptions-item>
+                                                <a-descriptions-item label="第三方actionBar监测链接" :span="3">
+                                                    {{ !!item.actionbarClickUrl ? item.actionbarClickUrl : '-' }}
+                                                </a-descriptions-item>
+                                            </a-descriptions>
+                                        </a-collapse-panel>
+                                    </a-collapse>
+                                </a-form-item>
+                            </a-col>
+                            <a-col :span="16" v-else>
+                                <a-form-item :label="'应用' + (index + 1)" v-bind="formItemLayout">
+                                    <p style="width:100%;display: flex;justify-content: space-between;">
+                                        {{ item.appName }}({{ item.appVersion }})
+                                        <a @click="lookChannel(item.appName)">详情</a>
+                                    </p>
+                                </a-form-item>
+                            </a-col>
+                        </a-row>
+                    </a-card>
                     <a-card class="search-box step-jump">
                         <span slot="title">
                             目标人群
@@ -891,110 +999,6 @@ li.chouzhen.first:before {
                             </a-col>
                         </a-row>
                     </a-card>
-                    <a-card class="search-box step-jump" title="目标应用">
-                        <a-button
-                            type="primary"
-                            slot="extra"
-                            @click="targetAppEdit"
-                            :disabled="!getFormData('formProject', 'accountId')"
-                            >编辑</a-button
-                        >
-                        <a-row :gutter="16" class="bottom-to-one">
-                            <a-col :span="16">
-                                <a-form-item label="" v-bind="tailFormItemLayout">
-                                    <a-descriptions>
-                                        <a-descriptions-item label="系统平台">
-                                            {{
-                                                appDetail && appDetail.platformOs
-                                                    ? appDetail.platformOs === 1
-                                                        ? 'Android'
-                                                        : 'IOS'
-                                                    : '-'
-                                            }}
-                                        </a-descriptions-item>
-                                        <a-descriptions-item label="单/多应用">
-                                            {{ multipleBidData.length > 1 ? '多应用' : '单应用' }}
-                                        </a-descriptions-item>
-                                        <a-descriptions-item label="应用数量">
-                                            {{ multipleBidData.length }}
-                                        </a-descriptions-item>
-
-                                        <a-descriptions-item label="是否使用渠道号">
-                                            {{ appDetail && appDetail.useChannel ? '是' : '否' }}
-                                        </a-descriptions-item>
-                                        <a-descriptions-item
-                                            label="渠道号作用纬度"
-                                            v-if="
-                                                appDetail &&
-                                                    appDetail.useChannel &&
-                                                    channelData &&
-                                                    channelData.channel.usageLevel
-                                            "
-                                        >
-                                            {{
-                                                channelData.channel.usageLevel == 'account'
-                                                    ? '账户'
-                                                    : channelData.channel.usageLevel == 'plan'
-                                                    ? '计划'
-                                                    : '组'
-                                            }}
-                                        </a-descriptions-item>
-                                        <a-descriptions-item
-                                            label="是否使用单品"
-                                            v-if="
-                                                appDetail &&
-                                                    appDetail.useChannel &&
-                                                    channelData &&
-                                                    channelData.channel.isHaveItem
-                                            "
-                                        >
-                                            {{ channelData.channel.isHaveItem == 1 ? '是' : '否' }}
-                                        </a-descriptions-item>
-
-                                        <a-descriptions-item label="调起链接">
-                                            {{ appDetail && appDetail.schemaUri ? appDetail.schemaUri : '无' }}
-                                        </a-descriptions-item>
-                                        <a-descriptions-item label="转化跟踪" v-if="convertId && !convert">
-                                            {{ convertId.label }}
-                                        </a-descriptions-item>
-                                        <a-descriptions-item label="优先从系统应用商店下载">
-                                            {{ appDetail && appDetail.useAppMarket ? '是' : '否' }}
-                                        </a-descriptions-item>
-                                    </a-descriptions>
-                                </a-form-item>
-                            </a-col>
-                        </a-row>
-                        <a-row :gutter="16" v-for="(item, index) in multipleBidData" :key="index">
-                            <a-col :span="16" v-if="!appDetail.useChannel">
-                                <a-form-item :label="'应用' + (index + 1)" v-bind="formItemLayout">
-                                    <a-collapse expand-icon-position="right">
-                                        <a-collapse-panel key="1" :header="item.appName">
-                                            <a-descriptions>
-                                                <a-descriptions-item label="应用标识" :span="3">
-                                                    {{ item.appVersion }}
-                                                </a-descriptions-item>
-                                                <a-descriptions-item label="第三方点击监测链接" :span="3">
-                                                    {{ !!item.tracUrl ? item.tracUrl : '-' }}
-                                                </a-descriptions-item>
-                                                <a-descriptions-item label="第三方actionBar监测链接" :span="3">
-                                                    {{ !!item.actionbarClickUrl ? item.actionbarClickUrl : '-' }}
-                                                </a-descriptions-item>
-                                            </a-descriptions>
-                                        </a-collapse-panel>
-                                    </a-collapse>
-                                </a-form-item>
-                            </a-col>
-                            <a-col :span="16" v-else>
-                                <a-form-item :label="'应用' + (index + 1)" v-bind="formItemLayout">
-                                    <p style="width:100%;display: flex;justify-content: space-between;">
-                                        {{ item.appName }}({{ item.appVersion }})
-                                        <a @click="lookChannel(item.appName)">详情</a>
-                                    </p>
-                                </a-form-item>
-                            </a-col>
-                        </a-row>
-                    </a-card>
-
                     <a-card class="search-box step-jump" title="创意信息">
                         <a-button
                             type="primary"
@@ -1031,7 +1035,8 @@ li.chouzhen.first:before {
                                         v-if="
                                             showCreativeData &&
                                                 showCreativeData.customPlanCnt &&
-                                                showCreativeData.customUnitCnt
+                                                showCreativeData.customUnitCnt &&
+                                                showCreativeData.unitType != 7
                                         "
                                     >
                                         {{ showCreativeData.customPlanCnt + '/' + showCreativeData.customUnitCnt }}
@@ -1043,7 +1048,8 @@ li.chouzhen.first:before {
                                         v-if="
                                             showCreativeData &&
                                                 showCreativeData.programUnitCnt &&
-                                                showCreativeData.programPlanCnt
+                                                showCreativeData.programPlanCnt &&
+                                                showCreativeData.unitType != 4
                                         "
                                     >
                                         {{ showCreativeData.programPlanCnt + '/' + showCreativeData.programUnitCnt }}
@@ -1093,8 +1099,14 @@ li.chouzhen.first:before {
                                     </span>
                                     <span v-else>-</span>
                                 </a-descriptions-item>
-                                <a-descriptions-item label="创意标签"  :span="2">
-                                    <span v-if="showCreativeData && showCreativeData.creativeTag">
+                                <a-descriptions-item label="创意标签" :span="2">
+                                    <span
+                                        v-if="
+                                            showCreativeData &&
+                                                showCreativeData.creativeTag &&
+                                                showCreativeData.creativeTag.length > 0
+                                        "
+                                    >
                                         {{ showCreativeData.creativeTag.join() }}
                                     </span>
                                     <span v-else>-</span>
@@ -1180,16 +1192,14 @@ li.chouzhen.first:before {
                                         </a-radio-group>
                                     </a-form-item>
 
-                                    <a-form-item v-if="!useChannel">
+                                    <a-form-item v-if="appDetail && !appDetail.useChannel">
                                         <span slot="label">
                                             素材关键字
                                         </span>
                                         <a-textarea
                                             class="rending"
                                             placeholder="请输入素材关键字"
-                                            v-decorator="[
-                                                'materialKeyword',
-                                            ]"
+                                            v-decorator="['materialKeyword']"
                                             :autosize="{ minRows: 2, maxRows: 6 }"
                                         ></a-textarea>
                                     </a-form-item>
@@ -1304,13 +1314,13 @@ li.chouzhen.first:before {
                                                 required: true
                                             }
                                         ],
-                                        initialValue: '1'
+                                        initialValue: 1
                                     }
                                 ]"
                                 button-style="solid"
                             >
-                                <a-radio-button value="1">投放</a-radio-button>
-                                <a-radio-button value="2">暂停</a-radio-button>
+                                <a-radio-button :value="1">投放</a-radio-button>
+                                <a-radio-button :value="2">暂停</a-radio-button>
                             </a-radio-group>
                         </a-form-item>
                     </a-col>
@@ -1339,9 +1349,9 @@ li.chouzhen.first:before {
                             <a-tag color="#2db7f5" @click="getChangeAll('定向包名', 'formInformation', 'groupName')"
                                 >+定向包名</a-tag
                             >
-                            <a-tag color="#2db7f5" @click="getChangeAll('序号', 'formInformation', 'groupName')"
+                            <!-- <a-tag color="#2db7f5" @click="getChangeAll('序号', 'formInformation', 'groupName')"
                                 >+序号</a-tag
-                            >
+                            > -->
                             <a-tag color="#2db7f5" @click="getChangeAll('创意制作方式', 'formInformation', 'groupName')"
                                 >+创意制作方式</a-tag
                             >
@@ -1390,7 +1400,7 @@ li.chouzhen.first:before {
                         <a-form-item label="广告组状态">
                             <a-radio-group
                                 v-decorator="[
-                                    'unitStatus',
+                                    'groupStatus',
                                     {
                                         rules: [
                                             {
@@ -1398,13 +1408,13 @@ li.chouzhen.first:before {
                                                 message: '不小于500, 不超过100000000,仅支持输入自然数'
                                             }
                                         ],
-                                        initialValue: '1'
+                                        initialValue: 1
                                     }
                                 ]"
                                 button-style="solid"
                             >
-                                <a-radio-button value="1">投放</a-radio-button>
-                                <a-radio-button value="2">暂停</a-radio-button>
+                                <a-radio-button :value="1">投放</a-radio-button>
+                                <a-radio-button :value="2">暂停</a-radio-button>
                             </a-radio-group>
                         </a-form-item>
                     </a-col>
@@ -1527,9 +1537,9 @@ li.chouzhen.first:before {
                                     }}&#12288;&nbsp;&#12288; {{ appModel.appVersion }}
                                 </a-select-option>
                             </a-select>
-                            <!-- <a-button type="primary" @click="addApplication" :loading="tongbuLoading"
+                            <a-button type="primary" @click="addApplication" :loading="tongbuLoading"
                                 >刷新应用</a-button
-                            > -->
+                            >
                         </a-form-item>
                     </a-col>
                 </a-row>
@@ -1636,8 +1646,8 @@ li.chouzhen.first:before {
                                 <a-table-column
                                     v-if="!useChannel"
                                     width="20%"
-                                    key="tracUrl"
-                                    data-index="tracUrl"
+                                    key="clickTrackUrl"
+                                    data-index="clickTrackUrl"
                                     title="第三方点击监测链接"
                                     align="center"
                                     :ellipsis="true"
@@ -1645,7 +1655,7 @@ li.chouzhen.first:before {
                                     <template slot-scope="text, record">
                                         <editable-cell
                                             :text="text"
-                                            @change="onCellChange(record.id, 'tracUrl', $event)"
+                                            @change="onCellChange(record.id, 'clickTrackUrl', $event)"
                                         />
                                     </template>
                                 </a-table-column>
@@ -1772,6 +1782,29 @@ li.chouzhen.first:before {
                         </a-form-item>
                     </a-col>
                 </a-row>
+                <a-row :gutter="16">
+                    <a-col :span="16">
+                        <a-form-item label="应用下载详情页">
+                            <a-select
+                                v-decorator="['siteId']"
+                                showSearch
+                                allowClear
+                                placeholder="选择应用下载详情页"
+                                optionFilterProp="children"
+                                :filterOption="filterOption"
+                                style="width:400px"
+                            >
+                                <a-select-option
+                                    v-for="appModel in siteList"
+                                    :key="appModel.siteId"
+                                    :value="appModel.siteId"
+                                >
+                                    {{ appModel.name }}
+                                </a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
             </a-form>
             <div
                 :style="{
@@ -1806,7 +1839,10 @@ li.chouzhen.first:before {
                     <a-button
                         type="primary"
                         :style="{ marginRight: '8px', marginLeft: '8px' }"
-                        @click="getTargetPerson()"
+                        @click="
+                            ipagination.current = 1
+                            getTargetPerson()
+                        "
                     >
                         查询
                     </a-button>
@@ -2238,7 +2274,7 @@ li.chouzhen.first:before {
                                 :min="1"
                                 v-decorator="[
                                     'customPlanCnt',
-                                    { initialValue: 5, rules: [{ required: true, message: '请填写自定义计划数量' }] }
+                                    { initialValue: 3, rules: [{ required: true, message: '请填写自定义计划数量' }] }
                                 ]"
                                 @change="setImageCnt"
                             />
@@ -2247,7 +2283,16 @@ li.chouzhen.first:before {
                 </a-row>
                 <a-row :gutter="16" v-if="getFormData('formOriginality', 'unitType') != 7">
                     <a-col :span="16">
-                        <a-form-item label="自定义组数量">
+                        <a-form-item>
+                            <span slot="label">
+                                <a-tooltip>
+                                    <template slot="title">
+                                        每日创建组数量为广告计划数量*广告组,自定义创意组每日最多600
+                                    </template>
+                                    <a-icon type="question-circle" />
+                                </a-tooltip>
+                                自定义组数量
+                            </span>
                             <a-input-number
                                 style="width:200px"
                                 :max="unitCntMax"
@@ -2298,7 +2343,16 @@ li.chouzhen.first:before {
                 </a-row>
                 <a-row :gutter="16" v-if="getFormData('formOriginality', 'unitType') != 4">
                     <a-col :span="16">
-                        <a-form-item label="程序化组数量">
+                        <a-form-item>
+                            <span slot="label">
+                                <a-tooltip>
+                                    <template slot="title">
+                                        每日创建组数量为广告计划数量*广告组,程序化创意组最多300
+                                    </template>
+                                    <a-icon type="question-circle" />
+                                </a-tooltip>
+                                程序化组数量
+                            </span>
                             <a-input-number
                                 v-decorator="[
                                     'programUnitCnt',
@@ -2384,12 +2438,11 @@ li.chouzhen.first:before {
                         <a-form-item label="广告语">
                             <span style="color:red">
                                 广告语最多30条,超过30条的部分将被截取;
-                                <br>
+                                <br />
                                 每条广告语最多30字,超过30字将截取
                             </span>
-                           
+
                             <div style="max-height:200px;overflow-y:auto;border:1px solid #f2f2f2;padding:10px 0">
-                                
                                 <div style="position:relative" v-for="(item, index) in descriptionList" :key="index">
                                     <a-textarea
                                         class="rending"
@@ -2559,8 +2612,8 @@ li.chouzhen.first:before {
             >
             </a-table>
         </a-modal>
-        <a-modal v-model="importExcelVisible" :footer="null" title="导入广告语">
-            <span style="color:red;margin-bottom:15px"
+        <a-modal v-model="importExcelVisible" :footer="null" title="导入广告语" class="import-padding-top">
+            <span style="color:red;display:flex"
                 >最多只能输入30条广告语,从excel文档第一行开始,每行为一条,每条不能超过30字,超过后该条文案不予上传</span
             >
             <br />
@@ -2596,7 +2649,8 @@ li.chouzhen.first:before {
                     确定
                 </a-button>
             </template>
-            <a-checkbox-group v-model="selectDescriptionArr" style="width:100%">
+            已选广告语:{{ selectDescriptionArr.length }}
+            <a-checkbox-group v-model="selectDescriptionArr" style="width:100%;margin-top:10px">
                 <a-list bordered :data-source="descriptionListCheck" style="width:100%;max-height: 450px;overflow:auto">
                     <a-list-item slot="renderItem" slot-scope="item, index">
                         <a-checkbox :value="item.copy_writer">
@@ -2741,6 +2795,7 @@ export default {
             formOriginality: this.$form.createForm(this), //创意表单
             formMaterial: this.$form.createForm(this), //素材表单
             sumbitLoading: false,
+            siteList: [],
             //基本信息参数
             formInformationVisible: false,
             formInformaData: null,
@@ -2757,7 +2812,7 @@ export default {
             uriCheck: false, //调起链接,是否开启
             multipleBidDataDrawer: [],
             multipleBidData: [],
-            appDetail: null,
+            appDetail: { useChannel: false },
             appDetailMiddle: null,
             personLoading: false,
             useChannel: false,
@@ -2823,7 +2878,7 @@ export default {
             //优化目标参数
             groupTypeData: {},
             //创意信息参数
-            optimizeVisible: true,
+            optimizeVisible: false,
             adposition: 1,
             programUnitCnt: 60,
             customUnitCnt: 400,
@@ -2865,9 +2920,9 @@ export default {
                 { title: '选择项目' },
                 // { title: '设置基本信息' },
                 { title: '优化目标' },
-
-                { title: '目标人群' },
                 { title: '目标应用' },
+                { title: '目标人群' },
+
                 { title: '创意信息' },
                 { title: '素材信息' }
             ],
@@ -2999,6 +3054,38 @@ export default {
     },
     methods: {
         moment,
+        changeAccount() {
+            // formProject: this.$form.createForm(this), //选择项目表单
+            // formInformation: this.$form.createForm(this), //设置基本信息表单
+            // formTargetApp: this.$form.createForm(this), //目标应用编辑表单
+            // formOptimize: this.$form.createForm(this), //优化目标表单
+            // formOriginality: this.$form.createForm(this), //创意表单
+            // formMaterial: this.$form.createForm(this), //素材表单
+            if (this.$route.query.id) {
+            } else {
+                this.formProject.resetFields()
+                this.formOptimize.resetFields()
+                this.formMaterial.resetFields()
+                this.formInformation.resetFields()
+                this.formOriginality.resetFields()
+                this.formInformaData = null
+                this.appDetail = { useChannel: false }
+                this.multipleBidDataDrawer = []
+                this.multipleBidData = []
+                this.checkPerson = []
+                this.checkPersonAll = []
+                this.checkPersonElse = []
+                this.checkPersonOne = ''
+                this.showCheckPerson = []
+                this.budgetType = '1'
+                this.dayBudgetType = '1'
+                this.useChannel = false
+                this.channelData = null
+                this.showCreativeData = null
+                this.formInformaData = null
+                this.descriptionList = [{ value: '' }]
+            }
+        },
         importExcel() {
             this.importExcelVisible = true
         },
@@ -3092,6 +3179,17 @@ export default {
                 this.convertId = ''
             }
         },
+        getPageList(appId) {
+            this.getAction('/kuaishou/batch/getPageList', {
+                accountId: this.getFormData('formProject', 'accountId'),
+                appId: appId,
+                viewComp: 7
+            }).then(res => {
+                if (res.success) {
+                    this.siteList = res.result
+                }
+            })
+        },
         getPlatForm(appId) {
             if (appId) {
                 var data = this.appList.filter(item => {
@@ -3196,26 +3294,6 @@ export default {
                 this.channelData = null
             }
         },
-        test() {
-            // this.formProject.validateFields((err, values) => {
-            //     console.log(values)
-            // })
-            // this.formInformation.validateFields((err, values) => {
-            //     console.log(values)
-            // })
-            this.formOptimize.validateFields((err, values) => {
-                console.log(values)
-            })
-            // this.formMaterial.validateFields((err, values) => {
-            //     console.log(values)
-            // })
-            //  formProject: this.$form.createForm(this), //选择项目表单
-            //             formInformation: this.$form.createForm(this), //设置基本信息表单
-            //             formTargetApp: this.$form.createForm(this), //目标应用编辑表单
-            //             formOptimize: this.$form.createForm(this), //优化目标表单
-            //             formOriginality: this.$form.createForm(this), //创意表单
-            //             formMaterial: this.$form.createForm(this), //素材表单
-        },
         getQueryById(id) {
             this.getAction('/auto/aiKuaishouAccountAutoStrategy/queryById', { id }).then(res => {
                 if (res.success) {
@@ -3246,7 +3324,9 @@ export default {
                             campaignName: data.campaignName,
                             groupName: data.groupName,
                             campaignDayBudget: data.campaignDayBudget ? data.campaignDayBudget / 1000 : undefined,
-                            unitDayBudget: data.unitDayBudget ? data.unitDayBudget / 1000 : undefined
+                            unitDayBudget: data.unitDayBudget ? data.unitDayBudget / 1000 : undefined,
+                            groupStatus: data.groupStatus > -1 ? data.groupStatus : 1,
+                            campaignStatus: data.campaignStatus ? data.campaignStatus : 1
                         }
 
                         if (data.campaignDayBudget && data.campaignDayBudget > 0) {
@@ -3361,21 +3441,30 @@ export default {
                             'creativeTag'
                         )
                         // this.appDetail = { platformOs: data.platformOs, singleAppid: 1 }
+                        this.useChannel = res.result.useChannel ? (res.result.useChannel == 1 ? true : false) : false
                         this.postDataAction('/kuaishou/kuaiShouAppList/getAppNames', {
                             appIdArray: JSON.parse(data.appIdArray)
                         }).then(result => {
                             if (result.success) {
-                                this.multipleBidData = result.result
+                                this.multipleBidData = result.result.map(item => {
+                                    return {
+                                        ...item,
+                                        impressionUrl: data.impressionUrl,
+                                        clickTrackUrl: data.clickTrackUrl,
+                                        actionbarClickUrl: data.actionbarClickUrl,
+                                        adPhotoPlayedT3sUrl: data.adPhotoPlayedT3sUrl
+                                    }
+                                })
                                 this.appDetail = {
                                     platformOs: result.result[0].platform < 3 ? 1 : 2,
                                     singleAppid: 1,
                                     appId: { key: result.result[0].appId },
                                     schemaUri: res.result.schemaUri,
-                                    useChannel: this.useChannel
+                                    useChannel: this.useChannel,
+                                    siteId: data.siteId
                                 }
                             }
                         })
-                        this.useChannel = res.result.useChannel ? (res.result.useChannel == 1 ? true : false) : false
 
                         if (this.useChannel) {
                             var paramsData = {}
@@ -3401,6 +3490,8 @@ export default {
                                 })
                             })
                         }
+
+                        this.getPageList(data.appId)
                         this.checkPerson = JSON.parse(data.autoTargetArray)
                         this.checkPersonElse = JSON.parse(data.autoTargetArray)
                         if (data.autoTargetArray) {
@@ -3490,7 +3581,7 @@ export default {
                 type: 1
             }).then(res => {
                 if (res.success) {
-                    Promise.all([formProjectData, formInformationData, formOptimizeData, formMaterialData])
+                    Promise.all([formProjectData, formOptimizeData, formMaterialData])
                         .then(res => {
                             if (
                                 !this.showCreativeData ||
@@ -3505,7 +3596,6 @@ export default {
                                 ...res[0],
                                 ...res[1],
                                 ...res[2],
-                                ...res[3],
                                 ...this.showCreativeData,
                                 ...this.formInformaData
                             }
@@ -3591,7 +3681,7 @@ export default {
                                 this.postDataAction('/auto/aiKuaishouAccountAutoStrategy/edit', params).then(res => {
                                     if (res.success) {
                                         this.sumbitLoading = false
-                                        window.close()
+                                        // window.close()
                                     } else {
                                         this.sumbitLoading = false
                                         this.$message.error('创建失败')
@@ -3601,7 +3691,7 @@ export default {
                                 this.postDataAction('/auto/aiKuaishouAccountAutoStrategy/add', params).then(res => {
                                     if (res.success) {
                                         this.sumbitLoading = false
-                                        window.close()
+                                        // window.close()
                                     } else {
                                         this.sumbitLoading = false
                                         this.$message.error(res.message)
@@ -3677,8 +3767,8 @@ export default {
                         return
                     }
                     this.showCreativeData = JSON.parse(JSON.stringify(values))
-                    console.log(values, this.showCreativeData)
                     this.optimizeVisible = false
+                    this.formOriginality.resetFields()
                     // this.closeCreative()
                 }
             })
@@ -3880,11 +3970,20 @@ export default {
                 if (this.appDetail.schemaUri) {
                     this.uriCheck = true
                 }
+                if (this.channelData && this.channelData.channel.isHaveItem) {
+                    this.useChannel = true
+                }
                 this.appDetailMiddle = JSON.parse(JSON.stringify(this.appDetail))
                 this.$nextTick(() => {
                     this.formTargetApp.setFieldsValue({ ...this.appDetailMiddle })
 
                     this.multipleBidDataDrawer = JSON.parse(JSON.stringify(this.multipleBidData))
+                    setTimeout(() => {
+                        this.formTargetApp.setFieldsValue({ useAppMarket: this.appDetailMiddle.useAppMarket })
+                    }, 100)
+                    setTimeout(() => {
+                        this.formTargetApp.setFieldsValue({ appStore: this.appDetailMiddle.appStore })
+                    }, 200)
                 })
             }
             this.getAppList()
@@ -3898,6 +3997,10 @@ export default {
                     this.multipleBidData = JSON.parse(JSON.stringify(this.multipleBidDataDrawer))
                     this.targetAppVisible = false
                     this.multipleBidDataDrawer = []
+
+                    this.checkPersonElse = []
+                    this.checkPerson = []
+                    this.showCheckPerson = []
                     this.closeUnit()
                 } else {
                 }
@@ -3921,7 +4024,9 @@ export default {
                     this.budgetType = this.formInformaData.budgetType
                     this.dayBudgetType = this.formInformaData.dayBudgetType
                     setTimeout(() => {
-                        this.formInformation.setFieldsValue(pick(this.formInformaData, 'campaignName', 'groupName'))
+                        this.formInformation.setFieldsValue(
+                            pick(this.formInformaData, 'campaignName', 'groupName', 'campaignStatus', 'groupStatus')
+                        )
                     }, 100)
                     if (this.budgetType == '2') {
                         setTimeout(() => {
@@ -3950,6 +4055,7 @@ export default {
                     var data = { ...values, budgetType: this.budgetType, dayBudgetType: this.dayBudgetType }
                     this.formInformaData = JSON.parse(JSON.stringify(data))
                     this.formInformationVisible = false
+                    this.formInformation.resetFields()
                 }
             })
         },
@@ -3959,9 +4065,6 @@ export default {
             // })
         },
         appIdChange(val) {
-            // this.siteList = []
-            // this.getPageList(val)
-            this.multipleBidDataDrawer = []
             if (this.getFormData('formTargetApp', 'singleAppid') == 0) {
                 if (val && val.findIndex(item => item.key === 0) > -1) {
                     let appidArr = this.appList.map(item => {
@@ -4035,6 +4138,9 @@ export default {
             } else {
                 if (val) {
                     this.$nextTick(() => {
+                        this.siteList = []
+                        this.getPageList(val.key)
+                        this.multipleBidDataDrawer = []
                         // this.multipleBidDataDrawer = this.appList.filter(item => {
                         //     return item.id === val.key
                         // })
@@ -4076,20 +4182,43 @@ export default {
             if (target) {
                 target[dataIndex] = value
                 this.multipleBidDataDrawer = dataSource
-                let params = { id: key }
+                let params = { accountId: this.getFormData('formProject', 'accountId') }
                 if (dataIndex == 'impressionUrl') {
                     params.impressionUrl = value
-                } else if (dataIndex == 'tracUrl') {
-                    params.tracUrl = value
+                } else if (dataIndex == 'clickTrackUrl') {
+                    params.clickTrackUrl = value
+                } else if (dataIndex == 'actionbarClickUrl') {
+                    params.actionbarClickUrl = value
+                } else if (dataIndex == 'adPhotoPlayedT3sUrl') {
+                    params.adPhotoPlayedT3sUrl = value
                 }
-                this.postDataAction('/kuaishouAppPackage/edit', params).then(res => {
+                this.postDataAction('/auto/aiKuaishouAccountAutoStrategy/updateAppUrl', params).then(res => {
                     if (res.success) {
                         console.log(res)
                     }
                 })
             }
         },
-        addApplication() {},
+        addApplication() {
+            if (this.getFormData('formProject', 'accountId')) {
+                this.tongbuLoading = true
+                // this.$refs.application.showApplication()
+                this.getAction('/kuaishou/batch/syncAppList', {
+                    accountId: this.getFormData('formProject', 'accountId')
+                }).then(res => {
+                    if (res.success) {
+                        this.tongbuLoading = false
+                        this.$message.success(res.message)
+                        this.getAppList()
+                    } else {
+                        this.tongbuLoading = false
+                        this.$message.error(res.message)
+                    }
+                })
+            } else {
+                this.$message.error('请先选择账户')
+            }
+        },
         changeType(e) {
             console.log(e.target.value)
             this.appList = []
@@ -4200,7 +4329,7 @@ export default {
         closePerson(form) {
             this.targetPersonVisible = false
             this.sumContent = 0
-            if (this.showCheckPerson.lenght > 0) {
+            if (this.showCheckPerson.length > 0) {
             } else {
                 this.checkPersonAll = []
                 this.checkPersonElse = []
@@ -4222,6 +4351,10 @@ export default {
                     params.ids = id
                     that.getAction('/auto/aiKuaishouAccountAutoTarget/deleteBatch', params).then(res => {
                         if (res.success) {
+                            var index = that.checkPerson.findIndex(item => item.id == id)
+                            if (index > -1) {
+                                that.checkPerson.splice(index, 1)
+                            }
                             that.getTargetPerson()
                         } else {
                             that.$message.error(res.messsage)
@@ -4235,46 +4368,52 @@ export default {
             this.$refs.templateModal.create(this.getFormData('formProject', 'accountId'), 'add')
         },
         getTargetPerson() {
-            let params = {}
-            params.pageSize = this.ipagination.pageSize
-            params.pageNo = this.ipagination.current
-            params.accountId = this.getFormData('formProject', 'accountId')
-            params.targetName = this.searchTemplate == '' ? null : this.searchTemplate
-            this.getAction('/auto/aiKuaishouAccountAutoTarget/list', params).then(res => {
-                if (res.success) {
-                    this.personList = res.result.list.map(item => {
-                        return {
-                            ...item,
-                            regionName: []
-                        }
-                    })
-                    for (let i = 0; i < this.personList.length; i++) {
-                        if (
-                            this.personList[i] &&
-                            (this.personList[i].region == '' ||
-                                this.personList[i].region == null ||
-                                JSON.parse(this.personList[i].region).length == 0)
-                        ) {
-                        } else {
-                            // this.showRegion(this.personList[i].region, this.personList[i].regionName)
-                            let that = this
-                            new Promise((resolve, reject) => {
-                                this.postDataAction('/kuaishou/batch/getRegionDetail', {
-                                    regionArr: that.personList[i].region
-                                }).then(res => {
-                                    if (res.success) {
-                                        //   this.populationData.allForm.region = res.result
-                                        that.personList[i].regionName = res.result.map(item => {
-                                            return item.label
-                                        })
-                                    }
+            if (this.appDetail.platformOs) {
+                let params = {}
+                params.pageSize = this.ipagination.pageSize
+                params.pageNo = this.ipagination.current
+                params.accountId = this.getFormData('formProject', 'accountId')
+                params.targetName = this.searchTemplate == '' ? null : this.searchTemplate
+                params.platformOs = this.appDetail ? this.appDetail.platformOs : '1'
+
+                this.getAction('/auto/aiKuaishouAccountAutoTarget/list', params).then(res => {
+                    if (res.success) {
+                        this.personList = res.result.list.map(item => {
+                            return {
+                                ...item,
+                                regionName: []
+                            }
+                        })
+                        for (let i = 0; i < this.personList.length; i++) {
+                            if (
+                                this.personList[i] &&
+                                (this.personList[i].region == '' ||
+                                    this.personList[i].region == null ||
+                                    JSON.parse(this.personList[i].region).length == 0)
+                            ) {
+                            } else {
+                                // this.showRegion(this.personList[i].region, this.personList[i].regionName)
+                                let that = this
+                                new Promise((resolve, reject) => {
+                                    this.postDataAction('/kuaishou/batch/getRegionDetail', {
+                                        regionArr: that.personList[i].region
+                                    }).then(res => {
+                                        if (res.success) {
+                                            //   this.populationData.allForm.region = res.result
+                                            that.personList[i].regionName = res.result.map(item => {
+                                                return item.label
+                                            })
+                                        }
+                                    })
                                 })
-                            })
+                            }
                         }
+                        this.ipagination.total = res.result.total
                     }
-                    this.ipagination.total = res.result.total
-                }
-            })
+                })
+            } else {
+                this.$message.error('请先选择应用')
+            }
         },
         showRegion(data, name) {
             return new Promise((resolve, reject) => {
@@ -4307,11 +4446,15 @@ export default {
 
             this.$nextTick(() => {
                 if (this.showCreativeData) {
-                    if (this.showCreativeData.unitType === 7) {
-                        this.imageCntMax = 8
-                    } else {
-                        this.imageCntMax = 15
-                    }
+                    // if (this.showCreativeData.unitType === 7) {
+                    //     this.imageCntMax = 8
+                    // } else {
+                    //     this.imageCntMax = 15
+                    // }
+                    this.customUnitCntMax = 400
+                    this.imageCntMax = 300
+                    this.unitCntMax = 600
+                    this.creativeCntMax = 15
                     this.formOriginality.setFieldsValue(this.showCreativeData)
                 }
             })