朱鑫波 3 лет назад
Родитель
Сommit
02066056f7

+ 2 - 1
src/filters.js

@@ -384,7 +384,8 @@ const filters = {
             3: '视频播放页广告',
             6: '上下滑大屏广告',
             7: '信息流广告',
-            5: "联盟广告"
+            5: "联盟广告",
+            24: '激励视频广告'
         }
 
         return data[val]

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

@@ -6,8 +6,8 @@
 <template>
     <div class="toutiaoBatch">
         <div class="toolbox-automate-rules-create-content_title">
-            <h3>账户配置信息</h3>
-            <a-button type="primary" @click="goNewConfigInfo(null)" class="goNewConfigInfo">新建配置信息</a-button>
+            <h3>账户配置列表</h3>
+            <a-button type="primary" @click="goNewConfigInfo(null)" class="goNewConfigInfo">创建投放策略</a-button>
         </div>
         <div class="directional-content">
             <div class="table-page-search-wrapper">

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

@@ -169,7 +169,7 @@ li:hover {
             </a-radio-group>
         </a-form-item>
 
-        <a-form-item
+        <!-- <a-form-item
             label="行为意向"
             :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
             :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
@@ -276,7 +276,7 @@ li:hover {
                 collapse-tags
                 clearable
             ></el-cascader>
-        </a-form-item>
+        </a-form-item> -->
 
         <a-form-item
             label="最低版本"

+ 20 - 6
src/views/modules/autoLaunchRevision/components/templateModal.vue

@@ -71,7 +71,15 @@
                     :wrapperCol="{ lg: { span: 12 }, sm: { span: 12 } }"
                 >
                     <a-input
-                        v-decorator="['templateName', { rules: [{ required: true, message: '模板名称必填' }] }]"
+                        v-decorator="[
+                            'templateName',
+                            {
+                                rules: [
+                                    { required: true, message: '模板名称必填' },
+                                    { min: 1, max: 30, message: '请输入1-30个字', trigger: 'blur' }
+                                ]
+                            }
+                        ]"
                     ></a-input>
                 </a-form-item>
 
@@ -178,15 +186,21 @@ export default {
 
                     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
                     this.populationData.allForm.people =
-                        dataJson.population && dataJson.excludePopulation
+                        population && excludePopulation && excludePopulation.length > 0 && population.length > 0
                             ? '3'
-                            : dataJson.population && !dataJson.excludePopulation
+                            : population &&
+                              population.length > 0 &&
+                              (!excludePopulation || excludePopulation.length == 0)
                             ? '1'
-                            : !dataJson.population && dataJson.excludePopulation
+                            : (!population || population.length == 0) &&
+                              excludePopulation &&
+                              excludePopulation.length > 0
                             ? '2'
-                            : !dataJson.population && !dataJson.excludePopulation
+                            : (!population || population.length == 0) &&
+                              (!excludePopulation || excludePopulation.length == 0)
                             ? '0'
                             : '0'
                     this.populationData.allForm.tabKey =

+ 248 - 176
src/views/modules/autoLaunchRevision/createLaunch.vue

@@ -281,7 +281,7 @@ li.chouzhen.first:before {
                                         >
                                             <a-radio-button :value="2">提升应用安装</a-radio-button>
                                             <a-radio-button :value="5" disabled>收集销售线索</a-radio-button>
-                                            <a-radio-button :value="7" disabled>提高应用活跃</a-radio-button>
+                                            <a-radio-button :value="7">提高应用活跃</a-radio-button>
                                         </a-radio-group>
                                     </a-form-item>
                                 </a-col>
@@ -431,109 +431,7 @@ li.chouzhen.first:before {
                             </a-row>
                         </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.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">
                         <span slot="title">
                             目标人群
@@ -993,6 +891,109 @@ 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
@@ -1067,12 +1068,12 @@ li.chouzhen.first:before {
                                     </span>
                                     <span v-else>-</span>
                                 </a-descriptions-item>
-                                <a-descriptions-item label="素材选取">
+                                <!-- <a-descriptions-item label="素材选取">
                                     <span v-if="showCreativeData">
                                         不限
                                     </span>
                                     <span v-else>-</span>
-                                </a-descriptions-item>
+                                </a-descriptions-item> -->
 
                                 <a-descriptions-item label="创意分类">
                                     <span v-if="showCreativeData && showCreativeData.creativeCategory">
@@ -1092,7 +1093,7 @@ li.chouzhen.first:before {
                                     </span>
                                     <span v-else>-</span>
                                 </a-descriptions-item>
-                                <a-descriptions-item label="创意标签">
+                                <a-descriptions-item label="创意标签"  :span="2">
                                     <span v-if="showCreativeData && showCreativeData.creativeTag">
                                         {{ showCreativeData.creativeTag.join() }}
                                     </span>
@@ -1156,6 +1157,7 @@ li.chouzhen.first:before {
                                             素材匹配逻辑
                                         </span>
                                         <a-radio-group
+                                            :disabled="!!$route.query.id"
                                             v-decorator="[
                                                 'matchType',
                                                 {
@@ -1178,7 +1180,7 @@ li.chouzhen.first:before {
                                         </a-radio-group>
                                     </a-form-item>
 
-                                    <a-form-item>
+                                    <a-form-item v-if="!useChannel">
                                         <span slot="label">
                                             素材关键字
                                         </span>
@@ -1187,14 +1189,6 @@ li.chouzhen.first:before {
                                             placeholder="请输入素材关键字"
                                             v-decorator="[
                                                 'materialKeyword',
-                                                {
-                                                    rules: [
-                                                        {
-                                                            required: true,
-                                                            message: '素材关键字必填'
-                                                        }
-                                                    ]
-                                                }
                                             ]"
                                             :autosize="{ minRows: 2, maxRows: 6 }"
                                         ></a-textarea>
@@ -1300,6 +1294,29 @@ li.chouzhen.first:before {
                 </a-row>
                 <a-row :gutter="16">
                     <a-col :span="16">
+                        <a-form-item label="广告计划状态">
+                            <a-radio-group
+                                v-decorator="[
+                                    'campaignStatus',
+                                    {
+                                        rules: [
+                                            {
+                                                required: true
+                                            }
+                                        ],
+                                        initialValue: '1'
+                                    }
+                                ]"
+                                button-style="solid"
+                            >
+                                <a-radio-button value="1">投放</a-radio-button>
+                                <a-radio-button value="2">暂停</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="组命名规范">
                             <a-input
                                 v-decorator="[
@@ -1316,11 +1333,14 @@ li.chouzhen.first:before {
                             <a-tag color="#2db7f5" @click="getChangeAll('素材名称', 'formInformation', 'groupName')"
                                 >+素材名称</a-tag
                             >
-                            <a-tag color="#2db7f5" @click="getChangeAll('应用名', 'formInformation', 'groupName')"
-                                >+应用名</a-tag
+                            <a-tag color="#2db7f5" @click="getChangeAll('应用名', 'formInformation', 'groupName')"
+                                >+应用名</a-tag
                             >
-                            <a-tag color="#2db7f5" @click="getChangeAll('应用标记', 'formInformation', 'groupName')"
-                                >+应用标记</a-tag
+                            <a-tag color="#2db7f5" @click="getChangeAll('定向包名', 'formInformation', 'groupName')"
+                                >+定向包名</a-tag
+                            >
+                            <a-tag color="#2db7f5" @click="getChangeAll('序号', 'formInformation', 'groupName')"
+                                >+序号</a-tag
                             >
                             <a-tag color="#2db7f5" @click="getChangeAll('创意制作方式', 'formInformation', 'groupName')"
                                 >+创意制作方式</a-tag
@@ -1352,14 +1372,14 @@ li.chouzhen.first:before {
                                         rules: [
                                             {
                                                 required: true,
-                                                message: '不小于500, 不超过100000000,仅支持输入自然数'
+                                                message: '不小于100, 不超过100000000,仅支持输入自然数'
                                             }
                                         ]
                                     }
                                 ]"
                                 style="width: 100%"
-                                placeholder="不小于500, 不超过100000000,仅支持输入自然数"
-                                :min="500"
+                                placeholder="不小于100, 不超过100000000,仅支持输入自然数"
+                                :min="100"
                                 :precision="0"
                             />
                         </a-form-item>
@@ -1441,9 +1461,13 @@ li.chouzhen.first:before {
                                 </a-tooltip>
                                 单/多应用
                             </span>
-                            <a-radio-group v-decorator="['singleAppid', { initialValue: 1 }]" button-style="solid">
+                            <a-radio-group
+                                v-decorator="['singleAppid', { initialValue: 1 }]"
+                                button-style="solid"
+                                @change="clearAppId"
+                            >
                                 <a-radio-button :value="1">单应用</a-radio-button>
-                                <a-radio-button :value="0">多应用</a-radio-button>
+                                <a-radio-button :value="0" disabled>多应用</a-radio-button>
                             </a-radio-group>
                         </a-form-item>
                     </a-col>
@@ -2141,7 +2165,7 @@ li.chouzhen.first:before {
 
         <!-- 创意信息编辑 -->
         <a-drawer
-            :width="800"
+            :width="900"
             :visible="optimizeVisible"
             :body-style="{ paddingBottom: '80px' }"
             @close="closeCreative"
@@ -2184,7 +2208,7 @@ li.chouzhen.first:before {
                                     { label: '优选广告位', value: 1 },
                                     { label: '上下滑大屏广告', value: 6 },
                                     { label: '视频播放页广告', value: 3 },
-                                    { label: '激励广告', value: 24 },
+                                    { label: '激励视频广告', value: 24 },
                                     { label: '联盟广告', value: 5 }
                                 ]"
                                 v-decorator="[
@@ -2358,30 +2382,37 @@ li.chouzhen.first:before {
                 <a-row :gutter="16">
                     <a-col :span="16">
                         <a-form-item label="广告语">
+                            <span style="color:red">
+                                广告语最多30条,超过30条的部分将被截取;
+                                <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"
                                         placeholder="请输入广告语"
                                         @change="descriptionchange(item.value, index)"
-                                        v-model.trim="item.value"
+                                        v-model="item.value"
                                         :autosize="{ minRows: 2, maxRows: 6 }"
                                         :max-length="30"
                                         style=" width: 80%;"
                                     ></a-textarea>
                                     <p
                                         style="
-                                    font-size: 12px;
-                                    color: #b6bbc7;
-                                    letter-spacing: 0.3px;
-                                    text-align: right;
-                                    line-height: 30px;
-                                    position: absolute;
-                                    bottom: 0;
-                                    left: 0;
-                                    width: 80%;
-                                    margin-bottom: 0;
-                                    "
+                                        font-size: 12px;
+                                        color: #b6bbc7;
+                                        letter-spacing: 0.3px;
+                                        text-align: right;
+                                        line-height: 30px;
+                                        position: absolute;
+                                        bottom: 0;
+                                        left: 0;
+                                        width: 80%;
+                                        margin-bottom: 0;
+                                        "
                                     >
                                         {{ item.value.length }}/30
                                         <!-- {{ getFormData('description').length  }}/30 -->
@@ -2529,6 +2560,10 @@ li.chouzhen.first:before {
             </a-table>
         </a-modal>
         <a-modal v-model="importExcelVisible" :footer="null" title="导入广告语">
+            <span style="color:red;margin-bottom:15px"
+                >最多只能输入30条广告语,从excel文档第一行开始,每行为一条,每条不能超过30字,超过后该条文案不予上传</span
+            >
+            <br />
             <a-upload
                 name="file"
                 :multiple="false"
@@ -2561,11 +2596,11 @@ li.chouzhen.first:before {
                     确定
                 </a-button>
             </template>
-            <a-checkbox-group v-model="selectDescriptionArr">
-                <a-list bordered :data-source="descriptionListCheck">
+            <a-checkbox-group v-model="selectDescriptionArr" style="width:100%">
+                <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.textCopywriter">
-                            {{ item.textCopywriter }}
+                        <a-checkbox :value="item.copy_writer">
+                            {{ item.copy_writer }}
                         </a-checkbox>
                     </a-list-item>
                 </a-list>
@@ -2614,6 +2649,13 @@ let fansStarOptions = []
 let interestVideoOptions = []
 let TTcolumns = [
     {
+        title: '渠道号',
+        dataIndex: 'channelCode',
+        scopedSlots: { customRender: 'channelCode' },
+        align: 'center',
+        key: 'channelCode'
+    },
+    {
         title: '渠道号名称',
         dataIndex: 'channelName',
         scopedSlots: { customRender: 'channelName' },
@@ -2781,7 +2823,7 @@ export default {
             //优化目标参数
             groupTypeData: {},
             //创意信息参数
-            optimizeVisible: false,
+            optimizeVisible: true,
             adposition: 1,
             programUnitCnt: 60,
             customUnitCnt: 400,
@@ -2823,9 +2865,9 @@ export default {
                 { title: '选择项目' },
                 // { title: '设置基本信息' },
                 { title: '优化目标' },
-                { title: '目标应用' },
-                { title: '目标人群' },
 
+                { title: '目标人群' },
+                { title: '目标应用' },
                 { title: '创意信息' },
                 { title: '素材信息' }
             ],
@@ -2962,27 +3004,41 @@ export default {
         },
         selectDescription() {
             this.selectDescriptionVisible = true
+            this.selectDescriptionArr = []
             this.getDescriptionList()
         },
         okDescription() {
-            var data = this.selectDescriptionArr.map(item => {
-                return { value: item }
-            })
-            if (this.descriptionList[0].value == '') {
-                this.descriptionList = data
+            if (this.selectDescriptionArr.length > 0) {
+                var data = this.selectDescriptionArr.map(item => {
+                    return { value: item }
+                })
+                if (this.descriptionList[0].value == '') {
+                    this.descriptionList = data
+                } else {
+                    for (let index = 0; index < this.descriptionList.length; index++) {
+                        if (this.descriptionList[index].value == '') {
+                            this.descriptionList.splice(index, 1)
+                        }
+                    }
+                    this.descriptionList.push(...data)
+                }
+                this.descriptionList.splice(30)
+                this.selectDescriptionVisible = false
             } else {
-                this.descriptionList.push(...data)
+                this.$message.error('请选择广告语')
             }
         },
         getDescriptionList() {
             var params = {}
-            params.accountIds = JSON.stringify([this.getFormData('formProject', 'accountId')])
+            params.accountIds = this.getFormData('formProject', 'accountId')
             params.Keywords = null
             params.pageNumber = 1
-            params.pageSize = 50
+            params.pageSize = 1000
 
             this.getAction('/document/library/getDocumentList', params).then(res => {
-                console.log(res)
+                if (res.success) {
+                    this.descriptionListCheck = res.result.list || []
+                }
             })
         },
         beforeUpload(file) {
@@ -2998,13 +3054,25 @@ export default {
                 if (res.code === 200) {
                     //   console.log(res)
                     var data = res.result.map(item => {
-                        return { value: item }
+                        return {
+                            value: item
+                                .replace(/\s*/g, '')
+                                .trim()
+                                .substring(0, 30)
+                        }
                     })
+
                     if (this.descriptionList[0].value == '') {
                         this.descriptionList = data
                     } else {
+                        for (let index = 0; index < this.descriptionList.length; index++) {
+                            if (this.descriptionList[index].value == '') {
+                                this.descriptionList.splice(index, 1)
+                            }
+                        }
                         this.descriptionList.push(...data)
                     }
+                    this.descriptionList.splice(30)
                     this.importExcelVisible = false
                 } else {
                     this.$message.error(res.message)
@@ -3556,7 +3624,7 @@ export default {
                         .catch(err => {
                             this.$message.error('请填写完整')
                         })
-                }else{
+                } else {
                     this.$message.error(res.message)
                 }
             })
@@ -3565,9 +3633,9 @@ export default {
             window.close()
         },
         descriptionchange(val, index) {
-            let data = val
+            console.log(val)
             this.$nextTick(() => {
-                this.descriptionList[index].value = data.replace(/\s/g, '')
+                this.descriptionList[index].value = val.replace(/\s*/g, '').trim()
             })
         },
         addDescription() {
@@ -3741,18 +3809,9 @@ export default {
                     1
                 )
             }
-            // for (let i = 0; i < this.ipagination.current; i++) {
-            //     this.checkPersonAll.push([])
-            // }
-            // this.checkPersonAll[this.ipagination.current - 1] = data
-
-            // var sum = 0
-            // for (let i = 0; i < this.checkPersonAll.length; i++) {
-            //     sum += this.checkPersonAll[i].length
-            // }
 
             this.sumContent = this.checkPersonElse.length
-            var dataCount = 20
+            var dataCount = 10
             if (this.sumContent > dataCount) {
                 this.$message.error('最多选择' + dataCount + '个定向')
                 this.checkPerson.pop()
@@ -3894,6 +3953,11 @@ export default {
                 }
             })
         },
+        clearAppId() {
+            // this.formTargetApp.setFieldsValue({
+            //     appId: undefined
+            // })
+        },
         appIdChange(val) {
             // this.siteList = []
             // this.getPageList(val)
@@ -4149,14 +4213,22 @@ export default {
             this.$refs.templateModal.handleOk(params, 'edit')
         },
         deleteNewTemplate(id) {
-            var params = {}
-            params.ids = id
-            this.getAction('/auto/aiKuaishouAccountAutoTarget/deleteBatch', params).then(res => {
-                if (res.success) {
-                    this.getTargetPerson()
-                } else {
-                    this.$message.error(res.messsage)
-                }
+            var that = this
+
+            this.$confirm({
+                title: '是否删除此定向包?',
+                onOk() {
+                    var params = {}
+                    params.ids = id
+                    that.getAction('/auto/aiKuaishouAccountAutoTarget/deleteBatch', params).then(res => {
+                        if (res.success) {
+                            that.getTargetPerson()
+                        } else {
+                            that.$message.error(res.messsage)
+                        }
+                    })
+                },
+                onCancel() {}
             })
         },
         addNewTemplate() {

+ 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:7701', //请求本地 需要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,