Browse Source

物料池

朱鑫波 4 năm trước cách đây
mục cha
commit
a3a47aead5

+ 4 - 0
src/views/modules/autoLaunch/application/application-service.js

@@ -87,6 +87,10 @@
     setPlatform() {
         return [
             {
+                label: '',
+                value: '不限'
+            },
+            {
                 label: 1,
                 value: 'Android 应用下载'
             },

+ 4 - 2
src/views/modules/autoLaunch/application/application.less

@@ -95,8 +95,10 @@
         height: 40px;
         line-height: 40px;
         .acount-title-left {
-            margin-right: 20px;
-            width: 100px;
+            width: 80px;
+        }
+        .acount-title-left::after {
+            content: " : ";
         }
     }
     .push-plate {

+ 11 - 3
src/views/modules/autoLaunch/application/application.vue

@@ -29,7 +29,7 @@
                     <a-col :md="8" :sm="8" :xxl="6">
                         <a-form-item label="系统平台">
                             <a-select
-                                v-decorator="['status']"
+                                v-decorator="['status',{initialValue:''}]"
                                 placeholder="请选择"
                                 allow-clear
                             >
@@ -43,7 +43,7 @@
                         <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
                             <a-button type="primary" icon="search" @click="handleQueryList">查询</a-button>
                             <a-button type="primary" @click="handleResetForm" icon="reload" class="middle-button">重置</a-button>
-                            <a-button type="primary" @click="addNewApp(null)">新建应用</a-button>
+                            <a-button type="primary" @click="addNewApp(null)">添加应用</a-button>
                         </span>
                         
                     </a-col>
@@ -229,7 +229,7 @@
                    {{ relaxData.appVersion }}
                 </div>
             </div>
-             <div class="acount-title push-plate">
+             <div class="acount-title push-plate" v-if="relaxData.packageName">
                 <div class="acount-title-left">应用包名</div>
                 <div class="acount-title-right">
                     {{ relaxData.packageName }}
@@ -494,6 +494,14 @@ export default {
                     title: '应用包名',
                     align: 'center',
                     dataIndex: 'packageName',
+                    customRender(t) {
+                        if(t) {
+                            return t
+                        }
+                        else {
+                            return '-'
+                        }
+                    }
                 },
                  {
                     title: '更新时间',

+ 23 - 11
src/views/modules/autoLaunch/application/components/creatApplication.vue

@@ -66,7 +66,7 @@
             :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
           >
             <a-input
-              placeholder="请填写应用链接"
+              placeholder="请填写应用下载链接"
               v-decorator="[
                 'url',
                 {
@@ -78,7 +78,7 @@
 
           <a-form-item
             label="应用包名"
-            v-if="uploadType == '2'"
+            v-if="uploadType == '2' && appType == 'android'"
             :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
           >
@@ -179,12 +179,12 @@
             </a-form-item>
           </a-form-item> -->
           <a-form-item
-            label="隐私政策是否接入"
-            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-            v-if="uploadType == '2'"
+            label=""
+            :labelCol="{ span: 5 }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 }, offset: 5 }"
+            v-if="uploadType == '2' && appType == 'android'"
           >
-            <a-radio-group
+            <!-- <a-radio-group
               v-decorator="[
                 'useSdk',
                 {
@@ -195,13 +195,23 @@
             >
               <a-radio value="0">未接入</a-radio>
               <a-radio value="1">已接入</a-radio>
-            </a-radio-group>
+            </a-radio-group> -->
+            <a-checkbox-group
+              v-decorator="[
+                'useSdk',
+                {
+                  rules: [{ required: true, message: '安卓应用已接入快手广告监测SDK必选' }],
+                },
+              ]"
+            >
+              <a-checkbox :value="0"> 该应用已接入快手广告监测SDK </a-checkbox>
+            </a-checkbox-group>
           </a-form-item>
           <a-form-item
             label="隐私政策链接"
             :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-            v-if="uploadType == '2'"
+            v-if="uploadType == '2' && appType == 'android'"
           >
             <a-input
               v-decorator="[
@@ -210,7 +220,7 @@
                   rules: [{ required: true, message: '请填写隐私政策链接' }, { validator: handleConfirmValue }],
                 },
               ]"
-              placeholder="请填写监测链接"
+              placeholder="请填写隐私政策链接"
             />
           </a-form-item>
 
@@ -218,7 +228,7 @@
             label="监测链接"
             :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-            v-if="uploadType == '2'"
+            v-if="uploadType == '2' && appType == 'android'"
           >
             <a-input
               v-decorator="[
@@ -253,6 +263,7 @@ export default {
   },
   data() {
     return {
+      useSdk: [],
       loadDisabled: false,
       projectId: '',
       accountId: '',
@@ -573,6 +584,7 @@ export default {
             } else {
               this.url.insertTemplateUrl = '/kuaishouAppPackage/fillInLink'
               params = { ...values }
+              params.useSdk = params.useSdk.length > 0 ? 1 : 0
               params.projectId = this.projectId
               params.appIconUrl = this.fileUrl
               params.platform = this.appType == 'ios' ? +this.platform + 2 : +this.platform

+ 41 - 35
src/views/modules/autoLaunch/application/components/editApplication.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <a-modal
-      title="添加应用"
+      title="编辑应用"
       :visible="application"
       @ok="handleOk"
       :confirmLoading="confirmLoading"
@@ -42,7 +42,7 @@
             :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
           >
-            <a-radio-group v-model="platform">
+            <a-radio-group v-model="platform" disabled>
               <a-radio value="1">应用下载</a-radio>
               <a-radio value="2">网页游戏</a-radio>
             </a-radio-group>
@@ -94,7 +94,7 @@
             :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
           >
             <a-input
-              placeholder="请填写应用链接"
+              placeholder="请填写应用下载链接"
               v-decorator="[
                 'url',
                 {
@@ -106,7 +106,7 @@
 
           <a-form-item
             label="应用包名"
-            v-if="uploadType == '2'"
+            v-if="uploadType == '2' && appType == 'android'"
             :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
           >
@@ -153,9 +153,7 @@
               @overUpload="overUpload"
               :size="100"
             ></uploadFile>
-            <p class="upload-txt-rules">
-              文件格式:支持上传png/jpg/jpeg图片,尺寸450*450,小于100kb
-            </p>
+            <p class="upload-txt-rules">文件格式:支持上传png/jpg/jpeg图片,尺寸450*450,小于100kb</p>
           </a-form-item>
 
           <a-form-item
@@ -181,29 +179,27 @@
             </a-form-item>
           </a-form-item> -->
           <a-form-item
-            label="隐私政策是否接入"
-            :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
-            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-            v-if="uploadType == '2'"
+            label=""
+            :labelCol="{ span: 5 }"
+            :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 }, offset: 5 }"
+            v-if="uploadType == '2' && appType == 'android'"
           >
-            <a-radio-group
+            <a-checkbox-group
               v-decorator="[
                 'useSdk',
                 {
-                  rules: [{ required: true }],
-                  initialValue: 0,
+                  rules: [{ required: true, message: '安卓应用已接入快手广告监测SDK必选' }],
                 },
               ]"
             >
-              <a-radio :value="0">未接入</a-radio>
-              <a-radio :value="1">已接入</a-radio>
-            </a-radio-group>
+              <a-checkbox :value="0"> 该应用已接入快手广告监测SDK </a-checkbox>
+            </a-checkbox-group>
           </a-form-item>
           <a-form-item
             label="隐私政策链接"
             :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-            v-if="uploadType == '2'"
+            v-if="uploadType == '2' && appType == 'android'"
           >
             <a-input
               v-decorator="[
@@ -212,7 +208,7 @@
                   rules: [{ required: true, message: '请填写隐私政策链接' }, { validator: handleConfirmValue }],
                 },
               ]"
-              placeholder="请填写监测链接"
+              placeholder="请填写隐私政策链接"
             />
           </a-form-item>
 
@@ -220,7 +216,7 @@
             label="监测链接"
             :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
-            v-if="uploadType == '2'"
+            v-if="uploadType == '2' && appType == 'android'"
           >
             <a-input
               v-decorator="[
@@ -506,24 +502,33 @@ export default {
       getAction('/kuaishouAppPackage/queryById', { id: val.id }).then((res) => {
         //   'appIconUrl',
         if (res.success) {
-          res.result.platform = res.result.platform > 2 ? res.result.platform - 2 + '' : res.result.platform + ''
           this.fileUrl = res.result.appIconUrl
           this.appType = res.result.platform > 2 ? 'ios' : 'android'
+          res.result.platform = res.result.platform > 2 ? res.result.platform - 2 + '' : res.result.platform + ''
+          res.result.useSdk = res.result.useSdk ? (res.result.useSdk == 0 ? [] : [0]) : null
           this.projectId = res.result.projectId
-          this.form.setFieldsValue(
-            pick(
-              res.result,
-              'url',
-              'appVersion',
-              'packageName',
-              'platform',
-              'appPrivacyUrl',
-              'useSdk',
-              'trackUrl',
-              'appName',
-              'projectName'
-            )
-          )
+          if (this.appType == 'android') {
+            this.$nextTick(() => {
+              this.form.setFieldsValue(
+                pick(
+                  res.result,
+                  'url',
+                  'appVersion',
+                  'packageName',
+                  'platform',
+                  'appPrivacyUrl',
+                  'useSdk',
+                  'trackUrl',
+                  'appName',
+                  'projectName'
+                )
+              )
+            })
+          } else {
+            this.$nextTick(() => {
+              this.form.setFieldsValue(pick(res.result, 'url', 'appVersion', 'platform', 'appName', 'projectName'))
+            })
+          }
         }
       })
     },
@@ -594,6 +599,7 @@ export default {
           } else {
             this.url.insertTemplateUrl = '/kuaishouAppPackage/fillInLink'
             params = { ...values }
+            params.useSdk = params.useSdk.length > 0 ? 1 : 0
             params.id = this.appId
             params.projectId = this.projectId
             params.appIconUrl = this.fileUrl

+ 4 - 0
src/views/modules/autoLaunch/application/components/uploadFile.vue

@@ -230,6 +230,10 @@ export default {
         height = image.naturalHeight
         width = image.naturalWidth
       }
+      if (image.complete) {
+        height = image.naturalHeight
+        width = image.naturalWidth
+      }
 
       setTimeout(() => {
         if (height != 450 || width != 450) {

+ 1 - 1
src/views/modules/crowd-control/crowd-control.vue

@@ -497,7 +497,7 @@ export default {
             let that = this
             this.$confirm({
                 title: '删除提示',
-                content: '确定要删除该人群包吗?',
+                content: '是否删除该人群包?',
                 onOk() {
                     getAction('/kuaishouPopulationPackage/delete', {id: data.id}).then(result => {
                         if (result.code === 200) {