zhuxinbo 5 سال پیش
والد
کامیت
eb7432d0b9
3فایلهای تغییر یافته به همراه320 افزوده شده و 18 حذف شده
  1. 45 15
      src/views/modules/kuaishouapp/account/stepForm/Step3.vue
  2. 272 0
      src/views/modules/material/scriptMaterialNew.vue
  3. 3 3
      vue.config.js

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

@@ -275,6 +275,7 @@
     <a-modal title="选择素材" v-model="visibleMatemal" @ok="handleOkShow" :width="1000">
       <a-tabs type="card" @change="callback" v-model="active" class="check-video">
         <a-tab-pane :tab="item.label" v-for="item of tab" :key="item.value">
+          <a-range-picker name="buildTime" style="width: 400px;margin:10px 0" v-model="time" />
           <ul v-if="dataSource.length>0" style="overflow:auto;padding-left:0">
             <a-checkbox-group v-model="checkVideo" @change="onChangeVideo">
               <li v-for="(item,index) of dataSource" :key="index" class="chouzhen">
@@ -343,6 +344,8 @@
     data() {
       return {
         visibleMatemal: false,
+        time: [],
+        channelType: 0,
         checkVideo: [],
         dataSource: [],
         tab: [{
@@ -547,15 +550,17 @@
         }
       },
       callback(key) {
+        this.channelType = key
         this.checkVideo = []
         this.ipagination.current = 1
-        var params = {}
-        params.channelType = key
-        params.accountId = localStorage.getItem('accountId')
-        params.materialType = this.getData('creativeMaterialType')
-        params.pageSize = this.ipagination.pageSize
-        params.pageNo = this.ipagination.current
-        this.showVideoList('/kuaishou/batch/getVideoList', params)
+        this.time = []
+        // var params = {}
+        // params.channelType = key
+        // params.accountId = localStorage.getItem('accountId')
+        // params.materialType = this.getData('creativeMaterialType')
+        // params.pageSize = this.ipagination.pageSize
+        // params.pageNo = this.ipagination.current
+        // this.showVideoList('/kuaishou/batch/getVideoList', params)
       },
       getDataSource(page, pageSize) {
         this.ipagination.current = page
@@ -567,6 +572,7 @@
         this.showVideoList('/kuaishou/batch/getVideoList', params)
       },
       showVideoList(url, params) {
+        this.dataSource = []
         getAction(url, params).then(res => {
           if (res.success) {
             this.dataSource = res.result.records
@@ -581,13 +587,14 @@
           this.visibleMatemal = true
           this.checkVideo = []
           this.active = 0
-          var params = {}
-          params.accountId = localStorage.getItem('accountId')
-          params.materialType = this.getData('creativeMaterialType')
-          params.pageSize = this.ipagination.pageSize
-          params.pageNo = this.ipagination.current
-          params.channelType = 0
-          this.showVideoList('/kuaishou/batch/getVideoList', params)
+          this.time = []
+        //   var params = {}
+        //   params.accountId = localStorage.getItem('accountId')
+        //   params.materialType = this.getData('creativeMaterialType')
+        //   params.pageSize = this.ipagination.pageSize
+        //   params.pageNo = this.ipagination.current
+        //   params.channelType = 0
+        //   this.showVideoList('/kuaishou/batch/getVideoList', params)
         } else {
           this.$refs.check.showCheck(
             this.getData('creativeMaterialType'),
@@ -1131,7 +1138,30 @@
         }
       }
     },
-    watch: {},
+    watch: {
+      time(n, o) {
+        console.log(n)
+        if (n.length > 0) {
+          var params = {}
+          params.accountId = localStorage.getItem('accountId')
+          params.materialType = this.getData('creativeMaterialType')
+          params.pageSize = this.ipagination.pageSize
+          params.pageNo = 1
+          params.channelType = this.channelType
+          params.startDate = moment(n[0]).format('YYYY-MM-DD')
+          params.endDate = moment(n[1]).format('YYYY-MM-DD')
+          this.showVideoList('/kuaishou/batch/getVideoList', params)
+        } else {
+          var params = {}
+          params.accountId = localStorage.getItem('accountId')
+          params.materialType = this.getData('creativeMaterialType')
+          params.pageSize = this.ipagination.pageSize
+          params.pageNo = 1
+          params.channelType = this.channelType
+          this.showVideoList('/kuaishou/batch/getVideoList', params)
+        }
+      }
+    },
     mounted: function () {
       if (localStorage.getItem('pans')) {
         this.pans = JSON.parse(localStorage.getItem('pans')).map(item => {

+ 272 - 0
src/views/modules/material/scriptMaterialNew.vue

@@ -0,0 +1,272 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <!-- <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-input placeholder="请输入广告主开户主体名称" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="6">
+            <a-form-item label="行业">
+              <j-tree-select
+                v-model="queryParam.industryId"
+                ref="treeSelect"
+                placeholder="请选择行业"
+                dict="sys_category,name,id"
+                pidField="pid"
+                pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
+              >
+              </j-tree-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :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>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div> -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator" style="float:right">
+      <!-- <a-button @click="handleAddElse" type="primary" icon="plus">新增</a-button> -->
+      <a-dropdown :trigger="['click']">
+        <a class="ant-dropdown-link" @click="e => e.preventDefault()">
+          Click me
+          <a-icon type="down" />
+        </a>
+        <a-menu slot="overlay">
+          <a-menu-item key="0">
+            <a href="http://www.alipay.com/">1st menu item</a>
+          </a-menu-item>
+          <a-menu-item key="1">
+            <a href="http://www.taobao.com/">2nd menu item</a>
+          </a-menu-item>
+          <a-menu-divider />
+          <a-menu-item key="3">
+            3rd menu item
+          </a-menu-item>
+        </a-menu>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
+        :pagination="ipagination" :loading="loading" @change="handleTableChange">
+        <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-modal title="新建文件" v-model="visible" @ok="handleSubmit" :width="800"
+        :okButtonProps="{ props: { disabled: false } }" :cancelButtonProps="{ props: { disabled: false } }">
+
+      </a-modal>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <j-select-user ref="userForm" @ok="modalFormOk"></j-select-user>
+  </a-card>
+</template>
+
+<script>
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import JTreeSelect from '@/components/jeecg/JTreeSelect'
+  import AFormItem from 'ant-design-vue/es/form/FormItem'
+  import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
+  import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
+  import JSelectUser from '@/components/jeecgbiz/JSelectUser'
+  // import { postAction } from '../../../api/manage'
+  import {
+    getAction,
+    postAction,
+    postFile,
+    deleteAction
+  } from '@/api/manage'
+  import {
+    mapActions,
+    mapGetters
+  } from 'vuex'
+
+  export default {
+    name: 'AdvertiserList',
+    mixins: [JeecgListMixin],
+    components: {
+      AFormItem,
+      JTreeSelect,
+      JSelectUserByDep,
+      JSelectDepart,
+      JSelectUser
+    },
+    data() {
+      return {
+        departDisabled: false, //是否是我的部门调用该页面
+        users: this.userInfo().realname, //用户名称
+        departmentId: this.userInfo().departId, //部门id
+        description: '广告主信息表管理页面',
+        visible: false,
+        accountName: '',
+        password: '',
+        mode: 'login',
+        showLogin: true,
+        showAuthorization: false,
+        authorizationType: 'kuaishou',
+        loginType: 'kuaishou',
+        form: this.$form.createForm(this),
+        // 表头
+        columns: [{
+            title: '脚本名称',
+            align: 'center',
+            dataIndex: 'name'
+          },
+          {
+            title: '分类',
+            align: 'center',
+            dataIndex: 'industryId_dictText'
+          },
+          {
+            title: '项目名称',
+            align: 'center',
+            dataIndex: 'contact'
+          },
+          {
+            title: '上传人',
+            align: 'center',
+            dataIndex: 'mobile'
+          },
+          {
+            title: '发布时间',
+            align: 'center',
+            dataIndex: 'email'
+          },
+
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: 'center',
+            scopedSlots: {
+              customRender: 'action'
+            }
+          }
+        ],
+        url: {
+          list: '/ctop/wpsFile/list',
+          delete: '/ctop/advertiser/delete',
+          deleteBatch: '/ctop/advertiser/deleteBatch',
+          exportXlsUrl: 'ctop/advertiser/exportXls',
+          importExcelUrl: 'ctop/advertiser/importExcel',
+          bindAccountLoginUrl: '/ctop/bindAccountLogin/login',
+          bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
+          getLoginInfo: '/ctop/bindAccount/getLoginInfo',
+          userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url
+          userWithDepart: '/sys/user/userDepartList' // 引入为指定用户查看部门信息需要的url
+        }
+      }
+    },
+    computed: {
+      importExcelUrl: function () {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+      }
+    },
+    created() {
+      this.queryParam.userId = this.userInfo().id
+    },
+    methods: {
+      ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      handleAddElse() {
+
+      },
+      searchRe() {
+        this.queryParam.name = ''
+        this.queryParam.industryId = ''
+        this.loadData()
+      },
+      handleSubmit() {
+        let params = {}
+        params.advertiserId = this.record.id
+        params.advertiser_name = this.record.name
+        params.userId = this.userInfo().id
+        params.userName = this.userInfo().realname
+        params.projectId = this.record.projectId
+        params.projectName = this.record.projectName
+
+        // 触发表单验证
+        this.form.validateFields(err => {
+          if (!err) {
+            if (this.mode == 'login') {
+              params.accountName = this.accountName
+              params.password = this.password
+              params.loginType = this.loginType
+              if (this.loginType == 'kuaishou') {
+                params.mediaId = 2
+              } else if (this.loginType == 'bytedance') {
+                params.mediaId = 1
+              }
+              postAction(this.url.bindAccountLoginUrl, params).then(res => {
+                if (res.success) {
+                  alert('绑定成功')
+                  this.accountName = ''
+                  this.password = ''
+                  this.loginType = ''
+                } else {
+                  alert(res.message)
+                }
+              })
+            }
+            // 授权登录
+            if (this.mode == 'authorization') {
+              params.authorizationType = this.authorizationType
+              if (this.authorizationType == 'kuaishou') {
+                params.mediaId = 2
+              } else if (this.authorizationType == 'bytedance') {
+                params.mediaId = 1
+              }
+              postAction(this.url.bindAuthorizationUrl, params).then(res => {
+                if (res.success) {
+                  window.open(res.message, '_blank')
+                } else {
+                  alert('绑定失败')
+                }
+              })
+            }
+          }
+        })
+      },
+
+      onChageLogin() {
+        console.log(this.mode)
+        if (this.mode == 'login') {
+          this.showLogin = true
+          this.showAuthorization = false
+        } else {
+          this.showLogin = false
+          this.showAuthorization = true
+        }
+      },
+      showModal(record) {
+        this.record = record
+        this.visible = true
+      },
+
+      handleCancel() {
+        this.close()
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 3 - 3
vue.config.js

@@ -65,15 +65,15 @@ module.exports = {
        },*/
       '/jeecg-boot': {
         // target: 'http://39.97.120.42:8080', //请求本地 需要jeecg-boot后台项目  生产环境
-        // target: 'http://39.106.184.70:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.1.13:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.1.22:8080', //请求本地 需要jeecg-boot后台项目  英豪
-        // target: 'http://192.168.0.125:8080', //请求本地 需要jeecg-boot后台项目  英豪
+        target: 'http://192.168.0.111:8080', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.103:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.54:8080', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.165:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        target: 'http://192.168.1.251:80', //请求本地 需要jeecg-boot后台项目 
+        // target: 'http://192.168.1.251:80', //请求本地 需要jeecg-boot后台项目 
+        // target:'http://39.97.120.42:8088',
         ws: false,
         changeOrigin: true
       },