|
@@ -10,12 +10,28 @@
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button type="cyan" icon="el-icon-search" @click="getList">搜索</el-button>
|
|
<el-button type="cyan" icon="el-icon-search" @click="getList">搜索</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button type="primary" icon="el-icon-sort" @click="putuser"
|
|
|
|
+ :disabled="adAccountList.length === 0">批量指派</el-button>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-table :data="accountList" :loading="loading">
|
|
|
|
|
|
+ <el-table :data="accountList" ref="multipleTable" :loading="loading" @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column type="selection" width="50" align="center" />
|
|
<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="账号名称" prop="accountName" align="center" :show-overflow-tooltip="true" width="300" />
|
|
|
|
+ <el-table-column label="投手" prop="putUser" align="center" width="120" :show-overflow-tooltip="true">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span v-if="scope.row.putUser">{{ scope.row.putUser.nickName }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="投手ID" prop="putUserId" align="center" width="120" :show-overflow-tooltip="true" />
|
|
<el-table-column label="投手ID" prop="putUserId" align="center" width="120" :show-overflow-tooltip="true" />
|
|
|
|
+ <el-table-column label="运营账号" prop="operationUserList" align="center" width="120"
|
|
|
|
+ :show-overflow-tooltip="true">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{ scope.row.operationUserList | filterUser }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="所属组" prop="groupName" 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">
|
|
@@ -32,14 +48,17 @@
|
|
</el-table>
|
|
</el-table>
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
|
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
|
+
|
|
|
|
+ <putUser :visible="putuserVisible" :adAccountList="adAccountList" @onChange="getList()" @onClose="onClose()" />
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import { getAdAccountList } from "@/api/accounts/ttAdapi";
|
|
import { getAdAccountList } from "@/api/accounts/ttAdapi";
|
|
import putUserButton from "./putUserButton.vue"
|
|
import putUserButton from "./putUserButton.vue"
|
|
|
|
+import putUser from "./putUser.vue"
|
|
export default {
|
|
export default {
|
|
- components: { putUserButton },
|
|
|
|
|
|
+ components: { putUserButton, putUser },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
visible: false,
|
|
visible: false,
|
|
@@ -49,7 +68,18 @@ export default {
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
},
|
|
},
|
|
accountList: [],
|
|
accountList: [],
|
|
- total: 0
|
|
|
|
|
|
+ total: 0,
|
|
|
|
+ ids: [],
|
|
|
|
+ adAccountList: [],
|
|
|
|
+ putuserVisible: false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ filters: {
|
|
|
|
+ filterUser(val) {
|
|
|
|
+ if (val && val.length > 0) {
|
|
|
|
+ return val.map(item => item.nickname).toString()
|
|
|
|
+ }
|
|
|
|
+ return '-1'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
@@ -63,12 +93,35 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ onClose() {
|
|
|
|
+ this.putuserVisible = false
|
|
|
|
+ // this.$nextTick(() => {
|
|
|
|
+ // this.adAccountList = []
|
|
|
|
+ // this.ids = []
|
|
|
|
+ // this.$refs.multipleTable.clearSelection();
|
|
|
|
+ // })
|
|
|
|
+ },
|
|
|
|
+ // 批量指派
|
|
|
|
+ putuser() {
|
|
|
|
+ this.putuserVisible = true
|
|
|
|
+ },
|
|
|
|
+ handleSelectionChange(selection) {
|
|
|
|
+ console.log(selection)
|
|
|
|
+ this.adAccountList = selection.map(item => ({ accountId: item.accountId, authUserId: this.authUserId }));
|
|
|
|
+ this.ids = selection.map(item => item.accountId);
|
|
|
|
+ },
|
|
lookHangdle() {
|
|
lookHangdle() {
|
|
this.visible = true
|
|
this.visible = true
|
|
this.queryParams.pageNum = 1
|
|
this.queryParams.pageNum = 1
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
getList() {
|
|
getList() {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.adAccountList = []
|
|
|
|
+ this.ids = []
|
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
|
+ })
|
|
|
|
+
|
|
if (this.adAppId && this.authUserId) {
|
|
if (this.adAppId && this.authUserId) {
|
|
let params = { ...this.queryParams, adAppId: this.adAppId, authUserId: this.authUserId, accountIds: this.queryParams.accountIds ? this.queryParams.accountIds.split(/[,,\n\s]+/ig) : [] }
|
|
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
|