|
@@ -59,7 +59,12 @@
|
|
|
<el-col :span="1.5">
|
|
|
<div class="grid-content">
|
|
|
<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>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -85,6 +90,11 @@
|
|
|
<div>{{ scope.row.putUserInfo ? scope.row.putUserInfo.nickName : scope.row.putUserId }}</div>
|
|
|
</template>
|
|
|
</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">
|
|
|
<template slot-scope="scope">
|
|
|
<el-row align="middle" type="flex" justify="center">
|
|
@@ -143,10 +153,10 @@
|
|
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
|
</template>
|
|
|
</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'">
|
|
|
- <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>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -305,6 +315,8 @@
|
|
|
<el-dialog title="扫码" :visible.sync="imgBase64Show" width="200px">
|
|
|
<img :src="this.imgBase64" width="180">
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <putUser @change="putChange" :accountIds="accountIds" :userAll="userAll" :putUserIds="putUserIds" @close="putUserShow = false" :show="putUserShow" v-if="putUserShow"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -317,9 +329,11 @@ import { searchList } from "@/api/accounts/account";
|
|
|
import MyTable from './components/myTable.vue';
|
|
|
import store from '@/store'
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
+import putUsers from './putUsers.vue'
|
|
|
+import putUser from './putUser.vue'
|
|
|
export default {
|
|
|
name: 'Account',
|
|
|
- components: { MyTable },
|
|
|
+ components: { MyTable, putUsers, putUser },
|
|
|
data() {
|
|
|
return {
|
|
|
queryParams: {
|
|
@@ -406,7 +420,18 @@ export default {
|
|
|
imgBase64: '',
|
|
|
imgBase64Show: false,
|
|
|
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() {
|
|
@@ -429,6 +454,20 @@ export default {
|
|
|
this.getAll()
|
|
|
},
|
|
|
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() {
|
|
|
fetch('http://47.99.157.216:8022/qq/delCookie', {
|
|
@@ -484,6 +523,7 @@ export default {
|
|
|
refreshByIds(this.ids).then(res => {
|
|
|
this.reLoading = false
|
|
|
this.ids = []
|
|
|
+ this.accountIds = []
|
|
|
this.msgSuccess("刷新成功");
|
|
|
this.getList()
|
|
|
}).catch(() => {
|
|
@@ -697,6 +737,7 @@ export default {
|
|
|
handleSelectionChange(selection) {
|
|
|
console.log(selection)
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
+ this.accountIds = selection.map(item => item.accountId)
|
|
|
console.log(this.ids)
|
|
|
this.multiple = !selection.length
|
|
|
}
|