Ver Fonte

2020-01-11提交

zhuxinbo há 5 anos atrás
pai
commit
916b1ea4da

+ 2 - 0
public/index.html

@@ -11,6 +11,8 @@
   <style>
     html,
     body,
+
+
     #app {
       height: 100%;
       margin: 0px;

BIN
public/logo.png


BIN
public/logo1.png


+ 3 - 3
src/mixins/JeecgListMixin.js

@@ -144,13 +144,13 @@ export const JeecgListMixin = {
       if (this.superQueryParams) {
         sqp['superQueryParams'] = encodeURI(this.superQueryParams)
       }
+      if(this.queryParam.createTime){
+        this.queryParam.createTime = this.editDate(this.queryParam.createTime)
+      }
       var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
       param.field = this.getQueryField();
       param.pageNo = this.ipagination.current;
       param.pageSize = this.ipagination.pageSize;
-      if(param.createTime){
-        param.createTime = this.editDate(param.createTime)
-      }
       return filterObj(param);
     },
     getQueryField() {

+ 6 - 3
src/views/modules/Statistics/components/Treeselect.vue

@@ -109,7 +109,7 @@ export default {
               parentNode.children = res.result.map(item => {
                 return {
                   id: item.accountId,
-                  label: item.userName + '         ' + item.authName
+                  label: item.userName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.authName
                 }
               })
               callback()
@@ -127,10 +127,13 @@ export default {
       //我参与的
       getAction('/ctop/projectMember/participateList', { userId: this.userInfo().id }).then(res => {
         if (res.code == 0) {
-          this.options = res.result.map(item => {
+          var data = res.result.filter(item => {
+            return item.mediaId == 2
+          })
+          this.options = data.map(item => {
             return {
               id: item.projectId,
-              label: item.projectName,
+              label: item.projectName + '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + item.advertiserName,
               children: null
             }
           })

+ 240 - 0
src/views/modules/Statistics/components/selecTable.vue

@@ -0,0 +1,240 @@
+<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;
+}
+</style>
+<template>
+  <a-form-item
+    label="项目名称"
+    :label-col="labelCol"
+    :wrapper-col="wrapperCol"
+    v-clickoutside="handleClose"
+    style="width:100%"
+    class="select-table"
+  >
+    <a-input placeholder="请选择项目" @focus=";(topMiddle = true), allData()" v-model="keyValue" @change="getData" />
+    <div
+      style="background:white;padding:10px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.15);position:relative;z-index:1000"
+      v-if="topMiddle"
+    >
+      <a-table
+        :showHeader="false"
+        :columns="columns"
+        :dataSource="data"
+        bordered
+        :pagination="false"
+        :scroll="{ y: 300 }"
+        :customRow="rowClick"
+      >
+        <span slot="mediaId" slot-scope="text">{{ text == '1' ? '头条' : '快手' }}</span>
+      </a-table>
+    </div>
+  </a-form-item>
+</template>
+
+<script>
+import { getAction, postAction } from '@/api/manage'
+import moment from 'moment'
+import { mapGetters } from 'vuex'
+import jq from 'jquery'
+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__
+  }
+}
+const columns = [
+  {
+    title: '',
+    dataIndex: 'projectName',
+    align: 'center'
+  },
+  {
+    title: '',
+    dataIndex: 'mediaId',
+    scopedSlots: { customRender: 'mediaId' },
+    width: 80,
+    align: 'center'
+  },
+
+  {
+    title: '',
+    dataIndex: 'advertiserName',
+    align: 'center'
+  }
+]
+export default {
+  name: 'BaseForm',
+  components: {},
+  directives: { clickoutside },
+  props: {
+    projectId: {
+      type: String,
+      default() {
+        return ''
+      }
+    }
+  },
+
+  data() {
+    return {
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 12 }
+      },
+      selectedRowKeys: [],
+      selectedRowKeysValue: [],
+      topMiddle: false,
+      keyValue: '',
+      columns,
+      data: [],
+      dataElse: [],
+      rowClick: (record, index) => ({
+        // 事件
+        on: {
+          click: () => {
+            var str = record.mediaId == '1' ? '头条' : '快手'
+            this.keyValue = record.projectName + ' ' + str
+            this.topMiddle = false
+            this.data = this.dataElse
+            this.$emit('update:projectId', record.projectId)
+          }
+        }
+      })
+    }
+  },
+  computed: {},
+  filters: {},
+  methods: {
+    ...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.data = this.dataElse.filter(item => {
+          return item.projectName.toLowerCase().indexOf(this.keyValue.toLowerCase()) > -1
+        })
+      }
+    },
+    handleClose() {
+      this.topMiddle = false
+    },
+    allData() {
+      getAction('/ctop/projectMember/participateList', { userId: this.userInfo().id }).then(res => {
+        if (res.code == 0) {
+          this.data = res.result.map((item, index) => {
+            return {
+              ...item,
+              projectId: item.projectId + '',
+              key: index
+            }
+          })
+          this.dataElse = res.result.map((item, index) => {
+            return {
+              ...item,
+              projectId: item.projectId + '',
+              key: index
+            }
+          })
+        }
+      })
+    }
+  },
+  watch: {
+    projectId(n, o) {
+      if (n == '') {
+        this.keyValue = ''
+      } else {
+      }
+    }
+  },
+  mounted: function() {
+    this.allData()
+  }
+}
+</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;
+  border: 1px solid #dfe6ec;
+  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>

+ 2 - 1
src/views/modules/appad/KuaishouAppProductList.vue

@@ -33,7 +33,8 @@
         :columns="columns"
         :dataSource="dataSource"
         :pagination="ipagination"
-        :loading="loading">
+        :loading="loading"
+        @change="handleTableChange">
 
 
       </a-table>

+ 39 - 25
src/views/modules/kuaishouapp/account/accountIndex.vue

@@ -67,7 +67,18 @@
           :pagination="ipagination"
           :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
         >
-          <a slot="campaignName" slot-scope="text, record" @click="toDetail(record)">{{ text }}</a>
+          <template slot="campaignName" slot-scope="text, record">
+            <div style="display:flex;justify-content: center;">
+              <a @click="toDetail(record)" class="count" v-show="!record.editName">{{ text }}</a>
+              <a-input v-show="record.editName" v-model="record.campaignName" style="width:150px" @fouse.stop />
+              <a-icon
+                :type="record.editName ? 'check' : 'edit'"
+                @click.stop=";(record.editName = !record.editName), editShowName(record)"
+                style="margin-left:10px"
+                class="count"
+              />
+            </div>
+          </template>
           <span slot="action" slot-scope="text, record">
             <a-switch v-model="record.showSwich" @change="onChangeSwitch(record)" />
           </span>
@@ -121,7 +132,7 @@ import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
 
 var columns = [
   {
-    title: '操作',
+    title: '开关',
     align: 'center',
     dataIndex: 'action',
     fixed: 'left',
@@ -136,7 +147,6 @@ var columns = [
     width: 300,
     scopedSlots: { customRender: 'campaignName' }
   },
-
   {
     title: '计划单日预算金额',
     align: 'center',
@@ -190,6 +200,8 @@ export default {
   },
   data: function() {
     return {
+      form: this.$form.createForm(this),
+      visibleEdit: false,
       allType: '1',
       duration: 1000,
       showEdit: false,
@@ -208,27 +220,7 @@ export default {
       rowClick: (record, index) => ({
         // 事件
         on: {
-          dblclick: () => {
-            // 点击改行时要做的事情
-            // localStorage.setItem('advertisingGroupKey', record.campaignId)
-            // localStorage.setItem('accountId', this.appId)
-            // if (localStorage.getItem('advertisingGroup')) {
-            //   var dataElse = JSON.parse(localStorage.getItem('advertisingGroup'))
-            //   console.log(dataElse)
-            //   for (let i = 0; i < dataElse.length; i++) {
-            //     if (dataElse[i].key == record.key) {
-            //       this.$router.replace({ path: '/account/advertisingGroup' })
-            //       return
-            //     }
-            //   }
-            //   dataElse.push(record)
-            //   localStorage.setItem('advertisingGroup', JSON.stringify(dataElse))
-            // } else {
-            //   var data = [record]
-            //   localStorage.setItem('advertisingGroup', JSON.stringify(data))
-            // }
-            // this.$router.replace({ path: '/account/advertisingGroup' })
-          }
+          dblclick: () => {}
         }
       }),
       ipagination: {
@@ -246,7 +238,10 @@ export default {
         },
         total: 0
       },
-      url: {}
+      url: {},
+      type: '',
+      campaignName: '',
+      campaignBudget: 'UNLIMITED'
     }
   },
   filters: {
@@ -272,6 +267,7 @@ export default {
     }
   },
   methods: {
+    handleOkEdit(e) {},
     toDetail(record) {
       localStorage.setItem('advertisingGroupKey', record.campaignId)
       localStorage.setItem('accountId', this.appId)
@@ -365,6 +361,7 @@ export default {
               ...v,
               key: index,
               edit: false,
+              editName: false,
               showSwich: v.putStatus == 1 ? true : false
             }
           })
@@ -422,6 +419,23 @@ export default {
       }
       console.log(item)
     },
+    editShowName(item) {
+      if (!item.editName) {
+        var params = {}
+        params.accountId = this.appId + ''
+        params.campaignId = item.campaignId
+        params.campaignName = item.campaignName
+        postAction('/kuaishou/batch/updateCampaign', params).then(res => {
+          if (res.result.code == 0) {
+            this.$message.success('修改成功')
+            this.addUser()
+          } else {
+            this.$message.error(res.result.message)
+            this.addUser()
+          }
+        })
+      }
+    },
     dianji() {
       if (this.appId == '') {
         this.$message.error('尚未选择需要创建的账户')

+ 14 - 22
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -63,7 +63,9 @@
               <span slot="action" slot-scope="text, record">
                 <a-switch v-model="record.showSwich" @change="onChangeSwitch(record)" />
               </span>
-
+              <span slot="actionTwo" slot-scope="text, record">
+                <a @click="editDetail(record)">编辑</a>
+              </span>
               <span slot="status" slot-scope="text">{{ text | status }}</span>
               <span slot="putStatus" slot-scope="text">{{ text | putStatus }}</span>
               <span slot="createChannel" slot-scope="text">{{ text | createChannel }}</span>
@@ -152,7 +154,7 @@ import { deleteAction, getAction, postAction } from '@/api/manage'
 import { mapGetters } from 'vuex'
 var columns = [
   {
-    title: '操作',
+    title: '开关',
     align: 'center',
     dataIndex: 'action',
     fixed: 'left',
@@ -185,6 +187,14 @@ var columns = [
     width: 250
   },
   {
+    title: '操作',
+    align: 'center',
+    dataIndex: 'actionTwo',
+    fixed: 'left',
+    width: 100,
+    scopedSlots: { customRender: 'actionTwo' }
+  },
+  {
     title: '广告组状态',
     align: 'center',
     dataIndex: 'status',
@@ -290,26 +300,7 @@ export default {
       rowClick: (record, index) => ({
         // 事件
         on: {
-          dblclick: () => {
-            // 点击改行时要做的事情
-            // localStorage.setItem('originalityKey', record.unitId)
-            // localStorage.setItem('campaignId', record.campaignId)
-            // if (localStorage.getItem('originality')) {
-            //   var dataElse = JSON.parse(localStorage.getItem('originality'))
-            //   for (let i = 0; i < dataElse.length; i++) {
-            //     if (dataElse[i].key == record.unitId) {
-            //       this.$router.replace({ path: '/account/originality' })
-            //       return
-            //     }
-            //   }
-            //   dataElse.push(record)
-            //   localStorage.setItem('originality', JSON.stringify(dataElse))
-            // } else {
-            //   var data = [record]
-            //   localStorage.setItem('originality', JSON.stringify(data))
-            // }
-            // this.$router.replace({ path: '/account/originality' })
-          }
+          dblclick: () => {}
         }
       }),
       ipagination: {
@@ -426,6 +417,7 @@ export default {
         this.getDataList(activeKey)
       }
     },
+    editDetail(item) {},
     toDetail(record) {
       // 点击改行时要做的事情
       localStorage.setItem('originalityKey', record.unitId)

+ 0 - 0
src/views/modules/kuaishouapp/account/editGroup.vue


+ 166 - 0
src/views/modules/kuaishouapp/account/editMatemal.vue

@@ -0,0 +1,166 @@
+<style lang="scss" scoped>
+.actor-photo-list {
+  display: flex;
+  padding-left: 0;
+  li {
+    width: 25%;
+    margin: 10px;
+    position: relative;
+    height: 380px;
+    border: 1px solid #f2f2f2;
+    list-style: none;
+    padding: 10px;
+    img,
+    video {
+      width: 100%;
+      //   margin-top: auto;
+      //   margin-bottom: auto;
+      //   top: 0;
+      //   bottom: 0;
+      //   position: absolute;
+      //   max-height: 350px;
+    }
+  }
+}
+</style>
+<template>
+  <div>
+    <a-modal title="选择素材" v-model="visibleMatemal" @ok="handleOk" @cancel="close" :width="1000">
+      <div>
+        <ul class="actor-photo-list">
+          <a-checkbox-group
+            v-model="checkArr"
+            style="width:100%;  display: flex;padding-left: 0;"
+            @change="onChangeCheck"
+          >
+            <li v-for="(item, index) of dataSource" :key="index">
+              <a-checkbox :value="item" style="position:absolute;z-index:100;padding-right:30px">
+                <video
+                  class="video"
+                  v-if="active == 'video'"
+                  :src="item.url"
+                  controls="controls"
+                  style="min-height:160px"
+                >
+                  您的浏览器不支持 video 标签。
+                </video>
+                <img :src="item.url" v-else alt="" />
+              </a-checkbox>
+            </li>
+          </a-checkbox-group>
+        </ul>
+      </div>
+      <div style="text-align:right">
+        <a-pagination
+          size="small"
+          :showTotal="ipagination.showTotal"
+          style="float:right"
+          v-if="dataSource.length > 0"
+          showQuickJumper
+          :pageSize.sync="ipagination.pageSize"
+          :total="ipagination.total"
+          v-model="ipagination.current"
+          @change="getDataSource"
+        />
+      </div>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { getAction, postAction, postFile } from '@/api/manage'
+import { mapGetters } from 'vuex'
+import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+export default {
+  name: 'check-matemal',
+  components: {},
+
+  data() {
+    return {
+      url: {
+        list: '/kuaishou/batch/getVideoList'
+      },
+      visibleMatemal: false,
+      dataSource: [],
+      columns: [],
+      checkArr: [],
+      active: '',
+      joinVideo: {},
+      ipagination: {
+        current: 1,
+        pageSize: 4,
+        //   pageSizeOptions: ['10', '20', '30'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 共' + total + '条'
+        },
+        showQuickJumper: true,
+        //   showSizeChanger: true,
+        total: 0,
+        onChange: current => {
+          // 切换分页时的回调,
+          // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+          this.ipagination.current = current
+        }
+      }
+    }
+  },
+  watch: {},
+  updated() {
+    stopOtherVideo()
+  },
+  methods: {
+    showCheck(typeName, url, typeString) {
+      this.dataSource = []
+      this.visibleMatemal = true
+      this.active = typeString
+      var params = {}
+      params.accountId = localStorage.getItem('accountId')
+      params.materialType = typeName
+      params.pageSize = this.ipagination.pageSize
+      params.pageNo = this.ipagination.current
+      this.url.list = url
+      this.getData(url, params)
+    },
+    getData(url, params) {
+      getAction(url, params).then(res => {
+        if (res.success) {
+          this.dataSource = res.result.records
+          this.ipagination.total = res.result.total
+        }
+      })
+    },
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
+    handleOk() {
+      this.visibleMatemal = false
+      this.checkArr = []
+      this.ipagination.current = 1
+      this.$emit('showVideo', this.joinVideo, this.active)
+    },
+    close() {},
+    getDataSource(page, pageSize) {
+      this.ipagination.current = page
+      var params = {}
+      params.accountId = localStorage.getItem('accountId')
+      params.materialType = this.numberType
+      params.pageSize = this.ipagination.pageSize
+      params.pageNo = page
+      this.getData(this.url.list, params)
+    },
+    onChangeCheck(checkedList) {
+      console.log(checkedList)
+      //片头
+      if (this.checkArr.length > 1) {
+        this.checkArr.shift()
+        this.joinVideo = checkedList[0]
+      } else if (this.checkArr.length == 1) {
+        this.joinVideo = checkedList[0]
+      } else if (this.checkArr.length == 0) {
+        this.joinVideo = {}
+      }
+    }
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>

+ 246 - 109
src/views/modules/kuaishouapp/account/newMould.vue

@@ -24,11 +24,37 @@
 </style>
 <template>
   <a-card :body-style="{ padding: '24px 32px' }" :bordered="false" class="group-creat">
-    <a-button type="primary" @click="visible = true">
+    <a-row class="image-list-heading vm-panel">
+      <a-col :span="24" style="display:flex">
+        <Treeselect :appId.sync="appId" :multiple="false" style="margin:8px 0px" />
+        <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
+      </a-col>
+    </a-row>
+    <a-button type="primary" @click=";(visible = true), (populationData = {}), (active = 'add')" :disabled="!appId">
       创建模板
     </a-button>
-    <a-modal v-model="visible" title="广告组创建信息" :width="900">
-      <targeted-population ref="population" :populationData.sync="populationData" v-if="visible"></targeted-population>
+    <a-row style="margin-top:15px">
+      <a-table size="middle" :columns="columns" :dataSource="dataList" bordered :pagination="ipagination">
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+      </a-table>
+    </a-row>
+    <a-modal v-model="visible" title="广告组创建信息" :width="900" v-if="visible">
+      <a-form-item
+        label="模板名称"
+        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
+      >
+        <a-input placeholder="请输入模板名称" v-model="name" style="width:100%;position:relative;" />
+      </a-form-item>
+
+      <targeted-population ref="population" :populationData.sync="populationData"></targeted-population>
       <template slot="footer">
         <a-button key="submit" type="primary" @click="handleSubmit">
           确定
@@ -39,122 +65,162 @@
 </template>
 
 <script>
-import { getAction, postAction } from '@/api/manage'
+import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
 import moment from 'moment'
 import { mapGetters } from 'vuex'
 import jq from 'jquery'
-
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
 import targetedPopulation from '@/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue'
 export default {
   name: 'new-mould',
   components: {
-    targetedPopulation
+    targetedPopulation,
+    Treeselect
   },
   data() {
     return {
-      populationData: {
-        platform_os: '1',
-        is_open: '0',
-        gender: '1',
-        network: '1',
-        interest_video: [2, 3],
-        ages_range: ['12', '41'],
-        device_brand: ['2', '9'],
-        device_price: ['5', '9'],
-        fans_star: [2, 3, 4, 5],
-        app_interest: [3, 4],
-        android_osv: '4',
-        business_interest_type: '2',
-        business_interest: [34328, 34330],
-        no_age_break: 0,
-        no_gender_break: 0,
-        no_area_break: 0,
-        region: [
-          11,
-          12,
-          13,
-          14,
-          15,
-          21,
-          22,
-          23,
-          31,
-          32,
-          33,
-          34,
-          35,
-          36,
-          37,
-          41,
-          42,
-          43,
-          44,
-          45,
-          46,
-          50,
-          51,
-          52,
-          53,
-          54,
-          61,
-          62,
-          63,
-          64,
-          65,
-          71,
-          81,
-          82
-        ],
-
-        allForm: {
-          regionType: 'limit',
-          region: [
-            { label: '北京', value: 11 },
-            { label: '天津', value: 12 },
-            { label: '河北', value: 13 },
-            { label: '山西', value: 14 },
-            { label: '内蒙古', value: 15 },
-            { label: '辽宁', value: 21 },
-            { label: '吉林', value: 22 },
-            { label: '黑龙江', value: 23 },
-            { label: '上海', value: 31 },
-            { label: '江苏', value: 32 },
-            { label: '浙江', value: 33 },
-            { label: '安徽', value: 34 },
-            { label: '福建', value: 35 },
-            { label: '江西', value: 36 },
-            { label: '山东', value: 37 },
-            { label: '河南', value: 41 },
-            { label: '湖北', value: 42 },
-            { label: '湖南', value: 43 },
-            { label: '广东', value: 44 },
-            { label: '广西', value: 45 },
-            { label: '海南', value: 46 },
-            { label: '重庆', value: 50 },
-            { label: '四川', value: 51 },
-            { label: '贵州', value: 52 },
-            { label: '云南', value: 53 },
-            { label: '西藏', value: 54 },
-            { label: '陕西', value: 61 },
-            { label: '甘肃', value: 62 },
-            { label: '青海', value: 63 },
-            { label: '宁夏', value: 64 },
-            { label: '新疆', value: 65 },
-            { label: '台湾', value: 71 },
-            { label: '香港', value: 81 },
-            { label: '澳门', value: 82 }
-          ],
-          ageType: 'ageLimit',
-          ages_range: [],
-          age: [],
-          device: '1',
-          price: '1',
-          appType: '1',
-          fansStar: '1',
-          interestVideo: '1'
+      dataList: [],
+      name: '',
+      columns: [
+        {
+          title: '模板名称',
+          align: 'center',
+          dataIndex: 'templateName',
+          scopedSlots: { customRender: 'templateName' }
+        },
+        {
+          title: '创建时间',
+          align: 'center',
+          dataIndex: 'createTime',
+          scopedSlots: { customRender: 'createTime' }
+        },
+        {
+          title: '操作',
+          align: 'center',
+          dataIndex: 'action',
+          scopedSlots: { customRender: 'action' }
         }
+      ],
+      appId: '',
+      populationData: {
+        // platform_os: '1',
+        // is_open: '0',
+        // gender: '1',
+        // network: '1',
+        // interest_video: [2, 3],
+        // ages_range: ['12', '41'],
+        // device_brand: ['2', '9'],
+        // device_price: ['5', '9'],
+        // fans_star: [2, 3, 4, 5],
+        // app_interest: [3, 4],
+        // android_osv: '4',
+        // business_interest_type: '2',
+        // business_interest: [34328, 34330],
+        // no_age_break: 0,
+        // no_gender_break: 0,
+        // no_area_break: 0,
+        // region: [
+        //   11,
+        //   12,
+        //   13,
+        //   14,
+        //   15,
+        //   21,
+        //   22,
+        //   23,
+        //   31,
+        //   32,
+        //   33,
+        //   34,
+        //   35,
+        //   36,
+        //   37,
+        //   41,
+        //   42,
+        //   43,
+        //   44,
+        //   45,
+        //   46,
+        //   50,
+        //   51,
+        //   52,
+        //   53,
+        //   54,
+        //   61,
+        //   62,
+        //   63,
+        //   64,
+        //   65,
+        //   71,
+        //   81,
+        //   82
+        // ],
+        // allForm: {
+        //   regionType: 'limit',
+        //   region: [
+        //     { label: '北京', value: 11 },
+        //     { label: '天津', value: 12 },
+        //     { label: '河北', value: 13 },
+        //     { label: '山西', value: 14 },
+        //     { label: '内蒙古', value: 15 },
+        //     { label: '辽宁', value: 21 },
+        //     { label: '吉林', value: 22 },
+        //     { label: '黑龙江', value: 23 },
+        //     { label: '上海', value: 31 },
+        //     { label: '江苏', value: 32 },
+        //     { label: '浙江', value: 33 },
+        //     { label: '安徽', value: 34 },
+        //     { label: '福建', value: 35 },
+        //     { label: '江西', value: 36 },
+        //     { label: '山东', value: 37 },
+        //     { label: '河南', value: 41 },
+        //     { label: '湖北', value: 42 },
+        //     { label: '湖南', value: 43 },
+        //     { label: '广东', value: 44 },
+        //     { label: '广西', value: 45 },
+        //     { label: '海南', value: 46 },
+        //     { label: '重庆', value: 50 },
+        //     { label: '四川', value: 51 },
+        //     { label: '贵州', value: 52 },
+        //     { label: '云南', value: 53 },
+        //     { label: '西藏', value: 54 },
+        //     { label: '陕西', value: 61 },
+        //     { label: '甘肃', value: 62 },
+        //     { label: '青海', value: 63 },
+        //     { label: '宁夏', value: 64 },
+        //     { label: '新疆', value: 65 },
+        //     { label: '台湾', value: 71 },
+        //     { label: '香港', value: 81 },
+        //     { label: '澳门', value: 82 }
+        //   ],
+        //   ageType: 'ageLimit',
+        //   ages_range: [],
+        //   age: [],
+        //   device: '1',
+        //   price: '1',
+        //   appType: '1',
+        //   fansStar: '1',
+        //   interestVideo: '1'
+        // }
       },
-      visible: false
+      active: 'add',
+      editId: '',
+      visible: false,
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 共' + total + '条'
+        },
+        showQuickJumper: true,
+        onChange: current => {
+          // 切换分页时的回调,
+          // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+          this.ipagination.current = current
+          this.addUser()
+        },
+        total: 0
+      }
     }
   },
   computed: {},
@@ -164,12 +230,83 @@ export default {
       //   this.$refs.population.handleSubmit()
       e.preventDefault()
       this.$refs.population.handleSubmit()
-      console.log(JSON.stringify(this.populationData))
+      var data = this.populationData
+      console.log(JSON.stringify(data))
+      if (this.active == 'add') {
+        postAction('/kuaishou/batch/addDirectionalTemplate', {
+          accountId: this.appId,
+          templateName: this.name,
+          templateContent: JSON.stringify(this.populationData)
+        }).then(res => {
+          console.log(res)
+          if (res.success) {
+            this.visible = false
+            this.populationData = {}
+            this.name = ''
+            this.addUser()
+          }
+        })
+      } else if (this.active == 'edit') {
+        putAction('/kuaishou/batch/editDirectionalTemplate', {
+          id: this.editId,
+          templateName: this.name,
+          templateContent: JSON.stringify(this.populationData)
+        }).then(res => {
+          console.log(res)
+          if (res.success) {
+            this.visible = false
+            this.populationData = {}
+            this.name = ''
+            this.addUser()
+          }
+        })
+      }
     },
     getData(className) {
       return this.form.getFieldValue(className)
+    },
+    handleEdit(item) {
+      this.active = 'edit'
+      this.editId = item.id
+      this.name = item.templateName
+      this.populationData = JSON.parse(item.templateContent)
+      this.visible = true
+    },
+    handleDelete(id) {
+      deleteAction('/kuaishou/batch/deleteeditDirectionalTemplate', { id: id }).then(res => {
+        if (res.success) {
+          this.$message.success('删除成功')
+          this.addUser()
+        } else {
+          this.$message.error(res.message)
+        }
+      })
+    },
+    addUser() {
+      this.loading = true
+      this.dataList = []
+      var params = {}
+      params.accountId = this.appId + ''
+      if (this.appId) {
+        getAction('/kuaishou/batch/getDirectionalTemplate', params).then(res => {
+          console.log(res)
+          if (res.success) {
+            this.dataList = res.result.map((item, index) => {
+              return {
+                ...item,
+                key: index
+              }
+            })
+            this.ipagination.total = res.result.length
+          }
+        })
+      } else {
+        this.$message.error('请选择账户')
+      }
     }
   },
-  mounted: function() {}
+  mounted: function() {
+    //   /kuaishou/batch/getDirectionalTemplate
+  }
 }
 </script>

+ 204 - 3
src/views/modules/kuaishouapp/account/originality.vue

@@ -7,6 +7,12 @@
 .creative-name .ant-table td {
   white-space: nowrap;
 }
+.else-label .ant-form-item-label label::after {
+  content: '';
+  position: relative;
+  top: -0.5px;
+  margin: 0 8px 0 2px;
+}
 </style>
 <template>
   <div class="creative-name">
@@ -37,6 +43,9 @@
               <span slot="action" slot-scope="text, record">
                 <a-switch v-model="record.showSwich" @change="onChangeSwitch(record)" />
               </span>
+              <span slot="actionTwo" slot-scope="text, record">
+                <a @click="editOriginality(record)">编辑</a>
+              </span>
               <span slot="status" slot-scope="text">{{ text | status }}</span>
               <span slot="putStatus" slot-scope="text">{{ text | putStatus }}</span>
               <img slot="coverUrl" slot-scope="text" :src="text" alt="" style="width:100px" />
@@ -45,6 +54,97 @@
         </a-tabs>
       </a-card>
     </a-row>
+    <a-modal v-model="visible" title="修改" @ok="handleOk" :width="800">
+      <a-form @submit="handleSubmit" :form="form" style="margin-top:20px" :hideRequiredMark="true">
+        <a-form-item
+          label="素材类型"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+        >
+          <a-radio-group buttonStyle="solid" v-decorator="['creativeMaterialType', { initialValue: 1 }]">
+            <a-radio-button :value="1">竖版视频</a-radio-button>
+            <a-radio-button :value="2">横版视频</a-radio-button>
+          </a-radio-group>
+        </a-form-item>
+        <a-form-item
+          label=" "
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+          class="else-label"
+        >
+          <a @click="getVideoList('video')">选择视频</a>
+          <br />
+          <video :src="video.url" controls="controls" style="width:25%" v-if="video.url"></video>
+        </a-form-item>
+        <a-form-item
+          label=" "
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+          class="else-label"
+        >
+          <a @click="getVideoList('image')">选择封面</a>
+          <br />
+          <img :src="image.coverUrl" style="width:25%;" v-if="image.coverUrl" />
+        </a-form-item>
+        <a-form-item
+          label="创意标题"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+        >
+          <a-input
+            class="rending"
+            v-decorator="['creativeName', { rules: [{ required: true, message: '请输入创意标题' }] }]"
+          ></a-input>
+        </a-form-item>
+        <a-form-item
+          label="广告语"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+        >
+          <a-textarea
+            class="rending"
+            placeholder="请输入广告语"
+            v-decorator="['description', { rules: [{ required: true, message: '请输入广告语' }] }]"
+            :autosize="{ minRows: 2, maxRows: 6 }"
+          ></a-textarea>
+        </a-form-item>
+        <a-form-item
+          label="行动号召"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 4 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
+        >
+          <a-select
+            v-decorator="['actionBarText', { rules: [{ required: true, message: '行动号召按钮文案' }] }]"
+            showSearch
+            allowClear
+            placeholder="选择行动号召按钮文案"
+            optionFilterProp="children"
+            :filterOption="filterOption"
+          >
+            <a-select-option v-for="appModel in appList" :key="appModel.id" :value="appModel.actionBarText">
+              {{ appModel.actionBarText }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+        <a-form-item
+          label="检测链接"
+          :labelCol="{ lg: { span: 4 }, sm: { span: 2 } }"
+          :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
+        >
+          <a-input
+            v-decorator="[
+              'clickTrackUrl',
+              {
+                rules: [{ required: true, message: '请输入第三方检测链接' }]
+              }
+            ]"
+            placeholder="请输入第三方检测链接"
+          >
+          </a-input>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+    <checkMatemal ref="check" @showVideo="showData"></checkMatemal>
   </div>
 </template>
 
@@ -55,10 +155,13 @@ import moment from 'moment'
 import countTo from 'vue-count-to'
 import { mapGetters } from 'vuex'
 import { deleteAction, getAction, postAction } from '@/api/manage'
+import checkMatemal from './editMatemal'
+import pick from 'lodash.pick'
+
 // import lifting from './components/lifting'
 const columns = [
   {
-    title: '操作',
+    title: '开关',
     align: 'center',
     dataIndex: 'action',
     width: 100,
@@ -70,6 +173,13 @@ const columns = [
     align: 'center'
   },
   {
+    title: '操作',
+    align: 'center',
+    dataIndex: 'actionTwo',
+    width: 100,
+    scopedSlots: { customRender: 'actionTwo' }
+  },
+  {
     title: '封面',
     dataIndex: 'coverUrl',
     scopedSlots: { customRender: 'coverUrl' },
@@ -100,17 +210,23 @@ export default {
   components: {
     ACol,
     ARow,
-    countTo
+    countTo,
+    checkMatemal
   },
 
   data: function() {
     return {
+      visible: false,
+      visibleTwo: false,
+      image: {},
+      video: {},
       duration: 1000,
       showEdit: false,
       many: 1200,
       manyTwo: null,
       columns,
       dataList: [],
+
       rowClick: (record, index) => ({
         // 事件
         on: {
@@ -142,7 +258,10 @@ export default {
       titleKey: null,
       selectedRowKeys: [],
       selectedRowKeysValue: [],
-      allType: '1'
+      allType: '1',
+      form: this.$form.createForm(this),
+      appList: [],
+      creativeId: ''
     }
   },
   filters: {
@@ -173,6 +292,88 @@ export default {
     }
   },
   methods: {
+    editOriginality(item) {
+      this.creativeId = item.creativeId
+
+      getAction('/kuaishou/batch/getActionBarText', { campaignId: localStorage.getItem('campaignId') }).then(res => {
+        if (res.success) {
+          this.appList = res.result
+        }
+      })
+      getAction('/kuaishou/batch/getVideoDetail', {
+        accountId: localStorage.getItem('accountId'),
+        photoId: item.photoId
+      }).then(res => {
+        if (res.success) {
+          console.log(res)
+          this.video.url = res.result.url
+          this.video.photoId = res.result.photoId
+
+          this.image.coverUrl = item.coverUrl
+          this.image.imageToken = item.imageToken
+
+          this.visible = true
+          this.$nextTick(() => {
+            this.form.setFieldsValue(
+              pick(item, ['clickTrackUrl', 'actionBarText', 'creativeName', 'description', 'creativeMaterialType'])
+            )
+          })
+        }
+      })
+    },
+    handleOk() {
+      this.handleSubmit()
+    },
+    handleSubmit() {
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          var params = {
+            photoId: this.video.photoId,
+            imageToken: this.image.imageToken,
+            ...values,
+            creativeId: this.creativeId,
+            accountId: localStorage.getItem('accountId')
+          }
+          console.log(params)
+          postAction('/kuaishou/batch/updateCreative', params).then(res => {
+            console.log(res)
+            if (res.result.code == 0) {
+              this.visible = false
+              this.$message.success('修改成功')
+              this.getDataList(localStorage.getItem('originalityKey'))
+            } else {
+              this.$message.error(res.result.message)
+            }
+          })
+        }
+      })
+    },
+    getVideoList(type) {
+      if (type == 'video') {
+        this.$refs.check.showCheck(this.getData('creativeMaterialType'), '/kuaishou/batch/getVideoList', type)
+      } else {
+        this.$refs.check.showCheck(this.getData('creativeMaterialType'), '/kuaishou/batch/getImageList', type)
+      }
+    },
+    showData(item, type) {
+      if (type == 'video') {
+        this.video = {}
+        console.log(item, 'v')
+        this.video.url = item.url
+        this.video.photoId = item.photoId
+      } else {
+        console.log(item, 'i')
+        this.image = {}
+        this.image.coverUrl = item.url
+        this.image.imageToken = item.imageToken
+      }
+    },
+    getData(className) {
+      return this.form.getFieldValue(className)
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     onChangeSwitch(item) {
       console.log(item)

+ 1 - 60
src/views/modules/kuaishouapp/account/stepForm/Step1.vue

@@ -54,65 +54,6 @@
         ></a-input
         >元
       </a-form-item>
-
-      <!-- <a-form-item
-        v-if="showApp"
-        label="目标应用"
-        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      >
-        <a-select
-          v-model="appId"
-          showSearch
-          allowClear
-          placeholder="选择应用目标"
-          optionFilterProp="children"
-          style="width: 600px"
-          @focus="handleFocus"
-          @blur="handleBlur"
-          @change="handleChange"
-          :filterOption="filterOption"
-        >
-          <a-select-option v-for="appModel in appList" :key="appModel.id" :value="appModel.id"
-            >{{ appModel.appName }}&#12288;&nbsp;&#12288;{{ appModel.appType }}&#12288;&#12288;
-            {{ appModel.appVersion }}</a-select-option
-          >
-        </a-select>
-      </a-form-item>
-
-      <a-form-item
-        v-if="showUrlType"
-        label="转化类型"
-        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      >
-        <a-radio-group v-model="urlType">
-          <a-radio-button value="1">淘宝商品短链</a-radio-button>
-          <a-radio-button value="2">淘宝商品</a-radio-button>
-        </a-radio-group>
-      </a-form-item>
-
-      <a-form-item
-        v-if="showChannelType"
-        label="转化类型"
-        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      >
-        <a-radio-group v-model="channelType">
-          <a-radio-button value="1">填写链接</a-radio-button>
-          <a-radio-button value="2" disabled="disabled">落地页工具</a-radio-button>
-        </a-radio-group>
-      </a-form-item>
-
-      <a-form-item
-        v-if="showRedirect"
-        label="链接地址"
-        :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
-        :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
-      >
-        <a-input v-model="redirectUrl"></a-input>
-      </a-form-item> -->
-
       <a-form-item :wrapperCol="{ span: 24 }" style="text-align: center">
         <a-button htmlType="submit" type="primary" :loading="loading">下一步</a-button>
         <!-- <a-button style="margin-left: 8px">保存</a-button> -->
@@ -182,7 +123,7 @@ export default {
           let params = {}
           params.type = this.type
           //   params.campaignBudget = this.campaignBudget
-          params.dayBudget = this.campaignBudget == 'UNLIMITED' ? 0 : values.dayBudget
+          params.dayBudget = this.campaignBudget == 'UNLIMITED' ? 0 : values.dayBudget * 1000
           params.campaignName = this.campaignName
           params.accountId = localStorage.getItem('accountId')
           console.log(params)

Diff do ficheiro suprimidas por serem muito extensas
+ 156 - 600
src/views/modules/kuaishouapp/account/stepForm/Step2.vue


+ 13 - 13
src/views/modules/kuaishouapp/account/stepForm/Step3.vue

@@ -17,7 +17,7 @@
             :labelCol="{ lg: { span: 2 }, sm: { span: 4 } }"
             :wrapperCol="{ lg: { span: 18 }, sm: { span: 17 } }"
           >
-            <a-radio-group buttonStyle="solid" v-decorator="['creative_material_type', { initialValue: '1' }]">
+            <a-radio-group buttonStyle="solid" v-decorator="['creativeMaterialType', { initialValue: '1' }]">
               <a-radio-button value="1">竖版视频</a-radio-button>
               <a-radio-button value="2">横版视频</a-radio-button>
             </a-radio-group>
@@ -86,7 +86,7 @@
               <a-radio-button value="2">横版视频</a-radio-button>
             </a-radio-group> -->
             <a-select
-              v-decorator="['action_bar_text', { rules: [{ required: true, message: '行动号召按钮文案' }] }]"
+              v-decorator="['actionBarText', { rules: [{ required: true, message: '行动号召按钮文案' }] }]"
               showSearch
               allowClear
               placeholder="选择行动号召按钮文案"
@@ -105,10 +105,10 @@
           >
             <a-input
               v-decorator="[
-                'click_track_url',
+                'clickTrackUrl',
                 {
                   rules: [
-                    { required: pane.bid_type == 6, message: '请输入第三方检测链接' },
+                    { required: pane.bidType == 6, message: '请输入第三方检测链接' },
                     { validator: handleConfirmValue }
                   ]
                 }
@@ -129,14 +129,14 @@
         创建成功:{{ allForm.success.length }}条
         <div style="margin-top:20px">
           <p v-for="(item, index) of allForm.success" :key="index">
-            <span>名称:{{ item.creative_name }}</span>
+            <span>名称:{{ item.creativeName }}</span>
           </p>
         </div>
         <br />
         创建失败:{{ allForm.fail.length }}条
         <div style="margin-top:20px">
           <p v-for="(item, index) of allForm.fail" :key="index">
-            <span>名称:{{ item.creative_name }}</span
+            <span>名称:{{ item.creativeName }}</span
             ><br />
             <span>错误信息:{{ item.failMessage }}</span>
           </p>
@@ -210,7 +210,7 @@ export default {
     getVideoList(type, index, item, bestIndex) {
       if (type == 'video') {
         this.$refs.check.showCheck(
-          this.getData('creative_material_type'),
+          this.getData('creativeMaterialType'),
           '/kuaishou/batch/getVideoList',
           item.videoList,
           type,
@@ -218,7 +218,7 @@ export default {
         )
       } else {
         this.$refs.check.showCheck(
-          this.getData('creative_material_type'),
+          this.getData('creativeMaterialType'),
           '/kuaishou/batch/getImageList',
           item.imageList,
           type,
@@ -279,10 +279,10 @@ export default {
           var dataJson = this.pans[index].list.map(item => {
             return {
               description: item.description,
-              image_tokens: item.imageList.map((ele, index) => {
+              imageTokens: item.imageList.map((ele, index) => {
                 return { image: ele.imageToken, name: index + 1 + '-' + item.name }
               }),
-              photo_id: item.videoList.photoId
+              photoId: item.videoList.photoId
             }
           })
           var params = { dataJson, ...values, unitId: this.pansKey, accountId: localStorage.getItem('accountId') }
@@ -315,7 +315,7 @@ export default {
         videoList: '',
         imageList: [],
         name:
-          this.getData('creative_material_type') == '1'
+          this.getData('creativeMaterialType') == '1'
             ? '自定义创意_竖版视频_' +
               Math.random()
                 .toString(36)
@@ -325,8 +325,8 @@ export default {
                 .toString(36)
                 .substr(2, 4),
         description: '',
-        creative_material_type: '1',
-        action_bar_text: ''
+        creativeMaterialType: '1',
+        actionBarText: ''
       })
     },
     deleteCreative(bestIndex, index) {

Diff do ficheiro suprimidas por serem muito extensas
+ 169 - 658
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue


+ 33 - 15
src/views/modules/material/materialList.vue

@@ -146,8 +146,9 @@ a {
     <div class="table-page-search-wrapper">
       <a-form layout="inline">
         <a-row :gutter="24">
-          <a-col :md="6" :sm="8">
-            <a-form-item label="项目名称">
+          <a-col :md="8" :sm="8">
+            <selectTable :projectId.sync="queryParam.projectId"></selectTable>
+            <!-- <a-form-item label="项目名称">
               <a-select
                 placeholder="请输入项目名称"
                 showSearch
@@ -157,10 +158,12 @@ a {
                 @change="getList"
               >
                 <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
-                  {{ item.projectName }}
+                  {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                    item.mediaId == '1' ? '头条' : '快手'
+                  }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
                 </a-select-option>
               </a-select>
-            </a-form-item>
+            </a-form-item> -->
           </a-col>
           <!-- <a-col :md="6" :sm="8">
             <a-form-item label="剪辑">
@@ -177,12 +180,12 @@ a {
               <a-input placeholder="请输入拍摄" v-model="queryParam.responsible"></a-input>
             </a-form-item>
           </a-col> -->
-          <a-col :md="6" :sm="8">
+          <a-col :md="8" :sm="8">
             <a-form-item label="时间选择">
               <a-date-picker v-model="queryParam.createTime" format="YYYY-MM-DD" style="width:100%" />
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="8">
+          <a-col :md="8" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -375,7 +378,7 @@ a {
         </div>
       </a-tab-pane>
     </a-tabs>
-    <a-modal title="添加素材" v-model="visible" @ok="handleOk" @cancel="close" :maskClosable="false">
+    <a-modal title="添加素材" v-model="visible" @ok="handleOk" @cancel="close" :maskClosable="false" :width="800">
       <a-form :form="form">
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="项目选择">
           <a-select
@@ -386,7 +389,9 @@ a {
             @change="getProjectId"
           >
             <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
-              {{ item.projectName }}
+              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                item.mediaId == '1' ? '头条' : '快手'
+              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
           </a-select>
         </a-form-item>
@@ -616,6 +621,8 @@ import { getAction, postAction, postFile, downFile, downFilePost, deleteAction }
 import { mapGetters } from 'vuex'
 import moment from 'moment'
 
+import selectTable from '@/views/modules/Statistics/components/selecTable.vue'
+
 import BMF from 'browser-md5-file'
 
 import accountCheck from './accountCheck'
@@ -625,7 +632,8 @@ export default {
   components: {
     JEllipsis,
     UploadToAli,
-    accountCheck
+    accountCheck,
+    selectTable
   },
 
   data() {
@@ -750,6 +758,11 @@ export default {
         this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
         this.loadData()
       }
+    },
+    'queryParam.projectId': function(n, o) {
+      if (n != '') {
+        this.getList(n)
+      }
     }
   },
   methods: {
@@ -916,15 +929,20 @@ export default {
     },
     searchRe() {
       this.queryParam.projectId = ''
-      this.queryParam.createTime = ''
+      if (this.queryParam.createTime) {
+        this.queryParam.createTime = ''
+      }
       this.loadData()
     },
     getList(value) {
-      this.mediaId = this.dataElse.filter(item => {
-        if (value == item.projectId) {
-          return item
-        }
-      })[0].mediaId
+      if (value) {
+        this.mediaId = this.dataElse.filter(item => {
+          if (value == item.projectId) {
+            return item
+          }
+        })[0].mediaId
+      }
+
       this.loadData()
     },
     onChangeCheck(checkedList) {

+ 38 - 34
src/views/modules/material/videoMaterial.vue

@@ -143,9 +143,10 @@ a {
     <div class="table-page-search-wrapper">
       <a-form layout="inline">
         <a-row :gutter="24">
-          <a-col :md="6" :sm="8">
-            <a-form-item label="项目名称">
-              <a-select
+          <a-col :md="8" :sm="8">
+            <!-- <a-form-item label="项目名称"> -->
+            <selectTable :projectId.sync="queryParam.projectId"></selectTable>
+            <!-- <a-select
                 placeholder="请输入项目名称"
                 showSearch
                 optionFilterProp="children"
@@ -154,32 +155,19 @@ a {
                 @change="getList"
               >
                 <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
-                  {{ item.projectName }}
+                  {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                    item.mediaId == '1' ? '头条' : '快手'
+                  }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
                 </a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <!-- <a-col :md="6" :sm="8">
-            <a-form-item label="剪辑">
-              <a-input placeholder="请输入剪辑者名称" v-model="queryParam.advertiserId"></a-input>
-            </a-form-item>
+              </a-select> -->
+            <!-- </a-form-item> -->
           </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="编导">
-              <a-input placeholder="请输入编导" v-model="queryParam.responsible"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="拍摄">
-              <a-input placeholder="请输入拍摄" v-model="queryParam.responsible"></a-input>
-            </a-form-item>
-          </a-col> -->
-          <a-col :md="6" :sm="8">
+          <a-col :md="8" :sm="8">
             <a-form-item label="时间选择">
               <a-date-picker v-model="queryParam.createTime" format="YYYY-MM-DD" style="width:100%" />
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="8">
+          <a-col :md="8" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
@@ -404,7 +392,7 @@ a {
         </div>
       </a-tab-pane>
     </a-tabs>
-    <a-modal title="添加素材" v-model="visible" :maskClosable="false">
+    <a-modal title="添加素材" v-model="visible" :maskClosable="false" :width="800">
       <template slot="footer">
         <a-button key="back" @click="close">取消</a-button>
         <a-button key="submit" type="primary" :disabled="!confirmLoading" @click="handleOk">
@@ -413,6 +401,7 @@ a {
       </template>
       <a-form :form="form">
         <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="项目选择">
+          <!-- <selectTable :projectId.sync="projectId" /> -->
           <a-select
             v-decorator="[
               'projectId', // 给表单赋值或拉取表单时,该input对应的key
@@ -424,7 +413,9 @@ a {
             :filterOption="filterOption"
           >
             <a-select-option :value="item.projectId" v-for="item of dataElse" :key="item.id">
-              {{ item.projectName }}
+              {{ item.projectName }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
+                item.mediaId == '1' ? '头条' : '快手'
+              }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ item.advertiserName }}
             </a-select-option>
           </a-select>
         </a-form-item>
@@ -525,7 +516,7 @@ a {
           :label-col="labelCol"
           :wrapper-col="{
             xs: { span: 24 },
-            sm: { span: 18 }
+            sm: { span: 12 }
           }"
           label="描述"
         >
@@ -731,6 +722,8 @@ import qs from 'qs'
 import { mapGetters } from 'vuex'
 import moment from 'moment'
 
+import selectTable from '@/views/modules/Statistics/components/selecTable.vue'
+
 import BMF from 'browser-md5-file'
 import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl'
 import accountCheck from './accountCheck'
@@ -740,11 +733,13 @@ export default {
   components: {
     JEllipsis,
     UploadToAli,
-    accountCheck
+    accountCheck,
+    selectTable
   },
 
   data() {
     return {
+      projectId: '',
       inputVisible: false,
       inputValue: '',
       labelCol: {
@@ -876,6 +871,11 @@ export default {
         this.active = localStorage.getItem('key') ? localStorage.getItem('key') : '0'
         this.loadData()
       }
+    },
+    'queryParam.projectId': function(n, o) {
+      if (n != '') {
+        this.getList(n)
+      }
     }
   },
   methods: {
@@ -976,15 +976,19 @@ export default {
     },
     searchRe() {
       this.queryParam.projectId = ''
-      this.queryParam.createTime = ''
-      this.loadData()
+      if (this.queryParam.createTime) {
+        this.queryParam.createTime = ''
+      }
+      this.loadData(1)
     },
     getList(value) {
-      this.mediaId = this.dataElse.filter(item => {
-        if (value == item.projectId) {
-          return item
-        }
-      })[0].mediaId
+      if (value) {
+        this.mediaId = this.dataElse.filter(item => {
+          if (value == item.projectId) {
+            return item
+          }
+        })[0].mediaId
+      }
       this.loadData()
     },
     onChangeCheck(checkedList) {

+ 1 - 1
vue.config.js

@@ -69,7 +69,7 @@ module.exports = {
         target: 'http://192.168.2.143:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.2.133:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://192.168.2.174:8080', //请求本地 需要jeecg-boot后台项目  祚云
+        // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目  孙震
         
         ws: false,