wjx %!s(int64=2) %!d(string=hai) anos
pai
achega
8bee422200

+ 9 - 1
src/api/accounts/adApi.js

@@ -201,9 +201,17 @@ export function refreshByIds(data) {
 
 
 
 
 // 切换投手
 // 切换投手
-export function cutPut({adAccountId, putUserId}) {
+export function cutPut({ adAccountId, putUserId }) {
     return request({
     return request({
         url: `/adq/admin/adAccount/configPutUser/${adAccountId}/${putUserId}`,
         url: `/adq/admin/adAccount/configPutUser/${adAccountId}/${putUserId}`,
         method: 'PUT'
         method: 'PUT'
     })
     })
+}
+
+export function addAccountUser(data) {
+    return request({
+        url: `/adq/admin/adAccount/modifyAccountUser`,
+        method: 'POST',
+        data
+    })
 }
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
src/assets/icons/svg/gdt.svg


+ 4 - 0
src/views/accounts/account/components/changeRecord.vue

@@ -142,6 +142,10 @@
                         <el-option label="头条" value="头条" />
                         <el-option label="头条" value="头条" />
                         <el-option label="企微" value="企微" />
                         <el-option label="企微" value="企微" />
                         <el-option label="混投" value="混投" />
                         <el-option label="混投" value="混投" />
+                        <el-option label="ADQ企微" value="ADQ企微" />
+                        <el-option label="头条企微" value="头条企微" />
+                        <el-option label="MP企微" value="MP企微" />
+                        <el-option label="ADQ公众号" value="ADQ公众号" />
                     </el-select>
                     </el-select>
                 </el-form-item>
                 </el-form-item>
                 <el-form-item label="充值模板" prop="rechargeTemplate">
                 <el-form-item label="充值模板" prop="rechargeTemplate">

+ 2 - 0
src/views/accounts/account/components/cutBook.vue

@@ -45,8 +45,10 @@
                         <el-option label="GDT" value="GDT" />
                         <el-option label="GDT" value="GDT" />
                         <el-option label="头条" value="头条" />
                         <el-option label="头条" value="头条" />
                         <el-option label="企微" value="企微" />
                         <el-option label="企微" value="企微" />
+                        <el-option label="混投" value="混投" />
                         <el-option label="ADQ企微" value="ADQ企微" />
                         <el-option label="ADQ企微" value="ADQ企微" />
                         <el-option label="头条企微" value="头条企微" />
                         <el-option label="头条企微" value="头条企微" />
+                        <el-option label="MP企微" value="MP企微" />
                         <el-option label="ADQ公众号" value="ADQ公众号" />
                         <el-option label="ADQ公众号" value="ADQ公众号" />
                     </el-select>
                     </el-select>
                 </el-form-item>
                 </el-form-item>

+ 2 - 0
src/views/accounts/account/index.vue

@@ -318,8 +318,10 @@
                         <el-option label="GDT" value="GDT" />
                         <el-option label="GDT" value="GDT" />
                         <el-option label="头条" value="头条" />
                         <el-option label="头条" value="头条" />
                         <el-option label="企微" value="企微" />
                         <el-option label="企微" value="企微" />
+                        <el-option label="混投" value="混投" />
                         <el-option label="ADQ企微" value="ADQ企微" />
                         <el-option label="ADQ企微" value="ADQ企微" />
                         <el-option label="头条企微" value="头条企微" />
                         <el-option label="头条企微" value="头条企微" />
+                        <el-option label="MP企微" value="MP企微" />
                         <el-option label="ADQ公众号" value="ADQ公众号" />
                         <el-option label="ADQ公众号" value="ADQ公众号" />
                     </el-select>
                     </el-select>
                 </el-form-item>
                 </el-form-item>

+ 2 - 0
src/views/accounts/account/use.vue

@@ -366,8 +366,10 @@
             <el-option label="GDT" value="GDT" />
             <el-option label="GDT" value="GDT" />
             <el-option label="头条" value="头条" />
             <el-option label="头条" value="头条" />
             <el-option label="企微" value="企微" />
             <el-option label="企微" value="企微" />
+            <el-option label="混投" value="混投" />
             <el-option label="ADQ企微" value="ADQ企微" />
             <el-option label="ADQ企微" value="ADQ企微" />
             <el-option label="头条企微" value="头条企微" />
             <el-option label="头条企微" value="头条企微" />
+            <el-option label="MP企微" value="MP企微" />
             <el-option label="ADQ公众号" value="ADQ公众号" />
             <el-option label="ADQ公众号" value="ADQ公众号" />
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>

+ 47 - 6
src/views/accounts/adWarrant/index.vue

@@ -59,7 +59,12 @@
             <el-col :span="1.5">
             <el-col :span="1.5">
                 <div class="grid-content">
                 <div class="grid-content">
                     <el-button type="success" size="mini" icon="el-icon-sort" :disabled="multiple" :loading="reLoading"
                     <el-button type="success" size="mini" icon="el-icon-sort" :disabled="multiple" :loading="reLoading"
-                        @click="putsHandle">指派</el-button>
+                        @click="putsHandle">批量指派</el-button>
+                </div>
+            </el-col>
+            <el-col :span="1.5">
+                <div class="grid-content">
+                    <putUsers :multiple="multiple" :accountIds="accountIds" @change="putChange" :userAll="userAll"/>
                 </div>
                 </div>
             </el-col>
             </el-col>
             <el-col :span="1.5">
             <el-col :span="1.5">
@@ -85,6 +90,11 @@
                     <div>{{ scope.row.putUserInfo ? scope.row.putUserInfo.nickName : scope.row.putUserId }}</div>
                     <div>{{ scope.row.putUserInfo ? scope.row.putUserInfo.nickName : scope.row.putUserId }}</div>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
+            <el-table-column label="投放助理" prop="accountUsers" align="center" width="100" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                    <div>{{ scope.row.accountUsers | filterUser }}</div>
+                </template>
+            </el-table-column>
             <el-table-column label="公众号信息" align="center" width="150" :show-overflow-tooltip="true">
             <el-table-column label="公众号信息" align="center" width="150" :show-overflow-tooltip="true">
                 <template slot-scope="scope">
                 <template slot-scope="scope">
                     <el-row align="middle" type="flex" justify="center">
                     <el-row align="middle" type="flex" justify="center">
@@ -143,10 +153,10 @@
                     <span>{{ parseTime(scope.row.createTime) }}</span>
                     <span>{{ parseTime(scope.row.createTime) }}</span>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
-            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="80">
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
                 <template slot-scope="scope" v-if="scope.row.id && typeof scope.row.id === 'number'">
                 <template slot-scope="scope" v-if="scope.row.id && typeof scope.row.id === 'number'">
-                    <el-button size="mini" type="text" icon="el-icon-sort" v-hasPermi="['adWarrant:switch']"
-                        @click="puthangdle(scope.row)">指派</el-button>
+                    <el-button size="mini" type="text" icon="el-icon-sort" v-hasPermi="['adWarrant:switch']" @click="puthangdle(scope.row)">指派</el-button>
+                    <el-button size="mini" type="text" icon="el-icon-sort" v-hasPermi="['adWarrant:switch']" @click="putUserHandle(scope.row)">指派投放助理</el-button>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
         </el-table>
         </el-table>
@@ -305,6 +315,8 @@
         <el-dialog title="扫码" :visible.sync="imgBase64Show" width="200px">
         <el-dialog title="扫码" :visible.sync="imgBase64Show" width="200px">
             <img :src="this.imgBase64" width="180">
             <img :src="this.imgBase64" width="180">
         </el-dialog>
         </el-dialog>
+
+        <putUser @change="putChange" :accountIds="accountIds" :userAll="userAll" :putUserIds="putUserIds" @close="putUserShow = false" :show="putUserShow" v-if="putUserShow"/>
     </div>
     </div>
 </template>
 </template>
 
 
@@ -317,9 +329,11 @@ import { searchList } from "@/api/accounts/account";
 import MyTable from './components/myTable.vue';
 import MyTable from './components/myTable.vue';
 import store from '@/store'
 import store from '@/store'
 import { getToken } from '@/utils/auth'
 import { getToken } from '@/utils/auth'
+import putUsers from './putUsers.vue'
+import putUser from './putUser.vue'
 export default {
 export default {
     name: 'Account',
     name: 'Account',
-    components: { MyTable },
+    components: { MyTable, putUsers, putUser },
     data() {
     data() {
         return {
         return {
             queryParams: {
             queryParams: {
@@ -406,7 +420,18 @@ export default {
             imgBase64: '',
             imgBase64: '',
             imgBase64Show: false,
             imgBase64Show: false,
             errorData: {},
             errorData: {},
-            tabLoading: true
+            tabLoading: true,
+            accountIds: [],
+            putUserIds: [],
+            putUserShow: false
+        }
+    },
+    filters: {
+        filterUser(val) {
+            if (val && val.length > 0) {
+                return val.map(item => item.putUserName).toString()
+            }
+            return '-1'
         }
         }
     },
     },
     mounted() {
     mounted() {
@@ -429,6 +454,20 @@ export default {
         this.getAll()
         this.getAll()
     },
     },
     methods: {
     methods: {
+        putUserHandle(row) {
+            console.log(row);
+            this.putUserShow = true
+            this.accountIds = row.accountId ? [row.accountId] : []
+            this.putUserIds = row.accountUsers && row.accountUsers.length > 0 ? row.accountUsers.map(item => item.putUserId) : []
+        },
+        /** 指派投放助理回调 */
+        putChange() {
+            this.ids = []
+            this.accountIds = []
+            this.putUserIds = []
+            this.putUserShow = false
+            this.getAppListAll()
+        },
         /** 清空账户状态 */
         /** 清空账户状态 */
         clearAccount() {
         clearAccount() {
             fetch('http://47.99.157.216:8022/qq/delCookie', {
             fetch('http://47.99.157.216:8022/qq/delCookie', {
@@ -484,6 +523,7 @@ export default {
             refreshByIds(this.ids).then(res => {
             refreshByIds(this.ids).then(res => {
                 this.reLoading = false
                 this.reLoading = false
                 this.ids = []
                 this.ids = []
+                this.accountIds = []
                 this.msgSuccess("刷新成功");
                 this.msgSuccess("刷新成功");
                 this.getList()
                 this.getList()
             }).catch(() => {
             }).catch(() => {
@@ -697,6 +737,7 @@ export default {
         handleSelectionChange(selection) {
         handleSelectionChange(selection) {
             console.log(selection)
             console.log(selection)
             this.ids = selection.map(item => item.id)
             this.ids = selection.map(item => item.id)
+            this.accountIds = selection.map(item => item.accountId)
             console.log(this.ids)
             console.log(this.ids)
             this.multiple = !selection.length
             this.multiple = !selection.length
         }
         }

+ 86 - 0
src/views/accounts/adWarrant/putUser.vue

@@ -0,0 +1,86 @@
+<template>
+    <div>
+        <el-dialog title="指派投放助手" :visible.sync="show" width="450px" append-to-body>
+            <el-form :model="paramsForm" :rules="rules" ref="PUTUSER" label-width="80px" label-position="top">
+                <el-form-item label="投放助理" prop="putUserIds">
+                    <el-select v-model="paramsForm.putUserIds" multiple placeholder="请选择" filterable style="width: 100%" clearable>
+                        <el-option v-for="item in userAll" :key="item.id" :label="item.nickName" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="close">取 消</el-button>
+                <el-button type="primary" @click="submitPUt('PUTUSER')" :loading="loading">确 定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+<script>
+import { addAccountUser } from "@/api/accounts/adApi";
+export default {
+    name: 'putUser',
+    data() {
+        return {
+            loading: false,
+            paramsForm: {},
+            rules: {
+                putUserIds: [
+                    { required: true, message: '请选择投放助理', trigger: 'blur' }
+                ],
+            }
+        }
+    },
+    props: {
+        userAll: {
+            type: Array,
+            default: [],
+        },
+        putUserIds: {
+            type: Array,
+            default: [],
+        },
+        accountIds: {
+            type: Array,
+            default: [],
+        },
+        show: {
+            type: Boolean,
+            default: false
+        }
+    },
+    watch: {
+        putUserIds: {
+            handler(val) {
+                console.log('val--->', val);
+                this.$nextTick(() => {
+                    this.paramsForm['putUserIds'] = val
+                    this.$set(this.paramsForm, 'putUserIds', val)
+                })
+            },
+            immediate: true,
+        },
+    },
+    methods: {
+        submitPUt(type) {
+            this.$refs[type].validate((valid) => {
+                if (valid) {
+                    this.loading = true
+                    addAccountUser({ accountIds: this.accountIds, ...this.paramsForm }).then(res => {
+                        this.loading = false
+                        if (res.data) {
+                            this.msgSuccess('切换成功')
+                            this.paramsForm = {}
+                            this.show = false
+                            this.$emit('change')
+                        }
+                    }).catch(() => this.loading = false)
+                }
+            })
+        },
+        close() {
+            this.$emit('close')
+            this.paramsForm = {}
+        }
+    }
+}
+</script>

+ 75 - 0
src/views/accounts/adWarrant/putUsers.vue

@@ -0,0 +1,75 @@
+<template>
+    <div>
+        <el-button type="warning" size="mini" icon="el-icon-sort" :disabled="multiple" @click="putsHandle">指派投放助理</el-button>
+        <el-dialog title="指派投放助手" :visible.sync="show" width="450px" append-to-body>
+            <el-form :model="paramsForm" :rules="rules" ref="PUTUSERS" label-width="80px" label-position="top">
+                <el-form-item label="投放助理" prop="putUserIds">
+                    <el-select v-model="paramsForm.putUserIds" multiple placeholder="请选择" filterable style="width: 100%" clearable>
+                        <el-option v-for="item in userAll" :key="item.id" :label="item.nickName" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+            </el-form>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="paramsForm = {}; show = false">取 消</el-button>
+                <el-button type="primary" @click="submitPUt('PUTUSERS')" :loading="loading">确 定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import { addAccountUser } from "@/api/accounts/adApi";
+export default {
+    name: 'putUsers',
+    data() {
+        return {
+            loading: false,
+            show: false,
+            paramsForm: {
+                putUserIds: []
+            },
+            rules: {
+                putUserIds: [
+                    { required: true, message: '请选择投放助理', trigger: 'blur' }
+                ],
+            }
+        }
+    },
+    props: {
+        multiple: {
+            type: Boolean,
+            default: false
+        },
+        accountIds: {
+            type: Array,
+            default: [],
+        },
+        userAll: {
+            type: Array,
+            default: [],
+        }
+    },
+    methods: {
+        putsHandle() {
+            this.show = true
+            this.paramsForm = {}
+        },
+        submitPUt(type) {
+            this.$refs[type].validate((valid) => {
+                if (valid) {
+                    this.loading = true
+                    addAccountUser({ accountIds: this.accountIds, ...this.paramsForm }).then(res => {
+                        this.loading = false
+                        if (res.data) {
+                            this.msgSuccess('切换成功')
+                            this.paramsForm = {}
+                            this.show = false
+                            this.$emit('change')
+                        }
+                    }).catch(() => this.loading = false)
+                }
+            })
+        },
+    }
+}
+</script>

+ 14 - 9
src/views/accounts/ttAdWarrant/lookAccountButton.vue

@@ -2,22 +2,27 @@
     <el-button size="mini" type="text" icon="el-icon-view" @click="lookHangdle()">
     <el-button size="mini" type="text" icon="el-icon-view" @click="lookHangdle()">
         <span>查看账号</span>
         <span>查看账号</span>
         <el-dialog :title="'查看 ' + authUserId" :visible.sync="visible" width="900px" append-to-body v-if="visible">
         <el-dialog :title="'查看 ' + authUserId" :visible.sync="visible" width="900px" append-to-body v-if="visible">
+
+            <el-row :gutter="10" class="mb8" align="middle">
+                <el-col :span="10">
+                    <el-input type="textarea" autosize v-model="queryParams.accountIds" placeholder="输入账号ID(多个,,)" />
+                </el-col>
+                <el-col :span="1.5">
+                    <el-button type="cyan" icon="el-icon-search" @click="getList">搜索</el-button>
+                </el-col>
+            </el-row>
             <el-table :data="accountList" :loading="loading">
             <el-table :data="accountList" :loading="loading">
                 <el-table-column label="账号ID" prop="accountId" align="center" fixed width="150"
                 <el-table-column label="账号ID" prop="accountId" align="center" fixed width="150"
                     :show-overflow-tooltip="true" />
                     :show-overflow-tooltip="true" />
-                <el-table-column label="账号名称" prop="accountName" align="center" :show-overflow-tooltip="true"
-                    width="300" />
-                <el-table-column label="投手ID" prop="putUserId" align="center" width="120"
-                    :show-overflow-tooltip="true" />
-                <el-table-column label="所属组" prop="groupName" align="center" width="120"
-                    :show-overflow-tooltip="true" />
+                <el-table-column label="账号名称" prop="accountName" align="center" :show-overflow-tooltip="true" width="300" />
+                <el-table-column label="投手ID" prop="putUserId" align="center" width="120" :show-overflow-tooltip="true" />
+                <el-table-column label="所属组" prop="groupName" align="center" width="120" :show-overflow-tooltip="true" />
                 <el-table-column label="Enabled?" prop="enabled" align="center" width="80">
                 <el-table-column label="Enabled?" prop="enabled" align="center" width="80">
                     <template slot-scope="scope">
                     <template slot-scope="scope">
                         <span>{{ scope.row.enabled ? '可用' : '禁用' }}</span>
                         <span>{{ scope.row.enabled ? '可用' : '禁用' }}</span>
                     </template>
                     </template>
                 </el-table-column>
                 </el-table-column>
-                <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"
-                    width="90">
+                <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="90">
                     <template slot-scope="scope">
                     <template slot-scope="scope">
                         <!-- 指派 -->
                         <!-- 指派 -->
                         <put-user-button :accountId="scope.row.accountId" :authUserId="scope.row.authUserId"
                         <put-user-button :accountId="scope.row.accountId" :authUserId="scope.row.authUserId"
@@ -65,7 +70,7 @@ export default {
         },
         },
         getList() {
         getList() {
             if (this.adAppId && this.authUserId) {
             if (this.adAppId && this.authUserId) {
-                let params = { ...this.queryParams, adAppId: this.adAppId, authUserId: this.authUserId }
+                let params = { ...this.queryParams, adAppId: this.adAppId, authUserId: this.authUserId, accountIds: this.queryParams.accountIds ? this.queryParams.accountIds.split(/[,,\n\s]+/ig) : [] }
                 this.loading = true
                 this.loading = true
                 getAdAccountList(params).then(res => {
                 getAdAccountList(params).then(res => {
                     this.loading = false
                     this.loading = false

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio