zhuxinbo 4 éve
szülő
commit
c74d9a246b

+ 2 - 2
src/components/tools/setting.js

@@ -66,7 +66,7 @@ const updateTheme = primaryColor => {
     const lessConfigNode = document.createElement('script');
     const lessScriptNode = document.createElement('script');
     lessStyleNode.setAttribute('rel', 'stylesheet/less');
-    lessStyleNode.setAttribute('href', '/color.less');
+    // lessStyleNode.setAttribute('href', '/color.less');
     lessConfigNode.innerHTML = `
       window.less = {
         async: true,
@@ -80,7 +80,7 @@ const updateTheme = primaryColor => {
       buildIt();
       lessScriptNode.onload = null;
     };
-    document.body.appendChild(lessStyleNode);
+    // document.body.appendChild(lessStyleNode);
     document.body.appendChild(lessConfigNode);
     document.body.appendChild(lessScriptNode);
     lessNodesAppended = true;

+ 242 - 182
src/views/modules/Statistics/refuseData.vue

@@ -6,7 +6,7 @@
         <div class="search-bar" style="width:100%;display:flex">
           <span style="line-height:35px;margin-left:15px">账户选择:</span>
           <treeselect :appId.sync="appId" :multiple="false" />
-          <a-button type="primary" style="margin-left:10px" @click="addUser">搜索</a-button>
+          <a-button type="primary" style="margin-left:10px" @click="(ipagination.current=1);addUser()">搜索</a-button>
         </div>
       </a-row>
     </a-row>
@@ -16,16 +16,12 @@
           <div style="display:flex;margin:0 0 20px 0">
             <a-input placeholder="请输出要查找的创意名称" style="width:300px;" v-model="keyWord" />
             <a-button type="primary" style="margin-left:10px" @click="addUserKey">搜索</a-button>
+            <a-button type="primary" style="margin-left:10px" @click="clickAgain" v-if="selectedRowKeys.length>0">一键重提
+            </a-button>
           </div>
 
-          <a-table
-            :columns="columns"
-            :dataSource="dataList"
-            bordered
-            :loading="loading"
-            size="middle"
-            :pagination="ipagination"
-          >
+          <a-table :columns="columns" :dataSource="dataList" bordered :loading="loading" size="middle"
+            :pagination="ipagination" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
             <div slot="videoUrl" slot-scope="videoUrl">
               <video class="video" :src="videoUrl" controls="controls" style="height:200px;width:112.5px">
                 您的浏览器不支持 video 标签。
@@ -50,197 +46,261 @@
         </a-card>
       </a-col>
     </a-row>
-    <a-modal
-      :title="editTitle"
-      :visible="visible"
-      @ok="handleOk"
-      :confirmLoading="confirmLoading"
-      @cancel="handleCancel"
-    >
+    <a-modal :title="editTitle" :visible="visible" @ok="handleOk" :confirmLoading="confirmLoading"
+      @cancel="handleCancel">
       <a-textarea v-model="editWord" autosize />
     </a-modal>
+    <!-- <a-modal v-model="visible" title="错误信息" onOk="handleOk" :footer="null">
+      <div v-if="visibleData">
+        修改条数:{{ visibleData.totalCount }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;失败条数:{{
+              visibleData.failCount
+            }}
+        <div style="margin-top:20px">
+          <p v-for="(item, index) of visibleData.failInfo" :key="index">
+            <span>名称:{{ item.campaignName?item.campaignName:item.unitName }}</span><br />
+            <span>错误信息:{{ item.message }}</span>
+          </p>
+        </div>
+      </div>
+    </a-modal> -->
   </div>
 </template>
 
 <script>
-import moment from 'moment'
-import {  getRefuseCreative, updateCreative, selectByCreateName } from '@api/statistics'
-import axios from 'axios'
-import EditableCell from './components/EditableCell'
-import { mapGetters } from 'vuex'
-
-import Treeselect from './components/Treeselect.vue'
+  import moment from 'moment'
+  import {
+    getRefuseCreative,
+    updateCreative,
+    selectByCreateName
+  } from '@api/statistics'
+  import axios from 'axios'
+  import EditableCell from './components/EditableCell'
+  import {
+    mapGetters
+  } from 'vuex'
+  import {
+    deleteAction,
+    getAction,
+    postAction
+  } from '@/api/manage'
+  import Treeselect from './components/Treeselect.vue'
 
-import { stopOtherVideo, closeAllVideoFun } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
-const columns = [
-  {
-    title: '账号Id',
-    dataIndex: 'accountId',
-    key: 'accountId',
-    align: 'center'
-  },
-  {
-    title: '计划Id',
-    dataIndex: 'campaignId',
-    key: 'campaignId',
-    align: 'center'
-  },
-  {
-    title: '广告组id',
-    dataIndex: 'unitId',
-    key: 'unitId',
-    align: 'center'
-  },
-  {
-    title: '创意id',
-    dataIndex: 'creativeId',
-    key: 'photoClick',
-    align: 'center'
-  },
-  {
-    title: '创意名称',
-    dataIndex: 'creativeName',
-    key: 'creativeName',
-    align: 'left',
-    scopedSlots: { customRender: 'creativeName' }
-  },
-  {
-    title: '视频',
-    dataIndex: 'videoUrl',
-    key: 'videoUrl',
-    align: 'center',
-    scopedSlots: { customRender: 'videoUrl' }
-  },
-  {
-    title: '封面',
-    dataIndex: 'coverUrl',
-    key: 'coverUrl',
-    align: 'center',
-    scopedSlots: { customRender: 'coverUrl' }
-  },
-  {
-    title: '拒绝原因',
-    dataIndex: 'reviewDetail',
-    key: 'reviewDetail',
-    align: 'left'
-  },
+  import {
+    stopOtherVideo,
+    closeAllVideoFun
+  } from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
+  const columns = [{
+      title: '账号Id',
+      dataIndex: 'accountId',
+      key: 'accountId',
+      align: 'center'
+    },
+    {
+      title: '计划Id',
+      dataIndex: 'campaignId',
+      key: 'campaignId',
+      align: 'center'
+    },
+    {
+      title: '广告组id',
+      dataIndex: 'unitId',
+      key: 'unitId',
+      align: 'center'
+    },
+    {
+      title: '创意id',
+      dataIndex: 'creativeId',
+      key: 'photoClick',
+      align: 'center'
+    },
+    {
+      title: '创意名称',
+      dataIndex: 'creativeName',
+      key: 'creativeName',
+      align: 'left',
+      scopedSlots: {
+        customRender: 'creativeName'
+      }
+    },
+    {
+      title: '视频',
+      dataIndex: 'videoUrl',
+      key: 'videoUrl',
+      align: 'center',
+      scopedSlots: {
+        customRender: 'videoUrl'
+      }
+    },
+    {
+      title: '封面',
+      dataIndex: 'coverUrl',
+      key: 'coverUrl',
+      align: 'center',
+      scopedSlots: {
+        customRender: 'coverUrl'
+      }
+    },
+    {
+      title: '拒绝原因',
+      dataIndex: 'reviewDetail',
+      key: 'reviewDetail',
+      align: 'left'
+    },
 
-  {
-    title: '广告语',
-    dataIndex: 'description',
-    key: 'description',
-    align: 'left',
-    scopedSlots: { customRender: 'description' }
-  }
-]
+    {
+      title: '广告语',
+      dataIndex: 'description',
+      key: 'description',
+      align: 'left',
+      scopedSlots: {
+        customRender: 'description'
+      }
+    }
+  ]
 
-export default {
-  name: 'refuse-data',
-  components: {
-    EditableCell,
-    Treeselect
-  },
+  export default {
+    name: 'refuse-data',
+    components: {
+      EditableCell,
+      Treeselect
+    },
 
-  data: function() {
-    return {
-      title: '被拒创意列表',
-      appId: null,
-      loading: false,
-      columns,
-      dataList: [],
-      keyWord: '',
-      editTitle: '',
-      confirmLoading: false,
-      visible: false,
-      editWord: '',
-      nowData: null,
-      ipagination: {
-        current: 1,
-        pageSize: 10,
-        showTotal: (total, range) => {
-          return range[0] + '-' + range[1] + ' 共' + total + '条'
-        },
-        showQuickJumper: true,
-        //   showSizeChanger: true,
-        total: 0,
-        onChange: current => {
-          // 切换分页时的回调,
-          // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
-          this.ipagination.current = current
+    data: function () {
+      return {
+        title: '被拒创意列表',
+        appId: null,
+        loading: false,
+        columns,
+        dataList: [],
+        keyWord: '',
+        editTitle: '',
+        confirmLoading: false,
+        visible: false,
+        editWord: '',
+        nowData: null,
+        selectedRowKeys: [],
+        selectedRowKeysValue: [],
+        ipagination: {
+          current: 1,
+          pageSize: 10,
+          showTotal: (total, range) => {
+            return range[0] + '-' + range[1] + ' 共' + total + '条'
+          },
+          showQuickJumper: true,
+          //   showSizeChanger: true,
+          total: 0,
+          onChange: current => {
+            // 切换分页时的回调,
+            // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
+            this.ipagination.current = current
+            this.selectedRowKeys = []
+            this.selectedRowKeysValue = []
+            this.addUser()
+          }
         }
       }
-    }
-  },
-  filters: {},
-  methods: {
-    handleOk(e) {
-      this.confirmLoading = true
-      var params = {}
-      params.accountId = this.nowData.accountId
-      params.campaignId = this.nowData.campaignId
-      params.unitId = this.nowData.unitId
-      params.creativeId = this.nowData.creativeId
-      params.creativeName = this.editTitle == '创意名称修改' ? this.editWord : this.nowData.creativeName
-      params.description = this.editTitle == '广告语修改' ? this.editWord : this.nowData.description
-      updateCreative(params).then(res => {
-        if (res.code == 0) {
-          this.addUser()
-          this.visible = false
-          this.confirmLoading = false
-        } else {
-          this.$message.error(res.message)
-          this.visible = false
-          this.confirmLoading = false
-        }
-      })
-    },
-    handleCancel(e) {
-      this.visible = false
     },
-    onCellChange(item, dataIndex) {
-      this.editWord = item[dataIndex]
-      this.editTitle = dataIndex == 'creativeName' ? '创意名称修改' : '广告语修改'
-      this.nowData = item
-      this.visible = true
+    filters: {},
+    watch: {
+      appId(n, o) {
+        console.log(n, o)
+        if (n != o) {
+          this.ipagination.current = 1
+        }
+      }
     },
-    moment,
-    ...mapGetters(['nickname', 'avatar', 'userInfo']),
-    addUser() {
-      this.loading = true
-      var params = {}
-      params.accountId = this.appId + ''
-      if (this.appId) {
-        getRefuseCreative(params).then(res => {
+    methods: {
+      clickAgain() {
+        var params = {}
+        params.accountId = this.appId + ''
+        params.creativeArr = this.selectedRowKeysValue
+        postAction('/MaterialRefuse/batchUpdateCreative', params).then(res => {
+          if (res.success) {
+            this.selectedRowKeysValue = []
+            this.selectedRowKeys = []
+            this.addUser()
+          }
+        })
+      },
+      onSelectChange(selectedRowKeys, selectionRows) {
+        this.selectedRowKeys = selectedRowKeys
+        this.selectedRowKeysValue = selectionRows.map(item => {
+          return {
+            description: item.description,
+            creativeId: item.creativeId
+          }
+        })
+        //    this.selectedRowKeysValue.length > 0 ? this.selectedRowKeysValue :
+      },
+      handleOk(e) {
+        this.confirmLoading = true
+        var params = {}
+        params.accountId = this.nowData.accountId
+        params.campaignId = this.nowData.campaignId
+        params.unitId = this.nowData.unitId
+        params.creativeId = this.nowData.creativeId
+        params.creativeName = this.editTitle == '创意名称修改' ? this.editWord : this.nowData.creativeName
+        params.description = this.editTitle == '广告语修改' ? this.editWord : this.nowData.description
+        updateCreative(params).then(res => {
           if (res.code == 0) {
-            this.dataList = res.data.map((v, index) => {
-              return {
-                ...v,
-                key: index
-              }
-            })
-            this.list = this.dataList
-            this.loading = false
-            this.ipagination.total = this.dataList.length
+            this.addUser()
+            this.visible = false
+            this.confirmLoading = false
+          } else {
+            this.$message.error(res.message)
+            this.visible = false
+            this.confirmLoading = false
           }
         })
-      } else {
-        this.$message.error('请选择账户')
+      },
+      handleCancel(e) {
+        this.visible = false
+      },
+      onCellChange(item, dataIndex) {
+        this.editWord = item[dataIndex]
+        this.editTitle = dataIndex == 'creativeName' ? '创意名称修改' : '广告语修改'
+        this.nowData = item
+        this.visible = true
+      },
+      moment,
+      ...mapGetters(['nickname', 'avatar', 'userInfo']),
+      addUser() {
+        this.loading = true
+        var params = {}
+        params.accountId = this.appId + ''
+        params.pageSize = this.ipagination.pageSize
+        params.pageNo = this.ipagination.current
+        if (this.appId) {
+          getAction('/MaterialRefuse/getRefuseCreative', params).then(res => {
+            if (res.code == 0) {
+              this.dataList = res.result.records.map((v, index) => {
+                return {
+                  ...v,
+                  key: index
+                }
+              })
+              this.list = this.dataList
+              this.loading = false
+              this.ipagination.total = res.result.total
+            }
+          })
+        } else {
+          this.$message.error('请选择账户')
+        }
+      },
+      addUserKey() {
+        this.dataList = this.list.filter(item => {
+          return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
+        })
       }
     },
-    addUserKey() {
-      this.dataList = this.list.filter(item => {
-        return item.creativeName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
-      })
+    watch: {},
+    distoryed() {},
+    updated() {
+      stopOtherVideo()
+    },
+    mounted: function () {
+      this.$nextTick(() => {})
     }
-  },
-  watch: {},
-  distoryed() {},
-  updated() {
-    stopOtherVideo()
-  },
-  mounted: function() {
-    this.$nextTick(() => {
-    })
   }
-}
-</script>
+</script>

+ 38 - 16
src/views/modules/advertiser/ProjectMemberList.vue

@@ -39,7 +39,8 @@
       <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
         :pagination="ipagination" :loading="loading">
         <span slot="maxBid" slot-scope="maxBid">{{ maxBid / 1000 }}</span>
-        <span slot="mediaId" slot-scope="mediaId">{{ mediaId == 1 ? '头条' :mediaId == 2? '快手':mediaId == 3?'头条内广':'快手内广' }}</span>
+        <span slot="mediaId"
+          slot-scope="mediaId">{{ mediaId == 1 ? '头条' :mediaId == 2? '快手':mediaId == 3?'头条内广':'快手内广' }}</span>
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">{{ noTitleKey == 'myProject' ? '查看成员' : '账号绑定' }}</a>
           <a-divider type="vertical" />
@@ -55,7 +56,8 @@
     <!-- table区域-end -->
 
     <!--  查看项目成员 -->
-    <a-modal :maskClosable="false" :title="title" v-model="visible" @ok="handleOk" width="800px" class="close-account-my-project">
+    <a-modal :maskClosable="false" :title="title" v-model="visible" @ok="handleOk" width="800px"
+      class="close-account-my-project">
       <div style="display:flex;line-height:50px;flex-wrap: wrap;">
         <div style="width:25%;text-align:center;" v-for="(item, index) of memberList" :key="index">
           <a-tag color="#2db7f5" @close="log(item.id)" closable>{{ item.userName }}
@@ -66,7 +68,8 @@
     </a-modal>
 
     <!--  添加项目成员 -->
-    <a-modal :maskClosable="false" title="添加项目成员" v-model="visibleAdd" @ok="handleOkAdd" :confirmLoading="confirmLoading">
+    <a-modal :maskClosable="false" title="添加项目成员" v-model="visibleAdd" @ok="handleOkAdd"
+      :confirmLoading="confirmLoading">
       <!-- /sys/user/getAllUserList -->
       <a-select v-model="appId" showSearch allowClear mode="multiple" placeholder="请选择成员" optionFilterProp="children"
         style="width: 100%" @focus="handleFocus" @blur="handleBlur" @change="handleChange" :filterOption="true"
@@ -95,9 +98,9 @@
             <a-radio-group buttonStyle="outline" v-model="loginType">
               <a-radio-button value="kuaishou">快手</a-radio-button>
               <a-radio-button value="bytedance">头条</a-radio-button>
-             
+
             </a-radio-group>
-             <br><span style="color:red;" v-if="loginType == 'bytedance'">*重要:如存在一户多开情况,请勾选所有子账号进行授权!!!</span>
+            <br><span style="color:red;" v-if="loginType == 'bytedance'">*重要:如存在一户多开情况,请勾选所有子账号进行授权!!!</span>
           </a-form-item>
           <a-form-item label="是否本代理商开户:" :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
             :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }" v-if="loginType == 'kuaishou'">
@@ -320,6 +323,7 @@
             // 切换分页时的回调,
             // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
             this.ipaginationAccount.current = current
+
           }
         },
         loadingAccount: false,
@@ -415,6 +419,18 @@
         return y + '-' + MM + '-' + d
       }
     },
+    watch: {
+      'ipagination.current': function (n, o) {
+        console.log(n, o)
+        if (this.noTitleKey == 'participation') {
+          this.getParticipateList()
+        } else {
+          this.getResponsibleList()
+        }
+
+
+      }
+    },
     methods: {
       //   /ctop/userAllocation/getAccountsByProjectId    projectId  userId
       projectLook(item) {
@@ -475,6 +491,7 @@
       onTabChange(key, type) {
         this[type] = key
         this.keyWord = ''
+        this.ipagination.current = 1
         if (key == 'myProject') {
           this.getResponsibleList()
         } else {
@@ -486,13 +503,16 @@
         this.dataSource = []
         this.dataElse = []
         this.loading = true
-        getAction('/ctop/project/responsibleList', {
-          userId: this.userInfo().id
+        getAction('/ctop/project/responsibleListV2', {
+          userId: this.userInfo().id,
+          pageSize: this.ipagination.pageSize,
+          pageNo: this.ipagination.current
         }).then(res => {
           if (res.code == 0) {
-            this.dataSource = res.result
-            this.dataElse = res.result
             this.loading = false
+            this.dataSource = res.result.records
+            this.dataElse = res.result.records
+            this.ipagination.total = res.result.total
           }
         })
       },
@@ -501,12 +521,15 @@
         this.dataSource = []
         this.dataElse = []
         this.loading = true
-        getAction('/ctop/projectMember/participateList', {
-          userId: this.userInfo().id
+        getAction('/ctop/projectMember/participateListV2', {
+          userId: this.userInfo().id,
+          pageSize: this.ipagination.pageSize,
+          pageNo: this.ipagination.current
         }).then(res => {
           if (res.code == 0) {
-            this.dataSource = res.result
-            this.dataElse = res.result
+            this.dataSource = res.result.records
+            this.dataElse = res.result.records
+            this.ipagination.total = res.result.total
             this.loading = false
           }
         })
@@ -578,7 +601,7 @@
           this.getMemberList(item.id)
         } else {
           this.mode = 'authorization'
-          this.loginType = item.mediaId == '1'||item.mediaId == '3' ? 'bytedance' : 'kuaishou'
+          this.loginType = item.mediaId == '1' || item.mediaId == '3' ? 'bytedance' : 'kuaishou'
           this.record = item
           this.visibleBind = true
         }
@@ -660,8 +683,7 @@
       getElseData(value) {
         this.getStatistics()
       },
-      handleBlur() {
-      },
+      handleBlur() {},
       handleFocus() {
         if (this.appId.length > 0) {
           this.options = []

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

@@ -92,9 +92,8 @@
             <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" />
+              <a-icon :type="record.editName ? 'check' : 'edit'" @click.stop="editShowName(record)"
+                style="margin-left:10px" class="count" />
             </div>
           </template>
           <span slot="action" slot-scope="text, record">
@@ -155,6 +154,17 @@
         </a-button>
       </template>
     </a-modal>
+    <a-modal v-model="nameEdit" title="广告计划名称修改" @afterClose="clear" :width="900" :maskClosable="false">
+      <a-form-item label="广告计划名称" :labelCol="{ lg: { span: 4 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
+        <a-input placeholder="请输入" v-model="campaignNameEdit" style="display: inline-block;" />
+      </a-form-item>
+      <template slot="footer">
+        <a-button key="submit" type="primary" @click="campaignEdit" :loading="loadingCampaign">
+          确定
+        </a-button>
+      </template>
+    </a-modal>
   </div>
 </template>
 
@@ -284,8 +294,8 @@
     },
     data: function () {
       return {
+        nameEdit: false,
         campaignIdSearch: '',
-        campaignName: '',
         loadingList: false,
         form: this.$form.createForm(this),
         jihua: false,
@@ -346,6 +356,9 @@
         url: {},
         type: '',
         campaignName: '',
+        campaignNameEdit: '',
+        loadingCampaign: false,
+        campaignIdEdit: '',
         campaignBudget: 'UNLIMITED',
         unitId: '',
         campaignId: ''
@@ -673,22 +686,29 @@
         }
         console.log(item)
       },
+      campaignEdit(e) {
+        this.loadingCampaign = true
+        var params = {}
+        params.accountId = this.appId + ''
+        params.campaignId = this.campaignIdEdit
+        params.campaignName = this.campaignNameEdit
+        postAction('/kuaishou/batch/updateCampaign', params).then(res => {
+          if (res.result.code == 0) {
+            this.loadingCampaign = false
+            this.nameEdit = false
+            this.$message.success('修改成功')
+            this.addUser()
+          } else {
+            this.loadingCampaign = false
+            this.$message.error(res.result.message)
+          }
+        })
+      },
       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()
-            }
-          })
-        }
+        this.nameEdit = true
+        this.campaignNameEdit = item.campaignName
+        this.campaignIdEdit = item.campaignId
+
       },
       dianji() {
         if (this.appId == '') {

+ 50 - 11
src/views/modules/kuaishouapp/account/advertisingGroup.vue

@@ -94,13 +94,14 @@
                 onChange: onSelectChange
               }" style="margin-top:30px" :loading="loadingList">
               <!-- getCheckboxProps: getCheckboxProps -->
-              <a slot="unitName" slot-scope="text, record" @click="toDetail(record)" :title="text">
-                <span
-                  :title="text"
-                  style="display:block;width:250px !important;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
-                  {{ text }}</span>
-
-              </a>
+              <span slot="unitName" slot-scope="text, record" :title="text">
+                <div style="display:flex;justify-content: center;">
+                  <a :title="text" @click="toDetail(record)"
+                    style="display:block;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
+                    {{ text }}</a>
+                  <a-icon type="edit" @click.stop="editShowName(record)" style="margin-left:10px" class="count" />
+                </div>
+              </span>
               <span slot="action" slot-scope="text, record">
                 <a-switch v-model="record.showSwich" @change="onChangeSwitch(record)" />
               </span>
@@ -114,8 +115,7 @@
               <span slot="putStatus" slot-scope="text">{{ text | putStatus }}</span>
               <span slot="createChannel" slot-scope="text">{{ text | createChannel }}</span>
               <span slot="reviewDetail" slot-scope="text">
-                <span
-                  :title="text"
+                <span :title="text"
                   style="margin:0;display:block;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
                   {{ text }}</span>
               </span>
@@ -258,6 +258,17 @@
         </a-button>
       </template>
     </a-modal>
+    <a-modal v-model="nameEdit" title="广告组名称修改" :width="900" :maskClosable="false">
+      <a-form-item label="广告组名称" :labelCol="{ lg: { span: 4 }, sm: { span: 7 } }"
+        :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">
+        <a-input placeholder="请输入" v-model="unitNameEdit" style="display: inline-block;" />
+      </a-form-item>
+      <template slot="footer">
+        <a-button key="submit" type="primary" @click="unitEdit" :loading="loadingUnit">
+          确定
+        </a-button>
+      </template>
+    </a-modal>
   </div>
 </template>
 
@@ -416,7 +427,7 @@
       scopedSlots: {
         customRender: 'reviewDetail'
       },
-      width:300
+      width: 300
     },
     {
       title: '出价类型',
@@ -605,7 +616,11 @@
         allPrice: '1',
         maxBid: null,
         copyData: null,
-        showDeepBid: false
+        showDeepBid: false,
+        nameEdit: false,
+        unitNameEdit: "",
+        unitIdEdit: "",
+        loadingUnit: false
       }
     },
     filters: {
@@ -715,6 +730,30 @@
       //     }
       //   }
       // },
+      unitEdit(e) {
+        this.loadingUnit = true
+        var params = {}
+        params.accountId = localStorage.getItem("accountId")
+        params.unitId = this.unitIdEdit
+        params.unitName = this.unitNameEdit
+        postAction('/kuaishou/batch/updateUnit', params).then(res => {
+          if (res.result.code == 0) {
+            this.loadingUnit = false
+            this.nameEdit = false
+            this.$message.success('修改成功')
+            this.getDataList(localStorage.getItem('advertisingGroupKey'))
+          } else {
+            this.loadingUnit = false
+            this.$message.error(res.result.message)
+          }
+        })
+      },
+      editShowName(item) {
+        this.nameEdit = true
+        this.unitNameEdit = item.unitName
+        this.unitIdEdit = item.unitId
+
+      },
       createUnitName() {
         this.unitNameList = []
         for (let i = 0; i < this.getData('createCount'); i++) {

+ 3 - 3
vue.config.js

@@ -56,14 +56,14 @@ module.exports = {
     port: 3000,
     proxy: {
       '/jeecg-boot': {
-        // target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
-        target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        target: 'http://192.168.1.90:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        // target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.94:8804', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
         // target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要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后台项目