|
@@ -18,8 +18,7 @@
|
|
dict="sys_category,name,id"
|
|
dict="sys_category,name,id"
|
|
pidField="pid"
|
|
pidField="pid"
|
|
pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
|
|
pidValue="f5cb2d2d28417b3b65a6dd744bcb9a76"
|
|
- >
|
|
|
|
- </j-tree-select>
|
|
|
|
|
|
+ ></j-tree-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="8">
|
|
<a-col :md="6" :sm="8">
|
|
@@ -39,21 +38,48 @@
|
|
|
|
|
|
<!-- table区域-begin -->
|
|
<!-- table区域-begin -->
|
|
<div>
|
|
<div>
|
|
|
|
+ <!-- bordered -->
|
|
<a-table
|
|
<a-table
|
|
ref="table"
|
|
ref="table"
|
|
size="middle"
|
|
size="middle"
|
|
- bordered
|
|
|
|
rowKey="id"
|
|
rowKey="id"
|
|
|
|
+ bordered
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:dataSource="dataSource"
|
|
:dataSource="dataSource"
|
|
:pagination="ipagination"
|
|
:pagination="ipagination"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
@change="handleTableChange"
|
|
@change="handleTableChange"
|
|
|
|
+ @expand="expand"
|
|
>
|
|
>
|
|
|
|
+ <a-table
|
|
|
|
+ slot="expandedRowRender"
|
|
|
|
+ slot-scope="text"
|
|
|
|
+ :columns="innerColumns"
|
|
|
|
+ :data-source="text.innerData"
|
|
|
|
+ :pagination="false"
|
|
|
|
+ :loading="text.showVideo"
|
|
|
|
+ :bordered="false"
|
|
|
|
+ >
|
|
|
|
+ <span slot="action" slot-scope="text, record">
|
|
|
|
+ <a @click="handleEdit(record)">编辑</a>
|
|
|
|
+
|
|
|
|
+ <a-divider type="vertical" />
|
|
|
|
+ <a @click="addProduct(record)">新增产品</a>
|
|
|
|
+
|
|
|
|
+ <a-divider type="vertical" />
|
|
|
|
+ <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
|
|
+ <a>删除</a>
|
|
|
|
+ </a-popconfirm>
|
|
|
|
+ </span>
|
|
|
|
+ </a-table>
|
|
|
|
+
|
|
<span slot="action" slot-scope="text, record">
|
|
<span slot="action" slot-scope="text, record">
|
|
<a @click="handleEdit(record)">编辑</a>
|
|
<a @click="handleEdit(record)">编辑</a>
|
|
|
|
|
|
<a-divider type="vertical" />
|
|
<a-divider type="vertical" />
|
|
|
|
+ <a @click="addProduct(record)">新增产品</a>
|
|
|
|
+
|
|
|
|
+ <a-divider type="vertical" />
|
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
<a>删除</a>
|
|
<a>删除</a>
|
|
</a-popconfirm>
|
|
</a-popconfirm>
|
|
@@ -171,6 +197,22 @@
|
|
<!-- 表单区域 -->
|
|
<!-- 表单区域 -->
|
|
<advertiser-modal ref="modalForm" @ok="modalFormOk"></advertiser-modal>
|
|
<advertiser-modal ref="modalForm" @ok="modalFormOk"></advertiser-modal>
|
|
<j-select-user ref="userForm" @ok="modalFormOk"></j-select-user>
|
|
<j-select-user ref="userForm" @ok="modalFormOk"></j-select-user>
|
|
|
|
+
|
|
|
|
+ <a-modal
|
|
|
|
+ title="新增产品"
|
|
|
|
+ v-model="productVisible"
|
|
|
|
+ @ok="handleSubmitProduct"
|
|
|
|
+ :width="800"
|
|
|
|
+ :confirm-loading="productLoading"
|
|
|
|
+ >
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="产品名称"
|
|
|
|
+ :label-col="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
|
+ :wrapper-col="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
|
+ >
|
|
|
|
+ <a-input v-model="productName" placeholder="请输入产品名称" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-modal>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -182,7 +224,7 @@ import AFormItem from 'ant-design-vue/es/form/FormItem'
|
|
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
|
|
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
|
|
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
|
|
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
|
|
import JSelectUser from '@/components/jeecgbiz/JSelectUser'
|
|
import JSelectUser from '@/components/jeecgbiz/JSelectUser'
|
|
-import { postAction } from '../../../api/manage'
|
|
|
|
|
|
+import { getAction, postAction } from '../../../api/manage'
|
|
import { mapActions, mapGetters } from 'vuex'
|
|
import { mapActions, mapGetters } from 'vuex'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -194,7 +236,7 @@ export default {
|
|
JTreeSelect,
|
|
JTreeSelect,
|
|
JSelectUserByDep,
|
|
JSelectUserByDep,
|
|
JSelectDepart,
|
|
JSelectDepart,
|
|
- JSelectUser
|
|
|
|
|
|
+ JSelectUser,
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -212,44 +254,84 @@ export default {
|
|
loginType: 'kuaishou',
|
|
loginType: 'kuaishou',
|
|
form: this.$form.createForm(this),
|
|
form: this.$form.createForm(this),
|
|
// 表头
|
|
// 表头
|
|
|
|
+ productVisible: false,
|
|
|
|
+ productName: '',
|
|
|
|
+ advertiserId: '',
|
|
|
|
+ productLoading: false,
|
|
|
|
+ productListLoading: false,
|
|
|
|
+ innerColumns: [
|
|
|
|
+ {
|
|
|
|
+ title: '产品名称',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'productName',
|
|
|
|
+ width:400
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '上传人',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'userName',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '状态',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'productStatus',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ if (text == 0) {
|
|
|
|
+ return '启用'
|
|
|
|
+ } else if (text == 1) {
|
|
|
|
+ return '暂停'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '创建时间',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'createTime',
|
|
|
|
+ customRender: function (text) {
|
|
|
|
+ return text.split(' ')[0]
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ innerData: [],
|
|
columns: [
|
|
columns: [
|
|
{
|
|
{
|
|
title: '广告主开户主体名称',
|
|
title: '广告主开户主体名称',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'name'
|
|
|
|
|
|
+ dataIndex: 'name',
|
|
|
|
+ width:400
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '行业',
|
|
title: '行业',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'industryId_dictText'
|
|
|
|
|
|
+ dataIndex: 'industryId_dictText',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '联系人姓名',
|
|
title: '联系人姓名',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'contact'
|
|
|
|
|
|
+ dataIndex: 'contact',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '联系人手机',
|
|
title: '联系人手机',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'mobile'
|
|
|
|
|
|
+ dataIndex: 'mobile',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '联系人邮箱',
|
|
title: '联系人邮箱',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'email'
|
|
|
|
|
|
+ dataIndex: 'email',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '销售',
|
|
title: '销售',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'saleId_dictText'
|
|
|
|
|
|
+ dataIndex: 'saleId_dictText',
|
|
},
|
|
},
|
|
|
|
|
|
{
|
|
{
|
|
title: '操作',
|
|
title: '操作',
|
|
dataIndex: 'action',
|
|
dataIndex: 'action',
|
|
align: 'center',
|
|
align: 'center',
|
|
- scopedSlots: { customRender: 'action' }
|
|
|
|
- }
|
|
|
|
|
|
+ scopedSlots: { customRender: 'action' },
|
|
|
|
+ },
|
|
],
|
|
],
|
|
url: {
|
|
url: {
|
|
list: '/ctop/advertiser/list',
|
|
list: '/ctop/advertiser/list',
|
|
@@ -261,19 +343,57 @@ export default {
|
|
bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
|
|
bindAuthorizationUrl: '/ctop/bindAccountAuth/authorization',
|
|
getLoginInfo: '/ctop/bindAccount/getLoginInfo',
|
|
getLoginInfo: '/ctop/bindAccount/getLoginInfo',
|
|
userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url
|
|
userId: '/sys/user/generateUserId', // 引入生成添加用户情况下的url
|
|
- userWithDepart: '/sys/user/userDepartList' // 引入为指定用户查看部门信息需要的url
|
|
|
|
- }
|
|
|
|
|
|
+ userWithDepart: '/sys/user/userDepartList', // 引入为指定用户查看部门信息需要的url
|
|
|
|
+ listTwo:'/ctop/product/productList'
|
|
|
|
+ },
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- importExcelUrl: function() {
|
|
|
|
|
|
+ importExcelUrl: function () {
|
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.queryParam.userId = this.userInfo().id
|
|
this.queryParam.userId = this.userInfo().id
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getProductList(expanded, record) {
|
|
|
|
+ console.log(expanded, record)
|
|
|
|
+ if (expanded) {
|
|
|
|
+ getAction('/ctop/product/productList', { advertiserId: record.id }).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.innerData = res.result
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ addProduct(item) {
|
|
|
|
+ this.productVisible = true
|
|
|
|
+ this.advertiserId = item.id
|
|
|
|
+ },
|
|
|
|
+ handleSubmitProduct() {
|
|
|
|
+ let params = {}
|
|
|
|
+ params.advertiserId = this.advertiserId
|
|
|
|
+ params.userId = this.userInfo().id
|
|
|
|
+ params.productName = this.productName
|
|
|
|
+ if (this.productName != '') {
|
|
|
|
+ this.productLoading = true
|
|
|
|
+ postAction('/ctop/product/add', params).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.$message.success('新增成功')
|
|
|
|
+ this.productName = ''
|
|
|
|
+ this.advertiserId = ''
|
|
|
|
+ this.productVisible = false
|
|
|
|
+ this.productLoading = false
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.message)
|
|
|
|
+ this.productLoading = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error('请输入产品名称')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
searchRe() {
|
|
searchRe() {
|
|
this.queryParam.name = ''
|
|
this.queryParam.name = ''
|
|
@@ -290,7 +410,7 @@ export default {
|
|
params.projectName = this.record.projectName
|
|
params.projectName = this.record.projectName
|
|
|
|
|
|
// 触发表单验证
|
|
// 触发表单验证
|
|
- this.form.validateFields(err => {
|
|
|
|
|
|
+ this.form.validateFields((err) => {
|
|
if (!err) {
|
|
if (!err) {
|
|
if (this.mode == 'login') {
|
|
if (this.mode == 'login') {
|
|
params.accountName = this.accountName
|
|
params.accountName = this.accountName
|
|
@@ -301,7 +421,7 @@ export default {
|
|
} else if (this.loginType == 'bytedance') {
|
|
} else if (this.loginType == 'bytedance') {
|
|
params.mediaId = 1
|
|
params.mediaId = 1
|
|
}
|
|
}
|
|
- postAction(this.url.bindAccountLoginUrl, params).then(res => {
|
|
|
|
|
|
+ postAction(this.url.bindAccountLoginUrl, params).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
alert('绑定成功')
|
|
alert('绑定成功')
|
|
this.accountName = ''
|
|
this.accountName = ''
|
|
@@ -320,7 +440,7 @@ export default {
|
|
} else if (this.authorizationType == 'bytedance') {
|
|
} else if (this.authorizationType == 'bytedance') {
|
|
params.mediaId = 1
|
|
params.mediaId = 1
|
|
}
|
|
}
|
|
- postAction(this.url.bindAuthorizationUrl, params).then(res => {
|
|
|
|
|
|
+ postAction(this.url.bindAuthorizationUrl, params).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
window.open(res.message, '_blank')
|
|
window.open(res.message, '_blank')
|
|
} else {
|
|
} else {
|
|
@@ -349,8 +469,8 @@ export default {
|
|
|
|
|
|
handleCancel() {
|
|
handleCancel() {
|
|
this.close()
|
|
this.close()
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ },
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style scoped>
|
|
<style scoped>
|