فهرست منبع

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-vue

魏志佳 4 سال پیش
والد
کامیت
651bcc5de9

+ 1 - 0
src/views/modules/advertiser/modules/projectListModal.vue

@@ -107,6 +107,7 @@
                 <a-select-option :value="191">首日ROI</a-select-option>
                 <a-select-option :value="396">注册优化目标</a-select-option>
                 <a-select-option :value="717">广告观看事件</a-select-option>
+                <a-select-option :value="700">唤起应用</a-select-option>
               </a-select>
             </a-form-item>
           </div>

+ 49 - 10
src/views/modules/earlyWarningRules/configRules.vue

@@ -21,8 +21,8 @@
                         </div>
                         <div class="input-item"> 
                              <a-form-model-item ref="eventRuleLevel"  prop="eventRuleLevel">
-                                <a-radio-group v-model="form.mediaType" >
-                                    <!-- <a-radio-button :value="1" >头条</a-radio-button> -->
+                                <a-radio-group v-model="form.mediaType" :disabled="form.templateId!=null">
+                                    <a-radio-button :value="1" >头条</a-radio-button>
                                     <!-- <a-radio-button :value="2">快手</a-radio-button> -->
                                     <a-radio-button :value="3">头条内广</a-radio-button>
                                     <!-- <a-radio-button :value="4">快手内广</a-radio-button> -->
@@ -41,8 +41,8 @@
                              <a-form-model-item ref="templateName"  prop="templateName">
                                 <a-input
                                     v-model="form.templateName"
-                                    allowClear
-                                    :disabled="!!currentRuleId"
+                                    :allowClear='!currentRuleId'
+                                    @blur="blurTemplateName"
                                 />
                             </a-form-model-item>
                         </div>
@@ -80,15 +80,16 @@
                                             <div class="required-item"></div>
                                         </div>
                                         <div class="input-item"> 
+                                            <!-- :disabled="!!item.groupId" -->
                                             <a-form-model-item ref="groupName"  :prop="'ruleList.'+index+'.groupName'" :rules="[
                                                 { required: true, message: '请填写规则名称', trigger: 'blur' },
                                                 { min: 1, message: '长度不得小于1', trigger: 'blur' }]">                                               
                                                 <a-input
                                                     v-model="item.groupName"
                                                     placeholder="请输入规则名称"
-                                                    allowClear
+                                                    :allowClear="!item.groupId"
                                                     style="width:400px"
-                                                    :disabled="!!item.groupId"
+                                                    @blur="blurGroupName(item)"
                                                 />
                                             </a-form-model-item>    
                                         </div>
@@ -100,6 +101,7 @@
                                             <div class="required-item"></div>
                                         </div>
                                         <div class="input-item"> 
+                                            <!-- :disabled="!!item.groupId" -->
                                             <a-form-model-item ref="remark" :prop="'ruleList.'+index+'.remark'"  :rules="[
                                                 { required: true, message: '请填写规则描述', trigger: 'blur' },
                                                 { min: 1, message: '长度不得小于1', trigger: 'blur' },
@@ -109,7 +111,7 @@
                                                     style="width:400px"
                                                     placeholder="输入规则描述"
                                                     :auto-size="{ minRows: 2, maxRows: 5 }"
-                                                    :disabled="!!item.groupId"
+                                                    @blur="blurGroupName(item)"
                                                 />
                                             </a-form-model-item>   
                                         </div>
@@ -299,7 +301,7 @@
 
 <script>
 import moment from 'moment';
-import { getAction, postAction, downFile, downFilePost,deleteAction } from '@/api/manage';
+import { getAction, postAction, downFile, downFilePost,deleteAction,putAction } from '@/api/manage';
 import { Switch } from 'ant-design-vue';
 import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
 
@@ -377,13 +379,50 @@ export default {
                 //     // { min: 2, message: '长度不得小于2', trigger: 'blur' },
                 // ],
             },
+            templateNameTrue:false,
+            templateNameOld:''
         }
     },
     watch: {
-        
+        'form.templateName':function(n,o){
+            console.log(n,o)
+            if(n!=o){
+                this.templateNameTrue = true
+            }else{
+                this.templateNameTrue = false
+            }
+        }
     },
     methods: {
-        
+        blurTemplateName(){
+            console.log(this.form)
+            if(this.templateNameTrue){
+                if(this.form.templateName!=''){
+                    putAction('/ruleTemplate/edit',{id:this.form.templateId,templateName:this.form.templateName}).then(res=>{
+                        if(res.success){
+
+                        }else{
+                           this.$message.error(res.message) 
+                        }
+                    })
+                }else{
+                    this.$message.error('模板名称不可以为空!!!')
+                }
+            }
+        },
+        blurGroupName(item){
+            if(item.groupName!=''&&item.remark!=''){
+                putAction('/ruleGroup/edit',{id:item.groupId,groupName:item.groupName,remark:item.remark}).then(res=>{
+                    if(res.success){
+
+                    }else{
+                       this.$message.error(res.message)  
+                    }
+                })
+            }else{
+                this.$message.error('规则名称和规则描述不可以为空!!!')
+            }
+        },
         ruleTypeChange(item){
             console.log(item)
             if(item.ruleType=='base'){

+ 128 - 0
src/views/modules/earlyWarningRules/pushTreeSelect.vue

@@ -0,0 +1,128 @@
+<style lang="scss" scoped>
+.select-project {
+  width: 50%;
+}
+</style>
+<template>
+  <div class="select-project">
+    <treeselect
+      :multiple="multiple"
+      :disable-branch-nodes="!multiple"
+      :options="options"
+      :load-options="loadOptions"
+      placeholder="请选择项目以及账户"
+      v-model="value"
+      :value-consists-of="valueConsistsOf"
+      @input="emitValue"
+      :limit="2"
+      :limitText="
+        (count) => {
+          return '隐藏' + count + '条'
+        }
+      "
+      noChildrenText="该项目下暂无账号"
+      noOptionsText="暂无项目"
+    />
+  </div>
+</template>
+
+<script>
+// import the component
+import Treeselect from '@riophae/vue-treeselect'
+// import the styles
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
+
+import { getAction, postAction } from '@/api/manage'
+import { mapGetters } from 'vuex'
+// We just use `setTimeout()` here to simulate an async operation
+// instead of requesting a real API server for demo purpose.
+
+export default {
+  data: () => ({
+    value: null,
+    valueConsistsOf: 'LEAF_PRIORITY',
+    options: [],
+  }),
+  props: {
+    multiple: {
+      type: Boolean,
+      default() {
+        return true
+      },
+    },
+  },
+  components: { Treeselect },
+  watch: {
+    $route(n, o) {
+      console.log(n, o)
+    },
+  },
+  methods: {
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+  
+    emitValue() {
+      this.$emit('update:appId', this.value)
+    },
+    getChildren() {},
+    loadOptions({ action, parentNode, callback }) {
+      // Typically, do the AJAX stuff here.
+      // Once the server has responded,
+      // assign children options to the parent node & call the callback.
+      if (action === LOAD_CHILDREN_OPTIONS) {
+        getAction('/ctop/userAllocation/getAccountList', { projectId: parentNode.id, userId: this.userInfo().id }).then(
+          (res) => {
+            console.log(res)
+            if (res.code == 0) {
+              if (res.result.length > 0) {
+                parentNode.children = res.result.map((i) => {
+                  return {
+                    id: i.accountId,
+                    label:
+                      (i.userName.length == 2
+                        ? i.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0'
+                        : i.userName.length == 3
+                        ? i.userName + '\xa0\xa0\xa0\xa0'
+                        : i.userName) +
+                      '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
+                      i.accountId +
+                      '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' +
+                      i.authName,
+                  }
+                })
+                callback()
+              } else {
+                parentNode.children = []
+                callback()
+              }
+            } else {
+              callback(new Error('Failed to load options: network error.'))
+            }
+          }
+        )
+      }
+    },
+    getParticipateList() {
+      //我参与的
+      getAction('/ctop/projectMember/participateListV2', {
+        userId: this.userInfo().id,
+        pageSize: 1000000,
+        pageNo: 1,
+      }).then((res) => {
+        if (res.code == 0) {
+          this.options = res.result.records.map((item) => {
+            return {
+              id: item.projectId,
+              label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.advertiserName,
+              children: null,
+            }
+          })
+        }
+      })
+    },
+  },
+  mounted() {
+    this.getParticipateList()
+  },
+}
+</script>

+ 4 - 3
src/views/modules/earlyWarningRules/useRuleList.vue

@@ -68,14 +68,14 @@
       </div>
     </div>
     <!-- pushRuleVisible -->
-    <a-modal v-model="pushRuleVisible" title="推送账户选择" @ok="handleOk" :confirmLoading="confirmLoading">
+    <a-modal v-model="pushRuleVisible" title="推送账户选择" @ok="handleOk" :confirmLoading="confirmLoading" width="60%">
       <a-form layout="inline" class="rule-tree-select">
         <a-form-item
           label="请选择账户"
           :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
           :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
         >
-          <Treeselect :appId.sync="accountId" :multiple="false" request="1,3" ref="treeSelect" style="width: 100%" />
+          <Treeselect :appId.sync="accountId" :multiple="false"  ref="treeSelect" style="width: 100%" />
         </a-form-item>
       </a-form>
     </a-modal>
@@ -84,6 +84,7 @@
 
 <script>
 import moment from 'moment'
+import Treeselect from './pushTreeSelect.vue'
 import { getAction, postAction, downFile, downFilePost, deleteAction } from '@/api/manage'
 let existColumns = [
   // {
@@ -175,7 +176,7 @@ let recordsColumns = [
     scopedSlots: { customRender: 'optionsTwo' },
   },
 ]
-import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
+
 export default {
   name: 'useRuleList',
   data() {

+ 98 - 75
src/views/modules/kuaishouapp/crossAccount/createUnit.vue

@@ -41,7 +41,7 @@
             v-for="(item, index) of form.accountArr"
           >
             <a-form-model-item label="计划下组是否相同" prop="campaignAgreement">
-              <a-radio-group v-model="item.account.campaignAgreement" buttonStyle="solid" @change="nameTypeChange">
+              <a-radio-group v-model="item.account.campaignAgreement" buttonStyle="solid">
                 <a-radio-button :value="0">是</a-radio-button>
                 <a-radio-button :value="1">否</a-radio-button>
               </a-radio-group>
@@ -56,30 +56,75 @@
                 :tab="'计划:' + campaign.campaignName"
                 v-for="(campaign, campaignIndex) of item.account.campaignList"
               >
-                <a-form-model-item
-                  ref="unitName"
-                  v-for="(unitName, indexUnit) of campaign.unitNames"
-                  :key="indexUnit"
-                  :label="indexUnit == 0 ? '组名称' : ''"
-                  v-bind="indexUnit !== 0 ? formItemLayout : {}"
-                  :prop="
-                    'accountArr.' +
-                    index +
-                    '.account.campaignList.' +
-                    campaignIndex +
-                    '.unitNames.' +
-                    indexUnit +
-                    '.value'
-                  "
-                  :rules="{
-                    required: true,
-                    message: '组名称必填',
-                    trigger: 'blur',
-                  }"
-                  ><a-input v-model="unitName.value" placeholder="请输入组名称" style="width: 60%; margin-right: 8px" />
+                <a-form-model-item label="组是否相同">
+                  <a-radio-group
+                    buttonStyle="solid"
+                    v-model="campaign.check"
+                    @change="nameTypeChange(campaign, item.account)"
+                  >
+                    <a-radio-button value="1">是</a-radio-button>
+                    <a-radio-button value="2">否</a-radio-button>
+                  </a-radio-group>
                 </a-form-model-item>
-                <a-form-model-item label="投放范围" v-if="item.account.allianceAccount">
-                  <a-radio-group buttonStyle="solid" v-model="campaign.allianceAccount">
+
+                <a-tabs v-if="campaign.check == '2'" type="card">
+                  <a-tab-pane
+                    :key="indexUnit"
+                    :tab="'组 : ' + (indexUnit + 1)"
+                    v-for="(unitName, indexUnit) of campaign.unit"
+                  >
+                    <a-form-model-item
+                      ref="unitName"
+                      :key="indexUnit"
+                      :label="'组名称'"
+                      :prop="
+                        'accountArr.' +
+                        index +
+                        '.account.campaignList.' +
+                        campaignIndex +
+                        '.unit.' +
+                        indexUnit +
+                        '.name'
+                      "
+                      :rules="{
+                        required: true,
+                        message: '组名称必填',
+                        trigger: 'blur',
+                      }"
+                      ><a-input
+                        v-model="unitName.name"
+                        placeholder="请输入组名称"
+                        style="width: 60%; margin-right: 8px"
+                      />
+                    </a-form-model-item>
+                  </a-tab-pane>
+                </a-tabs>
+                <div v-else>
+                  <a-form-model-item
+                    label="组名称"
+                    :prop="'accountArr.' + index + '.account.campaignList.' + campaignIndex + '.unitIdentical.unitName'"
+                    :rules="{
+                      required: true,
+                      message: '组名称必填',
+                      trigger: 'blur',
+                    }"
+                  >
+                    <a-input
+                      v-model="campaign.unitIdentical.unitName"
+                      placeholder="请输入组名称"
+                      style="width: 60%; margin-right: 8px"
+                    />
+                  </a-form-model-item>
+                </div>
+
+                <!-- <a-form-model-item label="渠道包是否相同">
+                  <a-radio-group buttonStyle="solid" v-model="campaign.channel">
+                    <a-radio-button value="1">是</a-radio-button>
+                    <a-radio-button value="2">否</a-radio-button>
+                  </a-radio-group>
+                </a-form-model-item> -->
+                <a-form-model-item label="投放范围">
+                  <a-radio-group buttonStyle="solid" v-model="campaign.unitIdentical.allianceAccount">
                     <a-radio-button value="1">默认</a-radio-button>
                     <a-radio-button value="2">联盟广告</a-radio-button>
                   </a-radio-group>
@@ -111,8 +156,6 @@
 
             <!-- </a-form-model-item> -->
           </a-tab-pane>
-          <!-- <a-tab-pane key="2" tab="Tab 2"> Content of Tab Pane 2 </a-tab-pane>
-          <a-tab-pane key="3" tab="Tab 3"> Content of Tab Pane 3 </a-tab-pane> -->
         </a-tabs>
         <a-form-model-item
           :wrapperCol="{
@@ -177,40 +220,15 @@ export default {
               allianceAccount: true,
               campaignType: 2,
               campaignList: [
-                { campaignId: 1231231, campaignName: '测试', unitNames: [{ value: '' }], allianceAccount: '1' },
-                { campaignId: 12331, campaignName: '测`试', unitNames: [{ value: '' }], allianceAccount: '1' },
-                { campaignId: 123311, campaignName: '测1试', unitNames: [{ value: '' }], allianceAccount: '1' },
-                { campaignId: 123312, campaignName: '测3试', unitNames: [{ value: '' }], allianceAccount: '1' },
-              ],
-              campaignOne: { unitNames: [{ value: '' }], allianceAccount: '1' },
-            },
-          },
-          {
-            account: {
-              accountId: 232121,
-              accountName: '环球黑卡2',
-              campaignAgreement: 0,
-              campaignType: 3,
-              allianceAccount: false,
-              unitCount: 1,
-              campaignList: [
-                { campaignId: 1231231, campaignName: '测试', unitNames: [{ value: '' }], allianceAccount: '1' },
+                {
+                  campaignId: 1231231,
+                  campaignName: '测试',
+                  check: '1',
+                  unit: [{ name: '', directional: '', allianceAccount: '1' }],
+                  unitIdentical: { unitName: '', directional: '', allianceAccount: '1' },
+                },
               ],
-              campaignOne: { unitNames: [{ value: '' }], allianceAccount: '1' },
-            },
-          },
-          {
-            account: {
-              accountId: 232,
-              accountName: '环球黑卡`2',
-              campaignAgreement: 0,
-              campaignType: 4,
-              allianceAccount: false,
-              unitCount: 1,
-              campaignList: [
-                { campaignId: 1231231, campaignName: '测试', unitNames: [{ value: '' }], allianceAccount: '1' },
-              ],
-              campaignOne: { unitNames: [{ value: '' }], allianceAccount: '1' },
+              campaignOne: { unitNames: [{ value: '' }], directional: '', allianceAccount: '1' },
             },
           },
         ],
@@ -307,35 +325,40 @@ export default {
         console.log(item)
         var arr = []
         for (let i = 0; i < item.account.unitCount; i++) {
-          arr.push({ value: '' })
+          arr.push({ name: '', directional: '', allianceAccount: '1' })
         }
         item.account.campaignOne.unitNames = JSON.parse(JSON.stringify(arr))
         item.account.campaignList.forEach((element) => {
-          element.unitNames = JSON.parse(JSON.stringify(arr))
+          if (element.check == '1') {
+            element.unitIdentical = JSON.parse(JSON.stringify({ unitName: '', directional: '', allianceAccount: '1' }))
+          } else {
+            element.unit = JSON.parse(JSON.stringify(arr))
+          }
         })
       })
     },
-    nameTypeChange(e) {
+    AllTypeChange(e) {
       console.log(e.target.value)
       if (e.target.value == 1) {
         if (this.accountIds.length > 0) {
-          postAction('/kuaishou/crossAccount/getAuthName', { accountArr: this.accountIds }).then((res) => {
-            if (res.success) {
-              this.tabs = res.result.map((item) => {
-                return {
-                  ...item,
-                  campaignNames: JSON.parse(JSON.stringify(this.createTotal)),
-                }
-              })
-              this.active = res.result[0].accountId
-            } else {
-              this.tabs = []
-            }
-          })
         }
       } else {
       }
     },
+    nameTypeChange(item, accountData) {
+      console.log(item)
+      if (item.unitName == '1') {
+        item.unit = [{ value: '' }]
+      } else {
+        this.$nextTick(() => {
+          var arr = []
+          for (let i = 0; i < accountData.unitCount; i++) {
+            arr.push({ value: '' })
+          }
+          item.unit = JSON.parse(JSON.stringify(arr))
+        })
+      }
+    },
     getChangeAll(name, indexBest, index, items) {
       var node = document.getElementsByClassName('rending')[indexBest]
       var v = '{{' + name + '}}-'

+ 43 - 0
src/views/modules/kuaishouapp/crossAccount/data.json

@@ -0,0 +1,43 @@
+{
+    "account": {
+        "accountId": 23212,
+        "accountName": "环球黑卡",
+        "campaignAgreement": 0,
+        "unitCount": 1,
+        "allianceAccount": true,
+        "campaignType": 2,
+        "campaignList": [
+            {
+                "campaignId": 1231231,
+                "campaignName": "测试",
+                "check": 1,
+                "unit": [
+                    {
+                        "name": "",
+                        "directional": "",
+                        "allianceAccount": "1"
+                    },
+                    {
+                        "name": "",
+                        "directional": "",
+                        "allianceAccount": "1"
+                    }
+                ],
+                "unitIdentical": {
+                    "unitName": "",
+                    "directional": "",
+                    "allianceAccount": "1"
+                }
+            }
+        ],
+        "campaignOne": {
+            "unitNames": [
+                {
+                    "value": ""
+                }
+            ],
+            "directional": "",
+            "allianceAccount": "1"
+        }
+    }
+}

+ 19 - 19
src/views/modules/material/scriptFile.vue

@@ -7,7 +7,7 @@
   <a-card :bordered="false">
     <!-- 查询区域 -->
     <div class="table-page-search-wrapper">
-      <!-- <a-form layout="inline">
+      <a-form layout="inline">
         <a-row :gutter="24">
           <a-col :md="6" :sm="8">
             <selectTable :projectId.sync="queryParam.projectId"></selectTable>
@@ -53,10 +53,10 @@
             </span>
           </a-col>
         </a-row>
-      </a-form> -->
+      </a-form>
     </div>
     <div style="float:right;margin:0 0 20px 20px">
-      <a-upload
+      <!-- <a-upload
         name="file"
         :multiple="false"
         :action="uploadAction"
@@ -70,8 +70,8 @@
           <a-icon type="upload" />
           {{loadingElse?'上传中,请稍后':'文件上传'}}
         </a-button>
-      </a-upload>
-      <!-- <a-dropdown placement="bottomRight">
+      </a-upload> -->
+      <a-dropdown placement="bottomRight">
         <a-button>新增</a-button>
         <a-menu slot="overlay">
           <a-menu-item>
@@ -87,7 +87,7 @@
             <span style="text-align: center" @click="creatWps('ppt')">演示文档</span>
           </a-menu-item>
         </a-menu>
-      </a-dropdown> -->
+      </a-dropdown>
     </div>
     <div style="clear:both"></div>
     <div>
@@ -107,18 +107,18 @@
         <span slot="projectId_dictText" slot-scope="text">{{text?text:'-'}}</span>
         <span slot="action" slot-scope="text, record">
           <a @click="getViewUrlDbPath(record)">编辑</a>
-          <!-- <a-divider type="vertical" />
+          <a-divider type="vertical" />
           <a @click="bindProject(record)">项目绑定</a>
           <a-divider type="vertical" />
           <a @click="downLoad(record)">下载</a>
-          <a-divider type="vertical" /> -->
-          <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+          <a-divider type="vertical" /> 
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
             <a>删除</a>
-          </a-popconfirm> -->
+          </a-popconfirm>
         </span>
       </a-table>
     </div>
-    <!-- <div id="show"></div> -->
+    <div id="show"></div>
     <a-modal
       :maskClosable="false"
       :title="type=='add'?'脚本新建':'脚本编辑'"
@@ -220,14 +220,14 @@ export default {
             customRender: 'size',
           },
         },
-        // {
-        //   title: '绑定项目',
-        //   align: 'center',
-        //   dataIndex: 'projectId_dictText',
-        //   scopedSlots: {
-        //     customRender: 'projectId_dictText',
-        //   },
-        // },
+        {
+          title: '绑定项目',
+          align: 'center',
+          dataIndex: 'projectId_dictText',
+          scopedSlots: {
+            customRender: 'projectId_dictText',
+          },
+        },
         {
           title: '创建人',
           align: 'center',

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 639 - 503
src/views/modules/onlineTraining/onlineTrainingList.vue


+ 1 - 1
vue.config.js

@@ -77,7 +77,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8888', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
-        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目