Browse Source

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-vue

魏志佳 4 years ago
parent
commit
97ecee2855

+ 9 - 0
src/views/modules/Statistics/xiaoshouStatistics.vue

@@ -477,6 +477,15 @@
       align: 'center',
     },
     {
+      title: '销售',
+      dataIndex: 'saleName',
+      scopedSlots: {
+        customRender: 'saleName'
+      },
+      align: 'center',
+    },
+    
+    {
       title: '时间',
       dataIndex: 'statDate',
       // width:200,

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

@@ -1,6 +1,6 @@
 <style lang="scss">
-.display-none-selset{
-  display: none!important;
+.display-none-selset {
+  display: none !important;
 }
 .chouzhen span {
   display: inline-block;
@@ -449,9 +449,23 @@ li.chouzhen.first:before {
               placeholder="按回车生成标签"
               v-decorator="['creativeTag']"
               dropdownClassName="display-none-selset"
-              :token-separators="[',',' ',',']"
+              :token-separators="[',', ' ', ',']"
             >
             </a-select>
+            <a-popconfirm @confirm="getInfo(record)">
+              <div slot="title">
+                <div>
+                  分类名称:
+                  <a-input placeholder="请输入" v-model="tagName" style="display: inline-block; width: 300px" />
+                </div>
+              </div>
+              <!-- <a-button slot="okText" type="primary" :disabled="refuseReason == ''">确定</a-button> -->
+              <!-- <a @click="setData(record)">复制</a> -->
+              <a style="margin-right: 10px" :disabled="!getData('creativeTag')">收藏</a>
+              <!-- @click="collection('creativeTag')" -->
+            </a-popconfirm>
+
+            <a @click="showCunTag('creativeTag')">收藏列表</a>
           </a-form-item>
 
           <!-- @change="createChange" -->
@@ -712,7 +726,10 @@ li.chouzhen.first:before {
         您的浏览器不支持 video 标签。
       </video>
     </a-modal>
-
+    <a-modal title="收藏标题" v-model="creativeTagVisible" :width="1000" @ok="okTag">
+      <el-tree :data="optionsTag" show-checkbox node-key="id" :props="defaultProps" :check-strictly="true" ref="tree">
+      </el-tree>
+    </a-modal>
     <a-modal :maskClosable="false" title="选择素材" v-model="stickerVisible" @ok="handleOkCover" :width="1000">
       <a-radio-group v-model="stickerStylesValue" class="sticker-styles" v-if="stickerStyles.length > 0">
         <a-radio v-for="(item, index) in stickerStyles" :key="index" :value="item.overlay_type">
@@ -877,7 +894,7 @@ export default {
       value: '',
       dataOne: [],
       title: [],
-
+      creativeTagVisible: false,
       tags: [],
       visibleMatemal: false,
       visibleVideo: false,
@@ -994,9 +1011,38 @@ export default {
       horizontalPhoto: [],
       creativeMaterialType: '1',
       postAdTrue: false,
+      optionsTag: [],
+      defaultProps: {
+        children: 'children',
+        label: 'label',
+        id: 'id',
+      },
+      tagName: '',
+      optionsTag: [],
     }
   },
   methods: {
+    getInfo(item) {
+      if (this.tagName == '') {
+        this.$message.error('请输入分类名称')
+        return
+      } else {
+        let params = {}
+        params.tagName = this.tagName
+        //   params.campaignBudget = this.campaignBudget
+        params.tagArray = JSON.stringify(this.getData('creativeTag'))
+        params.userId = this.userInfo().id
+        params.accountId = localStorage.getItem('accountId')
+        postAction('/tag/kuaiShouCreativeTagCollection/add', params).then((res) => {
+          if (res.success) {
+            this.$message.success('添加成功')
+            this.tagName = ''
+          } else {
+            this.$message.error(res.message)
+          }
+        })
+      }
+    },
     getCoverUrl(index, item, bestIndex) {
       nowIndex = index
       bestIndex = bestIndex
@@ -1113,6 +1159,62 @@ export default {
         })
       }
     },
+    showCunTag(type) {
+      this.creativeTagVisible = true
+      var params = {}
+      params.accountId = localStorage.getItem('accountId')
+      params.userId = this.userInfo().id
+      params.pageSize = 1000
+      params.pageNo = 1
+
+      getAction('/tag/kuaiShouCreativeTagCollection/list', params).then((res) => {
+        if (res.success) {
+          console.log(res.result)
+          this.optionsTag = res.result.records.map((item) => {
+            return {
+              id: item.id,
+              label: item.tagName,
+              children: JSON.parse(item.tagArray).map((item) => {
+                return {
+                  id: item,
+                  label: item,
+                  disabled: true,
+                }
+              }),
+            }
+          })
+        }
+      })
+    },
+    
+    okTag() {
+      var data = this.$refs.tree.getCheckedKeys()
+      if (data.length > 1) {
+        this.$message.error('只能选择一个选项')
+        //  this.$refs.tree.setCheckedKeys([]);
+      } else {
+        var params = {}
+        params.accountId = localStorage.getItem('accountId')
+        params.userId = this.userInfo().id
+        params.pageSize = 1000
+        params.pageNo = 1
+        params.id = data[0]
+
+        getAction('/tag/kuaiShouCreativeTagCollection/list', params).then((res) => {
+          if (res.success) {
+            console.log(res.result)
+            this.form.setFieldsValue({
+              creativeTag: JSON.parse(res.result.records[0].tagArray).map((item) => {
+                return item
+              }),
+            })
+            this.creativeTagVisible = false
+          }else{
+            this.$message.error('选择出错,请稍后选择或自行手填')
+          }
+        })
+      }
+    },
     showCunTitle(index, bestIndex) {
       nowIndex = index
       bestIndex = bestIndex
@@ -1531,12 +1633,12 @@ export default {
           })
           var params = Object.assign({}, values)
           // var params = {
-            params.dataJson= allJson.concat(dataAd)
-            // ...values,
-            params.creativeCategory = params.creativeCategory?params.creativeCategory.pop():null
-            params.unitId= this.pansKey
-            params.accountId= localStorage.getItem('accountId')
-            params.content= this.content
+          params.dataJson = allJson.concat(dataAd)
+          // ...values,
+          params.creativeCategory = params.creativeCategory ? params.creativeCategory.pop() : null
+          params.unitId = this.pansKey
+          params.accountId = localStorage.getItem('accountId')
+          params.content = this.content
           // }
           postAction('/kuaishou/batch/createCreative', params).then((res) => {
             if (res.success) {

+ 1 - 0
src/views/modules/kuaishouapp/account/stepForm/Step4.vue

@@ -1027,6 +1027,7 @@ export default {
         postAction('/tag/kuaiShouCreativeTagCollection/add', params).then((res) => {
           if (res.success) {
             this.$message.success('添加成功')
+            this.tagName = ''
           } else {
             this.$message.error(res.message)
           }

+ 88 - 6
src/views/playerPart/playerList.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="playerList">
-    <div class="top">
+    <!-- <div class="top">
       <div class="playBody">
         <div class="box">
           <div
@@ -34,7 +34,33 @@
           </div>
         </div>
       </div>
-    </div>
+    </div> -->
+
+    <a-card :bordered="false">
+      <a-button @click="addModules" style="margin: 0 0 15px 0" type="primary">新增模板</a-button>
+      <div>
+        <a-table
+          ref="table"
+          size="middle"
+          bordered
+          rowKey="id"
+          :columns="columns"
+          :dataSource="dataSource"
+          :loading="loading"
+        >
+          <span slot="action" slot-scope="text, record">
+            <a @click="preview(record)">预览</a>
+
+            <a-divider type="vertical" />
+
+            <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+              <a>删除</a>
+            </a-popconfirm>
+          </span>
+        </a-table>
+      </div>
+      <!-- table区域-end -->
+    </a-card>
     <div class="previewBody" v-if="previewBody">
       <div class="content">
         <div class="content-inner">
@@ -50,9 +76,9 @@
 </template>
 
 <script>
+import { getAction, postAction } from '../../api/manage'
 import playerList from './playerData'
-
-console.log(playerList)
+import { mapGetters } from 'vuex'
 
 export default {
   data() {
@@ -61,13 +87,48 @@ export default {
       previewBody: false,
       playerSrc: '',
       previewVisible: false,
+      loading: false,
+      dataSource: [],
+      columns: [
+        {
+          title: '试玩名称',
+          align: 'center',
+          dataIndex: 'fileName',
+        },
+        {
+          title: '试玩分类',
+          align: 'center',
+          dataIndex: 'fileType',
+        },
+        {
+          title: '上传时间',
+          align: 'center',
+          dataIndex: 'createTime',
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'action',
+          },
+        },
+      ],
     }
   },
   methods: {
+    ...mapGetters(['nickname', 'avatar', 'userInfo']),
     preview(item) {
       console.log(item)
-      this.previewBody = true
-      this.playerSrc = item.link
+
+      getAction('/shiwan/shiwanFileUpload/selectListByParentId', { id: item.id }).then((res) => {
+        if (res.success) {
+          this.previewBody = true
+          this.playerSrc = res.result.filter((i) => {
+            return i.fileSuffix == 'html'
+          })[0].fileUrl
+        }
+      })
     },
     closePreview() {
       this.previewBody = false
@@ -75,6 +136,27 @@ export default {
     handleCancel() {
       this.previewVisible = false
     },
+    addModules() {},
+    handleDelete(item) {
+      postAction('/shiwan/shiwanFileUpload/edit', { id: item, fileStatus: '0' }).then((res) => {
+        if (res.success) {
+          this.getPlayableList()
+        }
+      })
+    },
+    getPlayableList() {
+      getAction('/shiwan/shiwanFileUpload/list', {
+        pageNo: 1,
+        pageSize: 1000,
+      }).then((res) => {
+        if (res.success) {
+          this.dataSource = res.result.records
+        }
+      })
+    },
+  },
+  mounted() {
+    this.getPlayableList()
   },
 }
 </script>

+ 3 - 3
src/views/user/Login.vue

@@ -65,13 +65,13 @@
           @click.stop.prevent="handleSubmit" :disabled="loginBtn">确定
         </a-button>
       </a-form-item>
-      <div class="otherLogin" v-if="customActiveKey != 'tab1'"><span class="titleTip">其他登录方式</span></div>
-      <div class="feishu" @click="FSlogin" v-if="customActiveKey != 'tab1'">
+      <!-- <div class="otherLogin" v-if="customActiveKey != 'tab1'"><span class="titleTip">其他登录方式</span></div> -->
+      <!-- <div class="feishu" @click="FSlogin" v-if="customActiveKey != 'tab1'">
         <span class="FSicon">
           <img src="@/assets/feishu.png" alt="">
         </span>
         <span class="FSinfo">使用飞书快捷登录</span>
-      </div>
+      </div> -->
       <!-- <div class="user-login-other">
         <span>其他登陆方式</span>
         <a><a-icon class="item-icon" type="alipay-circle"></a-icon></a>

+ 3 - 3
vue.config.js

@@ -81,11 +81,11 @@ module.exports = {
         // target: 'http://192.168.1.94:8080', //请求本地 需要jeecg-boot后台项目  赵西安
 
 
-         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
-         // target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
-        // target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
+        //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目
+        target: 'http://192.168.1.251/', //请求本地 需要jeecg-boot后台项目
         // target:'http://118.24.244.213:8804',