|
@@ -1,79 +1,38 @@
|
|
|
|
+<style>
|
|
|
|
+.my-project .ant-tabs-nav-scroll {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+}
|
|
|
|
+</style>
|
|
<template>
|
|
<template>
|
|
<a-card
|
|
<a-card
|
|
:bordered="false"
|
|
:bordered="false"
|
|
:tabList="tabListNoTitle"
|
|
:tabList="tabListNoTitle"
|
|
:activeTabKey="noTitleKey"
|
|
:activeTabKey="noTitleKey"
|
|
@tabChange="key => onTabChange(key, 'noTitleKey')"
|
|
@tabChange="key => onTabChange(key, 'noTitleKey')"
|
|
|
|
+ class="my-project"
|
|
>
|
|
>
|
|
<!-- 查询区域 -->
|
|
<!-- 查询区域 -->
|
|
- {{noTitleKey}}
|
|
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline">
|
|
<a-form layout="inline">
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
<a-col :md="6" :sm="8">
|
|
<a-col :md="6" :sm="8">
|
|
- <a-form-item label="项目id">
|
|
|
|
- <a-input placeholder="请输入项目id" v-model="queryParam.projectId"></a-input>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="8">
|
|
|
|
- <a-form-item label="成员id">
|
|
|
|
- <a-input placeholder="请输入成员id" v-model="queryParam.userId"></a-input>
|
|
|
|
|
|
+ <a-form-item label="项目名称">
|
|
|
|
+ <a-input placeholder="请输入项目名称" v-model="keyWord"></a-input>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="8">
|
|
<a-col :md="6" :sm="8">
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
|
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
|
- <a-button
|
|
|
|
- type="primary"
|
|
|
|
- @click="searchReset"
|
|
|
|
- icon="reload"
|
|
|
|
- style="margin-left: 8px"
|
|
|
|
- >重置</a-button>
|
|
|
|
- <a @click="handleToggleSearch" style="margin-left: 8px">
|
|
|
|
- {{ toggleSearchStatus ? '收起' : '展开' }}
|
|
|
|
- <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
|
|
|
|
- </a>
|
|
|
|
|
|
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
|
</span>
|
|
</span>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <!-- 操作按钮区域 -->
|
|
|
|
- <div class="table-operator">
|
|
|
|
- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
|
- <a-button type="primary" icon="download" @click="handleExportXls('项目成员')">导出</a-button>
|
|
|
|
- <a-upload
|
|
|
|
- name="file"
|
|
|
|
- :showUploadList="false"
|
|
|
|
- :multiple="false"
|
|
|
|
- :headers="tokenHeader"
|
|
|
|
- :action="importExcelUrl"
|
|
|
|
- @change="handleImportExcel"
|
|
|
|
- >
|
|
|
|
- <a-button type="primary" icon="import">导入</a-button>
|
|
|
|
- </a-upload>
|
|
|
|
- <a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
|
- <a-menu slot="overlay">
|
|
|
|
- <a-menu-item key="1" @click="batchDel">
|
|
|
|
- <a-icon type="delete" />删除
|
|
|
|
- </a-menu-item>
|
|
|
|
- </a-menu>
|
|
|
|
- <a-button style="margin-left: 8px">
|
|
|
|
- 批量操作
|
|
|
|
- <a-icon type="down" />
|
|
|
|
- </a-button>
|
|
|
|
- </a-dropdown>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
<!-- table区域-begin -->
|
|
<!-- table区域-begin -->
|
|
<div>
|
|
<div>
|
|
- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
|
|
|
- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
|
|
|
|
- <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
|
|
|
- <a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
<a-table
|
|
<a-table
|
|
ref="table"
|
|
ref="table"
|
|
size="middle"
|
|
size="middle"
|
|
@@ -83,53 +42,119 @@
|
|
:dataSource="dataSource"
|
|
:dataSource="dataSource"
|
|
:pagination="ipagination"
|
|
:pagination="ipagination"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
|
- @change="handleTableChange"
|
|
|
|
>
|
|
>
|
|
|
|
+ <span slot="mediaId" slot-scope="mediaId">{{ mediaId == 1 ? '头条' : '快手' }}</span>
|
|
<span slot="action" slot-scope="text, record">
|
|
<span slot="action" slot-scope="text, record">
|
|
- <a @click="handleEdit(record)">编辑</a>
|
|
|
|
-
|
|
|
|
- <a-divider type="vertical" />
|
|
|
|
- <a-dropdown>
|
|
|
|
- <a class="ant-dropdown-link">
|
|
|
|
- 更多
|
|
|
|
- <a-icon type="down" />
|
|
|
|
- </a>
|
|
|
|
- <a-menu slot="overlay">
|
|
|
|
- <a-menu-item>
|
|
|
|
- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
|
|
- <a>删除</a>
|
|
|
|
- </a-popconfirm>
|
|
|
|
- </a-menu-item>
|
|
|
|
- </a-menu>
|
|
|
|
- </a-dropdown>
|
|
|
|
|
|
+ <a @click="handleEdit(record)">{{ noTitleKey == 'myProject' ? '查看成员' : '账号绑定' }}</a>
|
|
|
|
+ <a-divider type="vertical" v-show="noTitleKey == 'myProject'" />
|
|
|
|
+ <a @click="addParams(record)" v-show="noTitleKey == 'myProject'">新增人员</a>
|
|
</span>
|
|
</span>
|
|
</a-table>
|
|
</a-table>
|
|
</div>
|
|
</div>
|
|
<!-- table区域-end -->
|
|
<!-- table区域-end -->
|
|
|
|
|
|
- <!-- 表单区域 -->
|
|
|
|
- <projectMember-modal ref="modalForm" @ok="modalFormOk"></projectMember-modal>
|
|
|
|
|
|
+ <!-- 查看项目成员 -->
|
|
|
|
+ <a-modal title="查看项目成员" v-model="visible" @ok="handleOk" width="800px">
|
|
|
|
+ <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"
|
|
|
|
+ >{{ item.userName }}
|
|
|
|
+ <a-divider type="vertical" />
|
|
|
|
+ {{ item.roleCode | roleCode }}</a-tag
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </a-modal>
|
|
|
|
+
|
|
|
|
+ <!-- 添加项目成员 -->
|
|
|
|
+ <a-modal title="添加项目成员" v-model="visibleAdd" @ok="handleOkAdd">
|
|
|
|
+ <j-select-user-by-dep multiple v-model="user" @change="add"></j-select-user-by-dep>
|
|
|
|
+ </a-modal>
|
|
|
|
+
|
|
|
|
+ <!-- 账号绑定 -->
|
|
|
|
+ <a-modal
|
|
|
|
+ title="账号绑定"
|
|
|
|
+ v-model="visibleBind"
|
|
|
|
+ @ok="handleSubmit"
|
|
|
|
+ :width="800"
|
|
|
|
+ :okButtonProps="{ props: { disabled: false } }"
|
|
|
|
+ :cancelButtonProps="{ props: { disabled: false } }"
|
|
|
|
+ >
|
|
|
|
+ <a-form v-model="form">
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="选择方式"
|
|
|
|
+ :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
|
+ :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
|
+ >
|
|
|
|
+ <a-radio-group buttonStyle="solid" v-model="mode" @change="onChageLogin">
|
|
|
|
+ <a-radio-button value="login">登录</a-radio-button>
|
|
|
|
+ <a-radio-button value="authorization">授权</a-radio-button>
|
|
|
|
+ </a-radio-group>
|
|
|
|
+ </a-form-item>
|
|
|
|
+
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="账号:"
|
|
|
|
+ :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
|
+ :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
|
+ v-show="mode == 'login'"
|
|
|
|
+ >
|
|
|
|
+ <a-input v-model="accountName" placeholder="请输入账户名" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="密码:"
|
|
|
|
+ :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
|
+ :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
|
+ v-show="mode == 'login'"
|
|
|
|
+ >
|
|
|
|
+ <a-input type="password" v-model="password" placeholder="请输入密码" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="媒体:"
|
|
|
|
+ :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
|
+ :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
|
+ >
|
|
|
|
+ <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>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-form>
|
|
|
|
+ </a-modal>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import ProjectMemberModal from './modules/ProjectMemberModal'
|
|
import ProjectMemberModal from './modules/ProjectMemberModal'
|
|
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
|
import { httpAction, getAction } from '@/api/manage'
|
|
import { httpAction, getAction } from '@/api/manage'
|
|
|
|
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
|
|
|
+import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: 'ProjectMemberList',
|
|
name: 'ProjectMemberList',
|
|
- mixins: [JeecgListMixin],
|
|
|
|
components: {
|
|
components: {
|
|
- ProjectMemberModal
|
|
|
|
|
|
+ ProjectMemberModal,
|
|
|
|
+ JSelectUserByDep
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
description: '我的项目',
|
|
description: '我的项目',
|
|
// 表头
|
|
// 表头
|
|
|
|
+ visible: false,
|
|
|
|
+ keyWord: '',
|
|
|
|
+ mode: 'login',
|
|
|
|
+ mediaId: '2',
|
|
|
|
+ accountName: '',
|
|
|
|
+ password: '',
|
|
|
|
+ loginType: 'kuaishou',
|
|
|
|
+ form: this.$form.createForm(this),
|
|
|
|
+ record: '',
|
|
|
|
+ queryParam: {
|
|
|
|
+ projectId: '',
|
|
|
|
+ userId: ''
|
|
|
|
+ },
|
|
|
|
+ user: '',
|
|
tabListNoTitle: [
|
|
tabListNoTitle: [
|
|
{
|
|
{
|
|
key: 'myProject',
|
|
key: 'myProject',
|
|
@@ -143,24 +168,20 @@ export default {
|
|
noTitleKey: 'participation',
|
|
noTitleKey: 'participation',
|
|
columns: [
|
|
columns: [
|
|
{
|
|
{
|
|
- title: '#',
|
|
|
|
- dataIndex: '',
|
|
|
|
- key: 'rowIndex',
|
|
|
|
- width: 60,
|
|
|
|
|
|
+ title: '项目名称',
|
|
align: 'center',
|
|
align: 'center',
|
|
- customRender: function(t, r, index) {
|
|
|
|
- return parseInt(index) + 1
|
|
|
|
- }
|
|
|
|
|
|
+ dataIndex: 'projectName'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '项目id',
|
|
|
|
|
|
+ title: '成员',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'projectId'
|
|
|
|
|
|
+ dataIndex: 'userName'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '成员id',
|
|
|
|
|
|
+ title: '媒体类型',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'userId'
|
|
|
|
|
|
+ dataIndex: 'mediaId',
|
|
|
|
+ scopedSlots: { customRender: 'mediaId' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '操作',
|
|
title: '操作',
|
|
@@ -169,13 +190,17 @@ export default {
|
|
scopedSlots: { customRender: 'action' }
|
|
scopedSlots: { customRender: 'action' }
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- url: {
|
|
|
|
- list: '/ctop/projectMember/list',
|
|
|
|
- delete: '/ctop/projectMember/delete',
|
|
|
|
- deleteBatch: '/ctop/projectMember/deleteBatch',
|
|
|
|
- exportXlsUrl: 'ctop/projectMember/exportXls',
|
|
|
|
- importExcelUrl: 'ctop/projectMember/importExcel'
|
|
|
|
- }
|
|
|
|
|
|
+ dataSource: [],
|
|
|
|
+ dataElse: [],
|
|
|
|
+ ipagination: {},
|
|
|
|
+ loading: false,
|
|
|
|
+ memberList: [],
|
|
|
|
+ visibleAdd: false,
|
|
|
|
+ member: [],
|
|
|
|
+ itemJson: null,
|
|
|
|
+ visibleBind: false,
|
|
|
|
+ bindAccountLoginUrl: '/ctop/bindAccountLogin/login',
|
|
|
|
+ bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -183,22 +208,243 @@ export default {
|
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ filters: {
|
|
|
|
+ roleCode(value) {
|
|
|
|
+ var state = {
|
|
|
|
+ clip: '剪辑',
|
|
|
|
+ shot: '拍摄',
|
|
|
|
+ plan: '策划',
|
|
|
|
+ plane: '平面',
|
|
|
|
+ admin: '管理员',
|
|
|
|
+ operator: '运营专员',
|
|
|
|
+ kuaishouOperationManager: '快手运营经理'
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (value) {
|
|
|
|
+ return state[value]
|
|
|
|
+ } else {
|
|
|
|
+ return '暂无'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
|
+ add(value, key) {
|
|
|
|
+ var dataValue = value.split(',')
|
|
|
|
+ var dataKey = key.split(',')
|
|
|
|
+ var jsonArr = []
|
|
|
|
+ for (let i = 0; i < dataValue.length; i++) {
|
|
|
|
+ jsonArr.push({ userId: dataKey[i], userName: dataValue[i] })
|
|
|
|
+ }
|
|
|
|
+ this.member = jsonArr
|
|
|
|
+ },
|
|
onTabChange(key, type) {
|
|
onTabChange(key, type) {
|
|
console.log(key, type)
|
|
console.log(key, type)
|
|
this[type] = key
|
|
this[type] = key
|
|
|
|
+ this.keyWord = ''
|
|
|
|
+ if (key == 'myProject') {
|
|
|
|
+ this.getResponsibleList()
|
|
|
|
+ } else {
|
|
|
|
+ this.getParticipateList()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getResponsibleList() {
|
|
|
|
+ //我管理的
|
|
|
|
+ this.dataSource = []
|
|
|
|
+ this.dataElse = []
|
|
|
|
+ this.loading = true
|
|
|
|
+ getAction('/ctop/project/responsibleList', { userId: this.userInfo().id }).then(res => {
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ this.columns = [
|
|
|
|
+ {
|
|
|
|
+ title: '项目名称',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'projectName'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '管理人',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'advertiserName'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '媒体类型',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'mediaId',
|
|
|
|
+ scopedSlots: { customRender: 'mediaId' }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '操作',
|
|
|
|
+ dataIndex: 'action',
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'action' }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ this.dataSource = res.result
|
|
|
|
+ this.dataElse = res.result
|
|
|
|
+ this.loading = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getParticipateList() {
|
|
|
|
+ //我参与的
|
|
|
|
+ this.dataSource = []
|
|
|
|
+ this.dataElse = []
|
|
|
|
+ this.loading = true
|
|
|
|
+ getAction('/ctop/projectMember/participateList', { userId: this.userInfo().id }).then(res => {
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ this.dataSource = res.result
|
|
|
|
+ this.dataElse = res.result
|
|
|
|
+ this.columns = [
|
|
|
|
+ {
|
|
|
|
+ title: '项目名称',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'projectName'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '广告主',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'advertiserName'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '管理者',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'responsibleName'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '媒体类型',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'mediaId',
|
|
|
|
+ scopedSlots: { customRender: 'mediaId' }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '操作',
|
|
|
|
+ dataIndex: 'action',
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'action' }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ this.loading = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getMemberList(projectId) {
|
|
|
|
+ //成员查看
|
|
|
|
+ this.memberList = []
|
|
|
|
+
|
|
|
|
+ getAction('/ctop/projectMember/getMemberList', { projectId: projectId }).then(res => {
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ this.visible = true
|
|
|
|
+ this.memberList = res.result
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleOk(e) {
|
|
|
|
+ console.log(e)
|
|
|
|
+ this.visible = false
|
|
|
|
+ },
|
|
|
|
+ handleOkAdd(e) {
|
|
|
|
+ console.log(e)
|
|
|
|
+ var params = {}
|
|
|
|
+ params.projectId = this.itemJson.id
|
|
|
|
+ params.projectName = this.itemJson.projectName
|
|
|
|
+ params.memberArr = this.member
|
|
|
|
+
|
|
|
|
+ httpAction('/ctop/projectMember/batchAdd', params, 'post').then(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.visibleAdd = false
|
|
|
|
+ this.user = ''
|
|
|
|
+ })
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ addParams(item) {
|
|
|
|
+ this.visibleAdd = true
|
|
|
|
+ this.itemJson = item
|
|
|
|
+ console.log(this.itemJson)
|
|
|
|
+ },
|
|
|
|
+ handleAdd() {},
|
|
|
|
+ handleEdit(item) {
|
|
|
|
+ if (this.noTitleKey == 'myProject') {
|
|
|
|
+ this.getMemberList(item.id)
|
|
|
|
+ } else {
|
|
|
|
+ console.log(item)
|
|
|
|
+ this.record = item
|
|
|
|
+ this.visibleBind = true
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleDelete(id) {},
|
|
|
|
+ onChageLogin() {
|
|
|
|
+ console.log(this.mode)
|
|
|
|
+ this.loginType = 'kuaishou'
|
|
|
|
+ },
|
|
|
|
+ handleSubmit() {
|
|
|
|
+ let params = {}
|
|
|
|
+ params.advertiserId = this.record.advertiserId
|
|
|
|
+ params.advertiser_name = this.record.advertiserName
|
|
|
|
+ params.userId = this.userInfo().id
|
|
|
|
+ params.userName = this.userInfo().username
|
|
|
|
+ params.projectId = this.record.projectId
|
|
|
|
+ params.projectName = this.record.projectName
|
|
|
|
+
|
|
|
|
+ // 触发表单验证
|
|
|
|
+ this.form.validateFields(err => {
|
|
|
|
+ if (!err) {
|
|
|
|
+ if (this.mode == 'login') {
|
|
|
|
+ params.accountName = this.accountName
|
|
|
|
+ params.password = this.password
|
|
|
|
+ params.loginType = this.loginType
|
|
|
|
+ if (this.loginType == 'kuaishou') {
|
|
|
|
+ params.mediaId = this.mediaId
|
|
|
|
+ } else if (this.loginType == 'bytedance') {
|
|
|
|
+ params.mediaId = 1
|
|
|
|
+ }
|
|
|
|
+ httpAction(this.bindAccountLoginUrl, params, 'post').then(res => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ alert('绑定成功')
|
|
|
|
+ this.accountName = ''
|
|
|
|
+ this.password = ''
|
|
|
|
+ this.loginType = 'kuaishou'
|
|
|
|
+ this.visibleBind = false
|
|
|
|
+ } else {
|
|
|
|
+ alert(res.message)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ // 授权登录
|
|
|
|
+ if (this.mode == 'authorization') {
|
|
|
|
+ params.authorizationType = this.loginType
|
|
|
|
+ if (this.loginType == 'kuaishou') {
|
|
|
|
+ params.mediaId = this.mediaId
|
|
|
|
+ } else if (this.loginType == 'bytedance') {
|
|
|
|
+ params.mediaId = 1
|
|
|
|
+ }
|
|
|
|
+ httpAction(this.bindAuthorizationUrl, params, 'post').then(res => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ window.open(res.message, '_blank')
|
|
|
|
+ this.visibleBind = false
|
|
|
|
+ } else {
|
|
|
|
+ alert('绑定失败')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ searchReset() {
|
|
|
|
+ this.keyWord = ''
|
|
|
|
+ this.dataSource = this.dataElse
|
|
|
|
+ },
|
|
|
|
+ searchQuery() {
|
|
|
|
+ this.dataSource = this.dataElse.filter(item => {
|
|
|
|
+ return item.projectName.toLowerCase().indexOf(this.keyWord.toLowerCase()) > -1
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- //我管理的
|
|
|
|
- getAction('/ctop/project/responsibleList', { userId: this.userInfo().id }).then(res => {
|
|
|
|
- console.log(res)
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.getParticipateList()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style scoped>
|
|
<style scoped>
|
|
@import '~@assets/less/common.less';
|
|
@import '~@assets/less/common.less';
|
|
-</style>
|
|
|
|
|
|
+</style>
|