Bläddra i källkod

Merge branch 'feature/work-test' of http://git.tjyourong.com.cn/ctop/adsp-vue into feature/work-test

liubei@c-top.com.cn 3 år sedan
förälder
incheckning
7514b6ecf2

+ 1 - 1
.env.development

@@ -10,7 +10,7 @@ VUE_APP_BASE_REPORT_URL = http://api.tjyourong.com.cn/reportModule
 # 杨字安 http://192.168.1.43:9999
 
 #脚本视频接口
-VUE_APP_BASE_SCRIPT_URL = http://139.186.134.115:31013
+VUE_APP_BASE_SCRIPT_URL = http://192.168.0.195:31013
 
 
 #素材大盘相关接口

+ 2 - 1
.env.production

@@ -7,9 +7,10 @@ VUE_APP_BASE_REPORT_URL = http://api.tjyourong.com.cn/reportModule
 # 线上地址 http://api.tjyourong.com.cn
 
 #脚本视频接口
-VUE_APP_BASE_SCRIPT_URL = http://114.117.193.186:31013
+VUE_APP_BASE_SCRIPT_URL = http://192.168.0.195:31013
 # 线上地址 http://114.117.193.186:31013
 # 测试地址 http://139.186.134.115:31013
+# 新测试地址 http://192.168.0.195:31013
 
 
 #素材大盘相关接口

+ 6 - 1
src/mixins/JeecgListMixin.js

@@ -146,7 +146,12 @@ export const JeecgListMixin = {
       // if(params.endDate){
       //   params.endDate = moment(params.endDate).format('YYYY-MM-DD')
       // }
-      params.userId = this.userInfo().id
+      if(params.userId){
+
+      }else{
+        params.userId = this.userInfo().id
+      }
+      
       this.loading = true;
       await getAction(this.url.list, params).then((res) => {
         if (res.success) {

+ 2 - 1
src/views/modules/account-config/components/link-configuration.vue

@@ -291,7 +291,8 @@
                 this.controlLoading = true;
                 let params = {
                     accountId:data.accountId,
-                    warningFlag:checked?1:2
+                    warningFlag:checked?1:2,
+                    createUserId:this.userInfo().id
                 }
                 postAction(urlAcount+'/bytedance-api/ad/bytedancePlanJobController/updAccountActionTrackUrl',params).then(res=>{
                     if (res.code == 0) {

+ 53 - 36
src/views/modules/advertiser/UserAllocationList.vue

@@ -49,6 +49,8 @@
                 showSearch
                 optionFilterProp="children"
                 :filterOption="filterOption"
+                @focus="getParticipateList"
+                @search="getParticipateList"
               >
                 <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
                   {{
@@ -229,35 +231,14 @@
           :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
           :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
         >
-          <a-select
-            v-decorator="[
-              'projectId', // 给表单赋值或拉取表单时,该input对应的key
-              { rules: [{ required: true, message: '请选择项目!' }] },
-            ]"
-            showSearch
-            optionFilterProp="children"
-            :filterOption="filterOption"
-            disabled
-          >
-            <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
-              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
-                item.mediaId == '1'
-                  ? '头条'
-                  : item.mediaId == '2'
-                  ? '快手'
-                  : item.mediaId == '3'
-                  ? '头条内广'
-                  : '快手内广'
-              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
-            </a-select-option>
-          </a-select>
+          {{projectName}}
         </a-form-item>
         <a-form-item
           label="转移项目"
           :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
           :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
         >
-          <a-select
+          <!-- <a-select
             v-decorator="[
               'projectNewId', // 给表单赋值或拉取表单时,该input对应的key
               { rules: [{ required: true, message: '请选择项目!' }] },
@@ -277,6 +258,29 @@
                   : '快手内广'
               }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
+          </a-select> -->
+          <a-select
+            v-decorator="[
+                'projectNewId', // 给表单赋值或拉取表单时,该input对应的key
+                { rules: [{ required: true, message: '请选择项目!' }] },
+            ]"
+            @focus="getParticipateList"
+            showSearch
+            optionFilterProp="children"
+            :filterOption="filterOption"
+            @search="getParticipateList"
+          >
+              <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
+                  {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                      item.mediaId == '1'
+                      ? '头条'
+                      : item.mediaId == '2'
+                      ? '快手'
+                      : item.mediaId == '3'
+                      ? '头条内广'
+                      : '快手内广'
+                  }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
+              </a-select-option>
           </a-select>
         </a-form-item>
         <!-- 
@@ -415,6 +419,7 @@ export default {
       confirmLoading: false,
       accountLoading: false,
       projectId: '',
+      projectName:'',
       accountId: '',
       mediaId: '',
       form: this.$form.createForm(this),
@@ -429,7 +434,7 @@ export default {
     },
   },
   mounted() {
-    this.getParticipateList()
+    this.getParticipateList(null)
   },
   methods: {
     renew(item) {
@@ -490,14 +495,25 @@ export default {
         }
       })
     },
-    getParticipateList() {
-      getAction('/ctop/projectMember/participateList', {
+    getParticipateList(value) {
+      // getAction('/ctop/projectMember/participateList', {
+      //   userId: this.userInfo().id,
+      // }).then((res) => {
+      //   if (res.code == 0) {
+      //     this.dataElse = res.result
+      //   }
+      // })
+      getAction('/ctop/projectMember/participateListV2', {
         userId: this.userInfo().id,
-      }).then((res) => {
-        if (res.code == 0) {
-          this.dataElse = res.result
-        }
-      })
+        pageSize: 100,
+        pageNo: 1,
+        projectName: value,
+      }).then(res => {
+          if (res.code == 0) {
+              let defaultData = res.result.records;
+              this.dataElse = defaultData;
+          }
+      });
     },
     filterOption(input, option) {
       return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -528,12 +544,13 @@ export default {
       this.visibleAccount = true
       this.accountId = item.accountId
       this.projectId = item.projectId
+      this.projectName = item.projectId_dictText
       this.accountLoading = false
-      setTimeout(() => {
-        this.formAccount.setFieldsValue({
-          projectId: item.projectId,
-        })
-      }, 0)
+      // setTimeout(() => {
+      //   this.formAccount.setFieldsValue({
+      //     projectId: item.projectId,
+      //   })
+      // }, 0)
     },
     handleOkAccount(e) {
       this.formAccount.validateFieldsAndScroll((err, values) => {

+ 4 - 4
src/views/modules/advertiser/modules/UserAllocationModal.vue

@@ -29,10 +29,10 @@
           <a-input placeholder="请输入账户id --授权" v-decorator="['accountId', {}]" disabled />
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="广告主名称">
-          <a-input placeholder="请输入广告主名称" v-decorator="['advertiserName', {}]" disabled />
+          <a-input placeholder="请输入广告主名称" v-decorator="['advertiserId_dictText', {}]" disabled />
         </a-form-item>
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="项目名称">
-          <a-input placeholder="请输入项目名称" v-decorator="['projectName', {}]" disabled />
+          <a-input placeholder="请输入项目名称" v-decorator="['projectId_dictText', {}]" disabled />
         </a-form-item>
         <!-- <a-form-item
           :labelCol="labelCol"
@@ -154,9 +154,9 @@ export default {
             'userName',
             'accountId',
             'advertiserId',
-            'advertiserName',
+            'advertiserId_dictText',
             'projectId',
-            'projectName',
+            'projectId_dictText',
             'accountName',
             'authName',
             'mediaId',

+ 45 - 2
src/views/modules/autoLaunch/trusteeship/creatMaterialTest.vue

@@ -55,6 +55,35 @@
                                 </a-row>
                                 <a-row :gutter="16">
                                     <a-col :span="16">
+                                        <a-form-item label="投放媒体">
+                                            <!-- { label: '视频播放页广告', value: 3 }, -->
+                                            <checkBoxGroup
+                                                :options="[
+                                                    { label: '优选广告位', value: 1 },
+                                                    { label: '上下滑大屏广告', value: 6 },
+
+                                                    { label: '快手联盟优选', value: 10 }
+                                                ]"
+                                                v-decorator="[
+                                                    'sceneIds',
+                                                    {
+                                                        rules: [
+                                                            {
+                                                                required: true,
+                                                                message: '投放媒体必选'
+                                                            }
+                                                        ],
+                                                        initialValue: [1]
+                                                    }
+                                                ]"
+                                                @change="changeData"
+                                            />
+                                        </a-form-item>
+                                    </a-col>
+                                </a-row>
+
+                                <a-row :gutter="16">
+                                    <a-col :span="16">
                                         <a-form-item label="营销目标">
                                             <a-radio-group
                                                 button-style="solid"
@@ -518,7 +547,7 @@
                                                         initialValue: 3
                                                     }
                                                 ]"
-                                                :disabled="getFormData('formProject', 'campaignType')!=5"
+                                                :disabled="getFormData('formProject', 'campaignType') != 5"
                                             >
                                                 <a-radio-button :value="3">不限</a-radio-button>
                                                 <a-radio-button :value="1">android</a-radio-button>
@@ -1517,6 +1546,18 @@ export default {
     methods: {
         ...mapGetters(['userInfo']),
         moment,
+        changeData(data) {
+            if (data.length > 1 && data.findIndex(item => item == 1) == 0) {
+                data.splice(
+                    data.findIndex(item => item == 1),
+                    1
+                )
+            } else if (data.length > 1 && data.findIndex(item => item == 1) == data.length - 1) {
+                data.splice(0, data.length - 1)
+            } else if (data.length == 0) {
+                data.push(1)
+            } 
+        },
         changeCampaign(e) {
             console.log(e.target.value)
             this.getActionBarText()
@@ -1704,7 +1745,8 @@ export default {
                     this.$nextTick(() => {
                         let data = res.result
                         this.accountIds = data.accountId
-                        this.formProject.setFieldsValue(pick(data, 'campaignType'))
+                        data.sceneIds = data.sceneIds ? data.sceneIds : [1]
+                        this.formProject.setFieldsValue(pick(data, 'campaignType', 'sceneIds'))
                         this.$nextTick(() => {
                             this.getActionBarText()
                         })
@@ -2007,6 +2049,7 @@ export default {
                         params.userId = this.userInfo().id
                         params.useAppMarket = params.useAppMarket ? 1 : 2
                         params.appStore = params.appStore ? JSON.stringify(params.appStore) : '[]'
+                        params.sceneIds = params.sceneIds ? JSON.stringify(params.sceneIds) : '[]'
                         params.regionIds =
                             this.district == 'NONE'
                                 ? JSON.stringify([])

+ 8 - 5
src/views/modules/autoLaunchRevision/createLaunch.vue

@@ -1519,7 +1519,7 @@ li.chouzhen.first:before {
                     <a-col :span="16">
                         <a-form-item label="系统平台">
                             <a-radio-group
-                                v-decorator="['platformOs', { initialValue: 2 }]"
+                                v-decorator="['platformOs', { initialValue: 1 }]"
                                 button-style="solid"
                                 @change="changeType"
                             >
@@ -1760,7 +1760,7 @@ li.chouzhen.first:before {
                                         />
                                     </template>
                                 </a-table-column>
-                                <a-table-column
+                                <!-- <a-table-column
                                     v-if="!useChannel"
                                     width="20%"
                                     key="impressionUrl"
@@ -1775,7 +1775,7 @@ li.chouzhen.first:before {
                                             @change="onCellChange(record.id, 'impressionUrl', $event)"
                                         />
                                     </template>
-                                </a-table-column>
+                                </a-table-column> -->
                                 <a-table-column
                                     v-if="!useChannel"
                                     width="20%"
@@ -1792,7 +1792,7 @@ li.chouzhen.first:before {
                                         />
                                     </template>
                                 </a-table-column>
-                                <a-table-column
+                                <!-- <a-table-column
                                     v-if="!useChannel"
                                     width="20%"
                                     key="adPhotoPlayedT3sUrl"
@@ -1807,7 +1807,7 @@ li.chouzhen.first:before {
                                             @change="onCellChange(record.id, 'adPhotoPlayedT3sUrl', $event)"
                                         />
                                     </template>
-                                </a-table-column>
+                                </a-table-column> -->
                                 <a-table-column
                                     v-if="useChannel"
                                     width="10%"
@@ -3810,6 +3810,9 @@ export default {
                             params.sceneId = JSON.stringify(params.sceneId)
                             params.autoTargetArray = JSON.stringify(params.autoTargetArray)
                             params.useAppMarket = params.useAppMarket ? 1 : 0
+                            params.clickTrackUrl = this.multipleBidData[0].clickTrackUrl
+                            params.actionbarClickUrl = this.multipleBidData[0].actionbarClickUrl
+
                             if (this.$route.query.id) {
                                 params.id = this.$route.query.id
                                 this.postDataAction('/auto/aiKuaishouAccountAutoStrategy/edit', params).then(res => {

+ 489 - 0
src/views/modules/script/components/keyWord.vue

@@ -0,0 +1,489 @@
+<style>
+.select-table .ant-table-thead > tr > th,
+.select-table .ant-table-tbody > tr > td {
+    padding: 0 !important;
+}
+.select-table .ant-table {
+    font-size: 12px;
+}
+.demo-infinite-container {
+    border: 1px solid #e8e8e8;
+    border-radius: 4px;
+    overflow: auto;
+    padding: 8px 24px;
+    height: 300px;
+}
+.demo-loading-container {
+    position: absolute;
+    bottom: 40px;
+    width: 100%;
+    text-align: center;
+}
+</style>
+<style lang="scss" scoped>
+.require-check {
+    ::v-deep .ant-form-item-label {
+        label::before {
+            display: inline-block;
+            margin-right: 4px;
+            color: #f5222d;
+            font-size: 14px;
+            font-family: SimSun, sans-serif;
+            line-height: 1;
+            content: '*';
+        }
+    }
+}
+</style>
+<template>
+    <div>
+        <a-form-item
+            label="关键字"
+            v-clickoutside="handleClose"
+            style="width: 100%"
+            class="select-table"
+            :class="{ 'require-check': requireCheck }"
+        >
+            <a-input
+                @focus="
+                    topMiddle = true
+                    getData()
+                "
+                v-model="keyValue"
+                @change="getData"
+                :disabled="disabled"
+                @keyup.enter.native="okWord"
+                addon-after="选中后按回车键添加"
+            />
+            <div
+                v-show="topMiddle"
+                style="
+                background: white;
+                padding: 10px;
+                box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);
+                position: absolute;
+                z-index: 1000;
+                width: 100%;
+            "
+                class="demo-infinite-container"
+            >
+                <!-- <a-list :data-source="data">
+                <a-list-item slot="renderItem" slot-scope="item" @click="showProject(item)">
+                    <a-list-item-meta>
+                        <a slot="title">{{ item.word }}</a>
+                    </a-list-item-meta>
+                </a-list-item>
+                <div v-if="loading && !busy" class="demo-loading-container">
+                    <a-spin />
+                </div>
+            </a-list> -->
+
+                <a-checkbox-group
+                    v-model="selectDescriptionArr"
+                    style="width:100%;margin-top:10px"
+                    v-on:keyup.enter.native="okWord"
+                >
+                    <a-list bordered :data-source="data" style="width:100%;max-height: 450px;overflow:auto">
+                        <a-list-item slot="renderItem" slot-scope="item, index">
+                            <a-checkbox :value="item.word">
+                                {{ item.word }}
+                            </a-checkbox>
+                        </a-list-item>
+                    </a-list>
+                </a-checkbox-group>
+            </div>
+        </a-form-item>
+        <a-table
+            :columns="columns"
+            :dataSource="dataSource"
+            :pagination="false"
+            bordered
+            size="middle"
+            style="word-break: break-all;font-size:16px;font-weight:600"
+            id="outTable"
+            ref="accountTable"
+        >
+            <span slot="query_word" slot-scope="text, record">
+                {{ text }}
+            </span>
+            <span slot="recommended_word" slot-scope="text, record">
+                {{ !!text[0] ? text.join() : '-' }}
+            </span>
+            <span slot="action" slot-scope="text, record">
+                <a @click.stop="deleteScript(record)">删除</a>
+            </span>
+        </a-table>
+    </div>
+</template>
+
+<script>
+import { getAction, postAction } from '@/api/manage'
+import moment from 'moment'
+import { mapGetters } from 'vuex'
+import jq from 'jquery'
+import infiniteScroll from 'vue-infinite-scroll'
+const clickoutside = {
+    // 初始化指令
+    bind(el, binding, vnode) {
+        function documentHandler(e) {
+            // 这里判断点击的元素是否是本身,是本身,则返回
+            if (el.contains(e.target)) {
+                return false
+            }
+            // 判断指令中是否绑定了函数
+            if (binding.expression) {
+                // 如果绑定了函数 则调用那个函数,此处binding.value就是handleClose方法
+                binding.value(e)
+            }
+        }
+        // 给当前元素绑定个私有变量,方便在unbind中可以解除事件监听
+        el.__vueClickOutside__ = documentHandler
+        document.addEventListener('click', documentHandler)
+    },
+    update() {},
+    unbind(el, binding) {
+        // 解除事件监听
+        document.removeEventListener('click', el.__vueClickOutside__)
+        delete el.__vueClickOutside__
+    }
+}
+let TTcolumns = [
+    {
+        title: '关键字',
+        dataIndex: 'query_word',
+        scopedSlots: { customRender: 'query_word' },
+        align: 'center',
+        key: 'query_word'
+    },
+    {
+        title: '推荐词',
+        dataIndex: 'recommended_word',
+        scopedSlots: { customRender: 'recommended_word' },
+        align: 'center',
+        key: 'recommended_word'
+    },
+    {
+        title: '操作',
+        dataIndex: 'action',
+        scopedSlots: { customRender: 'action' },
+        align: 'center',
+        key: 'action'
+    }
+]
+export default {
+    name: 'select-pagination',
+    components: {},
+    directives: { clickoutside, infiniteScroll },
+    props: {
+        projectId: {
+            type: [String, Number, Array],
+            default() {
+                return []
+            }
+        },
+        allScript: {
+            type: [String, Number, Array],
+            default() {
+                return []
+            }
+        },
+        type: {
+            type: String,
+            default() {
+                return ''
+            }
+        },
+        labelCol: {
+            type: Object,
+            default() {
+                return {
+                    xs: { span: 24 },
+                    sm: { span: 5 }
+                }
+            }
+        },
+        disabled: {
+            type: Boolean,
+            default() {
+                return false
+            }
+        },
+        requireCheck: {
+            type: Boolean,
+            default() {
+                return false
+            }
+        }
+    },
+
+    data() {
+        return {
+            loading: false,
+            busy: false,
+            wrapperCol: {
+                xs: { span: 24 },
+                sm: { span: 12 }
+            },
+            selectedRowKeys: [],
+            selectedRowKeysValue: [],
+            topMiddle: false,
+            keyValue: '',
+            data: [],
+            selectDescriptionArr: [],
+            dataElse: [],
+            ipagination: {
+                current: 0,
+                pageSize: 20
+            },
+            columns: TTcolumns,
+            dataSource: [],
+            rowClick: (record, index) => ({
+                // 事件
+                on: {
+                    click: () => {
+                        // var str =
+                        //   record.mediaId == '1'
+                        //     ? '头条'
+                        //     : record.mediaId == '2'
+                        //     ? '快手'
+                        //     : record.mediaId == '3'
+                        //     ? '头条内广'
+                        //     : '快手内广'
+                        this.keyValue = record.productName
+                        this.topMiddle = false
+                        this.data = this.dataElse
+                        // this.$emit('update:projectId', record.id)
+                    }
+                }
+            })
+        }
+    },
+    computed: {},
+    filters: {},
+    methods: {
+        deleteScript(item) {
+            var index = this.dataSource.findIndex(i=>i==item.query_word)
+            this.dataSource.splice(index,1)
+            var indexRemove = this.projectId.findIndex(i=>i==item.query_word)
+            this.projectId.splice(indexRemove,1)
+        },
+        showProject(record) {
+            var str =
+                record.mediaId == '1'
+                    ? '头条'
+                    : record.mediaId == '2'
+                    ? '快手'
+                    : record.mediaId == '3'
+                    ? '头条内广'
+                    : '快手内广'
+            this.keyValue = record.productName
+            this.topMiddle = false
+            this.$emit('update:projectId', record.id)
+        },
+        ...mapGetters(['nickname', 'avatar', 'userInfo']),
+        onSelectChange(selectedRowKeys, selectionRows) {
+            this.selectedRowKeys = selectedRowKeys
+            this.selectedRowKeysValue = selectionRows.map(item => {
+                return { orientationId: item.orientationId, orientationName: item.orientationName }
+            })
+        },
+        getData() {
+            if (this.keyValue == '') {
+                this.$emit('update:projectId', this.projectId)
+            }
+            if (!!this.keyValue) {
+                this.topMiddle = true
+                this.ipagination.current = 1
+                postAction(process.env.VUE_APP_BASE_SCRIPT_URL + '/related_words/?word=' + this.keyValue).then(res => {
+                    if (res.code == 0) {
+                        this.data = res.result.map((item, index) => {
+                            return {
+                                productId: item,
+                                key: index,
+                                word: item
+                            }
+                        })
+                        // if (this.type === 'taobao') {
+                        //     this.data = defaultList.filter(item => item.productId === 1410280)
+                        // } else {
+                        //     this.data = defaultList
+                        // }
+                        // this.dataElse = res.result.records.map((item, index) => {
+                        //   return {
+                        //     ...item,
+                        //     projectId: item.projectId + '',
+                        //     key: index,
+                        //   }
+                        // })
+                    }
+                })
+            } else {
+                this.data = []
+                this.selectDescriptionArr = []
+            }
+        },
+        okWord() {
+
+            if (this.projectId.findIndex(item => item == this.keyValue) > -1) {
+            } else {
+                this.projectId.push(this.keyValue)
+            }
+
+            var index = this.dataSource.findIndex(item => item.query_word == this.keyValue)
+            if (index > -1) {
+                this.dataSource[index].recommended_word = this.selectDescriptionArr
+            } else {
+                this.dataSource.push({ query_word: this.keyValue, recommended_word: this.selectDescriptionArr })
+            }
+            this.keyValue = ''
+            this.selectDescriptionArr = []
+            
+            this.$nextTick(()=>{
+                setTimeout(()=>{
+                    this.$emit('update:allScript', this.dataSource)
+                },100)
+                
+            })
+            
+            this.handleClose()
+        },
+        handleClose() {
+            this.topMiddle = false
+            if (!!!this.projectId) {
+                this.keyValue = ''
+            }
+        },
+        // allData() {
+        //   getAction('/ctop/product/getUserProductList', {
+        //     userId: this.userInfo().id,
+        //     pageSize: this.ipagination.pageSize,
+        //     pageNo: this.ipagination.current,
+        //   }).then((res) => {
+        //     if (res.code == 0) {
+        //       this.data = res.result.records.map((item, index) => {
+        //         return {
+        //           ...item,
+        //           projectId: item.projectId + '',
+        //           key: index,
+        //         }
+        //       })
+        //       this.dataElse = res.result.records.map((item, index) => {
+        //         return {
+        //           ...item,
+        //           projectId: item.projectId + '',
+        //           key: index,
+        //         }
+        //       })
+        //     }
+        //   })
+        // },
+        handleInfiniteOnLoad() {
+            const data = this.data
+            this.loading = true
+            this.ipagination.current++
+            // this.fetchData((res) => {
+            //   this.data = data.concat(res.results)
+            //   this.loading = false
+            // })
+            // getAction('/ctop/product/getUserProductList', {
+            //     userId: this.userInfo().id,
+            //     pageSize: this.ipagination.pageSize,
+            //     pageNo: this.ipagination.current,
+            //     productName: this.keyValue
+            // }).then(res => {
+            //     if (res.code == 0) {
+            //         this.busy = true
+            //         let defaultList = res.result.records.map((item, index) => {
+            //             return {
+            //                 ...item,
+            //                 projectId: item.projectId + ''
+            //             }
+            //         })
+            //         this.data = data.concat()
+            //         if (this.type === 'taobao') {
+            //             this.data = defaultList.filter(item => item.productId === 1410280)
+            //         } else {
+            //             this.data = data.concat(defaultList)
+            //         }
+            //         // this.data = res.result.records.map((item, index) => {
+            //         //   return {
+            //         //     ...item,
+            //         //     projectId: item.projectId + '',
+            //         //     key: index,
+            //         //   }
+            //         // })
+            //         // this.dataElse = res.result.records.map((item, index) => {
+            //         //   return {
+            //         //     ...item,
+            //         //     projectId: item.projectId + '',
+            //         //     key: index,
+            //         //   }
+            //         // })
+            //     }
+            // })
+        }
+    },
+    watch: {
+        projectId(n, o) {
+            if (n == '') {
+                this.keyValue = ''
+            } else {
+            }
+        }
+    },
+    mounted() {}
+}
+</script>
+
+<style type="text/css">
+.plug-timer-grid {
+    width: 100%;
+}
+
+.plug-timer-grid td,
+.plug-timer-grid th {
+    border: 1px solid #97b4d1;
+    text-align: center; /*cursor:pointer;*/
+    font-size: 10px;
+    line-height: 10px;
+}
+
+.Selected {
+    background-color: rgb(102, 162, 243);
+    opacity: 0.5;
+}
+
+.plug-timer-grid {
+    border-collapse: collapse;
+    z-index: 4;
+}
+
+.plug-timer-grid thead tr {
+    display: table-row;
+    vertical-align: inherit;
+    border-color: inherit;
+}
+
+.group-creat table td {
+    height: 20px;
+    max-width: 5px;
+    font-size: 12px;
+    text-align: center;
+    vertical-align: middle;
+    overflow: hidden;
+    transition: background 0.5s;
+    -webkit-transition: background 0.5s;
+}
+
+.plug-timer-grid tbody th {
+    width: 4%;
+}
+
+.plug-timer-grid tbody tr td {
+    width: 2%;
+}
+
+/*.clear{*/
+/*  margin:20px 0px 20px 0px;*/
+/*}*/
+</style>

+ 85 - 43
src/views/modules/script/index.vue

@@ -261,7 +261,7 @@
                                 <a-range-picker
                                     v-decorator="[
                                         'timeRange',
-                                        { initialValue: [moment().subtract(6, 'days'), moment()] }
+                                        { initialValue: [moment().subtract(1, 'months'), moment()] }
                                     ]"
                                     :ranges="dateRanges"
                                     :disabled-date="disabledDate"
@@ -347,15 +347,22 @@
                         style="word-break: break-all;font-size:16px;font-weight:600"
                         id="outTable"
                         ref="accountTable"
+                        rowKey="number"
                         :customRow="rowClick"
                         :rowSelection="tabKey == 1 ? null : { selectedRowKeys, onChange: onSelectChange }"
                     >
-                        <span slot="query_word_lst" slot-scope="text, record">
-                            {{ text.join() }}
+                        <span slot="query_word" slot-scope="text, record">
+                            {{ Array.isArray(text) ? text.join() : text }}
+                        </span>
+                        <span slot="recommended_word" slot-scope="text, record">
+                            {{ !!text[0] ? text.join() : '-' }}
                         </span>
                         <span slot="script_num" slot-scope="text, record">
                             {{ text ? text : '-' }}
                         </span>
+                        <span slot="action" slot-scope="text, record">
+                            <a @click.stop="deleteScript(record)">删除</a>
+                        </span>
                     </a-table>
                     <a-pagination
                         size="small"
@@ -381,19 +388,8 @@
             @cancel="handleCancelAll"
             @ok="handleBudgetSure"
         >
-            <a-form-item label="关键字">
-                <a-select
-                    v-model="scriptLabel"
-                    :token-separators="[',', ' ', ',']"
-                    mode="tags"
-                    style="width: 320px"
-                    placeholder="按回车生成关键字"
-                    dropdownClassName="display-none-selset"
-                    @change="handleEnterChang"
-                >
-                </a-select>
-            </a-form-item>
-            <div class="adver-position-radio">
+            <keyWord :projectId.sync="scriptLabel" :allScript.sync="creativeTag" ref="selectTable" />
+            <!-- <div class="adver-position-radio">
                 <div class="creative-label-content">
                     <p>已选:{{ creativeTag.length || 0 }}</p>
                     <div class="label-content-select-tag">
@@ -408,7 +404,7 @@
                         </a-tag>
                     </div>
                 </div>
-            </div>
+            </div> -->
         </a-modal>
     </div>
 </template>
@@ -425,6 +421,7 @@ import selectCheckAll from '@/views/modules/kuaishouapp/account/stepForm/stepMod
 import qs from 'qs'
 import { mapGetters } from 'vuex'
 import selectTreeAccount from '@/components/formComponents/selectAccount.vue'
+import keyWord from './components/keyWord.vue'
 function tqFun(qcArr1) {
     var tempArr = []
     function bbFun(qcArr) {
@@ -442,11 +439,17 @@ function tqFun(qcArr1) {
 let TTcolumns = [
     {
         title: '关键字',
-        dataIndex: 'query_word_lst',
-        scopedSlots: { customRender: 'query_word_lst' },
+        dataIndex: 'query_word',
+        scopedSlots: { customRender: 'query_word' },
+        align: 'center',
+        key: 'query_word'
+    },
+    {
+        title: '推荐词',
+        dataIndex: 'recommended_word',
+        scopedSlots: { customRender: 'recommended_word' },
         align: 'center',
-        key: 'query_word_lst',
-        width: 600
+        key: 'recommended_word'
     },
     {
         title: '创建时间',
@@ -461,6 +464,13 @@ let TTcolumns = [
         scopedSlots: { customRender: 'operator' },
         align: 'center',
         key: 'operator'
+    },
+    {
+        title: '操作',
+        dataIndex: 'action',
+        scopedSlots: { customRender: 'action' },
+        align: 'center',
+        key: 'action'
     }
 ]
 
@@ -508,7 +518,8 @@ export default {
         ARow,
         checkBoxGroup,
         selectCheckAll,
-        selectTreeAccount
+        selectTreeAccount,
+        keyWord
     },
 
     data() {
@@ -517,7 +528,9 @@ export default {
             scriptLabel: [],
             creativeTag: [],
             selectedRowKeys: [],
+            selectedRowKeysAll: [],
             selectionRows: [],
+            selectionRowsAll: [],
             downLoading: false,
             config_id: null,
             appIds: [],
@@ -596,7 +609,7 @@ export default {
             SHOW_PARENT,
 
             type: 3,
-            dateValue: [moment().subtract(7, 'days'), moment()],
+            dateValue: [moment().subtract(30, 'days'), moment()],
 
             operate: '',
             designList: [],
@@ -626,7 +639,7 @@ export default {
             projectId: undefined,
             projectIdAll: undefined,
             dataLoading: false,
-            url: process.env.VUE_APP_BASE_SCRIPT_URL + '/get_script_config_lst',
+            url: process.env.VUE_APP_BASE_SCRIPT_URL + '/get_script_config_lst/',
             modifyPriceVisible: false,
             modifyPriceLoading: false,
             modifyPriceDetail: null,
@@ -640,7 +653,30 @@ export default {
     methods: {
         moment,
         ...mapGetters(['userInfo']),
+        deleteScript(item) {
+            let that = this
+            this.$confirm({
+                title: '确定要删除此条脚本?',
+                content: '',
+                onOk() {
+                    var params = {}
+                    params.config_id = item.config_id
+                    params.user_id = item.user_id
+                    params.operator = item.operator
+                    that.postDataAction(process.env.VUE_APP_BASE_SCRIPT_URL + '/delete_script_config/', params).then(
+                        res => {
+                            if (res.success) {
+                                const paramsData = that.form.getFieldsValue()
+                                that.handleGetTableList(paramsData)
+                            }
+                        }
+                    )
+                },
+                onCancel() {}
+            })
+        },
         handleOkDownLoad() {
+            this.selectionRows = tqFun(this.selectionRowsAll)
             if (this.selectionRows.length > 0) {
                 this.downLoading = true
                 let params = this.selectionRows.map(item => {
@@ -651,7 +687,7 @@ export default {
                     }
                 })
 
-                downFilePost(process.env.VUE_APP_BASE_SCRIPT_URL + '/export_script_file', params).then(res => {
+                downFilePost(process.env.VUE_APP_BASE_SCRIPT_URL + '/export_script_file/', params).then(res => {
                     this.downLoading = false
                     let blob = new Blob([res], {
                         type: 'application/vnd.openxmlformats-officedocument.spre1adsheetml.sheet'
@@ -707,10 +743,10 @@ export default {
                 this.$message.error('请输入关键字')
             } else {
                 var params = {}
-                params.query_word_lst = this.creativeTag
+                params.query_word_pair = this.creativeTag
                 params.operator = this.userInfo().realname
                 params.user_id = this.userInfo().id
-                this.postDataAction(process.env.VUE_APP_BASE_SCRIPT_URL + '/add_script_config', params).then(res => {
+                this.postDataAction(process.env.VUE_APP_BASE_SCRIPT_URL + '/add_script_config/', params).then(res => {
                     if (res.success) {
                         this.handleCancelAll()
                         this.creativeTag = []
@@ -734,6 +770,14 @@ export default {
         onSelectChange(selectedRowKeys, selectionRows) {
             this.selectedRowKeys = selectedRowKeys
             this.selectionRows = selectionRows
+
+            for (let i = 0; i < this.ipagination.current; i++) {
+                this.selectedRowKeysAll.push([])
+                this.selectionRowsAll.push([])
+            }
+            this.selectedRowKeysAll[this.ipagination.current - 1] = selectedRowKeys
+            this.selectionRowsAll[this.ipagination.current - 1] = selectionRows
+            console.log(this.selectedRowKeysAll,this.selectionRowsAll)
         },
         getDataSource(current, pageSize) {
             console.log(pageSize)
@@ -742,8 +786,12 @@ export default {
             this.$nextTick(() => {
                 this.ipagination.current = current
                 this.ipagination.pageSize = pageSize
-                this.selectedRowKeys = []
-                this.selectionRows = []
+                for (let i = 0; i < this.ipagination.current; i++) {
+                    this.selectedRowKeysAll.push([])
+                    this.selectionRowsAll.push([])
+                }
+                this.selectedRowKeys = this.selectedRowKeysAll[current - 1]
+                this.selectionRows = this.selectionRowsAll[current - 1]
                 const paramsData = this.form.getFieldsValue()
                 this.handleGetTableList(paramsData)
             })
@@ -752,6 +800,8 @@ export default {
             this.ipagination.current = 1
             this.selectedRowKeys = []
             this.selectionRows = []
+            this.selectedRowKeysAll = []
+            this.selectionRowsAll = []
             event.preventDefault()
             const paramsData = this.form.getFieldsValue()
             this.handleGetTableList(paramsData)
@@ -765,6 +815,8 @@ export default {
             this.ipagination.current = 1
             this.selectedRowKeys = []
             this.selectionRows = []
+            this.selectedRowKeysAll = []
+            this.selectionRowsAll = []
             this.form.resetFields()
             if (this.tabKey == 1) {
                 this.projectId = undefined
@@ -803,6 +855,7 @@ export default {
                         // }
 
                         this.ipagination.total = result.total_num || 0
+
                         // result.result.total
                     } else {
                         this.$message.error(result.message)
@@ -835,13 +888,14 @@ export default {
             this.columns = this.tabKey == 1 ? [...TTcolumns] : [...KScolumns]
             this.url =
                 this.tabKey == 1
-                    ? process.env.VUE_APP_BASE_SCRIPT_URL + '/get_script_config_lst'
-                    : process.env.VUE_APP_BASE_SCRIPT_URL + '/get_query_word_task_info_lst'
+                    ? process.env.VUE_APP_BASE_SCRIPT_URL + '/get_script_config_lst/'
+                    : process.env.VUE_APP_BASE_SCRIPT_URL + '/get_query_word_task_info_lst/'
             if (this.tabKey == 1) {
                 this.config_id = null
             }
             this.selectedRowKeys = []
             this.selectionRows = []
+            this.form.resetFields()
             const paramsData = this.form.getFieldsValue()
             this.handleGetTableList(paramsData)
         },
@@ -855,18 +909,6 @@ export default {
             }
         },
 
-        tableChange(pagination, filters, sorter, { currentDataSource }) {
-            console.log(pagination)
-            this.ipagination.current = pagination.current
-            this.ipagination.pageSize = pagination.pageSize
-            // if (sorter.order) {
-            //     this.order = sorter.order ? sorter.order : 'descend'
-            //     this.target = sorter.columnKey
-            // }
-            const paramsData = this.form.getFieldsValue()
-            this.handleGetTableList(paramsData)
-        },
-
         // table区域的tab切换
         tableTabChange(key) {
             if (key == 1) {