Explorar el Código

'暂存规则配置的修改'

魏志佳 hace 4 años
padre
commit
5d5b5798d2

+ 1 - 1
src/views/modules/Statistics/newPlanStatic/newPlanStatic.vue

@@ -229,7 +229,7 @@
                     <a-radio :value="1">
                         广告计划
                     </a-radio>
-                    <a-radio :value="2">
+                    <a-radio :value="2" v-show="tabKey==2">
                         广告组
                     </a-radio>
                     

+ 351 - 143
src/views/modules/autoLaunch/configLaunchInfo.vue

@@ -50,17 +50,41 @@
             <div class="moduler-title">请设置基本信息</div>
             
             <div class="row-item">
-            <div class="hint-item"> </div>
-            <div class="label-item">
-              <div class="text-item">策略名称</div>
-              <div class="required-item"></div>
-            </div>
-            <div class="input-item">
-              <a-form-item>                
-                <a-input v-model="strategyName"   allow-clear />
-               </a-form-item>
-            </div>
-          </div>  
+                <div class="hint-item"> </div>
+                <div class="label-item">
+                <div class="text-item">模板名称</div>
+                <div class="required-item"></div>
+                </div>
+                <div class="input-item">
+                <a-form-item>                
+                    <a-input v-model="strategyName"   allow-clear />
+                </a-form-item>
+                </div>
+            </div>  
+            <div class="row-item">
+                <div class="hint-item"> </div>
+                <div class="label-item">
+                <div class="text-item">计划命名规范</div>
+                <div class="required-item"></div>
+                </div>
+                <div class="input-item">
+                <a-form-item>                
+                    <a-input v-decorator="['campaignName',{ rules: [{ required: true, message: '请填写计划的命名规则' }] }]"  allow-clear />
+                </a-form-item>
+                </div>
+            </div>  
+            <div class="row-item">
+                <div class="hint-item"> </div>
+                <div class="label-item">
+                <div class="text-item">组命名规范</div>
+                <div class="required-item"></div>
+                </div>
+                <div class="input-item">
+                <a-form-item>                
+                    <a-input v-decorator="['groupName',{ rules: [{ required: true, message: '请填写组的命名规则' }] }]"  allow-clear />
+                </a-form-item>
+                </div>
+            </div>  
             
         </div>
         <div class="moduler">
@@ -82,7 +106,7 @@
                         
                         </div>
                     </div>
-                    <div class="row-item" v-if="strategyInfo.marketingGoal=='2'||strategyInfo.marketingGoal=='7'">
+                    <div class="row-item" v-if="getFormData('marketingGoal')=='2'||getFormData('marketingGoal')=='7'">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">选择应用</div>
@@ -104,7 +128,7 @@
                         
                         </div>
                     </div>
-                    <div class="row-item" v-if="strategyInfo.marketingGoal == '3'">
+                    <div class="row-item" v-if="getFormData('marketingGoal') == '3'">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">转化类型</div>
@@ -121,21 +145,21 @@
                         
                         </div>
                     </div>
-                    <div class="row-item" v-if="strategyInfo.marketingGoal == '3'||strategyInfo.marketingGoal == '4'||strategyInfo.marketingGoal == '5'">
+                    <div class="row-item" v-if="getFormData('marketingGoal') == '3'||getFormData('marketingGoal') == '4'||getFormData('marketingGoal') == '5'">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">链接</div>
                         <!-- <div class="required-item"></div> -->
                         </div>
                         <div class="input-item">
-                            <a-form-item v-if="strategyInfo.marketingGoal != 2" :class="{ 'else-label': strategyInfo.marketingGoal == 3 }">
+                            <a-form-item v-if="getFormData('marketingGoal') != 2" :class="{ 'else-label': getFormData('marketingGoal') == 3 }">
                                 <a-input placeholder="请填写链接" v-decorator="['url', { rules: [{ required: true,message:'链接不能为空'}] }]" />
                             </a-form-item>
                         
                         </div>
                     </div>
 
-                    <div class="row-item" v-if="strategyInfo.marketingGoal == 2||strategyInfo.marketingGoal == 4||strategyInfo.marketingGoal == 5">
+                    <div class="row-item" v-if="getFormData('marketingGoal') == 2||getFormData('marketingGoal') == 4||getFormData('marketingGoal') == 5">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">转化追踪</div>
@@ -326,9 +350,9 @@
             <div class="ad-range2" v-if="useDirectional==0">
                 <div style="position:relative" class="ad-range2-title">
                     <span>当前选择模板数量:{{directionalCheckedList.length}}</span>
-                    <!-- <a-checkbox :indeterminate="indeterminateDirectional" :checked="checkAllDirectional" @change="onCheckAllDirectionalChange" class="quanxuanDirectional">
+                    <a-checkbox :indeterminate="indeterminateDirectional" :checked="checkAllDirectional" @change="onCheckAllDirectionalChange" class="quanxuanDirectional">
                     <span>点击全选</span>
-                    </a-checkbox>    -->
+                    </a-checkbox>   
                 </div>
                 
                 <a-spin :spinning="directionalSpinning">   
@@ -463,9 +487,9 @@
 
                                 <a-select-option :value="2">行为数</a-select-option>
                                 <a-select-option :value="180"
-                                v-if="strategyInfo.marketingGoal == '2' && groupTypeData.isActivate == '1'">激活</a-select-option>
+                                v-if="getFormData('marketingGoal') == '2' && groupTypeData.isActivate == '1'">激活</a-select-option>
                                 <a-select-option :value="53" v-if="
-                                    (strategyInfo.marketingGoal == '4' || strategyInfo.marketingGoal == '5') && groupTypeData.isFormSubmit == '1'
+                                    (getFormData('marketingGoal') == '4' || getFormData('marketingGoal') == '5') && groupTypeData.isFormSubmit == '1'
                                 ">表单提交</a-select-option>
 
                                 <a-select-option :value="394" v-if="
@@ -553,7 +577,7 @@
                         </div>    
                     </div>
                     
-                    <div class="row-item" v-if="getFormData('bidType')==10&&strategyInfo.scenes=='2'">
+                    <div class="row-item" v-if="getFormData('bidType')==10&&getFormData('scenes')=='2'">
                         <div class="hint-item">
                         </div>
                         <div class="label-item">
@@ -577,7 +601,7 @@
                                 >请输入点击出价,不少于0.1元,不超过10000元</span>
                         </div>    
                     </div>
-                    <div class="row-item" v-if="getFormData('bidType')==10&&strategyInfo.scenes=='1'">
+                    <div class="row-item" v-if="getFormData('bidType')==10&&getFormData('scenes')=='1'">
                         <div class="hint-item">
                         </div>
                         <div class="label-item">
@@ -605,7 +629,7 @@
                                
                         </div>    
                     </div>
-                    <div class="row-item" v-if="getFormData('bidType')==10&&strategyInfo.scenes=='1'">
+                    <div class="row-item" v-if="getFormData('bidType')==10&&getFormData('scenes')=='1'">
                         <div class="hint-item">
                         </div>
                         <div class="label-item">
@@ -755,20 +779,42 @@
                         </a-form-item>
                         </div>
                     </div>
+                    <div class="row-item"  v-if="whiteList.actionbar_click_url_switch">
+                        <div class="hint-item"></div>
+                        <div class="label-item">
+                        <div class="text-item">第三方ActionBar点击监控链接</div>
+                        <!-- <div class="required-item"></div> -->
+                        </div>
+                        <div class="input-item">
+                            <a-form-item  >
+                                <a-input
+                                v-decorator="[
+                                    'actionbarClickUrl',
+                                    {
+                                        rules: [{ message: '请输入第三方点击监控链接' }],
+                                    },
+                                ]"
+                                placeholder="请输入第三方点击监控链接"
+                                >
+                                </a-input>
+                                <span style="color: red; position: relative; top: -10px">仅加白使用</span>
+                            </a-form-item>        
+                        </div>
+                    </div>
                     <div class="row-item">
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">创意分类</div>
-                        <!-- <div class="required-item"></div> -->
+                        <div class="required-item" v-show="whiteList.creative_category_switch"></div>
                         </div>
                         <div class="input-item">
-                        <a-form-item>
+                        <a-form-item >
                             <a-cascader
                                 :options="createOptions"
-                                v-decorator="['creativeCategory']"
+                                v-decorator="['creativeCategory',{ rules: [{ required: whiteList.creative_category_switch, message: '创意分类必填' }] }]"
                                 :fieldNames="fieldNames"
                                 placeholder="请选择创意分类"
-                                style="width:300px"
+                                
                             />
                         </a-form-item>
                         </div>
@@ -777,7 +823,7 @@
                         <div class="hint-item"></div>
                         <div class="label-item">
                         <div class="text-item">创意标签</div>
-                        <!-- <div class="required-item"></div> -->
+                        <div class="required-item" v-show="whiteList.creative_category_switch"></div>
                         </div>
                         <div class="input-item">
                         <a-form-item>
@@ -794,17 +840,104 @@
                         </a-form-item>
                         </div>
                     </div>
+                    <div class="row-item">
+                        <div class="hint-item"></div>
+                        <div class="label-item">
+                        <div class="text-item">行动号召</div>
+                        <div class="required-item"></div>
+                        </div>
+                        <div class="input-item">
+                            <a-form-item >
+                                <a-select
+                                v-decorator="['actionBarText', { rules: [{ required: true, message: '请选择行动号召按钮文案' }] }]"
+                                showSearch
+                                allowClear
+                                placeholder="选择行动号召按钮文案"
+                                optionFilterProp="children"
+                                :filterOption="filterOption"
+                                >
+                                <a-select-option v-for="appModel in actionBarTextList" :key="appModel.id" :value="appModel.actionBarText">
+                                    {{ appModel.actionBarText }}
+                                </a-select-option>
+                                </a-select>
+                            </a-form-item>
+                        
+                        </div>
+                    </div>
+                    <div class="row-item">
+                        <div class="hint-item"></div>
+                        <div class="label-item">
+                        <div class="text-item">关联封面数</div>
+                        <div class="required-item"></div>
+                        </div>
+                        <div class="input-item">
+                            <a-form-item >
+                                <a-input-number
+                                    style="width:200px"
+                                    :max="20"
+                                    :step="1"
+                                    v-decorator="['imageCnt',{ rules: [{ required: true, message: '请填写关联封面数' }] } ]"
+                                />
+                          </a-form-item>
+                                
+                        </div>
+                    </div>
+                    <div class="row-item">
+                        <div class="hint-item"> </div>
+                        <div class="label-item">
+                        <div class="text-item">广告语</div>
+                        <div class="required-item"></div>
+                        </div>
+                        <div class="input-item">
+                        <a-form-item>  
+                            <div
+                            class="step4-else"
+                            style="
+                              display: inline-block;
+                              position: relative;
+                              border-radius: 4px;
+                              border: 1px solid #d9d9d9;
+                              width: 100%;
+                            "
+                          >              
+                            <a-textarea
+                              class="rending"
+                              placeholder="请输入广告语"
+                              v-decorator="['description',{ rules: [{ required: true, message: '请填写广告语' }] } ]"
+                              :autosize="{ minRows: 2, maxRows: 6 }"
+                              :max-length="30"
+                            ></a-textarea>
+                            <p
+                              style="
+                                font-size: 12px;
+                                color: #b6bbc7;
+                                letter-spacing: 0.3px;
+                                text-align: right;
+                                line-height: 20px;
+                                position: absolute;
+                                bottom: 0;
+                                right: 6px;
+                                width: 100%;
+                                margin-bottom: 0;
+                              "
+                            >
+                              {{ item.description.length + '/30' }}
+                            </p>
+                            </div>
+                        </a-form-item>
+                        </div>
+                    </div>  
                 </div>
              
         </div>
-      <div class="moduler">
+      <!-- <div class="moduler">
         <div class="opt">
           <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
          
           <a-button type="primary" @click="goNext"  :loading="goNextloading">下一步</a-button>
           
         </div>
-      </div>
+      </div> -->
       <div class="moduler">
                 <!-- <div class="moduler-title">计划名称</div> -->
                 <div class="opt">
@@ -841,12 +974,12 @@
         <a-form-item label="追踪方式" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
           :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }">
           <a-radio-group buttonStyle="solid" v-model="convertType" @change="convertChange">
-            <a-radio-button value="1" v-show="strategyInfo.marketingGoal == 4||strategyInfo.marketingGoal == 5">JS布玛</a-radio-button>
-            <a-radio-button value="2" v-show="strategyInfo.marketingGoal == 4||strategyInfo.marketingGoal == 5">Xpath</a-radio-button>
+            <a-radio-button value="1" v-show="getFormData('marketingGoal') == 4||getFormData('marketingGoal') == 5">JS布玛</a-radio-button>
+            <a-radio-button value="2" v-show="getFormData('marketingGoal') == 4||getFormData('marketingGoal') == 5">Xpath</a-radio-button>
             <a-radio-button value="3"
-              v-show="strategyInfo.marketingGoal == 2">应用-SDK
+              v-show="getFormData('marketingGoal') == 2">应用-SDK
             </a-radio-button>
-            <a-radio-button value="7" v-show="strategyInfo.marketingGoal == 2">应用-API</a-radio-button>
+            <a-radio-button value="7" v-show="getFormData('marketingGoal') == 2">应用-API</a-radio-button>
           </a-radio-group>
         </a-form-item>
         <a-form-item label="选择转化" :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
@@ -897,14 +1030,14 @@ import linkMultiSelect from './components/linkMultiSelect'
 import singleLayersSelecte from './components/singleLayerSelecte'
 import scheduleTime from '@/components/formComponents/toutiaoTime'
 
+// import { filter } from 'vue/types/umd';
 var str = ""
-for (let i = 0; i < 7*48; i++) {
+for (let i = 0; i < 7*24; i++) {
  str+='0'
   
 }
 
 
-
 let ageArr=[
     {
         value:'',
@@ -1019,6 +1152,8 @@ export default {
     },
     data() {
         return {
+            whiteList:{},
+            actionBarTextList:[],
             treeData:[],
             accountId:undefined,
             strategyName: '',
@@ -1149,16 +1284,35 @@ export default {
     watch: {
         accountId(newValue,oldValue){
             if(newValue){
-                this.treeData.forEach(item=>{
-                    if(item.children){
-                        item.children.forEach(ele=>{
-                            if(ele.value==newValue){
-                                this.$parent.accountInfo=ele
-                            }
-                        })
+                // this.treeData.forEach(item=>{
+                //     if(item.children){
+                //         item.children.forEach(ele=>{
+                //             if(ele.value==newValue){
+                //                 this.$parent.accountInfo=ele
+                //             }
+                //         })
+                //     }
+                // })
+                this.getAppList()
+                getAction('/kuaishou/batch/getIsActivate', {
+                    accountId: this.accountId
+                }).then(res => {
+                    if (res.success) {
+                        this.groupTypeData = res.result
+                    }
+                })
+
+                getAction('/kuaishou/batch/getCreativeCategory', {
+                    accountId:this.accountId,
+                }).then((res) => {
+                    if (res.success) {
+                        console.log(res)
+                        this.createOptions = res.result
                     }
                 })
-                console.log(this.$parent.accountInfo)
+                this.getWhiteList()
+            }else{
+
             }
         }
     },
@@ -1206,16 +1360,16 @@ export default {
 
         //获取表单的某一个属性值
         getFormData(className) {
-        return this.form.getFieldValue(className)
+            return this.form.getFieldValue(className)
         },
         dateChange(date, dateString) {
         // console.log(date,dateString)
-        this.form.getFieldDecorator('startTime')
-        this.form.getFieldDecorator('endTime')
-        this.form.setFieldsValue({
-            startTime: date[0].format('YYYY-MM-DD HH:mm'),
-            endTime:  date[1].format('YYYY-MM-DD HH:mm'),
-        })
+            this.form.getFieldDecorator('startTime')
+            this.form.getFieldDecorator('endTime')
+            this.form.setFieldsValue({
+                startTime: date[0].format('YYYY-MM-DD HH:mm'),
+                endTime:  date[1].format('YYYY-MM-DD HH:mm'),
+            })
         },
     
         //推广目的改变
@@ -1223,7 +1377,7 @@ export default {
             console.log(e.target)
             let strategyNamepart=this.marketingGoalHandle(e.target.value);
             this.strategyName ='[策略]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
-
+            this.actionBarTextList()
         },
     
         
@@ -1233,29 +1387,7 @@ export default {
             this.$bus.$emit('remove', '/autoLaunch/newStrategy')
         },
     
-        // 保存并新建创意
-        goNext() {
-        this.$nextTick(()=>{
-            if (this.strategyName) {
-                this.form.validateFields((err, values) => {
-                if (!err) {
-
-                    console.log('Received values of form: ', values)
-                    // console.log(this.strategyNames)
-                    values.accountId = this.accountId
-                    values.strategyName=this.strategyName
-                    this.$parent.strategyInfo=values;
-                    this.$parent.currentTabComponent='setDirectional'
-                }else{
-                    this.$message.error('请正确填写必填项目')
-                }
-            })
-                }else{
-                    this.$message.error('请输入策略名称')
-                }
-        })
-        
-        },
+       
         //请求项目和账户内容
         accountHttp(){
             this.treeData=[];
@@ -1322,7 +1454,11 @@ export default {
         creativeTagValid(rule, value, callback) {
             if (value.length > 10) {
                 callback('创意标签最多填写10个,请删减')
-            } else {
+            } else if(value.length == 0){
+                if(this.whiteList.creative_category_switch==1){
+                   callback('创意标签必须填写') 
+                }
+            }else {
                 callback()
             }
         },
@@ -1356,7 +1492,7 @@ export default {
         // 获取定向包
         getUserDirectional(){
             getAction('/kuaishou/batch/getDirectionalTemplate',{
-                accountId:this.accountInfo.value
+                accountId:this.accountId
             }).then(res=>{
                 console.log(res);
                 this.directionalList=res.result
@@ -1450,17 +1586,17 @@ export default {
                 this.loading=true;
                 
                     getAction('/kuaishou/batch/getPopulationList',{
-                        accountId:this.accountInfo.value
+                        accountId:this.accountId
                     }).then((res)=>{
                         // console.log(res)
                         this.loading=false;
                         if(res.success){
                             res.result.forEach((ele)=>{
-                                ele.key=this.accountInfo.value+'_'+ele.orientationId   
+                                ele.key=this.accountId+'_'+ele.orientationId   
                                 ele.id= ele.orientationId 
                                 ele.name=ele.orientationName+"("+ele.orientationId+")"
                                 ele.accountName=this.accountInfo.title
-                                ele.accountId=this.accountInfo.value               
+                                ele.accountId=this.accountId               
                             })
                             // this.retargetData=res.data;
                             this.retargetDataAll=[...this.retargetDataAll,...res.result];
@@ -1556,15 +1692,15 @@ export default {
             }
         },
         validateURL(rule, value, callback) {
-        // console.log(rule, value, callback);
+            // console.log(rule, value, callback);
 
-        if (this.IsURL(value)) {
-            callback()
-        } else if (value && !this.IsURL(value)) {
-            callback('链接地址无法访问,请正确输入')
-        } else {
-            callback('链接必须填写')
-        }
+            if (this.IsURL(value)) {
+                callback()
+            } else if (value && !this.IsURL(value)) {
+                callback('链接地址无法访问,请正确输入')
+            } else {
+                callback('链接必须填写')
+            }
         },
         validateName(rule, value, callback){
         // console.log(rule, value, callback);
@@ -1586,21 +1722,17 @@ export default {
 
     
         
-        goBack() {
-            // this.$router.replace('/autoLaunch/autoLaunchList')
-            // this.$bus.$emit('remove', '/autoLaunch/newStrategy')
-            this.$parent.currentTabComponent='createStrategy'
-        },
+        
         
         // 保存并新建创意
         goNext() {
 
         this.$nextTick(()=>{
 
-            if((!this.getFormData('creativeCategory')&&this.getFormData('creativeTag')) ||  (this.getFormData('creativeCategory')&&!this.getFormData('creativeTag')) ){
-                this.$message.error('创意分类和标签必须同时填写或者同时不填写')
-                return 
-            }
+            // if((!this.getFormData('creativeCategory')&&this.getFormData('creativeTag')) ||  (this.getFormData('creativeCategory')&&!this.getFormData('creativeTag')) ){
+            //     this.$message.error('创意分类和标签必须同时填写或者同时不填写')
+            //     return 
+            // }
             
 
             this.form.validateFields((err, values) => {
@@ -1682,25 +1814,24 @@ export default {
                     }else{
                          values.creativeCategory=null
                     }
-                    // this.$parent.currentTabComponent='previewStrategy'
-                    // this.$parent.strategyInfo={
-                    //     ...this.$parent.strategyInfo,
-                    //     ...values,
-                    // }
+                    
+                    values.accountId = this.accountId
+                    values.strategyName=this.strategyName
                     let params={
                         ...values,
-                        ...this.strategyInfo
+                        
                     }
+                    console.log(params)
                     postAction('/kuaishouStrategy/add',params).then(res=>{
                         console.log(res)
                         this.goNextloading=false
                         if(res.success){                            
-                            this.$parent.strategyInfo={}
+                            
                             this.$router.replace('/autoLaunch/autoLaunchList')
                             this.$bus.$emit('remove', '/autoLaunch/newStrategy')                            
                         }else{
                             this.$messgae.error(res.message)
-                            this.$parent.strategyInfo={}
+                            
                             this.$router.replace('/autoLaunch/autoLaunchList')
                             this.$bus.$emit('remove', '/autoLaunch/newStrategy')
                         }
@@ -1719,7 +1850,7 @@ export default {
         // 获取applist
         getAppList() {
             let params = {}
-            params.accountId = this.accountInfo.value
+            params.accountId = this.accountId
             getAction('/kuaishou/batch/getAppList', params).then(res => {
             if (res.success) {
                 this.appListAll = res.result.map((item, index) => {
@@ -1747,7 +1878,7 @@ export default {
         },
         getConvertList() {
             var params = {}
-            params.accountId = this.accountInfo.value
+            params.accountId = this.accountId
             params.type = this.convertType
             getAction('/kuaishou/batch/getConvertList', params).then(res => {
             console.log(res)
@@ -1766,7 +1897,10 @@ export default {
             this.form.setFieldsValue({
                 appIds:[],
             })
-            this.appIdChange()
+            if(this.getFormData('marketingGoal')==2 || this.getFormData('marketingGoal')==7){
+                this.appIdChange(this.getFormData('appIds'))
+            }
+            
             if(this.sysType==1){
                 this.appList=this.appListAll.filter(item=>{
                     return  (item.platform==1 || item.platform==2)
@@ -1776,6 +1910,7 @@ export default {
                     return  (item.platform==3||item.platform==4)
                 })
             }
+            
         },
         getPlatForm(appId) {
             if (appId) {
@@ -1787,7 +1922,7 @@ export default {
         },
         showConvert() {
             this.convertChange()
-            if (this.strategyInfo.marketingGoal == 2) {
+            if (this.getFormData('marketingGoal') == 2) {
                 if (this.getData('appIds')) {
                     this.convert = true;
 
@@ -1811,7 +1946,7 @@ export default {
             if(appId.length){
                 appId.forEach((item,index)=>{
                     getAction('/kuaishou/batch/getPageList', {
-                        accountId: this.accountInfo.value,
+                        accountId: this.accountId,
                         appId: item,
                         viewComp: 7,
                     }).then((res) => {
@@ -1824,6 +1959,33 @@ export default {
             }
             
         },
+
+        // 获取行动号召按钮
+        getActionBarText(){
+            this.actionBarTextList=[]
+            getAction('/kuaishou/batch/getActionBarTextByType', {
+              type:this.getFormData('marketingGoal')
+            }).then((res) => {
+            if (res.success) {
+                this.actionBarTextList = res.result
+            }
+            })
+        },
+
+        // 获取创意分类创意标签白名单
+        getWhiteList(){
+            this.whiteList={}
+             getAction('/kuaishou/batch/getWhiteList', {
+                accountId: this.accountId,
+            }).then((res) => {
+                if (res.success) {
+                    // console.log(res)
+                    if (res.result) {
+                        this.whiteList=res.result
+                    }
+                }
+            })
+        },
     },
     
     mounted() {
@@ -1833,39 +1995,7 @@ export default {
         
         
         this.strategyName ='[预设]_'+ strategyNamepart+'_' + moment().format('MM_DD_hh:mm') ;
-
-        
-        this.$nextTick(()=>{
-        if(this.$parent.strategyInfo.accountId){
-            this.form.setFieldsValue(
-                {
-                ...this.$parent.strategyInfo
-                }
-            )
-            this.accountId=this.$parent.strategyInfo.accountId
-            this.strategyName=this.$parent.strategyInfo.strategyName
-        }
-        })
-
-
-        this.getAppList()
-        getAction('/kuaishou/batch/getIsActivate', {
-            accountId: this.accountInfo.value
-        }).then(res => {
-            if (res.success) {
-                this.groupTypeData = res.result
-            }
-        })
-
-            getAction('/kuaishou/batch/getCreativeCategory', {
-            accountId:this.accountInfo.value,
-        }).then((res) => {
-            if (res.success) {
-                console.log(res)
-                this.createOptions = res.result
-            }
-        })
-        
+        this.getActionBarText()
     },
 
     filters: {
@@ -1996,6 +2126,17 @@ export default {
       margin-bottom: 20px;
     }
   }
+  .inventoryTypes{
+    .ant-checkbox-wrapper,
+    .ant-checkbox-group-item {
+        display: block;
+        padding: 5px 15px;
+    }
+
+    .ant-checkbox-wrapper:first-child {
+        padding: 0 15px 5px;
+    }
+  }
 }
 </style>
 <style lang="scss" scoped>
@@ -2015,6 +2156,45 @@ export default {
     padding: 32px 24px 48px 32px;
     border-radius: 4px;
     box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.05);
+    .ad-range2{
+        width: 680px;
+        padding: 5px 32px;
+        .ad-range2-title{
+            background: #f9f9f9;
+            // line-height: 32px;
+            // height: 32px;
+            padding: 15px 15px;
+            border: 1px solid #eaeaea;
+            border-bottom: 0;
+        }
+        .quanxuanDirectional{
+            // padding: 0 8px;
+            position: absolute;
+            right: 10px;
+            top: 15px;
+            color: #1890ff;
+        }
+         .title-list {
+            // width: calc(100% + 48px);
+            width: 100%;
+            margin: 0;
+            margin-bottom: 0;
+            padding: 0;
+            background: #fff;
+            height: 363px;
+            border: 1px solid #eaeaea;
+            overflow: scroll;
+            overflow-x: hidden;
+            // margin-top: 10px;
+        }
+        .title-list .title-item{
+            padding: 10px  30px;
+            width: 100%;
+            // height: 32px;
+            // line-height: 32px;
+            // border-bottom: 1px solid #eaeaea;
+        }
+    }
     .moduler-title {
       display: flex;
       align-items: center;
@@ -2070,6 +2250,34 @@ export default {
         font-size: 12px;
         color: tomato;
       }
+      .inventory-tags-lists-header {
+          background-color: #F8F9FA;
+          border: 1px solid #E4E9ED;
+          height: 36px;
+          line-height: 33px;
+          border-radius: 4px 4px 0 0;
+          font-weight: bold;
+          display: flex;
+        }
+
+        .inventory-tags-lists-container {
+          border: 1px solid #E4E9ED;
+          margin-top: -1px;
+          height: 100%;
+          padding: 4px 0px;
+          border-radius: 0 0 4px 4px;
+        }
+
+        .inventory-tags-lists-item {
+          width: 100%;
+          height: 37px;
+          line-height: 37px;
+          padding-left: 12px;
+          padding-right: 12px;
+          display: flex;
+          font-size: 14px;
+          color: #333;
+        }
     }
   }
   .opt {

+ 82 - 29
src/views/modules/earlyWarningRules/configRules.vue

@@ -61,8 +61,10 @@
                             <div class="required-item"></div>
                         </div>
                         <div class="input-item  extraClass" style="min-width:80%" > 
-                            <a-collapse accordion >
-                                <a-collapse-panel v-for="(item,index) in form.ruleList" :key="index" :header="item.groupName" :style="customStyle">
+                            <!-- v-model="activeKey" defaultActiveKey='0'-->
+                            <a-collapse accordion  v-model="activeKey" @change="collapseChange" ref="collapse">
+                                <template  v-for="(item,index) in form.ruleList"   >
+                                <a-collapse-panel   :header="item.groupName" :style="customStyle" >
                                     <span slot="extra">
                                          <a-popconfirm
                                             :title="`确定删除吗?`"
@@ -179,7 +181,9 @@
                                                 
                                                     <div class="rules-list-item">
                                                         <div class="rules-list-item-subject" style="width:180px">
-                                                            <a-form-model-item ref="baseIndex"  prop="baseIndex">
+                                                            <a-form-model-item ref="baseIndex"   :prop="'ruleList.'+index+'.ruleDetail.'+ind+'.baseIndex'"  :rules="[
+                                                                { required: true, message: '请选择指标', trigger: 'blur' },
+                                                            ]">
                                                                 <a-cascader
                                                                     v-model="ele.baseIndex"
                                                                     :options="rulesFieldList"
@@ -195,7 +199,9 @@
                                                         <template >
                                                         
                                                         <div class="rules-list-item-subject" >
-                                                            <a-form-model-item ref="ruleCondition"  prop="ruleCondition">
+                                                            <a-form-model-item ref="ruleCondition" :prop="'ruleList.'+index+'.ruleDetail.'+ind+'.ruleCondition'"  :rules="[
+                                                                { required: true, message: '请选择运算符', trigger: 'blur' },
+                                                            ]">
                                                                 <a-select   v-model="ele.ruleCondition" placeholder="运算符" :disabled="!!ele.ruleId">
                                                                     <a-select-option  v-for="item in ele.conditionList" :key="item.id" :value='item.ruleCondition'>{{item.conditionName}}</a-select-option>
                                                                 </a-select>
@@ -277,6 +283,8 @@
                                         </div>
                                     </div>
                                 </a-collapse-panel>
+                                </template>
+                               
                                 
                             </a-collapse>
                             <div class="add-rule" @click="addRule"> 添加规则</div>
@@ -312,7 +320,8 @@ export default {
     },
     data() {
         return {
-            tabActiveKey:[0],
+            activeKey:'0',
+            // tabActiveKey:[0],
             customStyle:'background: #f9f9fa;border-radius: 4px;margin-bottom:15px;overflow: hidden;border: 1px solid #d9d9d9;',
             conditionList:[],
             url:{
@@ -365,6 +374,7 @@ export default {
                         operate:'SEND',//预警方式
                         sendType:'Wechat',//通知方式
                     },
+                   
                 ],
             },
             rules: {
@@ -552,6 +562,9 @@ export default {
             }
             
         },
+        collapseChange(key){
+            console.log(key)
+        },
         addRule(){
             this.form.ruleList.push(
                 {
@@ -582,7 +595,10 @@ export default {
                     ]
                 },
             )
-
+            console.log(this.$refs.collapse)
+            
+            this.activeKey=(this.form.ruleList.length-1)+'';
+           
             
         },
         deleteRulesListItem(index,ind){
@@ -590,6 +606,7 @@ export default {
             this.form.ruleList[index].ruleDetail=this.form.ruleList[index].ruleDetail.filter((ele,i)=>{
                 return i!=ind
             })
+            
         },
         deleteIcon(event){
             event.stopPropagation();
@@ -607,6 +624,7 @@ export default {
                         this.form.ruleList=this.form.ruleList.filter((ele,ind)=>{
                             return ind!=index
                         })
+                        this.activeKey=(this.form.ruleList.length-1)+'';
                     }else{
                         this.$message.error(res.message)
                     }
@@ -615,6 +633,7 @@ export default {
                 this.form.ruleList=this.form.ruleList.filter((ele,ind)=>{
                     return ind!=index
                 })
+                this.activeKey=(this.form.ruleList.length-1)+'';
             }
             
         },
@@ -647,31 +666,37 @@ export default {
                     this.saveLoading=true;
 
                         if(this.currentRuleId){
-                            let ruleList=this.form.ruleList.filter(item=>{
-                                return !item.groupId
-                            })
-                            console.log(ruleList)
-                            if(ruleList.length>0){
-                                postAction(this.url.createRuleGroup,{
-                                    templateId:this.currentRuleId,
-                                    ruleList
-                                }).then(res=>{
-                                    console.log(res);
-                                    this.saveLoading=false;
-                                    if(res.success){
-                                        
-                                        this.$router.push('/earlyWarningRules/index')
-                                        this.$bus.$emit('remove', `/earlyWarningRules/configRules?id=${this.currentRuleId}`)
-                                    }else{
-                                        this.$message.error(res.message)
-                                    }
-                                    
+                            if(this.form.ruleList.length){
+                                let ruleList=this.form.ruleList.filter(item=>{
+                                    return !item.groupId
                                 })
+                                console.log(ruleList)
+                                if(ruleList.length>0){
+                                    postAction(this.url.createRuleGroup,{
+                                        templateId:this.currentRuleId,
+                                        ruleList
+                                    }).then(res=>{
+                                        console.log(res);
+                                        this.saveLoading=false;
+                                        if(res.success){
+                                            
+                                            this.$router.push('/earlyWarningRules/index')
+                                            this.$bus.$emit('remove', `/earlyWarningRules/configRules?id=${this.currentRuleId}`)
+                                        }else{
+                                            this.$message.error(res.message)
+                                        }
+                                        
+                                    })
+                                }else{
+                                    this.$router.push('/earlyWarningRules/index')
+                                    this.$bus.$emit('remove', `/earlyWarningRules/configRules?id=${this.currentRuleId}`)
+                                }
                             }else{
-                                this.$router.push('/earlyWarningRules/index')
-                                this.$bus.$emit('remove', `/earlyWarningRules/configRules?id=${this.currentRuleId}`)
+                                this.saveLoading=false;
+                                this.$message.error('模板内具体规则不能为空')
                             }
                             
+                            
                         }else{
                             postAction(this.url.creativeTemplate,this.form).then(res=>{
                                 console.log(res);
@@ -785,7 +810,7 @@ export default {
             }
 
         },
-        
+
         mediaTypeChange(e){
             console.log(e);
             this.getMediaTypeRuleField()
@@ -1089,7 +1114,7 @@ export default {
             .rules-list-item {
                 box-sizing: border-box;
                 width: 100%;
-                padding: 15px;
+                padding: 20px;
                 background: #f8f9fa;
                 border-radius: 4px;
                 margin-bottom: 16px;
@@ -1279,6 +1304,34 @@ export default {
        border: 1px solid #fff; 
        background-color: #fff;
     }
+    // .rules-list-item{
+    .ant-form-explain{
+        clear: both;
+        min-height: 22px;
+        margin-top: -2px;
+        color: rgba(0, 0, 0, 0.45);
+        font-size: 14px;
+        line-height: 1.5;
+        -webkit-transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
+        transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
+        position: absolute;
+    }
+    // }
+    
+    .has-error .ant-form-explain, .has-error .ant-form-split {
+        color: #f5222d;
+    }
+
+    .has-error .ant-form-explain, .has-error .ant-form-split {
+        color: #f5222d;
+    }
 
+    .has-error .ant-form-explain, .has-error .ant-form-split {
+        color: #f5222d;
+    }
+
+    .has-error .ant-form-explain, .has-error .ant-form-split {
+        color: #f5222d;
+    }
 }
 </style>

+ 2 - 2
src/views/modules/workBench/materialList.vue

@@ -1461,8 +1461,8 @@ export default {
 
         beforeUpload(file) {
 
-            this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
-            // this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
+            // this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
+            this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
             // this.uploadAction= `http://192.168.1.43:8088/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.materialId}&projectId=${this.currentMaterial.projectId}`
             this.loadDisabled = true
             const size = (Number(file.size) / (1024 * 1024)).toFixed(2)

+ 2 - 2
src/views/modules/workBench/orderDetail.vue

@@ -1872,9 +1872,9 @@ export default {
 
 
         beforeUpload(file) {
-            this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
+            // this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
             // this.uploadAction= `http://192.168.1.43:8088/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
-            // this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
+            this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
 
             this.loadDisabled = true
             const size = (Number(file.size) / (1024 * 1024)).toFixed(2)

+ 2 - 2
src/views/modules/workBench/placeOrder.vue

@@ -702,8 +702,8 @@ export default {
 
         beforeUpload(file) {
             // ${this.form.project}
-            this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadAttachment?projectId=${this.form.project}`
-            // this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadAttachment?projectId=${this.form.project}`
+            // this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadAttachment?projectId=${this.form.project}`
+            this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadAttachment?projectId=${this.form.project}`
             this.loadDisabled = true
             const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
             const fileName = file.name

+ 2 - 2
vue.config.js

@@ -68,7 +68,7 @@ module.exports = {
     open : true,
     proxy: {
       '/jeecg-boot': {
-         target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        //  target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
@@ -84,7 +84,7 @@ module.exports = {
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
         // target:'http://118.24.244.213:8804',
-        // target:'http://139.186.151.174:8804', //测试
+        target:'http://139.186.151.174:8804', //测试
 
         ws: false,