Selaa lähdekoodia

切换分支-财务模块

朱鑫波 3 vuotta sitten
vanhempi
commit
01f713b972
2 muutettua tiedostoa jossa 131 lisäystä ja 44 poistoa
  1. 130 43
      src/views/modules/autoLaunchRevision/createLaunch.vue
  2. 1 1
      vue.config.js

+ 130 - 43
src/views/modules/autoLaunchRevision/createLaunch.vue

@@ -1151,10 +1151,35 @@ li.chouzhen.first:before {
                                             ]"
                                         >
                                             <a-radio :value="1">
-                                                多定向
+                                                定向匹配
+                                            </a-radio>
+                                            <a-radio :value="1">
+                                                素材匹配
                                             </a-radio>
                                         </a-radio-group>
                                     </a-form-item>
+
+                                    <a-form-item>
+                                        <span slot="label">
+                                            素材关键字
+                                        </span>
+                                        <a-textarea
+                                            class="rending"
+                                            placeholder="请输入素材关键字"
+                                            v-decorator="[
+                                                'materialKeyword',
+                                                {
+                                                    rules: [
+                                                        {
+                                                            required: true,
+                                                            message: '素材关键字必填'
+                                                        }
+                                                    ]
+                                                }
+                                            ]"
+                                            :autosize="{ minRows: 2, maxRows: 6 }"
+                                        ></a-textarea>
+                                    </a-form-item>
                                 </a-col>
                             </a-row>
                         </a-form>
@@ -2133,13 +2158,14 @@ li.chouzhen.first:before {
                     </a-col>
                 </a-row>
                 <a-row :gutter="16">
-                    <a-col :span="16" style="width: 110%;margin-left: -9%;">
+                    <a-col :span="16" style="width: 110%;margin-left: -11%;">
                         <a-form-item label="广告位置">
                             <checkBoxGroup
                                 :options="[
                                     { label: '优选广告位', value: 1 },
                                     { label: '上下滑大屏广告', value: 6 },
                                     { label: '视频播放页广告', value: 3 },
+                                    { label: '激励广告', value: 24 },
                                     { label: '联盟广告', value: 5 }
                                 ]"
                                 v-decorator="[
@@ -2186,7 +2212,7 @@ li.chouzhen.first:before {
                                 ]"
                                 style="width: 100%"
                                 placeholder="仅支持输入自然数"
-                                :max="customUnitCntMax"
+                                :max="900"
                                 :precision="0"
                             />
                         </a-form-item>
@@ -2202,7 +2228,7 @@ li.chouzhen.first:before {
                                 ]"
                                 style="width: 100%"
                                 placeholder="仅支持输入自然数"
-                                :max="60"
+                                :max="300"
                                 :precision="0"
                             />
                         </a-form-item>
@@ -2278,41 +2304,48 @@ li.chouzhen.first:before {
                 <a-row :gutter="16">
                     <a-col :span="16">
                         <a-form-item label="广告语">
-                            <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"
-                                    :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: 30px;
-                                position: absolute;
-                                bottom: 0;
-                                right: 6px;
-                                width: 100%;
-                                margin-bottom: 0;
-                              "
-                                >
-                                    {{ item.value.length }}/30
-                                    <!-- {{ getFormData('description').length  }}/30 -->
-                                </p>
-                                <div style="position:absolute;right:-50px;top:-10px">
-                                    <a-icon type="plus" @click="addDescription()" style="margin-right:15px" />
-                                    <a-icon
-                                        type="minus"
-                                        @click="removeDescription(index)"
-                                        v-if="descriptionList.length > 1"
-                                    />
+                            <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"
+                                        :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;
+                                    "
+                                    >
+                                        {{ item.value.length }}/30
+                                        <!-- {{ getFormData('description').length  }}/30 -->
+                                    </p>
+                                    <div style="position:absolute;right:0;top:-10px">
+                                        <a-icon type="plus" @click="addDescription()" style="margin-right:15px" />
+                                        <a-icon
+                                            type="minus"
+                                            @click="removeDescription(index)"
+                                            v-if="descriptionList.length > 1"
+                                        />
+                                    </div>
                                 </div>
                             </div>
+                            <div style="display:flex">
+                                <a style="margin-right:10px">选择广告语</a>
+                                <a @click="importExcel">导入广告语</a>
+                            </div>
                         </a-form-item>
                     </a-col>
                 </a-row>
@@ -2441,13 +2474,34 @@ li.chouzhen.first:before {
             >
             </a-table>
         </a-modal>
+        <a-modal v-model="importExcelVisible" :footer="null" title="导入广告语">
+            <a-upload
+                name="file"
+                :multiple="false"
+                :headers="tokenHeader"
+                :file-list="fileList"
+                :showUploadList="false"
+                :beforeUpload="beforeUpload"
+                @change="handleChange"
+                style="margin-right: 20px"
+                class="require-class fileUpload"
+                id="fileUpload"
+            >
+                <a-button :disabled="loadDisabled">
+                    <a-icon type="upload" />
+                    {{ loadDisabled ? '上传中,请稍后' : '文件上传' }}
+                </a-button>
+            </a-upload>
+        </a-modal>
+
         <templateModal ref="templateModal" @getData="getTargetPerson" />
     </div>
 </template>
 
 <script>
-//   import UserMenu from '../tools/UserMenu'
-//   import SMenu from '../menu/'
+import Vue from 'vue'
+import { ACCESS_TOKEN } from '@/store/mutation-types'
+import $ from 'jquery'
 import Logo from '@/components/tools/Logo.vue'
 import pick from 'lodash.pick'
 import { mixin } from '@/utils/mixin.js'
@@ -2455,12 +2509,10 @@ import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
 import moment from 'moment'
 import selectCheckAll from '@/components/formComponents/toutiaoTime'
 import checkBoxGroup from '@/components/formComponents/checkBoxGroup'
-import uploadFile from '@/components/uploadFileMd5Push.vue'
 import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
 import selectTable from '@/views/modules/Statistics/components/selectPagination.vue'
 import EditableCell from './components/editablCell'
 import selectTreeAccount from '@/components/formComponents/selectAccount.vue'
-import { getAction } from '../../../api/manage'
 import templateModal from './components/templateModal'
 // import lookPreviewVue from './lookPreview.vue'
 function tqFun(qcArr1) {
@@ -2532,7 +2584,6 @@ export default {
         Treeselect,
         selectCheckAll,
         checkBoxGroup,
-        uploadFile,
         selectTable,
         EditableCell,
         selectTreeAccount,
@@ -2667,6 +2718,12 @@ export default {
             },
             createOptions: [],
             showCreativeData: null,
+            importExcelVisible: false,
+            tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
+            fileList: [],
+            fileUrl: '',
+            loadDisabled: false,
+            dataFile: null,
             //公共参数
             activeStep: 0,
             screenWidth: document.body.clientWidth,
@@ -2848,6 +2905,36 @@ export default {
     },
     methods: {
         moment,
+        importExcel() {
+            this.importExcelVisible = true
+        },
+        beforeUpload(file) {
+            this.dataFile = $('.fileUpload').find('input')[0].files[0]
+            console.log(this.dataFile)
+            this.loadDisabled = true
+        },
+        handleChange() {
+            let formData = new FormData()
+            formData.append('file', this.dataFile)
+            this.postDataAction('/document/library/importAdLanguage', formData).then(res => {
+                this.loadDisabled = false
+                if (res.code === 200) {
+                    //   console.log(res)
+                    var data = res.result.map(item => {
+                        return { value: item }
+                    })
+                    if (this.descriptionList[0].value == '') {
+                        this.descriptionList = data
+                    } else {
+                        this.descriptionList.push(...data)
+                    }
+                    this.importExcelVisible = false
+                } else {
+                    this.$message.error(res.message)
+                }
+            })
+        },
+
         convertOk() {
             var dataLink = []
             dataLink = this.convertList.filter(item => {
@@ -3887,7 +3974,7 @@ export default {
             this.checkPerson = []
         },
         editNewTemplate(item) {
-            var params = {...item}
+            var params = { ...item }
             params.accountId = this.getFormData('formProject', 'accountId')
             this.$refs.templateModal.handleOk(params, 'edit')
         },

+ 1 - 1
vue.config.js

@@ -97,7 +97,7 @@ module.exports = {
       '/jeecg-boot': {
         // target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.1.3:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        target: 'http://192.168.1.3:7001', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        // target: 'http://192.168.1.3:7001', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.62:7001', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.6.162:9806', //请求本地 需要jeecg-boot后台项目  祚云